AUI().add("ntnu-person-list-search",function(A){A.Handlebars.registerHelper("portraitImage",function(context,options){if(context&&_.isString(context)&&context.length>0&&context!=="null")return new A.Handlebars.SafeString('\x3cdiv class\x3d"image"\x3e\x3cimg class\x3d"portrait" src\x3d"'+options.fn(this)+'"/\x3e\x3c/div\x3e');return'\x3cdiv class\x3d"image"\x3e\x3ci class\x3d"portrait fa fa-user"\x3e\x3c/i\x3e\x3c/div\x3e'});A.Handlebars.registerHelper("select",function(selected,options){return options.fn(this).replace(new RegExp(' value\x3d"'+
selected+'"'),'$\x26 selected\x3d"selected"')});function PersonSearch(config){var selectedUsers=[];var title=config.title||"h2";var viewmode=config.viewmode||"list";function logger(msg,object){if(console)if(!object){if(console)console.log(msg)}else if(console)console.log(msg,object)}function userNameTransaction(getMode,usernames){A.io.request(config.preferenceUrl,{dataType:"json",data:{usernames:usernames?usernames:[],getMode:getMode},on:{success:function(event){if(_.isArray(this.get("responseData").usernames)){selectedUsers=
this.get("responseData").usernames;A.fire("person-portlet:userUpdate")}},failure:function(event,id,data){var resultObj=JSON.parse(data.response);logger("Returnerer usernames fra preferences",resultObj)}}})}function saveHeading(event){var inputNode=config.mainNode.one(".overskriftInput");var headingNode=config.mainNode.one(".heading");var heading=inputNode.val();if(!heading||heading.length===0)headingNode.text("Click to edit the heading");headingNode.text(heading);inputNode.hide();headingNode.show();
A.io.request(config.saveHeadingUrl,{dataType:"json",data:{heading:heading},on:{success:function(event){var newHeading=this.get("responseData").heading;config.mainNode.one(".heading").text(newHeading);if(!newHeading||newHeading.length===0)config.mainNode.one(".heading").text("Click to edit the heading")},failure:function(event,id,data){var resultObj=JSON.parse(data.response);logger("Returnerer usernames fra preferences",resultObj)}}})}function saveTitle(event){var selectNode=config.mainNode.one(".titleSelect");
var title=selectNode.val();if(title)A.io.request(config.saveTitleUrl,{dataType:"json",data:{title:title},on:{success:function(event){var newtitle=this.get("responseData").title;title=newtitle},failure:function(event,id,data){var resultObj=JSON.parse(data.response);logger("Returnerer usernames fra preferences",resultObj)}}})}function saveViewmode(event){var selectNode=config.mainNode.one(".viewmodeSelect");var viewmode=selectNode.val();if(viewmode)A.io.request(config.saveViewmodeUrl,{dataType:"json",
data:{viewmode:viewmode},on:{success:function(event){config.viewmode=this.get("responseData").viewmode;findPersonsByUsername()},failure:function(event,id,data){var resultObj=JSON.parse(data.response);logger("Returnerer usernames fra preferences",resultObj)}}})}function saveNotes(event){var nodes=config.mainNode.all(".note");var notes={};nodes.each(function(node){notes[node.get("name")]=node.val()});A.io.request(config.saveNotesUrl,{dataType:"json",data:{notes:JSON.stringify(notes)},on:{success:function(event){var newtitle=
this.get("responseData").title;title=newtitle},failure:function(event,id,data){var resultObj=JSON.parse(data.response);logger("Returnerer usernames fra preferences",resultObj)}}})}function clickToEdit(){var inputNode=config.mainNode.one(".overskriftInput");var headingNode=config.mainNode.one(".heading");var headingString=headingNode.text();inputNode.val(headingString);if(headingString==="Click to edit the heading")inputNode.val("");inputNode.show();headingNode.hide();inputNode.focus()}function changeView(event){A.io.request(config.viewSettingUrl,
{dataType:"json",on:{success:function(event){config.isCardView=this.get("responseData").isCardView;findPersonsByUsername()},failure:function(event,id,data){var resultObj=JSON.parse(data.response);logger("Returnerer usernames fra preferences",resultObj)}}})}function findPersonsByUsername(){A.io.request(config.findPersonsByUsernameUrl,{dataType:"json",on:{success:function(event){var users=this.get("responseData").persons;var language=A.one("html").getAttribute("lang");var lang_eng;if(language=="en-GB")lang_eng=
true;config.chosenPersonsNode.empty();var source="";if(config.viewmode==="list")source="#"+config.namespace+"chosenPerson-list-template";else if(config.viewmode==="role")source="#"+config.namespace+"chosenPerson-role-template";else source="#"+config.namespace+"chosenPerson-template";var template=A.Handlebars.compile(A.one(source).getHTML());var html=template({items:users,lang_eng:true});config.chosenPersonsNode.append(html);A.all(".removeCard").on("click",removePersonCard)},failure:function(event,
id,data){var resultObj=JSON.parse(data.response);logger("Returnerer usernames fra preferences",resultObj)}}})}function removePersonCard(event){event.preventDefault();event.stopPropagation();var node=event.currentTarget;var userToRemove=node.getAttribute("data-username");if(userToRemove&&userToRemove.length>0)selectedUsers=_.filter(selectedUsers,function(username){return username!=userToRemove});userNameTransaction(false,selectedUsers)}A.on("person-portlet:userUpdate",findPersonsByUsername);A.on("person-portlet:searchStart",
function(){A.one(".fa-spinner").show()});A.on("person-portlet:searchStop",function(){A.one(".fa-spinner").hide()});config.mainNode.delegate("click",clickToEdit,".heading");config.mainNode.delegate("blur",saveHeading,".overskriftInput");config.mainNode.delegate("change",saveViewmode,".viewmodeSelect");config.mainNode.delegate("change",saveTitle,".titleSelect");config.mainNode.delegate("blur",saveNotes,".note");return{executeSearch:function(searchString){A.log("Doing clean search request");A.fire("person-portlet:searchStart");
A.io.request(config.url,{dataType:"json",data:{query:searchString},on:{success:function(event){A.fire("person-portlet:searchStop");config.resultNode.empty();var source=A.one("#"+config.namespace+"searchResult-template ").getHTML(),template=A.Handlebars.compile(source),html;html=template({items:this.get("responseData").results});config.resultNode.append(html)},failure:function(event,id,data){A.fire("person-portlet:searchStop");var resultObj=JSON.parse(data.response)}}})},renderSettingsPanel:function(renderNode){renderNode.empty();
var source=A.one("#"+config.namespace+"settings-template").getHTML(),template=A.Handlebars.compile(source),html;html=template({title:title,viewmode:viewmode});renderNode.append(html)},handleSelectedUsers:userNameTransaction,renderSeachInput:function(renderNode){A.one(renderNode).empty();var source=A.one("#"+config.namespace+"searchInput-template").getHTML(),template=A.Handlebars.compile(source),html;html=template({});A.one(renderNode).append(html)},selectPerson:function(event){var userName=event.currentTarget.getAttribute("data-username");
selectedUsers.push(userName);userNameTransaction(false,selectedUsers)}}}A.PersonSearch=PersonSearch},"1.0",{requires:["node","aui-io-request-deprecated","handlebars"]});
AUI().ready(function(){AUI().use("node",function(A){if(A.one(".person-portlet-view")){A.one(".person-portlet-view").delegate("mouseover",function(event){var node=event.currentTarget;if(node.one(".goToProfile")&&node.one(".overlay")){node.one(".goToProfile").show();node.one(".overlay").addClass("hover")}},".personCards");A.one(".person-portlet-view").delegate("mouseout",function(){A.all(".goToProfile").hide();A.all(".overlay").removeClass("hover")},".personCards")}if(A.one(".person-portlet-view")){A.one(".person-portlet-view").delegate("mouseover",
function(event){var node=event.currentTarget;if(node.one(".goToProfileListView"))node.one(".goToProfileListView").show()},".personListBox");A.one(".person-portlet-view").delegate("mouseout",function(){if(A.all(".goToProfileListView").length>0)A.all(".goToProfileListView").hide()},".personListBox")}})});
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c;}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;
function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"jKlg":[function(require,
module,exports){var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,e=Object.prototype.propertyIsEnumerable;function n(r){if(null==r)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function o(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de","5"===Object.getOwnPropertyNames(r)[0])return!1;for(var t={},e=0;e<10;e++)t["_"+String.fromCharCode(e)]=e;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(r){return t[r]}).join(""))return!1;
var n={};return"abcdefghijklmnopqrst".split("").forEach(function(r){n[r]=r}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(o){return!1}}module.exports=o()?Object.assign:function(o,c){for(var a,i,s=n(o),f=1;f<arguments.length;f++){for(var u in a=Object(arguments[f]))t.call(a,u)&&(s[u]=a[u]);if(r){i=r(a);for(var b=0;b<i.length;b++)e.call(a,i[b])&&(s[i[b]]=a[i[b]])}}return s}},{}],"PN0a":[function(require,module,exports){var e=require("object-assign"),r="function"==typeof Symbol&&
Symbol.for,t=r?Symbol.for("react.element"):60103,n=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,f=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,i=r?Symbol.for("react.forward_ref"):60112,s=r?Symbol.for("react.suspense"):60113,a=r?Symbol.for("react.memo"):60115,p=r?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function d(e){for(var r=
"https://reactjs.org/docs/error-decoder.html?invariant\x3d"+e,t=1;t<arguments.length;t++)r+="\x26args[]\x3d"+encodeURIComponent(arguments[t]);return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function m(e,r,t){this.props=e,this.context=r,this.refs=h,this.updater=
t||v}function x(){}function b(e,r,t){this.props=e,this.context=r,this.refs=h,this.updater=t||v}m.prototype.isReactComponent={},m.prototype.setState=function(e,r){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(d(85));this.updater.enqueueSetState(this,e,r,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=m.prototype;var S=b.prototype=new x;S.constructor=b,e(S,m.prototype),S.isPureReactComponent=!0;var _={current:null},
k=Object.prototype.hasOwnProperty,$={key:!0,ref:!0,__self:!0,__source:!0};function g(e,r,n){var o,u={},f=null,c=null;if(null!=r)for(o in void 0!==r.ref&&(c=r.ref),void 0!==r.key&&(f=""+r.key),r)k.call(r,o)&&!$.hasOwnProperty(o)&&(u[o]=r[o]);var l=arguments.length-2;if(1===l)u.children=n;else if(1<l){for(var i=Array(l),s=0;s<l;s++)i[s]=arguments[s+2];u.children=i}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===u[o]&&(u[o]=l[o]);return{$$typeof:t,type:e,key:f,ref:c,props:u,_owner:_.current}}
function w(e,r){return{$$typeof:t,type:e.type,key:r,ref:e.ref,props:e.props,_owner:e._owner}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function E(e){var r={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})}var R=/\/+/g,P=[];function j(e,r,t,n){if(P.length){var o=P.pop();return o.result=e,o.keyPrefix=r,o.func=t,o.context=n,o.count=0,o}return{result:e,keyPrefix:r,func:t,context:n,count:0}}function O(e){e.result=null,e.keyPrefix=null,e.func=
null,e.context=null,e.count=0,10>P.length&&P.push(e)}function A(e,r,o,u){var f=typeof e;"undefined"!==f&&"boolean"!==f||(e=null);var c=!1;if(null===e)c=!0;else switch(f){case "string":case "number":c=!0;break;case "object":switch(e.$$typeof){case t:case n:c=!0}}if(c)return o(u,e,""===r?"."+U(e,0):r),1;if(c=0,r=""===r?".":r+":",Array.isArray(e))for(var l=0;l<e.length;l++){var i=r+U(f=e[l],l);c+=A(f,i,o,u)}else if(null===e||"object"!=typeof e?i=null:i="function"==typeof(i=y&&e[y]||e["@@iterator"])?
i:null,"function"==typeof i)for(e=i.call(e),l=0;!(f=e.next()).done;)c+=A(f=f.value,i=r+U(f,l++),o,u);else if("object"===f)throw o=""+e,Error(d(31,"[object Object]"===o?"object with keys {"+Object.keys(e).join(", ")+"}":o,""));return c}function I(e,r,t){return null==e?0:A(e,"",r,t)}function U(e,r){return"object"==typeof e&&null!==e&&null!=e.key?E(e.key):r.toString(36)}function q(e,r){e.func.call(e.context,r,e.count++)}function F(e,r,t){var n=e.result,o=e.keyPrefix;e=e.func.call(e.context,r,e.count++),
Array.isArray(e)?L(e,n,t,function(e){return e}):null!=e&&(C(e)&&(e=w(e,o+(!e.key||r&&r.key===e.key?"":(""+e.key).replace(R,"$\x26/")+"/")+t)),n.push(e))}function L(e,r,t,n,o){var u="";null!=t&&(u=(""+t).replace(R,"$\x26/")+"/"),I(e,F,r=j(r,u,n,o)),O(r)}var M={current:null};function D(){var e=M.current;if(null===e)throw Error(d(321));return e}var V={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:_,IsSomeRendererActing:{current:!1},assign:e};exports.Children={map:function(e,
r,t){if(null==e)return e;var n=[];return L(e,n,null,r,t),n},forEach:function(e,r,t){if(null==e)return e;I(e,q,r=j(null,null,r,t)),O(r)},count:function(e){return I(e,function(){return null},null)},toArray:function(e){var r=[];return L(e,r,null,function(e){return e}),r},only:function(e){if(!C(e))throw Error(d(143));return e}},exports.Component=m,exports.Fragment=o,exports.Profiler=f,exports.PureComponent=b,exports.StrictMode=u,exports.Suspense=s,exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=
V,exports.cloneElement=function(r,n,o){if(null==r)throw Error(d(267,r));var u=e({},r.props),f=r.key,c=r.ref,l=r._owner;if(null!=n){if(void 0!==n.ref&&(c=n.ref,l=_.current),void 0!==n.key&&(f=""+n.key),r.type&&r.type.defaultProps)var i=r.type.defaultProps;for(s in n)k.call(n,s)&&!$.hasOwnProperty(s)&&(u[s]=void 0===n[s]&&void 0!==i?i[s]:n[s])}var s=arguments.length-2;if(1===s)u.children=o;else if(1<s){i=Array(s);for(var a=0;a<s;a++)i[a]=arguments[a+2];u.children=i}return{$$typeof:t,type:r.type,key:f,
ref:c,props:u,_owner:l}},exports.createContext=function(e,r){return void 0===r&&(r=null),(e={$$typeof:l,_calculateChangedBits:r,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},exports.createElement=g,exports.createFactory=function(e){var r=g.bind(null,e);return r.type=e,r},exports.createRef=function(){return{current:null}},exports.forwardRef=function(e){return{$$typeof:i,render:e}},exports.isValidElement=C,exports.lazy=function(e){return{$$typeof:p,
_ctor:e,_status:-1,_result:null}},exports.memo=function(e,r){return{$$typeof:a,type:e,compare:void 0===r?null:r}},exports.useCallback=function(e,r){return D().useCallback(e,r)},exports.useContext=function(e,r){return D().useContext(e,r)},exports.useDebugValue=function(){},exports.useEffect=function(e,r){return D().useEffect(e,r)},exports.useImperativeHandle=function(e,r,t){return D().useImperativeHandle(e,r,t)},exports.useLayoutEffect=function(e,r){return D().useLayoutEffect(e,r)},exports.useMemo=
function(e,r){return D().useMemo(e,r)},exports.useReducer=function(e,r,t){return D().useReducer(e,r,t)},exports.useRef=function(e){return D().useRef(e)},exports.useState=function(e){return D().useState(e)},exports.version="16.13.1"},{"object-assign":"jKlg"}],"d6ZO":[function(require,module,exports){module.exports=require("./cjs/react.production.min.js")},{"./cjs/react.production.min.js":"PN0a"}],"hL0s":[function(require,module,exports){var e,n,t,r,o;if("undefined"==typeof window||"function"!=typeof MessageChannel){var a=
null,l=null,i=function(){if(null!==a)try{var e=exports.unstable_now();a(!0,e),a=null}catch(n){throw setTimeout(i,0),n;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u},e=function(n){null!==a?setTimeout(e,0,n):(a=n,setTimeout(i,0))},n=function(e,n){l=setTimeout(e,n)},t=function(){clearTimeout(l)},r=function(){return!1},o=exports.unstable_forceFrameRate=function(){}}else{var s=window.performance,c=window.Date,f=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var b=
window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof b&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof s&&"function"==typeof s.now)exports.unstable_now=function(){return s.now()};else{var d=
c.now();exports.unstable_now=function(){return c.now()-d}}var v=!1,x=null,w=-1,m=5,y=0;r=function(){return exports.unstable_now()>=y},o=function(){},exports.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):m=0<e?Math.floor(1E3/e):5};var _=new MessageChannel,h=_.port2;_.port1.onmessage=function(){if(null!==x){var e=exports.unstable_now();y=e+m;try{x(!0,e)?h.postMessage(null):
(v=!1,x=null)}catch(n){throw h.postMessage(null),n;}}else v=!1},e=function(e){x=e,v||(v=!0,h.postMessage(null))},n=function(e,n){w=f(function(){e(exports.unstable_now())},n)},t=function(){p(w),w=-1}}function k(e,n){var t=e.length;e.push(n);e:for(;;){var r=t-1>>>1,o=e[r];if(!(void 0!==o&&0<P(o,n)))break e;e[r]=n,e[t]=o,t=r}}function T(e){return void 0===(e=e[0])?null:e}function g(e){var n=e[0];if(void 0!==n){var t=e.pop();if(t!==n){e[0]=t;e:for(var r=0,o=e.length;r<o;){var a=2*(r+1)-1,l=e[a],i=a+1,
u=e[i];if(void 0!==l&&0>P(l,t))void 0!==u&&0>P(u,l)?(e[r]=u,e[i]=t,r=i):(e[r]=l,e[a]=t,r=a);else{if(!(void 0!==u&&0>P(u,t)))break e;e[r]=u,e[i]=t,r=i}}}return n}return null}function P(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}var F=[],I=[],M=1,C=null,A=3,L=!1,q=!1,D=!1;function R(e){for(var n=T(I);null!==n;){if(null===n.callback)g(I);else{if(!(n.startTime<=e))break;g(I),n.sortIndex=n.expirationTime,k(F,n)}n=T(I)}}function j(t){if(D=!1,R(t),!q)if(null!==T(F))q=!0,e(E);else{var r=
T(I);null!==r&&n(j,r.startTime-t)}}function E(e,o){q=!1,D&&(D=!1,t()),L=!0;var a=A;try{for(R(o),C=T(F);null!==C&&(!(C.expirationTime>o)||e&&!r());){var l=C.callback;if(null!==l){C.callback=null,A=C.priorityLevel;var i=l(C.expirationTime<=o);o=exports.unstable_now(),"function"==typeof i?C.callback=i:C===T(F)&&g(F),R(o)}else g(F);C=T(F)}if(null!==C)var u=!0;else{var s=T(I);null!==s&&n(j,s.startTime-o),u=!1}return u}finally{C=null,A=a,L=!1}}function N(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;
case 4:return 1E4;default:return 5E3}}var B=o;exports.unstable_IdlePriority=5,exports.unstable_ImmediatePriority=1,exports.unstable_LowPriority=4,exports.unstable_NormalPriority=3,exports.unstable_Profiling=null,exports.unstable_UserBlockingPriority=2,exports.unstable_cancelCallback=function(e){e.callback=null},exports.unstable_continueExecution=function(){q||L||(q=!0,e(E))},exports.unstable_getCurrentPriorityLevel=function(){return A},exports.unstable_getFirstCallbackNode=function(){return T(F)},
exports.unstable_next=function(e){switch(A){case 1:case 2:case 3:var n=3;break;default:n=A}var t=A;A=n;try{return e()}finally{A=t}},exports.unstable_pauseExecution=function(){},exports.unstable_requestPaint=B,exports.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var t=A;A=e;try{return n()}finally{A=t}},exports.unstable_scheduleCallback=function(r,o,a){var l=exports.unstable_now();if("object"==typeof a&&null!==a){var i=a.delay;i="number"==typeof i&&
0<i?l+i:l,a="number"==typeof a.timeout?a.timeout:N(r)}else a=N(r),i=l;return r={id:M++,callback:o,priorityLevel:r,startTime:i,expirationTime:a=i+a,sortIndex:-1},i>l?(r.sortIndex=i,k(I,r),null===T(F)&&r===T(I)&&(D?t():D=!0,n(j,i-l))):(r.sortIndex=a,k(F,r),q||L||(q=!0,e(E))),r},exports.unstable_shouldYield=function(){var e=exports.unstable_now();R(e);var n=T(F);return n!==C&&null!==C&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<C.expirationTime||r()},exports.unstable_wrapCallback=
function(e){var n=A;return function(){var t=A;A=n;try{return e.apply(this,arguments)}finally{A=t}}}},{}],"X3CY":[function(require,module,exports){module.exports=require("./cjs/scheduler.production.min.js")},{"./cjs/scheduler.production.min.js":"hL0s"}],"bRSS":[function(require,module,exports){var e=require("react"),t=require("object-assign"),n=require("scheduler");function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant\x3d"+e,n=1;n<arguments.length;n++)t+="\x26args[]\x3d"+encodeURIComponent(arguments[n]);
return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!e)throw Error(r(227));function l(e,t,n,r,l,i,a,o,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(s){this.onError(s)}}var i=!1,a=null,o=!1,u=null,c={onError:function(e){i=!0,a=e}};function s(e,t,n,r,o,u,s,f,d){i=!1,a=null,l.apply(c,arguments)}function f(e,t,n,l,c,f,d,p,m){if(s.apply(this,arguments),i){if(!i)throw Error(r(198));
var h=a;i=!1,a=null,o||(o=!0,u=h)}}var d=null,p=null,m=null;function h(e,t,n){var r=e.type||"unknown-event";e.currentTarget=m(n),f(r,t,void 0,e),e.currentTarget=null}var g=null,v={};function y(){if(g)for(var e in v){var t=v[e],n=g.indexOf(e);if(!(-1<n))throw Error(r(96,e));if(!w[n]){if(!t.extractEvents)throw Error(r(97,e));for(var l in w[n]=t,n=t.eventTypes){var i=void 0,a=n[l],o=t,u=l;if(k.hasOwnProperty(u))throw Error(r(99,u));k[u]=a;var c=a.phasedRegistrationNames;if(c){for(i in c)c.hasOwnProperty(i)&&
b(c[i],o,u);i=!0}else a.registrationName?(b(a.registrationName,o,u),i=!0):i=!1;if(!i)throw Error(r(98,l,e));}}}}function b(e,t,n){if(x[e])throw Error(r(100,e));x[e]=t,T[e]=t.eventTypes[n].dependencies}var w=[],k={},x={},T={};function E(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var l=e[t];if(!v.hasOwnProperty(t)||v[t]!==l){if(v[t])throw Error(r(102,t));v[t]=l,n=!0}}n&&y()}var S=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),C=null,P=null,_=null;
function N(e){if(e=p(e)){if("function"!=typeof C)throw Error(r(280));var t=e.stateNode;t&&(t=d(t),C(e.stateNode,e.type,t))}}function z(e){P?_?_.push(e):_=[e]:P=e}function M(){if(P){var e=P,t=_;if(_=P=null,N(e),t)for(e=0;e<t.length;e++)N(t[e])}}function I(e,t){return e(t)}function F(e,t,n,r,l){return e(t,n,r,l)}function O(){}var R=I,D=!1,L=!1;function U(){null===P&&null===_||(O(),M())}function A(e,t,n){if(L)return e(t,n);L=!0;try{return R(e,t,n)}finally{L=!1,U()}}var V=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
Q=Object.prototype.hasOwnProperty,W={},H={};function j(e){return!!Q.call(H,e)||!Q.call(W,e)&&(V.test(e)?H[e]=!0:(W[e]=!0,!1))}function B(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case "function":case "symbol":return!0;case "boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}function K(e,t,n,r){if(null==t||B(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);
case 6:return isNaN(t)||1>t}return!1}function $(e,t,n,r,l,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var q={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){q[e]=new $(e,0,!1,e,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],
["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];q[t]=new $(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){q[e]=new $(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){q[e]=new $(e,2,!1,e,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){q[e]=
new $(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){q[e]=new $(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){q[e]=new $(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){q[e]=new $(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){q[e]=new $(e,5,!1,e.toLowerCase(),null,!1)});var Y=/[\-:]([a-z])/g;function X(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=
e.replace(Y,X);q[t]=new $(t,1,!1,e,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Y,X);q[t]=new $(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Y,X);q[t]=new $(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){q[e]=new $(e,1,!1,e.toLowerCase(),null,!1)}),q.xlinkHref=new $("xlinkHref",1,!1,"xlink:href",
"http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){q[e]=new $(e,1,!1,e.toLowerCase(),null,!0)});var G=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Z(e,t,n,r){var l=q.hasOwnProperty(t)?q[t]:null;(null!==l?0===l.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(K(t,n,l,r)&&(n=null),r||null===l?j(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=null===n?3!==l.type&&"":n:
(t=l.attributeName,r=l.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(l=l.type)||4===l&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}G.hasOwnProperty("ReactCurrentDispatcher")||(G.ReactCurrentDispatcher={current:null}),G.hasOwnProperty("ReactCurrentBatchConfig")||(G.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,ee="function"==typeof Symbol&&Symbol.for,te=ee?Symbol.for("react.element"):60103,ne=ee?Symbol.for("react.portal"):60106,re=ee?Symbol.for("react.fragment"):
60107,le=ee?Symbol.for("react.strict_mode"):60108,ie=ee?Symbol.for("react.profiler"):60114,ae=ee?Symbol.for("react.provider"):60109,oe=ee?Symbol.for("react.context"):60110,ue=ee?Symbol.for("react.concurrent_mode"):60111,ce=ee?Symbol.for("react.forward_ref"):60112,se=ee?Symbol.for("react.suspense"):60113,fe=ee?Symbol.for("react.suspense_list"):60120,de=ee?Symbol.for("react.memo"):60115,pe=ee?Symbol.for("react.lazy"):60116,me=ee?Symbol.for("react.block"):60121,he="function"==typeof Symbol&&Symbol.iterator;
function ge(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ve(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then(function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)},function(t){0===e._status&&(e._status=2,e._result=t)})}}function ye(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case re:return"Fragment";case ne:return"Portal";
case ie:return"Profiler";case le:return"StrictMode";case se:return"Suspense";case fe:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case oe:return"Context.Consumer";case ae:return"Context.Provider";case ce:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case de:return ye(e.type);case me:return ye(e.render);case pe:if(e=1===e._status?e._result:null)return ye(e)}return null}function be(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n=
"";break e;default:var r=e._debugOwner,l=e._debugSource,i=ye(e.type);n=null,r&&(n=ye(r.type)),r=i,i="",l?i=" (at "+l.fileName.replace(J,"")+":"+l.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n    in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function we(e){switch(typeof e){case "boolean":case "number":case "object":case "string":case "undefined":return e;default:return""}}function ke(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function xe(e){var t=
ke(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}
function Te(e){e._valueTracker||(e._valueTracker=xe(e))}function Ee(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ke(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Se(e,n){var r=n.checked;return t({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function Ce(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=we(null!=
t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Pe(e,t){null!=(t=t.checked)&&Z(e,"checked",t,!1)}function _e(e,t){Pe(e,t);var n=we(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ze(e,t.type,n):t.hasOwnProperty("defaultValue")&&
ze(e,t.type,we(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ne(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ze(e,t,n){"number"===t&&e.ownerDocument.activeElement===
e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Me(t){var n="";return e.Children.forEach(t,function(e){null!=e&&(n+=e)}),n}function Ie(e,n){return e=t({children:void 0},n),(n=Me(n.children))&&(e.children=n),e}function Fe(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+
we(n),t=null,l=0;l<e.length;l++){if(e[l].value===n)return e[l].selected=!0,void(r&&(e[l].defaultSelected=!0));null!==t||e[l].disabled||(t=e[l])}null!==t&&(t.selected=!0)}}function Oe(e,n){if(null!=n.dangerouslySetInnerHTML)throw Error(r(91));return t({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Re(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(r(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(r(93));
n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:we(n)}}function De(e,t){var n=we(t.value),r=we(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Le(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Ue={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Ae(e){switch(e){case "svg":return"http://www.w3.org/2000/svg";
case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ve(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Qe,We=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==Ue.svg||"innerHTML"in e)e.innerHTML=t;else{for((Qe=
Qe||document.createElement("div")).innerHTML="\x3csvg\x3e"+t.valueOf().toString()+"\x3c/svg\x3e",t=Qe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function He(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function je(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Be={animationend:je("Animation","AnimationEnd"),animationiteration:je("Animation",
"AnimationIteration"),animationstart:je("Animation","AnimationStart"),transitionend:je("Transition","TransitionEnd")},Ke={},$e={};function qe(e){if(Ke[e])return Ke[e];if(!Be[e])return e;var t,n=Be[e];for(t in n)if(n.hasOwnProperty(t)&&t in $e)return Ke[e]=n[t];return e}S&&($e=document.createElement("div").style,"AnimationEvent"in window||(delete Be.animationend.animation,delete Be.animationiteration.animation,delete Be.animationstart.animation),"TransitionEvent"in window||delete Be.transitionend.transition);
var Ye=qe("animationend"),Xe=qe("animationiteration"),Ge=qe("animationstart"),Ze=qe("transitionend"),Je="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),et=new ("function"==typeof WeakMap?WeakMap:Map);function tt(e){var t=et.get(e);return void 0===t&&(t=new Map,et.set(e,t)),t}function nt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=
t.return;else{e=t;do 0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return;while(e)}return 3===t.tag?n:null}function rt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function lt(e){if(nt(e)!==e)throw Error(r(188));}function it(e){var t=e.alternate;if(!t){if(null===(t=nt(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(l=
i.return)){n=l;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return lt(i),e;if(a===l)return lt(i),t;a=a.sibling}throw Error(r(188));}if(n.return!==l.return)n=i,l=a;else{for(var o=!1,u=i.child;u;){if(u===n){o=!0,n=i,l=a;break}if(u===l){o=!0,l=i,n=a;break}u=u.sibling}if(!o){for(u=a.child;u;){if(u===n){o=!0,n=a,l=i;break}if(u===l){o=!0,l=a,n=i;break}u=u.sibling}if(!o)throw Error(r(189));}}if(n.alternate!==l)throw Error(r(190));}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===
n?e:t}function at(e){if(!(e=it(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function ot(e,t){if(null==t)throw Error(r(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function ut(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,
e)}var ct=null;function st(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)h(e,t[r],n[r]);else t&&h(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function ft(e){if(null!==e&&(ct=ot(ct,e)),e=ct,ct=null,e){if(ut(e,st),ct)throw Error(r(95));if(o)throw e=u,o=!1,u=null,e;}}function dt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),
3===e.nodeType?e.parentNode:e}function pt(e){if(!S)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var mt=[];function ht(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>mt.length&&mt.push(e)}function gt(e,t,n,r){if(mt.length){var l=mt.pop();return l.topLevelType=e,l.eventSystemFlags=r,l.nativeEvent=t,l.targetInst=n,l}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,
ancestors:[]}}function vt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Un(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var l=dt(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var o=null,u=0;u<w.length;u++){var c=w[u];c&&(c=c.extractEvents(r,t,
i,l,a))&&(o=ot(o,c))}ft(o)}}function yt(e,t,n){if(!n.has(e)){switch(e){case "scroll":en(t,"scroll",!0);break;case "focus":case "blur":en(t,"focus",!0),en(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case "cancel":case "close":pt(e)&&en(t,e,!0);break;case "invalid":case "submit":case "reset":break;default:-1===Je.indexOf(e)&&Jt(e,t)}n.set(e,null)}}var bt,wt,kt,xt=!1,Tt=[],Et=null,St=null,Ct=null,Pt=new Map,_t=new Map,Nt=[],zt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),
Mt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function It(e,t){var n=tt(t);zt.forEach(function(e){yt(e,t,n)}),Mt.forEach(function(e){yt(e,t,n)})}function Ft(e,t,n,r,l){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:l,container:r}}function Ot(e,t){switch(e){case "focus":case "blur":Et=null;break;case "dragenter":case "dragleave":St=null;break;case "mouseover":case "mouseout":Ct=null;break;case "pointerover":case "pointerout":Pt.delete(t.pointerId);
break;case "gotpointercapture":case "lostpointercapture":_t.delete(t.pointerId)}}function Rt(e,t,n,r,l,i){return null===e||e.nativeEvent!==i?(e=Ft(t,n,r,l,i),null!==t&&(null!==(t=An(t))&&wt(t)),e):(e.eventSystemFlags|=r,e)}function Dt(e,t,n,r,l){switch(t){case "focus":return Et=Rt(Et,e,t,n,r,l),!0;case "dragenter":return St=Rt(St,e,t,n,r,l),!0;case "mouseover":return Ct=Rt(Ct,e,t,n,r,l),!0;case "pointerover":var i=l.pointerId;return Pt.set(i,Rt(Pt.get(i)||null,e,t,n,r,l)),!0;case "gotpointercapture":return i=
l.pointerId,_t.set(i,Rt(_t.get(i)||null,e,t,n,r,l)),!0}return!1}function Lt(e){var t=Un(e.target);if(null!==t){var r=nt(t);if(null!==r)if(13===(t=r.tag)){if(null!==(t=rt(r)))return e.blockedOn=t,void n.unstable_runWithPriority(e.priority,function(){kt(r)})}else if(3===t&&r.stateNode.hydrate)return void(e.blockedOn=3===r.tag?r.stateNode.containerInfo:null)}e.blockedOn=null}function Ut(e){if(null!==e.blockedOn)return!1;var t=ln(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==
t){var n=An(t);return null!==n&&wt(n),e.blockedOn=t,!1}return!0}function At(e,t,n){Ut(e)&&n.delete(t)}function Vt(){for(xt=!1;0<Tt.length;){var e=Tt[0];if(null!==e.blockedOn){null!==(e=An(e.blockedOn))&&bt(e);break}var t=ln(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:Tt.shift()}null!==Et&&Ut(Et)&&(Et=null),null!==St&&Ut(St)&&(St=null),null!==Ct&&Ut(Ct)&&(Ct=null),Pt.forEach(At),_t.forEach(At)}function Qt(e,t){e.blockedOn===t&&(e.blockedOn=null,xt||(xt=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,
Vt)))}function Wt(e){function t(t){return Qt(t,e)}if(0<Tt.length){Qt(Tt[0],e);for(var n=1;n<Tt.length;n++){var r=Tt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Et&&Qt(Et,e),null!==St&&Qt(St,e),null!==Ct&&Qt(Ct,e),Pt.forEach(t),_t.forEach(t),n=0;n<Nt.length;n++)(r=Nt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Nt.length&&null===(n=Nt[0]).blockedOn;)Lt(n),null===n.blockedOn&&Nt.shift()}var Ht={},jt=new Map,Bt=new Map,Kt=["abort","abort",Ye,"animationEnd",Xe,"animationIteration",Ge,"animationStart",
"canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ze,"transitionEnd","waiting",
"waiting"];function $t(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],l=e[n+1],i="on"+(l[0].toUpperCase()+l.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},Bt.set(r,t),jt.set(r,i),Ht[l]=i}}$t("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),
0),$t("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),$t(Kt,2);for(var qt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Yt=0;Yt<qt.length;Yt++)Bt.set(qt[Yt],0);var Xt=n.unstable_UserBlockingPriority,Gt=n.unstable_runWithPriority,
Zt=!0;function Jt(e,t){en(t,e,!1)}function en(e,t,n){var r=Bt.get(t);switch(void 0===r?2:r){case 0:r=tn.bind(null,t,1,e);break;case 1:r=nn.bind(null,t,1,e);break;default:r=rn.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function tn(e,t,n,r){D||O();var l=rn,i=D;D=!0;try{F(l,e,t,n,r)}finally{(D=i)||U()}}function nn(e,t,n,r){Gt(Xt,rn.bind(null,e,t,n,r))}function rn(e,t,n,r){if(Zt)if(0<Tt.length&&-1<zt.indexOf(e))e=Ft(null,e,t,n,r),Tt.push(e);else{var l=ln(e,t,n,r);if(null===
l)Ot(e,r);else if(-1<zt.indexOf(e))e=Ft(l,e,t,n,r),Tt.push(e);else if(!Dt(l,e,t,n,r)){Ot(e,r),e=gt(e,r,null,t);try{A(vt,e)}finally{ht(e)}}}}function ln(e,t,n,r){if(null!==(n=Un(n=dt(r)))){var l=nt(n);if(null===l)n=null;else{var i=l.tag;if(13===i){if(null!==(n=rt(l)))return n;n=null}else if(3===i){if(l.stateNode.hydrate)return 3===l.tag?l.stateNode.containerInfo:null;n=null}else l!==n&&(n=null)}}e=gt(e,r,n,t);try{A(vt,e)}finally{ht(e)}return null}var an={animationIterationCount:!0,borderImageOutset:!0,
borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,
strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},on=["Webkit","ms","Moz","O"];function un(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||an.hasOwnProperty(e)&&an[e]?(""+t).trim():t+"px"}function cn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),l=un(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}Object.keys(an).forEach(function(e){on.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),
an[t]=an[e]})});var sn=t({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fn(e,t){if(t){if(sn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(r(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(r(60));if(!("object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML))throw Error(r(61));}if(null!=t.style&&"object"!=typeof t.style)throw Error(r(62,
""));}}function dn(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var pn=Ue.html;function mn(e,t){var n=tt(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=T[t];for(var r=0;r<t.length;r++)yt(t[r],e,n)}function hn(){}function gn(e){if(void 0===(e=e||("undefined"!=typeof document?document:
void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function vn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yn(e,t){var n,r=vn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=vn(r)}}function bn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?bn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&
!!(16&e.compareDocumentPosition(t))))}function wn(){for(var e=window,t=gn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=gn((e=t.contentWindow).document)}return t}function kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var xn="$",Tn="/$",En="$?",Sn="$!",Cn=null,
Pn=null;function _n(e,t){switch(e){case "button":case "input":case "select":case "textarea":return!!t.autoFocus}return!1}function Nn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var zn="function"==typeof setTimeout?setTimeout:void 0,Mn="function"==typeof clearTimeout?clearTimeout:void 0;function In(e){for(;null!=
e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Fn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if(n===xn||n===Sn||n===En){if(0===t)return e;t--}else n===Tn&&t++}e=e.previousSibling}return null}var On=Math.random().toString(36).slice(2),Rn="__reactInternalInstance$"+On,Dn="__reactEventHandlers$"+On,Ln="__reactContainere$"+On;function Un(e){var t=e[Rn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ln]||n[Rn]){if(n=t.alternate,null!==t.child||
null!==n&&null!==n.child)for(e=Fn(e);null!==e;){if(n=e[Rn])return n;e=Fn(e)}return t}n=(e=n).parentNode}return null}function An(e){return!(e=e[Rn]||e[Ln])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Vn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(r(33));}function Qn(e){return e[Dn]||null}function Wn(e){do e=e.return;while(e&&5!==e.tag);return e||null}function Hn(e,t){var n=e.stateNode;if(!n)return null;var l=d(n);if(!l)return null;n=l[t];e:switch(t){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(l=
!l.disabled)||(l=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!l;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,typeof n));return n}function jn(e,t,n){(t=Hn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=ot(n._dispatchListeners,t),n._dispatchInstances=ot(n._dispatchInstances,e))}function Bn(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Wn(t);for(t=n.length;0<t--;)jn(n[t],
"captured",e);for(t=0;t<n.length;t++)jn(n[t],"bubbled",e)}}function Kn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Hn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=ot(n._dispatchListeners,t),n._dispatchInstances=ot(n._dispatchInstances,e))}function $n(e){e&&e.dispatchConfig.registrationName&&Kn(e._targetInst,null,e)}function qn(e){ut(e,Bn)}var Yn=null,Xn=null,Gn=null;function Zn(){if(Gn)return Gn;var e,t,n=Xn,r=n.length,l="value"in Yn?Yn.value:Yn.textContent,i=l.length;for(e=
0;e<r&&n[e]===l[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===l[i-t];t++);return Gn=l.slice(e,1<t?1-t:void 0)}function Jn(){return!0}function er(){return!1}function tr(e,t,n,r){for(var l in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(l)&&((t=e[l])?this[l]=t(n):"target"===l?this.target=r:this[l]=n[l]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Jn:er,this.isPropagationStopped=er,this}function nr(e,
t,n,r){if(this.eventPool.length){var l=this.eventPool.pop();return this.call(l,e,t,n,r),l}return new this(e,t,n,r)}function rr(e){if(!(e instanceof this))throw Error(r(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function lr(e){e.eventPool=[],e.getPooled=nr,e.release=rr}t(tr.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=
Jn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Jn)},persist:function(){this.isPersistent=Jn},isPersistent:er,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=er,this._dispatchInstances=this._dispatchListeners=null}}),tr.Interface=
{type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},tr.extend=function(e){function n(){}function r(){return l.apply(this,arguments)}var l=this;n.prototype=l.prototype;var i=new n;return t(i,r.prototype),r.prototype=i,r.prototype.constructor=r,r.Interface=t({},l.Interface,e),r.extend=l.extend,lr(r),r},lr(tr);var ir=tr.extend({data:null}),ar=tr.extend({data:null}),
or=[9,13,27,32],ur=S&&"CompositionEvent"in window,cr=null;S&&"documentMode"in document&&(cr=document.documentMode);var sr=S&&"TextEvent"in window&&!cr,fr=S&&(!ur||cr&&8<cr&&11>=cr),dr=String.fromCharCode(32),pr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},
compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},mr=!1;function hr(e,t){switch(e){case "keyup":return-1!==or.indexOf(t.keyCode);case "keydown":return 229!==t.keyCode;
case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function gr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var vr=!1;function yr(e,t){switch(e){case "compositionend":return gr(t);case "keypress":return 32!==t.which?null:(mr=!0,dr);case "textInput":return(e=t.data)===dr&&mr?null:e;default:return null}}function br(e,t){if(vr)return"compositionend"===e||!ur&&hr(e,t)?(e=Zn(),Gn=Xn=Yn=null,vr=!1,e):null;switch(e){case "paste":return null;case "keypress":if(!(t.ctrlKey||
t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case "compositionend":return fr&&"ko"!==t.locale?null:t.data;default:return null}}var wr={eventTypes:pr,extractEvents:function(e,t,n,r){var l;if(ur)e:{switch(e){case "compositionstart":var i=pr.compositionStart;break e;case "compositionend":i=pr.compositionEnd;break e;case "compositionupdate":i=pr.compositionUpdate;break e}i=void 0}else vr?hr(e,n)&&(i=pr.compositionEnd):
"keydown"===e&&229===n.keyCode&&(i=pr.compositionStart);return i?(fr&&"ko"!==n.locale&&(vr||i!==pr.compositionStart?i===pr.compositionEnd&&vr&&(l=Zn()):(Xn="value"in(Yn=r)?Yn.value:Yn.textContent,vr=!0)),i=ir.getPooled(i,t,n,r),l?i.data=l:null!==(l=gr(n))&&(i.data=l),qn(i),l=i):l=null,(e=sr?yr(e,n):br(e,n))?((t=ar.getPooled(pr.beforeInput,t,n,r)).data=e,qn(t)):t=null,null===l?t:null===t?l:[l,t]}},kr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,
search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!kr[e.type]:"textarea"===t}var Tr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Er(e,t,n){return(e=tr.getPooled(Tr.change,e,t,n)).type="change",z(n),qn(e),e}var Sr=null,Cr=null;function Pr(e){ft(e)}function _r(e){if(Ee(Vn(e)))return e}function Nr(e,
t){if("change"===e)return t}var zr=!1;function Mr(){Sr&&(Sr.detachEvent("onpropertychange",Ir),Cr=Sr=null)}function Ir(e){if("value"===e.propertyName&&_r(Cr))if(e=Er(Cr,e,dt(e)),D)ft(e);else{D=!0;try{I(Pr,e)}finally{D=!1,U()}}}function Fr(e,t,n){"focus"===e?(Mr(),Cr=n,(Sr=t).attachEvent("onpropertychange",Ir)):"blur"===e&&Mr()}function Or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return _r(Cr)}function Rr(e,t){if("click"===e)return _r(t)}function Dr(e,t){if("input"===e||"change"===e)return _r(t)}
S&&(zr=pt("input")&&(!document.documentMode||9<document.documentMode));var Lr={eventTypes:Tr,_isInputEventSupported:zr,extractEvents:function(e,t,n,r){var l=t?Vn(t):window,i=l.nodeName&&l.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===l.type)var a=Nr;else if(xr(l))if(zr)a=Dr;else{a=Or;var o=Fr}else(i=l.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(a=Rr);if(a&&(a=a(e,t)))return Er(a,n,r);o&&o(e,l,t),"blur"===e&&(e=l._wrapperState)&&e.controlled&&"number"===
l.type&&ze(l,"number",l.value)}},Ur=tr.extend({view:null,detail:null}),Ar={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Vr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ar[e])&&!!t[e]}function Qr(){return Vr}var Wr=0,Hr=0,jr=!1,Br=!1,Kr=Ur.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Qr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||
(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Wr;return Wr=e.screenX,jr?"mousemove"===e.type?e.screenX-t:0:(jr=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Hr;return Hr=e.screenY,Br?"mousemove"===e.type?e.screenY-t:0:(Br=!0,0)}}),$r=Kr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),qr={mouseEnter:{registrationName:"onMouseEnter",
dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Yr={eventTypes:qr,extractEvents:function(e,t,n,r,l){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&l)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;
(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a)?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?Un(t):null)&&(t!==nt(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null;if(a===t)return null;if("mouseout"===e||"mouseover"===e)var o=Kr,u=qr.mouseLeave,c=qr.mouseEnter,s="mouse";else"pointerout"!==e&&"pointerover"!==e||(o=$r,u=qr.pointerLeave,c=qr.pointerEnter,s="pointer");if(e=null==a?i:Vn(a),i=null==t?i:Vn(t),(u=o.getPooled(u,a,n,r)).type=s+"leave",u.target=e,u.relatedTarget=i,
(n=o.getPooled(c,t,n,r)).type=s+"enter",n.target=i,n.relatedTarget=e,s=t,(r=a)&&s)e:{for(c=s,a=0,e=o=r;e;e=Wn(e))a++;for(e=0,t=c;t;t=Wn(t))e++;for(;0<a-e;)o=Wn(o),a--;for(;0<e-a;)c=Wn(c),e--;for(;a--;){if(o===c||o===c.alternate)break e;o=Wn(o),c=Wn(c)}o=null}else o=null;for(c=o,o=[];r&&r!==c&&(null===(a=r.alternate)||a!==c);)o.push(r),r=Wn(r);for(r=[];s&&s!==c&&(null===(a=s.alternate)||a!==c);)r.push(s),s=Wn(s);for(s=0;s<o.length;s++)Kn(o[s],"bubbled",u);for(s=r.length;0<s--;)Kn(r[s],"captured",n);
return 0==(64&l)?[u]:[u,n]}};function Xr(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var Gr="function"==typeof Object.is?Object.is:Xr,Zr=Object.prototype.hasOwnProperty;function Jr(e,t){if(Gr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Zr.call(t,n[r])||!Gr(e[n[r]],t[n[r]]))return!1;return!0}var el=S&&"documentMode"in document&&11>=document.documentMode,tl=
{select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},nl=null,rl=null,ll=null,il=!1;function al(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return il||null==nl||nl!==gn(n)?null:("selectionStart"in(n=nl)&&kn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,
anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},ll&&Jr(ll,n)?null:(ll=n,(e=tr.getPooled(tl.select,rl,e,t)).type="select",e.target=nl,qn(e),e))}var ol={eventTypes:tl,extractEvents:function(e,t,n,r,l,i){if(!(i=!(l=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{l=tt(l),i=T.onSelect;for(var a=0;a<i.length;a++)if(!l.has(i[a])){l=!1;break e}l=!0}i=!l}if(i)return null;switch(l=t?Vn(t):window,e){case "focus":(xr(l)||"true"===l.contentEditable)&&(nl=l,rl=t,
ll=null);break;case "blur":ll=rl=nl=null;break;case "mousedown":il=!0;break;case "contextmenu":case "mouseup":case "dragend":return il=!1,al(n,r);case "selectionchange":if(el)break;case "keydown":case "keyup":return al(n,r)}return null}},ul=tr.extend({animationName:null,elapsedTime:null,pseudoElement:null}),cl=tr.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sl=Ur.extend({relatedTarget:null});function fl(e){var t=e.keyCode;return"charCode"in e?
0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var dl={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pl={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",
45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ml=Ur.extend({key:function(e){if(e.key){var t=dl[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=fl(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?pl[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,
getModifierState:Qr,charCode:function(e){return"keypress"===e.type?fl(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?fl(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),hl=Kr.extend({dataTransfer:null}),gl=Ur.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Qr}),vl=tr.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),yl=
Kr.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),bl={eventTypes:Ht,extractEvents:function(e,t,n,r){var l=jt.get(e);if(!l)return null;switch(e){case "keypress":if(0===fl(n))return null;case "keydown":case "keyup":e=ml;break;case "blur":case "focus":e=sl;break;case "click":if(2===n.button)return null;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":e=
Kr;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":e=hl;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":e=gl;break;case Ye:case Xe:case Ge:e=ul;break;case Ze:e=vl;break;case "scroll":e=Ur;break;case "wheel":e=yl;break;case "copy":case "cut":case "paste":e=cl;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":e=
$r;break;default:e=tr}return qn(t=e.getPooled(l,t,n,r)),t}};if(g)throw Error(r(101));g=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),y();var wl=An;d=Qn,p=wl,m=Vn,E({SimpleEventPlugin:bl,EnterLeaveEventPlugin:Yr,ChangeEventPlugin:Lr,SelectEventPlugin:ol,BeforeInputEventPlugin:wr});var kl=[],xl=-1;function Tl(e){0>xl||(e.current=kl[xl],kl[xl]=null,xl--)}function El(e,t){kl[++xl]=e.current,
e.current=t}var Sl={},Cl={current:Sl},Pl={current:!1},_l=Sl;function Nl(e,t){var n=e.type.contextTypes;if(!n)return Sl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l,i={};for(l in n)i[l]=t[l];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function zl(e){return null!=(e=e.childContextTypes)}function Ml(){Tl(Pl),Tl(Cl)}function Il(e,t,n){if(Cl.current!==
Sl)throw Error(r(168));El(Cl,t),El(Pl,n)}function Fl(e,n,l){var i=e.stateNode;if(e=n.childContextTypes,"function"!=typeof i.getChildContext)return l;for(var a in i=i.getChildContext())if(!(a in e))throw Error(r(108,ye(n)||"Unknown",a));return t({},l,{},i)}function Ol(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sl,_l=Cl.current,El(Cl,e),El(Pl,Pl.current),!0}function Rl(e,t,n){var l=e.stateNode;if(!l)throw Error(r(169));n?(e=Fl(e,t,_l),l.__reactInternalMemoizedMergedChildContext=
e,Tl(Pl),Tl(Cl),El(Cl,e)):Tl(Pl),El(Pl,n)}var Dl=n.unstable_runWithPriority,Ll=n.unstable_scheduleCallback,Ul=n.unstable_cancelCallback,Al=n.unstable_requestPaint,Vl=n.unstable_now,Ql=n.unstable_getCurrentPriorityLevel,Wl=n.unstable_ImmediatePriority,Hl=n.unstable_UserBlockingPriority,jl=n.unstable_NormalPriority,Bl=n.unstable_LowPriority,Kl=n.unstable_IdlePriority,$l={},ql=n.unstable_shouldYield,Yl=void 0!==Al?Al:function(){},Xl=null,Gl=null,Zl=!1,Jl=Vl(),ei=1E4>Jl?Vl:function(){return Vl()-Jl};
function ti(){switch(Ql()){case Wl:return 99;case Hl:return 98;case jl:return 97;case Bl:return 96;case Kl:return 95;default:throw Error(r(332));}}function ni(e){switch(e){case 99:return Wl;case 98:return Hl;case 97:return jl;case 96:return Bl;case 95:return Kl;default:throw Error(r(332));}}function ri(e,t){return e=ni(e),Dl(e,t)}function li(e,t,n){return e=ni(e),Ll(e,t,n)}function ii(e){return null===Xl?(Xl=[e],Gl=Ll(Wl,oi)):Xl.push(e),$l}function ai(){if(null!==Gl){var e=Gl;Gl=null,Ul(e)}oi()}function oi(){if(!Zl&&
null!==Xl){Zl=!0;var e=0;try{var t=Xl;ri(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(null!==n)}}),Xl=null}catch(n){throw null!==Xl&&(Xl=Xl.slice(e+1)),Ll(Wl,ai),n;}finally{Zl=!1}}}function ui(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function ci(e,n){if(e&&e.defaultProps)for(var r in n=t({},n),e=e.defaultProps)void 0===n[r]&&(n[r]=e[r]);return n}var si={current:null},fi=null,di=null,pi=null;function mi(){pi=di=fi=null}function hi(e){var t=si.current;Tl(si),
e.type._context._currentValue=t}function gi(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function vi(e,t){fi=e,pi=di=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(ja=!0),e.firstContext=null)}function yi(e,t){if(pi!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(pi=
e,t=1073741823),t={context:e,observedBits:t,next:null},null===di){if(null===fi)throw Error(r(308));di=t,fi.dependencies={expirationTime:0,firstContext:t,responders:null}}else di=di.next=t;return e._currentValue}var bi=!1;function wi(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ki(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function xi(e,t){return(e=
{expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function Ti(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function Ei(e,t){var n=e.alternate;null!==n&&ki(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function Si(e,n,r,l){var i=e.updateQueue;bi=!1;var a=i.baseQueue,o=i.shared.pending;if(null!==o){if(null!==a){var u=a.next;a.next=o.next,
o.next=u}a=o,i.shared.pending=null,null!==(u=e.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=o))}if(null!==a){u=a.next;var c=i.baseState,s=0,f=null,d=null,p=null;if(null!==u)for(var m=u;;){if((o=m.expirationTime)<l){var h={expirationTime:m.expirationTime,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,callback:m.callback,next:null};null===p?(d=p=h,f=c):p=p.next=h,o>s&&(s=o)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,
callback:m.callback,next:null}),Fu(o,m.suspenseConfig);e:{var g=e,v=m;switch(o=n,h=r,v.tag){case 1:if("function"==typeof(g=v.payload)){c=g.call(h,c,o);break e}c=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null==(o="function"==typeof(g=v.payload)?g.call(h,c,o):g))break e;c=t({},c,o);break e;case 2:bi=!0}}null!==m.callback&&(e.effectTag|=32,null===(o=i.effects)?i.effects=[m]:o.push(m))}if(null===(m=m.next)||m===u){if(null===(o=i.shared.pending))break;m=a.next=o.next,o.next=u,i.baseQueue=
a=o,i.shared.pending=null}}null===p?f=c:p.next=d,i.baseState=f,i.baseQueue=p,Ou(s),e.expirationTime=s,e.memoizedState=c}}function Ci(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var l=e[t],i=l.callback;if(null!==i){if(l.callback=null,l=i,i=n,"function"!=typeof l)throw Error(r(191,l));l.call(i)}}}var Pi=G.ReactCurrentBatchConfig,_i=(new e.Component).refs;function Ni(e,n,r,l){r=null==(r=r(l,n=e.memoizedState))?n:t({},n,r),e.memoizedState=r,0===e.expirationTime&&(e.updateQueue.baseState=
r)}var zi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&nt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=bu(),l=Pi.suspense;(l=xi(r=wu(r,e,l),l)).payload=t,null!=n&&(l.callback=n),Ti(e,l),ku(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=bu(),l=Pi.suspense;(l=xi(r=wu(r,e,l),l)).tag=1,l.payload=t,null!=n&&(l.callback=n),Ti(e,l),ku(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=bu(),r=Pi.suspense;(r=xi(n=wu(n,e,r),r)).tag=
2,null!=t&&(r.callback=t),Ti(e,r),ku(e,n)}};function Mi(e,t,n,r,l,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!Jr(n,r)||!Jr(l,i))}function Ii(e,t,n){var r=!1,l=Sl,i=t.contextType;return"object"==typeof i&&null!==i?i=yi(i):(l=zl(t)?_l:Cl.current,i=(r=null!=(r=t.contextTypes))?Nl(e,l):Sl),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=zi,e.stateNode=t,t._reactInternalFiber=
e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function Fi(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&zi.enqueueReplaceState(t,t.state,null)}function Oi(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs=_i,wi(e);var i=t.contextType;"object"==typeof i&&
null!==i?l.context=yi(i):(i=zl(t)?_l:Cl.current,l.context=Nl(e,i)),Si(e,n,l,r),l.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(Ni(e,t,i,n),l.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(t=l.state,"function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),
t!==l.state&&zi.enqueueReplaceState(l,l.state,null),Si(e,n,l,r),l.state=e.memoizedState),"function"==typeof l.componentDidMount&&(e.effectTag|=4)}var Ri=Array.isArray;function Di(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(r(309));var l=n.stateNode}if(!l)throw Error(r(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=l.refs;t===_i&&(t=l.refs={}),
null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(r(284));if(!n._owner)throw Error(r(290,e));}return e}function Li(e,t){if("textarea"!==e.type)throw Error(r(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""));}function Ui(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==
r;)t(n,r),r=r.sibling;return null}function l(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=nc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function o(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=ic(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==
t&&t.elementType===n.type?((r=i(t,n.props)).ref=Di(e,t,n),r.return=e,r):((r=rc(n.type,n.key,n.props,null,e.mode,r)).ref=Di(e,t,n),r.return=e,r)}function s(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=ac(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,l){return null===t||7!==t.tag?((t=lc(n,e.mode,r,l)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==
typeof t)return(t=ic(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case te:return(n=rc(t.type,t.key,t.props,null,e.mode,n)).ref=Di(e,null,t),n.return=e,n;case ne:return(t=ac(t,e.mode,n)).return=e,t}if(Ri(t)||ge(t))return(t=lc(t,e.mode,n,null)).return=e,t;Li(e,t)}return null}function p(e,t,n,r){var l=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==l?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case te:return n.key===
l?n.type===re?f(e,t,n.props.children,r,l):c(e,t,n,r):null;case ne:return n.key===l?s(e,t,n,r):null}if(Ri(n)||ge(n))return null!==l?null:f(e,t,n,r,null);Li(e,n)}return null}function m(e,t,n,r,l){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,l);if("object"==typeof r&&null!==r){switch(r.$$typeof){case te:return e=e.get(null===r.key?n:r.key)||null,r.type===re?f(t,e,r.props.children,l,r.key):c(t,e,r,l);case ne:return s(t,e=e.get(null===r.key?n:r.key)||null,r,l)}if(Ri(r)||ge(r))return f(t,
e=e.get(n)||null,r,l,null);Li(t,r)}return null}function h(r,i,o,u){for(var c=null,s=null,f=i,h=i=0,g=null;null!==f&&h<o.length;h++){f.index>h?(g=f,f=null):g=f.sibling;var v=p(r,f,o[h],u);if(null===v){null===f&&(f=g);break}e&&f&&null===v.alternate&&t(r,f),i=a(v,i,h),null===s?c=v:s.sibling=v,s=v,f=g}if(h===o.length)return n(r,f),c;if(null===f){for(;h<o.length;h++)null!==(f=d(r,o[h],u))&&(i=a(f,i,h),null===s?c=f:s.sibling=f,s=f);return c}for(f=l(r,f);h<o.length;h++)null!==(g=m(f,r,h,o[h],u))&&(e&&null!==
g.alternate&&f.delete(null===g.key?h:g.key),i=a(g,i,h),null===s?c=g:s.sibling=g,s=g);return e&&f.forEach(function(e){return t(r,e)}),c}function g(i,o,u,c){var s=ge(u);if("function"!=typeof s)throw Error(r(150));if(null==(u=s.call(u)))throw Error(r(151));for(var f=s=null,h=o,g=o=0,v=null,y=u.next();null!==h&&!y.done;g++,y=u.next()){h.index>g?(v=h,h=null):v=h.sibling;var b=p(i,h,y.value,c);if(null===b){null===h&&(h=v);break}e&&h&&null===b.alternate&&t(i,h),o=a(b,o,g),null===f?s=b:f.sibling=b,f=b,h=
v}if(y.done)return n(i,h),s;if(null===h){for(;!y.done;g++,y=u.next())null!==(y=d(i,y.value,c))&&(o=a(y,o,g),null===f?s=y:f.sibling=y,f=y);return s}for(h=l(i,h);!y.done;g++,y=u.next())null!==(y=m(h,i,g,y.value,c))&&(e&&null!==y.alternate&&h.delete(null===y.key?g:y.key),o=a(y,o,g),null===f?s=y:f.sibling=y,f=y);return e&&h.forEach(function(e){return t(i,e)}),s}return function(e,l,a,u){var c="object"==typeof a&&null!==a&&a.type===re&&null===a.key;c&&(a=a.props.children);var s="object"==typeof a&&null!==
a;if(s)switch(a.$$typeof){case te:e:{for(s=a.key,c=l;null!==c;){if(c.key===s){switch(c.tag){case 7:if(a.type===re){n(e,c.sibling),(l=i(c,a.props.children)).return=e,e=l;break e}break;default:if(c.elementType===a.type){n(e,c.sibling),(l=i(c,a.props)).ref=Di(e,c,a),l.return=e,e=l;break e}}n(e,c);break}t(e,c),c=c.sibling}a.type===re?((l=lc(a.props.children,e.mode,u,a.key)).return=e,e=l):((u=rc(a.type,a.key,a.props,null,e.mode,u)).ref=Di(e,l,a),u.return=e,e=u)}return o(e);case ne:e:{for(c=a.key;null!==
l;){if(l.key===c){if(4===l.tag&&l.stateNode.containerInfo===a.containerInfo&&l.stateNode.implementation===a.implementation){n(e,l.sibling),(l=i(l,a.children||[])).return=e,e=l;break e}n(e,l);break}t(e,l),l=l.sibling}(l=ac(a,e.mode,u)).return=e,e=l}return o(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==l&&6===l.tag?(n(e,l.sibling),(l=i(l,a)).return=e,e=l):(n(e,l),(l=ic(a,e.mode,u)).return=e,e=l),o(e);if(Ri(a))return h(e,l,a,u);if(ge(a))return g(e,l,a,u);if(s&&Li(e,a),void 0===a&&
!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(r(152,e.displayName||e.name||"Component"));}return n(e,l)}}var Ai=Ui(!0),Vi=Ui(!1),Qi={},Wi={current:Qi},Hi={current:Qi},ji={current:Qi};function Bi(e){if(e===Qi)throw Error(r(174));return e}function Ki(e,t){switch(El(ji,t),El(Hi,e),El(Wi,Qi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ve(null,"");break;default:t=Ve(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Tl(Wi),El(Wi,t)}function $i(){Tl(Wi),Tl(Hi),Tl(ji)}
function qi(e){Bi(ji.current);var t=Bi(Wi.current),n=Ve(t,e.type);t!==n&&(El(Hi,e),El(Wi,n))}function Yi(e){Hi.current===e&&(Tl(Wi),Tl(Hi))}var Xi={current:0};function Gi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===En||n.data===Sn))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===
t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Zi(e,t){return{responder:e,props:t}}var Ji=G.ReactCurrentDispatcher,ea=G.ReactCurrentBatchConfig,ta=0,na=null,ra=null,la=null,ia=!1;function aa(){throw Error(r(321));}function oa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Gr(e[n],t[n]))return!1;return!0}function ua(e,t,n,l,i,a){if(ta=a,na=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Ji.current=null===e||
null===e.memoizedState?Ma:Ia,e=n(l,i),t.expirationTime===ta){a=0;do{if(t.expirationTime=0,!(25>a))throw Error(r(301));a+=1,la=ra=null,t.updateQueue=null,Ji.current=Fa,e=n(l,i)}while(t.expirationTime===ta)}if(Ji.current=za,t=null!==ra&&null!==ra.next,ta=0,la=ra=na=null,ia=!1,t)throw Error(r(300));return e}function ca(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===la?na.memoizedState=la=e:la=la.next=e,la}function sa(){if(null===ra){var e=na.alternate;e=
null!==e?e.memoizedState:null}else e=ra.next;var t=null===la?na.memoizedState:la.next;if(null!==t)la=t,ra=e;else{if(null===e)throw Error(r(310));e={memoizedState:(ra=e).memoizedState,baseState:ra.baseState,baseQueue:ra.baseQueue,queue:ra.queue,next:null},null===la?na.memoizedState=la=e:la=la.next=e}return la}function fa(e,t){return"function"==typeof t?t(e):t}function da(e){var t=sa(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var l=ra,i=l.baseQueue,a=n.pending;if(null!==a){if(null!==
i){var o=i.next;i.next=a.next,a.next=o}l.baseQueue=i=a,n.pending=null}if(null!==i){i=i.next,l=l.baseState;var u=o=a=null,c=i;do{var s=c.expirationTime;if(s<ta){var f={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(o=u=f,a=l):u=u.next=f,s>na.expirationTime&&(na.expirationTime=s,Ou(s))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,
eagerState:c.eagerState,next:null}),Fu(s,c.suspenseConfig),l=c.eagerReducer===e?c.eagerState:e(l,c.action);c=c.next}while(null!==c&&c!==i);null===u?a=l:u.next=o,Gr(l,t.memoizedState)||(ja=!0),t.memoizedState=l,t.baseState=a,t.baseQueue=u,n.lastRenderedState=l}return[t.memoizedState,n.dispatch]}function pa(e){var t=sa(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var l=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;
while(o!==i);Gr(a,t.memoizedState)||(ja=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,l]}function ma(e){var t=ca();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:fa,lastRenderedState:e}).dispatch=Na.bind(null,na,e),[t.memoizedState,e]}function ha(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=na.updateQueue)?(t={lastEffect:null},na.updateQueue=t,t.lastEffect=
e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ga(){return sa().memoizedState}function va(e,t,n,r){var l=ca();na.effectTag|=e,l.memoizedState=ha(1|t,n,void 0,void 0===r?null:r)}function ya(e,t,n,r){var l=sa();r=void 0===r?null:r;var i=void 0;if(null!==ra){var a=ra.memoizedState;if(i=a.destroy,null!==r&&oa(r,a.deps))return void ha(t,n,i,r)}na.effectTag|=e,l.memoizedState=ha(1|t,n,i,r)}function ba(e,t){return va(516,4,e,t)}function wa(e,
t){return ya(516,4,e,t)}function ka(e,t){return ya(4,2,e,t)}function xa(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ta(e,t,n){return n=null!=n?n.concat([e]):null,ya(4,2,xa.bind(null,t,e),n)}function Ea(){}function Sa(e,t){return ca().memoizedState=[e,void 0===t?null:t],e}function Ca(e,t){var n=sa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}
function Pa(e,t){var n=sa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function _a(e,t,n){var r=ti();ri(98>r?98:r,function(){e(!0)}),ri(97<r?97:r,function(){var r=ea.suspense;ea.suspense=void 0===t?null:t;try{e(!1),n()}finally{ea.suspense=r}})}function Na(e,t,n){var r=bu(),l=Pi.suspense;l={expirationTime:r=wu(r,e,l),suspenseConfig:l,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?l.next=l:(l.next=
i.next,i.next=l),t.pending=l,i=e.alternate,e===na||null!==i&&i===na)ia=!0,l.expirationTime=ta,na.expirationTime=ta;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,o=i(a,n);if(l.eagerReducer=i,l.eagerState=o,Gr(o,a))return}catch(u){}ku(e,r)}}var za={readContext:yi,useCallback:aa,useContext:aa,useEffect:aa,useImperativeHandle:aa,useLayoutEffect:aa,useMemo:aa,useReducer:aa,useRef:aa,useState:aa,useDebugValue:aa,useResponder:aa,
useDeferredValue:aa,useTransition:aa},Ma={readContext:yi,useCallback:Sa,useContext:yi,useEffect:ba,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,va(4,2,xa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return va(4,2,e,t)},useMemo:function(e,t){var n=ca();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ca();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=
Na.bind(null,na,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ca().memoizedState=e},useState:ma,useDebugValue:Ea,useResponder:Zi,useDeferredValue:function(e,t){var n=ma(e),r=n[0],l=n[1];return ba(function(){var n=ea.suspense;ea.suspense=void 0===t?null:t;try{l(e)}finally{ea.suspense=n}},[e,t]),r},useTransition:function(e){var t=ma(!1),n=t[0];return t=t[1],[Sa(_a.bind(null,t,e),[t,e]),n]}},Ia={readContext:yi,useCallback:Ca,useContext:yi,useEffect:wa,useImperativeHandle:Ta,useLayoutEffect:ka,
useMemo:Pa,useReducer:da,useRef:ga,useState:function(){return da(fa)},useDebugValue:Ea,useResponder:Zi,useDeferredValue:function(e,t){var n=da(fa),r=n[0],l=n[1];return wa(function(){var n=ea.suspense;ea.suspense=void 0===t?null:t;try{l(e)}finally{ea.suspense=n}},[e,t]),r},useTransition:function(e){var t=da(fa),n=t[0];return t=t[1],[Ca(_a.bind(null,t,e),[t,e]),n]}},Fa={readContext:yi,useCallback:Ca,useContext:yi,useEffect:wa,useImperativeHandle:Ta,useLayoutEffect:ka,useMemo:Pa,useReducer:pa,useRef:ga,
useState:function(){return pa(fa)},useDebugValue:Ea,useResponder:Zi,useDeferredValue:function(e,t){var n=pa(fa),r=n[0],l=n[1];return wa(function(){var n=ea.suspense;ea.suspense=void 0===t?null:t;try{l(e)}finally{ea.suspense=n}},[e,t]),r},useTransition:function(e){var t=pa(fa),n=t[0];return t=t[1],[Ca(_a.bind(null,t,e),[t,e]),n]}},Oa=null,Ra=null,Da=!1;function La(e,t){var n=Ju(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=
n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ua(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Aa(e){if(Da){var t=Ra;if(t){var n=t;if(!Ua(e,t)){if(!(t=In(n.nextSibling))||!Ua(e,t))return e.effectTag=-1025&e.effectTag|2,Da=!1,void(Oa=e);La(Oa,n)}Oa=e,Ra=In(t.firstChild)}else e.effectTag=
-1025&e.effectTag|2,Da=!1,Oa=e}}function Va(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Oa=e}function Qa(e){if(e!==Oa)return!1;if(!Da)return Va(e),Da=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Nn(t,e.memoizedProps))for(t=Ra;t;)La(e,t),t=In(t.nextSibling);if(Va(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if(n===Tn){if(0===t){Ra=In(e.nextSibling);break e}t--}else n!==
xn&&n!==Sn&&n!==En||t++}e=e.nextSibling}Ra=null}}else Ra=Oa?In(e.stateNode.nextSibling):null;return!0}function Wa(){Ra=Oa=null,Da=!1}var Ha=G.ReactCurrentOwner,ja=!1;function Ba(e,t,n,r){t.child=null===e?Vi(t,null,n,r):Ai(t,e.child,n,r)}function Ka(e,t,n,r,l){n=n.render;var i=t.ref;return vi(t,l),r=ua(e,t,n,r,i,l),null===e||ja?(t.effectTag|=1,Ba(e,t,r,l),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=l&&(e.expirationTime=0),co(e,t,l))}function $a(e,t,n,r,l,i){if(null===
e){var a=n.type;return"function"!=typeof a||ec(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=rc(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,qa(e,t,a,r,l,i))}return a=e.child,l<i&&(l=a.memoizedProps,(n=null!==(n=n.compare)?n:Jr)(l,r)&&e.ref===t.ref)?co(e,t,i):(t.effectTag|=1,(e=nc(a,r)).ref=t.ref,e.return=t,t.child=e)}function qa(e,t,n,r,l,i){return null!==e&&Jr(e.memoizedProps,r)&&e.ref===t.ref&&(ja=!1,l<i)?(t.expirationTime=e.expirationTime,
co(e,t,i)):Xa(e,t,n,r,i)}function Ya(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Xa(e,t,n,r,l){var i=zl(n)?_l:Cl.current;return i=Nl(t,i),vi(t,l),n=ua(e,t,n,r,i,l),null===e||ja?(t.effectTag|=1,Ba(e,t,n,l),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=l&&(e.expirationTime=0),co(e,t,l))}function Ga(e,t,n,r,l){if(zl(n)){var i=!0;Ol(t)}else i=!1;if(vi(t,l),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=
2),Ii(t,n,r),Oi(t,n,r,l),r=!0;else if(null===e){var a=t.stateNode,o=t.memoizedProps;a.props=o;var u=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=yi(c):c=Nl(t,c=zl(n)?_l:Cl.current);var s=n.getDerivedStateFromProps,f="function"==typeof s||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==r||u!==c)&&Fi(t,a,r,c),bi=!1;var d=t.memoizedState;a.state=d,Si(t,r,a,l),u=t.memoizedState,o!==
r||d!==u||Pl.current||bi?("function"==typeof s&&(Ni(t,n,s,r),u=t.memoizedState),(o=bi||Mi(t,n,o,r,d,u,c))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),a.props=
r,a.state=u,a.context=c,r=o):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,ki(e,t),o=t.memoizedProps,a.props=t.type===t.elementType?o:ci(t.type,o),u=a.context,"object"==typeof(c=n.contextType)&&null!==c?c=yi(c):c=Nl(t,c=zl(n)?_l:Cl.current),(f="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==r||u!==c)&&Fi(t,
a,r,c),bi=!1,u=t.memoizedState,a.state=u,Si(t,r,a,l),d=t.memoizedState,o!==r||u!==d||Pl.current||bi?("function"==typeof s&&(Ni(t,n,s,r),d=t.memoizedState),(s=bi||Mi(t,n,o,r,u,d,c))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,d,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,d,c)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==
typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=d),a.props=r,a.state=d,a.context=c,r=s):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&
u===e.memoizedState||(t.effectTag|=256),r=!1);return Za(e,t,n,r,i,l)}function Za(e,t,n,r,l,i){Ya(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return l&&Rl(t,n,!1),co(e,t,i);r=t.stateNode,Ha.current=t;var o=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Ai(t,e.child,null,i),t.child=Ai(t,null,o,i)):Ba(e,t,o,i),t.memoizedState=r.state,l&&Rl(t,n,!0),t.child}function Ja(e){var t=e.stateNode;t.pendingContext?Il(e,t.pendingContext,t.pendingContext!==
t.context):t.context&&Il(e,t.context,!1),Ki(e,t.containerInfo)}var eo,to,no,ro,lo={dehydrated:null,retryTime:0};function io(e,t,n){var r,l=t.mode,i=t.pendingProps,a=Xi.current,o=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(o=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),El(Xi,1&a),null===e){if(void 0!==i.fallback&&Aa(t),o){if(o=i.fallback,(i=lc(null,l,0,null)).return=t,0==(2&t.mode))for(e=
null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=lc(o,l,n,null)).return=t,i.sibling=n,t.memoizedState=lo,t.child=i,n}return l=i.children,t.memoizedState=null,t.child=Vi(t,null,l,n)}if(null!==e.memoizedState){if(l=(e=e.child).sibling,o){if(i=i.fallback,(n=nc(e,e.pendingProps)).return=t,0==(2&t.mode)&&(o=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=o;null!==o;)o.return=n,o=o.sibling;return(l=nc(l,i)).return=t,n.sibling=l,n.childExpirationTime=
0,t.memoizedState=lo,t.child=n,l}return n=Ai(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,o){if(o=i.fallback,(i=lc(null,l,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=lc(o,l,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=lo,t.child=i,n}return t.memoizedState=null,t.child=Ai(t,e,i.children,n)}function ao(e,t){e.expirationTime<
t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),gi(e.return,t)}function oo(e,t,n,r,l,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:l,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=l,a.lastEffect=i)}function uo(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(Ba(e,t,r.children,n),0!=
(2&(r=Xi.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ao(e,n);else if(19===e.tag)ao(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(El(Xi,r),0==(2&t.mode))t.memoizedState=null;else switch(l){case "forwards":for(n=t.child,l=null;null!==n;)null!==(e=n.alternate)&&
null===Gi(e)&&(l=n),n=n.sibling;null===(n=l)?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),oo(t,!1,l,n,i,t.lastEffect);break;case "backwards":for(n=null,l=t.child,t.child=null;null!==l;){if(null!==(e=l.alternate)&&null===Gi(e)){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}oo(t,!0,n,null,i,t.lastEffect);break;case "together":oo(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function co(e,t,n){null!==e&&(t.dependencies=e.dependencies);var l=t.expirationTime;
if(0!==l&&Ou(l),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=nc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=nc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function so(e,t){switch(e.tailMode){case "hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case "collapsed":n=e.tail;for(var r=null;null!==n;)null!==
n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function fo(e,n,l){var i=n.pendingProps;switch(n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return zl(n.type)&&Ml(),null;case 3:return $i(),Tl(Pl),Tl(Cl),(l=n.stateNode).pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),null!==e&&null!==e.child||!Qa(n)||(n.effectTag|=4),to(n),null;case 5:Yi(n),l=Bi(ji.current);var a=n.type;
if(null!==e&&null!=n.stateNode)no(e,n,a,i,l),e.ref!==n.ref&&(n.effectTag|=128);else{if(!i){if(null===n.stateNode)throw Error(r(166));return null}if(e=Bi(Wi.current),Qa(n)){i=n.stateNode,a=n.type;var o=n.memoizedProps;switch(i[Rn]=n,i[Dn]=o,a){case "iframe":case "object":case "embed":Jt("load",i);break;case "video":case "audio":for(e=0;e<Je.length;e++)Jt(Je[e],i);break;case "source":Jt("error",i);break;case "img":case "image":case "link":Jt("error",i),Jt("load",i);break;case "form":Jt("reset",i),Jt("submit",
i);break;case "details":Jt("toggle",i);break;case "input":Ce(i,o),Jt("invalid",i),mn(l,"onChange");break;case "select":i._wrapperState={wasMultiple:!!o.multiple},Jt("invalid",i),mn(l,"onChange");break;case "textarea":Re(i,o),Jt("invalid",i),mn(l,"onChange")}for(var u in fn(a,o),e=null,o)if(o.hasOwnProperty(u)){var c=o[u];"children"===u?"string"==typeof c?i.textContent!==c&&(e=["children",c]):"number"==typeof c&&i.textContent!==""+c&&(e=["children",""+c]):x.hasOwnProperty(u)&&null!=c&&mn(l,u)}switch(a){case "input":Te(i),
Ne(i,o,!0);break;case "textarea":Te(i),Le(i);break;case "select":case "option":break;default:"function"==typeof o.onClick&&(i.onclick=hn)}l=e,n.updateQueue=l,null!==l&&(n.effectTag|=4)}else{switch(u=9===l.nodeType?l:l.ownerDocument,e===pn&&(e=Ae(a)),e===pn?"script"===a?((e=u.createElement("div")).innerHTML="\x3cscript\x3e\x3c/script\x3e",e=e.removeChild(e.firstChild)):"string"==typeof i.is?e=u.createElement(a,{is:i.is}):(e=u.createElement(a),"select"===a&&(u=e,i.multiple?u.multiple=!0:i.size&&(u.size=
i.size))):e=u.createElementNS(e,a),e[Rn]=n,e[Dn]=i,eo(e,n,!1,!1),n.stateNode=e,u=dn(a,i),a){case "iframe":case "object":case "embed":Jt("load",e),c=i;break;case "video":case "audio":for(c=0;c<Je.length;c++)Jt(Je[c],e);c=i;break;case "source":Jt("error",e),c=i;break;case "img":case "image":case "link":Jt("error",e),Jt("load",e),c=i;break;case "form":Jt("reset",e),Jt("submit",e),c=i;break;case "details":Jt("toggle",e),c=i;break;case "input":Ce(e,i),c=Se(e,i),Jt("invalid",e),mn(l,"onChange");break;case "option":c=
Ie(e,i);break;case "select":e._wrapperState={wasMultiple:!!i.multiple},c=t({},i,{value:void 0}),Jt("invalid",e),mn(l,"onChange");break;case "textarea":Re(e,i),c=Oe(e,i),Jt("invalid",e),mn(l,"onChange");break;default:c=i}fn(a,c);var s=c;for(o in s)if(s.hasOwnProperty(o)){var f=s[o];"style"===o?cn(e,f):"dangerouslySetInnerHTML"===o?null!=(f=f?f.__html:void 0)&&We(e,f):"children"===o?"string"==typeof f?("textarea"!==a||""!==f)&&He(e,f):"number"==typeof f&&He(e,""+f):"suppressContentEditableWarning"!==
o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(x.hasOwnProperty(o)?null!=f&&mn(l,o):null!=f&&Z(e,o,f,u))}switch(a){case "input":Te(e),Ne(e,i,!1);break;case "textarea":Te(e),Le(e);break;case "option":null!=i.value&&e.setAttribute("value",""+we(i.value));break;case "select":e.multiple=!!i.multiple,null!=(l=i.value)?Fe(e,!!i.multiple,l,!1):null!=i.defaultValue&&Fe(e,!!i.multiple,i.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=hn)}_n(a,i)&&(n.effectTag|=4)}null!==n.ref&&
(n.effectTag|=128)}return null;case 6:if(e&&null!=n.stateNode)ro(e,n,e.memoizedProps,i);else{if("string"!=typeof i&&null===n.stateNode)throw Error(r(166));l=Bi(ji.current),Bi(Wi.current),Qa(n)?(l=n.stateNode,i=n.memoizedProps,l[Rn]=n,l.nodeValue!==i&&(n.effectTag|=4)):((l=(9===l.nodeType?l:l.ownerDocument).createTextNode(i))[Rn]=n,n.stateNode=l)}return null;case 13:return Tl(Xi),i=n.memoizedState,0!=(64&n.effectTag)?(n.expirationTime=l,n):(l=null!==i,i=!1,null===e?void 0!==n.memoizedProps.fallback&&
Qa(n):(i=null!==(a=e.memoizedState),l||null===a||null!==(a=e.child.sibling)&&(null!==(o=n.firstEffect)?(n.firstEffect=a,a.nextEffect=o):(n.firstEffect=n.lastEffect=a,a.nextEffect=null),a.effectTag=8)),l&&!i&&0!=(2&n.mode)&&(null===e&&!0!==n.memoizedProps.unstable_avoidThisFallback||0!=(1&Xi.current)?Jo===Ho&&(Jo=Ko):(Jo!==Ho&&Jo!==Ko||(Jo=$o),0!==lu&&null!==Xo&&(cc(Xo,Zo),sc(Xo,lu)))),(l||i)&&(n.effectTag|=4),null);case 4:return $i(),to(n),null;case 10:return hi(n),null;case 17:return zl(n.type)&&
Ml(),null;case 19:if(Tl(Xi),null===(i=n.memoizedState))return null;if(a=0!=(64&n.effectTag),null===(o=i.rendering))if(a)so(i,!1);else{if(Jo!==Ho||null!==e&&0!=(64&e.effectTag))for(o=n.child;null!==o;){if(null!==(e=Gi(o))){for(n.effectTag|=64,so(i,!1),null!==(a=e.updateQueue)&&(n.updateQueue=a,n.effectTag|=4),null===i.lastEffect&&(n.firstEffect=null),n.lastEffect=i.lastEffect,i=n.child;null!==i;)o=l,(a=i).effectTag&=2,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null,null===(e=a.alternate)?(a.childExpirationTime=
0,a.expirationTime=o,a.child=null,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null):(a.childExpirationTime=e.childExpirationTime,a.expirationTime=e.expirationTime,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,o=e.dependencies,a.dependencies=null===o?null:{expirationTime:o.expirationTime,firstContext:o.firstContext,responders:o.responders}),i=i.sibling;return El(Xi,1&Xi.current|2),n.child}o=o.sibling}}else{if(!a)if(null!==
(e=Gi(o))){if(n.effectTag|=64,a=!0,null!==(l=e.updateQueue)&&(n.updateQueue=l,n.effectTag|=4),so(i,!0),null===i.tail&&"hidden"===i.tailMode&&!o.alternate)return null!==(n=n.lastEffect=i.lastEffect)&&(n.nextEffect=null),null}else 2*ei()-i.renderingStartTime>i.tailExpiration&&1<l&&(n.effectTag|=64,a=!0,so(i,!1),n.expirationTime=n.childExpirationTime=l-1);i.isBackwards?(o.sibling=n.child,n.child=o):(null!==(l=i.last)?l.sibling=o:n.child=o,i.last=o)}return null!==i.tail?(0===i.tailExpiration&&(i.tailExpiration=
ei()+500),l=i.tail,i.rendering=l,i.tail=l.sibling,i.lastEffect=n.lastEffect,i.renderingStartTime=ei(),l.sibling=null,n=Xi.current,El(Xi,a?1&n|2:1&n),l):null}throw Error(r(156,n.tag));}function po(e){switch(e.tag){case 1:zl(e.type)&&Ml();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if($i(),Tl(Pl),Tl(Cl),0!=(64&(t=e.effectTag)))throw Error(r(285));return e.effectTag=-4097&t|64,e;case 5:return Yi(e),null;case 13:return Tl(Xi),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):
null;case 19:return Tl(Xi),null;case 4:return $i(),null;case 10:return hi(e),null;default:return null}}function mo(e,t){return{value:e,source:t,stack:be(t)}}eo=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},to=function(){},no=function(e,n,r,l,i){var a=e.memoizedProps;
if(a!==l){var o,u,c=n.stateNode;switch(Bi(Wi.current),e=null,r){case "input":a=Se(c,a),l=Se(c,l),e=[];break;case "option":a=Ie(c,a),l=Ie(c,l),e=[];break;case "select":a=t({},a,{value:void 0}),l=t({},l,{value:void 0}),e=[];break;case "textarea":a=Oe(c,a),l=Oe(c,l),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof l.onClick&&(c.onclick=hn)}for(o in fn(r,l),r=null,a)if(!l.hasOwnProperty(o)&&a.hasOwnProperty(o)&&null!=a[o])if("style"===o)for(u in c=a[o])c.hasOwnProperty(u)&&(r||(r={}),
r[u]="");else"dangerouslySetInnerHTML"!==o&&"children"!==o&&"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(x.hasOwnProperty(o)?e||(e=[]):(e=e||[]).push(o,null));for(o in l){var s=l[o];if(c=null!=a?a[o]:void 0,l.hasOwnProperty(o)&&s!==c&&(null!=s||null!=c))if("style"===o)if(c){for(u in c)!c.hasOwnProperty(u)||s&&s.hasOwnProperty(u)||(r||(r={}),r[u]="");for(u in s)s.hasOwnProperty(u)&&c[u]!==s[u]&&(r||(r={}),r[u]=s[u])}else r||(e||(e=[]),e.push(o,r)),r=s;else"dangerouslySetInnerHTML"===
o?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(e=e||[]).push(o,s)):"children"===o?c===s||"string"!=typeof s&&"number"!=typeof s||(e=e||[]).push(o,""+s):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&(x.hasOwnProperty(o)?(null!=s&&mn(i,o),e||c===s||(e=[])):(e=e||[]).push(o,s))}r&&(e=e||[]).push("style",r),i=e,(n.updateQueue=i)&&(n.effectTag|=4)}},ro=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var ho="function"==typeof WeakSet?WeakSet:Set;function go(e,t){var n=t.source,
r=t.stack;null===r&&null!==n&&(r=be(n)),null!==n&&ye(n.type),t=t.value,null!==e&&1===e.tag&&ye(e.type);try{console.error(t)}catch(l){setTimeout(function(){throw l;})}}function vo(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(n){Ku(e,n)}}function yo(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(n){Ku(e,n)}else t.current=null}function bo(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=
e.memoizedProps,l=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:ci(t.type,n),l),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(r(163));}function wo(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function ko(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;
do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xo(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void ko(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var l=n.elementType===n.type?t.memoizedProps:ci(n.type,t.memoizedProps);e.componentDidUpdate(l,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&Ci(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=
n.child.stateNode;break;case 1:e=n.child.stateNode}Ci(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&_n(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Wt(n)))));case 19:case 17:case 20:case 21:return}throw Error(r(163));}function To(e,t,n){switch("function"==typeof Xu&&Xu(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=
t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;ri(97<n?97:n,function(){var e=r;do{var n=e.destroy;if(void 0!==n){var l=t;try{n()}catch(i){Ku(l,i)}}e=e.next}while(e!==r)})}break;case 1:yo(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&vo(t,n);break;case 5:yo(t);break;case 4:No(e,t,n)}}function Eo(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=
null,e.stateNode=null,null!==t&&Eo(t)}function So(e){return 5===e.tag||3===e.tag||4===e.tag}function Co(e){e:{for(var t=e.return;null!==t;){if(So(t)){var n=t;break e}t=t.return}throw Error(r(160));}switch(t=n.stateNode,n.tag){case 5:var l=!1;break;case 3:case 4:t=t.containerInfo,l=!0;break;default:throw Error(r(161));}16&n.effectTag&&(He(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||So(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==
n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}l?Po(e,n,t):_o(e,n,t)}function Po(e,t,n){var r=e.tag,l=5===r||6===r;if(l)e=l?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=hn));else if(4!==r&&
null!==(e=e.child))for(Po(e,t,n),e=e.sibling;null!==e;)Po(e,t,n),e=e.sibling}function _o(e,t,n){var r=e.tag,l=5===r||6===r;if(l)e=l?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(_o(e,t,n),e=e.sibling;null!==e;)_o(e,t,n),e=e.sibling}function No(e,t,n){for(var l,i,a=t,o=!1;;){if(!o){o=a.return;e:for(;;){if(null===o)throw Error(r(160));switch(l=o.stateNode,o.tag){case 5:i=!1;break e;case 3:case 4:l=l.containerInfo,i=!0;break e}o=o.return}o=
!0}if(5===a.tag||6===a.tag){e:for(var u=e,c=a,s=n,f=c;;)if(To(u,f,s),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===c)break e;for(;null===f.sibling;){if(null===f.return||f.return===c)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}i?(u=l,c=a.stateNode,8===u.nodeType?u.parentNode.removeChild(c):u.removeChild(c)):l.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){l=a.stateNode.containerInfo,i=!0,a.child.return=a,a=a.child;continue}}else if(To(e,a,n),null!==a.child){a.child.return=
a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(o=!1)}a.sibling.return=a.return,a=a.sibling}}function zo(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void wo(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var l=t.memoizedProps,i=null!==e?e.memoizedProps:l;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for(n[Dn]=l,"input"===e&&"radio"===l.type&&null!=l.name&&Pe(n,l),dn(e,i),t=dn(e,
l),i=0;i<a.length;i+=2){var o=a[i],u=a[i+1];"style"===o?cn(n,u):"dangerouslySetInnerHTML"===o?We(n,u):"children"===o?He(n,u):Z(n,o,u,t)}switch(e){case "input":_e(n,l);break;case "textarea":De(n,l);break;case "select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!l.multiple,null!=(e=l.value)?Fe(n,!!l.multiple,e,!1):t!==!!l.multiple&&(null!=l.defaultValue?Fe(n,!!l.multiple,l.defaultValue,!0):Fe(n,!!l.multiple,l.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(r(162));
return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Wt(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?l=!1:(l=!0,n=t.child,au=ei()),null!==n)e:for(e=n;;){if(5===e.tag)a=e.stateNode,l?"function"==typeof(a=a.style).setProperty?a.setProperty("display","none","important"):a.display="none":(a=e.stateNode,i=null!=(i=e.memoizedProps.style)&&i.hasOwnProperty("display")?i.display:null,a.style.display=un("display",i));else if(6===
e.tag)e.stateNode.nodeValue=l?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(a=e.child.sibling).return=e,e=a;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void Mo(t);case 19:return void Mo(t);case 17:return}throw Error(r(163));}function Mo(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;
var n=e.stateNode;null===n&&(n=e.stateNode=new ho),t.forEach(function(t){var r=qu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}var Io="function"==typeof WeakMap?WeakMap:Map;function Fo(e,t,n){(n=xi(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){cu||(cu=!0,su=r),go(e,t)},n}function Oo(e,t,n){(n=xi(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=t.value;n.payload=function(){return go(e,t),r(l)}}var i=e.stateNode;return null!==
i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===fu?fu=new Set([this]):fu.add(this),go(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var Ro,Do=Math.ceil,Lo=G.ReactCurrentDispatcher,Uo=G.ReactCurrentOwner,Ao=0,Vo=8,Qo=16,Wo=32,Ho=0,jo=1,Bo=2,Ko=3,$o=4,qo=5,Yo=Ao,Xo=null,Go=null,Zo=0,Jo=Ho,eu=null,tu=1073741823,nu=1073741823,ru=null,lu=0,iu=!1,au=0,ou=500,uu=null,cu=!1,su=null,fu=null,du=!1,pu=null,mu=90,hu=null,
gu=0,vu=null,yu=0;function bu(){return(Yo&(Qo|Wo))!==Ao?1073741821-(ei()/10|0):0!==yu?yu:yu=1073741821-(ei()/10|0)}function wu(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var l=ti();if(0==(4&t))return 99===l?1073741823:1073741822;if((Yo&Qo)!==Ao)return Zo;if(null!==n)e=ui(e,0|n.timeoutMs||5E3,250);else switch(l){case 99:e=1073741823;break;case 98:e=ui(e,150,100);break;case 97:case 96:e=ui(e,5E3,250);break;case 95:e=2;break;default:throw Error(r(326));}return null!==Xo&&e===Zo&&--e,e}function ku(e,
t){if(50<gu)throw gu=0,vu=null,Error(r(185));if(null!==(e=xu(e,t))){var n=ti();1073741823===t?(Yo&Vo)!==Ao&&(Yo&(Qo|Wo))===Ao?Cu(e):(Eu(e),Yo===Ao&&ai()):Eu(e),(4&Yo)===Ao||98!==n&&99!==n||(null===hu?hu=new Map([[e,t]]):(void 0===(n=hu.get(e))||n>t)&&hu.set(e,t))}}function xu(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,l=null;if(null===r&&3===e.tag)l=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<
t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){l=r.stateNode;break}r=r.return}return null!==l&&(Xo===l&&(Ou(t),Jo===$o&&cc(l,Zo)),sc(l,t)),l}function Tu(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!uc(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Eu(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=
ii(Cu.bind(null,e));else{var t=Tu(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=bu();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var l=e.callbackPriority;if(e.callbackExpirationTime===t&&l>=r)return;n!==$l&&Ul(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?ii(Cu.bind(null,e)):li(r,Su.bind(null,e),{timeout:10*(1073741821-t)-ei()}),
e.callbackNode=t}}}function Su(e,t){if(yu=0,t)return fc(e,t=bu()),Eu(e),null;var n=Tu(e);if(0!==n){if(t=e.callbackNode,(Yo&(Qo|Wo))!==Ao)throw Error(r(327));if(Hu(),e===Xo&&n===Zo||zu(e,n),null!==Go){var l=Yo;Yo|=Qo;for(var i=Iu();;)try{Du();break}catch(u){Mu(e,u)}if(mi(),Yo=l,Lo.current=i,Jo===jo)throw t=eu,zu(e,n),cc(e,n),Eu(e),t;if(null===Go)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,l=Jo,Xo=null,l){case Ho:case jo:throw Error(r(345));case Bo:fc(e,2<n?2:n);break;case Ko:if(cc(e,
n),n===(l=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Au(i)),1073741823===tu&&10<(i=au+ou-ei())){if(iu){var a=e.lastPingedTime;if(0===a||a>=n){e.lastPingedTime=n,zu(e,n);break}}if(0!==(a=Tu(e))&&a!==n)break;if(0!==l&&l!==n){e.lastPingedTime=l;break}e.timeoutHandle=zn(Vu.bind(null,e),i);break}Vu(e);break;case $o:if(cc(e,n),n===(l=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=Au(i)),iu&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,zu(e,n);break}if(0!==(i=Tu(e))&&i!==n)break;if(0!==l&&l!==
n){e.lastPingedTime=l;break}if(1073741823!==nu?l=10*(1073741821-nu)-ei():1073741823===tu?l=0:(l=10*(1073741821-tu)-5E3,0>(l=(i=ei())-l)&&(l=0),(n=10*(1073741821-n)-i)<(l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3E3>l?3E3:4320>l?4320:1960*Do(l/1960))-l)&&(l=n)),10<l){e.timeoutHandle=zn(Vu.bind(null,e),l);break}Vu(e);break;case qo:if(1073741823!==tu&&null!==ru){a=tu;var o=ru;if(0>=(l=0|o.busyMinDurationMs)?l=0:(i=0|o.busyDelayMs,l=(a=ei()-(10*(1073741821-a)-(0|o.timeoutMs||5E3)))<=i?0:i+l-a),10<
l){cc(e,n),e.timeoutHandle=zn(Vu.bind(null,e),l);break}}Vu(e);break;default:throw Error(r(329));}if(Eu(e),e.callbackNode===t)return Su.bind(null,e)}}return null}function Cu(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,(Yo&(Qo|Wo))!==Ao)throw Error(r(327));if(Hu(),e===Xo&&t===Zo||zu(e,t),null!==Go){var n=Yo;Yo|=Qo;for(var l=Iu();;)try{Ru();break}catch(i){Mu(e,i)}if(mi(),Yo=n,Lo.current=l,Jo===jo)throw n=eu,zu(e,t),cc(e,t),Eu(e),n;if(null!==Go)throw Error(r(261));e.finishedWork=e.current.alternate,
e.finishedExpirationTime=t,Xo=null,Vu(e),Eu(e)}return null}function Pu(){if(null!==hu){var e=hu;hu=null,e.forEach(function(e,t){fc(t,e),Eu(t)}),ai()}}function _u(e,t){var n=Yo;Yo|=1;try{return e(t)}finally{(Yo=n)===Ao&&ai()}}function Nu(e,t){var n=Yo;Yo&=-2,Yo|=Vo;try{return e(t)}finally{(Yo=n)===Ao&&ai()}}function zu(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Mn(n)),null!==Go)for(n=Go.return;null!==n;){var r=n;switch(r.tag){case 1:null!=
(r=r.type.childContextTypes)&&Ml();break;case 3:$i(),Tl(Pl),Tl(Cl);break;case 5:Yi(r);break;case 4:$i();break;case 13:case 19:Tl(Xi);break;case 10:hi(r)}n=n.return}Xo=e,Go=nc(e.current,null),Zo=t,Jo=Ho,eu=null,nu=tu=1073741823,ru=null,lu=0,iu=!1}function Mu(e,t){for(;;){try{if(mi(),Ji.current=za,ia)for(var n=na.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(ta=0,la=ra=na=null,ia=!1,null===Go||null===Go.return)return Jo=jo,eu=t,Go=null;e:{var l=e,i=Go.return,a=Go,o=t;
if(t=Zo,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==o&&"object"==typeof o&&"function"==typeof o.then){var u=o;if(0==(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var s=0!=(1&Xi.current),f=i;do{var d;if(d=13===f.tag){var p=f.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var m=f.memoizedProps;d=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!s)}}if(d){var h=
f.updateQueue;if(null===h){var g=new Set;g.add(u),f.updateQueue=g}else h.add(u);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var v=xi(1073741823,null);v.tag=2,Ti(a,v)}a.expirationTime=1073741823;break e}o=void 0,a=t;var y=l.pingCache;if(null===y?(y=l.pingCache=new Io,o=new Set,y.set(u,o)):void 0===(o=y.get(u))&&(o=new Set,y.set(u,o)),!o.has(a)){o.add(a);var b=$u.bind(null,l,u,a);u.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==
f);o=Error((ye(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a \x3cSuspense fallback\x3d...\x3e component higher in the tree to provide a loading indicator or placeholder to display."+be(a))}Jo!==qo&&(Jo=Bo),o=mo(o,a),f=i;do{switch(f.tag){case 3:u=o,f.effectTag|=4096,f.expirationTime=t,Ei(f,Fo(f,u,t));break e;case 1:u=o;var w=f.type,k=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==k&&"function"==typeof k.componentDidCatch&&
(null===fu||!fu.has(k)))){f.effectTag|=4096,f.expirationTime=t,Ei(f,Oo(f,u,t));break e}}f=f.return}while(null!==f)}Go=Uu(Go)}catch(x){t=x;continue}break}}function Iu(){var e=Lo.current;return Lo.current=za,null===e?za:e}function Fu(e,t){e<tu&&2<e&&(tu=e),null!==t&&e<nu&&2<e&&(nu=e,ru=t)}function Ou(e){e>lu&&(lu=e)}function Ru(){for(;null!==Go;)Go=Lu(Go)}function Du(){for(;null!==Go&&!ql();)Go=Lu(Go)}function Lu(e){var t=Ro(e.alternate,e,Zo);return e.memoizedProps=e.pendingProps,null===t&&(t=Uu(e)),
Uo.current=null,t}function Uu(e){Go=e;do{var t=Go.alternate;if(e=Go.return,0==(2048&Go.effectTag)){if(t=fo(t,Go,Zo),1===Zo||1!==Go.childExpirationTime){for(var n=0,r=Go.child;null!==r;){var l=r.expirationTime,i=r.childExpirationTime;l>n&&(n=l),i>n&&(n=i),r=r.sibling}Go.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Go.firstEffect),null!==Go.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Go.firstEffect),e.lastEffect=Go.lastEffect),
1<Go.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Go:e.firstEffect=Go,e.lastEffect=Go))}else{if(null!==(t=po(Go)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Go.sibling))return t;Go=e}while(null!==Go);return Jo===Ho&&(Jo=qo),null}function Au(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function Vu(e){var t=ti();return ri(99,Qu.bind(null,e,t)),null}function Qu(e,t){do Hu();while(null!==pu);if((Yo&(Qo|Wo))!==Ao)throw Error(r(327));
var n=e.finishedWork,l=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=Au(n);if(e.firstPendingTime=i,l<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:l<=e.firstSuspendedTime&&(e.firstSuspendedTime=l-1),l<=e.lastPingedTime&&(e.lastPingedTime=0),l<=e.lastExpiredTime&&(e.lastExpiredTime=
0),e===Xo&&(Go=Xo=null,Zo=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var a=Yo;Yo|=Wo,Uo.current=null,Cn=Zt;var o=wn();if(kn(o)){if("selectionStart"in o)var u={start:o.selectionStart,end:o.selectionEnd};else e:{var c=(u=(u=o.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(c&&0!==c.rangeCount){u=c.anchorNode;var s=c.anchorOffset,f=c.focusNode;c=c.focusOffset;try{u.nodeType,f.nodeType}catch(C){u=null;break e}var d=
0,p=-1,m=-1,h=0,g=0,v=o,y=null;t:for(;;){for(var b;v!==u||0!==s&&3!==v.nodeType||(p=d+s),v!==f||0!==c&&3!==v.nodeType||(m=d+c),3===v.nodeType&&(d+=v.nodeValue.length),null!==(b=v.firstChild);)y=v,v=b;for(;;){if(v===o)break t;if(y===u&&++h===s&&(p=d),y===f&&++g===c&&(m=d),null!==(b=v.nextSibling))break;y=(v=y).parentNode}v=b}u=-1===p||-1===m?null:{start:p,end:m}}else u=null}u=u||{start:0,end:0}}else u=null;Pn={activeElementDetached:null,focusedElem:o,selectionRange:u},Zt=!1,uu=i;do try{Wu()}catch(C){if(null===
uu)throw Error(r(330));Ku(uu,C),uu=uu.nextEffect}while(null!==uu);uu=i;do try{for(o=e,u=t;null!==uu;){var w=uu.effectTag;if(16&w&&He(uu.stateNode,""),128&w){var k=uu.alternate;if(null!==k){var x=k.ref;null!==x&&("function"==typeof x?x(null):x.current=null)}}switch(1038&w){case 2:Co(uu),uu.effectTag&=-3;break;case 6:Co(uu),uu.effectTag&=-3,zo(uu.alternate,uu);break;case 1024:uu.effectTag&=-1025;break;case 1028:uu.effectTag&=-1025,zo(uu.alternate,uu);break;case 4:zo(uu.alternate,uu);break;case 8:No(o,
s=uu,u),Eo(s)}uu=uu.nextEffect}}catch(C){if(null===uu)throw Error(r(330));Ku(uu,C),uu=uu.nextEffect}while(null!==uu);if(x=Pn,k=wn(),w=x.focusedElem,u=x.selectionRange,k!==w&&w&&w.ownerDocument&&bn(w.ownerDocument.documentElement,w)){null!==u&&kn(w)&&(k=u.start,void 0===(x=u.end)&&(x=k),"selectionStart"in w?(w.selectionStart=k,w.selectionEnd=Math.min(x,w.value.length)):(x=(k=w.ownerDocument||document)&&k.defaultView||window).getSelection&&(x=x.getSelection(),s=w.textContent.length,o=Math.min(u.start,
s),u=void 0===u.end?o:Math.min(u.end,s),!x.extend&&o>u&&(s=u,u=o,o=s),s=yn(w,o),f=yn(w,u),s&&f&&(1!==x.rangeCount||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==f.node||x.focusOffset!==f.offset)&&((k=k.createRange()).setStart(s.node,s.offset),x.removeAllRanges(),o>u?(x.addRange(k),x.extend(f.node,f.offset)):(k.setEnd(f.node,f.offset),x.addRange(k))))),k=[];for(x=w;x=x.parentNode;)1===x.nodeType&&k.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof w.focus&&
w.focus(),w=0;w<k.length;w++)(x=k[w]).element.scrollLeft=x.left,x.element.scrollTop=x.top}Zt=!!Cn,Pn=Cn=null,e.current=n,uu=i;do try{for(w=e;null!==uu;){var T=uu.effectTag;if(36&T&&xo(w,uu.alternate,uu),128&T){k=void 0;var E=uu.ref;if(null!==E){var S=uu.stateNode;switch(uu.tag){case 5:k=S;break;default:k=S}"function"==typeof E?E(k):E.current=k}}uu=uu.nextEffect}}catch(C){if(null===uu)throw Error(r(330));Ku(uu,C),uu=uu.nextEffect}while(null!==uu);uu=null,Yl(),Yo=a}else e.current=n;if(du)du=!1,pu=e,
mu=t;else for(uu=i;null!==uu;)t=uu.nextEffect,uu.nextEffect=null,uu=t;if(0===(t=e.firstPendingTime)&&(fu=null),1073741823===t?e===vu?gu++:(gu=0,vu=e):gu=0,"function"==typeof Yu&&Yu(n.stateNode,l),Eu(e),cu)throw cu=!1,e=su,su=null,e;return(Yo&Vo)!==Ao?null:(ai(),null)}function Wu(){for(;null!==uu;){var e=uu.effectTag;0!=(256&e)&&bo(uu.alternate,uu),0==(512&e)||du||(du=!0,li(97,function(){return Hu(),null})),uu=uu.nextEffect}}function Hu(){if(90!==mu){var e=97<mu?97:mu;return mu=90,ri(e,ju)}}function ju(){if(null===
pu)return!1;var e=pu;if(pu=null,(Yo&(Qo|Wo))!==Ao)throw Error(r(331));var t=Yo;for(Yo|=Wo,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:wo(5,n),ko(5,n)}}catch(l){if(null===e)throw Error(r(330));Ku(e,l)}n=e.nextEffect,e.nextEffect=null,e=n}return Yo=t,ai(),!0}function Bu(e,t,n){Ti(e,t=Fo(e,t=mo(n,t),1073741823)),null!==(e=xu(e,1073741823))&&Eu(e)}function Ku(e,t){if(3===e.tag)Bu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Bu(n,
e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===fu||!fu.has(r))){Ti(n,e=Oo(n,e=mo(t,e),1073741823)),null!==(n=xu(n,1073741823))&&Eu(n);break}}n=n.return}}function $u(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Xo===e&&Zo===n?Jo===$o||Jo===Ko&&1073741823===tu&&ei()-au<ou?zu(e,Zo):iu=!0:uc(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Eu(e)))}function qu(e,t){var n=e.stateNode;null!==n&&
n.delete(t),0===(t=0)&&(t=wu(t=bu(),e,null)),null!==(e=xu(e,t))&&Eu(e)}Ro=function(e,t,n){var l=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||Pl.current)ja=!0;else{if(l<n){switch(ja=!1,t.tag){case 3:Ja(t),Wa();break;case 5:if(qi(t),4&t.mode&&1!==n&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:zl(t.type)&&Ol(t);break;case 4:Ki(t,t.stateNode.containerInfo);break;case 10:l=t.memoizedProps.value,i=t.type._context,El(si,i._currentValue),i._currentValue=
l;break;case 13:if(null!==t.memoizedState)return 0!==(l=t.child.childExpirationTime)&&l>=n?io(e,t,n):(El(Xi,1&Xi.current),null!==(t=co(e,t,n))?t.sibling:null);El(Xi,1&Xi.current);break;case 19:if(l=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(l)return uo(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),El(Xi,Xi.current),!l)return null}return co(e,t,n)}ja=!1}}else ja=!1;switch(t.expirationTime=0,t.tag){case 2:if(l=t.type,null!==e&&(e.alternate=null,t.alternate=
null,t.effectTag|=2),e=t.pendingProps,i=Nl(t,Cl.current),vi(t,n),i=ua(null,t,l,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,zl(l)){var a=!0;Ol(t)}else a=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,wi(t);var o=l.getDerivedStateFromProps;"function"==typeof o&&Ni(t,l,o,e),i.updater=zi,t.stateNode=i,i._reactInternalFiber=t,Oi(t,l,e,n),t=Za(null,t,l,!0,a,n)}else t.tag=0,Ba(null,
t,i,n),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,ve(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,a=t.tag=tc(i),e=ci(i,e),a){case 0:t=Xa(null,t,i,e,n);break e;case 1:t=Ga(null,t,i,e,n);break e;case 11:t=Ka(null,t,i,e,n);break e;case 14:t=$a(null,t,i,ci(i.type,e),l,n);break e}throw Error(r(306,i,""));}return t;case 0:return l=t.type,i=t.pendingProps,Xa(e,t,l,i=t.elementType===l?i:ci(l,i),n);case 1:return l=
t.type,i=t.pendingProps,Ga(e,t,l,i=t.elementType===l?i:ci(l,i),n);case 3:if(Ja(t),l=t.updateQueue,null===e||null===l)throw Error(r(282));if(l=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,ki(e,t),Si(t,l,null,n),(l=t.memoizedState.element)===i)Wa(),t=co(e,t,n);else{if((i=t.stateNode.hydrate)&&(Ra=In(t.stateNode.containerInfo.firstChild),Oa=t,i=Da=!0),i)for(n=Vi(t,null,l,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Ba(e,t,l,n),Wa();t=t.child}return t;case 5:return qi(t),
null===e&&Aa(t),l=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,o=i.children,Nn(l,i)?o=null:null!==a&&Nn(l,a)&&(t.effectTag|=16),Ya(e,t),4&t.mode&&1!==n&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Ba(e,t,o,n),t=t.child),t;case 6:return null===e&&Aa(t),null;case 13:return io(e,t,n);case 4:return Ki(t,t.stateNode.containerInfo),l=t.pendingProps,null===e?t.child=Ai(t,null,l,n):Ba(e,t,l,n),t.child;case 11:return l=t.type,i=t.pendingProps,Ka(e,t,l,i=t.elementType===l?i:ci(l,
i),n);case 7:return Ba(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ba(e,t,t.pendingProps.children,n),t.child;case 10:e:{l=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value;var u=t.type._context;if(El(si,u._currentValue),u._currentValue=a,null!==o)if(u=o.value,0===(a=Gr(u,a)?0:0|("function"==typeof l._calculateChangedBits?l._calculateChangedBits(u,a):1073741823))){if(o.children===i.children&&!Pl.current){t=co(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=
u.dependencies;if(null!==c){o=u.child;for(var s=c.firstContext;null!==s;){if(s.context===l&&0!=(s.observedBits&a)){1===u.tag&&((s=xi(n,null)).tag=2,Ti(u,s)),u.expirationTime<n&&(u.expirationTime=n),null!==(s=u.alternate)&&s.expirationTime<n&&(s.expirationTime=n),gi(u.return,n),c.expirationTime<n&&(c.expirationTime=n);break}s=s.next}}else o=10===u.tag&&u.type===t.type?null:u.child;if(null!==o)o.return=u;else for(o=u;null!==o;){if(o===t){o=null;break}if(null!==(u=o.sibling)){u.return=o.return,o=u;break}o=
o.return}u=o}Ba(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,l=(a=t.pendingProps).children,vi(t,n),l=l(i=yi(i,a.unstable_observedBits)),t.effectTag|=1,Ba(e,t,l,n),t.child;case 14:return a=ci(i=t.type,t.pendingProps),$a(e,t,i,a=ci(i.type,a),l,n);case 15:return qa(e,t,t.type,t.pendingProps,l,n);case 17:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:ci(l,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,zl(l)?(e=!0,Ol(t)):e=!1,vi(t,n),Ii(t,l,i),Oi(t,l,i,n),
Za(null,t,l,!0,e,n);case 19:return uo(e,t,n)}throw Error(r(156,t.tag));};var Yu=null,Xu=null;function Gu(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Yu=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(r){}},Xu=function(e){try{t.onCommitFiberUnmount(n,e)}catch(r){}}}catch(r){}return!0}function Zu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=
this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Ju(e,t,n,r){return new Zu(e,t,n,r)}function ec(e){return!(!(e=e.prototype)||!e.isReactComponent)}function tc(e){if("function"==typeof e)return ec(e)?1:0;if(null!=
e){if((e=e.$$typeof)===ce)return 11;if(e===de)return 14}return 2}function nc(e,t){var n=e.alternate;return null===n?((n=Ju(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,
t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function rc(e,t,n,l,i,a){var o=2;if(l=e,"function"==typeof e)ec(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case re:return lc(n.children,i,a,t);case ue:o=8,i|=7;break;case le:o=8,i|=1;break;case ie:return(e=Ju(12,n,t,8|i)).elementType=ie,e.type=ie,e.expirationTime=a,e;case se:return(e=Ju(13,n,t,i)).type=
se,e.elementType=se,e.expirationTime=a,e;case fe:return(e=Ju(19,n,t,i)).elementType=fe,e.expirationTime=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ae:o=10;break e;case oe:o=9;break e;case ce:o=11;break e;case de:o=14;break e;case pe:o=16,l=null;break e;case me:o=22;break e}throw Error(r(130,null==e?e:typeof e,""));}return(t=Ju(o,n,t,i)).elementType=e,t.type=l,t.expirationTime=a,t}function lc(e,t,n,r){return(e=Ju(7,e,r,t)).expirationTime=n,e}function ic(e,t,n){return(e=Ju(6,
e,null,t)).expirationTime=n,e}function ac(e,t,n){return(t=Ju(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function oc(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=
90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function uc(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function cc(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function sc(e,t){t>e.firstPendingTime&&(e.firstPendingTime=
t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function fc(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function dc(e,t,n,l){var i=t.current,a=bu(),o=Pi.suspense;a=wu(a,i,o);e:if(n){t:{if(nt(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(r(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;
case 1:if(zl(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(r(171));}if(1===n.tag){var c=n.type;if(zl(c)){n=Fl(n,c,u);break e}}n=u}else n=Sl;return null===t.context?t.context=n:t.pendingContext=n,(t=xi(a,o)).payload={element:e},null!==(l=void 0===l?null:l)&&(t.callback=l),Ti(i,t),ku(i,a),a}function pc(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function mc(e,t){null!==(e=e.memoizedState)&&
null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function hc(e,t){mc(e,t),(e=e.alternate)&&mc(e,t)}function gc(e,t,n){var r=new oc(e,t,n=null!=n&&!0===n.hydrate),l=Ju(3,null,null,2===t?7:1===t?3:0);r.current=l,l.stateNode=r,wi(l),e[Ln]=r.current,n&&0!==t&&It(e,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function vc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function yc(e,t){if(t||(t=!(!(t=e?9===e.nodeType?
e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new gc(e,0,t?{hydrate:!0}:void 0)}function bc(e,t,n,r,l){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof l){var o=l;l=function(){var e=pc(a);o.call(e)}}dc(t,a,e,l)}else{if(i=n._reactRootContainer=yc(n,r),a=i._internalRoot,"function"==typeof l){var u=l;l=function(){var e=pc(a);u.call(e)}}Nu(function(){dc(t,a,e,l)})}return pc(a)}
function wc(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ne,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function kc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!vc(t))throw Error(r(200));return wc(e,t,null,n)}gc.prototype.render=function(e){dc(e,this._internalRoot,null,null)},gc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;dc(null,e,null,function(){t[Ln]=null})},bt=function(e){if(13===
e.tag){var t=ui(bu(),150,100);ku(e,t),hc(e,t)}},wt=function(e){13===e.tag&&(ku(e,3),hc(e,3))},kt=function(e){if(13===e.tag){var t=bu();ku(e,t=wu(t,e,null)),hc(e,t)}},C=function(e,t,n){switch(t){case "input":if(_e(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name\x3d"+JSON.stringify(""+t)+'][type\x3d"radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var i=Qn(l);if(!i)throw Error(r(90));Ee(l),_e(l,i)}}}break;case "textarea":De(e,
n);break;case "select":null!=(t=n.value)&&Fe(e,!!n.multiple,t,!1)}},I=_u,F=function(e,t,n,r,l){var i=Yo;Yo|=4;try{return ri(98,e.bind(null,t,n,r,l))}finally{(Yo=i)===Ao&&ai()}},O=function(){(Yo&(1|Qo|Wo))===Ao&&(Pu(),Hu())},R=function(e,t){var n=Yo;Yo|=2;try{return e(t)}finally{(Yo=n)===Ao&&ai()}};var xc={Events:[An,Vn,Qn,E,k,qn,function(e){ut(e,$n)},z,M,rn,ft,Hu,{current:!1}]};!function(e){var n=e.findFiberByHostInstance;Gu(t({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,
scheduleUpdate:null,currentDispatcherRef:G.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=at(e))?null:e.stateNode},findFiberByHostInstance:function(e){return n?n(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:Un,bundleType:0,version:"16.13.1",rendererPackageName:"react-dom"}),exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xc,exports.createPortal=kc,exports.findDOMNode=
function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw Error(r(268,Object.keys(e)));}return e=null===(e=at(t))?null:e.stateNode},exports.flushSync=function(e,t){if((Yo&(Qo|Wo))!==Ao)throw Error(r(187));var n=Yo;Yo|=1;try{return ri(99,e.bind(null,t))}finally{Yo=n,ai()}},exports.hydrate=function(e,t,n){if(!vc(t))throw Error(r(200));return bc(null,e,t,!0,n)},exports.render=function(e,t,n){if(!vc(t))throw Error(r(200));
return bc(null,e,t,!1,n)},exports.unmountComponentAtNode=function(e){if(!vc(e))throw Error(r(40));return!!e._reactRootContainer&&(Nu(function(){bc(null,null,e,!1,function(){e._reactRootContainer=null,e[Ln]=null})}),!0)},exports.unstable_batchedUpdates=_u,exports.unstable_createPortal=function(e,t){return kc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},exports.unstable_renderSubtreeIntoContainer=function(e,t,n,l){if(!vc(n))throw Error(r(200));if(null==e||void 0===e._reactInternalFiber)throw Error(r(38));
return bc(e,t,n,!1,l)},exports.version="16.13.1"},{"react":"d6ZO","object-assign":"jKlg","scheduler":"X3CY"}],"RklN":[function(require,module,exports){function _(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_)}catch(O){console.error(O)}}}_(),module.exports=require("./cjs/react-dom.production.min.js")},{"./cjs/react-dom.production.min.js":"bRSS"}],"NHn6":[function(require,module,exports){Object.defineProperty(exports,
"__esModule",{value:!0}),exports.default=void 0;var e=a(require("react"));function t(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return t=function(){return e},e}function a(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=t();if(a&&a.has(e))return a.get(e);var l={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=n?Object.getOwnPropertyDescriptor(e,
r):null;o&&(o.get||o.set)?Object.defineProperty(l,r,o):l[r]=e[r]}return l.default=e,a&&a.set(e,l),l}var l=function(){for(var e=0,t=0,a=arguments.length;t<a;t++)e+=arguments[t].length;var l=Array(e),n=0;for(t=0;t<a;t++)for(var r=arguments[t],o=0,c=r.length;o<c;o++,n++)l[n]=r[o];return l};function n(e){return e.toLowerCase().replace(" ","-")}var r=function(t){var a=t.namespace,r=t.saveUrl,o=t.fetchUrl,c=(0,e.useState)(),i=c[0],s=c[1],u=(0,e.useState)(void 0),f=u[0],m=u[1],d=(0,e.useState)(""),h=d[0],
p=d[1],g=(0,e.useState)(""),v=g[0],E=g[1],N=(0,e.useState)(""),w=N[0],y=N[1],b=(0,e.useState)(!1),x=b[0],j=b[1],O=(0,e.useState)([]),S=O[0],k=O[1];(0,e.useEffect)(function(){fetch(o,{headers:{"Content-Type":"application/json"},method:"POST",credentials:"same-origin"}).then(function(e){if(!e.ok)throw k([]),e;return e.json()}).then(function(e){k(e.externals)}).catch(function(e){console.error(e)})},[]),(0,e.useEffect)(function(){j(!!(h&&v&&w&&f))},[h,v,w,f]);return e.default.createElement(e.default.Fragment,
null,e.default.createElement("div",{className:"form-group row"},e.default.createElement("div",{className:"col-sm-3 d-flex align-items-center"}),e.default.createElement("div",{className:"col-sm-9 d-flex align-items-center"},e.default.createElement("div",null,e.default.createElement("img",{className:"bg-light",style:{height:"312px",width:"312px"},src:f}),e.default.createElement("input",{type:"file",className:"form-control",id:a+"-picture",onChange:function(e){if(e.target.files&&e.target.files[0]){var t=
new FileReader;t.readAsDataURL(e.target.files[0]),t.onload=function(e){if(e.target){var t=new Image;t.src=e.target.result,t.onload=function(){var e=document.createElement("canvas");e.width=312,e.height=312;var a=e.getContext("2d");if(a){var l=document.createElement("canvas"),n=l.getContext("2d");if(n){l.width=t.width,l.height=t.height;var r=l.width/e.width>>1;n.filter="blur("+r+"px)",n.drawImage(t,0,0);var o=Math.max(e.width/t.width,e.height/t.height),c=e.width/2-t.width/2*o,i=e.height/2-t.height/
2*o;a.drawImage(l,c,i,t.width*o,t.height*o),m(e.toDataURL("image/jpeg",.8))}}}}}}},accept:"image/png, image/jpeg"})))),e.default.createElement("div",null,e.default.createElement("div",{className:"form-group row"},e.default.createElement("label",{htmlFor:a+"-name",className:"col-sm-3 col-form-label"},"Navn"),e.default.createElement("div",{className:"col-sm-9"},e.default.createElement("input",{type:"text",className:"form-control",id:a+"-name",value:h,onChange:function(e){p(e.target.value)}}))),e.default.createElement("div",
{className:"form-group row"},e.default.createElement("label",{htmlFor:a+"-note",className:"col-sm-3 col-form-label"},"Note"),e.default.createElement("div",{className:"col-sm-9"},e.default.createElement("input",{type:"text",className:"form-control",id:a+"-note",value:v,onChange:function(e){E(e.target.value)}}))),e.default.createElement("div",{className:"form-group row"},e.default.createElement("label",{htmlFor:a+"-url",className:"col-sm-3 col-form-label"},"URL"),e.default.createElement("div",{className:"col-sm-9"},
e.default.createElement("input",{type:"text",className:"form-control",id:a+"-url",value:w,onChange:function(e){y(e.target.value)}}),e.default.createElement("small",{className:"form-text"},"Hele lenken m\u00e5 legges inn (inkludert http/https)"))),e.default.createElement("div",{className:"row"},e.default.createElement("div",{className:"offset-sm-3 col-sm-9"},e.default.createElement("button",{disabled:!x,type:"button",className:"btn btn-primary",onClick:function(){if(x){var e={pictureUrl:f,displayName:h,
note:v,url:w};k(function(t){var a=l(t,[e]),n=new FormData;return n.append("externals",JSON.stringify(a)),fetch(r,{method:"POST",body:n,credentials:"same-origin"}).then(function(e){if(!e.ok)throw s("Failed"),k(t),e;return e.json()}).then(function(e){k(e.externals)}).catch(function(e){console.error(e),k(t)}),a}),m(void 0),p(""),E(""),y("")}}},"Legg til"),i))),e.default.createElement("div",{className:"mt-4"},e.default.createElement("ul",{className:"list-group list-group-flush"},S.map(function(t,a){return e.default.createElement("li",
{key:n(t.displayName),className:"list-group-item d-flex justify-content-between align-items-center"},e.default.createElement("span",{className:"d-flex justify-content-start align-items-center"},e.default.createElement("a",{href:t.url},e.default.createElement("img",{className:"mr-2",src:t.pictureUrl,style:{width:"50px",height:"auto"}})),e.default.createElement("span",{className:"d-flex flex-col"},e.default.createElement("span",null,t.displayName),e.default.createElement("span",null,t.note))),e.default.createElement("button",
{type:"button",className:"close","aria-label":"remove",onClick:function(e){return t=a,void k(function(e){var a=l(e);a.splice(t,1);var n=new FormData;return n.append("externals",JSON.stringify(a)),fetch(r,{method:"POST",body:n,credentials:"same-origin"}).then(function(t){if(!t.ok)throw s("Failed"),k(e),t;return t.json()}).then(function(e){k(e.externals)}).catch(function(t){console.error(t),k(e)}),a});var t}},e.default.createElement("span",{className:"text-danger","aria-hidden":"true",title:"Remove",
style:{fontSize:"1.5rem"}},"\u00d7")))}))))},o=r;exports.default=o},{"react":"d6ZO"}],"UYXK":[function(require,module,exports){var e=a(require("react")),r=a(require("react-dom")),t=a(require("./App"));function a(e){return e&&e.__esModule?e:{default:e}}window.personExternal=function(a,n){r.default.render(e.default.createElement(t.default,{namespace:n.namespace,saveUrl:n.saveUrl,fetchUrl:n.fetchUrl}),a)}},{"react":"d6ZO","react-dom":"RklN","./App":"NHn6"}]},{},["UYXK"],null);
/*! jQuery UI - v1.12.1 - 2016-09-14
* http://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */

(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=l+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),I=e(k.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=I[0],D.top+=I[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+I[0],u[1]+I[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-l,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});var c="ui-effects-",u="ui-effects-style",d="ui-effects-animated",p=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(p),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(p.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(d)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(c+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(c+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(u,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(u)||"",t.removeData(u)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(c+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=c+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(d),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(d,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?l?this[l](s.duration,h):this.each(function(){h&&h.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)
}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var f=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),l&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst,c=l?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;h&&(r=parseInt(h[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(h=h.concat(["marginTop","marginBottom"]).concat(r),l=l.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,h=2*(e.times||5)+(r?1:0),l=e.duration/h,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);h>u;u++)s.animate({opacity:c},l,e.easing),c=1-c;s.animate({opacity:c},l,e.easing),s.queue(i),t.effects.unshift(s,d,h+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,h=2*r+1,l=Math.round(e.duration/h),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],"show"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var f;t.uiBackCompat!==!1&&(f=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void 0)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=h?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=l&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}}),void 0):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,h=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=h.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=h.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;
this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var g=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get()),void 0):(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var h=n[s]("widget");t.data(h[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(h[0])}})),void 0):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(g,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?(this._callChildMethod(e?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e,void 0):(this.refresh(),void 0)):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?(this._super("showLabel",e),void 0):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var m;t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,h,l,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),m===n&&(m=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,h,l=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),a(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,h,l,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),o=n?n.apply(e,[e,s]):{},o!==!1&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),h={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),h=t.datepicker._checkOffset(s,h,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),s.inline||(l=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?s.dpDiv.show(l,t.datepicker._get(s,"showOptions"),c):s.dpDiv[l||"show"](l?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))
}},_updateDatepicker:function(e){this.maxRows=4,m=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(h).match(o);if(!a)throw"Missing number at position "+h;return h+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],h+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+h},x=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>h&&(a=i.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,I,T,P,M,S,H,z,O,A,N,W,E,F,L,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-$,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+$,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,Q,J,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),H=(this._getFirstDayOfMonth(te,Z)-c+7)%7,z=Math.ceil((H+S)/7),O=X?this.maxRows>z?this.maxRows:z:z,this.maxRows=O,A=this._daylightSavingAdjust(new Date(te,Z,1-H)),N=0;O>N;N++){for(T+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!E[0]||Q&&Q>A||J&&A>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+E[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!E[2]?"":" title='"+E[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===B.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);T+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),T+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=T}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var _=!1;t(document).on("mouseup",function(){_=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!_){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),_=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,_=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}
},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,h,l,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,h-g>_||m>l+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(h-_),r=g>=Math.abs(l-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(h-m),r=g>=Math.abs(l-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog
},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" "+"top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),h=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(s=o.is(":data(ui-draggable)"),s&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],void 0):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&v(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var v=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,h=a+e.helperProportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperProportions.width/2>l&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>h-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&v(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=v(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.uiBackCompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),void 0)},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return t===!1?(this.button.css("width",""),void 0):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t),void 0)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1
},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,h,l,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[a],l=!1,e[u]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(e[u]-h)&&(n=Math.abs(e[u]-h),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;
this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i)),void 0):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e),void 0)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(r(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e),void 0)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),h=t(s).closest("li"),l=h.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=h.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),e===!0||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},h=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),h(n,e)},1)}).fail(function(t,e){setTimeout(function(){h(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void 0)},_open:function(e,i,s){function n(t){l.of=t,a.is(":hidden")||a.position(l)}var o,a,r,h,l=t.extend({},this.options.position);if(s){if(o=this._find(i))return o.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),h=t("<div>").html(a.find(".ui-tooltip-content").html()),h.removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(l.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip});
/*
 AngularJS v1.4.4
 (c) 2010-2015 Google, Inc. http://angularjs.org
 License: MIT
*/
(function(window,document,undefined){function minErr(module,ErrorConstructor){ErrorConstructor=ErrorConstructor||Error;return function(){var SKIP_INDEXES=2;var templateArgs=arguments,code=templateArgs[0],message="["+(module?module+":":"")+code+"] ",template=templateArgs[1],paramPrefix,i;message+=template.replace(/\{\d+\}/g,function(match){var index=+match.slice(1,-1),shiftedIndex=index+SKIP_INDEXES;if(shiftedIndex<templateArgs.length)return toDebugString(templateArgs[shiftedIndex]);return match});
message+="\nhttp://errors.angularjs.org/1.4.4/"+(module?module+"/":"")+code;for(i=SKIP_INDEXES,paramPrefix="?";i<templateArgs.length;i++,paramPrefix="\x26")message+=paramPrefix+"p"+(i-SKIP_INDEXES)+"\x3d"+encodeURIComponent(toDebugString(templateArgs[i]));return new ErrorConstructor(message)}}var REGEX_STRING_REGEXP=/^\/(.+)\/([a-z]*)$/;var VALIDITY_STATE_PROPERTY="validity";var lowercase=function(string){return isString(string)?string.toLowerCase():string};var hasOwnProperty=Object.prototype.hasOwnProperty;
var uppercase=function(string){return isString(string)?string.toUpperCase():string};var manualLowercase=function(s){return isString(s)?s.replace(/[A-Z]/g,function(ch){return String.fromCharCode(ch.charCodeAt(0)|32)}):s};var manualUppercase=function(s){return isString(s)?s.replace(/[a-z]/g,function(ch){return String.fromCharCode(ch.charCodeAt(0)&~32)}):s};if("i"!=="I".toLowerCase()){lowercase=manualLowercase;uppercase=manualUppercase}var msie,jqLite,jQuery,slice=[].slice,splice=[].splice,push=[].push,
toString=Object.prototype.toString,getPrototypeOf=Object.getPrototypeOf,ngMinErr=minErr("ng"),angular=window.angular||(window.angular={}),angularModule,uid=0;msie=document.documentMode;function isArrayLike(obj){if(obj==null||isWindow(obj))return false;var length="length"in Object(obj)&&obj.length;if(obj.nodeType===NODE_TYPE_ELEMENT&&length)return true;return isString(obj)||isArray(obj)||length===0||typeof length==="number"&&length>0&&length-1 in obj}function forEach(obj,iterator,context){var key,
length;if(obj)if(isFunction(obj))for(key in obj){if(key!="prototype"&&key!="length"&&key!="name"&&(!obj.hasOwnProperty||obj.hasOwnProperty(key)))iterator.call(context,obj[key],key,obj)}else if(isArray(obj)||isArrayLike(obj)){var isPrimitive=typeof obj!=="object";for(key=0,length=obj.length;key<length;key++)if(isPrimitive||key in obj)iterator.call(context,obj[key],key,obj)}else if(obj.forEach&&obj.forEach!==forEach)obj.forEach(iterator,context,obj);else if(isBlankObject(obj))for(key in obj)iterator.call(context,
obj[key],key,obj);else if(typeof obj.hasOwnProperty==="function")for(key in obj){if(obj.hasOwnProperty(key))iterator.call(context,obj[key],key,obj)}else for(key in obj)if(hasOwnProperty.call(obj,key))iterator.call(context,obj[key],key,obj);return obj}function forEachSorted(obj,iterator,context){var keys=Object.keys(obj).sort();for(var i=0;i<keys.length;i++)iterator.call(context,obj[keys[i]],keys[i]);return keys}function reverseParams(iteratorFn){return function(value,key){iteratorFn(key,value)}}function nextUid(){return++uid}
function setHashKey(obj,h){if(h)obj.$$hashKey=h;else delete obj.$$hashKey}function baseExtend(dst,objs,deep){var h=dst.$$hashKey;for(var i=0,ii=objs.length;i<ii;++i){var obj=objs[i];if(!isObject(obj)&&!isFunction(obj))continue;var keys=Object.keys(obj);for(var j=0,jj=keys.length;j<jj;j++){var key=keys[j];var src=obj[key];if(deep&&isObject(src))if(isDate(src))dst[key]=new Date(src.valueOf());else if(isRegExp(src))dst[key]=new RegExp(src);else{if(!isObject(dst[key]))dst[key]=isArray(src)?[]:{};baseExtend(dst[key],
[src],true)}else dst[key]=src}}setHashKey(dst,h);return dst}function extend(dst){return baseExtend(dst,slice.call(arguments,1),false)}function merge(dst){return baseExtend(dst,slice.call(arguments,1),true)}function toInt(str){return parseInt(str,10)}function inherit(parent,extra){return extend(Object.create(parent),extra)}function noop(){}noop.$inject=[];function identity($){return $}identity.$inject=[];function valueFn(value){return function(){return value}}function hasCustomToString(obj){return isFunction(obj.toString)&&
obj.toString!==Object.prototype.toString}function isUndefined(value){return typeof value==="undefined"}function isDefined(value){return typeof value!=="undefined"}function isObject(value){return value!==null&&typeof value==="object"}function isBlankObject(value){return value!==null&&typeof value==="object"&&!getPrototypeOf(value)}function isString(value){return typeof value==="string"}function isNumber(value){return typeof value==="number"}function isDate(value){return toString.call(value)==="[object Date]"}
var isArray=Array.isArray;function isFunction(value){return typeof value==="function"}function isRegExp(value){return toString.call(value)==="[object RegExp]"}function isWindow(obj){return obj&&obj.window===obj}function isScope(obj){return obj&&obj.$evalAsync&&obj.$watch}function isFile(obj){return toString.call(obj)==="[object File]"}function isFormData(obj){return toString.call(obj)==="[object FormData]"}function isBlob(obj){return toString.call(obj)==="[object Blob]"}function isBoolean(value){return typeof value===
"boolean"}function isPromiseLike(obj){return obj&&isFunction(obj.then)}var TYPED_ARRAY_REGEXP=/^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/;function isTypedArray(value){return TYPED_ARRAY_REGEXP.test(toString.call(value))}var trim=function(value){return isString(value)?value.trim():value};var escapeForRegexp=function(s){return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};function isElement(node){return!!(node&&(node.nodeName||
node.prop&&node.attr&&node.find))}function makeMap(str){var obj={},items=str.split(","),i;for(i=0;i<items.length;i++)obj[items[i]]=true;return obj}function nodeName_(element){return lowercase(element.nodeName||element[0]&&element[0].nodeName)}function includes(array,obj){return Array.prototype.indexOf.call(array,obj)!=-1}function arrayRemove(array,value){var index=array.indexOf(value);if(index>=0)array.splice(index,1);return index}function copy(source,destination,stackSource,stackDest){if(isWindow(source)||
isScope(source))throw ngMinErr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(isTypedArray(destination))throw ngMinErr("cpta","Can't copy! TypedArray destination cannot be mutated.");if(!destination){destination=source;if(isObject(source)){var index;if(stackSource&&(index=stackSource.indexOf(source))!==-1)return stackDest[index];if(isArray(source))return copy(source,[],stackSource,stackDest);else if(isTypedArray(source))destination=new source.constructor(source);
else if(isDate(source))destination=new Date(source.getTime());else if(isRegExp(source)){destination=new RegExp(source.source,source.toString().match(/[^\/]*$/)[0]);destination.lastIndex=source.lastIndex}else{var emptyObject=Object.create(getPrototypeOf(source));return copy(source,emptyObject,stackSource,stackDest)}if(stackDest){stackSource.push(source);stackDest.push(destination)}}}else{if(source===destination)throw ngMinErr("cpi","Can't copy! Source and destination are identical.");stackSource=stackSource||
[];stackDest=stackDest||[];if(isObject(source)){stackSource.push(source);stackDest.push(destination)}var result,key;if(isArray(source)){destination.length=0;for(var i=0;i<source.length;i++)destination.push(copy(source[i],null,stackSource,stackDest))}else{var h=destination.$$hashKey;if(isArray(destination))destination.length=0;else forEach(destination,function(value,key){delete destination[key]});if(isBlankObject(source))for(key in source)destination[key]=copy(source[key],null,stackSource,stackDest);
else if(source&&typeof source.hasOwnProperty==="function")for(key in source){if(source.hasOwnProperty(key))destination[key]=copy(source[key],null,stackSource,stackDest)}else for(key in source)if(hasOwnProperty.call(source,key))destination[key]=copy(source[key],null,stackSource,stackDest);setHashKey(destination,h)}}return destination}function shallowCopy(src,dst){if(isArray(src)){dst=dst||[];for(var i=0,ii=src.length;i<ii;i++)dst[i]=src[i]}else if(isObject(src)){dst=dst||{};for(var key in src)if(!(key.charAt(0)===
"$"&&key.charAt(1)==="$"))dst[key]=src[key]}return dst||src}function equals(o1,o2){if(o1===o2)return true;if(o1===null||o2===null)return false;if(o1!==o1&&o2!==o2)return true;var t1=typeof o1,t2=typeof o2,length,key,keySet;if(t1==t2)if(t1=="object")if(isArray(o1)){if(!isArray(o2))return false;if((length=o1.length)==o2.length){for(key=0;key<length;key++)if(!equals(o1[key],o2[key]))return false;return true}}else if(isDate(o1)){if(!isDate(o2))return false;return equals(o1.getTime(),o2.getTime())}else if(isRegExp(o1))return isRegExp(o2)?
o1.toString()==o2.toString():false;else{if(isScope(o1)||isScope(o2)||isWindow(o1)||isWindow(o2)||isArray(o2)||isDate(o2)||isRegExp(o2))return false;keySet=createMap();for(key in o1){if(key.charAt(0)==="$"||isFunction(o1[key]))continue;if(!equals(o1[key],o2[key]))return false;keySet[key]=true}for(key in o2)if(!(key in keySet)&&key.charAt(0)!=="$"&&o2[key]!==undefined&&!isFunction(o2[key]))return false;return true}return false}var csp=function(){if(!isDefined(csp.rules)){var ngCspElement=document.querySelector("[ng-csp]")||
document.querySelector("[data-ng-csp]");if(ngCspElement){var ngCspAttribute=ngCspElement.getAttribute("ng-csp")||ngCspElement.getAttribute("data-ng-csp");csp.rules={noUnsafeEval:!ngCspAttribute||ngCspAttribute.indexOf("no-unsafe-eval")!==-1,noInlineStyle:!ngCspAttribute||ngCspAttribute.indexOf("no-inline-style")!==-1}}else csp.rules={noUnsafeEval:noUnsafeEval(),noInlineStyle:false}}return csp.rules;function noUnsafeEval(){try{new Function("");return false}catch(e){return true}}};var jq=function(){if(isDefined(jq.name_))return jq.name_;
var el;var i,ii=ngAttrPrefixes.length,prefix,name;for(i=0;i<ii;++i){prefix=ngAttrPrefixes[i];if(el=document.querySelector("["+prefix.replace(":","\\:")+"jq]")){name=el.getAttribute(prefix+"jq");break}}return jq.name_=name};function concat(array1,array2,index){return array1.concat(slice.call(array2,index))}function sliceArgs(args,startIndex){return slice.call(args,startIndex||0)}function bind(self,fn){var curryArgs=arguments.length>2?sliceArgs(arguments,2):[];if(isFunction(fn)&&!(fn instanceof RegExp))return curryArgs.length?
function(){return arguments.length?fn.apply(self,concat(curryArgs,arguments,0)):fn.apply(self,curryArgs)}:function(){return arguments.length?fn.apply(self,arguments):fn.call(self)};else return fn}function toJsonReplacer(key,value){var val=value;if(typeof key==="string"&&key.charAt(0)==="$"&&key.charAt(1)==="$")val=undefined;else if(isWindow(value))val="$WINDOW";else if(value&&document===value)val="$DOCUMENT";else if(isScope(value))val="$SCOPE";return val}function toJson(obj,pretty){if(typeof obj===
"undefined")return undefined;if(!isNumber(pretty))pretty=pretty?2:null;return JSON.stringify(obj,toJsonReplacer,pretty)}function fromJson(json){return isString(json)?JSON.parse(json):json}function timezoneToOffset(timezone,fallback){var requestedTimezoneOffset=Date.parse("Jan 01, 1970 00:00:00 "+timezone)/6E4;return isNaN(requestedTimezoneOffset)?fallback:requestedTimezoneOffset}function addDateMinutes(date,minutes){date=new Date(date.getTime());date.setMinutes(date.getMinutes()+minutes);return date}
function convertTimezoneToLocal(date,timezone,reverse){reverse=reverse?-1:1;var timezoneOffset=timezoneToOffset(timezone,date.getTimezoneOffset());return addDateMinutes(date,reverse*(timezoneOffset-date.getTimezoneOffset()))}function startingTag(element){element=jqLite(element).clone();try{element.empty()}catch(e){}var elemHtml=jqLite("\x3cdiv\x3e").append(element).html();try{return element[0].nodeType===NODE_TYPE_TEXT?lowercase(elemHtml):elemHtml.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(match,
nodeName){return"\x3c"+lowercase(nodeName)})}catch(e){return lowercase(elemHtml)}}function tryDecodeURIComponent(value){try{return decodeURIComponent(value)}catch(e){}}function parseKeyValue(keyValue){var obj={};forEach((keyValue||"").split("\x26"),function(keyValue){var splitPoint,key,val;if(keyValue){key=keyValue=keyValue.replace(/\+/g,"%20");splitPoint=keyValue.indexOf("\x3d");if(splitPoint!==-1){key=keyValue.substring(0,splitPoint);val=keyValue.substring(splitPoint+1)}key=tryDecodeURIComponent(key);
if(isDefined(key)){val=isDefined(val)?tryDecodeURIComponent(val):true;if(!hasOwnProperty.call(obj,key))obj[key]=val;else if(isArray(obj[key]))obj[key].push(val);else obj[key]=[obj[key],val]}}});return obj}function toKeyValue(obj){var parts=[];forEach(obj,function(value,key){if(isArray(value))forEach(value,function(arrayValue){parts.push(encodeUriQuery(key,true)+(arrayValue===true?"":"\x3d"+encodeUriQuery(arrayValue,true)))});else parts.push(encodeUriQuery(key,true)+(value===true?"":"\x3d"+encodeUriQuery(value,
true)))});return parts.length?parts.join("\x26"):""}function encodeUriSegment(val){return encodeUriQuery(val,true).replace(/%26/gi,"\x26").replace(/%3D/gi,"\x3d").replace(/%2B/gi,"+")}function encodeUriQuery(val,pctEncodeSpaces){return encodeURIComponent(val).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,pctEncodeSpaces?"%20":"+")}var ngAttrPrefixes=["ng-","data-ng-","ng:","x-ng-"];function getNgAttribute(element,ngAttr){var attr,
i,ii=ngAttrPrefixes.length;for(i=0;i<ii;++i){attr=ngAttrPrefixes[i]+ngAttr;if(isString(attr=element.getAttribute(attr)))return attr}return null}function angularInit(element,bootstrap){var appElement,module,config={};forEach(ngAttrPrefixes,function(prefix){var name=prefix+"app";if(!appElement&&element.hasAttribute&&element.hasAttribute(name)){appElement=element;module=element.getAttribute(name)}});forEach(ngAttrPrefixes,function(prefix){var name=prefix+"app";var candidate;if(!appElement&&(candidate=
element.querySelector("["+name.replace(":","\\:")+"]"))){appElement=candidate;module=candidate.getAttribute(name)}});if(appElement){config.strictDi=getNgAttribute(appElement,"strict-di")!==null;bootstrap(appElement,module?[module]:[],config)}}function bootstrap(element,modules,config){if(!isObject(config))config={};var defaultConfig={strictDi:false};config=extend(defaultConfig,config);var doBootstrap=function(){element=jqLite(element);if(element.injector()){var tag=element[0]===document?"document":
startingTag(element);throw ngMinErr("btstrpd","App Already Bootstrapped with this Element '{0}'",tag.replace(/</,"\x26lt;").replace(/>/,"\x26gt;"));}modules=modules||[];modules.unshift(["$provide",function($provide){$provide.value("$rootElement",element)}]);if(config.debugInfoEnabled)modules.push(["$compileProvider",function($compileProvider){$compileProvider.debugInfoEnabled(true)}]);modules.unshift("ng");var injector=createInjector(modules,config.strictDi);injector.invoke(["$rootScope","$rootElement",
"$compile","$injector",function bootstrapApply(scope,element,compile,injector){scope.$apply(function(){element.data("$injector",injector);compile(element)(scope)})}]);return injector};var NG_ENABLE_DEBUG_INFO=/^NG_ENABLE_DEBUG_INFO!/;var NG_DEFER_BOOTSTRAP=/^NG_DEFER_BOOTSTRAP!/;if(window&&NG_ENABLE_DEBUG_INFO.test(window.name)){config.debugInfoEnabled=true;window.name=window.name.replace(NG_ENABLE_DEBUG_INFO,"")}if(window&&!NG_DEFER_BOOTSTRAP.test(window.name))return doBootstrap();window.name=window.name.replace(NG_DEFER_BOOTSTRAP,
"");angular.resumeBootstrap=function(extraModules){forEach(extraModules,function(module){modules.push(module)});return doBootstrap()};if(isFunction(angular.resumeDeferredBootstrap))angular.resumeDeferredBootstrap()}function reloadWithDebugInfo(){window.name="NG_ENABLE_DEBUG_INFO!"+window.name;window.location.reload()}function getTestability(rootElement){var injector=angular.element(rootElement).injector();if(!injector)throw ngMinErr("test","no injector found for element argument to getTestability");
return injector.get("$$testability")}var SNAKE_CASE_REGEXP=/[A-Z]/g;function snake_case(name,separator){separator=separator||"_";return name.replace(SNAKE_CASE_REGEXP,function(letter,pos){return(pos?separator:"")+letter.toLowerCase()})}var bindJQueryFired=false;var skipDestroyOnNextJQueryCleanData;function bindJQuery(){var originalCleanData;if(bindJQueryFired)return;var jqName=jq();jQuery=window.jQuery;if(isDefined(jqName))jQuery=jqName===null?undefined:window[jqName];if(jQuery&&jQuery.fn.on){jqLite=
jQuery;extend(jQuery.fn,{scope:JQLitePrototype.scope,isolateScope:JQLitePrototype.isolateScope,controller:JQLitePrototype.controller,injector:JQLitePrototype.injector,inheritedData:JQLitePrototype.inheritedData});originalCleanData=jQuery.cleanData;jQuery.cleanData=function(elems){var events;if(!skipDestroyOnNextJQueryCleanData)for(var i=0,elem;(elem=elems[i])!=null;i++){events=jQuery._data(elem,"events");if(events&&events.$destroy)jQuery(elem).triggerHandler("$destroy")}else skipDestroyOnNextJQueryCleanData=
false;originalCleanData(elems)}}else jqLite=JQLite;angular.element=jqLite;bindJQueryFired=true}function assertArg(arg,name,reason){if(!arg)throw ngMinErr("areq","Argument '{0}' is {1}",name||"?",reason||"required");return arg}function assertArgFn(arg,name,acceptArrayAnnotation){if(acceptArrayAnnotation&&isArray(arg))arg=arg[arg.length-1];assertArg(isFunction(arg),name,"not a function, got "+(arg&&typeof arg==="object"?arg.constructor.name||"Object":typeof arg));return arg}function assertNotHasOwnProperty(name,
context){if(name==="hasOwnProperty")throw ngMinErr("badname","hasOwnProperty is not a valid {0} name",context);}function getter(obj,path,bindFnToScope){if(!path)return obj;var keys=path.split(".");var key;var lastInstance=obj;var len=keys.length;for(var i=0;i<len;i++){key=keys[i];if(obj)obj=(lastInstance=obj)[key]}if(!bindFnToScope&&isFunction(obj))return bind(lastInstance,obj);return obj}function getBlockNodes(nodes){var node=nodes[0];var endNode=nodes[nodes.length-1];var blockNodes=[node];do{node=
node.nextSibling;if(!node)break;blockNodes.push(node)}while(node!==endNode);return jqLite(blockNodes)}function createMap(){return Object.create(null)}var NODE_TYPE_ELEMENT=1;var NODE_TYPE_ATTRIBUTE=2;var NODE_TYPE_TEXT=3;var NODE_TYPE_COMMENT=8;var NODE_TYPE_DOCUMENT=9;var NODE_TYPE_DOCUMENT_FRAGMENT=11;function setupModuleLoader(window){var $injectorMinErr=minErr("$injector");var ngMinErr=minErr("ng");function ensure(obj,name,factory){return obj[name]||(obj[name]=factory())}var angular=ensure(window,
"angular",Object);angular.$$minErr=angular.$$minErr||minErr;return ensure(angular,"module",function(){var modules={};return function module(name,requires,configFn){var assertNotHasOwnProperty=function(name,context){if(name==="hasOwnProperty")throw ngMinErr("badname","hasOwnProperty is not a valid {0} name",context);};assertNotHasOwnProperty(name,"module");if(requires&&modules.hasOwnProperty(name))modules[name]=null;return ensure(modules,name,function(){if(!requires)throw $injectorMinErr("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.",name);var invokeQueue=[];var configBlocks=[];var runBlocks=[];var config=invokeLater("$injector","invoke","push",configBlocks);var moduleInstance={_invokeQueue:invokeQueue,_configBlocks:configBlocks,_runBlocks:runBlocks,requires:requires,name:name,provider:invokeLaterAndSetModuleName("$provide","provider"),factory:invokeLaterAndSetModuleName("$provide","factory"),service:invokeLaterAndSetModuleName("$provide",
"service"),value:invokeLater("$provide","value"),constant:invokeLater("$provide","constant","unshift"),decorator:invokeLaterAndSetModuleName("$provide","decorator"),animation:invokeLaterAndSetModuleName("$animateProvider","register"),filter:invokeLaterAndSetModuleName("$filterProvider","register"),controller:invokeLaterAndSetModuleName("$controllerProvider","register"),directive:invokeLaterAndSetModuleName("$compileProvider","directive"),config:config,run:function(block){runBlocks.push(block);return this}};
if(configFn)config(configFn);return moduleInstance;function invokeLater(provider,method,insertMethod,queue){if(!queue)queue=invokeQueue;return function(){queue[insertMethod||"push"]([provider,method,arguments]);return moduleInstance}}function invokeLaterAndSetModuleName(provider,method){return function(recipeName,factoryFunction){if(factoryFunction&&isFunction(factoryFunction))factoryFunction.$$moduleName=name;invokeQueue.push([provider,method,arguments]);return moduleInstance}}})}})}function serializeObject(obj){var seen=
[];return JSON.stringify(obj,function(key,val){val=toJsonReplacer(key,val);if(isObject(val)){if(seen.indexOf(val)>=0)return"\x3c\x3calready seen\x3e\x3e";seen.push(val)}return val})}function toDebugString(obj){if(typeof obj==="function")return obj.toString().replace(/ \{[\s\S]*$/,"");else if(typeof obj==="undefined")return"undefined";else if(typeof obj!=="string")return serializeObject(obj);return obj}var version={full:"1.4.4",major:1,minor:4,dot:4,codeName:"pylon-requirement"};function publishExternalAPI(angular){extend(angular,
{"bootstrap":bootstrap,"copy":copy,"extend":extend,"merge":merge,"equals":equals,"element":jqLite,"forEach":forEach,"injector":createInjector,"noop":noop,"bind":bind,"toJson":toJson,"fromJson":fromJson,"identity":identity,"isUndefined":isUndefined,"isDefined":isDefined,"isString":isString,"isFunction":isFunction,"isObject":isObject,"isNumber":isNumber,"isElement":isElement,"isArray":isArray,"version":version,"isDate":isDate,"lowercase":lowercase,"uppercase":uppercase,"callbacks":{counter:0},"getTestability":getTestability,
"$$minErr":minErr,"$$csp":csp,"reloadWithDebugInfo":reloadWithDebugInfo});angularModule=setupModuleLoader(window);angularModule("ng",["ngLocale"],["$provide",function ngModule($provide){$provide.provider({$$sanitizeUri:$$SanitizeUriProvider});$provide.provider("$compile",$CompileProvider).directive({a:htmlAnchorDirective,input:inputDirective,textarea:inputDirective,form:formDirective,script:scriptDirective,select:selectDirective,style:styleDirective,option:optionDirective,ngBind:ngBindDirective,ngBindHtml:ngBindHtmlDirective,
ngBindTemplate:ngBindTemplateDirective,ngClass:ngClassDirective,ngClassEven:ngClassEvenDirective,ngClassOdd:ngClassOddDirective,ngCloak:ngCloakDirective,ngController:ngControllerDirective,ngForm:ngFormDirective,ngHide:ngHideDirective,ngIf:ngIfDirective,ngInclude:ngIncludeDirective,ngInit:ngInitDirective,ngNonBindable:ngNonBindableDirective,ngPluralize:ngPluralizeDirective,ngRepeat:ngRepeatDirective,ngShow:ngShowDirective,ngStyle:ngStyleDirective,ngSwitch:ngSwitchDirective,ngSwitchWhen:ngSwitchWhenDirective,
ngSwitchDefault:ngSwitchDefaultDirective,ngOptions:ngOptionsDirective,ngTransclude:ngTranscludeDirective,ngModel:ngModelDirective,ngList:ngListDirective,ngChange:ngChangeDirective,pattern:patternDirective,ngPattern:patternDirective,required:requiredDirective,ngRequired:requiredDirective,minlength:minlengthDirective,ngMinlength:minlengthDirective,maxlength:maxlengthDirective,ngMaxlength:maxlengthDirective,ngValue:ngValueDirective,ngModelOptions:ngModelOptionsDirective}).directive({ngInclude:ngIncludeFillContentDirective}).directive(ngAttributeAliasDirectives).directive(ngEventDirectives);
$provide.provider({$anchorScroll:$AnchorScrollProvider,$animate:$AnimateProvider,$animateCss:$CoreAnimateCssProvider,$$animateQueue:$$CoreAnimateQueueProvider,$$AnimateRunner:$$CoreAnimateRunnerProvider,$browser:$BrowserProvider,$cacheFactory:$CacheFactoryProvider,$controller:$ControllerProvider,$document:$DocumentProvider,$exceptionHandler:$ExceptionHandlerProvider,$filter:$FilterProvider,$$forceReflow:$$ForceReflowProvider,$interpolate:$InterpolateProvider,$interval:$IntervalProvider,$http:$HttpProvider,
$httpParamSerializer:$HttpParamSerializerProvider,$httpParamSerializerJQLike:$HttpParamSerializerJQLikeProvider,$httpBackend:$HttpBackendProvider,$location:$LocationProvider,$log:$LogProvider,$parse:$ParseProvider,$rootScope:$RootScopeProvider,$q:$QProvider,$$q:$$QProvider,$sce:$SceProvider,$sceDelegate:$SceDelegateProvider,$sniffer:$SnifferProvider,$templateCache:$TemplateCacheProvider,$templateRequest:$TemplateRequestProvider,$$testability:$$TestabilityProvider,$timeout:$TimeoutProvider,$window:$WindowProvider,
$$rAF:$$RAFProvider,$$jqLite:$$jqLiteProvider,$$HashMap:$$HashMapProvider,$$cookieReader:$$CookieReaderProvider})}])}JQLite.expando="ng339";var jqCache=JQLite.cache={},jqId=1,addEventListenerFn=function(element,type,fn){element.addEventListener(type,fn,false)},removeEventListenerFn=function(element,type,fn){element.removeEventListener(type,fn,false)};JQLite._data=function(node){return this.cache[node[this.expando]]||{}};function jqNextId(){return++jqId}var SPECIAL_CHARS_REGEXP=/([:\-_]+(.))/g;var MOZ_HACK_REGEXP=
/^moz([A-Z])/;var MOUSE_EVENT_MAP={mouseleave:"mouseout",mouseenter:"mouseover"};var jqLiteMinErr=minErr("jqLite");function camelCase(name){return name.replace(SPECIAL_CHARS_REGEXP,function(_,separator,letter,offset){return offset?letter.toUpperCase():letter}).replace(MOZ_HACK_REGEXP,"Moz$1")}var SINGLE_TAG_REGEXP=/^<(\w+)\s*\/?>(?:<\/\1>|)$/;var HTML_REGEXP=/<|&#?\w+;/;var TAG_NAME_REGEXP=/<([\w:]+)/;var XHTML_TAG_REGEXP=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;var wrapMap=
{"option":[1,'\x3cselect multiple\x3d"multiple"\x3e',"\x3c/select\x3e"],"thead":[1,"\x3ctable\x3e","\x3c/table\x3e"],"col":[2,"\x3ctable\x3e\x3ccolgroup\x3e","\x3c/colgroup\x3e\x3c/table\x3e"],"tr":[2,"\x3ctable\x3e\x3ctbody\x3e","\x3c/tbody\x3e\x3c/table\x3e"],"td":[3,"\x3ctable\x3e\x3ctbody\x3e\x3ctr\x3e","\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e"],"_default":[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;
function jqLiteIsTextNode(html){return!HTML_REGEXP.test(html)}function jqLiteAcceptsData(node){var nodeType=node.nodeType;return nodeType===NODE_TYPE_ELEMENT||!nodeType||nodeType===NODE_TYPE_DOCUMENT}function jqLiteHasData(node){for(var key in jqCache[node.ng339])return true;return false}function jqLiteBuildFragment(html,context){var tmp,tag,wrap,fragment=context.createDocumentFragment(),nodes=[],i;if(jqLiteIsTextNode(html))nodes.push(context.createTextNode(html));else{tmp=tmp||fragment.appendChild(context.createElement("div"));
tag=(TAG_NAME_REGEXP.exec(html)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+html.replace(XHTML_TAG_REGEXP,"\x3c$1\x3e\x3c/$2\x3e")+wrap[2];i=wrap[0];while(i--)tmp=tmp.lastChild;nodes=concat(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent=""}fragment.textContent="";fragment.innerHTML="";forEach(nodes,function(node){fragment.appendChild(node)});return fragment}function jqLiteParseHTML(html,context){context=context||document;var parsed;if(parsed=
SINGLE_TAG_REGEXP.exec(html))return[context.createElement(parsed[1])];if(parsed=jqLiteBuildFragment(html,context))return parsed.childNodes;return[]}function JQLite(element){if(element instanceof JQLite)return element;var argIsString;if(isString(element)){element=trim(element);argIsString=true}if(!(this instanceof JQLite)){if(argIsString&&element.charAt(0)!="\x3c")throw jqLiteMinErr("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");
return new JQLite(element)}if(argIsString)jqLiteAddNodes(this,jqLiteParseHTML(element));else jqLiteAddNodes(this,element)}function jqLiteClone(element){return element.cloneNode(true)}function jqLiteDealoc(element,onlyDescendants){if(!onlyDescendants)jqLiteRemoveData(element);if(element.querySelectorAll){var descendants=element.querySelectorAll("*");for(var i=0,l=descendants.length;i<l;i++)jqLiteRemoveData(descendants[i])}}function jqLiteOff(element,type,fn,unsupported){if(isDefined(unsupported))throw jqLiteMinErr("offargs",
"jqLite#off() does not support the `selector` argument");var expandoStore=jqLiteExpandoStore(element);var events=expandoStore&&expandoStore.events;var handle=expandoStore&&expandoStore.handle;if(!handle)return;if(!type)for(type in events){if(type!=="$destroy")removeEventListenerFn(element,type,handle);delete events[type]}else forEach(type.split(" "),function(type){if(isDefined(fn)){var listenerFns=events[type];arrayRemove(listenerFns||[],fn);if(listenerFns&&listenerFns.length>0)return}removeEventListenerFn(element,
type,handle);delete events[type]})}function jqLiteRemoveData(element,name){var expandoId=element.ng339;var expandoStore=expandoId&&jqCache[expandoId];if(expandoStore){if(name){delete expandoStore.data[name];return}if(expandoStore.handle){if(expandoStore.events.$destroy)expandoStore.handle({},"$destroy");jqLiteOff(element)}delete jqCache[expandoId];element.ng339=undefined}}function jqLiteExpandoStore(element,createIfNecessary){var expandoId=element.ng339,expandoStore=expandoId&&jqCache[expandoId];
if(createIfNecessary&&!expandoStore){element.ng339=expandoId=jqNextId();expandoStore=jqCache[expandoId]={events:{},data:{},handle:undefined}}return expandoStore}function jqLiteData(element,key,value){if(jqLiteAcceptsData(element)){var isSimpleSetter=isDefined(value);var isSimpleGetter=!isSimpleSetter&&key&&!isObject(key);var massGetter=!key;var expandoStore=jqLiteExpandoStore(element,!isSimpleGetter);var data=expandoStore&&expandoStore.data;if(isSimpleSetter)data[key]=value;else if(massGetter)return data;
else if(isSimpleGetter)return data&&data[key];else extend(data,key)}}function jqLiteHasClass(element,selector){if(!element.getAttribute)return false;return(" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+selector+" ")>-1}function jqLiteRemoveClass(element,cssClasses){if(cssClasses&&element.setAttribute)forEach(cssClasses.split(" "),function(cssClass){element.setAttribute("class",trim((" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+trim(cssClass)+
" "," ")))})}function jqLiteAddClass(element,cssClasses){if(cssClasses&&element.setAttribute){var existingClasses=(" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");forEach(cssClasses.split(" "),function(cssClass){cssClass=trim(cssClass);if(existingClasses.indexOf(" "+cssClass+" ")===-1)existingClasses+=cssClass+" "});element.setAttribute("class",trim(existingClasses))}}function jqLiteAddNodes(root,elements){if(elements)if(elements.nodeType)root[root.length++]=elements;else{var length=
elements.length;if(typeof length==="number"&&elements.window!==elements){if(length)for(var i=0;i<length;i++)root[root.length++]=elements[i]}else root[root.length++]=elements}}function jqLiteController(element,name){return jqLiteInheritedData(element,"$"+(name||"ngController")+"Controller")}function jqLiteInheritedData(element,name,value){if(element.nodeType==NODE_TYPE_DOCUMENT)element=element.documentElement;var names=isArray(name)?name:[name];while(element){for(var i=0,ii=names.length;i<ii;i++)if((value=
jqLite.data(element,names[i]))!==undefined)return value;element=element.parentNode||element.nodeType===NODE_TYPE_DOCUMENT_FRAGMENT&&element.host}}function jqLiteEmpty(element){jqLiteDealoc(element,true);while(element.firstChild)element.removeChild(element.firstChild)}function jqLiteRemove(element,keepData){if(!keepData)jqLiteDealoc(element);var parent=element.parentNode;if(parent)parent.removeChild(element)}function jqLiteDocumentLoaded(action,win){win=win||window;if(win.document.readyState==="complete")win.setTimeout(action);
else jqLite(win).on("load",action)}var JQLitePrototype=JQLite.prototype={ready:function(fn){var fired=false;function trigger(){if(fired)return;fired=true;fn()}if(document.readyState==="complete")setTimeout(trigger);else{this.on("DOMContentLoaded",trigger);JQLite(window).on("load",trigger)}},toString:function(){var value=[];forEach(this,function(e){value.push(""+e)});return"["+value.join(", ")+"]"},eq:function(index){return index>=0?jqLite(this[index]):jqLite(this[this.length+index])},length:0,push:push,
sort:[].sort,splice:[].splice};var BOOLEAN_ATTR={};forEach("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(value){BOOLEAN_ATTR[lowercase(value)]=value});var BOOLEAN_ELEMENTS={};forEach("input,select,option,textarea,button,form,details".split(","),function(value){BOOLEAN_ELEMENTS[value]=true});var ALIASED_ATTR={"ngMinlength":"minlength","ngMaxlength":"maxlength","ngMin":"min","ngMax":"max","ngPattern":"pattern"};function getBooleanAttrName(element,name){var booleanAttr=
BOOLEAN_ATTR[name.toLowerCase()];return booleanAttr&&BOOLEAN_ELEMENTS[nodeName_(element)]&&booleanAttr}function getAliasedAttrName(element,name){var nodeName=element.nodeName;return(nodeName==="INPUT"||nodeName==="TEXTAREA")&&ALIASED_ATTR[name]}forEach({data:jqLiteData,removeData:jqLiteRemoveData,hasData:jqLiteHasData},function(fn,name){JQLite[name]=fn});forEach({data:jqLiteData,inheritedData:jqLiteInheritedData,scope:function(element){return jqLite.data(element,"$scope")||jqLiteInheritedData(element.parentNode||
element,["$isolateScope","$scope"])},isolateScope:function(element){return jqLite.data(element,"$isolateScope")||jqLite.data(element,"$isolateScopeNoTemplate")},controller:jqLiteController,injector:function(element){return jqLiteInheritedData(element,"$injector")},removeAttr:function(element,name){element.removeAttribute(name)},hasClass:jqLiteHasClass,css:function(element,name,value){name=camelCase(name);if(isDefined(value))element.style[name]=value;else return element.style[name]},attr:function(element,
name,value){var nodeType=element.nodeType;if(nodeType===NODE_TYPE_TEXT||nodeType===NODE_TYPE_ATTRIBUTE||nodeType===NODE_TYPE_COMMENT)return;var lowercasedName=lowercase(name);if(BOOLEAN_ATTR[lowercasedName])if(isDefined(value))if(!!value){element[name]=true;element.setAttribute(name,lowercasedName)}else{element[name]=false;element.removeAttribute(lowercasedName)}else return element[name]||(element.attributes.getNamedItem(name)||noop).specified?lowercasedName:undefined;else if(isDefined(value))element.setAttribute(name,
value);else if(element.getAttribute){var ret=element.getAttribute(name,2);return ret===null?undefined:ret}},prop:function(element,name,value){if(isDefined(value))element[name]=value;else return element[name]},text:function(){getText.$dv="";return getText;function getText(element,value){if(isUndefined(value)){var nodeType=element.nodeType;return nodeType===NODE_TYPE_ELEMENT||nodeType===NODE_TYPE_TEXT?element.textContent:""}element.textContent=value}}(),val:function(element,value){if(isUndefined(value)){if(element.multiple&&
nodeName_(element)==="select"){var result=[];forEach(element.options,function(option){if(option.selected)result.push(option.value||option.text)});return result.length===0?null:result}return element.value}element.value=value},html:function(element,value){if(isUndefined(value))return element.innerHTML;jqLiteDealoc(element,true);element.innerHTML=value},empty:jqLiteEmpty},function(fn,name){JQLite.prototype[name]=function(arg1,arg2){var i,key;var nodeCount=this.length;if(fn!==jqLiteEmpty&&(fn.length==
2&&(fn!==jqLiteHasClass&&fn!==jqLiteController)?arg1:arg2)===undefined)if(isObject(arg1)){for(i=0;i<nodeCount;i++)if(fn===jqLiteData)fn(this[i],arg1);else for(key in arg1)fn(this[i],key,arg1[key]);return this}else{var value=fn.$dv;var jj=value===undefined?Math.min(nodeCount,1):nodeCount;for(var j=0;j<jj;j++){var nodeValue=fn(this[j],arg1,arg2);value=value?value+nodeValue:nodeValue}return value}else{for(i=0;i<nodeCount;i++)fn(this[i],arg1,arg2);return this}}});function createEventHandler(element,events){var eventHandler=
function(event,type){event.isDefaultPrevented=function(){return event.defaultPrevented};var eventFns=events[type||event.type];var eventFnsLength=eventFns?eventFns.length:0;if(!eventFnsLength)return;if(isUndefined(event.immediatePropagationStopped)){var originalStopImmediatePropagation=event.stopImmediatePropagation;event.stopImmediatePropagation=function(){event.immediatePropagationStopped=true;if(event.stopPropagation)event.stopPropagation();if(originalStopImmediatePropagation)originalStopImmediatePropagation.call(event)}}event.isImmediatePropagationStopped=
function(){return event.immediatePropagationStopped===true};if(eventFnsLength>1)eventFns=shallowCopy(eventFns);for(var i=0;i<eventFnsLength;i++)if(!event.isImmediatePropagationStopped())eventFns[i].call(element,event)};eventHandler.elem=element;return eventHandler}forEach({removeData:jqLiteRemoveData,on:function jqLiteOn(element,type,fn,unsupported){if(isDefined(unsupported))throw jqLiteMinErr("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(!jqLiteAcceptsData(element))return;
var expandoStore=jqLiteExpandoStore(element,true);var events=expandoStore.events;var handle=expandoStore.handle;if(!handle)handle=expandoStore.handle=createEventHandler(element,events);var types=type.indexOf(" ")>=0?type.split(" "):[type];var i=types.length;while(i--){type=types[i];var eventFns=events[type];if(!eventFns){events[type]=[];if(type==="mouseenter"||type==="mouseleave")jqLiteOn(element,MOUSE_EVENT_MAP[type],function(event){var target=this,related=event.relatedTarget;if(!related||related!==
target&&!target.contains(related))handle(event,type)});else if(type!=="$destroy")addEventListenerFn(element,type,handle);eventFns=events[type]}eventFns.push(fn)}},off:jqLiteOff,one:function(element,type,fn){element=jqLite(element);element.on(type,function onFn(){element.off(type,fn);element.off(type,onFn)});element.on(type,fn)},replaceWith:function(element,replaceNode){var index,parent=element.parentNode;jqLiteDealoc(element);forEach(new JQLite(replaceNode),function(node){if(index)parent.insertBefore(node,
index.nextSibling);else parent.replaceChild(node,element);index=node})},children:function(element){var children=[];forEach(element.childNodes,function(element){if(element.nodeType===NODE_TYPE_ELEMENT)children.push(element)});return children},contents:function(element){return element.contentDocument||element.childNodes||[]},append:function(element,node){var nodeType=element.nodeType;if(nodeType!==NODE_TYPE_ELEMENT&&nodeType!==NODE_TYPE_DOCUMENT_FRAGMENT)return;node=new JQLite(node);for(var i=0,ii=
node.length;i<ii;i++){var child=node[i];element.appendChild(child)}},prepend:function(element,node){if(element.nodeType===NODE_TYPE_ELEMENT){var index=element.firstChild;forEach(new JQLite(node),function(child){element.insertBefore(child,index)})}},wrap:function(element,wrapNode){wrapNode=jqLite(wrapNode).eq(0).clone()[0];var parent=element.parentNode;if(parent)parent.replaceChild(wrapNode,element);wrapNode.appendChild(element)},remove:jqLiteRemove,detach:function(element){jqLiteRemove(element,true)},
after:function(element,newElement){var index=element,parent=element.parentNode;newElement=new JQLite(newElement);for(var i=0,ii=newElement.length;i<ii;i++){var node=newElement[i];parent.insertBefore(node,index.nextSibling);index=node}},addClass:jqLiteAddClass,removeClass:jqLiteRemoveClass,toggleClass:function(element,selector,condition){if(selector)forEach(selector.split(" "),function(className){var classCondition=condition;if(isUndefined(classCondition))classCondition=!jqLiteHasClass(element,className);
(classCondition?jqLiteAddClass:jqLiteRemoveClass)(element,className)})},parent:function(element){var parent=element.parentNode;return parent&&parent.nodeType!==NODE_TYPE_DOCUMENT_FRAGMENT?parent:null},next:function(element){return element.nextElementSibling},find:function(element,selector){if(element.getElementsByTagName)return element.getElementsByTagName(selector);else return[]},clone:jqLiteClone,triggerHandler:function(element,event,extraParameters){var dummyEvent,eventFnsCopy,handlerArgs;var eventName=
event.type||event;var expandoStore=jqLiteExpandoStore(element);var events=expandoStore&&expandoStore.events;var eventFns=events&&events[eventName];if(eventFns){dummyEvent={preventDefault:function(){this.defaultPrevented=true},isDefaultPrevented:function(){return this.defaultPrevented===true},stopImmediatePropagation:function(){this.immediatePropagationStopped=true},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===true},stopPropagation:noop,type:eventName,target:element};
if(event.type)dummyEvent=extend(dummyEvent,event);eventFnsCopy=shallowCopy(eventFns);handlerArgs=extraParameters?[dummyEvent].concat(extraParameters):[dummyEvent];forEach(eventFnsCopy,function(fn){if(!dummyEvent.isImmediatePropagationStopped())fn.apply(element,handlerArgs)})}}},function(fn,name){JQLite.prototype[name]=function(arg1,arg2,arg3){var value;for(var i=0,ii=this.length;i<ii;i++)if(isUndefined(value)){value=fn(this[i],arg1,arg2,arg3);if(isDefined(value))value=jqLite(value)}else jqLiteAddNodes(value,
fn(this[i],arg1,arg2,arg3));return isDefined(value)?value:this};JQLite.prototype.bind=JQLite.prototype.on;JQLite.prototype.unbind=JQLite.prototype.off});function $$jqLiteProvider(){this.$get=function $$jqLite(){return extend(JQLite,{hasClass:function(node,classes){if(node.attr)node=node[0];return jqLiteHasClass(node,classes)},addClass:function(node,classes){if(node.attr)node=node[0];return jqLiteAddClass(node,classes)},removeClass:function(node,classes){if(node.attr)node=node[0];return jqLiteRemoveClass(node,
classes)}})}}function hashKey(obj,nextUidFn){var key=obj&&obj.$$hashKey;if(key){if(typeof key==="function")key=obj.$$hashKey();return key}var objType=typeof obj;if(objType=="function"||objType=="object"&&obj!==null)key=obj.$$hashKey=objType+":"+(nextUidFn||nextUid)();else key=objType+":"+obj;return key}function HashMap(array,isolatedUid){if(isolatedUid){var uid=0;this.nextUid=function(){return++uid}}forEach(array,this.put,this)}HashMap.prototype={put:function(key,value){this[hashKey(key,this.nextUid)]=
value},get:function(key){return this[hashKey(key,this.nextUid)]},remove:function(key){var value=this[key=hashKey(key,this.nextUid)];delete this[key];return value}};var $$HashMapProvider=[function(){this.$get=[function(){return HashMap}]}];var FN_ARGS=/^[^\(]*\(\s*([^\)]*)\)/m;var FN_ARG_SPLIT=/,/;var FN_ARG=/^\s*(_?)(\S+?)\1\s*$/;var STRIP_COMMENTS=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;var $injectorMinErr=minErr("$injector");function anonFn(fn){var fnText=fn.toString().replace(STRIP_COMMENTS,""),args=
fnText.match(FN_ARGS);if(args)return"function("+(args[1]||"").replace(/[\s\r\n]+/," ")+")";return"fn"}function annotate(fn,strictDi,name){var $inject,fnText,argDecl,last;if(typeof fn==="function"){if(!($inject=fn.$inject)){$inject=[];if(fn.length){if(strictDi){if(!isString(name)||!name)name=fn.name||anonFn(fn);throw $injectorMinErr("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",name);}fnText=fn.toString().replace(STRIP_COMMENTS,"");argDecl=fnText.match(FN_ARGS);
forEach(argDecl[1].split(FN_ARG_SPLIT),function(arg){arg.replace(FN_ARG,function(all,underscore,name){$inject.push(name)})})}fn.$inject=$inject}}else if(isArray(fn)){last=fn.length-1;assertArgFn(fn[last],"fn");$inject=fn.slice(0,last)}else assertArgFn(fn,"fn",true);return $inject}function createInjector(modulesToLoad,strictDi){strictDi=strictDi===true;var INSTANTIATING={},providerSuffix="Provider",path=[],loadedModules=new HashMap([],true),providerCache={$provide:{provider:supportObject(provider),
factory:supportObject(factory),service:supportObject(service),value:supportObject(value),constant:supportObject(constant),decorator:decorator}},providerInjector=providerCache.$injector=createInternalInjector(providerCache,function(serviceName,caller){if(angular.isString(caller))path.push(caller);throw $injectorMinErr("unpr","Unknown provider: {0}",path.join(" \x3c- "));}),instanceCache={},instanceInjector=instanceCache.$injector=createInternalInjector(instanceCache,function(serviceName,caller){var provider=
providerInjector.get(serviceName+providerSuffix,caller);return instanceInjector.invoke(provider.$get,provider,undefined,serviceName)});forEach(loadModules(modulesToLoad),function(fn){if(fn)instanceInjector.invoke(fn)});return instanceInjector;function supportObject(delegate){return function(key,value){if(isObject(key))forEach(key,reverseParams(delegate));else return delegate(key,value)}}function provider(name,provider_){assertNotHasOwnProperty(name,"service");if(isFunction(provider_)||isArray(provider_))provider_=
providerInjector.instantiate(provider_);if(!provider_.$get)throw $injectorMinErr("pget","Provider '{0}' must define $get factory method.",name);return providerCache[name+providerSuffix]=provider_}function enforceReturnValue(name,factory){return function enforcedReturnValue(){var result=instanceInjector.invoke(factory,this);if(isUndefined(result))throw $injectorMinErr("undef","Provider '{0}' must return a value from $get factory method.",name);return result}}function factory(name,factoryFn,enforce){return provider(name,
{$get:enforce!==false?enforceReturnValue(name,factoryFn):factoryFn})}function service(name,constructor){return factory(name,["$injector",function($injector){return $injector.instantiate(constructor)}])}function value(name,val){return factory(name,valueFn(val),false)}function constant(name,value){assertNotHasOwnProperty(name,"constant");providerCache[name]=value;instanceCache[name]=value}function decorator(serviceName,decorFn){var origProvider=providerInjector.get(serviceName+providerSuffix),orig$get=
origProvider.$get;origProvider.$get=function(){var origInstance=instanceInjector.invoke(orig$get,origProvider);return instanceInjector.invoke(decorFn,null,{$delegate:origInstance})}}function loadModules(modulesToLoad){assertArg(isUndefined(modulesToLoad)||isArray(modulesToLoad),"modulesToLoad","not an array");var runBlocks=[],moduleFn;forEach(modulesToLoad,function(module){if(loadedModules.get(module))return;loadedModules.put(module,true);function runInvokeQueue(queue){var i,ii;for(i=0,ii=queue.length;i<
ii;i++){var invokeArgs=queue[i],provider=providerInjector.get(invokeArgs[0]);provider[invokeArgs[1]].apply(provider,invokeArgs[2])}}try{if(isString(module)){moduleFn=angularModule(module);runBlocks=runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);runInvokeQueue(moduleFn._invokeQueue);runInvokeQueue(moduleFn._configBlocks)}else if(isFunction(module))runBlocks.push(providerInjector.invoke(module));else if(isArray(module))runBlocks.push(providerInjector.invoke(module));else assertArgFn(module,
"module")}catch(e){if(isArray(module))module=module[module.length-1];if(e.message&&e.stack&&e.stack.indexOf(e.message)==-1)e=e.message+"\n"+e.stack;throw $injectorMinErr("modulerr","Failed to instantiate module {0} due to:\n{1}",module,e.stack||e.message||e);}});return runBlocks}function createInternalInjector(cache,factory){function getService(serviceName,caller){if(cache.hasOwnProperty(serviceName)){if(cache[serviceName]===INSTANTIATING)throw $injectorMinErr("cdep","Circular dependency found: {0}",
serviceName+" \x3c- "+path.join(" \x3c- "));return cache[serviceName]}else try{path.unshift(serviceName);cache[serviceName]=INSTANTIATING;return cache[serviceName]=factory(serviceName,caller)}catch(err){if(cache[serviceName]===INSTANTIATING)delete cache[serviceName];throw err;}finally{path.shift()}}function invoke(fn,self,locals,serviceName){if(typeof locals==="string"){serviceName=locals;locals=null}var args=[],$inject=createInjector.$$annotate(fn,strictDi,serviceName),length,i,key;for(i=0,length=
$inject.length;i<length;i++){key=$inject[i];if(typeof key!=="string")throw $injectorMinErr("itkn","Incorrect injection token! Expected service name as string, got {0}",key);args.push(locals&&locals.hasOwnProperty(key)?locals[key]:getService(key,serviceName))}if(isArray(fn))fn=fn[length];return fn.apply(self,args)}function instantiate(Type,locals,serviceName){var instance=Object.create((isArray(Type)?Type[Type.length-1]:Type).prototype||null);var returnedValue=invoke(Type,instance,locals,serviceName);
return isObject(returnedValue)||isFunction(returnedValue)?returnedValue:instance}return{invoke:invoke,instantiate:instantiate,get:getService,annotate:createInjector.$$annotate,has:function(name){return providerCache.hasOwnProperty(name+providerSuffix)||cache.hasOwnProperty(name)}}}}createInjector.$$annotate=annotate;function $AnchorScrollProvider(){var autoScrollingEnabled=true;this.disableAutoScrolling=function(){autoScrollingEnabled=false};this.$get=["$window","$location","$rootScope",function($window,
$location,$rootScope){var document=$window.document;function getFirstAnchor(list){var result=null;Array.prototype.some.call(list,function(element){if(nodeName_(element)==="a"){result=element;return true}});return result}function getYOffset(){var offset=scroll.yOffset;if(isFunction(offset))offset=offset();else if(isElement(offset)){var elem=offset[0];var style=$window.getComputedStyle(elem);if(style.position!=="fixed")offset=0;else offset=elem.getBoundingClientRect().bottom}else if(!isNumber(offset))offset=
0;return offset}function scrollTo(elem){if(elem){elem.scrollIntoView();var offset=getYOffset();if(offset){var elemTop=elem.getBoundingClientRect().top;$window.scrollBy(0,elemTop-offset)}}else $window.scrollTo(0,0)}function scroll(hash){hash=isString(hash)?hash:$location.hash();var elm;if(!hash)scrollTo(null);else if(elm=document.getElementById(hash))scrollTo(elm);else if(elm=getFirstAnchor(document.getElementsByName(hash)))scrollTo(elm);else if(hash==="top")scrollTo(null)}if(autoScrollingEnabled)$rootScope.$watch(function autoScrollWatch(){return $location.hash()},
function autoScrollWatchAction(newVal,oldVal){if(newVal===oldVal&&newVal==="")return;jqLiteDocumentLoaded(function(){$rootScope.$evalAsync(scroll)})});return scroll}]}var $animateMinErr=minErr("$animate");var ELEMENT_NODE=1;var NG_ANIMATE_CLASSNAME="ng-animate";function mergeClasses(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;if(isArray(a))a=a.join(" ");if(isArray(b))b=b.join(" ");return a+" "+b}function extractElementNode(element){for(var i=0;i<element.length;i++){var elm=element[i];if(elm.nodeType===
ELEMENT_NODE)return elm}}function splitClasses(classes){if(isString(classes))classes=classes.split(" ");var obj=createMap();forEach(classes,function(klass){if(klass.length)obj[klass]=true});return obj}function prepareAnimateOptions(options){return isObject(options)?options:{}}var $$CoreAnimateRunnerProvider=function(){this.$get=["$q","$$rAF",function($q,$$rAF){function AnimateRunner(){}AnimateRunner.all=noop;AnimateRunner.chain=noop;AnimateRunner.prototype={end:noop,cancel:noop,resume:noop,pause:noop,
complete:noop,then:function(pass,fail){return $q(function(resolve){$$rAF(function(){resolve()})}).then(pass,fail)}};return AnimateRunner}]};var $$CoreAnimateQueueProvider=function(){var postDigestQueue=new HashMap;var postDigestElements=[];this.$get=["$$AnimateRunner","$rootScope",function($$AnimateRunner,$rootScope){return{enabled:noop,on:noop,off:noop,pin:noop,push:function(element,event,options,domOperation){domOperation&&domOperation();options=options||{};options.from&&element.css(options.from);
options.to&&element.css(options.to);if(options.addClass||options.removeClass)addRemoveClassesPostDigest(element,options.addClass,options.removeClass);return new $$AnimateRunner}};function addRemoveClassesPostDigest(element,add,remove){var classVal,data=postDigestQueue.get(element);if(!data){postDigestQueue.put(element,data={});postDigestElements.push(element)}var updateData=function(classes,value){var changed=false;if(classes){classes=isString(classes)?classes.split(" "):isArray(classes)?classes:
[];forEach(classes,function(className){if(className){changed=true;data[className]=value}})}return changed};var classesAdded=updateData(add,true);var classesRemoved=updateData(remove,false);if(!classesAdded&&!classesRemoved||postDigestElements.length>1)return;$rootScope.$$postDigest(function(){forEach(postDigestElements,function(element){var data=postDigestQueue.get(element);if(data){var existing=splitClasses(element.attr("class"));var toAdd="";var toRemove="";forEach(data,function(status,className){var hasClass=
!!existing[className];if(status!==hasClass)if(status)toAdd+=(toAdd.length?" ":"")+className;else toRemove+=(toRemove.length?" ":"")+className});forEach(element,function(elm){toAdd&&jqLiteAddClass(elm,toAdd);toRemove&&jqLiteRemoveClass(elm,toRemove)});postDigestQueue.remove(element)}});postDigestElements.length=0})}}]};var $AnimateProvider=["$provide",function($provide){var provider=this;this.$$registeredAnimations=Object.create(null);this.register=function(name,factory){if(name&&name.charAt(0)!==
".")throw $animateMinErr("notcsel","Expecting class selector starting with '.' got '{0}'.",name);var key=name+"-animation";provider.$$registeredAnimations[name.substr(1)]=key;$provide.factory(key,factory)};this.classNameFilter=function(expression){if(arguments.length===1){this.$$classNameFilter=expression instanceof RegExp?expression:null;if(this.$$classNameFilter){var reservedRegex=new RegExp("(\\s+|\\/)"+NG_ANIMATE_CLASSNAME+"(\\s+|\\/)");if(reservedRegex.test(this.$$classNameFilter.toString()))throw $animateMinErr("nongcls",
'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',NG_ANIMATE_CLASSNAME);}}return this.$$classNameFilter};this.$get=["$$animateQueue",function($$animateQueue){function domInsert(element,parentElement,afterElement){if(afterElement){var afterNode=extractElementNode(afterElement);if(afterNode&&!afterNode.parentNode&&!afterNode.previousElementSibling)afterElement=null}afterElement?afterElement.after(element):parentElement.prepend(element)}
return{on:$$animateQueue.on,off:$$animateQueue.off,pin:$$animateQueue.pin,enabled:$$animateQueue.enabled,cancel:function(runner){runner.end&&runner.end()},enter:function(element,parent,after,options){parent=parent&&jqLite(parent);after=after&&jqLite(after);parent=parent||after.parent();domInsert(element,parent,after);return $$animateQueue.push(element,"enter",prepareAnimateOptions(options))},move:function(element,parent,after,options){parent=parent&&jqLite(parent);after=after&&jqLite(after);parent=
parent||after.parent();domInsert(element,parent,after);return $$animateQueue.push(element,"move",prepareAnimateOptions(options))},leave:function(element,options){return $$animateQueue.push(element,"leave",prepareAnimateOptions(options),function(){element.remove()})},addClass:function(element,className,options){options=prepareAnimateOptions(options);options.addClass=mergeClasses(options.addclass,className);return $$animateQueue.push(element,"addClass",options)},removeClass:function(element,className,
options){options=prepareAnimateOptions(options);options.removeClass=mergeClasses(options.removeClass,className);return $$animateQueue.push(element,"removeClass",options)},setClass:function(element,add,remove,options){options=prepareAnimateOptions(options);options.addClass=mergeClasses(options.addClass,add);options.removeClass=mergeClasses(options.removeClass,remove);return $$animateQueue.push(element,"setClass",options)},animate:function(element,from,to,className,options){options=prepareAnimateOptions(options);
options.from=options.from?extend(options.from,from):from;options.to=options.to?extend(options.to,to):to;className=className||"ng-inline-animate";options.tempClasses=mergeClasses(options.tempClasses,className);return $$animateQueue.push(element,"animate",options)}}}]}];var $CoreAnimateCssProvider=function(){this.$get=["$$rAF","$q",function($$rAF,$q){var RAFPromise=function(){};RAFPromise.prototype={done:function(cancel){this.defer&&this.defer[cancel===true?"reject":"resolve"]()},end:function(){this.done()},
cancel:function(){this.done(true)},getPromise:function(){if(!this.defer)this.defer=$q.defer();return this.defer.promise},then:function(f1,f2){return this.getPromise().then(f1,f2)},"catch":function(f1){return this.getPromise().catch(f1)},"finally":function(f1){return this.getPromise().finally(f1)}};return function(element,options){if(options.from){element.css(options.from);options.from=null}var closed,runner=new RAFPromise;return{start:run,end:run};function run(){$$rAF(function(){close();if(!closed)runner.done();
closed=true});return runner}function close(){if(options.addClass){element.addClass(options.addClass);options.addClass=null}if(options.removeClass){element.removeClass(options.removeClass);options.removeClass=null}if(options.to){element.css(options.to);options.to=null}}}}]};function Browser(window,document,$log,$sniffer){var self=this,rawDocument=document[0],location=window.location,history=window.history,setTimeout=window.setTimeout,clearTimeout=window.clearTimeout,pendingDeferIds={};self.isMock=
false;var outstandingRequestCount=0;var outstandingRequestCallbacks=[];self.$$completeOutstandingRequest=completeOutstandingRequest;self.$$incOutstandingRequestCount=function(){outstandingRequestCount++};function completeOutstandingRequest(fn){try{fn.apply(null,sliceArgs(arguments,1))}finally{outstandingRequestCount--;if(outstandingRequestCount===0)while(outstandingRequestCallbacks.length)try{outstandingRequestCallbacks.pop()()}catch(e){$log.error(e)}}}function getHash(url){var index=url.indexOf("#");
return index===-1?"":url.substr(index)}self.notifyWhenNoOutstandingRequests=function(callback){if(outstandingRequestCount===0)callback();else outstandingRequestCallbacks.push(callback)};var cachedState,lastHistoryState,lastBrowserUrl=location.href,baseElement=document.find("base"),reloadLocation=null;cacheState();lastHistoryState=cachedState;self.url=function(url,replace,state){if(isUndefined(state))state=null;if(location!==window.location)location=window.location;if(history!==window.history)history=
window.history;if(url){var sameState=lastHistoryState===state;if(lastBrowserUrl===url&&(!$sniffer.history||sameState))return self;var sameBase=lastBrowserUrl&&stripHash(lastBrowserUrl)===stripHash(url);lastBrowserUrl=url;lastHistoryState=state;if($sniffer.history&&(!sameBase||!sameState)){history[replace?"replaceState":"pushState"](state,"",url);cacheState();lastHistoryState=cachedState}else{if(!sameBase||reloadLocation)reloadLocation=url;if(replace)location.replace(url);else if(!sameBase)location.href=
url;else location.hash=getHash(url)}return self}else return reloadLocation||location.href.replace(/%27/g,"'")};self.state=function(){return cachedState};var urlChangeListeners=[],urlChangeInit=false;function cacheStateAndFireUrlChange(){cacheState();fireUrlChange()}function getCurrentState(){try{return history.state}catch(e){}}var lastCachedState=null;function cacheState(){cachedState=getCurrentState();cachedState=isUndefined(cachedState)?null:cachedState;if(equals(cachedState,lastCachedState))cachedState=
lastCachedState;lastCachedState=cachedState}function fireUrlChange(){if(lastBrowserUrl===self.url()&&lastHistoryState===cachedState)return;lastBrowserUrl=self.url();lastHistoryState=cachedState;forEach(urlChangeListeners,function(listener){listener(self.url(),cachedState)})}self.onUrlChange=function(callback){if(!urlChangeInit){if($sniffer.history)jqLite(window).on("popstate",cacheStateAndFireUrlChange);jqLite(window).on("hashchange",cacheStateAndFireUrlChange);urlChangeInit=true}urlChangeListeners.push(callback);
return callback};self.$$applicationDestroyed=function(){jqLite(window).off("hashchange popstate",cacheStateAndFireUrlChange)};self.$$checkUrlChange=fireUrlChange;self.baseHref=function(){var href=baseElement.attr("href");return href?href.replace(/^(https?:)?\/\/[^\/]*/,""):""};self.defer=function(fn,delay){var timeoutId;outstandingRequestCount++;timeoutId=setTimeout(function(){delete pendingDeferIds[timeoutId];completeOutstandingRequest(fn)},delay||0);pendingDeferIds[timeoutId]=true;return timeoutId};
self.defer.cancel=function(deferId){if(pendingDeferIds[deferId]){delete pendingDeferIds[deferId];clearTimeout(deferId);completeOutstandingRequest(noop);return true}return false}}function $BrowserProvider(){this.$get=["$window","$log","$sniffer","$document",function($window,$log,$sniffer,$document){return new Browser($window,$document,$log,$sniffer)}]}function $CacheFactoryProvider(){this.$get=function(){var caches={};function cacheFactory(cacheId,options){if(cacheId in caches)throw minErr("$cacheFactory")("iid",
"CacheId '{0}' is already taken!",cacheId);var size=0,stats=extend({},options,{id:cacheId}),data={},capacity=options&&options.capacity||Number.MAX_VALUE,lruHash={},freshEnd=null,staleEnd=null;return caches[cacheId]={put:function(key,value){if(isUndefined(value))return;if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key]||(lruHash[key]={key:key});refresh(lruEntry)}if(!(key in data))size++;data[key]=value;if(size>capacity)this.remove(staleEnd.key);return value},get:function(key){if(capacity<Number.MAX_VALUE){var lruEntry=
lruHash[key];if(!lruEntry)return;refresh(lruEntry)}return data[key]},remove:function(key){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key];if(!lruEntry)return;if(lruEntry==freshEnd)freshEnd=lruEntry.p;if(lruEntry==staleEnd)staleEnd=lruEntry.n;link(lruEntry.n,lruEntry.p);delete lruHash[key]}delete data[key];size--},removeAll:function(){data={};size=0;lruHash={};freshEnd=staleEnd=null},destroy:function(){data=null;stats=null;lruHash=null;delete caches[cacheId]},info:function(){return extend({},
stats,{size:size})}};function refresh(entry){if(entry!=freshEnd){if(!staleEnd)staleEnd=entry;else if(staleEnd==entry)staleEnd=entry.n;link(entry.n,entry.p);link(entry,freshEnd);freshEnd=entry;freshEnd.n=null}}function link(nextEntry,prevEntry){if(nextEntry!=prevEntry){if(nextEntry)nextEntry.p=prevEntry;if(prevEntry)prevEntry.n=nextEntry}}}cacheFactory.info=function(){var info={};forEach(caches,function(cache,cacheId){info[cacheId]=cache.info()});return info};cacheFactory.get=function(cacheId){return caches[cacheId]};
return cacheFactory}}function $TemplateCacheProvider(){this.$get=["$cacheFactory",function($cacheFactory){return $cacheFactory("templates")}]}var $compileMinErr=minErr("$compile");$CompileProvider.$inject=["$provide","$$sanitizeUriProvider"];function $CompileProvider($provide,$$sanitizeUriProvider){var hasDirectives={},Suffix="Directive",COMMENT_DIRECTIVE_REGEXP=/^\s*directive:\s*([\w\-]+)\s+(.*)$/,CLASS_DIRECTIVE_REGEXP=/(([\w\-]+)(?::([^;]+))?;?)/,ALL_OR_NOTHING_ATTRS=makeMap("ngSrc,ngSrcset,src,srcset"),
REQUIRE_PREFIX_REGEXP=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/;var EVENT_HANDLER_ATTR_REGEXP=/^(on[a-z]+|formaction)$/;function parseIsolateBindings(scope,directiveName,isController){var LOCAL_REGEXP=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/;var bindings={};forEach(scope,function(definition,scopeName){var match=definition.match(LOCAL_REGEXP);if(!match)throw $compileMinErr("iscp","Invalid {3} for directive '{0}'."+" Definition: {... {1}: '{2}' ...}",directiveName,scopeName,definition,isController?"controller bindings definition":
"isolate scope definition");bindings[scopeName]={mode:match[1][0],collection:match[2]==="*",optional:match[3]==="?",attrName:match[4]||scopeName}});return bindings}function parseDirectiveBindings(directive,directiveName){var bindings={isolateScope:null,bindToController:null};if(isObject(directive.scope))if(directive.bindToController===true){bindings.bindToController=parseIsolateBindings(directive.scope,directiveName,true);bindings.isolateScope={}}else bindings.isolateScope=parseIsolateBindings(directive.scope,
directiveName,false);if(isObject(directive.bindToController))bindings.bindToController=parseIsolateBindings(directive.bindToController,directiveName,true);if(isObject(bindings.bindToController)){var controller=directive.controller;var controllerAs=directive.controllerAs;if(!controller)throw $compileMinErr("noctrl","Cannot bind to controller without directive '{0}'s controller.",directiveName);else if(!identifierForController(controller,controllerAs))throw $compileMinErr("noident","Cannot bind to controller without identifier for directive '{0}'.",
directiveName);}return bindings}function assertValidDirectiveName(name){var letter=name.charAt(0);if(!letter||letter!==lowercase(letter))throw $compileMinErr("baddir","Directive name '{0}' is invalid. The first character must be a lowercase letter",name);if(name!==name.trim())throw $compileMinErr("baddir","Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",name);}this.directive=function registerDirective(name,directiveFactory){assertNotHasOwnProperty(name,
"directive");if(isString(name)){assertValidDirectiveName(name);assertArg(directiveFactory,"directiveFactory");if(!hasDirectives.hasOwnProperty(name)){hasDirectives[name]=[];$provide.factory(name+Suffix,["$injector","$exceptionHandler",function($injector,$exceptionHandler){var directives=[];forEach(hasDirectives[name],function(directiveFactory,index){try{var directive=$injector.invoke(directiveFactory);if(isFunction(directive))directive={compile:valueFn(directive)};else if(!directive.compile&&directive.link)directive.compile=
valueFn(directive.link);directive.priority=directive.priority||0;directive.index=index;directive.name=directive.name||name;directive.require=directive.require||directive.controller&&directive.name;directive.restrict=directive.restrict||"EA";var bindings=directive.$$bindings=parseDirectiveBindings(directive,directive.name);if(isObject(bindings.isolateScope))directive.$$isolateBindings=bindings.isolateScope;directive.$$moduleName=directiveFactory.$$moduleName;directives.push(directive)}catch(e){$exceptionHandler(e)}});
return directives}])}hasDirectives[name].push(directiveFactory)}else forEach(name,reverseParams(registerDirective));return this};this.aHrefSanitizationWhitelist=function(regexp){if(isDefined(regexp)){$$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);return this}else return $$sanitizeUriProvider.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(regexp){if(isDefined(regexp)){$$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);return this}else return $$sanitizeUriProvider.imgSrcSanitizationWhitelist()};
var debugInfoEnabled=true;this.debugInfoEnabled=function(enabled){if(isDefined(enabled)){debugInfoEnabled=enabled;return this}return debugInfoEnabled};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function($injector,$interpolate,$exceptionHandler,$templateRequest,$parse,$controller,$rootScope,$document,$sce,$animate,$$sanitizeUri){var Attributes=function(element,attributesToCopy){if(attributesToCopy){var keys=
Object.keys(attributesToCopy);var i,l,key;for(i=0,l=keys.length;i<l;i++){key=keys[i];this[key]=attributesToCopy[key]}}else this.$attr={};this.$$element=element};Attributes.prototype={$normalize:directiveNormalize,$addClass:function(classVal){if(classVal&&classVal.length>0)$animate.addClass(this.$$element,classVal)},$removeClass:function(classVal){if(classVal&&classVal.length>0)$animate.removeClass(this.$$element,classVal)},$updateClass:function(newClasses,oldClasses){var toAdd=tokenDifference(newClasses,
oldClasses);if(toAdd&&toAdd.length)$animate.addClass(this.$$element,toAdd);var toRemove=tokenDifference(oldClasses,newClasses);if(toRemove&&toRemove.length)$animate.removeClass(this.$$element,toRemove)},$set:function(key,value,writeAttr,attrName){var node=this.$$element[0],booleanKey=getBooleanAttrName(node,key),aliasedKey=getAliasedAttrName(node,key),observer=key,nodeName;if(booleanKey){this.$$element.prop(key,value);attrName=booleanKey}else if(aliasedKey){this[aliasedKey]=value;observer=aliasedKey}this[key]=
value;if(attrName)this.$attr[key]=attrName;else{attrName=this.$attr[key];if(!attrName)this.$attr[key]=attrName=snake_case(key,"-")}nodeName=nodeName_(this.$$element);if(nodeName==="a"&&key==="href"||nodeName==="img"&&key==="src")this[key]=value=$$sanitizeUri(value,key==="src");else if(nodeName==="img"&&key==="srcset"){var result="";var trimmedSrcset=trim(value);var srcPattern=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/;var pattern=/\s/.test(trimmedSrcset)?srcPattern:/(,)/;var rawUris=trimmedSrcset.split(pattern);
var nbrUrisWith2parts=Math.floor(rawUris.length/2);for(var i=0;i<nbrUrisWith2parts;i++){var innerIdx=i*2;result+=$$sanitizeUri(trim(rawUris[innerIdx]),true);result+=" "+trim(rawUris[innerIdx+1])}var lastTuple=trim(rawUris[i*2]).split(/\s/);result+=$$sanitizeUri(trim(lastTuple[0]),true);if(lastTuple.length===2)result+=" "+trim(lastTuple[1]);this[key]=value=result}if(writeAttr!==false)if(value===null||value===undefined)this.$$element.removeAttr(attrName);else this.$$element.attr(attrName,value);var $$observers=
this.$$observers;$$observers&&forEach($$observers[observer],function(fn){try{fn(value)}catch(e){$exceptionHandler(e)}})},$observe:function(key,fn){var attrs=this,$$observers=attrs.$$observers||(attrs.$$observers=createMap()),listeners=$$observers[key]||($$observers[key]=[]);listeners.push(fn);$rootScope.$evalAsync(function(){if(!listeners.$$inter&&attrs.hasOwnProperty(key)&&!isUndefined(attrs[key]))fn(attrs[key])});return function(){arrayRemove(listeners,fn)}}};function safeAddClass($element,className){try{$element.addClass(className)}catch(e){}}
var startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),denormalizeTemplate=startSymbol=="{{"||endSymbol=="}}"?identity:function denormalizeTemplate(template){return template.replace(/\{\{/g,startSymbol).replace(/}}/g,endSymbol)},NG_ATTR_BINDING=/^ngAttr[A-Z]/;compile.$$addBindingInfo=debugInfoEnabled?function $$addBindingInfo($element,binding){var bindings=$element.data("$binding")||[];if(isArray(binding))bindings=bindings.concat(binding);else bindings.push(binding);$element.data("$binding",
bindings)}:noop;compile.$$addBindingClass=debugInfoEnabled?function $$addBindingClass($element){safeAddClass($element,"ng-binding")}:noop;compile.$$addScopeInfo=debugInfoEnabled?function $$addScopeInfo($element,scope,isolated,noTemplate){var dataName=isolated?noTemplate?"$isolateScopeNoTemplate":"$isolateScope":"$scope";$element.data(dataName,scope)}:noop;compile.$$addScopeClass=debugInfoEnabled?function $$addScopeClass($element,isolated){safeAddClass($element,isolated?"ng-isolate-scope":"ng-scope")}:
noop;return compile;function compile($compileNodes,transcludeFn,maxPriority,ignoreDirective,previousCompileContext){if(!($compileNodes instanceof jqLite))$compileNodes=jqLite($compileNodes);forEach($compileNodes,function(node,index){if(node.nodeType==NODE_TYPE_TEXT&&node.nodeValue.match(/\S+/))$compileNodes[index]=jqLite(node).wrap("\x3cspan\x3e\x3c/span\x3e").parent()[0]});var compositeLinkFn=compileNodes($compileNodes,transcludeFn,$compileNodes,maxPriority,ignoreDirective,previousCompileContext);
compile.$$addScopeClass($compileNodes);var namespace=null;return function publicLinkFn(scope,cloneConnectFn,options){assertArg(scope,"scope");options=options||{};var parentBoundTranscludeFn=options.parentBoundTranscludeFn,transcludeControllers=options.transcludeControllers,futureParentElement=options.futureParentElement;if(parentBoundTranscludeFn&&parentBoundTranscludeFn.$$boundTransclude)parentBoundTranscludeFn=parentBoundTranscludeFn.$$boundTransclude;if(!namespace)namespace=detectNamespaceForChildElements(futureParentElement);
var $linkNode;if(namespace!=="html")$linkNode=jqLite(wrapTemplate(namespace,jqLite("\x3cdiv\x3e").append($compileNodes).html()));else if(cloneConnectFn)$linkNode=JQLitePrototype.clone.call($compileNodes);else $linkNode=$compileNodes;if(transcludeControllers)for(var controllerName in transcludeControllers)$linkNode.data("$"+controllerName+"Controller",transcludeControllers[controllerName].instance);compile.$$addScopeInfo($linkNode,scope);if(cloneConnectFn)cloneConnectFn($linkNode,scope);if(compositeLinkFn)compositeLinkFn(scope,
$linkNode,$linkNode,parentBoundTranscludeFn);return $linkNode}}function detectNamespaceForChildElements(parentElement){var node=parentElement&&parentElement[0];if(!node)return"html";else return nodeName_(node)!=="foreignobject"&&node.toString().match(/SVG/)?"svg":"html"}function compileNodes(nodeList,transcludeFn,$rootElement,maxPriority,ignoreDirective,previousCompileContext){var linkFns=[],attrs,directives,nodeLinkFn,childNodes,childLinkFn,linkFnFound,nodeLinkFnFound;for(var i=0;i<nodeList.length;i++){attrs=
new Attributes;directives=collectDirectives(nodeList[i],[],attrs,i===0?maxPriority:undefined,ignoreDirective);nodeLinkFn=directives.length?applyDirectivesToNode(directives,nodeList[i],attrs,transcludeFn,$rootElement,null,[],[],previousCompileContext):null;if(nodeLinkFn&&nodeLinkFn.scope)compile.$$addScopeClass(attrs.$$element);childLinkFn=nodeLinkFn&&nodeLinkFn.terminal||!(childNodes=nodeList[i].childNodes)||!childNodes.length?null:compileNodes(childNodes,nodeLinkFn?(nodeLinkFn.transcludeOnThisElement||
!nodeLinkFn.templateOnThisElement)&&nodeLinkFn.transclude:transcludeFn);if(nodeLinkFn||childLinkFn){linkFns.push(i,nodeLinkFn,childLinkFn);linkFnFound=true;nodeLinkFnFound=nodeLinkFnFound||nodeLinkFn}previousCompileContext=null}return linkFnFound?compositeLinkFn:null;function compositeLinkFn(scope,nodeList,$rootElement,parentBoundTranscludeFn){var nodeLinkFn,childLinkFn,node,childScope,i,ii,idx,childBoundTranscludeFn;var stableNodeList;if(nodeLinkFnFound){var nodeListLength=nodeList.length;stableNodeList=
new Array(nodeListLength);for(i=0;i<linkFns.length;i+=3){idx=linkFns[i];stableNodeList[idx]=nodeList[idx]}}else stableNodeList=nodeList;for(i=0,ii=linkFns.length;i<ii;){node=stableNodeList[linkFns[i++]];nodeLinkFn=linkFns[i++];childLinkFn=linkFns[i++];if(nodeLinkFn){if(nodeLinkFn.scope){childScope=scope.$new();compile.$$addScopeInfo(jqLite(node),childScope);var destroyBindings=nodeLinkFn.$$destroyBindings;if(destroyBindings){nodeLinkFn.$$destroyBindings=null;childScope.$on("$destroyed",destroyBindings)}}else childScope=
scope;if(nodeLinkFn.transcludeOnThisElement)childBoundTranscludeFn=createBoundTranscludeFn(scope,nodeLinkFn.transclude,parentBoundTranscludeFn);else if(!nodeLinkFn.templateOnThisElement&&parentBoundTranscludeFn)childBoundTranscludeFn=parentBoundTranscludeFn;else if(!parentBoundTranscludeFn&&transcludeFn)childBoundTranscludeFn=createBoundTranscludeFn(scope,transcludeFn);else childBoundTranscludeFn=null;nodeLinkFn(childLinkFn,childScope,node,$rootElement,childBoundTranscludeFn,nodeLinkFn)}else if(childLinkFn)childLinkFn(scope,
node.childNodes,undefined,parentBoundTranscludeFn)}}}function createBoundTranscludeFn(scope,transcludeFn,previousBoundTranscludeFn){var boundTranscludeFn=function(transcludedScope,cloneFn,controllers,futureParentElement,containingScope){if(!transcludedScope){transcludedScope=scope.$new(false,containingScope);transcludedScope.$$transcluded=true}return transcludeFn(transcludedScope,cloneFn,{parentBoundTranscludeFn:previousBoundTranscludeFn,transcludeControllers:controllers,futureParentElement:futureParentElement})};
return boundTranscludeFn}function collectDirectives(node,directives,attrs,maxPriority,ignoreDirective){var nodeType=node.nodeType,attrsMap=attrs.$attr,match,className;switch(nodeType){case NODE_TYPE_ELEMENT:addDirective(directives,directiveNormalize(nodeName_(node)),"E",maxPriority,ignoreDirective);for(var attr,name,nName,ngAttrName,value,isNgAttr,nAttrs=node.attributes,j=0,jj=nAttrs&&nAttrs.length;j<jj;j++){var attrStartName=false;var attrEndName=false;attr=nAttrs[j];name=attr.name;value=trim(attr.value);
ngAttrName=directiveNormalize(name);if(isNgAttr=NG_ATTR_BINDING.test(ngAttrName))name=name.replace(PREFIX_REGEXP,"").substr(8).replace(/_(.)/g,function(match,letter){return letter.toUpperCase()});var directiveNName=ngAttrName.replace(/(Start|End)$/,"");if(directiveIsMultiElement(directiveNName))if(ngAttrName===directiveNName+"Start"){attrStartName=name;attrEndName=name.substr(0,name.length-5)+"end";name=name.substr(0,name.length-6)}nName=directiveNormalize(name.toLowerCase());attrsMap[nName]=name;
if(isNgAttr||!attrs.hasOwnProperty(nName)){attrs[nName]=value;if(getBooleanAttrName(node,nName))attrs[nName]=true}addAttrInterpolateDirective(node,directives,value,nName,isNgAttr);addDirective(directives,nName,"A",maxPriority,ignoreDirective,attrStartName,attrEndName)}className=node.className;if(isObject(className))className=className.animVal;if(isString(className)&&className!=="")while(match=CLASS_DIRECTIVE_REGEXP.exec(className)){nName=directiveNormalize(match[2]);if(addDirective(directives,nName,
"C",maxPriority,ignoreDirective))attrs[nName]=trim(match[3]);className=className.substr(match.index+match[0].length)}break;case NODE_TYPE_TEXT:if(msie===11)while(node.parentNode&&node.nextSibling&&node.nextSibling.nodeType===NODE_TYPE_TEXT){node.nodeValue=node.nodeValue+node.nextSibling.nodeValue;node.parentNode.removeChild(node.nextSibling)}addTextInterpolateDirective(directives,node.nodeValue);break;case NODE_TYPE_COMMENT:try{match=COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);if(match){nName=directiveNormalize(match[1]);
if(addDirective(directives,nName,"M",maxPriority,ignoreDirective))attrs[nName]=trim(match[2])}}catch(e){}break}directives.sort(byPriority);return directives}function groupScan(node,attrStart,attrEnd){var nodes=[];var depth=0;if(attrStart&&node.hasAttribute&&node.hasAttribute(attrStart)){do{if(!node)throw $compileMinErr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",attrStart,attrEnd);if(node.nodeType==NODE_TYPE_ELEMENT){if(node.hasAttribute(attrStart))depth++;if(node.hasAttribute(attrEnd))depth--}nodes.push(node);
node=node.nextSibling}while(depth>0)}else nodes.push(node);return jqLite(nodes)}function groupElementsLinkFnWrapper(linkFn,attrStart,attrEnd){return function(scope,element,attrs,controllers,transcludeFn){element=groupScan(element[0],attrStart,attrEnd);return linkFn(scope,element,attrs,controllers,transcludeFn)}}function applyDirectivesToNode(directives,compileNode,templateAttrs,transcludeFn,jqCollection,originalReplaceDirective,preLinkFns,postLinkFns,previousCompileContext){previousCompileContext=
previousCompileContext||{};var terminalPriority=-Number.MAX_VALUE,newScopeDirective=previousCompileContext.newScopeDirective,controllerDirectives=previousCompileContext.controllerDirectives,newIsolateScopeDirective=previousCompileContext.newIsolateScopeDirective,templateDirective=previousCompileContext.templateDirective,nonTlbTranscludeDirective=previousCompileContext.nonTlbTranscludeDirective,hasTranscludeDirective=false,hasTemplate=false,hasElementTranscludeDirective=previousCompileContext.hasElementTranscludeDirective,
$compileNode=templateAttrs.$$element=jqLite(compileNode),directive,directiveName,$template,replaceDirective=originalReplaceDirective,childTranscludeFn=transcludeFn,linkFn,directiveValue;for(var i=0,ii=directives.length;i<ii;i++){directive=directives[i];var attrStart=directive.$$start;var attrEnd=directive.$$end;if(attrStart)$compileNode=groupScan(compileNode,attrStart,attrEnd);$template=undefined;if(terminalPriority>directive.priority)break;if(directiveValue=directive.scope){if(!directive.templateUrl)if(isObject(directiveValue)){assertNoDuplicate("new/isolated scope",
newIsolateScopeDirective||newScopeDirective,directive,$compileNode);newIsolateScopeDirective=directive}else assertNoDuplicate("new/isolated scope",newIsolateScopeDirective,directive,$compileNode);newScopeDirective=newScopeDirective||directive}directiveName=directive.name;if(!directive.templateUrl&&directive.controller){directiveValue=directive.controller;controllerDirectives=controllerDirectives||createMap();assertNoDuplicate("'"+directiveName+"' controller",controllerDirectives[directiveName],directive,
$compileNode);controllerDirectives[directiveName]=directive}if(directiveValue=directive.transclude){hasTranscludeDirective=true;if(!directive.$$tlb){assertNoDuplicate("transclusion",nonTlbTranscludeDirective,directive,$compileNode);nonTlbTranscludeDirective=directive}if(directiveValue=="element"){hasElementTranscludeDirective=true;terminalPriority=directive.priority;$template=$compileNode;$compileNode=templateAttrs.$$element=jqLite(document.createComment(" "+directiveName+": "+templateAttrs[directiveName]+
" "));compileNode=$compileNode[0];replaceWith(jqCollection,sliceArgs($template),compileNode);childTranscludeFn=compile($template,transcludeFn,terminalPriority,replaceDirective&&replaceDirective.name,{nonTlbTranscludeDirective:nonTlbTranscludeDirective})}else{$template=jqLite(jqLiteClone(compileNode)).contents();$compileNode.empty();childTranscludeFn=compile($template,transcludeFn)}}if(directive.template){hasTemplate=true;assertNoDuplicate("template",templateDirective,directive,$compileNode);templateDirective=
directive;directiveValue=isFunction(directive.template)?directive.template($compileNode,templateAttrs):directive.template;directiveValue=denormalizeTemplate(directiveValue);if(directive.replace){replaceDirective=directive;if(jqLiteIsTextNode(directiveValue))$template=[];else $template=removeComments(wrapTemplate(directive.templateNamespace,trim(directiveValue)));compileNode=$template[0];if($template.length!=1||compileNode.nodeType!==NODE_TYPE_ELEMENT)throw $compileMinErr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",
directiveName,"");replaceWith(jqCollection,$compileNode,compileNode);var newTemplateAttrs={$attr:{}};var templateDirectives=collectDirectives(compileNode,[],newTemplateAttrs);var unprocessedDirectives=directives.splice(i+1,directives.length-(i+1));if(newIsolateScopeDirective)markDirectivesAsIsolate(templateDirectives);directives=directives.concat(templateDirectives).concat(unprocessedDirectives);mergeTemplateAttributes(templateAttrs,newTemplateAttrs);ii=directives.length}else $compileNode.html(directiveValue)}if(directive.templateUrl){hasTemplate=
true;assertNoDuplicate("template",templateDirective,directive,$compileNode);templateDirective=directive;if(directive.replace)replaceDirective=directive;nodeLinkFn=compileTemplateUrl(directives.splice(i,directives.length-i),$compileNode,templateAttrs,jqCollection,hasTranscludeDirective&&childTranscludeFn,preLinkFns,postLinkFns,{controllerDirectives:controllerDirectives,newScopeDirective:newScopeDirective!==directive&&newScopeDirective,newIsolateScopeDirective:newIsolateScopeDirective,templateDirective:templateDirective,
nonTlbTranscludeDirective:nonTlbTranscludeDirective});ii=directives.length}else if(directive.compile)try{linkFn=directive.compile($compileNode,templateAttrs,childTranscludeFn);if(isFunction(linkFn))addLinkFns(null,linkFn,attrStart,attrEnd);else if(linkFn)addLinkFns(linkFn.pre,linkFn.post,attrStart,attrEnd)}catch(e){$exceptionHandler(e,startingTag($compileNode))}if(directive.terminal){nodeLinkFn.terminal=true;terminalPriority=Math.max(terminalPriority,directive.priority)}}nodeLinkFn.scope=newScopeDirective&&
newScopeDirective.scope===true;nodeLinkFn.transcludeOnThisElement=hasTranscludeDirective;nodeLinkFn.templateOnThisElement=hasTemplate;nodeLinkFn.transclude=childTranscludeFn;previousCompileContext.hasElementTranscludeDirective=hasElementTranscludeDirective;return nodeLinkFn;function addLinkFns(pre,post,attrStart,attrEnd){if(pre){if(attrStart)pre=groupElementsLinkFnWrapper(pre,attrStart,attrEnd);pre.require=directive.require;pre.directiveName=directiveName;if(newIsolateScopeDirective===directive||
directive.$$isolateScope)pre=cloneAndAnnotateFn(pre,{isolateScope:true});preLinkFns.push(pre)}if(post){if(attrStart)post=groupElementsLinkFnWrapper(post,attrStart,attrEnd);post.require=directive.require;post.directiveName=directiveName;if(newIsolateScopeDirective===directive||directive.$$isolateScope)post=cloneAndAnnotateFn(post,{isolateScope:true});postLinkFns.push(post)}}function getControllers(directiveName,require,$element,elementControllers){var value;if(isString(require)){var match=require.match(REQUIRE_PREFIX_REGEXP);
var name=require.substring(match[0].length);var inheritType=match[1]||match[3];var optional=match[2]==="?";if(inheritType==="^^")$element=$element.parent();else{value=elementControllers&&elementControllers[name];value=value&&value.instance}if(!value){var dataName="$"+name+"Controller";value=inheritType?$element.inheritedData(dataName):$element.data(dataName)}if(!value&&!optional)throw $compileMinErr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",name,directiveName);}else if(isArray(require)){value=
[];for(var i=0,ii=require.length;i<ii;i++)value[i]=getControllers(directiveName,require[i],$element,elementControllers)}return value||null}function setupControllers($element,attrs,transcludeFn,controllerDirectives,isolateScope,scope){var elementControllers=createMap();for(var controllerKey in controllerDirectives){var directive=controllerDirectives[controllerKey];var locals={$scope:directive===newIsolateScopeDirective||directive.$$isolateScope?isolateScope:scope,$element:$element,$attrs:attrs,$transclude:transcludeFn};
var controller=directive.controller;if(controller=="@")controller=attrs[directive.name];var controllerInstance=$controller(controller,locals,true,directive.controllerAs);elementControllers[directive.name]=controllerInstance;if(!hasElementTranscludeDirective)$element.data("$"+directive.name+"Controller",controllerInstance.instance)}return elementControllers}function nodeLinkFn(childLinkFn,scope,linkNode,$rootElement,boundTranscludeFn,thisLinkFn){var i,ii,linkFn,controller,isolateScope,elementControllers,
transcludeFn,$element,attrs;if(compileNode===linkNode){attrs=templateAttrs;$element=templateAttrs.$$element}else{$element=jqLite(linkNode);attrs=new Attributes($element,templateAttrs)}if(newIsolateScopeDirective)isolateScope=scope.$new(true);if(boundTranscludeFn){transcludeFn=controllersBoundTransclude;transcludeFn.$$boundTransclude=boundTranscludeFn}if(controllerDirectives)elementControllers=setupControllers($element,attrs,transcludeFn,controllerDirectives,isolateScope,scope);if(newIsolateScopeDirective){compile.$$addScopeInfo($element,
isolateScope,true,!(templateDirective&&(templateDirective===newIsolateScopeDirective||templateDirective===newIsolateScopeDirective.$$originalDirective)));compile.$$addScopeClass($element,true);isolateScope.$$isolateBindings=newIsolateScopeDirective.$$isolateBindings;initializeDirectiveBindings(scope,attrs,isolateScope,isolateScope.$$isolateBindings,newIsolateScopeDirective,isolateScope)}if(elementControllers){var scopeDirective=newIsolateScopeDirective||newScopeDirective;var bindings;var controllerForBindings;
if(scopeDirective&&elementControllers[scopeDirective.name]){bindings=scopeDirective.$$bindings.bindToController;controller=elementControllers[scopeDirective.name];if(controller&&controller.identifier&&bindings){controllerForBindings=controller;thisLinkFn.$$destroyBindings=initializeDirectiveBindings(scope,attrs,controller.instance,bindings,scopeDirective)}}for(i in elementControllers){controller=elementControllers[i];var controllerResult=controller();if(controllerResult!==controller.instance){controller.instance=
controllerResult;$element.data("$"+i+"Controller",controllerResult);if(controller===controllerForBindings){thisLinkFn.$$destroyBindings();thisLinkFn.$$destroyBindings=initializeDirectiveBindings(scope,attrs,controllerResult,bindings,scopeDirective)}}}}for(i=0,ii=preLinkFns.length;i<ii;i++){linkFn=preLinkFns[i];invokeLinkFn(linkFn,linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.directiveName,linkFn.require,$element,elementControllers),transcludeFn)}var scopeToChild=
scope;if(newIsolateScopeDirective&&(newIsolateScopeDirective.template||newIsolateScopeDirective.templateUrl===null))scopeToChild=isolateScope;childLinkFn&&childLinkFn(scopeToChild,linkNode.childNodes,undefined,boundTranscludeFn);for(i=postLinkFns.length-1;i>=0;i--){linkFn=postLinkFns[i];invokeLinkFn(linkFn,linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.directiveName,linkFn.require,$element,elementControllers),transcludeFn)}function controllersBoundTransclude(scope,
cloneAttachFn,futureParentElement){var transcludeControllers;if(!isScope(scope)){futureParentElement=cloneAttachFn;cloneAttachFn=scope;scope=undefined}if(hasElementTranscludeDirective)transcludeControllers=elementControllers;if(!futureParentElement)futureParentElement=hasElementTranscludeDirective?$element.parent():$element;return boundTranscludeFn(scope,cloneAttachFn,transcludeControllers,futureParentElement,scopeToChild)}}}function markDirectivesAsIsolate(directives){for(var j=0,jj=directives.length;j<
jj;j++)directives[j]=inherit(directives[j],{$$isolateScope:true})}function addDirective(tDirectives,name,location,maxPriority,ignoreDirective,startAttrName,endAttrName){if(name===ignoreDirective)return null;var match=null;if(hasDirectives.hasOwnProperty(name))for(var directive,directives=$injector.get(name+Suffix),i=0,ii=directives.length;i<ii;i++)try{directive=directives[i];if((maxPriority===undefined||maxPriority>directive.priority)&&directive.restrict.indexOf(location)!=-1){if(startAttrName)directive=
inherit(directive,{$$start:startAttrName,$$end:endAttrName});tDirectives.push(directive);match=directive}}catch(e){$exceptionHandler(e)}return match}function directiveIsMultiElement(name){if(hasDirectives.hasOwnProperty(name))for(var directive,directives=$injector.get(name+Suffix),i=0,ii=directives.length;i<ii;i++){directive=directives[i];if(directive.multiElement)return true}return false}function mergeTemplateAttributes(dst,src){var srcAttr=src.$attr,dstAttr=dst.$attr,$element=dst.$$element;forEach(dst,
function(value,key){if(key.charAt(0)!="$"){if(src[key]&&src[key]!==value)value+=(key==="style"?";":" ")+src[key];dst.$set(key,value,true,srcAttr[key])}});forEach(src,function(value,key){if(key=="class"){safeAddClass($element,value);dst["class"]=(dst["class"]?dst["class"]+" ":"")+value}else if(key=="style"){$element.attr("style",$element.attr("style")+";"+value);dst["style"]=(dst["style"]?dst["style"]+";":"")+value}else if(key.charAt(0)!="$"&&!dst.hasOwnProperty(key)){dst[key]=value;dstAttr[key]=srcAttr[key]}})}
function compileTemplateUrl(directives,$compileNode,tAttrs,$rootElement,childTranscludeFn,preLinkFns,postLinkFns,previousCompileContext){var linkQueue=[],afterTemplateNodeLinkFn,afterTemplateChildLinkFn,beforeTemplateCompileNode=$compileNode[0],origAsyncDirective=directives.shift(),derivedSyncDirective=inherit(origAsyncDirective,{templateUrl:null,transclude:null,replace:null,$$originalDirective:origAsyncDirective}),templateUrl=isFunction(origAsyncDirective.templateUrl)?origAsyncDirective.templateUrl($compileNode,
tAttrs):origAsyncDirective.templateUrl,templateNamespace=origAsyncDirective.templateNamespace;$compileNode.empty();$templateRequest(templateUrl).then(function(content){var compileNode,tempTemplateAttrs,$template,childBoundTranscludeFn;content=denormalizeTemplate(content);if(origAsyncDirective.replace){if(jqLiteIsTextNode(content))$template=[];else $template=removeComments(wrapTemplate(templateNamespace,trim(content)));compileNode=$template[0];if($template.length!=1||compileNode.nodeType!==NODE_TYPE_ELEMENT)throw $compileMinErr("tplrt",
"Template for directive '{0}' must have exactly one root element. {1}",origAsyncDirective.name,templateUrl);tempTemplateAttrs={$attr:{}};replaceWith($rootElement,$compileNode,compileNode);var templateDirectives=collectDirectives(compileNode,[],tempTemplateAttrs);if(isObject(origAsyncDirective.scope))markDirectivesAsIsolate(templateDirectives);directives=templateDirectives.concat(directives);mergeTemplateAttributes(tAttrs,tempTemplateAttrs)}else{compileNode=beforeTemplateCompileNode;$compileNode.html(content)}directives.unshift(derivedSyncDirective);
afterTemplateNodeLinkFn=applyDirectivesToNode(directives,compileNode,tAttrs,childTranscludeFn,$compileNode,origAsyncDirective,preLinkFns,postLinkFns,previousCompileContext);forEach($rootElement,function(node,i){if(node==compileNode)$rootElement[i]=$compileNode[0]});afterTemplateChildLinkFn=compileNodes($compileNode[0].childNodes,childTranscludeFn);while(linkQueue.length){var scope=linkQueue.shift(),beforeTemplateLinkNode=linkQueue.shift(),linkRootElement=linkQueue.shift(),boundTranscludeFn=linkQueue.shift(),
linkNode=$compileNode[0];if(scope.$$destroyed)continue;if(beforeTemplateLinkNode!==beforeTemplateCompileNode){var oldClasses=beforeTemplateLinkNode.className;if(!(previousCompileContext.hasElementTranscludeDirective&&origAsyncDirective.replace))linkNode=jqLiteClone(compileNode);replaceWith(linkRootElement,jqLite(beforeTemplateLinkNode),linkNode);safeAddClass(jqLite(linkNode),oldClasses)}if(afterTemplateNodeLinkFn.transcludeOnThisElement)childBoundTranscludeFn=createBoundTranscludeFn(scope,afterTemplateNodeLinkFn.transclude,
boundTranscludeFn);else childBoundTranscludeFn=boundTranscludeFn;afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,linkNode,$rootElement,childBoundTranscludeFn,afterTemplateNodeLinkFn)}linkQueue=null});return function delayedNodeLinkFn(ignoreChildLinkFn,scope,node,rootElement,boundTranscludeFn){var childBoundTranscludeFn=boundTranscludeFn;if(scope.$$destroyed)return;if(linkQueue)linkQueue.push(scope,node,rootElement,childBoundTranscludeFn);else{if(afterTemplateNodeLinkFn.transcludeOnThisElement)childBoundTranscludeFn=
createBoundTranscludeFn(scope,afterTemplateNodeLinkFn.transclude,boundTranscludeFn);afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,node,rootElement,childBoundTranscludeFn,afterTemplateNodeLinkFn)}}}function byPriority(a,b){var diff=b.priority-a.priority;if(diff!==0)return diff;if(a.name!==b.name)return a.name<b.name?-1:1;return a.index-b.index}function assertNoDuplicate(what,previousDirective,directive,element){function wrapModuleNameIfDefined(moduleName){return moduleName?" (module: "+moduleName+
")":""}if(previousDirective)throw $compileMinErr("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",previousDirective.name,wrapModuleNameIfDefined(previousDirective.$$moduleName),directive.name,wrapModuleNameIfDefined(directive.$$moduleName),what,startingTag(element));}function addTextInterpolateDirective(directives,text){var interpolateFn=$interpolate(text,true);if(interpolateFn)directives.push({priority:0,compile:function textInterpolateCompileFn(templateNode){var templateNodeParent=
templateNode.parent(),hasCompileParent=!!templateNodeParent.length;if(hasCompileParent)compile.$$addBindingClass(templateNodeParent);return function textInterpolateLinkFn(scope,node){var parent=node.parent();if(!hasCompileParent)compile.$$addBindingClass(parent);compile.$$addBindingInfo(parent,interpolateFn.expressions);scope.$watch(interpolateFn,function interpolateFnWatchAction(value){node[0].nodeValue=value})}}})}function wrapTemplate(type,template){type=lowercase(type||"html");switch(type){case "svg":case "math":var wrapper=
document.createElement("div");wrapper.innerHTML="\x3c"+type+"\x3e"+template+"\x3c/"+type+"\x3e";return wrapper.childNodes[0].childNodes;default:return template}}function getTrustedContext(node,attrNormalizedName){if(attrNormalizedName=="srcdoc")return $sce.HTML;var tag=nodeName_(node);if(attrNormalizedName=="xlinkHref"||tag=="form"&&attrNormalizedName=="action"||tag!="img"&&(attrNormalizedName=="src"||attrNormalizedName=="ngSrc"))return $sce.RESOURCE_URL}function addAttrInterpolateDirective(node,
directives,value,name,allOrNothing){var trustedContext=getTrustedContext(node,name);allOrNothing=ALL_OR_NOTHING_ATTRS[name]||allOrNothing;var interpolateFn=$interpolate(value,true,trustedContext,allOrNothing);if(!interpolateFn)return;if(name==="multiple"&&nodeName_(node)==="select")throw $compileMinErr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",startingTag(node));directives.push({priority:100,compile:function(){return{pre:function attrInterpolatePreLinkFn(scope,
element,attr){var $$observers=attr.$$observers||(attr.$$observers={});if(EVENT_HANDLER_ATTR_REGEXP.test(name))throw $compileMinErr("nodomevents","Interpolations for HTML DOM event attributes are disallowed.  Please use the "+"ng- versions (such as ng-click instead of onclick) instead.");var newValue=attr[name];if(newValue!==value){interpolateFn=newValue&&$interpolate(newValue,true,trustedContext,allOrNothing);value=newValue}if(!interpolateFn)return;attr[name]=interpolateFn(scope);($$observers[name]||
($$observers[name]=[])).$$inter=true;(attr.$$observers&&attr.$$observers[name].$$scope||scope).$watch(interpolateFn,function interpolateFnWatchAction(newValue,oldValue){if(name==="class"&&newValue!=oldValue)attr.$updateClass(newValue,oldValue);else attr.$set(name,newValue)})}}}})}function replaceWith($rootElement,elementsToRemove,newNode){var firstElementToRemove=elementsToRemove[0],removeCount=elementsToRemove.length,parent=firstElementToRemove.parentNode,i,ii;if($rootElement)for(i=0,ii=$rootElement.length;i<
ii;i++)if($rootElement[i]==firstElementToRemove){$rootElement[i++]=newNode;for(var j=i,j2=j+removeCount-1,jj=$rootElement.length;j<jj;j++,j2++)if(j2<jj)$rootElement[j]=$rootElement[j2];else delete $rootElement[j];$rootElement.length-=removeCount-1;if($rootElement.context===firstElementToRemove)$rootElement.context=newNode;break}if(parent)parent.replaceChild(newNode,firstElementToRemove);var fragment=document.createDocumentFragment();fragment.appendChild(firstElementToRemove);if(jqLite.hasData(firstElementToRemove)){jqLite(newNode).data(jqLite(firstElementToRemove).data());
if(!jQuery)delete jqLite.cache[firstElementToRemove[jqLite.expando]];else{skipDestroyOnNextJQueryCleanData=true;jQuery.cleanData([firstElementToRemove])}}for(var k=1,kk=elementsToRemove.length;k<kk;k++){var element=elementsToRemove[k];jqLite(element).remove();fragment.appendChild(element);delete elementsToRemove[k]}elementsToRemove[0]=newNode;elementsToRemove.length=1}function cloneAndAnnotateFn(fn,annotation){return extend(function(){return fn.apply(null,arguments)},fn,annotation)}function invokeLinkFn(linkFn,
scope,$element,attrs,controllers,transcludeFn){try{linkFn(scope,$element,attrs,controllers,transcludeFn)}catch(e){$exceptionHandler(e,startingTag($element))}}function initializeDirectiveBindings(scope,attrs,destination,bindings,directive,newScope){var onNewScopeDestroyed;forEach(bindings,function(definition,scopeName){var attrName=definition.attrName,optional=definition.optional,mode=definition.mode,lastValue,parentGet,parentSet,compare;switch(mode){case "@":if(!optional&&!hasOwnProperty.call(attrs,
attrName))destination[scopeName]=attrs[attrName]=void 0;attrs.$observe(attrName,function(value){if(isString(value))destination[scopeName]=value});attrs.$$observers[attrName].$$scope=scope;if(isString(attrs[attrName]))destination[scopeName]=$interpolate(attrs[attrName])(scope);break;case "\x3d":if(!hasOwnProperty.call(attrs,attrName)){if(optional)break;attrs[attrName]=void 0}if(optional&&!attrs[attrName])break;parentGet=$parse(attrs[attrName]);if(parentGet.literal)compare=equals;else compare=function(a,
b){return a===b||a!==a&&b!==b};parentSet=parentGet.assign||function(){lastValue=destination[scopeName]=parentGet(scope);throw $compileMinErr("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",attrs[attrName],directive.name);};lastValue=destination[scopeName]=parentGet(scope);var parentValueWatch=function parentValueWatch(parentValue){if(!compare(parentValue,destination[scopeName]))if(!compare(parentValue,lastValue))destination[scopeName]=parentValue;else parentSet(scope,parentValue=
destination[scopeName]);return lastValue=parentValue};parentValueWatch.$stateful=true;var unwatch;if(definition.collection)unwatch=scope.$watchCollection(attrs[attrName],parentValueWatch);else unwatch=scope.$watch($parse(attrs[attrName],parentValueWatch),null,parentGet.literal);onNewScopeDestroyed=onNewScopeDestroyed||[];onNewScopeDestroyed.push(unwatch);break;case "\x26":parentGet=attrs.hasOwnProperty(attrName)?$parse(attrs[attrName]):noop;if(parentGet===noop&&optional)break;destination[scopeName]=
function(locals){return parentGet(scope,locals)};break}});var destroyBindings=onNewScopeDestroyed?function destroyBindings(){for(var i=0,ii=onNewScopeDestroyed.length;i<ii;++i)onNewScopeDestroyed[i]()}:noop;if(newScope&&destroyBindings!==noop){newScope.$on("$destroy",destroyBindings);return noop}return destroyBindings}}]}var PREFIX_REGEXP=/^((?:x|data)[:\-_])/i;function directiveNormalize(name){return camelCase(name.replace(PREFIX_REGEXP,""))}function nodesetLinkingFn(scope,nodeList,rootElement,boundTranscludeFn){}
function directiveLinkingFn(nodesetLinkingFn,scope,node,rootElement,boundTranscludeFn){}function tokenDifference(str1,str2){var values="",tokens1=str1.split(/\s+/),tokens2=str2.split(/\s+/);outer:for(var i=0;i<tokens1.length;i++){var token=tokens1[i];for(var j=0;j<tokens2.length;j++)if(token==tokens2[j])continue outer;values+=(values.length>0?" ":"")+token}return values}function removeComments(jqNodes){jqNodes=jqLite(jqNodes);var i=jqNodes.length;if(i<=1)return jqNodes;while(i--){var node=jqNodes[i];
if(node.nodeType===NODE_TYPE_COMMENT)splice.call(jqNodes,i,1)}return jqNodes}var $controllerMinErr=minErr("$controller");var CNTRL_REG=/^(\S+)(\s+as\s+(\w+))?$/;function identifierForController(controller,ident){if(ident&&isString(ident))return ident;if(isString(controller)){var match=CNTRL_REG.exec(controller);if(match)return match[3]}}function $ControllerProvider(){var controllers={},globals=false;this.register=function(name,constructor){assertNotHasOwnProperty(name,"controller");if(isObject(name))extend(controllers,
name);else controllers[name]=constructor};this.allowGlobals=function(){globals=true};this.$get=["$injector","$window",function($injector,$window){return function(expression,locals,later,ident){var instance,match,constructor,identifier;later=later===true;if(ident&&isString(ident))identifier=ident;if(isString(expression)){match=expression.match(CNTRL_REG);if(!match)throw $controllerMinErr("ctrlfmt","Badly formed controller string '{0}'. "+"Must match `__name__ as __id__` or `__name__`.",expression);
constructor=match[1],identifier=identifier||match[3];expression=controllers.hasOwnProperty(constructor)?controllers[constructor]:getter(locals.$scope,constructor,true)||(globals?getter($window,constructor,true):undefined);assertArgFn(expression,constructor,true)}if(later){var controllerPrototype=(isArray(expression)?expression[expression.length-1]:expression).prototype;instance=Object.create(controllerPrototype||null);if(identifier)addIdentifier(locals,identifier,instance,constructor||expression.name);
var instantiate;return instantiate=extend(function(){var result=$injector.invoke(expression,instance,locals,constructor);if(result!==instance&&(isObject(result)||isFunction(result))){instance=result;if(identifier)addIdentifier(locals,identifier,instance,constructor||expression.name)}return instance},{instance:instance,identifier:identifier})}instance=$injector.instantiate(expression,locals,constructor);if(identifier)addIdentifier(locals,identifier,instance,constructor||expression.name);return instance};
function addIdentifier(locals,identifier,instance,name){if(!(locals&&isObject(locals.$scope)))throw minErr("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",name,identifier);locals.$scope[identifier]=instance}}]}function $DocumentProvider(){this.$get=["$window",function(window){return jqLite(window.document)}]}function $ExceptionHandlerProvider(){this.$get=["$log",function($log){return function(exception,cause){$log.error.apply($log,arguments)}}]}
var $$ForceReflowProvider=function(){this.$get=["$document",function($document){return function(domNode){if(domNode){if(!domNode.nodeType&&domNode instanceof jqLite)domNode=domNode[0]}else domNode=$document[0].body;return domNode.offsetWidth+1}}]};var APPLICATION_JSON="application/json";var CONTENT_TYPE_APPLICATION_JSON={"Content-Type":APPLICATION_JSON+";charset\x3dutf-8"};var JSON_START=/^\[|^\{(?!\{)/;var JSON_ENDS={"[":/]$/,"{":/}$/};var JSON_PROTECTION_PREFIX=/^\)\]\}',?\n/;var $httpMinErr=minErr("$http");
var $httpMinErrLegacyFn=function(method){return function(){throw $httpMinErr("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",method);}};function serializeValue(v){if(isObject(v))return isDate(v)?v.toISOString():toJson(v);return v}function $HttpParamSerializerProvider(){this.$get=function(){return function ngParamSerializer(params){if(!params)return"";var parts=[];forEachSorted(params,function(value,key){if(value===null||isUndefined(value))return;if(isArray(value))forEach(value,
function(v,k){parts.push(encodeUriQuery(key)+"\x3d"+encodeUriQuery(serializeValue(v)))});else parts.push(encodeUriQuery(key)+"\x3d"+encodeUriQuery(serializeValue(value)))});return parts.join("\x26")}}}function $HttpParamSerializerJQLikeProvider(){this.$get=function(){return function jQueryLikeParamSerializer(params){if(!params)return"";var parts=[];serialize(params,"",true);return parts.join("\x26");function serialize(toSerialize,prefix,topLevel){if(toSerialize===null||isUndefined(toSerialize))return;
if(isArray(toSerialize))forEach(toSerialize,function(value,index){serialize(value,prefix+"["+(isObject(value)?index:"")+"]")});else if(isObject(toSerialize)&&!isDate(toSerialize))forEachSorted(toSerialize,function(value,key){serialize(value,prefix+(topLevel?"":"[")+key+(topLevel?"":"]"))});else parts.push(encodeUriQuery(prefix)+"\x3d"+encodeUriQuery(serializeValue(toSerialize)))}}}}function defaultHttpResponseTransform(data,headers){if(isString(data)){var tempData=data.replace(JSON_PROTECTION_PREFIX,
"").trim();if(tempData){var contentType=headers("Content-Type");if(contentType&&contentType.indexOf(APPLICATION_JSON)===0||isJsonLike(tempData))data=fromJson(tempData)}}return data}function isJsonLike(str){var jsonStart=str.match(JSON_START);return jsonStart&&JSON_ENDS[jsonStart[0]].test(str)}function parseHeaders(headers){var parsed=createMap(),i;function fillInParsed(key,val){if(key)parsed[key]=parsed[key]?parsed[key]+", "+val:val}if(isString(headers))forEach(headers.split("\n"),function(line){i=
line.indexOf(":");fillInParsed(lowercase(trim(line.substr(0,i))),trim(line.substr(i+1)))});else if(isObject(headers))forEach(headers,function(headerVal,headerKey){fillInParsed(lowercase(headerKey),trim(headerVal))});return parsed}function headersGetter(headers){var headersObj;return function(name){if(!headersObj)headersObj=parseHeaders(headers);if(name){var value=headersObj[lowercase(name)];if(value===void 0)value=null;return value}return headersObj}}function transformData(data,headers,status,fns){if(isFunction(fns))return fns(data,
headers,status);forEach(fns,function(fn){data=fn(data,headers,status)});return data}function isSuccess(status){return 200<=status&&status<300}function $HttpProvider(){var defaults=this.defaults={transformResponse:[defaultHttpResponseTransform],transformRequest:[function(d){return isObject(d)&&!isFile(d)&&!isBlob(d)&&!isFormData(d)?toJson(d):d}],headers:{common:{"Accept":"application/json, text/plain, */*"},post:shallowCopy(CONTENT_TYPE_APPLICATION_JSON),put:shallowCopy(CONTENT_TYPE_APPLICATION_JSON),
patch:shallowCopy(CONTENT_TYPE_APPLICATION_JSON)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"};var useApplyAsync=false;this.useApplyAsync=function(value){if(isDefined(value)){useApplyAsync=!!value;return this}return useApplyAsync};var useLegacyPromise=true;this.useLegacyPromiseExtensions=function(value){if(isDefined(value)){useLegacyPromise=!!value;return this}return useLegacyPromise};var interceptorFactories=this.interceptors=[];this.$get=["$httpBackend",
"$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function($httpBackend,$$cookieReader,$cacheFactory,$rootScope,$q,$injector){var defaultCache=$cacheFactory("$http");defaults.paramSerializer=isString(defaults.paramSerializer)?$injector.get(defaults.paramSerializer):defaults.paramSerializer;var reversedInterceptors=[];forEach(interceptorFactories,function(interceptorFactory){reversedInterceptors.unshift(isString(interceptorFactory)?$injector.get(interceptorFactory):$injector.invoke(interceptorFactory))});
function $http(requestConfig){if(!angular.isObject(requestConfig))throw minErr("$http")("badreq","Http request configuration must be an object.  Received: {0}",requestConfig);var config=extend({method:"get",transformRequest:defaults.transformRequest,transformResponse:defaults.transformResponse,paramSerializer:defaults.paramSerializer},requestConfig);config.headers=mergeHeaders(requestConfig);config.method=uppercase(config.method);config.paramSerializer=isString(config.paramSerializer)?$injector.get(config.paramSerializer):
config.paramSerializer;var serverRequest=function(config){var headers=config.headers;var reqData=transformData(config.data,headersGetter(headers),undefined,config.transformRequest);if(isUndefined(reqData))forEach(headers,function(value,header){if(lowercase(header)==="content-type")delete headers[header]});if(isUndefined(config.withCredentials)&&!isUndefined(defaults.withCredentials))config.withCredentials=defaults.withCredentials;return sendReq(config,reqData).then(transformResponse,transformResponse)};
var chain=[serverRequest,undefined];var promise=$q.when(config);forEach(reversedInterceptors,function(interceptor){if(interceptor.request||interceptor.requestError)chain.unshift(interceptor.request,interceptor.requestError);if(interceptor.response||interceptor.responseError)chain.push(interceptor.response,interceptor.responseError)});while(chain.length){var thenFn=chain.shift();var rejectFn=chain.shift();promise=promise.then(thenFn,rejectFn)}if(useLegacyPromise){promise.success=function(fn){assertArgFn(fn,
"fn");promise.then(function(response){fn(response.data,response.status,response.headers,config)});return promise};promise.error=function(fn){assertArgFn(fn,"fn");promise.then(null,function(response){fn(response.data,response.status,response.headers,config)});return promise}}else{promise.success=$httpMinErrLegacyFn("success");promise.error=$httpMinErrLegacyFn("error")}return promise;function transformResponse(response){var resp=extend({},response);if(!response.data)resp.data=response.data;else resp.data=
transformData(response.data,response.headers,response.status,config.transformResponse);return isSuccess(response.status)?resp:$q.reject(resp)}function executeHeaderFns(headers,config){var headerContent,processedHeaders={};forEach(headers,function(headerFn,header){if(isFunction(headerFn)){headerContent=headerFn(config);if(headerContent!=null)processedHeaders[header]=headerContent}else processedHeaders[header]=headerFn});return processedHeaders}function mergeHeaders(config){var defHeaders=defaults.headers,
reqHeaders=extend({},config.headers),defHeaderName,lowercaseDefHeaderName,reqHeaderName;defHeaders=extend({},defHeaders.common,defHeaders[lowercase(config.method)]);defaultHeadersIteration:for(defHeaderName in defHeaders){lowercaseDefHeaderName=lowercase(defHeaderName);for(reqHeaderName in reqHeaders)if(lowercase(reqHeaderName)===lowercaseDefHeaderName)continue defaultHeadersIteration;reqHeaders[defHeaderName]=defHeaders[defHeaderName]}return executeHeaderFns(reqHeaders,shallowCopy(config))}}$http.pendingRequests=
[];createShortMethods("get","delete","head","jsonp");createShortMethodsWithData("post","put","patch");$http.defaults=defaults;return $http;function createShortMethods(names){forEach(arguments,function(name){$http[name]=function(url,config){return $http(extend({},config||{},{method:name,url:url}))}})}function createShortMethodsWithData(name){forEach(arguments,function(name){$http[name]=function(url,data,config){return $http(extend({},config||{},{method:name,url:url,data:data}))}})}function sendReq(config,
reqData){var deferred=$q.defer(),promise=deferred.promise,cache,cachedResp,reqHeaders=config.headers,url=buildUrl(config.url,config.paramSerializer(config.params));$http.pendingRequests.push(config);promise.then(removePendingReq,removePendingReq);if((config.cache||defaults.cache)&&config.cache!==false&&(config.method==="GET"||config.method==="JSONP"))cache=isObject(config.cache)?config.cache:isObject(defaults.cache)?defaults.cache:defaultCache;if(cache){cachedResp=cache.get(url);if(isDefined(cachedResp))if(isPromiseLike(cachedResp))cachedResp.then(resolvePromiseWithResult,
resolvePromiseWithResult);else if(isArray(cachedResp))resolvePromise(cachedResp[1],cachedResp[0],shallowCopy(cachedResp[2]),cachedResp[3]);else resolvePromise(cachedResp,200,{},"OK");else cache.put(url,promise)}if(isUndefined(cachedResp)){var xsrfValue=urlIsSameOrigin(config.url)?$$cookieReader()[config.xsrfCookieName||defaults.xsrfCookieName]:undefined;if(xsrfValue)reqHeaders[config.xsrfHeaderName||defaults.xsrfHeaderName]=xsrfValue;$httpBackend(config.method,url,reqData,done,reqHeaders,config.timeout,
config.withCredentials,config.responseType)}return promise;function done(status,response,headersString,statusText){if(cache)if(isSuccess(status))cache.put(url,[status,response,parseHeaders(headersString),statusText]);else cache.remove(url);function resolveHttpPromise(){resolvePromise(response,status,headersString,statusText)}if(useApplyAsync)$rootScope.$applyAsync(resolveHttpPromise);else{resolveHttpPromise();if(!$rootScope.$$phase)$rootScope.$apply()}}function resolvePromise(response,status,headers,
statusText){status=Math.max(status,0);(isSuccess(status)?deferred.resolve:deferred.reject)({data:response,status:status,headers:headersGetter(headers),config:config,statusText:statusText})}function resolvePromiseWithResult(result){resolvePromise(result.data,result.status,shallowCopy(result.headers()),result.statusText)}function removePendingReq(){var idx=$http.pendingRequests.indexOf(config);if(idx!==-1)$http.pendingRequests.splice(idx,1)}}function buildUrl(url,serializedParams){if(serializedParams.length>
0)url+=(url.indexOf("?")==-1?"?":"\x26")+serializedParams;return url}}]}function createXhr(){return new window.XMLHttpRequest}function $HttpBackendProvider(){this.$get=["$browser","$window","$document",function($browser,$window,$document){return createHttpBackend($browser,createXhr,$browser.defer,$window.angular.callbacks,$document[0])}]}function createHttpBackend($browser,createXhr,$browserDefer,callbacks,rawDocument){return function(method,url,post,callback,headers,timeout,withCredentials,responseType){$browser.$$incOutstandingRequestCount();
url=url||$browser.url();if(lowercase(method)=="jsonp"){var callbackId="_"+(callbacks.counter++).toString(36);callbacks[callbackId]=function(data){callbacks[callbackId].data=data;callbacks[callbackId].called=true};var jsonpDone=jsonpReq(url.replace("JSON_CALLBACK","angular.callbacks."+callbackId),callbackId,function(status,text){completeRequest(callback,status,callbacks[callbackId].data,"",text);callbacks[callbackId]=noop})}else{var xhr=createXhr();xhr.open(method,url,true);forEach(headers,function(value,
key){if(isDefined(value))xhr.setRequestHeader(key,value)});xhr.onload=function requestLoaded(){var statusText=xhr.statusText||"";var response="response"in xhr?xhr.response:xhr.responseText;var status=xhr.status===1223?204:xhr.status;if(status===0)status=response?200:urlResolve(url).protocol=="file"?404:0;completeRequest(callback,status,response,xhr.getAllResponseHeaders(),statusText)};var requestError=function(){completeRequest(callback,-1,null,null,"")};xhr.onerror=requestError;xhr.onabort=requestError;
if(withCredentials)xhr.withCredentials=true;if(responseType)try{xhr.responseType=responseType}catch(e){if(responseType!=="json")throw e;}xhr.send(post)}if(timeout>0)var timeoutId=$browserDefer(timeoutRequest,timeout);else if(isPromiseLike(timeout))timeout.then(timeoutRequest);function timeoutRequest(){jsonpDone&&jsonpDone();xhr&&xhr.abort()}function completeRequest(callback,status,response,headersString,statusText){if(timeoutId!==undefined)$browserDefer.cancel(timeoutId);jsonpDone=xhr=null;callback(status,
response,headersString,statusText);$browser.$$completeOutstandingRequest(noop)}};function jsonpReq(url,callbackId,done){var script=rawDocument.createElement("script"),callback=null;script.type="text/javascript";script.src=url;script.async=true;callback=function(event){removeEventListenerFn(script,"load",callback);removeEventListenerFn(script,"error",callback);rawDocument.body.removeChild(script);script=null;var status=-1;var text="unknown";if(event){if(event.type==="load"&&!callbacks[callbackId].called)event=
{type:"error"};text=event.type;status=event.type==="error"?404:200}if(done)done(status,text)};addEventListenerFn(script,"load",callback);addEventListenerFn(script,"error",callback);rawDocument.body.appendChild(script);return callback}}var $interpolateMinErr=angular.$interpolateMinErr=minErr("$interpolate");$interpolateMinErr.throwNoconcat=function(text){throw $interpolateMinErr("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",text);};$interpolateMinErr.interr=function(text,err){return $interpolateMinErr("interr","Can't interpolate: {0}\n{1}",text,err.toString())};function $InterpolateProvider(){var startSymbol="{{";var endSymbol="}}";this.startSymbol=function(value){if(value){startSymbol=value;return this}else return startSymbol};this.endSymbol=function(value){if(value){endSymbol=value;return this}else return endSymbol};this.$get=["$parse","$exceptionHandler","$sce",
function($parse,$exceptionHandler,$sce){var startSymbolLength=startSymbol.length,endSymbolLength=endSymbol.length,escapedStartRegexp=new RegExp(startSymbol.replace(/./g,escape),"g"),escapedEndRegexp=new RegExp(endSymbol.replace(/./g,escape),"g");function escape(ch){return"\\\\\\"+ch}function unescapeText(text){return text.replace(escapedStartRegexp,startSymbol).replace(escapedEndRegexp,endSymbol)}function stringify(value){if(value==null)return"";switch(typeof value){case "string":break;case "number":value=
""+value;break;default:value=toJson(value)}return value}function $interpolate(text,mustHaveExpression,trustedContext,allOrNothing){allOrNothing=!!allOrNothing;var startIndex,endIndex,index=0,expressions=[],parseFns=[],textLength=text.length,exp,concat=[],expressionPositions=[];while(index<textLength)if((startIndex=text.indexOf(startSymbol,index))!=-1&&(endIndex=text.indexOf(endSymbol,startIndex+startSymbolLength))!=-1){if(index!==startIndex)concat.push(unescapeText(text.substring(index,startIndex)));
exp=text.substring(startIndex+startSymbolLength,endIndex);expressions.push(exp);parseFns.push($parse(exp,parseStringifyInterceptor));index=endIndex+endSymbolLength;expressionPositions.push(concat.length);concat.push("")}else{if(index!==textLength)concat.push(unescapeText(text.substring(index)));break}if(trustedContext&&concat.length>1)$interpolateMinErr.throwNoconcat(text);if(!mustHaveExpression||expressions.length){var compute=function(values){for(var i=0,ii=expressions.length;i<ii;i++){if(allOrNothing&&
isUndefined(values[i]))return;concat[expressionPositions[i]]=values[i]}return concat.join("")};var getValue=function(value){return trustedContext?$sce.getTrusted(trustedContext,value):$sce.valueOf(value)};return extend(function interpolationFn(context){var i=0;var ii=expressions.length;var values=new Array(ii);try{for(;i<ii;i++)values[i]=parseFns[i](context);return compute(values)}catch(err){$exceptionHandler($interpolateMinErr.interr(text,err))}},{exp:text,expressions:expressions,$$watchDelegate:function(scope,
listener){var lastValue;return scope.$watchGroup(parseFns,function interpolateFnWatcher(values,oldValues){var currValue=compute(values);if(isFunction(listener))listener.call(this,currValue,values!==oldValues?lastValue:currValue,scope);lastValue=currValue})}})}function parseStringifyInterceptor(value){try{value=getValue(value);return allOrNothing&&!isDefined(value)?value:stringify(value)}catch(err){$exceptionHandler($interpolateMinErr.interr(text,err))}}}$interpolate.startSymbol=function(){return startSymbol};
$interpolate.endSymbol=function(){return endSymbol};return $interpolate}]}function $IntervalProvider(){this.$get=["$rootScope","$window","$q","$$q",function($rootScope,$window,$q,$$q){var intervals={};function interval(fn,delay,count,invokeApply){var hasParams=arguments.length>4,args=hasParams?sliceArgs(arguments,4):[],setInterval=$window.setInterval,clearInterval=$window.clearInterval,iteration=0,skipApply=isDefined(invokeApply)&&!invokeApply,deferred=(skipApply?$$q:$q).defer(),promise=deferred.promise;
count=isDefined(count)?count:0;promise.then(null,null,!hasParams?fn:function(){fn.apply(null,args)});promise.$$intervalId=setInterval(function tick(){deferred.notify(iteration++);if(count>0&&iteration>=count){deferred.resolve(iteration);clearInterval(promise.$$intervalId);delete intervals[promise.$$intervalId]}if(!skipApply)$rootScope.$apply()},delay);intervals[promise.$$intervalId]=deferred;return promise}interval.cancel=function(promise){if(promise&&promise.$$intervalId in intervals){intervals[promise.$$intervalId].reject("canceled");
$window.clearInterval(promise.$$intervalId);delete intervals[promise.$$intervalId];return true}return false};return interval}]}var PATH_MATCH=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,DEFAULT_PORTS={"http":80,"https":443,"ftp":21};var $locationMinErr=minErr("$location");function encodePath(path){var segments=path.split("/"),i=segments.length;while(i--)segments[i]=encodeUriSegment(segments[i]);return segments.join("/")}function parseAbsoluteUrl(absoluteUrl,locationObj){var parsedUrl=urlResolve(absoluteUrl);
locationObj.$$protocol=parsedUrl.protocol;locationObj.$$host=parsedUrl.hostname;locationObj.$$port=toInt(parsedUrl.port)||DEFAULT_PORTS[parsedUrl.protocol]||null}function parseAppUrl(relativeUrl,locationObj){var prefixed=relativeUrl.charAt(0)!=="/";if(prefixed)relativeUrl="/"+relativeUrl;var match=urlResolve(relativeUrl);locationObj.$$path=decodeURIComponent(prefixed&&match.pathname.charAt(0)==="/"?match.pathname.substring(1):match.pathname);locationObj.$$search=parseKeyValue(match.search);locationObj.$$hash=
decodeURIComponent(match.hash);if(locationObj.$$path&&locationObj.$$path.charAt(0)!="/")locationObj.$$path="/"+locationObj.$$path}function beginsWith(begin,whole){if(whole.indexOf(begin)===0)return whole.substr(begin.length)}function stripHash(url){var index=url.indexOf("#");return index==-1?url:url.substr(0,index)}function trimEmptyHash(url){return url.replace(/(#.+)|#$/,"$1")}function stripFile(url){return url.substr(0,stripHash(url).lastIndexOf("/")+1)}function serverBase(url){return url.substring(0,
url.indexOf("/",url.indexOf("//")+2))}function LocationHtml5Url(appBase,appBaseNoFile,basePrefix){this.$$html5=true;basePrefix=basePrefix||"";parseAbsoluteUrl(appBase,this);this.$$parse=function(url){var pathUrl=beginsWith(appBaseNoFile,url);if(!isString(pathUrl))throw $locationMinErr("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',url,appBaseNoFile);parseAppUrl(pathUrl,this);if(!this.$$path)this.$$path="/";this.$$compose()};this.$$compose=function(){var search=toKeyValue(this.$$search),
hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash;this.$$absUrl=appBaseNoFile+this.$$url.substr(1)};this.$$parseLinkUrl=function(url,relHref){if(relHref&&relHref[0]==="#"){this.hash(relHref.slice(1));return true}var appUrl,prevAppUrl;var rewrittenUrl;if((appUrl=beginsWith(appBase,url))!==undefined){prevAppUrl=appUrl;if((appUrl=beginsWith(basePrefix,appUrl))!==undefined)rewrittenUrl=appBaseNoFile+(beginsWith("/",appUrl)||appUrl);else rewrittenUrl=
appBase+prevAppUrl}else if((appUrl=beginsWith(appBaseNoFile,url))!==undefined)rewrittenUrl=appBaseNoFile+appUrl;else if(appBaseNoFile==url+"/")rewrittenUrl=appBaseNoFile;if(rewrittenUrl)this.$$parse(rewrittenUrl);return!!rewrittenUrl}}function LocationHashbangUrl(appBase,appBaseNoFile,hashPrefix){parseAbsoluteUrl(appBase,this);this.$$parse=function(url){var withoutBaseUrl=beginsWith(appBase,url)||beginsWith(appBaseNoFile,url);var withoutHashUrl;if(!isUndefined(withoutBaseUrl)&&withoutBaseUrl.charAt(0)===
"#"){withoutHashUrl=beginsWith(hashPrefix,withoutBaseUrl);if(isUndefined(withoutHashUrl))withoutHashUrl=withoutBaseUrl}else if(this.$$html5)withoutHashUrl=withoutBaseUrl;else{withoutHashUrl="";if(isUndefined(withoutBaseUrl)){appBase=url;this.replace()}}parseAppUrl(withoutHashUrl,this);this.$$path=removeWindowsDriveName(this.$$path,withoutHashUrl,appBase);this.$$compose();function removeWindowsDriveName(path,url,base){var windowsFilePathExp=/^\/[A-Z]:(\/.*)/;var firstPathSegmentMatch;if(url.indexOf(base)===
0)url=url.replace(base,"");if(windowsFilePathExp.exec(url))return path;firstPathSegmentMatch=windowsFilePathExp.exec(path);return firstPathSegmentMatch?firstPathSegmentMatch[1]:path}};this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash;this.$$absUrl=appBase+(this.$$url?hashPrefix+this.$$url:"")};this.$$parseLinkUrl=function(url,relHref){if(stripHash(appBase)==stripHash(url)){this.$$parse(url);
return true}return false}}function LocationHashbangInHtml5Url(appBase,appBaseNoFile,hashPrefix){this.$$html5=true;LocationHashbangUrl.apply(this,arguments);this.$$parseLinkUrl=function(url,relHref){if(relHref&&relHref[0]==="#"){this.hash(relHref.slice(1));return true}var rewrittenUrl;var appUrl;if(appBase==stripHash(url))rewrittenUrl=url;else if(appUrl=beginsWith(appBaseNoFile,url))rewrittenUrl=appBase+hashPrefix+appUrl;else if(appBaseNoFile===url+"/")rewrittenUrl=appBaseNoFile;if(rewrittenUrl)this.$$parse(rewrittenUrl);
return!!rewrittenUrl};this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash;this.$$absUrl=appBase+hashPrefix+this.$$url}}var locationPrototype={$$html5:false,$$replace:false,absUrl:locationGetter("$$absUrl"),url:function(url){if(isUndefined(url))return this.$$url;var match=PATH_MATCH.exec(url);if(match[1]||url==="")this.path(decodeURIComponent(match[1]));if(match[2]||match[1]||
url==="")this.search(match[3]||"");this.hash(match[5]||"");return this},protocol:locationGetter("$$protocol"),host:locationGetter("$$host"),port:locationGetter("$$port"),path:locationGetterSetter("$$path",function(path){path=path!==null?path.toString():"";return path.charAt(0)=="/"?path:"/"+path}),search:function(search,paramValue){switch(arguments.length){case 0:return this.$$search;case 1:if(isString(search)||isNumber(search)){search=search.toString();this.$$search=parseKeyValue(search)}else if(isObject(search)){search=
copy(search,{});forEach(search,function(value,key){if(value==null)delete search[key]});this.$$search=search}else throw $locationMinErr("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");break;default:if(isUndefined(paramValue)||paramValue===null)delete this.$$search[search];else this.$$search[search]=paramValue}this.$$compose();return this},hash:locationGetterSetter("$$hash",function(hash){return hash!==null?hash.toString():""}),replace:function(){this.$$replace=
true;return this}};forEach([LocationHashbangInHtml5Url,LocationHashbangUrl,LocationHtml5Url],function(Location){Location.prototype=Object.create(locationPrototype);Location.prototype.state=function(state){if(!arguments.length)return this.$$state;if(Location!==LocationHtml5Url||!this.$$html5)throw $locationMinErr("nostate","History API state support is available only "+"in HTML5 mode and only in browsers supporting HTML5 History API");this.$$state=isUndefined(state)?null:state;return this}});function locationGetter(property){return function(){return this[property]}}
function locationGetterSetter(property,preprocess){return function(value){if(isUndefined(value))return this[property];this[property]=preprocess(value);this.$$compose();return this}}function $LocationProvider(){var hashPrefix="",html5Mode={enabled:false,requireBase:true,rewriteLinks:true};this.hashPrefix=function(prefix){if(isDefined(prefix)){hashPrefix=prefix;return this}else return hashPrefix};this.html5Mode=function(mode){if(isBoolean(mode)){html5Mode.enabled=mode;return this}else if(isObject(mode)){if(isBoolean(mode.enabled))html5Mode.enabled=
mode.enabled;if(isBoolean(mode.requireBase))html5Mode.requireBase=mode.requireBase;if(isBoolean(mode.rewriteLinks))html5Mode.rewriteLinks=mode.rewriteLinks;return this}else return html5Mode};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function($rootScope,$browser,$sniffer,$rootElement,$window){var $location,LocationMode,baseHref=$browser.baseHref(),initialUrl=$browser.url(),appBase;if(html5Mode.enabled){if(!baseHref&&html5Mode.requireBase)throw $locationMinErr("nobase",
"$location in HTML5 mode requires a \x3cbase\x3e tag to be present!");appBase=serverBase(initialUrl)+(baseHref||"/");LocationMode=$sniffer.history?LocationHtml5Url:LocationHashbangInHtml5Url}else{appBase=stripHash(initialUrl);LocationMode=LocationHashbangUrl}var appBaseNoFile=stripFile(appBase);$location=new LocationMode(appBase,appBaseNoFile,"#"+hashPrefix);$location.$$parseLinkUrl(initialUrl,initialUrl);$location.$$state=$browser.state();var IGNORE_URI_REGEXP=/^\s*(javascript|mailto):/i;function setBrowserUrlWithFallback(url,
replace,state){var oldUrl=$location.url();var oldState=$location.$$state;try{$browser.url(url,replace,state);$location.$$state=$browser.state()}catch(e){$location.url(oldUrl);$location.$$state=oldState;throw e;}}$rootElement.on("click",function(event){if(!html5Mode.rewriteLinks||event.ctrlKey||event.metaKey||event.shiftKey||event.which==2||event.button==2)return;var elm=jqLite(event.target);while(nodeName_(elm[0])!=="a")if(elm[0]===$rootElement[0]||!(elm=elm.parent())[0])return;var absHref=elm.prop("href");
var relHref=elm.attr("href")||elm.attr("xlink:href");if(isObject(absHref)&&absHref.toString()==="[object SVGAnimatedString]")absHref=urlResolve(absHref.animVal).href;if(IGNORE_URI_REGEXP.test(absHref))return;if(absHref&&!elm.attr("target")&&!event.isDefaultPrevented())if($location.$$parseLinkUrl(absHref,relHref)){event.preventDefault();if($location.absUrl()!=$browser.url()){$rootScope.$apply();$window.angular["ff-684208-preventDefault"]=true}}});if(trimEmptyHash($location.absUrl())!=trimEmptyHash(initialUrl))$browser.url($location.absUrl(),
true);var initializing=true;$browser.onUrlChange(function(newUrl,newState){if(isUndefined(beginsWith(appBaseNoFile,newUrl))){$window.location.href=newUrl;return}$rootScope.$evalAsync(function(){var oldUrl=$location.absUrl();var oldState=$location.$$state;var defaultPrevented;$location.$$parse(newUrl);$location.$$state=newState;defaultPrevented=$rootScope.$broadcast("$locationChangeStart",newUrl,oldUrl,newState,oldState).defaultPrevented;if($location.absUrl()!==newUrl)return;if(defaultPrevented){$location.$$parse(oldUrl);
$location.$$state=oldState;setBrowserUrlWithFallback(oldUrl,false,oldState)}else{initializing=false;afterLocationChange(oldUrl,oldState)}});if(!$rootScope.$$phase)$rootScope.$digest()});$rootScope.$watch(function $locationWatch(){var oldUrl=trimEmptyHash($browser.url());var newUrl=trimEmptyHash($location.absUrl());var oldState=$browser.state();var currentReplace=$location.$$replace;var urlOrStateChanged=oldUrl!==newUrl||$location.$$html5&&$sniffer.history&&oldState!==$location.$$state;if(initializing||
urlOrStateChanged){initializing=false;$rootScope.$evalAsync(function(){var newUrl=$location.absUrl();var defaultPrevented=$rootScope.$broadcast("$locationChangeStart",newUrl,oldUrl,$location.$$state,oldState).defaultPrevented;if($location.absUrl()!==newUrl)return;if(defaultPrevented){$location.$$parse(oldUrl);$location.$$state=oldState}else{if(urlOrStateChanged)setBrowserUrlWithFallback(newUrl,currentReplace,oldState===$location.$$state?null:$location.$$state);afterLocationChange(oldUrl,oldState)}})}$location.$$replace=
false});return $location;function afterLocationChange(oldUrl,oldState){$rootScope.$broadcast("$locationChangeSuccess",$location.absUrl(),oldUrl,$location.$$state,oldState)}}]}function $LogProvider(){var debug=true,self=this;this.debugEnabled=function(flag){if(isDefined(flag)){debug=flag;return this}else return debug};this.$get=["$window",function($window){return{log:consoleLog("log"),info:consoleLog("info"),warn:consoleLog("warn"),error:consoleLog("error"),debug:function(){var fn=consoleLog("debug");
return function(){if(debug)fn.apply(self,arguments)}}()};function formatError(arg){if(arg instanceof Error)if(arg.stack)arg=arg.message&&arg.stack.indexOf(arg.message)===-1?"Error: "+arg.message+"\n"+arg.stack:arg.stack;else if(arg.sourceURL)arg=arg.message+"\n"+arg.sourceURL+":"+arg.line;return arg}function consoleLog(type){var console=$window.console||{},logFn=console[type]||console.log||noop,hasApply=false;try{hasApply=!!logFn.apply}catch(e){}if(hasApply)return function(){var args=[];forEach(arguments,
function(arg){args.push(formatError(arg))});return logFn.apply(console,args)};return function(arg1,arg2){logFn(arg1,arg2==null?"":arg2)}}}]}var $parseMinErr=minErr("$parse");function ensureSafeMemberName(name,fullExpression){if(name==="__defineGetter__"||name==="__defineSetter__"||name==="__lookupGetter__"||name==="__lookupSetter__"||name==="__proto__")throw $parseMinErr("isecfld","Attempting to access a disallowed field in Angular expressions! "+"Expression: {0}",fullExpression);return name}function ensureSafeObject(obj,
fullExpression){if(obj)if(obj.constructor===obj)throw $parseMinErr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",fullExpression);else if(obj.window===obj)throw $parseMinErr("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",fullExpression);else if(obj.children&&(obj.nodeName||obj.prop&&obj.attr&&obj.find))throw $parseMinErr("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",fullExpression);
else if(obj===Object)throw $parseMinErr("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",fullExpression);return obj}var CALL=Function.prototype.call;var APPLY=Function.prototype.apply;var BIND=Function.prototype.bind;function ensureSafeFunction(obj,fullExpression){if(obj)if(obj.constructor===obj)throw $parseMinErr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",fullExpression);else if(obj===CALL||obj===APPLY||obj===BIND)throw $parseMinErr("isecff",
"Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",fullExpression);}var OPERATORS=createMap();forEach("+ - * / % \x3d\x3d\x3d !\x3d\x3d \x3d\x3d !\x3d \x3c \x3e \x3c\x3d \x3e\x3d \x26\x26 || ! \x3d |".split(" "),function(operator){OPERATORS[operator]=true});var ESCAPE={"n":"\n","f":"\f","r":"\r","t":"\t","v":"\v","'":"'",'"':'"'};var Lexer=function(options){this.options=options};Lexer.prototype={constructor:Lexer,lex:function(text){this.text=text;this.index=0;
this.tokens=[];while(this.index<this.text.length){var ch=this.text.charAt(this.index);if(ch==='"'||ch==="'")this.readString(ch);else if(this.isNumber(ch)||ch==="."&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(ch))this.readIdent();else if(this.is(ch,"(){}[].,;:?")){this.tokens.push({index:this.index,text:ch});this.index++}else if(this.isWhitespace(ch))this.index++;else{var ch2=ch+this.peek();var ch3=ch2+this.peek(2);var op1=OPERATORS[ch];var op2=OPERATORS[ch2];var op3=OPERATORS[ch3];
if(op1||op2||op3){var token=op3?ch3:op2?ch2:ch;this.tokens.push({index:this.index,text:token,operator:true});this.index+=token.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(ch,chars){return chars.indexOf(ch)!==-1},peek:function(i){var num=i||1;return this.index+num<this.text.length?this.text.charAt(this.index+num):false},isNumber:function(ch){return"0"<=ch&&ch<="9"&&typeof ch==="string"},isWhitespace:function(ch){return ch===" "||
ch==="\r"||ch==="\t"||ch==="\n"||ch==="\v"||ch==="\u00a0"},isIdent:function(ch){return"a"<=ch&&ch<="z"||"A"<=ch&&ch<="Z"||"_"===ch||ch==="$"},isExpOperator:function(ch){return ch==="-"||ch==="+"||this.isNumber(ch)},throwError:function(error,start,end){end=end||this.index;var colStr=isDefined(start)?"s "+start+"-"+this.index+" ["+this.text.substring(start,end)+"]":" "+end;throw $parseMinErr("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",error,colStr,this.text);},readNumber:function(){var number=
"";var start=this.index;while(this.index<this.text.length){var ch=lowercase(this.text.charAt(this.index));if(ch=="."||this.isNumber(ch))number+=ch;else{var peekCh=this.peek();if(ch=="e"&&this.isExpOperator(peekCh))number+=ch;else if(this.isExpOperator(ch)&&peekCh&&this.isNumber(peekCh)&&number.charAt(number.length-1)=="e")number+=ch;else if(this.isExpOperator(ch)&&(!peekCh||!this.isNumber(peekCh))&&number.charAt(number.length-1)=="e")this.throwError("Invalid exponent");else break}this.index++}this.tokens.push({index:start,
text:number,constant:true,value:Number(number)})},readIdent:function(){var start=this.index;while(this.index<this.text.length){var ch=this.text.charAt(this.index);if(!(this.isIdent(ch)||this.isNumber(ch)))break;this.index++}this.tokens.push({index:start,text:this.text.slice(start,this.index),identifier:true})},readString:function(quote){var start=this.index;this.index++;var string="";var rawString=quote;var escape=false;while(this.index<this.text.length){var ch=this.text.charAt(this.index);rawString+=
ch;if(escape){if(ch==="u"){var hex=this.text.substring(this.index+1,this.index+5);if(!hex.match(/[\da-f]{4}/i))this.throwError("Invalid unicode escape [\\u"+hex+"]");this.index+=4;string+=String.fromCharCode(parseInt(hex,16))}else{var rep=ESCAPE[ch];string=string+(rep||ch)}escape=false}else if(ch==="\\")escape=true;else if(ch===quote){this.index++;this.tokens.push({index:start,text:rawString,constant:true,value:string});return}else string+=ch;this.index++}this.throwError("Unterminated quote",start)}};
var AST=function(lexer,options){this.lexer=lexer;this.options=options};AST.Program="Program";AST.ExpressionStatement="ExpressionStatement";AST.AssignmentExpression="AssignmentExpression";AST.ConditionalExpression="ConditionalExpression";AST.LogicalExpression="LogicalExpression";AST.BinaryExpression="BinaryExpression";AST.UnaryExpression="UnaryExpression";AST.CallExpression="CallExpression";AST.MemberExpression="MemberExpression";AST.Identifier="Identifier";AST.Literal="Literal";AST.ArrayExpression=
"ArrayExpression";AST.Property="Property";AST.ObjectExpression="ObjectExpression";AST.ThisExpression="ThisExpression";AST.NGValueParameter="NGValueParameter";AST.prototype={ast:function(text){this.text=text;this.tokens=this.lexer.lex(text);var value=this.program();if(this.tokens.length!==0)this.throwError("is an unexpected token",this.tokens[0]);return value},program:function(){var body=[];while(true){if(this.tokens.length>0&&!this.peek("}",")",";","]"))body.push(this.expressionStatement());if(!this.expect(";"))return{type:AST.Program,
body:body}}},expressionStatement:function(){return{type:AST.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){var left=this.expression();var token;while(token=this.expect("|"))left=this.filter(left);return left},expression:function(){return this.assignment()},assignment:function(){var result=this.ternary();if(this.expect("\x3d"))result={type:AST.AssignmentExpression,left:result,right:this.assignment(),operator:"\x3d"};return result},ternary:function(){var test=this.logicalOR();
var alternate;var consequent;if(this.expect("?")){alternate=this.expression();if(this.consume(":")){consequent=this.expression();return{type:AST.ConditionalExpression,test:test,alternate:alternate,consequent:consequent}}}return test},logicalOR:function(){var left=this.logicalAND();while(this.expect("||"))left={type:AST.LogicalExpression,operator:"||",left:left,right:this.logicalAND()};return left},logicalAND:function(){var left=this.equality();while(this.expect("\x26\x26"))left={type:AST.LogicalExpression,
operator:"\x26\x26",left:left,right:this.equality()};return left},equality:function(){var left=this.relational();var token;while(token=this.expect("\x3d\x3d","!\x3d","\x3d\x3d\x3d","!\x3d\x3d"))left={type:AST.BinaryExpression,operator:token.text,left:left,right:this.relational()};return left},relational:function(){var left=this.additive();var token;while(token=this.expect("\x3c","\x3e","\x3c\x3d","\x3e\x3d"))left={type:AST.BinaryExpression,operator:token.text,left:left,right:this.additive()};return left},
additive:function(){var left=this.multiplicative();var token;while(token=this.expect("+","-"))left={type:AST.BinaryExpression,operator:token.text,left:left,right:this.multiplicative()};return left},multiplicative:function(){var left=this.unary();var token;while(token=this.expect("*","/","%"))left={type:AST.BinaryExpression,operator:token.text,left:left,right:this.unary()};return left},unary:function(){var token;if(token=this.expect("+","-","!"))return{type:AST.UnaryExpression,operator:token.text,
prefix:true,argument:this.unary()};else return this.primary()},primary:function(){var primary;if(this.expect("(")){primary=this.filterChain();this.consume(")")}else if(this.expect("["))primary=this.arrayDeclaration();else if(this.expect("{"))primary=this.object();else if(this.constants.hasOwnProperty(this.peek().text))primary=copy(this.constants[this.consume().text]);else if(this.peek().identifier)primary=this.identifier();else if(this.peek().constant)primary=this.constant();else this.throwError("not a primary expression",
this.peek());var next;while(next=this.expect("(","[","."))if(next.text==="("){primary={type:AST.CallExpression,callee:primary,arguments:this.parseArguments()};this.consume(")")}else if(next.text==="["){primary={type:AST.MemberExpression,object:primary,property:this.expression(),computed:true};this.consume("]")}else if(next.text===".")primary={type:AST.MemberExpression,object:primary,property:this.identifier(),computed:false};else this.throwError("IMPOSSIBLE");return primary},filter:function(baseExpression){var args=
[baseExpression];var result={type:AST.CallExpression,callee:this.identifier(),arguments:args,filter:true};while(this.expect(":"))args.push(this.expression());return result},parseArguments:function(){var args=[];if(this.peekToken().text!==")"){do args.push(this.expression());while(this.expect(","))}return args},identifier:function(){var token=this.consume();if(!token.identifier)this.throwError("is not a valid identifier",token);return{type:AST.Identifier,name:token.text}},constant:function(){return{type:AST.Literal,
value:this.consume().value}},arrayDeclaration:function(){var elements=[];if(this.peekToken().text!=="]"){do{if(this.peek("]"))break;elements.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:AST.ArrayExpression,elements:elements}},object:function(){var properties=[],property;if(this.peekToken().text!=="}"){do{if(this.peek("}"))break;property={type:AST.Property,kind:"init"};if(this.peek().constant)property.key=this.constant();else if(this.peek().identifier)property.key=
this.identifier();else this.throwError("invalid key",this.peek());this.consume(":");property.value=this.expression();properties.push(property)}while(this.expect(","))}this.consume("}");return{type:AST.ObjectExpression,properties:properties}},throwError:function(msg,token){throw $parseMinErr("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",token.text,msg,token.index+1,this.text,this.text.substring(token.index));},consume:function(e1){if(this.tokens.length===
0)throw $parseMinErr("ueoe","Unexpected end of expression: {0}",this.text);var token=this.expect(e1);if(!token)this.throwError("is unexpected, expecting ["+e1+"]",this.peek());return token},peekToken:function(){if(this.tokens.length===0)throw $parseMinErr("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e1,e2,e3,e4){return this.peekAhead(0,e1,e2,e3,e4)},peekAhead:function(i,e1,e2,e3,e4){if(this.tokens.length>i){var token=this.tokens[i];var t=token.text;if(t===
e1||t===e2||t===e3||t===e4||!e1&&!e2&&!e3&&!e4)return token}return false},expect:function(e1,e2,e3,e4){var token=this.peek(e1,e2,e3,e4);if(token){this.tokens.shift();return token}return false},constants:{"true":{type:AST.Literal,value:true},"false":{type:AST.Literal,value:false},"null":{type:AST.Literal,value:null},"undefined":{type:AST.Literal,value:undefined},"this":{type:AST.ThisExpression}}};function ifDefined(v,d){return typeof v!=="undefined"?v:d}function plusFn(l,r){if(typeof l==="undefined")return r;
if(typeof r==="undefined")return l;return l+r}function isStateless($filter,filterName){var fn=$filter(filterName);return!fn.$stateful}function findConstantAndWatchExpressions(ast,$filter){var allConstants;var argsToWatch;switch(ast.type){case AST.Program:allConstants=true;forEach(ast.body,function(expr){findConstantAndWatchExpressions(expr.expression,$filter);allConstants=allConstants&&expr.expression.constant});ast.constant=allConstants;break;case AST.Literal:ast.constant=true;ast.toWatch=[];break;
case AST.UnaryExpression:findConstantAndWatchExpressions(ast.argument,$filter);ast.constant=ast.argument.constant;ast.toWatch=ast.argument.toWatch;break;case AST.BinaryExpression:findConstantAndWatchExpressions(ast.left,$filter);findConstantAndWatchExpressions(ast.right,$filter);ast.constant=ast.left.constant&&ast.right.constant;ast.toWatch=ast.left.toWatch.concat(ast.right.toWatch);break;case AST.LogicalExpression:findConstantAndWatchExpressions(ast.left,$filter);findConstantAndWatchExpressions(ast.right,
$filter);ast.constant=ast.left.constant&&ast.right.constant;ast.toWatch=ast.constant?[]:[ast];break;case AST.ConditionalExpression:findConstantAndWatchExpressions(ast.test,$filter);findConstantAndWatchExpressions(ast.alternate,$filter);findConstantAndWatchExpressions(ast.consequent,$filter);ast.constant=ast.test.constant&&ast.alternate.constant&&ast.consequent.constant;ast.toWatch=ast.constant?[]:[ast];break;case AST.Identifier:ast.constant=false;ast.toWatch=[ast];break;case AST.MemberExpression:findConstantAndWatchExpressions(ast.object,
$filter);if(ast.computed)findConstantAndWatchExpressions(ast.property,$filter);ast.constant=ast.object.constant&&(!ast.computed||ast.property.constant);ast.toWatch=[ast];break;case AST.CallExpression:allConstants=ast.filter?isStateless($filter,ast.callee.name):false;argsToWatch=[];forEach(ast.arguments,function(expr){findConstantAndWatchExpressions(expr,$filter);allConstants=allConstants&&expr.constant;if(!expr.constant)argsToWatch.push.apply(argsToWatch,expr.toWatch)});ast.constant=allConstants;
ast.toWatch=ast.filter&&isStateless($filter,ast.callee.name)?argsToWatch:[ast];break;case AST.AssignmentExpression:findConstantAndWatchExpressions(ast.left,$filter);findConstantAndWatchExpressions(ast.right,$filter);ast.constant=ast.left.constant&&ast.right.constant;ast.toWatch=[ast];break;case AST.ArrayExpression:allConstants=true;argsToWatch=[];forEach(ast.elements,function(expr){findConstantAndWatchExpressions(expr,$filter);allConstants=allConstants&&expr.constant;if(!expr.constant)argsToWatch.push.apply(argsToWatch,
expr.toWatch)});ast.constant=allConstants;ast.toWatch=argsToWatch;break;case AST.ObjectExpression:allConstants=true;argsToWatch=[];forEach(ast.properties,function(property){findConstantAndWatchExpressions(property.value,$filter);allConstants=allConstants&&property.value.constant;if(!property.value.constant)argsToWatch.push.apply(argsToWatch,property.value.toWatch)});ast.constant=allConstants;ast.toWatch=argsToWatch;break;case AST.ThisExpression:ast.constant=false;ast.toWatch=[];break}}function getInputs(body){if(body.length!=
1)return;var lastExpression=body[0].expression;var candidate=lastExpression.toWatch;if(candidate.length!==1)return candidate;return candidate[0]!==lastExpression?candidate:undefined}function isAssignable(ast){return ast.type===AST.Identifier||ast.type===AST.MemberExpression}function assignableAST(ast){if(ast.body.length===1&&isAssignable(ast.body[0].expression))return{type:AST.AssignmentExpression,left:ast.body[0].expression,right:{type:AST.NGValueParameter},operator:"\x3d"}}function isLiteral(ast){return ast.body.length===
0||ast.body.length===1&&(ast.body[0].expression.type===AST.Literal||ast.body[0].expression.type===AST.ArrayExpression||ast.body[0].expression.type===AST.ObjectExpression)}function isConstant(ast){return ast.constant}function ASTCompiler(astBuilder,$filter){this.astBuilder=astBuilder;this.$filter=$filter}ASTCompiler.prototype={compile:function(expression,expensiveChecks){var self=this;var ast=this.astBuilder.ast(expression);this.state={nextId:0,filters:{},expensiveChecks:expensiveChecks,fn:{vars:[],
body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};findConstantAndWatchExpressions(ast,self.$filter);var extra="";var assignable;this.stage="assign";if(assignable=assignableAST(ast)){this.state.computing="assign";var result=this.nextId();this.recurse(assignable,result);extra="fn.assign\x3d"+this.generateFunction("assign","s,v,l")}var toWatch=getInputs(ast.body);self.stage="inputs";forEach(toWatch,function(watch,key){var fnKey="fn"+key;self.state[fnKey]={vars:[],body:[],own:{}};self.state.computing=
fnKey;var intoId=self.nextId();self.recurse(watch,intoId);self.return_(intoId);self.state.inputs.push(fnKey);watch.watchId=key});this.state.computing="fn";this.stage="main";this.recurse(ast);var fnString='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn\x3d"+this.generateFunction("fn","s,l,a,i")+extra+this.watchFns()+"return fn;";var fn=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","ifDefined","plus","text",fnString))(this.$filter,ensureSafeMemberName,
ensureSafeObject,ensureSafeFunction,ifDefined,plusFn,expression);this.state=this.stage=undefined;fn.literal=isLiteral(ast);fn.constant=isConstant(ast);return fn},USE:"use",STRICT:"strict",watchFns:function(){var result=[];var fns=this.state.inputs;var self=this;forEach(fns,function(name){result.push("var "+name+"\x3d"+self.generateFunction(name,"s"))});if(fns.length)result.push("fn.inputs\x3d["+fns.join(",")+"];");return result.join("")},generateFunction:function(name,params){return"function("+params+
"){"+this.varsPrefix(name)+this.body(name)+"};"},filterPrefix:function(){var parts=[];var self=this;forEach(this.state.filters,function(id,filter){parts.push(id+"\x3d$filter("+self.escape(filter)+")")});if(parts.length)return"var "+parts.join(",")+";";return""},varsPrefix:function(section){return this.state[section].vars.length?"var "+this.state[section].vars.join(",")+";":""},body:function(section){return this.state[section].body.join("")},recurse:function(ast,intoId,nameId,recursionFn,create,skipWatchIdCheck){var left,
right,self=this,args,expression;recursionFn=recursionFn||noop;if(!skipWatchIdCheck&&isDefined(ast.watchId)){intoId=intoId||this.nextId();this.if_("i",this.lazyAssign(intoId,this.computedMember("i",ast.watchId)),this.lazyRecurse(ast,intoId,nameId,recursionFn,create,true));return}switch(ast.type){case AST.Program:forEach(ast.body,function(expression,pos){self.recurse(expression.expression,undefined,undefined,function(expr){right=expr});if(pos!==ast.body.length-1)self.current().body.push(right,";");
else self.return_(right)});break;case AST.Literal:expression=this.escape(ast.value);this.assign(intoId,expression);recursionFn(expression);break;case AST.UnaryExpression:this.recurse(ast.argument,undefined,undefined,function(expr){right=expr});expression=ast.operator+"("+this.ifDefined(right,0)+")";this.assign(intoId,expression);recursionFn(expression);break;case AST.BinaryExpression:this.recurse(ast.left,undefined,undefined,function(expr){left=expr});this.recurse(ast.right,undefined,undefined,function(expr){right=
expr});if(ast.operator==="+")expression=this.plus(left,right);else if(ast.operator==="-")expression=this.ifDefined(left,0)+ast.operator+this.ifDefined(right,0);else expression="("+left+")"+ast.operator+"("+right+")";this.assign(intoId,expression);recursionFn(expression);break;case AST.LogicalExpression:intoId=intoId||this.nextId();self.recurse(ast.left,intoId);self.if_(ast.operator==="\x26\x26"?intoId:self.not(intoId),self.lazyRecurse(ast.right,intoId));recursionFn(intoId);break;case AST.ConditionalExpression:intoId=
intoId||this.nextId();self.recurse(ast.test,intoId);self.if_(intoId,self.lazyRecurse(ast.alternate,intoId),self.lazyRecurse(ast.consequent,intoId));recursionFn(intoId);break;case AST.Identifier:intoId=intoId||this.nextId();if(nameId){nameId.context=self.stage==="inputs"?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",ast.name)+"?l:s");nameId.computed=false;nameId.name=ast.name}ensureSafeMemberName(ast.name);self.if_(self.stage==="inputs"||self.not(self.getHasOwnProperty("l",ast.name)),function(){self.if_(self.stage===
"inputs"||"s",function(){if(create&&create!==1)self.if_(self.not(self.nonComputedMember("s",ast.name)),self.lazyAssign(self.nonComputedMember("s",ast.name),"{}"));self.assign(intoId,self.nonComputedMember("s",ast.name))})},intoId&&self.lazyAssign(intoId,self.nonComputedMember("l",ast.name)));if(self.state.expensiveChecks||isPossiblyDangerousMemberName(ast.name))self.addEnsureSafeObject(intoId);recursionFn(intoId);break;case AST.MemberExpression:left=nameId&&(nameId.context=this.nextId())||this.nextId();
intoId=intoId||this.nextId();self.recurse(ast.object,left,undefined,function(){self.if_(self.notNull(left),function(){if(ast.computed){right=self.nextId();self.recurse(ast.property,right);self.addEnsureSafeMemberName(right);if(create&&create!==1)self.if_(self.not(self.computedMember(left,right)),self.lazyAssign(self.computedMember(left,right),"{}"));expression=self.ensureSafeObject(self.computedMember(left,right));self.assign(intoId,expression);if(nameId){nameId.computed=true;nameId.name=right}}else{ensureSafeMemberName(ast.property.name);
if(create&&create!==1)self.if_(self.not(self.nonComputedMember(left,ast.property.name)),self.lazyAssign(self.nonComputedMember(left,ast.property.name),"{}"));expression=self.nonComputedMember(left,ast.property.name);if(self.state.expensiveChecks||isPossiblyDangerousMemberName(ast.property.name))expression=self.ensureSafeObject(expression);self.assign(intoId,expression);if(nameId){nameId.computed=false;nameId.name=ast.property.name}}},function(){self.assign(intoId,"undefined")});recursionFn(intoId)},
!!create);break;case AST.CallExpression:intoId=intoId||this.nextId();if(ast.filter){right=self.filter(ast.callee.name);args=[];forEach(ast.arguments,function(expr){var argument=self.nextId();self.recurse(expr,argument);args.push(argument)});expression=right+"("+args.join(",")+")";self.assign(intoId,expression);recursionFn(intoId)}else{right=self.nextId();left={};args=[];self.recurse(ast.callee,right,left,function(){self.if_(self.notNull(right),function(){self.addEnsureSafeFunction(right);forEach(ast.arguments,
function(expr){self.recurse(expr,self.nextId(),undefined,function(argument){args.push(self.ensureSafeObject(argument))})});if(left.name){if(!self.state.expensiveChecks)self.addEnsureSafeObject(left.context);expression=self.member(left.context,left.name,left.computed)+"("+args.join(",")+")"}else expression=right+"("+args.join(",")+")";expression=self.ensureSafeObject(expression);self.assign(intoId,expression)},function(){self.assign(intoId,"undefined")});recursionFn(intoId)})}break;case AST.AssignmentExpression:right=
this.nextId();left={};if(!isAssignable(ast.left))throw $parseMinErr("lval","Trying to assing a value to a non l-value");this.recurse(ast.left,undefined,left,function(){self.if_(self.notNull(left.context),function(){self.recurse(ast.right,right);self.addEnsureSafeObject(self.member(left.context,left.name,left.computed));expression=self.member(left.context,left.name,left.computed)+ast.operator+right;self.assign(intoId,expression);recursionFn(intoId||expression)})},1);break;case AST.ArrayExpression:args=
[];forEach(ast.elements,function(expr){self.recurse(expr,self.nextId(),undefined,function(argument){args.push(argument)})});expression="["+args.join(",")+"]";this.assign(intoId,expression);recursionFn(expression);break;case AST.ObjectExpression:args=[];forEach(ast.properties,function(property){self.recurse(property.value,self.nextId(),undefined,function(expr){args.push(self.escape(property.key.type===AST.Identifier?property.key.name:""+property.key.value)+":"+expr)})});expression="{"+args.join(",")+
"}";this.assign(intoId,expression);recursionFn(expression);break;case AST.ThisExpression:this.assign(intoId,"s");recursionFn("s");break;case AST.NGValueParameter:this.assign(intoId,"v");recursionFn("v");break}},getHasOwnProperty:function(element,property){var key=element+"."+property;var own=this.current().own;if(!own.hasOwnProperty(key))own[key]=this.nextId(false,element+"\x26\x26("+this.escape(property)+" in "+element+")");return own[key]},assign:function(id,value){if(!id)return;this.current().body.push(id,
"\x3d",value,";");return id},filter:function(filterName){if(!this.state.filters.hasOwnProperty(filterName))this.state.filters[filterName]=this.nextId(true);return this.state.filters[filterName]},ifDefined:function(id,defaultValue){return"ifDefined("+id+","+this.escape(defaultValue)+")"},plus:function(left,right){return"plus("+left+","+right+")"},return_:function(id){this.current().body.push("return ",id,";")},if_:function(test,alternate,consequent){if(test===true)alternate();else{var body=this.current().body;
body.push("if(",test,"){");alternate();body.push("}");if(consequent){body.push("else{");consequent();body.push("}")}}},not:function(expression){return"!("+expression+")"},notNull:function(expression){return expression+"!\x3dnull"},nonComputedMember:function(left,right){return left+"."+right},computedMember:function(left,right){return left+"["+right+"]"},member:function(left,right,computed){if(computed)return this.computedMember(left,right);return this.nonComputedMember(left,right)},addEnsureSafeObject:function(item){this.current().body.push(this.ensureSafeObject(item),
";")},addEnsureSafeMemberName:function(item){this.current().body.push(this.ensureSafeMemberName(item),";")},addEnsureSafeFunction:function(item){this.current().body.push(this.ensureSafeFunction(item),";")},ensureSafeObject:function(item){return"ensureSafeObject("+item+",text)"},ensureSafeMemberName:function(item){return"ensureSafeMemberName("+item+",text)"},ensureSafeFunction:function(item){return"ensureSafeFunction("+item+",text)"},lazyRecurse:function(ast,intoId,nameId,recursionFn,create,skipWatchIdCheck){var self=
this;return function(){self.recurse(ast,intoId,nameId,recursionFn,create,skipWatchIdCheck)}},lazyAssign:function(id,value){var self=this;return function(){self.assign(id,value)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(c){return"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)},escape:function(value){if(isString(value))return"'"+value.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(isNumber(value))return value.toString();if(value===true)return"true";if(value===false)return"false";
if(value===null)return"null";if(typeof value==="undefined")return"undefined";throw $parseMinErr("esc","IMPOSSIBLE");},nextId:function(skip,init){var id="v"+this.state.nextId++;if(!skip)this.current().vars.push(id+(init?"\x3d"+init:""));return id},current:function(){return this.state[this.state.computing]}};function ASTInterpreter(astBuilder,$filter){this.astBuilder=astBuilder;this.$filter=$filter}ASTInterpreter.prototype={compile:function(expression,expensiveChecks){var self=this;var ast=this.astBuilder.ast(expression);
this.expression=expression;this.expensiveChecks=expensiveChecks;findConstantAndWatchExpressions(ast,self.$filter);var assignable;var assign;if(assignable=assignableAST(ast))assign=this.recurse(assignable);var toWatch=getInputs(ast.body);var inputs;if(toWatch){inputs=[];forEach(toWatch,function(watch,key){var input=self.recurse(watch);watch.input=input;inputs.push(input);watch.watchId=key})}var expressions=[];forEach(ast.body,function(expression){expressions.push(self.recurse(expression.expression))});
var fn=ast.body.length===0?function(){}:ast.body.length===1?expressions[0]:function(scope,locals){var lastValue;forEach(expressions,function(exp){lastValue=exp(scope,locals)});return lastValue};if(assign)fn.assign=function(scope,value,locals){return assign(scope,locals,value)};if(inputs)fn.inputs=inputs;fn.literal=isLiteral(ast);fn.constant=isConstant(ast);return fn},recurse:function(ast,context,create){var left,right,self=this,args,expression;if(ast.input)return this.inputs(ast.input,ast.watchId);
switch(ast.type){case AST.Literal:return this.value(ast.value,context);case AST.UnaryExpression:right=this.recurse(ast.argument);return this["unary"+ast.operator](right,context);case AST.BinaryExpression:left=this.recurse(ast.left);right=this.recurse(ast.right);return this["binary"+ast.operator](left,right,context);case AST.LogicalExpression:left=this.recurse(ast.left);right=this.recurse(ast.right);return this["binary"+ast.operator](left,right,context);case AST.ConditionalExpression:return this["ternary?:"](this.recurse(ast.test),
this.recurse(ast.alternate),this.recurse(ast.consequent),context);case AST.Identifier:ensureSafeMemberName(ast.name,self.expression);return self.identifier(ast.name,self.expensiveChecks||isPossiblyDangerousMemberName(ast.name),context,create,self.expression);case AST.MemberExpression:left=this.recurse(ast.object,false,!!create);if(!ast.computed){ensureSafeMemberName(ast.property.name,self.expression);right=ast.property.name}if(ast.computed)right=this.recurse(ast.property);return ast.computed?this.computedMember(left,
right,context,create,self.expression):this.nonComputedMember(left,right,self.expensiveChecks,context,create,self.expression);case AST.CallExpression:args=[];forEach(ast.arguments,function(expr){args.push(self.recurse(expr))});if(ast.filter)right=this.$filter(ast.callee.name);if(!ast.filter)right=this.recurse(ast.callee,true);return ast.filter?function(scope,locals,assign,inputs){var values=[];for(var i=0;i<args.length;++i)values.push(args[i](scope,locals,assign,inputs));var value=right.apply(undefined,
values,inputs);return context?{context:undefined,name:undefined,value:value}:value}:function(scope,locals,assign,inputs){var rhs=right(scope,locals,assign,inputs);var value;if(rhs.value!=null){ensureSafeObject(rhs.context,self.expression);ensureSafeFunction(rhs.value,self.expression);var values=[];for(var i=0;i<args.length;++i)values.push(ensureSafeObject(args[i](scope,locals,assign,inputs),self.expression));value=ensureSafeObject(rhs.value.apply(rhs.context,values),self.expression)}return context?
{value:value}:value};case AST.AssignmentExpression:left=this.recurse(ast.left,true,1);right=this.recurse(ast.right);return function(scope,locals,assign,inputs){var lhs=left(scope,locals,assign,inputs);var rhs=right(scope,locals,assign,inputs);ensureSafeObject(lhs.value,self.expression);lhs.context[lhs.name]=rhs;return context?{value:rhs}:rhs};case AST.ArrayExpression:args=[];forEach(ast.elements,function(expr){args.push(self.recurse(expr))});return function(scope,locals,assign,inputs){var value=[];
for(var i=0;i<args.length;++i)value.push(args[i](scope,locals,assign,inputs));return context?{value:value}:value};case AST.ObjectExpression:args=[];forEach(ast.properties,function(property){args.push({key:property.key.type===AST.Identifier?property.key.name:""+property.key.value,value:self.recurse(property.value)})});return function(scope,locals,assign,inputs){var value={};for(var i=0;i<args.length;++i)value[args[i].key]=args[i].value(scope,locals,assign,inputs);return context?{value:value}:value};
case AST.ThisExpression:return function(scope){return context?{value:scope}:scope};case AST.NGValueParameter:return function(scope,locals,assign,inputs){return context?{value:assign}:assign}}},"unary+":function(argument,context){return function(scope,locals,assign,inputs){var arg=argument(scope,locals,assign,inputs);if(isDefined(arg))arg=+arg;else arg=0;return context?{value:arg}:arg}},"unary-":function(argument,context){return function(scope,locals,assign,inputs){var arg=argument(scope,locals,assign,
inputs);if(isDefined(arg))arg=-arg;else arg=0;return context?{value:arg}:arg}},"unary!":function(argument,context){return function(scope,locals,assign,inputs){var arg=!argument(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary+":function(left,right,context){return function(scope,locals,assign,inputs){var lhs=left(scope,locals,assign,inputs);var rhs=right(scope,locals,assign,inputs);var arg=plusFn(lhs,rhs);return context?{value:arg}:arg}},"binary-":function(left,right,context){return function(scope,
locals,assign,inputs){var lhs=left(scope,locals,assign,inputs);var rhs=right(scope,locals,assign,inputs);var arg=(isDefined(lhs)?lhs:0)-(isDefined(rhs)?rhs:0);return context?{value:arg}:arg}},"binary*":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)*right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary/":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)/
right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary%":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)%right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary\x3d\x3d\x3d":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)===right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary!\x3d\x3d":function(left,right,context){return function(scope,
locals,assign,inputs){var arg=left(scope,locals,assign,inputs)!==right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary\x3d\x3d":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)==right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary!\x3d":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)!=right(scope,locals,assign,inputs);return context?
{value:arg}:arg}},"binary\x3c":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)<right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary\x3e":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)>right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary\x3c\x3d":function(left,right,context){return function(scope,locals,assign,inputs){var arg=
left(scope,locals,assign,inputs)<=right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary\x3e\x3d":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)>=right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary\x26\x26":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)&&right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary||":function(left,
right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)||right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"ternary?:":function(test,alternate,consequent,context){return function(scope,locals,assign,inputs){var arg=test(scope,locals,assign,inputs)?alternate(scope,locals,assign,inputs):consequent(scope,locals,assign,inputs);return context?{value:arg}:arg}},value:function(value,context){return function(){return context?{context:undefined,
name:undefined,value:value}:value}},identifier:function(name,expensiveChecks,context,create,expression){return function(scope,locals,assign,inputs){var base=locals&&name in locals?locals:scope;if(create&&create!==1&&base&&!base[name])base[name]={};var value=base?base[name]:undefined;if(expensiveChecks)ensureSafeObject(value,expression);if(context)return{context:base,name:name,value:value};else return value}},computedMember:function(left,right,context,create,expression){return function(scope,locals,
assign,inputs){var lhs=left(scope,locals,assign,inputs);var rhs;var value;if(lhs!=null){rhs=right(scope,locals,assign,inputs);ensureSafeMemberName(rhs,expression);if(create&&create!==1&&lhs&&!lhs[rhs])lhs[rhs]={};value=lhs[rhs];ensureSafeObject(value,expression)}if(context)return{context:lhs,name:rhs,value:value};else return value}},nonComputedMember:function(left,right,expensiveChecks,context,create,expression){return function(scope,locals,assign,inputs){var lhs=left(scope,locals,assign,inputs);
if(create&&create!==1&&lhs&&!lhs[right])lhs[right]={};var value=lhs!=null?lhs[right]:undefined;if(expensiveChecks||isPossiblyDangerousMemberName(right))ensureSafeObject(value,expression);if(context)return{context:lhs,name:right,value:value};else return value}},inputs:function(input,watchId){return function(scope,value,locals,inputs){if(inputs)return inputs[watchId];return input(scope,value,locals)}}};var Parser=function(lexer,$filter,options){this.lexer=lexer;this.$filter=$filter;this.options=options;
this.ast=new AST(this.lexer);this.astCompiler=options.csp?new ASTInterpreter(this.ast,$filter):new ASTCompiler(this.ast,$filter)};Parser.prototype={constructor:Parser,parse:function(text){return this.astCompiler.compile(text,this.options.expensiveChecks)}};var getterFnCacheDefault=createMap();var getterFnCacheExpensive=createMap();function isPossiblyDangerousMemberName(name){return name=="constructor"}var objectValueOf=Object.prototype.valueOf;function getValueOf(value){return isFunction(value.valueOf)?
value.valueOf():objectValueOf.call(value)}function $ParseProvider(){var cacheDefault=createMap();var cacheExpensive=createMap();this.$get=["$filter",function($filter){var noUnsafeEval=csp().noUnsafeEval;var $parseOptions={csp:noUnsafeEval,expensiveChecks:false},$parseOptionsExpensive={csp:noUnsafeEval,expensiveChecks:true};return function $parse(exp,interceptorFn,expensiveChecks){var parsedExpression,oneTime,cacheKey;switch(typeof exp){case "string":exp=exp.trim();cacheKey=exp;var cache=expensiveChecks?
cacheExpensive:cacheDefault;parsedExpression=cache[cacheKey];if(!parsedExpression){if(exp.charAt(0)===":"&&exp.charAt(1)===":"){oneTime=true;exp=exp.substring(2)}var parseOptions=expensiveChecks?$parseOptionsExpensive:$parseOptions;var lexer=new Lexer(parseOptions);var parser=new Parser(lexer,$filter,parseOptions);parsedExpression=parser.parse(exp);if(parsedExpression.constant)parsedExpression.$$watchDelegate=constantWatchDelegate;else if(oneTime)parsedExpression.$$watchDelegate=parsedExpression.literal?
oneTimeLiteralWatchDelegate:oneTimeWatchDelegate;else if(parsedExpression.inputs)parsedExpression.$$watchDelegate=inputsWatchDelegate;cache[cacheKey]=parsedExpression}return addInterceptor(parsedExpression,interceptorFn);case "function":return addInterceptor(exp,interceptorFn);default:return noop}};function expressionInputDirtyCheck(newValue,oldValueOfValue){if(newValue==null||oldValueOfValue==null)return newValue===oldValueOfValue;if(typeof newValue==="object"){newValue=getValueOf(newValue);if(typeof newValue===
"object")return false}return newValue===oldValueOfValue||newValue!==newValue&&oldValueOfValue!==oldValueOfValue}function inputsWatchDelegate(scope,listener,objectEquality,parsedExpression,prettyPrintExpression){var inputExpressions=parsedExpression.inputs;var lastResult;if(inputExpressions.length===1){var oldInputValueOf=expressionInputDirtyCheck;inputExpressions=inputExpressions[0];return scope.$watch(function expressionInputWatch(scope){var newInputValue=inputExpressions(scope);if(!expressionInputDirtyCheck(newInputValue,
oldInputValueOf)){lastResult=parsedExpression(scope,undefined,undefined,[newInputValue]);oldInputValueOf=newInputValue&&getValueOf(newInputValue)}return lastResult},listener,objectEquality,prettyPrintExpression)}var oldInputValueOfValues=[];var oldInputValues=[];for(var i=0,ii=inputExpressions.length;i<ii;i++){oldInputValueOfValues[i]=expressionInputDirtyCheck;oldInputValues[i]=null}return scope.$watch(function expressionInputsWatch(scope){var changed=false;for(var i=0,ii=inputExpressions.length;i<
ii;i++){var newInputValue=inputExpressions[i](scope);if(changed||(changed=!expressionInputDirtyCheck(newInputValue,oldInputValueOfValues[i]))){oldInputValues[i]=newInputValue;oldInputValueOfValues[i]=newInputValue&&getValueOf(newInputValue)}}if(changed)lastResult=parsedExpression(scope,undefined,undefined,oldInputValues);return lastResult},listener,objectEquality,prettyPrintExpression)}function oneTimeWatchDelegate(scope,listener,objectEquality,parsedExpression){var unwatch,lastValue;return unwatch=
scope.$watch(function oneTimeWatch(scope){return parsedExpression(scope)},function oneTimeListener(value,old,scope){lastValue=value;if(isFunction(listener))listener.apply(this,arguments);if(isDefined(value))scope.$$postDigest(function(){if(isDefined(lastValue))unwatch()})},objectEquality)}function oneTimeLiteralWatchDelegate(scope,listener,objectEquality,parsedExpression){var unwatch,lastValue;return unwatch=scope.$watch(function oneTimeWatch(scope){return parsedExpression(scope)},function oneTimeListener(value,
old,scope){lastValue=value;if(isFunction(listener))listener.call(this,value,old,scope);if(isAllDefined(value))scope.$$postDigest(function(){if(isAllDefined(lastValue))unwatch()})},objectEquality);function isAllDefined(value){var allDefined=true;forEach(value,function(val){if(!isDefined(val))allDefined=false});return allDefined}}function constantWatchDelegate(scope,listener,objectEquality,parsedExpression){var unwatch;return unwatch=scope.$watch(function constantWatch(scope){return parsedExpression(scope)},
function constantListener(value,old,scope){if(isFunction(listener))listener.apply(this,arguments);unwatch()},objectEquality)}function addInterceptor(parsedExpression,interceptorFn){if(!interceptorFn)return parsedExpression;var watchDelegate=parsedExpression.$$watchDelegate;var regularWatch=watchDelegate!==oneTimeLiteralWatchDelegate&&watchDelegate!==oneTimeWatchDelegate;var fn=regularWatch?function regularInterceptedExpression(scope,locals,assign,inputs){var value=parsedExpression(scope,locals,assign,
inputs);return interceptorFn(value,scope,locals)}:function oneTimeInterceptedExpression(scope,locals,assign,inputs){var value=parsedExpression(scope,locals,assign,inputs);var result=interceptorFn(value,scope,locals);return isDefined(value)?result:value};if(parsedExpression.$$watchDelegate&&parsedExpression.$$watchDelegate!==inputsWatchDelegate)fn.$$watchDelegate=parsedExpression.$$watchDelegate;else if(!interceptorFn.$stateful){fn.$$watchDelegate=inputsWatchDelegate;fn.inputs=parsedExpression.inputs?
parsedExpression.inputs:[parsedExpression]}return fn}}]}function $QProvider(){this.$get=["$rootScope","$exceptionHandler",function($rootScope,$exceptionHandler){return qFactory(function(callback){$rootScope.$evalAsync(callback)},$exceptionHandler)}]}function $$QProvider(){this.$get=["$browser","$exceptionHandler",function($browser,$exceptionHandler){return qFactory(function(callback){$browser.defer(callback)},$exceptionHandler)}]}function qFactory(nextTick,exceptionHandler){var $qMinErr=minErr("$q",
TypeError);function callOnce(self,resolveFn,rejectFn){var called=false;function wrap(fn){return function(value){if(called)return;called=true;fn.call(self,value)}}return[wrap(resolveFn),wrap(rejectFn)]}var defer=function(){return new Deferred};function Promise(){this.$$state={status:0}}extend(Promise.prototype,{then:function(onFulfilled,onRejected,progressBack){if(isUndefined(onFulfilled)&&isUndefined(onRejected)&&isUndefined(progressBack))return this;var result=new Deferred;this.$$state.pending=this.$$state.pending||
[];this.$$state.pending.push([result,onFulfilled,onRejected,progressBack]);if(this.$$state.status>0)scheduleProcessQueue(this.$$state);return result.promise},"catch":function(callback){return this.then(null,callback)},"finally":function(callback,progressBack){return this.then(function(value){return handleCallback(value,true,callback)},function(error){return handleCallback(error,false,callback)},progressBack)}});function simpleBind(context,fn){return function(value){fn.call(context,value)}}function processQueue(state){var fn,
deferred,pending;pending=state.pending;state.processScheduled=false;state.pending=undefined;for(var i=0,ii=pending.length;i<ii;++i){deferred=pending[i][0];fn=pending[i][state.status];try{if(isFunction(fn))deferred.resolve(fn(state.value));else if(state.status===1)deferred.resolve(state.value);else deferred.reject(state.value)}catch(e){deferred.reject(e);exceptionHandler(e)}}}function scheduleProcessQueue(state){if(state.processScheduled||!state.pending)return;state.processScheduled=true;nextTick(function(){processQueue(state)})}
function Deferred(){this.promise=new Promise;this.resolve=simpleBind(this,this.resolve);this.reject=simpleBind(this,this.reject);this.notify=simpleBind(this,this.notify)}extend(Deferred.prototype,{resolve:function(val){if(this.promise.$$state.status)return;if(val===this.promise)this.$$reject($qMinErr("qcycle","Expected promise to be resolved with value other than itself '{0}'",val));else this.$$resolve(val)},$$resolve:function(val){var then,fns;fns=callOnce(this,this.$$resolve,this.$$reject);try{if(isObject(val)||
isFunction(val))then=val&&val.then;if(isFunction(then)){this.promise.$$state.status=-1;then.call(val,fns[0],fns[1],this.notify)}else{this.promise.$$state.value=val;this.promise.$$state.status=1;scheduleProcessQueue(this.promise.$$state)}}catch(e){fns[1](e);exceptionHandler(e)}},reject:function(reason){if(this.promise.$$state.status)return;this.$$reject(reason)},$$reject:function(reason){this.promise.$$state.value=reason;this.promise.$$state.status=2;scheduleProcessQueue(this.promise.$$state)},notify:function(progress){var callbacks=
this.promise.$$state.pending;if(this.promise.$$state.status<=0&&callbacks&&callbacks.length)nextTick(function(){var callback,result;for(var i=0,ii=callbacks.length;i<ii;i++){result=callbacks[i][0];callback=callbacks[i][3];try{result.notify(isFunction(callback)?callback(progress):progress)}catch(e){exceptionHandler(e)}}})}});var reject=function(reason){var result=new Deferred;result.reject(reason);return result.promise};var makePromise=function makePromise(value,resolved){var result=new Deferred;if(resolved)result.resolve(value);
else result.reject(value);return result.promise};var handleCallback=function handleCallback(value,isResolved,callback){var callbackOutput=null;try{if(isFunction(callback))callbackOutput=callback()}catch(e){return makePromise(e,false)}if(isPromiseLike(callbackOutput))return callbackOutput.then(function(){return makePromise(value,isResolved)},function(error){return makePromise(error,false)});else return makePromise(value,isResolved)};var when=function(value,callback,errback,progressBack){var result=
new Deferred;result.resolve(value);return result.promise.then(callback,errback,progressBack)};var resolve=when;function all(promises){var deferred=new Deferred,counter=0,results=isArray(promises)?[]:{};forEach(promises,function(promise,key){counter++;when(promise).then(function(value){if(results.hasOwnProperty(key))return;results[key]=value;if(!--counter)deferred.resolve(results)},function(reason){if(results.hasOwnProperty(key))return;deferred.reject(reason)})});if(counter===0)deferred.resolve(results);
return deferred.promise}var $Q=function Q(resolver){if(!isFunction(resolver))throw $qMinErr("norslvr","Expected resolverFn, got '{0}'",resolver);if(!(this instanceof Q))return new Q(resolver);var deferred=new Deferred;function resolveFn(value){deferred.resolve(value)}function rejectFn(reason){deferred.reject(reason)}resolver(resolveFn,rejectFn);return deferred.promise};$Q.defer=defer;$Q.reject=reject;$Q.when=when;$Q.resolve=resolve;$Q.all=all;return $Q}function $$RAFProvider(){this.$get=["$window",
"$timeout",function($window,$timeout){var requestAnimationFrame=$window.requestAnimationFrame||$window.webkitRequestAnimationFrame;var cancelAnimationFrame=$window.cancelAnimationFrame||$window.webkitCancelAnimationFrame||$window.webkitCancelRequestAnimationFrame;var rafSupported=!!requestAnimationFrame;var rafFn=rafSupported?function(fn){var id=requestAnimationFrame(fn);return function(){cancelAnimationFrame(id)}}:function(fn){var timer=$timeout(fn,16.66,false);return function(){$timeout.cancel(timer)}};
queueFn.supported=rafSupported;var cancelLastRAF;var taskCount=0;var taskQueue=[];return queueFn;function flush(){for(var i=0;i<taskQueue.length;i++){var task=taskQueue[i];if(task){taskQueue[i]=null;task()}}taskCount=taskQueue.length=0}function queueFn(asyncFn){var index=taskQueue.length;taskCount++;taskQueue.push(asyncFn);if(index===0)cancelLastRAF=rafFn(flush);return function cancelQueueFn(){if(index>=0){taskQueue[index]=null;index=null;if(--taskCount===0&&cancelLastRAF){cancelLastRAF();cancelLastRAF=
null;taskQueue.length=0}}}}}]}function $RootScopeProvider(){var TTL=10;var $rootScopeMinErr=minErr("$rootScope");var lastDirtyWatch=null;var applyAsyncId=null;this.digestTtl=function(value){if(arguments.length)TTL=value;return TTL};function createChildScopeClass(parent){function ChildScope(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=nextUid();this.$$ChildScope=null}ChildScope.prototype=parent;
return ChildScope}this.$get=["$injector","$exceptionHandler","$parse","$browser",function($injector,$exceptionHandler,$parse,$browser){function destroyChildScope($event){$event.currentScope.$$destroyed=true}function Scope(){this.$id=nextUid();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=false;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}Scope.prototype=
{constructor:Scope,$new:function(isolate,parent){var child;parent=parent||this;if(isolate){child=new Scope;child.$root=this.$root}else{if(!this.$$ChildScope)this.$$ChildScope=createChildScopeClass(this);child=new this.$$ChildScope}child.$parent=parent;child.$$prevSibling=parent.$$childTail;if(parent.$$childHead){parent.$$childTail.$$nextSibling=child;parent.$$childTail=child}else parent.$$childHead=parent.$$childTail=child;if(isolate||parent!=this)child.$on("$destroy",destroyChildScope);return child},
$watch:function(watchExp,listener,objectEquality,prettyPrintExpression){var get=$parse(watchExp);if(get.$$watchDelegate)return get.$$watchDelegate(this,listener,objectEquality,get,watchExp);var scope=this,array=scope.$$watchers,watcher={fn:listener,last:initWatchVal,get:get,exp:prettyPrintExpression||watchExp,eq:!!objectEquality};lastDirtyWatch=null;if(!isFunction(listener))watcher.fn=noop;if(!array)array=scope.$$watchers=[];array.unshift(watcher);incrementWatchersCount(this,1);return function deregisterWatch(){if(arrayRemove(array,
watcher)>=0)incrementWatchersCount(scope,-1);lastDirtyWatch=null}},$watchGroup:function(watchExpressions,listener){var oldValues=new Array(watchExpressions.length);var newValues=new Array(watchExpressions.length);var deregisterFns=[];var self=this;var changeReactionScheduled=false;var firstRun=true;if(!watchExpressions.length){var shouldCall=true;self.$evalAsync(function(){if(shouldCall)listener(newValues,newValues,self)});return function deregisterWatchGroup(){shouldCall=false}}if(watchExpressions.length===
1)return this.$watch(watchExpressions[0],function watchGroupAction(value,oldValue,scope){newValues[0]=value;oldValues[0]=oldValue;listener(newValues,value===oldValue?newValues:oldValues,scope)});forEach(watchExpressions,function(expr,i){var unwatchFn=self.$watch(expr,function watchGroupSubAction(value,oldValue){newValues[i]=value;oldValues[i]=oldValue;if(!changeReactionScheduled){changeReactionScheduled=true;self.$evalAsync(watchGroupAction)}});deregisterFns.push(unwatchFn)});function watchGroupAction(){changeReactionScheduled=
false;if(firstRun){firstRun=false;listener(newValues,newValues,self)}else listener(newValues,oldValues,self)}return function deregisterWatchGroup(){while(deregisterFns.length)deregisterFns.shift()()}},$watchCollection:function(obj,listener){$watchCollectionInterceptor.$stateful=true;var self=this;var newValue;var oldValue;var veryOldValue;var trackVeryOldValue=listener.length>1;var changeDetected=0;var changeDetector=$parse(obj,$watchCollectionInterceptor);var internalArray=[];var internalObject=
{};var initRun=true;var oldLength=0;function $watchCollectionInterceptor(_value){newValue=_value;var newLength,key,bothNaN,newItem,oldItem;if(isUndefined(newValue))return;if(!isObject(newValue)){if(oldValue!==newValue){oldValue=newValue;changeDetected++}}else if(isArrayLike(newValue)){if(oldValue!==internalArray){oldValue=internalArray;oldLength=oldValue.length=0;changeDetected++}newLength=newValue.length;if(oldLength!==newLength){changeDetected++;oldValue.length=oldLength=newLength}for(var i=0;i<
newLength;i++){oldItem=oldValue[i];newItem=newValue[i];bothNaN=oldItem!==oldItem&&newItem!==newItem;if(!bothNaN&&oldItem!==newItem){changeDetected++;oldValue[i]=newItem}}}else{if(oldValue!==internalObject){oldValue=internalObject={};oldLength=0;changeDetected++}newLength=0;for(key in newValue)if(newValue.hasOwnProperty(key)){newLength++;newItem=newValue[key];oldItem=oldValue[key];if(key in oldValue){bothNaN=oldItem!==oldItem&&newItem!==newItem;if(!bothNaN&&oldItem!==newItem){changeDetected++;oldValue[key]=
newItem}}else{oldLength++;oldValue[key]=newItem;changeDetected++}}if(oldLength>newLength){changeDetected++;for(key in oldValue)if(!newValue.hasOwnProperty(key)){oldLength--;delete oldValue[key]}}}return changeDetected}function $watchCollectionAction(){if(initRun){initRun=false;listener(newValue,newValue,self)}else listener(newValue,veryOldValue,self);if(trackVeryOldValue)if(!isObject(newValue))veryOldValue=newValue;else if(isArrayLike(newValue)){veryOldValue=new Array(newValue.length);for(var i=0;i<
newValue.length;i++)veryOldValue[i]=newValue[i]}else{veryOldValue={};for(var key in newValue)if(hasOwnProperty.call(newValue,key))veryOldValue[key]=newValue[key]}}return this.$watch(changeDetector,$watchCollectionAction)},$digest:function(){var watch,value,last,watchers,length,dirty,ttl=TTL,next,current,target=this,watchLog=[],logIdx,logMsg,asyncTask;beginPhase("$digest");$browser.$$checkUrlChange();if(this===$rootScope&&applyAsyncId!==null){$browser.defer.cancel(applyAsyncId);flushApplyAsync()}lastDirtyWatch=
null;do{dirty=false;current=target;while(asyncQueue.length){try{asyncTask=asyncQueue.shift();asyncTask.scope.$eval(asyncTask.expression,asyncTask.locals)}catch(e){$exceptionHandler(e)}lastDirtyWatch=null}traverseScopesLoop:do{if(watchers=current.$$watchers){length=watchers.length;while(length--)try{watch=watchers[length];if(watch)if((value=watch.get(current))!==(last=watch.last)&&!(watch.eq?equals(value,last):typeof value==="number"&&typeof last==="number"&&isNaN(value)&&isNaN(last))){dirty=true;
lastDirtyWatch=watch;watch.last=watch.eq?copy(value,null):value;watch.fn(value,last===initWatchVal?value:last,current);if(ttl<5){logIdx=4-ttl;if(!watchLog[logIdx])watchLog[logIdx]=[];watchLog[logIdx].push({msg:isFunction(watch.exp)?"fn: "+(watch.exp.name||watch.exp.toString()):watch.exp,newVal:value,oldVal:last})}}else if(watch===lastDirtyWatch){dirty=false;break traverseScopesLoop}}catch(e){$exceptionHandler(e)}}if(!(next=current.$$watchersCount&&current.$$childHead||current!==target&&current.$$nextSibling))while(current!==
target&&!(next=current.$$nextSibling))current=current.$parent}while(current=next);if((dirty||asyncQueue.length)&&!ttl--){clearPhase();throw $rootScopeMinErr("infdig","{0} $digest() iterations reached. Aborting!\n"+"Watchers fired in the last 5 iterations: {1}",TTL,watchLog);}}while(dirty||asyncQueue.length);clearPhase();while(postDigestQueue.length)try{postDigestQueue.shift()()}catch(e){$exceptionHandler(e)}},$destroy:function(){if(this.$$destroyed)return;var parent=this.$parent;this.$broadcast("$destroy");
this.$$destroyed=true;if(this===$rootScope)$browser.$$applicationDestroyed();incrementWatchersCount(this,-this.$$watchersCount);for(var eventName in this.$$listenerCount)decrementListenerCount(this,this.$$listenerCount[eventName],eventName);if(parent&&parent.$$childHead==this)parent.$$childHead=this.$$nextSibling;if(parent&&parent.$$childTail==this)parent.$$childTail=this.$$prevSibling;if(this.$$prevSibling)this.$$prevSibling.$$nextSibling=this.$$nextSibling;if(this.$$nextSibling)this.$$nextSibling.$$prevSibling=
this.$$prevSibling;this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=noop;this.$on=this.$watch=this.$watchGroup=function(){return noop};this.$$listeners={};this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null},$eval:function(expr,locals){return $parse(expr)(this,locals)},$evalAsync:function(expr,locals){if(!$rootScope.$$phase&&!asyncQueue.length)$browser.defer(function(){if(asyncQueue.length)$rootScope.$digest()});
asyncQueue.push({scope:this,expression:expr,locals:locals})},$$postDigest:function(fn){postDigestQueue.push(fn)},$apply:function(expr){try{beginPhase("$apply");try{return this.$eval(expr)}finally{clearPhase()}}catch(e){$exceptionHandler(e)}finally{try{$rootScope.$digest()}catch(e){$exceptionHandler(e);throw e;}}},$applyAsync:function(expr){var scope=this;expr&&applyAsyncQueue.push($applyAsyncExpression);scheduleApplyAsync();function $applyAsyncExpression(){scope.$eval(expr)}},$on:function(name,listener){var namedListeners=
this.$$listeners[name];if(!namedListeners)this.$$listeners[name]=namedListeners=[];namedListeners.push(listener);var current=this;do{if(!current.$$listenerCount[name])current.$$listenerCount[name]=0;current.$$listenerCount[name]++}while(current=current.$parent);var self=this;return function(){var indexOfListener=namedListeners.indexOf(listener);if(indexOfListener!==-1){namedListeners[indexOfListener]=null;decrementListenerCount(self,1,name)}}},$emit:function(name,args){var empty=[],namedListeners,
scope=this,stopPropagation=false,event={name:name,targetScope:scope,stopPropagation:function(){stopPropagation=true},preventDefault:function(){event.defaultPrevented=true},defaultPrevented:false},listenerArgs=concat([event],arguments,1),i,length;do{namedListeners=scope.$$listeners[name]||empty;event.currentScope=scope;for(i=0,length=namedListeners.length;i<length;i++){if(!namedListeners[i]){namedListeners.splice(i,1);i--;length--;continue}try{namedListeners[i].apply(null,listenerArgs)}catch(e){$exceptionHandler(e)}}if(stopPropagation){event.currentScope=
null;return event}scope=scope.$parent}while(scope);event.currentScope=null;return event},$broadcast:function(name,args){var target=this,current=target,next=target,event={name:name,targetScope:target,preventDefault:function(){event.defaultPrevented=true},defaultPrevented:false};if(!target.$$listenerCount[name])return event;var listenerArgs=concat([event],arguments,1),listeners,i,length;while(current=next){event.currentScope=current;listeners=current.$$listeners[name]||[];for(i=0,length=listeners.length;i<
length;i++){if(!listeners[i]){listeners.splice(i,1);i--;length--;continue}try{listeners[i].apply(null,listenerArgs)}catch(e){$exceptionHandler(e)}}if(!(next=current.$$listenerCount[name]&&current.$$childHead||current!==target&&current.$$nextSibling))while(current!==target&&!(next=current.$$nextSibling))current=current.$parent}event.currentScope=null;return event}};var $rootScope=new Scope;var asyncQueue=$rootScope.$$asyncQueue=[];var postDigestQueue=$rootScope.$$postDigestQueue=[];var applyAsyncQueue=
$rootScope.$$applyAsyncQueue=[];return $rootScope;function beginPhase(phase){if($rootScope.$$phase)throw $rootScopeMinErr("inprog","{0} already in progress",$rootScope.$$phase);$rootScope.$$phase=phase}function clearPhase(){$rootScope.$$phase=null}function incrementWatchersCount(current,count){do current.$$watchersCount+=count;while(current=current.$parent)}function decrementListenerCount(current,count,name){do{current.$$listenerCount[name]-=count;if(current.$$listenerCount[name]===0)delete current.$$listenerCount[name]}while(current=
current.$parent)}function initWatchVal(){}function flushApplyAsync(){while(applyAsyncQueue.length)try{applyAsyncQueue.shift()()}catch(e){$exceptionHandler(e)}applyAsyncId=null}function scheduleApplyAsync(){if(applyAsyncId===null)applyAsyncId=$browser.defer(function(){$rootScope.$apply(flushApplyAsync)})}}]}function $$SanitizeUriProvider(){var aHrefSanitizationWhitelist=/^\s*(https?|ftp|mailto|tel|file):/,imgSrcSanitizationWhitelist=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=
function(regexp){if(isDefined(regexp)){aHrefSanitizationWhitelist=regexp;return this}return aHrefSanitizationWhitelist};this.imgSrcSanitizationWhitelist=function(regexp){if(isDefined(regexp)){imgSrcSanitizationWhitelist=regexp;return this}return imgSrcSanitizationWhitelist};this.$get=function(){return function sanitizeUri(uri,isImage){var regex=isImage?imgSrcSanitizationWhitelist:aHrefSanitizationWhitelist;var normalizedVal;normalizedVal=urlResolve(uri).href;if(normalizedVal!==""&&!normalizedVal.match(regex))return"unsafe:"+
normalizedVal;return uri}}}var $sceMinErr=minErr("$sce");var SCE_CONTEXTS={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"};function adjustMatcher(matcher){if(matcher==="self")return matcher;else if(isString(matcher)){if(matcher.indexOf("***")>-1)throw $sceMinErr("iwcard","Illegal sequence *** in string matcher.  String: {0}",matcher);matcher=escapeForRegexp(matcher).replace("\\*\\*",".*").replace("\\*","[^:/.?\x26;]*");return new RegExp("^"+matcher+"$")}else if(isRegExp(matcher))return new RegExp("^"+
matcher.source+"$");else throw $sceMinErr("imatcher",'Matchers may only be "self", string patterns or RegExp objects');}function adjustMatchers(matchers){var adjustedMatchers=[];if(isDefined(matchers))forEach(matchers,function(matcher){adjustedMatchers.push(adjustMatcher(matcher))});return adjustedMatchers}function $SceDelegateProvider(){this.SCE_CONTEXTS=SCE_CONTEXTS;var resourceUrlWhitelist=["self"],resourceUrlBlacklist=[];this.resourceUrlWhitelist=function(value){if(arguments.length)resourceUrlWhitelist=
adjustMatchers(value);return resourceUrlWhitelist};this.resourceUrlBlacklist=function(value){if(arguments.length)resourceUrlBlacklist=adjustMatchers(value);return resourceUrlBlacklist};this.$get=["$injector",function($injector){var htmlSanitizer=function htmlSanitizer(html){throw $sceMinErr("unsafe","Attempting to use an unsafe value in a safe context.");};if($injector.has("$sanitize"))htmlSanitizer=$injector.get("$sanitize");function matchUrl(matcher,parsedUrl){if(matcher==="self")return urlIsSameOrigin(parsedUrl);
else return!!matcher.exec(parsedUrl.href)}function isResourceUrlAllowedByPolicy(url){var parsedUrl=urlResolve(url.toString());var i,n,allowed=false;for(i=0,n=resourceUrlWhitelist.length;i<n;i++)if(matchUrl(resourceUrlWhitelist[i],parsedUrl)){allowed=true;break}if(allowed)for(i=0,n=resourceUrlBlacklist.length;i<n;i++)if(matchUrl(resourceUrlBlacklist[i],parsedUrl)){allowed=false;break}return allowed}function generateHolderType(Base){var holderType=function TrustedValueHolderType(trustedValue){this.$$unwrapTrustedValue=
function(){return trustedValue}};if(Base)holderType.prototype=new Base;holderType.prototype.valueOf=function sceValueOf(){return this.$$unwrapTrustedValue()};holderType.prototype.toString=function sceToString(){return this.$$unwrapTrustedValue().toString()};return holderType}var trustedValueHolderBase=generateHolderType(),byType={};byType[SCE_CONTEXTS.HTML]=generateHolderType(trustedValueHolderBase);byType[SCE_CONTEXTS.CSS]=generateHolderType(trustedValueHolderBase);byType[SCE_CONTEXTS.URL]=generateHolderType(trustedValueHolderBase);
byType[SCE_CONTEXTS.JS]=generateHolderType(trustedValueHolderBase);byType[SCE_CONTEXTS.RESOURCE_URL]=generateHolderType(byType[SCE_CONTEXTS.URL]);function trustAs(type,trustedValue){var Constructor=byType.hasOwnProperty(type)?byType[type]:null;if(!Constructor)throw $sceMinErr("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",type,trustedValue);if(trustedValue===null||trustedValue===undefined||trustedValue==="")return trustedValue;if(typeof trustedValue!=="string")throw $sceMinErr("itype",
"Attempted to trust a non-string value in a content requiring a string: Context: {0}",type);return new Constructor(trustedValue)}function valueOf(maybeTrusted){if(maybeTrusted instanceof trustedValueHolderBase)return maybeTrusted.$$unwrapTrustedValue();else return maybeTrusted}function getTrusted(type,maybeTrusted){if(maybeTrusted===null||maybeTrusted===undefined||maybeTrusted==="")return maybeTrusted;var constructor=byType.hasOwnProperty(type)?byType[type]:null;if(constructor&&maybeTrusted instanceof
constructor)return maybeTrusted.$$unwrapTrustedValue();if(type===SCE_CONTEXTS.RESOURCE_URL)if(isResourceUrlAllowedByPolicy(maybeTrusted))return maybeTrusted;else throw $sceMinErr("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",maybeTrusted.toString());else if(type===SCE_CONTEXTS.HTML)return htmlSanitizer(maybeTrusted);throw $sceMinErr("unsafe","Attempting to use an unsafe value in a safe context.");}return{trustAs:trustAs,getTrusted:getTrusted,valueOf:valueOf}}]}
function $SceProvider(){var enabled=true;this.enabled=function(value){if(arguments.length)enabled=!!value;return enabled};this.$get=["$parse","$sceDelegate",function($parse,$sceDelegate){if(enabled&&msie<8)throw $sceMinErr("iequirks","Strict Contextual Escaping does not support Internet Explorer version \x3c 11 in quirks "+"mode.  You can fix this by adding the text \x3c!doctype html\x3e to the top of your HTML "+"document.  See http://docs.angularjs.org/api/ng.$sce for more information.");var sce=
shallowCopy(SCE_CONTEXTS);sce.isEnabled=function(){return enabled};sce.trustAs=$sceDelegate.trustAs;sce.getTrusted=$sceDelegate.getTrusted;sce.valueOf=$sceDelegate.valueOf;if(!enabled){sce.trustAs=sce.getTrusted=function(type,value){return value};sce.valueOf=identity}sce.parseAs=function sceParseAs(type,expr){var parsed=$parse(expr);if(parsed.literal&&parsed.constant)return parsed;else return $parse(expr,function(value){return sce.getTrusted(type,value)})};var parse=sce.parseAs,getTrusted=sce.getTrusted,
trustAs=sce.trustAs;forEach(SCE_CONTEXTS,function(enumValue,name){var lName=lowercase(name);sce[camelCase("parse_as_"+lName)]=function(expr){return parse(enumValue,expr)};sce[camelCase("get_trusted_"+lName)]=function(value){return getTrusted(enumValue,value)};sce[camelCase("trust_as_"+lName)]=function(value){return trustAs(enumValue,value)}});return sce}]}function $SnifferProvider(){this.$get=["$window","$document",function($window,$document){var eventSupport={},android=toInt((/android (\d+)/.exec(lowercase(($window.navigator||
{}).userAgent))||[])[1]),boxee=/Boxee/i.test(($window.navigator||{}).userAgent),document=$document[0]||{},vendorPrefix,vendorRegex=/^(Moz|webkit|ms)(?=[A-Z])/,bodyStyle=document.body&&document.body.style,transitions=false,animations=false,match;if(bodyStyle){for(var prop in bodyStyle)if(match=vendorRegex.exec(prop)){vendorPrefix=match[0];vendorPrefix=vendorPrefix.substr(0,1).toUpperCase()+vendorPrefix.substr(1);break}if(!vendorPrefix)vendorPrefix="WebkitOpacity"in bodyStyle&&"webkit";transitions=
!!("transition"in bodyStyle||vendorPrefix+"Transition"in bodyStyle);animations=!!("animation"in bodyStyle||vendorPrefix+"Animation"in bodyStyle);if(android&&(!transitions||!animations)){transitions=isString(bodyStyle.webkitTransition);animations=isString(bodyStyle.webkitAnimation)}}return{history:!!($window.history&&$window.history.pushState&&!(android<4)&&!boxee),hasEvent:function(event){if(event==="input"&&msie<=11)return false;if(isUndefined(eventSupport[event])){var divElm=document.createElement("div");
eventSupport[event]="on"+event in divElm}return eventSupport[event]},csp:csp(),vendorPrefix:vendorPrefix,transitions:transitions,animations:animations,android:android}}]}var $compileMinErr=minErr("$compile");function $TemplateRequestProvider(){this.$get=["$templateCache","$http","$q","$sce",function($templateCache,$http,$q,$sce){function handleRequestFn(tpl,ignoreRequestError){handleRequestFn.totalPendingRequests++;if(!isString(tpl)||!$templateCache.get(tpl))tpl=$sce.getTrustedResourceUrl(tpl);var transformResponse=
$http.defaults&&$http.defaults.transformResponse;if(isArray(transformResponse))transformResponse=transformResponse.filter(function(transformer){return transformer!==defaultHttpResponseTransform});else if(transformResponse===defaultHttpResponseTransform)transformResponse=null;var httpOptions={cache:$templateCache,transformResponse:transformResponse};return $http.get(tpl,httpOptions)["finally"](function(){handleRequestFn.totalPendingRequests--}).then(function(response){$templateCache.put(tpl,response.data);
return response.data},handleError);function handleError(resp){if(!ignoreRequestError)throw $compileMinErr("tpload","Failed to load template: {0} (HTTP status: {1} {2})",tpl,resp.status,resp.statusText);return $q.reject(resp)}}handleRequestFn.totalPendingRequests=0;return handleRequestFn}]}function $$TestabilityProvider(){this.$get=["$rootScope","$browser","$location",function($rootScope,$browser,$location){var testability={};testability.findBindings=function(element,expression,opt_exactMatch){var bindings=
element.getElementsByClassName("ng-binding");var matches=[];forEach(bindings,function(binding){var dataBinding=angular.element(binding).data("$binding");if(dataBinding)forEach(dataBinding,function(bindingName){if(opt_exactMatch){var matcher=new RegExp("(^|\\s)"+escapeForRegexp(expression)+"(\\s|\\||$)");if(matcher.test(bindingName))matches.push(binding)}else if(bindingName.indexOf(expression)!=-1)matches.push(binding)})});return matches};testability.findModels=function(element,expression,opt_exactMatch){var prefixes=
["ng-","data-ng-","ng\\:"];for(var p=0;p<prefixes.length;++p){var attributeEquals=opt_exactMatch?"\x3d":"*\x3d";var selector="["+prefixes[p]+"model"+attributeEquals+'"'+expression+'"]';var elements=element.querySelectorAll(selector);if(elements.length)return elements}};testability.getLocation=function(){return $location.url()};testability.setLocation=function(url){if(url!==$location.url()){$location.url(url);$rootScope.$digest()}};testability.whenStable=function(callback){$browser.notifyWhenNoOutstandingRequests(callback)};
return testability}]}function $TimeoutProvider(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function($rootScope,$browser,$q,$$q,$exceptionHandler){var deferreds={};function timeout(fn,delay,invokeApply){if(!isFunction(fn)){invokeApply=delay;delay=fn;fn=noop}var args=sliceArgs(arguments,3),skipApply=isDefined(invokeApply)&&!invokeApply,deferred=(skipApply?$$q:$q).defer(),promise=deferred.promise,timeoutId;timeoutId=$browser.defer(function(){try{deferred.resolve(fn.apply(null,
args))}catch(e){deferred.reject(e);$exceptionHandler(e)}finally{delete deferreds[promise.$$timeoutId]}if(!skipApply)$rootScope.$apply()},delay);promise.$$timeoutId=timeoutId;deferreds[timeoutId]=deferred;return promise}timeout.cancel=function(promise){if(promise&&promise.$$timeoutId in deferreds){deferreds[promise.$$timeoutId].reject("canceled");delete deferreds[promise.$$timeoutId];return $browser.defer.cancel(promise.$$timeoutId)}return false};return timeout}]}var urlParsingNode=document.createElement("a");
var originUrl=urlResolve(window.location.href);function urlResolve(url){var href=url;if(msie){urlParsingNode.setAttribute("href",href);href=urlParsingNode.href}urlParsingNode.setAttribute("href",href);return{href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,""):"",host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,""):"",hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,""):"",hostname:urlParsingNode.hostname,
port:urlParsingNode.port,pathname:urlParsingNode.pathname.charAt(0)==="/"?urlParsingNode.pathname:"/"+urlParsingNode.pathname}}function urlIsSameOrigin(requestUrl){var parsed=isString(requestUrl)?urlResolve(requestUrl):requestUrl;return parsed.protocol===originUrl.protocol&&parsed.host===originUrl.host}function $WindowProvider(){this.$get=valueFn(window)}function $$CookieReader($document){var rawDocument=$document[0]||{};var lastCookies={};var lastCookieString="";function safeDecodeURIComponent(str){try{return decodeURIComponent(str)}catch(e){return str}}
return function(){var cookieArray,cookie,i,index,name;var currentCookieString=rawDocument.cookie||"";if(currentCookieString!==lastCookieString){lastCookieString=currentCookieString;cookieArray=lastCookieString.split("; ");lastCookies={};for(i=0;i<cookieArray.length;i++){cookie=cookieArray[i];index=cookie.indexOf("\x3d");if(index>0){name=safeDecodeURIComponent(cookie.substring(0,index));if(lastCookies[name]===undefined)lastCookies[name]=safeDecodeURIComponent(cookie.substring(index+1))}}}return lastCookies}}
$$CookieReader.$inject=["$document"];function $$CookieReaderProvider(){this.$get=$$CookieReader}$FilterProvider.$inject=["$provide"];function $FilterProvider($provide){var suffix="Filter";function register(name,factory){if(isObject(name)){var filters={};forEach(name,function(filter,key){filters[key]=register(key,filter)});return filters}else return $provide.factory(name+suffix,factory)}this.register=register;this.$get=["$injector",function($injector){return function(name){return $injector.get(name+
suffix)}}];register("currency",currencyFilter);register("date",dateFilter);register("filter",filterFilter);register("json",jsonFilter);register("limitTo",limitToFilter);register("lowercase",lowercaseFilter);register("number",numberFilter);register("orderBy",orderByFilter);register("uppercase",uppercaseFilter)}function filterFilter(){return function(array,expression,comparator){if(!isArrayLike(array))if(array==null)return array;else throw minErr("filter")("notarray","Expected array but received: {0}",
array);var expressionType=getTypeForFilter(expression);var predicateFn;var matchAgainstAnyProp;switch(expressionType){case "function":predicateFn=expression;break;case "boolean":case "null":case "number":case "string":matchAgainstAnyProp=true;case "object":predicateFn=createPredicateFn(expression,comparator,matchAgainstAnyProp);break;default:return array}return Array.prototype.filter.call(array,predicateFn)}}function createPredicateFn(expression,comparator,matchAgainstAnyProp){var shouldMatchPrimitives=
isObject(expression)&&"$"in expression;var predicateFn;if(comparator===true)comparator=equals;else if(!isFunction(comparator))comparator=function(actual,expected){if(isUndefined(actual))return false;if(actual===null||expected===null)return actual===expected;if(isObject(expected)||isObject(actual)&&!hasCustomToString(actual))return false;actual=lowercase(""+actual);expected=lowercase(""+expected);return actual.indexOf(expected)!==-1};predicateFn=function(item){if(shouldMatchPrimitives&&!isObject(item))return deepCompare(item,
expression.$,comparator,false);return deepCompare(item,expression,comparator,matchAgainstAnyProp)};return predicateFn}function deepCompare(actual,expected,comparator,matchAgainstAnyProp,dontMatchWholeObject){var actualType=getTypeForFilter(actual);var expectedType=getTypeForFilter(expected);if(expectedType==="string"&&expected.charAt(0)==="!")return!deepCompare(actual,expected.substring(1),comparator,matchAgainstAnyProp);else if(isArray(actual))return actual.some(function(item){return deepCompare(item,
expected,comparator,matchAgainstAnyProp)});switch(actualType){case "object":var key;if(matchAgainstAnyProp){for(key in actual)if(key.charAt(0)!=="$"&&deepCompare(actual[key],expected,comparator,true))return true;return dontMatchWholeObject?false:deepCompare(actual,expected,comparator,false)}else if(expectedType==="object"){for(key in expected){var expectedVal=expected[key];if(isFunction(expectedVal)||isUndefined(expectedVal))continue;var matchAnyProperty=key==="$";var actualVal=matchAnyProperty?actual:
actual[key];if(!deepCompare(actualVal,expectedVal,comparator,matchAnyProperty,matchAnyProperty))return false}return true}else return comparator(actual,expected);break;case "function":return false;default:return comparator(actual,expected)}}function getTypeForFilter(val){return val===null?"null":typeof val}currencyFilter.$inject=["$locale"];function currencyFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(amount,currencySymbol,fractionSize){if(isUndefined(currencySymbol))currencySymbol=
formats.CURRENCY_SYM;if(isUndefined(fractionSize))fractionSize=formats.PATTERNS[1].maxFrac;return amount==null?amount:formatNumber(amount,formats.PATTERNS[1],formats.GROUP_SEP,formats.DECIMAL_SEP,fractionSize).replace(/\u00A4/g,currencySymbol)}}numberFilter.$inject=["$locale"];function numberFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(number,fractionSize){return number==null?number:formatNumber(number,formats.PATTERNS[0],formats.GROUP_SEP,formats.DECIMAL_SEP,fractionSize)}}
var DECIMAL_SEP=".";function formatNumber(number,pattern,groupSep,decimalSep,fractionSize){if(isObject(number))return"";var isNegative=number<0;number=Math.abs(number);var isInfinity=number===Infinity;if(!isInfinity&&!isFinite(number))return"";var numStr=number+"",formatedText="",hasExponent=false,parts=[];if(isInfinity)formatedText="\u221e";if(!isInfinity&&numStr.indexOf("e")!==-1){var match=numStr.match(/([\d\.]+)e(-?)(\d+)/);if(match&&match[2]=="-"&&match[3]>fractionSize+1)number=0;else{formatedText=
numStr;hasExponent=true}}if(!isInfinity&&!hasExponent){var fractionLen=(numStr.split(DECIMAL_SEP)[1]||"").length;if(isUndefined(fractionSize))fractionSize=Math.min(Math.max(pattern.minFrac,fractionLen),pattern.maxFrac);number=+(Math.round(+(number.toString()+"e"+fractionSize)).toString()+"e"+-fractionSize);var fraction=(""+number).split(DECIMAL_SEP);var whole=fraction[0];fraction=fraction[1]||"";var i,pos=0,lgroup=pattern.lgSize,group=pattern.gSize;if(whole.length>=lgroup+group){pos=whole.length-
lgroup;for(i=0;i<pos;i++){if((pos-i)%group===0&&i!==0)formatedText+=groupSep;formatedText+=whole.charAt(i)}}for(i=pos;i<whole.length;i++){if((whole.length-i)%lgroup===0&&i!==0)formatedText+=groupSep;formatedText+=whole.charAt(i)}while(fraction.length<fractionSize)fraction+="0";if(fractionSize&&fractionSize!=="0")formatedText+=decimalSep+fraction.substr(0,fractionSize)}else if(fractionSize>0&&number<1){formatedText=number.toFixed(fractionSize);number=parseFloat(formatedText)}if(number===0)isNegative=
false;parts.push(isNegative?pattern.negPre:pattern.posPre,formatedText,isNegative?pattern.negSuf:pattern.posSuf);return parts.join("")}function padNumber(num,digits,trim){var neg="";if(num<0){neg="-";num=-num}num=""+num;while(num.length<digits)num="0"+num;if(trim)num=num.substr(num.length-digits);return neg+num}function dateGetter(name,size,offset,trim){offset=offset||0;return function(date){var value=date["get"+name]();if(offset>0||value>-offset)value+=offset;if(value===0&&offset==-12)value=12;return padNumber(value,
size,trim)}}function dateStrGetter(name,shortForm){return function(date,formats){var value=date["get"+name]();var get=uppercase(shortForm?"SHORT"+name:name);return formats[get][value]}}function timeZoneGetter(date,formats,offset){var zone=-1*offset;var paddedZone=zone>=0?"+":"";paddedZone+=padNumber(Math[zone>0?"floor":"ceil"](zone/60),2)+padNumber(Math.abs(zone%60),2);return paddedZone}function getFirstThursdayOfYear(year){var dayOfWeekOnFirst=(new Date(year,0,1)).getDay();return new Date(year,0,
(dayOfWeekOnFirst<=4?5:12)-dayOfWeekOnFirst)}function getThursdayThisWeek(datetime){return new Date(datetime.getFullYear(),datetime.getMonth(),datetime.getDate()+(4-datetime.getDay()))}function weekGetter(size){return function(date){var firstThurs=getFirstThursdayOfYear(date.getFullYear()),thisThurs=getThursdayThisWeek(date);var diff=+thisThurs-+firstThurs,result=1+Math.round(diff/6048E5);return padNumber(result,size)}}function ampmGetter(date,formats){return date.getHours()<12?formats.AMPMS[0]:formats.AMPMS[1]}
function eraGetter(date,formats){return date.getFullYear()<=0?formats.ERAS[0]:formats.ERAS[1]}function longEraGetter(date,formats){return date.getFullYear()<=0?formats.ERANAMES[0]:formats.ERANAMES[1]}var DATE_FORMATS={yyyy:dateGetter("FullYear",4),yy:dateGetter("FullYear",2,0,true),y:dateGetter("FullYear",1),MMMM:dateStrGetter("Month"),MMM:dateStrGetter("Month",true),MM:dateGetter("Month",2,1),M:dateGetter("Month",1,1),dd:dateGetter("Date",2),d:dateGetter("Date",1),HH:dateGetter("Hours",2),H:dateGetter("Hours",
1),hh:dateGetter("Hours",2,-12),h:dateGetter("Hours",1,-12),mm:dateGetter("Minutes",2),m:dateGetter("Minutes",1),ss:dateGetter("Seconds",2),s:dateGetter("Seconds",1),sss:dateGetter("Milliseconds",3),EEEE:dateStrGetter("Day"),EEE:dateStrGetter("Day",true),a:ampmGetter,Z:timeZoneGetter,ww:weekGetter(2),w:weekGetter(1),G:eraGetter,GG:eraGetter,GGG:eraGetter,GGGG:longEraGetter};var DATE_FORMATS_SPLIT=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,NUMBER_STRING=
/^\-?\d+$/;dateFilter.$inject=["$locale"];function dateFilter($locale){var R_ISO8601_STR=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;function jsonStringToDate(string){var match;if(match=string.match(R_ISO8601_STR)){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;if(match[9]){tzHour=toInt(match[9]+match[10]);tzMin=toInt(match[9]+match[11])}dateSetter.call(date,
toInt(match[1]),toInt(match[2])-1,toInt(match[3]));var h=toInt(match[4]||0)-tzHour;var m=toInt(match[5]||0)-tzMin;var s=toInt(match[6]||0);var ms=Math.round(parseFloat("0."+(match[7]||0))*1E3);timeSetter.call(date,h,m,s,ms);return date}return string}return function(date,format,timezone){var text="",parts=[],fn,match;format=format||"mediumDate";format=$locale.DATETIME_FORMATS[format]||format;if(isString(date))date=NUMBER_STRING.test(date)?toInt(date):jsonStringToDate(date);if(isNumber(date))date=new Date(date);
if(!isDate(date)||!isFinite(date.getTime()))return date;while(format){match=DATE_FORMATS_SPLIT.exec(format);if(match){parts=concat(parts,match,1);format=parts.pop()}else{parts.push(format);format=null}}var dateTimezoneOffset=date.getTimezoneOffset();if(timezone){dateTimezoneOffset=timezoneToOffset(timezone,date.getTimezoneOffset());date=convertTimezoneToLocal(date,timezone,true)}forEach(parts,function(value){fn=DATE_FORMATS[value];text+=fn?fn(date,$locale.DATETIME_FORMATS,dateTimezoneOffset):value.replace(/(^'|'$)/g,
"").replace(/''/g,"'")});return text}}function jsonFilter(){return function(object,spacing){if(isUndefined(spacing))spacing=2;return toJson(object,spacing)}}var lowercaseFilter=valueFn(lowercase);var uppercaseFilter=valueFn(uppercase);function limitToFilter(){return function(input,limit,begin){if(Math.abs(Number(limit))===Infinity)limit=Number(limit);else limit=toInt(limit);if(isNaN(limit))return input;if(isNumber(input))input=input.toString();if(!isArray(input)&&!isString(input))return input;begin=
!begin||isNaN(begin)?0:toInt(begin);begin=begin<0&&begin>=-input.length?input.length+begin:begin;if(limit>=0)return input.slice(begin,begin+limit);else if(begin===0)return input.slice(limit,input.length);else return input.slice(Math.max(0,begin+limit),begin)}}orderByFilter.$inject=["$parse"];function orderByFilter($parse){return function(array,sortPredicate,reverseOrder){if(!isArrayLike(array))return array;if(!isArray(sortPredicate))sortPredicate=[sortPredicate];if(sortPredicate.length===0)sortPredicate=
["+"];var predicates=processPredicates(sortPredicate,reverseOrder);predicates.push({get:function(){return{}},descending:reverseOrder?-1:1});var compareValues=Array.prototype.map.call(array,getComparisonObject);compareValues.sort(doComparison);array=compareValues.map(function(item){return item.value});return array;function getComparisonObject(value,index){return{value:value,predicateValues:predicates.map(function(predicate){return getPredicateValue(predicate.get(value),index)})}}function doComparison(v1,
v2){var result=0;for(var index=0,length=predicates.length;index<length;++index){result=compare(v1.predicateValues[index],v2.predicateValues[index])*predicates[index].descending;if(result)break}return result}};function processPredicates(sortPredicate,reverseOrder){reverseOrder=reverseOrder?-1:1;return sortPredicate.map(function(predicate){var descending=1,get=identity;if(isFunction(predicate))get=predicate;else if(isString(predicate)){if(predicate.charAt(0)=="+"||predicate.charAt(0)=="-"){descending=
predicate.charAt(0)=="-"?-1:1;predicate=predicate.substring(1)}if(predicate!==""){get=$parse(predicate);if(get.constant){var key=get();get=function(value){return value[key]}}}}return{get:get,descending:descending*reverseOrder}})}function isPrimitive(value){switch(typeof value){case "number":case "boolean":case "string":return true;default:return false}}function objectValue(value,index){if(typeof value.valueOf==="function"){value=value.valueOf();if(isPrimitive(value))return value}if(hasCustomToString(value)){value=
value.toString();if(isPrimitive(value))return value}return index}function getPredicateValue(value,index){var type=typeof value;if(value===null){type="string";value="null"}else if(type==="string")value=value.toLowerCase();else if(type==="object")value=objectValue(value,index);return{value:value,type:type}}function compare(v1,v2){var result=0;if(v1.type===v2.type){if(v1.value!==v2.value)result=v1.value<v2.value?-1:1}else result=v1.type<v2.type?-1:1;return result}}function ngDirective(directive){if(isFunction(directive))directive=
{link:directive};directive.restrict=directive.restrict||"AC";return valueFn(directive)}var htmlAnchorDirective=valueFn({restrict:"E",compile:function(element,attr){if(!attr.href&&!attr.xlinkHref)return function(scope,element){if(element[0].nodeName.toLowerCase()!=="a")return;var href=toString.call(element.prop("href"))==="[object SVGAnimatedString]"?"xlink:href":"href";element.on("click",function(event){if(!element.attr(href))event.preventDefault()})}}});var ngAttributeAliasDirectives={};forEach(BOOLEAN_ATTR,
function(propName,attrName){if(propName=="multiple")return;function defaultLinkFn(scope,element,attr){scope.$watch(attr[normalized],function ngBooleanAttrWatchAction(value){attr.$set(attrName,!!value)})}var normalized=directiveNormalize("ng-"+attrName);var linkFn=defaultLinkFn;if(propName==="checked")linkFn=function(scope,element,attr){if(attr.ngModel!==attr[normalized])defaultLinkFn(scope,element,attr)};ngAttributeAliasDirectives[normalized]=function(){return{restrict:"A",priority:100,link:linkFn}}});
forEach(ALIASED_ATTR,function(htmlAttr,ngAttr){ngAttributeAliasDirectives[ngAttr]=function(){return{priority:100,link:function(scope,element,attr){if(ngAttr==="ngPattern"&&attr.ngPattern.charAt(0)=="/"){var match=attr.ngPattern.match(REGEX_STRING_REGEXP);if(match){attr.$set("ngPattern",new RegExp(match[1],match[2]));return}}scope.$watch(attr[ngAttr],function ngAttrAliasWatchAction(value){attr.$set(ngAttr,value)})}}}});forEach(["src","srcset","href"],function(attrName){var normalized=directiveNormalize("ng-"+
attrName);ngAttributeAliasDirectives[normalized]=function(){return{priority:99,link:function(scope,element,attr){var propName=attrName,name=attrName;if(attrName==="href"&&toString.call(element.prop("href"))==="[object SVGAnimatedString]"){name="xlinkHref";attr.$attr[name]="xlink:href";propName=null}attr.$observe(normalized,function(value){if(!value){if(attrName==="href")attr.$set(name,null);return}attr.$set(name,value);if(msie&&propName)element.prop(propName,attr[name])})}}}});var nullFormCtrl={$addControl:noop,
$$renameControl:nullFormRenameControl,$removeControl:noop,$setValidity:noop,$setDirty:noop,$setPristine:noop,$setSubmitted:noop},SUBMITTED_CLASS="ng-submitted";function nullFormRenameControl(control,name){control.$name=name}FormController.$inject=["$element","$attrs","$scope","$animate","$interpolate"];function FormController(element,attrs,$scope,$animate,$interpolate){var form=this,controls=[];var parentForm=form.$$parentForm=element.parent().controller("form")||nullFormCtrl;form.$error={};form.$$success=
{};form.$pending=undefined;form.$name=$interpolate(attrs.name||attrs.ngForm||"")($scope);form.$dirty=false;form.$pristine=true;form.$valid=true;form.$invalid=false;form.$submitted=false;parentForm.$addControl(form);form.$rollbackViewValue=function(){forEach(controls,function(control){control.$rollbackViewValue()})};form.$commitViewValue=function(){forEach(controls,function(control){control.$commitViewValue()})};form.$addControl=function(control){assertNotHasOwnProperty(control.$name,"input");controls.push(control);
if(control.$name)form[control.$name]=control};form.$$renameControl=function(control,newName){var oldName=control.$name;if(form[oldName]===control)delete form[oldName];form[newName]=control;control.$name=newName};form.$removeControl=function(control){if(control.$name&&form[control.$name]===control)delete form[control.$name];forEach(form.$pending,function(value,name){form.$setValidity(name,null,control)});forEach(form.$error,function(value,name){form.$setValidity(name,null,control)});forEach(form.$$success,
function(value,name){form.$setValidity(name,null,control)});arrayRemove(controls,control)};addSetValidityMethod({ctrl:this,$element:element,set:function(object,property,controller){var list=object[property];if(!list)object[property]=[controller];else{var index=list.indexOf(controller);if(index===-1)list.push(controller)}},unset:function(object,property,controller){var list=object[property];if(!list)return;arrayRemove(list,controller);if(list.length===0)delete object[property]},parentForm:parentForm,
$animate:$animate});form.$setDirty=function(){$animate.removeClass(element,PRISTINE_CLASS);$animate.addClass(element,DIRTY_CLASS);form.$dirty=true;form.$pristine=false;parentForm.$setDirty()};form.$setPristine=function(){$animate.setClass(element,PRISTINE_CLASS,DIRTY_CLASS+" "+SUBMITTED_CLASS);form.$dirty=false;form.$pristine=true;form.$submitted=false;forEach(controls,function(control){control.$setPristine()})};form.$setUntouched=function(){forEach(controls,function(control){control.$setUntouched()})};
form.$setSubmitted=function(){$animate.addClass(element,SUBMITTED_CLASS);form.$submitted=true;parentForm.$setSubmitted()}}var formDirectiveFactory=function(isNgForm){return["$timeout","$parse",function($timeout,$parse){var formDirective={name:"form",restrict:isNgForm?"EAC":"E",controller:FormController,compile:function ngFormCompile(formElement,attr){formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);var nameAttr=attr.name?"name":isNgForm&&attr.ngForm?"ngForm":false;return{pre:function ngFormPreLink(scope,
formElement,attr,controller){if(!("action"in attr)){var handleFormSubmission=function(event){scope.$apply(function(){controller.$commitViewValue();controller.$setSubmitted()});event.preventDefault()};addEventListenerFn(formElement[0],"submit",handleFormSubmission);formElement.on("$destroy",function(){$timeout(function(){removeEventListenerFn(formElement[0],"submit",handleFormSubmission)},0,false)})}var parentFormCtrl=controller.$$parentForm;var setter=nameAttr?getSetter(controller.$name):noop;if(nameAttr){setter(scope,
controller);attr.$observe(nameAttr,function(newValue){if(controller.$name===newValue)return;setter(scope,undefined);parentFormCtrl.$$renameControl(controller,newValue);setter=getSetter(controller.$name);setter(scope,controller)})}formElement.on("$destroy",function(){parentFormCtrl.$removeControl(controller);setter(scope,undefined);extend(controller,nullFormCtrl)})}}}};return formDirective;function getSetter(expression){if(expression==="")return $parse('this[""]').assign;return $parse(expression).assign||
noop}}]};var formDirective=formDirectiveFactory();var ngFormDirective=formDirectiveFactory(true);var ISO_DATE_REGEXP=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/;var URL_REGEXP=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/;var EMAIL_REGEXP=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;var NUMBER_REGEXP=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/;var DATE_REGEXP=/^(\d{4})-(\d{2})-(\d{2})$/;
var DATETIMELOCAL_REGEXP=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/;var WEEK_REGEXP=/^(\d{4})-W(\d\d)$/;var MONTH_REGEXP=/^(\d{4})-(\d\d)$/;var TIME_REGEXP=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/;var inputType={"text":textInputType,"date":createDateInputType("date",DATE_REGEXP,createDateParser(DATE_REGEXP,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":createDateInputType("datetimelocal",DATETIMELOCAL_REGEXP,createDateParser(DATETIMELOCAL_REGEXP,["yyyy","MM","dd","HH","mm",
"ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),"time":createDateInputType("time",TIME_REGEXP,createDateParser(TIME_REGEXP,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),"week":createDateInputType("week",WEEK_REGEXP,weekParser,"yyyy-Www"),"month":createDateInputType("month",MONTH_REGEXP,createDateParser(MONTH_REGEXP,["yyyy","MM"]),"yyyy-MM"),"number":numberInputType,"url":urlInputType,"email":emailInputType,"radio":radioInputType,"checkbox":checkboxInputType,"hidden":noop,"button":noop,"submit":noop,"reset":noop,
"file":noop};function stringBasedInputType(ctrl){ctrl.$formatters.push(function(value){return ctrl.$isEmpty(value)?value:value.toString()})}function textInputType(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(scope,element,attr,ctrl,$sniffer,$browser);stringBasedInputType(ctrl)}function baseInputType(scope,element,attr,ctrl,$sniffer,$browser){var type=lowercase(element[0].type);if(!$sniffer.android){var composing=false;element.on("compositionstart",function(data){composing=true});element.on("compositionend",
function(){composing=false;listener()})}var listener=function(ev){if(timeout){$browser.defer.cancel(timeout);timeout=null}if(composing)return;var value=element.val(),event=ev&&ev.type;if(type!=="password"&&(!attr.ngTrim||attr.ngTrim!=="false"))value=trim(value);if(ctrl.$viewValue!==value||value===""&&ctrl.$$hasNativeValidators)ctrl.$setViewValue(value,event)};if($sniffer.hasEvent("input"))element.on("input",listener);else{var timeout;var deferListener=function(ev,input,origValue){if(!timeout)timeout=
$browser.defer(function(){timeout=null;if(!input||input.value!==origValue)listener(ev)})};element.on("keydown",function(event){var key=event.keyCode;if(key===91||15<key&&key<19||37<=key&&key<=40)return;deferListener(event,this,this.value)});if($sniffer.hasEvent("paste"))element.on("paste cut",deferListener)}element.on("change",listener);ctrl.$render=function(){var value=ctrl.$isEmpty(ctrl.$viewValue)?"":ctrl.$viewValue;if(element.val()!==value)element.val(value)}}function weekParser(isoWeek,existingDate){if(isDate(isoWeek))return isoWeek;
if(isString(isoWeek)){WEEK_REGEXP.lastIndex=0;var parts=WEEK_REGEXP.exec(isoWeek);if(parts){var year=+parts[1],week=+parts[2],hours=0,minutes=0,seconds=0,milliseconds=0,firstThurs=getFirstThursdayOfYear(year),addDays=(week-1)*7;if(existingDate){hours=existingDate.getHours();minutes=existingDate.getMinutes();seconds=existingDate.getSeconds();milliseconds=existingDate.getMilliseconds()}return new Date(year,0,firstThurs.getDate()+addDays,hours,minutes,seconds,milliseconds)}}return NaN}function createDateParser(regexp,
mapping){return function(iso,date){var parts,map;if(isDate(iso))return iso;if(isString(iso)){if(iso.charAt(0)=='"'&&iso.charAt(iso.length-1)=='"')iso=iso.substring(1,iso.length-1);if(ISO_DATE_REGEXP.test(iso))return new Date(iso);regexp.lastIndex=0;parts=regexp.exec(iso);if(parts){parts.shift();if(date)map={yyyy:date.getFullYear(),MM:date.getMonth()+1,dd:date.getDate(),HH:date.getHours(),mm:date.getMinutes(),ss:date.getSeconds(),sss:date.getMilliseconds()/1E3};else map={yyyy:1970,MM:1,dd:1,HH:0,mm:0,
ss:0,sss:0};forEach(parts,function(part,index){if(index<mapping.length)map[mapping[index]]=+part});return new Date(map.yyyy,map.MM-1,map.dd,map.HH,map.mm,map.ss||0,map.sss*1E3||0)}}return NaN}}function createDateInputType(type,regexp,parseDate,format){return function dynamicDateInputType(scope,element,attr,ctrl,$sniffer,$browser,$filter){badInputChecker(scope,element,attr,ctrl);baseInputType(scope,element,attr,ctrl,$sniffer,$browser);var timezone=ctrl&&ctrl.$options&&ctrl.$options.timezone;var previousDate;
ctrl.$$parserName=type;ctrl.$parsers.push(function(value){if(ctrl.$isEmpty(value))return null;if(regexp.test(value)){var parsedDate=parseDate(value,previousDate);if(timezone)parsedDate=convertTimezoneToLocal(parsedDate,timezone);return parsedDate}return undefined});ctrl.$formatters.push(function(value){if(value&&!isDate(value))throw ngModelMinErr("datefmt","Expected `{0}` to be a date",value);if(isValidDate(value)){previousDate=value;if(previousDate&&timezone)previousDate=convertTimezoneToLocal(previousDate,
timezone,true);return $filter("date")(value,format,timezone)}else{previousDate=null;return""}});if(isDefined(attr.min)||attr.ngMin){var minVal;ctrl.$validators.min=function(value){return!isValidDate(value)||isUndefined(minVal)||parseDate(value)>=minVal};attr.$observe("min",function(val){minVal=parseObservedDateValue(val);ctrl.$validate()})}if(isDefined(attr.max)||attr.ngMax){var maxVal;ctrl.$validators.max=function(value){return!isValidDate(value)||isUndefined(maxVal)||parseDate(value)<=maxVal};attr.$observe("max",
function(val){maxVal=parseObservedDateValue(val);ctrl.$validate()})}function isValidDate(value){return value&&!(value.getTime&&value.getTime()!==value.getTime())}function parseObservedDateValue(val){return isDefined(val)?isDate(val)?val:parseDate(val):undefined}}}function badInputChecker(scope,element,attr,ctrl){var node=element[0];var nativeValidation=ctrl.$$hasNativeValidators=isObject(node.validity);if(nativeValidation)ctrl.$parsers.push(function(value){var validity=element.prop(VALIDITY_STATE_PROPERTY)||
{};return validity.badInput&&!validity.typeMismatch?undefined:value})}function numberInputType(scope,element,attr,ctrl,$sniffer,$browser){badInputChecker(scope,element,attr,ctrl);baseInputType(scope,element,attr,ctrl,$sniffer,$browser);ctrl.$$parserName="number";ctrl.$parsers.push(function(value){if(ctrl.$isEmpty(value))return null;if(NUMBER_REGEXP.test(value))return parseFloat(value);return undefined});ctrl.$formatters.push(function(value){if(!ctrl.$isEmpty(value)){if(!isNumber(value))throw ngModelMinErr("numfmt",
"Expected `{0}` to be a number",value);value=value.toString()}return value});if(isDefined(attr.min)||attr.ngMin){var minVal;ctrl.$validators.min=function(value){return ctrl.$isEmpty(value)||isUndefined(minVal)||value>=minVal};attr.$observe("min",function(val){if(isDefined(val)&&!isNumber(val))val=parseFloat(val,10);minVal=isNumber(val)&&!isNaN(val)?val:undefined;ctrl.$validate()})}if(isDefined(attr.max)||attr.ngMax){var maxVal;ctrl.$validators.max=function(value){return ctrl.$isEmpty(value)||isUndefined(maxVal)||
value<=maxVal};attr.$observe("max",function(val){if(isDefined(val)&&!isNumber(val))val=parseFloat(val,10);maxVal=isNumber(val)&&!isNaN(val)?val:undefined;ctrl.$validate()})}}function urlInputType(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(scope,element,attr,ctrl,$sniffer,$browser);stringBasedInputType(ctrl);ctrl.$$parserName="url";ctrl.$validators.url=function(modelValue,viewValue){var value=modelValue||viewValue;return ctrl.$isEmpty(value)||URL_REGEXP.test(value)}}function emailInputType(scope,
element,attr,ctrl,$sniffer,$browser){baseInputType(scope,element,attr,ctrl,$sniffer,$browser);stringBasedInputType(ctrl);ctrl.$$parserName="email";ctrl.$validators.email=function(modelValue,viewValue){var value=modelValue||viewValue;return ctrl.$isEmpty(value)||EMAIL_REGEXP.test(value)}}function radioInputType(scope,element,attr,ctrl){if(isUndefined(attr.name))element.attr("name",nextUid());var listener=function(ev){if(element[0].checked)ctrl.$setViewValue(attr.value,ev&&ev.type)};element.on("click",
listener);ctrl.$render=function(){var value=attr.value;element[0].checked=value==ctrl.$viewValue};attr.$observe("value",ctrl.$render)}function parseConstantExpr($parse,context,name,expression,fallback){var parseFn;if(isDefined(expression)){parseFn=$parse(expression);if(!parseFn.constant)throw ngModelMinErr("constexpr","Expected constant expression for `{0}`, but saw "+"`{1}`.",name,expression);return parseFn(context)}return fallback}function checkboxInputType(scope,element,attr,ctrl,$sniffer,$browser,
$filter,$parse){var trueValue=parseConstantExpr($parse,scope,"ngTrueValue",attr.ngTrueValue,true);var falseValue=parseConstantExpr($parse,scope,"ngFalseValue",attr.ngFalseValue,false);var listener=function(ev){ctrl.$setViewValue(element[0].checked,ev&&ev.type)};element.on("click",listener);ctrl.$render=function(){element[0].checked=ctrl.$viewValue};ctrl.$isEmpty=function(value){return value===false};ctrl.$formatters.push(function(value){return equals(value,trueValue)});ctrl.$parsers.push(function(value){return value?
trueValue:falseValue})}var inputDirective=["$browser","$sniffer","$filter","$parse",function($browser,$sniffer,$filter,$parse){return{restrict:"E",require:["?ngModel"],link:{pre:function(scope,element,attr,ctrls){if(ctrls[0])(inputType[lowercase(attr.type)]||inputType.text)(scope,element,attr,ctrls[0],$sniffer,$browser,$filter,$parse)}}}}];var CONSTANT_VALUE_REGEXP=/^(true|false|\d+)$/;var ngValueDirective=function(){return{restrict:"A",priority:100,compile:function(tpl,tplAttr){if(CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue))return function ngValueConstantLink(scope,
elm,attr){attr.$set("value",scope.$eval(attr.ngValue))};else return function ngValueLink(scope,elm,attr){scope.$watch(attr.ngValue,function valueWatchAction(value){attr.$set("value",value)})}}}};var ngBindDirective=["$compile",function($compile){return{restrict:"AC",compile:function ngBindCompile(templateElement){$compile.$$addBindingClass(templateElement);return function ngBindLink(scope,element,attr){$compile.$$addBindingInfo(element,attr.ngBind);element=element[0];scope.$watch(attr.ngBind,function ngBindWatchAction(value){element.textContent=
value===undefined?"":value})}}}}];var ngBindTemplateDirective=["$interpolate","$compile",function($interpolate,$compile){return{compile:function ngBindTemplateCompile(templateElement){$compile.$$addBindingClass(templateElement);return function ngBindTemplateLink(scope,element,attr){var interpolateFn=$interpolate(element.attr(attr.$attr.ngBindTemplate));$compile.$$addBindingInfo(element,interpolateFn.expressions);element=element[0];attr.$observe("ngBindTemplate",function(value){element.textContent=
value===undefined?"":value})}}}}];var ngBindHtmlDirective=["$sce","$parse","$compile",function($sce,$parse,$compile){return{restrict:"A",compile:function ngBindHtmlCompile(tElement,tAttrs){var ngBindHtmlGetter=$parse(tAttrs.ngBindHtml);var ngBindHtmlWatch=$parse(tAttrs.ngBindHtml,function getStringValue(value){return(value||"").toString()});$compile.$$addBindingClass(tElement);return function ngBindHtmlLink(scope,element,attr){$compile.$$addBindingInfo(element,attr.ngBindHtml);scope.$watch(ngBindHtmlWatch,
function ngBindHtmlWatchAction(){element.html($sce.getTrustedHtml(ngBindHtmlGetter(scope))||"")})}}}}];var ngChangeDirective=valueFn({restrict:"A",require:"ngModel",link:function(scope,element,attr,ctrl){ctrl.$viewChangeListeners.push(function(){scope.$eval(attr.ngChange)})}});function classDirective(name,selector){name="ngClass"+name;return["$animate",function($animate){return{restrict:"AC",link:function(scope,element,attr){var oldVal;scope.$watch(attr[name],ngClassWatchAction,true);attr.$observe("class",
function(value){ngClassWatchAction(scope.$eval(attr[name]))});if(name!=="ngClass")scope.$watch("$index",function($index,old$index){var mod=$index&1;if(mod!==(old$index&1)){var classes=arrayClasses(scope.$eval(attr[name]));mod===selector?addClasses(classes):removeClasses(classes)}});function addClasses(classes){var newClasses=digestClassCounts(classes,1);attr.$addClass(newClasses)}function removeClasses(classes){var newClasses=digestClassCounts(classes,-1);attr.$removeClass(newClasses)}function digestClassCounts(classes,
count){var classCounts=element.data("$classCounts")||createMap();var classesToUpdate=[];forEach(classes,function(className){if(count>0||classCounts[className]){classCounts[className]=(classCounts[className]||0)+count;if(classCounts[className]===+(count>0))classesToUpdate.push(className)}});element.data("$classCounts",classCounts);return classesToUpdate.join(" ")}function updateClasses(oldClasses,newClasses){var toAdd=arrayDifference(newClasses,oldClasses);var toRemove=arrayDifference(oldClasses,newClasses);
toAdd=digestClassCounts(toAdd,1);toRemove=digestClassCounts(toRemove,-1);if(toAdd&&toAdd.length)$animate.addClass(element,toAdd);if(toRemove&&toRemove.length)$animate.removeClass(element,toRemove)}function ngClassWatchAction(newVal){if(selector===true||scope.$index%2===selector){var newClasses=arrayClasses(newVal||[]);if(!oldVal)addClasses(newClasses);else if(!equals(newVal,oldVal)){var oldClasses=arrayClasses(oldVal);updateClasses(oldClasses,newClasses)}}oldVal=shallowCopy(newVal)}}};function arrayDifference(tokens1,
tokens2){var values=[];outer:for(var i=0;i<tokens1.length;i++){var token=tokens1[i];for(var j=0;j<tokens2.length;j++)if(token==tokens2[j])continue outer;values.push(token)}return values}function arrayClasses(classVal){var classes=[];if(isArray(classVal)){forEach(classVal,function(v){classes=classes.concat(arrayClasses(v))});return classes}else if(isString(classVal))return classVal.split(" ");else if(isObject(classVal)){forEach(classVal,function(v,k){if(v)classes=classes.concat(k.split(" "))});return classes}return classVal}
}]}var ngClassDirective=classDirective("",true);var ngClassOddDirective=classDirective("Odd",0);var ngClassEvenDirective=classDirective("Even",1);var ngCloakDirective=ngDirective({compile:function(element,attr){attr.$set("ngCloak",undefined);element.removeClass("ng-cloak")}});var ngControllerDirective=[function(){return{restrict:"A",scope:true,controller:"@",priority:500}}];var ngEventDirectives={};var forceAsyncEvents={"blur":true,"focus":true};forEach("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),
function(eventName){var directiveName=directiveNormalize("ng-"+eventName);ngEventDirectives[directiveName]=["$parse","$rootScope",function($parse,$rootScope){return{restrict:"A",compile:function($element,attr){var fn=$parse(attr[directiveName],null,true);return function ngEventHandler(scope,element){element.on(eventName,function(event){var callback=function(){fn(scope,{$event:event})};if(forceAsyncEvents[eventName]&&$rootScope.$$phase)scope.$evalAsync(callback);else scope.$apply(callback)})}}}}]});
var ngIfDirective=["$animate",function($animate){return{multiElement:true,transclude:"element",priority:600,terminal:true,restrict:"A",$$tlb:true,link:function($scope,$element,$attr,ctrl,$transclude){var block,childScope,previousElements;$scope.$watch($attr.ngIf,function ngIfWatchAction(value){if(value){if(!childScope)$transclude(function(clone,newScope){childScope=newScope;clone[clone.length++]=document.createComment(" end ngIf: "+$attr.ngIf+" ");block={clone:clone};$animate.enter(clone,$element.parent(),
$element)})}else{if(previousElements){previousElements.remove();previousElements=null}if(childScope){childScope.$destroy();childScope=null}if(block){previousElements=getBlockNodes(block.clone);$animate.leave(previousElements).then(function(){previousElements=null});block=null}}})}}}];var ngIncludeDirective=["$templateRequest","$anchorScroll","$animate",function($templateRequest,$anchorScroll,$animate){return{restrict:"ECA",priority:400,terminal:true,transclude:"element",controller:angular.noop,compile:function(element,
attr){var srcExp=attr.ngInclude||attr.src,onloadExp=attr.onload||"",autoScrollExp=attr.autoscroll;return function(scope,$element,$attr,ctrl,$transclude){var changeCounter=0,currentScope,previousElement,currentElement;var cleanupLastIncludeContent=function(){if(previousElement){previousElement.remove();previousElement=null}if(currentScope){currentScope.$destroy();currentScope=null}if(currentElement){$animate.leave(currentElement).then(function(){previousElement=null});previousElement=currentElement;
currentElement=null}};scope.$watch(srcExp,function ngIncludeWatchAction(src){var afterAnimation=function(){if(isDefined(autoScrollExp)&&(!autoScrollExp||scope.$eval(autoScrollExp)))$anchorScroll()};var thisChangeId=++changeCounter;if(src){$templateRequest(src,true).then(function(response){if(thisChangeId!==changeCounter)return;var newScope=scope.$new();ctrl.template=response;var clone=$transclude(newScope,function(clone){cleanupLastIncludeContent();$animate.enter(clone,null,$element).then(afterAnimation)});
currentScope=newScope;currentElement=clone;currentScope.$emit("$includeContentLoaded",src);scope.$eval(onloadExp)},function(){if(thisChangeId===changeCounter){cleanupLastIncludeContent();scope.$emit("$includeContentError",src)}});scope.$emit("$includeContentRequested",src)}else{cleanupLastIncludeContent();ctrl.template=null}})}}}}];var ngIncludeFillContentDirective=["$compile",function($compile){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(scope,$element,$attr,ctrl){if(/SVG/.test($element[0].toString())){$element.empty();
$compile(jqLiteBuildFragment(ctrl.template,document).childNodes)(scope,function namespaceAdaptedClone(clone){$element.append(clone)},{futureParentElement:$element});return}$element.html(ctrl.template);$compile($element.contents())(scope)}}}];var ngInitDirective=ngDirective({priority:450,compile:function(){return{pre:function(scope,element,attrs){scope.$eval(attrs.ngInit)}}}});var ngListDirective=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(scope,element,attr,ctrl){var ngList=
element.attr(attr.$attr.ngList)||", ";var trimValues=attr.ngTrim!=="false";var separator=trimValues?trim(ngList):ngList;var parse=function(viewValue){if(isUndefined(viewValue))return;var list=[];if(viewValue)forEach(viewValue.split(separator),function(value){if(value)list.push(trimValues?trim(value):value)});return list};ctrl.$parsers.push(parse);ctrl.$formatters.push(function(value){if(isArray(value))return value.join(ngList);return undefined});ctrl.$isEmpty=function(value){return!value||!value.length}}}};
var VALID_CLASS="ng-valid",INVALID_CLASS="ng-invalid",PRISTINE_CLASS="ng-pristine",DIRTY_CLASS="ng-dirty",UNTOUCHED_CLASS="ng-untouched",TOUCHED_CLASS="ng-touched",PENDING_CLASS="ng-pending";var ngModelMinErr=minErr("ngModel");var NgModelController=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function($scope,$exceptionHandler,$attr,$element,$parse,$animate,$timeout,$rootScope,$q,$interpolate){this.$viewValue=Number.NaN;this.$modelValue=
Number.NaN;this.$$rawModelValue=undefined;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=true;this.$touched=false;this.$pristine=true;this.$dirty=false;this.$valid=true;this.$invalid=false;this.$error={};this.$$success={};this.$pending=undefined;this.$name=$interpolate($attr.name||"",false)($scope);var parsedNgModel=$parse($attr.ngModel),parsedNgModelAssign=parsedNgModel.assign,ngModelGet=parsedNgModel,ngModelSet=parsedNgModelAssign,
pendingDebounce=null,parserValid,ctrl=this;this.$$setOptions=function(options){ctrl.$options=options;if(options&&options.getterSetter){var invokeModelGetter=$parse($attr.ngModel+"()"),invokeModelSetter=$parse($attr.ngModel+"($$$p)");ngModelGet=function($scope){var modelValue=parsedNgModel($scope);if(isFunction(modelValue))modelValue=invokeModelGetter($scope);return modelValue};ngModelSet=function($scope,newValue){if(isFunction(parsedNgModel($scope)))invokeModelSetter($scope,{$$$p:ctrl.$modelValue});
else parsedNgModelAssign($scope,ctrl.$modelValue)}}else if(!parsedNgModel.assign)throw ngModelMinErr("nonassign","Expression '{0}' is non-assignable. Element: {1}",$attr.ngModel,startingTag($element));};this.$render=noop;this.$isEmpty=function(value){return isUndefined(value)||value===""||value===null||value!==value};var parentForm=$element.inheritedData("$formController")||nullFormCtrl,currentValidationRunId=0;addSetValidityMethod({ctrl:this,$element:$element,set:function(object,property){object[property]=
true},unset:function(object,property){delete object[property]},parentForm:parentForm,$animate:$animate});this.$setPristine=function(){ctrl.$dirty=false;ctrl.$pristine=true;$animate.removeClass($element,DIRTY_CLASS);$animate.addClass($element,PRISTINE_CLASS)};this.$setDirty=function(){ctrl.$dirty=true;ctrl.$pristine=false;$animate.removeClass($element,PRISTINE_CLASS);$animate.addClass($element,DIRTY_CLASS);parentForm.$setDirty()};this.$setUntouched=function(){ctrl.$touched=false;ctrl.$untouched=true;
$animate.setClass($element,UNTOUCHED_CLASS,TOUCHED_CLASS)};this.$setTouched=function(){ctrl.$touched=true;ctrl.$untouched=false;$animate.setClass($element,TOUCHED_CLASS,UNTOUCHED_CLASS)};this.$rollbackViewValue=function(){$timeout.cancel(pendingDebounce);ctrl.$viewValue=ctrl.$$lastCommittedViewValue;ctrl.$render()};this.$validate=function(){if(isNumber(ctrl.$modelValue)&&isNaN(ctrl.$modelValue))return;var viewValue=ctrl.$$lastCommittedViewValue;var modelValue=ctrl.$$rawModelValue;var prevValid=ctrl.$valid;
var prevModelValue=ctrl.$modelValue;var allowInvalid=ctrl.$options&&ctrl.$options.allowInvalid;ctrl.$$runValidators(modelValue,viewValue,function(allValid){if(!allowInvalid&&prevValid!==allValid){ctrl.$modelValue=allValid?modelValue:undefined;if(ctrl.$modelValue!==prevModelValue)ctrl.$$writeModelToScope()}})};this.$$runValidators=function(modelValue,viewValue,doneCallback){currentValidationRunId++;var localValidationRunId=currentValidationRunId;if(!processParseErrors()){validationDone(false);return}if(!processSyncValidators()){validationDone(false);
return}processAsyncValidators();function processParseErrors(){var errorKey=ctrl.$$parserName||"parse";if(parserValid===undefined)setValidity(errorKey,null);else{if(!parserValid){forEach(ctrl.$validators,function(v,name){setValidity(name,null)});forEach(ctrl.$asyncValidators,function(v,name){setValidity(name,null)})}setValidity(errorKey,parserValid);return parserValid}return true}function processSyncValidators(){var syncValidatorsValid=true;forEach(ctrl.$validators,function(validator,name){var result=
validator(modelValue,viewValue);syncValidatorsValid=syncValidatorsValid&&result;setValidity(name,result)});if(!syncValidatorsValid){forEach(ctrl.$asyncValidators,function(v,name){setValidity(name,null)});return false}return true}function processAsyncValidators(){var validatorPromises=[];var allValid=true;forEach(ctrl.$asyncValidators,function(validator,name){var promise=validator(modelValue,viewValue);if(!isPromiseLike(promise))throw ngModelMinErr("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",
promise);setValidity(name,undefined);validatorPromises.push(promise.then(function(){setValidity(name,true)},function(error){allValid=false;setValidity(name,false)}))});if(!validatorPromises.length)validationDone(true);else $q.all(validatorPromises).then(function(){validationDone(allValid)},noop)}function setValidity(name,isValid){if(localValidationRunId===currentValidationRunId)ctrl.$setValidity(name,isValid)}function validationDone(allValid){if(localValidationRunId===currentValidationRunId)doneCallback(allValid)}
};this.$commitViewValue=function(){var viewValue=ctrl.$viewValue;$timeout.cancel(pendingDebounce);if(ctrl.$$lastCommittedViewValue===viewValue&&(viewValue!==""||!ctrl.$$hasNativeValidators))return;ctrl.$$lastCommittedViewValue=viewValue;if(ctrl.$pristine)this.$setDirty();this.$$parseAndValidate()};this.$$parseAndValidate=function(){var viewValue=ctrl.$$lastCommittedViewValue;var modelValue=viewValue;parserValid=isUndefined(modelValue)?undefined:true;if(parserValid)for(var i=0;i<ctrl.$parsers.length;i++){modelValue=
ctrl.$parsers[i](modelValue);if(isUndefined(modelValue)){parserValid=false;break}}if(isNumber(ctrl.$modelValue)&&isNaN(ctrl.$modelValue))ctrl.$modelValue=ngModelGet($scope);var prevModelValue=ctrl.$modelValue;var allowInvalid=ctrl.$options&&ctrl.$options.allowInvalid;ctrl.$$rawModelValue=modelValue;if(allowInvalid){ctrl.$modelValue=modelValue;writeToModelIfNeeded()}ctrl.$$runValidators(modelValue,ctrl.$$lastCommittedViewValue,function(allValid){if(!allowInvalid){ctrl.$modelValue=allValid?modelValue:
undefined;writeToModelIfNeeded()}});function writeToModelIfNeeded(){if(ctrl.$modelValue!==prevModelValue)ctrl.$$writeModelToScope()}};this.$$writeModelToScope=function(){ngModelSet($scope,ctrl.$modelValue);forEach(ctrl.$viewChangeListeners,function(listener){try{listener()}catch(e){$exceptionHandler(e)}})};this.$setViewValue=function(value,trigger){ctrl.$viewValue=value;if(!ctrl.$options||ctrl.$options.updateOnDefault)ctrl.$$debounceViewValueCommit(trigger)};this.$$debounceViewValueCommit=function(trigger){var debounceDelay=
0,options=ctrl.$options,debounce;if(options&&isDefined(options.debounce)){debounce=options.debounce;if(isNumber(debounce))debounceDelay=debounce;else if(isNumber(debounce[trigger]))debounceDelay=debounce[trigger];else if(isNumber(debounce["default"]))debounceDelay=debounce["default"]}$timeout.cancel(pendingDebounce);if(debounceDelay)pendingDebounce=$timeout(function(){ctrl.$commitViewValue()},debounceDelay);else if($rootScope.$$phase)ctrl.$commitViewValue();else $scope.$apply(function(){ctrl.$commitViewValue()})};
$scope.$watch(function ngModelWatch(){var modelValue=ngModelGet($scope);if(modelValue!==ctrl.$modelValue&&(ctrl.$modelValue===ctrl.$modelValue||modelValue===modelValue)){ctrl.$modelValue=ctrl.$$rawModelValue=modelValue;parserValid=undefined;var formatters=ctrl.$formatters,idx=formatters.length;var viewValue=modelValue;while(idx--)viewValue=formatters[idx](viewValue);if(ctrl.$viewValue!==viewValue){ctrl.$viewValue=ctrl.$$lastCommittedViewValue=viewValue;ctrl.$render();ctrl.$$runValidators(modelValue,
viewValue,noop)}}return modelValue})}];var ngModelDirective=["$rootScope",function($rootScope){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:NgModelController,priority:1,compile:function ngModelCompile(element){element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS);return{pre:function ngModelPreLink(scope,element,attr,ctrls){var modelCtrl=ctrls[0],formCtrl=ctrls[1]||nullFormCtrl;modelCtrl.$$setOptions(ctrls[2]&&ctrls[2].$options);formCtrl.$addControl(modelCtrl);
attr.$observe("name",function(newValue){if(modelCtrl.$name!==newValue)formCtrl.$$renameControl(modelCtrl,newValue)});scope.$on("$destroy",function(){formCtrl.$removeControl(modelCtrl)})},post:function ngModelPostLink(scope,element,attr,ctrls){var modelCtrl=ctrls[0];if(modelCtrl.$options&&modelCtrl.$options.updateOn)element.on(modelCtrl.$options.updateOn,function(ev){modelCtrl.$$debounceViewValueCommit(ev&&ev.type)});element.on("blur",function(ev){if(modelCtrl.$touched)return;if($rootScope.$$phase)scope.$evalAsync(modelCtrl.$setTouched);
else scope.$apply(modelCtrl.$setTouched)})}}}}}];var DEFAULT_REGEXP=/(\s+|^)default(\s+|$)/;var ngModelOptionsDirective=function(){return{restrict:"A",controller:["$scope","$attrs",function($scope,$attrs){var that=this;this.$options=copy($scope.$eval($attrs.ngModelOptions));if(this.$options.updateOn!==undefined){this.$options.updateOnDefault=false;this.$options.updateOn=trim(this.$options.updateOn.replace(DEFAULT_REGEXP,function(){that.$options.updateOnDefault=true;return" "}))}else this.$options.updateOnDefault=
true}]}};function addSetValidityMethod(context){var ctrl=context.ctrl,$element=context.$element,classCache={},set=context.set,unset=context.unset,parentForm=context.parentForm,$animate=context.$animate;classCache[INVALID_CLASS]=!(classCache[VALID_CLASS]=$element.hasClass(VALID_CLASS));ctrl.$setValidity=setValidity;function setValidity(validationErrorKey,state,controller){if(state===undefined)createAndSet("$pending",validationErrorKey,controller);else unsetAndCleanup("$pending",validationErrorKey,
controller);if(!isBoolean(state)){unset(ctrl.$error,validationErrorKey,controller);unset(ctrl.$$success,validationErrorKey,controller)}else if(state){unset(ctrl.$error,validationErrorKey,controller);set(ctrl.$$success,validationErrorKey,controller)}else{set(ctrl.$error,validationErrorKey,controller);unset(ctrl.$$success,validationErrorKey,controller)}if(ctrl.$pending){cachedToggleClass(PENDING_CLASS,true);ctrl.$valid=ctrl.$invalid=undefined;toggleValidationCss("",null)}else{cachedToggleClass(PENDING_CLASS,
false);ctrl.$valid=isObjectEmpty(ctrl.$error);ctrl.$invalid=!ctrl.$valid;toggleValidationCss("",ctrl.$valid)}var combinedState;if(ctrl.$pending&&ctrl.$pending[validationErrorKey])combinedState=undefined;else if(ctrl.$error[validationErrorKey])combinedState=false;else if(ctrl.$$success[validationErrorKey])combinedState=true;else combinedState=null;toggleValidationCss(validationErrorKey,combinedState);parentForm.$setValidity(validationErrorKey,combinedState,ctrl)}function createAndSet(name,value,controller){if(!ctrl[name])ctrl[name]=
{};set(ctrl[name],value,controller)}function unsetAndCleanup(name,value,controller){if(ctrl[name])unset(ctrl[name],value,controller);if(isObjectEmpty(ctrl[name]))ctrl[name]=undefined}function cachedToggleClass(className,switchValue){if(switchValue&&!classCache[className]){$animate.addClass($element,className);classCache[className]=true}else if(!switchValue&&classCache[className]){$animate.removeClass($element,className);classCache[className]=false}}function toggleValidationCss(validationErrorKey,
isValid){validationErrorKey=validationErrorKey?"-"+snake_case(validationErrorKey,"-"):"";cachedToggleClass(VALID_CLASS+validationErrorKey,isValid===true);cachedToggleClass(INVALID_CLASS+validationErrorKey,isValid===false)}}function isObjectEmpty(obj){if(obj)for(var prop in obj)if(obj.hasOwnProperty(prop))return false;return true}var ngNonBindableDirective=ngDirective({terminal:true,priority:1E3});var ngOptionsMinErr=minErr("ngOptions");var NG_OPTIONS_REGEXP=/^\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]+?))?$/;
var ngOptionsDirective=["$compile","$parse",function($compile,$parse){function parseOptionsExpression(optionsExp,selectElement,scope){var match=optionsExp.match(NG_OPTIONS_REGEXP);if(!match)throw ngOptionsMinErr("iexp","Expected expression in form of "+"'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'"+" but got '{0}'. Element: {1}",optionsExp,startingTag(selectElement));var valueName=match[5]||match[7];var keyName=match[6];var selectAs=/ as /.test(match[0])&&match[1];var trackBy=match[9];
var valueFn=$parse(match[2]?match[1]:valueName);var selectAsFn=selectAs&&$parse(selectAs);var viewValueFn=selectAsFn||valueFn;var trackByFn=trackBy&&$parse(trackBy);var getTrackByValueFn=trackBy?function(value,locals){return trackByFn(scope,locals)}:function getHashOfValue(value){return hashKey(value)};var getTrackByValue=function(value,key){return getTrackByValueFn(value,getLocals(value,key))};var displayFn=$parse(match[2]||match[1]);var groupByFn=$parse(match[3]||"");var disableWhenFn=$parse(match[4]||
"");var valuesFn=$parse(match[8]);var locals={};var getLocals=keyName?function(value,key){locals[keyName]=key;locals[valueName]=value;return locals}:function(value){locals[valueName]=value;return locals};function Option(selectValue,viewValue,label,group,disabled){this.selectValue=selectValue;this.viewValue=viewValue;this.label=label;this.group=group;this.disabled=disabled}function getOptionValuesKeys(optionValues){var optionValuesKeys;if(!keyName&&isArrayLike(optionValues))optionValuesKeys=optionValues;
else{optionValuesKeys=[];for(var itemKey in optionValues)if(optionValues.hasOwnProperty(itemKey)&&itemKey.charAt(0)!=="$")optionValuesKeys.push(itemKey)}return optionValuesKeys}return{trackBy:trackBy,getTrackByValue:getTrackByValue,getWatchables:$parse(valuesFn,function(optionValues){var watchedArray=[];optionValues=optionValues||[];var optionValuesKeys=getOptionValuesKeys(optionValues);var optionValuesLength=optionValuesKeys.length;for(var index=0;index<optionValuesLength;index++){var key=optionValues===
optionValuesKeys?index:optionValuesKeys[index];var value=optionValues[key];var locals=getLocals(optionValues[key],key);var selectValue=getTrackByValueFn(optionValues[key],locals);watchedArray.push(selectValue);if(match[2]||match[1]){var label=displayFn(scope,locals);watchedArray.push(label)}if(match[4]){var disableWhen=disableWhenFn(scope,locals);watchedArray.push(disableWhen)}}return watchedArray}),getOptions:function(){var optionItems=[];var selectValueMap={};var optionValues=valuesFn(scope)||[];
var optionValuesKeys=getOptionValuesKeys(optionValues);var optionValuesLength=optionValuesKeys.length;for(var index=0;index<optionValuesLength;index++){var key=optionValues===optionValuesKeys?index:optionValuesKeys[index];var value=optionValues[key];var locals=getLocals(value,key);var viewValue=viewValueFn(scope,locals);var selectValue=getTrackByValueFn(viewValue,locals);var label=displayFn(scope,locals);var group=groupByFn(scope,locals);var disabled=disableWhenFn(scope,locals);var optionItem=new Option(selectValue,
viewValue,label,group,disabled);optionItems.push(optionItem);selectValueMap[selectValue]=optionItem}return{items:optionItems,selectValueMap:selectValueMap,getOptionFromViewValue:function(value){return selectValueMap[getTrackByValue(value)]},getViewValueFromOption:function(option){return trackBy?angular.copy(option.viewValue):option.viewValue}}}}}var optionTemplate=document.createElement("option"),optGroupTemplate=document.createElement("optgroup");return{restrict:"A",terminal:true,require:["select",
"?ngModel"],link:function(scope,selectElement,attr,ctrls){var ngModelCtrl=ctrls[1];if(!ngModelCtrl)return;var selectCtrl=ctrls[0];var multiple=attr.multiple;var emptyOption;for(var i=0,children=selectElement.children(),ii=children.length;i<ii;i++)if(children[i].value===""){emptyOption=children.eq(i);break}var providedEmptyOption=!!emptyOption;var unknownOption=jqLite(optionTemplate.cloneNode(false));unknownOption.val("?");var options;var ngOptions=parseOptionsExpression(attr.ngOptions,selectElement,
scope);var renderEmptyOption=function(){if(!providedEmptyOption)selectElement.prepend(emptyOption);selectElement.val("");emptyOption.prop("selected",true);emptyOption.attr("selected",true)};var removeEmptyOption=function(){if(!providedEmptyOption)emptyOption.remove()};var renderUnknownOption=function(){selectElement.prepend(unknownOption);selectElement.val("?");unknownOption.prop("selected",true);unknownOption.attr("selected",true)};var removeUnknownOption=function(){unknownOption.remove()};if(!multiple){selectCtrl.writeValue=
function writeNgOptionsValue(value){var option=options.getOptionFromViewValue(value);if(option&&!option.disabled){if(selectElement[0].value!==option.selectValue){removeUnknownOption();removeEmptyOption();selectElement[0].value=option.selectValue;option.element.selected=true;option.element.setAttribute("selected","selected")}}else if(value===null||providedEmptyOption){removeUnknownOption();renderEmptyOption()}else{removeEmptyOption();renderUnknownOption()}};selectCtrl.readValue=function readNgOptionsValue(){var selectedOption=
options.selectValueMap[selectElement.val()];if(selectedOption&&!selectedOption.disabled){removeEmptyOption();removeUnknownOption();return options.getViewValueFromOption(selectedOption)}return null};if(ngOptions.trackBy)scope.$watch(function(){return ngOptions.getTrackByValue(ngModelCtrl.$viewValue)},function(){ngModelCtrl.$render()})}else{ngModelCtrl.$isEmpty=function(value){return!value||value.length===0};selectCtrl.writeValue=function writeNgOptionsMultiple(value){options.items.forEach(function(option){option.element.selected=
false});if(value)value.forEach(function(item){var option=options.getOptionFromViewValue(item);if(option&&!option.disabled)option.element.selected=true})};selectCtrl.readValue=function readNgOptionsMultiple(){var selectedValues=selectElement.val()||[],selections=[];forEach(selectedValues,function(value){var option=options.selectValueMap[value];if(option&&!option.disabled)selections.push(options.getViewValueFromOption(option))});return selections};if(ngOptions.trackBy)scope.$watchCollection(function(){if(isArray(ngModelCtrl.$viewValue))return ngModelCtrl.$viewValue.map(function(value){return ngOptions.getTrackByValue(value)})},
function(){ngModelCtrl.$render()})}if(providedEmptyOption){emptyOption.remove();$compile(emptyOption)(scope);emptyOption.removeClass("ng-scope")}else emptyOption=jqLite(optionTemplate.cloneNode(false));updateOptions();scope.$watchCollection(ngOptions.getWatchables,updateOptions);function updateOptionElement(option,element){option.element=element;element.disabled=option.disabled;if(option.value!==element.value)element.value=option.selectValue;if(option.label!==element.label){element.label=option.label;
element.textContent=option.label}}function addOrReuseElement(parent,current,type,templateElement){var element;if(current&&lowercase(current.nodeName)===type)element=current;else{element=templateElement.cloneNode(false);if(!current)parent.appendChild(element);else parent.insertBefore(element,current)}return element}function removeExcessElements(current){var next;while(current){next=current.nextSibling;jqLiteRemove(current);current=next}}function skipEmptyAndUnknownOptions(current){var emptyOption_=
emptyOption&&emptyOption[0];var unknownOption_=unknownOption&&unknownOption[0];if(emptyOption_||unknownOption_)while(current&&(current===emptyOption_||current===unknownOption_))current=current.nextSibling;return current}function updateOptions(){var previousValue=options&&selectCtrl.readValue();options=ngOptions.getOptions();var groupMap={};var currentElement=selectElement[0].firstChild;if(providedEmptyOption)selectElement.prepend(emptyOption);currentElement=skipEmptyAndUnknownOptions(currentElement);
options.items.forEach(function updateOption(option){var group;var groupElement;var optionElement;if(option.group){group=groupMap[option.group];if(!group){groupElement=addOrReuseElement(selectElement[0],currentElement,"optgroup",optGroupTemplate);currentElement=groupElement.nextSibling;groupElement.label=option.group;group=groupMap[option.group]={groupElement:groupElement,currentOptionElement:groupElement.firstChild}}optionElement=addOrReuseElement(group.groupElement,group.currentOptionElement,"option",
optionTemplate);updateOptionElement(option,optionElement);group.currentOptionElement=optionElement.nextSibling}else{optionElement=addOrReuseElement(selectElement[0],currentElement,"option",optionTemplate);updateOptionElement(option,optionElement);currentElement=optionElement.nextSibling}});Object.keys(groupMap).forEach(function(key){removeExcessElements(groupMap[key].currentOptionElement)});removeExcessElements(currentElement);ngModelCtrl.$render();if(!ngModelCtrl.$isEmpty(previousValue)){var nextValue=
selectCtrl.readValue();if(ngOptions.trackBy?!equals(previousValue,nextValue):previousValue!==nextValue){ngModelCtrl.$setViewValue(nextValue);ngModelCtrl.$render()}}}}}}];var ngPluralizeDirective=["$locale","$interpolate","$log",function($locale,$interpolate,$log){var BRACE=/{}/g,IS_WHEN=/^when(Minus)?(.+)$/;return{link:function(scope,element,attr){var numberExp=attr.count,whenExp=attr.$attr.when&&element.attr(attr.$attr.when),offset=attr.offset||0,whens=scope.$eval(whenExp)||{},whensExpFns={},startSymbol=
$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),braceReplacement=startSymbol+numberExp+"-"+offset+endSymbol,watchRemover=angular.noop,lastCount;forEach(attr,function(expression,attributeName){var tmpMatch=IS_WHEN.exec(attributeName);if(tmpMatch){var whenKey=(tmpMatch[1]?"-":"")+lowercase(tmpMatch[2]);whens[whenKey]=element.attr(attr.$attr[attributeName])}});forEach(whens,function(expression,key){whensExpFns[key]=$interpolate(expression.replace(BRACE,braceReplacement))});scope.$watch(numberExp,
function ngPluralizeWatchAction(newVal){var count=parseFloat(newVal);var countIsNaN=isNaN(count);if(!countIsNaN&&!(count in whens))count=$locale.pluralCat(count-offset);if(count!==lastCount&&!(countIsNaN&&isNumber(lastCount)&&isNaN(lastCount))){watchRemover();var whenExpFn=whensExpFns[count];if(isUndefined(whenExpFn)){if(newVal!=null)$log.debug("ngPluralize: no rule defined for '"+count+"' in "+whenExp);watchRemover=noop;updateElementText()}else watchRemover=scope.$watch(whenExpFn,updateElementText);
lastCount=count}});function updateElementText(newText){element.text(newText||"")}}}}];var ngRepeatDirective=["$parse","$animate",function($parse,$animate){var NG_REMOVED="$$NG_REMOVED";var ngRepeatMinErr=minErr("ngRepeat");var updateScope=function(scope,index,valueIdentifier,value,keyIdentifier,key,arrayLength){scope[valueIdentifier]=value;if(keyIdentifier)scope[keyIdentifier]=key;scope.$index=index;scope.$first=index===0;scope.$last=index===arrayLength-1;scope.$middle=!(scope.$first||scope.$last);
scope.$odd=!(scope.$even=(index&1)===0)};var getBlockStart=function(block){return block.clone[0]};var getBlockEnd=function(block){return block.clone[block.clone.length-1]};return{restrict:"A",multiElement:true,transclude:"element",priority:1E3,terminal:true,$$tlb:true,compile:function ngRepeatCompile($element,$attr){var expression=$attr.ngRepeat;var ngRepeatEndComment=document.createComment(" end ngRepeat: "+expression+" ");var match=expression.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
if(!match)throw ngRepeatMinErr("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",expression);var lhs=match[1];var rhs=match[2];var aliasAs=match[3];var trackByExp=match[4];match=lhs.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!match)throw ngRepeatMinErr("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",lhs);var valueIdentifier=match[3]||match[1];var keyIdentifier=
match[2];if(aliasAs&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(aliasAs)))throw ngRepeatMinErr("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",aliasAs);var trackByExpGetter,trackByIdExpFn,trackByIdArrayFn,trackByIdObjFn;var hashFnLocals={$id:hashKey};if(trackByExp)trackByExpGetter=$parse(trackByExp);else{trackByIdArrayFn=function(key,value){return hashKey(value)};
trackByIdObjFn=function(key){return key}}return function ngRepeatLink($scope,$element,$attr,ctrl,$transclude){if(trackByExpGetter)trackByIdExpFn=function(key,value,index){if(keyIdentifier)hashFnLocals[keyIdentifier]=key;hashFnLocals[valueIdentifier]=value;hashFnLocals.$index=index;return trackByExpGetter($scope,hashFnLocals)};var lastBlockMap=createMap();$scope.$watchCollection(rhs,function ngRepeatAction(collection){var index,length,previousNode=$element[0],nextNode,nextBlockMap=createMap(),collectionLength,
key,value,trackById,trackByIdFn,collectionKeys,block,nextBlockOrder,elementsToRemove;if(aliasAs)$scope[aliasAs]=collection;if(isArrayLike(collection)){collectionKeys=collection;trackByIdFn=trackByIdExpFn||trackByIdArrayFn}else{trackByIdFn=trackByIdExpFn||trackByIdObjFn;collectionKeys=[];for(var itemKey in collection)if(collection.hasOwnProperty(itemKey)&&itemKey.charAt(0)!=="$")collectionKeys.push(itemKey)}collectionLength=collectionKeys.length;nextBlockOrder=new Array(collectionLength);for(index=
0;index<collectionLength;index++){key=collection===collectionKeys?index:collectionKeys[index];value=collection[key];trackById=trackByIdFn(key,value,index);if(lastBlockMap[trackById]){block=lastBlockMap[trackById];delete lastBlockMap[trackById];nextBlockMap[trackById]=block;nextBlockOrder[index]=block}else if(nextBlockMap[trackById]){forEach(nextBlockOrder,function(block){if(block&&block.scope)lastBlockMap[block.id]=block});throw ngRepeatMinErr("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",
expression,trackById,value);}else{nextBlockOrder[index]={id:trackById,scope:undefined,clone:undefined};nextBlockMap[trackById]=true}}for(var blockKey in lastBlockMap){block=lastBlockMap[blockKey];elementsToRemove=getBlockNodes(block.clone);$animate.leave(elementsToRemove);if(elementsToRemove[0].parentNode)for(index=0,length=elementsToRemove.length;index<length;index++)elementsToRemove[index][NG_REMOVED]=true;block.scope.$destroy()}for(index=0;index<collectionLength;index++){key=collection===collectionKeys?
index:collectionKeys[index];value=collection[key];block=nextBlockOrder[index];if(block.scope){nextNode=previousNode;do nextNode=nextNode.nextSibling;while(nextNode&&nextNode[NG_REMOVED]);if(getBlockStart(block)!=nextNode)$animate.move(getBlockNodes(block.clone),null,jqLite(previousNode));previousNode=getBlockEnd(block);updateScope(block.scope,index,valueIdentifier,value,keyIdentifier,key,collectionLength)}else $transclude(function ngRepeatTransclude(clone,scope){block.scope=scope;var endNode=ngRepeatEndComment.cloneNode(false);
clone[clone.length++]=endNode;$animate.enter(clone,null,jqLite(previousNode));previousNode=endNode;block.clone=clone;nextBlockMap[block.id]=block;updateScope(block.scope,index,valueIdentifier,value,keyIdentifier,key,collectionLength)})}lastBlockMap=nextBlockMap})}}}}];var NG_HIDE_CLASS="ng-hide";var NG_HIDE_IN_PROGRESS_CLASS="ng-hide-animate";var ngShowDirective=["$animate",function($animate){return{restrict:"A",multiElement:true,link:function(scope,element,attr){scope.$watch(attr.ngShow,function ngShowWatchAction(value){$animate[value?
"removeClass":"addClass"](element,NG_HIDE_CLASS,{tempClasses:NG_HIDE_IN_PROGRESS_CLASS})})}}}];var ngHideDirective=["$animate",function($animate){return{restrict:"A",multiElement:true,link:function(scope,element,attr){scope.$watch(attr.ngHide,function ngHideWatchAction(value){$animate[value?"addClass":"removeClass"](element,NG_HIDE_CLASS,{tempClasses:NG_HIDE_IN_PROGRESS_CLASS})})}}}];var ngStyleDirective=ngDirective(function(scope,element,attr){scope.$watch(attr.ngStyle,function ngStyleWatchAction(newStyles,
oldStyles){if(oldStyles&&newStyles!==oldStyles)forEach(oldStyles,function(val,style){element.css(style,"")});if(newStyles)element.css(newStyles)},true)});var ngSwitchDirective=["$animate",function($animate){return{require:"ngSwitch",controller:["$scope",function ngSwitchController(){this.cases={}}],link:function(scope,element,attr,ngSwitchController){var watchExpr=attr.ngSwitch||attr.on,selectedTranscludes=[],selectedElements=[],previousLeaveAnimations=[],selectedScopes=[];var spliceFactory=function(array,
index){return function(){array.splice(index,1)}};scope.$watch(watchExpr,function ngSwitchWatchAction(value){var i,ii;for(i=0,ii=previousLeaveAnimations.length;i<ii;++i)$animate.cancel(previousLeaveAnimations[i]);previousLeaveAnimations.length=0;for(i=0,ii=selectedScopes.length;i<ii;++i){var selected=getBlockNodes(selectedElements[i].clone);selectedScopes[i].$destroy();var promise=previousLeaveAnimations[i]=$animate.leave(selected);promise.then(spliceFactory(previousLeaveAnimations,i))}selectedElements.length=
0;selectedScopes.length=0;if(selectedTranscludes=ngSwitchController.cases["!"+value]||ngSwitchController.cases["?"])forEach(selectedTranscludes,function(selectedTransclude){selectedTransclude.transclude(function(caseElement,selectedScope){selectedScopes.push(selectedScope);var anchor=selectedTransclude.element;caseElement[caseElement.length++]=document.createComment(" end ngSwitchWhen: ");var block={clone:caseElement};selectedElements.push(block);$animate.enter(caseElement,anchor.parent(),anchor)})})})}}}];
var ngSwitchWhenDirective=ngDirective({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:true,link:function(scope,element,attrs,ctrl,$transclude){ctrl.cases["!"+attrs.ngSwitchWhen]=ctrl.cases["!"+attrs.ngSwitchWhen]||[];ctrl.cases["!"+attrs.ngSwitchWhen].push({transclude:$transclude,element:element})}});var ngSwitchDefaultDirective=ngDirective({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:true,link:function(scope,element,attr,ctrl,$transclude){ctrl.cases["?"]=
ctrl.cases["?"]||[];ctrl.cases["?"].push({transclude:$transclude,element:element})}});var ngTranscludeDirective=ngDirective({restrict:"EAC",link:function($scope,$element,$attrs,controller,$transclude){if(!$transclude)throw minErr("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! "+"No parent directive that requires a transclusion found. "+"Element: {0}",startingTag($element));$transclude(function(clone){$element.empty();$element.append(clone)})}});var scriptDirective=
["$templateCache",function($templateCache){return{restrict:"E",terminal:true,compile:function(element,attr){if(attr.type=="text/ng-template"){var templateUrl=attr.id,text=element[0].text;$templateCache.put(templateUrl,text)}}}}];var noopNgModelController={$setViewValue:noop,$render:noop};var SelectController=["$element","$scope","$attrs",function($element,$scope,$attrs){var self=this,optionsMap=new HashMap;self.ngModelCtrl=noopNgModelController;self.unknownOption=jqLite(document.createElement("option"));
self.renderUnknownOption=function(val){var unknownVal="? "+hashKey(val)+" ?";self.unknownOption.val(unknownVal);$element.prepend(self.unknownOption);$element.val(unknownVal)};$scope.$on("$destroy",function(){self.renderUnknownOption=noop});self.removeUnknownOption=function(){if(self.unknownOption.parent())self.unknownOption.remove()};self.readValue=function readSingleValue(){self.removeUnknownOption();return $element.val()};self.writeValue=function writeSingleValue(value){if(self.hasOption(value)){self.removeUnknownOption();
$element.val(value);if(value==="")self.emptyOption.prop("selected",true)}else if(value==null&&self.emptyOption){self.removeUnknownOption();$element.val("")}else self.renderUnknownOption(value)};self.addOption=function(value,element){assertNotHasOwnProperty(value,'"option value"');if(value==="")self.emptyOption=element;var count=optionsMap.get(value)||0;optionsMap.put(value,count+1)};self.removeOption=function(value){var count=optionsMap.get(value);if(count)if(count===1){optionsMap.remove(value);if(value===
"")self.emptyOption=undefined}else optionsMap.put(value,count-1)};self.hasOption=function(value){return!!optionsMap.get(value)}}];var selectDirective=function(){return{restrict:"E",require:["select","?ngModel"],controller:SelectController,link:function(scope,element,attr,ctrls){var ngModelCtrl=ctrls[1];if(!ngModelCtrl)return;var selectCtrl=ctrls[0];selectCtrl.ngModelCtrl=ngModelCtrl;ngModelCtrl.$render=function(){selectCtrl.writeValue(ngModelCtrl.$viewValue)};element.on("change",function(){scope.$apply(function(){ngModelCtrl.$setViewValue(selectCtrl.readValue())})});
if(attr.multiple){selectCtrl.readValue=function readMultipleValue(){var array=[];forEach(element.find("option"),function(option){if(option.selected)array.push(option.value)});return array};selectCtrl.writeValue=function writeMultipleValue(value){var items=new HashMap(value);forEach(element.find("option"),function(option){option.selected=isDefined(items.get(option.value))})};var lastView,lastViewRef=NaN;scope.$watch(function selectMultipleWatch(){if(lastViewRef===ngModelCtrl.$viewValue&&!equals(lastView,
ngModelCtrl.$viewValue)){lastView=shallowCopy(ngModelCtrl.$viewValue);ngModelCtrl.$render()}lastViewRef=ngModelCtrl.$viewValue});ngModelCtrl.$isEmpty=function(value){return!value||value.length===0}}}}};var optionDirective=["$interpolate",function($interpolate){function chromeHack(optionElement){if(optionElement[0].hasAttribute("selected"))optionElement[0].selected=true}return{restrict:"E",priority:100,compile:function(element,attr){if(isUndefined(attr.value)){var interpolateFn=$interpolate(element.text(),
true);if(!interpolateFn)attr.$set("value",element.text())}return function(scope,element,attr){var selectCtrlName="$selectController",parent=element.parent(),selectCtrl=parent.data(selectCtrlName)||parent.parent().data(selectCtrlName);if(selectCtrl&&selectCtrl.ngModelCtrl){if(interpolateFn)scope.$watch(interpolateFn,function interpolateWatchAction(newVal,oldVal){attr.$set("value",newVal);if(oldVal!==newVal)selectCtrl.removeOption(oldVal);selectCtrl.addOption(newVal,element);selectCtrl.ngModelCtrl.$render();
chromeHack(element)});else{selectCtrl.addOption(attr.value,element);selectCtrl.ngModelCtrl.$render();chromeHack(element)}element.on("$destroy",function(){selectCtrl.removeOption(attr.value);selectCtrl.ngModelCtrl.$render()})}}}}}];var styleDirective=valueFn({restrict:"E",terminal:false});var requiredDirective=function(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){if(!ctrl)return;attr.required=true;ctrl.$validators.required=function(modelValue,viewValue){return!attr.required||
!ctrl.$isEmpty(viewValue)};attr.$observe("required",function(){ctrl.$validate()})}}};var patternDirective=function(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){if(!ctrl)return;var regexp,patternExp=attr.ngPattern||attr.pattern;attr.$observe("pattern",function(regex){if(isString(regex)&&regex.length>0)regex=new RegExp("^"+regex+"$");if(regex&&!regex.test)throw minErr("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",patternExp,regex,startingTag(elm));
regexp=regex||undefined;ctrl.$validate()});ctrl.$validators.pattern=function(value){return ctrl.$isEmpty(value)||isUndefined(regexp)||regexp.test(value)}}}};var maxlengthDirective=function(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){if(!ctrl)return;var maxlength=-1;attr.$observe("maxlength",function(value){var intVal=toInt(value);maxlength=isNaN(intVal)?-1:intVal;ctrl.$validate()});ctrl.$validators.maxlength=function(modelValue,viewValue){return maxlength<0||ctrl.$isEmpty(viewValue)||
viewValue.length<=maxlength}}}};var minlengthDirective=function(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){if(!ctrl)return;var minlength=0;attr.$observe("minlength",function(value){minlength=toInt(value)||0;ctrl.$validate()});ctrl.$validators.minlength=function(modelValue,viewValue){return ctrl.$isEmpty(viewValue)||viewValue.length>=minlength}}}};if(window.angular.bootstrap){console.log("WARNING: Tried to load angular more than once.");return}bindJQuery();publishExternalAPI(angular);
angular.module("ngLocale",[],["$provide",function($provide){var PLURAL_CATEGORY={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};function getDecimals(n){n=n+"";var i=n.indexOf(".");return i==-1?0:n.length-i-1}function getVF(n,opt_precision){var v=opt_precision;if(undefined===v)v=Math.min(getDecimals(n),3);var base=Math.pow(10,v);var f=(n*base|0)%base;return{v:v,f:f}}$provide.value("$locale",{"DATETIME_FORMATS":{"AMPMS":["AM","PM"],"DAY":["Sunday","Monday","Tuesday","Wednesday",
"Thursday","Friday","Saturday"],"ERANAMES":["Before Christ","Anno Domini"],"ERAS":["BC","AD"],"FIRSTDAYOFWEEK":6,"MONTH":["January","February","March","April","May","June","July","August","September","October","November","December"],"SHORTDAY":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"SHORTMONTH":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"WEEKENDRANGE":[5,6],"fullDate":"EEEE, MMMM d, y","longDate":"MMMM d, y","medium":"MMM d, y h:mm:ss a","mediumDate":"MMM d, y",
"mediumTime":"h:mm:ss a","short":"M/d/yy h:mm a","shortDate":"M/d/yy","shortTime":"h:mm a"},"NUMBER_FORMATS":{"CURRENCY_SYM":"$","DECIMAL_SEP":".","GROUP_SEP":",","PATTERNS":[{"gSize":3,"lgSize":3,"maxFrac":3,"minFrac":0,"minInt":1,"negPre":"-","negSuf":"","posPre":"","posSuf":""},{"gSize":3,"lgSize":3,"maxFrac":2,"minFrac":2,"minInt":1,"negPre":"-\u00a4","negSuf":"","posPre":"\u00a4","posSuf":""}]},"id":"en-us","pluralCat":function(n,opt_precision){var i=n|0;var vf=getVF(n,opt_precision);if(i==1&&
vf.v==0)return PLURAL_CATEGORY.ONE;return PLURAL_CATEGORY.OTHER}})}]);jqLite(document).ready(function(){angularInit(document,bootstrap)})})(window,document);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('\x3cstyle type\x3d"text/css"\x3e@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}\x3c/style\x3e');
/*
 MIT License, http://www.opensource.org/licenses/MIT
*/
if(typeof module!=="undefined"&&typeof exports!=="undefined"&&module.exports===exports)module.exports="ui.router";
(function(window,angular,undefined){var isDefined=angular.isDefined,isFunction=angular.isFunction,isString=angular.isString,isObject=angular.isObject,isArray=angular.isArray,forEach=angular.forEach,extend=angular.extend,copy=angular.copy;function inherit(parent,extra){return extend(new (extend(function(){},{prototype:parent})),extra)}function merge(dst){forEach(arguments,function(obj){if(obj!==dst)forEach(obj,function(value,key){if(!dst.hasOwnProperty(key))dst[key]=value})});return dst}function ancestors(first,
second){var path=[];for(var n in first.path){if(first.path[n]!==second.path[n])break;path.push(first.path[n])}return path}function objectKeys(object){if(Object.keys)return Object.keys(object);var result=[];angular.forEach(object,function(val,key){result.push(key)});return result}function indexOf(array,value){if(Array.prototype.indexOf)return array.indexOf(value,Number(arguments[2])||0);var len=array.length>>>0,from=Number(arguments[2])||0;from=from<0?Math.ceil(from):Math.floor(from);if(from<0)from+=
len;for(;from<len;from++)if(from in array&&array[from]===value)return from;return-1}function inheritParams(currentParams,newParams,$current,$to){var parents=ancestors($current,$to),parentParams,inherited={},inheritList=[];for(var i in parents){if(!parents[i].params)continue;parentParams=objectKeys(parents[i].params);if(!parentParams.length)continue;for(var j in parentParams){if(indexOf(inheritList,parentParams[j])>=0)continue;inheritList.push(parentParams[j]);inherited[parentParams[j]]=currentParams[parentParams[j]]}}return extend({},
inherited,newParams)}function equalForKeys(a,b,keys){if(!keys){keys=[];for(var n in a)keys.push(n)}for(var i=0;i<keys.length;i++){var k=keys[i];if(a[k]!=b[k])return false}return true}function filterByKeys(keys,values){var filtered={};forEach(keys,function(name){filtered[name]=values[name]});return filtered}function indexBy(array,propName){var result={};forEach(array,function(item){result[item[propName]]=item});return result}function pick(obj){var copy={};var keys=Array.prototype.concat.apply(Array.prototype,
Array.prototype.slice.call(arguments,1));forEach(keys,function(key){if(key in obj)copy[key]=obj[key]});return copy}function omit(obj){var copy={};var keys=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var key in obj)if(indexOf(keys,key)==-1)copy[key]=obj[key];return copy}function pluck(collection,key){var result=isArray(collection)?[]:{};forEach(collection,function(val,i){result[i]=isFunction(key)?key(val):val[key]});return result}function filter(collection,
callback){var array=isArray(collection);var result=array?[]:{};forEach(collection,function(val,i){if(callback(val,i))result[array?result.length:i]=val});return result}function map(collection,callback){var result=isArray(collection)?[]:{};forEach(collection,function(val,i){result[i]=callback(val,i)});return result}angular.module("ui.router.util",["ng"]);angular.module("ui.router.router",["ui.router.util"]);angular.module("ui.router.state",["ui.router.router","ui.router.util"]);angular.module("ui.router",
["ui.router.state"]);angular.module("ui.router.compat",["ui.router"]);$Resolve.$inject=["$q","$injector"];function $Resolve($q,$injector){var VISIT_IN_PROGRESS=1,VISIT_DONE=2,NOTHING={},NO_DEPENDENCIES=[],NO_LOCALS=NOTHING,NO_PARENT=extend($q.when(NOTHING),{$$promises:NOTHING,$$values:NOTHING});this.study=function(invocables){if(!isObject(invocables))throw new Error("'invocables' must be an object");var invocableKeys=objectKeys(invocables||{});var plan=[],cycle=[],visited={};function visit(value,
key){if(visited[key]===VISIT_DONE)return;cycle.push(key);if(visited[key]===VISIT_IN_PROGRESS){cycle.splice(0,indexOf(cycle,key));throw new Error("Cyclic dependency: "+cycle.join(" -\x3e "));}visited[key]=VISIT_IN_PROGRESS;if(isString(value))plan.push(key,[function(){return $injector.get(value)}],NO_DEPENDENCIES);else{var params=$injector.annotate(value);forEach(params,function(param){if(param!==key&&invocables.hasOwnProperty(param))visit(invocables[param],param)});plan.push(key,value,params)}cycle.pop();
visited[key]=VISIT_DONE}forEach(invocables,visit);invocables=cycle=visited=null;function isResolve(value){return isObject(value)&&value.then&&value.$$promises}return function(locals,parent,self){if(isResolve(locals)&&self===undefined){self=parent;parent=locals;locals=null}if(!locals)locals=NO_LOCALS;else if(!isObject(locals))throw new Error("'locals' must be an object");if(!parent)parent=NO_PARENT;else if(!isResolve(parent))throw new Error("'parent' must be a promise returned by $resolve.resolve()");
var resolution=$q.defer(),result=resolution.promise,promises=result.$$promises={},values=extend({},locals),wait=1+plan.length/3,merged=false;function done(){if(!--wait){if(!merged)merge(values,parent.$$values);result.$$values=values;result.$$promises=result.$$promises||true;delete result.$$inheritedValues;resolution.resolve(values)}}function fail(reason){result.$$failure=reason;resolution.reject(reason)}if(isDefined(parent.$$failure)){fail(parent.$$failure);return result}if(parent.$$inheritedValues)merge(values,
omit(parent.$$inheritedValues,invocableKeys));extend(promises,parent.$$promises);if(parent.$$values){merged=merge(values,omit(parent.$$values,invocableKeys));result.$$inheritedValues=omit(parent.$$values,invocableKeys);done()}else{if(parent.$$inheritedValues)result.$$inheritedValues=omit(parent.$$inheritedValues,invocableKeys);parent.then(done,fail)}for(var i=0,ii=plan.length;i<ii;i+=3)if(locals.hasOwnProperty(plan[i]))done();else invoke(plan[i],plan[i+1],plan[i+2]);function invoke(key,invocable,
params){var invocation=$q.defer(),waitParams=0;function onfailure(reason){invocation.reject(reason);fail(reason)}forEach(params,function(dep){if(promises.hasOwnProperty(dep)&&!locals.hasOwnProperty(dep)){waitParams++;promises[dep].then(function(result){values[dep]=result;if(!--waitParams)proceed()},onfailure)}});if(!waitParams)proceed();function proceed(){if(isDefined(result.$$failure))return;try{invocation.resolve($injector.invoke(invocable,self,values));invocation.promise.then(function(result){values[key]=
result;done()},onfailure)}catch(e){onfailure(e)}}promises[key]=invocation.promise}return result}};this.resolve=function(invocables,locals,parent,self){return this.study(invocables)(locals,parent,self)}}angular.module("ui.router.util").service("$resolve",$Resolve);$TemplateFactory.$inject=["$http","$templateCache","$injector"];function $TemplateFactory($http,$templateCache,$injector){this.fromConfig=function(config,params,locals){return isDefined(config.template)?this.fromString(config.template,params):
isDefined(config.templateUrl)?this.fromUrl(config.templateUrl,params):isDefined(config.templateProvider)?this.fromProvider(config.templateProvider,params,locals):null};this.fromString=function(template,params){return isFunction(template)?template(params):template};this.fromUrl=function(url,params){if(isFunction(url))url=url(params);if(url==null)return null;else return $http.get(url,{cache:$templateCache,headers:{Accept:"text/html"}}).then(function(response){return response.data})};this.fromProvider=
function(provider,params,locals){return $injector.invoke(provider,null,locals||{params:params})}}angular.module("ui.router.util").service("$templateFactory",$TemplateFactory);var $$UMFP;function UrlMatcher(pattern,config,parentMatcher){config=extend({params:{}},isObject(config)?config:{});var placeholder=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?::((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,searchPlaceholder=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?::((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,compiled=
"^",last=0,m,segments=this.segments=[],parentParams=parentMatcher?parentMatcher.params:{},params=this.params=parentMatcher?parentMatcher.params.$$new():new $$UMFP.ParamSet,paramNames=[];function addParameter(id,type,config,location){paramNames.push(id);if(parentParams[id])return parentParams[id];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(id))throw new Error("Invalid parameter name '"+id+"' in pattern '"+pattern+"'");if(params[id])throw new Error("Duplicate parameter name '"+id+"' in pattern '"+pattern+"'");
params[id]=new $$UMFP.Param(id,type,config,location);return params[id]}function quoteRegExp(string,pattern,squash){var surroundPattern=["",""],result=string.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$\x26");if(!pattern)return result;switch(squash){case false:surroundPattern=["(",")"];break;case true:surroundPattern=["?(",")?"];break;default:surroundPattern=["("+squash+"|",")?"];break}return result+surroundPattern[0]+pattern+surroundPattern[1]}this.source=pattern;function matchDetails(m,isSearch){var id,
regexp,segment,type,cfg,arrayMode;id=m[2]||m[3];cfg=config.params[id];segment=pattern.substring(last,m.index);regexp=isSearch?m[4]:m[4]||(m[1]=="*"?".*":null);type=$$UMFP.type(regexp||"string")||inherit($$UMFP.type("string"),{pattern:new RegExp(regexp)});return{id:id,regexp:regexp,segment:segment,type:type,cfg:cfg}}var p,param,segment;while(m=placeholder.exec(pattern)){p=matchDetails(m,false);if(p.segment.indexOf("?")>=0)break;param=addParameter(p.id,p.type,p.cfg,"path");compiled+=quoteRegExp(p.segment,
param.type.pattern.source,param.squash);segments.push(p.segment);last=placeholder.lastIndex}segment=pattern.substring(last);var i=segment.indexOf("?");if(i>=0){var search=this.sourceSearch=segment.substring(i);segment=segment.substring(0,i);this.sourcePath=pattern.substring(0,last+i);if(search.length>0){last=0;while(m=searchPlaceholder.exec(search)){p=matchDetails(m,true);param=addParameter(p.id,p.type,p.cfg,"search");last=placeholder.lastIndex}}}else{this.sourcePath=pattern;this.sourceSearch=""}compiled+=
quoteRegExp(segment)+(config.strict===false?"/?":"")+"$";segments.push(segment);this.regexp=new RegExp(compiled,config.caseInsensitive?"i":undefined);this.prefix=segments[0];this.$$paramNames=paramNames}UrlMatcher.prototype.concat=function(pattern,config){var defaultConfig={caseInsensitive:$$UMFP.caseInsensitive(),strict:$$UMFP.strictMode(),squash:$$UMFP.defaultSquashPolicy()};return new UrlMatcher(this.sourcePath+pattern+this.sourceSearch,extend(defaultConfig,config),this)};UrlMatcher.prototype.toString=
function(){return this.source};UrlMatcher.prototype.exec=function(path,searchParams){var m=this.regexp.exec(path);if(!m)return null;searchParams=searchParams||{};var paramNames=this.parameters(),nTotal=paramNames.length,nPath=this.segments.length-1,values={},i,j,cfg,paramName;if(nPath!==m.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");function decodePathArray(string){function reverseString(str){return str.split("").reverse().join("")}function unquoteDashes(str){return str.replace(/\\-/,
"-")}var split=reverseString(string).split(/-(?!\\)/);var allReversed=map(split,reverseString);return map(allReversed,unquoteDashes).reverse()}for(i=0;i<nPath;i++){paramName=paramNames[i];var param=this.params[paramName];var paramVal=m[i+1];for(j=0;j<param.replace;j++)if(param.replace[j].from===paramVal)paramVal=param.replace[j].to;if(paramVal&&param.array===true)paramVal=decodePathArray(paramVal);values[paramName]=param.value(paramVal)}for(;i<nTotal;i++){paramName=paramNames[i];values[paramName]=
this.params[paramName].value(searchParams[paramName])}return values};UrlMatcher.prototype.parameters=function(param){if(!isDefined(param))return this.$$paramNames;return this.params[param]||null};UrlMatcher.prototype.validates=function(params){return this.params.$$validates(params)};UrlMatcher.prototype.format=function(values){values=values||{};var segments=this.segments,params=this.parameters(),paramset=this.params;if(!this.validates(values))return null;var i,search=false,nPath=segments.length-1,
nTotal=params.length,result=segments[0];function encodeDashes(str){return encodeURIComponent(str).replace(/-/g,function(c){return"%5C%"+c.charCodeAt(0).toString(16).toUpperCase()})}for(i=0;i<nTotal;i++){var isPathParam=i<nPath;var name=params[i],param=paramset[name],value=param.value(values[name]);var isDefaultValue=param.isOptional&&param.type.equals(param.value(),value);var squash=isDefaultValue?param.squash:false;var encoded=param.type.encode(value);if(isPathParam){var nextSegment=segments[i+1];
if(squash===false){if(encoded!=null)if(isArray(encoded))result+=map(encoded,encodeDashes).join("-");else result+=encodeURIComponent(encoded);result+=nextSegment}else if(squash===true){var capture=result.match(/\/$/)?/\/?(.*)/:/(.*)/;result+=nextSegment.match(capture)[1]}else if(isString(squash))result+=squash+nextSegment}else{if(encoded==null||isDefaultValue&&squash!==false)continue;if(!isArray(encoded))encoded=[encoded];encoded=map(encoded,encodeURIComponent).join("\x26"+name+"\x3d");result+=(search?
"\x26":"?")+(name+"\x3d"+encoded);search=true}}return result};function Type(config){extend(this,config)}Type.prototype.is=function(val,key){return true};Type.prototype.encode=function(val,key){return val};Type.prototype.decode=function(val,key){return val};Type.prototype.equals=function(a,b){return a==b};Type.prototype.$subPattern=function(){var sub=this.pattern.toString();return sub.substr(1,sub.length-2)};Type.prototype.pattern=/.*/;Type.prototype.toString=function(){return"{Type:"+this.name+"}"};
Type.prototype.$asArray=function(mode,isSearch){if(!mode)return this;if(mode==="auto"&&!isSearch)throw new Error("'auto' array mode is for query parameters only");return new ArrayType(this,mode);function ArrayType(type,mode){function bindTo(type,callbackName){return function(){return type[callbackName].apply(type,arguments)}}function arrayWrap(val){return isArray(val)?val:isDefined(val)?[val]:[]}function arrayUnwrap(val){switch(val.length){case 0:return undefined;case 1:return mode==="auto"?val[0]:
val;default:return val}}function falsey(val){return!val}function arrayHandler(callback,allTruthyMode){return function handleArray(val){val=arrayWrap(val);var result=map(val,callback);if(allTruthyMode===true)return filter(result,falsey).length===0;return arrayUnwrap(result)}}function arrayEqualsHandler(callback){return function handleArray(val1,val2){var left=arrayWrap(val1),right=arrayWrap(val2);if(left.length!==right.length)return false;for(var i=0;i<left.length;i++)if(!callback(left[i],right[i]))return false;
return true}}this.encode=arrayHandler(bindTo(type,"encode"));this.decode=arrayHandler(bindTo(type,"decode"));this.is=arrayHandler(bindTo(type,"is"),true);this.equals=arrayEqualsHandler(bindTo(type,"equals"));this.pattern=type.pattern;this.$arrayMode=mode}};function $UrlMatcherFactory(){$$UMFP=this;var isCaseInsensitive=false,isStrictMode=true,defaultSquashPolicy=false;function valToString(val){return val!=null?val.toString().replace(/\//g,"%2F"):val}function valFromString(val){return val!=null?val.toString().replace(/%2F/g,
"/"):val}function regexpMatches(val){return this.pattern.test(val)}var $types={},enqueue=true,typeQueue=[],injector,defaultTypes={string:{encode:valToString,decode:valFromString,is:regexpMatches,pattern:/[^/]*/},int:{encode:valToString,decode:function(val){return parseInt(val,10)},is:function(val){return isDefined(val)&&this.decode(val.toString())===val},pattern:/\d+/},bool:{encode:function(val){return val?1:0},decode:function(val){return parseInt(val,10)!==0},is:function(val){return val===true||
val===false},pattern:/0|1/},date:{encode:function(val){if(!this.is(val))return undefined;return[val.getFullYear(),("0"+(val.getMonth()+1)).slice(-2),("0"+val.getDate()).slice(-2)].join("-")},decode:function(val){if(this.is(val))return val;var match=this.capture.exec(val);return match?new Date(match[1],match[2]-1,match[3]):undefined},is:function(val){return val instanceof Date&&!isNaN(val.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.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:angular.toJson,decode:angular.fromJson,is:angular.isObject,equals:angular.equals,pattern:/[^/]*/},any:{encode:angular.identity,decode:angular.identity,is:angular.identity,equals:angular.equals,pattern:/.*/}};function getDefaultConfig(){return{strict:isStrictMode,caseInsensitive:isCaseInsensitive}}function isInjectable(value){return isFunction(value)||isArray(value)&&isFunction(value[value.length-1])}$UrlMatcherFactory.$$getDefaultValue=
function(config){if(!isInjectable(config.value))return config.value;if(!injector)throw new Error("Injectable functions cannot be called at configuration time");return injector.invoke(config.value)};this.caseInsensitive=function(value){if(isDefined(value))isCaseInsensitive=value;return isCaseInsensitive};this.strictMode=function(value){if(isDefined(value))isStrictMode=value;return isStrictMode};this.defaultSquashPolicy=function(value){if(!isDefined(value))return defaultSquashPolicy;if(value!==true&&
value!==false&&!isString(value))throw new Error("Invalid squash policy: "+value+". Valid policies: false, true, arbitrary-string");defaultSquashPolicy=value;return value};this.compile=function(pattern,config){return new UrlMatcher(pattern,extend(getDefaultConfig(),config))};this.isMatcher=function(o){if(!isObject(o))return false;var result=true;forEach(UrlMatcher.prototype,function(val,name){if(isFunction(val))result=result&&(isDefined(o[name])&&isFunction(o[name]))});return result};this.type=function(name,
definition,definitionFn){if(!isDefined(definition))return $types[name];if($types.hasOwnProperty(name))throw new Error("A type named '"+name+"' has already been defined.");$types[name]=new Type(extend({name:name},definition));if(definitionFn){typeQueue.push({name:name,def:definitionFn});if(!enqueue)flushTypeQueue()}return this};function flushTypeQueue(){while(typeQueue.length){var type=typeQueue.shift();if(type.pattern)throw new Error("You cannot override a type's .pattern at runtime.");angular.extend($types[type.name],
injector.invoke(type.def))}}forEach(defaultTypes,function(type,name){$types[name]=new Type(extend({name:name},type))});$types=inherit($types,{});this.$get=["$injector",function($injector){injector=$injector;enqueue=false;flushTypeQueue();forEach(defaultTypes,function(type,name){if(!$types[name])$types[name]=new Type(type)});return this}];this.Param=function Param(id,type,config,location){var self=this;config=unwrapShorthand(config);type=getType(config,type,location);var arrayMode=getArrayMode();type=
arrayMode?type.$asArray(arrayMode,location==="search"):type;if(type.name==="string"&&!arrayMode&&location==="path"&&config.value===undefined)config.value="";var isOptional=config.value!==undefined;var squash=getSquashPolicy(config,isOptional);var replace=getReplace(config,arrayMode,isOptional,squash);function unwrapShorthand(config){var keys=isObject(config)?objectKeys(config):[];var isShorthand=indexOf(keys,"value")===-1&&indexOf(keys,"type")===-1&&indexOf(keys,"squash")===-1&&indexOf(keys,"array")===
-1;if(isShorthand)config={value:config};config.$$fn=isInjectable(config.value)?config.value:function(){return config.value};return config}function getType(config,urlType,location){if(config.type&&urlType)throw new Error("Param '"+id+"' has two type configurations.");if(urlType)return urlType;if(!config.type)return location==="config"?$types.any:$types.string;return config.type instanceof Type?config.type:new Type(config.type)}function getArrayMode(){var arrayDefaults={array:location==="search"?"auto":
false};var arrayParamNomenclature=id.match(/\[\]$/)?{array:true}:{};return extend(arrayDefaults,arrayParamNomenclature,config).array}function getSquashPolicy(config,isOptional){var squash=config.squash;if(!isOptional||squash===false)return false;if(!isDefined(squash)||squash==null)return defaultSquashPolicy;if(squash===true||isString(squash))return squash;throw new Error("Invalid squash policy: '"+squash+"'. Valid policies: false, true, or arbitrary string");}function getReplace(config,arrayMode,
isOptional,squash){var replace,configuredKeys,defaultPolicy=[{from:"",to:isOptional||arrayMode?undefined:""},{from:null,to:isOptional||arrayMode?undefined:""}];replace=isArray(config.replace)?config.replace:[];if(isString(squash))replace.push({from:squash,to:undefined});configuredKeys=map(replace,function(item){return item.from});return filter(defaultPolicy,function(item){return indexOf(configuredKeys,item.from)===-1}).concat(replace)}function $$getDefaultValue(){if(!injector)throw new Error("Injectable functions cannot be called at configuration time");
return injector.invoke(config.$$fn)}function $value(value){function hasReplaceVal(val){return function(obj){return obj.from===val}}function $replace(value){var replacement=map(filter(self.replace,hasReplaceVal(value)),function(obj){return obj.to});return replacement.length?replacement[0]:value}value=$replace(value);return isDefined(value)?self.type.decode(value):$$getDefaultValue()}function toString(){return"{Param:"+id+" "+type+" squash: '"+squash+"' optional: "+isOptional+"}"}extend(this,{id:id,
type:type,location:location,array:arrayMode,squash:squash,replace:replace,isOptional:isOptional,value:$value,dynamic:undefined,config:config,toString:toString})};function ParamSet(params){extend(this,params||{})}ParamSet.prototype={$$new:function(){return inherit(this,extend(new ParamSet,{$$parent:this}))},$$keys:function(){var keys=[],chain=[],parent=this,ignore=objectKeys(ParamSet.prototype);while(parent){chain.push(parent);parent=parent.$$parent}chain.reverse();forEach(chain,function(paramset){forEach(objectKeys(paramset),
function(key){if(indexOf(keys,key)===-1&&indexOf(ignore,key)===-1)keys.push(key)})});return keys},$$values:function(paramValues){var values={},self=this;forEach(self.$$keys(),function(key){values[key]=self[key].value(paramValues&&paramValues[key])});return values},$$equals:function(paramValues1,paramValues2){var equal=true,self=this;forEach(self.$$keys(),function(key){var left=paramValues1&&paramValues1[key],right=paramValues2&&paramValues2[key];if(!self[key].type.equals(left,right))equal=false});
return equal},$$validates:function $$validate(paramValues){var result=true,isOptional,val,param,self=this;forEach(this.$$keys(),function(key){param=self[key];val=paramValues[key];isOptional=!val&&param.isOptional;result=result&&(isOptional||!!param.type.is(val))});return result},$$parent:undefined};this.ParamSet=ParamSet}angular.module("ui.router.util").provider("$urlMatcherFactory",$UrlMatcherFactory);angular.module("ui.router.util").run(["$urlMatcherFactory",function($urlMatcherFactory){}]);$UrlRouterProvider.$inject=
["$locationProvider","$urlMatcherFactoryProvider"];function $UrlRouterProvider($locationProvider,$urlMatcherFactory){var rules=[],otherwise=null,interceptDeferred=false,listener;function regExpPrefix(re){var prefix=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(re.source);return prefix!=null?prefix[1].replace(/\\(.)/g,"$1"):""}function interpolate(pattern,match){return pattern.replace(/\$(\$|\d{1,2})/,function(m,what){return match[what==="$"?0:Number(what)]})}this.rule=function(rule){if(!isFunction(rule))throw new Error("'rule' must be a function");
rules.push(rule);return this};this.otherwise=function(rule){if(isString(rule)){var redirect=rule;rule=function(){return redirect}}else if(!isFunction(rule))throw new Error("'rule' must be a function");otherwise=rule;return this};function handleIfMatch($injector,handler,match){if(!match)return false;var result=$injector.invoke(handler,handler,{$match:match});return isDefined(result)?result:true}this.when=function(what,handler){var redirect,handlerIsString=isString(handler);if(isString(what))what=$urlMatcherFactory.compile(what);
if(!handlerIsString&&!isFunction(handler)&&!isArray(handler))throw new Error("invalid 'handler' in when()");var strategies={matcher:function(what,handler){if(handlerIsString){redirect=$urlMatcherFactory.compile(handler);handler=["$match",function($match){return redirect.format($match)}]}return extend(function($injector,$location){return handleIfMatch($injector,handler,what.exec($location.path(),$location.search()))},{prefix:isString(what.prefix)?what.prefix:""})},regex:function(what,handler){if(what.global||
what.sticky)throw new Error("when() RegExp must not be global or sticky");if(handlerIsString){redirect=handler;handler=["$match",function($match){return interpolate(redirect,$match)}]}return extend(function($injector,$location){return handleIfMatch($injector,handler,what.exec($location.path()))},{prefix:regExpPrefix(what)})}};var check={matcher:$urlMatcherFactory.isMatcher(what),regex:what instanceof RegExp};for(var n in check)if(check[n])return this.rule(strategies[n](what,handler));throw new Error("invalid 'what' in when()");
};this.deferIntercept=function(defer){if(defer===undefined)defer=true;interceptDeferred=defer};this.$get=$get;$get.$inject=["$location","$rootScope","$injector","$browser"];function $get($location,$rootScope,$injector,$browser){var baseHref=$browser.baseHref(),location=$location.url(),lastPushedUrl;function appendBasePath(url,isHtml5,absolute){if(baseHref==="/")return url;if(isHtml5)return baseHref.slice(0,-1)+url;if(absolute)return baseHref.slice(1)+url;return url}function update(evt){if(evt&&evt.defaultPrevented)return;
var ignoreUpdate=lastPushedUrl&&$location.url()===lastPushedUrl;lastPushedUrl=undefined;if(ignoreUpdate)return true;function check(rule){var handled=rule($injector,$location);if(!handled)return false;if(isString(handled))$location.replace().url(handled);return true}var n=rules.length,i;for(i=0;i<n;i++)if(check(rules[i]))return;if(otherwise)check(otherwise)}function listen(){listener=listener||$rootScope.$on("$locationChangeSuccess",update);return listener}if(!interceptDeferred)listen();return{sync:function(){update()},
listen:function(){return listen()},update:function(read){if(read){location=$location.url();return}if($location.url()===location)return;$location.url(location);$location.replace()},push:function(urlMatcher,params,options){$location.url(urlMatcher.format(params||{}));lastPushedUrl=options&&options.$$avoidResync?$location.url():undefined;if(options&&options.replace)$location.replace()},href:function(urlMatcher,params,options){if(!urlMatcher.validates(params))return null;var isHtml5=$locationProvider.html5Mode();
if(angular.isObject(isHtml5))isHtml5=isHtml5.enabled;var url=urlMatcher.format(params);options=options||{};if(!isHtml5&&url!==null)url="#"+$locationProvider.hashPrefix()+url;url=appendBasePath(url,isHtml5,options.absolute);if(!options.absolute||!url)return url;var slash=!isHtml5&&url?"/":"",port=$location.port();port=port===80||port===443?"":":"+port;return[$location.protocol(),"://",$location.host(),port,slash,url].join("")}}}}angular.module("ui.router.router").provider("$urlRouter",$UrlRouterProvider);
$StateProvider.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"];function $StateProvider($urlRouterProvider,$urlMatcherFactory){var root,states={},$state,queue={},abstractKey="abstract";var stateBuilder={parent:function(state){if(isDefined(state.parent)&&state.parent)return findState(state.parent);var compositeName=/^(.+)\.[^.]+$/.exec(state.name);return compositeName?findState(compositeName[1]):root},data:function(state){if(state.parent&&state.parent.data)state.data=state.self.data=extend({},
state.parent.data,state.data);return state.data},url:function(state){var url=state.url,config={params:state.params||{}};if(isString(url)){if(url.charAt(0)=="^")return $urlMatcherFactory.compile(url.substring(1),config);return(state.parent.navigable||root).url.concat(url,config)}if(!url||$urlMatcherFactory.isMatcher(url))return url;throw new Error("Invalid url '"+url+"' in state '"+state+"'");},navigable:function(state){return state.url?state:state.parent?state.parent.navigable:null},ownParams:function(state){var params=
state.url&&state.url.params||new $$UMFP.ParamSet;forEach(state.params||{},function(config,id){if(!params[id])params[id]=new $$UMFP.Param(id,null,config,"config")});return params},params:function(state){return state.parent&&state.parent.params?extend(state.parent.params.$$new(),state.ownParams):new $$UMFP.ParamSet},views:function(state){var views={};forEach(isDefined(state.views)?state.views:{"":state},function(view,name){if(name.indexOf("@")<0)name+="@"+state.parent.name;views[name]=view});return views},
path:function(state){return state.parent?state.parent.path.concat(state):[]},includes:function(state){var includes=state.parent?extend({},state.parent.includes):{};includes[state.name]=true;return includes},$delegates:{}};function isRelative(stateName){return stateName.indexOf(".")===0||stateName.indexOf("^")===0}function findState(stateOrName,base){if(!stateOrName)return undefined;var isStr=isString(stateOrName),name=isStr?stateOrName:stateOrName.name,path=isRelative(name);if(path){if(!base)throw new Error("No reference point given for path '"+
name+"'");base=findState(base);var rel=name.split("."),i=0,pathLength=rel.length,current=base;for(;i<pathLength;i++){if(rel[i]===""&&i===0){current=base;continue}if(rel[i]==="^"){if(!current.parent)throw new Error("Path '"+name+"' not valid for state '"+base.name+"'");current=current.parent;continue}break}rel=rel.slice(i).join(".");name=current.name+(current.name&&rel?".":"")+rel}var state=states[name];if(state&&(isStr||!isStr&&(state===stateOrName||state.self===stateOrName)))return state;return undefined}
function queueState(parentName,state){if(!queue[parentName])queue[parentName]=[];queue[parentName].push(state)}function flushQueuedChildren(parentName){var queued=queue[parentName]||[];while(queued.length)registerState(queued.shift())}function registerState(state){state=inherit(state,{self:state,resolve:state.resolve||{},toString:function(){return this.name}});var name=state.name;if(!isString(name)||name.indexOf("@")>=0)throw new Error("State must have a valid name");if(states.hasOwnProperty(name))throw new Error("State '"+
name+"'' is already defined");var parentName=name.indexOf(".")!==-1?name.substring(0,name.lastIndexOf(".")):isString(state.parent)?state.parent:isObject(state.parent)&&isString(state.parent.name)?state.parent.name:"";if(parentName&&!states[parentName])return queueState(parentName,state.self);for(var key in stateBuilder)if(isFunction(stateBuilder[key]))state[key]=stateBuilder[key](state,stateBuilder.$delegates[key]);states[name]=state;if(!state[abstractKey]&&state.url)$urlRouterProvider.when(state.url,
["$match","$stateParams",function($match,$stateParams){if($state.$current.navigable!=state||!equalForKeys($match,$stateParams))$state.transitionTo(state,$match,{inherit:true,location:false})}]);flushQueuedChildren(name);return state}function isGlob(text){return text.indexOf("*")>-1}function doesStateMatchGlob(glob){var globSegments=glob.split("."),segments=$state.$current.name.split(".");if(globSegments[0]==="**"){segments=segments.slice(indexOf(segments,globSegments[1]));segments.unshift("**")}if(globSegments[globSegments.length-
1]==="**"){segments.splice(indexOf(segments,globSegments[globSegments.length-2])+1,Number.MAX_VALUE);segments.push("**")}if(globSegments.length!=segments.length)return false;for(var i=0,l=globSegments.length;i<l;i++)if(globSegments[i]==="*")segments[i]="*";return segments.join("")===globSegments.join("")}root=registerState({name:"",url:"^",views:null,"abstract":true});root.navigable=null;this.decorator=decorator;function decorator(name,func){if(isString(name)&&!isDefined(func))return stateBuilder[name];
if(!isFunction(func)||!isString(name))return this;if(stateBuilder[name]&&!stateBuilder.$delegates[name])stateBuilder.$delegates[name]=stateBuilder[name];stateBuilder[name]=func;return this}this.state=state;function state(name,definition){if(isObject(name))definition=name;else definition.name=name;registerState(definition);return this}this.$get=$get;$get.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"];function $get($rootScope,
$q,$view,$injector,$resolve,$stateParams,$urlRouter,$location,$urlMatcherFactory){var TransitionSuperseded=$q.reject(new Error("transition superseded"));var TransitionPrevented=$q.reject(new Error("transition prevented"));var TransitionAborted=$q.reject(new Error("transition aborted"));var TransitionFailed=$q.reject(new Error("transition failed"));function handleRedirect(redirect,state,params,options){var evt=$rootScope.$broadcast("$stateNotFound",redirect,state,params);if(evt.defaultPrevented){$urlRouter.update();
return TransitionAborted}if(!evt.retry)return null;if(options.$retry){$urlRouter.update();return TransitionFailed}var retryTransition=$state.transition=$q.when(evt.retry);retryTransition.then(function(){if(retryTransition!==$state.transition)return TransitionSuperseded;redirect.options.$retry=true;return $state.transitionTo(redirect.to,redirect.toParams,redirect.options)},function(){return TransitionAborted});$urlRouter.update();return retryTransition}root.locals={resolve:null,globals:{$stateParams:{}}};
$state={params:{},current:root.self,$current:root,transition:null};$state.reload=function reload(){return $state.transitionTo($state.current,$stateParams,{reload:true,inherit:false,notify:true})};$state.go=function go(to,params,options){return $state.transitionTo(to,params,extend({inherit:true,relative:$state.$current},options))};$state.transitionTo=function transitionTo(to,toParams,options){toParams=toParams||{};options=extend({location:true,inherit:false,relative:null,notify:true,reload:false,$retry:false},
options||{});var from=$state.$current,fromParams=$state.params,fromPath=from.path;var evt,toState=findState(to,options.relative);if(!isDefined(toState)){var redirect={to:to,toParams:toParams,options:options};var redirectResult=handleRedirect(redirect,from.self,fromParams,options);if(redirectResult)return redirectResult;to=redirect.to;toParams=redirect.toParams;options=redirect.options;toState=findState(to,options.relative);if(!isDefined(toState)){if(!options.relative)throw new Error("No such state '"+
to+"'");throw new Error("Could not resolve '"+to+"' from state '"+options.relative+"'");}}if(toState[abstractKey])throw new Error("Cannot transition to abstract state '"+to+"'");if(options.inherit)toParams=inheritParams($stateParams,toParams||{},$state.$current,toState);if(!toState.params.$$validates(toParams))return TransitionFailed;toParams=toState.params.$$values(toParams);to=toState;var toPath=to.path;var keep=0,state=toPath[keep],locals=root.locals,toLocals=[];if(!options.reload)while(state&&
state===fromPath[keep]&&state.ownParams.$$equals(toParams,fromParams)){locals=toLocals[keep]=state.locals;keep++;state=toPath[keep]}if(shouldTriggerReload(to,from,locals,options)){if(to.self.reloadOnSearch!==false)$urlRouter.update();$state.transition=null;return $q.when($state.current)}toParams=filterByKeys(to.params.$$keys(),toParams||{});if(options.notify)if($rootScope.$broadcast("$stateChangeStart",to.self,toParams,from.self,fromParams).defaultPrevented){$urlRouter.update();return TransitionPrevented}var resolved=
$q.when(locals);for(var l=keep;l<toPath.length;l++,state=toPath[l]){locals=toLocals[l]=inherit(locals);resolved=resolveState(state,toParams,state===to,resolved,locals,options)}var transition=$state.transition=resolved.then(function(){var l,entering,exiting;if($state.transition!==transition)return TransitionSuperseded;for(l=fromPath.length-1;l>=keep;l--){exiting=fromPath[l];if(exiting.self.onExit)$injector.invoke(exiting.self.onExit,exiting.self,exiting.locals.globals);exiting.locals=null}for(l=keep;l<
toPath.length;l++){entering=toPath[l];entering.locals=toLocals[l];if(entering.self.onEnter)$injector.invoke(entering.self.onEnter,entering.self,entering.locals.globals)}if($state.transition!==transition)return TransitionSuperseded;$state.$current=to;$state.current=to.self;$state.params=toParams;copy($state.params,$stateParams);$state.transition=null;if(options.location&&to.navigable)$urlRouter.push(to.navigable.url,to.navigable.locals.globals.$stateParams,{$$avoidResync:true,replace:options.location===
"replace"});if(options.notify)$rootScope.$broadcast("$stateChangeSuccess",to.self,toParams,from.self,fromParams);$urlRouter.update(true);return $state.current},function(error){if($state.transition!==transition)return TransitionSuperseded;$state.transition=null;evt=$rootScope.$broadcast("$stateChangeError",to.self,toParams,from.self,fromParams,error);if(!evt.defaultPrevented)$urlRouter.update();return $q.reject(error)});return transition};$state.is=function is(stateOrName,params,options){options=extend({relative:$state.$current},
options||{});var state=findState(stateOrName,options.relative);if(!isDefined(state))return undefined;if($state.$current!==state)return false;return params?equalForKeys(state.params.$$values(params),$stateParams):true};$state.includes=function includes(stateOrName,params,options){options=extend({relative:$state.$current},options||{});if(isString(stateOrName)&&isGlob(stateOrName)){if(!doesStateMatchGlob(stateOrName))return false;stateOrName=$state.$current.name}var state=findState(stateOrName,options.relative);
if(!isDefined(state))return undefined;if(!isDefined($state.$current.includes[state.name]))return false;return params?equalForKeys(state.params.$$values(params),$stateParams,objectKeys(params)):true};$state.href=function href(stateOrName,params,options){options=extend({lossy:true,inherit:true,absolute:false,relative:$state.$current},options||{});var state=findState(stateOrName,options.relative);if(!isDefined(state))return null;if(options.inherit)params=inheritParams($stateParams,params||{},$state.$current,
state);var nav=state&&options.lossy?state.navigable:state;if(!nav||nav.url===undefined||nav.url===null)return null;return $urlRouter.href(nav.url,filterByKeys(state.params.$$keys(),params||{}),{absolute:options.absolute})};$state.get=function(stateOrName,context){if(arguments.length===0)return map(objectKeys(states),function(name){return states[name].self});var state=findState(stateOrName,context||$state.$current);return state&&state.self?state.self:null};function resolveState(state,params,paramsAreFiltered,
inherited,dst,options){var $stateParams=paramsAreFiltered?params:filterByKeys(state.params.$$keys(),params);var locals={$stateParams:$stateParams};dst.resolve=$resolve.resolve(state.resolve,locals,dst.resolve,state);var promises=[dst.resolve.then(function(globals){dst.globals=globals})];if(inherited)promises.push(inherited);forEach(state.views,function(view,name){var injectables=view.resolve&&view.resolve!==state.resolve?view.resolve:{};injectables.$template=[function(){return $view.load(name,{view:view,
locals:locals,params:$stateParams,notify:options.notify})||""}];promises.push($resolve.resolve(injectables,locals,dst.resolve,state).then(function(result){if(isFunction(view.controllerProvider)||isArray(view.controllerProvider)){var injectLocals=angular.extend({},injectables,locals);result.$$controller=$injector.invoke(view.controllerProvider,null,injectLocals)}else result.$$controller=view.controller;result.$$state=state;result.$$controllerAs=view.controllerAs;dst[name]=result}))});return $q.all(promises).then(function(values){return dst})}
return $state}function shouldTriggerReload(to,from,locals,options){if(to===from&&(locals===from.locals&&!options.reload||to.self.reloadOnSearch===false))return true}}angular.module("ui.router.state").value("$stateParams",{}).provider("$state",$StateProvider);$ViewProvider.$inject=[];function $ViewProvider(){this.$get=$get;$get.$inject=["$rootScope","$templateFactory"];function $get($rootScope,$templateFactory){return{load:function load(name,options){var result,defaults={template:null,controller:null,
view:null,locals:null,notify:true,async:true,params:{}};options=extend(defaults,options);if(options.view)result=$templateFactory.fromConfig(options.view,options.params,options.locals);if(result&&options.notify)$rootScope.$broadcast("$viewContentLoading",options);return result}}}}angular.module("ui.router.state").provider("$view",$ViewProvider);function $ViewScrollProvider(){var useAnchorScroll=false;this.useAnchorScroll=function(){useAnchorScroll=true};this.$get=["$anchorScroll","$timeout",function($anchorScroll,
$timeout){if(useAnchorScroll)return $anchorScroll;return function($element){$timeout(function(){$element[0].scrollIntoView()},0,false)}}]}angular.module("ui.router.state").provider("$uiViewScroll",$ViewScrollProvider);$ViewDirective.$inject=["$state","$injector","$uiViewScroll","$interpolate"];function $ViewDirective($state,$injector,$uiViewScroll,$interpolate){function getService(){return $injector.has?function(service){return $injector.has(service)?$injector.get(service):null}:function(service){try{return $injector.get(service)}catch(e){return null}}}
var service=getService(),$animator=service("$animator"),$animate=service("$animate");function getRenderer(attrs,scope){var statics=function(){return{enter:function(element,target,cb){target.after(element);cb()},leave:function(element,cb){element.remove();cb()}}};if($animate)return{enter:function(element,target,cb){var promise=$animate.enter(element,null,target,cb);if(promise&&promise.then)promise.then(cb)},leave:function(element,cb){var promise=$animate.leave(element,cb);if(promise&&promise.then)promise.then(cb)}};
if($animator){var animate=$animator&&$animator(scope,attrs);return{enter:function(element,target,cb){animate.enter(element,null,target);cb()},leave:function(element,cb){animate.leave(element);cb()}}}return statics()}var directive={restrict:"ECA",terminal:true,priority:400,transclude:"element",compile:function(tElement,tAttrs,$transclude){return function(scope,$element,attrs){var previousEl,currentEl,currentScope,latestLocals,onloadExp=attrs.onload||"",autoScrollExp=attrs.autoscroll,renderer=getRenderer(attrs,
scope);scope.$on("$stateChangeSuccess",function(){updateView(false)});scope.$on("$viewContentLoading",function(){updateView(false)});updateView(true);function cleanupLastView(){if(previousEl){previousEl.remove();previousEl=null}if(currentScope){currentScope.$destroy();currentScope=null}if(currentEl){renderer.leave(currentEl,function(){previousEl=null});previousEl=currentEl;currentEl=null}}function updateView(firstTime){var newScope,name=getUiViewName(scope,attrs,$element,$interpolate),previousLocals=
name&&$state.$current&&$state.$current.locals[name];if(!firstTime&&previousLocals===latestLocals)return;newScope=scope.$new();latestLocals=$state.$current.locals[name];var clone=$transclude(newScope,function(clone){renderer.enter(clone,$element,function onUiViewEnter(){if(currentScope)currentScope.$emit("$viewContentAnimationEnded");if(angular.isDefined(autoScrollExp)&&!autoScrollExp||scope.$eval(autoScrollExp))$uiViewScroll(clone)});cleanupLastView()});currentEl=clone;currentScope=newScope;currentScope.$emit("$viewContentLoaded");
currentScope.$eval(onloadExp)}}}};return directive}$ViewDirectiveFill.$inject=["$compile","$controller","$state","$interpolate"];function $ViewDirectiveFill($compile,$controller,$state,$interpolate){return{restrict:"ECA",priority:-400,compile:function(tElement){var initial=tElement.html();return function(scope,$element,attrs){var current=$state.$current,name=getUiViewName(scope,attrs,$element,$interpolate),locals=current&&current.locals[name];if(!locals)return;$element.data("$uiView",{name:name,state:locals.$$state});
$element.html(locals.$template?locals.$template:initial);var link=$compile($element.contents());if(locals.$$controller){locals.$scope=scope;var controller=$controller(locals.$$controller,locals);if(locals.$$controllerAs)scope[locals.$$controllerAs]=controller;$element.data("$ngControllerController",controller);$element.children().data("$ngControllerController",controller)}link(scope)}}}}function getUiViewName(scope,attrs,element,$interpolate){var name=$interpolate(attrs.uiView||attrs.name||"")(scope);
var inherited=element.inheritedData("$uiView");return name.indexOf("@")>=0?name:name+"@"+(inherited?inherited.state.name:"")}angular.module("ui.router.state").directive("uiView",$ViewDirective);angular.module("ui.router.state").directive("uiView",$ViewDirectiveFill);function parseStateRef(ref,current){var preparsed=ref.match(/^\s*({[^}]*})\s*$/),parsed;if(preparsed)ref=current+"("+preparsed[1]+")";parsed=ref.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/);if(!parsed||parsed.length!==4)throw new Error("Invalid state ref '"+
ref+"'");return{state:parsed[1],paramExpr:parsed[3]||null}}function stateContext(el){var stateData=el.parent().inheritedData("$uiView");if(stateData&&stateData.state&&stateData.state.name)return stateData.state}$StateRefDirective.$inject=["$state","$timeout"];function $StateRefDirective($state,$timeout){var allowedOptions=["location","inherit","reload"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(scope,element,attrs,uiSrefActive){var ref=parseStateRef(attrs.uiSref,
$state.current.name);var params=null,url=null,base=stateContext(element)||$state.$current;var newHref=null,isAnchor=element.prop("tagName")==="A";var isForm=element[0].nodeName==="FORM";var attr=isForm?"action":"href",nav=true;var options={relative:base,inherit:true};var optionsOverride=scope.$eval(attrs.uiSrefOpts)||{};angular.forEach(allowedOptions,function(option){if(option in optionsOverride)options[option]=optionsOverride[option]});var update=function(newVal){if(newVal)params=angular.copy(newVal);
if(!nav)return;newHref=$state.href(ref.state,params,options);var activeDirective=uiSrefActive[1]||uiSrefActive[0];if(activeDirective)activeDirective.$$setStateInfo(ref.state,params);if(newHref===null){nav=false;return false}attrs.$set(attr,newHref)};if(ref.paramExpr){scope.$watch(ref.paramExpr,function(newVal,oldVal){if(newVal!==params)update(newVal)},true);params=angular.copy(scope.$eval(ref.paramExpr))}update();if(isForm)return;element.bind("click",function(e){var button=e.which||e.button;if(!(button>
1||e.ctrlKey||e.metaKey||e.shiftKey||element.attr("target"))){var transition=$timeout(function(){$state.go(ref.state,params,options)});e.preventDefault();var ignorePreventDefaultCount=isAnchor&&!newHref?1:0;e.preventDefault=function(){if(ignorePreventDefaultCount--<=0)$timeout.cancel(transition)}}})}}}$StateRefActiveDirective.$inject=["$state","$stateParams","$interpolate"];function $StateRefActiveDirective($state,$stateParams,$interpolate){return{restrict:"A",controller:["$scope","$element","$attrs",
function($scope,$element,$attrs){var state,params,activeClass;activeClass=$interpolate($attrs.uiSrefActiveEq||$attrs.uiSrefActive||"",false)($scope);this.$$setStateInfo=function(newState,newParams){state=$state.get(newState,stateContext($element));params=newParams;update()};$scope.$on("$stateChangeSuccess",update);function update(){if(isMatch())$element.addClass(activeClass);else $element.removeClass(activeClass)}function isMatch(){if(typeof $attrs.uiSrefActiveEq!=="undefined")return state&&$state.is(state.name,
params);else return state&&$state.includes(state.name,params)}}]}}angular.module("ui.router.state").directive("uiSref",$StateRefDirective).directive("uiSrefActive",$StateRefActiveDirective).directive("uiSrefActiveEq",$StateRefActiveDirective);$IsStateFilter.$inject=["$state"];function $IsStateFilter($state){var isFilter=function(state){return $state.is(state)};isFilter.$stateful=true;return isFilter}$IncludedByStateFilter.$inject=["$state"];function $IncludedByStateFilter($state){var includesFilter=
function(state){return $state.includes(state)};includesFilter.$stateful=true;return includesFilter}angular.module("ui.router.state").filter("isState",$IsStateFilter).filter("includedByState",$IncludedByStateFilter)})(window,window.angular);
angular.module("ngMap",[]),function(){"use strict";var e,t=function(t,n,o,i,r,a){e=r;var s=this;s.mapOptions,s.mapEvents,s.ngMapDiv,s.addObject=function(e,t){if(s.map){s.map[e]=s.map[e]||{};var n=Object.keys(s.map[e]).length;s.map[e][t.id||n]=t,s.map instanceof google.maps.Map&&("infoWindows"!=e&&t.setMap&&t.setMap&&t.setMap(s.map),t.centered&&t.position&&s.map.setCenter(t.position),"markers"==e&&s.objectChanged("markers"),"customMarkers"==e&&s.objectChanged("customMarkers"))}},s.deleteObject=function(e,t){if(t.map){var n=t.map[e];for(var o in n)n[o]===t&&delete n[o];t.map&&t.setMap&&t.setMap(null),"markers"==e&&s.objectChanged("markers"),"customMarkers"==e&&s.objectChanged("customMarkers")}},s.observeAttrSetObj=function(t,n,o){if(n.noWatcher)return!1;for(var i=e.getAttrsToObserve(t),r=0;r<i.length;r++){var s=i[r];n.$observe(s,a.observeAndSet(s,o))}},s.zoomToIncludeMarkers=function(){var e=new google.maps.LatLngBounds;for(var t in s.map.markers)e.extend(s.map.markers[t].getPosition());for(var n in s.map.customMarkers)e.extend(s.map.customMarkers[n].getPosition());s.map.fitBounds(e)},s.objectChanged=function(e){"markers"!=e&&"customMarkers"!=e||"auto"!=s.map.zoomToIncludeMarkers||s.zoomToIncludeMarkers()},s.initializeMap=function(){var e=s.mapOptions,n=s.mapEvents,r=s.ngMapDiv,c=s.map;if(s.map=new google.maps.Map(r,{}),c){for(var u in c){var l=c[u];if("object"==typeof l)for(var g in l)s.addObject(u,l[g])}s.map.showInfoWindow=s.showInfoWindow,s.map.hideInfoWindow=s.hideInfoWindow}e.zoom=e.zoom||15;var d=e.center;if(!e.center||"string"==typeof d&&d.match(/\{\{.*\}\}/))e.center=new google.maps.LatLng(0,0);else if(!(d instanceof google.maps.LatLng)){var f=e.center;delete e.center,a.getGeoLocation(f,e.geoLocationOptions).then(function(n){s.map.setCenter(n);var o=e.geoCallback;o&&i(o)(t)},function(){e.geoFallbackCenter&&s.map.setCenter(e.geoFallbackCenter)})}s.map.setOptions(e);for(var m in n)google.maps.event.addListener(s.map,m,n[m]);s.observeAttrSetObj(p,o,s.map),s.singleInfoWindow=e.singleInfoWindow,google.maps.event.addListenerOnce(s.map,"idle",function(){a.addMap(s),e.zoomToIncludeMarkers&&s.zoomToIncludeMarkers(),t.map=s.map,t.$emit("mapInitialized",s.map),o.mapInitialized&&i(o.mapInitialized)(t,{map:s.map})})},t.google=google;var p=e.orgAttributes(n),c=e.filter(o),u=e.getOptions(c,null,t),l=e.getControlOptions(c),g=angular.extend(u,l),d=e.getEvents(t,c);s.mapOptions=g,s.mapEvents=d,s.ngMapDiv=a.getNgMapDiv(n[0]),n.append(s.ngMapDiv),u.lazyInit?(s.map={id:o.id},a.addMap(s)):s.initializeMap(),n.bind("$destroy",function(){a.deleteMap(s)})};t.$inject=["$scope","$element","$attrs","$parse","Attr2MapOptions","NgMap"],angular.module("ngMap").controller("__MapController",t)}(),function(){"use strict";var e,t=function(t,o,i,r){r=r[0]||r[1];var a=e.orgAttributes(o),s=e.filter(i),p=e.getOptions(s,{scope:t}),c=e.getEvents(t,s),u=n(p,c);r.addObject("bicyclingLayers",u),r.observeAttrSetObj(a,i,u),o.bind("$destroy",function(){r.deleteObject("bicyclingLayers",u)})},n=function(e,t){var n=new google.maps.BicyclingLayer(e);for(var o in t)google.maps.event.addListener(n,o,t[o]);return n},o=function(n){return e=n,{restrict:"E",require:["?^map","?^ngMap"],link:t}};o.$inject=["Attr2MapOptions"],angular.module("ngMap").directive("bicyclingLayer",o)}(),function(){"use strict";var e,t,n,o=function(o,i,r,a){a=a[0]||a[1];var s=e.filter(r),p=e.getOptions(s,{scope:o}),c=e.getEvents(o,s),u=i[0].parentElement.removeChild(i[0]);t(u.innerHTML.trim())(o);for(var l in c)google.maps.event.addDomListener(u,l,c[l]);a.addObject("customControls",u),n.getMap().then(function(e){var t=p.position;e.controls[google.maps.ControlPosition[t]].push(u)})},i=function(i,r,a){return e=i,t=r,n=a,{restrict:"E",require:["?^map","?^ngMap"],link:o}};i.$inject=["Attr2MapOptions","$compile","NgMap"],angular.module("ngMap").directive("customControl",i)}(),function(){"use strict";var e,t,n,o,i=function(e){e=e||{},this.el=document.createElement("div"),this.el.style.display="inline-block",this.visible=!0;for(var t in e)this[t]=e[t]},r=function(){i.prototype=new google.maps.OverlayView,i.prototype.setContent=function(e,t){this.el.innerHTML=e,this.el.style.position="absolute",t&&n(angular.element(this.el).contents())(t)},i.prototype.getDraggable=function(){return this.draggable},i.prototype.setDraggable=function(e){this.draggable=e},i.prototype.getPosition=function(){return this.position},i.prototype.setPosition=function(e){if(e&&(this.position=e),this.getProjection()&&"function"==typeof this.position.lng){var t=this.getProjection().fromLatLngToDivPixel(this.position),n=Math.round(t.x-this.el.offsetWidth/2),o=Math.round(t.y-this.el.offsetHeight-10);this.el.style.left=n+"px",this.el.style.top=o+"px"}},i.prototype.setZIndex=function(e){e&&(this.zIndex=e),this.el.style.zIndex=this.zIndex},i.prototype.setVisible=function(e){this.el.style.display=e?"inline-block":"none",this.visible=e},i.prototype.addClass=function(e){var t=this.el.className.trim().split(" ");-1==t.indexOf(e)&&t.push(e),this.el.className=t.join(" ")},i.prototype.removeClass=function(e){var t=this.el.className.split(" "),n=t.indexOf(e);n>-1&&t.splice(n,1),this.el.className=t.join(" ")},i.prototype.onAdd=function(){this.getPanes().overlayMouseTarget.appendChild(this.el)},i.prototype.draw=function(){this.setPosition(),this.setZIndex(this.zIndex),this.setVisible(this.visible)},i.prototype.onRemove=function(){this.el.parentNode.removeChild(this.el)}},a=function(n,r){return function(a,s,p,c){c=c[0]||c[1];var u=e.orgAttributes(s),l=e.filter(p),g=e.getOptions(l,{scope:a}),d=e.getEvents(a,l),f=s[0].parentElement.removeChild(s[0]),m=new i(g);t(function(){a.$watch("["+r.join(",")+"]",function(){m.setContent(n,a)}),m.setContent(f.innerHTML,a);var e=f.firstElementChild.className;m.addClass("custom-marker"),m.addClass(e),g.position instanceof google.maps.LatLng||o.getGeoLocation(g.position).then(function(e){m.setPosition(e)})});for(var v in d)google.maps.event.addDomListener(m.el,v,d[v]);c.addObject("customMarkers",m),c.observeAttrSetObj(u,p,m),s.bind("$destroy",function(){c.deleteObject("customMarkers",m)})}},s=function(i,s,p,c){return e=p,t=i,n=s,o=c,{restrict:"E",require:["?^map","?^ngMap"],compile:function(e){r(),e[0].style.display="none";var t=e.html(),n=t.match(/{{([^}]+)}}/g),o=[];return(n||[]).forEach(function(e){var t=e.replace("{{","").replace("}}","");-1==e.indexOf("::")&&-1==e.indexOf("this.")&&-1==o.indexOf(t)&&o.push(e.replace("{{","").replace("}}",""))}),a(t,o)}}};s.$inject=["$timeout","$compile","Attr2MapOptions","NgMap"],angular.module("ngMap").directive("customMarker",s)}(),function(){"use strict";var e,t,n,o=function(e,t){e.panel&&(e.panel=document.getElementById(e.panel)||document.querySelector(e.panel));var n=new google.maps.DirectionsRenderer(e);for(var o in t)google.maps.event.addListener(n,o,t[o]);return n},i=function(e,o){var i=new google.maps.DirectionsService,r=o;r.travelMode=r.travelMode||"DRIVING";var a=["origin","destination","travelMode","transitOptions","unitSystem","durationInTraffic","waypoints","optimizeWaypoints","provideRouteAlternatives","avoidHighways","avoidTolls","region"];for(var s in r)-1===a.indexOf(s)&&delete r[s];r.waypoints&&("[]"==r.waypoints||""===r.waypoints)&&delete r.waypoints;var p=function(n){i.route(n,function(n,o){o==google.maps.DirectionsStatus.OK&&t(function(){e.setDirections(n)})})};r.origin&&r.destination&&("current-location"==r.origin?n.getCurrentPosition().then(function(e){r.origin=new google.maps.LatLng(e.coords.latitude,e.coords.longitude),p(r)}):"current-location"==r.destination?n.getCurrentPosition().then(function(e){r.destination=new google.maps.LatLng(e.coords.latitude,e.coords.longitude),p(r)}):p(r))},r=function(r,a,s,p){var c=r;e=p,t=a,n=s;var u=function(n,r,a,s){s=s[0]||s[1];var p=c.orgAttributes(r),u=c.filter(a),l=c.getOptions(u,{scope:n}),g=c.getEvents(n,u),d=c.getAttrsToObserve(p),f=o(l,g);s.addObject("directionsRenderers",f),d.forEach(function(e){!function(e){a.$observe(e,function(n){if("panel"==e)t(function(){var e=document.getElementById(n)||document.querySelector(n);e&&f.setPanel(e)});else if(l[e]!==n){var o=c.toOptionValue(n,{key:e});l[e]=o,i(f,l)}})}(e)}),e.getMap().then(function(){i(f,l)}),r.bind("$destroy",function(){s.deleteObject("directionsRenderers",f)})};return{restrict:"E",require:["?^map","?^ngMap"],link:u}};r.$inject=["Attr2MapOptions","$timeout","NavigatorGeolocation","NgMap"],angular.module("ngMap").directive("directions",r)}(),function(){"use strict";angular.module("ngMap").directive("drawingManager",["Attr2MapOptions",function(e){var t=e;return{restrict:"E",require:["?^map","?^ngMap"],link:function(e,n,o,i){i=i[0]||i[1];var r=t.filter(o),a=t.getOptions(r,{scope:e}),s=t.getControlOptions(r),p=t.getEvents(e,r),c=new google.maps.drawing.DrawingManager({drawingMode:a.drawingmode,drawingControl:a.drawingcontrol,drawingControlOptions:s.drawingControlOptions,circleOptions:a.circleoptions,markerOptions:a.markeroptions,polygonOptions:a.polygonoptions,polylineOptions:a.polylineoptions,rectangleOptions:a.rectangleoptions});for(var u in p)google.maps.event.addListener(c,u,p[u]);i.addObject("mapDrawingManager",c)}}}])}(),function(){"use strict";angular.module("ngMap").directive("dynamicMapsEngineLayer",["Attr2MapOptions",function(e){var t=e,n=function(e,t){var n=new google.maps.visualization.DynamicMapsEngineLayer(e);for(var o in t)google.maps.event.addListener(n,o,t[o]);return n};return{restrict:"E",require:["?^map","?^ngMap"],link:function(e,o,i,r){r=r[0]||r[1];var a=t.filter(i),s=t.getOptions(a,{scope:e}),p=t.getEvents(e,a,p),c=n(s,p);r.addObject("mapsEngineLayers",c)}}}])}(),function(){"use strict";angular.module("ngMap").directive("fusionTablesLayer",["Attr2MapOptions",function(e){var t=e,n=function(e,t){var n=new google.maps.FusionTablesLayer(e);for(var o in t)google.maps.event.addListener(n,o,t[o]);return n};return{restrict:"E",require:["?^map","?^ngMap"],link:function(e,o,i,r){r=r[0]||r[1];var a=t.filter(i),s=t.getOptions(a,{scope:e}),p=t.getEvents(e,a,p),c=n(s,p);r.addObject("fusionTablesLayers",c)}}}])}(),function(){"use strict";angular.module("ngMap").directive("heatmapLayer",["Attr2MapOptions","$window",function(e,t){var n=e;return{restrict:"E",require:["?^map","?^ngMap"],link:function(e,o,i,r){r=r[0]||r[1];var a=n.filter(i),s=n.getOptions(a,{scope:e});if(s.data=t[i.data]||e[i.data],!(s.data instanceof Array))throw"invalid heatmap data";s.data=new google.maps.MVCArray(s.data);{var p=new google.maps.visualization.HeatmapLayer(s);n.getEvents(e,a)}r.addObject("heatmapLayers",p)}}}])}(),function(){"use strict";var e=function(e,t,n,o,i){var r=e,a=function(e,o,i){var r;!e.position||e.position instanceof google.maps.LatLng||delete e.position,r=new google.maps.InfoWindow(e);for(var a in o)a&&google.maps.event.addListener(r,a,o[a]);var s=i.html().trim();if(1!=angular.element(s).length)throw"info-window working as a template must have a container";return r.__template=s.replace(/\s?ng-non-bindable[='"]+/,""),r.__open=function(e,o,i){n(function(){i&&(o.anchor=i);var n=t(r.__template)(o);r.setContent(n[0]),o.$apply(),i&&i.getPosition?r.open(e,i):i&&i instanceof google.maps.LatLng?(r.open(e),r.setPosition(i)):r.open(e)})},r},s=function(e,t,n,s){s=s[0]||s[1],t.css("display","none");var p,c=r.orgAttributes(t),u=r.filter(n),l=r.getOptions(u,{scope:e}),g=r.getEvents(e,u);!l.position||l.position instanceof google.maps.LatLng||(p=l.position);var d=a(l,g,t);p&&i.getGeoLocation(p).then(function(t){d.setPosition(t),d.__open(s.map,e,t);var i=n.geoCallback;i&&o(i)(e)}),s.addObject("infoWindows",d),s.observeAttrSetObj(c,n,d),s.showInfoWindow=s.map.showInfoWindow=s.showInfoWindow||function(t,n,o){var i="string"==typeof t?t:n,r="string"==typeof t?n:o;"string"==typeof r&&(r=s.map.markers[r]);var a=s.map.infoWindows[i],p=r?r:this.getPosition?this:null;a.__open(s.map,e,p),s.singleInfoWindow&&(s.lastInfoWindow&&e.hideInfoWindow(s.lastInfoWindow),s.lastInfoWindow=i)},s.hideInfoWindow=s.map.hideInfoWindow=s.hideInfoWindow||function(e,t){var n="string"==typeof e?e:t,o=s.map.infoWindows[n];o.close()},e.showInfoWindow=s.map.showInfoWindow,e.hideInfoWindow=s.map.hideInfoWindow,i.getMap().then(function(t){if(d.visible&&d.__open(t,e),d.visibleOnMarker){var n=d.visibleOnMarker;d.__open(t,e,t.markers[n])}})};return{restrict:"E",require:["?^map","?^ngMap"],link:s}};e.$inject=["Attr2MapOptions","$compile","$timeout","$parse","NgMap"],angular.module("ngMap").directive("infoWindow",e)}(),function(){"use strict";angular.module("ngMap").directive("kmlLayer",["Attr2MapOptions",function(e){var t=e,n=function(e,t){var n=new google.maps.KmlLayer(e);for(var o in t)google.maps.event.addListener(n,o,t[o]);return n};return{restrict:"E",require:["?^map","?^ngMap"],link:function(e,o,i,r){r=r[0]||r[1];var a=t.orgAttributes(o),s=t.filter(i),p=t.getOptions(s,{scope:e}),c=t.getEvents(e,s),u=n(p,c);r.addObject("kmlLayers",u),r.observeAttrSetObj(a,i,u),o.bind("$destroy",function(){r.deleteObject("kmlLayers",u)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("mapData",["Attr2MapOptions","NgMap",function(e,t){var n=e;return{restrict:"E",require:["?^map","?^ngMap"],link:function(e,o,i){var r=n.filter(i),a=n.getOptions(r,{scope:e}),s=n.getEvents(e,r,s);t.getMap().then(function(t){for(var n in a){var o=a[n];"function"==typeof e[o]?t.data[n](e[o]):t.data[n](o)}for(var i in s)t.data.addListener(i,s[i])})}}}])}(),function(){"use strict";var e,t,n,o,i=function(n,i,r){var a=r.mapLazyLoadParams||r.mapLazyLoad;if(window.lazyLoadCallback=function(){e(function(){i.html(o),t(i.contents())(n)},100)},void 0===window.google||void 0===window.google.maps){var s=document.createElement("script");s.src=a+(a.indexOf("?")>-1?"&":"?")+"callback=lazyLoadCallback",document.querySelector('script[src="'+s.src+'"]')||document.body.appendChild(s)}else i.html(o),t(i.contents())(n)},r=function(e,t){return!t.mapLazyLoad&&void 0,o=e.html(),n=t.mapLazyLoad,void 0!==window.google&&void 0!==window.google.maps?!1:(e.html(""),{pre:i})},a=function(n,o){return t=n,e=o,{compile:r}};a.$inject=["$compile","$timeout"],angular.module("ngMap").directive("mapLazyLoad",a)}(),function(){"use strict";angular.module("ngMap").directive("mapType",["$parse","NgMap",function(e,t){return{restrict:"E",require:["?^map","?^ngMap"],link:function(n,o,i,r){r=r[0]||r[1];var a,s=i.name;if(!s)throw"invalid map-type name";if(a=e(i.object)(n),!a)throw"invalid map-type object";t.getMap().then(function(e){e.mapTypes.set(s,a)}),r.addObject("mapTypes",a)}}}])}(),function(){"use strict";var e=function(){return{restrict:"AE",controller:"__MapController",conrollerAs:"ngmap"}};angular.module("ngMap").directive("map",[e]),angular.module("ngMap").directive("ngMap",[e])}(),function(){"use strict";angular.module("ngMap").directive("mapsEngineLayer",["Attr2MapOptions",function(e){var t=e,n=function(e,t){var n=new google.maps.visualization.MapsEngineLayer(e);for(var o in t)google.maps.event.addListener(n,o,t[o]);return n};return{restrict:"E",require:["?^map","?^ngMap"],link:function(e,o,i,r){r=r[0]||r[1];var a=t.filter(i),s=t.getOptions(a,{scope:e}),p=t.getEvents(e,a,p),c=n(s,p);r.addObject("mapsEngineLayers",c)}}}])}(),function(){"use strict";var e,t,n,o=function(e,t){var o;if(n.defaultOptions.marker)for(var i in n.defaultOptions.marker)"undefined"==typeof e[i]&&(e[i]=n.defaultOptions.marker[i]);e.position instanceof google.maps.LatLng||(e.position=new google.maps.LatLng(0,0)),o=new google.maps.Marker(e),Object.keys(t).length>0;for(var r in t)r&&google.maps.event.addListener(o,r,t[r]);return o},i=function(i,r,a,s){s=s[0]||s[1];var p,c=e.orgAttributes(r),u=e.filter(a),l=e.getOptions(u,i,{scope:i}),g=e.getEvents(i,u);l.position instanceof google.maps.LatLng||(p=l.position);var d=o(l,g);s.addObject("markers",d),p&&n.getGeoLocation(p).then(function(e){d.setPosition(e),l.centered&&d.map.setCenter(e);var n=a.geoCallback;n&&t(n)(i)}),s.observeAttrSetObj(c,a,d),r.bind("$destroy",function(){s.deleteObject("markers",d)})},r=function(o,r,a){return e=o,t=r,n=a,{restrict:"E",require:["^?map","?^ngMap"],link:i}};r.$inject=["Attr2MapOptions","$parse","NgMap"],angular.module("ngMap").directive("marker",r)}(),function(){"use strict";angular.module("ngMap").directive("overlayMapType",["NgMap",function(e){return{restrict:"E",require:["?^map","?^ngMap"],link:function(t,n,o,i){i=i[0]||i[1];var r=o.initMethod||"insertAt",a=t[o.object];e.getMap().then(function(e){if("insertAt"==r){var t=parseInt(o.index,10);e.overlayMapTypes.insertAt(t,a)}else"push"==r&&e.overlayMapTypes.push(a)}),i.addObject("overlayMapTypes",a)}}}])}(),function(){"use strict";var e=function(e,t){var n=e,o=function(e,o,i,r){if("false"===i.placesAutoComplete)return!1;var a=n.filter(i),s=n.getOptions(a,{scope:e}),p=n.getEvents(e,a),c=new google.maps.places.Autocomplete(o[0],s);for(var u in p)google.maps.event.addListener(c,u,p[u]);var l=function(){t(function(){r&&r.$setViewValue(o.val())},100)};google.maps.event.addListener(c,"place_changed",l),o[0].addEventListener("change",l),i.$observe("types",function(e){if(e){var t=n.toOptionValue(e,{key:"types"});c.setTypes(t)}})};return{restrict:"A",require:"?ngModel",link:o}};e.$inject=["Attr2MapOptions","$timeout"],angular.module("ngMap").directive("placesAutoComplete",e)}(),function(){"use strict";var e=function(e,t){var n,o=e.name;switch(delete e.name,o){case"circle":e.center instanceof google.maps.LatLng||(e.center=new google.maps.LatLng(0,0)),n=new google.maps.Circle(e);break;case"polygon":n=new google.maps.Polygon(e);break;case"polyline":n=new google.maps.Polyline(e);break;case"rectangle":n=new google.maps.Rectangle(e);break;case"groundOverlay":case"image":var i=e.url,r={opacity:e.opacity,clickable:e.clickable,id:e.id};n=new google.maps.GroundOverlay(i,e.bounds,r)}for(var a in t)t[a]&&google.maps.event.addListener(n,a,t[a]);return n},t=function(t,n,o){var i=t,r=function(t,r,a,s){s=s[0]||s[1];var p,c,u=i.orgAttributes(r),l=i.filter(a),g=i.getOptions(l,{scope:t}),d=i.getEvents(t,l);c=g.name,g.center instanceof google.maps.LatLng||(p=g.center);var f=e(g,d);s.addObject("shapes",f),p&&"circle"==c&&o.getGeoLocation(p).then(function(e){f.setCenter(e),f.centered&&f.map.setCenter(e);var o=a.geoCallback;o&&n(o)(t)}),s.observeAttrSetObj(u,a,f),r.bind("$destroy",function(){s.deleteObject("shapes",f)})};return{restrict:"E",require:["?^map","?^ngMap"],link:r}};t.$inject=["Attr2MapOptions","$parse","NgMap"],angular.module("ngMap").directive("shape",t)}(),function(){"use strict";var e=function(e,t){var n=e,o=function(e,t,n){var o,i;t.container&&(i=document.getElementById(t.container),i=i||document.querySelector(t.container)),i?o=new google.maps.StreetViewPanorama(i,t):(o=e.getStreetView(),o.setOptions(t));for(var r in n)r&&google.maps.event.addListener(o,r,n[r]);return o},i=function(e,i,r){var a=n.filter(r),s=n.getOptions(a,{scope:e}),p=n.getControlOptions(a),c=angular.extend(s,p),u=n.getEvents(e,a);t.getMap().then(function(e){var t=o(e,c,u);e.setStreetView(t),!t.getPosition()&&t.setPosition(e.getCenter()),google.maps.event.addListener(t,"position_changed",function(){t.getPosition()!==e.getCenter()&&e.setCenter(t.getPosition())});var n=google.maps.event.addListener(e,"center_changed",function(){t.setPosition(e.getCenter()),google.maps.event.removeListener(n)})})};return{restrict:"E",require:["?^map","?^ngMap"],link:i}};e.$inject=["Attr2MapOptions","NgMap"],angular.module("ngMap").directive("streetViewPanorama",e)}(),function(){"use strict";angular.module("ngMap").directive("trafficLayer",["Attr2MapOptions",function(e){var t=e,n=function(e,t){var n=new google.maps.TrafficLayer(e);for(var o in t)google.maps.event.addListener(n,o,t[o]);return n};return{restrict:"E",require:["?^map","?^ngMap"],link:function(e,o,i,r){r=r[0]||r[1];var a=t.orgAttributes(o),s=t.filter(i),p=t.getOptions(s,{scope:e}),c=t.getEvents(e,s),u=n(p,c);r.addObject("trafficLayers",u),r.observeAttrSetObj(a,i,u),o.bind("$destroy",function(){r.deleteObject("trafficLayers",u)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("transitLayer",["Attr2MapOptions",function(e){var t=e,n=function(e,t){var n=new google.maps.TransitLayer(e);for(var o in t)google.maps.event.addListener(n,o,t[o]);return n};return{restrict:"E",require:["?^map","?^ngMap"],link:function(e,o,i,r){r=r[0]||r[1];var a=t.orgAttributes(o),s=t.filter(i),p=t.getOptions(s,{scope:e}),c=t.getEvents(e,s),u=n(p,c);r.addObject("transitLayers",u),r.observeAttrSetObj(a,i,u),o.bind("$destroy",function(){r.deleteObject("transitLayers",u)})}}}])}(),function(){"use strict";var e=/([\:\-\_]+(.))/g,t=/^moz([A-Z])/,n=function(){return function(n){return n.replace(e,function(e,t,n,o){return o?n.toUpperCase():n}).replace(t,"Moz$1")}};angular.module("ngMap").filter("camelCase",n)}(),function(){"use strict";var e=function(){return function(e){try{return JSON.parse(e),e}catch(t){return e.replace(/([\$\w]+)\s*:/g,function(e,t){return'"'+t+'":'}).replace(/'([^']+)'/g,function(e,t){return'"'+t+'"'})}}};angular.module("ngMap").filter("jsonize",e)}(),function(){"use strict";var isoDateRE=/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*)?)([zZ]|([+\-])(\d\d):?(\d\d))?$/,Attr2MapOptions=function($parse,$timeout,$log,NavigatorGeolocation,GeoCoder,camelCaseFilter,jsonizeFilter){var orgAttributes=function(e){e.length>0&&(e=e[0]);for(var t={},n=0;n<e.attributes.length;n++){var o=e.attributes[n];t[o.name]=o.value}return t},getJSON=function(e){var t=/^[\+\-]?[0-9\.]+,[ ]*\ ?[\+\-]?[0-9\.]+$/;return e.match(t)&&(e="["+e+"]"),JSON.parse(jsonizeFilter(e))},getLatLng=function(e){var t=e;return e[0].constructor==Array?t=e.map(function(e){return new google.maps.LatLng(e[0],e[1])}):!isNaN(parseFloat(e[0]))&&isFinite(e[0])&&(t=new google.maps.LatLng(t[0],t[1])),t},toOptionValue=function(input,options){var output;try{output=getNumber(input)}catch(err){try{var output=getJSON(input);if(output instanceof Array)output=output[0].constructor==Object?output:getLatLng(output);else if(output===Object(output)){var newOptions=options;newOptions.doNotConverStringToNumber=!0,output=getOptions(output,newOptions)}}catch(err2){if(input.match(/^[A-Z][a-zA-Z0-9]+\(.*\)$/))try{var exp="new google.maps."+input;output=eval(exp)}catch(e){output=input}else if(input.match(/^([A-Z][a-zA-Z0-9]+)\.([A-Z]+)$/))try{var matches=input.match(/^([A-Z][a-zA-Z0-9]+)\.([A-Z]+)$/);output=google.maps[matches[1]][matches[2]]}catch(e){output=input}else if(input.match(/^[A-Z]+$/))try{var capitalizedKey=options.key.charAt(0).toUpperCase()+options.key.slice(1);options.key.match(/temperatureUnit|windSpeedUnit|labelColor/)?(capitalizedKey=capitalizedKey.replace(/s$/,""),output=google.maps.weather[capitalizedKey][input]):output=google.maps[capitalizedKey][input]}catch(e){output=input}else if(input.match(isoDateRE))try{output=new Date(input)}catch(e){output=input}else if(input.match(/^{/)&&options.scope)try{var expr=input.replace(/{{/,"").replace(/}}/g,"");output=options.scope.$eval(expr)}catch(err){output=input}else output=input}}if("bounds"==options.key&&output instanceof Array&&(output=new google.maps.LatLngBounds(output[0],output[1])),"icons"==options.key&&output instanceof Array)for(var i=0;i<output.length;i++){var el=output[i];el.icon.path.match(/^[A-Z_]+$/)&&(el.icon.path=google.maps.SymbolPath[el.icon.path])}if("icon"==options.key&&output instanceof Object){(""+output.path).match(/^[A-Z_]+$/)&&(output.path=google.maps.SymbolPath[output.path]);for(var key in output){var arr=output[key];"anchor"==key||"origin"==key?output[key]=new google.maps.Point(arr[0],arr[1]):("size"==key||"scaledSize"==key)&&(output[key]=new google.maps.Size(arr[0],arr[1]))}}return output},getAttrsToObserve=function(e){var t=[];if(!e.noWatcher)for(var n in e){var o=e[n];o&&o.match(/\{\{.*\}\}/)&&t.push(camelCaseFilter(n))}return t},filter=function(e){var t={};for(var n in e)n.match(/^\$/)||n.match(/^ng[A-Z]/)||(t[n]=e[n]);return t},getOptions=function(e,t){t=t||{};var n={};for(var o in e)if(e[o]||0===e[o]){if(o.match(/^on[A-Z]/))continue;if(o.match(/ControlOptions$/))continue;n[o]="string"!=typeof e[o]?e[o]:t.doNotConverStringToNumber&&e[o].match(/^[0-9]+$/)?e[o]:toOptionValue(e[o],{key:o,scope:t.scope})}return n},getEvents=function(e,t){var n={},o=function(e){return"_"+e.toLowerCase()},i=function(t){var n=t.match(/([^\(]+)\(([^\)]*)\)/),o=n[1],i=n[2].replace(/event[ ,]*/,""),r=$parse("["+i+"]");return function(t){function n(e,t){return e[t]}var i=r(e),a=o.split(".").reduce(n,e);a&&a.apply(this,[t].concat(i)),$timeout(function(){e.$apply()})}};for(var r in t)if(t[r]){if(!r.match(/^on[A-Z]/))continue;var a=r.replace(/^on/,"");a=a.charAt(0).toLowerCase()+a.slice(1),a=a.replace(/([A-Z])/g,o);var s=t[r];n[a]=new i(s)}return n},getControlOptions=function(e){var t={};if("object"!=typeof e)return!1;for(var n in e)if(e[n]){if(!n.match(/(.*)ControlOptions$/))continue;var o=e[n],i=o.replace(/'/g,'"');i=i.replace(/([^"]+)|("[^"]+")/g,function(e,t,n){return t?t.replace(/([a-zA-Z0-9]+?):/g,'"$1":'):n});try{var r=JSON.parse(i);for(var a in r)if(r[a]){var s=r[a];if("string"==typeof s?s=s.toUpperCase():"mapTypeIds"===a&&(s=s.map(function(e){return e.match(/^[A-Z]+$/)?google.maps.MapTypeId[e.toUpperCase()]:e})),"style"===a){var p=n.charAt(0).toUpperCase()+n.slice(1),c=p.replace(/Options$/,"")+"Style";r[a]=google.maps[c][s]}else r[a]="position"===a?google.maps.ControlPosition[s]:s}t[n]=r}catch(u){}}return t};return{filter:filter,getOptions:getOptions,getEvents:getEvents,getControlOptions:getControlOptions,toOptionValue:toOptionValue,getAttrsToObserve:getAttrsToObserve,orgAttributes:orgAttributes}};Attr2MapOptions.$inject=["$parse","$timeout","$log","NavigatorGeolocation","GeoCoder","camelCaseFilter","jsonizeFilter"],angular.module("ngMap").service("Attr2MapOptions",Attr2MapOptions)}(),function(){"use strict";var e,t=function(t){var n=e.defer(),o=new google.maps.Geocoder;return o.geocode(t,function(e,t){t==google.maps.GeocoderStatus.OK?n.resolve(e):n.reject(t)}),n.promise},n=function(n){return e=n,{geocode:t}};n.$inject=["$q"],angular.module("ngMap").service("GeoCoder",n)}(),function(){"use strict";var e,t=function(t){var n=e.defer();return navigator.geolocation?(void 0===t?t={timeout:5e3}:void 0===t.timeout&&(t.timeout=5e3),navigator.geolocation.getCurrentPosition(function(e){n.resolve(e)},function(e){n.reject(e)},t)):n.reject("Browser Geolocation service failed."),n.promise},n=function(n){return e=n,{getCurrentPosition:t}};n.$inject=["$q"],angular.module("ngMap").service("NavigatorGeolocation",n)}(),function(){"use strict";var e,t,n,o,i,r,a,s={},p=function(e){var t=s[e||0];return t.map instanceof google.maps.Map?void 0:(t.initializeMap(),t.map)},c=function(t){function o(t){s[r]?i.resolve(s[r].map):t>a?i.reject("could not find map"):e.setTimeout(function(){o(t+100)},100)}t=t||{};var i=n.defer(),r=t.id||0,a=t.timeout||2e3;return o(0),i.promise},u=function(e){var t=Object.keys(s).length;s[e.map.id||t]=e},l=function(e){var t=Object.keys(s).length-1;delete s[e.map.id||t]},g=function(n,o){var i;return n.currentStyle?i=n.currentStyle[o]:e.getComputedStyle&&(i=t.defaultView.getComputedStyle(n,null).getPropertyValue(o)),i},d=function(e){var n=t.createElement("div"),o=e.getAttribute("default-style");return n.style.width="100%",n.style.height="100%","true"==o?(e.style.display="block",e.style.height="300px"):("block"!=g(e,"display")&&(e.style.display="block"),g(e,"height").match(/^(0|auto)/)&&(e.style.height="300px")),n.addEventListener("dragstart",function(e){return e.preventDefault(),!1}),n},f=function(e,t){var i=n.defer();return!e||e.match(/^current/i)?o.getCurrentPosition(t).then(function(e){var t=e.coords.latitude,n=e.coords.longitude,o=new google.maps.LatLng(t,n);i.resolve(o)},function(e){i.reject(e)}):r.geocode({address:e}).then(function(e){i.resolve(e[0].geometry.location)},function(e){i.reject(e)}),i.promise},m=function(e,t){return function(n){if(n){var o=a("set-"+e),r=i.toOptionValue(n,{key:e});t[o]&&(e.match(/center|position/)&&"string"==typeof r?f(r).then(function(e){t[o](e)}):t[o](r))}}};angular.module("ngMap").provider("NgMap",function(){var s={};this.setDefaultOptions=function(e){s=e};var v=function(v,y,h,M,O,b,w){return e=v,t=y[0],n=h,o=M,i=O,r=b,a=w,{defaultOptions:s,addMap:u,deleteMap:l,getMap:c,initMap:p,getStyle:g,getNgMapDiv:d,getGeoLocation:f,observeAndSet:m}};v.$inject=["$window","$document","$q","NavigatorGeolocation","Attr2MapOptions","GeoCoder","camelCaseFilter"],this.$get=v})}(),function(){"use strict";var e,t=function(t,n){n=n||t.getCenter();var o=e.defer(),i=new google.maps.StreetViewService;return i.getPanoramaByLocation(n||t.getCenter,100,function(e,t){t===google.maps.StreetViewStatus.OK?o.resolve(e.location.pano):o.resolve(!1)}),o.promise},n=function(e,t){var n=new google.maps.StreetViewPanorama(e.getDiv(),{enableCloseButton:!0});n.setPano(t)},o=function(o){return e=o,{getPanorama:t,setPanorama:n}};o.$inject=["$q"],angular.module("ngMap").service("StreetView",o)}();
(function(){var parser,$parse,NgMap;var getMarker=function(options,events){var marker;if(NgMap.defaultOptions.marker)for(var key in NgMap.defaultOptions.marker)if(typeof options[key]=="undefined"){console.log("setting default marker options",key,NgMap.defaultOptions.marker);options[key]=NgMap.defaultOptions.marker[key]}if(!(options.position instanceof google.maps.LatLng))options.position=new google.maps.LatLng(0,0);marker=new google.maps.Marker(options);if(Object.keys(events).length>0)console.log("markerEvents",
events);for(var eventName in events)if(eventName)google.maps.event.addListener(marker,eventName,events[eventName]);return marker};var linkFunc=function(scope,element,attrs,mapController){mapController=mapController[0]||mapController[1];var orgAttrs=parser.orgAttributes(element);var filtered=parser.filter(attrs);var markerOptions=parser.getOptions(filtered,scope,{scope:scope});var markerEvents=parser.getEvents(scope,filtered);console.log("marker options",markerOptions,"events",markerEvents);var address;
if(!(markerOptions.position instanceof google.maps.LatLng))address=markerOptions.position;var marker=getMarker(markerOptions,markerEvents);mapController.addObject("markers",marker);if(address)NgMap.getGeoLocation(address).then(function(latlng){marker.setPosition(latlng);markerOptions.centered&&marker.map.setCenter(latlng);var geoCallback=attrs.geoCallback;geoCallback&&$parse(geoCallback)(scope)});mapController.observeAttrSetObj(orgAttrs,attrs,marker);element.bind("$destroy",function(){mapController.deleteObject("markers",
marker)})};var marker=function(Attr2MapOptions,_$parse_,_NgMap_){parser=Attr2MapOptions;$parse=_$parse_;NgMap=_NgMap_;return{restrict:"E",require:["^?map","?^ngMap"],link:linkFunc}};marker.$inject=["Attr2MapOptions","$parse","NgMap"];angular.module("ngMap").directive("marker",marker)})();
function ClusterIcon(cluster,styles){cluster.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView);this.cluster_=cluster;this.className_=cluster.getMarkerClusterer().getClusterClass();this.styles_=styles;this.center_=null;this.div_=null;this.sums_=null;this.visible_=false;this.setMap(cluster.getMap())}
ClusterIcon.prototype.onAdd=function(){var cClusterIcon=this;var cMouseDownInCluster;var cDraggingMapByCluster;this.div_=document.createElement("div");this.div_.className=this.className_;if(this.visible_)this.show();this.getPanes().overlayMouseTarget.appendChild(this.div_);this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){cDraggingMapByCluster=cMouseDownInCluster});google.maps.event.addDomListener(this.div_,"mousedown",function(){cMouseDownInCluster=
true;cDraggingMapByCluster=false});google.maps.event.addDomListener(this.div_,"click",function(e){cMouseDownInCluster=false;if(!cDraggingMapByCluster){var theBounds;var mz;var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"click",cClusterIcon.cluster_);google.maps.event.trigger(mc,"clusterclick",cClusterIcon.cluster_);if(mc.getZoomOnClick()){mz=mc.getMaxZoom();theBounds=cClusterIcon.cluster_.getBounds();mc.getMap().fitBounds(theBounds);setTimeout(function(){mc.getMap().fitBounds(theBounds);
if(mz!==null&&mc.getMap().getZoom()>mz)mc.getMap().setZoom(mz+1)},100)}e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation()}});google.maps.event.addDomListener(this.div_,"mouseover",function(){var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"mouseover",cClusterIcon.cluster_)});google.maps.event.addDomListener(this.div_,"mouseout",function(){var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"mouseout",cClusterIcon.cluster_)})};
ClusterIcon.prototype.onRemove=function(){if(this.div_&&this.div_.parentNode){this.hide();google.maps.event.removeListener(this.boundsChangedListener_);google.maps.event.clearInstanceListeners(this.div_);this.div_.parentNode.removeChild(this.div_);this.div_=null}};ClusterIcon.prototype.draw=function(){if(this.visible_){var pos=this.getPosFromLatLng_(this.center_);this.div_.style.top=pos.y+"px";this.div_.style.left=pos.x+"px"}};
ClusterIcon.prototype.hide=function(){if(this.div_)this.div_.style.display="none";this.visible_=false};
ClusterIcon.prototype.show=function(){if(this.div_){var img="";var bp=this.backgroundPosition_.split(" ");var spriteH=parseInt(bp[0].replace(/^\s+|\s+$/g,""),10);var spriteV=parseInt(bp[1].replace(/^\s+|\s+$/g,""),10);var pos=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(pos);img="\x3cimg src\x3d'"+this.url_+"' style\x3d'position: absolute; top: "+spriteV+"px; left: "+spriteH+"px; ";if(!this.cluster_.getMarkerClusterer().enableRetinaIcons_)img+="clip: rect("+-1*spriteV+
"px, "+(-1*spriteH+this.width_)+"px, "+(-1*spriteV+this.height_)+"px, "+-1*spriteH+"px);";img+="'\x3e";this.div_.innerHTML=img+"\x3cdiv style\x3d'"+"position: absolute;"+"top: "+this.anchorText_[0]+"px;"+"left: "+this.anchorText_[1]+"px;"+"color: "+this.textColor_+";"+"font-size: "+this.textSize_+"px;"+"font-family: "+this.fontFamily_+";"+"font-weight: "+this.fontWeight_+";"+"font-style: "+this.fontStyle_+";"+"text-decoration: "+this.textDecoration_+";"+"text-align: center;"+"width: "+this.width_+
"px;"+"line-height:"+this.height_+"px;"+"'\x3e"+this.sums_.text+"\x3c/div\x3e";if(typeof this.sums_.title==="undefined"||this.sums_.title==="")this.div_.title=this.cluster_.getMarkerClusterer().getTitle();else this.div_.title=this.sums_.title;this.div_.style.display=""}this.visible_=true};
ClusterIcon.prototype.useStyle=function(sums){this.sums_=sums;var index=Math.max(0,sums.index-1);index=Math.min(this.styles_.length-1,index);var style=this.styles_[index];this.url_=style.url;this.height_=style.height;this.width_=style.width;this.anchorText_=style.anchorText||[0,0];this.anchorIcon_=style.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)];this.textColor_=style.textColor||"black";this.textSize_=style.textSize||11;this.textDecoration_=style.textDecoration||"none";this.fontWeight_=
style.fontWeight||"bold";this.fontStyle_=style.fontStyle||"normal";this.fontFamily_=style.fontFamily||"Arial,sans-serif";this.backgroundPosition_=style.backgroundPosition||"0 0"};ClusterIcon.prototype.setCenter=function(center){this.center_=center};ClusterIcon.prototype.createCss=function(pos){var style=[];style.push("cursor: pointer;");style.push("position: absolute; top: "+pos.y+"px; left: "+pos.x+"px;");style.push("width: "+this.width_+"px; height: "+this.height_+"px;");return style.join("")};
ClusterIcon.prototype.getPosFromLatLng_=function(latlng){var pos=this.getProjection().fromLatLngToDivPixel(latlng);pos.x-=this.anchorIcon_[1];pos.y-=this.anchorIcon_[0];pos.x=parseInt(pos.x,10);pos.y=parseInt(pos.y,10);return pos};
function Cluster(mc){this.markerClusterer_=mc;this.map_=mc.getMap();this.gridSize_=mc.getGridSize();this.minClusterSize_=mc.getMinimumClusterSize();this.averageCenter_=mc.getAverageCenter();this.markers_=[];this.center_=null;this.bounds_=null;this.clusterIcon_=new ClusterIcon(this,mc.getStyles())}Cluster.prototype.getSize=function(){return this.markers_.length};Cluster.prototype.getMarkers=function(){return this.markers_};Cluster.prototype.getCenter=function(){return this.center_};
Cluster.prototype.getMap=function(){return this.map_};Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_};Cluster.prototype.getBounds=function(){var i;var bounds=new google.maps.LatLngBounds(this.center_,this.center_);var markers=this.getMarkers();for(i=0;i<markers.length;i++)bounds.extend(markers[i].getPosition());return bounds};Cluster.prototype.remove=function(){this.clusterIcon_.setMap(null);this.markers_=[];delete this.markers_};
Cluster.prototype.addMarker=function(marker){var i;var mCount;var mz;if(this.isMarkerAlreadyAdded_(marker))return false;if(!this.center_){this.center_=marker.getPosition();this.calculateBounds_()}else if(this.averageCenter_){var l=this.markers_.length+1;var lat=(this.center_.lat()*(l-1)+marker.getPosition().lat())/l;var lng=(this.center_.lng()*(l-1)+marker.getPosition().lng())/l;this.center_=new google.maps.LatLng(lat,lng);this.calculateBounds_()}marker.isAdded=true;this.markers_.push(marker);mCount=
this.markers_.length;mz=this.markerClusterer_.getMaxZoom();if(mz!==null&&this.map_.getZoom()>mz){if(marker.getMap()!==this.map_)marker.setMap(this.map_)}else if(mCount<this.minClusterSize_){if(marker.getMap()!==this.map_)marker.setMap(this.map_)}else if(mCount===this.minClusterSize_)for(i=0;i<mCount;i++)this.markers_[i].setMap(null);else marker.setMap(null);this.updateIcon_();return true};Cluster.prototype.isMarkerInClusterBounds=function(marker){return this.bounds_.contains(marker.getPosition())};
Cluster.prototype.calculateBounds_=function(){var bounds=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(bounds)};
Cluster.prototype.updateIcon_=function(){var mCount=this.markers_.length;var mz=this.markerClusterer_.getMaxZoom();if(mz!==null&&this.map_.getZoom()>mz){this.clusterIcon_.hide();return}if(mCount<this.minClusterSize_){this.clusterIcon_.hide();return}var numStyles=this.markerClusterer_.getStyles().length;var sums=this.markerClusterer_.getCalculator()(this.markers_,numStyles);this.clusterIcon_.setCenter(this.center_);this.clusterIcon_.useStyle(sums);this.clusterIcon_.show()};
Cluster.prototype.isMarkerAlreadyAdded_=function(marker){var i;if(this.markers_.indexOf)return this.markers_.indexOf(marker)!==-1;else for(i=0;i<this.markers_.length;i++)if(marker===this.markers_[i])return true;return false};
function MarkerClusterer(map,opt_markers,opt_options){this.extend(MarkerClusterer,google.maps.OverlayView);opt_markers=opt_markers||[];opt_options=opt_options||{};this.markers_=[];this.clusters_=[];this.listeners_=[];this.activeMap_=null;this.ready_=false;this.gridSize_=opt_options.gridSize||60;this.minClusterSize_=opt_options.minimumClusterSize||2;this.maxZoom_=opt_options.maxZoom||null;this.styles_=opt_options.styles||[];this.title_=opt_options.title||"";this.zoomOnClick_=true;if(opt_options.zoomOnClick!==
undefined)this.zoomOnClick_=opt_options.zoomOnClick;this.averageCenter_=false;if(opt_options.averageCenter!==undefined)this.averageCenter_=opt_options.averageCenter;this.ignoreHidden_=false;if(opt_options.ignoreHidden!==undefined)this.ignoreHidden_=opt_options.ignoreHidden;this.enableRetinaIcons_=false;if(opt_options.enableRetinaIcons!==undefined)this.enableRetinaIcons_=opt_options.enableRetinaIcons;this.imagePath_=opt_options.imagePath||MarkerClusterer.IMAGE_PATH;this.imageExtension_=opt_options.imageExtension||
MarkerClusterer.IMAGE_EXTENSION;this.imageSizes_=opt_options.imageSizes||MarkerClusterer.IMAGE_SIZES;this.calculator_=opt_options.calculator||MarkerClusterer.CALCULATOR;this.batchSize_=opt_options.batchSize||MarkerClusterer.BATCH_SIZE;this.batchSizeIE_=opt_options.batchSizeIE||MarkerClusterer.BATCH_SIZE_IE;this.clusterClass_=opt_options.clusterClass||"cluster";if(navigator.userAgent.toLowerCase().indexOf("msie")!==-1)this.batchSize_=this.batchSizeIE_;this.setupStyles_();this.addMarkers(opt_markers,
true);this.setMap(map)}MarkerClusterer.prototype.onAdd=function(){var cMarkerClusterer=this;this.activeMap_=this.getMap();this.ready_=true;this.repaint();this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){cMarkerClusterer.resetViewport_(false);if(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom"))google.maps.event.trigger(this,"idle")}),google.maps.event.addListener(this.getMap(),"idle",function(){cMarkerClusterer.redraw_()})]};
MarkerClusterer.prototype.onRemove=function(){var i;for(i=0;i<this.markers_.length;i++)if(this.markers_[i].getMap()!==this.activeMap_)this.markers_[i].setMap(this.activeMap_);for(i=0;i<this.clusters_.length;i++)this.clusters_[i].remove();this.clusters_=[];for(i=0;i<this.listeners_.length;i++)google.maps.event.removeListener(this.listeners_[i]);this.listeners_=[];this.activeMap_=null;this.ready_=false};MarkerClusterer.prototype.draw=function(){};
MarkerClusterer.prototype.setupStyles_=function(){var i,size;if(this.styles_.length>0)return;for(i=0;i<this.imageSizes_.length;i++){size=this.imageSizes_[i];this.styles_.push({url:this.imagePath_+(i+1)+"."+this.imageExtension_,height:size,width:size})}};MarkerClusterer.prototype.fitMapToMarkers=function(){var i;var markers=this.getMarkers();var bounds=new google.maps.LatLngBounds;for(i=0;i<markers.length;i++)bounds.extend(markers[i].getPosition());this.getMap().fitBounds(bounds)};
MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_};MarkerClusterer.prototype.setGridSize=function(gridSize){this.gridSize_=gridSize};MarkerClusterer.prototype.getMinimumClusterSize=function(){return this.minClusterSize_};MarkerClusterer.prototype.setMinimumClusterSize=function(minimumClusterSize){this.minClusterSize_=minimumClusterSize};MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_};MarkerClusterer.prototype.setMaxZoom=function(maxZoom){this.maxZoom_=maxZoom};
MarkerClusterer.prototype.getStyles=function(){return this.styles_};MarkerClusterer.prototype.setStyles=function(styles){this.styles_=styles};MarkerClusterer.prototype.getTitle=function(){return this.title_};MarkerClusterer.prototype.setTitle=function(title){this.title_=title};MarkerClusterer.prototype.getZoomOnClick=function(){return this.zoomOnClick_};MarkerClusterer.prototype.setZoomOnClick=function(zoomOnClick){this.zoomOnClick_=zoomOnClick};MarkerClusterer.prototype.getAverageCenter=function(){return this.averageCenter_};
MarkerClusterer.prototype.setAverageCenter=function(averageCenter){this.averageCenter_=averageCenter};MarkerClusterer.prototype.getIgnoreHidden=function(){return this.ignoreHidden_};MarkerClusterer.prototype.setIgnoreHidden=function(ignoreHidden){this.ignoreHidden_=ignoreHidden};MarkerClusterer.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_};MarkerClusterer.prototype.setEnableRetinaIcons=function(enableRetinaIcons){this.enableRetinaIcons_=enableRetinaIcons};
MarkerClusterer.prototype.getImageExtension=function(){return this.imageExtension_};MarkerClusterer.prototype.setImageExtension=function(imageExtension){this.imageExtension_=imageExtension};MarkerClusterer.prototype.getImagePath=function(){return this.imagePath_};MarkerClusterer.prototype.setImagePath=function(imagePath){this.imagePath_=imagePath};MarkerClusterer.prototype.getImageSizes=function(){return this.imageSizes_};
MarkerClusterer.prototype.setImageSizes=function(imageSizes){this.imageSizes_=imageSizes};MarkerClusterer.prototype.getCalculator=function(){return this.calculator_};MarkerClusterer.prototype.setCalculator=function(calculator){this.calculator_=calculator};MarkerClusterer.prototype.getBatchSizeIE=function(){return this.batchSizeIE_};MarkerClusterer.prototype.setBatchSizeIE=function(batchSizeIE){this.batchSizeIE_=batchSizeIE};MarkerClusterer.prototype.getClusterClass=function(){return this.clusterClass_};
MarkerClusterer.prototype.setClusterClass=function(clusterClass){this.clusterClass_=clusterClass};MarkerClusterer.prototype.getMarkers=function(){return this.markers_};MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers_.length};MarkerClusterer.prototype.getClusters=function(){return this.clusters_};MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length};MarkerClusterer.prototype.addMarker=function(marker,opt_nodraw){this.pushMarkerTo_(marker);if(!opt_nodraw)this.redraw_()};
MarkerClusterer.prototype.addMarkers=function(markers,opt_nodraw){var key;for(key in markers)if(markers.hasOwnProperty(key))this.pushMarkerTo_(markers[key]);if(!opt_nodraw)this.redraw_()};MarkerClusterer.prototype.pushMarkerTo_=function(marker){if(marker.getDraggable()){var cMarkerClusterer=this;google.maps.event.addListener(marker,"dragend",function(){if(cMarkerClusterer.ready_){this.isAdded=false;cMarkerClusterer.repaint()}})}marker.isAdded=false;this.markers_.push(marker)};
MarkerClusterer.prototype.removeMarker=function(marker,opt_nodraw){var removed=this.removeMarker_(marker);if(!opt_nodraw&&removed)this.repaint();return removed};MarkerClusterer.prototype.removeMarkers=function(markers,opt_nodraw){var i,r;var removed=false;for(i=0;i<markers.length;i++){r=this.removeMarker_(markers[i]);removed=removed||r}if(!opt_nodraw&&removed)this.repaint();return removed};
MarkerClusterer.prototype.removeMarker_=function(marker){var i;var index=-1;if(this.markers_.indexOf)index=this.markers_.indexOf(marker);else for(i=0;i<this.markers_.length;i++)if(marker===this.markers_[i]){index=i;break}if(index===-1)return false;marker.setMap(null);this.markers_.splice(index,1);return true};MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport_(true);this.markers_=[]};
MarkerClusterer.prototype.repaint=function(){var oldClusters=this.clusters_.slice();this.clusters_=[];this.resetViewport_(false);this.redraw_();setTimeout(function(){var i;for(i=0;i<oldClusters.length;i++)oldClusters[i].remove()},0)};
MarkerClusterer.prototype.getExtendedBounds=function(bounds){var projection=this.getProjection();var tr=new google.maps.LatLng(bounds.getNorthEast().lat(),bounds.getNorthEast().lng());var bl=new google.maps.LatLng(bounds.getSouthWest().lat(),bounds.getSouthWest().lng());var trPix=projection.fromLatLngToDivPixel(tr);trPix.x+=this.gridSize_;trPix.y-=this.gridSize_;var blPix=projection.fromLatLngToDivPixel(bl);blPix.x-=this.gridSize_;blPix.y+=this.gridSize_;var ne=projection.fromDivPixelToLatLng(trPix);
var sw=projection.fromDivPixelToLatLng(blPix);bounds.extend(ne);bounds.extend(sw);return bounds};MarkerClusterer.prototype.redraw_=function(){this.createClusters_(0)};MarkerClusterer.prototype.resetViewport_=function(opt_hide){var i,marker;for(i=0;i<this.clusters_.length;i++)this.clusters_[i].remove();this.clusters_=[];for(i=0;i<this.markers_.length;i++){marker=this.markers_[i];marker.isAdded=false;if(opt_hide)marker.setMap(null)}};
MarkerClusterer.prototype.distanceBetweenPoints_=function(p1,p2){var R=6371;var dLat=(p2.lat()-p1.lat())*Math.PI/180;var dLon=(p2.lng()-p1.lng())*Math.PI/180;var a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(p1.lat()*Math.PI/180)*Math.cos(p2.lat()*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);var c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));var d=R*c;return d};MarkerClusterer.prototype.isMarkerInBounds_=function(marker,bounds){return bounds.contains(marker.getPosition())};
MarkerClusterer.prototype.addToClosestCluster_=function(marker){var i,d,cluster,center;var distance=4E4;var clusterToAddTo=null;for(i=0;i<this.clusters_.length;i++){cluster=this.clusters_[i];center=cluster.getCenter();if(center){d=this.distanceBetweenPoints_(center,marker.getPosition());if(d<distance){distance=d;clusterToAddTo=cluster}}}if(clusterToAddTo&&clusterToAddTo.isMarkerInClusterBounds(marker))clusterToAddTo.addMarker(marker);else{cluster=new Cluster(this);cluster.addMarker(marker);this.clusters_.push(cluster)}};
MarkerClusterer.prototype.createClusters_=function(iFirst){var i,marker;var mapBounds;var cMarkerClusterer=this;if(!this.ready_)return;if(iFirst===0){google.maps.event.trigger(this,"clusteringbegin",this);if(typeof this.timerRefStatic!=="undefined"){clearTimeout(this.timerRefStatic);delete this.timerRefStatic}}if(this.getMap().getZoom()>3)mapBounds=new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast());else mapBounds=new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,
-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var bounds=this.getExtendedBounds(mapBounds);var iLast=Math.min(iFirst+this.batchSize_,this.markers_.length);for(i=iFirst;i<iLast;i++){marker=this.markers_[i];if(!marker.isAdded&&this.isMarkerInBounds_(marker,bounds))if(!this.ignoreHidden_||this.ignoreHidden_&&marker.getVisible())this.addToClosestCluster_(marker)}if(iLast<this.markers_.length)this.timerRefStatic=setTimeout(function(){cMarkerClusterer.createClusters_(iLast)},
0);else{delete this.timerRefStatic;google.maps.event.trigger(this,"clusteringend",this)}};MarkerClusterer.prototype.extend=function(obj1,obj2){return function(object){var property;for(property in object.prototype)this.prototype[property]=object.prototype[property];return this}.apply(obj1,[obj2])};
MarkerClusterer.CALCULATOR=function(markers,numStyles){var index=0;var title="";var count=markers.length.toString();var dv=count;while(dv!==0){dv=parseInt(dv/10,10);index++}index=Math.min(index,numStyles);return{text:count,index:index,title:title}};MarkerClusterer.BATCH_SIZE=2E3;MarkerClusterer.BATCH_SIZE_IE=500;MarkerClusterer.IMAGE_PATH="https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m";MarkerClusterer.IMAGE_EXTENSION="png";MarkerClusterer.IMAGE_SIZES=[53,56,66,78,90];
/*
 angular-translate - v2.5.2 - 2014-12-10
 http://github.com/angular-translate/angular-translate
 Copyright (c) 2014 ; Licensed MIT
*/
angular.module("pascalprecht.translate",["ng"]).run(["$translate",function($translate){var key=$translate.storageKey(),storage=$translate.storage();var fallbackFromIncorrectStorageValue=function(){var preferred=$translate.preferredLanguage();if(angular.isString(preferred))$translate.use(preferred);else storage.put(key,$translate.use())};if(storage)if(!storage.get(key))fallbackFromIncorrectStorageValue();else $translate.use(storage.get(key))["catch"](fallbackFromIncorrectStorageValue);else if(angular.isString($translate.preferredLanguage()))$translate.use($translate.preferredLanguage())}]);
angular.module("pascalprecht.translate").provider("$translate",["$STORAGE_KEY",function($STORAGE_KEY){var $translationTable={},$preferredLanguage,$availableLanguageKeys=[],$languageKeyAliases,$fallbackLanguage,$fallbackWasString,$uses,$nextLang,$storageFactory,$storageKey=$STORAGE_KEY,$storagePrefix,$missingTranslationHandlerFactory,$interpolationFactory,$interpolatorFactories=[],$interpolationSanitizationStrategy=false,$loaderFactory,$cloakClassName="translate-cloak",$loaderOptions,$notFoundIndicatorLeft,
$notFoundIndicatorRight,$postCompilingEnabled=false,NESTED_OBJECT_DELIMITER=".",loaderCache;var version="2.5.2";var getFirstBrowserLanguage=function(){var nav=window.navigator,browserLanguagePropertyKeys=["language","browserLanguage","systemLanguage","userLanguage"],i,language;if(angular.isArray(nav.languages))for(i=0;i<nav.languages.length;i++){language=nav.languages[i];if(language&&language.length)return language}for(i=0;i<browserLanguagePropertyKeys.length;i++){language=nav[browserLanguagePropertyKeys[i]];
if(language&&language.length)return language}return null};getFirstBrowserLanguage.displayName="angular-translate/service: getFirstBrowserLanguage";var getLocale=function(){return(getFirstBrowserLanguage()||"").split("-").join("_")};getLocale.displayName="angular-translate/service: getLocale";var indexOf=function(array,searchElement){for(var i=0,len=array.length;i<len;i++)if(array[i]===searchElement)return i;return-1};var trim=function(){return this.replace(/^\s+|\s+$/g,"")};var negotiateLocale=function(preferred){var avail=
[],locale=angular.lowercase(preferred),i=0,n=$availableLanguageKeys.length;for(;i<n;i++)avail.push(angular.lowercase($availableLanguageKeys[i]));if(indexOf(avail,locale)>-1)return preferred;if($languageKeyAliases){var alias;for(var langKeyAlias in $languageKeyAliases){var hasWildcardKey=false;var hasExactKey=Object.prototype.hasOwnProperty.call($languageKeyAliases,langKeyAlias)&&angular.lowercase(langKeyAlias)===angular.lowercase(preferred);if(langKeyAlias.slice(-1)==="*")hasWildcardKey=langKeyAlias.slice(0,
-1)===preferred.slice(0,langKeyAlias.length-1);if(hasExactKey||hasWildcardKey){alias=$languageKeyAliases[langKeyAlias];if(indexOf(avail,angular.lowercase(alias))>-1)return alias}}}var parts=preferred.split("_");if(parts.length>1&&indexOf(avail,angular.lowercase(parts[0]))>-1)return parts[0];return preferred};var translations=function(langKey,translationTable){if(!langKey&&!translationTable)return $translationTable;if(langKey&&!translationTable){if(angular.isString(langKey))return $translationTable[langKey]}else{if(!angular.isObject($translationTable[langKey]))$translationTable[langKey]=
{};angular.extend($translationTable[langKey],flatObject(translationTable))}return this};this.translations=translations;this.cloakClassName=function(name){if(!name)return $cloakClassName;$cloakClassName=name;return this};var flatObject=function(data,path,result,prevKey){var key,keyWithPath,keyWithShortPath,val;if(!path)path=[];if(!result)result={};for(key in data){if(!Object.prototype.hasOwnProperty.call(data,key))continue;val=data[key];if(angular.isObject(val))flatObject(val,path.concat(key),result,
key);else{keyWithPath=path.length?""+path.join(NESTED_OBJECT_DELIMITER)+NESTED_OBJECT_DELIMITER+key:key;if(path.length&&key===prevKey){keyWithShortPath=""+path.join(NESTED_OBJECT_DELIMITER);result[keyWithShortPath]="@:"+keyWithPath}result[keyWithPath]=val}}return result};this.addInterpolation=function(factory){$interpolatorFactories.push(factory);return this};this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")};this.useInterpolation=function(factory){$interpolationFactory=
factory;return this};this.useSanitizeValueStrategy=function(value){$interpolationSanitizationStrategy=value;return this};this.preferredLanguage=function(langKey){setupPreferredLanguage(langKey);return this};var setupPreferredLanguage=function(langKey){if(langKey)$preferredLanguage=langKey;return $preferredLanguage};this.translationNotFoundIndicator=function(indicator){this.translationNotFoundIndicatorLeft(indicator);this.translationNotFoundIndicatorRight(indicator);return this};this.translationNotFoundIndicatorLeft=
function(indicator){if(!indicator)return $notFoundIndicatorLeft;$notFoundIndicatorLeft=indicator;return this};this.translationNotFoundIndicatorRight=function(indicator){if(!indicator)return $notFoundIndicatorRight;$notFoundIndicatorRight=indicator;return this};this.fallbackLanguage=function(langKey){fallbackStack(langKey);return this};var fallbackStack=function(langKey){if(langKey){if(angular.isString(langKey)){$fallbackWasString=true;$fallbackLanguage=[langKey]}else if(angular.isArray(langKey)){$fallbackWasString=
false;$fallbackLanguage=langKey}if(angular.isString($preferredLanguage)&&indexOf($fallbackLanguage,$preferredLanguage)<0)$fallbackLanguage.push($preferredLanguage);return this}else if($fallbackWasString)return $fallbackLanguage[0];else return $fallbackLanguage};this.use=function(langKey){if(langKey){if(!$translationTable[langKey]&&!$loaderFactory)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+langKey+"'");$uses=langKey;return this}return $uses};var storageKey=function(key){if(!key){if($storagePrefix)return $storagePrefix+
$storageKey;return $storageKey}$storageKey=key};this.storageKey=storageKey;this.useUrlLoader=function(url,options){return this.useLoader("$translateUrlLoader",angular.extend({url:url},options))};this.useStaticFilesLoader=function(options){return this.useLoader("$translateStaticFilesLoader",options)};this.useLoader=function(loaderFactory,options){$loaderFactory=loaderFactory;$loaderOptions=options||{};return this};this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")};this.useCookieStorage=
function(){return this.useStorage("$translateCookieStorage")};this.useStorage=function(storageFactory){$storageFactory=storageFactory;return this};this.storagePrefix=function(prefix){if(!prefix)return prefix;$storagePrefix=prefix;return this};this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")};this.useMissingTranslationHandler=function(factory){$missingTranslationHandlerFactory=factory;return this};this.usePostCompiling=
function(value){$postCompilingEnabled=!!value;return this};this.determinePreferredLanguage=function(fn){var locale=fn&&angular.isFunction(fn)?fn():getLocale();if(!$availableLanguageKeys.length)$preferredLanguage=locale;else $preferredLanguage=negotiateLocale(locale);return this};this.registerAvailableLanguageKeys=function(languageKeys,aliases){if(languageKeys){$availableLanguageKeys=languageKeys;if(aliases)$languageKeyAliases=aliases;return this}return $availableLanguageKeys};this.useLoaderCache=
function(cache){if(cache===false)loaderCache=undefined;else if(cache===true)loaderCache=true;else if(typeof cache==="undefined")loaderCache="$translationCache";else if(cache)loaderCache=cache;return this};this.$get=["$log","$injector","$rootScope","$q",function($log,$injector,$rootScope,$q){var Storage,defaultInterpolator=$injector.get($interpolationFactory||"$translateDefaultInterpolation"),pendingLoader=false,interpolatorHashMap={},langPromises={},fallbackIndex,startFallbackIteration;var $translate=
function(translationId,interpolateParams,interpolationId){if(angular.isArray(translationId)){var translateAll=function(translationIds){var results={};var promises=[];var translate=function(translationId){var deferred=$q.defer();var regardless=function(value){results[translationId]=value;deferred.resolve([translationId,value])};$translate(translationId,interpolateParams,interpolationId).then(regardless,regardless);return deferred.promise};for(var i=0,c=translationIds.length;i<c;i++)promises.push(translate(translationIds[i]));
return $q.all(promises).then(function(){return results})};return translateAll(translationId)}var deferred=$q.defer();if(translationId)translationId=trim.apply(translationId);var promiseToWaitFor=function(){var promise=$preferredLanguage?langPromises[$preferredLanguage]:langPromises[$uses];fallbackIndex=0;if($storageFactory&&!promise){var langKey=Storage.get($storageKey);promise=langPromises[langKey];if($fallbackLanguage&&$fallbackLanguage.length){var index=indexOf($fallbackLanguage,langKey);fallbackIndex=
index===0?1:0;if(indexOf($fallbackLanguage,$preferredLanguage)<0)$fallbackLanguage.push($preferredLanguage)}}return promise}();if(!promiseToWaitFor)determineTranslation(translationId,interpolateParams,interpolationId).then(deferred.resolve,deferred.reject);else promiseToWaitFor.then(function(){determineTranslation(translationId,interpolateParams,interpolationId).then(deferred.resolve,deferred.reject)},deferred.reject);return deferred.promise};var applyNotFoundIndicators=function(translationId){if($notFoundIndicatorLeft)translationId=
[$notFoundIndicatorLeft,translationId].join(" ");if($notFoundIndicatorRight)translationId=[translationId,$notFoundIndicatorRight].join(" ");return translationId};var useLanguage=function(key){$uses=key;$rootScope.$emit("$translateChangeSuccess",{language:key});if($storageFactory)Storage.put($translate.storageKey(),$uses);defaultInterpolator.setLocale($uses);angular.forEach(interpolatorHashMap,function(interpolator,id){interpolatorHashMap[id].setLocale($uses)});$rootScope.$emit("$translateChangeEnd",
{language:key})};var loadAsync=function(key){if(!key)throw"No language key specified for loading.";var deferred=$q.defer();$rootScope.$emit("$translateLoadingStart",{language:key});pendingLoader=true;var cache=loaderCache;if(typeof cache==="string")cache=$injector.get(cache);var loaderOptions=angular.extend({},$loaderOptions,{key:key,$http:angular.extend({},{cache:cache},$loaderOptions.$http)});$injector.get($loaderFactory)(loaderOptions).then(function(data){var translationTable={};$rootScope.$emit("$translateLoadingSuccess",
{language:key});if(angular.isArray(data))angular.forEach(data,function(table){angular.extend(translationTable,flatObject(table))});else angular.extend(translationTable,flatObject(data));pendingLoader=false;deferred.resolve({key:key,table:translationTable});$rootScope.$emit("$translateLoadingEnd",{language:key})},function(key){$rootScope.$emit("$translateLoadingError",{language:key});deferred.reject(key);$rootScope.$emit("$translateLoadingEnd",{language:key})});return deferred.promise};if($storageFactory){Storage=
$injector.get($storageFactory);if(!Storage.get||!Storage.put)throw new Error("Couldn't use storage '"+$storageFactory+"', missing get() or put() method!");}if(angular.isFunction(defaultInterpolator.useSanitizeValueStrategy))defaultInterpolator.useSanitizeValueStrategy($interpolationSanitizationStrategy);if($interpolatorFactories.length)angular.forEach($interpolatorFactories,function(interpolatorFactory){var interpolator=$injector.get(interpolatorFactory);interpolator.setLocale($preferredLanguage||
$uses);if(angular.isFunction(interpolator.useSanitizeValueStrategy))interpolator.useSanitizeValueStrategy($interpolationSanitizationStrategy);interpolatorHashMap[interpolator.getInterpolationIdentifier()]=interpolator});var getTranslationTable=function(langKey){var deferred=$q.defer();if(Object.prototype.hasOwnProperty.call($translationTable,langKey))deferred.resolve($translationTable[langKey]);else if(langPromises[langKey])langPromises[langKey].then(function(data){translations(data.key,data.table);
deferred.resolve(data.table)},deferred.reject);else deferred.reject();return deferred.promise};var getFallbackTranslation=function(langKey,translationId,interpolateParams,Interpolator){var deferred=$q.defer();getTranslationTable(langKey).then(function(translationTable){if(Object.prototype.hasOwnProperty.call(translationTable,translationId)){Interpolator.setLocale(langKey);deferred.resolve(Interpolator.interpolate(translationTable[translationId],interpolateParams));Interpolator.setLocale($uses)}else deferred.reject()},
deferred.reject);return deferred.promise};var getFallbackTranslationInstant=function(langKey,translationId,interpolateParams,Interpolator){var result,translationTable=$translationTable[langKey];if(translationTable&&Object.prototype.hasOwnProperty.call(translationTable,translationId)){Interpolator.setLocale(langKey);result=Interpolator.interpolate(translationTable[translationId],interpolateParams);Interpolator.setLocale($uses)}return result};var translateByHandler=function(translationId){if($missingTranslationHandlerFactory){var resultString=
$injector.get($missingTranslationHandlerFactory)(translationId,$uses);if(resultString!==undefined)return resultString;else return translationId}else return translationId};var resolveForFallbackLanguage=function(fallbackLanguageIndex,translationId,interpolateParams,Interpolator){var deferred=$q.defer();if(fallbackLanguageIndex<$fallbackLanguage.length){var langKey=$fallbackLanguage[fallbackLanguageIndex];getFallbackTranslation(langKey,translationId,interpolateParams,Interpolator).then(deferred.resolve,
function(){resolveForFallbackLanguage(fallbackLanguageIndex+1,translationId,interpolateParams,Interpolator).then(deferred.resolve)})}else deferred.resolve(translateByHandler(translationId));return deferred.promise};var resolveForFallbackLanguageInstant=function(fallbackLanguageIndex,translationId,interpolateParams,Interpolator){var result;if(fallbackLanguageIndex<$fallbackLanguage.length){var langKey=$fallbackLanguage[fallbackLanguageIndex];result=getFallbackTranslationInstant(langKey,translationId,
interpolateParams,Interpolator);if(!result)result=resolveForFallbackLanguageInstant(fallbackLanguageIndex+1,translationId,interpolateParams,Interpolator)}return result};var fallbackTranslation=function(translationId,interpolateParams,Interpolator){return resolveForFallbackLanguage(startFallbackIteration>0?startFallbackIteration:fallbackIndex,translationId,interpolateParams,Interpolator)};var fallbackTranslationInstant=function(translationId,interpolateParams,Interpolator){return resolveForFallbackLanguageInstant(startFallbackIteration>
0?startFallbackIteration:fallbackIndex,translationId,interpolateParams,Interpolator)};var determineTranslation=function(translationId,interpolateParams,interpolationId){var deferred=$q.defer();var table=$uses?$translationTable[$uses]:$translationTable,Interpolator=interpolationId?interpolatorHashMap[interpolationId]:defaultInterpolator;if(table&&Object.prototype.hasOwnProperty.call(table,translationId)){var translation=table[translationId];if(translation.substr(0,2)==="@:")$translate(translation.substr(2),
interpolateParams,interpolationId).then(deferred.resolve,deferred.reject);else deferred.resolve(Interpolator.interpolate(translation,interpolateParams))}else{var missingTranslationHandlerTranslation;if($missingTranslationHandlerFactory&&!pendingLoader)missingTranslationHandlerTranslation=translateByHandler(translationId);if($uses&&$fallbackLanguage&&$fallbackLanguage.length)fallbackTranslation(translationId,interpolateParams,Interpolator).then(function(translation){deferred.resolve(translation)},
function(_translationId){deferred.reject(applyNotFoundIndicators(_translationId))});else if($missingTranslationHandlerFactory&&!pendingLoader&&missingTranslationHandlerTranslation)deferred.resolve(missingTranslationHandlerTranslation);else deferred.reject(applyNotFoundIndicators(translationId))}return deferred.promise};var determineTranslationInstant=function(translationId,interpolateParams,interpolationId){var result,table=$uses?$translationTable[$uses]:$translationTable,Interpolator=interpolationId?
interpolatorHashMap[interpolationId]:defaultInterpolator;if(table&&Object.prototype.hasOwnProperty.call(table,translationId)){var translation=table[translationId];if(translation.substr(0,2)==="@:")result=determineTranslationInstant(translation.substr(2),interpolateParams,interpolationId);else result=Interpolator.interpolate(translation,interpolateParams)}else{var missingTranslationHandlerTranslation;if($missingTranslationHandlerFactory&&!pendingLoader)missingTranslationHandlerTranslation=translateByHandler(translationId);
if($uses&&$fallbackLanguage&&$fallbackLanguage.length){fallbackIndex=0;result=fallbackTranslationInstant(translationId,interpolateParams,Interpolator)}else if($missingTranslationHandlerFactory&&!pendingLoader&&missingTranslationHandlerTranslation)result=missingTranslationHandlerTranslation;else result=applyNotFoundIndicators(translationId)}return result};$translate.preferredLanguage=function(langKey){if(langKey)setupPreferredLanguage(langKey);return $preferredLanguage};$translate.cloakClassName=function(){return $cloakClassName};
$translate.fallbackLanguage=function(langKey){if(langKey!==undefined&&langKey!==null){fallbackStack(langKey);if($loaderFactory)if($fallbackLanguage&&$fallbackLanguage.length)for(var i=0,len=$fallbackLanguage.length;i<len;i++)if(!langPromises[$fallbackLanguage[i]])langPromises[$fallbackLanguage[i]]=loadAsync($fallbackLanguage[i]);$translate.use($translate.use())}if($fallbackWasString)return $fallbackLanguage[0];else return $fallbackLanguage};$translate.useFallbackLanguage=function(langKey){if(langKey!==
undefined&&langKey!==null)if(!langKey)startFallbackIteration=0;else{var langKeyPosition=indexOf($fallbackLanguage,langKey);if(langKeyPosition>-1)startFallbackIteration=langKeyPosition}};$translate.proposedLanguage=function(){return $nextLang};$translate.storage=function(){return Storage};$translate.use=function(key){if(!key)return $uses;var deferred=$q.defer();$rootScope.$emit("$translateChangeStart",{language:key});var aliasedKey=negotiateLocale(key);if(aliasedKey)key=aliasedKey;if(!$translationTable[key]&&
$loaderFactory&&!langPromises[key]){$nextLang=key;langPromises[key]=loadAsync(key).then(function(translation){translations(translation.key,translation.table);deferred.resolve(translation.key);useLanguage(translation.key);if($nextLang===key)$nextLang=undefined;return translation},function(key){if($nextLang===key)$nextLang=undefined;$rootScope.$emit("$translateChangeError",{language:key});deferred.reject(key);$rootScope.$emit("$translateChangeEnd",{language:key})})}else{deferred.resolve(key);useLanguage(key)}return deferred.promise};
$translate.storageKey=function(){return storageKey()};$translate.isPostCompilingEnabled=function(){return $postCompilingEnabled};$translate.refresh=function(langKey){if(!$loaderFactory)throw new Error("Couldn't refresh translation table, no loader registered!");var deferred=$q.defer();function resolve(){deferred.resolve();$rootScope.$emit("$translateRefreshEnd",{language:langKey})}function reject(){deferred.reject();$rootScope.$emit("$translateRefreshEnd",{language:langKey})}$rootScope.$emit("$translateRefreshStart",
{language:langKey});if(!langKey){var tables=[],loadingKeys={};if($fallbackLanguage&&$fallbackLanguage.length)for(var i=0,len=$fallbackLanguage.length;i<len;i++){tables.push(loadAsync($fallbackLanguage[i]));loadingKeys[$fallbackLanguage[i]]=true}if($uses&&!loadingKeys[$uses])tables.push(loadAsync($uses));$q.all(tables).then(function(tableData){angular.forEach(tableData,function(data){if($translationTable[data.key])delete $translationTable[data.key];translations(data.key,data.table)});if($uses)useLanguage($uses);
resolve()})}else if($translationTable[langKey])loadAsync(langKey).then(function(data){translations(data.key,data.table);if(langKey===$uses)useLanguage($uses);resolve()},reject);else reject();return deferred.promise};$translate.instant=function(translationId,interpolateParams,interpolationId){if(translationId===null||angular.isUndefined(translationId))return translationId;if(angular.isArray(translationId)){var results={};for(var i=0,c=translationId.length;i<c;i++)results[translationId[i]]=$translate.instant(translationId[i],
interpolateParams,interpolationId);return results}if(angular.isString(translationId)&&translationId.length<1)return translationId;if(translationId)translationId=trim.apply(translationId);var result,possibleLangKeys=[];if($preferredLanguage)possibleLangKeys.push($preferredLanguage);if($uses)possibleLangKeys.push($uses);if($fallbackLanguage&&$fallbackLanguage.length)possibleLangKeys=possibleLangKeys.concat($fallbackLanguage);for(var j=0,d=possibleLangKeys.length;j<d;j++){var possibleLangKey=possibleLangKeys[j];
if($translationTable[possibleLangKey])if(typeof $translationTable[possibleLangKey][translationId]!=="undefined")result=determineTranslationInstant(translationId,interpolateParams,interpolationId);if(typeof result!=="undefined")break}if(!result&&result!==""){result=defaultInterpolator.interpolate(translationId,interpolateParams);if($missingTranslationHandlerFactory&&!pendingLoader)result=translateByHandler(translationId)}return result};$translate.versionInfo=function(){return version};$translate.loaderCache=
function(){return loaderCache};if($loaderFactory){if(angular.equals($translationTable,{}))$translate.use($translate.use());if($fallbackLanguage&&$fallbackLanguage.length){var processAsyncResult=function(translation){translations(translation.key,translation.table);$rootScope.$emit("$translateChangeEnd",{language:translation.key});return translation};for(var i=0,len=$fallbackLanguage.length;i<len;i++)langPromises[$fallbackLanguage[i]]=loadAsync($fallbackLanguage[i]).then(processAsyncResult)}}return $translate}]}]);
angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",["$interpolate",function($interpolate){var $translateInterpolator={},$locale,$identifier="default",$sanitizeValueStrategy=null,sanitizeValueStrategies={escaped:function(params){var result={};for(var key in params)if(Object.prototype.hasOwnProperty.call(params,key))result[key]=angular.element("\x3cdiv\x3e\x3c/div\x3e").text(params[key]).html();return result}};var sanitizeParams=function(params){var result;if(angular.isFunction(sanitizeValueStrategies[$sanitizeValueStrategy]))result=
sanitizeValueStrategies[$sanitizeValueStrategy](params);else result=params;return result};$translateInterpolator.setLocale=function(locale){$locale=locale};$translateInterpolator.getInterpolationIdentifier=function(){return $identifier};$translateInterpolator.useSanitizeValueStrategy=function(value){$sanitizeValueStrategy=value;return this};$translateInterpolator.interpolate=function(string,interpolateParams){if($sanitizeValueStrategy)interpolateParams=sanitizeParams(interpolateParams);return $interpolate(string)(interpolateParams||
{})};return $translateInterpolator}]);angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY");
angular.module("pascalprecht.translate").directive("translate",["$translate","$q","$interpolate","$compile","$parse","$rootScope",function($translate,$q,$interpolate,$compile,$parse,$rootScope){return{restrict:"AE",scope:true,compile:function(tElement,tAttr){var translateValuesExist=tAttr.translateValues?tAttr.translateValues:undefined;var translateInterpolation=tAttr.translateInterpolation?tAttr.translateInterpolation:undefined;var translateValueExist=tElement[0].outerHTML.match(/translate-value-+/i);
var interpolateRegExp="^(.*)("+$interpolate.startSymbol()+".*"+$interpolate.endSymbol()+")(.*)",watcherRegExp="^(.*)"+$interpolate.startSymbol()+"(.*)"+$interpolate.endSymbol()+"(.*)";return function linkFn(scope,iElement,iAttr){scope.interpolateParams={};scope.preText="";scope.postText="";var translationIds={};var observeElementTranslation=function(translationId){if(angular.equals(translationId,"")||!angular.isDefined(translationId)){var interpolateMatches=iElement.text().match(interpolateRegExp);
if(angular.isArray(interpolateMatches)){scope.preText=interpolateMatches[1];scope.postText=interpolateMatches[3];translationIds.translate=$interpolate(interpolateMatches[2])(scope.$parent);watcherMatches=iElement.text().match(watcherRegExp);if(angular.isArray(watcherMatches)&&watcherMatches[2]&&watcherMatches[2].length)scope.$watch(watcherMatches[2],function(newValue){translationIds.translate=newValue;updateTranslations()})}else translationIds.translate=iElement.text().replace(/^\s+|\s+$/g,"")}else translationIds.translate=
translationId;updateTranslations()};var observeAttributeTranslation=function(translateAttr){iAttr.$observe(translateAttr,function(translationId){translationIds[translateAttr]=translationId;updateTranslations()})};iAttr.$observe("translate",function(translationId){observeElementTranslation(translationId)});for(var translateAttr in iAttr)if(iAttr.hasOwnProperty(translateAttr)&&translateAttr.substr(0,13)==="translateAttr")observeAttributeTranslation(translateAttr);iAttr.$observe("translateDefault",function(value){scope.defaultText=
value});if(translateValuesExist)iAttr.$observe("translateValues",function(interpolateParams){if(interpolateParams)scope.$parent.$watch(function(){angular.extend(scope.interpolateParams,$parse(interpolateParams)(scope.$parent))})});if(translateValueExist){var observeValueAttribute=function(attrName){iAttr.$observe(attrName,function(value){var attributeName=angular.lowercase(attrName.substr(14,1))+attrName.substr(15);scope.interpolateParams[attributeName]=value})};for(var attr in iAttr)if(Object.prototype.hasOwnProperty.call(iAttr,
attr)&&attr.substr(0,14)==="translateValue"&&attr!=="translateValues")observeValueAttribute(attr)}var updateTranslations=function(){for(var key in translationIds)if(translationIds.hasOwnProperty(key)&&translationIds[key])updateTranslation(key,translationIds[key],scope,scope.interpolateParams)};var updateTranslation=function(translateAttr,translationId,scope,interpolateParams){$translate(translationId,interpolateParams,translateInterpolation).then(function(translation){applyTranslation(translation,
scope,true,translateAttr)},function(translationId){applyTranslation(translationId,scope,false,translateAttr)})};var applyTranslation=function(value,scope,successful,translateAttr){if(translateAttr==="translate"){if(!successful&&typeof scope.defaultText!=="undefined")value=scope.defaultText;iElement.html(scope.preText+value+scope.postText);var globallyEnabled=$translate.isPostCompilingEnabled();var locallyDefined=typeof tAttr.translateCompile!=="undefined";var locallyEnabled=locallyDefined&&tAttr.translateCompile!==
"false";if(globallyEnabled&&!locallyDefined||locallyEnabled)$compile(iElement.contents())(scope)}else{if(!successful&&typeof scope.defaultText!=="undefined")value=scope.defaultText;var attributeName=iAttr.$attr[translateAttr].substr(15);iElement.attr(attributeName,value)}};scope.$watch("interpolateParams",updateTranslations,true);var unbind=$rootScope.$on("$translateChangeSuccess",updateTranslations);if(iElement.text().length)observeElementTranslation("");updateTranslations();scope.$on("$destroy",
unbind)}}}}]);
angular.module("pascalprecht.translate").directive("translateCloak",["$rootScope","$translate",function($rootScope,$translate){return{compile:function(tElement){var applyCloak=function(){tElement.addClass($translate.cloakClassName())},removeCloak=function(){tElement.removeClass($translate.cloakClassName())},removeListener=$rootScope.$on("$translateChangeEnd",function(){removeCloak();removeListener();removeListener=null});applyCloak();return function linkFn(scope,iElement,iAttr){if(iAttr.translateCloak&&iAttr.translateCloak.length)iAttr.$observe("translateCloak",
function(translationId){$translate(translationId).then(removeCloak,applyCloak)})}}}}]);angular.module("pascalprecht.translate").filter("translate",["$parse","$translate",function($parse,$translate){var translateFilter=function(translationId,interpolateParams,interpolation){if(!angular.isObject(interpolateParams))interpolateParams=$parse(interpolateParams)(this);return $translate.instant(translationId,interpolateParams,interpolation)};translateFilter.$stateful=true;return translateFilter}]);
/*
 angular-translate - v2.5.2 - 2014-12-10
 http://github.com/angular-translate/angular-translate
 Copyright (c) 2014 ; Licensed MIT
*/
angular.module("pascalprecht.translate").factory("$translateUrlLoader",["$q","$http",function($q,$http){return function(options){if(!options||!options.url)throw new Error("Couldn't use urlLoader since no url is given!");var deferred=$q.defer(),requestParams={};requestParams[options.queryParameter||"lang"]=options.key;$http(angular.extend({url:options.url,params:requestParams,method:"GET"},options.$http)).success(function(data){deferred.resolve(data)}).error(function(data){deferred.reject(options.key)});
return deferred.promise}}]);
/* Chosen v1.4.2 | (c) 2011-2015 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
(function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&amp;"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1},AbstractChosen.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?"<b class='group-name'>"+a.group_label+"</b>"+a.html:a.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c)));return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match?this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):"":""},AbstractChosen.prototype.result_add_group=function(a){var b,c;return a.search_match||a.group_match?a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):"":""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+"</em>"+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+"<em>"+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(){var a=this;return setTimeout(function(){return a.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(){var c,d;c=a(this),d=c.data("chosen"),"destroy"===b&&d instanceof Chosen?d.destroy():d instanceof Chosen||c.data("chosen",new Chosen(this,b))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(b)+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}).call(this);
/*! ng-csv 10-10-2015 */
!function(a){angular.module("ngCsv.config",[]).value("ngCsv.config",{debug:!0}).config(["$compileProvider",function(a){angular.isDefined(a.urlSanitizationWhitelist)?a.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/):a.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/)}]),angular.module("ngCsv.directives",["ngCsv.services"]),angular.module("ngCsv.services",[]),angular.module("ngCsv",["ngCsv.config","ngCsv.services","ngCsv.directives","ngSanitize"]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ngCsv"),angular.module("ngCsv.services").service("CSV",["$q",function(a){var b="\r\n",c="﻿",d={"\\t":"	","\\b":"\b","\\v":"","\\f":"\f","\\r":"\r"};this.stringifyField=function(a,b){return"locale"===b.decimalSep&&this.isFloat(a)?a.toLocaleString():"."!==b.decimalSep&&this.isFloat(a)?a.toString().replace(".",b.decimalSep):"string"==typeof a?(a=a.replace(/"/g,'""'),(b.quoteStrings||a.indexOf(",")>-1||a.indexOf("\n")>-1||a.indexOf("\r")>-1)&&(a=b.txtDelim+a+b.txtDelim),a):"boolean"==typeof a?a?"TRUE":"FALSE":a},this.isFloat=function(a){return+a===a&&(!isFinite(a)||Boolean(a%1))},this.stringify=function(d,e){var f=a.defer(),g=this,h="",i="",j=a.when(d).then(function(a){if(angular.isDefined(e.header)&&e.header){var d,j;d=[],angular.forEach(e.header,function(a){this.push(g.stringifyField(a,e))},d),j=d.join(e.fieldSep?e.fieldSep:","),i+=j+b}var k=[];if(angular.isArray(a)?k=a:angular.isFunction(a)&&(k=a()),angular.isDefined(e.label)&&e.label&&"boolean"==typeof e.label){var l,m;l=[],angular.forEach(k[0],function(a,b){this.push(g.stringifyField(b,e))},l),m=l.join(e.fieldSep?e.fieldSep:","),i+=m+b}angular.forEach(k,function(a,c){var d,f,h=angular.copy(k[c]);f=[];var j=e.columnOrder?e.columnOrder:h;angular.forEach(j,function(a){var b=e.columnOrder?h[a]:a;this.push(g.stringifyField(b,e))},f),d=f.join(e.fieldSep?e.fieldSep:","),i+=c<k.length?d+b:d}),e.addByteOrderMarker&&(h+=c),h+=i,f.resolve(h)});return"function"==typeof j["catch"]&&j["catch"](function(a){f.reject(a)}),f.promise},this.isSpecialChar=function(a){return void 0!==d[a]},this.getSpecialChar=function(a){return d[a]}}]),angular.module("ngCsv.directives").directive("ngCsv",["$parse","$q","CSV","$document","$timeout",function(b,c,d,e,f){return{restrict:"AC",scope:{data:"&ngCsv",filename:"@filename",header:"&csvHeader",columnOrder:"&csvColumnOrder",txtDelim:"@textDelimiter",decimalSep:"@decimalSeparator",quoteStrings:"@quoteStrings",fieldSep:"@fieldSeparator",lazyLoad:"@lazyLoad",addByteOrderMarker:"@addBom",ngClick:"&",charset:"@charset",label:"&csvLabel"},controller:["$scope","$element","$attrs","$transclude",function(a,b,e){function f(){var b={txtDelim:a.txtDelim?a.txtDelim:'"',decimalSep:a.decimalSep?a.decimalSep:".",quoteStrings:a.quoteStrings,addByteOrderMarker:a.addByteOrderMarker};return angular.isDefined(e.csvHeader)&&(b.header=a.$eval(a.header)),angular.isDefined(e.csvColumnOrder)&&(b.columnOrder=a.$eval(a.columnOrder)),angular.isDefined(e.csvLabel)&&(b.label=a.$eval(a.label)),b.fieldSep=a.fieldSep?a.fieldSep:",",b.fieldSep=d.isSpecialChar(b.fieldSep)?d.getSpecialChar(b.fieldSep):b.fieldSep,b}a.csv="",angular.isDefined(a.lazyLoad)&&"true"==a.lazyLoad||angular.isArray(a.data)&&a.$watch("data",function(){a.buildCSV()},!0),a.getFilename=function(){return a.filename||"download.csv"},a.buildCSV=function(){var g=c.defer();return b.addClass(e.ngCsvLoadingClass||"ng-csv-loading"),d.stringify(a.data(),f()).then(function(c){a.csv=c,b.removeClass(e.ngCsvLoadingClass||"ng-csv-loading"),g.resolve(c)}),a.$apply(),g.promise}}],link:function(b,c){function d(){var c=b.charset||"utf-8",d=new Blob([b.csv],{type:"text/csv;charset="+c+";"});if(a.navigator.msSaveOrOpenBlob)navigator.msSaveBlob(d,b.getFilename());else{var g=angular.element('<div data-tap-disabled="true"><a></a></div>'),h=angular.element(g.children()[0]);h.attr("href",a.URL.createObjectURL(d)),h.attr("download",b.getFilename()),h.attr("target","_blank"),e.find("body").append(g),f(function(){h[0].click(),h.remove()},null)}}c.bind("click",function(){b.buildCSV().then(function(){d()}),b.$apply()})}}}])}(window,document);
/*
 AngularJS v1.4.4
 (c) 2010-2015 Google, Inc. http://angularjs.org
 License: MIT
*/
(function(n,h,p){'use strict';function E(a){var f=[];r(f,h.noop).chars(a);return f.join("")}function g(a,f){var d={},c=a.split(","),b;for(b=0;b<c.length;b++)d[f?h.lowercase(c[b]):c[b]]=!0;return d}function F(a,f){function d(a,b,d,l){b=h.lowercase(b);if(s[b])for(;e.last()&&t[e.last()];)c("",e.last());u[b]&&e.last()==b&&c("",b);(l=v[b]||!!l)||e.push(b);var m={};d.replace(G,function(b,a,f,c,d){m[a]=q(f||c||d||"")});f.start&&f.start(b,m,l)}function c(b,a){var c=0,d;if(a=h.lowercase(a))for(c=e.length-
1;0<=c&&e[c]!=a;c--);if(0<=c){for(d=e.length-1;d>=c;d--)f.end&&f.end(e[d]);e.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,k,e=[],m=a,l;for(e.last=function(){return e[e.length-1]};a;){l="";k=!0;if(e.last()&&w[e.last()])a=a.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+e.last()+"[^>]*>","i"),function(a,b){b=b.replace(H,"$1").replace(I,"$1");f.chars&&f.chars(q(b));return""}),c("",e.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",
b)===b&&(f.comment&&f.comment(a.substring(4,b)),a=a.substring(b+3),k=!1);else if(x.test(a)){if(b=a.match(x))a=a.replace(b[0],""),k=!1}else if(J.test(a)){if(b=a.match(y))a=a.substring(b[0].length),b[0].replace(y,c),k=!1}else K.test(a)&&((b=a.match(z))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(z,d)),k=!1):(l+="<",a=a.substring(1)));k&&(b=a.indexOf("<"),l+=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),f.chars&&f.chars(q(l)))}if(a==m)throw L("badparse",a);m=a}c()}function q(a){if(!a)return"";A.innerHTML=
a.replace(/</g,"&lt;");return A.textContent}function B(a){return a.replace(/&/g,"&amp;").replace(M,function(a){var d=a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(d-55296)+(a-56320)+65536)+";"}).replace(N,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r(a,f){var d=!1,c=h.bind(a,a.push);return{start:function(a,k,e){a=h.lowercase(a);!d&&w[a]&&(d=a);d||!0!==C[a]||(c("<"),c(a),h.forEach(k,function(d,e){var k=h.lowercase(e),g="img"===a&&"src"===k||
"background"===k;!0!==O[k]||!0===D[k]&&!f(d,g)||(c(" "),c(e),c('="'),c(B(d)),c('"'))}),c(e?"/>":">"))},end:function(a){a=h.lowercase(a);d||!0!==C[a]||(c("</"),c(a),c(">"));a==d&&(d=!1)},chars:function(a){d||c(B(a))}}}var L=h.$$minErr("$sanitize"),z=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,y=/^<\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^</,J=/^<\//,H=/\x3c!--(.*?)--\x3e/g,x=/<!DOCTYPE([^>]*?)>/i,
I=/<!\[CDATA\[(.*?)]]\x3e/g,M=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N=/([^\#-~| |!])/g,v=g("area,br,col,hr,img,wbr");n=g("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr");p=g("rp,rt");var u=h.extend({},p,n),s=h.extend({},n,g("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")),t=h.extend({},p,g("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"));
n=g("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");var w=g("script,style"),C=h.extend({},v,s,t,u,n),D=g("background,cite,href,longdesc,src,usemap,xlink:href");n=g("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,tabindex,target,title,type,valign,value,vspace,width");
p=g("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);var O=h.extend({},D,p,n),A=document.createElement("pre");h.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function(a){return function(f){var d=[];F(f,r(d,function(c,b){return!/^unsafe/.test(a(c,b))}));return d.join("")}}]});h.module("ngSanitize").filter("linky",["$sanitize",function(a){var f=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,d=/^mailto:/i;return function(c,b){function k(a){a&&g.push(E(a))}function e(a,
c){g.push("<a ");h.isDefined(b)&&g.push('target="',b,'" ');g.push('href="',a.replace(/"/g,"&quot;"),'">');k(c);g.push("</a>")}if(!c)return c;for(var m,l=c,g=[],n,p;m=l.match(f);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),p=m.index,k(l.substr(0,p)),e(n,m[0].replace(d,"")),l=l.substring(p+m[0].length);k(l);return a(g.join(""))}}])})(window,window.angular);
//# sourceMappingURL=angular-sanitize.min.js.map

/*
 async
 https://github.com/caolan/async

 Copyright 2010-2014 Caolan McMahon
 Released under the MIT license
*/
(function(){var async={};var root,previous_async;root=this;if(root!=null)previous_async=root.async;async.noConflict=function(){root.async=previous_async;return async};function only_once(fn){var called=false;return function(){if(called)throw new Error("Callback was already called.");called=true;fn.apply(root,arguments)}}var _toString=Object.prototype.toString;var _isArray=Array.isArray||function(obj){return _toString.call(obj)==="[object Array]"};var _each=function(arr,iterator){if(arr.forEach)return arr.forEach(iterator);
for(var i=0;i<arr.length;i+=1)iterator(arr[i],i,arr)};var _map=function(arr,iterator){if(arr.map)return arr.map(iterator);var results=[];_each(arr,function(x,i,a){results.push(iterator(x,i,a))});return results};var _reduce=function(arr,iterator,memo){if(arr.reduce)return arr.reduce(iterator,memo);_each(arr,function(x,i,a){memo=iterator(memo,x,i,a)});return memo};var _keys=function(obj){if(Object.keys)return Object.keys(obj);var keys=[];for(var k in obj)if(obj.hasOwnProperty(k))keys.push(k);return keys};
if(typeof process==="undefined"||!process.nextTick)if(typeof setImmediate==="function"){async.nextTick=function(fn){setImmediate(fn)};async.setImmediate=async.nextTick}else{async.nextTick=function(fn){setTimeout(fn,0)};async.setImmediate=async.nextTick}else{async.nextTick=process.nextTick;if(typeof setImmediate!=="undefined")async.setImmediate=function(fn){setImmediate(fn)};else async.setImmediate=async.nextTick}async.each=function(arr,iterator,callback){callback=callback||function(){};if(!arr.length)return callback();
var completed=0;_each(arr,function(x){iterator(x,only_once(done))});function done(err){if(err){callback(err);callback=function(){}}else{completed+=1;if(completed>=arr.length)callback()}}};async.forEach=async.each;async.eachSeries=function(arr,iterator,callback){callback=callback||function(){};if(!arr.length)return callback();var completed=0;var iterate=function(){iterator(arr[completed],function(err){if(err){callback(err);callback=function(){}}else{completed+=1;if(completed>=arr.length)callback();
else iterate()}})};iterate()};async.forEachSeries=async.eachSeries;async.eachLimit=function(arr,limit,iterator,callback){var fn=_eachLimit(limit);fn.apply(null,[arr,iterator,callback])};async.forEachLimit=async.eachLimit;var _eachLimit=function(limit){return function(arr,iterator,callback){callback=callback||function(){};if(!arr.length||limit<=0)return callback();var completed=0;var started=0;var running=0;(function replenish(){if(completed>=arr.length)return callback();while(running<limit&&started<
arr.length){started+=1;running+=1;iterator(arr[started-1],function(err){if(err){callback(err);callback=function(){}}else{completed+=1;running-=1;if(completed>=arr.length)callback();else replenish()}})}})()}};var doParallel=function(fn){return function(){var args=Array.prototype.slice.call(arguments);return fn.apply(null,[async.each].concat(args))}};var doParallelLimit=function(limit,fn){return function(){var args=Array.prototype.slice.call(arguments);return fn.apply(null,[_eachLimit(limit)].concat(args))}};
var doSeries=function(fn){return function(){var args=Array.prototype.slice.call(arguments);return fn.apply(null,[async.eachSeries].concat(args))}};var _asyncMap=function(eachfn,arr,iterator,callback){arr=_map(arr,function(x,i){return{index:i,value:x}});if(!callback)eachfn(arr,function(x,callback){iterator(x.value,function(err){callback(err)})});else{var results=[];eachfn(arr,function(x,callback){iterator(x.value,function(err,v){results[x.index]=v;callback(err)})},function(err){callback(err,results)})}};
async.map=doParallel(_asyncMap);async.mapSeries=doSeries(_asyncMap);async.mapLimit=function(arr,limit,iterator,callback){return _mapLimit(limit)(arr,iterator,callback)};var _mapLimit=function(limit){return doParallelLimit(limit,_asyncMap)};async.reduce=function(arr,memo,iterator,callback){async.eachSeries(arr,function(x,callback){iterator(memo,x,function(err,v){memo=v;callback(err)})},function(err){callback(err,memo)})};async.inject=async.reduce;async.foldl=async.reduce;async.reduceRight=function(arr,
memo,iterator,callback){var reversed=_map(arr,function(x){return x}).reverse();async.reduce(reversed,memo,iterator,callback)};async.foldr=async.reduceRight;var _filter=function(eachfn,arr,iterator,callback){var results=[];arr=_map(arr,function(x,i){return{index:i,value:x}});eachfn(arr,function(x,callback){iterator(x.value,function(v){if(v)results.push(x);callback()})},function(err){callback(_map(results.sort(function(a,b){return a.index-b.index}),function(x){return x.value}))})};async.filter=doParallel(_filter);
async.filterSeries=doSeries(_filter);async.select=async.filter;async.selectSeries=async.filterSeries;var _reject=function(eachfn,arr,iterator,callback){var results=[];arr=_map(arr,function(x,i){return{index:i,value:x}});eachfn(arr,function(x,callback){iterator(x.value,function(v){if(!v)results.push(x);callback()})},function(err){callback(_map(results.sort(function(a,b){return a.index-b.index}),function(x){return x.value}))})};async.reject=doParallel(_reject);async.rejectSeries=doSeries(_reject);var _detect=
function(eachfn,arr,iterator,main_callback){eachfn(arr,function(x,callback){iterator(x,function(result){if(result){main_callback(x);main_callback=function(){}}else callback()})},function(err){main_callback()})};async.detect=doParallel(_detect);async.detectSeries=doSeries(_detect);async.some=function(arr,iterator,main_callback){async.each(arr,function(x,callback){iterator(x,function(v){if(v){main_callback(true);main_callback=function(){}}callback()})},function(err){main_callback(false)})};async.any=
async.some;async.every=function(arr,iterator,main_callback){async.each(arr,function(x,callback){iterator(x,function(v){if(!v){main_callback(false);main_callback=function(){}}callback()})},function(err){main_callback(true)})};async.all=async.every;async.sortBy=function(arr,iterator,callback){async.map(arr,function(x,callback){iterator(x,function(err,criteria){if(err)callback(err);else callback(null,{value:x,criteria:criteria})})},function(err,results){if(err)return callback(err);else{var fn=function(left,
right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0};callback(null,_map(results.sort(fn),function(x){return x.value}))}})};async.auto=function(tasks,callback){callback=callback||function(){};var keys=_keys(tasks);var remainingTasks=keys.length;if(!remainingTasks)return callback();var results={};var listeners=[];var addListener=function(fn){listeners.unshift(fn)};var removeListener=function(fn){for(var i=0;i<listeners.length;i+=1)if(listeners[i]===fn){listeners.splice(i,1);return}};var taskComplete=
function(){remainingTasks--;_each(listeners.slice(0),function(fn){fn()})};addListener(function(){if(!remainingTasks){var theCallback=callback;callback=function(){};theCallback(null,results)}});_each(keys,function(k){var task=_isArray(tasks[k])?tasks[k]:[tasks[k]];var taskCallback=function(err){var args=Array.prototype.slice.call(arguments,1);if(args.length<=1)args=args[0];if(err){var safeResults={};_each(_keys(results),function(rkey){safeResults[rkey]=results[rkey]});safeResults[k]=args;callback(err,
safeResults);callback=function(){}}else{results[k]=args;async.setImmediate(taskComplete)}};var requires=task.slice(0,Math.abs(task.length-1))||[];var ready=function(){return _reduce(requires,function(a,x){return a&&results.hasOwnProperty(x)},true)&&!results.hasOwnProperty(k)};if(ready())task[task.length-1](taskCallback,results);else{var listener=function(){if(ready()){removeListener(listener);task[task.length-1](taskCallback,results)}};addListener(listener)}})};async.retry=function(times,task,callback){var DEFAULT_TIMES=
5;var attempts=[];if(typeof times==="function"){callback=task;task=times;times=DEFAULT_TIMES}times=parseInt(times,10)||DEFAULT_TIMES;var wrappedTask=function(wrappedCallback,wrappedResults){var retryAttempt=function(task,finalAttempt){return function(seriesCallback){task(function(err,result){seriesCallback(!err||finalAttempt,{err:err,result:result})},wrappedResults)}};while(times)attempts.push(retryAttempt(task,!(times-=1)));async.series(attempts,function(done,data){data=data[data.length-1];(wrappedCallback||
callback)(data.err,data.result)})};return callback?wrappedTask():wrappedTask};async.waterfall=function(tasks,callback){callback=callback||function(){};if(!_isArray(tasks)){var err=new Error("First argument to waterfall must be an array of functions");return callback(err)}if(!tasks.length)return callback();var wrapIterator=function(iterator){return function(err){if(err){callback.apply(null,arguments);callback=function(){}}else{var args=Array.prototype.slice.call(arguments,1);var next=iterator.next();
if(next)args.push(wrapIterator(next));else args.push(callback);async.setImmediate(function(){iterator.apply(null,args)})}}};wrapIterator(async.iterator(tasks))()};var _parallel=function(eachfn,tasks,callback){callback=callback||function(){};if(_isArray(tasks))eachfn.map(tasks,function(fn,callback){if(fn)fn(function(err){var args=Array.prototype.slice.call(arguments,1);if(args.length<=1)args=args[0];callback.call(null,err,args)})},callback);else{var results={};eachfn.each(_keys(tasks),function(k,callback){tasks[k](function(err){var args=
Array.prototype.slice.call(arguments,1);if(args.length<=1)args=args[0];results[k]=args;callback(err)})},function(err){callback(err,results)})}};async.parallel=function(tasks,callback){_parallel({map:async.map,each:async.each},tasks,callback)};async.parallelLimit=function(tasks,limit,callback){_parallel({map:_mapLimit(limit),each:_eachLimit(limit)},tasks,callback)};async.series=function(tasks,callback){callback=callback||function(){};if(_isArray(tasks))async.mapSeries(tasks,function(fn,callback){if(fn)fn(function(err){var args=
Array.prototype.slice.call(arguments,1);if(args.length<=1)args=args[0];callback.call(null,err,args)})},callback);else{var results={};async.eachSeries(_keys(tasks),function(k,callback){tasks[k](function(err){var args=Array.prototype.slice.call(arguments,1);if(args.length<=1)args=args[0];results[k]=args;callback(err)})},function(err){callback(err,results)})}};async.iterator=function(tasks){var makeCallback=function(index){var fn=function(){if(tasks.length)tasks[index].apply(null,arguments);return fn.next()};
fn.next=function(){return index<tasks.length-1?makeCallback(index+1):null};return fn};return makeCallback(0)};async.apply=function(fn){var args=Array.prototype.slice.call(arguments,1);return function(){return fn.apply(null,args.concat(Array.prototype.slice.call(arguments)))}};var _concat=function(eachfn,arr,fn,callback){var r=[];eachfn(arr,function(x,cb){fn(x,function(err,y){r=r.concat(y||[]);cb(err)})},function(err){callback(err,r)})};async.concat=doParallel(_concat);async.concatSeries=doSeries(_concat);
async.whilst=function(test,iterator,callback){if(test())iterator(function(err){if(err)return callback(err);async.whilst(test,iterator,callback)});else callback()};async.doWhilst=function(iterator,test,callback){iterator(function(err){if(err)return callback(err);var args=Array.prototype.slice.call(arguments,1);if(test.apply(null,args))async.doWhilst(iterator,test,callback);else callback()})};async.until=function(test,iterator,callback){if(!test())iterator(function(err){if(err)return callback(err);
async.until(test,iterator,callback)});else callback()};async.doUntil=function(iterator,test,callback){iterator(function(err){if(err)return callback(err);var args=Array.prototype.slice.call(arguments,1);if(!test.apply(null,args))async.doUntil(iterator,test,callback);else callback()})};async.queue=function(worker,concurrency){if(concurrency===undefined)concurrency=1;function _insert(q,data,pos,callback){if(!q.started)q.started=true;if(!_isArray(data))data=[data];if(data.length==0)return async.setImmediate(function(){if(q.drain)q.drain()});
_each(data,function(task){var item={data:task,callback:typeof callback==="function"?callback:null};if(pos)q.tasks.unshift(item);else q.tasks.push(item);if(q.saturated&&q.tasks.length===q.concurrency)q.saturated();async.setImmediate(q.process)})}var workers=0;var q={tasks:[],concurrency:concurrency,saturated:null,empty:null,drain:null,started:false,paused:false,push:function(data,callback){_insert(q,data,false,callback)},kill:function(){q.drain=null;q.tasks=[]},unshift:function(data,callback){_insert(q,
data,true,callback)},process:function(){if(!q.paused&&workers<q.concurrency&&q.tasks.length){var task=q.tasks.shift();if(q.empty&&q.tasks.length===0)q.empty();workers+=1;var next=function(){workers-=1;if(task.callback)task.callback.apply(task,arguments);if(q.drain&&q.tasks.length+workers===0)q.drain();q.process()};var cb=only_once(next);worker(task.data,cb)}},length:function(){return q.tasks.length},running:function(){return workers},idle:function(){return q.tasks.length+workers===0},pause:function(){if(q.paused===
true)return;q.paused=true},resume:function(){if(q.paused===false)return;q.paused=false;for(var w=1;w<=q.concurrency;w++)async.setImmediate(q.process)}};return q};async.priorityQueue=function(worker,concurrency){function _compareTasks(a,b){return a.priority-b.priority}function _binarySearch(sequence,item,compare){var beg=-1,end=sequence.length-1;while(beg<end){var mid=beg+(end-beg+1>>>1);if(compare(item,sequence[mid])>=0)beg=mid;else end=mid-1}return beg}function _insert(q,data,priority,callback){if(!q.started)q.started=
true;if(!_isArray(data))data=[data];if(data.length==0)return async.setImmediate(function(){if(q.drain)q.drain()});_each(data,function(task){var item={data:task,priority:priority,callback:typeof callback==="function"?callback:null};q.tasks.splice(_binarySearch(q.tasks,item,_compareTasks)+1,0,item);if(q.saturated&&q.tasks.length===q.concurrency)q.saturated();async.setImmediate(q.process)})}var q=async.queue(worker,concurrency);q.push=function(data,priority,callback){_insert(q,data,priority,callback)};
delete q.unshift;return q};async.cargo=function(worker,payload){var working=false,tasks=[];var cargo={tasks:tasks,payload:payload,saturated:null,empty:null,drain:null,drained:true,push:function(data,callback){if(!_isArray(data))data=[data];_each(data,function(task){tasks.push({data:task,callback:typeof callback==="function"?callback:null});cargo.drained=false;if(cargo.saturated&&tasks.length===payload)cargo.saturated()});async.setImmediate(cargo.process)},process:function process(){if(working)return;
if(tasks.length===0){if(cargo.drain&&!cargo.drained)cargo.drain();cargo.drained=true;return}var ts=typeof payload==="number"?tasks.splice(0,payload):tasks.splice(0,tasks.length);var ds=_map(ts,function(task){return task.data});if(cargo.empty)cargo.empty();working=true;worker(ds,function(){working=false;var args=arguments;_each(ts,function(data){if(data.callback)data.callback.apply(null,args)});process()})},length:function(){return tasks.length},running:function(){return working}};return cargo};var _console_fn=
function(name){return function(fn){var args=Array.prototype.slice.call(arguments,1);fn.apply(null,args.concat([function(err){var args=Array.prototype.slice.call(arguments,1);if(typeof console!=="undefined")if(err){if(console.error)console.error(err)}else if(console[name])_each(args,function(x){console[name](x)})}]))}};async.log=_console_fn("log");async.dir=_console_fn("dir");async.memoize=function(fn,hasher){var memo={};var queues={};hasher=hasher||function(x){return x};var memoized=function(){var args=
Array.prototype.slice.call(arguments);var callback=args.pop();var key=hasher.apply(null,args);if(key in memo)async.nextTick(function(){callback.apply(null,memo[key])});else if(key in queues)queues[key].push(callback);else{queues[key]=[callback];fn.apply(null,args.concat([function(){memo[key]=arguments;var q=queues[key];delete queues[key];for(var i=0,l=q.length;i<l;i++)q[i].apply(null,arguments)}]))}};memoized.memo=memo;memoized.unmemoized=fn;return memoized};async.unmemoize=function(fn){return function(){return(fn.unmemoized||
fn).apply(null,arguments)}};async.times=function(count,iterator,callback){var counter=[];for(var i=0;i<count;i++)counter.push(i);return async.map(counter,iterator,callback)};async.timesSeries=function(count,iterator,callback){var counter=[];for(var i=0;i<count;i++)counter.push(i);return async.mapSeries(counter,iterator,callback)};async.seq=function(){var fns=arguments;return function(){var that=this;var args=Array.prototype.slice.call(arguments);var callback=args.pop();async.reduce(fns,args,function(newargs,
fn,cb){fn.apply(that,newargs.concat([function(){var err=arguments[0];var nextargs=Array.prototype.slice.call(arguments,1);cb(err,nextargs)}]))},function(err,results){callback.apply(that,[err].concat(results))})}};async.compose=function(){return async.seq.apply(null,Array.prototype.reverse.call(arguments))};var _applyEach=function(eachfn,fns){var go=function(){var that=this;var args=Array.prototype.slice.call(arguments);var callback=args.pop();return eachfn(fns,function(fn,cb){fn.apply(that,args.concat([cb]))},
callback)};if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);return go.apply(this,args)}else return go};async.applyEach=doParallel(_applyEach);async.applyEachSeries=doSeries(_applyEach);async.forever=function(fn,callback){function next(err){if(err){if(callback)return callback(err);throw err;}fn(next)}next()};if(typeof module!=="undefined"&&module.exports)module.exports=async;else if(typeof define!=="undefined"&&define.amd)define([],function(){return async});else root.async=async})();
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f;}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){angular.module("nemLogging",
[]);angular.module("nemLogging").provider("nemDebug",function(){var ourDebug=null;ourDebug=require("debug");this.$get=function(){return ourDebug};this.debug=ourDebug;return this});var bind=function(fn,me){return function(){return fn.apply(me,arguments)}};angular.module("nemLogging").provider("nemSimpleLogger",["nemDebugProvider",function(nemDebugProvider){var LEVELS,Logger,_fns,_isValidLogObject,_maybeExecLevel,_wrapDebug,i,key,len,nemDebug,val;nemDebug=nemDebugProvider.debug;_fns=["debug","info",
"warn","error","log"];LEVELS={};for(key=i=0,len=_fns.length;i<len;key=++i){val=_fns[key];LEVELS[val]=key}_maybeExecLevel=function(level,current,fn){if(level>=current)return fn()};_isValidLogObject=function(logObject){var isValid,j,len1;isValid=false;if(!logObject)return isValid;for(j=0,len1=_fns.length;j<len1;j++){val=_fns[j];isValid=logObject[val]!=null&&typeof logObject[val]==="function";if(!isValid)break}return isValid};_wrapDebug=function(debugStrLevel,logObject){var debugInstance,j,len1,newLogger;
debugInstance=nemDebug(debugStrLevel);newLogger={};for(j=0,len1=_fns.length;j<len1;j++){val=_fns[j];newLogger[val]=val==="debug"?debugInstance:logObject[val]}return newLogger};Logger=function(){function Logger($log1){var fn1,j,len1,level,logFns;this.$log=$log1;this.spawn=bind(this.spawn,this);if(!this.$log)throw"internalLogger undefined";if(!_isValidLogObject(this.$log))throw"@$log is invalid";this.doLog=true;logFns={};fn1=function(_this){return function(level){logFns[level]=function(msg){if(_this.doLog)return _maybeExecLevel(LEVELS[level],
_this.currentLevel,function(){return _this.$log[level](msg)})};return _this[level]=logFns[level]}}(this);for(j=0,len1=_fns.length;j<len1;j++){level=_fns[j];fn1(level)}this.LEVELS=LEVELS;this.currentLevel=LEVELS.error}Logger.prototype.spawn=function(newInternalLogger){if(typeof newInternalLogger==="string"){if(!_isValidLogObject(this.$log))throw"@$log is invalid";if(!nemDebug)throw"nemDebug is undefined this is probably the light version of this library sep debug logggers is not supported!";return _wrapDebug(newInternalLogger,
this.$log)}return new Logger(newInternalLogger||this.$log)};return Logger}();this.decorator=["$log",function($delegate){var log;log=new Logger($delegate);log.currentLevel=LEVELS.debug;return log}];this.$get=["$log",function($log){return new Logger($log)}];return this}])},{"debug":2}],2:[function(require,module,exports){exports=module.exports=require("./debug");exports.log=log;exports.formatArgs=formatArgs;exports.save=save;exports.load=load;exports.useColors=useColors;exports.storage="undefined"!=
typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:localstorage();exports.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function useColors(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}exports.formatters.j=function(v){return JSON.stringify(v)};function formatArgs(){var args=
arguments;var useColors=this.useColors;args[0]=(useColors?"%c":"")+this.namespace+(useColors?" %c":" ")+args[0]+(useColors?"%c ":" ")+"+"+exports.humanize(this.diff);if(!useColors)return args;var c="color: "+this.color;args=[args[0],c,"color: inherit"].concat(Array.prototype.slice.call(args,1));var index=0;var lastC=0;args[0].replace(/%[a-z%]/g,function(match){if("%%"===match)return;index++;if("%c"===match)lastC=index});args.splice(lastC,0,c);return args}function log(){return"object"===typeof console&&
console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(namespaces){try{if(null==namespaces)exports.storage.removeItem("debug");else exports.storage.debug=namespaces}catch(e){}}function load(){var r;try{r=exports.storage.debug}catch(e){}return r}exports.enable(load());function localstorage(){try{return window.localStorage}catch(e){}}},{"./debug":3}],3:[function(require,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=
enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;if(null==self.useColors)self.useColors=exports.useColors();
if(null==self.color&&self.useColors)self.color=selectColor();var args=Array.prototype.slice.call(arguments);args[0]=exports.coerce(args[0]);if("string"!==typeof args[0])args=["%o"].concat(args);var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);args.splice(index,1);index--}return match});if("function"===typeof exports.formatArgs)args=
exports.formatArgs.apply(self,args);var logFn=enabled.log||exports.log||console.log.bind(console);logFn.apply(self,args)}enabled.enabled=true;var fn=exports.enabled(namespace)?enabled:disabled;fn.namespace=namespace;return fn}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i<len;i++){if(!split[i])continue;namespaces=split[i].replace(/\*/g,".*?");if(namespaces[0]==="-")exports.skips.push(new RegExp("^"+namespaces.substr(1)+
"$"));else exports.names.push(new RegExp("^"+namespaces+"$"))}}function disable(){exports.enable("")}function enabled(name){var i,len;for(i=0,len=exports.skips.length;i<len;i++)if(exports.skips[i].test(name))return false;for(i=0,len=exports.names.length;i<len;i++)if(exports.names[i].test(name))return true;return false}function coerce(val){if(val instanceof Error)return val.stack||val.message;return val}},{"ms":4}],4:[function(require,module,exports){var s=1E3;var m=s*60;var h=m*60;var d=h*24;var y=
d*365.25;module.exports=function(val,options){options=options||{};if("string"==typeof val)return parse(val);return options.long?long(val):short(val)};function parse(str){str=""+str;if(str.length>1E4)return;var match=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);if(!match)return;var n=parseFloat(match[1]);var type=(match[2]||"ms").toLowerCase();switch(type){case "years":case "year":case "yrs":case "yr":case "y":return n*
y;case "days":case "day":case "d":return n*d;case "hours":case "hour":case "hrs":case "hr":case "h":return n*h;case "minutes":case "minute":case "mins":case "min":case "m":return n*m;case "seconds":case "second":case "secs":case "sec":case "s":return n*s;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return n}}function short(ms){if(ms>=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+
"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(ms<n)return;if(ms<n*1.5)return Math.floor(ms/n)+" "+name;return Math.ceil(ms/n)+" "+name+"s"}},{}]},{},[1]);
/*
 angular-google-maps 2.2.1 2015-11-19
  AngularJS directives for Google Maps
  git: https://github.com/angular-ui/angular-google-maps.git
*/
!function(a,b,c){(function(){b.module("uiGmapgoogle-maps.providers",["nemLogging"]),b.module("uiGmapgoogle-maps.wrapped",[]),b.module("uiGmapgoogle-maps.extensions",["uiGmapgoogle-maps.wrapped","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api.utils",["uiGmapgoogle-maps.extensions"]),b.module("uiGmapgoogle-maps.directives.api.managers",[]),b.module("uiGmapgoogle-maps.directives.api.options",["uiGmapgoogle-maps.directives.api.utils"]),b.module("uiGmapgoogle-maps.directives.api.options.builders",
[]),b.module("uiGmapgoogle-maps.directives.api.models.child",["uiGmapgoogle-maps.directives.api.utils","uiGmapgoogle-maps.directives.api.options","uiGmapgoogle-maps.directives.api.options.builders"]),b.module("uiGmapgoogle-maps.directives.api.models.parent",["uiGmapgoogle-maps.directives.api.managers","uiGmapgoogle-maps.directives.api.models.child","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api",["uiGmapgoogle-maps.directives.api.models.parent"]),b.module("uiGmapgoogle-maps",
["uiGmapgoogle-maps.directives.api","uiGmapgoogle-maps.providers"])}).call(this),function(){b.module("uiGmapgoogle-maps.providers").factory("uiGmapMapScriptLoader",["$q","uiGmapuuid",function(c,d){var e,f,g,h;return h=void 0,e=function(a){return a.china?"http://maps.google.cn/maps/api/js?":"auto"===a.transport?"//maps.googleapis.com/maps/api/js?":a.transport+"://maps.googleapis.com/maps/api/js?"},f=function(a){var b,c,f,g;return b=["transport","isGoogleMapsForWork","china"],a.isGoogleMapsForWork&&
b.push("key"),c=_.map(_.omit(a,b),function(a,b){return b+"\x3d"+a}),h&&(g=document.getElementById(h),g.parentNode.removeChild(g)),c=c.join("\x26"),f=document.createElement("script"),f.id=h="ui_gmap_map_load_"+d.generate(),f.type="text/javascript",f.src=e(a)+c,document.body.appendChild(f)},g=function(){return b.isDefined(a.google)&&b.isDefined(a.google.maps)},{load:function(b){var d,e;return d=c.defer(),g()?(d.resolve(a.google.maps),d.promise):(e=b.callback="onGoogleMapsReady"+Math.round(1E3*Math.random()),
a[e]=function(){a[e]=null,d.resolve(a.google.maps)},a.navigator.connection&&a.Connection&&a.navigator.connection.type===a.Connection.NONE?document.addEventListener("online",function(){return g()?void 0:f(b)}):f(b),d.promise)}}}]).provider("uiGmapGoogleMapApi",function(){return this.options={transport:"https",isGoogleMapsForWork:!1,china:!1,v:"3",libraries:"",language:"en"},this.configure=function(a){b.extend(this.options,a)},this.$get=["uiGmapMapScriptLoader",function(a){return function(b){return b.load(a.options)}}(this)],
this})}.call(this),function(){var c=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendGWin",function(){return{init:_.once(function(){var b;if(google||("undefined"!=typeof google&&null!==google?google.maps:void 0)||null!=google.maps.InfoWindow)return google.maps.InfoWindow.prototype._open=
google.maps.InfoWindow.prototype.open,google.maps.InfoWindow.prototype._close=google.maps.InfoWindow.prototype.close,google.maps.InfoWindow.prototype._isOpen=!1,google.maps.InfoWindow.prototype.open=function(a,b,c){null==c&&(this._isOpen=!0,this._open(a,b,!0))},google.maps.InfoWindow.prototype.close=function(a){null==a&&(this._isOpen=!1,this._close(!0))},google.maps.InfoWindow.prototype.isOpen=function(a){return null==a&&(a=void 0),null==a?this._isOpen:this._isOpen=a},a.InfoBox&&(a.InfoBox.prototype._open=
a.InfoBox.prototype.open,a.InfoBox.prototype._close=a.InfoBox.prototype.close,a.InfoBox.prototype._isOpen=!1,a.InfoBox.prototype.open=function(a,b){this._isOpen=!0,this._open(a,b)},a.InfoBox.prototype.close=function(){this._isOpen=!1,this._close()},a.InfoBox.prototype.isOpen=function(a){return null==a&&(a=void 0),null==a?this._isOpen:this._isOpen=a},b=function(b){function e(b){this.getOrigCloseBoxImg_=c(this.getOrigCloseBoxImg_,this),this.getCloseBoxDiv_=c(this.getCloseBoxDiv_,this);var d;d=new a.InfoBox(b),
_.extend(this,d),null!=b.closeBoxDiv&&(this.closeBoxDiv_=b.closeBoxDiv)}return d(e,b),e.prototype.getCloseBoxDiv_=function(){return this.closeBoxDiv_},e.prototype.getCloseBoxImg_=function(){var a,b;return a=this.getCloseBoxDiv_(),b=this.getOrigCloseBoxImg_(),a||b},e.prototype.getOrigCloseBoxImg_=function(){var a;return a="",""!==this.closeBoxURL_&&(a="\x3cimg",a+=" src\x3d'"+this.closeBoxURL_+"'",a+=" align\x3dright",a+=" style\x3d'",a+=" position: relative;",a+=" cursor: pointer;",a+=" margin: "+
this.closeBoxMargin_+";",a+="'\x3e"),a},e}(a.InfoBox),a.uiGmapInfoBox=b),a.MarkerLabel_?a.MarkerLabel_.prototype.setContent=function(){var a;a=this.marker_.get("labelContent"),a&&!_.isEqual(this.oldContent,a)&&("undefined"==typeof(null!=a?a.nodeType:void 0)?(this.labelDiv_.innerHTML=a,this.eventDiv_.innerHTML=this.labelDiv_.innerHTML,this.oldContent=a):(this.labelDiv_.innerHTML="",this.labelDiv_.appendChild(a),a=a.cloneNode(!0),this.labelDiv_.innerHTML="",this.eventDiv_.appendChild(a),this.oldContent=
a))}:void 0})}})}.call(this),function(){b.module("uiGmapgoogle-maps.extensions").service("uiGmapLodash",function(){var a,b,c,d,e,f,g,h;return null==_.get&&(d=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,e=/^\w*$/,f=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,g=function(a){return _.isObject(a)?a:Object(a)},b=function(a){return null===a?"":a+""},h=function(a){var c;return _.isArray(a)?a:(c=[],b(a).replace(f,function(a,b,d,e){c.push(d?e.replace(reEscapeChar,"$1"):
b||a)}),c)},a=function(a,b,c){var d,e;if(null!==a){void 0!==c&&c in g(a)&&(b=[c]),d=0,e=b.length;for(;!_.isUndefined(a)&&e>d;)a=a[b[d++]];return d&&d===e?a:void 0}},c=function(b,c,d){var e;return e=null===b?void 0:a(b,h(c),c+""),void 0===e?d:e},_.get=c),this.intersectionObjects=function(a,b,c){var d;return null==c&&(c=void 0),d=_.map(a,function(a){return function(a){return _.find(b,function(b){return null!=c?c(a,b):_.isEqual(a,b)})}}(this)),_.filter(d,function(a){return null!=a})},this.containsObject=
_.includeObject=function(a,b,c){return null==c&&(c=void 0),null===a?!1:_.any(a,function(a){return function(a){return null!=c?c(a,b):_.isEqual(a,b)}}(this))},this.differenceObjects=function(a,b,c){return null==c&&(c=void 0),_.filter(a,function(a){return function(d){return!a.containsObject(b,d,c)}}(this))},this.withoutObjects=this.differenceObjects,this.indexOfObject=function(a,b,c,d){var e,f;if(null==a)return-1;if(e=0,f=a.length,d){if("number"!=typeof d)return e=_.sortedIndex(a,b),a[e]===b?e:-1;e=
0>d?Math.max(0,f+d):d}for(;f>e;){if(null!=c){if(c(a[e],b))return e}else if(_.isEqual(a[e],b))return e;e++}return-1},this.isNullOrUndefined=function(a){return _.isNull(a||_.isUndefined(a))},this})}.call(this),function(){b.module("uiGmapgoogle-maps.extensions").factory("uiGmapString",function(){return function(a){return this.contains=function(b,c){return-1!==a.indexOf(b,c)},this}})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmap_sync",[function(){return{fakePromise:function(){var a;
return a=void 0,{then:function(b){return a=b},resolve:function(){return a.apply(void 0,arguments)}}}}}]).service("uiGmap_async",["$timeout","uiGmapPromise","uiGmapLogger","$q","uiGmapDataStructures","uiGmapGmapUtil",function(a,c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;return y=c.promiseTypes,r=c.isInProgress,x=c.promiseStatus,h=c.ExposedPromise,j=c.SniffedPromise,s=function(a,b){var c;return c=a.promise(),c.promiseType=a.promiseType,c.$$state&&d.debug("promiseType: "+c.promiseType+", state: "+
x(c.$$state.status)),c.cancelCb=b,c},o=function(a,b){return a.promiseType===y.create&&b.promiseType!==y["delete"]&&b.promiseType!==y.init?(d.debug("lastPromise.promiseType "+b.promiseType+", newPromiseType: "+a.promiseType+", SKIPPED MUST COME AFTER DELETE ONLY"),!0):!1},w=function(a,b,c){var e;return b.promiseType===y["delete"]&&c.promiseType!==y["delete"]&&null!=c.cancelCb&&_.isFunction(c.cancelCb)&&r(c)&&(d.debug("promiseType: "+b.promiseType+", CANCELING LAST PROMISE type: "+c.promiseType),c.cancelCb("cancel safe"),
e=a.peek(),null!=e&&r(e))?e.hasOwnProperty("cancelCb")&&_.isFunction(e.cancelCb)?(d.debug("promiseType: "+e.promiseType+", CANCELING FIRST PROMISE type: "+e.promiseType),e.cancelCb("cancel safe")):d.warn("first promise was not cancelable"):void 0},i=function(a,b,c){var d,e;if(a.existingPieces){if(d=_.last(a.existingPieces._content),o(b,d))return;return w(a.existingPieces,b,d),e=h(d["finally"](function(){return s(b,c)})),e.cancelCb=c,e.promiseType=b.promiseType,a.existingPieces.enqueue(e),d["finally"](function(){return a.existingPieces.dequeue()})}return a.existingPieces=
new f.Queue,a.existingPieces.enqueue(s(b,c))},u=function(a,b,c,e,f){var g;return null==c&&(c=""),g=function(a){return d.debug(a+": "+a),null!=e&&_.isFunction(e)?e(a):void 0},i(a,j(f,b),g)},m=80,q={value:null},z=function(a,b,c){var d;try{return a.apply(b,c)}catch(e){return d=e,q.value=d,q}},t=function(a,b,c,e){var f,g;return g=z(a,b,e),g===q&&(f="error within chunking iterator: "+q.value,d.error(f),c.reject(f)),"cancel safe"===g?!1:!0},l=function(a,b,c){var d,e;return d=a===b,e=b[c],d?e:a[e]},k=function(a,
c,d,e){var f;return b.isArray(a)?f=a:(a=_.pick(a,function(b,c){return a.hasOwnProperty(c)}),f=c?c:Object.keys(_.omit(a,["length","forEach","map"])),c=f),null==e&&(e=d),b.isArray(f)&&(void 0===f||(null!=f?f.length:void 0)<=0)&&e!==d?d():e(f,c)},n=function(c,d,e,f,g,h,i,j){return k(c,j,function(j,k){var m,o,p,q;for(m=d&&d<j.length?d:j.length,o=i,p=!0;p&&m--&&o<(j?j.length:o+1);)q=l(c,j,o),p=b.isFunction(q)?!0:t(f,void 0,h,[q,o]),++o;if(j){if(!(p&&o<j.length))return h.resolve();if(i=o,d)return null!=
g&&_.isFunction(g)&&t(g,void 0,h,[]),a(function(){return n(c,d,e,f,g,h,i,k)},e,!1)}})},p=function(a,b,e,f,g,h,i){var j,l,o;return null==e&&(e=m),null==g&&(g=0),null==h&&(h=1),o=void 0,l=c.defer(),o=l.promise,h?k(a,i,function(){return l.resolve(),o},function(c,d){return n(a,e,h,b,f,l,g,d),o}):(j="pause (delay) must be set from _async!",d.error(j),l.reject(j),o)},v=function(a,b,d,e,f,g,h){var i;return i=[],k(a,h,function(){return c.resolve(i)},function(c,h){return p(a,function(a){return i.push(b(a))},
d,e,f,g,h).then(function(){return i})})},{each:p,map:v,managePromiseQueue:u,promiseLock:u,defaultChunkSize:m,chunkSizeFrom:function(a,b){return null==b&&(b=void 0),_.isNumber(a)&&(b=a),(g.isFalse(a)||a===!1)&&(b=!1),b}}}])}.call(this),function(){var a=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapBaseObject",function(){var b,c;return c=["extended","included"],b=function(){function b(){}
return b.extend=function(b){var d,e,f;for(d in b)f=b[d],a.call(c,d)<0&&(this[d]=f);return null!=(e=b.extended)&&e.apply(this),this},b.include=function(b){var d,e,f;for(d in b)f=b[d],a.call(c,d)<0&&(this.prototype[d]=f);return null!=(e=b.included)&&e.apply(this),this},b}()})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChildEvents",function(){return{onChildCreation:function(a){}}})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapCtrlHandle",
["$q",function(a){var b;return b={handle:function(c,d){return c.$on("$destroy",function(){return b.handle(c)}),c.deferred=a.defer(),{getScope:function(){return c}}},mapPromise:function(a,b){var c;return c=b.getScope(),c.deferred.promise.then(function(b){return a.map=b}),c.deferred.promise}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapEventsHelper",["uiGmapLogger",function(a){var c,d;return d=function(a){return b.isDefined(a.events)&&null!=a.events&&
b.isObject(a.events)},c=function(a,b){return d(a)?a:d(b)?b:void 0},{setEvents:function(a,d,e,f){var g;return g=c(d,e),null!=g?_.compact(_.map(g.events,function(c,h){var i;return f&&(i=_(f).contains(h)),g.events.hasOwnProperty(h)&&b.isFunction(g.events[h])&&!i?google.maps.event.addListener(a,h,function(){return d.$evalAsync||(d.$evalAsync=function(){}),d.$evalAsync(c.apply(d,[a,h,e,arguments]))}):void 0})):void 0},removeEvents:function(a){var b,c;if(a)for(b in a)c=a[b],c&&google.maps.event.removeListener(c)}}}])}.call(this),
function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapFitHelper",["uiGmapLogger",function(a){return{fit:function(a,b){var c,d,e,f,g;if(b&&(null!=a?a.length:void 0)){c=new google.maps.LatLngBounds,d=!1;for(e in a)f=a[e],f&&(d||(d=!0),g=_.isFunction(f.getPosition)?f.getPosition():f),c.extend(g);if(d)return b.fitBounds(c)}}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapGmapUtil",["uiGmapLogger","$compile",function(a,c){var d,e,f,g,
h,i;return e=function(a,b,c){return a===b||-1!==c.indexOf(a)},d=function(a){return e(a,!1,["false","FALSE",0,"n","N","no","NO"])},g=function(a){return Array.isArray(a)&&2===a.length?a[1]:b.isDefined(a.type)&&"Point"===a.type?a.coordinates[1]:a.latitude},h=function(a){return Array.isArray(a)&&2===a.length?a[0]:b.isDefined(a.type)&&"Point"===a.type?a.coordinates[0]:a.longitude},f=function(a){return a?Array.isArray(a)&&2===a.length?new google.maps.LatLng(a[1],a[0]):b.isDefined(a.type)&&"Point"===a.type?
new google.maps.LatLng(a.coordinates[1],a.coordinates[0]):new google.maps.LatLng(a.latitude,a.longitude):void 0},i=function(a){if(b.isUndefined(a))return!1;if(_.isArray(a)){if(2===a.length)return!0}else if(null!=a&&(null!=a?a.type:void 0)&&"Point"===a.type&&_.isArray(a.coordinates)&&2===a.coordinates.length)return!0;return a&&b.isDefined((null!=a?a.latitude:void 0)&&b.isDefined(null!=a?a.longitude:void 0))?!0:!1},{setCoordsFromEvent:function(a,c){return a?(Array.isArray(a)&&2===a.length?(a[1]=c.lat(),
a[0]=c.lng()):b.isDefined(a.type)&&"Point"===a.type?(a.coordinates[1]=c.lat(),a.coordinates[0]=c.lng()):(a.latitude=c.lat(),a.longitude=c.lng()),a):void 0},getLabelPositionPoint:function(a){var b,c;if(void 0!==a)return a=/^([-\d\.]+)\s([-\d\.]+)$/.exec(a),b=parseFloat(a[1]),c=parseFloat(a[2]),null!=b&&null!=c?new google.maps.Point(b,c):void 0},createWindowOptions:function(d,e,g,h){var i;return null!=g&&null!=h&&null!=c?(i=b.extend({},h,{content:this.buildContent(e,h,g),position:null!=h.position?h.position:
b.isObject(d)?d.getPosition():f(e.coords)}),null!=d&&null==(null!=i?i.pixelOffset:void 0)&&(null==i.boxClass||(i.pixelOffset={height:0,width:-2})),i):h?h:(a.error("infoWindow defaults not defined"),g?void 0:a.error("infoWindow content not defined"))},buildContent:function(a,b,d){var e,f;return null!=b.content?f=b.content:null!=c?(d=d.replace(/^\s+|\s+$/g,""),e=""===d?"":c(d)(a),e.length>0&&(f=e[0])):f=d,f},defaultDelay:50,isTrue:function(a){return e(a,!0,["true","TRUE",1,"y","Y","yes","YES"])},isFalse:d,
isFalsy:function(a){return e(a,!1,[void 0,null])||d(a)},getCoords:f,validateCoords:i,equalCoords:function(a,b){return g(a)===g(b)&&h(a)===h(b)},validatePath:function(a){var c,d,e,f;if(d=0,b.isUndefined(a.type)){if(!Array.isArray(a)||a.length<2)return!1;for(;d<a.length;){if(!(b.isDefined(a[d].latitude)&&b.isDefined(a[d].longitude)||"function"==typeof a[d].lat&&"function"==typeof a[d].lng))return!1;d++}return!0}if(b.isUndefined(a.coordinates))return!1;if("Polygon"===a.type){if(a.coordinates[0].length<
4)return!1;c=a.coordinates[0]}else if("MultiPolygon"===a.type){if(f={max:0,index:0},_.forEach(a.coordinates,function(a,b){return a[0].length>this.max?(this.max=a[0].length,this.index=b):void 0},f),e=a.coordinates[f.index],c=e[0],c.length<4)return!1}else{if("LineString"!==a.type)return!1;if(a.coordinates.length<2)return!1;c=a.coordinates}for(;d<c.length;){if(2!==c[d].length)return!1;d++}return!0},convertPathPoints:function(a){var c,d,e,f,g;if(d=0,f=new google.maps.MVCArray,b.isUndefined(a.type))for(;d<
a.length;)b.isDefined(a[d].latitude)&&b.isDefined(a[d].longitude)?e=new google.maps.LatLng(a[d].latitude,a[d].longitude):"function"==typeof a[d].lat&&"function"==typeof a[d].lng&&(e=a[d]),f.push(e),d++;else for("Polygon"===a.type?c=a.coordinates[0]:"MultiPolygon"===a.type?(g={max:0,index:0},_.forEach(a.coordinates,function(a,b){return a[0].length>this.max?(this.max=a[0].length,this.index=b):void 0},g),c=a.coordinates[g.index][0]):"LineString"===a.type&&(c=a.coordinates);d<c.length;)f.push(new google.maps.LatLng(c[d][1],
c[d][0])),d++;return f},getPath:function(a,b){var c;return null!=b&&_.isString(b)?(c=a,_.each(b.split("."),function(a){return c?c=c[a]:void 0}),c):b},validateBoundPoints:function(a){return b.isUndefined(a.sw.latitude)||b.isUndefined(a.sw.longitude)||b.isUndefined(a.ne.latitude)||b.isUndefined(a.ne.longitude)?!1:!0},convertBoundPoints:function(a){var b;return b=new google.maps.LatLngBounds(new google.maps.LatLng(a.sw.latitude,a.sw.longitude),new google.maps.LatLng(a.ne.latitude,a.ne.longitude))},fitMapBounds:function(a,
b){return a.fitBounds(b)}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapIsReady",["$q","$timeout",function(a,b){var c,d,e,f;return d=0,f=[],e=function(){return a.all(f)},c=function(a,f,g){return b(function(){return 0>=g?void a.reject("Your maps are not found we have checked the maximum amount of times. :)"):void(d!==f?c(a,f,g-1):a.resolve(e()))},100)},{spawn:function(){var b;return b=a.defer(),f.push(b.promise),d+=1,{instance:d,deferred:b}},promises:e,
instances:function(){return d},promise:function(b,d){var e;return null==b&&(b=1),null==d&&(d=50),e=a.defer(),c(e,b,d),e.promise},reset:function(){d=0,f.length=0},decrement:function(){d>0&&(d-=1),f.length&&(f.length-=1)}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapLinked",
["uiGmapBaseObject",function(b){var c;return c=function(b){function c(a,b,c,d){this.scope=a,this.element=b,this.attrs=c,this.ctrls=d}return a(c,b),c}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapLogger",["nemSimpleLogger",function(a){return a.spawn()}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=
b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelKey",["uiGmapBaseObject","uiGmapGmapUtil","uiGmapPromise","$q","$timeout",function(d,e,f,g,h){var i;return i=function(d){function f(b){this.scope=b,this.modelsLength=a(this.modelsLength,this),this.updateChild=a(this.updateChild,this),this.destroy=a(this.destroy,this),this.onDestroy=a(this.onDestroy,this),this.setChildScope=a(this.setChildScope,this),this.getChanges=
a(this.getChanges,this),this.getProp=a(this.getProp,this),this.setIdKey=a(this.setIdKey,this),this.modelKeyComparison=a(this.modelKeyComparison,this),f.__super__.constructor.call(this),this["interface"]={},this["interface"].scopeKeys=[],this.defaultIdKey="id",this.idKey=void 0}return c(f,d),f.prototype.evalModelHandle=function(a,b){return null!=a&&null!=b?"self"===b?a:(_.isFunction(b)&&(b=b()),e.getPath(a,b)):void 0},f.prototype.modelKeyComparison=function(a,b){var c,d,f;if(c=_.contains(this["interface"].scopeKeys,
"coords"),(c&&null!=this.scope.coords||!c)&&(f=this.scope),null==f)throw"No scope set!";return c&&(d=e.equalCoords(this.scopeOrModelVal("coords",f,a),this.scopeOrModelVal("coords",f,b)),!d)?d:d=_.every(_.without(this["interface"].scopeKeys,"coords"),function(c){return function(d){return c.scopeOrModelVal(f[d],f,a)===c.scopeOrModelVal(f[d],f,b)}}(this))},f.prototype.setIdKey=function(a){return this.idKey=null!=a.idKey?a.idKey:this.defaultIdKey},f.prototype.setVal=function(a,b,c){var d;return d=this.modelOrKey(a,
b),d=c,a},f.prototype.modelOrKey=function(a,b){return null!=b?"self"!==b?e.getPath(a,b):a:void 0},f.prototype.getProp=function(a,b,c){return this.scopeOrModelVal(a,b,c)},f.prototype.getChanges=function(a,b,c){var d,e,f;c&&(b=_.pick(b,c),a=_.pick(a,c)),e={},f={},d={};for(f in a)b&&b[f]===a[f]||(_.isArray(a[f])?e[f]=a[f]:_.isObject(a[f])?(d=this.getChanges(a[f],b?b[f]:null),_.isEmpty(d)||(e[f]=d)):e[f]=a[f]);return e},f.prototype.scopeOrModelVal=function(a,b,c,d){var e,f,g,h;return null==d&&(d=!1),
e=function(a,b,c){return null==c&&(c=!1),c?{isScope:a,value:b}:b},h=_.get(b,a),_.isFunction(h)?e(!0,h(c),d):_.isObject(h)?e(!0,h,d):_.isString(h)?(f=h,g=f?"self"===f?c:_.get(c,f):_.get(c,a),_.isFunction(g)?e(!1,g(),d):e(!1,g,d)):e(!0,h,d)},f.prototype.setChildScope=function(a,b,c){var d,e,f,g;for(e in a)f=a[e],d=this.scopeOrModelVal(f,b,c,!0),null!=(null!=d?d.value:void 0)&&(g=d.value,g!==b[f]&&(b[f]=g));return b.model=c},f.prototype.onDestroy=function(a){},f.prototype.destroy=function(a){var b;return null==
a&&(a=!1),null==this.scope||(null!=(b=this.scope)?b.$$destroyed:void 0)||!this.needToManualDestroy&&!a?this.clean():this.scope.$destroy()},f.prototype.updateChild=function(a,b){return null==b[this.idKey]?void this.$log.error("Model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):a.updateModel(b)},f.prototype.modelsLength=function(a){var c,d;return null==a&&(a=void 0),c=0,d=a?a:this.scope.models,null==d?c:c=b.isArray(d)||null!=
d.length?d.length:Object.keys(d).length},f}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelsWatcher",["uiGmapLogger","uiGmap_async","$q","uiGmapPromise",function(a,b,c,d){return{didQueueInitPromise:function(a,c){return 0===c.models.length?(b.promiseLock(a,d.promiseTypes.init,null,null,function(a){return function(){return d.resolve()}}(this)),!0):!1},figureOutState:function(b,c,d,e,f){var g,h,i,j,k;return g=[],i={},j=[],k=[],c.models.forEach(function(f){var h;
return null==f[b]?a.error(" id missing for model #{m.toString()},\ncan not use do comparison/insertion"):(i[f[b]]={},null==d.get(f[b])?g.push(f):(h=d.get(f[b]),e(f,h.clonedModel,c)?void 0:k.push({model:f,child:h})))}),h=d.values(),h.forEach(function(c){var d;return null==c?void a.error("child undefined in ModelsWatcher."):null==c.model?void a.error("child.model undefined in ModelsWatcher."):(d=c.model[b],null==i[d]?j.push(c):void 0)}),{adds:g,removals:j,updates:k}}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapPromise",
["$q","$timeout","uiGmapLogger",function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;return l={create:"create",update:"update","delete":"delete",init:"init"},k={IN_PROGRESS:0,RESOLVED:1,REJECTED:2},n=function(){var a;return a={},a[""+k.IN_PROGRESS]="in-progress",a[""+k.RESOLVED]="resolved",a[""+k.REJECTED]="rejected",a}(),g=function(a){return a.$$state?a.$$state.status===k.IN_PROGRESS:a.hasOwnProperty("$$v")?void 0:!0},h=function(a){return a.$$state?a.$$state.status===k.RESOLVED:a.hasOwnProperty("$$v")?!0:void 0},
j=function(a){return n[a]||"done w error"},d=function(b){var c,d,e;return c=a.defer(),d=a.all([b,c.promise]),e=a.defer(),b.then(c.resolve,function(){},function(a){return c.notify(a),e.notify(a)}),d.then(function(a){return e.resolve(a[0]||a[1])},function(a){return e.reject(a)}),e.promise.cancel=function(a){return null==a&&(a="canceled"),c.reject(a)},e.promise.notify=function(a){return null==a&&(a="cancel safe"),e.notify(a),b.hasOwnProperty("notify")?b.notify(a):void 0},null!=b.promiseType&&(e.promise.promiseType=
b.promiseType),e.promise},e=function(a,b){return{promise:a,promiseType:b}},f=function(){return a.defer()},m=function(){var b;return b=a.defer(),b.resolve.apply(void 0,arguments),b.promise},i=function(d){var e;return _.isFunction(d)?(e=a.defer(),b(function(){var a;return a=d(),e.resolve(a)}),e.promise):void c.error("uiGmapPromise.promise() only accepts functions")},{defer:f,promise:i,resolve:m,promiseTypes:l,isInProgress:g,isResolved:h,promiseStatus:j,ExposedPromise:d,SniffedPromise:e}}])}.call(this),
function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropMap",function(){var b;return b=function(){function b(){this.removeAll=a(this.removeAll,this),this.slice=a(this.slice,this),this.push=a(this.push,this),this.keys=a(this.keys,this),this.values=a(this.values,this),this.remove=a(this.remove,this),this.put=a(this.put,this),this.stateChanged=a(this.stateChanged,this),this.get=a(this.get,this),this.length=0,
this.dict={},this.didValsStateChange=!1,this.didKeysStateChange=!1,this.allVals=[],this.allKeys=[]}return b.prototype.get=function(a){return this.dict[a]},b.prototype.stateChanged=function(){return this.didValsStateChange=!0,this.didKeysStateChange=!0},b.prototype.put=function(a,b){return null==this.get(a)&&this.length++,this.stateChanged(),this.dict[a]=b},b.prototype.remove=function(a,b){var c;return null==b&&(b=!1),!b||this.get(a)?(c=this.dict[a],delete this.dict[a],this.length--,this.stateChanged(),
c):void 0},b.prototype.valuesOrKeys=function(a){var b,c;return null==a&&(a="Keys"),this["did"+a+"StateChange"]?(c=[],b=[],_.each(this.dict,function(a,d){return c.push(a),b.push(d)}),this.didKeysStateChange=!1,this.didValsStateChange=!1,this.allVals=c,this.allKeys=b,this["all"+a]):this["all"+a]},b.prototype.values=function(){return this.valuesOrKeys("Vals")},b.prototype.keys=function(){return this.valuesOrKeys()},b.prototype.push=function(a,b){return null==b&&(b="key"),this.put(a[b],a)},b.prototype.slice=
function(){return this.keys().map(function(a){return function(b){return a.remove(b)}}(this))},b.prototype.removeAll=function(){return this.slice()},b.prototype.each=function(a){return _.each(this.dict,function(b,c){return a(b)})},b.prototype.map=function(a){return _.map(this.dict,function(b,c){return a(b)})},b}()})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropertyAction",["uiGmapLogger",function(a){var b;return b=function(a){return this.setIfChange=
function(b,c){var d;return d=this.exp,_.isEqual(c,b)?void 0:a(d,b)},this.sic=this.setIfChange,this}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapClustererMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapEventsHelper",function(c,d,e,f){var g;return g=function(){function g(b,d,f,h){null==d&&(d={}),this.opt_options=null!=f?f:{},this.opt_events=h,this.checkSync=
a(this.checkSync,this),this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.destroy=a(this.destroy,this),this.attachEvents=a(this.attachEvents,this),this.clear=a(this.clear,this),this.draw=a(this.draw,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=g.type,this.clusterer=new NgMapMarkerClusterer(b,d,this.opt_options),this.propMapGMarkers=new e,this.attachEvents(this.opt_events,
"opt_events"),this.clusterer.setIgnoreHidden(!0),this.noDrawOnSingleAddRemoves=!0,c.info(this)}return g.type="ClustererMarkerManager",g.prototype.checkKey=function(a){var b;return null==a.key?(b="gMarker.key undefined and it is REQUIRED!!",c.error(b)):void 0},g.prototype.add=function(a){return this.checkKey(a),this.clusterer.addMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(a.key,a),this.checkSync()},g.prototype.update=function(a){return this.remove(a),this.add(a)},g.prototype.addMany=
function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},g.prototype.remove=function(a){var b;return this.checkKey(a),b=this.propMapGMarkers.get(a.key),b&&(this.clusterer.removeMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(a.key)),this.checkSync()},g.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},g.prototype.draw=function(){return this.clusterer.repaint()},g.prototype.clear=function(){return this.removeMany(this.getGMarkers()),
this.clusterer.repaint()},g.prototype.attachEvents=function(a,d){var e,f,g;if(this.listeners=[],b.isDefined(a)&&null!=a&&b.isObject(a)){g=[];for(f in a)e=a[f],a.hasOwnProperty(f)&&b.isFunction(a[f])?(c.info(d+": Attaching event: "+f+" to clusterer"),g.push(this.listeners.push(google.maps.event.addListener(this.clusterer,f,a[f])))):g.push(void 0);return g}},g.prototype.clearEvents=function(){return f.removeEvents(this.listeners),this.listeners=[]},g.prototype.destroy=function(){return this.clearEvents(),
this.clear()},g.prototype.fit=function(){return d.fit(this.getGMarkers(),this.clusterer.getMap())},g.prototype.getGMarkers=function(){return this.clusterer.getMarkers().values()},g.prototype.checkSync=function(){},g}()}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.managers").service("uiGmapGoogleMapObjectManager",[function(){var a,c;return a=[],c=[],{createMapInstance:function(d,e){var f;return f=null,0===a.length?(f=new google.maps.Map(d,e),c.push(f)):(f=a.pop(),b.element(d).append(f.getDiv()),
f.setOptions(e),c.push(f)),f},recycleMapInstance:function(b){var d;if(d=c.indexOf(b),0>d)throw new Error("Expected map instance to be a previously used instance");return c.splice(d,1),a.push(b)}}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap",function(b,c,d){var e;return e=function(){function e(c,f,g){this.getGMarkers=
a(this.getGMarkers,this),this.fit=a(this.fit,this),this.handleOptDraw=a(this.handleOptDraw,this),this.clear=a(this.clear,this),this.destroy=a(this.destroy,this),this.draw=a(this.draw,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=e.type,this.gMap=c,this.gMarkers=new d,this.$log=b,this.$log.info(this)}return e.type="MarkerManager",e.prototype.add=function(a,c){var d,
e;if(null==c&&(c=!0),null==a.key)throw e="gMarker.key undefined and it is REQUIRED!!",b.error(e),e;return d=this.gMarkers.get(a.key),d?void 0:(this.handleOptDraw(a,c,!0),this.gMarkers.put(a.key,a))},e.prototype.update=function(a,b){return null==b&&(b=!0),this.remove(a,b),this.add(a,b)},e.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},e.prototype.remove=function(a,b){return null==b&&(b=!0),this.handleOptDraw(a,b,!1),this.gMarkers.get(a.key)?
this.gMarkers.remove(a.key):void 0},e.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},e.prototype.draw=function(){var a;return a=[],this.gMarkers.each(function(b){return function(c){return c.isDrawn?void 0:c.doAdd?(c.setMap(b.gMap),c.isDrawn=!0):a.push(c)}}(this)),a.forEach(function(a){return function(b){return b.isDrawn=!1,a.remove(b,!0)}}(this))},e.prototype.destroy=function(){return this.clear()},e.prototype.clear=function(){return this.gMarkers.each(function(a){return a.setMap(null)}),
delete this.gMarkers,this.gMarkers=new d},e.prototype.handleOptDraw=function(a,b,c){return b===!0?(c?a.setMap(this.gMap):a.setMap(null),a.isDrawn=!0):(a.isDrawn=!1,a.doAdd=c)},e.prototype.fit=function(){return c.fit(this.getGMarkers(),this.gMap)},e.prototype.getGMarkers=function(){return this.gMarkers.values()},e}()}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapSpiderfierMarkerManager",
["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapMarkerSpiderfier",function(c,d,e,f){var g;return g=function(){function g(b,d,h,i,j){null==d&&(d={}),this.opt_options=null!=h?h:{},this.opt_events=i,this.scope=j,this.checkSync=a(this.checkSync,this),this.isSpiderfied=a(this.isSpiderfied,this),this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.destroy=a(this.destroy,this),this.attachEvents=a(this.attachEvents,this),this.clear=a(this.clear,this),this.draw=a(this.draw,this),
this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=g.type,this.markerSpiderfier=new f(b,this.opt_options),this.propMapGMarkers=new e,this.attachEvents(this.opt_events,"opt_events"),this.noDrawOnSingleAddRemoves=!0,c.info(this)}return g.type="SpiderfierMarkerManager",g.prototype.checkKey=function(a){var b;return null==a.key?(b="gMarker.key undefined and it is REQUIRED!!",c.error(b)):
void 0},g.prototype.add=function(a){return a.setMap(this.markerSpiderfier.map),this.checkKey(a),this.markerSpiderfier.addMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(a.key,a),this.checkSync()},g.prototype.update=function(a){return this.remove(a),this.add(a)},g.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},g.prototype.remove=function(a){var b;return this.checkKey(a),b=this.propMapGMarkers.get(a.key),b&&(a.setMap(null),this.markerSpiderfier.removeMarker(a,
this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(a.key)),this.checkSync()},g.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},g.prototype.draw=function(){},g.prototype.clear=function(){return this.removeMany(this.getGMarkers())},g.prototype.attachEvents=function(a,d){return b.isDefined(a)&&null!=a&&b.isObject(a)?_.each(a,function(e){return function(f,g){return a.hasOwnProperty(g)&&b.isFunction(a[g])?(c.info(d+": Attaching event: "+
g+" to markerSpiderfier"),e.markerSpiderfier.addListener(g,function(){return"spiderfy"===g||"unspiderfy"===g?e.scope.$evalAsync(a[g].apply(a,arguments)):e.scope.$evalAsync(a[g].apply(a,[arguments[0],g,arguments[0].model,arguments]))})):void 0}}(this)):void 0},g.prototype.clearEvents=function(a,d){var e,f;if(b.isDefined(a)&&null!=a&&b.isObject(a))for(f in a)e=a[f],a.hasOwnProperty(f)&&b.isFunction(a[f])&&(c.info(d+": Clearing event: "+f+" to markerSpiderfier"),this.markerSpiderfier.clearListeners(f))},
g.prototype.destroy=function(){return this.clearEvents(this.opt_events,"opt_events"),this.clear()},g.prototype.fit=function(){return d.fit(this.getGMarkers(),this.markerSpiderfier.map)},g.prototype.getGMarkers=function(){return this.markerSpiderfier.getMarkers()},g.prototype.isSpiderfied=function(){return _.find(this.getGMarkers(),function(a){return null!=(null!=a?a._omsData:void 0)})},g.prototype.checkSync=function(){},g}()}])}.call(this),function(){b.module("uiGmapgoogle-maps").factory("uiGmapadd-events",
["$timeout",function(a){var c,d;return c=function(b,c,d){return google.maps.event.addListener(b,c,function(){return d.apply(this,arguments),a(function(){},!0)})},d=function(a,d,e){var f;return e?c(a,d,e):(f=[],b.forEach(d,function(b,d){return f.push(c(a,d,b))}),function(){return b.forEach(f,function(a){return google.maps.event.removeListener(a)}),f=null})}}])}.call(this),function(){b.module("uiGmapgoogle-maps").factory("uiGmaparray-sync",["uiGmapadd-events",function(a){return function(c,d,e,f){var g,
h,i,j,k,l,m,n,o;return j=!1,n=d.$eval(e),d["static"]||(k={set_at:function(a){var b;if(!j&&(b=c.getAt(a)))return b.lng&&b.lat?(n[a].latitude=b.lat(),n[a].longitude=b.lng()):n[a]=b},insert_at:function(a){var b;if(!j&&(b=c.getAt(a)))return b.lng&&b.lat?n.splice(a,0,{latitude:b.lat(),longitude:b.lng()}):n.splice(a,0,b)},remove_at:function(a){return j?void 0:n.splice(a,1)}},"Polygon"===n.type?g=n.coordinates[0]:"LineString"===n.type&&(g=n.coordinates),h={set_at:function(a){var b;if(!j&&(b=c.getAt(a),b&&
b.lng&&b.lat))return g[a][1]=b.lat(),g[a][0]=b.lng()},insert_at:function(a){var b;if(!j&&(b=c.getAt(a),b&&b.lng&&b.lat))return g.splice(a,0,[b.lng(),b.lat()])},remove_at:function(a){return j?void 0:g.splice(a,1)}},m=a(c,b.isUndefined(n.type)?k:h)),l=function(a){var b,d,e,g,h,i,k,l;if(j=!0,i=c,b=!1,a){for(d=0,k=i.getLength(),g=a.length,e=Math.min(k,g),h=void 0;e>d;)l=i.getAt(d),h=a[d],"function"==typeof h.equals?h.equals(l)||(i.setAt(d,h),b=!0):(l.lat()!==h.latitude||l.lng()!==h.longitude)&&(i.setAt(d,
new google.maps.LatLng(h.latitude,h.longitude)),b=!0),d++;for(;g>d;)h=a[d],"function"==typeof h.lat&&"function"==typeof h.lng?i.push(h):i.push(new google.maps.LatLng(h.latitude,h.longitude)),b=!0,d++;for(;k>d;)i.pop(),b=!0,d++}return j=!1,b?f(i):void 0},i=function(a){var b,d,e,g,h,i,k,l,m;if(j=!0,k=c,d=!1,a){for("Polygon"===n.type?b=a.coordinates[0]:"LineString"===n.type&&(b=a.coordinates),e=0,l=k.getLength(),h=b.length,g=Math.min(l,h),i=void 0;g>e;)m=k.getAt(e),i=b[e],(m.lat()!==i[1]||m.lng()!==
i[0])&&(k.setAt(e,new google.maps.LatLng(i[1],i[0])),d=!0),e++;for(;h>e;)i=b[e],k.push(new google.maps.LatLng(i[1],i[0])),d=!0,e++;for(;l>e;)k.pop(),d=!0,e++}return j=!1,d?f(k):void 0},d["static"]||(o=b.isUndefined(n.type)?d.$watchCollection(e,l):d.$watch(e,i,!0)),function(){return m&&(m(),m=null),o?(o(),o=null):void 0}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChromeFixes",["$timeout",function(a){return{maybeRepaint:function(b){return b?(b.style.opacity=
.9,a(function(){return b.style.opacity=1})):void 0}}}])}.call(this),function(){b.module("uiGmapgoogle-maps").service("uiGmapObjectIterators",function(){var a,b,c,d;return a=["length","forEach","map"],b=[],c=function(b){return b.forEach=function(c){return _.each(_.omit(b,a),function(a){return _.isFunction(a)?void 0:c(a)})},b},b.push(c),d=function(b){return b.map=function(c){return _.map(_.omit(b,a),function(a){return _.isFunction(a)?void 0:c(a)})},b},b.push(d),{slapMap:d,slapForEach:c,slapAll:function(a){return b.forEach(function(b){return b(a)}),
a}}})}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.options.builders").service("uiGmapCommonOptionsBuilder",["uiGmapBaseObject","uiGmapLogger","uiGmapModelKey",function(d,e,f){var g;return g=function(d){function f(){return this.watchProps=
a(this.watchProps,this),this.buildOpts=a(this.buildOpts,this),f.__super__.constructor.apply(this,arguments)}return c(f,d),f.prototype.props=["clickable","draggable","editable","visible",{prop:"stroke",isColl:!0}],f.prototype.getCorrectModel=function(a){return b.isDefined(null!=a?a.model:void 0)?a.model:a},f.prototype.buildOpts=function(a,c,d){var f,g,h;return null==a&&(a={}),null==d&&(d={}),this.scope?this.map?(f=this.getCorrectModel(this.scope),h=this.scopeOrModelVal("stroke",this.scope,f),g=b.extend(a,
this.DEFAULTS,{map:this.map,strokeColor:null!=h?h.color:void 0,strokeOpacity:null!=h?h.opacity:void 0,strokeWeight:null!=h?h.weight:void 0}),b.forEach(b.extend(d,{clickable:!0,draggable:!1,editable:!1,"static":!1,fit:!1,visible:!0,zIndex:0,icons:[]}),function(a){return function(d,e){var h;return h=c?c[e]:a.scopeOrModelVal(e,a.scope,f),b.isUndefined(h)?g[e]=d:g[e]=f[e]}}(this)),g["static"]&&(g.editable=!1),g):void e.error("this.map not defined in CommonOptionsBuilder can not buildOpts"):void e.error("this.scope not defined in CommonOptionsBuilder can not buildOpts")},
f.prototype.watchProps=function(a){return null==a&&(a=this.props),a.forEach(function(a){return function(b){return null!=a.attrs[b]||null!=a.attrs[null!=b?b.prop:void 0]?(null!=b?b.isColl:void 0)?a.scope.$watchCollection(b.prop,a.setMyOptions):a.scope.$watch(b,a.setMyOptions):void 0}}(this))},f}(f)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;
b.module("uiGmapgoogle-maps.directives.api.options.builders").factory("uiGmapPolylineOptionsBuilder",["uiGmapCommonOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b){return c.__super__.buildOpts.call(this,{path:a},b,{geodesic:!1})},c}(b)}]).factory("uiGmapShapeOptionsBuilder",["uiGmapCommonOptionsBuilder",function(c){var d;return d=function(c){function d(){return d.__super__.constructor.apply(this,
arguments)}return a(d,c),d.prototype.buildOpts=function(a,c,e){var f,g;return g=this.getCorrectModel(this.scope),f=c?c.fill:this.scopeOrModelVal("fill",this.scope,g),a=b.extend(a,{fillColor:null!=f?f.color:void 0,fillOpacity:null!=f?f.opacity:void 0}),d.__super__.buildOpts.call(this,a,c,e)},d}(c)}]).factory("uiGmapPolygonOptionsBuilder",["uiGmapShapeOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=
function(a,b){return c.__super__.buildOpts.call(this,{path:a},b,{geodesic:!1})},c}(b)}]).factory("uiGmapRectangleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b){return c.__super__.buildOpts.call(this,{bounds:a},b)},c}(b)}]).factory("uiGmapCircleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,
arguments)}return a(c,b),c.prototype.buildOpts=function(a,b,d){return c.__super__.buildOpts.call(this,{center:a,radius:b},d)},c}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.options").service("uiGmapMarkerOptions",["uiGmapLogger","uiGmapGmapUtil",function(a,c){return _.extend(c,{createOptions:function(a,d,e,f){var g;return null==e&&(e={}),g=b.extend({},e,{position:null!=e.position?e.position:c.getCoords(a),visible:null!=e.visible?e.visible:c.validateCoords(a)}),(null!=e.icon||
null!=d)&&(g=b.extend(g,{icon:null!=e.icon?e.icon:d})),null!=f&&(g.map=f),g},isLabel:function(a){return null==a?!1:null!=a.labelContent||null!=a.labelAnchor||null!=a.labelClass||null!=a.labelStyle||null!=a.labelVisible}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapBasePolyChildModel",
["uiGmapLogger","$timeout","uiGmaparray-sync","uiGmapGmapUtil","uiGmapEventsHelper",function(d,e,f,g,h){return function(d,e){var i;return i=function(d){function i(c,d,g,i,j,k){var l;this.scope=c,this.attrs=d,this.map=g,this.defaults=i,this.model=j,this.clean=a(this.clean,this),this.clonedModel=_.clone(this.model,!0),this.isDragging=!1,this.internalEvents={dragend:function(a){return function(){return _.defer(function(){return a.isDragging=!1})}}(this),dragstart:function(a){return function(){return a.isDragging=
!0}}(this)},l=function(a){return function(){var c;if(!a.isDragging)return a.pathPoints=a.convertPathPoints(a.scope.path),null!=a.gObject&&a.clean(),null!=a.scope.model&&(c=a.scope),a.pathPoints.length>0&&(a.gObject=e(a.buildOpts(a.pathPoints,c))),a.gObject?(f(a.gObject.getPath(),a.scope,"path",function(b){return a.pathPoints=b,null!=k?k():void 0}),b.isDefined(a.scope.events)&&b.isObject(a.scope.events)&&(a.listeners=a.model?h.setEvents(a.gObject,a.scope,a.model):h.setEvents(a.gObject,a.scope,a.scope)),
a.internalListeners=a.model?h.setEvents(a.gObject,{events:a.internalEvents},a.model):h.setEvents(a.gObject,{events:a.internalEvents},a.scope)):void 0}}(this),l(),this.scope.$watch("path",function(a){return function(b,c){return _.isEqual(b,c)&&a.gObject?void 0:l()}}(this),!0),!this.scope["static"]&&b.isDefined(this.scope.editable)&&this.scope.$watch("editable",function(a){return function(b,c){var d;return b!==c?(b=!a.isFalse(b),null!=(d=a.gObject)?d.setEditable(b):void 0):void 0}}(this),!0),b.isDefined(this.scope.draggable)&&
this.scope.$watch("draggable",function(a){return function(b,c){var d;return b!==c?(b=!a.isFalse(b),null!=(d=a.gObject)?d.setDraggable(b):void 0):void 0}}(this),!0),b.isDefined(this.scope.visible)&&this.scope.$watch("visible",function(a){return function(b,c){var d;return b!==c&&(b=!a.isFalse(b)),null!=(d=a.gObject)?d.setVisible(b):void 0}}(this),!0),b.isDefined(this.scope.geodesic)&&this.scope.$watch("geodesic",function(a){return function(b,c){var d;return b!==c?(b=!a.isFalse(b),null!=(d=a.gObject)?
d.setOptions(a.buildOpts(a.gObject.getPath())):void 0):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.weight)&&this.scope.$watch("stroke.weight",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.color)&&this.scope.$watch("stroke.color",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):
void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.opacity)&&this.scope.$watch("stroke.opacity",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.icons)&&this.scope.$watch("icons",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),this.scope.$on("$destroy",function(a){return function(){return a.clean(),
a.scope=null}}(this)),b.isDefined(this.scope.fill)&&b.isDefined(this.scope.fill.color)&&this.scope.$watch("fill.color",function(a){return function(b,c){return b!==c?a.gObject.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this)),b.isDefined(this.scope.fill)&&b.isDefined(this.scope.fill.opacity)&&this.scope.$watch("fill.opacity",function(a){return function(b,c){return b!==c?a.gObject.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this)),b.isDefined(this.scope.zIndex)&&this.scope.$watch("zIndex",
function(a){return function(b,c){return b!==c?a.gObject.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this))}return c(i,d),i.include(g),i.prototype.clean=function(){var a;return h.removeEvents(this.listeners),h.removeEvents(this.internalListeners),null!=(a=this.gObject)&&a.setMap(null),this.gObject=null},i}(d)}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapDrawFreeHandChildModel",["uiGmapLogger","$q",function(a,b){var c,d;return c=function(a,
b,c){var d,e;e=new google.maps.Polyline({map:a,clickable:!1}),d=google.maps.event.addListener(a,"mousemove",function(a){return e.getPath().push(a.latLng)}),google.maps.event.addListenerOnce(a,"mouseup",function(f){var g;return google.maps.event.removeListener(d),g=e.getPath(),e.setMap(null),b.push(new google.maps.Polygon({map:a,path:g})),e=null,google.maps.event.clearListeners(a.getDiv(),"mousedown"),c()})},d=function(d,e){var f,g;return this.map=d,f=function(b){return function(){var c;return c={draggable:!1,
disableDefaultUI:!0,scrollwheel:!1,disableDoubleClickZoom:!1},a.info("disabling map move"),b.map.setOptions(c)}}(this),g=function(a){return function(){var b,c;return b={draggable:!0,disableDefaultUI:!1,scrollwheel:!0,disableDoubleClickZoom:!0},null!=(c=a.deferred)&&c.resolve(),_.defer(function(){return a.map.setOptions(_.extend(b,e.options))})}}(this),this.engage=function(d){return function(e){return d.polys=e,d.deferred=b.defer(),f(),a.info("DrawFreeHandChildModel is engaged (drawing)."),google.maps.event.addDomListener(d.map.getDiv(),
"mousedown",function(a){return c(d.map,d.polys,g)}),d.deferred.promise}}(this),this}}])}.call(this),function(){var c=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapMarkerChildModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger",
"uiGmapEventsHelper","uiGmapPropertyAction","uiGmapMarkerOptions","uiGmapIMarker","uiGmapMarkerManager","uiGmapPromise",function(b,e,f,g,h,i,j,k,l){var m;return m=function(b){function m(a,b,d,e,g,i,j,k,o,p){var q;this.model=b,this.keys=d,this.gMap=e,this.defaults=g,this.doClick=i,this.gManager=j,this.doDrawSelf=null!=k?k:!0,this.trackModel=null!=o?o:!0,this.needRedraw=null!=p?p:!1,this.internalEvents=c(this.internalEvents,this),this.setLabelOptions=c(this.setLabelOptions,this),this.setOptions=c(this.setOptions,
this),this.setIcon=c(this.setIcon,this),this.setCoords=c(this.setCoords,this),this.isNotValid=c(this.isNotValid,this),this.maybeSetScopeValue=c(this.maybeSetScopeValue,this),this.createMarker=c(this.createMarker,this),this.setMyScope=c(this.setMyScope,this),this.updateModel=c(this.updateModel,this),this.handleModelChanges=c(this.handleModelChanges,this),this.destroy=c(this.destroy,this),this.clonedModel=_.clone(this.model,!0),this.deferred=l.defer(),_.each(this.keys,function(a){return function(b,
c){var d;return d=a.keys[c],null!=d&&!_.isFunction(d)&&_.isString(d)?a[c+"Key"]=d:void 0}}(this)),this.idKey=this.idKeyKey||"id",null!=this.model[this.idKey]&&(this.id=this.model[this.idKey]),m.__super__.constructor.call(this,a),this.scope.getGMarker=function(a){return function(){return a.gObject}}(this),this.firstTime=!0,this.trackModel?(this.scope.model=this.model,this.scope.$watch("model",function(a){return function(b,c){return b!==c?a.handleModelChanges(b,c):void 0}}(this),!0)):(q=new h(function(b){return function(c,
d){return _.isFunction(c)&&(c="all"),b.firstTime?void 0:b.setMyScope(c,a)}}(this),!1),_.each(this.keys,function(b,c){return a.$watch(c,q.sic,!0)})),this.scope.$on("$destroy",function(a){return function(){return n(a)}}(this)),this.createMarker(this.model),f.info(this)}var n;return d(m,b),m.include(e),m.include(g),m.include(i),n=function(a){return null!=(null!=a?a.gObject:void 0)&&(a.removeEvents(a.externalListeners),a.removeEvents(a.internalListeners),null!=a?a.gObject:void 0)?(a.removeFromManager&&
a.gManager.remove(a.gObject),a.gObject.setMap(null),a.gObject=null):void 0},m.prototype.destroy=function(a){return null==a&&(a=!0),this.removeFromManager=a,this.scope.$destroy()},m.prototype.handleModelChanges=function(a,b){var c,d,e;return c=this.getChanges(a,b,j.keys),this.firstTime?void 0:(d=0,e=_.keys(c).length,_.each(c,function(c){return function(f,g){var h;return d+=1,h=e===d,c.setMyScope(g,a,b,!1,!0,h),c.needRedraw=!0}}(this)))},m.prototype.updateModel=function(a){return this.clonedModel=_.clone(a,
!0),this.setMyScope("all",a,this.model)},m.prototype.renderGMarker=function(b,c){var d,e,g;if(null==b&&(b=!0),d=this.getProp("coords",this.scope,this.model),null!=(null!=(g=this.gManager)?g.isSpiderfied:void 0)&&(e=this.gManager.isSpiderfied()),null!=d){if(!this.validateCoords(d))return void f.debug("MarkerChild does not have coords yet. They may be defined later.");if(null!=c&&c(),b&&this.gObject&&this.gManager.add(this.gObject),e)return this.gManager.markerSpiderfier.spiderListener(this.gObject,
a.event)}else if(b&&this.gObject)return this.gManager.remove(this.gObject)},m.prototype.setMyScope=function(a,b,c,d,e){var f;switch(null==c&&(c=void 0),null==d&&(d=!1),null==e&&(e=!0),null==b?b=this.model:this.model=b,this.gObject||(this.setOptions(this.scope,e),f=!0),a){case "all":return _.each(this.keys,function(a){return function(f,g){return a.setMyScope(g,b,c,d,e)}}(this));case "icon":return this.maybeSetScopeValue("icon",b,c,this.iconKey,this.evalModelHandle,d,this.setIcon,e);case "coords":return this.maybeSetScopeValue("coords",
b,c,this.coordsKey,this.evalModelHandle,d,this.setCoords,e);case "options":if(!f)return this.createMarker(b,c,d,e)}},m.prototype.createMarker=function(a,b,c,d){return null==b&&(b=void 0),null==c&&(c=!1),null==d&&(d=!0),this.maybeSetScopeValue("options",a,b,this.optionsKey,this.evalModelHandle,c,this.setOptions,d),this.firstTime=!1},m.prototype.maybeSetScopeValue=function(a,b,c,d,e,f,g,h){return null==g&&(g=void 0),null==h&&(h=!0),null!=g?g(this.scope,h):void 0},m.doDrawSelf&&doDraw&&m.gManager.draw(),
m.prototype.isNotValid=function(a,b){var c,d;return null==b&&(b=!0),d=b?void 0===this.gObject:!1,c=this.trackModel?!1:a.$id!==this.scope.$id,c||d},m.prototype.setCoords=function(a,b){return null==b&&(b=!0),this.isNotValid(a)||null==this.gObject?void 0:this.renderGMarker(b,function(b){return function(){var c,d,e;return d=b.getProp("coords",a,b.model),c=b.getCoords(d),e=b.gObject.getPosition(),null==e||null==c||c.lng()!==e.lng()||c.lat()!==e.lat()?(b.gObject.setPosition(c),b.gObject.setVisible(b.validateCoords(d))):
void 0}}(this))},m.prototype.setIcon=function(a,b){return null==b&&(b=!0),this.isNotValid(a)||null==this.gObject?void 0:this.renderGMarker(b,function(b){return function(){var c,d,e;return e=b.gObject.getIcon(),d=b.getProp("icon",a,b.model),e!==d?(b.gObject.setIcon(d),c=b.getProp("coords",a,b.model),b.gObject.setPosition(b.getCoords(c)),b.gObject.setVisible(b.validateCoords(c))):void 0}}(this))},m.prototype.setOptions=function(a,b){var c;if(null==b&&(b=!0),!this.isNotValid(a,!1)){if(this.renderGMarker(b,
function(b){return function(){var c,d,e;return d=b.getProp("coords",a,b.model),e=b.getProp("icon",a,b.model),c=b.getProp("options",a,b.model),b.opts=b.createOptions(d,e,c),b.isLabel(b.gObject)!==b.isLabel(b.opts)&&null!=b.gObject&&(b.gManager.remove(b.gObject),b.gObject=void 0),null!=b.gObject&&b.gObject.setOptions(b.setLabelOptions(b.opts)),b.gObject||(b.isLabel(b.opts)?b.gObject=new MarkerWithLabel(b.setLabelOptions(b.opts)):b.opts.content?(b.gObject=new RichMarker(b.opts),b.gObject.getIcon=b.gObject.getContent,
b.gObject.setIcon=b.gObject.setContent):b.gObject=new google.maps.Marker(b.opts),_.extend(b.gObject,{model:b.model})),b.externalListeners&&b.removeEvents(b.externalListeners),b.internalListeners&&b.removeEvents(b.internalListeners),b.externalListeners=b.setEvents(b.gObject,b.scope,b.model,["dragend"]),b.internalListeners=b.setEvents(b.gObject,{events:b.internalEvents(),$evalAsync:function(){}},b.model),null!=b.id?b.gObject.key=b.id:void 0}}(this)),this.gObject&&(this.gObject.getMap()||this.gManager.type!==
k.type))this.deferred.resolve(this.gObject);else{if(!this.gObject)return this.deferred.reject("gObject is null");(null!=(c=this.gObject)?c.getMap():0)&&this.gManager.type===k.type||(f.debug("gObject has no map yet"),this.deferred.resolve(this.gObject))}return this.model[this.fitKey]?this.gManager.fit():void 0}},m.prototype.setLabelOptions=function(a){return a.labelAnchor&&(a.labelAnchor=this.getLabelPositionPoint(a.labelAnchor)),a},m.prototype.internalEvents=function(){return{dragend:function(a){return function(b,
c,d,e){var f,g,h;return g=a.trackModel?a.scope.model:a.model,h=a.setCoordsFromEvent(a.modelOrKey(g,a.coordsKey),a.gObject.getPosition()),g=a.setVal(d,a.coordsKey,h),f=a.scope.events,null!=(null!=f?f.dragend:void 0)&&f.dragend(b,c,g,e),a.scope.$apply()}}(this),click:function(a){return function(b,c,d,e){var f;return f=a.getProp("click",a.scope,a.model),a.doClick&&null!=f?a.scope.$evalAsync(f(b,c,a.model,e)):void 0}}(this)}},m}(b)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=
a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygonChildModel",["uiGmapBasePolyChildModel","uiGmapPolygonOptionsBuilder",function(b,c){var d,e,f;return f=function(a){return new google.maps.Polygon(a)},e=new b(c,f),d=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c}(e)}])}.call(this),function(){var a=function(a,
b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylineChildModel",["uiGmapBasePolyChildModel","uiGmapPolylineOptionsBuilder",function(b,c){var d,e,f;return f=function(a){return new google.maps.Polyline(a)},e=b(c,f),d=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c}(e)}])}.call(this),
function(){var c=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapWindowChildModel",["uiGmapBaseObject","uiGmapGmapUtil","uiGmapLogger","$compile","$http","$templateCache","uiGmapChromeFixes","uiGmapEventsHelper",function(e,f,g,h,i,
j,k,l){var m;return m=function(e){function m(a,b,d,e,f,h,i,j,k){var l;this.model=a,this.scope=b,this.opts=d,this.isIconVisibleOnClick=e,this.mapCtrl=f,this.markerScope=h,this.element=i,this.needToManualDestroy=null!=j?j:!1,this.markerIsVisibleAfterWindowClose=null!=k?k:!0,this.updateModel=c(this.updateModel,this),this.destroy=c(this.destroy,this),this.remove=c(this.remove,this),this.getLatestPosition=c(this.getLatestPosition,this),this.hideWindow=c(this.hideWindow,this),this.showWindow=c(this.showWindow,
this),this.handleClick=c(this.handleClick,this),this.watchOptions=c(this.watchOptions,this),this.watchCoords=c(this.watchCoords,this),this.createGWin=c(this.createGWin,this),this.watchElement=c(this.watchElement,this),this.watchAndDoShow=c(this.watchAndDoShow,this),this.doShow=c(this.doShow,this),this.clonedModel=_.clone(this.model,!0),this.getGmarker=function(){var a,b;return null!=(null!=(a=this.markerScope)?a.getGMarker:void 0)&&null!=(b=this.markerScope)?b.getGMarker():void 0},this.listeners=
[],this.createGWin(),l=this.getGmarker(),null!=l&&l.setClickable(!0),this.watchElement(),this.watchOptions(),this.watchCoords(),this.watchAndDoShow(),this.scope.$on("$destroy",function(a){return function(){return a.destroy()}}(this)),g.info(this)}return d(m,e),m.include(f),m.include(l),m.prototype.doShow=function(a){return this.scope.show===!0||a?this.showWindow():this.hideWindow()},m.prototype.watchAndDoShow=function(){return null!=this.model.show&&(this.scope.show=this.model.show),this.scope.$watch("show",
this.doShow,!0),this.doShow()},m.prototype.watchElement=function(){return this.scope.$watch(function(a){return function(){var b,c;if(a.element||a.html)return a.html!==a.element.html()&&a.gObject?(null!=(b=a.opts)&&(b.content=void 0),c=a.gObject.isOpen(),a.remove(),a.createGWin(c)):void 0}}(this))},m.prototype.createGWin=function(b){var c,d,e,f,g;return null==b&&(b=!1),e=this.getGmarker(),d={},null!=this.opts&&(this.scope.coords&&(this.opts.position=this.getCoords(this.scope.coords)),d=this.opts),
this.element&&(this.html=_.isObject(this.element)?this.element.html():this.element),c=this.scope.options?this.scope.options:d,this.opts=this.createWindowOptions(e,this.markerScope||this.scope,this.html,c),null!=this.opts?(this.gObject||(this.opts.boxClass&&a.InfoBox&&"function"==typeof a.InfoBox?this.gObject=new a.InfoBox(this.opts):this.gObject=new google.maps.InfoWindow(this.opts),this.listeners.push(google.maps.event.addListener(this.gObject,"domready",function(){return k.maybeRepaint(this.content)})),
this.listeners.push(google.maps.event.addListener(this.gObject,"closeclick",function(a){return function(){return e&&(e.setAnimation(a.oldMarkerAnimation),a.markerIsVisibleAfterWindowClose&&_.delay(function(){return e.setVisible(!1),e.setVisible(a.markerIsVisibleAfterWindowClose)},250)),a.gObject.close(),a.model.show=!1,null!=a.scope.closeClick?a.scope.$evalAsync(a.scope.closeClick()):a.scope.$evalAsync()}}(this)))),this.gObject.setContent(this.opts.content),this.handleClick((null!=(f=this.scope)&&
null!=(g=f.options)?g.forceClick:void 0)||b),this.doShow(this.gObject.isOpen())):void 0},m.prototype.watchCoords=function(){var a;return a=null!=this.markerScope?this.markerScope:this.scope,a.$watch("coords",function(a){return function(b,c){var d;if(b!==c){if(null==b)a.hideWindow();else if(!a.validateCoords(b))return void g.error("WindowChildMarker cannot render marker as scope.coords as no position on marker: "+JSON.stringify(a.model));if(d=a.getCoords(b),a.doShow(),a.gObject.setPosition(d),a.opts)return a.opts.position=
d}}}(this),!0)},m.prototype.watchOptions=function(){return this.scope.$watch("options",function(a){return function(b,c){if(b!==c&&(a.opts=b,null!=a.gObject)){if(a.gObject.setOptions(a.opts),null!=a.opts.visible&&a.opts.visible)return a.showWindow();if(null!=a.opts.visible)return a.hideWindow()}}}(this),!0)},m.prototype.handleClick=function(a){var b,c;if(null!=this.gObject)return c=this.getGmarker(),b=function(a){return function(){return null==a.gObject&&a.createGWin(),a.showWindow(),null!=c?(a.initialMarkerVisibility=
c.getVisible(),a.oldMarkerAnimation=c.getAnimation(),c.setVisible(a.isIconVisibleOnClick)):void 0}}(this),a&&b(),c?this.listeners=this.listeners.concat(this.setEvents(c,{events:{click:b}},this.model)):void 0},m.prototype.showWindow=function(){var a,c,d;if(null!=this.gObject)return d=null,c=function(a){return function(){var b,c,d;if(!a.gObject.isOpen()){if(c=a.getGmarker(),null!=a.gObject&&null!=a.gObject.getPosition&&(d=a.gObject.getPosition()),c&&(d=c.getPosition()),!d)return;if(a.gObject.open(a.mapCtrl,
c),b=a.gObject.isOpen(),a.model.show!==b)return a.model.show=b}}}(this),this.scope.templateUrl?i.get(this.scope.templateUrl,{cache:j}).then(function(a){return function(e){var f;return d=a.scope.$new(),b.isDefined(a.scope.templateParameter)&&(d.parameter=a.scope.templateParameter),f=h(e.data)(d),a.gObject.setContent(f[0]),c()}}(this)):this.scope.template?(d=this.scope.$new(),b.isDefined(this.scope.templateParameter)&&(d.parameter=this.scope.templateParameter),a=h(this.scope.template)(d),this.gObject.setContent(a[0]),
c()):c(),this.scope.$on("destroy",function(){return d.$destroy()})},m.prototype.hideWindow=function(){return null!=this.gObject&&this.gObject.isOpen()?this.gObject.close():void 0},m.prototype.getLatestPosition=function(a){var b;return b=this.getGmarker(),null==this.gObject||null==b||a?a?this.gObject.setPosition(a):void 0:this.gObject.setPosition(b.getPosition())},m.prototype.remove=function(){return this.hideWindow(),this.removeEvents(this.listeners),this.listeners.length=0,delete this.gObject,delete this.opts},
m.prototype.destroy=function(a){var b;return null==a&&(a=!1),this.remove(),null==this.scope||(null!=(b=this.scope)?b.$$destroyed:void 0)||!this.needToManualDestroy&&!a?void 0:this.scope.$destroy()},m.prototype.updateModel=function(a){return this.clonedModel=_.clone(a,!0),_.extend(this.model,this.clonedModel)},m}(e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=
b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapBasePolysParentModel",["$timeout","uiGmapLogger","uiGmapModelKey","uiGmapModelsWatcher","uiGmapPropMap","uiGmap_async","uiGmapPromise","uiGmapFitHelper",function(d,e,f,g,h,i,j,k){return function(d,l,m){var n;return n=function(f){function n(b,c,f,g,i){this.element=c,this.attrs=f,this.gMap=g,this.defaults=i,this.maybeFit=a(this.maybeFit,this),this.createChild=
a(this.createChild,this),this.pieceMeal=a(this.pieceMeal,this),this.createAllNew=a(this.createAllNew,this),this.watchIdKey=a(this.watchIdKey,this),this.createChildScopes=a(this.createChildScopes,this),this.watchDestroy=a(this.watchDestroy,this),this.onDestroy=a(this.onDestroy,this),this.rebuildAll=a(this.rebuildAll,this),this.doINeedToWipe=a(this.doINeedToWipe,this),this.watchModels=a(this.watchModels,this),n.__super__.constructor.call(this,b),this["interface"]=d,this.$log=e,this.plurals=new h,_.each(d.scopeKeys,
function(a){return function(b){return a[b+"Key"]=void 0}}(this)),this.models=void 0,this.firstTime=!0,this.$log.info(this),this.createChildScopes()}return c(n,f),n.include(g),n.prototype.watchModels=function(a){return a.$watch("models",function(b){return function(c,d){return c!==d?b.doINeedToWipe(c)||a.doRebuildAll?b.rebuildAll(a,!0,!0):b.createChildScopes(!1):void 0}}(this),!0)},n.prototype.doINeedToWipe=function(a){var b;return b=null!=a?0===a.length:!0,this.plurals.length>0&&b},n.prototype.rebuildAll=
function(a,b,c){return this.onDestroy(c).then(function(a){return function(){return b?a.createChildScopes():void 0}}(this))},n.prototype.onDestroy=function(a){return n.__super__.onDestroy.call(this,this.scope),i.promiseLock(this,j.promiseTypes["delete"],void 0,void 0,function(a){return function(){return i.each(a.plurals.values(),function(a){return a.destroy(!0)},i.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){var b;return null!=(b=a.plurals)?b.removeAll():void 0})}}(this))},n.prototype.watchDestroy=
function(a){return a.$on("$destroy",function(b){return function(){return b.rebuildAll(a,!1,!0)}}(this))},n.prototype.createChildScopes=function(a){return null==a&&(a=!0),b.isUndefined(this.scope.models)?void this.$log.error("No models to create "+m+"s from! I Need direct models!"):null!=this.gMap&&null!=this.scope.models?(this.watchIdKey(this.scope),a?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1)):void 0},n.prototype.watchIdKey=function(a){return this.setIdKey(a),a.$watch("idKey",
function(b){return function(c,d){return c!==d&&null==c?(b.idKey=c,b.rebuildAll(a,!0,!0)):void 0}}(this))},n.prototype.createAllNew=function(a,b){var c;return null==b&&(b=!1),this.models=a.models,this.firstTime&&(this.watchModels(a),this.watchDestroy(a)),this.didQueueInitPromise(this,a)?void 0:(c=null,i.promiseLock(this,j.promiseTypes.create,"createAllNew",function(a){return c=a},function(b){return function(){return i.map(a.models,function(a){var d;return d=b.createChild(a,b.gMap),c&&(e.debug("createNew should fall through safely"),
d.isEnabled=!1),d.pathPoints.getArray()},i.chunkSizeFrom(a.chunk)).then(function(a){return b.maybeFit(a),b.firstTime=!1})}}(this)))},n.prototype.pieceMeal=function(a,b){var c,d;return null==b&&(b=!0),a.$$destroyed?void 0:(c=null,d=null,this.models=a.models,null!=a&&this.modelsLength()&&this.plurals.length?i.promiseLock(this,j.promiseTypes.update,"pieceMeal",function(a){return c=a},function(b){return function(){return j.promise(function(){return b.figureOutState(b.idKey,a,b.plurals,b.modelKeyComparison)}).then(function(e){return d=
e,d.updates.length&&i.each(d.updates,function(a){return _.extend(a.child.scope,a.model),a.child.model=a.model}),i.each(d.removals,function(a){return null!=a?(a.destroy(),b.plurals.remove(a.model[b.idKey]),c):void 0},i.chunkSizeFrom(a.chunk))}).then(function(){return i.each(d.adds,function(a){return c&&e.debug("pieceMeal should fall through safely"),b.createChild(a,b.gMap),c},i.chunkSizeFrom(a.chunk)).then(function(){return b.maybeFit()})})}}(this)):(this.inProgress=!1,this.rebuildAll(this.scope,!0,
!0)))},n.prototype.createChild=function(a,b){var c,e;return e=this.scope.$new(!1),this.setChildScope(d.scopeKeys,e,a),e.$watch("model",function(a){return function(b,c){return b!==c?a.setChildScope(e,b):void 0}}(this),!0),e["static"]=this.scope["static"],c=new l(e,this.attrs,b,this.defaults,a,function(a){return function(){return a.maybeFit()}}(this)),null==a[this.idKey]?void this.$log.error(m+" model has no id to assign a child to.\nThis is required for performance. Please assign id,\nor redirect id to a different key."):
(this.plurals.put(a[this.idKey],c),c)},n.prototype.maybeFit=function(a){return null==a&&(a=this.plurals.map(function(a){return a.pathPoints})),this.scope.fit?(a=_.flatten(a),k.fit(a,this.gMap)):void 0},n}(f)}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapCircleParentModel",
["uiGmapLogger","$timeout","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapCircleOptionsBuilder",function(c,d,e,f,g){var h,i;return i=function(a,b){return a.settingFromDirective=!0,b(),d(function(){return a.settingFromDirective=!1})},h=function(d){function g(a,d,f,g,h){var j,k,l;this.attrs=f,this.map=g,this.DEFAULTS=h,this.scope=a,l=null,j=function(a){return function(){return l=null,null!=a.listeners?(a.removeEvents(a.listeners),a.listeners=void 0):void 0}}(this),k=new google.maps.Circle(this.buildOpts(e.getCoords(a.center),
a.radius)),this.setMyOptions=function(b){return function(c,d){return a.settingFromDirective?void 0:_.isEqual(c,d)?void 0:k.setOptions(b.buildOpts(e.getCoords(a.center),a.radius))}}(this),this.props=this.props.concat([{prop:"center",isColl:!0},{prop:"fill",isColl:!0},"radius","zIndex"]),this.watchProps(),null!=this.scope.control&&(this.scope.control.getCircle=function(){return k}),j(),this.listeners=this.setEvents(k,a,a,["radius_changed"])||[],this.listeners.push(google.maps.event.addListener(k,"radius_changed",
function(){var c,d;return c=k.getRadius(),c!==l?(l=c,d=function(){return i(a,function(){var b,d;return c!==a.radius&&(a.radius=c),(null!=(b=a.events)?b.radius_changed:void 0)&&_.isFunction(null!=(d=a.events)?d.radius_changed:void 0)?a.events.radius_changed(k,"radius_changed",a,arguments):void 0})},b.mock?d():a.$evalAsync(function(){return d()})):void 0})),this.listeners.push(google.maps.event.addListener(k,"center_changed",function(){return a.$evalAsync(function(){return i(a,function(){return b.isDefined(a.center.type)?
(a.center.coordinates[1]=k.getCenter().lat(),a.center.coordinates[0]=k.getCenter().lng()):(a.center.latitude=k.getCenter().lat(),a.center.longitude=k.getCenter().lng())})})})),a.$on("$destroy",function(a){return function(){return j(),k.setMap(null)}}(this)),c.info(this)}return a(g,d),g.include(e),g.include(f),g}(g)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,
a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapDrawingManagerParentModel",["uiGmapLogger","$timeout","uiGmapBaseObject","uiGmapEventsHelper",function(b,c,d,e){var f;return f=function(b){function c(a,b,c,d){var e,f;this.scope=a,this.attrs=c,this.map=d,e=new google.maps.drawing.DrawingManager(this.scope.options),e.setMap(this.map),f=void 0,null!=this.scope.control&&(this.scope.control.getDrawingManager=function(){return e}),!this.scope["static"]&&this.scope.options&&
this.scope.$watch("options",function(a){return null!=e?e.setOptions(a):void 0},!0),null!=this.scope.events&&(f=this.setEvents(e,this.scope,this.scope),this.scope.$watch("events",function(a){return function(b,c){return _.isEqual(b,c)?void 0:(null!=f&&a.removeEvents(f),f=a.setEvents(e,a.scope,a.scope))}}(this))),this.scope.$on("$destroy",function(a){return function(){return null!=f&&a.removeEvents(f),e.setMap(null),e=null}}(this))}return a(c,b),c.include(e),c}(d)}])}.call(this),function(){var a=function(a,
b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIMarkerParentModel",["uiGmapModelKey","uiGmapLogger",function(d,e){var f;return f=function(d){function f(c,d,g,h){if(this.scope=c,this.element=d,this.attrs=g,this.map=h,this.onWatch=a(this.onWatch,
this),this.watch=a(this.watch,this),this.validateScope=a(this.validateScope,this),f.__super__.constructor.call(this,this.scope),this.$log=e,!this.validateScope(this.scope))throw new String("Unable to construct IMarkerParentModel due to invalid scope");this.doClick=b.isDefined(this.attrs.click),null!=this.scope.options&&(this.DEFAULTS=this.scope.options),this.watch("coords",this.scope),this.watch("icon",this.scope),this.watch("options",this.scope),this.scope.$on("$destroy",function(a){return function(){return a.onDestroy(a.scope)}}(this))}
return c(f,d),f.prototype.DEFAULTS={},f.prototype.validateScope=function(a){var b;return null==a?(this.$log.error(this.constructor.name+": invalid scope used"),!1):(b=null!=a.coords,b?b:(this.$log.error(this.constructor.name+": no valid coords attribute found"),!1))},f.prototype.watch=function(a,b,c){return null==c&&(c=!0),b.$watch(a,function(c){return function(d,e){return _.isEqual(d,e)?void 0:c.onWatch(a,b,d,e)}}(this),c)},f.prototype.onWatch=function(a,b,c,d){},f}(d)}])}.call(this),function(){var a=
function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIWindowParentModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger",function(b,c,d){var e;return e=function(b){function e(a,b,c,f,g,h,i,j){e.__super__.constructor.call(this,a),this.$log=d,this.$timeout=g,this.$compile=h,this.$http=i,this.$templateCache=
j,this.DEFAULTS={},null!=a.options&&(this.DEFAULTS=a.options)}return a(e,b),e.include(c),e.prototype.getItem=function(a,b,c){return"models"===b?a[b][c]:a[b].get(c)},e}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapLayerParentModel",
["uiGmapBaseObject","uiGmapLogger","$timeout",function(d,e,f){var g;return g=function(d){function f(c,d,f,g,h,i){return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.onLayerCreated=null!=h?h:void 0,this.$log=null!=i?i:e,this.createGoogleLayer=a(this.createGoogleLayer,this),null==this.attrs.type?void this.$log.info("type attribute for the layer directive is mandatory. Layer creation aborted!!"):(this.createGoogleLayer(),this.doShow=!0,b.isDefined(this.attrs.show)&&(this.doShow=this.scope.show),
this.doShow&&null!=this.gMap&&this.gObject.setMap(this.gMap),this.scope.$watch("show",function(a){return function(b,c){return b!==c?(a.doShow=b,b?a.gObject.setMap(a.gMap):a.gObject.setMap(null)):void 0}}(this),!0),this.scope.$watch("options",function(a){return function(b,c){return b!==c&&a.doShow?a.gObject.setOptions(b):void 0}}(this),!0),void this.scope.$on("$destroy",function(a){return function(){return a.gObject.setMap(null)}}(this)))}return c(f,d),f.prototype.createGoogleLayer=function(){var a;
return null==this.attrs.options?this.gObject=void 0===this.attrs.namespace?new google.maps[this.attrs.type]:new google.maps[this.attrs.namespace][this.attrs.type]:this.gObject=void 0===this.attrs.namespace?new google.maps[this.attrs.type](this.scope.options):new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options),null!=this.gObject&&this.doShow&&this.gObject.setMap(this.gMap),null!=this.gObject&&null!=this.onLayerCreated&&"function"==typeof(a=this.onLayerCreated(this.scope,this.gObject))?
a(this.gObject):void 0},f}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMapTypeParentModel",["uiGmapBaseObject","uiGmapLogger",function(d,e){var f;return f=function(d){function f(c,d,f,g,h){return this.scope=
c,this.element=d,this.attrs=f,this.gMap=g,this.$log=null!=h?h:e,this.hideOverlay=a(this.hideOverlay,this),this.showOverlay=a(this.showOverlay,this),this.refreshMapType=a(this.refreshMapType,this),this.createMapType=a(this.createMapType,this),null==this.attrs.options?void this.$log.info("options attribute for the map-type directive is mandatory. Map type creation aborted!!"):(this.id=this.gMap.overlayMapTypesCount=this.gMap.overlayMapTypesCount+1||0,this.doShow=!0,this.createMapType(),b.isDefined(this.attrs.show)&&
(this.doShow=this.scope.show),this.doShow&&null!=this.gMap&&this.showOverlay(),this.scope.$watch("show",function(a){return function(b,c){return b!==c?(a.doShow=b,b?a.showOverlay():a.hideOverlay()):void 0}}(this),!0),this.scope.$watchCollection("options",function(a){return function(b,c){var d,e;return!_.isEqual(b,c)&&(e=["tileSize","maxZoom","minZoom","name","alt"],d=_.some(e,function(a){return!c||!b||!_.isEqual(b[a],c[a])}))?a.refreshMapType():void 0}}(this)),b.isDefined(this.attrs.refresh)&&this.scope.$watch("refresh",
function(a){return function(b,c){return _.isEqual(b,c)?void 0:a.refreshMapType()}}(this),!0),void this.scope.$on("$destroy",function(a){return function(){return a.hideOverlay(),a.mapType=null}}(this)))}return c(f,d),f.prototype.createMapType=function(){if(null!=this.scope.options.getTile)this.mapType=this.scope.options;else{if(null==this.scope.options.getTileUrl)return void this.$log.info("options should provide either getTile or getTileUrl methods. Map type creation aborted!!");this.mapType=new google.maps.ImageMapType(this.scope.options)}return this.attrs.id&&
this.scope.id&&(this.gMap.mapTypes.set(this.scope.id,this.mapType),b.isDefined(this.attrs.show)||(this.doShow=!1)),this.mapType.layerId=this.id},f.prototype.refreshMapType=function(){return this.hideOverlay(),this.mapType=null,this.createMapType(),this.doShow&&null!=this.gMap?this.showOverlay():void 0},f.prototype.showOverlay=function(){return this.gMap.overlayMapTypes.push(this.mapType)},f.prototype.hideOverlay=function(){var a;return a=!1,this.gMap.overlayMapTypes.forEach(function(b){return function(c,
d){a||c.layerId!==b.id||(a=!0,b.gMap.overlayMapTypes.removeAt(d))}}(this))},f}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMarkersParentModel",["uiGmapIMarkerParentModel","uiGmapModelsWatcher",
"uiGmapPropMap","uiGmapMarkerChildModel","uiGmap_async","uiGmapClustererMarkerManager","uiGmapMarkerManager","$timeout","uiGmapIMarker","uiGmapPromise","uiGmapGmapUtil","uiGmapLogger","uiGmapSpiderfierMarkerManager",function(d,e,f,g,h,i,j,k,l,m,n,o,p){var q,r;return r=function(a,b){return b.plurals=new f,b.scope.plurals=b.plurals,b},q=function(d){function k(b,c,d,e){this.maybeExecMappedEvent=a(this.maybeExecMappedEvent,this),this.onDestroy=a(this.onDestroy,this),this.newChildMarker=a(this.newChildMarker,
this),this.pieceMeal=a(this.pieceMeal,this),this.rebuildAll=a(this.rebuildAll,this),this.createAllNew=a(this.createAllNew,this),this.bindToTypeEvents=a(this.bindToTypeEvents,this),this.createChildScopes=a(this.createChildScopes,this),this.validateScope=a(this.validateScope,this),this.onWatch=a(this.onWatch,this);var g;k.__super__.constructor.call(this,b,c,d,e),this["interface"]=l,g=this,r(new f,this),this.scope.pluralsUpdate={updateCtr:0},this.$log.info(this),this.doRebuildAll=null!=this.scope.doRebuildAll?
this.scope.doRebuildAll:!1,this.setIdKey(this.scope),this.scope.$watch("doRebuildAll",function(a){return function(b,c){return b!==c?a.doRebuildAll=b:void 0}}(this)),this.modelsLength()||(this.modelsRendered=!1),this.scope.$watch("models",function(a){return function(b,c){if(!_.isEqual(b,c)||!a.modelsRendered){if(0===b.length&&0===c.length)return;return a.modelsRendered=!0,a.onWatch("models",a.scope,b,c)}}}(this),!this.isTrue(d.modelsbyref)),this.watch("doCluster",this.scope),this.watch("type",this.scope),
this.watch("clusterOptions",this.scope),this.watch("clusterEvents",this.scope),this.watch("typeOptions",this.scope),this.watch("typeEvents",this.scope),this.watch("fit",this.scope),this.watch("idKey",this.scope),this.gManager=void 0,this.createAllNew(this.scope)}return c(k,d),k.include(n),k.include(e),k.prototype.onWatch=function(a,b,c,d){return"idKey"===a&&c!==d&&(this.idKey=c),this.doRebuildAll||"doCluster"===a||"type"===a?this.rebuildAll(b):this.pieceMeal(b)},k.prototype.validateScope=function(a){var c;
return c=b.isUndefined(a.models)||void 0===a.models,c&&this.$log.error(this.constructor.name+": no valid models attribute found"),k.__super__.validateScope.call(this,a)||c},k.prototype.createChildScopes=function(a){return null!=this.gMap&&null!=this.scope.models?a?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1):void 0},k.prototype.bindToTypeEvents=function(a,c){var d,e;return null==c&&(c=["click","mouseout","mouseover"]),e=this,this.origTypeEvents?b.extend(a,this.origTypeEvents):(this.origTypeEvents=
{},_.each(c,function(b){return function(c){return b.origTypeEvents[c]=null!=a?a[c]:void 0}}(this))),d={},_.each(c,function(a){return function(a){return d[a]=function(b){return e.maybeExecMappedEvent(b,a)}}}(this)),b.extend(a,d)},k.prototype.createAllNew=function(a){var b,c,d,e;return null!=this.gManager&&(this.gManager instanceof p&&(b=this.gManager.isSpiderfied()),this.gManager.clear(),delete this.gManager),d=a.typeEvents||a.clusterEvents,e=a.typeOptions||a.clusterOptions,a.doCluster||"cluster"===
a.type?(null!=d&&this.bindToTypeEvents(d),this.gManager=new i(this.map,void 0,e,d)):"spider"===a.type?(null!=d&&this.bindToTypeEvents(d,["spiderfy","unspiderfy"]),this.gManager=new p(this.map,void 0,e,d,this.scope),b&&this.gManager.spiderfy()):this.gManager=new j(this.map),this.didQueueInitPromise(this,a)?void 0:(c=null,h.promiseLock(this,m.promiseTypes.create,"createAllNew",function(a){return c=a},function(b){return function(){return h.each(a.models,function(d){return b.newChildMarker(d,a),c},h.chunkSizeFrom(a.chunk)).then(function(){return b.modelsRendered=
!0,a.fit&&b.gManager.fit(),b.gManager.draw(),b.scope.pluralsUpdate.updateCtr+=1},h.chunkSizeFrom(a.chunk))}}(this)))},k.prototype.rebuildAll=function(a){var b;if(a.doRebuild||void 0===a.doRebuild)return(null!=(b=this.scope.plurals)?b.length:void 0)?this.onDestroy(a).then(function(b){return function(){return b.createAllNew(a)}}(this)):this.createAllNew(a)},k.prototype.pieceMeal=function(a){var b,c;if(!a.$$destroyed)return b=null,c=null,this.modelsLength()&&this.scope.plurals.length?h.promiseLock(this,
m.promiseTypes.update,"pieceMeal",function(a){return b=a},function(d){return function(){return m.promise(function(){return d.figureOutState(d.idKey,a,d.scope.plurals,d.modelKeyComparison)}).then(function(e){return c=e,h.each(c.removals,function(a){return null!=a?(null!=a.destroy&&a.destroy(),d.scope.plurals.remove(a.id),b):void 0},h.chunkSizeFrom(a.chunk))}).then(function(){return h.each(c.adds,function(c){return d.newChildMarker(c,a),b},h.chunkSizeFrom(a.chunk))}).then(function(){return h.each(c.updates,
function(a){return d.updateChild(a.child,a.model),b},h.chunkSizeFrom(a.chunk))}).then(function(){return(c.adds.length>0||c.removals.length>0||c.updates.length>0)&&(a.plurals=d.scope.plurals,a.fit&&d.gManager.fit(),d.gManager.draw()),d.scope.pluralsUpdate.updateCtr+=1})}}(this)):(this.inProgress=!1,this.rebuildAll(a))},k.prototype.newChildMarker=function(a,b){var c,d,e,f;return null==a[this.idKey]?void this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):
(this.$log.info("child",c,"markers",this.scope.markerModels),d=b.$new(!1),d.events=b.events,f={},l.scopeKeys.forEach(function(a){return f[a]=b[a]}),c=new g(d,a,f,this.map,this.DEFAULTS,this.doClick,this.gManager,e=!1),this.scope.plurals.put(a[this.idKey],c),c)},k.prototype.onDestroy=function(a){return k.__super__.onDestroy.call(this,a),h.promiseLock(this,m.promiseTypes["delete"],void 0,void 0,function(a){return function(){return h.each(a.scope.plurals.values(),function(a){return null!=a?a.destroy(!1):
void 0},h.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){return null!=a.gManager&&a.gManager.destroy(),a.plurals.removeAll(),a.plurals!==a.scope.plurals&&console.error("plurals out of sync for MarkersParentModel"),a.scope.pluralsUpdate.updateCtr+=1})}}(this))},k.prototype.maybeExecMappedEvent=function(a,b){var c,d;if(!this.scope.$$destroyed)return d=this.scope.typeEvents||this.scope.clusterEvents,_.isFunction(null!=d?d[b]:void 0)&&(c=this.mapTypeToPlurals(a),this.origTypeEvents[b])?this.origTypeEvents[b](c.group,
c.mapped):void 0},k.prototype.mapTypeToPlurals=function(a){var b,c,d;return _.isArray(a)?b=a:_.isFunction(a.getMarkers)&&(b=a.getMarkers()),null==b?void o.error("Unable to map event as we cannot find the array group to map"):(c=(null!=(d=this.scope.plurals.values())?d.length:void 0)?b.map(function(a){return function(b){return a.scope.plurals.get(b.key).model}}(this)):[],{cluster:a,mapped:c,group:a})},k.prototype.getItem=function(a,b,c){return"models"===b?a[b][c]:a[b].get(c)},k}(d)}])}.call(this),
function(){["Polygon","Polyline"].forEach(function(a){return b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmap"+a+"sParentModel",["uiGmapBasePolysParentModel","uiGmap"+a+"ChildModel","uiGmapI"+a,function(b,c,d){return b(d,c,a)}])})}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapRectangleParentModel",
["uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapRectangleOptionsBuilder",function(b,c,d,e){var f;return f=function(e){function f(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q;this.scope=a,this.attrs=d,this.map=e,this.DEFAULTS=f,g=void 0,j=!1,o=[],n=void 0,k=function(a){return function(){return a.isTrue(a.attrs.fit)?a.fitMapBounds(a.map,g):void 0}}(this),i=function(a){return function(){var c,d,e;return null!=a.scope.bounds&&null!=(null!=(c=a.scope.bounds)?c.sw:void 0)&&null!=(null!=(d=a.scope.bounds)?
d.ne:void 0)&&a.validateBoundPoints(a.scope.bounds)?(g=a.convertBoundPoints(a.scope.bounds),b.info("new new bounds created: "+JSON.stringify(g))):null!=a.scope.bounds.getNorthEast&&null!=a.scope.bounds.getSouthWest?g=a.scope.bounds:null!=a.scope.bounds?b.error("Invalid bounds for newValue: "+JSON.stringify(null!=(e=a.scope)?e.bounds:void 0)):void 0}}(this),i(),l=new google.maps.Rectangle(this.buildOpts(g)),b.info("gObject (rectangle) created: "+l),p=!1,q=function(a){return function(){var b,c,d;return b=
l.getBounds(),c=b.getNorthEast(),d=b.getSouthWest(),p?void 0:a.scope.$evalAsync(function(a){return null!=a.bounds&&null!=a.bounds.sw&&null!=a.bounds.ne&&(a.bounds.ne={latitude:c.lat(),longitude:c.lng()},a.bounds.sw={latitude:d.lat(),longitude:d.lng()}),null!=a.bounds.getNorthEast&&null!=a.bounds.getSouthWest?a.bounds=b:void 0})}}(this),m=function(a){return function(){return k(),a.removeEvents(o),o.push(google.maps.event.addListener(l,"dragstart",function(){return j=!0})),o.push(google.maps.event.addListener(l,
"dragend",function(){return j=!1,q()})),o.push(google.maps.event.addListener(l,"bounds_changed",function(){return j?void 0:q()}))}}(this),h=function(a){return function(){return a.removeEvents(o),null!=n&&a.removeEvents(n),l.setMap(null)}}(this),null!=g&&m(),this.scope.$watch("bounds",function(a,b){var c;if(!(_.isEqual(a,b)&&null!=g||j))return p=!0,null==a?void h():(null==g?c=!0:k(),i(),l.setBounds(g),p=!1,c&&null!=g?m():void 0)},!0),this.setMyOptions=function(a){return function(b,c){return _.isEqual(b,
c)||null==g||null==b?void 0:l.setOptions(a.buildOpts(g))}}(this),this.props.push("bounds"),this.watchProps(this.props),null!=this.attrs.events&&(n=this.setEvents(l,this.scope,this.scope),this.scope.$watch("events",function(a){return function(b,c){return _.isEqual(b,c)?void 0:(null!=n&&a.removeEvents(n),n=a.setEvents(l,a.scope,a.scope))}}(this))),this.scope.$on("$destroy",function(a){return function(){return h()}}(this)),b.info(this)}return a(f,e),f.include(c),f.include(d),f}(e)}])}.call(this),function(){var a=
function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapSearchBoxParentModel",["uiGmapBaseObject","uiGmapLogger","uiGmapEventsHelper","$timeout","$http","$templateCache",function(d,e,f,g,h,i){var j;return j=function(d){function g(c,d,f,g,
h,i,j){var k;return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.ctrlPosition=h,this.template=i,this.$log=null!=j?j:e,this.setVisibility=a(this.setVisibility,this),this.getBounds=a(this.getBounds,this),this.setBounds=a(this.setBounds,this),this.createSearchBox=a(this.createSearchBox,this),this.addToParentDiv=a(this.addToParentDiv,this),this.addAsMapControl=a(this.addAsMapControl,this),this.init=a(this.init,this),null==this.attrs.template?void this.$log.error("template attribute for the search-box directive is mandatory. Places Search Box creation aborted!!"):
(b.isUndefined(this.scope.options)&&(this.scope.options={},this.scope.options.visible=!0),b.isUndefined(this.scope.options.visible)&&(this.scope.options.visible=!0),b.isUndefined(this.scope.options.autocomplete)&&(this.scope.options.autocomplete=!1),this.visible=this.scope.options.visible,this.autocomplete=this.scope.options.autocomplete,k=b.element("\x3cdiv\x3e\x3c/div\x3e"),k.append(this.template),this.input=k.find("input")[0],void this.init())}return c(g,d),g.include(f),g.prototype.init=function(){return this.createSearchBox(),
this.scope.$watch("options",function(a){return function(c,d){return b.isObject(c)&&(null!=c.bounds&&a.setBounds(c.bounds),null!=c.visible&&a.visible!==c.visible)?a.setVisibility(c.visible):void 0}}(this),!0),null!=this.attrs.parentdiv?this.addToParentDiv():this.addAsMapControl(),this.visible||this.setVisibility(this.visible),this.autocomplete?this.listener=google.maps.event.addListener(this.gObject,"place_changed",function(a){return function(){return a.places=a.gObject.getPlace()}}(this)):this.listener=
google.maps.event.addListener(this.gObject,"places_changed",function(a){return function(){return a.places=a.gObject.getPlaces()}}(this)),this.listeners=this.setEvents(this.gObject,this.scope,this.scope),this.$log.info(this),this.scope.$on("$destroy",function(a){return function(){return a.gObject=null}}(this))},g.prototype.addAsMapControl=function(){return this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input)},g.prototype.addToParentDiv=function(){return this.parentDiv=
b.element(document.getElementById(this.scope.parentdiv)),this.parentDiv.append(this.input)},g.prototype.createSearchBox=function(){return this.autocomplete?this.gObject=new google.maps.places.Autocomplete(this.input,this.scope.options):this.gObject=new google.maps.places.SearchBox(this.input,this.scope.options)},g.prototype.setBounds=function(a){if(b.isUndefined(a.isEmpty))this.$log.error("Error: SearchBoxParentModel setBounds. Bounds not an instance of LatLngBounds.");else if(a.isEmpty()===!1&&null!=
this.gObject)return this.gObject.setBounds(a)},g.prototype.getBounds=function(){return this.gObject.getBounds()},g.prototype.setVisibility=function(a){return null!=this.attrs.parentdiv?a===!1?this.parentDiv.addClass("ng-hide"):this.parentDiv.removeClass("ng-hide"):a===!1?this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].clear():this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input),this.visible=a},g}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,
arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapWindowsParentModel",["uiGmapIWindowParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapWindowChildModel","uiGmapLinked","uiGmap_async","uiGmapLogger","$timeout","$compile","$http","$templateCache","$interpolate","uiGmapPromise",
"uiGmapIWindow","uiGmapGmapUtil",function(d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){var s;return s=function(d){function s(b,c,d,e,g,i){this.gMap=g,this.markersScope=i,this.modelKeyComparison=a(this.modelKeyComparison,this),this.interpolateContent=a(this.interpolateContent,this),this.setChildScope=a(this.setChildScope,this),this.createWindow=a(this.createWindow,this),this.setContentKeys=a(this.setContentKeys,this),this.pieceMeal=a(this.pieceMeal,this),this.createAllNew=a(this.createAllNew,this),this.watchIdKey=
a(this.watchIdKey,this),this.createChildScopes=a(this.createChildScopes,this),this.watchOurScope=a(this.watchOurScope,this),this.watchDestroy=a(this.watchDestroy,this),this.onDestroy=a(this.onDestroy,this),this.rebuildAll=a(this.rebuildAll,this),this.doINeedToWipe=a(this.doINeedToWipe,this),this.watchModels=a(this.watchModels,this),this.go=a(this.go,this),s.__super__.constructor.call(this,b,c,d,e,k,l,m,n),this["interface"]=q,this.plurals=new f,_.each(q.scopeKeys,function(a){return function(b){return a[b+
"Key"]=void 0}}(this)),this.linked=new h(b,c,d,e),this.contentKeys=void 0,this.isIconVisibleOnClick=void 0,this.firstTime=!0,this.firstWatchModels=!0,this.$log.info(self),this.parentScope=void 0,this.go(b)}return c(s,d),s.include(e),s.prototype.go=function(a){return this.watchOurScope(a),this.doRebuildAll=null!=this.scope.doRebuildAll?this.scope.doRebuildAll:!1,a.$watch("doRebuildAll",function(a){return function(b,c){return b!==c?a.doRebuildAll=b:void 0}}(this)),this.createChildScopes()},s.prototype.watchModels=
function(a){var b;return b=null!=this.markersScope?"pluralsUpdate":"models",a.$watch(b,function(b){return function(c,d){var e;return!_.isEqual(c,d)||b.firstWatchModels?(b.firstWatchModels=!1,b.doRebuildAll||b.doINeedToWipe(a.models)?b.rebuildAll(a,!0,!0):(e=0===b.plurals.length,null!=b.existingPieces?_.last(b.existingPieces._content).then(function(){return b.createChildScopes(e)}):b.createChildScopes(e))):void 0}}(this),!0)},s.prototype.doINeedToWipe=function(a){var b;return b=null!=a?0===a.length:
!0,this.plurals.length>0&&b},s.prototype.rebuildAll=function(a,b,c){return this.onDestroy(c).then(function(a){return function(){return b?a.createChildScopes():void 0}}(this))},s.prototype.onDestroy=function(a){return s.__super__.onDestroy.call(this,this.scope),i.promiseLock(this,p.promiseTypes["delete"],void 0,void 0,function(a){return function(){return i.each(a.plurals.values(),function(a){return a.destroy(!0)},i.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){var b;return null!=(b=a.plurals)?
b.removeAll():void 0})}}(this))},s.prototype.watchDestroy=function(a){return a.$on("$destroy",function(b){return function(){return b.firstWatchModels=!0,b.firstTime=!0,b.rebuildAll(a,!1,!0)}}(this))},s.prototype.watchOurScope=function(a){return _.each(q.scopeKeys,function(b){return function(c){var d;return d=c+"Key",b[d]="function"==typeof a[c]?a[c]():a[c]}}(this))},s.prototype.createChildScopes=function(a){var c,d,e;return null==a&&(a=!0),this.isIconVisibleOnClick=!0,b.isDefined(this.linked.attrs.isiconvisibleonclick)&&
(this.isIconVisibleOnClick=this.linked.scope.isIconVisibleOnClick),c=b.isUndefined(this.linked.scope.models),!c||void 0!==this.markersScope&&void 0!==(null!=(d=this.markersScope)?d.plurals:void 0)&&void 0!==(null!=(e=this.markersScope)?e.models:void 0)?null!=this.gMap?null!=this.linked.scope.models?(this.watchIdKey(this.linked.scope),a?this.createAllNew(this.linked.scope,!1):this.pieceMeal(this.linked.scope,!1)):(this.parentScope=this.markersScope,this.watchIdKey(this.parentScope),a?this.createAllNew(this.markersScope,
!0,"plurals",!1):this.pieceMeal(this.markersScope,!0,"plurals",!1)):void 0:void this.$log.error("No models to create windows from! Need direct models or models derived from markers!")},s.prototype.watchIdKey=function(a){return this.setIdKey(a),a.$watch("idKey",function(b){return function(c,d){return c!==d&&null==c?(b.idKey=c,b.rebuildAll(a,!0,!0)):void 0}}(this))},s.prototype.createAllNew=function(a,b,c,d){var e;return null==c&&(c="models"),null==d&&(d=!1),this.firstTime&&(this.watchModels(a),this.watchDestroy(a)),
this.setContentKeys(a.models),this.didQueueInitPromise(this,a)?void 0:(e=null,i.promiseLock(this,p.promiseTypes.create,"createAllNew",function(a){return e=a},function(d){return function(){return i.each(a.models,function(f){var g,h;return g=b&&null!=(h=d.getItem(a,c,f[d.idKey]))?h.gObject:void 0,e||(!g&&d.markersScope&&j.error("Unable to get gMarker from markersScope!"),d.createWindow(f,g,d.gMap)),e},i.chunkSizeFrom(a.chunk)).then(function(){return d.firstTime=!1})}}(this)))},s.prototype.pieceMeal=
function(a,b,c,d){var e,f;return null==c&&(c="models"),null==d&&(d=!0),a.$$destroyed?void 0:(e=null,f=null,null!=a&&this.modelsLength()&&this.plurals.length?i.promiseLock(this,p.promiseTypes.update,"pieceMeal",function(a){return e=a},function(b){return function(){return p.promise(function(){return b.figureOutState(b.idKey,a,b.plurals,b.modelKeyComparison)}).then(function(c){return f=c,i.each(f.removals,function(a){return null!=a?(b.plurals.remove(a.id),null!=a.destroy&&a.destroy(!0),e):void 0},i.chunkSizeFrom(a.chunk))}).then(function(){return i.each(f.adds,
function(d){var f,g;if(f=null!=(g=b.getItem(a,c,d[b.idKey]))?g.gObject:void 0,!f)throw"Gmarker undefined";return b.createWindow(d,f,b.gMap),e})}).then(function(){return i.each(f.updates,function(a){return b.updateChild(a.child,a.model),e},i.chunkSizeFrom(a.chunk))})}}(this)):(j.debug("pieceMeal: rebuildAll"),this.rebuildAll(this.scope,!0,!0)))},s.prototype.setContentKeys=function(a){return this.modelsLength(a)?this.contentKeys=Object.keys(a[0]):void 0},s.prototype.createWindow=function(a,b,c){var d,
e,f,h,i,j;return e=this.linked.scope.$new(!1),this.setChildScope(e,a),e.$watch("model",function(a){return function(b,c){return b!==c?a.setChildScope(e,b):void 0}}(this),!0),f={html:function(b){return function(){return b.interpolateContent(b.linked.element.html(),a)}}(this)},this.DEFAULTS=this.scopeOrModelVal(this.optionsKey,this.scope,a)||{},h=this.createWindowOptions(b,e,f.html(),this.DEFAULTS),d=new g(a,e,h,this.isIconVisibleOnClick,c,null!=(i=this.markersScope)&&null!=(j=i.plurals.get(a[this.idKey]))?
j.scope:void 0,f,!1,!0),null==a[this.idKey]?void this.$log.error("Window model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):(this.plurals.put(a[this.idKey],d),d)},s.prototype.setChildScope=function(a,b){return _.each(q.scopeKeys,function(c){return function(d){var e,f;return e=d+"Key",f="self"===c[e]?b:b[c[e]],f!==a[d]?a[d]=f:void 0}}(this)),a.model=b},s.prototype.interpolateContent=function(a,b){var c,d,e,f,g,h;if(void 0!==
this.contentKeys&&0!==this.contentKeys.length){for(c=o(a),e={},h=this.contentKeys,d=0,g=h.length;g>d;d++)f=h[d],e[f]=b[f];return c(e)}},s.prototype.modelKeyComparison=function(a,b){var c,d;if(d=null!=this.scope.coords?this.scope:this.parentScope,null==d)throw"No scope or parentScope set!";return(c=r.equalCoords(this.evalModelHandle(a,d.coords),this.evalModelHandle(b,d.coords)))?c=_.every(_.without(this["interface"].scopeKeys,"coords"),function(c){return function(e){return c.evalModelHandle(a,d[e])===
c.evalModelHandle(b,d[e])}}(this)):c},s}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapCircle",["uiGmapICircle","uiGmapCircleParentModel",function(a,b){return _.extend(a,{link:function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return function(e){return new b(a,c,d,e)}}(this))}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,
e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapControl",["uiGmapIControl","$http","$templateCache","$compile","$controller","uiGmapGoogleMapApi",function(d,e,f,g,h,i){var j;return j=function(j){function k(){this.link=a(this.link,this),k.__super__.constructor.call(this)}return c(k,j),k.prototype.link=function(a,c,j,k){return i.then(function(c){return function(i){var j,l;return b.isUndefined(a.template)?
void c.$log.error("mapControl: could not find a valid template property"):(j=b.isDefined(a.index&&!isNaN(parseInt(a.index)))?parseInt(a.index):void 0,l=b.isDefined(a.position)?a.position.toUpperCase().replace(/-/g,"_"):"TOP_CENTER",i.ControlPosition[l]?d.mapPromise(a,k).then(function(d){var i,k;return i=void 0,k=b.element("\x3cdiv\x3e\x3c/div\x3e"),e.get(a.template,{cache:f}).success(function(c){var d,e;return e=a.$new(),k.append(c),b.isDefined(a.controller)&&(d=h(a.controller,{$scope:e}),k.children().data("$ngControllerController",
d)),i=g(k.children())(e),j?i[0].index=j:void 0}).error(function(a){return c.$log.error("mapControl: template could not be found")}).then(function(){return d.controls[google.maps.ControlPosition[l]].push(i[0])})}):void c.$log.error("mapControl: invalid position property"))}}(this))},k}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapDragZoom",["uiGmapCtrlHandle","uiGmapPropertyAction",function(a,b){return{restrict:"EMA",transclude:!0,template:'\x3cdiv class\x3d"angular-google-map-dragzoom" ng-transclude style\x3d"display: none"\x3e\x3c/div\x3e',
require:"^uiGmapGoogleMap",scope:{keyboardkey:"\x3d",options:"\x3d",spec:"\x3d"},controller:["$scope","$element",function(b,c){return b.ctrlType="uiGmapDragZoom",_.extend(this,a.handle(b,c))}],link:function(c,d,e,f){return a.mapPromise(c,f).then(function(a){var d,e,f;return d=function(b){return a.enableKeyDragZoom(b),c.spec?c.spec.enableKeyDragZoom(b):void 0},e=new b(function(a,b){return b?d({key:b}):d()}),f=new b(function(a,b){return b?d(b):void 0}),c.$watch("keyboardkey",e.sic),e.sic(c.keyboardkey),
c.$watch("options",f.sic),f.sic(c.options)})}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapDrawingManager",["uiGmapIDrawingManager","uiGmapDrawingManagerParentModel",function(a,b){return _.extend(a,{link:function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return new b(a,c,d,e)})}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,
e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapApiFreeDrawPolygons",["uiGmapLogger","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapDrawFreeHandChildModel","uiGmapLodash",function(b,d,e,f,g){var h;return h=function(d){function h(){return this.link=a(this.link,this),h.__super__.constructor.apply(this,arguments)}return c(h,d),h.include(e),h.prototype.restrict="EMA",h.prototype.replace=
!0,h.prototype.require="^uiGmapGoogleMap",h.prototype.scope={polygons:"\x3d",draw:"\x3d"},h.prototype.link=function(a,c,d,e){return this.mapPromise(a,e).then(function(c){return function(c){var d,h;return a.polygons?_.isArray(a.polygons)?(d=new f(c,e.getScope()),h=void 0,a.draw=function(){return"function"==typeof h&&h(),d.engage(a.polygons).then(function(){var b;return b=!0,h=a.$watchCollection("polygons",function(a,c){var d;return b||a===c?void(b=!1):(d=g.differenceObjects(c,a),d.forEach(function(a){return a.setMap(null)}))})})}):
b.error("Free Draw Polygons must be of type Array!"):b.error("No polygons to bind to!")}}(this))},h}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapICircle",[function(){var a;return a={},{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{center:"\x3dcenter",radius:"\x3dradius",stroke:"\x3dstroke",fill:"\x3dfill",clickable:"\x3d",draggable:"\x3d",editable:"\x3d",geodesic:"\x3d",icons:"\x3dicons",visible:"\x3d",events:"\x3d",control:"\x3d",zIndex:"\x3dzindex"}}}])}.call(this),
function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIControl",["uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d){var e;return e=function(b){function e(){this.restrict="EA",this.replace=!0,this.require="^uiGmapGoogleMap",this.scope={template:"@template",position:"@position",controller:"@controller",
index:"@index"},this.$log=c}return a(e,b),e.extend(d),e.prototype.link=function(a,b,c,d){throw new Exception("Not implemented!!");},e}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapIDrawingManager",[function(){return{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{"static":"@",control:"\x3d",options:"\x3d",events:"\x3d"}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=
b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIMarker",["uiGmapBaseObject","uiGmapCtrlHandle",function(b,c){var d;return d=function(b){function d(){this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.replace=!0,this.scope=_.extend(this.scope||{},d.scope)}return a(d,b),d.scope={coords:"\x3dcoords",icon:"\x3dicon",click:"\x26click",options:"\x3doptions",events:"\x3devents",
fit:"\x3dfit",idKey:"\x3didkey",control:"\x3dcontrol"},d.scopeKeys=_.keys(d.scope),d.keys=d.scopeKeys,d.extend(c),d}(b)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolygon",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d,e){var f;return f=
function(c){function f(){}return a(f,c),f.scope={path:"\x3dpath",stroke:"\x3dstroke",clickable:"\x3d",draggable:"\x3d",editable:"\x3d",geodesic:"\x3d",fill:"\x3d",icons:"\x3dicons",visible:"\x3d","static":"\x3d",events:"\x3d",zIndex:"\x3dzindex",fit:"\x3d",control:"\x3dcontrol"},f.scopeKeys=_.keys(f.scope),f.include(b),f.extend(e),f.prototype.restrict="EMA",f.prototype.replace=!0,f.prototype.require="^uiGmapGoogleMap",f.prototype.scope=f.scope,f.prototype.DEFAULTS={},f.prototype.$log=d,f}(c)}])}.call(this),
function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolyline",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d,e){var f;return f=function(c){function f(){}return a(f,c),f.scope={path:"\x3d",stroke:"\x3d",clickable:"\x3d",draggable:"\x3d",editable:"\x3d",geodesic:"\x3d",
icons:"\x3d",visible:"\x3d","static":"\x3d",fit:"\x3d",events:"\x3d",zIndex:"\x3dzindex"},f.scopeKeys=_.keys(f.scope),f.include(b),f.extend(e),f.prototype.restrict="EMA",f.prototype.replace=!0,f.prototype.require="^uiGmapGoogleMap",f.prototype.scope=f.scope,f.prototype.DEFAULTS={},f.prototype.$log=d,f}(c)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapIRectangle",[function(){var a;return a={},{restrict:"EMA",require:"^uiGmapGoogleMap",replace:!0,scope:{bounds:"\x3d",
stroke:"\x3d",clickable:"\x3d",draggable:"\x3d",editable:"\x3d",fill:"\x3d",visible:"\x3d",events:"\x3d"}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIWindow",["uiGmapBaseObject","uiGmapChildEvents","uiGmapCtrlHandle",function(b,c,d){var e;return e=function(b){function e(){this.restrict=
"EMA",this.template=void 0,this.transclude=!0,this.priority=-100,this.require="^uiGmapGoogleMap",this.replace=!0,this.scope=_.extend(this.scope||{},e.scope)}return a(e,b),e.scope={coords:"\x3dcoords",template:"\x3dtemplate",templateUrl:"\x3dtemplateurl",templateParameter:"\x3dtemplateparameter",isIconVisibleOnClick:"\x3disiconvisibleonclick",closeClick:"\x26closeclick",options:"\x3doptions",control:"\x3dcontrol",show:"\x3dshow"},e.scopeKeys=_.keys(e.scope),e.include(c),e.extend(d),e}(b)}])}.call(this),
function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMap",["$timeout","$q","uiGmapLogger","uiGmapGmapUtil","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapIsReady","uiGmapuuid","uiGmapExtendGWin","uiGmapExtendMarkerClusterer","uiGmapGoogleMapsUtilV3",
"uiGmapGoogleMapApi","uiGmapEventsHelper","uiGmapGoogleMapObjectManager",function(d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r,s,t;return r=void 0,t=[n,l,m],s=function(e){function h(){this.link=a(this.link,this);var b,c;b=function(a){var b,c;return c=void 0,a.$on("$destroy",function(){return j.decrement()}),b=i.handle(a),a.ctrlType="Map",a.deferred.promise.then(function(){return t.forEach(function(a){return a.init()})}),b.getMap=function(){return a.map},c=_.extend(this,b)},this.controller=["$scope",b],c=this}
return c(h,e),h.include(g),h.prototype.restrict="EMA",h.prototype.transclude=!0,h.prototype.replace=!1,h.prototype.template='\x3cdiv class\x3d"angular-google-map"\x3e\x3cdiv class\x3d"angular-google-map-container"\x3e\n\x3c/div\x3e\x3cdiv ng-transclude style\x3d"display: none"\x3e\x3c/div\x3e\x3c/div\x3e',h.prototype.scope={center:"\x3d",zoom:"\x3d",dragging:"\x3d",control:"\x3d",options:"\x3d",events:"\x3d",eventOpts:"\x3d",styles:"\x3d",bounds:"\x3d",update:"\x3d"},h.prototype.link=function(a,c,
e){var g,h;return g=[],a.$on("$destroy",function(){return p.removeEvents(g),"true"===e.recycleMapInstance&&a.map?(q.recycleMapInstance(a.map),a.map=null):void 0}),a.idleAndZoomChanged=!1,null==a.center?void(h=a.$watch("center",function(b){return function(){return a.center?(h(),b.link(a,c,e)):void 0}}(this))):o.then(function(h){return function(i){var l,m,n,o,s,t,u,v,w,x,y,z,A,B,C,D,E;if(r={mapTypeId:i.MapTypeId.ROADMAP},B=j.spawn(),z=function(){return B.deferred.resolve({instance:B.instance,map:l})},
!h.validateCoords(a.center))return void f.error("angular-google-maps: could not find a valid center property");if(!b.isDefined(a.zoom))return void f.error("angular-google-maps: map zoom property not set");if(s=b.element(c),s.addClass("angular-google-map"),x={options:{}},e.options&&(x.options=a.options),e.styles&&(x.styles=a.styles),e.type&&(C=e.type.toUpperCase(),google.maps.MapTypeId.hasOwnProperty(C)?x.mapTypeId=google.maps.MapTypeId[e.type.toUpperCase()]:f.error("angular-google-maps: invalid map type '"+
e.type+"'")),v=b.extend({},r,x,{center:h.getCoords(a.center),zoom:a.zoom,bounds:a.bounds}),l="true"===e.recycleMapInstance?q.createMapInstance(s.find("div")[1],v):new google.maps.Map(s.find("div")[1],v),l.uiGmap_id=k.generate(),o=!1,g.push(google.maps.event.addListenerOnce(l,"idle",function(){return a.deferred.resolve(l),z()})),n=e.events&&null!=(null!=(y=a.events)?y.blacklist:void 0)?a.events.blacklist:[],_.isString(n)&&(n=[n]),w=function(b,c,d){return _.contains(n,b)?void 0:(d&&d(),g.push(google.maps.event.addListener(l,
b,function(){var b;return(null!=(b=a.update)?b.lazy:void 0)?void 0:c()})))},_.contains(n,"all")||(w("dragstart",function(){return o=!0,a.$evalAsync(function(a){return null!=a.dragging?a.dragging=o:void 0})}),w("dragend",function(){return o=!1,a.$evalAsync(function(a){return null!=a.dragging?a.dragging=o:void 0})}),D=function(c,d){if(null==c&&(c=l.center),null==d&&(d=a),!_.contains(n,"center"))if(b.isDefined(d.center.type)){if(d.center.coordinates[1]!==c.lat()&&(d.center.coordinates[1]=c.lat()),d.center.coordinates[0]!==
c.lng())return d.center.coordinates[0]=c.lng()}else if(d.center.latitude!==c.lat()&&(d.center.latitude=c.lat()),d.center.longitude!==c.lng())return d.center.longitude=c.lng()},A=!1,w("idle",function(){var b,c,d;return b=l.getBounds(),c=b.getNorthEast(),d=b.getSouthWest(),A=!0,a.$evalAsync(function(b){return D(),_.isUndefined(b.bounds)||_.contains(n,"bounds")||(b.bounds.northeast={latitude:c.lat(),longitude:c.lng()},b.bounds.southwest={latitude:d.lat(),longitude:d.lng()}),_.contains(n,"zoom")||(b.zoom=
l.zoom,a.idleAndZoomChanged=!a.idleAndZoomChanged),A=!1})})),b.isDefined(a.events)&&null!==a.events&&b.isObject(a.events)){u=function(b){return function(){return a.events[b].apply(a,[l,b,arguments])}},m=[];for(t in a.events)a.events.hasOwnProperty(t)&&b.isFunction(a.events[t])&&m.push(google.maps.event.addListener(l,t,u(t)));g.concat(m)}return l.getOptions=function(){return v},a.map=l,null!=e.control&&null!=a.control&&(a.control.refresh=function(a){var b,c,d;if(null!=l)return null!=("undefined"!=
typeof google&&null!==google&&null!=(c=google.maps)&&null!=(d=c.event)?d.trigger:void 0)&&null!=l&&google.maps.event.trigger(l,"resize"),null!=(null!=a?a.latitude:void 0)&&null!=(null!=a?a.longitude:void 0)?(b=h.getCoords(a),h.isTrue(e.pan)?l.panTo(b):l.setCenter(b)):void 0},a.control.getGMap=function(){return l},a.control.getMapOptions=function(){return v},a.control.getCustomEventListeners=function(){return m},a.control.removeEvents=function(a){return p.removeEvents(a)}),a.$watch("center",function(b,
c){var d,g;if(b!==c&&!A&&(d=h.getCoords(a.center),d.lat()!==l.center.lat()||d.lng()!==l.center.lng()))return g=!0,o||(h.validateCoords(b)||f.error("Invalid center for newValue: "+JSON.stringify(b)),h.isTrue(e.pan)&&a.zoom===l.zoom?l.panTo(d):l.setCenter(d)),g=!1},!0),E=null,a.$watch("zoom",function(b,c){var e,f,g;if(null!=b&&!_.isEqual(b,c)&&(null!=l?l.getZoom():void 0)!==(null!=a?a.zoom:void 0)&&!A)return g=!0,null!=E&&d.cancel(E),E=d(function(){return l.setZoom(b),g=!1},(null!=(e=a.eventOpts)&&
null!=(f=e.debounce)?f.zoomMs:void 0)+20,!1)}),a.$watch("bounds",function(a,b){var c,d,e,g,h,i,j;if(a!==b)return null==(null!=a&&null!=(e=a.northeast)?e.latitude:void 0)||null==(null!=a&&null!=(g=a.northeast)?g.longitude:void 0)||null==(null!=a&&null!=(h=a.southwest)?h.latitude:void 0)||null==(null!=a&&null!=(i=a.southwest)?i.longitude:void 0)?void f.error("Invalid map bounds for new value: "+JSON.stringify(a)):(d=new google.maps.LatLng(a.northeast.latitude,a.northeast.longitude),j=new google.maps.LatLng(a.southwest.latitude,
a.southwest.longitude),c=new google.maps.LatLngBounds(j,d),l.fitBounds(c))}),["options","styles"].forEach(function(b){return a.$watch(b,function(a,b){var c;return c=this.exp,_.isEqual(a,b)?void 0:("options"===c?x.options=a:x.options[c]=a,null!=l?l.setOptions(x):void 0)},!0)})}}(this))},h}(h)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,
a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarker",["uiGmapIMarker","uiGmapMarkerChildModel","uiGmapMarkerManager","uiGmapLogger",function(b,d,e,f){var g;return g=function(g){function h(){this.link=a(this.link,this),h.__super__.constructor.call(this),this.template='\x3cspan class\x3d"angular-google-map-marker" ng-transclude\x3e\x3c/span\x3e',f.info(this)}return c(h,g),h.prototype.controller=["$scope","$element",function(a,
c){return a.ctrlType="Marker",_.extend(this,b.handle(a,c))}],h.prototype.link=function(a,c,f,g){var h;return h=b.mapPromise(a,g),h.then(function(c){return function(c){var f,g,h,i,j,k;return h=new e(c),i=_.object(b.keys,b.keys),j=new d(a,a,i,c,{},f=!0,h,g=!1,k=!1),j.deferred.promise.then(function(b){return a.deferred.resolve(b)}),null!=a.control?a.control.getGMarkers=h.getGMarkers:void 0}}(this)),a.$on("$destroy",function(a){return function(){var a;return"undefined"!=typeof a&&null!==a&&a.clear(),
a=null}}(this))},h}(b)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarkers",["uiGmapIMarker","uiGmapPlural","uiGmapMarkersParentModel","uiGmap_sync","uiGmapLogger",function(b,c,d,e,f){var g;return g=function(e){function g(){g.__super__.constructor.call(this),this.template=
'\x3cspan class\x3d"angular-google-map-markers" ng-transclude\x3e\x3c/span\x3e',c.extend(this,{doCluster:"\x3d?docluster",clusterOptions:"\x3dclusteroptions",clusterEvents:"\x3dclusterevents",modelsByRef:"\x3dmodelsbyref",type:"\x3d?type",typeOptions:"\x3d?typeoptions",typeEvents:"\x3d?typeevents"}),f.info(this)}return a(g,e),g.prototype.controller=["$scope","$element",function(a,c){return a.ctrlType="Markers",_.extend(this,b.handle(a,c))}],g.prototype.link=function(a,e,f,g){var h,i;return h=void 0,
i=function(){return a.deferred.resolve()},b.mapPromise(a,g).then(function(b){var j;return j=g.getScope(),j.$watch("idleAndZoomChanged",function(){return _.defer(h.gManager.draw)}),h=new d(a,e,f,b),c.link(a,h),null!=a.control&&(a.control.getGMarkers=function(){var a;return null!=(a=h.gManager)?a.getGMarkers():void 0},a.control.getChildMarkers=function(){return h.plurals}),_.last(h.existingPieces._content).then(function(){return i()})})},g}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapPlural",
[function(){var a;return a=function(a,b){return null!=a.control?(a.control.updateModels=function(c){return a.models=c,b.createChildScopes(!1)},a.control.newModels=function(c){return a.models=c,b.rebuildAll(a,!0,!0)},a.control.clean=function(){return b.rebuildAll(a,!1,!0)},a.control.getPlurals=function(){return b.plurals},a.control.getManager=function(){return b.gManager},a.control.hasManager=function(){return null!=b.gManager==!0},a.control.managerDraw=function(){var b;return a.control.hasManager()&&
null!=(b=a.control.getManager())?b.draw():void 0}):void 0},{extend:function(a,b){return _.extend(a.scope||{},b||{},{idKey:"\x3didkey",doRebuildAll:"\x3ddorebuildall",models:"\x3dmodels",chunk:"\x3dchunk",cleanchunk:"\x3dcleanchunk",control:"\x3dcontrol"})},link:function(b,c){return a(b,c)}}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,
a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygon",["uiGmapIPolygon","$timeout","uiGmapPolygonChildModel",function(b,d,e){var f;return f=function(d){function f(){return this.link=a(this.link,this),f.__super__.constructor.apply(this,arguments)}return c(f,d),f.prototype.link=function(a,c,d,f){var g,h;return g=[],h=b.mapPromise(a,f),null!=a.control&&(a.control.getInstance=this,a.control.polygons=g,a.control.promise=h),
h.then(function(b){return function(c){return g.push(new e(a,d,c,b.DEFAULTS))}}(this))},f}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygons",["uiGmapIPolygon","$timeout","uiGmapPolygonsParentModel","uiGmapPlural",
function(d,e,f,g){var h;return h=function(d){function e(){this.link=a(this.link,this),e.__super__.constructor.call(this),g.extend(this),this.$log.info(this)}return c(e,d),e.prototype.link=function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return function(h){return(b.isUndefined(a.path)||null===a.path)&&e.$log.warn("polygons: no valid path attribute found"),a.models||e.$log.warn("polygons: no models found to create from"),g.link(a,new f(a,c,d,h,e.DEFAULTS))}}(this))},e}(d)}])}.call(this),
function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolyline",["uiGmapIPolyline","$timeout","uiGmapPolylineChildModel",function(d,e,f){var g;return g=function(e){function g(){return this.link=a(this.link,this),g.__super__.constructor.apply(this,
arguments)}return c(g,e),g.prototype.link=function(a,c,e,g){return d.mapPromise(a,g).then(function(c){return function(d){return(b.isUndefined(a.path)||null===a.path||!c.validatePath(a.path))&&c.$log.warn("polyline: no valid path attribute found"),new f(a,e,d,c.DEFAULTS)}}(this))},g}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=
new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylines",["uiGmapIPolyline","$timeout","uiGmapPolylinesParentModel","uiGmapPlural",function(d,e,f,g){var h;return h=function(d){function e(){this.link=a(this.link,this),e.__super__.constructor.call(this),g.extend(this),this.$log.info(this)}return c(e,d),e.prototype.link=function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return function(h){return(b.isUndefined(a.path)||
null===a.path)&&e.$log.warn("polylines: no valid path attribute found"),a.models||e.$log.warn("polylines: no models found to create from"),g.link(a,new f(a,c,d,h,e.DEFAULTS))}}(this))},e}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapRectangle",["uiGmapLogger","uiGmapGmapUtil","uiGmapIRectangle","uiGmapRectangleParentModel",function(a,b,c,d){return _.extend(c,{link:function(a,b,c,e){return e.getScope().deferred.promise.then(function(e){return function(e){return new d(a,
b,c,e)}}(this))}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindow",["uiGmapIWindow","uiGmapGmapUtil","uiGmapWindowChildModel","uiGmapLodash","uiGmapLogger",function(d,e,f,g,h){var i;return i=function(i){function j(){this.link=
a(this.link,this),j.__super__.constructor.call(this),this.require=["^uiGmapGoogleMap","^?uiGmapMarker"],this.template='\x3cspan class\x3d"angular-google-maps-window" ng-transclude\x3e\x3c/span\x3e',h.debug(this),this.childWindows=[]}return c(j,i),j.include(e),j.prototype.link=function(a,c,e,f){var g,h;return g=f.length>1&&null!=f[1]?f[1]:void 0,h=null!=g?g.getScope():void 0,this.mapPromise=d.mapPromise(a,f[0]),this.mapPromise.then(function(d){return function(f){var i;return i=!0,b.isDefined(e.isiconvisibleonclick)&&
(i=a.isIconVisibleOnClick),g?h.deferred.promise.then(function(b){return d.init(a,c,i,f,h)}):void d.init(a,c,i,f)}}(this))},j.prototype.init=function(a,b,c,d,e){var h,i,j,k,l;return i=null!=a.options?a.options:{},k=null!=a&&this.validateCoords(a.coords),null!=(null!=e?e.getGMarker:void 0)&&(j=e.getGMarker()),l=k?this.createWindowOptions(j,a,b.html(),i):i,null!=d&&(h=new f({},a,l,c,d,e,b),this.childWindows.push(h),a.$on("$destroy",function(a){return function(){return a.childWindows=g.withoutObjects(a.childWindows,
[h],function(a,b){return a.scope.$id===b.scope.$id}),a.childWindows.length=0}}(this))),null!=a.control&&(a.control.getGWindows=function(a){return function(){return a.childWindows.map(function(a){return a.gObject})}}(this),a.control.getChildWindows=function(a){return function(){return a.childWindows}}(this),a.control.getPlurals=a.control.getChildWindows,a.control.showWindow=function(a){return function(){return a.childWindows.map(function(a){return a.showWindow()})}}(this),a.control.hideWindow=function(a){return function(){return a.childWindows.map(function(a){return a.hideWindow()})}}(this)),
null!=this.onChildCreation&&null!=h?this.onChildCreation(h):void 0},j}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindows",["uiGmapIWindow","uiGmapPlural","uiGmapWindowsParentModel","uiGmapPromise","uiGmapLogger",
function(b,d,e,f,g){var h;return h=function(b){function h(){this.init=a(this.init,this),this.link=a(this.link,this),h.__super__.constructor.call(this),this.require=["^uiGmapGoogleMap","^?uiGmapMarkers"],this.template='\x3cspan class\x3d"angular-google-maps-windows" ng-transclude\x3e\x3c/span\x3e',d.extend(this),g.debug(this)}return c(h,b),h.prototype.link=function(a,b,c,d){var e,g,h;return e=d[0].getScope(),g=d.length>1&&null!=d[1]?d[1]:void 0,h=null!=g?g.getScope():void 0,e.deferred.promise.then(function(e){return function(g){var i,
j;return i=(null!=h&&null!=(j=h.deferred)?j.promise:void 0)||f.resolve(),i.then(function(){var f,i;return f=null!=(i=e.parentModel)?i.existingPieces:void 0,f?f.then(function(){return e.init(a,b,c,d,g,h)}):e.init(a,b,c,d,g,h)})}}(this))},h.prototype.init=function(a,b,c,f,g,h){var i;return i=new e(a,b,c,f,g,h),d.link(a,i),null!=a.control?(a.control.getGWindows=function(a){return function(){return i.plurals.map(function(a){return a.gObject})}}(this),a.control.getChildWindows=function(a){return function(){return i.plurals}}(this)):
void 0},h}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap",["uiGmapMap",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMarker",["$timeout","uiGmapMarker",function(a,b){return new b(a)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMarkers",["$timeout","uiGmapMarkers",function(a,b){return new b(a)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolygon",["uiGmapPolygon",
function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapCircle",["uiGmapCircle",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolyline",["uiGmapPolyline",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolylines",["uiGmapPolylines",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapRectangle",["uiGmapLogger","uiGmapRectangle",
function(a,b){return b}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapWindow",["$timeout","$compile","$http","$templateCache","uiGmapWindow",function(a,b,c,d,e){return new e(a,b,c,d)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapWindows",["$timeout","$compile","$http","$templateCache","$interpolate","uiGmapWindows",function(a,b,c,d,e,f){return new f(a,b,c,d,e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};
b.module("uiGmapgoogle-maps").directive("uiGmapLayer",["$timeout","uiGmapLogger","uiGmapLayerParentModel",function(b,c,d){var e;return new (e=function(){function b(){this.link=a(this.link,this),this.$log=c,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template="\x3cspan class\x3d'angular-google-map-layer' ng-transclude\x3e\x3c/span\x3e",this.replace=!0,this.scope={show:"\x3dshow",type:"\x3dtype",namespace:"\x3dnamespace",options:"\x3doptions",onCreated:"\x26oncreated"}}
return b.prototype.link=function(a,b,c,e){return e.getScope().deferred.promise.then(function(e){return function(e){return null!=a.onCreated?new d(a,b,c,e,a.onCreated):new d(a,b,c,e)}}(this))},b}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMapControl",["uiGmapControl",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapDragZoom",["uiGmapDragZoom",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapDrawingManager",
["uiGmapDrawingManager",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapFreeDrawPolygons",["uiGmapApiFreeDrawPolygons",function(a){return new a}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapMapType",["$timeout","uiGmapLogger","uiGmapMapTypeParentModel",function(b,c,d){var e;return new (e=function(){function b(){this.link=a(this.link,this),this.$log=c,this.restrict=
"EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template='\x3cspan class\x3d"angular-google-map-layer" ng-transclude\x3e\x3c/span\x3e',this.replace=!0,this.scope={show:"\x3dshow",options:"\x3doptions",refresh:"\x3drefresh",id:"@"}}return b.prototype.link=function(a,b,c,e){return e.getScope().deferred.promise.then(function(e){return function(e){return new d(a,b,c,e)}}(this))},b}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolygons",["uiGmapPolygons",
function(a){return new a}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapSearchBox",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapSearchBoxParentModel","$http","$templateCache","$compile",function(c,d,e,f,g,h){var i;return new (i=function(){function i(){this.link=a(this.link,this),this.$log=d,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template="\x3cspan class\x3d'angular-google-map-search' ng-transclude\x3e\x3c/span\x3e",
this.replace=!0,this.scope={template:"\x3dtemplate",events:"\x3devents",position:"\x3d?position",options:"\x3d?options",parentdiv:"\x3d?parentdiv",ngModel:"\x3d?"}}return i.prototype.require="ngModel",i.prototype.link=function(a,d,i,j){return c.then(function(c){return function(k){return null==a.template&&(g.put("uigmap-searchbox-default.tpl.html",'\x3cinput type\x3d"text"\x3e'),a.template="uigmap-searchbox-default.tpl.html"),f.get(a.template,{cache:g}).success(function(f){return b.isUndefined(a.events)?
void c.$log.error("searchBox: the events property is required"):j.getScope().deferred.promise.then(function(g){var j;return j=b.isDefined(a.position)?a.position.toUpperCase().replace(/-/g,"_"):"TOP_LEFT",k.ControlPosition[j]?new e(a,d,i,g,j,h(f)(a)):void c.$log.error("searchBox: invalid position property")})})}}(this))},i}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapShow",["$animate","uiGmapLogger",function(a,c){return{scope:{uiGmapShow:"\x3d",uiGmapAfterShow:"\x26",
uiGmapAfterHide:"\x26"},link:function(d,e){var f,g,h;return f=function(b,c){return a[b](e,"ng-hide").then(function(){return c()})},g=function(b,c){return a[b](e,"ng-hide",c)},h=function(a,d){return b.version.major>1?c.error("uiGmapShow is not supported for Angular Major greater than 1.\nYour Major is "+b.version.major+'"'):1===b.version.major&&b.version.minor<3?g(a,d):f(a,d)},d.$watch("uiGmapShow",function(a){return a&&h("removeClass",d.uiGmapAfterShow),a?void 0:h("addClass",d.uiGmapAfterHide)})}}}])}.call(this),
function(){b.module("uiGmapgoogle-maps").directive("uiGmapStreetViewPanorama",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper",function(a,c,d,e){var f;return f="uiGmapStreetViewPanorama",{restrict:"EMA",template:'\x3cdiv class\x3d"angular-google-map-street-view-panorama"\x3e\x3c/div\x3e',replace:!0,scope:{focalcoord:"\x3d",radius:"\x3d?",events:"\x3d?",options:"\x3d?",control:"\x3d?",povoptions:"\x3d?",imagestatus:"\x3d"},link:function(g,h,i){return a.then(function(a){return function(a){var i,
j,k,l,m,n,o,p,q,r;return p=void 0,r=void 0,k=!1,n=void 0,o=null,q=null,i=function(){return e.removeEvents(n),null!=p&&(p.unbind("position"),p.setVisible(!1)),null!=r?(null!=(null!=r?r.setVisible:void 0)&&r.setVisible(!1),r=void 0):void 0},m=function(a,c){var d;return d=google.maps.geometry.spherical.computeHeading(a,c),k=!0,g.radius=g.radius||50,q=b.extend({heading:d,zoom:1,pitch:0},g.povoptions||{}),o=o=b.extend({navigationControl:!1,addressControl:!1,linksControl:!1,position:a,pov:q,visible:!0},
g.options||{}),k=!1},j=function(){var a;return g.focalcoord?g.radius?(i(),null==r&&(r=new google.maps.StreetViewService),g.events&&(n=e.setEvents(r,g,g)),a=d.getCoords(g.focalcoord),r.getPanoramaByLocation(a,g.radius,function(b,c){var d,e,f;return null!=g.imagestatus&&(g.imagestatus=c),null!=(null!=(f=g.events)?f.image_status_changed:void 0)&&g.events.image_status_changed(r,"image_status_changed",g,c),"OK"===c?(e=b.location.latLng,m(e,a),d=h[0],p=new google.maps.StreetViewPanorama(d,o)):void 0})):
void c.error(f+": needs a radius to set the camera view from its focal target."):void c.error(f+": focalCoord needs to be defined")},null!=g.control&&(g.control.getOptions=function(){return o},g.control.getPovOptions=function(){return q},g.control.getGObject=function(){return r},g.control.getGPano=function(){return p}),g.$watch("options",function(a,b){return a===b||a===o||k?void 0:j()}),l=!0,g.$watch("focalcoord",function(a,b){return a===b&&!l||null==a?void 0:(l=!1,j())}),g.$on("$destroy",function(){return i()})}}(this))}}}])}.call(this),
b.module("uiGmapgoogle-maps.wrapped").service("uiGmapuuid",function(){function a(){}return a.generate=function(){var b=a._gri,c=a._ha;return c(b(32),8)+"-"+c(b(16),4)+"-"+c(16384|b(12),4)+"-"+c(32768|b(14),4)+"-"+c(b(48),12)},a._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<<a):53>=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<<a-30)):NaN},a._ha=function(a,b){for(var c=a.toString(16),d=b-c.length,e="0";d>0;d>>>=1,e+=e)1&d&&(c=e+c);return c},a}),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapGoogleMapsUtilV3",
function(){return{init:_.once(function(){+function(){function b(a){a=a||{},google.maps.OverlayView.apply(this,arguments),this.content_=a.content||"",this.disableAutoPan_=a.disableAutoPan||!1,this.maxWidth_=a.maxWidth||0,this.pixelOffset_=a.pixelOffset||new google.maps.Size(0,0),this.position_=a.position||new google.maps.LatLng(0,0),this.zIndex_=a.zIndex||null,this.boxClass_=a.boxClass||"infoBox",this.boxStyle_=a.boxStyle||{},this.closeBoxMargin_=a.closeBoxMargin||"2px",this.closeBoxURL_=a.closeBoxURL||
"http://www.google.com/intl/en_us/mapfiles/close.gif",""===a.closeBoxURL&&(this.closeBoxURL_=""),this.infoBoxClearance_=a.infoBoxClearance||new google.maps.Size(1,1),"undefined"==typeof a.visible&&("undefined"==typeof a.isHidden?a.visible=!0:a.visible=!a.isHidden),this.isHidden_=!a.visible,this.alignBottom_=a.alignBottom||!1,this.pane_=a.pane||"floatPane",this.enableEventPropagation_=a.enableEventPropagation||!1,this.div_=null,this.closeListener_=null,this.moveListener_=null,this.contextListener_=
null,this.eventListeners_=null,this.fixedWidthSet_=null}function d(a,b){a.getMarkerClusterer().extend(d,google.maps.OverlayView),this.cluster_=a,this.className_=a.getMarkerClusterer().getClusterClass(),this.styles_=b,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(a.getMap())}function e(a){this.markerClusterer_=a,this.map_=a.getMap(),this.gridSize_=a.getGridSize(),this.minClusterSize_=a.getMinimumClusterSize(),this.averageCenter_=a.getAverageCenter(),this.markers_=[],
this.center_=null,this.bounds_=null,this.clusterIcon_=new d(this,a.getStyles())}function f(a,b,d){this.extend(f,google.maps.OverlayView),b=b||[],d=d||{},this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=d.gridSize||60,this.minClusterSize_=d.minimumClusterSize||2,this.maxZoom_=d.maxZoom||null,this.styles_=d.styles||[],this.title_=d.title||"",this.zoomOnClick_=!0,d.zoomOnClick!==c&&(this.zoomOnClick_=d.zoomOnClick),this.averageCenter_=!1,d.averageCenter!==
c&&(this.averageCenter_=d.averageCenter),this.ignoreHidden_=!1,d.ignoreHidden!==c&&(this.ignoreHidden_=d.ignoreHidden),this.enableRetinaIcons_=!1,d.enableRetinaIcons!==c&&(this.enableRetinaIcons_=d.enableRetinaIcons),this.imagePath_=d.imagePath||f.IMAGE_PATH,this.imageExtension_=d.imageExtension||f.IMAGE_EXTENSION,this.imageSizes_=d.imageSizes||f.IMAGE_SIZES,this.calculator_=d.calculator||f.CALCULATOR,this.batchSize_=d.batchSize||f.BATCH_SIZE,this.batchSizeIE_=d.batchSizeIE||f.BATCH_SIZE_IE,this.clusterClass_=
d.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(b,!0),this.setMap(a)}function g(a,b){function c(){}c.prototype=b.prototype,a.superClass_=b.prototype,a.prototype=new c,a.prototype.constructor=a}function h(a,b,c){this.marker_=a,this.handCursorURL_=a.handCursorURL,this.labelDiv_=document.createElement("div"),this.labelDiv_.style.cssText="position: absolute; overflow: hidden;",this.eventDiv_=document.createElement("div"),
this.eventDiv_.style.cssText=this.labelDiv_.style.cssText,this.eventDiv_.setAttribute("onselectstart","return false;"),this.eventDiv_.setAttribute("ondragstart","return false;"),this.crossDiv_=h.getSharedCross(b)}function i(a){a=a||{},a.labelContent=a.labelContent||"",a.labelAnchor=a.labelAnchor||new google.maps.Point(0,0),a.labelClass=a.labelClass||"markerLabels",a.labelStyle=a.labelStyle||{},a.labelInBackground=a.labelInBackground||!1,"undefined"==typeof a.labelVisible&&(a.labelVisible=!0),"undefined"==
typeof a.raiseOnDrag&&(a.raiseOnDrag=!0),"undefined"==typeof a.clickable&&(a.clickable=!0),"undefined"==typeof a.draggable&&(a.draggable=!1),"undefined"==typeof a.optimized&&(a.optimized=!1),a.crossImage=a.crossImage||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png",a.handCursor=a.handCursor||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur",a.optimized=!1,this.label=
new h(this,a.crossImage,a.handCursor),google.maps.Marker.apply(this,arguments)}function j(a){var b=a||{};this.ready_=!1,this.dragging_=!1,a.visible==c&&(a.visible=!0),a.shadow==c&&(a.shadow="7px -3px 5px rgba(88,88,88,0.7)"),a.anchor==c&&(a.anchor=k.BOTTOM),this.setValues(b)}b.prototype=new google.maps.OverlayView,b.prototype.createInfoBoxDiv_=function(){var a,b,c,d=this,e=function(a){a.cancelBubble=!0,a.stopPropagation&&a.stopPropagation()},f=function(a){a.returnValue=!1,a.preventDefault&&a.preventDefault(),
d.enableEventPropagation_||e(a)};if(!this.div_){if(this.div_=document.createElement("div"),this.setBoxStyle_(),"undefined"==typeof this.content_.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+this.content_:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(this.content_)),this.getPanes()[this.pane_].appendChild(this.div_),this.addClickHandler_(),this.div_.style.width?this.fixedWidthSet_=!0:0!==this.maxWidth_&&this.div_.offsetWidth>this.maxWidth_?(this.div_.style.width=this.maxWidth_,
this.div_.style.overflow="auto",this.fixedWidthSet_=!0):(c=this.getBoxWidths_(),this.div_.style.width=this.div_.offsetWidth-c.left-c.right+"px",this.fixedWidthSet_=!1),this.panBox_(this.disableAutoPan_),!this.enableEventPropagation_){for(this.eventListeners_=[],b=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0;a<b.length;a++)this.eventListeners_.push(google.maps.event.addDomListener(this.div_,b[a],e));this.eventListeners_.push(google.maps.event.addDomListener(this.div_,
"mouseover",function(a){this.style.cursor="default"}))}this.contextListener_=google.maps.event.addDomListener(this.div_,"contextmenu",f),google.maps.event.trigger(this,"domready")}},b.prototype.getCloseBoxImg_=function(){var a="";return""!==this.closeBoxURL_&&(a="\x3cimg",a+=" src\x3d'"+this.closeBoxURL_+"'",a+=" align\x3dright",a+=" style\x3d'",a+=" position: relative;",a+=" cursor: pointer;",a+=" margin: "+this.closeBoxMargin_+";",a+="'\x3e"),a},b.prototype.addClickHandler_=function(){var a;""!==
this.closeBoxURL_?(a=this.div_.firstChild,this.closeListener_=google.maps.event.addDomListener(a,"click",this.getCloseClickHandler_())):this.closeListener_=null},b.prototype.getCloseClickHandler_=function(){var a=this;return function(b){b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation(),google.maps.event.trigger(a,"closeclick"),a.close()}},b.prototype.panBox_=function(a){var b,c,d=0,e=0;if(!a&&(b=this.getMap(),b instanceof google.maps.Map)){b.getBounds().contains(this.position_)||b.setCenter(this.position_),
c=b.getBounds();var f=b.getDiv(),g=f.offsetWidth,h=f.offsetHeight,i=this.pixelOffset_.width,j=this.pixelOffset_.height,k=this.div_.offsetWidth,l=this.div_.offsetHeight,m=this.infoBoxClearance_.width,n=this.infoBoxClearance_.height,o=this.getProjection().fromLatLngToContainerPixel(this.position_);if(o.x<-i+m?d=o.x+i-m:o.x+k+i+m>g&&(d=o.x+k+i+m-g),this.alignBottom_?o.y<-j+n+l?e=o.y+j-n-l:o.y+j+n>h&&(e=o.y+j+n-h):o.y<-j+n?e=o.y+j-n:o.y+l+j+n>h&&(e=o.y+l+j+n-h),0!==d||0!==e){b.getCenter();b.panBy(d,e)}}},
b.prototype.setBoxStyle_=function(){var a,b;if(this.div_){this.div_.className=this.boxClass_,this.div_.style.cssText="",b=this.boxStyle_;for(a in b)b.hasOwnProperty(a)&&(this.div_.style[a]=b[a]);this.div_.style.WebkitTransform="translateZ(0)","undefined"!=typeof this.div_.style.opacity&&""!==this.div_.style.opacity&&(this.div_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d'+100*this.div_.style.opacity+')"',this.div_.style.filter="alpha(opacity\x3d"+100*this.div_.style.opacity+
")"),this.div_.style.position="absolute",this.div_.style.visibility="hidden",null!==this.zIndex_&&(this.div_.style.zIndex=this.zIndex_)}},b.prototype.getBoxWidths_=function(){var a,b={top:0,bottom:0,left:0,right:0},c=this.div_;return document.defaultView&&document.defaultView.getComputedStyle?(a=c.ownerDocument.defaultView.getComputedStyle(c,""),a&&(b.top=parseInt(a.borderTopWidth,10)||0,b.bottom=parseInt(a.borderBottomWidth,10)||0,b.left=parseInt(a.borderLeftWidth,10)||0,b.right=parseInt(a.borderRightWidth,
10)||0)):document.documentElement.currentStyle&&c.currentStyle&&(b.top=parseInt(c.currentStyle.borderTopWidth,10)||0,b.bottom=parseInt(c.currentStyle.borderBottomWidth,10)||0,b.left=parseInt(c.currentStyle.borderLeftWidth,10)||0,b.right=parseInt(c.currentStyle.borderRightWidth,10)||0),b},b.prototype.onRemove=function(){this.div_&&(this.div_.parentNode.removeChild(this.div_),this.div_=null)},b.prototype.draw=function(){this.createInfoBoxDiv_();var a=this.getProjection().fromLatLngToDivPixel(this.position_);
this.div_.style.left=a.x+this.pixelOffset_.width+"px",this.alignBottom_?this.div_.style.bottom=-(a.y+this.pixelOffset_.height)+"px":this.div_.style.top=a.y+this.pixelOffset_.height+"px",this.isHidden_?this.div_.style.visibility="hidden":this.div_.style.visibility="visible"},b.prototype.setOptions=function(a){"undefined"!=typeof a.boxClass&&(this.boxClass_=a.boxClass,this.setBoxStyle_()),"undefined"!=typeof a.boxStyle&&(this.boxStyle_=a.boxStyle,this.setBoxStyle_()),"undefined"!=typeof a.content&&
this.setContent(a.content),"undefined"!=typeof a.disableAutoPan&&(this.disableAutoPan_=a.disableAutoPan),"undefined"!=typeof a.maxWidth&&(this.maxWidth_=a.maxWidth),"undefined"!=typeof a.pixelOffset&&(this.pixelOffset_=a.pixelOffset),"undefined"!=typeof a.alignBottom&&(this.alignBottom_=a.alignBottom),"undefined"!=typeof a.position&&this.setPosition(a.position),"undefined"!=typeof a.zIndex&&this.setZIndex(a.zIndex),"undefined"!=typeof a.closeBoxMargin&&(this.closeBoxMargin_=a.closeBoxMargin),"undefined"!=
typeof a.closeBoxURL&&(this.closeBoxURL_=a.closeBoxURL),"undefined"!=typeof a.infoBoxClearance&&(this.infoBoxClearance_=a.infoBoxClearance),"undefined"!=typeof a.isHidden&&(this.isHidden_=a.isHidden),"undefined"!=typeof a.visible&&(this.isHidden_=!a.visible),"undefined"!=typeof a.enableEventPropagation&&(this.enableEventPropagation_=a.enableEventPropagation),this.div_&&this.draw()},b.prototype.setContent=function(a){this.content_=a,this.div_&&(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),
this.closeListener_=null),this.fixedWidthSet_||(this.div_.style.width=""),"undefined"==typeof a.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+a:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(a)),this.fixedWidthSet_||(this.div_.style.width=this.div_.offsetWidth+"px","undefined"==typeof a.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+a:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(a))),this.addClickHandler_()),google.maps.event.trigger(this,"content_changed")},
b.prototype.setPosition=function(a){this.position_=a,this.div_&&this.draw(),google.maps.event.trigger(this,"position_changed")},b.prototype.setZIndex=function(a){this.zIndex_=a,this.div_&&(this.div_.style.zIndex=a),google.maps.event.trigger(this,"zindex_changed")},b.prototype.setVisible=function(a){this.isHidden_=!a,this.div_&&(this.div_.style.visibility=this.isHidden_?"hidden":"visible")},b.prototype.getContent=function(){return this.content_},b.prototype.getPosition=function(){return this.position_},
b.prototype.getZIndex=function(){return this.zIndex_},b.prototype.getVisible=function(){var a;return a="undefined"==typeof this.getMap()||null===this.getMap()?!1:!this.isHidden_},b.prototype.show=function(){this.isHidden_=!1,this.div_&&(this.div_.style.visibility="visible")},b.prototype.hide=function(){this.isHidden_=!0,this.div_&&(this.div_.style.visibility="hidden")},b.prototype.open=function(a,b){var c=this;b&&(this.position_=b.getPosition(),this.moveListener_=google.maps.event.addListener(b,"position_changed",
function(){c.setPosition(this.getPosition())})),this.setMap(a),this.div_&&this.panBox_()},b.prototype.close=function(){var a;if(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.eventListeners_){for(a=0;a<this.eventListeners_.length;a++)google.maps.event.removeListener(this.eventListeners_[a]);this.eventListeners_=null}this.moveListener_&&(google.maps.event.removeListener(this.moveListener_),this.moveListener_=null),this.contextListener_&&(google.maps.event.removeListener(this.contextListener_),
this.contextListener_=null),this.setMap(null)},function(){function b(a,b){var c=this,d=new google.maps.OverlayView;d.onAdd=function(){c.init_(a,b)},d.draw=function(){},d.onRemove=function(){},d.setMap(a),this.prjov_=d}var c=function(a){var b;switch(a){case "thin":b="2px";break;case "medium":b="4px";break;case "thick":b="6px";break;default:b=a}return b},d=function(a){var b,d={};if(document.defaultView&&document.defaultView.getComputedStyle){if(b=a.ownerDocument.defaultView.getComputedStyle(a,""))return d.top=
parseInt(b.borderTopWidth,10)||0,d.bottom=parseInt(b.borderBottomWidth,10)||0,d.left=parseInt(b.borderLeftWidth,10)||0,d.right=parseInt(b.borderRightWidth,10)||0,d}else if(document.documentElement.currentStyle&&a.currentStyle)return d.top=parseInt(c(a.currentStyle.borderTopWidth),10)||0,d.bottom=parseInt(c(a.currentStyle.borderBottomWidth),10)||0,d.left=parseInt(c(a.currentStyle.borderLeftWidth),10)||0,d.right=parseInt(c(a.currentStyle.borderRightWidth),10)||0,d;return d.top=parseInt(a.style["border-top-width"],
10)||0,d.bottom=parseInt(a.style["border-bottom-width"],10)||0,d.left=parseInt(a.style["border-left-width"],10)||0,d.right=parseInt(a.style["border-right-width"],10)||0,d},e={x:0,y:0},f=function(a){e.x="undefined"!=typeof document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,e.y="undefined"!=typeof document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop};f();var g=function(b){var c=0,d=0;return b=b||a.event,"undefined"!=
typeof b.pageX?(c=b.pageX,d=b.pageY):"undefined"!=typeof b.clientX&&(c=b.clientX+e.x,d=b.clientY+e.y),{left:c,top:d}},h=function(b){for(var c=b.offsetLeft,d=b.offsetTop,e=b.offsetParent;null!==e;){e!==document.body&&e!==document.documentElement&&(c-=e.scrollLeft,d-=e.scrollTop);var f=e,g=f.offsetLeft,h=f.offsetTop;if(!g&&!h&&a.getComputedStyle){var i=document.defaultView.getComputedStyle(f,null).MozTransform||document.defaultView.getComputedStyle(f,null).WebkitTransform;if(i&&"string"==typeof i){var j=
i.split(",");g+=parseInt(j[4],10)||0,h+=parseInt(j[5],10)||0}}c+=g,d+=h,e=e.offsetParent}return{left:c,top:d}},i=function(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a},j=function(a,b){"undefined"!=typeof b&&(a.style.opacity=b),"undefined"!=typeof a.style.opacity&&""!==a.style.opacity&&(a.style.filter="alpha(opacity\x3d"+100*a.style.opacity+")")};b.prototype.init_=function(b,c){var e,g=this;for(this.map_=b,c=c||{},this.key_=c.key||"shift",this.key_=this.key_.toLowerCase(),
this.borderWidths_=d(this.map_.getDiv()),this.veilDiv_=[],e=0;4>e;e++)this.veilDiv_[e]=document.createElement("div"),this.veilDiv_[e].onselectstart=function(){return!1},i(this.veilDiv_[e].style,{backgroundColor:"gray",opacity:.25,cursor:"crosshair"}),i(this.veilDiv_[e].style,c.paneStyle),i(this.veilDiv_[e].style,c.veilStyle),i(this.veilDiv_[e].style,{position:"absolute",overflow:"hidden",display:"none"}),"shift"===this.key_&&(this.veilDiv_[e].style.MozUserSelect="none"),j(this.veilDiv_[e]),"transparent"===
this.veilDiv_[e].style.backgroundColor&&(this.veilDiv_[e].style.backgroundColor="white",j(this.veilDiv_[e],0)),this.map_.getDiv().appendChild(this.veilDiv_[e]);this.noZoom_=c.noZoom||!1,this.visualEnabled_=c.visualEnabled||!1,this.visualClass_=c.visualClass||"",this.visualPosition_=c.visualPosition||google.maps.ControlPosition.LEFT_TOP,this.visualPositionOffset_=c.visualPositionOffset||new google.maps.Size(35,0),this.visualPositionIndex_=c.visualPositionIndex||null,this.visualSprite_=c.visualSprite||
"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png",this.visualSize_=c.visualSize||new google.maps.Size(20,20),this.visualTips_=c.visualTips||{},this.visualTips_.off=this.visualTips_.off||"Turn on drag zoom mode",this.visualTips_.on=this.visualTips_.on||"Turn off drag zoom mode",this.boxDiv_=document.createElement("div"),i(this.boxDiv_.style,{border:"4px solid #736AFF"}),i(this.boxDiv_.style,c.boxStyle),i(this.boxDiv_.style,{position:"absolute",
display:"none"}),j(this.boxDiv_),this.map_.getDiv().appendChild(this.boxDiv_),this.boxBorderWidths_=d(this.boxDiv_),this.listeners_=[google.maps.event.addDomListener(document,"keydown",function(a){g.onKeyDown_(a)}),google.maps.event.addDomListener(document,"keyup",function(a){g.onKeyUp_(a)}),google.maps.event.addDomListener(this.veilDiv_[0],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(this.veilDiv_[1],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(this.veilDiv_[2],
"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(this.veilDiv_[3],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(document,"mousedown",function(a){g.onMouseDownDocument_(a)}),google.maps.event.addDomListener(document,"mousemove",function(a){g.onMouseMove_(a)}),google.maps.event.addDomListener(document,"mouseup",function(a){g.onMouseUp_(a)}),google.maps.event.addDomListener(a,"scroll",f)],this.hotKeyDown_=!1,this.mouseDown_=!1,this.dragging_=
!1,this.startPt_=null,this.endPt_=null,this.mapWidth_=null,this.mapHeight_=null,this.mousePosn_=null,this.mapPosn_=null,this.visualEnabled_&&(this.buttonDiv_=this.initControl_(this.visualPositionOffset_),null!==this.visualPositionIndex_&&(this.buttonDiv_.index=this.visualPositionIndex_),this.map_.controls[this.visualPosition_].push(this.buttonDiv_),this.controlIndex_=this.map_.controls[this.visualPosition_].length-1)},b.prototype.initControl_=function(a){var b,c,d=this;return b=document.createElement("div"),
b.className=this.visualClass_,b.style.position="relative",b.style.overflow="hidden",b.style.height=this.visualSize_.height+"px",b.style.width=this.visualSize_.width+"px",b.title=this.visualTips_.off,c=document.createElement("img"),c.src=this.visualSprite_,c.style.position="absolute",c.style.left=-(2*this.visualSize_.width)+"px",c.style.top="0px",b.appendChild(c),b.onclick=function(a){d.hotKeyDown_=!d.hotKeyDown_,d.hotKeyDown_?(d.buttonDiv_.firstChild.style.left=-(0*d.visualSize_.width)+"px",d.buttonDiv_.title=
d.visualTips_.on,d.activatedByControl_=!0,google.maps.event.trigger(d,"activate")):(d.buttonDiv_.firstChild.style.left=-(2*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.off,google.maps.event.trigger(d,"deactivate")),d.onMouseMove_(a)},b.onmouseover=function(){d.buttonDiv_.firstChild.style.left=-(1*d.visualSize_.width)+"px"},b.onmouseout=function(){d.hotKeyDown_?(d.buttonDiv_.firstChild.style.left=-(0*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.on):(d.buttonDiv_.firstChild.style.left=
-(2*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.off)},b.ondragstart=function(){return!1},i(b.style,{cursor:"pointer",marginTop:a.height+"px",marginLeft:a.width+"px"}),b},b.prototype.isHotKeyDown_=function(b){var c;if(b=b||a.event,c=b.shiftKey&&"shift"===this.key_||b.altKey&&"alt"===this.key_||b.ctrlKey&&"ctrl"===this.key_,!c)switch(b.keyCode){case 16:"shift"===this.key_&&(c=!0);break;case 17:"ctrl"===this.key_&&(c=!0);break;case 18:"alt"===this.key_&&(c=!0)}return c},b.prototype.isMouseOnMap_=
function(){var a=this.mousePosn_;if(a){var b=this.mapPosn_,c=this.map_.getDiv();return a.left>b.left&&a.left<b.left+c.offsetWidth&&a.top>b.top&&a.top<b.top+c.offsetHeight}return!1},b.prototype.setVeilVisibility_=function(){var a;if(this.map_&&this.hotKeyDown_&&this.isMouseOnMap_()){var b=this.map_.getDiv();if(this.mapWidth_=b.offsetWidth-(this.borderWidths_.left+this.borderWidths_.right),this.mapHeight_=b.offsetHeight-(this.borderWidths_.top+this.borderWidths_.bottom),this.activatedByControl_){var c=
parseInt(this.buttonDiv_.style.left,10)+this.visualPositionOffset_.width,d=parseInt(this.buttonDiv_.style.top,10)+this.visualPositionOffset_.height,e=this.visualSize_.width,f=this.visualSize_.height;for(this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.width=c+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",this.veilDiv_[1].style.top="0px",this.veilDiv_[1].style.left=c+e+"px",this.veilDiv_[1].style.width=this.mapWidth_-(c+e)+"px",this.veilDiv_[1].style.height=
this.mapHeight_+"px",this.veilDiv_[2].style.top="0px",this.veilDiv_[2].style.left=c+"px",this.veilDiv_[2].style.width=e+"px",this.veilDiv_[2].style.height=d+"px",this.veilDiv_[3].style.top=d+f+"px",this.veilDiv_[3].style.left=c+"px",this.veilDiv_[3].style.width=e+"px",this.veilDiv_[3].style.height=this.mapHeight_-(d+f)+"px",a=0;a<this.veilDiv_.length;a++)this.veilDiv_[a].style.display="block"}else{for(this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.width=
this.mapWidth_+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",a=1;a<this.veilDiv_.length;a++)this.veilDiv_[a].style.width="0px",this.veilDiv_[a].style.height="0px";for(a=0;a<this.veilDiv_.length;a++)this.veilDiv_[a].style.display="block"}}else for(a=0;a<this.veilDiv_.length;a++)this.veilDiv_[a].style.display="none"},b.prototype.onKeyDown_=function(a){this.map_&&!this.hotKeyDown_&&this.isHotKeyDown_(a)&&(this.mapPosn_=h(this.map_.getDiv()),this.hotKeyDown_=!0,this.activatedByControl_=!1,this.setVeilVisibility_(),
google.maps.event.trigger(this,"activate"))},b.prototype.getMousePoint_=function(a){var b=g(a),c=new google.maps.Point;return c.x=b.left-this.mapPosn_.left-this.borderWidths_.left,c.y=b.top-this.mapPosn_.top-this.borderWidths_.top,c.x=Math.min(c.x,this.mapWidth_),c.y=Math.min(c.y,this.mapHeight_),c.x=Math.max(c.x,0),c.y=Math.max(c.y,0),c},b.prototype.onMouseDown_=function(a){if(this.map_&&this.hotKeyDown_){this.mapPosn_=h(this.map_.getDiv()),this.dragging_=!0,this.startPt_=this.endPt_=this.getMousePoint_(a),
this.boxDiv_.style.width=this.boxDiv_.style.height="0px";var b=this.prjov_.getProjection(),c=b.fromContainerPixelToLatLng(this.startPt_);google.maps.event.trigger(this,"dragstart",c)}},b.prototype.onMouseDownDocument_=function(a){this.mouseDown_=!0},b.prototype.onMouseMove_=function(a){if(this.mousePosn_=g(a),this.dragging_){this.endPt_=this.getMousePoint_(a);var b=Math.min(this.startPt_.x,this.endPt_.x),c=Math.min(this.startPt_.y,this.endPt_.y),d=Math.abs(this.startPt_.x-this.endPt_.x),e=Math.abs(this.startPt_.y-
this.endPt_.y),f=Math.max(0,d-(this.boxBorderWidths_.left+this.boxBorderWidths_.right)),i=Math.max(0,e-(this.boxBorderWidths_.top+this.boxBorderWidths_.bottom));this.veilDiv_[0].style.top="0px",this.veilDiv_[0].style.left="0px",this.veilDiv_[0].style.width=b+"px",this.veilDiv_[0].style.height=this.mapHeight_+"px",this.veilDiv_[1].style.top="0px",this.veilDiv_[1].style.left=b+d+"px",this.veilDiv_[1].style.width=this.mapWidth_-(b+d)+"px",this.veilDiv_[1].style.height=this.mapHeight_+"px",this.veilDiv_[2].style.top=
"0px",this.veilDiv_[2].style.left=b+"px",this.veilDiv_[2].style.width=d+"px",this.veilDiv_[2].style.height=c+"px",this.veilDiv_[3].style.top=c+e+"px",this.veilDiv_[3].style.left=b+"px",this.veilDiv_[3].style.width=d+"px",this.veilDiv_[3].style.height=this.mapHeight_-(c+e)+"px",this.boxDiv_.style.top=c+"px",this.boxDiv_.style.left=b+"px",this.boxDiv_.style.width=f+"px",this.boxDiv_.style.height=i+"px",this.boxDiv_.style.display="block",google.maps.event.trigger(this,"drag",new google.maps.Point(b,
c+e),new google.maps.Point(b+d,c),this.prjov_.getProjection())}else this.mouseDown_||(this.mapPosn_=h(this.map_.getDiv()),this.setVeilVisibility_())},b.prototype.onMouseUp_=function(a){var b,c=this;if(this.mouseDown_=!1,this.dragging_){if(this.getMousePoint_(a).x===this.startPt_.x&&this.getMousePoint_(a).y===this.startPt_.y)return void this.onKeyUp_(a);var d=Math.min(this.startPt_.x,this.endPt_.x),e=Math.min(this.startPt_.y,this.endPt_.y),f=Math.abs(this.startPt_.x-this.endPt_.x),g=Math.abs(this.startPt_.y-
this.endPt_.y),h=!0;h&&(d+=this.borderWidths_.left,e+=this.borderWidths_.top);var i=this.prjov_.getProjection(),j=i.fromContainerPixelToLatLng(new google.maps.Point(d,e+g)),k=i.fromContainerPixelToLatLng(new google.maps.Point(d+f,e)),l=new google.maps.LatLngBounds(j,k);if(this.noZoom_)this.boxDiv_.style.display="none";else{b=this.map_.getZoom(),this.map_.fitBounds(l),this.map_.getZoom()<b&&this.map_.setZoom(b);var m=i.fromLatLngToContainerPixel(j),n=i.fromLatLngToContainerPixel(k);h&&(m.x-=this.borderWidths_.left,
m.y-=this.borderWidths_.top,n.x-=this.borderWidths_.left,n.y-=this.borderWidths_.top),this.boxDiv_.style.left=m.x+"px",this.boxDiv_.style.top=n.y+"px",this.boxDiv_.style.width=Math.abs(n.x-m.x)-(this.boxBorderWidths_.left+this.boxBorderWidths_.right)+"px",this.boxDiv_.style.height=Math.abs(n.y-m.y)-(this.boxBorderWidths_.top+this.boxBorderWidths_.bottom)+"px",setTimeout(function(){c.boxDiv_.style.display="none"},1E3)}this.dragging_=!1,this.onMouseMove_(a),google.maps.event.trigger(this,"dragend",
l),this.isHotKeyDown_(a)||this.onKeyUp_(a)}},b.prototype.onKeyUp_=function(a){var b,c,d,e,f,g,h,i,j=null;if(this.map_&&this.hotKeyDown_){for(this.hotKeyDown_=!1,this.dragging_&&(this.boxDiv_.style.display="none",this.dragging_=!1,c=Math.min(this.startPt_.x,this.endPt_.x),d=Math.min(this.startPt_.y,this.endPt_.y),e=Math.abs(this.startPt_.x-this.endPt_.x),f=Math.abs(this.startPt_.y-this.endPt_.y),g=this.prjov_.getProjection(),h=g.fromContainerPixelToLatLng(new google.maps.Point(c,d+f)),i=g.fromContainerPixelToLatLng(new google.maps.Point(c+
e,d)),j=new google.maps.LatLngBounds(h,i)),b=0;b<this.veilDiv_.length;b++)this.veilDiv_[b].style.display="none";this.visualEnabled_&&(this.buttonDiv_.firstChild.style.left=-(2*this.visualSize_.width)+"px",this.buttonDiv_.title=this.visualTips_.off,this.buttonDiv_.style.display=""),google.maps.event.trigger(this,"deactivate",j)}},google.maps.Map.prototype.enableKeyDragZoom=function(a){this.dragZoom_=new b(this,a)},google.maps.Map.prototype.disableKeyDragZoom=function(){var a,b=this.dragZoom_;if(b){for(a=
0;a<b.listeners_.length;++a)google.maps.event.removeListener(b.listeners_[a]);for(this.getDiv().removeChild(b.boxDiv_),a=0;a<b.veilDiv_.length;a++)this.getDiv().removeChild(b.veilDiv_[a]);b.visualEnabled_&&this.controls[b.visualPosition_].removeAt(b.controlIndex_),b.prjov_.setMap(null),this.dragZoom_=null}},google.maps.Map.prototype.keyDragZoomEnabled=function(){return null!==this.dragZoom_},google.maps.Map.prototype.getDragZoomObject=function(){return this.dragZoom_}}(),d.prototype.onAdd=function(){var a,
b,c=this;this.div_=document.createElement("div"),this.div_.className=this.className_,this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){b=a}),google.maps.event.addDomListener(this.div_,"mousedown",function(){a=!0,b=!1}),google.maps.event.addDomListener(this.div_,"click",function(d){if(a=!1,!b){var e,f,g=c.cluster_.getMarkerClusterer();google.maps.event.trigger(g,"click",
c.cluster_),google.maps.event.trigger(g,"clusterclick",c.cluster_),g.getZoomOnClick()&&(f=g.getMaxZoom(),e=c.cluster_.getBounds(),g.getMap().fitBounds(e),setTimeout(function(){g.getMap().fitBounds(e),null!==f&&g.getMap().getZoom()>f&&g.getMap().setZoom(f+1)},100)),d.cancelBubble=!0,d.stopPropagation&&d.stopPropagation()}}),google.maps.event.addDomListener(this.div_,"mouseover",function(){var a=c.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"mouseover",c.cluster_)}),google.maps.event.addDomListener(this.div_,
"mouseout",function(){var a=c.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"mouseout",c.cluster_)})},d.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},d.prototype.draw=function(){if(this.visible_){var a=this.getPosFromLatLng_(this.center_);this.div_.style.top=a.y+"px",this.div_.style.left=
a.x+"px"}},d.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},d.prototype.show=function(){if(this.div_){var a="",b=this.backgroundPosition_.split(" "),c=parseInt(b[0].trim(),10),d=parseInt(b[1].trim(),10),e=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(e),a="\x3cimg src\x3d'"+this.url_+"' style\x3d'position: absolute; top: "+d+"px; left: "+c+"px; ",this.cluster_.getMarkerClusterer().enableRetinaIcons_||(a+="clip: rect("+-1*d+"px, "+
(-1*c+this.width_)+"px, "+(-1*d+this.height_)+"px, "+-1*c+"px);"),a+="'\x3e",this.div_.innerHTML=a+"\x3cdiv style\x3d'position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'\x3e"+this.sums_.text+"\x3c/div\x3e",
"undefined"==typeof this.sums_.title||""===this.sums_.title?this.div_.title=this.cluster_.getMarkerClusterer().getTitle():this.div_.title=this.sums_.title,this.div_.style.display=""}this.visible_=!0},d.prototype.useStyle=function(a){this.sums_=a;var b=Math.max(0,a.index-1);b=Math.min(this.styles_.length-1,b);var c=this.styles_[b];this.url_=c.url,this.height_=c.height,this.width_=c.width,this.anchorText_=c.anchorText||[0,0],this.anchorIcon_=c.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/
2,10)],this.textColor_=c.textColor||"black",this.textSize_=c.textSize||11,this.textDecoration_=c.textDecoration||"none",this.fontWeight_=c.fontWeight||"bold",this.fontStyle_=c.fontStyle||"normal",this.fontFamily_=c.fontFamily||"Arial,sans-serif",this.backgroundPosition_=c.backgroundPosition||"0 0"},d.prototype.setCenter=function(a){this.center_=a},d.prototype.createCss=function(a){var b=[];return b.push("cursor: pointer;"),b.push("position: absolute; top: "+a.y+"px; left: "+a.x+"px;"),b.push("width: "+
this.width_+"px; height: "+this.height_+"px;"),b.join("")},d.prototype.getPosFromLatLng_=function(a){var b=this.getProjection().fromLatLngToDivPixel(a);return b.x-=this.anchorIcon_[1],b.y-=this.anchorIcon_[0],b.x=parseInt(b.x,10),b.y=parseInt(b.y,10),b},e.prototype.getSize=function(){return this.markers_.length},e.prototype.getMarkers=function(){return this.markers_},e.prototype.getCenter=function(){return this.center_},e.prototype.getMap=function(){return this.map_},e.prototype.getMarkerClusterer=
function(){return this.markerClusterer_},e.prototype.getBounds=function(){var a,b=new google.maps.LatLngBounds(this.center_,this.center_),c=this.getMarkers();for(a=0;a<c.length;a++)b.extend(c[a].getPosition());return b},e.prototype.remove=function(){this.clusterIcon_.setMap(null),this.markers_=[],delete this.markers_},e.prototype.addMarker=function(a){var b,c,d;if(this.isMarkerAlreadyAdded_(a))return!1;if(this.center_){if(this.averageCenter_){var e=this.markers_.length+1,f=(this.center_.lat()*(e-
1)+a.getPosition().lat())/e,g=(this.center_.lng()*(e-1)+a.getPosition().lng())/e;this.center_=new google.maps.LatLng(f,g),this.calculateBounds_()}}else this.center_=a.getPosition(),this.calculateBounds_();if(a.isAdded=!0,this.markers_.push(a),c=this.markers_.length,d=this.markerClusterer_.getMaxZoom(),null!==d&&this.map_.getZoom()>d)a.getMap()!==this.map_&&a.setMap(this.map_);else if(c<this.minClusterSize_)a.getMap()!==this.map_&&a.setMap(this.map_);else if(c===this.minClusterSize_)for(b=0;c>b;b++)this.markers_[b].setMap(null);
else a.setMap(null);return this.updateIcon_(),!0},e.prototype.isMarkerInClusterBounds=function(a){return this.bounds_.contains(a.getPosition())},e.prototype.calculateBounds_=function(){var a=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(a)},e.prototype.updateIcon_=function(){var a=this.markers_.length,b=this.markerClusterer_.getMaxZoom();if(null!==b&&this.map_.getZoom()>b)return void this.clusterIcon_.hide();if(a<this.minClusterSize_)return void this.clusterIcon_.hide();
var c=this.markerClusterer_.getStyles().length,d=this.markerClusterer_.getCalculator()(this.markers_,c);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.useStyle(d),this.clusterIcon_.show()},e.prototype.isMarkerAlreadyAdded_=function(a){var b;if(this.markers_.indexOf)return-1!==this.markers_.indexOf(a);for(b=0;b<this.markers_.length;b++)if(a===this.markers_[b])return!0;return!1},f.prototype.onAdd=function(){var a=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.listeners_=
[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){a.resetViewport_(!1),(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")}),google.maps.event.addListener(this.getMap(),"idle",function(){a.redraw_()})]},f.prototype.onRemove=function(){var a;for(a=0;a<this.markers_.length;a++)this.markers_[a].getMap()!==this.activeMap_&&this.markers_[a].setMap(this.activeMap_);for(a=0;a<this.clusters_.length;a++)this.clusters_[a].remove();
for(this.clusters_=[],a=0;a<this.listeners_.length;a++)google.maps.event.removeListener(this.listeners_[a]);this.listeners_=[],this.activeMap_=null,this.ready_=!1},f.prototype.draw=function(){},f.prototype.setupStyles_=function(){var a,b;if(!(this.styles_.length>0))for(a=0;a<this.imageSizes_.length;a++)b=this.imageSizes_[a],this.styles_.push({url:this.imagePath_+(a+1)+"."+this.imageExtension_,height:b,width:b})},f.prototype.fitMapToMarkers=function(){var a,b=this.getMarkers(),c=new google.maps.LatLngBounds;
for(a=0;a<b.length;a++)c.extend(b[a].getPosition());this.getMap().fitBounds(c)},f.prototype.getGridSize=function(){return this.gridSize_},f.prototype.setGridSize=function(a){this.gridSize_=a},f.prototype.getMinimumClusterSize=function(){return this.minClusterSize_},f.prototype.setMinimumClusterSize=function(a){this.minClusterSize_=a},f.prototype.getMaxZoom=function(){return this.maxZoom_},f.prototype.setMaxZoom=function(a){this.maxZoom_=a},f.prototype.getStyles=function(){return this.styles_},f.prototype.setStyles=
function(a){this.styles_=a},f.prototype.getTitle=function(){return this.title_},f.prototype.setTitle=function(a){this.title_=a},f.prototype.getZoomOnClick=function(){return this.zoomOnClick_},f.prototype.setZoomOnClick=function(a){this.zoomOnClick_=a},f.prototype.getAverageCenter=function(){return this.averageCenter_},f.prototype.setAverageCenter=function(a){this.averageCenter_=a},f.prototype.getIgnoreHidden=function(){return this.ignoreHidden_},f.prototype.setIgnoreHidden=function(a){this.ignoreHidden_=
a},f.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_},f.prototype.setEnableRetinaIcons=function(a){this.enableRetinaIcons_=a},f.prototype.getImageExtension=function(){return this.imageExtension_},f.prototype.setImageExtension=function(a){this.imageExtension_=a},f.prototype.getImagePath=function(){return this.imagePath_},f.prototype.setImagePath=function(a){this.imagePath_=a},f.prototype.getImageSizes=function(){return this.imageSizes_},f.prototype.setImageSizes=function(a){this.imageSizes_=
a},f.prototype.getCalculator=function(){return this.calculator_},f.prototype.setCalculator=function(a){this.calculator_=a},f.prototype.getBatchSizeIE=function(){return this.batchSizeIE_},f.prototype.setBatchSizeIE=function(a){this.batchSizeIE_=a},f.prototype.getClusterClass=function(){return this.clusterClass_},f.prototype.setClusterClass=function(a){this.clusterClass_=a},f.prototype.getMarkers=function(){return this.markers_},f.prototype.getTotalMarkers=function(){return this.markers_.length},f.prototype.getClusters=
function(){return this.clusters_},f.prototype.getTotalClusters=function(){return this.clusters_.length},f.prototype.addMarker=function(a,b){this.pushMarkerTo_(a),b||this.redraw_()},f.prototype.addMarkers=function(a,b){var c;for(c in a)a.hasOwnProperty(c)&&this.pushMarkerTo_(a[c]);b||this.redraw_()},f.prototype.pushMarkerTo_=function(a){if(a.getDraggable()){var b=this;google.maps.event.addListener(a,"dragend",function(){b.ready_&&(this.isAdded=!1,b.repaint())})}a.isAdded=!1,this.markers_.push(a)},
f.prototype.removeMarker=function(a,b){var c=this.removeMarker_(a);return!b&&c&&this.repaint(),c},f.prototype.removeMarkers=function(a,b){var c,d,e=!1;for(c=0;c<a.length;c++)d=this.removeMarker_(a[c]),e=e||d;return!b&&e&&this.repaint(),e},f.prototype.removeMarker_=function(a){var b,c=-1;if(this.markers_.indexOf)c=this.markers_.indexOf(a);else for(b=0;b<this.markers_.length;b++)if(a===this.markers_[b]){c=b;break}return-1===c?!1:(a.setMap(null),this.markers_.splice(c,1),!0)},f.prototype.clearMarkers=
function(){this.resetViewport_(!0),this.markers_=[]},f.prototype.repaint=function(){var a=this.clusters_.slice();this.clusters_=[],this.resetViewport_(!1),this.redraw_(),setTimeout(function(){var b;for(b=0;b<a.length;b++)a[b].remove()},0)},f.prototype.getExtendedBounds=function(a){var b=this.getProjection(),c=new google.maps.LatLng(a.getNorthEast().lat(),a.getNorthEast().lng()),d=new google.maps.LatLng(a.getSouthWest().lat(),a.getSouthWest().lng()),e=b.fromLatLngToDivPixel(c);e.x+=this.gridSize_,
e.y-=this.gridSize_;var f=b.fromLatLngToDivPixel(d);f.x-=this.gridSize_,f.y+=this.gridSize_;var g=b.fromDivPixelToLatLng(e),h=b.fromDivPixelToLatLng(f);return a.extend(g),a.extend(h),a},f.prototype.redraw_=function(){this.createClusters_(0)},f.prototype.resetViewport_=function(a){var b,c;for(b=0;b<this.clusters_.length;b++)this.clusters_[b].remove();for(this.clusters_=[],b=0;b<this.markers_.length;b++)c=this.markers_[b],c.isAdded=!1,a&&c.setMap(null)},f.prototype.distanceBetweenPoints_=function(a,
b){var c=6371,d=(b.lat()-a.lat())*Math.PI/180,e=(b.lng()-a.lng())*Math.PI/180,f=Math.sin(d/2)*Math.sin(d/2)+Math.cos(a.lat()*Math.PI/180)*Math.cos(b.lat()*Math.PI/180)*Math.sin(e/2)*Math.sin(e/2),g=2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),h=c*g;return h},f.prototype.isMarkerInBounds_=function(a,b){return b.contains(a.getPosition())},f.prototype.addToClosestCluster_=function(a){var b,c,d,f,g=4E4,h=null;for(b=0;b<this.clusters_.length;b++)d=this.clusters_[b],f=d.getCenter(),f&&(c=this.distanceBetweenPoints_(f,
a.getPosition()),g>c&&(g=c,h=d));h&&h.isMarkerInClusterBounds(a)?h.addMarker(a):(d=new e(this),d.addMarker(a),this.clusters_.push(d))},f.prototype.createClusters_=function(a){var b,c,d,e=this;if(this.ready_){0===a&&(google.maps.event.trigger(this,"clusteringbegin",this),"undefined"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),d=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):
new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var f=this.getExtendedBounds(d),g=Math.min(a+this.batchSize_,this.markers_.length);for(b=a;g>b;b++)c=this.markers_[b],!c.isAdded&&this.isMarkerInBounds_(c,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&c.getVisible())&&this.addToClosestCluster_(c);g<this.markers_.length?this.timerRefStatic=setTimeout(function(){e.createClusters_(g)},0):(delete this.timerRefStatic,
google.maps.event.trigger(this,"clusteringend",this))}},f.prototype.extend=function(a,b){return function(a){var b;for(b in a.prototype)this.prototype[b]=a.prototype[b];return this}.apply(a,[b])},f.CALCULATOR=function(a,b){for(var c=0,d="",e=a.length.toString(),f=e;0!==f;)f=parseInt(f/10,10),c++;return c=Math.min(c,b),{text:e,index:c,title:d}},f.BATCH_SIZE=2E3,f.BATCH_SIZE_IE=500,f.IMAGE_PATH="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m",f.IMAGE_EXTENSION=
"png",f.IMAGE_SIZES=[53,56,66,78,90],g(h,google.maps.OverlayView),h.getSharedCross=function(a){var b;return"undefined"==typeof h.getSharedCross.crossDiv&&(b=document.createElement("img"),b.style.cssText="position: absolute; z-index: 1000002; display: none;",b.style.marginLeft="-8px",b.style.marginTop="-9px",b.src=a,h.getSharedCross.crossDiv=b),h.getSharedCross.crossDiv},h.prototype.onAdd=function(){var a,b,c,d,e,f,g,i=this,j=!1,k=!1,l=20,m="url("+this.handCursorURL_+")",n=function(a){a.preventDefault&&
a.preventDefault(),a.cancelBubble=!0,a.stopPropagation&&a.stopPropagation()},o=function(){i.marker_.setAnimation(null)};this.getPanes().overlayImage.appendChild(this.labelDiv_),this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_),"undefined"==typeof h.getSharedCross.processed&&(this.getPanes().overlayImage.appendChild(this.crossDiv_),h.getSharedCross.processed=!0),this.listeners_=[google.maps.event.addDomListener(this.eventDiv_,"mouseover",function(a){(i.marker_.getDraggable()||i.marker_.getClickable())&&
(this.style.cursor="pointer",google.maps.event.trigger(i.marker_,"mouseover",a))}),google.maps.event.addDomListener(this.eventDiv_,"mouseout",function(a){!i.marker_.getDraggable()&&!i.marker_.getClickable()||k||(this.style.cursor=i.marker_.getCursor(),google.maps.event.trigger(i.marker_,"mouseout",a))}),google.maps.event.addDomListener(this.eventDiv_,"mousedown",function(a){k=!1,i.marker_.getDraggable()&&(j=!0,this.style.cursor=m),(i.marker_.getDraggable()||i.marker_.getClickable())&&(google.maps.event.trigger(i.marker_,
"mousedown",a),n(a))}),google.maps.event.addDomListener(document,"mouseup",function(b){var c;if(j&&(j=!1,i.eventDiv_.style.cursor="pointer",google.maps.event.trigger(i.marker_,"mouseup",b)),k){if(e){c=i.getProjection().fromLatLngToDivPixel(i.marker_.getPosition()),c.y+=l,i.marker_.setPosition(i.getProjection().fromDivPixelToLatLng(c));try{i.marker_.setAnimation(google.maps.Animation.BOUNCE),setTimeout(o,1406)}catch(f){}}i.crossDiv_.style.display="none",i.marker_.setZIndex(a),d=!0,k=!1,b.latLng=i.marker_.getPosition(),
google.maps.event.trigger(i.marker_,"dragend",b)}}),google.maps.event.addListener(i.marker_.getMap(),"mousemove",function(d){var h;j&&(k?(d.latLng=new google.maps.LatLng(d.latLng.lat()-b,d.latLng.lng()-c),h=i.getProjection().fromLatLngToDivPixel(d.latLng),e&&(i.crossDiv_.style.left=h.x+"px",i.crossDiv_.style.top=h.y+"px",i.crossDiv_.style.display="",h.y-=l),i.marker_.setPosition(i.getProjection().fromDivPixelToLatLng(h)),e&&(i.eventDiv_.style.top=h.y+l+"px"),google.maps.event.trigger(i.marker_,"drag",
d)):(b=d.latLng.lat()-i.marker_.getPosition().lat(),c=d.latLng.lng()-i.marker_.getPosition().lng(),a=i.marker_.getZIndex(),f=i.marker_.getPosition(),g=i.marker_.getMap().getCenter(),e=i.marker_.get("raiseOnDrag"),k=!0,i.marker_.setZIndex(1E6),d.latLng=i.marker_.getPosition(),google.maps.event.trigger(i.marker_,"dragstart",d)))}),google.maps.event.addDomListener(document,"keydown",function(a){k&&27===a.keyCode&&(e=!1,i.marker_.setPosition(f),i.marker_.getMap().setCenter(g),google.maps.event.trigger(document,
"mouseup",a))}),google.maps.event.addDomListener(this.eventDiv_,"click",function(a){(i.marker_.getDraggable()||i.marker_.getClickable())&&(d?d=!1:(google.maps.event.trigger(i.marker_,"click",a),n(a)))}),google.maps.event.addDomListener(this.eventDiv_,"dblclick",function(a){(i.marker_.getDraggable()||i.marker_.getClickable())&&(google.maps.event.trigger(i.marker_,"dblclick",a),n(a))}),google.maps.event.addListener(this.marker_,"dragstart",function(a){k||(e=this.get("raiseOnDrag"))}),google.maps.event.addListener(this.marker_,
"drag",function(a){k||e&&(i.setPosition(l),i.labelDiv_.style.zIndex=1E6+(this.get("labelInBackground")?-1:1))}),google.maps.event.addListener(this.marker_,"dragend",function(a){k||e&&i.setPosition(0)}),google.maps.event.addListener(this.marker_,"position_changed",function(){i.setPosition()}),google.maps.event.addListener(this.marker_,"zindex_changed",function(){i.setZIndex()}),google.maps.event.addListener(this.marker_,"visible_changed",function(){i.setVisible()}),google.maps.event.addListener(this.marker_,
"labelvisible_changed",function(){i.setVisible()}),google.maps.event.addListener(this.marker_,"title_changed",function(){i.setTitle()}),google.maps.event.addListener(this.marker_,"labelcontent_changed",function(){i.setContent()}),google.maps.event.addListener(this.marker_,"labelanchor_changed",function(){i.setAnchor()}),google.maps.event.addListener(this.marker_,"labelclass_changed",function(){i.setStyles()}),google.maps.event.addListener(this.marker_,"labelstyle_changed",function(){i.setStyles()})]},
h.prototype.onRemove=function(){var a;for(this.labelDiv_.parentNode.removeChild(this.labelDiv_),this.eventDiv_.parentNode.removeChild(this.eventDiv_),a=0;a<this.listeners_.length;a++)google.maps.event.removeListener(this.listeners_[a])},h.prototype.draw=function(){this.setContent(),this.setTitle(),this.setStyles()},h.prototype.setContent=function(){var a=this.marker_.get("labelContent");"undefined"==typeof a.nodeType?(this.labelDiv_.innerHTML=a,this.eventDiv_.innerHTML=this.labelDiv_.innerHTML):(this.labelDiv_.innerHTML=
"",this.labelDiv_.appendChild(a),a=a.cloneNode(!0),this.eventDiv_.innerHTML="",this.eventDiv_.appendChild(a))},h.prototype.setTitle=function(){this.eventDiv_.title=this.marker_.getTitle()||""},h.prototype.setStyles=function(){var a,b;this.labelDiv_.className=this.marker_.get("labelClass"),this.eventDiv_.className=this.labelDiv_.className,this.labelDiv_.style.cssText="",this.eventDiv_.style.cssText="",b=this.marker_.get("labelStyle");for(a in b)b.hasOwnProperty(a)&&(this.labelDiv_.style[a]=b[a],this.eventDiv_.style[a]=
b[a]);this.setMandatoryStyles()},h.prototype.setMandatoryStyles=function(){this.labelDiv_.style.position="absolute",this.labelDiv_.style.overflow="hidden","undefined"!=typeof this.labelDiv_.style.opacity&&""!==this.labelDiv_.style.opacity&&(this.labelDiv_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d'+100*this.labelDiv_.style.opacity+')"',this.labelDiv_.style.filter="alpha(opacity\x3d"+100*this.labelDiv_.style.opacity+")"),this.eventDiv_.style.position=this.labelDiv_.style.position,
this.eventDiv_.style.overflow=this.labelDiv_.style.overflow,this.eventDiv_.style.opacity=.01,this.eventDiv_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d1)"',this.eventDiv_.style.filter="alpha(opacity\x3d1)",this.setAnchor(),this.setPosition(),this.setVisible()},h.prototype.setAnchor=function(){var a=this.marker_.get("labelAnchor");this.labelDiv_.style.marginLeft=-a.x+"px",this.labelDiv_.style.marginTop=-a.y+"px",this.eventDiv_.style.marginLeft=-a.x+"px",this.eventDiv_.style.marginTop=
-a.y+"px"},h.prototype.setPosition=function(a){var b=this.getProjection().fromLatLngToDivPixel(this.marker_.getPosition());"undefined"==typeof a&&(a=0),this.labelDiv_.style.left=Math.round(b.x)+"px",this.labelDiv_.style.top=Math.round(b.y-a)+"px",this.eventDiv_.style.left=this.labelDiv_.style.left,this.eventDiv_.style.top=this.labelDiv_.style.top,this.setZIndex()},h.prototype.setZIndex=function(){var a=this.marker_.get("labelInBackground")?-1:1;"undefined"==typeof this.marker_.getZIndex()?(this.labelDiv_.style.zIndex=
parseInt(this.labelDiv_.style.top,10)+a,this.eventDiv_.style.zIndex=this.labelDiv_.style.zIndex):(this.labelDiv_.style.zIndex=this.marker_.getZIndex()+a,this.eventDiv_.style.zIndex=this.labelDiv_.style.zIndex)},h.prototype.setVisible=function(){this.marker_.get("labelVisible")?this.labelDiv_.style.display=this.marker_.getVisible()?"block":"none":this.labelDiv_.style.display="none",this.eventDiv_.style.display=this.labelDiv_.style.display},g(i,google.maps.Marker),i.prototype.setMap=function(a){google.maps.Marker.prototype.setMap.apply(this,
arguments),this.label.setMap(a)},j.prototype=new google.maps.OverlayView,a.RichMarker=j,j.prototype.getVisible=function(){return this.get("visible")},j.prototype.getVisible=j.prototype.getVisible,j.prototype.setVisible=function(a){this.set("visible",a)},j.prototype.setVisible=j.prototype.setVisible,j.prototype.visible_changed=function(){this.ready_&&(this.markerWrapper_.style.display=this.getVisible()?"":"none",this.draw())},j.prototype.visible_changed=j.prototype.visible_changed,j.prototype.setFlat=
function(a){this.set("flat",!!a)},j.prototype.setFlat=j.prototype.setFlat,j.prototype.getFlat=function(){return this.get("flat")},j.prototype.getFlat=j.prototype.getFlat,j.prototype.getWidth=function(){return this.get("width")},j.prototype.getWidth=j.prototype.getWidth,j.prototype.getHeight=function(){return this.get("height")},j.prototype.getHeight=j.prototype.getHeight,j.prototype.setShadow=function(a){this.set("shadow",a),this.flat_changed()},j.prototype.setShadow=j.prototype.setShadow,j.prototype.getShadow=
function(){return this.get("shadow")},j.prototype.getShadow=j.prototype.getShadow,j.prototype.flat_changed=function(){this.ready_&&(this.markerWrapper_.style.boxShadow=this.markerWrapper_.style.webkitBoxShadow=this.markerWrapper_.style.MozBoxShadow=this.getFlat()?"":this.getShadow())},j.prototype.flat_changed=j.prototype.flat_changed,j.prototype.setZIndex=function(a){this.set("zIndex",a)},j.prototype.setZIndex=j.prototype.setZIndex,j.prototype.getZIndex=function(){return this.get("zIndex")},j.prototype.getZIndex=
j.prototype.getZIndex,j.prototype.zIndex_changed=function(){this.getZIndex()&&this.ready_&&(this.markerWrapper_.style.zIndex=this.getZIndex())},j.prototype.zIndex_changed=j.prototype.zIndex_changed,j.prototype.getDraggable=function(){return this.get("draggable")},j.prototype.getDraggable=j.prototype.getDraggable,j.prototype.setDraggable=function(a){this.set("draggable",!!a)},j.prototype.setDraggable=j.prototype.setDraggable,j.prototype.draggable_changed=function(){this.ready_&&(this.getDraggable()?
this.addDragging_(this.markerWrapper_):this.removeDragListeners_())},j.prototype.draggable_changed=j.prototype.draggable_changed,j.prototype.getPosition=function(){return this.get("position")},j.prototype.getPosition=j.prototype.getPosition,j.prototype.setPosition=function(a){this.set("position",a)},j.prototype.setPosition=j.prototype.setPosition,j.prototype.position_changed=function(){this.draw()},j.prototype.position_changed=j.prototype.position_changed,j.prototype.getAnchor=function(){return this.get("anchor")},
j.prototype.getAnchor=j.prototype.getAnchor,j.prototype.setAnchor=function(a){this.set("anchor",a)},j.prototype.setAnchor=j.prototype.setAnchor,j.prototype.anchor_changed=function(){this.draw()},j.prototype.anchor_changed=j.prototype.anchor_changed,j.prototype.htmlToDocumentFragment_=function(a){var b=document.createElement("DIV");if(b.innerHTML=a,1==b.childNodes.length)return b.removeChild(b.firstChild);for(var c=document.createDocumentFragment();b.firstChild;)c.appendChild(b.firstChild);return c},
j.prototype.removeChildren_=function(a){if(a)for(var b;b=a.firstChild;)a.removeChild(b)},j.prototype.setContent=function(a){this.set("content",a)},j.prototype.setContent=j.prototype.setContent,j.prototype.getContent=function(){return this.get("content")},j.prototype.getContent=j.prototype.getContent,j.prototype.content_changed=function(){if(this.markerContent_){this.removeChildren_(this.markerContent_);var a=this.getContent();if(a){"string"==typeof a&&(a=a.replace(/^\s*([\S\s]*)\b\s*$/,"$1"),a=this.htmlToDocumentFragment_(a)),
this.markerContent_.appendChild(a);for(var b,c=this,d=this.markerContent_.getElementsByTagName("IMG"),e=0;b=d[e];e++)google.maps.event.addDomListener(b,"mousedown",function(a){c.getDraggable()&&(a.preventDefault&&a.preventDefault(),a.returnValue=!1)}),google.maps.event.addDomListener(b,"load",function(){c.draw()});google.maps.event.trigger(this,"domready")}this.ready_&&this.draw()}},j.prototype.content_changed=j.prototype.content_changed,j.prototype.setCursor_=function(a){if(this.ready_){var b="";
-1!==navigator.userAgent.indexOf("Gecko/")?("dragging"==a&&(b="-moz-grabbing"),"dragready"==a&&(b="-moz-grab"),"draggable"==a&&(b="pointer")):(("dragging"==a||"dragready"==a)&&(b="move"),"draggable"==a&&(b="pointer")),this.markerWrapper_.style.cursor!=b&&(this.markerWrapper_.style.cursor=b)}},j.prototype.startDrag=function(a){if(this.getDraggable()&&!this.dragging_){this.dragging_=!0;var b=this.getMap();this.mapDraggable_=b.get("draggable"),b.set("draggable",!1),this.mouseX_=a.clientX,this.mouseY_=
a.clientY,this.setCursor_("dragready"),this.markerWrapper_.style.MozUserSelect="none",this.markerWrapper_.style.KhtmlUserSelect="none",this.markerWrapper_.style.WebkitUserSelect="none",this.markerWrapper_.unselectable="on",this.markerWrapper_.onselectstart=function(){return!1},this.addDraggingListeners_(),google.maps.event.trigger(this,"dragstart")}},j.prototype.stopDrag=function(){this.getDraggable()&&this.dragging_&&(this.dragging_=!1,this.getMap().set("draggable",this.mapDraggable_),this.mouseX_=
this.mouseY_=this.mapDraggable_=null,this.markerWrapper_.style.MozUserSelect="",this.markerWrapper_.style.KhtmlUserSelect="",this.markerWrapper_.style.WebkitUserSelect="",this.markerWrapper_.unselectable="off",this.markerWrapper_.onselectstart=function(){},this.removeDraggingListeners_(),this.setCursor_("draggable"),google.maps.event.trigger(this,"dragend"),this.draw())},j.prototype.drag=function(a){if(!this.getDraggable()||!this.dragging_)return void this.stopDrag();var b=this.mouseX_-a.clientX,
c=this.mouseY_-a.clientY;this.mouseX_=a.clientX,this.mouseY_=a.clientY;var d=parseInt(this.markerWrapper_.style.left,10)-b,e=parseInt(this.markerWrapper_.style.top,10)-c;this.markerWrapper_.style.left=d+"px",this.markerWrapper_.style.top=e+"px";var f=this.getOffset_(),g=new google.maps.Point(d-f.width,e-f.height),h=this.getProjection();this.setPosition(h.fromDivPixelToLatLng(g)),this.setCursor_("dragging"),google.maps.event.trigger(this,"drag")},j.prototype.removeDragListeners_=function(){this.draggableListener_&&
(google.maps.event.removeListener(this.draggableListener_),delete this.draggableListener_),this.setCursor_("")},j.prototype.addDragging_=function(a){if(a){var b=this;this.draggableListener_=google.maps.event.addDomListener(a,"mousedown",function(a){b.startDrag(a)}),this.setCursor_("draggable")}},j.prototype.addDraggingListeners_=function(){var b=this;this.markerWrapper_.setCapture?(this.markerWrapper_.setCapture(!0),this.draggingListeners_=[google.maps.event.addDomListener(this.markerWrapper_,"mousemove",
function(a){b.drag(a)},!0),google.maps.event.addDomListener(this.markerWrapper_,"mouseup",function(){b.stopDrag(),b.markerWrapper_.releaseCapture()},!0)]):this.draggingListeners_=[google.maps.event.addDomListener(a,"mousemove",function(a){b.drag(a)},!0),google.maps.event.addDomListener(a,"mouseup",function(){b.stopDrag()},!0)]},j.prototype.removeDraggingListeners_=function(){if(this.draggingListeners_){for(var a,b=0;a=this.draggingListeners_[b];b++)google.maps.event.removeListener(a);this.draggingListeners_.length=
0}},j.prototype.getOffset_=function(){var a=this.getAnchor();if("object"==typeof a)return a;var b=new google.maps.Size(0,0);if(!this.markerContent_)return b;var c=this.markerContent_.offsetWidth,d=this.markerContent_.offsetHeight;switch(a){case k.TOP_LEFT:break;case k.TOP:b.width=-c/2;break;case k.TOP_RIGHT:b.width=-c;break;case k.LEFT:b.height=-d/2;break;case k.MIDDLE:b.width=-c/2,b.height=-d/2;break;case k.RIGHT:b.width=-c,b.height=-d/2;break;case k.BOTTOM_LEFT:b.height=-d;break;case k.BOTTOM:b.width=
-c/2,b.height=-d;break;case k.BOTTOM_RIGHT:b.width=-c,b.height=-d}return b},j.prototype.onAdd=function(){if(this.markerWrapper_||(this.markerWrapper_=document.createElement("DIV"),this.markerWrapper_.style.position="absolute"),this.getZIndex()&&(this.markerWrapper_.style.zIndex=this.getZIndex()),this.markerWrapper_.style.display=this.getVisible()?"":"none",!this.markerContent_){this.markerContent_=document.createElement("DIV"),this.markerWrapper_.appendChild(this.markerContent_);var a=this;google.maps.event.addDomListener(this.markerContent_,
"click",function(b){google.maps.event.trigger(a,"click")}),google.maps.event.addDomListener(this.markerContent_,"mouseover",function(b){google.maps.event.trigger(a,"mouseover")}),google.maps.event.addDomListener(this.markerContent_,"mouseout",function(b){google.maps.event.trigger(a,"mouseout")})}this.ready_=!0,this.content_changed(),this.flat_changed(),this.draggable_changed();var b=this.getPanes();b&&b.overlayMouseTarget.appendChild(this.markerWrapper_),google.maps.event.trigger(this,"ready")},j.prototype.onAdd=
j.prototype.onAdd,j.prototype.draw=function(){if(this.ready_&&!this.dragging_){var a=this.getProjection();if(a){var b=this.get("position"),c=a.fromLatLngToDivPixel(b),d=this.getOffset_();this.markerWrapper_.style.top=c.y+d.height+"px",this.markerWrapper_.style.left=c.x+d.width+"px";var e=this.markerContent_.offsetHeight,f=this.markerContent_.offsetWidth;f!=this.get("width")&&this.set("width",f),e!=this.get("height")&&this.set("height",e)}}},j.prototype.draw=j.prototype.draw,j.prototype.onRemove=function(){this.markerWrapper_&&
this.markerWrapper_.parentNode&&this.markerWrapper_.parentNode.removeChild(this.markerWrapper_),this.removeDragListeners_()},j.prototype.onRemove=j.prototype.onRemove;var k={TOP_LEFT:1,TOP:2,TOP_RIGHT:3,LEFT:4,MIDDLE:5,RIGHT:6,BOTTOM_LEFT:7,BOTTOM:8,BOTTOM_RIGHT:9};a.RichMarkerPosition=k,a.InfoBox=b,a.Cluster=e,a.ClusterIcon=d,a.MarkerClusterer=f,a.MarkerLabel_=h,a.MarkerWithLabel=i,a.RichMarker=j}()})}}),function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};
return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,c,d){b.module("uiGmapgoogle-maps.wrapped").service("uiGmapDataStructures",function(){return{Graph:d(1).Graph,Queue:d(1).Queue}})},function(a,b,c){(function(){a.exports={Graph:c(2),Heap:c(3),LinkedList:c(4),Map:c(5),Queue:c(6),RedBlackTree:c(7),Trie:c(8)}}).call(this)},function(a,b){(function(){var b,c={}.hasOwnProperty;b=function(){function a(){this._nodes={},this.nodeSize=0,this.edgeSize=
0}return a.prototype.addNode=function(a){return this._nodes[a]?void 0:(this.nodeSize++,this._nodes[a]={_outEdges:{},_inEdges:{}})},a.prototype.getNode=function(a){return this._nodes[a]},a.prototype.removeNode=function(a){var b,d,e,f,g;if(d=this._nodes[a]){f=d._outEdges;for(e in f)c.call(f,e)&&this.removeEdge(a,e);g=d._inEdges;for(b in g)c.call(g,b)&&this.removeEdge(b,a);return this.nodeSize--,delete this._nodes[a],d}},a.prototype.addEdge=function(a,b,c){var d,e,f;return null==c&&(c=1),!this.getEdge(a,
b)&&(e=this._nodes[a],f=this._nodes[b],e&&f)?(d={weight:c},e._outEdges[b]=d,f._inEdges[a]=d,this.edgeSize++,d):void 0},a.prototype.getEdge=function(a,b){var c,d;return c=this._nodes[a],d=this._nodes[b],c&&d?c._outEdges[b]:void 0},a.prototype.removeEdge=function(a,b){var c,d,e;return d=this._nodes[a],e=this._nodes[b],(c=this.getEdge(a,b))?(delete d._outEdges[b],delete e._inEdges[a],this.edgeSize--,c):void 0},a.prototype.getInEdgesOf=function(a){var b,d,e,f;e=this._nodes[a],d=[],f=null!=e?e._inEdges:
void 0;for(b in f)c.call(f,b)&&d.push(this.getEdge(b,a));return d},a.prototype.getOutEdgesOf=function(a){var b,d,e,f;b=this._nodes[a],d=[],f=null!=b?b._outEdges:void 0;for(e in f)c.call(f,e)&&d.push(this.getEdge(a,e));return d},a.prototype.getAllEdgesOf=function(a){var b,c,d,e,f,g,h;if(c=this.getInEdgesOf(a),d=this.getOutEdgesOf(a),0===c.length)return d;for(e=this.getEdge(a,a),b=f=0,g=c.length;g>=0?g>f:f>g;b=g>=0?++f:--f)if(c[b]===e){h=[c[c.length-1],c[b]],c[b]=h[0],c[c.length-1]=h[1],c.pop();break}return c.concat(d)},
a.prototype.forEachNode=function(a){var b,d,e;e=this._nodes;for(b in e)c.call(e,b)&&(d=e[b],a(d,b))},a.prototype.forEachEdge=function(a){var b,d,e,f,g,h;g=this._nodes;for(d in g)if(c.call(g,d)){e=g[d],h=e._outEdges;for(f in h)c.call(h,f)&&(b=h[f],a(b))}},a}(),a.exports=b}).call(this)},function(a,b){(function(){var b,c,d,e;b=function(){function a(a){var b,c,d,e,f,g;for(null==a&&(a=[]),this._data=[void 0],d=0,f=a.length;f>d;d++)c=a[d],null!=c&&this._data.push(c);if(this._data.length>1)for(b=e=2,g=this._data.length;g>=
2?g>e:e>g;b=g>=2?++e:--e)this._upHeap(b);this.size=this._data.length-1}return a.prototype.add=function(a){return null!=a?(this._data.push(a),this._upHeap(this._data.length-1),this.size++,a):void 0},a.prototype.removeMin=function(){var a;if(1!==this._data.length)return this.size--,2===this._data.length?this._data.pop():(a=this._data[1],this._data[1]=this._data.pop(),this._downHeap(),a)},a.prototype.peekMin=function(){return this._data[1]},a.prototype._upHeap=function(a){var b,c;for(b=this._data[a];this._data[a]<
this._data[d(a)]&&a>1;)c=[this._data[d(a)],this._data[a]],this._data[a]=c[0],this._data[d(a)]=c[1],a=d(a)},a.prototype._downHeap=function(){var a,b,d;for(a=1;c(a<this._data.length)&&(b=c(a),b<this._data.length-1&&this._data[e(a)]<this._data[b]&&(b=e(a)),this._data[b]<this._data[a]);)d=[this._data[a],this._data[b]],this._data[b]=d[0],this._data[a]=d[1],a=b},a}(),d=function(a){return a>>1},c=function(a){return a<<1},e=function(a){return(a<<1)+1},a.exports=b}).call(this)},function(a,b){(function(){var b;
b=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this.head={prev:void 0,value:void 0,next:void 0},this.tail={prev:void 0,value:void 0,next:void 0},this.size=0,c=0,d=a.length;d>c;c++)b=a[c],this.add(b)}return a.prototype.at=function(a){var b,c,d,e,f;if(-this.size<=a&&a<this.size){if(a=this._adjust(a),2*a<this.size)for(b=this.head,c=d=1;a>=d;c=d+=1)b=b.next;else for(b=this.tail,c=e=1,f=this.size-a-1;f>=e;c=e+=1)b=b.prev;return b}},a.prototype.add=function(a,b){var c,d,e,f,g;return null==b&&
(b=this.size),-this.size<=b&&b<=this.size?(d={value:a},b=this._adjust(b),0===this.size?this.head=d:0===b?(e=[d,this.head,d],this.head.prev=e[0],d.next=e[1],this.head=e[2]):(c=this.at(b-1),f=[c.next,d,d,c],d.next=f[0],null!=(g=c.next)?g.prev=f[1]:void 0,c.next=f[2],d.prev=f[3]),b===this.size&&(this.tail=d),this.size++,a):void 0},a.prototype.removeAt=function(a){var b,c,d;return null==a&&(a=this.size-1),-this.size<=a&&a<this.size&&0!==this.size?(a=this._adjust(a),1===this.size?(c=this.head.value,this.head.value=
this.tail.value=void 0):0===a?(c=this.head.value,this.head=this.head.next,this.head.prev=void 0):(b=this.at(a),c=b.value,b.prev.next=b.next,null!=(d=b.next)&&(d.prev=b.prev),a===this.size-1&&(this.tail=b.prev)),this.size--,c):void 0},a.prototype.remove=function(a){var b;if(null!=a){for(b=this.head;b&&b.value!==a;)b=b.next;if(b)return 1===this.size?this.head.value=this.tail.value=void 0:b===this.head?(this.head=this.head.next,this.head.prev=void 0):b===this.tail?(this.tail=this.tail.prev,this.tail.next=
void 0):(b.prev.next=b.next,b.next.prev=b.prev),this.size--,a}},a.prototype.indexOf=function(a,b){var c,d;if(null==b&&(b=0),null==this.head.value&&!this.head.next||b>=this.size)return-1;for(b=Math.max(0,this._adjust(b)),c=this.at(b),d=b;c&&c.value!==a;)c=c.next,d++;return d===this.size?-1:d},a.prototype._adjust=function(a){return 0>a?this.size+a:a},a}(),a.exports=b}).call(this)},function(a,b){(function(){var b,c,d,e,f={}.hasOwnProperty;c="_mapId_",b=function(){function a(b){var c,d;this._content=
{},this._itemId=0,this._id=a._newMapId(),this.size=0;for(c in b)f.call(b,c)&&(d=b[c],this.set(c,d))}return a._mapIdTracker=0,a._newMapId=function(){return this._mapIdTracker++},a.prototype.hash=function(a,b){var f,g;return null==b&&(b=!1),g=d(a),e(a)?(f=c+this._id,b&&!a[f]&&(a[f]=this._itemId++),f+"_"+a[f]):g+"_"+a},a.prototype.set=function(a,b){return this.has(a)||this.size++,this._content[this.hash(a,!0)]=[b,a],b},a.prototype.get=function(a){var b;return null!=(b=this._content[this.hash(a)])?b[0]:
void 0},a.prototype.has=function(a){return this.hash(a)in this._content},a.prototype["delete"]=function(a){var b;return b=this.hash(a),b in this._content?(delete this._content[b],e(a)&&delete a[c+this._id],this.size--,!0):!1},a.prototype.forEach=function(a){var b,c,d;d=this._content;for(b in d)f.call(d,b)&&(c=d[b],a(c[1],c[0]))},a}(),e=function(a){var b,c,e,f,g;for(b=["Boolean","Number","String","Undefined","Null","RegExp","Function"],e=d(a),f=0,g=b.length;g>f;f++)if(c=b[f],e===c)return!1;return!0},
d=function(a){return Object.prototype.toString.apply(a).match(/\[object (.+)\]/)[1]},a.exports=b}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){null==a&&(a=[]),this._content=a,this._dequeueIndex=0,this.size=this._content.length}return a.prototype.enqueue=function(a){return this.size++,this._content.push(a),a},a.prototype.dequeue=function(){var a;if(0!==this.size)return this.size--,a=this._content[this._dequeueIndex],this._dequeueIndex++,2*this._dequeueIndex>this._content.length&&
(this._content=this._content.slice(this._dequeueIndex),this._dequeueIndex=0),a},a.prototype.peek=function(){return this._content[this._dequeueIndex]},a}(),a.exports=b}).call(this)},function(a,b){(function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=0,d=1,e=2,h=3,f=1,b=2,g=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this._root,this.size=0,c=0,d=a.length;d>c;c++)b=a[c],null!=b&&this.add(b)}return a.prototype.add=function(a){var g,l,m,n;if(null!=a){if(this.size++,m={value:a,_color:f},this._root){if(l=
i(this._root,function(b){return a===b.value?c:a<b.value?b._left?d:(m._parent=b,b._left=m,h):b._right?e:(m._parent=b,b._right=m,h)}),null!=l)return}else this._root=m;for(g=m;;){if(g===this._root){g._color=b;break}if(g._parent._color===b)break;{if((null!=(n=p(g))?n._color:void 0)!==f){!k(g)&&k(g._parent)?(this._rotateLeft(g._parent),g=g._left):k(g)&&!k(g._parent)&&(this._rotateRight(g._parent),g=g._right),g._parent._color=b,j(g)._color=f,k(g)?this._rotateRight(j(g)):this._rotateLeft(j(g));break}g._parent._color=
b,p(g)._color=b,j(g)._color=f,g=j(g)}}return a}},a.prototype.has=function(a){var b;return b=i(this._root,function(b){return a===b.value?c:a<b.value?d:e}),b?!0:!1},a.prototype.peekMin=function(){var a;return null!=(a=n(this._root))?a.value:void 0},a.prototype.peekMax=function(){var a;return null!=(a=m(this._root))?a.value:void 0},a.prototype.remove=function(a){var b;return(b=i(this._root,function(b){return a===b.value?c:a<b.value?d:e}))?(this._removeNode(this._root,b),this.size--,a):void 0},a.prototype.removeMin=
function(){var a,b;return(a=n(this._root))?(b=a.value,this._removeNode(this._root,a),b):void 0},a.prototype.removeMax=function(){var a,b;return(a=m(this._root))?(b=a.value,this._removeNode(this._root,a),b):void 0},a.prototype._removeNode=function(a,c){var d,e,g,h,i,j,m,p,q,r;if(c._left&&c._right&&(e=n(c._right),c.value=e.value,c=e),e=c._left||c._right,e||(e={color:b,_right:void 0,_left:void 0,isLeaf:!0}),e._parent=c._parent,null!=(g=c._parent)&&(g[l(c)]=e),c._color===b)if(e._color===f)e._color=b,
e._parent||(this._root=e);else for(;;){if(!e._parent){e.isLeaf?this._root=void 0:this._root=e;break}if(d=o(e),(null!=d?d._color:void 0)===f&&(e._parent._color=f,d._color=b,k(e)?this._rotateLeft(e._parent):this._rotateRight(e._parent)),d=o(e),e._parent._color!==b||d&&(d._color!==b||d._left&&d._left._color!==b||d._right&&d._right._color!==b)){if(!(e._parent._color!==f||d&&(d._color!==b||d._left&&(null!=(h=d._left)?h._color:void 0)!==b||d._right&&(null!=(i=d._right)?i._color:void 0)!==b))){null!=d&&
(d._color=f),e._parent._color=b;break}if((null!=d?d._color:void 0)===b){!k(e)||d._right&&d._right._color!==b||(null!=(j=d._left)?j._color:void 0)!==f?k(e)||d._left&&d._left._color!==b||(null!=(p=d._right)?p._color:void 0)!==f||(d._color=f,null!=(q=d._right)&&(q._color=b),this._rotateLeft(d)):(d._color=f,null!=(m=d._left)&&(m._color=b),this._rotateRight(d));break}d=o(e),d._color=e._parent._color,k(e)?(d._right._color=b,this._rotateRight(e._parent)):(d._left._color=b,this._rotateLeft(e._parent))}else null!=
d&&(d._color=f),e.isLeaf&&(e._parent[l(e)]=void 0),e=e._parent}return e.isLeaf&&null!=(r=e._parent)?r[l(e)]=void 0:void 0},a.prototype._rotateLeft=function(a){var b,c;return null!=(b=a._parent)&&(b[l(a)]=a._right),a._right._parent=a._parent,a._parent=a._right,a._right=a._right._left,a._parent._left=a,null!=(c=a._right)&&(c._parent=a),null==a._parent._parent?this._root=a._parent:void 0},a.prototype._rotateRight=function(a){var b,c;return null!=(b=a._parent)&&(b[l(a)]=a._left),a._left._parent=a._parent,
a._parent=a._left,a._left=a._left._right,a._parent._right=a,null!=(c=a._left)&&(c._parent=a),null==a._parent._parent?this._root=a._parent:void 0},a}(),k=function(a){return a===a._parent._left},l=function(a){return k(a)?"_left":"_right"},i=function(a,b){var f,g,i;for(g=a,i=void 0;g;){if(f=b(g),f===c){i=g;break}if(f===d)g=g._left;else if(f===e)g=g._right;else if(f===h)break}return i},n=function(a){return i(a,function(a){return a._left?d:c})},m=function(a){return i(a,function(a){return a._right?e:c})},
j=function(a){var b;return null!=(b=a._parent)?b._parent:void 0},p=function(a){return j(a)?k(a._parent)?j(a)._right:j(a)._left:void 0},o=function(a){return k(a)?a._parent._right:a._parent._left},a.exports=g}).call(this)},function(a,b,c){(function(){var b,d,e,f,g={}.hasOwnProperty;b=c(6),e="end",d=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this._root={},this.size=0,c=0,d=a.length;d>c;c++)b=a[c],this.add(b)}return a.prototype.add=function(a){var b,c,d,f;if(null!=a){for(this.size++,b=this._root,
d=0,f=a.length;f>d;d++)c=a[d],null==b[c]&&(b[c]={}),b=b[c];return b[e]=!0,a}},a.prototype.has=function(a){var b,c,d,f;if(null==a)return!1;for(b=this._root,d=0,f=a.length;f>d;d++){if(c=a[d],null==b[c])return!1;b=b[c]}return b[e]?!0:!1},a.prototype.longestPrefixOf=function(a){var b,c,d,e,f;if(null==a)return"";for(b=this._root,d="",e=0,f=a.length;f>e&&(c=a[e],null!=b[c]);e++)d+=c,b=b[c];return d},a.prototype.wordsWithPrefix=function(a){var c,d,f,h,i,j,k,l,m,n;if(null==a)return[];for(null!=a||(a=""),
k=[],d=this._root,l=0,m=a.length;m>l;l++)if(f=a[l],d=d[f],null==d)return[];for(i=new b,i.enqueue([d,""]);0!==i.size;){n=i.dequeue(),h=n[0],c=n[1],h[e]&&k.push(a+c);for(f in h)g.call(h,f)&&(j=h[f],i.enqueue([j,c+f]))}return k},a.prototype.remove=function(a){var b,c,d,g,h,i,j,k;if(null!=a){for(b=this._root,g=[],h=0,j=a.length;j>h;h++){if(d=a[h],null==b[d])return;b=b[d],g.push([d,b])}if(b[e]){if(this.size--,delete b[e],f(b,1))return a;for(c=i=k=g.length-1;(1>=k?1>=i:i>=1)&&!f(g[c][1],1);c=1>=k?++i:--i)delete g[c-
1][1][g[c][0]];return f(this._root[g[0][0]],1)||delete this._root[g[0][0]],a}}},a}(),f=function(a,b){var c,d;if(0===b)return!0;d=0;for(c in a)if(g.call(a,c)&&(d++,d>=b))return!0;return!1},a.exports=d}).call(this)}]),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapMarkerSpiderfier",["uiGmapGoogleMapApi",function(b){var c=this;return+function(){var b={}.hasOwnProperty,c=[].slice;this.OverlappingMarkerSpiderfier=function(){function d(a,c){var d,f,g,h,i,j;this.map=a,null==c&&(c={});for(f in c)b.call(c,
f)&&(j=c[f],this[f]=j);for(this.projHelper=new this.constructor.ProjHelper(this.map),this.initMarkerArrays(),this.listeners={},i=["click","zoom_changed","maptypeid_changed"],g=0,h=i.length;h>g;g++)d=i[g],e.addListener(this.map,d,function(a){return function(){return a.unspiderfy()}}(this))}var e,f,g,h,i,j,k,l,m,n,o;for(l=d.prototype,m=[d,l],g=0,j=m.length;j>g;g++)o=m[g],o.VERSION="0.3.3";return f=void 0,e=void 0,k=void 0,n=2*Math.PI,l.keepSpiderfied=!1,l.markersWontHide=!1,l.markersWontMove=!1,l.nearbyDistance=
20,l.circleSpiralSwitchover=9,l.circleFootSeparation=23,l.circleStartAngle=n/12,l.spiralFootSeparation=26,l.spiralLengthStart=11,l.spiralLengthFactor=4,l.spiderfiedZIndex=1E3,l.usualLegZIndex=10,l.highlightedLegZIndex=20,l.event="click",l.minZoomLevel=!1,l.legWeight=1.5,l.legColors={usual:{},highlighted:{}},i=l.legColors.usual,h=l.legColors.highlighted,d.initializeGoogleMaps=function(a){return f=a.maps,e=f.event,k=f.MapTypeId,i[k.HYBRID]=i[k.SATELLITE]="#fff",h[k.HYBRID]=h[k.SATELLITE]="#f00",i[k.TERRAIN]=
i[k.ROADMAP]="#444",h[k.TERRAIN]=h[k.ROADMAP]="#f00",this.ProjHelper=function(a){return this.setMap(a)},this.ProjHelper.prototype=new f.OverlayView,this.ProjHelper.prototype.draw=function(){}},l.initMarkerArrays=function(){return this.markers=[],this.markerListenerRefs=[]},l.addMarker=function(a){var b;return null!=a._oms?this:(a._oms=!0,b=[e.addListener(a,this.event,function(b){return function(c){return b.spiderListener(a,c)}}(this))],this.markersWontHide||b.push(e.addListener(a,"visible_changed",
function(b){return function(){return b.markerChangeListener(a,!1)}}(this))),this.markersWontMove||b.push(e.addListener(a,"position_changed",function(b){return function(){return b.markerChangeListener(a,!0)}}(this))),this.markerListenerRefs.push(b),this.markers.push(a),this)},l.markerChangeListener=function(a,b){return null==a._omsData||!b&&a.getVisible()||null!=this.spiderfying||null!=this.unspiderfying?void 0:this.unspiderfy(b?a:null)},l.getMarkers=function(){return this.markers.slice(0)},l.removeMarker=
function(a){var b,c,d,f,g;if(null!=a._omsData&&this.unspiderfy(),b=this.arrIndexOf(this.markers,a),0>b)return this;for(g=this.markerListenerRefs.splice(b,1)[0],c=0,d=g.length;d>c;c++)f=g[c],e.removeListener(f);return delete a._oms,this.markers.splice(b,1),this},l.clearMarkers=function(){var a,b,c,d,f,g,h,i,j;for(this.unspiderfy(),j=this.markers,a=b=0,c=j.length;c>b;a=++b){for(h=j[a],g=this.markerListenerRefs[a],i=0,d=g.length;d>i;i++)f=g[i],e.removeListener(f);delete h._oms}return this.initMarkerArrays(),
this},l.addListener=function(a,b){var c;return(null!=(c=this.listeners)[a]?c[a]:c[a]=[]).push(b),this},l.removeListener=function(a,b){var c;return c=this.arrIndexOf(this.listeners[a],b),0>c||this.listeners[a].splice(c,1),this},l.clearListeners=function(a){return this.listeners[a]=[],this},l.trigger=function(){var a,b,d,e,f,g,h,i;for(b=arguments[0],a=2<=arguments.length?c.call(arguments,1):[],h=null!=(g=this.listeners[b])?g:[],i=[],e=0,f=h.length;f>e;e++)d=h[e],i.push(d.apply(null,a));return i},l.generatePtsCircle=
function(a,b){var c,d,e,g,h,i,j,k;for(e=this.circleFootSeparation*(2+a),i=e/n,d=n/a,k=[],g=h=0,j=a;j>=0?j>h:h>j;g=j>=0?++h:--h)c=this.circleStartAngle+g*d,k.push(new f.Point(b.x+i*Math.cos(c),b.y+i*Math.sin(c)));return k},l.generatePtsSpiral=function(a,b){var c,d,e,g,h,i,j;for(g=this.spiralLengthStart,c=0,j=[],d=e=0,i=a;i>=0?i>e:e>i;d=i>=0?++e:--e)c+=this.spiralFootSeparation/g+5E-4*d,h=new f.Point(b.x+g*Math.cos(c),b.y+g*Math.sin(c)),g+=n*this.spiralLengthFactor/c,j.push(h);return j},l.spiderListener=
function(b,c){var d,e,f,g,h,i,j,k,m,n,o,p,q;if(k=null!=b._omsData,k&&this.keepSpiderfied||("mouseover"===this.event?(d=this,e=function(){return d.unspiderfy()},a.clearTimeout(l.timeout),l.timeout=setTimeout(e,3E3)):this.unspiderfy()),k||this.map.getStreetView().getVisible()||"GoogleEarthAPI"===this.map.getMapTypeId())return this.trigger("click",b,c);for(n=[],o=[],m=this.nearbyDistance,p=m*m,j=this.llToPt(b.position),q=this.markers,f=0,g=q.length;g>f;f++)h=q[f],null!=h.map&&h.getVisible()&&(i=this.llToPt(h.position),
this.ptDistanceSq(i,j)<p?n.push({marker:h,markerPt:i}):o.push(h));return 1===n.length?this.trigger("click",b,c):this.spiderfy(n,o)},l.markersNearMarker=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(null==b&&(b=!1),null==this.projHelper.getProjection())throw"Must wait for 'idle' event on map before calling markersNearMarker";for(i=this.nearbyDistance,j=i*i,g=this.llToPt(a.position),h=[],k=this.markers,c=0,d=k.length;d>c&&(e=k[c],!(e!==a&&null!=e.map&&e.getVisible()&&(f=this.llToPt(null!=(l=null!=(m=e._omsData)?
m.usualPosition:void 0)?l:e.position),this.ptDistanceSq(f,g)<j&&(h.push(e),b))));c++);return h},l.markersNearAnyOtherMarker=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;if(null==this.projHelper.getProjection())throw"Must wait for 'idle' event on map before calling markersNearAnyOtherMarker";for(o=this.nearbyDistance,p=o*o,m=function(){var a,b,c,d,e,f;for(c=this.markers,f=[],a=0,b=c.length;b>a;a++)h=c[a],f.push({pt:this.llToPt(null!=(d=null!=(e=h._omsData)?e.usualPosition:void 0)?d:h.position),
willSpiderfy:!1});return f}.call(this),r=this.markers,b=d=0,e=r.length;e>d;b=++d)if(i=r[b],null!=i.map&&i.getVisible()&&(j=m[b],!j.willSpiderfy))for(s=this.markers,c=n=0,f=s.length;f>n;c=++n)if(k=s[c],c!==b&&null!=k.map&&k.getVisible()&&(l=m[c],(!(b>c)||l.willSpiderfy)&&this.ptDistanceSq(j.pt,l.pt)<p)){j.willSpiderfy=l.willSpiderfy=!0;break}for(t=this.markers,u=[],a=q=0,g=t.length;g>q;a=++q)h=t[a],m[a].willSpiderfy&&u.push(h);return u},l.makeHighlightListenerFuncs=function(a){return{highlight:function(b){return function(){return a._omsData.leg.setOptions({strokeColor:b.legColors.highlighted[b.map.mapTypeId],
zIndex:b.highlightedLegZIndex})}}(this),unhighlight:function(b){return function(){return a._omsData.leg.setOptions({strokeColor:b.legColors.usual[b.map.mapTypeId],zIndex:b.usualLegZIndex})}}(this)}},l.spiderfy=function(a,b){var c,d,g,h,i,j,k,l,m,n,o;return this.minZoomLevel&&this.map.getZoom()<this.minZoomLevel?!1:(this.spiderfying=!0,n=a.length,c=this.ptAverage(function(){var b,c,d;for(d=[],b=0,c=a.length;c>b;b++)l=a[b],d.push(l.markerPt);return d}()),h=n>=this.circleSpiralSwitchover?this.generatePtsSpiral(n,
c).reverse():this.generatePtsCircle(n,c),o=function(){var b,c,l;for(l=[],b=0,c=h.length;c>b;b++)g=h[b],d=this.ptToLl(g),m=this.minExtract(a,function(a){return function(b){return a.ptDistanceSq(b.markerPt,g)}}(this)),k=m.marker,j=new f.Polyline({map:this.map,path:[k.position,d],strokeColor:this.legColors.usual[this.map.mapTypeId],strokeWeight:this.legWeight,zIndex:this.usualLegZIndex}),k._omsData={usualPosition:k.position,leg:j},this.legColors.highlighted[this.map.mapTypeId]!==this.legColors.usual[this.map.mapTypeId]&&
(i=this.makeHighlightListenerFuncs(k),k._omsData.hightlightListeners={highlight:e.addListener(k,"mouseover",i.highlight),unhighlight:e.addListener(k,"mouseout",i.unhighlight)}),k.setPosition(d),k.setZIndex(Math.round(this.spiderfiedZIndex+g.y)),l.push(k);return l}.call(this),delete this.spiderfying,this.spiderfied=!0,this.trigger("spiderfy",o,b))},l.unspiderfy=function(a){var b,c,d,f,g,h,i;if(null==a&&(a=null),null==this.spiderfied)return this;for(this.unspiderfying=!0,i=[],g=[],h=this.markers,b=
0,c=h.length;c>b;b++)f=h[b],null!=f._omsData?(f._omsData.leg.setMap(null),f!==a&&f.setPosition(f._omsData.usualPosition),f.setZIndex(null),d=f._omsData.hightlightListeners,null!=d&&(e.removeListener(d.highlight),e.removeListener(d.unhighlight)),delete f._omsData,i.push(f)):g.push(f);return delete this.unspiderfying,delete this.spiderfied,this.trigger("unspiderfy",i,g),this},l.ptDistanceSq=function(a,b){var c,d;return c=a.x-b.x,d=a.y-b.y,c*c+d*d},l.ptAverage=function(a){var b,c,d,e,g,h;for(g=h=0,b=
0,c=a.length;c>b;b++)e=a[b],g+=e.x,h+=e.y;return d=a.length,new f.Point(g/d,h/d)},l.llToPt=function(a){return this.projHelper.getProjection().fromLatLngToDivPixel(a)},l.ptToLl=function(a){return this.projHelper.getProjection().fromDivPixelToLatLng(a)},l.minExtract=function(a,b){var c,d,e,f,g,h,i;for(e=g=0,h=a.length;h>g;e=++g)f=a[e],i=b(f),("undefined"==typeof c||null===c||d>i)&&(d=i,c=e);return a.splice(c,1)[0]},l.arrIndexOf=function(a,b){var c,d,e,f;if(null!=a.indexOf)return a.indexOf(b);for(c=
d=0,e=a.length;e>d;c=++d)if(f=a[c],f===b)return c;return-1},d}()}.apply(c),b.then(function(){c.OverlappingMarkerSpiderfier.initializeGoogleMaps(a.google)}),this.OverlappingMarkerSpiderfier}]),b.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendMarkerClusterer",["uiGmapLodash","uiGmapPropMap",function(b,c){return{init:_.once(function(){(function(){var d={}.hasOwnProperty,e=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,
a.prototype=new c,a.__super__=b.prototype,a};a.NgMapCluster=function(a){function d(a){d.__super__.constructor.call(this,a),this.markers_=new c}return e(d,a),d.prototype.addMarker=function(a){var b,c;if(this.isMarkerAlreadyAdded_(a)){var d=this.markers_.get(a.key);if(d.getPosition().lat()==a.getPosition().lat()&&d.getPosition().lon()==a.getPosition().lon())return!1}if(this.center_){if(this.averageCenter_){var e=this.markers_.length+1,f=(this.center_.lat()*(e-1)+a.getPosition().lat())/e,g=(this.center_.lng()*
(e-1)+a.getPosition().lng())/e;this.center_=new google.maps.LatLng(f,g),this.calculateBounds_()}}else this.center_=a.getPosition(),this.calculateBounds_();return a.isAdded=!0,this.markers_.push(a),b=this.markers_.length,c=this.markerClusterer_.getMaxZoom(),null!==c&&this.map_.getZoom()>c?a.getMap()!==this.map_&&a.setMap(this.map_):b<this.minClusterSize_?a.getMap()!==this.map_&&a.setMap(this.map_):b===this.minClusterSize_?this.markers_.each(function(a){a.setMap(null)}):a.setMap(null),!0},d.prototype.isMarkerAlreadyAdded_=
function(a){return b.isNullOrUndefined(this.markers_.get(a.key))},d.prototype.getBounds=function(){var a=new google.maps.LatLngBounds(this.center_,this.center_);return this.getMarkers().each(function(b){a.extend(b.getPosition())}),a},d.prototype.remove=function(){this.clusterIcon_.setMap(null),this.markers_=new c,delete this.markers_},d}(Cluster),a.NgMapMarkerClusterer=function(a){function b(a,d,e){b.__super__.constructor.call(this,a,d,e),this.markers_=new c}return e(b,a),b.prototype.clearMarkers=
function(){this.resetViewport_(!0),this.markers_=new c},b.prototype.removeMarker_=function(a){return this.markers_.get(a.key)?(a.setMap(null),this.markers_.remove(a.key),!0):!1},b.prototype.createClusters_=function(a){var b,c,d,e=this;if(this.ready_){0===a&&(google.maps.event.trigger(this,"clusteringbegin",this),"undefined"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),d=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),
this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var f=this.getExtendedBounds(d),g=Math.min(a+this.batchSize_,this.markers_.length),h=this.markers_.values();for(b=a;g>b;b++)c=h[b],!c.isAdded&&this.isMarkerInBounds_(c,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&c.getVisible())&&this.addToClosestCluster_(c);if(g<this.markers_.length)this.timerRefStatic=setTimeout(function(){e.createClusters_(g)},
0);else{for(b=0;b<this.clusters_.length;b++)this.clusters_[b].updateIcon_();delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this)}}},b.prototype.addToClosestCluster_=function(a){var b,c,d,e,f=4E4,g=null;for(b=0;b<this.clusters_.length;b++)d=this.clusters_[b],e=d.getCenter(),e&&(c=this.distanceBetweenPoints_(e,a.getPosition()),f>c&&(f=c,g=d));g&&g.isMarkerInClusterBounds(a)?g.addMarker(a):(d=new NgMapCluster(this),d.addMarker(a),this.clusters_.push(d))},b.prototype.redraw_=
function(){this.createClusters_(0)},b.prototype.resetViewport_=function(a){var b;for(b=0;b<this.clusters_.length;b++)this.clusters_[b].remove();this.clusters_=[],this.markers_.each(function(b){b.isAdded=!1,a&&b.setMap(null)})},b.prototype.extend=function(a,b){return function(a){var b;for(b in a.prototype)"constructor"!==b&&(this.prototype[b]=a.prototype[b]);return this}.apply(a,[b])},ClusterIcon.prototype.show=function(){if(this.div_){var a="",b=this.backgroundPosition_.split(" "),c=parseInt(b[0].trim(),
10),d=parseInt(b[1].trim(),10),e=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(e),a="\x3cimg src\x3d'"+this.url_+"' style\x3d'position: absolute; top: "+d+"px; left: "+c+"px; ",a+=this.cluster_.getMarkerClusterer().enableRetinaIcons_?"width: "+this.width_+"px;height: "+this.height_+"px;":"clip: rect("+-1*d+"px, "+(-1*c+this.width_)+"px, "+(-1*d+this.height_)+"px, "+-1*c+"px);",a+="'\x3e",this.div_.innerHTML=a+"\x3cdiv style\x3d'position: absolute;top: "+this.anchorText_[0]+
"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'\x3e"+this.sums_.text+"\x3c/div\x3e","undefined"==typeof this.sums_.title||""===this.sums_.title?this.div_.title=this.cluster_.getMarkerClusterer().getTitle():this.div_.title=this.sums_.title,
this.div_.style.display=""}this.visible_=!0},b}(MarkerClusterer)}).call(this)})}}])}(window,angular);
/*
 angular-google-chart 2015-11-29 */
(function(){angular.module("googlechart",[]).run(registerResizeEvent);registerResizeEvent.$inject=["$rootScope","$window"];function registerResizeEvent($rootScope,$window){angular.element($window).bind("resize",function(){$rootScope.$emit("resizeMsg")})}})();
(function(){angular.module("googlechart").factory("FormatManager",formatManagerFactory);function formatManagerFactory(){function FormatManager($google){var self=this;var oldFormatTemplates={};self.iFormats={};self.applyFormats=applyFormats;function apply(tFormats,dataTable){var i,formatType;for(formatType in tFormats)if(tFormats.hasOwnProperty(formatType))for(i=0;i<self.iFormats[formatType].length;i++)if(tFormats[formatType][i].columnNum<dataTable.getNumberOfColumns())self.iFormats[formatType][i].format(dataTable,
tFormats[formatType][i].columnNum)}function applyFormat(formatType,FormatClass,tFormats){var i;if(angular.isArray(tFormats[formatType]))if(!angular.equals(tFormats[formatType],oldFormatTemplates[formatType])){oldFormatTemplates[formatType]=tFormats[formatType];self.iFormats[formatType]=[];if(formatType==="color")instantiateColorFormatters(tFormats);else for(i=0;i<tFormats[formatType].length;i++)self.iFormats[formatType].push(new FormatClass(tFormats[formatType][i]))}}function applyFormats(dataTable,
tFormats,customFormatters){var formatType,FormatClass,requiresHtml=false;if(!angular.isDefined(tFormats)||!angular.isDefined(dataTable))return{requiresHtml:false};for(formatType in tFormats)if(tFormats.hasOwnProperty(formatType)){FormatClass=getFormatClass(formatType,customFormatters);if(!angular.isFunction(FormatClass))continue;applyFormat(formatType,FormatClass,tFormats);if(formatType==="arrow"||formatType==="bar"||formatType==="color")requiresHtml=true}apply(tFormats,dataTable);return{requiresHtml:requiresHtml}}
function instantiateColorFormatters(tFormats){var t,colorFormat,i,data,formatType="color";for(t=0;t<tFormats[formatType].length;t++){colorFormat=new $google.visualization.ColorFormat;for(i=0;i<tFormats[formatType][t].formats.length;i++){data=tFormats[formatType][t].formats[i];if(typeof data.fromBgColor!=="undefined"&&typeof data.toBgColor!=="undefined")colorFormat.addGradientRange(data.from,data.to,data.color,data.fromBgColor,data.toBgColor);else colorFormat.addRange(data.from,data.to,data.color,
data.bgcolor)}self.iFormats[formatType].push(colorFormat)}}function getFormatClass(formatType,customFormatters){var className=formatType.charAt(0).toUpperCase()+formatType.slice(1).toLowerCase()+"Format";if($google.visualization.hasOwnProperty(className))return google.visualization[className];else if(angular.isDefined(customFormatters)&&customFormatters.hasOwnProperty(formatType))return customFormatters[formatType];return}}return FormatManager}})();
(function(){angular.module("googlechart").controller("GoogleChartController",GoogleChartController);GoogleChartController.$inject=["$scope","$element","$attrs","$injector","$timeout","$window","$rootScope","GoogleChartService"];function GoogleChartController($scope,$element,$attrs,$injector,$timeout,$window,$rootScope,GoogleChartService){var self=this;var resizeHandler;var googleChartService;init();function cleanup(){resizeHandler()}function draw(){if(!draw.triggered&&self.chart!==undefined){draw.triggered=
true;$timeout(setupAndDraw,0,true)}else if(self.chart!==undefined){$timeout.cancel(draw.recallTimeout);draw.recallTimeout=$timeout(draw,10)}}function drawAsync(){googleChartService.getReadyPromise().then(draw)}function drawChartWrapper(){googleChartService.draw();draw.triggered=false}function init(){googleChartService=new GoogleChartService;self.registerChartListener=googleChartService.registerChartListener;self.registerWrapperListener=googleChartService.registerWrapperListener;self.registerServiceListener=
googleChartService.registerServiceListener;$scope.$watch(watchValue,watchHandler,true);resizeHandler=$rootScope.$on("resizeMsg",drawAsync);$scope.$on("$destroy",cleanup)}function setupAndDraw(){googleChartService.setup($element,self.chart.type,self.chart.data,self.chart.view,self.chart.options,self.chart.formatters,self.chart.customFormatters);$timeout(drawChartWrapper)}function watchHandler(){self.chart=$scope.$eval($attrs.chart);drawAsync()}function watchValue(){var chartObject=$scope.$eval($attrs.chart);
if(angular.isDefined(chartObject)&&angular.isObject(chartObject))return{customFormatters:chartObject.customFormatters,data:chartObject.data,formatters:chartObject.formatters,options:chartObject.options,type:chartObject.type,view:chartObject.view}}}})();
(function(){angular.module("googlechart").directive("agcBeforeDraw",onReadyDirective);function onReadyDirective(){return{restrict:"A",scope:false,require:"googleChart",link:function(scope,element,attrs,googleChartController){callback.$inject=["chartWrapper"];function callback(chartWrapper){scope.$apply(function(){scope.$eval(attrs.agcBeforeDraw,{chartWrapper:chartWrapper})})}googleChartController.registerServiceListener("beforeDraw",callback,this)}}}})();
(function(){angular.module("googlechart").directive("agcOnClick",onClickDirective);function onClickDirective(){return{restrict:"A",scope:false,require:"googleChart",link:function(scope,element,attrs,googleChartController){callback.$inject=["args","chart","chartWrapper"];function callback(args,chart,chartWrapper){scope.$apply(function(){scope.$eval(attrs.agcOnClick,{args:args,chart:chart,chartWrapper:chartWrapper})})}googleChartController.registerChartListener("click",callback,this)}}}})();
(function(){angular.module("googlechart").directive("agcOnError",onErrorDirective);function onErrorDirective(){return{restrict:"A",scope:false,require:"googleChart",link:function(scope,element,attrs,googleChartController){callback.$inject=["chartWrapper","chart","args"];function callback(chartWrapper,chart,args){var returnValues={chartWrapper:chartWrapper,chart:chart,args:args,error:args[0],err:args[0],id:args[0].id,message:args[0].message};scope.$apply(function(){scope.$eval(attrs.agcOnError,returnValues)})}
googleChartController.registerWrapperListener("error",callback,this)}}}})();
(function(){angular.module("googlechart").directive("agcOnMouseout",agcOnMouseoutDirective);function agcOnMouseoutDirective(){return{restrict:"A",scope:false,require:"googleChart",link:function(scope,element,attrs,googleChartController){callback.$inject=["args","chart","chartWrapper"];function callback(args,chart,chartWrapper){var returnParams={chartWrapper:chartWrapper,chart:chart,args:args,column:args[0].column,row:args[0].row};scope.$apply(function(){scope.$eval(attrs.agcOnMouseout,returnParams)})}
googleChartController.registerChartListener("onmouseout",callback,this)}}}})();
(function(){angular.module("googlechart").directive("agcOnMouseover",agcOnMouseoverDirective);function agcOnMouseoverDirective(){return{restrict:"A",scope:false,require:"googleChart",link:function(scope,element,attrs,googleChartController){callback.$inject=["args","chart","chartWrapper"];function callback(args,chart,chartWrapper){var returnParams={chartWrapper:chartWrapper,chart:chart,args:args,column:args[0].column,row:args[0].row};scope.$apply(function(){scope.$eval(attrs.agcOnMouseover,returnParams)})}
googleChartController.registerChartListener("onmouseover",callback,this)}}}})();
(function(){angular.module("googlechart").directive("agcOnReady",onReadyDirective);function onReadyDirective(){return{restrict:"A",scope:false,require:"googleChart",link:function(scope,element,attrs,googleChartController){callback.$inject=["chartWrapper"];function callback(chartWrapper){scope.$apply(function(){scope.$eval(attrs.agcOnReady,{chartWrapper:chartWrapper})})}googleChartController.registerWrapperListener("ready",callback,this)}}}})();
(function(){angular.module("googlechart").directive("agcOnSelect",onSelectDirective);function onSelectDirective(){return{restrict:"A",scope:false,require:"googleChart",link:function(scope,element,attrs,googleChartController){callback.$inject=["chartWrapper","chart"];function callback(chartWrapper,chart){var selectEventRetParams={selectedItems:chart.getSelection()};selectEventRetParams.selectedItem=selectEventRetParams.selectedItems[0];selectEventRetParams.chartWrapper=chartWrapper;selectEventRetParams.chart=
chart;scope.$apply(function(){scope.$eval(attrs.agcOnSelect,selectEventRetParams)})}googleChartController.registerWrapperListener("select",callback,this)}}}})();(function(){angular.module("googlechart").directive("googleChart",googleChartDirective);googleChartDirective.$inject=[];function googleChartDirective(){return{restrict:"A",scope:false,controller:"GoogleChartController"}}})();(function(){angular.module("googlechart").value("googleChartApiConfig",{version:"1",optionalSettings:{packages:["corechart"]}})})();
(function(){angular.module("googlechart").factory("googleChartApiPromise",googleChartApiPromiseFactory);googleChartApiPromiseFactory.$inject=["$rootScope","$q","googleChartApiConfig","googleJsapiUrl"];function googleChartApiPromiseFactory($rootScope,$q,apiConfig,googleJsapiUrl){apiConfig.optionalSettings=apiConfig.optionalSettings||{};var apiReady=$q.defer();var onLoad=function(){var settings={callback:function(){var oldCb=apiConfig.optionalSettings.callback;$rootScope.$apply(function(){apiReady.resolve(google)});
if(angular.isFunction(oldCb))oldCb.call(this)}};settings=angular.extend({},apiConfig.optionalSettings,settings);window.google.load("visualization",apiConfig.version,settings)};var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.setAttribute("type","text/javascript");script.src=googleJsapiUrl;if(script.addEventListener)script.addEventListener("load",onLoad,false);else script.onreadystatechange=function(){if(script.readyState==="loaded"||script.readyState===
"complete"){script.onreadystatechange=null;onLoad()}};head.appendChild(script);return apiReady.promise}})();
(function(){angular.module("googlechart").factory("GoogleChartService",GoogleChartServiceFactory);GoogleChartServiceFactory.$inject=["googleChartApiPromise","$injector","$q","FormatManager"];function GoogleChartServiceFactory(googleChartApiPromise,$injector,$q,FormatManager){function GoogleChartService(){var self=this;self.draw=draw;self.getChartWrapper=getChartWrapper;self.getData=getData;self.getElement=getElement;self.getOption=getOption;self.getOptions=getOptions;self.getView=getView;self.getReadyPromise=
getReadyPromise;self.isApiReady=isApiReady;self.registerChartListener=registerChartListener;self.registerServiceListener=registerServiceListener;self.registerWrapperListener=registerWrapperListener;self.setData=setData;self.setElement=setElement;self.setOption=setOption;self.setOptions=setOptions;self.setup=setup;self.setView=setView;var $google,_apiPromise,_apiReady,_chartWrapper,_element,_chartType,_data,_view,_options,_formatters,_innerVisualization,_formatManager,_needsUpdate=true,_customFormatters,
_serviceDeferred,serviceListeners={},wrapperListeners={},chartListeners={};_init();function _activateServiceEvent(eventName){var i;if(angular.isArray(serviceListeners[eventName]))for(i=0;i<serviceListeners[eventName].length;i++)serviceListeners[eventName][i]()}function _apiLoadFail(reason){return reason}function _apiLoadSuccess(g){$google=g;_apiReady=true;_serviceDeferred.resolve();return g}function _continueSetup(){if(!angular.isDefined(_chartWrapper)){_chartWrapper=new $google.visualization.ChartWrapper({chartType:_chartType,
dataTable:_data,view:_view,options:_options,containerId:_element[0]});_registerListenersWithGoogle(_chartWrapper,wrapperListeners)}else{_chartWrapper.setChartType(_chartType);_chartWrapper.setDataTable(_data);_chartWrapper.setView(_view);_chartWrapper.setOptions(_options)}if(!_formatManager)_formatManager=new FormatManager($google);if(_formatManager.applyFormats(_chartWrapper.getDataTable(),_formatters,_customFormatters).requiresHtml)_chartWrapper.setOption("allowHtml",true);_needsUpdate=false}function _getSetDescendantProp(obj,
desc,value){var arr=desc?desc.split("."):[];while(arr.length&&obj){var comp=arr.shift();var match=(new RegExp("(.+)\\[([0-9]*)\\]")).exec(comp);if(value){if(obj[comp]===undefined)obj[comp]={};if(arr.length===0)obj[comp]=value}obj=obj[comp]}return obj}function _handleReady(){if(_innerVisualization!==_chartWrapper.getChart()){_innerVisualization=_chartWrapper.getChart();_registerListenersWithGoogle(_innerVisualization,chartListeners)}}function _init(){_apiReady=false;_serviceDeferred=$q.defer();_apiPromise=
googleChartApiPromise.then(_apiLoadSuccess).catch(_apiLoadFail);registerWrapperListener("ready",_handleReady,self)}function _registerListener(listenerCollection,eventName,listenerFn,listenerObject){var listenerWrapper=function(){var locals={chartWrapper:_chartWrapper,chart:_chartWrapper.getChart(),args:arguments};$injector.invoke(listenerFn,listenerObject||this,locals)};if(angular.isDefined(listenerCollection)&&angular.isObject(listenerCollection)){if(!angular.isArray(listenerCollection[eventName]))listenerCollection[eventName]=
[];listenerCollection[eventName].push(listenerWrapper);return function(){if(angular.isDefined(listenerWrapper.googleListenerHandle))$google.visualization.events.removeListener(listenerWrapper.googleListenerHandle);var fnIndex=listenerCollection[eventName].indexOf(listenerWrapper);listenerCollection[eventName].splice(fnIndex,1);if(listenerCollection[eventName].length===0)listenerCollection[eventName]=undefined}}}function _registerListenersWithGoogle(eventSource,listenerCollection){for(var eventName in listenerCollection)if(listenerCollection.hasOwnProperty(eventName)&&
angular.isArray(listenerCollection[eventName]))for(var fnIterator=0;fnIterator<listenerCollection[eventName].length;fnIterator++)if(angular.isFunction(listenerCollection[eventName][fnIterator]))listenerCollection[eventName][fnIterator].googleListenerHandle=$google.visualization.events.addListener(eventSource,eventName,listenerCollection[eventName][fnIterator])}function _runDrawCycle(){_activateServiceEvent("beforeDraw");_chartWrapper.draw()}function draw(){if(_needsUpdate)_apiPromise=_apiPromise.then(_continueSetup);
_apiPromise=_apiPromise.then(_runDrawCycle())}function getChartWrapper(){return _chartWrapper}function getData(){var data=_data||{};return angular.copy(data)}function getElement(){return _element}function getOption(name){var options=_options||{};return _getSetDescendantProp(options,name)}function getOptions(){var options=_options||{};return angular.copy(options)}function getReadyPromise(){return _serviceDeferred.promise}function getView(){var view=_view||{};return angular.copy(view)}function isApiReady(){return _apiReady}
function registerChartListener(eventName,listenerFn,listenerObject){return _registerListener(chartListeners,eventName,listenerFn,listenerObject)}function registerServiceListener(eventName,listenerFn,listenerObject){return _registerListener(serviceListeners,eventName,listenerFn,listenerObject)}function registerWrapperListener(eventName,listenerFn,listenerObject){return _registerListener(wrapperListeners,eventName,listenerFn,listenerObject)}function setData(data){if(angular.isDefined(data)){_data=angular.copy(data);
_needsUpdate=true}}function setElement(element){if(angular.isElement(element)&&_element!==element){_element=element;_chartWrapper=null;_needsUpdate=true}}function setOption(name,value){_options=_options||{};_getSetDescendantProp(_options,name,angular.copy(value));_needsUpdate=true}function setOptions(options){if(angular.isDefined(options)){_options=angular.copy(options);_needsUpdate=true}}function setup(element,chartType,data,view,options,formatters,customFormatters){_element=element||_element;_chartType=
chartType||_chartType;_data=data||_data;_view=view||_view;_options=options||_options;_formatters=formatters||_formatters;_customFormatters=customFormatters||_customFormatters;_apiPromise=_apiPromise.then(_continueSetup)}function setView(view){_view=angular.copy(view)}}return GoogleChartService}})();
(function(){angular.module("googlechart").provider("googleJsapiUrl",googleJsapiUrlProvider);function googleJsapiUrlProvider(){var protocol="https:";var url="//www.google.com/jsapi";this.setProtocol=function(newProtocol){protocol=newProtocol};this.setUrl=function(newUrl){url=newUrl};this.$get=function(){return(protocol?protocol:"")+url}}})();
/*! angular-deckgrid (v0.5.0) - Copyright: 2013 - 2014, André König (andre.koenig@posteo.de) - MIT */
angular.module("akoenig.deckgrid",[]),angular.module("akoenig.deckgrid").directive("deckgrid",["DeckgridDescriptor",function(a){"use strict";return a.create()}]),angular.module("akoenig.deckgrid").factory("DeckgridDescriptor",["Deckgrid","$templateCache",function(a,b){"use strict";function c(){this.restrict="AE",this.template='<div data-ng-repeat="column in columns" class="{{layout.classList}}"><div data-ng-repeat="card in column" data-ng-include="cardTemplate"></div></div>',this.scope={model:"=source"},this.$$deckgrid=null,this.transclude=!0,this.link=this.$$link.bind(this),this.$$templateKeyIndex=0}return c.prototype.$$destroy=function(){this.$$deckgrid.destroy()},c.prototype.$$link=function(c,d,e,f,g){var h="deckgrid/innerHtmlTemplate"+ ++this.$$templateKeyIndex+".html";c.$on("$destroy",this.$$destroy.bind(this)),angular.isUndefined(e.cardtemplate)?(angular.isUndefined(e.cardtemplatestring)?g(c,function(a){var c,d=[],e=0,f=a.length;for(e;f>e;e+=1)c=a[e].outerHTML,angular.isDefined(c)&&d.push(c);b.put(h,d.join())}):b.put(h,d.attr("cardtemplatestring")),c.cardTemplate=h):c.cardTemplate=e.cardtemplate,c.mother=c.$parent,this.$$deckgrid=a.create(c,d[0])},{create:function(){return new c}}}]),angular.module("akoenig.deckgrid").factory("Deckgrid",["$window","$log",function(a,b){"use strict";function c(b,c){var d,e,f=this;this.$$elem=c,this.$$watchers=[],this.$$scope=b,this.$$scope.columns=[],this.$$scope.layout=this.$$getLayout(),this.$$createColumns(),d=this.$$scope.$watchCollection("model",this.$$onModelChange.bind(this)),this.$$watchers.push(d),angular.forEach(f.$$getMediaQueries(),function(a){function b(){a.removeListener(c)}var c=f.$$onMediaQueryChange.bind(f);a.addListener(c),f.$$watchers.push(b)}),e=a.matchMedia("(orientation: portrait)"),e.addListener(f.$$onMediaQueryChange.bind(f))}return c.prototype.$$getMediaQueries=function(){function b(a){try{return a.sheet.cssRules||[]}catch(b){return[]}}function c(a){var b=/\[(\w*-)?deckgrid\]::?before/g,c=0,d="";if(!a.media||angular.isUndefined(a.cssRules))return!1;for(c=a.cssRules.length-1;c>=0;c-=1)if(d=a.cssRules[c].selectorText,angular.isDefined(d)&&d.match(b))return!0;return!1}var d=[],e=[];return d=Array.prototype.concat.call(Array.prototype.slice.call(document.querySelectorAll("style[type='text/css']")),Array.prototype.slice.call(document.querySelectorAll("link[rel='stylesheet']"))),angular.forEach(d,function(d){var f=b(d);angular.forEach(f,function(b){c(b)&&e.push(a.matchMedia(b.media.mediaText))})}),e},c.prototype.$$createColumns=function(){var a=this;return this.$$scope.layout?(this.$$scope.columns=[],void angular.forEach(this.$$scope.model,function(b,c){var d=c%a.$$scope.layout.columns|0;a.$$scope.columns[d]||(a.$$scope.columns[d]=[]),b.$index=c,a.$$scope.columns[d].push(b)})):b.error("angular-deckgrid: No CSS configuration found (see https://github.com/akoenig/angular-deckgrid#the-grid-configuration)")},c.prototype.$$getLayout=function(){var b,c=a.getComputedStyle(this.$$elem,":before").content;return c&&(c=c.replace(/'/g,""),c=c.replace(/"/g,""),c=c.split(" "),2===c.length&&(b={},b.columns=0|c[0],b.classList=c[1].replace(/\./g," ").trim())),b},c.prototype.$$onMediaQueryChange=function(){var a=this,b=this.$$getLayout();b.columns!==this.$$scope.layout.columns&&(a.$$scope.layout=b,a.$$scope.$apply(function(){a.$$createColumns()}))},c.prototype.$$onModelChange=function(a,b){var c=this;a=a||[],b=b||[],angular.equals(b,a)||c.$$createColumns()},c.prototype.destroy=function(){var a=this.$$watchers.length-1;for(a;a>=0;a-=1)this.$$watchers[a]()},{create:function(a,b){return new c(a,b)}}}]);
/*
 * jquery.qtip. The jQuery tooltip plugin
 *
 * Copyright (c) 2009 Craig Thompson
 * http://craigsworks.com
 *
 * Licensed under MIT
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Launch  : February 2009
 * Version : 1.0.0-rc3
 * Released: Tuesday 12th May, 2009 - 00:00
 * Debug: jquery.qtip.debug.js
 */
(function(f){f.fn.qtip=function(B,u){var y,t,A,s,x,w,v,z;if(typeof B=="string"){if(typeof f(this).data("qtip")!=="object"){f.fn.qtip.log.error.call(self,1,f.fn.qtip.constants.NO_TOOLTIP_PRESENT,false)}if(B=="api"){return f(this).data("qtip").interfaces[f(this).data("qtip").current]}else{if(B=="interfaces"){return f(this).data("qtip").interfaces}}}else{if(!B){B={}}if(typeof B.content!=="object"||(B.content.jquery&&B.content.length>0)){B.content={text:B.content}}if(typeof B.content.title!=="object"){B.content.title={text:B.content.title}}if(typeof B.position!=="object"){B.position={corner:B.position}}if(typeof B.position.corner!=="object"){B.position.corner={target:B.position.corner,tooltip:B.position.corner}}if(typeof B.show!=="object"){B.show={when:B.show}}if(typeof B.show.when!=="object"){B.show.when={event:B.show.when}}if(typeof B.show.effect!=="object"){B.show.effect={type:B.show.effect}}if(typeof B.hide!=="object"){B.hide={when:B.hide}}if(typeof B.hide.when!=="object"){B.hide.when={event:B.hide.when}}if(typeof B.hide.effect!=="object"){B.hide.effect={type:B.hide.effect}}if(typeof B.style!=="object"){B.style={name:B.style}}B.style=c(B.style);s=f.extend(true,{},f.fn.qtip.defaults,B);s.style=a.call({options:s},s.style);s.user=f.extend(true,{},B)}return f(this).each(function(){if(typeof B=="string"){w=B.toLowerCase();A=f(this).qtip("interfaces");if(typeof A=="object"){if(u===true&&w=="destroy"){while(A.length>0){A[A.length-1].destroy()}}else{if(u!==true){A=[f(this).qtip("api")]}for(y=0;y<A.length;y++){if(w=="destroy"){A[y].destroy()}else{if(A[y].status.rendered===true){if(w=="show"){A[y].show()}else{if(w=="hide"){A[y].hide()}else{if(w=="focus"){A[y].focus()}else{if(w=="disable"){A[y].disable(true)}else{if(w=="enable"){A[y].disable(false)}}}}}}}}}}}else{v=f.extend(true,{},s);v.hide.effect.length=s.hide.effect.length;v.show.effect.length=s.show.effect.length;if(v.position.container===false){v.position.container=f(document.body)}if(v.position.target===false){v.position.target=f(this)}if(v.show.when.target===false){v.show.when.target=f(this)}if(v.hide.when.target===false){v.hide.when.target=f(this)}t=f.fn.qtip.interfaces.length;for(y=0;y<t;y++){if(typeof f.fn.qtip.interfaces[y]=="undefined"){t=y;break}}x=new d(f(this),v,t);f.fn.qtip.interfaces[t]=x;if(typeof f(this).data("qtip")=="object"){if(typeof f(this).attr("qtip")==="undefined"){f(this).data("qtip").current=f(this).data("qtip").interfaces.length}f(this).data("qtip").interfaces.push(x)}else{f(this).data("qtip",{current:0,interfaces:[x]})}if(v.content.prerender===false&&v.show.when.event!==false&&v.show.ready!==true){v.show.when.target.bind(v.show.when.event+".qtip-"+t+"-create",{qtip:t},function(C){z=f.fn.qtip.interfaces[C.data.qtip];z.options.show.when.target.unbind(z.options.show.when.event+".qtip-"+C.data.qtip+"-create");z.cache.mouse={x:C.pageX,y:C.pageY};p.call(z);z.options.show.when.target.trigger(z.options.show.when.event)})}else{x.cache.mouse={x:v.show.when.target.offset().left,y:v.show.when.target.offset().top};p.call(x)}}})};function d(u,t,v){var s=this;s.id=v;s.options=t;s.status={animated:false,rendered:false,disabled:false,focused:false};s.elements={target:u.addClass(s.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};s.cache={mouse:{},position:{},toggle:0};s.timers={};f.extend(s,s.options.api,{show:function(y){var x,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"show")}if(s.elements.tooltip.css("display")!=="none"){return s}s.elements.tooltip.stop(true,false);x=s.beforeShow.call(s,y);if(x===false){return s}function w(){if(s.options.position.type!=="static"){s.focus()}s.onShow.call(s,y);if(f.browser.msie){s.elements.tooltip.get(0).style.removeAttribute("filter")}}s.cache.toggle=1;if(s.options.position.type!=="static"){s.updatePosition(y,(s.options.show.effect.length>0))}if(typeof s.options.show.solo=="object"){z=f(s.options.show.solo)}else{if(s.options.show.solo===true){z=f("div.qtip").not(s.elements.tooltip)}}if(z){z.each(function(){if(f(this).qtip("api").status.rendered===true){f(this).qtip("api").hide()}})}if(typeof s.options.show.effect.type=="function"){s.options.show.effect.type.call(s.elements.tooltip,s.options.show.effect.length);s.elements.tooltip.queue(function(){w();f(this).dequeue()})}else{switch(s.options.show.effect.type.toLowerCase()){case"fade":s.elements.tooltip.fadeIn(s.options.show.effect.length,w);break;case"slide":s.elements.tooltip.slideDown(s.options.show.effect.length,function(){w();if(s.options.position.type!=="static"){s.updatePosition(y,true)}});break;case"grow":s.elements.tooltip.show(s.options.show.effect.length,w);break;default:s.elements.tooltip.show(null,w);break}s.elements.tooltip.addClass(s.options.style.classes.active)}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_SHOWN,"show")},hide:function(y){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"hide")}else{if(s.elements.tooltip.css("display")==="none"){return s}}clearTimeout(s.timers.show);s.elements.tooltip.stop(true,false);x=s.beforeHide.call(s,y);if(x===false){return s}function w(){s.onHide.call(s,y)}s.cache.toggle=0;if(typeof s.options.hide.effect.type=="function"){s.options.hide.effect.type.call(s.elements.tooltip,s.options.hide.effect.length);s.elements.tooltip.queue(function(){w();f(this).dequeue()})}else{switch(s.options.hide.effect.type.toLowerCase()){case"fade":s.elements.tooltip.fadeOut(s.options.hide.effect.length,w);break;case"slide":s.elements.tooltip.slideUp(s.options.hide.effect.length,w);break;case"grow":s.elements.tooltip.hide(s.options.hide.effect.length,w);break;default:s.elements.tooltip.hide(null,w);break}s.elements.tooltip.removeClass(s.options.style.classes.active)}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_HIDDEN,"hide")},updatePosition:function(w,x){var C,G,L,J,H,E,y,I,B,D,K,A,F,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updatePosition")}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.CANNOT_POSITION_STATIC,"updatePosition")}}G={position:{left:0,top:0},dimensions:{height:0,width:0},corner:s.options.position.corner.target};L={position:s.getPosition(),dimensions:s.getDimensions(),corner:s.options.position.corner.tooltip};if(s.options.position.target!=="mouse"){if(s.options.position.target.get(0).nodeName.toLowerCase()=="area"){J=s.options.position.target.attr("coords").split(",");for(C=0;C<J.length;C++){J[C]=parseInt(J[C])}H=s.options.position.target.parent("map").attr("name");E=f('img[usemap="#'+H+'"]:first').offset();G.position={left:Math.floor(E.left+J[0]),top:Math.floor(E.top+J[1])};switch(s.options.position.target.attr("shape").toLowerCase()){case"rect":G.dimensions={width:Math.ceil(Math.abs(J[2]-J[0])),height:Math.ceil(Math.abs(J[3]-J[1]))};break;case"circle":G.dimensions={width:J[2]+1,height:J[2]+1};break;case"poly":G.dimensions={width:J[0],height:J[1]};for(C=0;C<J.length;C++){if(C%2==0){if(J[C]>G.dimensions.width){G.dimensions.width=J[C]}if(J[C]<J[0]){G.position.left=Math.floor(E.left+J[C])}}else{if(J[C]>G.dimensions.height){G.dimensions.height=J[C]}if(J[C]<J[1]){G.position.top=Math.floor(E.top+J[C])}}}G.dimensions.width=G.dimensions.width-(G.position.left-E.left);G.dimensions.height=G.dimensions.height-(G.position.top-E.top);break;default:return f.fn.qtip.log.error.call(s,4,f.fn.qtip.constants.INVALID_AREA_SHAPE,"updatePosition");break}G.dimensions.width-=2;G.dimensions.height-=2}else{if(s.options.position.target.add(document.body).length===1){G.position={left:f(document).scrollLeft(),top:f(document).scrollTop()};G.dimensions={height:f(window).height(),width:f(window).width()}}else{if(typeof s.options.position.target.attr("qtip")!=="undefined"){G.position=s.options.position.target.qtip("api").cache.position}else{G.position=s.options.position.target.offset()}G.dimensions={height:s.options.position.target.outerHeight(),width:s.options.position.target.outerWidth()}}}y=f.extend({},G.position);if(G.corner.search(/right/i)!==-1){y.left+=G.dimensions.width}if(G.corner.search(/bottom/i)!==-1){y.top+=G.dimensions.height}if(G.corner.search(/((top|bottom)Middle)|center/)!==-1){y.left+=(G.dimensions.width/2)}if(G.corner.search(/((left|right)Middle)|center/)!==-1){y.top+=(G.dimensions.height/2)}}else{G.position=y={left:s.cache.mouse.x,top:s.cache.mouse.y};G.dimensions={height:1,width:1}}if(L.corner.search(/right/i)!==-1){y.left-=L.dimensions.width}if(L.corner.search(/bottom/i)!==-1){y.top-=L.dimensions.height}if(L.corner.search(/((top|bottom)Middle)|center/)!==-1){y.left-=(L.dimensions.width/2)}if(L.corner.search(/((left|right)Middle)|center/)!==-1){y.top-=(L.dimensions.height/2)}I=(f.browser.msie)?1:0;B=(f.browser.msie&&parseInt(f.browser.version.charAt(0))===6)?1:0;if(s.options.style.border.radius>0){if(L.corner.search(/Left/)!==-1){y.left-=s.options.style.border.radius}else{if(L.corner.search(/Right/)!==-1){y.left+=s.options.style.border.radius}}if(L.corner.search(/Top/)!==-1){y.top-=s.options.style.border.radius}else{if(L.corner.search(/Bottom/)!==-1){y.top+=s.options.style.border.radius}}}if(I){if(L.corner.search(/top/)!==-1){y.top-=I}else{if(L.corner.search(/bottom/)!==-1){y.top+=I}}if(L.corner.search(/left/)!==-1){y.left-=I}else{if(L.corner.search(/right/)!==-1){y.left+=I}}if(L.corner.search(/leftMiddle|rightMiddle/)!==-1){y.top-=1}}if(s.options.position.adjust.screen===true){y=o.call(s,y,G,L)}if(s.options.position.target==="mouse"&&s.options.position.adjust.mouse===true){if(s.options.position.adjust.screen===true&&s.elements.tip){K=s.elements.tip.attr("rel")}else{K=s.options.position.corner.tooltip}y.left+=(K.search(/right/i)!==-1)?-6:6;y.top+=(K.search(/bottom/i)!==-1)?-6:6}if(!s.elements.bgiframe&&f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){f("select, object").each(function(){A=f(this).offset();A.bottom=A.top+f(this).height();A.right=A.left+f(this).width();if(y.top+L.dimensions.height>=A.top&&y.left+L.dimensions.width>=A.left){k.call(s)}})}y.left+=s.options.position.adjust.x;y.top+=s.options.position.adjust.y;F=s.getPosition();if(y.left!=F.left||y.top!=F.top){z=s.beforePositionUpdate.call(s,w);if(z===false){return s}s.cache.position=y;if(x===true){s.status.animated=true;s.elements.tooltip.animate(y,200,"swing",function(){s.status.animated=false})}else{s.elements.tooltip.css(y)}s.onPositionUpdate.call(s,w);if(typeof w!=="undefined"&&w.type&&w.type!=="mousemove"){f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_POSITION_UPDATED,"updatePosition")}}return s},updateWidth:function(w){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateWidth")}else{if(w&&typeof w!=="number"){return f.fn.qtip.log.error.call(s,2,"newWidth must be of type number","updateWidth")}}x=s.elements.contentWrapper.siblings().add(s.elements.tip).add(s.elements.button);if(!w){if(typeof s.options.style.width.value=="number"){w=s.options.style.width.value}else{s.elements.tooltip.css({width:"auto"});x.hide();if(f.browser.msie){s.elements.wrapper.add(s.elements.contentWrapper.children()).css({zoom:"normal"})}w=s.getDimensions().width+1;if(!s.options.style.width.value){if(w>s.options.style.width.max){w=s.options.style.width.max}if(w<s.options.style.width.min){w=s.options.style.width.min}}}}if(w%2!==0){w-=1}s.elements.tooltip.width(w);x.show();if(s.options.style.border.radius){s.elements.tooltip.find(".qtip-betweenCorners").each(function(y){f(this).width(w-(s.options.style.border.radius*2))})}if(f.browser.msie){s.elements.wrapper.add(s.elements.contentWrapper.children()).css({zoom:"1"});s.elements.wrapper.width(w);if(s.elements.bgiframe){s.elements.bgiframe.width(w).height(s.getDimensions.height)}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_WIDTH_UPDATED,"updateWidth")},updateStyle:function(w){var z,A,x,y,B;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateStyle")}else{if(typeof w!=="string"||!f.fn.qtip.styles[w]){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.STYLE_NOT_DEFINED,"updateStyle")}}s.options.style=a.call(s,f.fn.qtip.styles[w],s.options.user.style);s.elements.content.css(q(s.options.style));if(s.options.content.title.text!==false){s.elements.title.css(q(s.options.style.title,true))}s.elements.contentWrapper.css({borderColor:s.options.style.border.color});if(s.options.style.tip.corner!==false){if(f("<canvas>").get(0).getContext){z=s.elements.tooltip.find(".qtip-tip canvas:first");x=z.get(0).getContext("2d");x.clearRect(0,0,300,300);y=z.parent("div[rel]:first").attr("rel");B=b(y,s.options.style.tip.size.width,s.options.style.tip.size.height);h.call(s,z,B,s.options.style.tip.color||s.options.style.border.color)}else{if(f.browser.msie){z=s.elements.tooltip.find('.qtip-tip [nodeName="shape"]');z.attr("fillcolor",s.options.style.tip.color||s.options.style.border.color)}}}if(s.options.style.border.radius>0){s.elements.tooltip.find(".qtip-betweenCorners").css({backgroundColor:s.options.style.border.color});if(f("<canvas>").get(0).getContext){A=g(s.options.style.border.radius);s.elements.tooltip.find(".qtip-wrapper canvas").each(function(){x=f(this).get(0).getContext("2d");x.clearRect(0,0,300,300);y=f(this).parent("div[rel]:first").attr("rel");r.call(s,f(this),A[y],s.options.style.border.radius,s.options.style.border.color)})}else{if(f.browser.msie){s.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){f(this).attr("fillcolor",s.options.style.border.color)})}}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_STYLE_UPDATED,"updateStyle")},updateContent:function(A,y){var z,x,w;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateContent")}else{if(!A){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateContent")}}z=s.beforeContentUpdate.call(s,A);if(typeof z=="string"){A=z}else{if(z===false){return}}if(f.browser.msie){s.elements.contentWrapper.children().css({zoom:"normal"})}if(A.jquery&&A.length>0){A.clone(true).appendTo(s.elements.content).show()}else{s.elements.content.html(A)}x=s.elements.content.find("img[complete=false]");if(x.length>0){w=0;x.each(function(C){f('<img src="'+f(this).attr("src")+'" />').load(function(){if(++w==x.length){B()}})})}else{B()}function B(){s.updateWidth();if(y!==false){if(s.options.position.type!=="static"){s.updatePosition(s.elements.tooltip.is(":visible"),true)}if(s.options.style.tip.corner!==false){n.call(s)}}}s.onContentUpdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_CONTENT_UPDATED,"loadContent")},loadContent:function(w,z,A){var y;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"loadContent")}y=s.beforeContentLoad.call(s);if(y===false){return s}if(A=="post"){f.post(w,z,x)}else{f.get(w,z,x)}function x(B){s.onContentLoad.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_CONTENT_LOADED,"loadContent");s.updateContent(B)}return s},updateTitle:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateTitle")}else{if(!w){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateTitle")}}returned=s.beforeTitleUpdate.call(s);if(returned===false){return s}if(s.elements.button){s.elements.button=s.elements.button.clone(true)}s.elements.title.html(w);if(s.elements.button){s.elements.title.prepend(s.elements.button)}s.onTitleUpdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_TITLE_UPDATED,"updateTitle")},focus:function(A){var y,x,w,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"focus")}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.CANNOT_FOCUS_STATIC,"focus")}}y=parseInt(s.elements.tooltip.css("z-index"));x=6000+f("div.qtip[qtip]").length-1;if(!s.status.focused&&y!==x){z=s.beforeFocus.call(s,A);if(z===false){return s}f("div.qtip[qtip]").not(s.elements.tooltip).each(function(){if(f(this).qtip("api").status.rendered===true){w=parseInt(f(this).css("z-index"));if(typeof w=="number"&&w>-1){f(this).css({zIndex:parseInt(f(this).css("z-index"))-1})}f(this).qtip("api").status.focused=false}});s.elements.tooltip.css({zIndex:x});s.status.focused=true;s.onFocus.call(s,A);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_FOCUSED,"focus")}return s},disable:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"disable")}if(w){if(!s.status.disabled){s.status.disabled=true;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_DISABLED,"disable")}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,"disable")}}else{if(s.status.disabled){s.status.disabled=false;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_ENABLED,"disable")}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,"disable")}}return s},destroy:function(){var w,x,y;x=s.beforeDestroy.call(s);if(x===false){return s}if(s.status.rendered){s.options.show.when.target.unbind("mousemove.qtip",s.updatePosition);s.options.show.when.target.unbind("mouseout.qtip",s.hide);s.options.show.when.target.unbind(s.options.show.when.event+".qtip");s.options.hide.when.target.unbind(s.options.hide.when.event+".qtip");s.elements.tooltip.unbind(s.options.hide.when.event+".qtip");s.elements.tooltip.unbind("mouseover.qtip",s.focus);s.elements.tooltip.remove()}else{s.options.show.when.target.unbind(s.options.show.when.event+".qtip-create")}if(typeof s.elements.target.data("qtip")=="object"){y=s.elements.target.data("qtip").interfaces;if(typeof y=="object"&&y.length>0){for(w=0;w<y.length-1;w++){if(y[w].id==s.id){y.splice(w,1)}}}}delete f.fn.qtip.interfaces[s.id];if(typeof y=="object"&&y.length>0){s.elements.target.data("qtip").current=y.length-1}else{s.elements.target.removeData("qtip")}s.onDestroy.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_DESTROYED,"destroy");return s.elements.target},getPosition:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getPosition")}w=(s.elements.tooltip.css("display")!=="none")?false:true;if(w){s.elements.tooltip.css({visiblity:"hidden"}).show()}x=s.elements.tooltip.offset();if(w){s.elements.tooltip.css({visiblity:"visible"}).hide()}return x},getDimensions:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getDimensions")}w=(!s.elements.tooltip.is(":visible"))?true:false;if(w){s.elements.tooltip.css({visiblity:"hidden"}).show()}x={height:s.elements.tooltip.outerHeight(),width:s.elements.tooltip.outerWidth()};if(w){s.elements.tooltip.css({visiblity:"visible"}).hide()}return x}})}function p(){var s,w,u,t,v,y,x;s=this;s.beforeRender.call(s);s.status.rendered=true;s.elements.tooltip='<div qtip="'+s.id+'" class="qtip '+(s.options.style.classes.tooltip||s.options.style)+'"style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;position:'+s.options.position.type+';">  <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;">    <div class="qtip-contentWrapper" style="overflow:hidden;">       <div class="qtip-content '+s.options.style.classes.content+'"></div></div></div></div>';s.elements.tooltip=f(s.elements.tooltip);s.elements.tooltip.appendTo(s.options.position.container);s.elements.tooltip.data("qtip",{current:0,interfaces:[s]});s.elements.wrapper=s.elements.tooltip.children("div:first");s.elements.contentWrapper=s.elements.wrapper.children("div:first").css({background:s.options.style.background});s.elements.content=s.elements.contentWrapper.children("div:first").css(q(s.options.style));if(f.browser.msie){s.elements.wrapper.add(s.elements.content).css({zoom:1})}if(s.options.hide.when.event=="unfocus"){s.elements.tooltip.attr("unfocus",true)}if(typeof s.options.style.width.value=="number"){s.updateWidth()}if(f("<canvas>").get(0).getContext||f.browser.msie){if(s.options.style.border.radius>0){m.call(s)}else{s.elements.contentWrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color})}if(s.options.style.tip.corner!==false){e.call(s)}}else{s.elements.contentWrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color});s.options.style.border.radius=0;s.options.style.tip.corner=false;f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,"render")}if((typeof s.options.content.text=="string"&&s.options.content.text.length>0)||(s.options.content.text.jquery&&s.options.content.text.length>0)){u=s.options.content.text}else{if(typeof s.elements.target.attr("title")=="string"&&s.elements.target.attr("title").length>0){u=s.elements.target.attr("title").replace("\\n","<br />");s.elements.target.attr("title","")}else{if(typeof s.elements.target.attr("alt")=="string"&&s.elements.target.attr("alt").length>0){u=s.elements.target.attr("alt").replace("\\n","<br />");s.elements.target.attr("alt","")}else{u=" ";f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.NO_VALID_CONTENT,"render")}}}if(s.options.content.title.text!==false){j.call(s)}s.updateContent(u);l.call(s);if(s.options.show.ready===true){s.show()}if(s.options.content.url!==false){t=s.options.content.url;v=s.options.content.data;y=s.options.content.method||"get";s.loadContent(t,v,y)}s.onRender.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_RENDERED,"render")}function m(){var F,z,t,B,x,E,u,G,D,y,w,C,A,s,v;F=this;F.elements.wrapper.find(".qtip-borderBottom, .qtip-borderTop").remove();t=F.options.style.border.width;B=F.options.style.border.radius;x=F.options.style.border.color||F.options.style.tip.color;E=g(B);u={};for(z in E){u[z]='<div rel="'+z+'" style="'+((z.search(/Left/)!==-1)?"left":"right")+":0; position:absolute; height:"+B+"px; width:"+B+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if(f("<canvas>").get(0).getContext){u[z]+='<canvas height="'+B+'" width="'+B+'" style="vertical-align: top"></canvas>'}else{if(f.browser.msie){G=B*2+3;u[z]+='<v:arc stroked="false" fillcolor="'+x+'" startangle="'+E[z][0]+'" endangle="'+E[z][1]+'" style="width:'+G+"px; height:"+G+"px; margin-top:"+((z.search(/bottom/)!==-1)?-2:-1)+"px; margin-left:"+((z.search(/Right/)!==-1)?E[z][2]-3.5:-1)+'px; vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>'}}u[z]+="</div>"}D=F.getDimensions().width-(Math.max(t,B)*2);y='<div class="qtip-betweenCorners" style="height:'+B+"px; width:"+D+"px; overflow:hidden; background-color:"+x+'; line-height:0.1px; font-size:1px;">';w='<div class="qtip-borderTop" dir="ltr" style="height:'+B+"px; margin-left:"+B+'px; line-height:0.1px; font-size:1px; padding:0;">'+u.topLeft+u.topRight+y;F.elements.wrapper.prepend(w);C='<div class="qtip-borderBottom" dir="ltr" style="height:'+B+"px; margin-left:"+B+'px; line-height:0.1px; font-size:1px; padding:0;">'+u.bottomLeft+u.bottomRight+y;F.elements.wrapper.append(C);if(f("<canvas>").get(0).getContext){F.elements.wrapper.find("canvas").each(function(){A=E[f(this).parent("[rel]:first").attr("rel")];r.call(F,f(this),A,B,x)})}else{if(f.browser.msie){F.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>')}}s=Math.max(B,(B+(t-B)));v=Math.max(t-B,0);F.elements.contentWrapper.css({border:"0px solid "+x,borderWidth:v+"px "+s+"px"})}function r(u,w,s,t){var v=u.get(0).getContext("2d");v.fillStyle=t;v.beginPath();v.arc(w[0],w[1],s,0,Math.PI*2,false);v.fill()}function e(v){var t,s,x,u,w;t=this;if(t.elements.tip!==null){t.elements.tip.remove()}s=t.options.style.tip.color||t.options.style.border.color;if(t.options.style.tip.corner===false){return}else{if(!v){v=t.options.style.tip.corner}}x=b(v,t.options.style.tip.size.width,t.options.style.tip.size.height);t.elements.tip='<div class="'+t.options.style.classes.tip+'" dir="ltr" rel="'+v+'" style="position:absolute; height:'+t.options.style.tip.size.height+"px; width:"+t.options.style.tip.size.width+'px; margin:0 auto; line-height:0.1px; font-size:1px;">';if(f("<canvas>").get(0).getContext){t.elements.tip+='<canvas height="'+t.options.style.tip.size.height+'" width="'+t.options.style.tip.size.width+'"></canvas>'}else{if(f.browser.msie){u=t.options.style.tip.size.width+","+t.options.style.tip.size.height;w="m"+x[0][0]+","+x[0][1];w+=" l"+x[1][0]+","+x[1][1];w+=" "+x[2][0]+","+x[2][1];w+=" xe";t.elements.tip+='<v:shape fillcolor="'+s+'" stroked="false" filled="true" path="'+w+'" coordsize="'+u+'" style="width:'+t.options.style.tip.size.width+"px; height:"+t.options.style.tip.size.height+"px; line-height:0.1px; display:inline-block; behavior:url(#default#VML); vertical-align:"+((v.search(/top/)!==-1)?"bottom":"top")+'"></v:shape>';t.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';t.elements.contentWrapper.css("position","relative")}}t.elements.tooltip.prepend(t.elements.tip+"</div>");t.elements.tip=t.elements.tooltip.find("."+t.options.style.classes.tip).eq(0);if(f("<canvas>").get(0).getContext){h.call(t,t.elements.tip.find("canvas:first"),x,s)}if(v.search(/top/)!==-1&&f.browser.msie&&parseInt(f.browser.version.charAt(0))===6){t.elements.tip.css({marginTop:-4})}n.call(t,v)}function h(t,v,s){var u=t.get(0).getContext("2d");u.fillStyle=s;u.beginPath();u.moveTo(v[0][0],v[0][1]);u.lineTo(v[1][0],v[1][1]);u.lineTo(v[2][0],v[2][1]);u.fill()}function n(u){var t,w,s,x,v;t=this;if(t.options.style.tip.corner===false||!t.elements.tip){return}if(!u){u=t.elements.tip.attr("rel")}w=positionAdjust=(f.browser.msie)?1:0;t.elements.tip.css(u.match(/left|right|top|bottom/)[0],0);if(u.search(/top|bottom/)!==-1){if(f.browser.msie){if(parseInt(f.browser.version.charAt(0))===6){positionAdjust=(u.search(/top/)!==-1)?-3:1}else{positionAdjust=(u.search(/top/)!==-1)?1:2}}if(u.search(/Middle/)!==-1){t.elements.tip.css({left:"50%",marginLeft:-(t.options.style.tip.size.width/2)})}else{if(u.search(/Left/)!==-1){t.elements.tip.css({left:t.options.style.border.radius-w})}else{if(u.search(/Right/)!==-1){t.elements.tip.css({right:t.options.style.border.radius+w})}}}if(u.search(/top/)!==-1){t.elements.tip.css({top:-positionAdjust})}else{t.elements.tip.css({bottom:positionAdjust})}}else{if(u.search(/left|right/)!==-1){if(f.browser.msie){positionAdjust=(parseInt(f.browser.version.charAt(0))===6)?1:((u.search(/left/)!==-1)?1:2)}if(u.search(/Middle/)!==-1){t.elements.tip.css({top:"50%",marginTop:-(t.options.style.tip.size.height/2)})}else{if(u.search(/Top/)!==-1){t.elements.tip.css({top:t.options.style.border.radius-w})}else{if(u.search(/Bottom/)!==-1){t.elements.tip.css({bottom:t.options.style.border.radius+w})}}}if(u.search(/left/)!==-1){t.elements.tip.css({left:-positionAdjust})}else{t.elements.tip.css({right:positionAdjust})}}}s="padding-"+u.match(/left|right|top|bottom/)[0];x=t.options.style.tip.size[(s.search(/left|right/)!==-1)?"width":"height"];t.elements.tooltip.css("padding",0);t.elements.tooltip.css(s,x);if(f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){v=parseInt(t.elements.tip.css("margin-top"))||0;v+=parseInt(t.elements.content.css("margin-top"))||0;t.elements.tip.css({marginTop:v})}}function j(){var s=this;if(s.elements.title!==null){s.elements.title.remove()}s.elements.title=f('<div class="'+s.options.style.classes.title+'">').css(q(s.options.style.title,true)).css({zoom:(f.browser.msie)?1:0}).prependTo(s.elements.contentWrapper);if(s.options.content.title.text){s.updateTitle.call(s,s.options.content.title.text)}if(s.options.content.title.button!==false&&typeof s.options.content.title.button=="string"){s.elements.button=f('<a class="'+s.options.style.classes.button+'" style="float:right; position: relative"></a>').css(q(s.options.style.button,true)).html(s.options.content.title.button).prependTo(s.elements.title).click(function(t){if(!s.status.disabled){s.hide(t)}})}}function l(){var t,v,u,s;t=this;v=t.options.show.when.target;u=t.options.hide.when.target;if(t.options.hide.fixed){u=u.add(t.elements.tooltip)}if(t.options.hide.when.event=="inactive"){s=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"];function y(z){if(t.status.disabled===true){return}clearTimeout(t.timers.inactive);t.timers.inactive=setTimeout(function(){f(s).each(function(){u.unbind(this+".qtip-inactive");t.elements.content.unbind(this+".qtip-inactive")});t.hide(z)},t.options.hide.delay)}}else{if(t.options.hide.fixed===true){t.elements.tooltip.bind("mouseover.qtip",function(){if(t.status.disabled===true){return}clearTimeout(t.timers.hide)})}}function x(z){if(t.status.disabled===true){return}if(t.options.hide.when.event=="inactive"){f(s).each(function(){u.bind(this+".qtip-inactive",y);t.elements.content.bind(this+".qtip-inactive",y)});y()}clearTimeout(t.timers.show);clearTimeout(t.timers.hide);t.timers.show=setTimeout(function(){t.show(z)},t.options.show.delay)}function w(z){if(t.status.disabled===true){return}if(t.options.hide.fixed===true&&t.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&f(z.relatedTarget).parents("div.qtip[qtip]").length>0){z.stopPropagation();z.preventDefault();clearTimeout(t.timers.hide);return false}clearTimeout(t.timers.show);clearTimeout(t.timers.hide);t.elements.tooltip.stop(true,true);t.timers.hide=setTimeout(function(){t.hide(z)},t.options.hide.delay)}if((t.options.show.when.target.add(t.options.hide.when.target).length===1&&t.options.show.when.event==t.options.hide.when.event&&t.options.hide.when.event!=="inactive")||t.options.hide.when.event=="unfocus"){t.cache.toggle=0;v.bind(t.options.show.when.event+".qtip",function(z){if(t.cache.toggle==0){x(z)}else{w(z)}})}else{v.bind(t.options.show.when.event+".qtip",x);if(t.options.hide.when.event!=="inactive"){u.bind(t.options.hide.when.event+".qtip",w)}}if(t.options.position.type.search(/(fixed|absolute)/)!==-1){t.elements.tooltip.bind("mouseover.qtip",t.focus)}if(t.options.position.target==="mouse"&&t.options.position.type!=="static"){v.bind("mousemove.qtip",function(z){t.cache.mouse={x:z.pageX,y:z.pageY};if(t.status.disabled===false&&t.options.position.adjust.mouse===true&&t.options.position.type!=="static"&&t.elements.tooltip.css("display")!=="none"){t.updatePosition(z)}})}}function o(u,v,A){var z,s,x,y,t,w;z=this;if(A.corner=="center"){return v.position}s=f.extend({},u);y={x:false,y:false};t={left:(s.left<f.fn.qtip.cache.screen.scroll.left),right:(s.left+A.dimensions.width+2>=f.fn.qtip.cache.screen.width+f.fn.qtip.cache.screen.scroll.left),top:(s.top<f.fn.qtip.cache.screen.scroll.top),bottom:(s.top+A.dimensions.height+2>=f.fn.qtip.cache.screen.height+f.fn.qtip.cache.screen.scroll.top)};x={left:(t.left&&(A.corner.search(/right/i)!=-1||(A.corner.search(/right/i)==-1&&!t.right))),right:(t.right&&(A.corner.search(/left/i)!=-1||(A.corner.search(/left/i)==-1&&!t.left))),top:(t.top&&A.corner.search(/top/i)==-1),bottom:(t.bottom&&A.corner.search(/bottom/i)==-1)};if(x.left){if(z.options.position.target!=="mouse"){s.left=v.position.left+v.dimensions.width}else{s.left=z.cache.mouse.x}y.x="Left"}else{if(x.right){if(z.options.position.target!=="mouse"){s.left=v.position.left-A.dimensions.width}else{s.left=z.cache.mouse.x-A.dimensions.width}y.x="Right"}}if(x.top){if(z.options.position.target!=="mouse"){s.top=v.position.top+v.dimensions.height}else{s.top=z.cache.mouse.y}y.y="top"}else{if(x.bottom){if(z.options.position.target!=="mouse"){s.top=v.position.top-A.dimensions.height}else{s.top=z.cache.mouse.y-A.dimensions.height}y.y="bottom"}}if(s.left<0){s.left=u.left;y.x=false}if(s.top<0){s.top=u.top;y.y=false}if(z.options.style.tip.corner!==false){s.corner=new String(A.corner);if(y.x!==false){s.corner=s.corner.replace(/Left|Right|Middle/,y.x)}if(y.y!==false){s.corner=s.corner.replace(/top|bottom/,y.y)}if(s.corner!==z.elements.tip.attr("rel")){e.call(z,s.corner)}}return s}function q(u,t){var v,s;v=f.extend(true,{},u);for(s in v){if(t===true&&s.search(/(tip|classes)/i)!==-1){delete v[s]}else{if(!t&&s.search(/(width|border|tip|title|classes|user)/i)!==-1){delete v[s]}}}return v}function c(s){if(typeof s.tip!=="object"){s.tip={corner:s.tip}}if(typeof s.tip.size!=="object"){s.tip.size={width:s.tip.size,height:s.tip.size}}if(typeof s.border!=="object"){s.border={width:s.border}}if(typeof s.width!=="object"){s.width={value:s.width}}if(typeof s.width.max=="string"){s.width.max=parseInt(s.width.max.replace(/([0-9]+)/i,"$1"))}if(typeof s.width.min=="string"){s.width.min=parseInt(s.width.min.replace(/([0-9]+)/i,"$1"))}if(typeof s.tip.size.x=="number"){s.tip.size.width=s.tip.size.x;delete s.tip.size.x}if(typeof s.tip.size.y=="number"){s.tip.size.height=s.tip.size.y;delete s.tip.size.y}return s}function a(){var s,t,u,x,v,w;s=this;u=[true,{}];for(t=0;t<arguments.length;t++){u.push(arguments[t])}x=[f.extend.apply(f,u)];while(typeof x[0].name=="string"){x.unshift(c(f.fn.qtip.styles[x[0].name]))}x.unshift(true,{classes:{tooltip:"qtip-"+(arguments[0].name||"defaults")}},f.fn.qtip.styles.defaults);v=f.extend.apply(f,x);w=(f.browser.msie)?1:0;v.tip.size.width+=w;v.tip.size.height+=w;if(v.tip.size.width%2>0){v.tip.size.width+=1}if(v.tip.size.height%2>0){v.tip.size.height+=1}if(v.tip.corner===true){v.tip.corner=(s.options.position.corner.tooltip==="center")?false:s.options.position.corner.tooltip}return v}function b(v,u,t){var s={bottomRight:[[0,0],[u,t],[u,0]],bottomLeft:[[0,0],[u,0],[0,t]],topRight:[[0,t],[u,0],[u,t]],topLeft:[[0,0],[0,t],[u,t]],topMiddle:[[0,t],[u/2,0],[u,t]],bottomMiddle:[[0,0],[u,0],[u/2,t]],rightMiddle:[[0,0],[u,t/2],[0,t]],leftMiddle:[[u,0],[u,t],[0,t/2]]};s.leftTop=s.bottomRight;s.rightTop=s.bottomLeft;s.leftBottom=s.topRight;s.rightBottom=s.topLeft;return s[v]}function g(s){var t;if(f("<canvas>").get(0).getContext){t={topLeft:[s,s],topRight:[0,s],bottomLeft:[s,0],bottomRight:[0,0]}}else{if(f.browser.msie){t={topLeft:[-90,90,0],topRight:[-90,90,-s],bottomLeft:[90,270,0],bottomRight:[90,270,-s]}}}return t}function k(){var s,t,u;s=this;u=s.getDimensions();t='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; height:'+u.height+"px; width:"+u.width+'px" />';s.elements.bgiframe=s.elements.wrapper.prepend(t).children(".qtip-bgiframe:first")}f(document).ready(function(){f.fn.qtip.cache={screen:{scroll:{left:f(window).scrollLeft(),top:f(window).scrollTop()},width:f(window).width(),height:f(window).height()}};var s;f(window).bind("resize scroll",function(t){clearTimeout(s);s=setTimeout(function(){if(t.type==="scroll"){f.fn.qtip.cache.screen.scroll={left:f(window).scrollLeft(),top:f(window).scrollTop()}}else{f.fn.qtip.cache.screen.width=f(window).width();f.fn.qtip.cache.screen.height=f(window).height()}for(i=0;i<f.fn.qtip.interfaces.length;i++){var u=f.fn.qtip.interfaces[i];if(u.status.rendered===true&&(u.options.position.type!=="static"||u.options.position.adjust.scroll&&t.type==="scroll"||u.options.position.adjust.resize&&t.type==="resize")){u.updatePosition(t,true)}}},100)});f(document).bind("mousedown.qtip",function(t){if(f(t.target).parents("div.qtip").length===0){f(".qtip[unfocus]").each(function(){var u=f(this).qtip("api");if(f(this).is(":visible")&&!u.status.disabled&&f(t.target).add(u.elements.target).length>1){u.hide(t)}})}})});f.fn.qtip.interfaces=[];f.fn.qtip.log={error:function(){return this}};f.fn.qtip.constants={};f.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:"bottomRight",tooltip:"topLeft"},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:"absolute",container:false},show:{when:{target:false,event:"mouseover"},effect:{type:"fade",length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:"mouseout"},effect:{type:"fade",length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};f.fn.qtip.styles={defaults:{background:"white",color:"#111",overflow:"hidden",textAlign:"left",width:{min:0,max:250},padding:"5px 9px",border:{width:1,radius:0,color:"#d3d3d3"},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},button:{cursor:"pointer"},classes:{target:"",tip:"qtip-tip",title:"qtip-title",button:"qtip-button",content:"qtip-content",active:"qtip-active"}},cream:{border:{width:3,radius:0,color:"#F9E98E"},title:{background:"#F0DE7D",color:"#A27D35"},background:"#FBF7AA",color:"#A27D35",classes:{tooltip:"qtip-cream"}},light:{border:{width:3,radius:0,color:"#E2E2E2"},title:{background:"#f1f1f1",color:"#454545"},background:"white",color:"#454545",classes:{tooltip:"qtip-light"}},dark:{border:{width:3,radius:0,color:"#303030"},title:{background:"#404040",color:"#f3f3f3"},background:"#505050",color:"#f3f3f3",classes:{tooltip:"qtip-dark"}},red:{border:{width:3,radius:0,color:"#CE6F6F"},title:{background:"#f28279",color:"#9C2F2F"},background:"#F79992",color:"#9C2F2F",classes:{tooltip:"qtip-red"}},green:{border:{width:3,radius:0,color:"#A9DB66"},title:{background:"#b9db8c",color:"#58792E"},background:"#CDE6AC",color:"#58792E",classes:{tooltip:"qtip-green"}},blue:{border:{width:3,radius:0,color:"#ADD9ED"},title:{background:"#D0E9F5",color:"#5E99BD"},background:"#E5F6FE",color:"#4D9FBF",classes:{tooltip:"qtip-blue"}}}})(jQuery);







/*
 jQCloud 2.0.1
 Copyright 2011 Luca Ongaro (http://www.lucaongaro.eu)
 Copyright 2013 Daniel White (http://www.developerdan.com)
 Copyright 2014 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
 Licensed under MIT (http://opensource.org/licenses/MIT)
*/
(function($){var jQCloud=function(element,word_array,options){this.$element=$(element);this.word_array=word_array||[];this.options=options;this.sizeGenerator=null;this.colorGenerator=null;this.data={placed_words:[],timeouts:{},namespace:null,step:null,angle:null,aspect_ratio:null,max_weight:null,min_weight:null,sizes:[],colors:[]};this.initialize()};jQCloud.DEFAULTS={width:100,height:100,center:{x:.5,y:.5},steps:10,delay:null,shape:"elliptic",classPattern:"w{n}",encodeURI:true,removeOverflowing:true,
afterCloudRender:null,autoResize:false,colors:null,fontSize:null,template:null};jQCloud.prototype={initialize:function(){if(this.options.width)this.$element.width(this.options.width);else this.options.width=this.$element.width();if(this.options.height)this.$element.height(this.options.height);else this.options.height=this.$element.height();this.options=$.extend(true,{},jQCloud.DEFAULTS,this.options);if(this.options.delay===null)this.options.delay=this.word_array.length>50?10:0;if(this.options.center.x>
1){this.options.center.x=this.options.center.x/this.options.width;this.options.center.y=this.options.center.y/this.options.height}if(typeof this.options.colors=="function")this.colorGenerator=this.options.colors;else if($.isArray(this.options.colors)){var cl=this.options.colors.length;if(cl>0){if(cl<this.options.steps)for(var i=cl;i<this.options.steps;i++)this.options.colors[i]=this.options.colors[cl-1];this.colorGenerator=function(weight){return this.options.colors[this.options.steps-weight]}}}if(typeof this.options.fontSize==
"function")this.sizeGenerator=this.options.fontSize;else if($.isPlainObject(this.options.fontSize))this.sizeGenerator=function(width,height,weight){var max=width*this.options.fontSize.from,min=width*this.options.fontSize.to;return Math.round(min+(max-min)*1/(this.options.steps-1)*(weight-1))+"px"};else if($.isArray(this.options.fontSize)){var sl=this.options.fontSize.length;if(sl>0){if(sl<this.options.steps)for(var j=sl;j<this.options.steps;j++)this.options.fontSize[j]=this.options.fontSize[sl-1];
this.sizeGenerator=function(width,height,weight){return this.options.fontSize[this.options.steps-weight]}}}this.data.angle=Math.random()*6.28;this.data.step=this.options.shape==="rectangular"?18:2;this.data.aspect_ratio=this.options.width/this.options.height;this.clearTimeouts();this.data.namespace=(this.$element.attr("id")||Math.floor(Math.random()*1E6).toString(36))+"_word_";this.$element.addClass("jqcloud");if(this.$element.css("position")==="static")this.$element.css("position","relative");this.createTimeout($.proxy(this.drawWordCloud,
this),10);if(this.options.autoResize)$(window).on("resize",throttle(function(){var new_size={width:this.$element.width(),height:this.$element.height()};if(new_size.width!=this.options.width||new_size.height!=this.options.height){this.options.width=new_size.width;this.options.height=new_size.height;this.data.aspect_ratio=this.options.width/this.options.height;this.update(this.word_array)}},50,this))},createTimeout:function(callback,time){var timeout=setTimeout($.proxy(function(){delete this.data.timeouts[timeout];
callback()},this),time);this.data.timeouts[timeout]=true},clearTimeouts:function(){$.each(this.data.timeouts,function(key){clearTimeout(key)});this.data.timeouts={}},overlapping:function(a,b){if(Math.abs(2*a.left+a.width-2*b.left-b.width)<a.width+b.width)if(Math.abs(2*a.top+a.height-2*b.top-b.height)<a.height+b.height)return true;return false},hitTest:function(elem){for(var i=0,l=this.data.placed_words.length;i<l;i++)if(this.overlapping(elem,this.data.placed_words[i]))return true;return false},drawWordCloud:function(){var i,
l;this.$element.children('[id^\x3d"'+this.data.namespace+'"]').remove();if(this.word_array.length===0)return;for(i=0,l=this.word_array.length;i<l;i++)this.word_array[i].weight=parseFloat(this.word_array[i].weight,10);this.word_array.sort(function(a,b){return b.weight-a.weight});this.data.max_weight=this.word_array[0].weight;this.data.min_weight=this.word_array[this.word_array.length-1].weight;this.data.colors=[];if(this.colorGenerator)for(i=0;i<this.options.steps;i++)this.data.colors.push(this.colorGenerator(i+
1));this.data.sizes=[];if(this.sizeGenerator)for(i=0;i<this.options.steps;i++)this.data.sizes.push(this.sizeGenerator(this.options.width,this.options.height,i+1));if(this.options.delay>0)this.drawOneWordDelayed();else{for(i=0,l=this.word_array.length;i<l;i++)this.drawOneWord(i,this.word_array[i]);if(typeof this.options.afterCloudRender==="function")this.options.afterCloudRender.call(this.$element)}},drawOneWord:function(index,word){var word_id=this.data.namespace+index,word_selector="#"+word_id,angle=
this.data.angle,radius=0,steps_in_direction=0,quarter_turns=0,weight=Math.floor(this.options.steps/2),word_span,word_size,word_style;word.attr=$.extend({},word.html,{id:word_id});if(this.data.max_weight!=this.data.min_weight)weight=Math.round((word.weight-this.data.min_weight)*1*(this.options.steps-1)/(this.data.max_weight-this.data.min_weight))+1;word_span=$("\x3cspan\x3e").attr(word.attr);if(this.options.classPattern)word_span.addClass(this.options.classPattern.replace("{n}",weight));if(this.data.colors.length)word_span.css("color",
this.data.colors[weight-1]);if(this.data.sizes.length)word_span.css("font-size",this.data.sizes[weight-1]);if(this.options.template)word_span.html(this.options.template(word));else if(word.link){if(typeof word.link==="string")word.link={href:word.link};if(this.options.encodeURI)word.link.href=encodeURI(word.link.href).replace(/'/g,"%27");word_span.append($("\x3ca\x3e").attr(word.link).text(word.text))}else word_span.text(word.text);if(word.handlers)word_span.on(word.handlers);this.$element.append(word_span);
word_size={width:word_span.width(),height:word_span.height()};word_size.left=this.options.center.x*this.options.width-word_size.width/2;word_size.top=this.options.center.y*this.options.height-word_size.height/2;word_style=word_span[0].style;word_style.position="absolute";word_style.left=word_size.left+"px";word_style.top=word_size.top+"px";while(this.hitTest(word_size)){if(this.options.shape==="rectangular"){steps_in_direction++;if(steps_in_direction*this.data.step>(1+Math.floor(quarter_turns/2))*
this.data.step*(quarter_turns%4%2===0?1:this.data.aspect_ratio)){steps_in_direction=0;quarter_turns++}switch(quarter_turns%4){case 1:word_size.left+=this.data.step*this.data.aspect_ratio+Math.random()*2;break;case 2:word_size.top-=this.data.step+Math.random()*2;break;case 3:word_size.left-=this.data.step*this.data.aspect_ratio+Math.random()*2;break;case 0:word_size.top+=this.data.step+Math.random()*2;break}}else{radius+=this.data.step;angle+=(index%2===0?1:-1)*this.data.step;word_size.left=this.options.center.x*
this.options.width-word_size.width/2+radius*Math.cos(angle)*this.data.aspect_ratio;word_size.top=this.options.center.y*this.options.height+radius*Math.sin(angle)-word_size.height/2}word_style.left=word_size.left+"px";word_style.top=word_size.top+"px"}if(this.options.removeOverflowing&&(word_size.left<0||word_size.top<0||word_size.left+word_size.width>this.options.width||word_size.top+word_size.height>this.options.height)){word_span.remove();return}this.data.placed_words.push(word_size);if(typeof word.afterWordRender===
"function")word.afterWordRender.call(word_span)},drawOneWordDelayed:function(index){index=index||0;if(!this.$element.is(":visible")){this.createTimeout($.proxy(function(){this.drawOneWordDelayed(index)},this),10);return}if(index<this.word_array.length){this.drawOneWord(index,this.word_array[index]);this.createTimeout($.proxy(function(){this.drawOneWordDelayed(index+1)},this),this.options.delay)}else if(typeof this.options.afterCloudRender=="function")this.options.afterCloudRender.call(this.$element)},
destroy:function(){this.clearTimeouts();this.$element.removeClass("jqcloud");this.$element.removeData("jqcloud");this.$element.children('[id^\x3d"'+this.namespace+'"]').remove()},update:function(word_array){this.word_array=word_array;this.data.placed_words=[];this.clearTimeouts();this.drawWordCloud()}};function throttle(callback,delay,context){var state={pid:null,last:0};return function(){var elapsed=(new Date).getTime()-state.last,args=arguments,that=this;function exec(){state.last=(new Date).getTime();
return callback.apply(context||that,Array.prototype.slice.call(args))}if(elapsed>delay)return exec();else{clearTimeout(state.pid);state.pid=setTimeout(exec,delay-elapsed)}}}$.fn.jQCloud=function(word_array,option){var args=arguments;return this.each(function(){var $this=$(this),data=$this.data("jqcloud");if(!data&&word_array==="destroy")return;if(!data){var options=typeof option==="object"?option:{};$this.data("jqcloud",data=new jQCloud(this,word_array,options))}else if(typeof word_array==="string")data[word_array].apply(data,
Array.prototype.slice.call(args,1))})};$.fn.jQCloud.defaults={set:function(options){$.extend(true,jQCloud.DEFAULTS,options)},get:function(key){var options=jQCloud.DEFAULTS;if(key)options=options[key];return $.extend(true,{},options)}}})(jQuery);
/*
 * angular-ui-bootstrap
 * http://angular-ui.github.io/bootstrap/

 * Version: 0.14.3 - 2015-10-23
 * License: MIT
 */
angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","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-popup.html","template/tooltip/tooltip-popup.html","template/tooltip/tooltip-template-popup.html","template/popover/popover-html.html","template/popover/popover-template.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.collapse",[]).directive("uibCollapse",["$animate","$injector",function(a,b){var c=b.has("$animateCss")?b.get("$animateCss"):null;return{link:function(b,d,e){function f(){d.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),c?c(d,{addClass:"in",easing:"ease",to:{height:d[0].scrollHeight+"px"}}).start()["finally"](g):a.addClass(d,"in",{to:{height:d[0].scrollHeight+"px"}}).then(g)}function g(){d.removeClass("collapsing").addClass("collapse").css({height:"auto"})}function h(){return d.hasClass("collapse")||d.hasClass("in")?(d.css({height:d[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void(c?c(d,{removeClass:"in",to:{height:"0"}}).start()["finally"](i):a.removeClass(d,"in",{to:{height:"0"}}).then(i))):i()}function i(){d.css({height:"0"}),d.removeClass("collapsing").addClass("collapse")}b.$watch(e.uibCollapse,function(a){a?h():f()})}}}]),angular.module("ui.bootstrap.collapse").value("$collapseSuppressWarning",!1).directive("collapse",["$animate","$injector","$log","$collapseSuppressWarning",function(a,b,c,d){var e=b.has("$animateCss")?b.get("$animateCss"):null;return{link:function(b,f,g){function h(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start().done(i):a.animate(f,{},{height:f[0].scrollHeight+"px"}).then(i)}function i(){f.removeClass("collapsing").addClass("collapse in").css({height:"auto"})}function j(){return f.hasClass("collapse")||f.hasClass("in")?(f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse in").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void(e?e(f,{to:{height:"0"}}).start().done(k):a.animate(f,{},{height:"0"}).then(k))):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse")}d||c.warn("collapse is now deprecated. Use uib-collapse instead."),b.$watch(g.collapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass,a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)}}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:["?^uibAccordionGroup","?^accordionGroup"],link:function(a,b,c,d){d=d[0]?d[0]:d[1],a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.accordion").value("$accordionSuppressWarning",!1).controller("AccordionController",["$scope","$attrs","$controller","$log","$accordionSuppressWarning",function(a,b,c,d,e){e||d.warn("AccordionController is now deprecated. Use UibAccordionController instead."),angular.extend(this,c("UibAccordionController",{$scope:a,$attrs:b}))}]).directive("accordion",["$log","$accordionSuppressWarning",function(a,b){return{restrict:"EA",controller:"AccordionController",controllerAs:"accordion",transclude:!0,replace:!1,templateUrl:function(a,b){return b.templateUrl||"template/accordion/accordion.html"},link:function(){b||a.warn("accordion is now deprecated. Use uib-accordion instead.")}}}]).directive("accordionGroup",["$log","$accordionSuppressWarning",function(a,b){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(c,d,e,f){b||a.warn("accordion-group is now deprecated. Use uib-accordion-group instead."),f.addGroup(c),c.openClass=e.openClass||"panel-open",c.panelClass=e.panelClass,c.$watch("isOpen",function(a){d.toggleClass(c.openClass,!!a),a&&f.closeOthers(c)}),c.toggleOpen=function(a){c.isDisabled||a&&32!==a.which||(c.isOpen=!c.isOpen)}}}}]).directive("accordionHeading",["$log","$accordionSuppressWarning",function(a,b){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(c,d,e,f,g){b||a.warn("accordion-heading is now deprecated. Use uib-accordion-heading instead."),f.setHeading(g(c,angular.noop))}}}]).directive("accordionTransclude",["$log","$accordionSuppressWarning",function(a,b){return{require:"^accordionGroup",link:function(c,d,e,f){b||a.warn("accordion-transclude is now deprecated. Use uib-accordion-transclude instead."),c.$watch(function(){return f[e.accordionTransclude]},function(a){a&&(d.find("span").html(""),d.find("span").append(a))})}}}]),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.alert").value("$alertSuppressWarning",!1).controller("AlertController",["$scope","$attrs","$controller","$log","$alertSuppressWarning",function(a,b,c,d,e){e||d.warn("AlertController is now deprecated. Use UibAlertController instead."),angular.extend(this,c("UibAlertController",{$scope:a,$attrs:b}))}]).directive("alert",["$log","$alertSuppressWarning",function(a,b){return{controller:"AlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"},link:function(){b||a.warn("alert is now deprecated. Use uib-alert instead.")}}}]),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",function(){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(a,b,c,d){var e=d[0],f=d[1];b.find("input").css({display:"none"}),f.$render=function(){b.toggleClass(e.activeClass,angular.equals(f.$modelValue,a.$eval(c.uibBtnRadio)))},b.on(e.toggleEvent,function(){if(!c.disabled){var d=b.hasClass(e.activeClass);(!d||angular.isDefined(c.uncheckable))&&a.$apply(function(){f.$setViewValue(d?null:a.$eval(c.uibBtnRadio)),f.$render()})}})}}}).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.buttons").value("$buttonsSuppressWarning",!1).controller("ButtonsController",["$controller","$log","$buttonsSuppressWarning",function(a,b,c){c||b.warn("ButtonsController is now deprecated. Use UibButtonsController instead."),angular.extend(this,a("UibButtonsController"))}]).directive("btnRadio",["$log","$buttonsSuppressWarning",function(a,b){return{require:["btnRadio","ngModel"],controller:"ButtonsController",controllerAs:"buttons",link:function(c,d,e,f){b||a.warn("btn-radio is now deprecated. Use uib-btn-radio instead.");var g=f[0],h=f[1];d.find("input").css({display:"none"}),h.$render=function(){d.toggleClass(g.activeClass,angular.equals(h.$modelValue,c.$eval(e.btnRadio)))},d.bind(g.toggleEvent,function(){if(!e.disabled){var a=d.hasClass(g.activeClass);(!a||angular.isDefined(e.uncheckable))&&c.$apply(function(){h.$setViewValue(a?null:c.$eval(e.btnRadio)),h.$render()})}})}}}]).directive("btnCheckbox",["$document","$log","$buttonsSuppressWarning",function(a,b,c){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",controllerAs:"button",link:function(d,e,f,g){function h(){return j(f.btnCheckboxTrue,!0)}function i(){return j(f.btnCheckboxFalse,!1)}function j(a,b){var c=d.$eval(a);return angular.isDefined(c)?c:b}c||b.warn("btn-checkbox is now deprecated. Use uib-btn-checkbox instead.");var k=g[0],l=g[1];e.find("input").css({display:"none"}),l.$render=function(){e.toggleClass(k.activeClass,angular.equals(l.$modelValue,h()))},e.bind(k.toggleEvent,function(){f.disabled||d.$apply(function(){l.$setViewValue(e.hasClass(k.activeClass)?i():h()),l.$render()})}),e.on("keypress",function(b){f.disabled||32!==b.which||a[0].activeElement!==e[0]||d.$apply(function(){l.$setViewValue(e.hasClass(k.activeClass)?i():h()),l.$render()})})}}}]),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$animate",function(a,b,c,d){function e(b,c,e){s||(angular.extend(b,{direction:e,active:!0}),angular.extend(m.currentSlide||{},{direction:e,active:!1}),d.enabled()&&!a.noTransition&&!a.$currentTransition&&b.$element&&m.slides.length>1&&(b.$element.data(q,b.direction),m.currentSlide&&m.currentSlide.$element&&m.currentSlide.$element.data(q,b.direction),a.$currentTransition=!0,o?d.on("addClass",b.$element,function(b,c){"close"===c&&(a.$currentTransition=null,d.off("addClass",b))}):b.$element.one("$animate:close",function(){a.$currentTransition=null})),m.currentSlide=b,r=c,g())}function f(a){if(angular.isUndefined(n[a].index))return n[a];var b;n.length;for(b=0;b<n.length;++b)if(n[b].index==a)return n[b]}function g(){h();var b=+a.interval;!isNaN(b)&&b>0&&(k=c(i,b))}function h(){k&&(c.cancel(k),k=null)}function i(){var b=+a.interval;l&&!isNaN(b)&&b>0&&n.length?a.next():a.pause()}function j(b){b.length||(a.$currentTransition=null)}var k,l,m=this,n=m.slides=a.slides=[],o=angular.version.minor>=4,p="uib-noTransition",q="uib-slideDirection",r=-1;m.currentSlide=null;var s=!1;m.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>m.getCurrentIndex()?"next":"prev"),b&&b!==m.currentSlide&&!a.$currentTransition&&e(b,d,c)},a.$on("$destroy",function(){s=!0}),m.getCurrentIndex=function(){return m.currentSlide&&angular.isDefined(m.currentSlide.index)?+m.currentSlide.index:r},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:n.indexOf(a)},a.next=function(){var b=(m.getCurrentIndex()+1)%n.length;return 0===b&&a.noWrap()?void a.pause():m.select(f(b),"next")},a.prev=function(){var b=m.getCurrentIndex()-1<0?n.length-1:m.getCurrentIndex()-1;return a.noWrap()&&b===n.length-1?void a.pause():m.select(f(b),"prev")},a.isActive=function(a){return m.currentSlide===a},a.$watch("interval",g),a.$watchCollection("slides",j),a.$on("$destroy",h),a.play=function(){l||(l=!0,g())},a.pause=function(){a.noPause||(l=!1,h())},m.addSlide=function(b,c){b.$element=c,n.push(b),1===n.length||b.active?(m.select(n[n.length-1]),1===n.length&&a.play()):b.active=!1},m.removeSlide=function(a){angular.isDefined(a.index)&&n.sort(function(a,b){return+a.index>+b.index});var b=n.indexOf(a);n.splice(b,1),n.length>0&&a.active?b>=n.length?m.select(n[b-1]):m.select(n[b]):r>b&&r--,0===n.length&&(m.currentSlide=null)},a.$watch("noTransition",function(a){b.data(p,a)})}]).directive("uibCarousel",[function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",require:"carousel",templateUrl:function(a,b){return b.templateUrl||"template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}]).directive("uibSlide",function(){return{require:"^uibCarousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$injector","$animate",function(a,b){function c(a,b,c){a.removeClass(b),c&&c()}var d="uib-noTransition",e="uib-slideDirection",f=null;return a.has("$animateCss")&&(f=a.get("$animateCss")),{beforeAddClass:function(a,g,h){if("active"==g&&a.parent()&&a.parent().parent()&&!a.parent().parent().data(d)){var i=!1,j=a.data(e),k="next"==j?"left":"right",l=c.bind(this,a,k+" "+j,h);return a.addClass(j),f?f(a,{addClass:k}).start().done(l):b.addClass(a,k).then(function(){i||l(),h()}),function(){i=!0}}h()},beforeRemoveClass:function(a,g,h){if("active"===g&&a.parent()&&a.parent().parent()&&!a.parent().parent().data(d)){var i=!1,j=a.data(e),k="next"==j?"left":"right",l=c.bind(this,a,k,h);return f?f(a,{addClass:k}).start().done(l):b.addClass(a,k).then(function(){i||l(),h()}),function(){i=!0}}h()}}}]),angular.module("ui.bootstrap.carousel").value("$carouselSuppressWarning",!1).controller("CarouselController",["$scope","$element","$controller","$log","$carouselSuppressWarning",function(a,b,c,d,e){e||d.warn("CarouselController is now deprecated. Use UibCarouselController instead."),angular.extend(this,c("UibCarouselController",{$scope:a,$element:b}))}]).directive("carousel",["$log","$carouselSuppressWarning",function(a,b){return{transclude:!0,replace:!0,controller:"CarouselController",controllerAs:"carousel",require:"carousel",templateUrl:function(a,b){return b.templateUrl||"template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"},link:function(){b||a.warn("carousel is now deprecated. Use uib-carousel instead.")}}}]).directive("slide",["$log","$carouselSuppressWarning",function(a,b){return{require:"^carousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(c,d,e,f){b||a.warn("slide is now deprecated. Use uib-slide instead."),f.addSlide(c,d),c.$on("$destroy",function(){f.removeSlide(c)}),c.$watch("active",function(a){a&&f.select(c)})}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","orderByFilter",function(a,b,c){function d(a){var b=[],d=a.split("");return angular.forEach(g,function(c,e){var f=a.indexOf(e);if(f>-1){a=a.split(""),d[f]="("+c.regex+")",a[f]="$";for(var g=f+1,h=f+e.length;h>g;g++)d[g]="",a[g]="$";a=a.join(""),b.push({index:f,apply:c.apply})}}),{regex:new RegExp("^"+d.join("")+"$"),map:c(b,"index")}}function e(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}var f,g,h=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){f=b.id,this.parsers={},g={yyyy:{regex:"\\d{4}",apply:function(a){this.year=+a}},yy:{regex:"\\d{2}",apply:function(a){this.year=+a+2e3}},y:{regex:"\\d{1,4}",apply:function(a){this.year=+a}},MMMM:{regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)}},MMM:{regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1}},M:{regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},EEEE:{regex:b.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:b.DATETIME_FORMATS.SHORTDAY.join("|")},HH:{regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a}},hh:{regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a}},H:{regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a}},h:{regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a}},mm:{regex:"[0-5][0-9]",apply:function(a){this.minutes=+a}},m:{regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a}},sss:{regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a}},ss:{regex:"[0-5][0-9]",apply:function(a){this.seconds=+a}},s:{regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a}},a:{regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)}}}},this.init(),this.parse=function(c,g,i){if(!angular.isString(c)||!g)return c;g=b.DATETIME_FORMATS[g]||g,g=g.replace(h,"\\$&"),b.id!==f&&this.init(),this.parsers[g]||(this.parsers[g]=d(g));var j=this.parsers[g],k=j.regex,l=j.map,m=c.match(k);if(m&&m.length){var n,o;angular.isDate(i)&&!isNaN(i.getTime())?n={year:i.getFullYear(),month:i.getMonth(),date:i.getDate(),hours:i.getHours(),minutes:i.getMinutes(),seconds:i.getSeconds(),milliseconds:i.getMilliseconds()}:(i&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var p=1,q=m.length;q>p;p++){var r=l[p-1];r.apply&&r.apply.call(n,m[p])}return e(n.year,n.month,n.date)&&(angular.isDate(i)&&!isNaN(i.getTime())?(o=new Date(i),o.setFullYear(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds||0)):o=new Date(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds||0)),o}}}]),angular.module("ui.bootstrap.dateparser").value("$dateParserSuppressWarning",!1).service("dateParser",["$log","$dateParserSuppressWarning","uibDateParser",function(a,b,c){b||a.warn("dateParser is now deprecated. Use uibDateParser instead."),angular.extend(this,c)}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){function c(a,c){return a.currentStyle?a.currentStyle[c]:b.getComputedStyle?b.getComputedStyle(a)[c]:a.style[c]}function d(a){return"static"===(c(a,"position")||"static")}var e=function(b){for(var c=a[0],e=b.offsetParent||c;e&&e!==c&&d(e);)e=e.offsetParent;return e||c};return{position:function(b){var c=this.offset(b),d={top:0,left:0},f=e(b[0]);f!=a[0]&&(d=this.offset(angular.element(f)),d.top+=f.clientTop-f.scrollTop,d.left+=f.clientLeft-f.scrollLeft);var g=b[0].getBoundingClientRect();return{width:g.width||b.prop("offsetWidth"),height:g.height||b.prop("offsetHeight"),top:c.top-d.top,left:c.left-d.left}},offset:function(c){var d=c[0].getBoundingClientRect();return{width:d.width||c.prop("offsetWidth"),height:d.height||c.prop("offsetHeight"),top:d.top+(b.pageYOffset||a[0].documentElement.scrollTop),left:d.left+(b.pageXOffset||a[0].documentElement.scrollLeft)}},positionElements:function(a,b,c,d){var e,f,g,h,i=c.split("-"),j=i[0],k=i[1]||"center";e=d?this.offset(a):this.position(a),f=b.prop("offsetWidth"),g=b.prop("offsetHeight");var l={center:function(){return e.left+e.width/2-f/2},left:function(){return e.left},right:function(){return e.left+e.width}},m={center:function(){return e.top+e.height/2-g/2},top:function(){return e.top},bottom:function(){return e.top+e.height}};switch(j){case"right":h={top:m[k](),left:l[j]()};break;case"left":h={top:m[k](),left:e.left-f};break;case"bottom":h={top:m[j](),left:l[k]()};break;default:h={top:e.top-g,left:l[k]()}}return h}}}]),angular.module("ui.bootstrap.position").value("$positionSuppressWarning",!1).service("$position",["$log","$positionSuppressWarning","$uibPosition",function(a,b,c){b||a.warn("$position is now deprecated. Use $uibPosition instead."),angular.extend(this,c)}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{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,shortcutPropagation:!1}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError",function(a,b,c,d,e,f,g,h){var i=this,j={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRange","shortcutPropagation"],function(c,e){i[c]=angular.isDefined(b[c])?6>e?d(b[c])(a.$parent):a.$parent.$eval(b[c]):g[c]}),angular.forEach(["minDate","maxDate"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(a){i[d]=a?new Date(a):null,i.refreshView()}):i[d]=g[d]?new Date(g[d]):null}),angular.forEach(["minMode","maxMode"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(c){i[d]=angular.isDefined(c)?c:b[d],a[d]=i[d],("minMode"==d&&i.modes.indexOf(a.datepickerMode)<i.modes.indexOf(i[d])||"maxMode"==d&&i.modes.indexOf(a.datepickerMode)>i.modes.indexOf(i[d]))&&(a.datepickerMode=i[d])}):(i[d]=g[d]||null,a[d]=i[d])}),a.datepickerMode=a.datepickerMode||g.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(b.initDate)?(this.activeDate=a.$parent.$eval(b.initDate)||new Date,a.$parent.$watch(b.initDate,function(a){a&&(j.$isEmpty(j.$modelValue)||j.$invalid)&&(i.activeDate=a,i.refreshView())})):this.activeDate=new Date,a.isActive=function(b){return 0===i.compare(b.date,i.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){j=a,j.$render=function(){i.render()}},this.render=function(){if(j.$viewValue){var a=new Date(j.$viewValue),b=!isNaN(a);b?this.activeDate=a:h||e.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.')}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var a=j.$viewValue?new Date(j.$viewValue):null;j.$setValidity("dateDisabled",!a||this.element&&!this.isDisabled(a))}},this.createDateObject=function(a,b){var c=j.$viewValue?new Date(j.$viewValue):null;return{date:a,label:f(a,b),selected:c&&0===this.compare(a,c),disabled:this.isDisabled(a),current:0===this.compare(a,new Date),customClass:this.customClass(a)}},this.isDisabled=function(c){return this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===i.minMode){var c=j.$viewValue?new Date(j.$viewValue):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),j.$setViewValue(c),j.$render()}else i.activeDate=b,a.datepickerMode=i.modes[i.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=i.activeDate.getFullYear()+a*(i.step.years||0),c=i.activeDate.getMonth()+a*(i.step.months||0);i.activeDate.setFullYear(b,c,1),i.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===i.maxMode&&1===b||a.datepickerMode===i.minMode&&-1===b||(a.datepickerMode=i.modes[i.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var k=function(){i.element[0].focus()};a.$on("uib:datepicker.focus",k),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey)if(b.preventDefault(),i.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(i.isDisabled(i.activeDate))return;a.select(i.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(i.handleKeyDown(c,b),i.refreshView()):a.toggleMode("up"===c?1:-1)}}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth())-new Date(b.getFullYear(),b.getMonth())},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/e,10)*e+1}var e;this.element=b,this.yearpickerInit=function(){e=this.yearRange,this.step={years:e}},this._refreshView=function(){for(var b,c=new Array(e),f=0,g=d(this.activeDate.getFullYear());e>f;f++)b=new Date(this.activeDate),b.setFullYear(g+f,0,1),c[f]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+f});a.title=[c[0].label,c[e-1].label].join(" - "),a.rows=this.split(c,5)},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=5:"right"===a?c+=1:"down"===a?c+=5:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*this.step.years:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+e-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/day.html"},require:["^?uibDatepicker","uibDaypicker","^?datepicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0]||d[2],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/month.html"},require:["^?uibDatepicker","uibMonthpicker","^?datepicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0]||d[2],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/year.html"},require:["^?uibDatepicker","uibYearpicker","^?datepicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0]||d[2];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"template/datepicker/popup.html",datepickerTemplateUrl:"template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0,onOpenFocus:!0}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout",function(a,b,c,d,e,f,g,h,i,j,k,l){
function m(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function n(b){if(angular.isNumber(b)&&(b=new Date(b)),b){if(angular.isDate(b)&&!isNaN(b))return b;if(angular.isString(b)){var c=j.parse(b,r,a.date);return isNaN(c)?void 0:c}return void 0}return null}function o(a,b){var d=a||b;if(!c.ngRequired&&!d)return!0;if(angular.isNumber(d)&&(d=new Date(d)),d){if(angular.isDate(d)&&!isNaN(d))return!0;if(angular.isString(d)){var e=j.parse(d,r);return!isNaN(e)}return!1}return!0}function p(c){var d=A[0],e=b[0].contains(c.target),f=void 0!==d.contains&&d.contains(c.target);!a.isOpen||e||f||a.$apply(function(){a.isOpen=!1})}function q(c){27===c.which&&a.isOpen?(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!1}),b[0].focus()):40!==c.which||a.isOpen||(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!0}))}var r,s,t,u,v,w,x,y,z,A,B={},C=!1;a.watchData={},this.init=function(h){if(z=h,s=angular.isDefined(c.closeOnDateSelection)?a.$parent.$eval(c.closeOnDateSelection):k.closeOnDateSelection,t=angular.isDefined(c.datepickerAppendToBody)?a.$parent.$eval(c.datepickerAppendToBody):k.appendToBody,u=angular.isDefined(c.onOpenFocus)?a.$parent.$eval(c.onOpenFocus):k.onOpenFocus,v=angular.isDefined(c.datepickerPopupTemplateUrl)?c.datepickerPopupTemplateUrl:k.datepickerPopupTemplateUrl,w=angular.isDefined(c.datepickerTemplateUrl)?c.datepickerTemplateUrl:k.datepickerTemplateUrl,a.showButtonBar=angular.isDefined(c.showButtonBar)?a.$parent.$eval(c.showButtonBar):k.showButtonBar,k.html5Types[c.type]?(r=k.html5Types[c.type],C=!0):(r=c.datepickerPopup||c.uibDatepickerPopup||k.datepickerPopup,c.$observe("uibDatepickerPopup",function(a,b){var c=a||k.datepickerPopup;if(c!==r&&(r=c,z.$modelValue=null,!r))throw new Error("uibDatepickerPopup must have a date format specified.")})),!r)throw new Error("uibDatepickerPopup must have a date format specified.");if(C&&c.datepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");if(x=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),x.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":v}),y=angular.element(x.children()[0]),y.attr("template-url",w),C&&"month"===c.type&&(y.attr("datepicker-mode",'"month"'),y.attr("min-mode","month")),c.datepickerOptions){var l=a.$parent.$eval(c.datepickerOptions);l&&l.initDate&&(a.initDate=l.initDate,y.attr("init-date","initDate"),delete l.initDate),angular.forEach(l,function(a,b){y.attr(m(b),a)})}angular.forEach(["minMode","maxMode","minDate","maxDate","datepickerMode","initDate","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]);if(a.$parent.$watch(d,function(c){a.watchData[b]=c,("minDate"===b||"maxDate"===b)&&(B[b]=new Date(c))}),y.attr(m(b),"watchData."+b),"datepickerMode"===b){var f=d.assign;a.$watch("watchData."+b,function(b,c){angular.isFunction(f)&&b!==c&&f(a.$parent,b)})}}}),c.dateDisabled&&y.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),c.showWeeks&&y.attr("show-weeks",c.showWeeks),c.customClass&&y.attr("custom-class","customClass({ date: date, mode: mode })"),C?z.$formatters.push(function(b){return a.date=b,b}):(z.$$parserName="date",z.$validators.date=o,z.$parsers.unshift(n),z.$formatters.push(function(b){return a.date=b,z.$isEmpty(b)?b:i(b,r)})),z.$viewChangeListeners.push(function(){a.date=j.parse(z.$viewValue,r,a.date)}),b.bind("keydown",q),A=d(x)(a),x.remove(),t?f.find("body").append(A):b.after(A),a.$on("$destroy",function(){a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),A.remove(),b.unbind("keydown",q),f.unbind("click",p)})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,B.minDate)<0||a.watchData.maxDate&&a.compare(b,B.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?i(a.date,r):null;b.val(d),z.$setViewValue(d),s&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.$watch("isOpen",function(c){c?(a.position=t?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){u&&a.$broadcast("uib:datepicker.focus"),f.bind("click",p)},0,!1)):f.unbind("click",p)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.datepicker").value("$datepickerSuppressWarning",!1).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","$datepickerSuppressWarning",function(a,b,c,d,e,f,g,h,i){i||e.warn("DatepickerController is now deprecated. Use UibDatepickerController instead.");var j=this,k={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRange","shortcutPropagation"],function(c,e){j[c]=angular.isDefined(b[c])?6>e?d(b[c])(a.$parent):a.$parent.$eval(b[c]):g[c]}),angular.forEach(["minDate","maxDate"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(a){j[d]=a?new Date(a):null,j.refreshView()}):j[d]=g[d]?new Date(g[d]):null}),angular.forEach(["minMode","maxMode"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(c){j[d]=angular.isDefined(c)?c:b[d],a[d]=j[d],("minMode"==d&&j.modes.indexOf(a.datepickerMode)<j.modes.indexOf(j[d])||"maxMode"==d&&j.modes.indexOf(a.datepickerMode)>j.modes.indexOf(j[d]))&&(a.datepickerMode=j[d])}):(j[d]=g[d]||null,a[d]=j[d])}),a.datepickerMode=a.datepickerMode||g.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(b.initDate)?(this.activeDate=a.$parent.$eval(b.initDate)||new Date,a.$parent.$watch(b.initDate,function(a){a&&(k.$isEmpty(k.$modelValue)||k.$invalid)&&(j.activeDate=a,j.refreshView())})):this.activeDate=new Date,a.isActive=function(b){return 0===j.compare(b.date,j.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){k=a,k.$render=function(){j.render()}},this.render=function(){if(k.$viewValue){var a=new Date(k.$viewValue),b=!isNaN(a);b?this.activeDate=a:h||e.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.')}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var a=k.$viewValue?new Date(k.$viewValue):null;k.$setValidity("dateDisabled",!a||this.element&&!this.isDisabled(a))}},this.createDateObject=function(a,b){var c=k.$viewValue?new Date(k.$viewValue):null;return{date:a,label:f(a,b),selected:c&&0===this.compare(a,c),disabled:this.isDisabled(a),current:0===this.compare(a,new Date),customClass:this.customClass(a)}},this.isDisabled=function(c){return this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},this.fixTimeZone=function(a){var b=a.getHours();a.setHours(23===b?b+2:0)},a.select=function(b){if(a.datepickerMode===j.minMode){var c=k.$viewValue?new Date(k.$viewValue):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),k.$setViewValue(c),k.$render()}else j.activeDate=b,a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=j.activeDate.getFullYear()+a*(j.step.years||0),c=j.activeDate.getMonth()+a*(j.step.months||0);j.activeDate.setFullYear(b,c,1),j.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===j.maxMode&&1===b||a.datepickerMode===j.minMode&&-1===b||(a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var l=function(){j.element[0].focus()};a.$on("uib:datepicker.focus",l),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey)if(b.preventDefault(),j.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(j.isDisabled(j.activeDate))return;a.select(j.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(j.handleKeyDown(c,b),j.refreshView()):a.toggleMode("up"===c?1:-1)}}]).directive("datepicker",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["datepicker","^ngModel"],controller:"DatepickerController",controllerAs:"datepicker",link:function(c,d,e,f){b||a.warn("datepicker is now deprecated. Use uib-datepicker instead.");var g=f[0],h=f[1];g.init(h)}}}]).directive("daypicker",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,templateUrl:"template/datepicker/day.html",require:["^datepicker","daypicker"],controller:"UibDaypickerController",link:function(c,d,e,f){b||a.warn("daypicker is now deprecated. Use uib-daypicker instead.");var g=f[0],h=f[1];h.init(g)}}}]).directive("monthpicker",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,templateUrl:"template/datepicker/month.html",require:["^datepicker","monthpicker"],controller:"UibMonthpickerController",link:function(c,d,e,f){b||a.warn("monthpicker is now deprecated. Use uib-monthpicker instead.");var g=f[0],h=f[1];h.init(g)}}}]).directive("yearpicker",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,templateUrl:"template/datepicker/year.html",require:["^datepicker","yearpicker"],controller:"UibYearpickerController",link:function(c,d,e,f){b||a.warn("yearpicker is now deprecated. Use uib-yearpicker instead.");var g=f[0];angular.extend(g,f[1]),g.yearpickerInit(),g.refreshView()}}}]).directive("datepickerPopup",["$log","$datepickerSuppressWarning",function(a,b){return{require:["ngModel","datepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(c,d,e,f){b||a.warn("datepicker-popup is now deprecated. Use uib-datepicker-popup instead.");var g=f[0],h=f[1];h.init(g)}}}]).directive("datepickerPopupWrap",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/popup.html"},link:function(){b||a.warn("datepicker-popup-wrap is now deprecated. Use uib-datepicker-popup-wrap instead.")}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.bind("click",d),a.bind("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.unbind("click",d),a.unbind("keydown",e))};var d=function(a){if(c&&(!a||"disabled"!==c.getAutoClose())){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&/(38|40)/.test(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.openClass,q=angular.noop,r=c.onToggle?d(c.onToggle):angular.noop,s=!1,t=!1;b.addClass("dropdown"),this.init=function(){c.isOpen&&(m=d(c.isOpen),q=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),s=angular.isDefined(c.dropdownAppendToBody),t=angular.isDefined(c.uibKeyboardNav),s&&n.dropdownMenu&&(i.find("body").append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return t},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):angular.element(b).find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(s&&n.dropdownMenu){var e=h.positionElements(b,n.dropdownMenu,"bottom-left",!0),i={top:e.top+"px",display:c?"block":"none"},m=n.dropdownMenu.hasClass("dropdown-menu-right");m?(i.left="auto",i.right=window.innerWidth-(e.left+b.prop("offsetWidth"))+"px"):(i.left=e.left+"px",i.right="auto"),n.dropdownMenu.css(i)}if(g[c?"addClass":"removeClass"](b,p).then(function(){angular.isDefined(c)&&c!==d&&r(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var t=angular.element('<ul class="dropdown-menu"></ul>');n.dropdownMenu.replaceWith(t),n.dropdownMenu=t}f.close(o),n.selectedOption=null}angular.isFunction(q)&&q(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)});var u=a.$on("$destroy",function(){o.$destroy()});o.$on("$destroy",u)}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"AC",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibKeyboardNav",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){b.bind("keydown",function(a){if(-1!==[38,40].indexOf(a.which)){a.preventDefault(),a.stopPropagation();var b=d.dropdownMenu.find("a");switch(a.which){case 40:angular.isNumber(d.selectedOption)?d.selectedOption=d.selectedOption===b.length-1?d.selectedOption:d.selectedOption+1:d.selectedOption=0;break;case 38:angular.isNumber(d.selectedOption)?d.selectedOption=0===d.selectedOption?0:d.selectedOption-1:d.selectedOption=b.length-1}b[d.selectedOption].focus()}})}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.dropdown").value("$dropdownSuppressWarning",!1).service("dropdownService",["$log","$dropdownSuppressWarning","uibDropdownService",function(a,b,c){b||a.warn("dropdownService is now deprecated. Use uibDropdownService instead."),angular.extend(this,c)}]).controller("DropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest","$log","$dropdownSuppressWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m){m||l.warn("DropdownController is now deprecated. Use UibDropdownController instead.");var n,o,p=this,q=a.$new(),r=e.openClass,s=angular.noop,t=c.onToggle?d(c.onToggle):angular.noop,u=!1,v=!1;b.addClass("dropdown"),this.init=function(){c.isOpen&&(o=d(c.isOpen),s=o.assign,a.$watch(o,function(a){q.isOpen=!!a})),u=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.uibKeyboardNav),u&&p.dropdownMenu&&(i.find("body").append(p.dropdownMenu),b.on("$destroy",function(){p.dropdownMenu.remove()}))},this.toggle=function(a){return q.isOpen=arguments.length?!!a:!q.isOpen},this.isOpen=function(){return q.isOpen},q.getToggleElement=function(){return p.toggleElement},q.getAutoClose=function(){return c.autoClose||"always"},q.getElement=function(){return b},q.isKeynavEnabled=function(){return v},q.focusDropdownEntry=function(a){var c=p.dropdownMenu?angular.element(p.dropdownMenu).find("a"):angular.element(b).find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(p.selectedOption)?p.selectedOption=p.selectedOption===c.length-1?p.selectedOption:p.selectedOption+1:p.selectedOption=0;break;case 38:angular.isNumber(p.selectedOption)?p.selectedOption=0===p.selectedOption?0:p.selectedOption-1:p.selectedOption=c.length-1}c[p.selectedOption].focus()},q.getDropdownElement=function(){return p.dropdownMenu},q.focusToggleElement=function(){p.toggleElement&&p.toggleElement[0].focus()},q.$watch("isOpen",function(c,d){if(u&&p.dropdownMenu){var e=h.positionElements(b,p.dropdownMenu,"bottom-left",!0),i={top:e.top+"px",display:c?"block":"none"},l=p.dropdownMenu.hasClass("dropdown-menu-right");l?(i.left="auto",i.right=window.innerWidth-(e.left+b.prop("offsetWidth"))+"px"):(i.left=e.left+"px",i.right="auto"),p.dropdownMenu.css(i)}if(g[c?"addClass":"removeClass"](b,r).then(function(){angular.isDefined(c)&&c!==d&&t(a,{open:!!c})}),c)p.dropdownMenuTemplateUrl&&k(p.dropdownMenuTemplateUrl).then(function(a){n=q.$new(),j(a.trim())(n,function(a){var b=a;p.dropdownMenu.replaceWith(b),p.dropdownMenu=b})}),q.focusToggleElement(),f.open(q);else{if(p.dropdownMenuTemplateUrl){n&&n.$destroy();var m=angular.element('<ul class="dropdown-menu"></ul>');p.dropdownMenu.replaceWith(m),p.dropdownMenu=m}f.close(q),p.selectedOption=null}angular.isFunction(s)&&s(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==q.getAutoClose()&&(q.isOpen=!1)});var w=a.$on("$destroy",function(){q.$destroy()});q.$on("$destroy",w)}]).directive("dropdown",["$log","$dropdownSuppressWarning",function(a,b){return{controller:"DropdownController",link:function(c,d,e,f){b||a.warn("dropdown is now deprecated. Use uib-dropdown instead."),f.init()}}}]).directive("dropdownMenu",["$log","$dropdownSuppressWarning",function(a,b){return{restrict:"AC",require:"?^dropdown",link:function(c,d,e,f){if(f&&!angular.isDefined(e.dropdownNested)){b||a.warn("dropdown-menu is now deprecated. Use uib-dropdown-menu instead."),d.addClass("dropdown-menu");var g=e.templateUrl;g&&(f.dropdownMenuTemplateUrl=g),f.dropdownMenu||(f.dropdownMenu=d)}}}}]).directive("keyboardNav",["$log","$dropdownSuppressWarning",function(a,b){return{restrict:"A",require:"?^dropdown",link:function(c,d,e,f){b||a.warn("keyboard-nav is now deprecated. Use uib-keyboard-nav instead."),d.bind("keydown",function(a){if(-1!==[38,40].indexOf(a.which)){a.preventDefault(),a.stopPropagation();var b=f.dropdownMenu.find("a");switch(a.which){case 40:angular.isNumber(f.selectedOption)?f.selectedOption=f.selectedOption===b.length-1?f.selectedOption:f.selectedOption+1:f.selectedOption=0;break;case 38:angular.isNumber(f.selectedOption)?f.selectedOption=0===f.selectedOption?0:f.selectedOption-1:f.selectedOption=b.length-1}b[f.selectedOption].focus()}})}}}]).directive("dropdownToggle",["$log","$dropdownSuppressWarning",function(a,b){return{require:"?^dropdown",link:function(c,d,e,f){if(b||a.warn("dropdown-toggle is now deprecated. Use uib-dropdown-toggle instead."),f){d.addClass("dropdown-toggle"),f.toggleElement=d;var g=function(a){a.preventDefault(),d.hasClass("disabled")||e.disabled||c.$apply(function(){f.toggle()})};d.bind("click",g),d.attr({"aria-haspopup":!0,"aria-expanded":!1}),c.$watch(f.isOpen,function(a){d.attr("aria-expanded",!!a)}),c.$on("$destroy",function(){d.unbind("click",g)})}}}}]),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b==a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b==a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.splice(a.length-1,1)[0]},length:function(){return a.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.stackedMap"]).factory("$$multiMap",function(){return{createNew:function(){var a={};return{entries:function(){return Object.keys(a).map(function(b){return{key:b,value:a[b]}})},get:function(b){return a[b]},hasKey:function(b){return!!a[b]},keys:function(){return Object.keys(a)},put:function(b,c){a[b]||(a[b]=[]),a[b].push(c)},remove:function(b,c){var d=a[b];if(d){var e=d.indexOf(c);-1!==e&&d.splice(e,1),d.length||delete a[b]}}}}}}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(a,b,c){function d(b,d,f){d.addClass("modal-backdrop"),f.modalInClass&&(e?e(d,{addClass:f.modalInClass}).start():a.addClass(d,f.modalInClass),b.$on(c.NOW_CLOSING_EVENT,function(b,c){var g=c();e?e(d,{removeClass:f.modalInClass}).start().then(g):a.removeClass(d,f.modalInClass).then(g)}))}var e=null;return b.has("$animateCss")&&(e=b.get("$animateCss")),{replace:!0,templateUrl:"template/modal/backdrop.html",compile:function(a,b){return a.addClass(b.backdropClass),d}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animate","$injector",function(a,b,c,d){var e=null;return d.has("$animateCss")&&(e=d.get("$animateCss")),{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/modal/window.html"},link:function(d,f,g){f.addClass(g.windowClass||""),f.addClass(g.windowTopClass||""),d.size=g.size,d.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!==c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},f.on("click",d.close),d.$isRendered=!0;var h=b.defer();g.$observe("modalRender",function(a){"true"==a&&h.resolve()}),h.promise.then(function(){var h=null;g.modalInClass&&(h=e?e(f,{addClass:g.modalInClass}).start():c.addClass(f,g.modalInClass),d.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();e?e(f,{removeClass:g.modalInClass}).start().then(d):c.removeClass(f,g.modalInClass).then(d)})),b.when(h).then(function(){var a=f[0].querySelector("[autofocus]");a?a.focus():f[0].focus()});var i=a.getTop();i&&a.modalRendered(i.key)})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(a,b){b.modalAnimation&&a.addClass(b.uibModalAnimationClass)}}}).directive("uibModalTransclude",function(){return{link:function(a,b,c,d,e){e(a.$parent,function(a){b.empty(),b.append(a)})}}}).factory("$uibModalStack",["$animate","$timeout","$document","$compile","$rootScope","$q","$injector","$$multiMap","$$stackedMap",function(a,b,c,d,e,f,g,h,i){function j(){for(var a=-1,b=u.keys(),c=0;c<b.length;c++)u.get(b[c]).value.backdrop&&(a=c);return a}function k(a,b){var d=c.find("body").eq(0),e=u.get(a).value;u.remove(a),n(e.modalDomEl,e.modalScope,function(){var b=e.openedClass||t;v.remove(b,a),d.toggleClass(b,v.hasKey(b)),l(!0)}),m(),b&&b.focus?b.focus():d.focus()}function l(a){var b;u.length()>0&&(b=u.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function m(){if(q&&-1==j()){var a=r;n(q,r,function(){a=null}),q=void 0,r=void 0}}function n(b,c,d){function e(){e.done||(e.done=!0,p?p(b,{event:"leave"}).start().then(function(){b.remove()}):a.leave(b),c.$destroy(),d&&d())}var g,h=null,i=function(){return g||(g=f.defer(),h=g.promise),function(){g.resolve()}};return c.$broadcast(w.NOW_CLOSING_EVENT,i),f.when(h).then(e)}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p=null;g.has("$animateCss")&&(p=g.get("$animateCss"));var q,r,s,t="modal-open",u=i.createNew(),v=h.createNew(),w={NOW_CLOSING_EVENT:"modal.stack.now-closing"},x=0,y="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(j,function(a){r&&(r.index=a)}),c.bind("keydown",function(a){if(a.isDefaultPrevented())return a;var b=u.top();if(b&&b.value.keyboard)switch(a.which){case 27:a.preventDefault(),e.$apply(function(){w.dismiss(b.key,"escape key press")});break;case 9:w.loadFocusElementList(b);var c=!1;a.shiftKey?w.isFocusInFirstItem(a)&&(c=w.focusLastFocusableElement()):w.isFocusInLastItem(a)&&(c=w.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}),w.open=function(a,b){var f=c[0].activeElement,g=b.openedClass||t;l(!1),u.add(a,{deferred:b.deferred,renderDeferred:b.renderDeferred,modalScope:b.scope,backdrop:b.backdrop,keyboard:b.keyboard,openedClass:b.openedClass,windowTopClass:b.windowTopClass}),v.put(g,a);var h=c.find("body").eq(0),i=j();if(i>=0&&!q){r=e.$new(!0),r.index=i;var k=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>');k.attr("backdrop-class",b.backdropClass),b.animation&&k.attr("modal-animation","true"),q=d(k)(r),h.append(q)}var m=angular.element('<div uib-modal-window="modal-window"></div>');m.attr({"template-url":b.windowTemplateUrl,"window-class":b.windowClass,"window-top-class":b.windowTopClass,size:b.size,index:u.length()-1,animate:"animate"}).html(b.content),b.animation&&m.attr("modal-animation","true");var n=d(m)(b.scope);u.top().value.modalDomEl=n,u.top().value.modalOpener=f,h.append(n),h.addClass(g),w.clearFocusListCache()},w.close=function(a,b){var c=u.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),k(a,c.value.modalOpener),!0):!c},w.dismiss=function(a,b){var c=u.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),k(a,c.value.modalOpener),!0):!c},w.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},w.getTop=function(){return u.top()},w.modalRendered=function(a){var b=u.get(a);b&&b.value.renderDeferred.resolve()},w.focusFirstFocusableElement=function(){return s.length>0?(s[0].focus(),!0):!1},w.focusLastFocusableElement=function(){return s.length>0?(s[s.length-1].focus(),!0):!1},w.isFocusInFirstItem=function(a){return s.length>0?(a.target||a.srcElement)==s[0]:!1},w.isFocusInLastItem=function(a){return s.length>0?(a.target||a.srcElement)==s[s.length-1]:!1},w.clearFocusListCache=function(){s=[],x=0},w.loadFocusElementList=function(a){if((void 0===s||!s.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(s=b[0].querySelectorAll(y))}},w}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$templateRequest","$controller","$uibModalStack","$modalSuppressWarning","$log",function(b,c,d,e,f,g,h,i){function j(a){return a.template?d.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}function k(a){var c=[];return angular.forEach(a,function(a){angular.isFunction(a)||angular.isArray(a)?c.push(d.when(b.invoke(a))):angular.isString(a)?c.push(d.when(b.get(a))):c.push(d.when(a))}),c}var l={},m=null;return l.getPromiseChain=function(){return m},l.open=function(b){function e(){return r}var l=d.defer(),n=d.defer(),o=d.defer(),p={result:l.promise,opened:n.promise,rendered:o.promise,close:function(a){return g.close(p,a)},dismiss:function(a){return g.dismiss(p,a)}};if(b=angular.extend({},a.options,b),b.resolve=b.resolve||{},!b.template&&!b.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=d.all([j(b)].concat(k(b.resolve)));return q=m=d.all([m]).then(e,e).then(function(a){var d=(b.scope||c).$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var e,j={},k=1;b.controller&&(j.$scope=d,j.$uibModalInstance=p,Object.defineProperty(j,"$modalInstance",{get:function(){return h||i.warn("$modalInstance is now deprecated. Use $uibModalInstance instead."),p}}),angular.forEach(b.resolve,function(b,c){j[c]=a[k++]}),e=f(b.controller,j),b.controllerAs&&(b.bindToController&&angular.extend(e,d),d[b.controllerAs]=e)),g.open(p,{scope:d,deferred:l,renderDeferred:o,content:a[0],animation:b.animation,backdrop:b.backdrop,keyboard:b.keyboard,backdropClass:b.backdropClass,windowTopClass:b.windowTopClass,windowClass:b.windowClass,windowTemplateUrl:b.windowTemplateUrl,size:b.size,openedClass:b.openedClass}),n.resolve(!0)},function(a){n.reject(a),l.reject(a)})["finally"](function(){m===q&&(m=null)}),p},l}]};return a}),angular.module("ui.bootstrap.modal").value("$modalSuppressWarning",!1).directive("modalBackdrop",["$animate","$injector","$modalStack","$log","$modalSuppressWarning",function(a,b,c,d,e){function f(b,f,h){e||d.warn("modal-backdrop is now deprecated. Use uib-modal-backdrop instead."),f.addClass("modal-backdrop"),h.modalInClass&&(g?g(f,{addClass:h.modalInClass}).start():a.addClass(f,h.modalInClass),b.$on(c.NOW_CLOSING_EVENT,function(b,c){var d=c();g?g(f,{removeClass:h.modalInClass}).start().then(d):a.removeClass(f,h.modalInClass).then(d)}))}var g=null;return b.has("$animateCss")&&(g=b.get("$animateCss")),{replace:!0,templateUrl:"template/modal/backdrop.html",compile:function(a,b){return a.addClass(b.backdropClass),f}}}]).directive("modalWindow",["$modalStack","$q","$animate","$injector","$log","$modalSuppressWarning",function(a,b,c,d,e,f){var g=null;return d.has("$animateCss")&&(g=d.get("$animateCss")),{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/modal/window.html"},link:function(d,h,i){f||e.warn("modal-window is now deprecated. Use uib-modal-window instead."),h.addClass(i.windowClass||""),h.addClass(i.windowTopClass||""),d.size=i.size,d.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!==c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},h.on("click",d.close),d.$isRendered=!0;var j=b.defer();i.$observe("modalRender",function(a){"true"==a&&j.resolve()}),j.promise.then(function(){var e=null;i.modalInClass&&(e=g?g(h,{addClass:i.modalInClass}).start():c.addClass(h,i.modalInClass),d.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();g?g(h,{removeClass:i.modalInClass}).start().then(d):c.removeClass(h,i.modalInClass).then(d)})),b.when(e).then(function(){var a=h[0].querySelector("[autofocus]");a?a.focus():h[0].focus()});var f=a.getTop();f&&a.modalRendered(f.key)})}}}]).directive("modalAnimationClass",["$log","$modalSuppressWarning",function(a,b){return{compile:function(c,d){b||a.warn("modal-animation-class is now deprecated. Use uib-modal-animation-class instead."),d.modalAnimation&&c.addClass(d.modalAnimationClass)}}}]).directive("modalTransclude",["$log","$modalSuppressWarning",function(a,b){return{link:function(c,d,e,f,g){
b||a.warn("modal-transclude is now deprecated. Use uib-modal-transclude instead."),g(c.$parent,function(a){d.empty(),d.append(a)})}}}]).service("$modalStack",["$animate","$timeout","$document","$compile","$rootScope","$q","$injector","$$multiMap","$$stackedMap","$uibModalStack","$log","$modalSuppressWarning",function(a,b,c,d,e,f,g,h,i,j,k,l){l||k.warn("$modalStack is now deprecated. Use $uibModalStack instead."),angular.extend(this,j)}]).provider("$modal",["$uibModalProvider",function(a){angular.extend(this,a),this.$get=["$injector","$log","$modalSuppressWarning",function(b,c,d){return d||c.warn("$modal is now deprecated. Use $uibModal instead."),b.invoke(a.$get)}]}]),angular.module("ui.bootstrap.pagination",[]).controller("UibPaginationController",["$scope","$attrs","$parse",function(a,b,c){var d=this,e={$setViewValue:angular.noop},f=b.numPages?c(b.numPages).assign:angular.noop;this.init=function(g,h){e=g,this.config=h,e.$render=function(){d.render()},b.itemsPerPage?a.$parent.$watch(c(b.itemsPerPage),function(b){d.itemsPerPage=parseInt(b,10),a.totalPages=d.calculateTotalPages()}):this.itemsPerPage=h.itemsPerPage,a.$watch("totalItems",function(){a.totalPages=d.calculateTotalPages()}),a.$watch("totalPages",function(b){f(a.$parent,b),a.page>b?a.selectPage(b):e.$render()})},this.calculateTotalPages=function(){var b=this.itemsPerPage<1?1:Math.ceil(a.totalItems/this.itemsPerPage);return Math.max(b||0,1)},this.render=function(){a.page=parseInt(e.$viewValue,10)||1},a.selectPage=function(b,c){c&&c.preventDefault();var d=!a.ngDisabled||!c;d&&a.page!==b&&b>0&&b<=a.totalPages&&(c&&c.target&&c.target.blur(),e.$setViewValue(b),e.$render())},a.getText=function(b){return a[b+"Text"]||d.config[b+"Text"]},a.noPrevious=function(){return 1===a.page},a.noNext=function(){return a.page===a.totalPages}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"template/pagination/pagination.html"},replace:!0,link:function(c,d,e,f){function g(a,b,c){return{number:a,text:b,active:c}}function h(a,b){var c=[],d=1,e=b,f=angular.isDefined(k)&&b>k;f&&(l?(d=Math.max(a-Math.floor(k/2),1),e=d+k-1,e>b&&(e=b,d=e-k+1)):(d=(Math.ceil(a/k)-1)*k+1,e=Math.min(d+k-1,b)));for(var h=d;e>=h;h++){var i=g(h,h,h===a);c.push(i)}if(f&&!l){if(d>1){var j=g(d-1,"...",!1);c.unshift(j)}if(b>e){var m=g(e+1,"...",!1);c.push(m)}}return c}var i=f[0],j=f[1];if(j){var k=angular.isDefined(e.maxSize)?c.$parent.$eval(e.maxSize):b.maxSize,l=angular.isDefined(e.rotate)?c.$parent.$eval(e.rotate):b.rotate;c.boundaryLinks=angular.isDefined(e.boundaryLinks)?c.$parent.$eval(e.boundaryLinks):b.boundaryLinks,c.directionLinks=angular.isDefined(e.directionLinks)?c.$parent.$eval(e.directionLinks):b.directionLinks,i.init(j,b),e.maxSize&&c.$parent.$watch(a(e.maxSize),function(a){k=parseInt(a,10),i.render()});var m=i.render;i.render=function(){m(),c.page>0&&c.page<=c.totalPages&&(c.pages=h(c.page,c.totalPages))}}}}}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"template/pagination/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&(b.align=angular.isDefined(d.align)?b.$parent.$eval(d.align):a.align,f.init(g,a))}}}]),angular.module("ui.bootstrap.pagination").value("$paginationSuppressWarning",!1).controller("PaginationController",["$scope","$attrs","$parse","$log","$paginationSuppressWarning",function(a,b,c,d,e){e||d.warn("PaginationController is now deprecated. Use UibPaginationController instead.");var f=this,g={$setViewValue:angular.noop},h=b.numPages?c(b.numPages).assign:angular.noop;this.init=function(d,e){g=d,this.config=e,g.$render=function(){f.render()},b.itemsPerPage?a.$parent.$watch(c(b.itemsPerPage),function(b){f.itemsPerPage=parseInt(b,10),a.totalPages=f.calculateTotalPages()}):this.itemsPerPage=e.itemsPerPage,a.$watch("totalItems",function(){a.totalPages=f.calculateTotalPages()}),a.$watch("totalPages",function(b){h(a.$parent,b),a.page>b?a.selectPage(b):g.$render()})},this.calculateTotalPages=function(){var b=this.itemsPerPage<1?1:Math.ceil(a.totalItems/this.itemsPerPage);return Math.max(b||0,1)},this.render=function(){a.page=parseInt(g.$viewValue,10)||1},a.selectPage=function(b,c){c&&c.preventDefault();var d=!a.ngDisabled||!c;d&&a.page!==b&&b>0&&b<=a.totalPages&&(c&&c.target&&c.target.blur(),g.$setViewValue(b),g.$render())},a.getText=function(b){return a[b+"Text"]||f.config[b+"Text"]},a.noPrevious=function(){return 1===a.page},a.noNext=function(){return a.page===a.totalPages}}]).directive("pagination",["$parse","uibPaginationConfig","$log","$paginationSuppressWarning",function(a,b,c,d){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["pagination","?ngModel"],controller:"PaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"template/pagination/pagination.html"},replace:!0,link:function(e,f,g,h){function i(a,b,c){return{number:a,text:b,active:c}}function j(a,b){var c=[],d=1,e=b,f=angular.isDefined(m)&&b>m;f&&(n?(d=Math.max(a-Math.floor(m/2),1),e=d+m-1,e>b&&(e=b,d=e-m+1)):(d=(Math.ceil(a/m)-1)*m+1,e=Math.min(d+m-1,b)));for(var g=d;e>=g;g++){var h=i(g,g,g===a);c.push(h)}if(f&&!n){if(d>1){var j=i(d-1,"...",!1);c.unshift(j)}if(b>e){var k=i(e+1,"...",!1);c.push(k)}}return c}d||c.warn("pagination is now deprecated. Use uib-pagination instead.");var k=h[0],l=h[1];if(l){var m=angular.isDefined(g.maxSize)?e.$parent.$eval(g.maxSize):b.maxSize,n=angular.isDefined(g.rotate)?e.$parent.$eval(g.rotate):b.rotate;e.boundaryLinks=angular.isDefined(g.boundaryLinks)?e.$parent.$eval(g.boundaryLinks):b.boundaryLinks,e.directionLinks=angular.isDefined(g.directionLinks)?e.$parent.$eval(g.directionLinks):b.directionLinks,k.init(l,b),g.maxSize&&e.$parent.$watch(a(g.maxSize),function(a){m=parseInt(a,10),k.render()});var o=k.render;k.render=function(){o(),e.page>0&&e.page<=e.totalPages&&(e.pages=j(e.page,e.totalPages))}}}}}]).directive("pager",["uibPagerConfig","$log","$paginationSuppressWarning",function(a,b,c){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["pager","?ngModel"],controller:"PaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"template/pagination/pager.html"},replace:!0,link:function(d,e,f,g){c||b.warn("pager is now deprecated. Use uib-pager instead.");var h=g[0],i=g[1];i&&(d.align=angular.isDefined(f.align)?d.$parent.$eval(f.align):a.align,h.init(i,a))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){var n=m.createNew();return h.on("keypress",function(a){if(27===a.which){var b=n.top();b&&(b.value.close(),n.removeTop(),b=null)}}),function(e,k,m,o){function p(a){var b=(a||o.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}o=angular.extend({},b,d,o);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="<div "+q+'-popup title="'+r+"title"+s+'" '+(o.useContentExp?'content-exp="contentExp()" ':'content="'+r+"content"+s+'" ')+'placement="'+r+"placement"+s+'" popup-class="'+r+"popupClass"+s+'" animation="animation" is-open="isOpen"origin-scope="origScope" style="visibility: hidden; display: block; top: -9999px; left: -9999px;"></div>';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){L.isOpen?q():m()}function m(){(!K||a.$eval(d[k+"Enable"]))&&(u(),x(),L.popupDelay?F||(F=g(r,L.popupDelay,!1)):r())}function q(){s(),L.popupCloseDelay?G||(G=g(t,L.popupCloseDelay,!1)):t()}function r(){return s(),u(),L.content?(v(),void L.$evalAsync(function(){L.isOpen=!0,y(!0),Q()})):angular.noop}function s(){F&&(g.cancel(F),F=null),H&&(g.cancel(H),H=null)}function t(){s(),u(),L&&L.$evalAsync(function(){L.isOpen=!1,y(!1),L.animation?E||(E=g(w,150,!1)):w()})}function u(){G&&(g.cancel(G),G=null),E&&(g.cancel(E),E=null)}function v(){C||(D=L.$new(),C=c(D,function(a){I?h.find("body").append(a):b.after(a)}),z())}function w(){A(),E=null,C&&(C.remove(),C=null),D&&(D.$destroy(),D=null)}function x(){L.title=d[k+"Title"],O?L.content=O(a):L.content=d[e],L.popupClass=d[k+"Class"],L.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:o.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);L.popupDelay=isNaN(b)?o.popupDelay:b,L.popupCloseDelay=isNaN(c)?o.popupCloseDelay:c}function y(b){N&&angular.isFunction(N.assign)&&N.assign(a,b)}function z(){P.length=0,O?(P.push(a.$watch(O,function(a){L.content=a,!a&&L.isOpen&&t()})),P.push(D.$watch(function(){M||(M=!0,D.$$postDigest(function(){M=!1,L&&L.isOpen&&Q()}))}))):P.push(d.$observe(e,function(a){L.content=a,!a&&L.isOpen?t():Q()})),P.push(d.$observe(k+"Title",function(a){L.title=a,L.isOpen&&Q()})),P.push(d.$observe(k+"Placement",function(a){L.placement=a?a:o.placement,L.isOpen&&Q()}))}function A(){P.length&&(angular.forEach(P,function(a){a()}),P.length=0)}function B(){var a=d[k+"Trigger"];R(),J=p(a),"none"!==J.show&&J.show.forEach(function(a,c){a===J.hide[c]?b[0].addEventListener(a,j):a&&(b[0].addEventListener(a,m),J.hide[c].split(" ").forEach(function(a){b[0].addEventListener(a,q)})),b.on("keypress",function(a){27===a.which&&q()})})}var C,D,E,F,G,H,I=angular.isDefined(o.appendToBody)?o.appendToBody:!1,J=p(void 0),K=angular.isDefined(d[k+"Enable"]),L=a.$new(!0),M=!1,N=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,O=o.useContentExp?l(d[e]):!1,P=[],Q=function(){C&&C.html()&&(H||(H=g(function(){C.css({top:0,left:0});var a=i.positionElements(b,C,L.placement,I);a.top+="px",a.left+="px",a.visibility="visible",C.css(a),H=null},0,!1)))};L.origScope=a,L.isOpen=!1,n.add(L,{close:t}),L.contentExp=function(){return L.content},d.$observe("disabled",function(a){a&&s(),a&&L.isOpen&&t()}),N&&a.$watch(N,function(a){L&&!a===L.isOpen&&j()});var R=function(){J.show.forEach(function(a){b.unbind(a,m)}),J.hide.forEach(function(a){a.split(" ").forEach(function(a){b[0].removeEventListener(a,q)})})};B();var S=a.$eval(d[k+"Animation"]);L.animation=angular.isDefined(S)?!!S:o.animation;var T=a.$eval(d[k+"AppendToBody"]);I=angular.isDefined(T)?T:I,I&&a.$on("$locationChangeSuccess",function(){L.isOpen&&t()}),a.$on("$destroy",function(){s(),u(),R(),w(),n.remove(L),L=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",function(){return{restrict:"A",link:function(a,b,c){a.placement&&b.addClass(a.placement),a.popupClass&&b.addClass(a.popupClass),a.animation()&&b.addClass(c.tooltipAnimationClass)}}}).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html",link:function(a,b){b.addClass("tooltip")}}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/tooltip/tooltip-template-popup.html",link:function(a,b){b.addClass("tooltip")}}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-popup.html",link:function(a,b){b.addClass("tooltip")}}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.tooltip").value("$tooltipSuppressWarning",!1).provider("$tooltip",["$uibTooltipProvider",function(a){angular.extend(this,a),this.$get=["$log","$tooltipSuppressWarning","$injector",function(b,c,d){return c||b.warn("$tooltip is now deprecated. Use $uibTooltip instead."),d.invoke(a.$get)}]}]).directive("tooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest","$log","$tooltipSuppressWarning",function(a,b,c,d,e,f){return{link:function(g,h,i){f||e.warn("tooltip-template-transclude is now deprecated. Use uib-tooltip-template-transclude instead.");var j,k,l,m=g.$eval(i.tooltipTemplateTranscludeScope),n=0,o=function(){k&&(k.remove(),k=null),j&&(j.$destroy(),j=null),l&&(a.leave(l).then(function(){k=null}),k=l,l=null)};g.$watch(b.parseAsResourceUrl(i.tooltipTemplateTransclude),function(b){var e=++n;b?(d(b,!0).then(function(d){if(e===n){var f=m.$new(),g=d,i=c(g)(f,function(b){o(),a.enter(b,h)});j=f,l=i,j.$emit("$includeContentLoaded",b)}},function(){e===n&&(o(),g.$emit("$includeContentError",b))}),g.$emit("$includeContentRequested",b)):o()}),g.$on("$destroy",o)}}}]).directive("tooltipClasses",["$log","$tooltipSuppressWarning",function(a,b){return{restrict:"A",link:function(c,d,e){b||a.warn("tooltip-classes is now deprecated. Use uib-tooltip-classes instead."),c.placement&&d.addClass(c.placement),c.popupClass&&d.addClass(c.popupClass),c.animation()&&d.addClass(e.tooltipAnimationClass)}}}]).directive("tooltipPopup",["$log","$tooltipSuppressWarning",function(a,b){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html",link:function(c,d){b||a.warn("tooltip-popup is now deprecated. Use uib-tooltip-popup instead."),d.addClass("tooltip")}}}]).directive("tooltip",["$tooltip",function(a){return a("tooltip","tooltip","mouseenter")}]).directive("tooltipTemplatePopup",["$log","$tooltipSuppressWarning",function(a,b){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/tooltip/tooltip-template-popup.html",link:function(c,d){b||a.warn("tooltip-template-popup is now deprecated. Use uib-tooltip-template-popup instead."),d.addClass("tooltip")}}}]).directive("tooltipTemplate",["$tooltip",function(a){return a("tooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("tooltipHtmlPopup",["$log","$tooltipSuppressWarning",function(a,b){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-popup.html",link:function(c,d){b||a.warn("tooltip-html-popup is now deprecated. Use uib-tooltip-html-popup instead."),d.addClass("tooltip")}}}]).directive("tooltipHtml",["$tooltip",function(a){return a("tooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/popover/popover-template.html",link:function(a,b){b.addClass("popover")}}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover-html.html",link:function(a,b){b.addClass("popover")}}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html",link:function(a,b){b.addClass("popover")}}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.popover").value("$popoverSuppressWarning",!1).directive("popoverTemplatePopup",["$log","$popoverSuppressWarning",function(a,b){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/popover/popover-template.html",link:function(c,d){b||a.warn("popover-template-popup is now deprecated. Use uib-popover-template-popup instead."),d.addClass("popover")}}}]).directive("popoverTemplate",["$tooltip",function(a){return a("popoverTemplate","popover","click",{useContentExp:!0})}]).directive("popoverHtmlPopup",["$log","$popoverSuppressWarning",function(a,b){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover-html.html",link:function(c,d){b||a.warn("popover-html-popup is now deprecated. Use uib-popover-html-popup instead."),d.addClass("popover")}}}]).directive("popoverHtml",["$tooltip",function(a){return a("popoverHtml","popover","click",{useContentExp:!0})}]).directive("popoverPopup",["$log","$popoverSuppressWarning",function(a,b){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html",link:function(c,d){b||a.warn("popover-popup is now deprecated. Use uib-popover-popup instead."),d.addClass("popover")}}}]).directive("popover",["$tooltip",function(a){return a("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.progressbar").value("$progressSuppressWarning",!1).controller("ProgressController",["$scope","$attrs","uibProgressConfig","$log","$progressSuppressWarning",function(a,b,c,d,e){e||d.warn("ProgressController is now deprecated. Use UibProgressController instead.");var f=this,g=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,d){g||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=d&&angular.isDefined(d.title)?d.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){b.percent=+(100*b.value/b.max).toFixed(2);var a=f.bars.reduce(function(a,b){return a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,f.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1)},a.$watch("max",function(b){f.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("progress",["$log","$progressSuppressWarning",function(a,b){return{replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{max:"=?",title:"@?"},templateUrl:"template/progressbar/progress.html",link:function(){b||a.warn("progress is now deprecated. Use uib-progress instead.")}}}]).directive("bar",["$log","$progressSuppressWarning",function(a,b){return{replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(c,d,e,f){b||a.warn("bar is now deprecated. Use uib-bar instead."),f.addBar(c,d)}}}]).directive("progressbar",["$log","$progressSuppressWarning",function(a,b){return{replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(c,d,e,f){b||a.warn("progressbar is now deprecated. Use uib-progressbar instead."),f.addBar(c,angular.element(d.children()[0]),{title:e.title})}}}]),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.rating").value("$ratingSuppressWarning",!1).controller("RatingController",["$scope","$attrs","$controller","$log","$ratingSuppressWarning",function(a,b,c,d,e){e||d.warn("RatingController is now deprecated. Use UibRatingController instead."),angular.extend(this,c("UibRatingController",{$scope:a,$attrs:b}))}]).directive("rating",["$log","$ratingSuppressWarning",function(a,b){return{require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(c,d,e,f){b||a.warn("rating is now deprecated. Use uib-rating instead.");var g=f[0],h=f[1];g.init(h)}}}]),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e==c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:["?^uibTab","?^tab"],link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("tab-heading")||a.hasAttribute("data-tab-heading")||a.hasAttribute("x-tab-heading")||a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"tab-heading"===a.tagName.toLowerCase()||"data-tab-heading"===a.tagName.toLowerCase()||"x-tab-heading"===a.tagName.toLowerCase()||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:["?^uibTabset","?^tabset"],link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.tabs").value("$tabsSuppressWarning",!1).controller("TabsetController",["$scope","$controller","$log","$tabsSuppressWarning",function(a,b,c,d){d||c.warn("TabsetController is now deprecated. Use UibTabsetController instead."),angular.extend(this,b("UibTabsetController",{$scope:a}))}]).directive("tabset",["$log","$tabsSuppressWarning",function(a,b){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(c,d,e){b||a.warn("tabset is now deprecated. Use uib-tabset instead."),c.vertical=angular.isDefined(e.vertical)?c.$parent.$eval(e.vertical):!1,c.justified=angular.isDefined(e.justified)?c.$parent.$eval(e.justified):!1}}}]).directive("tab",["$parse","$log","$tabsSuppressWarning",function(a,b,c){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},link:function(d,e,f,g,h){c||b.warn("tab is now deprecated. Use uib-tab instead."),d.$watch("active",function(a){a&&g.select(d)}),d.disabled=!1,f.disable&&d.$parent.$watch(a(f.disable),function(a){d.disabled=!!a}),d.select=function(){d.disabled||(d.active=!0)},g.addTab(d),d.$on("$destroy",function(){g.removeTab(d)}),d.$transcludeFn=h}}}]).directive("tabHeadingTransclude",["$log","$tabsSuppressWarning",function(a,b){return{restrict:"A",require:"^tab",link:function(c,d){b||a.warn("tab-heading-transclude is now deprecated. Use uib-tab-heading-transclude instead."),c.$watch("headingElement",function(a){a&&(d.html(""),d.append(a))})}}}]).directive("tabContentTransclude",["$log","$tabsSuppressWarning",function(a,b){function c(a){return a.tagName&&(a.hasAttribute("tab-heading")||a.hasAttribute("data-tab-heading")||a.hasAttribute("x-tab-heading")||"tab-heading"===a.tagName.toLowerCase()||"data-tab-heading"===a.tagName.toLowerCase()||"x-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(d,e,f){b||a.warn("tab-content-transclude is now deprecated. Use uib-tab-content-transclude instead.");var g=d.$eval(f.tabContentTransclude);g.$transcludeFn(g.$parent,function(a){angular.forEach(a,function(a){c(a)?g.headingElement=a:e.append(a)})})}}}]),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=parseInt(a.hours,10),c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===r[1]&&(b+=12)),b):void 0}function i(){var b=parseInt(a.minutes,10);return b>=0&&60>b?b:void 0}function j(a){return angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function k(a){l(),q.$setViewValue(new Date(p)),m(a)}function l(){q.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1}function m(b){var c=p.getHours(),d=p.getMinutes();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:j(c),"m"!==b&&(a.minutes=j(d)),a.meridian=p.getHours()<12?r[0]:r[1]}function n(a,b){var c=new Date(a.getTime()+6e4*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes()),d}function o(a){p=n(p,a),k()}var p=new Date,q={$setViewValue:angular.noop},r=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){q=b,q.$render=this.render,q.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;h&&this.setupMousewheelEvents(e,f);var i=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;i&&this.setupArrowkeyEvents(e,f),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f)};var s=g.hourStep;c.hourStep&&a.$parent.$watch(d(c.hourStep),function(a){s=parseInt(a,10)});var t=g.minuteStep;c.minuteStep&&a.$parent.$watch(d(c.minuteStep),function(a){t=parseInt(a,10)});var u;a.$parent.$watch(d(c.min),function(a){var b=new Date(a);u=isNaN(b)?void 0:b});var v;a.$parent.$watch(d(c.max),function(a){var b=new Date(a);v=isNaN(b)?void 0:b}),a.noIncrementHours=function(){var a=n(p,60*s);
return a>v||p>a&&u>a},a.noDecrementHours=function(){var a=n(p,60*-s);return u>a||a>p&&a>v},a.noIncrementMinutes=function(){var a=n(p,t);return a>v||p>a&&u>a},a.noDecrementMinutes=function(){var a=n(p,-t);return u>a||a>p&&a>v},a.noToggleMeridian=function(){return p.getHours()<13?n(p,720)>v:n(p,-720)<u},a.showMeridian=g.showMeridian,c.showMeridian&&a.$parent.$watch(d(c.showMeridian),function(b){if(a.showMeridian=!!b,q.$error.time){var c=h(),d=i();angular.isDefined(c)&&angular.isDefined(d)&&(p.setHours(c),k())}else m()}),this.setupMousewheelEvents=function(b,c){var d=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.bind("mousewheel wheel",function(b){a.$apply(d(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){a.$apply(d(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c){b.bind("keydown",function(b){38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply())}),c.bind("keydown",function(b){38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply())})},this.setupInputEvents=function(b,c){if(a.readonlyInput)return a.updateHours=angular.noop,void(a.updateMinutes=angular.noop);var d=function(b,c){q.$setViewValue(null),q.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c)};a.updateHours=function(){var a=h(),b=i();angular.isDefined(a)&&angular.isDefined(b)?(p.setHours(a),u>p||p>v?d(!0):k("h")):d(!0)},b.bind("blur",function(b){!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=j(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();angular.isDefined(a)&&angular.isDefined(b)?(p.setMinutes(a),u>p||p>v?d(void 0,!0):k("m")):d(void 0,!0)},c.bind("blur",function(b){!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=j(a.minutes)})})},this.render=function(){var b=q.$viewValue;isNaN(b)?(q.$setValidity("time",!1),e.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.')):(b&&(p=b),u>p||p>v?(q.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):l(),m())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*s)},a.decrementHours=function(){a.noDecrementHours()||o(60*-s)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(t)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(-t)},a.toggleMeridian=function(){a.noToggleMeridian()||o(720*(p.getHours()<12?1:-1))}}]).directive("uibTimepicker",function(){return{restrict:"EA",require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(a,b){return b.templateUrl||"template/timepicker/timepicker.html"},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}),angular.module("ui.bootstrap.timepicker").value("$timepickerSuppressWarning",!1).controller("TimepickerController",["$scope","$element","$attrs","$controller","$log","$timepickerSuppressWarning",function(a,b,c,d,e,f){f||e.warn("TimepickerController is now deprecated. Use UibTimepickerController instead."),angular.extend(this,d("UibTimepickerController",{$scope:a,$element:b,$attrs:c}))}]).directive("timepicker",["$log","$timepickerSuppressWarning",function(a,b){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(a,b){return b.templateUrl||"template/timepicker/timepicker.html"},link:function(c,d,e,f){b||a.warn("timepicker is now deprecated. Use uib-timepicker instead.");var g=f[0],h=f[1];h&&g.init(h,d.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(){K.moveInProgress||(K.moveInProgress=!0,K.$digest()),S&&g.cancel(S),S=g(function(){K.matches.length&&n(),K.moveInProgress=!1},r)}function n(){K.position=C?k.offset(b):k.position(b),K.position.top+=b.prop("offsetHeight")}var o,p,q=[9,13,27,38,40],r=200,s=a.$eval(c.typeaheadMinLength);s||0===s||(s=1);var t,u,v=a.$eval(c.typeaheadWaitMs)||0,w=a.$eval(c.typeaheadEditable)!==!1,x=e(c.typeaheadLoading).assign||angular.noop,y=e(c.typeaheadOnSelect),z=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,A=e(c.typeaheadNoResults).assign||angular.noop,B=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,C=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,D=c.typeaheadAppendToElementId||!1,E=a.$eval(c.typeaheadFocusFirst)!==!1,F=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,G=e(c.ngModel),H=e(c.ngModel+"($$$p)"),I=function(b,c){return angular.isFunction(G(a))&&p&&p.$options&&p.$options.getterSetter?H(b,{$$$p:c}):G.assign(b,c)},J=l.parse(c.uibTypeahead),K=a.$new(),L=a.$on("$destroy",function(){K.$destroy()});K.$on("$destroy",L);var M="typeahead-"+K.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":M});var N=angular.element("<div uib-typeahead-popup></div>");N.attr({id:M,matches:"matches",active:"activeIdx",select:"select(activeIdx)","move-in-progress":"moveInProgress",query:"query",position:"position"}),angular.isDefined(c.typeaheadTemplateUrl)&&N.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&N.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var O=function(){K.matches=[],K.activeIdx=-1,b.attr("aria-expanded",!1)},P=function(a){return M+"-option-"+a};K.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",P(a))});var Q=function(a,b){return K.matches.length>b&&a?a.toUpperCase()===K.matches[b].label.toUpperCase():!1},R=function(c){var d={$viewValue:c};x(a,!0),A(a,!1),f.when(J.source(a,d)).then(function(e){var f=c===o.$viewValue;if(f&&t)if(e&&e.length>0){K.activeIdx=E?0:-1,A(a,!1),K.matches.length=0;for(var g=0;g<e.length;g++)d[J.itemName]=e[g],K.matches.push({id:P(g),label:J.viewMapper(K,d),model:e[g]});K.query=c,n(),b.attr("aria-expanded",!0),F&&1===K.matches.length&&Q(c,0)&&K.select(0)}else O(),A(a,!0);f&&x(a,!1)},function(){O(),x(a,!1),A(a,!0)})};C&&(angular.element(i).bind("resize",m),h.find("body").bind("scroll",m));var S;K.moveInProgress=!1,K.query=void 0;var T,U=function(a){T=g(function(){R(a)},v)},V=function(){T&&g.cancel(T)};O(),K.select=function(d){var e,f,h={};u=!0,h[J.itemName]=f=K.matches[d].model,e=J.modelMapper(a,h),I(a,e),o.$setValidity("editable",!0),o.$setValidity("parse",!0),y(a,{$item:f,$model:e,$label:J.viewMapper(a,h)}),O(),K.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.bind("keydown",function(a){if(0!==K.matches.length&&-1!==q.indexOf(a.which)){if(-1===K.activeIdx&&(9===a.which||13===a.which))return O(),void K.$digest();a.preventDefault(),40===a.which?(K.activeIdx=(K.activeIdx+1)%K.matches.length,K.$digest()):38===a.which?(K.activeIdx=(K.activeIdx>0?K.activeIdx:K.matches.length)-1,K.$digest()):13===a.which||9===a.which?K.$apply(function(){K.select(K.activeIdx)}):27===a.which&&(a.stopPropagation(),O(),K.$digest())}}),b.bind("blur",function(){z&&K.matches.length&&-1!==K.activeIdx&&!u&&(u=!0,K.$apply(function(){K.select(K.activeIdx)})),t=!1,u=!1});var W=function(a){b[0]!==a.target&&3!==a.which&&0!==K.matches.length&&(O(),j.$$phase||K.$digest())};h.bind("click",W),a.$on("$destroy",function(){h.unbind("click",W),(C||D)&&X.remove(),C&&(angular.element(i).unbind("resize",m),h.find("body").unbind("scroll",m)),N.remove()});var X=d(N)(K);C?h.find("body").append(X):D!==!1?angular.element(h[0].getElementById(D)).append(X):b.after(X),this.init=function(b,c){o=b,p=c,o.$parsers.unshift(function(b){return t=!0,0===s||b&&b.length>=s?v>0?(V(),U(b)):R(b):(x(a,!1),V(),O()),w?b:b?void o.$setValidity("editable",!1):(o.$setValidity("editable",!0),null)}),o.$formatters.push(function(b){var c,d,e={};return w||o.$setValidity("editable",!0),B?(e.$model=b,B(a,e)):(e[J.itemName]=b,c=J.viewMapper(a,e),e[J.itemName]=void 0,d=J.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",function(){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"template/typeahead/typeahead-popup.html"},link:function(a,b,c){a.templateUrl=c.templateUrl,a.isOpen=function(){return a.matches.length>0},a.isActive=function(b){return a.active==b},a.selectActive=function(b){a.active=b},a.selectMatch=function(b){a.select({activeIdx:b})}}}}).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"template/typeahead/typeahead-match.html";a(g).then(function(a){b(a.trim())(d,function(a){e.replaceWith(a)})})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"<strong>$&</strong>"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("ui.bootstrap.typeahead").value("$typeaheadSuppressWarning",!1).service("typeaheadParser",["$parse","uibTypeaheadParser","$log","$typeaheadSuppressWarning",function(a,b,c,d){return d||c.warn("typeaheadParser is now deprecated. Use uibTypeaheadParser instead."),b}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$window","$rootScope","$uibPosition","typeaheadParser","$log","$typeaheadSuppressWarning",function(a,b,c,d,e,f,g,h,i,j,k){var l=[9,13,27,38,40],m=200;return{require:["ngModel","^?ngModelOptions"],link:function(n,o,p,q){function r(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),V&&d.cancel(V),V=d(function(){N.matches.length&&s(),N.moveInProgress=!1},m)}function s(){N.position=F?h.offset(o):h.position(o),N.position.top+=o.prop("offsetHeight")}k||j.warn("typeahead is now deprecated. Use uib-typeahead instead.");var t=q[0],u=q[1],v=n.$eval(p.typeaheadMinLength);v||0===v||(v=1);var w,x,y=n.$eval(p.typeaheadWaitMs)||0,z=n.$eval(p.typeaheadEditable)!==!1,A=b(p.typeaheadLoading).assign||angular.noop,B=b(p.typeaheadOnSelect),C=angular.isDefined(p.typeaheadSelectOnBlur)?n.$eval(p.typeaheadSelectOnBlur):!1,D=b(p.typeaheadNoResults).assign||angular.noop,E=p.typeaheadInputFormatter?b(p.typeaheadInputFormatter):void 0,F=p.typeaheadAppendToBody?n.$eval(p.typeaheadAppendToBody):!1,G=p.typeaheadAppendToElementId||!1,H=n.$eval(p.typeaheadFocusFirst)!==!1,I=p.typeaheadSelectOnExact?n.$eval(p.typeaheadSelectOnExact):!1,J=b(p.ngModel),K=b(p.ngModel+"($$$p)"),L=function(a,b){return angular.isFunction(J(n))&&u&&u.$options&&u.$options.getterSetter?K(a,{$$$p:b}):J.assign(a,b)},M=i.parse(p.typeahead),N=n.$new(),O=n.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());o.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q=angular.element("<div typeahead-popup></div>");Q.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx)","move-in-progress":"moveInProgress",query:"query",position:"position"}),angular.isDefined(p.typeaheadTemplateUrl)&&Q.attr("template-url",p.typeaheadTemplateUrl),angular.isDefined(p.typeaheadPopupTemplateUrl)&&Q.attr("popup-template-url",p.typeaheadPopupTemplateUrl);var R=function(){N.matches=[],N.activeIdx=-1,o.attr("aria-expanded",!1)},S=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?o.removeAttr("aria-activedescendant"):o.attr("aria-activedescendant",S(a))});var T=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},U=function(a){var b={$viewValue:a};A(n,!0),D(n,!1),c.when(M.source(n,b)).then(function(c){var d=a===t.$viewValue;if(d&&w)if(c&&c.length>0){N.activeIdx=H?0:-1,D(n,!1),N.matches.length=0;for(var e=0;e<c.length;e++)b[M.itemName]=c[e],N.matches.push({id:S(e),label:M.viewMapper(N,b),model:c[e]});N.query=a,s(),o.attr("aria-expanded",!0),I&&1===N.matches.length&&T(a,0)&&N.select(0)}else R(),D(n,!0);d&&A(n,!1)},function(){R(),A(n,!1),D(n,!0)})};F&&(angular.element(f).bind("resize",r),e.find("body").bind("scroll",r));var V;N.moveInProgress=!1,R(),N.query=void 0;var W,X=function(a){W=d(function(){U(a)},y)},Y=function(){W&&d.cancel(W)};t.$parsers.unshift(function(a){return w=!0,0===v||a&&a.length>=v?y>0?(Y(),X(a)):U(a):(A(n,!1),Y(),R()),z?a:a?void t.$setValidity("editable",!1):(t.$setValidity("editable",!0),null)}),t.$formatters.push(function(a){var b,c,d={};return z||t.$setValidity("editable",!0),E?(d.$model=a,E(n,d)):(d[M.itemName]=a,b=M.viewMapper(n,d),d[M.itemName]=void 0,c=M.viewMapper(n,d),b!==c?b:a)}),N.select=function(a){var b,c,e={};x=!0,e[M.itemName]=c=N.matches[a].model,b=M.modelMapper(n,e),L(n,b),t.$setValidity("editable",!0),t.$setValidity("parse",!0),B(n,{$item:c,$model:b,$label:M.viewMapper(n,e)}),R(),N.$eval(p.typeaheadFocusOnSelect)!==!1&&d(function(){o[0].focus()},0,!1)},o.bind("keydown",function(a){if(0!==N.matches.length&&-1!==l.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return R(),void N.$digest();a.preventDefault(),40===a.which?(N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest()):38===a.which?(N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest()):13===a.which||9===a.which?N.$apply(function(){N.select(N.activeIdx)}):27===a.which&&(a.stopPropagation(),R(),N.$digest())}}),o.bind("blur",function(){C&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){N.select(N.activeIdx)})),w=!1,x=!1});var Z=function(a){o[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(R(),g.$$phase||N.$digest())};e.bind("click",Z),n.$on("$destroy",function(){e.unbind("click",Z),(F||G)&&$.remove(),F&&(angular.element(f).unbind("resize",r),e.find("body").unbind("scroll",r)),Q.remove()});var $=a(Q)(N);F?e.find("body").append($):G!==!1?angular.element(e[0].getElementById(G)).append($):o.after($)}}}]).directive("typeaheadPopup",["$typeaheadSuppressWarning","$log",function(a,b){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"template/typeahead/typeahead-popup.html"},link:function(c,d,e){a||b.warn("typeahead-popup is now deprecated. Use uib-typeahead-popup instead."),c.templateUrl=e.templateUrl,c.isOpen=function(){return c.matches.length>0},c.isActive=function(a){return c.active==a},c.selectActive=function(a){c.active=a},c.selectMatch=function(a){c.select({activeIdx:a})}}}}]).directive("typeaheadMatch",["$templateRequest","$compile","$parse","$typeaheadSuppressWarning","$log",function(a,b,c,d,e){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(f,g,h){d||e.warn("typeahead-match is now deprecated. Use uib-typeahead-match instead.");var i=c(h.templateUrl)(f.$parent)||"template/typeahead/typeahead-match.html";a(i).then(function(a){b(a.trim())(f,function(a){g.replaceWith(a)})})}}}]).filter("typeaheadHighlight",["$sce","$injector","$log","$typeaheadSuppressWarning",function(a,b,c,d){function e(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function f(a){return/<.*>/g.test(a)}var g;return g=b.has("$sanitize"),function(b,h){return d||c.warn("typeaheadHighlight is now deprecated. Use uibTypeaheadHighlight instead."),!g&&f(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=h?(""+b).replace(new RegExp(e(h),"gi"),"<strong>$&</strong>"):b,g||(b=a.trustAsHtml(b)),b}}]),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion-group.html",'<div class="panel {{panelClass || \'panel-default\'}}">\n  <div class="panel-heading" ng-keypress="toggleOpen($event)">\n    <h4 class="panel-title">\n      <a href tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n    </h4>\n  </div>\n  <div class="panel-collapse collapse" uib-collapse="!isOpen">\n	  <div class="panel-body" ng-transclude></div>\n  </div>\n</div>\n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissible\' : null]" role="alert">\n    <button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n        <span aria-hidden="true">&times;</span>\n        <span class="sr-only">Close</span>\n    </button>\n    <div ng-transclude></div>\n</div>\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n  <div class="carousel-inner" ng-transclude></div>\n  <a role="button" href class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1">\n    <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n    <span class="sr-only">previous</span>\n  </a>\n  <a role="button" href class="right carousel-control" ng-click="next()" ng-show="slides.length > 1">\n    <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n    <span class="sr-only">next</span>\n  </a>\n  <ol class="carousel-indicators" ng-show="slides.length > 1">\n    <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n      <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n    </li>\n  </ol>\n</div>')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("template/carousel/slide.html",'<div ng-class="{\n    \'active\': active\n  }" class="item text-center" ng-transclude></div>\n')}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/datepicker.html",'<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n  <uib-daypicker ng-switch-when="day" tabindex="0"></uib-daypicker>\n  <uib-monthpicker ng-switch-when="month" tabindex="0"></uib-monthpicker>\n  <uib-yearpicker ng-switch-when="year" tabindex="0"></uib-yearpicker>\n</div>')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/day.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n      <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n    </tr>\n    <tr>\n      <th ng-if="showWeeks" class="text-center"></th>\n      <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr ng-repeat="row in rows track by $index">\n      <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n      <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n        <button type="button" style="min-width:100%;" class="btn btn-default btn-sm" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/month.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n      <th><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr ng-repeat="row in rows track by $index">\n      <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n        <button type="button" style="min-width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/popup.html",'<ul class="dropdown-menu" dropdown-nested ng-if="isOpen" style="display: block" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n	<li ng-transclude></li>\n	<li ng-if="showButtonBar" style="padding:10px 9px 2px">\n		<span class="btn-group pull-left">\n			<button type="button" class="btn btn-sm btn-info" ng-click="select(\'today\')" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n			<button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText(\'clear\') }}</button>\n		</span>\n		<button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText(\'close\') }}</button>\n	</li>\n</ul>\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/year.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n      <th colspan="3"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr ng-repeat="row in rows track by $index">\n      <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n        <button type="button" style="min-width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("template/modal/backdrop.html",'<div uib-modal-animation-class="fade"\n     modal-in-class="in"\n     ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(a){a.put("template/modal/window.html",'<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"\n    uib-modal-animation-class="fade"\n    modal-in-class="in"\n    ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}">\n    <div class="modal-dialog" ng-class="size ? \'modal-\' + size : \'\'"><div class="modal-content" uib-modal-transclude></div></div>\n</div>\n')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pager.html",'<ul class="pager">\n  <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n  <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n</ul>\n')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pagination.html",'<ul class="pagination">\n  <li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText(\'first\')}}</a></li>\n  <li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n  <li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)">{{page.text}}</a></li>\n  <li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n  <li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)">{{::getText(\'last\')}}</a></li>\n</ul>\n')}]),angular.module("template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-html-popup.html",'<div\n  tooltip-animation-class="fade"\n  uib-tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="tooltip-arrow"></div>\n  <div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-popup.html",'<div\n  tooltip-animation-class="fade"\n  uib-tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="tooltip-arrow"></div>\n  <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-template-popup.html",'<div\n  tooltip-animation-class="fade"\n  uib-tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="tooltip-arrow"></div>\n  <div class="tooltip-inner"\n    uib-tooltip-template-transclude="contentExp()"\n    tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover-html.html",'<div tooltip-animation-class="fade"\n  uib-tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="arrow"></div>\n\n  <div class="popover-inner">\n      <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n      <div class="popover-content" ng-bind-html="contentExp()"></div>\n  </div>\n</div>\n')}]),angular.module("template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover-template.html",'<div tooltip-animation-class="fade"\n  uib-tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="arrow"></div>\n\n  <div class="popover-inner">\n      <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n      <div class="popover-content"\n        uib-tooltip-template-transclude="contentExp()"\n        tooltip-template-transclude-scope="originScope()"></div>\n  </div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover.html",'<div tooltip-animation-class="fade"\n  uib-tooltip-classes\n  ng-class="{ in: isOpen() }">\n  <div class="arrow"></div>\n\n  <div class="popover-inner">\n      <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n      <div class="popover-content" ng-bind="content"></div>\n  </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" style="min-width: 0;" ng-transclude></div>\n')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progressbar.html",'<div class="progress">\n  <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" style="min-width: 0;" ng-transclude></div>\n</div>\n')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n    <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n    <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}" aria-valuetext="{{r.title}}"></i>\n</span>\n');
}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n  <a href ng-click="select()" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tabset.html",'<div>\n  <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n  <div class="tab-content">\n    <div class="tab-pane" \n         ng-repeat="tab in tabs" \n         ng-class="{active: tab.active}"\n         uib-tab-content-transclude="tab">\n    </div>\n  </div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("template/timepicker/timepicker.html",'<table>\n  <tbody>\n    <tr class="text-center" ng-show="::showSpinners">\n      <td><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n      <td>&nbsp;</td>\n      <td><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n      <td ng-show="showMeridian"></td>\n    </tr>\n    <tr>\n      <td class="form-group" ng-class="{\'has-error\': invalidHours}">\n        <input style="width:50px;" type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}">\n      </td>\n      <td>:</td>\n      <td class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n        <input style="width:50px;" type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}">\n      </td>\n      <td ng-show="showMeridian"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n    </tr>\n    <tr class="text-center" ng-show="::showSpinners">\n      <td><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n      <td>&nbsp;</td>\n      <td><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n      <td ng-show="showMeridian"></td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-match.html",'<a href tabindex="-1" ng-bind-html="match.label | uibTypeaheadHighlight:query"></a>\n')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n    <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{::match.id}}">\n        <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n    </li>\n</ul>\n')}]),!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>');
/*! angularjs-slider - v2.11.0 -  (c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com> -  https://github.com/angular-slider/angularjs-slider -  2016-04-01 */
!function(a,b){"use strict";"function"==typeof define&&define.amd?define(["angular"],b):"object"==typeof module&&module.exports?module.exports=b(require("angular")):b(a.angular)}(this,function(a){"use strict";var b=a.module("rzModule",[]).factory("RzSliderOptions",function(){var b={floor:0,ceil:null,step:1,precision:0,minRange:0,id:null,translate:null,stepsArray:null,draggableRange:!1,draggableRangeOnly:!1,showSelectionBar:!1,showSelectionBarEnd:!1,showSelectionBarFromValue:null,hidePointerLabels:!1,hideLimitLabels:!1,readOnly:!1,disabled:!1,interval:350,showTicks:!1,showTicksValues:!1,ticksTooltip:null,ticksValuesTooltip:null,vertical:!1,getSelectionBarColor:null,getPointerColor:null,keyboardSupport:!0,scale:1,enforceStep:!0,enforceRange:!1,noSwitching:!1,onlyBindHandles:!1,onStart:null,onChange:null,onEnd:null,rightToLeft:!1},c={},d={};return d.options=function(b){a.extend(c,b)},d.getOptions=function(d){return a.extend({},b,c,d)},d}).factory("rzThrottle",["$timeout",function(a){return function(b,c,d){var e,f,g,h=Date.now||function(){return(new Date).getTime()},i=null,j=0;d=d||{};var k=function(){j=h(),i=null,g=b.apply(e,f),e=f=null};return function(){var l=h(),m=c-(l-j);return e=this,f=arguments,0>=m?(a.cancel(i),i=null,j=l,g=b.apply(e,f),e=f=null):i||d.trailing===!1||(i=a(k,m)),g}}}]).factory("RzSlider",["$timeout","$document","$window","$compile","RzSliderOptions","rzThrottle",function(b,c,d,e,f,g){var h=function(a,b){this.scope=a,this.sliderElem=b,this.range=void 0!==this.scope.rzSliderModel&&void 0!==this.scope.rzSliderHigh,this.dragging={active:!1,value:0,difference:0,offset:0,lowLimit:0,highLimit:0},this.positionProperty="left",this.dimensionProperty="width",this.handleHalfDim=0,this.maxPos=0,this.precision=0,this.step=1,this.tracking="",this.minValue=0,this.maxValue=0,this.valueRange=0,this.initHasRun=!1,this.internalChange=!1,this.fullBar=null,this.selBar=null,this.minH=null,this.maxH=null,this.flrLab=null,this.ceilLab=null,this.minLab=null,this.maxLab=null,this.cmbLab=null,this.ticks=null,this.init()};return h.prototype={init:function(){var b,c,e=this,f=function(){e.calcViewDimensions()};this.applyOptions(),this.initElemHandles(),this.manageElementsStyle(),this.setDisabledState(),this.calcViewDimensions(),this.setMinAndMax(),this.addAccessibility(),this.updateCeilLab(),this.updateFloorLab(),this.initHandles(),this.manageEventsBindings(),this.scope.$on("reCalcViewDimensions",f),a.element(d).on("resize",f),this.initHasRun=!0,b=g(function(){e.onLowHandleChange()},e.options.interval),c=g(function(){e.onHighHandleChange()},e.options.interval),this.scope.$on("rzSliderForceRender",function(){e.resetLabelsValue(),b(),e.range&&c(),e.resetSlider()}),this.scope.$watch("rzSliderOptions()",function(a,b){a!==b&&(e.applyOptions(),e.resetSlider())},!0),this.scope.$watch("rzSliderModel",function(a,c){e.internalChange||a!==c&&b()}),this.scope.$watch("rzSliderHigh",function(a,b){e.internalChange||a!==b&&(null!=a&&c(),(e.range&&null==a||!e.range&&null!=a)&&(e.applyOptions(),e.resetSlider()))}),this.scope.$on("$destroy",function(){e.unbindEvents(),a.element(d).off("resize",f)})},onLowHandleChange:function(){this.setMinAndMax(),this.updateLowHandle(this.valueToOffset(this.scope.rzSliderModel)),this.updateSelectionBar(),this.updateTicksScale(),this.updateAriaAttributes(),this.range&&this.updateCmbLabel()},onHighHandleChange:function(){this.setMinAndMax(),this.updateHighHandle(this.valueToOffset(this.scope.rzSliderHigh)),this.updateSelectionBar(),this.updateTicksScale(),this.updateCmbLabel(),this.updateAriaAttributes()},applyOptions:function(){var a;a=this.scope.rzSliderOptions?this.scope.rzSliderOptions():{},this.options=f.getOptions(a),this.options.step<=0&&(this.options.step=1),this.range=void 0!==this.scope.rzSliderModel&&void 0!==this.scope.rzSliderHigh,this.options.draggableRange=this.range&&this.options.draggableRange,this.options.draggableRangeOnly=this.range&&this.options.draggableRangeOnly,this.options.draggableRangeOnly&&(this.options.draggableRange=!0),this.options.showTicks=this.options.showTicks||this.options.showTicksValues,this.scope.showTicks=this.options.showTicks,this.options.showSelectionBar=this.options.showSelectionBar||this.options.showSelectionBarEnd||null!==this.options.showSelectionBarFromValue,this.options.stepsArray?(this.options.floor=0,this.options.ceil=this.options.stepsArray.length-1,this.options.step=1,this.options.translate?this.customTrFn=this.options.translate:this.customTrFn=function(a){return this.options.stepsArray[a]}):this.options.translate?this.customTrFn=this.options.translate:this.customTrFn=function(a){return String(a)},this.options.vertical&&(this.positionProperty="bottom",this.dimensionProperty="height")},resetSlider:function(){this.manageElementsStyle(),this.addAccessibility(),this.setMinAndMax(),this.updateCeilLab(),this.updateFloorLab(),this.unbindEvents(),this.manageEventsBindings(),this.setDisabledState(),this.calcViewDimensions()},initElemHandles:function(){a.forEach(this.sliderElem.children(),function(b,c){var d=a.element(b);switch(c){case 0:this.fullBar=d;break;case 1:this.selBar=d;break;case 2:this.minH=d;break;case 3:this.maxH=d;break;case 4:this.flrLab=d;break;case 5:this.ceilLab=d;break;case 6:this.minLab=d;break;case 7:this.maxLab=d;break;case 8:this.cmbLab=d;break;case 9:this.ticks=d}},this),this.selBar.rzsp=0,this.minH.rzsp=0,this.maxH.rzsp=0,this.flrLab.rzsp=0,this.ceilLab.rzsp=0,this.minLab.rzsp=0,this.maxLab.rzsp=0,this.cmbLab.rzsp=0},manageElementsStyle:function(){this.range?this.maxH.css("display",""):this.maxH.css("display","none"),this.alwaysHide(this.flrLab,this.options.showTicksValues||this.options.hideLimitLabels),this.alwaysHide(this.ceilLab,this.options.showTicksValues||this.options.hideLimitLabels),this.alwaysHide(this.minLab,this.options.showTicksValues||this.options.hidePointerLabels),this.alwaysHide(this.maxLab,this.options.showTicksValues||!this.range||this.options.hidePointerLabels),this.alwaysHide(this.cmbLab,this.options.showTicksValues||!this.range||this.options.hidePointerLabels),this.alwaysHide(this.selBar,!this.range&&!this.options.showSelectionBar),this.options.vertical&&this.sliderElem.addClass("rz-vertical"),this.options.draggableRange?this.selBar.addClass("rz-draggable"):this.selBar.removeClass("rz-draggable")},alwaysHide:function(a,b){a.rzAlwaysHide=b,b?this.hideEl(a):this.showEl(a)},manageEventsBindings:function(){this.options.disabled||this.options.readOnly?this.unbindEvents():this.bindEvents()},setDisabledState:function(){this.options.disabled?this.sliderElem.attr("disabled","disabled"):this.sliderElem.attr("disabled",null)},resetLabelsValue:function(){this.minLab.rzsv=void 0,this.maxLab.rzsv=void 0},initHandles:function(){this.updateLowHandle(this.valueToOffset(this.scope.rzSliderModel)),this.range&&this.updateHighHandle(this.valueToOffset(this.scope.rzSliderHigh)),this.updateSelectionBar(),this.range&&this.updateCmbLabel(),this.updateTicksScale()},translateFn:function(a,b,c,d){d=void 0===d?!0:d;var e=String(d?this.customTrFn(a,this.options.id,c):a),f=!1;(void 0===b.rzsv||b.rzsv.length!==e.length||b.rzsv.length>0&&0===b.rzsd)&&(f=!0,b.rzsv=e),b.html(e),f&&this.getDimension(b)},setMinAndMax:function(){this.step=+this.options.step,this.precision=+this.options.precision,this.minValue=this.options.floor,this.options.enforceStep&&(this.scope.rzSliderModel=this.roundStep(this.scope.rzSliderModel),this.range&&(this.scope.rzSliderHigh=this.roundStep(this.scope.rzSliderHigh))),null!=this.options.ceil?this.maxValue=this.options.ceil:this.maxValue=this.options.ceil=this.range?this.scope.rzSliderHigh:this.scope.rzSliderModel,this.options.enforceRange&&(this.scope.rzSliderModel=this.sanitizeValue(this.scope.rzSliderModel),this.range&&(this.scope.rzSliderHigh=this.sanitizeValue(this.scope.rzSliderHigh))),this.valueRange=this.maxValue-this.minValue},addAccessibility:function(){this.minH.attr("role","slider"),this.updateAriaAttributes(),!this.options.keyboardSupport||this.options.readOnly||this.options.disabled?this.minH.attr("tabindex",""):this.minH.attr("tabindex","0"),this.options.vertical&&this.minH.attr("aria-orientation","vertical"),this.range&&(this.maxH.attr("role","slider"),!this.options.keyboardSupport||this.options.readOnly||this.options.disabled?this.maxH.attr("tabindex",""):this.maxH.attr("tabindex","0"),this.options.vertical&&this.maxH.attr("aria-orientation","vertical"))},updateAriaAttributes:function(){this.minH.attr({"aria-valuenow":this.scope.rzSliderModel,"aria-valuetext":this.customTrFn(this.scope.rzSliderModel,this.options.id,"model"),"aria-valuemin":this.minValue,"aria-valuemax":this.maxValue}),this.range&&this.maxH.attr({"aria-valuenow":this.scope.rzSliderHigh,"aria-valuetext":this.customTrFn(this.scope.rzSliderHigh,this.options.id,"high"),"aria-valuemin":this.minValue,"aria-valuemax":this.maxValue})},calcViewDimensions:function(){var a=this.getDimension(this.minH);this.handleHalfDim=a/2,this.barDimension=this.getDimension(this.fullBar),this.maxPos=this.barDimension-a,this.getDimension(this.sliderElem),this.sliderElem.rzsp=this.sliderElem[0].getBoundingClientRect()[this.positionProperty],this.initHasRun&&(this.updateFloorLab(),this.updateCeilLab(),this.initHandles())},updateTicksScale:function(){if(this.options.showTicks){var a=Math.round((this.maxValue-this.minValue)/this.step)+1;this.scope.ticks=[];for(var b=0;a>b;b++){var c=this.roundStep(this.minValue+b*this.step),d={selected:this.isTickSelected(c)};d.selected&&this.options.getSelectionBarColor&&(d.style={"background-color":this.getSelectionBarColor()}),this.options.ticksTooltip&&(d.tooltip=this.options.ticksTooltip(c),d.tooltipPlacement=this.options.vertical?"right":"top"),this.options.showTicksValues&&(d.value=this.getDisplayValue(c,"tick-value"),this.options.ticksValuesTooltip&&(d.valueTooltip=this.options.ticksValuesTooltip(c),d.valueTooltipPlacement=this.options.vertical?"right":"top")),this.options.rightToLeft?this.scope.ticks.unshift(d):this.scope.ticks.push(d)}}},isTickSelected:function(a){if(!this.range)if(null!==this.options.showSelectionBarFromValue){var b=this.options.showSelectionBarFromValue;if(this.scope.rzSliderModel>b&&a>=b&&a<=this.scope.rzSliderModel)return!0;if(this.scope.rzSliderModel<b&&b>=a&&a>=this.scope.rzSliderModel)return!0}else if(this.options.showSelectionBarEnd){if(a>=this.scope.rzSliderModel)return!0}else if(this.options.showSelectionBar&&a<=this.scope.rzSliderModel)return!0;return this.range&&a>=this.scope.rzSliderModel&&a<=this.scope.rzSliderHigh?!0:!1},updateFloorLab:function(){this.translateFn(this.minValue,this.flrLab,"floor"),this.getDimension(this.flrLab);var a=this.options.rightToLeft?this.barDimension-this.flrLab.rzsd:0;this.setPosition(this.flrLab,a)},updateCeilLab:function(){this.translateFn(this.maxValue,this.ceilLab,"ceil"),this.getDimension(this.ceilLab);var a=this.options.rightToLeft?0:this.barDimension-this.ceilLab.rzsd;this.setPosition(this.ceilLab,a)},updateHandles:function(a,b){"rzSliderModel"===a?this.updateLowHandle(b):this.updateHighHandle(b),this.updateSelectionBar(),this.updateTicksScale(),this.range&&this.updateCmbLabel()},getHandleLabelPos:function(a,b){var c=this[a].rzsd,d=b-c/2+this.handleHalfDim,e=this.barDimension-c;return this.options.rightToLeft&&"minLab"===a||!this.options.rightToLeft&&"maxLab"===a?Math.min(d,e):Math.min(Math.max(d,0),e)},updateLowHandle:function(a){if(this.setPosition(this.minH,a),this.translateFn(this.scope.rzSliderModel,this.minLab,"model"),this.setPosition(this.minLab,this.getHandleLabelPos("minLab",a)),this.options.getPointerColor){var b=this.getPointerColor("min");this.scope.minPointerStyle={backgroundColor:b}}this.shFloorCeil()},updateHighHandle:function(a){if(this.setPosition(this.maxH,a),this.translateFn(this.scope.rzSliderHigh,this.maxLab,"high"),this.setPosition(this.maxLab,this.getHandleLabelPos("maxLab",a)),this.options.getPointerColor){var b=this.getPointerColor("max");this.scope.maxPointerStyle={backgroundColor:b}}this.shFloorCeil()},shFloorCeil:function(){var a=!1,b=!1,c=this.options.rightToLeft,d=this.flrLab.rzsp,e=this.flrLab.rzsd,f=this.minLab.rzsp,g=this.minLab.rzsd,h=this.maxLab.rzsp,i=this.maxLab.rzsd,j=this.ceilLab.rzsp,k=this.handleHalfDim,l=c?f+g>=d-e-5:d+e+5>=f,m=c?j+k+10>=f-g:f+g>=j-k-10,n=c?h>=d-e-k:d+e+k>=h,o=c?j+10>=h-i:h+i>=j-10;l?(a=!0,this.hideEl(this.flrLab)):(a=!1,this.showEl(this.flrLab)),m?(b=!0,this.hideEl(this.ceilLab)):(b=!1,this.showEl(this.ceilLab)),this.range&&(o?this.hideEl(this.ceilLab):b||this.showEl(this.ceilLab),n?this.hideEl(this.flrLab):a||this.showEl(this.flrLab))},updateSelectionBar:function(){var a=0,b=0,c=this.options.rightToLeft?!this.options.showSelectionBarEnd:this.options.showSelectionBarEnd,d=this.options.rightToLeft?this.maxH.rzsp+this.handleHalfDim:this.minH.rzsp+this.handleHalfDim;if(this.range)b=Math.abs(this.maxH.rzsp-this.minH.rzsp),a=d;else if(null!==this.options.showSelectionBarFromValue){var e=this.options.showSelectionBarFromValue,f=this.valueToOffset(e),g=this.options.rightToLeft?this.scope.rzSliderModel<=e:this.scope.rzSliderModel>e;g?(b=this.minH.rzsp-f,a=f+this.handleHalfDim):(b=f-this.minH.rzsp,a=this.minH.rzsp+this.handleHalfDim)}else c?(b=Math.abs(this.maxPos-this.minH.rzsp)+this.handleHalfDim,a=this.minH.rzsp+this.handleHalfDim):(b=Math.abs(this.maxH.rzsp-this.minH.rzsp)+this.handleHalfDim,a=0);if(this.setDimension(this.selBar,b),this.setPosition(this.selBar,a),this.options.getSelectionBarColor){var h=this.getSelectionBarColor();this.scope.barStyle={backgroundColor:h}}},getSelectionBarColor:function(){return this.range?this.options.getSelectionBarColor(this.scope.rzSliderModel,this.scope.rzSliderHigh):this.options.getSelectionBarColor(this.scope.rzSliderModel)},getPointerColor:function(a){return"max"===a?this.options.getPointerColor(this.scope.rzSliderHigh,a):this.options.getPointerColor(this.scope.rzSliderModel,a)},updateCmbLabel:function(){var a=null;if(a=this.options.rightToLeft?this.minLab.rzsp-this.minLab.rzsd-10<=this.maxLab.rzsp:this.minLab.rzsp+this.minLab.rzsd+10>=this.maxLab.rzsp){var b=this.getDisplayValue(this.scope.rzSliderModel,"model"),c=this.getDisplayValue(this.scope.rzSliderHigh,"high"),d="";d=b===c?b:this.options.rightToLeft?c+" - "+b:b+" - "+c,this.translateFn(d,this.cmbLab,"cmb",!1);var e=Math.min(Math.max(this.selBar.rzsp+this.selBar.rzsd/2-this.cmbLab.rzsd/2,0),this.barDimension-this.cmbLab.rzsd);this.setPosition(this.cmbLab,e),this.hideEl(this.minLab),this.hideEl(this.maxLab),this.showEl(this.cmbLab)}else this.showEl(this.maxLab),this.showEl(this.minLab),this.hideEl(this.cmbLab)},getDisplayValue:function(a,b){return this.customTrFn(a,this.options.id,b)},roundStep:function(a){var b=parseFloat((a-this.minValue)/this.step).toPrecision(12);b=Math.round(b)*this.step;var c=(this.minValue+b).toFixed(this.precision);return+c},hideEl:function(a){return a.css({opacity:0})},showEl:function(a){return a.rzAlwaysHide?a:a.css({opacity:1})},setPosition:function(a,b){a.rzsp=b;var c={};return c[this.positionProperty]=b+"px",a.css(c),b},getDimension:function(a){var b=a[0].getBoundingClientRect();return this.options.vertical?a.rzsd=(b.bottom-b.top)*this.options.scale:a.rzsd=(b.right-b.left)*this.options.scale,a.rzsd},setDimension:function(a,b){a.rzsd=b;var c={};return c[this.dimensionProperty]=b+"px",a.css(c),b},valueToOffset:function(a){return this.options.rightToLeft?(this.maxValue-this.sanitizeValue(a))*this.maxPos/this.valueRange||0:(this.sanitizeValue(a)-this.minValue)*this.maxPos/this.valueRange||0},sanitizeValue:function(a){return Math.min(Math.max(a,this.minValue),this.maxValue)},offsetToValue:function(a){return this.options.rightToLeft?(1-a/this.maxPos)*this.valueRange+this.minValue:a/this.maxPos*this.valueRange+this.minValue},getEventXY:function(a){var b=this.options.vertical?"clientY":"clientX";return b in a?a[b]:void 0===a.originalEvent?a.touches[0][b]:a.originalEvent.touches[0][b]},getEventPosition:function(a){var b=this.sliderElem.rzsp,c=0;return c=this.options.vertical?-this.getEventXY(a)+b:this.getEventXY(a)-b,(c-this.handleHalfDim)*this.options.scale},getEventNames:function(a){var b={moveEvent:"",endEvent:""};return a.touches||void 0!==a.originalEvent&&a.originalEvent.touches?(b.moveEvent="touchmove",b.endEvent="touchend"):(b.moveEvent="mousemove",b.endEvent="mouseup"),b},getNearestHandle:function(a){if(!this.range)return this.minH;var b=this.getEventPosition(a),c=Math.abs(b-this.minH.rzsp),d=Math.abs(b-this.maxH.rzsp);return d>c?this.minH:c>d?this.maxH:this.options.rightToLeft?b>this.minH.rzsp?this.minH:this.maxH:b<this.minH.rzsp?this.minH:this.maxH},focusElement:function(a){var b=0;a[b].focus()},bindEvents:function(){var b,c,d;this.options.draggableRange?(b="rzSliderDrag",c=this.onDragStart,d=this.onDragMove):(b="rzSliderModel",c=this.onStart,d=this.onMove),this.options.onlyBindHandles||(this.selBar.on("mousedown",a.bind(this,c,null,b)),this.selBar.on("mousedown",a.bind(this,d,this.selBar))),this.options.draggableRangeOnly?(this.minH.on("mousedown",a.bind(this,c,null,b)),this.maxH.on("mousedown",a.bind(this,c,null,b))):(this.minH.on("mousedown",a.bind(this,this.onStart,this.minH,"rzSliderModel")),this.range&&this.maxH.on("mousedown",a.bind(this,this.onStart,this.maxH,"rzSliderHigh")),this.options.onlyBindHandles||(this.fullBar.on("mousedown",a.bind(this,this.onStart,null,null)),this.fullBar.on("mousedown",a.bind(this,this.onMove,this.fullBar)),this.ticks.on("mousedown",a.bind(this,this.onStart,null,null)),this.ticks.on("mousedown",a.bind(this,this.onMove,this.ticks)))),this.options.onlyBindHandles||(this.selBar.on("touchstart",a.bind(this,c,null,b)),this.selBar.on("touchstart",a.bind(this,d,this.selBar))),this.options.draggableRangeOnly?(this.minH.on("touchstart",a.bind(this,c,null,b)),this.maxH.on("touchstart",a.bind(this,c,null,b))):(this.minH.on("touchstart",a.bind(this,this.onStart,this.minH,"rzSliderModel")),this.range&&this.maxH.on("touchstart",a.bind(this,this.onStart,this.maxH,"rzSliderHigh")),this.options.onlyBindHandles||(this.fullBar.on("touchstart",a.bind(this,this.onStart,null,null)),this.fullBar.on("touchstart",a.bind(this,this.onMove,this.fullBar)),this.ticks.on("touchstart",a.bind(this,this.onStart,null,null)),this.ticks.on("touchstart",a.bind(this,this.onMove,this.ticks)))),this.options.keyboardSupport&&(this.minH.on("focus",a.bind(this,this.onPointerFocus,this.minH,"rzSliderModel")),this.range&&this.maxH.on("focus",a.bind(this,this.onPointerFocus,this.maxH,"rzSliderHigh")))},unbindEvents:function(){this.minH.off(),this.maxH.off(),this.fullBar.off(),this.selBar.off(),this.ticks.off()},onStart:function(b,d,e){var f,g,h=this.getEventNames(e);e.stopPropagation(),e.preventDefault(),this.calcViewDimensions(),b?this.tracking=d:(b=this.getNearestHandle(e),this.tracking=b===this.minH?"rzSliderModel":"rzSliderHigh"),b.addClass("rz-active"),this.options.keyboardSupport&&this.focusElement(b),f=a.bind(this,this.dragging.active?this.onDragMove:this.onMove,b),g=a.bind(this,this.onEnd,f),c.on(h.moveEvent,f),c.one(h.endEvent,g),this.callOnStart()},onMove:function(a,b){var c,d=this.getEventPosition(b),e=this.options.rightToLeft?this.minValue:this.maxValue,f=this.options.rightToLeft?this.maxValue:this.minValue;0>=d?c=f:d>=this.maxPos?c=e:(c=this.offsetToValue(d),c=this.roundStep(c)),this.positionTrackingHandle(c)},onEnd:function(a,b){var d=this.getEventNames(b).moveEvent;this.options.keyboardSupport||(this.minH.removeClass("rz-active"),this.maxH.removeClass("rz-active"),this.tracking=""),this.dragging.active=!1,c.off(d,a),this.scope.$emit("slideEnded"),this.callOnEnd()},onPointerFocus:function(b,c){this.tracking=c,b.one("blur",a.bind(this,this.onPointerBlur,b)),b.on("keydown",a.bind(this,this.onKeyboardEvent)),b.addClass("rz-active")},onPointerBlur:function(a){a.off("keydown"),this.tracking="",a.removeClass("rz-active")},getKeyActions:function(a){var b=a+this.step,c=a-this.step,d=a+this.valueRange/10,e=a-this.valueRange/10,f={UP:b,DOWN:c,LEFT:c,RIGHT:b,PAGEUP:d,PAGEDOWN:e,HOME:this.minValue,END:this.maxValue};return this.options.rightToLeft&&(f.LEFT=b,f.RIGHT=c,this.options.vertical&&(f.UP=c,f.DOWN=b)),f},onKeyboardEvent:function(a){var b=this.scope[this.tracking],c=a.keyCode||a.which,d={38:"UP",40:"DOWN",37:"LEFT",39:"RIGHT",33:"PAGEUP",34:"PAGEDOWN",36:"HOME",35:"END"},e=this.getKeyActions(b),f=d[c],g=e[f];if(null!=g&&""!==this.tracking){a.preventDefault();var h=this.roundStep(this.sanitizeValue(g));if(this.options.draggableRangeOnly){var i,j,k=this.scope.rzSliderHigh-this.scope.rzSliderModel;"rzSliderModel"===this.tracking?(i=h,j=h+k,j>this.maxValue&&(j=this.maxValue,i=j-k)):(j=h,i=h-k,i<this.minValue&&(i=this.minValue,j=i+k)),this.positionTrackingBar(i,j)}else this.positionTrackingHandle(h)}},onDragStart:function(a,b,c){var d=this.getEventPosition(c);this.dragging={active:!0,value:this.offsetToValue(d),difference:this.scope.rzSliderHigh-this.scope.rzSliderModel,lowLimit:this.options.rightToLeft?this.minH.rzsp-d:d-this.minH.rzsp,highLimit:this.options.rightToLeft?d-this.maxH.rzsp:this.maxH.rzsp-d},this.onStart(a,b,c)},getValue:function(a,b,c,d){var e=this.options.rightToLeft,f=null;return f="min"===a?c?d?e?this.minValue:this.maxValue-this.dragging.difference:e?this.maxValue-this.dragging.difference:this.minValue:e?this.offsetToValue(b+this.dragging.lowLimit):this.offsetToValue(b-this.dragging.lowLimit):c?d?e?this.minValue+this.dragging.difference:this.maxValue:e?this.maxValue:this.minValue+this.dragging.difference:e?this.offsetToValue(b+this.dragging.lowLimit)+this.dragging.difference:this.offsetToValue(b-this.dragging.lowLimit)+this.dragging.difference,this.roundStep(f)},onDragMove:function(a,b){var c,d,e,f,g,h,i,j,k=this.getEventPosition(b);if(this.options.rightToLeft?(e=this.dragging.lowLimit,f=this.dragging.highLimit,i=this.maxH,j=this.minH):(e=this.dragging.highLimit,f=this.dragging.lowLimit,i=this.minH,j=this.maxH),g=f>=k,h=k>=this.maxPos-e,g){if(0===i.rzsp)return;c=this.getValue("min",k,!0,!1),d=this.getValue("max",k,!0,!1)}else if(h){if(j.rzsp===this.maxPos)return;d=this.getValue("max",k,!0,!0),c=this.getValue("min",k,!0,!0)}else c=this.getValue("min",k,!1),d=this.getValue("max",k,!1);this.positionTrackingBar(c,d)},positionTrackingBar:function(a,b){this.scope.rzSliderModel=a,this.scope.rzSliderHigh=b,this.updateHandles("rzSliderModel",this.valueToOffset(a)),this.updateHandles("rzSliderHigh",this.valueToOffset(b)),this.applyModel()},positionTrackingHandle:function(a){var b=!1;this.range&&(a=this.applyMinRange(a),"rzSliderModel"===this.tracking&&a>this.scope.rzSliderHigh?(this.options.noSwitching&&this.scope.rzSliderHigh!==this.minValue?a=this.applyMinRange(this.scope.rzSliderHigh):(this.scope[this.tracking]=this.scope.rzSliderHigh,this.updateHandles(this.tracking,this.maxH.rzsp),this.updateAriaAttributes(),this.tracking="rzSliderHigh",this.minH.removeClass("rz-active"),this.maxH.addClass("rz-active"),this.options.keyboardSupport&&this.focusElement(this.maxH)),b=!0):"rzSliderHigh"===this.tracking&&a<this.scope.rzSliderModel&&(this.options.noSwitching&&this.scope.rzSliderModel!==this.maxValue?a=this.applyMinRange(this.scope.rzSliderModel):(this.scope[this.tracking]=this.scope.rzSliderModel,this.updateHandles(this.tracking,this.minH.rzsp),this.updateAriaAttributes(),this.tracking="rzSliderModel",this.maxH.removeClass("rz-active"),this.minH.addClass("rz-active"),this.options.keyboardSupport&&this.focusElement(this.minH)),b=!0)),this.scope[this.tracking]!==a&&(this.scope[this.tracking]=a,this.updateHandles(this.tracking,this.valueToOffset(a)),this.updateAriaAttributes(),b=!0),b&&this.applyModel()},applyMinRange:function(a){if(0!==this.options.minRange){var b="rzSliderModel"===this.tracking?this.scope.rzSliderHigh:this.scope.rzSliderModel,c=Math.abs(a-b);if(c<this.options.minRange)return"rzSliderModel"===this.tracking?this.scope.rzSliderHigh-this.options.minRange:this.scope.rzSliderModel+this.options.minRange}return a},applyModel:function(){this.internalChange=!0,this.scope.$apply(),this.callOnChange(),this.internalChange=!1},callOnStart:function(){if(this.options.onStart){var a=this;this.scope.$evalAsync(function(){a.options.onStart(a.options.id,a.scope.rzSliderModel,a.scope.rzSliderHigh)})}},callOnChange:function(){if(this.options.onChange){var a=this;this.scope.$evalAsync(function(){a.options.onChange(a.options.id,a.scope.rzSliderModel,a.scope.rzSliderHigh)})}},callOnEnd:function(){if(this.options.onEnd){var a=this;this.scope.$evalAsync(function(){a.options.onEnd(a.options.id,a.scope.rzSliderModel,a.scope.rzSliderHigh)})}}},h}]).directive("rzslider",["RzSlider",function(a){return{restrict:"E",scope:{rzSliderModel:"=?",rzSliderHigh:"=?",rzSliderOptions:"&?",rzSliderTplUrl:"@"},templateUrl:function(a,b){return b.rzSliderTplUrl||"rzSliderTpl.html"},link:function(b,c){b.slider=new a(b,c)}}}]);return b.run(["$templateCache",function(a){a.put("rzSliderTpl.html",'<span class=rz-bar-wrapper><span class=rz-bar></span></span> <span class=rz-bar-wrapper><span class="rz-bar rz-selection" ng-style=barStyle></span></span> <span class="rz-pointer rz-pointer-min" ng-style=minPointerStyle></span> <span class="rz-pointer rz-pointer-max" ng-style=maxPointerStyle></span> <span class="rz-bubble rz-limit"></span> <span class="rz-bubble rz-limit"></span> <span class=rz-bubble></span> <span class=rz-bubble></span> <span class=rz-bubble></span><ul ng-show=showTicks class=rz-ticks><li ng-repeat="t in ticks track by $index" class=rz-tick ng-class="{\'rz-selected\': t.selected}" ng-style=t.style ng-attr-uib-tooltip="{{ t.tooltip }}" ng-attr-tooltip-placement={{t.tooltipPlacement}} ng-attr-tooltip-append-to-body="{{ t.tooltip ? true : undefined}}"><span ng-if="t.value != null" class=rz-tick-value ng-attr-uib-tooltip="{{ t.valueTooltip }}" ng-attr-tooltip-placement={{t.valueTooltipPlacement}}>{{ t.value }}</span></li></ul>')}]),b});
angular.module("ui.autocomplete",[]).directive("uiAutocomplete",["$timeout","$exceptionHandler",function($timeout,$exceptionHandler){var proto=$.ui.autocomplete.prototype;var initSource=proto._initSource;var slice=Array.prototype.slice;function filter(array,term){var matcher=new RegExp($.ui.autocomplete.escapeRegex(term),"i");return $.grep(array,function(value){return matcher.test($("\x3cdiv\x3e").html(value.label||value.value||value).text())})}$.extend(proto,{_initSource:function(){if(this.options.html&&
$.isArray(this.options.source))this.source=function(request,response){response(filter(this.options.source,request.term))};else initSource.call(this)},_normalize:function(items){return $.map(items,function(item){if(item&&typeof item==="object")return $.extend({label:item.label||item.value,value:item.value||item.label},item);else return{label:item+"",value:item}})},_renderItemData:function(ul,item){var element=item.groupLabel||item.label;if(item.groupLabel)element=$("\x3cdiv\x3e").append(element).addClass("ui-menu-group");
else if(this.options.html){if(typeof element==="object")element=$(element);if(typeof element!=="object"||element.length>1||!element.is("a"))element=$("\x3ca\x3e").append(element)}else element=$("\x3ca\x3e").text(element);return $("\x3cli\x3e").append(element).appendTo(ul).data("ui-autocomplete-item",item)},_resizeMenu:function(){var that=this;setTimeout(function(){var ul=that.menu.element;var maxHeight=ul.css("max-height")||0,width=Math.max(ul.width("").outerWidth()+1,that.element.outerWidth()),oHeight=
that.element.height(),height=$(window).height()-that.options.outHeight-ul.offset().top;height=maxHeight&&height>maxHeight?maxHeight:height;ul.css({width:width,maxHeight:height})},10)}});return{require:"ngModel",link:function(scope,element,attr,ctrl){var status=false,selectItem=null,events={},ngModel=null,each=angular.forEach,isObject=angular.isObject,extend=angular.extend,autocomplete=scope.$eval(attr.uiAutocomplete),valueMethod=angular.bind(element,element.val),methodsName=["close","destroy","disable",
"enable","instance","option","search","widget"],eventsName=["change","close","create","focus","open","response","search","select"];var unregisterWatchModel=scope.$watch(attr.ngModel,function(value){ngModel=value;if(isObject(ngModel)){ctrl.$formatters.push(function(obj){return obj.value});ctrl.$parsers.push(function(value){ngModel.value=value;return ngModel});scope.$watch(attr.ngModel,function(model){if(valueMethod()!==model.value){ctrl.$viewValue=model.value;ctrl.$render()}},true);ctrl.$pristine=
false;ctrl.$setViewValue(ngModel.value);ctrl.$pristine=true}if(value)unregisterWatchModel()});var uiEvents={open:function(event,ui){status=true;selectItem=null},close:function(event,ui){status=false},select:function(event,ui){selectItem=ui;$timeout(function(){element.blur()},0)},change:function(event,ui){var value=valueMethod(),selected=false;if(selectItem&&selectItem.item&&value.indexOf(selectItem.item.value)!==-1){value=selectItem.item.value;selected=true}scope.$apply(function(){if(autocomplete.options.onlySelectValid)ctrl.$setValidity("onlyselect",
selected);if(value===null)ctrl.$render();else if(value==="")changeNgModel();else if(ctrl.$viewValue!==value){ctrl.$setViewValue(value);ctrl.$render();changeNgModel(selectItem)}})}};function changeNgModel(data){if(isObject(ngModel)){if(!ctrl.$viewValue&&ctrl.$viewValue!==0)emptyObj(ngModel);else if(data&&data.item){data.item.label=isObject(data.item.label)?$("\x3cdiv\x3e").append(data.item.label).html():data.item.label;extend(ngModel,data.item)}each(ctrl.$viewChangeListeners,function(listener){try{listener()}catch(e){$exceptionHandler(e)}})}}
function cleanNgModel(){ctrl.$setViewValue("");ctrl.$render();changeNgModel()}function autoFocusHandler(){if(autocomplete.options.focusOpen&&!status)element.autocomplete("search","")}function checkOptions(options){options=isObject(options)?options:{};options.disabled=options.source?options.disabled:true;options.appendTo=options.appendTo||element.parents(".ng-view")[0]||element.parents("[ng-view]")[0]||null;options.minLength=options.focusOpen?0:options.minLength;options.outHeight=options.outHeight||
0;options.position=options.position||{my:"left top",at:"left bottom",collision:"flipfit"};return options}function emptyObj(a){if(isObject(a)){var reg=/^\$/;each(a,function(value,key){var type=typeof value;if(reg.test(key))return;else if(type==="number")a[key]=0;else if(type==="string")a[key]="";else if(type==="boolean")a[key]=false;else if(isObject(value))emptyObj(value)})}}if(!isObject(autocomplete))return;autocomplete.methods={};autocomplete.options=checkOptions(autocomplete.options);each(eventsName,
function(name){var _event=autocomplete.options[name];_event=typeof _event==="function"?_event:angular.noop;events[name]=function(event,ui){if(uiEvents[name])uiEvents[name](event,ui);_event(event,ui);if(autocomplete.events&&typeof autocomplete.events[name]==="function")autocomplete.events[name](event,ui)}});each(methodsName,function(name){autocomplete.methods[name]=function(){var args=slice.call(arguments);args.unshift(name);return element.autocomplete.apply(element,args)}});autocomplete.methods.filter=
filter;autocomplete.methods.clean=cleanNgModel;element.on("focus",autoFocusHandler);element.autocomplete(extend({},autocomplete.options,events));autocomplete.widget=element.autocomplete("widget")}}}]);
angular.module("app.filters",[]);angular.module("app.filters").filter("searchFilter",["$filter",function($filter){return function(inputArray,searchText,booleanOp){booleanOp=booleanOp||"AND";var searchTerms=(searchText||"").toLowerCase().split(/\s+/);if(booleanOp==="AND"){var result=inputArray;searchTerms.forEach(function(searchTerm){result=$filter("filter")(result,searchTerm)})}else{var result=[];searchTerms.forEach(function(searchTerm){result=result.concat($filter("filter")(inputArray,searchTerm))})}return result}}]);
angular.module("app.factories",[]);
angular.module("app.factories").factory("backendFactory",["$q","$http","url",function($q,$http,url){return{importPerson:function(groupId,scopusAuthorId,person){var url="/proxy/research-activity/group/"+groupId+"/addperson/";var args=[];for(var field in person){var value=person[field]?encodeURIComponent(person[field]):"";args.push(encodeURIComponent(field)+"\x3d"+value)}return $http({method:"POST",url:url,data:args.join("\x26"),headers:{"Content-Type":"application/x-www-form-urlencoded; charset\x3dutf-8"}})},removePersonFromGroup:function(groupId,
scopusAuthorId){var url="/proxy/research-activity/removefromgroup/"+groupId+"/"+scopusAuthorId;return $http({method:"DELETE",url:url})},getPersons:function(groupId){var url="/proxy/research-activity/group/"+groupId+"/persons";return $http.get(url)}}}]);
angular.module("app.factories").factory("gmapsFactory",["$q","$http","settingsFactory","NgMap",function($q,$http,settingsFactory,NgMap){var addedToMap=[];var institutionObjectAddedToMap=[];var institutionFrequency=function(countries){var pieArray=[];_.each(countries,function(country){pieArray.push({c:[{v:country.name},{v:country.publicationCount},{country:country}]})});return pieArray};var personFrequency=function(countries){var pieArray=[];_.each(countries,function(country){pieArray.push({c:[{v:country.name},
{v:country.personCount},{country:country}]})});return pieArray};var getInstitutionMetrics=function(gmapPlaceId){var resourceUrl="/proxy/research-activity/group/"+settingsFactory.settings.groupId+"/institution/"+gmapPlaceId;return $http.get(resourceUrl)};var getInstitutionCountries=function(){var resourceUrl="/proxy/research-activity/group/"+settingsFactory.settings.groupId+"/countries";return $http.get(resourceUrl)};var getCountriesWithPubsThisYearByGroupId=function(){var currentDate=new Date;var year=
currentDate.getFullYear();var previousYear=currentDate.setFullYear(currentDate.getFullYear()-1);var resourceUrl="/proxy/research-activity/group/"+settingsFactory.settings.groupId+"/countries/"+year;return $http.get(resourceUrl)};var getCountriesByGroupIdGroupedByYear=function(){var resourceUrl="/proxy/research-activity/group/"+settingsFactory.settings.groupId+"/countriesByYear";return $http.get(resourceUrl)};var createMarkerConfig=function(institution,index){return{longitude:institution.lng,latitude:institution.lat,
title:institution.name,position:[institution.lat,institution.lng],id:index,label:institution.name,gmapPlaceId:institution.gmapPlaceId}};var createInfoMarkup=function(metrics){var names=_.pluck(metrics.persons,"name").join(", ");var markup="\x3cb\x3e"+metrics.InstitutionName+"\x3c/b\x3e\x3cul\x3e";markup+="\x3cli\x3e"+metrics.publicationCount+" publications\x3c/li\x3e";markup+="\x3cli\x3eCo-authors: "+names+"\x3c/li\x3e\x3c/ul\x3e";return markup};var infoWindowsOpenCurrently;var createMarker=function(markerConfig,
map){var latLng=new google.maps.LatLng(markerConfig.latitude,markerConfig.longitude);var marker=new google.maps.Marker({position:latLng,title:markerConfig.title});google.maps.event.addListener(marker,"click",function(){typeof infoWindowsOpenCurrently!=="undefined"&&infoWindowsOpenCurrently.close();getInstitutionMetrics(markerConfig.gmapPlaceId).then(function(data){console.log(data);var infowindow=new google.maps.InfoWindow({content:createInfoMarkup(data.data[0])});infowindow.open(map,marker);infoWindowsOpenCurrently=
infowindow})});return marker};return{institutionFrequency:institutionFrequency,createMarkerConfig:createMarkerConfig,createMarker:createMarker,getInstitutionMetrics:getInstitutionMetrics,getInstitutionCountries:getInstitutionCountries,personFrequency:personFrequency,getCountriesByGroupIdGroupedByYear:getCountriesByGroupIdGroupedByYear,getCountriesWithPubsThisYearByGroupId:getCountriesWithPubsThisYearByGroupId}}]);
angular.module("app.factories").factory("institutionFactory",["$q","$http","url",function($q,$http,url){var getInstitutions=function(groupId){var deferred=$q.defer();var resourceUrl="/proxy/research-activity/group/"+groupId+"/institutions";var pubOptions={url:resourceUrl,method:"GET",cache:false};$http(pubOptions).success(function(data,status,headers,config){deferred.resolve(data)});return deferred.promise};return{getInstitutions:getInstitutions}}]);
angular.module("app.factories").factory("journalFactory",["$q","$http","url","$location",function($q,$http,url,$location){return{getArticle:function(articleId){var deferred=$q.defer();var paramMap={articleId:articleId,refererUrl:encodeURIComponent($location.absUrl())};var resourceUrl=url.createResourceUrlUsingMap("liferayArticle",paramMap);var options={url:resourceUrl,method:"GET",cache:true};$http(options).success(function(data,status,headers,config){deferred.resolve(data)});return deferred.promise},
getAllGroupArticles:function(){var deferred=$q.defer();var resourceUrl=url.createResourceUrl("liferayGroupArticles");var options={url:resourceUrl,method:"GET",cache:false};$http(options).success(function(data,status,headers,config){var jsonData=JSON.parse(data);deferred.resolve(jsonData)});return deferred.promise}}}]);
angular.module("app.factories").factory("personListFactory",["$q","$http","url","settingsFactory","$log",function($q,$http,url,settingsFactory,$log){var personList=[];var isLoaded=false;return{personList:personList,getPersonByUsername:function(username){return _.find(personList,function(person){return person.username===username})},getPersonByUsernameAndAuthorId:function(username,authorId){return _.find(personList,function(person){return person.username===username&&person.authorId===authorId})},getPersonByAuthorId:function(authorId){return _.find(personList,
function(person){return person.authorId===authorId})},addNeoPerson:function(neoPerson){var person=this.getPersonByUsernameAndAuthorId(neoPerson.username,neoPerson.authorId);if(!person){person=neoPerson;personList.push(person)}return person},addFastPerson:function(fastPerson){var person=this.getPersonByUsernameAndAuthorId(fastPerson.username,undefined);if(!person){person={};personList.push(person)}person.username=fastPerson.username;person.name=fastPerson.firstName+" "+fastPerson.lastName;person.firstName=
fastPerson.firstName;person.lastName=fastPerson.lastName;person.orgName=fastPerson.personOrgName;person.title=fastPerson.roleTitle;person.email=fastPerson.email;person.pictureUrl=fastPerson.pictureUrl;return person},indexOfUsername:function(username){for(var i=0;i<personList.length;i++)if(personList[i].username===username)return i;return-1},indexOfUsernameAndAuthorId:function(username,authorId){for(var i=0;i<personList.length;i++)if(personList[i].username===username&&personList[i].authorId===authorId)return i;
return-1},deletePersonByUsername:function(username){var index=this.indexOfUsername(username);if(index>=0)personList.splice(index,1)},deletePersonByUsernameAndAuthorId:function(username,authorId){var index=this.indexOfUsernameAndAuthorId(username,authorId);if(index>=0)personList.splice(index,1)},removeAll:function(){personList.splice(0,personList.length)},removeDuplicates:function(){personList=_.uniq(_.collect(personList,function(person){return person.username+person.authorId}))},init:function(callback){if(isLoaded)callback();
else{var url="/proxy/research-activity/group/"+settingsFactory.settings.groupId+"/persons";var that=this;$http.get(url).then(function(response){_.each(response.data,function(person){that.addNeoPerson(person)});isLoaded=true;callback()},function(response){$log.error(response);callback()})}}}}]);
angular.module("app.factories").factory("projectsFactory",["$q","$http",function($q,$http){return{getProjects:function(groupId){var deferred=$q.defer();var resourceUrl="/proxy/research-activity/group/"+groupId+"/projects";var options={url:resourceUrl,method:"GET",cache:false};$http(options).success(function(data,status,headers,config){deferred.resolve(data)});return deferred.promise}}}]);
angular.module("app.factories").factory("publicationsFactory",["$q","$http","url",function($q,$http,url){var getPublications=function(groupId){var deferred=$q.defer();var resourceUrl="/proxy/research-activity/group/"+groupId+"/publications";var pubOptions={url:resourceUrl,method:"GET",cache:false};$http(pubOptions).success(function(data,status,headers,config){deferred.resolve(data)});return deferred.promise};return{getPublications:getPublications}}]);
angular.module("app.factories").factory("releaseFactory",["$q","$http","url",function($q,$http,url){var getRelease=function(){var deferred=$q.defer();var resource=url.createResourceUrl("release","releaseId","1");$http.get(resource.toString()).success(function(data,status,headers,config){deferred.resolve(data)});return deferred.promise};return{getRelease:getRelease}}]);
angular.module("app.factories").factory("searchFactory",["$q","$http","url",function($q,$http,url){return{findFastPerson:function(searchString){var resourceUrl="/proxy/research-activity/search/ntnu/employees?query\x3d"+encodeURIComponent(searchString);return $http.get(resourceUrl)},findScopusPerson:function(firstname,lastname){var q="authfirst\x3d"+encodeURIComponent(firstname)+"\x26authlast\x3d"+encodeURIComponent(lastname);var resourceUrl="/proxy/research-activity/search/scopus/authors?"+q;return $http.get(resourceUrl)},
findPeopleByUsernames:function(usernamesArray){var q="usernames\x3d"+encodeURIComponent(usernamesArray.join(","));var resourceUrl="/proxy/research-activity/search/ntnu/people?"+q;return $http.get(resourceUrl)}}}]);
angular.module("app.factories").factory("sessionData",["$q","url","$log",function($q,url,$log){return{publicationsListLength:undefined,publicationsSortField:"coverDate",publicationsSortRev:true,publicationsQuery:"",peopleListLength:30,peopleSortField:"lastName",peopleSortRev:false,peopleQuery:"",projectsListLength:10,projectsSortField:"titleEn",projectsSortRev:false,projectsQuery:""}}]);
angular.module("app.factories").factory("settingsFactory",["$q","$http","url","$log",function($q,$http,url,$log){var settings={};var defaultSettings={wordLimit:50,showPublications:"1",showProjects:"1",showTagcloud:"1",showPeople:"1",showNetwork:"1",peopleViewOption:"sortable",recentPublications:"30",excludeWords:[]};var resource=url.createResourceUrlUsingMap("getPreferences",{});var init=function(){return $http.get(resource.toString()).success(function(data,status,headers,config){_.extend(settings,
data);for(var prop in defaultSettings)if(defaultSettings.hasOwnProperty(prop)&&!settings[prop])settings[prop]=defaultSettings[prop];if(settings.showPublications==="0"&&settings.showTagcloud==="0"&&settings.showNetwork==="0"&&settings.showPeople==="0"&&settings.showProjects==="0")settings.hidePage="1";else settings.hidePage="0"})};var save=function(){$log.log(settings);var resource=url.createResourceUrlUsingMap("savePreferences",settings);$http.post(resource.toString())};return{init:init,save:save,
settings:settings,getValues:function(name){var value=settings[name]?settings[name]:[];if(!_.isArray(value))return[value];return value},getValue:function(name,defaultValue){var value=settings[name];if(!value)return defaultValue;if(_.isArray(value)){if(value.length>0)return value[0];return defaultValue}return value},getValueInt:function(name,defaultValue){var valueString=this.getValueString(name,defaultValue);if(!valueString)return undefined;return parseInt(valueString)}}}]);
angular.module("app.factories").factory("tagCloudFactory",["$q","$http","settingsFactory","$log","$filter",function($q,$http,settingsFactory,$log,$filter){var tagList=[],listOfYears=[];var init=function(callback){var resourceUrl="/proxy/research-activity/group/"+settingsFactory.settings.groupId+"/wordcloud";var wordsOptions={url:resourceUrl,method:"GET",cache:false};$http(wordsOptions).success(function(data,status,headers,config){if(_.isArray(data))data.wordCloud.sort(function(a,b){var keyA=a.weight,
keyB=b.weight;if(keyA<keyB)return-1*-1;if(keyA>keyB)return 1*-1;return 0});var wordCache=data.wordCloud;for(var key of Object.keys(data.wordCloudByDate)){const words=data.wordCloudByDate[key].map((w)=>w.text);words.forEach((w)=>{if(!tagList.includes(w))tagList.push(w)})}var wordCacheByYear=data.wordCloudByDate;_.each(wordCacheByYear,function(value,key,list){listOfYears.push(key)});_.each(wordCacheByYear,function(year){_.each(year,function(word){word.link={href:"#/view/publications/"+word.text,title:"Show publication with this tag"}})});
callback(wordCache,wordCacheByYear)})};var generateWordCloud=function(words,_limit,excludeWords){var limit=_.isString(_limit)?parseInt(_limit):_limit;var wordCloud=[];try{for(var i=0;words.length>i;i++){if(_.indexOf(excludeWords,words[i].text)===-1){if(words[i].link&&words[i].link.href)words[i].link.href=words[i].link.href.replace("%20"," ");wordCloud.push(words[i])}if(wordCloud.length===limit)break}}catch(err){$log.log("Could not generate wordcloud")}return wordCloud};return{init:init,generateWordCloud:generateWordCloud,
listOfYears:listOfYears,getTagList:function(){return tagList},filter:function(options){$log.log(options);return $filter("searchFilter")(options.words,options.filterString,options.booleanOperator)}}}]);
angular.module("app.factories").provider("url",function(){this.pid="";this.$get=function(){var pid=this.pid;return{createRenderUrl:function(page){var resourceURL=Liferay.PortletURL.createRenderURL();resourceURL.setPortletId(pid);resourceURL.setPortletMode("view");resourceURL.setWindowState("exclusive");resourceURL.setParameter("jspPage","/js/views/"+page+".html");return resourceURL.toString()},createResourceUrl:function(resourceId,paramName,paramValue){var resourceURL=Liferay.PortletURL.createResourceURL();
resourceURL.setPortletId(pid);resourceURL.setResourceId(resourceId);resourceURL.setParameter(paramName,paramValue);resourceURL.setParameter("_ts_",(new Date).getTime());return resourceURL.toString()},createResourceUrlUsingMap:function(resourceId,paramMap){var resourceURL=Liferay.PortletURL.createResourceURL();resourceURL.setPortletId(pid);resourceURL.setResourceId(resourceId);resourceURL.setParameter("_ts_",(new Date).getTime());for(var property in paramMap)if(paramMap.hasOwnProperty(property)){var value=
paramMap[property];resourceURL.setParameter(property,value)}return resourceURL.toString()}}};this.setPid=function(pid){this.pid=pid.substr(1,pid.length-2)}});
angular.module("app.factories").factory("userProfileFactory",["$q","$http","url",function($q,$http,url){var getProfile=function(username){var deferred=$q.defer();var resource=url.createResourceUrl("userProfile","username",username);$http.get(resource.toString()).success(function(data,status,headers,config){deferred.resolve(data)});return deferred.promise};return{getProfile:getProfile}}]);
angular.module("app.factories").factory("i18nErrorMessageResolver",["$q","$translate",function($q,$translate){var resolve=function(errorType,el){var defer=$q.defer();var prefix="validation.";$translate(prefix+errorType).then(function(message){if(el&&el.attr)try{var parameters=[];var parameter=el.attr("ng-"+errorType);if(parameter===undefined)parameter=el.attr("data-ng-"+errorType)||el.attr(errorType);parameters.push(parameter||"");message=message.format(parameters)}catch(e){}defer.resolve(message)});
return defer.promise};return{resolve:resolve}}]);
angular.module("app.directives",[]);
angular.module("app.directives").directive("liferay",["url",function(url){var directive={};directive.restrict="E";directive.templateUrl=url.createRenderUrl("liferay");return directive}]).directive("ngEsc",function(){return function(scope,element,attrs){element.bind("keydown keypress keyup",function(event){if(event.which===27){scope.$apply(function(){scope.$eval(attrs.ngEsc)});event.preventDefault()}})}}).directive("loading",["$http",function($http){return{restrict:"A",link:function(scope,elm,attrs){scope.isLoading=
function(){return $http.pendingRequests.length>0};scope.$watch(scope.isLoading,function(v){if(v)elm.show();else elm.hide()})}}}]).directive("hidewhileloading",["$http",function($http){return{restrict:"A",link:function(scope,elm,attrs){scope.doneLoading=function(){return $http.pendingRequests.length===0};scope.$watch(scope.doneLoading,function(v){if(v)elm.show();else elm.hide()})}}}]).directive("fileReader",function(){return{scope:{fileReader:"\x3d"},link:function(scope,element){$(element).on("change",
function(changeEvent){var files=changeEvent.target.files;if(files.length){var r=new FileReader;r.onload=function(e){var contents=e.target.result;scope.$apply(function(){scope.fileReader=contents})};r.readAsText(files[0])}})}}}).directive("chosen",["$parse",function($parse){return{restrict:"E",template:'\x3cselect multiple class\x3d"chosen-select" style\x3d"width: 100%;"\x3e\x3c/select\x3e',replace:true,scope:{list:"\x3d",ngModel:"\x3d"},link:function($scope,$elem,$attr){var optionHtml="";jQuery($elem).chosen({no_results_text:"Ingen ord matcher",
width:"100%"});$scope.$watchCollection("list",function(newTagsList,oldTagsList){if(!newTagsList||newTagsList==undefined)return;$scope.$evalAsync(function(){_.each(newTagsList,function(tag){if(_.indexOf($scope.ngModel,tag)===-1)optionHtml+='\x3coption value\x3d"'+tag+'"\x3e'+tag+"\x3c/option\x3e";else optionHtml+='\x3coption selected value\x3d"'+tag+'"\x3e'+tag+"\x3c/option\x3e"});$elem.empty();$elem.html(optionHtml).show();jQuery($elem).css({display:"none"});jQuery($elem).trigger("chosen:updated")})});
$elem.bind("$destroy",function(){jQuery($elem).chosen("destroy")})}}}]).directive("jqcloud",["$parse",function($parse){var defaults=jQuery.fn.jQCloud.defaults.get(),jqcOptions=[];for(var opt in defaults)if(defaults.hasOwnProperty(opt))jqcOptions.push(opt);return{restrict:"E",template:"\x3cdiv\x3e\x3c/div\x3e",replace:true,scope:{words:"\x3dwords",afterCloudRender:"\x26"},link:function($scope,$elem,$attr){var options={};for(var i=0,l=jqcOptions.length;i<l;i++){var opt=jqcOptions[i];var attr=$attr[opt]||
$elem.attr(opt);if(attr!==undefined)options[opt]=$parse(attr)()}options.afterCloudRender=function(){console.log("options.afterCloudRender");jQuery(window).trigger("resize")};jQuery($elem).jQCloud($scope.words,options);$scope.$watchCollection("words",function(){console.log("Words changed");$scope.$evalAsync(function(){var words=[];$.extend(words,$scope.words);jQuery($elem).jQCloud("update",words)})});$elem.bind("$destroy",function(){jQuery($elem).jQCloud("destroy")})}}}]);
angular.module("app.controllers",["ngSanitize","ngCsv"]);
angular.module("app.controllers").controller("ExportModalInstanceController",["$scope","$modalInstance","people","$log",function($scope,$modalInstance,people,$log){$scope.people=people;$scope.exportPeople=function(){$modalInstance.close()};$scope.close=function(){$modalInstance.dismiss()};$scope.getFilteredData=function(){return _.map($scope.people,function(person){if(person.username===person.authorId)return _.pick(person,["username"]);return _.pick(person,["username","authorId"])})}}]);
angular.module("app.controllers").controller("ImportModalInstanceController",["$scope","$modalInstance","people","$log",function($scope,$modalInstance,people,$log){$scope.people=people;$scope.peopleToBeImported=[];$scope.importPeople=function(){$modalInstance.close($scope.peopleToBeImported)};$scope.close=function(){$modalInstance.dismiss()};$scope.$watch("fileContent",function(csvString){$scope.peopleToBeImported=$scope.convertCsvToJson(csvString)});$scope.convertCsvToJson=function(csvString){if(csvString){var rows=
csvString.split("\n");var parsedPeople=[];$scope.invalidRows=[];var line=0;angular.forEach(rows,function(val){var o=val.split(",");var valid=true;if(o.length>0&&o.length<3){o[0]=o[0].trim();if(o.length===1&&o[0].length>0){var number=Number(o[0]);if(number)$scope.invalidRows.push({content:val,linenumber:line+1});else parsedPeople.push({username:o[0],valid:valid})}else if(o.length===2){o[0]=o[0].trim();o[1]=o[1].trim();parsedPeople.push({username:o[0],authorId:o[1]})}}else{$log.error("invalid row:",
val);$scope.invalidRows.push({content:val,linenumber:line+1})}line++});return parsedPeople}}}]);
angular.module("app.controllers").controller("AdminPeopleCtrl",["$scope","$log","$timeout","url","searchFactory","settingsFactory","backendFactory","personListFactory","$modal",function($scope,$log,$timeout,url,searchFactory,settingsFactory,backendFactory,personListFactory,$modal){$log.info("admin controller says hey");$scope.tabTemplateUrl=url.createRenderUrl("common/admin_tabs");$scope.searchString="";$scope.mode="default";$scope.settings=settingsFactory.settings;$scope.orderByField="name";$scope.reverseSort=
false;$scope.fastPersons=[];$scope.editGroupName=false;$scope.people=[];$scope.personListFactory=personListFactory;$scope.ntnuPerson=null;personListFactory.init(function(){$scope.people=personListFactory.personList});$scope.groupId=settingsFactory.settings.groupId||"";$scope.groupNameNo=settingsFactory.settings.groupNameNo||"";$scope.importError=null;$scope.failedImportPersons=[];$scope.reloadStatus=function(){$scope.isReloading=true;backendFactory.getPersons($scope.groupId).then(function(response){_.each(response.data,
function(person){var p=personListFactory.getPersonByUsername(person.username);if(p){p.authorId=person.authorId;p.importStatus=person.importStatus;p.importTime=person.importTime}});$scope.isReloading=false},function(response){$scope.isReloading=false;$log.error(response)})};$scope.importPeople=function(peopleToBeImported){if(!peopleToBeImported||peopleToBeImported.length===0){$scope.reloadStatus();return}else{var personToImport=peopleToBeImported.shift();searchFactory.findPeopleByUsernames([personToImport.username]).then(function(response){var fastResults=
response.data;if(fastResults.length===1){var person=personListFactory.addFastPerson(fastResults[0]);if(personToImport.authorId){person.searching=true;$scope.importScopusPerson(personToImport.authorId,person)}else $scope.searchScopusAndImportIfSingleMatch(person)}else $log.error("Cant import : "+personToImport.username);$timeout(function(){try{personListFactory.getPersonByUsername(personToImport.username).searching=false}catch(e){console.error(e)}$scope.importPeople(peopleToBeImported)},1500)},function(reason){$log.error("Failed: "+
reason.statusText)})}};$scope.openImportModal=function(size){var modalInstance=$modal.open({templateUrl:url.createRenderUrl("admin/people/modals/import/people.import.modal"),controller:"ImportModalInstanceController",resolve:{people:function(){return $scope.people}}});modalInstance.result.then(function(peopleToBeImported){if(peopleToBeImported&&peopleToBeImported.length>0)$scope.importPeople(peopleToBeImported)})};$scope.openExportModal=function(size){var modalInstance=$modal.open({templateUrl:url.createRenderUrl("admin/people/modals/export/people.export.modal"),
controller:"ExportModalInstanceController",resolve:{people:function(){return $scope.people}}});modalInstance.result.then(function(message){$log.info(message)})};$scope.startGroupNameEdit=function(){$scope.editGroupName=true;$scope.groupNameTMP=$scope.groupNameNo};$scope.cancelGroupNameEdit=function(){$scope.editGroupName=false;$scope.groupNameNo=$scope.groupNameTMP};$scope.submitGroupNameEdit=function(){settingsFactory.settings.groupNameNo=$scope.groupNameNo;settingsFactory.save();$scope.editGroupName=
false};$scope.startManualEdit=function(person){person.manualEdit=true;$timeout(function(){var e=angular.element("#edit_"+person.username);e.focus()},50)};$scope.submitManualEdit=function(person,newAuthorId){person.manualEdit=false;if(person.authorId===newAuthorId){person.importStatus="Already imported "+newAuthorId;return}backendFactory.removePersonFromGroup($scope.groupId,person.authorId).then(function(response){$scope.importScopusPerson(newAuthorId,person)})};$scope.cancelManualEdit=function(person){person.manualEdit=
false};$scope.removePerson=function(person){person.importStatus="removing";person.importStatusMsg="Removing";if(person.authorId)backendFactory.removePersonFromGroup($scope.groupId,person.authorId).then(function(response){personListFactory.deletePersonByUsernameAndAuthorId(person.username,person.authorId);$log.info("data:",response.data)},function(response){$log.info("something went wrong:",response);person.importStatus="error";person.importStatusMsg="Error: "+response.statusText});else personListFactory.deletePersonByUsernameAndAuthorId(person.username,
person.authorId)};$scope.searchScopusAndImportIfSingleMatch=function(person){person.searching=true;searchFactory.findScopusPerson(person.firstName,person.lastName).then(function(response){var resultArr=response.data.entries;person.searching=false;if(resultArr.length===0)$scope.importScopusPerson(null,person);person.scopusResults=resultArr},function(response){$log.error("Failed: "+response.statusText);$scope.importError=response.status+" "+response.statusText;$scope.failedImportPersons.push(person);
for(var i=0;i<$scope.people.length;i++)if($scope.people[i].username===person.username){$scope.people.splice(i,1);break}person.searching=false})};$scope.importScopusPerson=function(authorId,person){if(personListFactory.getPersonByAuthorId(authorId)){person.importStatus="Already imported "+authorId;person.searching=false;return}person.authorId=authorId;delete person.scopusResults;person.importStatus="started";backendFactory.importPerson($scope.groupId,authorId,person).then(function(response){person.authorId=
person.username;console.log("PERSON DATA: ",person);$log.info("data:",response.data)},function(response){$scope.failedImportPersons.push(person);$scope.importError=response.status+" "+response.statusText;person.importStatus="error";person.importStatusMsg="Error: "+response.statusText})};$scope.peopleNameSelectCounter=0;$scope.peopleAutocomplete={options:{html:false,focusOpen:false,onlySelect:false,outHeight:"200px",change:function(event,ui){if(ui.item)$scope.searchString=ui.item.firstName+" "+ui.item.lastName},
select:function(event,ui){var person=personListFactory.addFastPerson(ui.item);$scope.searchScopusAndImportIfSingleMatch(person)},source:function(request,response){if(request.term&&request.term.length>0)searchFactory.findFastPerson(request.term).then(function(httpResponse){var result=httpResponse.data.docs;if(result&&result.length>0)response(_.map(result,function(item){item.value=item.username;item.label=item.firstName+" "+item.lastName+", "+item.personOrgName;return item}));else response([])},function(httpResponse){$log.info("something went wrong:",
httpResponse)})}},methods:{}}}]);
angular.module("app.controllers").controller("AdminTagsCtrl",["$scope","$log","url","tagCloudFactory","settingsFactory","$timeout",function($scope,$log,url,tagCloudFactory,settingsFactory,$timeout){$log.info("admin controller says hey");$scope.tabTemplateUrl=url.createRenderUrl("common/admin_tabs");$log.info("tabUrl:"+$scope.tabTemplateUrl);$scope.data={excludeWords:[]};function getWords(excludeWords){return tagCloudFactory.generateWordCloud(angular.copy($scope.data.words),settingsFactory.getValue("wordLimit").toString(),
settingsFactory.getValues("excludeWords"))}tagCloudFactory.init(function(words,wordsByYear){$scope.data.wordLimit=settingsFactory.getValue("wordLimit").toString();$scope.data.excludeWords=angular.copy(settingsFactory.getValues("excludeWords"));$scope.data.words=words;$scope.data.wordCloud=getWords();$scope.data.tagList=tagCloudFactory.getTagList()});$scope.tagCloudFactory=tagCloudFactory;$scope.settings=settingsFactory.settings;$scope.cloudWordLimitOptions=_.map(_.range(10,110,10),function(index){return{id:index,
name:index}});$scope.changeExcludeWords=function(excludeWords){$scope.data.excludeWords=excludeWords;$scope.data.wordCloud=getWords()};$scope.changeWordLimit=function(limit){$scope.data.wordLimit=limit;$scope.data.wordCloud=getWords()};$scope.saveSettings=function(){console.log("saveSettings");settingsFactory.settings.wordLimit=$scope.data.wordLimit;settingsFactory.settings.excludeWords=$scope.data.excludeWords;settingsFactory.save()};$scope.cancel=function(){console.log("cancel");$scope.data.wordLimit=
settingsFactory.settings.wordLimit;$scope.data.excludeWords=settingsFactory.settings.excludeWords};$scope.hasChanged=function(){return $scope.data.wordLimit!=settingsFactory.settings.wordLimit||$scope.data.excludeWords.toString()!==settingsFactory.settings.excludeWords.toString()};$scope.$watch("data.excludeWords",function(newVal,oldVal){$log.info("ExcludeWords changed");$log.info(newVal.length);$log.info(oldVal.length)})}]);
angular.module("app.controllers").controller("AdminViewsCtrl",["$scope","$log","url","searchFactory","backendFactory","settingsFactory","journalFactory","sessionData",function($scope,$log,url,searchFactory,backendFactory,settingsFactory,journalFactory,sessionData){$log.info("views controller says hey");$scope.settings=settingsFactory.settings;$scope.tabTemplateUrl=url.createRenderUrl("common/admin_tabs");$scope.settings=settingsFactory.settings;$scope.articles="data is comming";$scope.searchObject=
{};$scope.searchObject.query="";$scope.searchObject.placeholder="Filter publications";$scope.articleSearchType="none";$scope.showArticleSearch=false;$scope.aboutArticleSearchInProgress=false;$scope.governanceArticleSearchInProgress=false;$scope.selectAboutArticle=function(){if(!$scope.showArticleSearch)$scope.aboutArticleSearchInProgress=true;journalFactory.getAllGroupArticles().then(function(articles){$scope.articles=articles;$scope.aboutArticleSearchInProgress=false});$scope.articleSearchType="about";
$scope.showArticleSearch=true};$scope.selectGovernanceArticle=function(){if(!$scope.showArticleSearch)$scope.governanceArticleSearchInProgress=true;journalFactory.getAllGroupArticles().then(function(articles){$scope.articles=articles;$scope.governanceArticleSearchInProgress=false});$scope.articleSearchType="governance";$scope.showArticleSearch=true};$scope.isArticleSelected=function(articleId){return $scope.settings.governanceArticle==articleId||$scope.settings.aboutArticle==articleId?"highlighted-article":
""};$scope.articleSearchShow=function(){return $scope.showArticleSearch};$scope.selectArticle=function(articleId){if($scope.articleSearchType==="governance")$scope.settings.governanceArticle=articleId;else if($scope.articleSearchType==="about")$scope.settings.aboutArticle=articleId;else if($scope.articleSearchType==="top")$scope.settings.topArticle=articleId;else;$scope.showArticleSearch=false;$scope.saveSettings()};$scope.saveSettings=function(){console.log("saveSettings");settingsFactory.settings.recentPublications=
$scope.settings.recentPublications;settingsFactory.settings.peopleViewOption=$scope.settings.peopleViewOption;settingsFactory.settings.showPublications=$scope.settings.showPublications;settingsFactory.settings.showProjects=$scope.settings.showProjects;settingsFactory.settings.showTagcloud=$scope.settings.showTagcloud;settingsFactory.settings.showPeople=$scope.settings.showPeople;settingsFactory.settings.showNetwork=$scope.settings.showNetwork;settingsFactory.settings.governanceArticle=$scope.settings.governanceArticle;
settingsFactory.settings.aboutArticle=$scope.settings.aboutArticle;settingsFactory.settings.showAbout=$scope.settings.showAbout;settingsFactory.settings.showGovernance=$scope.settings.showGovernance;settingsFactory.save();sessionData.publicationsListLength=$scope.settings.recentPublications}}]);
angular.module("app.controllers").controller("HeaderController",["$scope","$log","$timeout","$state","settingsFactory",function($scope,$log,$timeout,$state,settingsFactory){$log.info("HeaderController i says hey ");$scope.data={};$scope.data.title=settingsFactory.settings.groupNameNo||"Click to edit title";$scope.editGroupName=false;$scope.tabVisible=function(tabName){return settingsFactory.settings[tabName]==="1"};$scope.isCurrentState=function(stateName){if($state.current.name==="view_about"&&(typeof settingsFactory.settings["showAbout"]==
"undefined"||settingsFactory.settings["showAbout"]==0)&&stateName==="view_publications")return true;return $state.current.name===stateName};$scope.startGroupNameEdit=function(){$scope.data.title=settingsFactory.settings.groupNameNo;$scope.editGroupName=true;$scope.titleTMP=$scope.data.title;$timeout(function(){var e=angular.element("#groupNameEditInput");e.focus()},50)};$scope.cancelGroupNameEdit=function(){$scope.editGroupName=false;$scope.data.title=$scope.titleTMP};$scope.submitGroupNameEdit=function(){settingsFactory.settings.groupNameNo=
$scope.data.title;settingsFactory.save();if(!$scope.data.title)$scope.data.title="Click to edit title";$scope.editGroupName=false}}]);
angular.module("app.controllers").controller("RootCtrl",["$scope","$log","url","settingsFactory","$location","$state",function($scope,$log,url,settingsFactory){$log.info("Root controller loaded");$scope.scopusAttributionUrl=url.createRenderUrl("common/scopus_attribution");$scope.initFinished=false;settingsFactory.init().then(function(){$scope.settings=settingsFactory.settings;$scope.initFinished=true;$log.info("Root controller init finished")})}]);
angular.module("app.controllers").controller("AboutCtrl",["$scope","$location","url","settingsFactory","journalFactory",function($scope,$location,url,settingsFactory,journalFactory){$scope.settings=settingsFactory.settings;$scope.tabTemplateUrl=url.createRenderUrl("common/view_tabs");$scope.aboudEditLink="";if(!settingsFactory.settings["showAbout"]||settingsFactory.settings["showAbout"]==="0")$location.url("/view/publications");$scope.resultLimit=Number(settingsFactory.settings.recentPublications);
$scope.groupId=settingsFactory.settings.groupId;$scope.loadArticle=function(articleId){if(articleId&&articleId.length>0)journalFactory.getArticle(articleId).then(function(data){var jsonData=JSON.parse(data);$("#aboutArticle").empty();$("#aboutArticle").html(jsonData.articleContent);$scope.editLink=jsonData.editLink})};$scope.loadArticle(settingsFactory.settings.aboutArticle);$scope.showEdit=function(){return settingsFactory.settings.isSignedIn===true&&settingsFactory.settings.aboutArticle&&settingsFactory.settings.aboutArticle.length>
0}}]);
angular.module("app.controllers").controller("GovernanceCtrl",["$scope","$log","url","settingsFactory","projectsFactory","journalFactory",function($scope,$log,url,settingsFactory,projectsFactory,journalFactory){$scope.settings=settingsFactory.settings;$scope.tabTemplateUrl=url.createRenderUrl("common/view_tabs");$scope.loadArticle=function(articleId){if(articleId&&articleId.length>0)journalFactory.getArticle(articleId).then(function(data){var jsonData=JSON.parse(data);$("#governanceArticle").empty();$("#governanceArticle").html(jsonData.articleContent);
$scope.editLink=jsonData.editLink})};$scope.loadArticle(settingsFactory.settings.governanceArticle);$scope.resultLimit=Number(settingsFactory.settings.recentPublications);$scope.groupId=settingsFactory.settings.groupId;$scope.showEdit=function(){return settingsFactory.settings.isSignedIn===true&&settingsFactory.settings.aboutArticle&&settingsFactory.settings.aboutArticle.length>0}}]);
angular.module("app.controllers").controller("NetworkCtrl",["$scope","$log","$http","url","institutionFactory","settingsFactory","NgMap","gmapsFactory",function($scope,$log,$http,url,institutionFactory,settingsFactory,NgMap,gmapsFactory){$log.info("network controller says hey");$scope.settings=settingsFactory.settings;$scope.tabTemplateUrl=url.createRenderUrl("common/view_tabs");$log.info("tabUrl:"+$scope.tabTemplateUrl);$scope.searchTemplateUrl=url.createRenderUrl("common/searchForm");$scope.countryLimit=
10;$scope.coAuthorMetrics={};$scope.pubByYearMetrics={};$scope.searchObject={};$scope.searchObject.query="";$scope.groupStatistics={};var date=new Date;$scope.publicationYear=date.getFullYear();var resourceUrl="/proxy/research-activity/group/"+settingsFactory.getValue("groupId")+"/statistics";$http.get(resourceUrl).then(function(result){$scope.groupStatistics=result.data},function(reason){$log.error("Error loading group statistics",reason)});var slicesCool=["#00509e","#2272a7","#3795d5","#47bde3",
"#84b355","#3d9958","#296e6b","#4a4d9f","#7d468b","#630460","#666666","#999999","#cccccc","#333333"];var slicesSunny=["#1b234a","#77758d","#bbb9c6","#026666","#089a99","#39c0c3","#6fccdd","#ef3b24","#f26722","#f8981f","#fecd04","#666666","#999999"];var defaultYearPubSlices={},defaultCoAuthorSlices={},selectedCoAuthor=null,selectedYearPub=null;$scope.data={institutionMarkers:[],uniqueInstitutionCount:0,chartObject:{type:"PieChart",options:{legend:{"position":"none"},width:"100%",height:"100%",colors:slicesCool.concat(slicesSunny),
chartArea:{left:"0",top:"0",height:"80%",width:"100%"},slices:{}},data:{cols:[{id:"t",label:"country",type:"string"},{id:"s",label:"frequency",type:"number"}],rows:[]}},personChartObject:{type:"PieChart",options:{legend:{"position":"none"},width:"100%",height:"100%",colors:slicesCool.concat(slicesSunny),chartArea:{left:"0",top:"0",height:"80%",width:"100%"},slices:{}},data:{cols:[{id:"t",label:"country",type:"string"},{id:"s",label:"frequency",type:"number"}],rows:[]}},map:{center:{latitude:63.5111178,
longitude:.2664728},startAt:[50.5111178,.2664728],zoom:2,bounds:{}},options:{scrollwheel:true},groupId:settingsFactory.getValue("groupId"),institutions:[],numberOfInstututions:0,numberOfPublications:0,numberOfPersons:0};var addedToMap=[];var institutionObjectAddedToMap=[];institutionFactory.getInstitutions($scope.data.groupId).then(function(result){var markerArray=[];_.each(result,function(institution,index){if(institution.lat&&institution.lng&&_.indexOf(addedToMap,institution.gmapPlaceId)===-1){markerArray.push(gmapsFactory.createMarkerConfig(institution,
index));addedToMap.push(institution.gmapPlaceId);institutionObjectAddedToMap.push(institution)}});$scope.institutions=institutionObjectAddedToMap;gmapsFactory.getInstitutionCountries().then(function(result){var frequency=gmapsFactory.personFrequency(result.data);var slices={};$scope.data.personChartObject.data.rows=frequency.sort(function(a,b){return b.c[1].v-a.c[1].v});_.each(frequency,function(item,index){slices[index]={offset:0}});$scope.data.personChartObject.options.slices=slices;defaultYearPubSlices=
slices;_.each(result.data,function(item){if(_.isNumber(item.institutionCount))$scope.data.numberOfInstututions+=item.institutionCount;if(_.isNumber(item.publicationCount))$scope.data.numberOfPublications+=item.publicationCount;if(_.isNumber(item.personCount))$scope.data.numberOfPersons+=item.personCount})});gmapsFactory.getCountriesByGroupIdGroupedByYear().then(function(result){var yearsWithData=[];_.each(result.data,function(value,key,list){yearsWithData.push(key)});yearsWithData.sort();if(yearsWithData[yearsWithData.length-
1]<=date.getFullYear())$scope.publicationYear=yearsWithData[yearsWithData.length-1];else $scope.publicationYear=date.getFullYear();var frequency=gmapsFactory.institutionFrequency(result.data[$scope.publicationYear]);var slices={};$scope.data.chartObject.data.rows=frequency;$scope.data.chartObject.data.rows=frequency.sort(function(a,b){return b.c[1].v-a.c[1].v});_.each(frequency,function(item,index){slices[index]={offset:0}});$scope.data.chartObject.options.slices=slices;defaultYearPubSlices=slices});
NgMap.getMap().then(function(map){_.each(markerArray,function(markerConfig){$scope.data.institutionMarkers.push(gmapsFactory.createMarker(markerConfig,map))});var clusterOptions={minimumClusterSize:5,gridSize:30};$scope.data.markerClusterer=new MarkerClusterer(map,$scope.data.institutionMarkers,clusterOptions)})});$scope.setYearSliceOffset=function(index){selectedYearPub=index;$scope.data.chartObject.options.slices=angular.copy(defaultYearPubSlices);$scope.data.chartObject.options.slices[index]={offset:.1};
$scope.pubByYearMetrics=$scope.data.chartObject.data.rows[index].c[2].country};$scope.setCoAuthorSliceOffset=function(index){selectedCoAuthor=index;$scope.data.personChartObject.options.slices=angular.copy(defaultCoAuthorSlices);$scope.data.personChartObject.options.slices[index]={offset:.1};$scope.coAuthorMetrics=$scope.data.personChartObject.data.rows[index].c[2].country};$scope.isCoAuthorSelected=function(index){return selectedCoAuthor===index?"selectedPieSlice":"notSelectedPieSlice"};$scope.isYearSelected=
function(index){return selectedYearPub===index?"selectedPieSlice":"notSelectedPieSlice"};$scope.showCompleteCountrList=function(){if($scope.countryLimit===10)$scope.countryLimit=100;else $scope.countryLimit=10}}]);
angular.module("app.controllers").controller("PeopleCtrl",["$scope","$log","$filter","url","personListFactory","settingsFactory","backendFactory","sessionData",function($scope,$log,$filter,url,personListFactory,settingsFactory,backendFactory,sessionData){$scope.settings=settingsFactory.settings;$scope.sessionData=sessionData;$scope.tabTemplateUrl=url.createRenderUrl("common/view_tabs");$scope.searchTemplateUrl=url.createRenderUrl("common/searchForm");$scope.peopleCardsTemplateUrl=url.createRenderUrl("view/people/viewTemplates/peopleCards");
$scope.peopleListTemplateUrl=url.createRenderUrl("view/people/viewTemplates/peopleList");$scope.cardPeople=[];$scope.people=[];$scope.filteredPeople=[];$scope.searchObject={};$scope.searchObject.query=sessionData.peopleQuery;$scope.searchObject.placeholder="Filter people";$scope.filterPeople=function(){var filteredPple=$filter("searchFilter")($scope.people,sessionData.peopleQuery);filteredPple=$filter("orderBy")(filteredPple,sessionData.peopleSortField,sessionData.peopleSortRev);$scope.cardPeople=
filteredPple;console.log($scope.cardPeople);$scope.filteredPeople=$filter("limitTo")(filteredPple,sessionData.peopleListLength)};personListFactory.init(function(){$scope.people=personListFactory.personList;$scope.filterPeople()});$scope.showView=function(viewName){viewName=viewName||"sortable";return $scope.settings.peopleViewOption===viewName};$scope.$watch("searchObject.query",function(newValue,oldValue){sessionData.peopleQuery=newValue;$scope.filterPeople()});$scope.cardColumn=function(){return $scope.settings.peopleViewOption===
"oneColCards"?"oneColCards":"twoColCards"};$scope.setSortOrder=function(orderByField){if(sessionData.peopleSortField===orderByField)sessionData.peopleSortRev=!sessionData.peopleSortRev;else{sessionData.peopleSortField=orderByField;sessionData.peopleSortRev=true}$scope.filterPeople()};$scope.addMoreResult=function(){sessionData.peopleListLength+=10;$scope.filterPeople()}}]);
angular.module("app.controllers").controller("PersonDetailsCtrl",["$scope","$log","url",function($scope,$log,url){$log.info("Person detail controller says hey");$scope.tabTemplateUrl=url.createRenderUrl("common/view_tabs");$log.info("tabUrl:"+$scope.tabTemplateUrl)}]);
angular.module("app.controllers").controller("ProjectsCtrl",["$scope","$log","$filter","url","settingsFactory","projectsFactory","sessionData",function($scope,$log,$filter,url,settingsFactory,projectsFactory,sessionData){$scope.settings=settingsFactory.settings;$scope.sessionData=sessionData;$scope.tabTemplateUrl=url.createRenderUrl("common/view_tabs");$scope.searchTemplateUrl=url.createRenderUrl("common/searchForm");$scope.projects=[];$scope.filteredProjects=[];$scope.searchObject={};$scope.searchObject.query=
sessionData.projectsQuery;$scope.searchObject.placeholder="Filter projects";function filterProjects(){var filteredProj=$filter("searchFilter")($scope.projects,sessionData.projectsQuery);filteredProj=$filter("orderBy")(filteredProj,sessionData.projectsSortField,sessionData.projectsSortRev);filteredProj=$filter("limitTo")(filteredProj,sessionData.projectsListLength);$scope.filteredProjects=filteredProj}function init(){projectsFactory.getProjects(settingsFactory.settings.groupId).then(function(data){var projects=
_.uniq(data,false,function(project){return project.nr});_.each(projects,function(project){var members=project.members.split(",");project.members=members.join(", ")});$scope.projects=projects;filterProjects()},function(reason){$log.error(reason)})}init();$scope.$watch("searchObject.query",function(newValue,oldValue){sessionData.projectsQuery=newValue;filterProjects()});$scope.setSortOrder=function(orderByField){if(sessionData.projectsSortField===orderByField)sessionData.projectsSortRev=!sessionData.projectsSortRev;
else{sessionData.projectsSortField=orderByField;sessionData.projectsSortRev=true}filterProjects()};$scope.addMoreResult=function(){sessionData.projectsListLength+=10;filterProjects()}}]);
angular.module("app.controllers").controller("PublicationsCtrl",["$scope","$log","url","publicationsFactory","settingsFactory","sessionData","$stateParams","$location","$filter",function($scope,$log,url,publicationsFactory,settingsFactory,sessionData,$stateParams,$location,$filter){$log.info("publications controller says hey");$scope.tabTemplateUrl=url.createRenderUrl("common/view_tabs");$scope.searchTemplateUrl=url.createRenderUrl("common/searchForm");$scope.moreResultTemplateUrl=url.createRenderUrl("addMoreResult");
$scope.loaderTemplateUrl=url.createRenderUrl("common/loader");$scope.settings=settingsFactory.settings;if(sessionData.publicationsListLength===undefined)sessionData.publicationsListLength=$scope.settings.recentPublications;$scope.searchObject={query:sessionData.publicationsQuery,placeholder:"Filter publications"};$scope.limitAuthorsTo=10;$scope.publications=[];$scope.filteredPublications=[];publicationsFactory.getPublications(settingsFactory.getValue("groupId")).then(function(data){if(_.isArray(data))$scope.publications=
data.sort(function(a,b){return new Date(b.coverDate)-new Date(a.coverDate)});if($stateParams.tagName){sessionData.publicationsQuery=decodeURIComponent($stateParams.tagName);$scope.searchObject.query=sessionData.publicationsQuery}$scope.filterPublications()},function(reason){$log.error("Failed: ",reason)});$scope.$watch("searchObject.query",function(newValue,oldValue){sessionData.publicationsQuery=newValue;$scope.filterPublications()});$scope.hasUserName=function(author){if(author.username&&author.username.length>
0)return true;return false};$scope.hasMoreAuthors=function(authors){return authors.length>$scope.limitAuthorsTo};$scope.viewMoreAuthors=function(){if($scope.limitAuthorsTo===10)$scope.limitAuthorsTo=1E3;else $scope.limitAuthorsTo=10};$scope.clearSearch=function(){sessionData.publicationsQuery="";$scope.searchObject.query=""};$scope.filterPublications=function(){var filteredPubs=$filter("searchFilter")($scope.publications,sessionData.publicationsQuery);filteredPubs=$filter("orderBy")(filteredPubs,
sessionData.publicationsSortField,sessionData.publicationsSortRev);filteredPubs=$filter("limitTo")(filteredPubs,sessionData.publicationsListLength);$scope.filteredPublications=filteredPubs};$scope.setSortOrder=function(orderByField){if(sessionData.publicationsSortField===orderByField)sessionData.publicationsSortRev=!sessionData.publicationsSortRev;else{sessionData.publicationsSortField=orderByField;sessionData.publicationsSortRev=false}$scope.filterPublications()};$scope.addMoreResult=function(){sessionData.publicationsListLength=
parseInt(sessionData.publicationsListLength)+parseInt($scope.settings.recentPublications);$scope.filterPublications()};$scope.hasMoreResults=function(){return $scope.filteredPublications.length<=$scope.publications.length&&$scope.settings.recentPublications.length<$scope.filteredPublications.length};function appendText(existingText,moreText){if(existingText&&existingText.length>0&&moreText&&moreText.length>0)return existingText+", "+moreText;if(existingText)return existingText;if(moreText)return moreText;
return""}$scope.createExtraJournalInfo=function(publication){var result=publication.volume?"Volume "+publication.volume:"";result=appendText(result,publication.issueIdentifier?"Issue "+publication.issueIdentifier:"");result=appendText(result,publication.pageRange?"Pages "+publication.pageRange:"");return result}}]);
angular.module("app.controllers").controller("TagsCtrl",["$scope","$log","url","tagCloudFactory","settingsFactory","$filter","$timeout",function($scope,$log,url,tagCloudFactory,settingsFactory,$filter,$timeout){$scope.settings=settingsFactory.settings;$scope.tabTemplateUrl=url.createRenderUrl("common/view_tabs");$scope.searchTemplateUrl=url.createRenderUrl("common/searchForm");$scope.searchObject={};$scope.searchObject.query="";$scope.searchObject.placeholder="Filter tags";$scope.cloudsByYear={};
$scope.slider={value:0};$scope.showAllTerms="false";$scope.showSlider=true;$scope.radioTitle1="View wordcloud for terms in all publications";$scope.radioTitle2="View how the research focus has developed over time.";$scope.wordCloud=[];$scope.wordCloudByYear={};function doFilter(){var filterOptions={filterString:$scope.searchObject.query,booleanOperator:""};if($scope.showSlider)filterOptions.words=getWordsByYear();else filterOptions.words=getWords();return tagCloudFactory.filter(filterOptions)}function getWords(){return tagCloudFactory.generateWordCloud(angular.copy($scope.wordCloud),
settingsFactory.getValue("wordLimit").toString(),settingsFactory.getValues("excludeWords"))}function getWordsByYear(){var year=tagCloudFactory.listOfYears[$scope.slider.value];var words=$scope.wordCloudByYear[year];return tagCloudFactory.generateWordCloud(angular.copy(words),settingsFactory.getValue("wordLimit").toString(),settingsFactory.getValues("excludeWords"))}tagCloudFactory.init(function(words,wordsByYear){$scope.wordCloud=words;$scope.wordCloudByYear=wordsByYear;$scope.words=getWords();var currentDate=
new Date;var year=currentDate.getFullYear();var month=currentDate.getMonth();var defValue=tagCloudFactory.listOfYears.length-1;if(year==tagCloudFactory.listOfYears[tagCloudFactory.listOfYears.length-1]&&month<5&&tagCloudFactory.listOfYears.length>1)defValue=tagCloudFactory.listOfYears.length-2;$scope.slider={value:defValue,options:{floor:0,ceil:tagCloudFactory.listOfYears.length-1,translate:function(value){return tagCloudFactory.listOfYears[value]}}};$timeout(function(){$scope.$broadcast("rzSliderForceRender")})});
$scope.$watch("showSlider",function(){$timeout(function(){$scope.$broadcast("rzSliderForceRender")})});$scope.$watch("searchObject.query",function(){$scope.words=doFilter()});$scope.$watch("slider.value",function(){if($scope.slider.value){$scope.words=getWordsByYear();$scope.words=doFilter()}});$scope.$watch("showAllTerms",function(){$scope.showSlider=!($scope.showAllTerms==="true");$scope.slider.slider=0;if($scope.showSlider)$scope.words=getWordsByYear();else $scope.words=getWords();$scope.words=
doFilter()});$scope.decodeUriLinks=function(){$log.info("decoding links")}}]);
function startApp(id,portletId){var app=angular.module(id,["akoenig.deckgrid","rzModule","ui.bootstrap","ui.router","app.filters","app.factories","app.controllers","app.directives","pascalprecht.translate","ui.autocomplete","ngSanitize","ngCsv","ngMap","googlechart"]);app.run(["$rootScope","releaseFactory","url",function($rootScope,releaseFactory,url){$rootScope.portletId=portletId.substr(1,portletId.length-2);$rootScope.liferay={token:Liferay.authToken,companyId:Liferay.ThemeDisplay.getCompanyId(),
loggedIn:Liferay.ThemeDisplay.isSignedIn()};releaseFactory.getRelease().then(function(release){$rootScope.liferay.release=release});$rootScope.$on("$stateChangeStart",function(event,toState,toParams,fromState,fromParams){if(!toState.hasOwnProperty("fixedUrl")){toState.templateUrl=url.createRenderUrl(toState.templateUrl);toState.fixedUrl=true}})}]);app.config(["$httpProvider","$urlRouterProvider","$stateProvider","$locationProvider","$translateProvider","urlProvider","$tooltipProvider",function($httpProvider,
$urlRouterProvider,$stateProvider,$locationProvider,$translateProvider,urlProvider,$tooltipProvider){$httpProvider.defaults.headers.get=$httpProvider.defaults.headers.get||{};$httpProvider.defaults.headers.get["If-Modified-Since"]="0";$httpProvider.defaults.headers.get["Cache-Control"]="no-cache";$httpProvider.defaults.headers.get.Pragma="no-cache";$tooltipProvider.setTriggers({outsideClick:"outsideClick","click":"click"});var checkLoggedIn=["$location",function($location){var isSignedIn=Liferay.ThemeDisplay.isSignedIn();
if(!isSignedIn){$location.url("/view/publications");return false}return isSignedIn}];urlProvider.setPid(portletId);$translateProvider.useUrlLoader(urlProvider.$get().createResourceUrl("language","locale",Liferay.ThemeDisplay.getBCP47LanguageId()));$translateProvider.preferredLanguage(Liferay.ThemeDisplay.getBCP47LanguageId());$locationProvider.html5Mode(false);$urlRouterProvider.otherwise("/view/about");$stateProvider.state("view_network",{url:"/view/network",templateUrl:"view/network/network",controller:"NetworkCtrl"}).state("view_people",
{templateUrl:"view/people/people",controller:"PeopleCtrl",url:"/view/people"}).state("view_person_details",{templateUrl:"view/people/details/person.details",controller:"PersonDetailsCtrl",url:"/view/person"}).state("view_projects",{templateUrl:"view/projects/projects",controller:"ProjectsCtrl",url:"/view/projects"}).state("view_publications_by_tag",{url:"/view/publications/:tagName",templateUrl:"view/publications/publications",controller:"PublicationsCtrl"}).state("view_publications",{url:"/view/publications",
templateUrl:"view/publications/publications",controller:"PublicationsCtrl"}).state("view_about",{url:"/view/about",templateUrl:"view/about/about",controller:"AboutCtrl"}).state("view_governance",{url:"/view/governance",templateUrl:"view/governance/governance",controller:"GovernanceCtrl"}).state("view_tags",{url:"/view/tags",templateUrl:"view/tags/tags",controller:"TagsCtrl"}).state("admin_people",{url:"/admin/people",templateUrl:"admin/people/people",controller:"AdminPeopleCtrl",resolve:{loggedin:checkLoggedIn}}).state("admin_views",
{url:"/admin/views",templateUrl:"admin/views/views",controller:"AdminViewsCtrl",resolve:{loggedin:checkLoggedIn}}).state("admin_tags",{url:"/admin/tags",templateUrl:"admin/tags/tags",controller:"AdminTagsCtrl",resolve:{loggedin:checkLoggedIn}}).state("admin_data",{url:"/admin/data",templateUrl:"admin/data/data",controller:"AdminDataCtrl",resolve:{loggedin:checkLoggedIn}})}]);angular.bootstrap(document.getElementById(id),[id])};
