
/* /web/static/lib/es6-promise/es6-promise-polyfill.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global.ES6Promise=factory());}(this,(function(){'use strict';function objectOrFunction(x){var type=typeof x;return x!==null&&(type==='object'||type==='function');}
function isFunction(x){return typeof x==='function';}
var _isArray=void 0;if(Array.isArray){_isArray=Array.isArray;}else{_isArray=function(x){return Object.prototype.toString.call(x)==='[object Array]';};}
var isArray=_isArray;var len=0;var vertxNext=void 0;var customSchedulerFn=void 0;var asap=function asap(callback,arg){queue[len]=callback;queue[len+1]=arg;len+=2;if(len===2){if(customSchedulerFn){customSchedulerFn(flush);}else{scheduleFlush();}}};function setScheduler(scheduleFn){customSchedulerFn=scheduleFn;}
function setAsap(asapFn){asap=asapFn;}
var browserWindow=typeof window!=='undefined'?window:undefined;var browserGlobal=browserWindow||{};var BrowserMutationObserver=browserGlobal.MutationObserver||browserGlobal.WebKitMutationObserver;var isNode=false;var isWorker=typeof Uint8ClampedArray!=='undefined'&&typeof importScripts!=='undefined'&&typeof MessageChannel!=='undefined';function useNextTick(){return function(){return process.nextTick(flush);};}
function useVertxTimer(){if(typeof vertxNext!=='undefined'){return function(){vertxNext(flush);};}
return useSetTimeout();}
function useMutationObserver(){var iterations=0;var observer=new BrowserMutationObserver(flush);var node=document.createTextNode('');observer.observe(node,{characterData:true});return function(){node.data=iterations=++iterations%2;};}
function useMessageChannel(){var channel=new MessageChannel();channel.port1.onmessage=flush;return function(){return channel.port2.postMessage(0);};}
function useSetTimeout(){var globalSetTimeout=setTimeout;return function(){return globalSetTimeout(flush,1);};}
var queue=new Array(1000);function flush(){for(var i=0;i<len;i+=2){var callback=queue[i];var arg=queue[i+1];callback(arg);queue[i]=undefined;queue[i+1]=undefined;}
len=0;}
function attemptVertx(){try{var vertx=Function('return this')().require('vertx');vertxNext=vertx.runOnLoop||vertx.runOnContext;return useVertxTimer();}catch(e){return useSetTimeout();}}
var scheduleFlush=void 0;if(isNode){scheduleFlush=useNextTick();}else if(BrowserMutationObserver){scheduleFlush=useMutationObserver();}else if(isWorker){scheduleFlush=useMessageChannel();}else if(browserWindow===undefined&&typeof require==='function'){scheduleFlush=attemptVertx();}else{scheduleFlush=useSetTimeout();}
function then(onFulfillment,onRejection){var parent=this;var child=new this.constructor(noop);if(child[PROMISE_ID]===undefined){makePromise(child);}
var _state=parent._state;if(_state){var callback=arguments[_state-1];asap(function(){return invokeCallback(_state,child,callback,parent._result);});}else{subscribe(parent,child,onFulfillment,onRejection);}
return child;}
function resolve$1(object){var Constructor=this;if(object&&typeof object==='object'&&object.constructor===Constructor){return object;}
var promise=new Constructor(noop);resolve(promise,object);return promise;}
var PROMISE_ID=Math.random().toString(36).substring(2);function noop(){}
var PENDING=void 0;var FULFILLED=1;var REJECTED=2;var TRY_CATCH_ERROR={error:null};function selfFulfillment(){return new TypeError("You cannot resolve a promise with itself");}
function cannotReturnOwn(){return new TypeError('A promises callback cannot return that same promise.');}
function getThen(promise){try{return promise.then;}catch(error){TRY_CATCH_ERROR.error=error;return TRY_CATCH_ERROR;}}
function tryThen(then$$1,value,fulfillmentHandler,rejectionHandler){try{then$$1.call(value,fulfillmentHandler,rejectionHandler);}catch(e){return e;}}
function handleForeignThenable(promise,thenable,then$$1){asap(function(promise){var sealed=false;var error=tryThen(then$$1,thenable,function(value){if(sealed){return;}
sealed=true;if(thenable!==value){resolve(promise,value);}else{fulfill(promise,value);}},function(reason){if(sealed){return;}
sealed=true;reject(promise,reason);},'Settle: '+(promise._label||' unknown promise'));if(!sealed&&error){sealed=true;reject(promise,error);}},promise);}
function handleOwnThenable(promise,thenable){if(thenable._state===FULFILLED){fulfill(promise,thenable._result);}else if(thenable._state===REJECTED){reject(promise,thenable._result);}else{subscribe(thenable,undefined,function(value){return resolve(promise,value);},function(reason){return reject(promise,reason);});}}
function handleMaybeThenable(promise,maybeThenable,then$$1){if(maybeThenable.constructor===promise.constructor&&then$$1===then&&maybeThenable.constructor.resolve===resolve$1){handleOwnThenable(promise,maybeThenable);}else{if(then$$1===TRY_CATCH_ERROR){reject(promise,TRY_CATCH_ERROR.error);TRY_CATCH_ERROR.error=null;}else if(then$$1===undefined){fulfill(promise,maybeThenable);}else if(isFunction(then$$1)){handleForeignThenable(promise,maybeThenable,then$$1);}else{fulfill(promise,maybeThenable);}}}
function resolve(promise,value){if(promise===value){reject(promise,selfFulfillment());}else if(objectOrFunction(value)){handleMaybeThenable(promise,value,getThen(value));}else{fulfill(promise,value);}}
function publishRejection(promise){if(promise._onerror){promise._onerror(promise._result);}
publish(promise);}
function fulfill(promise,value){if(promise._state!==PENDING){return;}
promise._result=value;promise._state=FULFILLED;if(promise._subscribers.length!==0){asap(publish,promise);}}
function reject(promise,reason){if(promise._state!==PENDING){return;}
promise._state=REJECTED;promise._result=reason;asap(publishRejection,promise);}
function subscribe(parent,child,onFulfillment,onRejection){var _subscribers=parent._subscribers;var length=_subscribers.length;parent._onerror=null;_subscribers[length]=child;_subscribers[length+FULFILLED]=onFulfillment;_subscribers[length+REJECTED]=onRejection;if(length===0&&parent._state){asap(publish,parent);}}
function publish(promise){var subscribers=promise._subscribers;var settled=promise._state;if(subscribers.length===0){return;}
var child=void 0,callback=void 0,detail=promise._result;for(var i=0;i<subscribers.length;i+=3){child=subscribers[i];callback=subscribers[i+settled];if(child){invokeCallback(settled,child,callback,detail);}else{callback(detail);}}
promise._subscribers.length=0;}
function tryCatch(callback,detail){try{return callback(detail);}catch(e){TRY_CATCH_ERROR.error=e;return TRY_CATCH_ERROR;}}
function invokeCallback(settled,promise,callback,detail){var hasCallback=isFunction(callback),value=void 0,error=void 0,succeeded=void 0,failed=void 0;if(hasCallback){value=tryCatch(callback,detail);if(value===TRY_CATCH_ERROR){failed=true;error=value.error;value.error=null;}else{succeeded=true;}
if(promise===value){reject(promise,cannotReturnOwn());return;}}else{value=detail;succeeded=true;}
if(promise._state!==PENDING){}else if(hasCallback&&succeeded){resolve(promise,value);}else if(failed){reject(promise,error);}else if(settled===FULFILLED){fulfill(promise,value);}else if(settled===REJECTED){reject(promise,value);}}
function initializePromise(promise,resolver){try{resolver(function resolvePromise(value){resolve(promise,value);},function rejectPromise(reason){reject(promise,reason);});}catch(e){reject(promise,e);}}
var id=0;function nextId(){return id++;}
function makePromise(promise){promise[PROMISE_ID]=id++;promise._state=undefined;promise._result=undefined;promise._subscribers=[];}
function validationError(){return new Error('Array Methods must be provided an Array');}
var Enumerator=function(){function Enumerator(Constructor,input){this._instanceConstructor=Constructor;this.promise=new Constructor(noop);if(!this.promise[PROMISE_ID]){makePromise(this.promise);}
if(isArray(input)){this.length=input.length;this._remaining=input.length;this._result=new Array(this.length);if(this.length===0){fulfill(this.promise,this._result);}else{this.length=this.length||0;this._enumerate(input);if(this._remaining===0){fulfill(this.promise,this._result);}}}else{reject(this.promise,validationError());}}
Enumerator.prototype._enumerate=function _enumerate(input){for(var i=0;this._state===PENDING&&i<input.length;i++){this._eachEntry(input[i],i);}};Enumerator.prototype._eachEntry=function _eachEntry(entry,i){var c=this._instanceConstructor;var resolve$$1=c.resolve;if(resolve$$1===resolve$1){var _then=getThen(entry);if(_then===then&&entry._state!==PENDING){this._settledAt(entry._state,i,entry._result);}else if(typeof _then!=='function'){this._remaining--;this._result[i]=entry;}else if(c===Promise$2){var promise=new c(noop);handleMaybeThenable(promise,entry,_then);this._willSettleAt(promise,i);}else{this._willSettleAt(new c(function(resolve$$1){return resolve$$1(entry);}),i);}}else{this._willSettleAt(resolve$$1(entry),i);}};Enumerator.prototype._settledAt=function _settledAt(state,i,value){var promise=this.promise;if(promise._state===PENDING){this._remaining--;if(state===REJECTED){reject(promise,value);}else{this._result[i]=value;}}
if(this._remaining===0){fulfill(promise,this._result);}};Enumerator.prototype._willSettleAt=function _willSettleAt(promise,i){var enumerator=this;subscribe(promise,undefined,function(value){return enumerator._settledAt(FULFILLED,i,value);},function(reason){return enumerator._settledAt(REJECTED,i,reason);});};return Enumerator;}();function all(entries){return new Enumerator(this,entries).promise;}
function race(entries){var Constructor=this;if(!isArray(entries)){return new Constructor(function(_,reject){return reject(new TypeError('You must pass an array to race.'));});}else{return new Constructor(function(resolve,reject){var length=entries.length;for(var i=0;i<length;i++){Constructor.resolve(entries[i]).then(resolve,reject);}});}}
function reject$1(reason){var Constructor=this;var promise=new Constructor(noop);reject(promise,reason);return promise;}
function needsResolver(){throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');}
function needsNew(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");}
var Promise$2=function(){function Promise(resolver){this[PROMISE_ID]=nextId();this._result=this._state=undefined;this._subscribers=[];if(noop!==resolver){typeof resolver!=='function'&&needsResolver();this instanceof Promise?initializePromise(this,resolver):needsNew();}}
Promise.prototype.catch=function _catch(onRejection){return this.then(null,onRejection);};Promise.prototype.finally=function _finally(callback){var promise=this;var constructor=promise.constructor;if(isFunction(callback)){return promise.then(function(value){return constructor.resolve(callback()).then(function(){return value;});},function(reason){return constructor.resolve(callback()).then(function(){throw reason;});});}
return promise.then(callback,callback);};return Promise;}();Promise$2.prototype.then=then;Promise$2.all=all;Promise$2.race=race;Promise$2.resolve=resolve$1;Promise$2.reject=reject$1;Promise$2._setScheduler=setScheduler;Promise$2._setAsap=setAsap;Promise$2._asap=asap;function polyfill(){var local=void 0;try{local=Function('return this')();}catch(e){throw new Error('polyfill failed because global object is unavailable in this environment');}
var P=local.Promise;if(P){var promiseToString=null;try{promiseToString=Object.prototype.toString.call(P.resolve());}catch(e){}
if(promiseToString==='[object Promise]'&&!P.cast){return;}}
local.Promise=Promise$2;}
Promise$2.polyfill=polyfill;Promise$2.Promise=Promise$2;Promise$2.polyfill();return Promise$2;})));;

/* /web/static/lib/unhandled-rejection-polyfill/unhandled-rejection-polyfill.js defined in bundle 'web.assets_common' */
(function(){"use strict";var self=window;var OriginalPromise=self.Promise;function dispatchUnhandledRejectionEvent(promise,reason){var event=document.createEvent('Event');Object.defineProperties(event,{promise:{value:promise,writable:false,},reason:{value:reason,writable:false,},});event.initEvent('unhandledrejection',false,true);window.dispatchEvent(event);}
function MyPromise(resolver){if(!(this instanceof MyPromise)){throw new TypeError('Cannot call a class as a function');}
var promise=new OriginalPromise(function(resolve,reject){var customReject=function(reason){setTimeout(function(){if(promise.handled!==true){dispatchUnhandledRejectionEvent(promise,reason);}},0);return reject(reason);};try{return resolver(resolve,customReject);}catch(err){return customReject(err);}});promise.__proto__=MyPromise.prototype;return promise;}
MyPromise.__proto__=OriginalPromise;MyPromise.prototype.__proto__=OriginalPromise.prototype;MyPromise.prototype.then=function(resolve,reject){var self=this;return OriginalPromise.prototype.then.call(this,resolve,reject&&(function(reason){self.handled=true;return reject(reason);}));};MyPromise.prototype.catch=function(reject){var self=this;return OriginalPromise.prototype.catch.call(this,reject&&(function(reason){self.handled=true;return reject(reason);}));};MyPromise.polyfill=function(){if(typeof PromiseRejectionEvent==='undefined'){window.Promise=MyPromise;}};MyPromise.polyfill();})();;

/* /web/static/lib/underscore/underscore.js defined in bundle 'web.assets_common' */
(function(){var root=this;var previousUnderscore=root._;var ArrayProto=Array.prototype,ObjProto=Object.prototype,FuncProto=Function.prototype;var
push=ArrayProto.push,slice=ArrayProto.slice,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty;var
nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind,nativeCreate=Object.create;var Ctor=function(){};var _=function(obj){if(obj instanceof _)return obj;if(!(this instanceof _))return new _(obj);this._wrapped=obj;};if(typeof exports!=='undefined'){if(typeof module!=='undefined'&&module.exports){exports=module.exports=_;}
exports._=_;}else{root._=_;}
_.VERSION='1.8.2';var optimizeCb=function(func,context,argCount){if(context===void 0)return func;switch(argCount==null?3:argCount){case 1:return function(value){return func.call(context,value);};case 2:return function(value,other){return func.call(context,value,other);};case 3:return function(value,index,collection){return func.call(context,value,index,collection);};case 4:return function(accumulator,value,index,collection){return func.call(context,accumulator,value,index,collection);};}
return function(){return func.apply(context,arguments);};};var cb=function(value,context,argCount){if(value==null)return _.identity;if(_.isFunction(value))return optimizeCb(value,context,argCount);if(_.isObject(value))return _.matcher(value);return _.property(value);};_.iteratee=function(value,context){return cb(value,context,Infinity);};var createAssigner=function(keysFunc,undefinedOnly){return function(obj){var length=arguments.length;if(length<2||obj==null)return obj;for(var index=1;index<length;index++){var source=arguments[index],keys=keysFunc(source),l=keys.length;for(var i=0;i<l;i++){var key=keys[i];if(!undefinedOnly||obj[key]===void 0)obj[key]=source[key];}}
return obj;};};var baseCreate=function(prototype){if(!_.isObject(prototype))return{};if(nativeCreate)return nativeCreate(prototype);Ctor.prototype=prototype;var result=new Ctor;Ctor.prototype=null;return result;};var MAX_ARRAY_INDEX=Math.pow(2,53)-1;var isArrayLike=function(collection){var length=collection&&collection.length;return typeof length=='number'&&length>=0&&length<=MAX_ARRAY_INDEX;};_.each=_.forEach=function(obj,iteratee,context){iteratee=optimizeCb(iteratee,context);var i,length;if(isArrayLike(obj)){for(i=0,length=obj.length;i<length;i++){iteratee(obj[i],i,obj);}}else{var keys=_.keys(obj);for(i=0,length=keys.length;i<length;i++){iteratee(obj[keys[i]],keys[i],obj);}}
return obj;};_.map=_.collect=function(obj,iteratee,context){iteratee=cb(iteratee,context);var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length,results=Array(length);for(var index=0;index<length;index++){var currentKey=keys?keys[index]:index;results[index]=iteratee(obj[currentKey],currentKey,obj);}
return results;};function createReduce(dir){function iterator(obj,iteratee,memo,keys,index,length){for(;index>=0&&index<length;index+=dir){var currentKey=keys?keys[index]:index;memo=iteratee(memo,obj[currentKey],currentKey,obj);}
return memo;}
return function(obj,iteratee,memo,context){iteratee=optimizeCb(iteratee,context,4);var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length,index=dir>0?0:length-1;if(arguments.length<3){memo=obj[keys?keys[index]:index];index+=dir;}
return iterator(obj,iteratee,memo,keys,index,length);};}
_.reduce=_.foldl=_.inject=createReduce(1);_.reduceRight=_.foldr=createReduce(-1);_.find=_.detect=function(obj,predicate,context){var key;if(isArrayLike(obj)){key=_.findIndex(obj,predicate,context);}else{key=_.findKey(obj,predicate,context);}
if(key!==void 0&&key!==-1)return obj[key];};_.filter=_.select=function(obj,predicate,context){var results=[];predicate=cb(predicate,context);_.each(obj,function(value,index,list){if(predicate(value,index,list))results.push(value);});return results;};_.reject=function(obj,predicate,context){return _.filter(obj,_.negate(cb(predicate)),context);};_.every=_.all=function(obj,predicate,context){predicate=cb(predicate,context);var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length;for(var index=0;index<length;index++){var currentKey=keys?keys[index]:index;if(!predicate(obj[currentKey],currentKey,obj))return false;}
return true;};_.some=_.any=function(obj,predicate,context){predicate=cb(predicate,context);var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length;for(var index=0;index<length;index++){var currentKey=keys?keys[index]:index;if(predicate(obj[currentKey],currentKey,obj))return true;}
return false;};_.contains=_.includes=_.include=function(obj,target,fromIndex){if(!isArrayLike(obj))obj=_.values(obj);return _.indexOf(obj,target,typeof fromIndex=='number'&&fromIndex)>=0;};_.invoke=function(obj,method){var args=slice.call(arguments,2);var isFunc=_.isFunction(method);return _.map(obj,function(value){var func=isFunc?method:value[method];return func==null?func:func.apply(value,args);});};_.pluck=function(obj,key){return _.map(obj,_.property(key));};_.where=function(obj,attrs){return _.filter(obj,_.matcher(attrs));};_.findWhere=function(obj,attrs){return _.find(obj,_.matcher(attrs));};_.max=function(obj,iteratee,context){var result=-Infinity,lastComputed=-Infinity,value,computed;if(iteratee==null&&obj!=null){obj=isArrayLike(obj)?obj:_.values(obj);for(var i=0,length=obj.length;i<length;i++){value=obj[i];if(value>result){result=value;}}}else{iteratee=cb(iteratee,context);_.each(obj,function(value,index,list){computed=iteratee(value,index,list);if(computed>lastComputed||computed===-Infinity&&result===-Infinity){result=value;lastComputed=computed;}});}
return result;};_.min=function(obj,iteratee,context){var result=Infinity,lastComputed=Infinity,value,computed;if(iteratee==null&&obj!=null){obj=isArrayLike(obj)?obj:_.values(obj);for(var i=0,length=obj.length;i<length;i++){value=obj[i];if(value<result){result=value;}}}else{iteratee=cb(iteratee,context);_.each(obj,function(value,index,list){computed=iteratee(value,index,list);if(computed<lastComputed||computed===Infinity&&result===Infinity){result=value;lastComputed=computed;}});}
return result;};_.shuffle=function(obj){var set=isArrayLike(obj)?obj:_.values(obj);var length=set.length;var shuffled=Array(length);for(var index=0,rand;index<length;index++){rand=_.random(0,index);if(rand!==index)shuffled[index]=shuffled[rand];shuffled[rand]=set[index];}
return shuffled;};_.sample=function(obj,n,guard){if(n==null||guard){if(!isArrayLike(obj))obj=_.values(obj);return obj[_.random(obj.length-1)];}
return _.shuffle(obj).slice(0,Math.max(0,n));};_.sortBy=function(obj,iteratee,context){iteratee=cb(iteratee,context);return _.pluck(_.map(obj,function(value,index,list){return{value:value,index:index,criteria:iteratee(value,index,list)};}).sort(function(left,right){var a=left.criteria;var b=right.criteria;if(a!==b){if(a>b||a===void 0)return 1;if(a<b||b===void 0)return-1;}
return left.index-right.index;}),'value');};var group=function(behavior){return function(obj,iteratee,context){var result={};iteratee=cb(iteratee,context);_.each(obj,function(value,index){var key=iteratee(value,index,obj);behavior(result,value,key);});return result;};};_.groupBy=group(function(result,value,key){if(_.has(result,key))result[key].push(value);else result[key]=[value];});_.indexBy=group(function(result,value,key){result[key]=value;});_.countBy=group(function(result,value,key){if(_.has(result,key))result[key]++;else result[key]=1;});_.toArray=function(obj){if(!obj)return[];if(_.isArray(obj))return slice.call(obj);if(isArrayLike(obj))return _.map(obj,_.identity);return _.values(obj);};_.size=function(obj){if(obj==null)return 0;return isArrayLike(obj)?obj.length:_.keys(obj).length;};_.partition=function(obj,predicate,context){predicate=cb(predicate,context);var pass=[],fail=[];_.each(obj,function(value,key,obj){(predicate(value,key,obj)?pass:fail).push(value);});return[pass,fail];};_.first=_.head=_.take=function(array,n,guard){if(array==null)return void 0;if(n==null||guard)return array[0];return _.initial(array,array.length-n);};_.initial=function(array,n,guard){return slice.call(array,0,Math.max(0,array.length-(n==null||guard?1:n)));};_.last=function(array,n,guard){if(array==null)return void 0;if(n==null||guard)return array[array.length-1];return _.rest(array,Math.max(0,array.length-n));};_.rest=_.tail=_.drop=function(array,n,guard){return slice.call(array,n==null||guard?1:n);};_.compact=function(array){return _.filter(array,_.identity);};var flatten=function(input,shallow,strict,startIndex){var output=[],idx=0;for(var i=startIndex||0,length=input&&input.length;i<length;i++){var value=input[i];if(isArrayLike(value)&&(_.isArray(value)||_.isArguments(value))){if(!shallow)value=flatten(value,shallow,strict);var j=0,len=value.length;output.length+=len;while(j<len){output[idx++]=value[j++];}}else if(!strict){output[idx++]=value;}}
return output;};_.flatten=function(array,shallow){return flatten(array,shallow,false);};_.without=function(array){return _.difference(array,slice.call(arguments,1));};_.uniq=_.unique=function(array,isSorted,iteratee,context){if(array==null)return[];if(!_.isBoolean(isSorted)){context=iteratee;iteratee=isSorted;isSorted=false;}
if(iteratee!=null)iteratee=cb(iteratee,context);var result=[];var seen=[];for(var i=0,length=array.length;i<length;i++){var value=array[i],computed=iteratee?iteratee(value,i,array):value;if(isSorted){if(!i||seen!==computed)result.push(value);seen=computed;}else if(iteratee){if(!_.contains(seen,computed)){seen.push(computed);result.push(value);}}else if(!_.contains(result,value)){result.push(value);}}
return result;};_.union=function(){return _.uniq(flatten(arguments,true,true));};_.intersection=function(array){if(array==null)return[];var result=[];var argsLength=arguments.length;for(var i=0,length=array.length;i<length;i++){var item=array[i];if(_.contains(result,item))continue;for(var j=1;j<argsLength;j++){if(!_.contains(arguments[j],item))break;}
if(j===argsLength)result.push(item);}
return result;};_.difference=function(array){var rest=flatten(arguments,true,true,1);return _.filter(array,function(value){return!_.contains(rest,value);});};_.zip=function(){return _.unzip(arguments);};_.unzip=function(array){var length=array&&_.max(array,'length').length||0;var result=Array(length);for(var index=0;index<length;index++){result[index]=_.pluck(array,index);}
return result;};_.object=function(list,values){var result={};for(var i=0,length=list&&list.length;i<length;i++){if(values){result[list[i]]=values[i];}else{result[list[i][0]]=list[i][1];}}
return result;};_.indexOf=function(array,item,isSorted){var i=0,length=array&&array.length;if(typeof isSorted=='number'){i=isSorted<0?Math.max(0,length+isSorted):isSorted;}else if(isSorted&&length){i=_.sortedIndex(array,item);return array[i]===item?i:-1;}
if(item!==item){return _.findIndex(slice.call(array,i),_.isNaN);}
for(;i<length;i++)if(array[i]===item)return i;return-1;};_.lastIndexOf=function(array,item,from){var idx=array?array.length:0;if(typeof from=='number'){idx=from<0?idx+from+1:Math.min(idx,from+1);}
if(item!==item){return _.findLastIndex(slice.call(array,0,idx),_.isNaN);}
while(--idx>=0)if(array[idx]===item)return idx;return-1;};function createIndexFinder(dir){return function(array,predicate,context){predicate=cb(predicate,context);var length=array!=null&&array.length;var index=dir>0?0:length-1;for(;index>=0&&index<length;index+=dir){if(predicate(array[index],index,array))return index;}
return-1;};}
_.findIndex=createIndexFinder(1);_.findLastIndex=createIndexFinder(-1);_.sortedIndex=function(array,obj,iteratee,context){iteratee=cb(iteratee,context,1);var value=iteratee(obj);var low=0,high=array.length;while(low<high){var mid=Math.floor((low+high)/2);if(iteratee(array[mid])<value)low=mid+1;else high=mid;}
return low;};_.range=function(start,stop,step){if(arguments.length<=1){stop=start||0;start=0;}
step=step||1;var length=Math.max(Math.ceil((stop-start)/step),0);var range=Array(length);for(var idx=0;idx<length;idx++,start+=step){range[idx]=start;}
return range;};var executeBound=function(sourceFunc,boundFunc,context,callingContext,args){if(!(callingContext instanceof boundFunc))return sourceFunc.apply(context,args);var self=baseCreate(sourceFunc.prototype);var result=sourceFunc.apply(self,args);if(_.isObject(result))return result;return self;};_.bind=function(func,context){if(nativeBind&&func.bind===nativeBind)return nativeBind.apply(func,slice.call(arguments,1));if(!_.isFunction(func))throw new TypeError('Bind must be called on a function');var args=slice.call(arguments,2);var bound=function(){return executeBound(func,bound,context,this,args.concat(slice.call(arguments)));};return bound;};_.partial=function(func){var boundArgs=slice.call(arguments,1);var bound=function(){var position=0,length=boundArgs.length;var args=Array(length);for(var i=0;i<length;i++){args[i]=boundArgs[i]===_?arguments[position++]:boundArgs[i];}
while(position<arguments.length)args.push(arguments[position++]);return executeBound(func,bound,this,this,args);};return bound;};_.bindAll=function(obj){var i,length=arguments.length,key;if(length<=1)throw new Error('bindAll must be passed function names');for(i=1;i<length;i++){key=arguments[i];obj[key]=_.bind(obj[key],obj);}
return obj;};_.memoize=function(func,hasher){var memoize=function(key){var cache=memoize.cache;var address=''+(hasher?hasher.apply(this,arguments):key);if(!_.has(cache,address))cache[address]=func.apply(this,arguments);return cache[address];};memoize.cache={};return memoize;};_.delay=function(func,wait){var args=slice.call(arguments,2);return setTimeout(function(){return func.apply(null,args);},wait);};_.defer=_.partial(_.delay,_,1);_.throttle=function(func,wait,options){var context,args,result;var timeout=null;var previous=0;if(!options)options={};var later=function(){previous=options.leading===false?0:_.now();timeout=null;result=func.apply(context,args);if(!timeout)context=args=null;};return function(){var now=_.now();if(!previous&&options.leading===false)previous=now;var remaining=wait-(now-previous);context=this;args=arguments;if(remaining<=0||remaining>wait){if(timeout){clearTimeout(timeout);timeout=null;}
previous=now;result=func.apply(context,args);if(!timeout)context=args=null;}else if(!timeout&&options.trailing!==false){timeout=setTimeout(later,remaining);}
return result;};};_.debounce=function(func,wait,immediate){var timeout,args,context,timestamp,result;var later=function(){var last=_.now()-timestamp;if(last<wait&&last>=0){timeout=setTimeout(later,wait-last);}else{timeout=null;if(!immediate){result=func.apply(context,args);if(!timeout)context=args=null;}}};return function(){context=this;args=arguments;timestamp=_.now();var callNow=immediate&&!timeout;if(!timeout)timeout=setTimeout(later,wait);if(callNow){result=func.apply(context,args);context=args=null;}
return result;};};_.wrap=function(func,wrapper){return _.partial(wrapper,func);};_.negate=function(predicate){return function(){return!predicate.apply(this,arguments);};};_.compose=function(){var args=arguments;var start=args.length-1;return function(){var i=start;var result=args[start].apply(this,arguments);while(i--)result=args[i].call(this,result);return result;};};_.after=function(times,func){return function(){if(--times<1){return func.apply(this,arguments);}};};_.before=function(times,func){var memo;return function(){if(--times>0){memo=func.apply(this,arguments);}
if(times<=1)func=null;return memo;};};_.once=_.partial(_.before,2);var hasEnumBug=!{toString:null}.propertyIsEnumerable('toString');var nonEnumerableProps=['valueOf','isPrototypeOf','toString','propertyIsEnumerable','hasOwnProperty','toLocaleString'];function collectNonEnumProps(obj,keys){var nonEnumIdx=nonEnumerableProps.length;var constructor=obj.constructor;var proto=(_.isFunction(constructor)&&constructor.prototype)||ObjProto;var prop='constructor';if(_.has(obj,prop)&&!_.contains(keys,prop))keys.push(prop);while(nonEnumIdx--){prop=nonEnumerableProps[nonEnumIdx];if(prop in obj&&obj[prop]!==proto[prop]&&!_.contains(keys,prop)){keys.push(prop);}}}
_.keys=function(obj){if(!_.isObject(obj))return[];if(nativeKeys)return nativeKeys(obj);var keys=[];for(var key in obj)if(_.has(obj,key))keys.push(key);if(hasEnumBug)collectNonEnumProps(obj,keys);return keys;};_.allKeys=function(obj){if(!_.isObject(obj))return[];var keys=[];for(var key in obj)keys.push(key);if(hasEnumBug)collectNonEnumProps(obj,keys);return keys;};_.values=function(obj){var keys=_.keys(obj);var length=keys.length;var values=Array(length);for(var i=0;i<length;i++){values[i]=obj[keys[i]];}
return values;};_.mapObject=function(obj,iteratee,context){iteratee=cb(iteratee,context);var keys=_.keys(obj),length=keys.length,results={},currentKey;for(var index=0;index<length;index++){currentKey=keys[index];results[currentKey]=iteratee(obj[currentKey],currentKey,obj);}
return results;};_.pairs=function(obj){var keys=_.keys(obj);var length=keys.length;var pairs=Array(length);for(var i=0;i<length;i++){pairs[i]=[keys[i],obj[keys[i]]];}
return pairs;};_.invert=function(obj){var result={};var keys=_.keys(obj);for(var i=0,length=keys.length;i<length;i++){result[obj[keys[i]]]=keys[i];}
return result;};_.functions=_.methods=function(obj){var names=[];for(var key in obj){if(_.isFunction(obj[key]))names.push(key);}
return names.sort();};_.extend=createAssigner(_.allKeys);_.extendOwn=_.assign=createAssigner(_.keys);_.findKey=function(obj,predicate,context){predicate=cb(predicate,context);var keys=_.keys(obj),key;for(var i=0,length=keys.length;i<length;i++){key=keys[i];if(predicate(obj[key],key,obj))return key;}};_.pick=function(object,oiteratee,context){var result={},obj=object,iteratee,keys;if(obj==null)return result;if(_.isFunction(oiteratee)){keys=_.allKeys(obj);iteratee=optimizeCb(oiteratee,context);}else{keys=flatten(arguments,false,false,1);iteratee=function(value,key,obj){return key in obj;};obj=Object(obj);}
for(var i=0,length=keys.length;i<length;i++){var key=keys[i];var value=obj[key];if(iteratee(value,key,obj))result[key]=value;}
return result;};_.omit=function(obj,iteratee,context){if(_.isFunction(iteratee)){iteratee=_.negate(iteratee);}else{var keys=_.map(flatten(arguments,false,false,1),String);iteratee=function(value,key){return!_.contains(keys,key);};}
return _.pick(obj,iteratee,context);};_.defaults=createAssigner(_.allKeys,true);_.clone=function(obj){if(!_.isObject(obj))return obj;return _.isArray(obj)?obj.slice():_.extend({},obj);};_.tap=function(obj,interceptor){interceptor(obj);return obj;};_.isMatch=function(object,attrs){var keys=_.keys(attrs),length=keys.length;if(object==null)return!length;var obj=Object(object);for(var i=0;i<length;i++){var key=keys[i];if(attrs[key]!==obj[key]||!(key in obj))return false;}
return true;};var eq=function(a,b,aStack,bStack){if(a===b)return a!==0||1/a===1/b;if(a==null||b==null)return a===b;if(a instanceof _)a=a._wrapped;if(b instanceof _)b=b._wrapped;var className=toString.call(a);if(className!==toString.call(b))return false;switch(className){case'[object RegExp]':case'[object String]':return''+a===''+b;case'[object Number]':if(+a!==+a)return+b!==+b;return+a===0?1/+a===1/b:+a===+b;case'[object Date]':case'[object Boolean]':return+a===+b;}
var areArrays=className==='[object Array]';if(!areArrays){if(typeof a!='object'||typeof b!='object')return false;var aCtor=a.constructor,bCtor=b.constructor;if(aCtor!==bCtor&&!(_.isFunction(aCtor)&&aCtor instanceof aCtor&&_.isFunction(bCtor)&&bCtor instanceof bCtor)&&('constructor'in a&&'constructor'in b)){return false;}}
aStack=aStack||[];bStack=bStack||[];var length=aStack.length;while(length--){if(aStack[length]===a)return bStack[length]===b;}
aStack.push(a);bStack.push(b);if(areArrays){length=a.length;if(length!==b.length)return false;while(length--){if(!eq(a[length],b[length],aStack,bStack))return false;}}else{var keys=_.keys(a),key;length=keys.length;if(_.keys(b).length!==length)return false;while(length--){key=keys[length];if(!(_.has(b,key)&&eq(a[key],b[key],aStack,bStack)))return false;}}
aStack.pop();bStack.pop();return true;};_.isEqual=function(a,b){return eq(a,b);};_.isEmpty=function(obj){if(obj==null)return true;if(isArrayLike(obj)&&(_.isArray(obj)||_.isString(obj)||_.isArguments(obj)))return obj.length===0;return _.keys(obj).length===0;};_.isElement=function(obj){return!!(obj&&obj.nodeType===1);};_.isArray=nativeIsArray||function(obj){return toString.call(obj)==='[object Array]';};_.isObject=function(obj){var type=typeof obj;return type==='function'||type==='object'&&!!obj;};_.each(['Arguments','Function','String','Number','Date','RegExp','Error'],function(name){_['is'+name]=function(obj){return toString.call(obj)==='[object '+name+']';};});if(!_.isArguments(arguments)){_.isArguments=function(obj){return _.has(obj,'callee');};}
if(typeof/./!='function'&&typeof Int8Array!='object'){_.isFunction=function(obj){return typeof obj=='function'||false;};}
_.isFinite=function(obj){return isFinite(obj)&&!isNaN(parseFloat(obj));};_.isNaN=function(obj){return _.isNumber(obj)&&obj!==+obj;};_.isBoolean=function(obj){return obj===true||obj===false||toString.call(obj)==='[object Boolean]';};_.isNull=function(obj){return obj===null;};_.isUndefined=function(obj){return obj===void 0;};_.has=function(obj,key){return obj!=null&&hasOwnProperty.call(obj,key);};_.noConflict=function(){root._=previousUnderscore;return this;};_.identity=function(value){return value;};_.constant=function(value){return function(){return value;};};_.noop=function(){};_.property=function(key){return function(obj){return obj==null?void 0:obj[key];};};_.propertyOf=function(obj){return obj==null?function(){}:function(key){return obj[key];};};_.matcher=_.matches=function(attrs){attrs=_.extendOwn({},attrs);return function(obj){return _.isMatch(obj,attrs);};};_.times=function(n,iteratee,context){var accum=Array(Math.max(0,n));iteratee=optimizeCb(iteratee,context,1);for(var i=0;i<n;i++)accum[i]=iteratee(i);return accum;};_.random=function(min,max){if(max==null){max=min;min=0;}
return min+Math.floor(Math.random()*(max-min+1));};_.now=Date.now||function(){return new Date().getTime();};var escapeMap={'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#x27;','`':'&#x60;'};var unescapeMap=_.invert(escapeMap);var createEscaper=function(map){var escaper=function(match){return map[match];};var source='(?:'+_.keys(map).join('|')+')';var testRegexp=RegExp(source);var replaceRegexp=RegExp(source,'g');return function(string){string=string==null?'':''+string;return testRegexp.test(string)?string.replace(replaceRegexp,escaper):string;};};_.escape=createEscaper(escapeMap);_.unescape=createEscaper(unescapeMap);_.result=function(object,property,fallback){var value=object==null?void 0:object[property];if(value===void 0){value=fallback;}
return _.isFunction(value)?value.call(object):value;};var idCounter=0;_.uniqueId=function(prefix){var id=++idCounter+'';return prefix?prefix+id:id;};_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var noMatch=/(.)^/;var escapes={"'":"'",'\\':'\\','\r':'r','\n':'n','\u2028':'u2028','\u2029':'u2029'};var escaper=/\\|'|\r|\n|\u2028|\u2029/g;var escapeChar=function(match){return'\\'+escapes[match];};_.template=function(text,settings,oldSettings){if(!settings&&oldSettings)settings=oldSettings;settings=_.defaults({},settings,_.templateSettings);var matcher=RegExp([(settings.escape||noMatch).source,(settings.interpolate||noMatch).source,(settings.evaluate||noMatch).source].join('|')+'|$','g');var index=0;var source="__p+='";text.replace(matcher,function(match,escape,interpolate,evaluate,offset){source+=text.slice(index,offset).replace(escaper,escapeChar);index=offset+match.length;if(escape){source+="'+\n((__t=("+escape+"))==null?'':_.escape(__t))+\n'";}else if(interpolate){source+="'+\n((__t=("+interpolate+"))==null?'':__t)+\n'";}else if(evaluate){source+="';\n"+evaluate+"\n__p+='";}
return match;});source+="';\n";if(!settings.variable)source='with(obj||{}){\n'+source+'}\n';source="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+
source+'return __p;\n';try{var render=new Function(settings.variable||'obj','_',source);}catch(e){e.source=source;throw e;}
var template=function(data){return render.call(this,data,_);};var argument=settings.variable||'obj';template.source='function('+argument+'){\n'+source+'}';return template;};_.chain=function(obj){var instance=_(obj);instance._chain=true;return instance;};var result=function(instance,obj){return instance._chain?_(obj).chain():obj;};_.mixin=function(obj){_.each(_.functions(obj),function(name){var func=_[name]=obj[name];_.prototype[name]=function(){var args=[this._wrapped];push.apply(args,arguments);return result(this,func.apply(_,args));};});};_.mixin(_);_.each(['pop','push','reverse','shift','sort','splice','unshift'],function(name){var method=ArrayProto[name];_.prototype[name]=function(){var obj=this._wrapped;method.apply(obj,arguments);if((name==='shift'||name==='splice')&&obj.length===0)delete obj[0];return result(this,obj);};});_.each(['concat','join','slice'],function(name){var method=ArrayProto[name];_.prototype[name]=function(){return result(this,method.apply(this._wrapped,arguments));};});_.prototype.value=function(){return this._wrapped;};_.prototype.valueOf=_.prototype.toJSON=_.prototype.value;_.prototype.toString=function(){return''+this._wrapped;};if(typeof define==='function'&&define.amd){define('underscore',[],function(){return _;});}}.call(this));;

/* /web/static/lib/underscore.string/lib/underscore.string.js defined in bundle 'web.assets_common' */
!function(root,String){'use strict';var nativeTrim=String.prototype.trim;var nativeTrimRight=String.prototype.trimRight;var nativeTrimLeft=String.prototype.trimLeft;var parseNumber=function(source){return source*1||0;};var strRepeat=function(str,qty){if(qty<1)return'';var result='';while(qty>0){if(qty&1)result+=str;qty>>=1,str+=str;}
return result;};var slice=[].slice;var defaultToWhiteSpace=function(characters){if(characters==null)
return'\\s';else if(characters.source)
return characters.source;else
return'['+_s.escapeRegExp(characters)+']';};function boolMatch(s,matchers){var i,matcher,down=s.toLowerCase();matchers=[].concat(matchers);for(i=0;i<matchers.length;i+=1){matcher=matchers[i];if(!matcher)continue;if(matcher.test&&matcher.test(s))return true;if(matcher.toLowerCase()===down)return true;}}
var escapeChars={lt:'<',gt:'>',quot:'"',amp:'&',apos:"'"};var reversedEscapeChars={};for(var key in escapeChars)reversedEscapeChars[escapeChars[key]]=key;reversedEscapeChars["'"]='#39';var sprintf=(function(){function get_type(variable){return Object.prototype.toString.call(variable).slice(8,-1).toLowerCase();}
var str_repeat=strRepeat;var str_format=function(){if(!str_format.cache.hasOwnProperty(arguments[0])){str_format.cache[arguments[0]]=str_format.parse(arguments[0]);}
return str_format.format.call(null,str_format.cache[arguments[0]],arguments);};str_format.format=function(parse_tree,argv){var cursor=1,tree_length=parse_tree.length,node_type='',arg,output=[],i,k,match,pad,pad_character,pad_length;for(i=0;i<tree_length;i++){node_type=get_type(parse_tree[i]);if(node_type==='string'){output.push(parse_tree[i]);}
else if(node_type==='array'){match=parse_tree[i];if(match[2]){arg=argv[cursor];for(k=0;k<match[2].length;k++){if(!arg.hasOwnProperty(match[2][k])){throw new Error(sprintf('[_.sprintf] property "%s" does not exist',match[2][k]));}
arg=arg[match[2][k]];}}else if(match[1]){arg=argv[match[1]];}
else{arg=argv[cursor++];}
if(/[^s]/.test(match[8])&&(get_type(arg)!='number')){throw new Error(sprintf('[_.sprintf] expecting number but found %s',get_type(arg)));}
switch(match[8]){case'b':arg=arg.toString(2);break;case'c':arg=String.fromCharCode(arg);break;case'd':arg=parseInt(arg,10);break;case'e':arg=match[7]?arg.toExponential(match[7]):arg.toExponential();break;case'f':arg=match[7]?parseFloat(arg).toFixed(match[7]):parseFloat(arg);break;case'o':arg=arg.toString(8);break;case's':arg=((arg=String(arg))&&match[7]?arg.substring(0,match[7]):arg);break;case'u':arg=Math.abs(arg);break;case'x':arg=arg.toString(16);break;case'X':arg=arg.toString(16).toUpperCase();break;}
arg=(/[def]/.test(match[8])&&match[3]&&arg>=0?'+'+arg:arg);pad_character=match[4]?match[4]=='0'?'0':match[4].charAt(1):' ';pad_length=match[6]-String(arg).length;pad=match[6]?str_repeat(pad_character,pad_length):'';output.push(match[5]?arg+pad:pad+arg);}}
return output.join('');};str_format.cache={};str_format.parse=function(fmt){var _fmt=fmt,match=[],parse_tree=[],arg_names=0;while(_fmt){if((match=/^[^\x25]+/.exec(_fmt))!==null){parse_tree.push(match[0]);}
else if((match=/^\x25{2}/.exec(_fmt))!==null){parse_tree.push('%');}
else if((match=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt))!==null){if(match[2]){arg_names|=1;var field_list=[],replacement_field=match[2],field_match=[];if((field_match=/^([a-z_][a-z_\d]*)/i.exec(replacement_field))!==null){field_list.push(field_match[1]);while((replacement_field=replacement_field.substring(field_match[0].length))!==''){if((field_match=/^\.([a-z_][a-z_\d]*)/i.exec(replacement_field))!==null){field_list.push(field_match[1]);}
else if((field_match=/^\[(\d+)\]/.exec(replacement_field))!==null){field_list.push(field_match[1]);}
else{throw new Error('[_.sprintf] huh?');}}}
else{throw new Error('[_.sprintf] huh?');}
match[2]=field_list;}
else{arg_names|=2;}
if(arg_names===3){throw new Error('[_.sprintf] mixing positional and named placeholders is not (yet) supported');}
parse_tree.push(match);}
else{throw new Error('[_.sprintf] huh?');}
_fmt=_fmt.substring(match[0].length);}
return parse_tree;};return str_format;})();var _s={VERSION:'2.3.0',isBlank:function(str){if(str==null)str='';return(/^\s*$/).test(str);},stripTags:function(str){if(str==null)return'';return String(str).replace(/<\/?[^>]+>/g,'');},capitalize:function(str){str=str==null?'':String(str);return str.charAt(0).toUpperCase()+str.slice(1);},chop:function(str,step){if(str==null)return[];str=String(str);step=~~step;return step>0?str.match(new RegExp('.{1,'+step+'}','g')):[str];},clean:function(str){return _s.strip(str).replace(/\s+/g,' ');},count:function(str,substr){if(str==null||substr==null)return 0;str=String(str);substr=String(substr);var count=0,pos=0,length=substr.length;while(true){pos=str.indexOf(substr,pos);if(pos===-1)break;count++;pos+=length;}
return count;},chars:function(str){if(str==null)return[];return String(str).split('');},swapCase:function(str){if(str==null)return'';return String(str).replace(/\S/g,function(c){return c===c.toUpperCase()?c.toLowerCase():c.toUpperCase();});},escapeHTML:function(str){if(str==null)return'';return String(str).replace(/[&<>"']/g,function(m){return'&'+reversedEscapeChars[m]+';';});},unescapeHTML:function(str){if(str==null)return'';return String(str).replace(/\&([^;]+);/g,function(entity,entityCode){var match;if(entityCode in escapeChars){return escapeChars[entityCode];}else if(match=entityCode.match(/^#x([\da-fA-F]+)$/)){return String.fromCharCode(parseInt(match[1],16));}else if(match=entityCode.match(/^#(\d+)$/)){return String.fromCharCode(~~match[1]);}else{return entity;}});},escapeRegExp:function(str){if(str==null)return'';return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g,'\\$1');},splice:function(str,i,howmany,substr){var arr=_s.chars(str);arr.splice(~~i,~~howmany,substr);return arr.join('');},insert:function(str,i,substr){return _s.splice(str,i,0,substr);},include:function(str,needle){if(needle==='')return true;if(str==null)return false;return String(str).indexOf(needle)!==-1;},join:function(){var args=slice.call(arguments),separator=args.shift();if(separator==null)separator='';return args.join(separator);},lines:function(str){if(str==null)return[];return String(str).split("\n");},reverse:function(str){return _s.chars(str).reverse().join('');},startsWith:function(str,starts){if(starts==='')return true;if(str==null||starts==null)return false;str=String(str);starts=String(starts);return str.length>=starts.length&&str.slice(0,starts.length)===starts;},endsWith:function(str,ends){if(ends==='')return true;if(str==null||ends==null)return false;str=String(str);ends=String(ends);return str.length>=ends.length&&str.slice(str.length-ends.length)===ends;},succ:function(str){if(str==null)return'';str=String(str);return str.slice(0,-1)+String.fromCharCode(str.charCodeAt(str.length-1)+1);},titleize:function(str){if(str==null)return'';str=String(str).toLowerCase();return str.replace(/(?:^|\s|-)\S/g,function(c){return c.toUpperCase();});},camelize:function(str){return _s.trim(str).replace(/[-_\s]+(.)?/g,function(match,c){return c?c.toUpperCase():"";});},underscored:function(str){return _s.trim(str).replace(/([a-z\d])([A-Z]+)/g,'$1_$2').replace(/[-\s]+/g,'_').toLowerCase();},dasherize:function(str){return _s.trim(str).replace(/([A-Z])/g,'-$1').replace(/[-_\s]+/g,'-').toLowerCase();},classify:function(str){return _s.titleize(String(str).replace(/[\W_]/g,' ')).replace(/\s/g,'');},humanize:function(str){return _s.capitalize(_s.underscored(str).replace(/_id$/,'').replace(/_/g,' '));},trim:function(str,characters){if(str==null)return'';if(!characters&&nativeTrim)return nativeTrim.call(str);characters=defaultToWhiteSpace(characters);return String(str).replace(new RegExp('\^'+characters+'+|'+characters+'+$','g'),'');},ltrim:function(str,characters){if(str==null)return'';if(!characters&&nativeTrimLeft)return nativeTrimLeft.call(str);characters=defaultToWhiteSpace(characters);return String(str).replace(new RegExp('^'+characters+'+'),'');},rtrim:function(str,characters){if(str==null)return'';if(!characters&&nativeTrimRight)return nativeTrimRight.call(str);characters=defaultToWhiteSpace(characters);return String(str).replace(new RegExp(characters+'+$'),'');},truncate:function(str,length,truncateStr){if(str==null)return'';str=String(str);truncateStr=truncateStr||'...';length=~~length;return str.length>length?str.slice(0,length)+truncateStr:str;},prune:function(str,length,pruneStr){if(str==null)return'';str=String(str);length=~~length;pruneStr=pruneStr!=null?String(pruneStr):'...';if(str.length<=length)return str;var tmpl=function(c){return c.toUpperCase()!==c.toLowerCase()?'A':' ';},template=str.slice(0,length+1).replace(/.(?=\W*\w*$)/g,tmpl);if(template.slice(template.length-2).match(/\w\w/))
template=template.replace(/\s*\S+$/,'');else
template=_s.rtrim(template.slice(0,template.length-1));return(template+pruneStr).length>str.length?str:str.slice(0,template.length)+pruneStr;},words:function(str,delimiter){if(_s.isBlank(str))return[];return _s.trim(str,delimiter).split(delimiter||/\s+/);},pad:function(str,length,padStr,type){str=str==null?'':String(str);length=~~length;var padlen=0;if(!padStr)
padStr=' ';else if(padStr.length>1)
padStr=padStr.charAt(0);switch(type){case'right':padlen=length-str.length;return str+strRepeat(padStr,padlen);case'both':padlen=length-str.length;return strRepeat(padStr,Math.ceil(padlen/2))+str
+strRepeat(padStr,Math.floor(padlen/2));default:padlen=length-str.length;return strRepeat(padStr,padlen)+str;}},lpad:function(str,length,padStr){return _s.pad(str,length,padStr);},rpad:function(str,length,padStr){return _s.pad(str,length,padStr,'right');},lrpad:function(str,length,padStr){return _s.pad(str,length,padStr,'both');},sprintf:sprintf,vsprintf:function(fmt,argv){argv.unshift(fmt);return sprintf.apply(null,argv);},toNumber:function(str,decimals){if(!str)return 0;str=_s.trim(str);if(!str.match(/^-?\d+(?:\.\d+)?$/))return NaN;return parseNumber(parseNumber(str).toFixed(~~decimals));},numberFormat:function(number,dec,dsep,tsep){if(isNaN(number)||number==null)return'';number=number.toFixed(~~dec);tsep=typeof tsep=='string'?tsep:',';var parts=number.split('.'),fnums=parts[0],decimals=parts[1]?(dsep||'.')+parts[1]:'';return fnums.replace(/(\d)(?=(?:\d{3})+$)/g,'$1'+tsep)+decimals;},strRight:function(str,sep){if(str==null)return'';str=String(str);sep=sep!=null?String(sep):sep;var pos=!sep?-1:str.indexOf(sep);return~pos?str.slice(pos+sep.length,str.length):str;},strRightBack:function(str,sep){if(str==null)return'';str=String(str);sep=sep!=null?String(sep):sep;var pos=!sep?-1:str.lastIndexOf(sep);return~pos?str.slice(pos+sep.length,str.length):str;},strLeft:function(str,sep){if(str==null)return'';str=String(str);sep=sep!=null?String(sep):sep;var pos=!sep?-1:str.indexOf(sep);return~pos?str.slice(0,pos):str;},strLeftBack:function(str,sep){if(str==null)return'';str+='';sep=sep!=null?''+sep:sep;var pos=str.lastIndexOf(sep);return~pos?str.slice(0,pos):str;},toSentence:function(array,separator,lastSeparator,serial){separator=separator||', ';lastSeparator=lastSeparator||' and ';var a=array.slice(),lastMember=a.pop();if(array.length>2&&serial)lastSeparator=_s.rtrim(separator)+lastSeparator;return a.length?a.join(separator)+lastSeparator+lastMember:lastMember;},toSentenceSerial:function(){var args=slice.call(arguments);args[3]=true;return _s.toSentence.apply(_s,args);},slugify:function(str){if(str==null)return'';var from="ąàáäâãåæăćęèéëêìíïîłńòóöôõøśșțùúüûñçżź",to="aaaaaaaaaceeeeeiiiilnoooooosstuuuunczz",regex=new RegExp(defaultToWhiteSpace(from),'g');str=String(str).toLowerCase().replace(regex,function(c){var index=from.indexOf(c);return to.charAt(index)||'-';});return _s.dasherize(str.replace(/[^\w\s-]/g,''));},surround:function(str,wrapper){return[wrapper,str,wrapper].join('');},quote:function(str,quoteChar){return _s.surround(str,quoteChar||'"');},unquote:function(str,quoteChar){quoteChar=quoteChar||'"';if(str[0]===quoteChar&&str[str.length-1]===quoteChar)
return str.slice(1,str.length-1);else return str;},exports:function(){var result={};for(var prop in this){if(!this.hasOwnProperty(prop)||prop.match(/^(?:include|contains|reverse)$/))continue;result[prop]=this[prop];}
return result;},repeat:function(str,qty,separator){if(str==null)return'';qty=~~qty;if(separator==null)return strRepeat(String(str),qty);for(var repeat=[];qty>0;repeat[--qty]=str){}
return repeat.join(separator);},naturalCmp:function(str1,str2){if(str1==str2)return 0;if(!str1)return-1;if(!str2)return 1;var cmpRegex=/(\.\d+)|(\d+)|(\D+)/g,tokens1=String(str1).toLowerCase().match(cmpRegex),tokens2=String(str2).toLowerCase().match(cmpRegex),count=Math.min(tokens1.length,tokens2.length);for(var i=0;i<count;i++){var a=tokens1[i],b=tokens2[i];if(a!==b){var num1=parseInt(a,10);if(!isNaN(num1)){var num2=parseInt(b,10);if(!isNaN(num2)&&num1-num2)
return num1-num2;}
return a<b?-1:1;}}
if(tokens1.length===tokens2.length)
return tokens1.length-tokens2.length;return str1<str2?-1:1;},levenshtein:function(str1,str2){if(str1==null&&str2==null)return 0;if(str1==null)return String(str2).length;if(str2==null)return String(str1).length;str1=String(str1);str2=String(str2);var current=[],prev,value;for(var i=0;i<=str2.length;i++)
for(var j=0;j<=str1.length;j++){if(i&&j)
if(str1.charAt(j-1)===str2.charAt(i-1))
value=prev;else
value=Math.min(current[j],current[j-1],prev)+1;else
value=i+j;prev=current[j];current[j]=value;}
return current.pop();},toBoolean:function(str,trueValues,falseValues){if(typeof str==="number")str=""+str;if(typeof str!=="string")return!!str;str=_s.trim(str);if(boolMatch(str,trueValues||["true","1"]))return true;if(boolMatch(str,falseValues||["false","0"]))return false;}};_s.strip=_s.trim;_s.lstrip=_s.ltrim;_s.rstrip=_s.rtrim;_s.center=_s.lrpad;_s.rjust=_s.lpad;_s.ljust=_s.rpad;_s.contains=_s.include;_s.q=_s.quote;_s.toBool=_s.toBoolean;if(typeof exports!=='undefined'){if(typeof module!=='undefined'&&module.exports)
module.exports=_s;exports._s=_s;}
if(typeof define==='function'&&define.amd)
define('underscore.string',[],function(){return _s;});root._=root._||{};root._.string=root._.str=_s;}(this,String);;

/* /web/static/lib/moment/moment.js defined in bundle 'web.assets_common' */
;(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):global.moment=factory()}(this,(function(){'use strict';var hookCallback;function hooks(){return hookCallback.apply(null,arguments);}
function setHookCallback(callback){hookCallback=callback;}
function isArray(input){return input instanceof Array||Object.prototype.toString.call(input)==='[object Array]';}
function isObject(input){return input!=null&&Object.prototype.toString.call(input)==='[object Object]';}
function isObjectEmpty(obj){var k;for(k in obj){return false;}
return true;}
function isNumber(input){return typeof input==='number'||Object.prototype.toString.call(input)==='[object Number]';}
function isDate(input){return input instanceof Date||Object.prototype.toString.call(input)==='[object Date]';}
function map(arr,fn){var res=[],i;for(i=0;i<arr.length;++i){res.push(fn(arr[i],i));}
return res;}
function hasOwnProp(a,b){return Object.prototype.hasOwnProperty.call(a,b);}
function extend(a,b){for(var i in b){if(hasOwnProp(b,i)){a[i]=b[i];}}
if(hasOwnProp(b,'toString')){a.toString=b.toString;}
if(hasOwnProp(b,'valueOf')){a.valueOf=b.valueOf;}
return a;}
function createUTC(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,true).utc();}
function defaultParsingFlags(){return{empty:false,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:false,invalidMonth:null,invalidFormat:false,userInvalidated:false,iso:false,parsedDateParts:[],meridiem:null};}
function getParsingFlags(m){if(m._pf==null){m._pf=defaultParsingFlags();}
return m._pf;}
var some;if(Array.prototype.some){some=Array.prototype.some;}else{some=function(fun){var t=Object(this);var len=t.length>>>0;for(var i=0;i<len;i++){if(i in t&&fun.call(this,t[i],i,t)){return true;}}
return false;};}
var some$1=some;function isValid(m){if(m._isValid==null){var flags=getParsingFlags(m);var parsedParts=some$1.call(flags.parsedDateParts,function(i){return i!=null;});var isNowValid=!isNaN(m._d.getTime())&&flags.overflow<0&&!flags.empty&&!flags.invalidMonth&&!flags.invalidWeekday&&!flags.nullInput&&!flags.invalidFormat&&!flags.userInvalidated&&(!flags.meridiem||(flags.meridiem&&parsedParts));if(m._strict){isNowValid=isNowValid&&flags.charsLeftOver===0&&flags.unusedTokens.length===0&&flags.bigHour===undefined;}
if(Object.isFrozen==null||!Object.isFrozen(m)){m._isValid=isNowValid;}
else{return isNowValid;}}
return m._isValid;}
function createInvalid(flags){var m=createUTC(NaN);if(flags!=null){extend(getParsingFlags(m),flags);}
else{getParsingFlags(m).userInvalidated=true;}
return m;}
function isUndefined(input){return input===void 0;}
var momentProperties=hooks.momentProperties=[];function copyConfig(to,from){var i,prop,val;if(!isUndefined(from._isAMomentObject)){to._isAMomentObject=from._isAMomentObject;}
if(!isUndefined(from._i)){to._i=from._i;}
if(!isUndefined(from._f)){to._f=from._f;}
if(!isUndefined(from._l)){to._l=from._l;}
if(!isUndefined(from._strict)){to._strict=from._strict;}
if(!isUndefined(from._tzm)){to._tzm=from._tzm;}
if(!isUndefined(from._isUTC)){to._isUTC=from._isUTC;}
if(!isUndefined(from._offset)){to._offset=from._offset;}
if(!isUndefined(from._pf)){to._pf=getParsingFlags(from);}
if(!isUndefined(from._locale)){to._locale=from._locale;}
if(momentProperties.length>0){for(i in momentProperties){prop=momentProperties[i];val=from[prop];if(!isUndefined(val)){to[prop]=val;}}}
return to;}
var updateInProgress=false;function Moment(config){copyConfig(this,config);this._d=new Date(config._d!=null?config._d.getTime():NaN);if(!this.isValid()){this._d=new Date(NaN);}
if(updateInProgress===false){updateInProgress=true;hooks.updateOffset(this);updateInProgress=false;}}
function isMoment(obj){return obj instanceof Moment||(obj!=null&&obj._isAMomentObject!=null);}
function absFloor(number){if(number<0){return Math.ceil(number)||0;}else{return Math.floor(number);}}
function toInt(argumentForCoercion){var coercedNumber=+argumentForCoercion,value=0;if(coercedNumber!==0&&isFinite(coercedNumber)){value=absFloor(coercedNumber);}
return value;}
function compareArrays(array1,array2,dontConvert){var len=Math.min(array1.length,array2.length),lengthDiff=Math.abs(array1.length-array2.length),diffs=0,i;for(i=0;i<len;i++){if((dontConvert&&array1[i]!==array2[i])||(!dontConvert&&toInt(array1[i])!==toInt(array2[i]))){diffs++;}}
return diffs+lengthDiff;}
function warn(msg){if(hooks.suppressDeprecationWarnings===false&&(typeof console!=='undefined')&&console.warn){console.warn('Deprecation warning: '+msg);}}
function deprecate(msg,fn){var firstTime=true;return extend(function(){if(hooks.deprecationHandler!=null){hooks.deprecationHandler(null,msg);}
if(firstTime){var args=[];var arg;for(var i=0;i<arguments.length;i++){arg='';if(typeof arguments[i]==='object'){arg+='\n['+i+'] ';for(var key in arguments[0]){arg+=key+': '+arguments[0][key]+', ';}
arg=arg.slice(0,-2);}else{arg=arguments[i];}
args.push(arg);}
warn(msg+'\nArguments: '+Array.prototype.slice.call(args).join('')+'\n'+(new Error()).stack);firstTime=false;}
return fn.apply(this,arguments);},fn);}
var deprecations={};function deprecateSimple(name,msg){if(hooks.deprecationHandler!=null){hooks.deprecationHandler(name,msg);}
if(!deprecations[name]){warn(msg);deprecations[name]=true;}}
hooks.suppressDeprecationWarnings=false;hooks.deprecationHandler=null;function isFunction(input){return input instanceof Function||Object.prototype.toString.call(input)==='[object Function]';}
function set(config){var prop,i;for(i in config){prop=config[i];if(isFunction(prop)){this[i]=prop;}else{this['_'+i]=prop;}}
this._config=config;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+'|'+(/\d{1,2}/).source);}
function mergeConfigs(parentConfig,childConfig){var res=extend({},parentConfig),prop;for(prop in childConfig){if(hasOwnProp(childConfig,prop)){if(isObject(parentConfig[prop])&&isObject(childConfig[prop])){res[prop]={};extend(res[prop],parentConfig[prop]);extend(res[prop],childConfig[prop]);}else if(childConfig[prop]!=null){res[prop]=childConfig[prop];}else{delete res[prop];}}}
for(prop in parentConfig){if(hasOwnProp(parentConfig,prop)&&!hasOwnProp(childConfig,prop)&&isObject(parentConfig[prop])){res[prop]=extend({},res[prop]);}}
return res;}
function Locale(config){if(config!=null){this.set(config);}}
var keys;if(Object.keys){keys=Object.keys;}else{keys=function(obj){var i,res=[];for(i in obj){if(hasOwnProp(obj,i)){res.push(i);}}
return res;};}
var keys$1=keys;var defaultCalendar={sameDay:'[Today at] LT',nextDay:'[Tomorrow at] LT',nextWeek:'dddd [at] LT',lastDay:'[Yesterday at] LT',lastWeek:'[Last] dddd [at] LT',sameElse:'L'};function calendar(key,mom,now){var output=this._calendar[key]||this._calendar['sameElse'];return isFunction(output)?output.call(mom,now):output;}
var defaultLongDateFormat={LTS:'h:mm:ss A',LT:'h:mm A',L:'MM/DD/YYYY',LL:'MMMM D, YYYY',LLL:'MMMM D, YYYY h:mm A',LLLL:'dddd, MMMM D, YYYY h:mm A'};function longDateFormat(key){var format=this._longDateFormat[key],formatUpper=this._longDateFormat[key.toUpperCase()];if(format||!formatUpper){return format;}
this._longDateFormat[key]=formatUpper.replace(/MMMM|MM|DD|dddd/g,function(val){return val.slice(1);});return this._longDateFormat[key];}
var defaultInvalidDate='Invalid date';function invalidDate(){return this._invalidDate;}
var defaultOrdinal='%d';var defaultOrdinalParse=/\d{1,2}/;function ordinal(number){return this._ordinal.replace('%d',number);}
var defaultRelativeTime={future:'in %s',past:'%s ago',s:'a few seconds',m:'a minute',mm:'%d minutes',h:'an hour',hh:'%d hours',d:'a day',dd:'%d days',M:'a month',MM:'%d months',y:'a year',yy:'%d years'};function relativeTime(number,withoutSuffix,string,isFuture){var output=this._relativeTime[string];return(isFunction(output))?output(number,withoutSuffix,string,isFuture):output.replace(/%d/i,number);}
function pastFuture(diff,output){var format=this._relativeTime[diff>0?'future':'past'];return isFunction(format)?format(output):format.replace(/%s/i,output);}
var aliases={};function addUnitAlias(unit,shorthand){var lowerCase=unit.toLowerCase();aliases[lowerCase]=aliases[lowerCase+'s']=aliases[shorthand]=unit;}
function normalizeUnits(units){return typeof units==='string'?aliases[units]||aliases[units.toLowerCase()]:undefined;}
function normalizeObjectUnits(inputObject){var normalizedInput={},normalizedProp,prop;for(prop in inputObject){if(hasOwnProp(inputObject,prop)){normalizedProp=normalizeUnits(prop);if(normalizedProp){normalizedInput[normalizedProp]=inputObject[prop];}}}
return normalizedInput;}
var priorities={};function addUnitPriority(unit,priority){priorities[unit]=priority;}
function getPrioritizedUnits(unitsObj){var units=[];for(var u in unitsObj){units.push({unit:u,priority:priorities[u]});}
units.sort(function(a,b){return a.priority-b.priority;});return units;}
function makeGetSet(unit,keepTime){return function(value){if(value!=null){set$1(this,unit,value);hooks.updateOffset(this,keepTime);return this;}else{return get(this,unit);}};}
function get(mom,unit){return mom.isValid()?mom._d['get'+(mom._isUTC?'UTC':'')+unit]():NaN;}
function set$1(mom,unit,value){if(mom.isValid()){mom._d['set'+(mom._isUTC?'UTC':'')+unit](value);}}
function stringGet(units){units=normalizeUnits(units);if(isFunction(this[units])){return this[units]();}
return this;}
function stringSet(units,value){if(typeof units==='object'){units=normalizeObjectUnits(units);var prioritized=getPrioritizedUnits(units);for(var i=0;i<prioritized.length;i++){this[prioritized[i].unit](units[prioritized[i].unit]);}}else{units=normalizeUnits(units);if(isFunction(this[units])){return this[units](value);}}
return this;}
function zeroFill(number,targetLength,forceSign){var absNumber=''+Math.abs(number),zerosToFill=targetLength-absNumber.length,sign=number>=0;return(sign?(forceSign?'+':''):'-')+
Math.pow(10,Math.max(0,zerosToFill)).toString().substr(1)+absNumber;}
var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;var localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;var formatFunctions={};var formatTokenFunctions={};function addFormatToken(token,padded,ordinal,callback){var func=callback;if(typeof callback==='string'){func=function(){return this[callback]();};}
if(token){formatTokenFunctions[token]=func;}
if(padded){formatTokenFunctions[padded[0]]=function(){return zeroFill(func.apply(this,arguments),padded[1],padded[2]);};}
if(ordinal){formatTokenFunctions[ordinal]=function(){return this.localeData().ordinal(func.apply(this,arguments),token);};}}
function removeFormattingTokens(input){if(input.match(/\[[\s\S]/)){return input.replace(/^\[|\]$/g,'');}
return input.replace(/\\/g,'');}
function makeFormatFunction(format){var array=format.match(formattingTokens),i,length;for(i=0,length=array.length;i<length;i++){if(formatTokenFunctions[array[i]]){array[i]=formatTokenFunctions[array[i]];}else{array[i]=removeFormattingTokens(array[i]);}}
return function(mom){var output='',i;for(i=0;i<length;i++){output+=array[i]instanceof Function?array[i].call(mom,format):array[i];}
return output;};}
function formatMoment(m,format){if(!m.isValid()){return m.localeData().invalidDate();}
format=expandFormat(format,m.localeData());formatFunctions[format]=formatFunctions[format]||makeFormatFunction(format);return formatFunctions[format](m);}
function expandFormat(format,locale){var i=5;function replaceLongDateFormatTokens(input){return locale.longDateFormat(input)||input;}
localFormattingTokens.lastIndex=0;while(i>=0&&localFormattingTokens.test(format)){format=format.replace(localFormattingTokens,replaceLongDateFormatTokens);localFormattingTokens.lastIndex=0;i-=1;}
return format;}
var match1=/\d/;var match2=/\d\d/;var match3=/\d{3}/;var match4=/\d{4}/;var match6=/[+-]?\d{6}/;var match1to2=/\d\d?/;var match3to4=/\d\d\d\d?/;var match5to6=/\d\d\d\d\d\d?/;var match1to3=/\d{1,3}/;var match1to4=/\d{1,4}/;var match1to6=/[+-]?\d{1,6}/;var matchUnsigned=/\d+/;var matchSigned=/[+-]?\d+/;var matchOffset=/Z|[+-]\d\d:?\d\d/gi;var matchShortOffset=/Z|[+-]\d\d(?::?\d\d)?/gi;var matchTimestamp=/[+-]?\d+(\.\d{1,3})?/;var matchWord=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;var regexes={};function addRegexToken(token,regex,strictRegex){regexes[token]=isFunction(regex)?regex:function(isStrict,localeData){return(isStrict&&strictRegex)?strictRegex:regex;};}
function getParseRegexForToken(token,config){if(!hasOwnProp(regexes,token)){return new RegExp(unescapeFormat(token));}
return regexes[token](config._strict,config._locale);}
function unescapeFormat(s){return regexEscape(s.replace('\\','').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(matched,p1,p2,p3,p4){return p1||p2||p3||p4;}));}
function regexEscape(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,'\\$&');}
var tokens={};function addParseToken(token,callback){var i,func=callback;if(typeof token==='string'){token=[token];}
if(isNumber(callback)){func=function(input,array){array[callback]=toInt(input);};}
for(i=0;i<token.length;i++){tokens[token[i]]=func;}}
function addWeekParseToken(token,callback){addParseToken(token,function(input,array,config,token){config._w=config._w||{};callback(input,config._w,config,token);});}
function addTimeToArrayFromToken(token,input,config){if(input!=null&&hasOwnProp(tokens,token)){tokens[token](input,config._a,config,token);}}
var YEAR=0;var MONTH=1;var DATE=2;var HOUR=3;var MINUTE=4;var SECOND=5;var MILLISECOND=6;var WEEK=7;var WEEKDAY=8;var indexOf;if(Array.prototype.indexOf){indexOf=Array.prototype.indexOf;}else{indexOf=function(o){var i;for(i=0;i<this.length;++i){if(this[i]===o){return i;}}
return-1;};}
var indexOf$1=indexOf;function daysInMonth(year,month){return new Date(Date.UTC(year,month+1,0)).getUTCDate();}
addFormatToken('M',['MM',2],'Mo',function(){return this.month()+1;});addFormatToken('MMM',0,0,function(format){return this.localeData().monthsShort(this,format);});addFormatToken('MMMM',0,0,function(format){return this.localeData().months(this,format);});addUnitAlias('month','M');addUnitPriority('month',8);addRegexToken('M',match1to2);addRegexToken('MM',match1to2,match2);addRegexToken('MMM',function(isStrict,locale){return locale.monthsShortRegex(isStrict);});addRegexToken('MMMM',function(isStrict,locale){return locale.monthsRegex(isStrict);});addParseToken(['M','MM'],function(input,array){array[MONTH]=toInt(input)-1;});addParseToken(['MMM','MMMM'],function(input,array,config,token){var month=config._locale.monthsParse(input,token,config._strict);if(month!=null){array[MONTH]=month;}else{getParsingFlags(config).invalidMonth=input;}});var MONTHS_IN_FORMAT=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;var defaultLocaleMonths='January_February_March_April_May_June_July_August_September_October_November_December'.split('_');function localeMonths(m,format){if(!m){return this._months;}
return isArray(this._months)?this._months[m.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT).test(format)?'format':'standalone'][m.month()];}
var defaultLocaleMonthsShort='Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');function localeMonthsShort(m,format){if(!m){return this._monthsShort;}
return isArray(this._monthsShort)?this._monthsShort[m.month()]:this._monthsShort[MONTHS_IN_FORMAT.test(format)?'format':'standalone'][m.month()];}
function handleStrictParse(monthName,format,strict){var i,ii,mom,llc=monthName.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[];for(i=0;i<12;++i){mom=createUTC([2000,i]);this._shortMonthsParse[i]=this.monthsShort(mom,'').toLocaleLowerCase();this._longMonthsParse[i]=this.months(mom,'').toLocaleLowerCase();}}
if(strict){if(format==='MMM'){ii=indexOf$1.call(this._shortMonthsParse,llc);return ii!==-1?ii:null;}else{ii=indexOf$1.call(this._longMonthsParse,llc);return ii!==-1?ii:null;}}else{if(format==='MMM'){ii=indexOf$1.call(this._shortMonthsParse,llc);if(ii!==-1){return ii;}
ii=indexOf$1.call(this._longMonthsParse,llc);return ii!==-1?ii:null;}else{ii=indexOf$1.call(this._longMonthsParse,llc);if(ii!==-1){return ii;}
ii=indexOf$1.call(this._shortMonthsParse,llc);return ii!==-1?ii:null;}}}
function localeMonthsParse(monthName,format,strict){var i,mom,regex;if(this._monthsParseExact){return handleStrictParse.call(this,monthName,format,strict);}
if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[];}
for(i=0;i<12;i++){mom=createUTC([2000,i]);if(strict&&!this._longMonthsParse[i]){this._longMonthsParse[i]=new RegExp('^'+this.months(mom,'').replace('.','')+'$','i');this._shortMonthsParse[i]=new RegExp('^'+this.monthsShort(mom,'').replace('.','')+'$','i');}
if(!strict&&!this._monthsParse[i]){regex='^'+this.months(mom,'')+'|^'+this.monthsShort(mom,'');this._monthsParse[i]=new RegExp(regex.replace('.',''),'i');}
if(strict&&format==='MMMM'&&this._longMonthsParse[i].test(monthName)){return i;}else if(strict&&format==='MMM'&&this._shortMonthsParse[i].test(monthName)){return i;}else if(!strict&&this._monthsParse[i].test(monthName)){return i;}}}
function setMonth(mom,value){var dayOfMonth;if(!mom.isValid()){return mom;}
if(typeof value==='string'){if(/^\d+$/.test(value)){value=toInt(value);}else{value=mom.localeData().monthsParse(value);if(!isNumber(value)){return mom;}}}
dayOfMonth=Math.min(mom.date(),daysInMonth(mom.year(),value));mom._d['set'+(mom._isUTC?'UTC':'')+'Month'](value,dayOfMonth);return mom;}
function getSetMonth(value){if(value!=null){setMonth(this,value);hooks.updateOffset(this,true);return this;}else{return get(this,'Month');}}
function getDaysInMonth(){return daysInMonth(this.year(),this.month());}
var defaultMonthsShortRegex=matchWord;function monthsShortRegex(isStrict){if(this._monthsParseExact){if(!hasOwnProp(this,'_monthsRegex')){computeMonthsParse.call(this);}
if(isStrict){return this._monthsShortStrictRegex;}else{return this._monthsShortRegex;}}else{if(!hasOwnProp(this,'_monthsShortRegex')){this._monthsShortRegex=defaultMonthsShortRegex;}
return this._monthsShortStrictRegex&&isStrict?this._monthsShortStrictRegex:this._monthsShortRegex;}}
var defaultMonthsRegex=matchWord;function monthsRegex(isStrict){if(this._monthsParseExact){if(!hasOwnProp(this,'_monthsRegex')){computeMonthsParse.call(this);}
if(isStrict){return this._monthsStrictRegex;}else{return this._monthsRegex;}}else{if(!hasOwnProp(this,'_monthsRegex')){this._monthsRegex=defaultMonthsRegex;}
return this._monthsStrictRegex&&isStrict?this._monthsStrictRegex:this._monthsRegex;}}
function computeMonthsParse(){function cmpLenRev(a,b){return b.length-a.length;}
var shortPieces=[],longPieces=[],mixedPieces=[],i,mom;for(i=0;i<12;i++){mom=createUTC([2000,i]);shortPieces.push(this.monthsShort(mom,''));longPieces.push(this.months(mom,''));mixedPieces.push(this.months(mom,''));mixedPieces.push(this.monthsShort(mom,''));}
shortPieces.sort(cmpLenRev);longPieces.sort(cmpLenRev);mixedPieces.sort(cmpLenRev);for(i=0;i<12;i++){shortPieces[i]=regexEscape(shortPieces[i]);longPieces[i]=regexEscape(longPieces[i]);}
for(i=0;i<24;i++){mixedPieces[i]=regexEscape(mixedPieces[i]);}
this._monthsRegex=new RegExp('^('+mixedPieces.join('|')+')','i');this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp('^('+longPieces.join('|')+')','i');this._monthsShortStrictRegex=new RegExp('^('+shortPieces.join('|')+')','i');}
addFormatToken('Y',0,0,function(){var y=this.year();return y<=9999?''+y:'+'+y;});addFormatToken(0,['YY',2],0,function(){return this.year()%100;});addFormatToken(0,['YYYY',4],0,'year');addFormatToken(0,['YYYYY',5],0,'year');addFormatToken(0,['YYYYYY',6,true],0,'year');addUnitAlias('year','y');addUnitPriority('year',1);addRegexToken('Y',matchSigned);addRegexToken('YY',match1to2,match2);addRegexToken('YYYY',match1to4,match4);addRegexToken('YYYYY',match1to6,match6);addRegexToken('YYYYYY',match1to6,match6);addParseToken(['YYYYY','YYYYYY'],YEAR);addParseToken('YYYY',function(input,array){array[YEAR]=input.length===2?hooks.parseTwoDigitYear(input):toInt(input);});addParseToken('YY',function(input,array){array[YEAR]=hooks.parseTwoDigitYear(input);});addParseToken('Y',function(input,array){array[YEAR]=parseInt(input,10);});function daysInYear(year){return isLeapYear(year)?366:365;}
function isLeapYear(year){return(year%4===0&&year%100!==0)||year%400===0;}
hooks.parseTwoDigitYear=function(input){return toInt(input)+(toInt(input)>68?1900:2000);};var getSetYear=makeGetSet('FullYear',true);function getIsLeapYear(){return isLeapYear(this.year());}
function createDate(y,m,d,h,M,s,ms){var date=new Date(y,m,d,h,M,s,ms);if(y<100&&y>=0&&isFinite(date.getFullYear())){date.setFullYear(y);}
return date;}
function createUTCDate(y){var date=new Date(Date.UTC.apply(null,arguments));if(y<100&&y>=0&&isFinite(date.getUTCFullYear())){date.setUTCFullYear(y);}
return date;}
function firstWeekOffset(year,dow,doy){var
fwd=7+dow-doy,fwdlw=(7+createUTCDate(year,0,fwd).getUTCDay()-dow)%7;return-fwdlw+fwd-1;}
function dayOfYearFromWeeks(year,week,weekday,dow,doy){var localWeekday=(7+weekday-dow)%7,weekOffset=firstWeekOffset(year,dow,doy),dayOfYear=1+7*(week-1)+localWeekday+weekOffset,resYear,resDayOfYear;if(dayOfYear<=0){resYear=year-1;resDayOfYear=daysInYear(resYear)+dayOfYear;}else if(dayOfYear>daysInYear(year)){resYear=year+1;resDayOfYear=dayOfYear-daysInYear(year);}else{resYear=year;resDayOfYear=dayOfYear;}
return{year:resYear,dayOfYear:resDayOfYear};}
function weekOfYear(mom,dow,doy){var weekOffset=firstWeekOffset(mom.year(),dow,doy),week=Math.floor((mom.dayOfYear()-weekOffset-1)/7)+1,resWeek,resYear;if(week<1){resYear=mom.year()-1;resWeek=week+weeksInYear(resYear,dow,doy);}else if(week>weeksInYear(mom.year(),dow,doy)){resWeek=week-weeksInYear(mom.year(),dow,doy);resYear=mom.year()+1;}else{resYear=mom.year();resWeek=week;}
return{week:resWeek,year:resYear};}
function weeksInYear(year,dow,doy){var weekOffset=firstWeekOffset(year,dow,doy),weekOffsetNext=firstWeekOffset(year+1,dow,doy);return(daysInYear(year)-weekOffset+weekOffsetNext)/7;}
addFormatToken('w',['ww',2],'wo','week');addFormatToken('W',['WW',2],'Wo','isoWeek');addUnitAlias('week','w');addUnitAlias('isoWeek','W');addUnitPriority('week',5);addUnitPriority('isoWeek',5);addRegexToken('w',match1to2);addRegexToken('ww',match1to2,match2);addRegexToken('W',match1to2);addRegexToken('WW',match1to2,match2);addWeekParseToken(['w','ww','W','WW'],function(input,week,config,token){week[token.substr(0,1)]=toInt(input);});function localeWeek(mom){return weekOfYear(mom,this._week.dow,this._week.doy).week;}
var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow;}
function localeFirstDayOfYear(){return this._week.doy;}
function getSetWeek(input){var week=this.localeData().week(this);return input==null?week:this.add((input-week)*7,'d');}
function getSetISOWeek(input){var week=weekOfYear(this,1,4).week;return input==null?week:this.add((input-week)*7,'d');}
addFormatToken('d',0,'do','day');addFormatToken('dd',0,0,function(format){return this.localeData().weekdaysMin(this,format);});addFormatToken('ddd',0,0,function(format){return this.localeData().weekdaysShort(this,format);});addFormatToken('dddd',0,0,function(format){return this.localeData().weekdays(this,format);});addFormatToken('e',0,0,'weekday');addFormatToken('E',0,0,'isoWeekday');addUnitAlias('day','d');addUnitAlias('weekday','e');addUnitAlias('isoWeekday','E');addUnitPriority('day',11);addUnitPriority('weekday',11);addUnitPriority('isoWeekday',11);addRegexToken('d',match1to2);addRegexToken('e',match1to2);addRegexToken('E',match1to2);addRegexToken('dd',function(isStrict,locale){return locale.weekdaysMinRegex(isStrict);});addRegexToken('ddd',function(isStrict,locale){return locale.weekdaysShortRegex(isStrict);});addRegexToken('dddd',function(isStrict,locale){return locale.weekdaysRegex(isStrict);});addWeekParseToken(['dd','ddd','dddd'],function(input,week,config,token){var weekday=config._locale.weekdaysParse(input,token,config._strict);if(weekday!=null){week.d=weekday;}else{getParsingFlags(config).invalidWeekday=input;}});addWeekParseToken(['d','e','E'],function(input,week,config,token){week[token]=toInt(input);});function parseWeekday(input,locale){if(typeof input!=='string'){return input;}
if(!isNaN(input)){return parseInt(input,10);}
input=locale.weekdaysParse(input);if(typeof input==='number'){return input;}
return null;}
function parseIsoWeekday(input,locale){if(typeof input==='string'){return locale.weekdaysParse(input)%7||7;}
return isNaN(input)?null:input;}
var defaultLocaleWeekdays='Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');function localeWeekdays(m,format){if(!m){return this._weekdays;}
return isArray(this._weekdays)?this._weekdays[m.day()]:this._weekdays[this._weekdays.isFormat.test(format)?'format':'standalone'][m.day()];}
var defaultLocaleWeekdaysShort='Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');function localeWeekdaysShort(m){return(m)?this._weekdaysShort[m.day()]:this._weekdaysShort;}
var defaultLocaleWeekdaysMin='Su_Mo_Tu_We_Th_Fr_Sa'.split('_');function localeWeekdaysMin(m){return(m)?this._weekdaysMin[m.day()]:this._weekdaysMin;}
function handleStrictParse$1(weekdayName,format,strict){var i,ii,mom,llc=weekdayName.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[];this._shortWeekdaysParse=[];this._minWeekdaysParse=[];for(i=0;i<7;++i){mom=createUTC([2000,1]).day(i);this._minWeekdaysParse[i]=this.weekdaysMin(mom,'').toLocaleLowerCase();this._shortWeekdaysParse[i]=this.weekdaysShort(mom,'').toLocaleLowerCase();this._weekdaysParse[i]=this.weekdays(mom,'').toLocaleLowerCase();}}
if(strict){if(format==='dddd'){ii=indexOf$1.call(this._weekdaysParse,llc);return ii!==-1?ii:null;}else if(format==='ddd'){ii=indexOf$1.call(this._shortWeekdaysParse,llc);return ii!==-1?ii:null;}else{ii=indexOf$1.call(this._minWeekdaysParse,llc);return ii!==-1?ii:null;}}else{if(format==='dddd'){ii=indexOf$1.call(this._weekdaysParse,llc);if(ii!==-1){return ii;}
ii=indexOf$1.call(this._shortWeekdaysParse,llc);if(ii!==-1){return ii;}
ii=indexOf$1.call(this._minWeekdaysParse,llc);return ii!==-1?ii:null;}else if(format==='ddd'){ii=indexOf$1.call(this._shortWeekdaysParse,llc);if(ii!==-1){return ii;}
ii=indexOf$1.call(this._weekdaysParse,llc);if(ii!==-1){return ii;}
ii=indexOf$1.call(this._minWeekdaysParse,llc);return ii!==-1?ii:null;}else{ii=indexOf$1.call(this._minWeekdaysParse,llc);if(ii!==-1){return ii;}
ii=indexOf$1.call(this._weekdaysParse,llc);if(ii!==-1){return ii;}
ii=indexOf$1.call(this._shortWeekdaysParse,llc);return ii!==-1?ii:null;}}}
function localeWeekdaysParse(weekdayName,format,strict){var i,mom,regex;if(this._weekdaysParseExact){return handleStrictParse$1.call(this,weekdayName,format,strict);}
if(!this._weekdaysParse){this._weekdaysParse=[];this._minWeekdaysParse=[];this._shortWeekdaysParse=[];this._fullWeekdaysParse=[];}
for(i=0;i<7;i++){mom=createUTC([2000,1]).day(i);if(strict&&!this._fullWeekdaysParse[i]){this._fullWeekdaysParse[i]=new RegExp('^'+this.weekdays(mom,'').replace('.','\.?')+'$','i');this._shortWeekdaysParse[i]=new RegExp('^'+this.weekdaysShort(mom,'').replace('.','\.?')+'$','i');this._minWeekdaysParse[i]=new RegExp('^'+this.weekdaysMin(mom,'').replace('.','\.?')+'$','i');}
if(!this._weekdaysParse[i]){regex='^'+this.weekdays(mom,'')+'|^'+this.weekdaysShort(mom,'')+'|^'+this.weekdaysMin(mom,'');this._weekdaysParse[i]=new RegExp(regex.replace('.',''),'i');}
if(strict&&format==='dddd'&&this._fullWeekdaysParse[i].test(weekdayName)){return i;}else if(strict&&format==='ddd'&&this._shortWeekdaysParse[i].test(weekdayName)){return i;}else if(strict&&format==='dd'&&this._minWeekdaysParse[i].test(weekdayName)){return i;}else if(!strict&&this._weekdaysParse[i].test(weekdayName)){return i;}}}
function getSetDayOfWeek(input){if(!this.isValid()){return input!=null?this:NaN;}
var day=this._isUTC?this._d.getUTCDay():this._d.getDay();if(input!=null){input=parseWeekday(input,this.localeData());return this.add(input-day,'d');}else{return day;}}
function getSetLocaleDayOfWeek(input){if(!this.isValid()){return input!=null?this:NaN;}
var weekday=(this.day()+7-this.localeData()._week.dow)%7;return input==null?weekday:this.add(input-weekday,'d');}
function getSetISODayOfWeek(input){if(!this.isValid()){return input!=null?this:NaN;}
if(input!=null){var weekday=parseIsoWeekday(input,this.localeData());return this.day(this.day()%7?weekday:weekday-7);}else{return this.day()||7;}}
var defaultWeekdaysRegex=matchWord;function weekdaysRegex(isStrict){if(this._weekdaysParseExact){if(!hasOwnProp(this,'_weekdaysRegex')){computeWeekdaysParse.call(this);}
if(isStrict){return this._weekdaysStrictRegex;}else{return this._weekdaysRegex;}}else{if(!hasOwnProp(this,'_weekdaysRegex')){this._weekdaysRegex=defaultWeekdaysRegex;}
return this._weekdaysStrictRegex&&isStrict?this._weekdaysStrictRegex:this._weekdaysRegex;}}
var defaultWeekdaysShortRegex=matchWord;function weekdaysShortRegex(isStrict){if(this._weekdaysParseExact){if(!hasOwnProp(this,'_weekdaysRegex')){computeWeekdaysParse.call(this);}
if(isStrict){return this._weekdaysShortStrictRegex;}else{return this._weekdaysShortRegex;}}else{if(!hasOwnProp(this,'_weekdaysShortRegex')){this._weekdaysShortRegex=defaultWeekdaysShortRegex;}
return this._weekdaysShortStrictRegex&&isStrict?this._weekdaysShortStrictRegex:this._weekdaysShortRegex;}}
var defaultWeekdaysMinRegex=matchWord;function weekdaysMinRegex(isStrict){if(this._weekdaysParseExact){if(!hasOwnProp(this,'_weekdaysRegex')){computeWeekdaysParse.call(this);}
if(isStrict){return this._weekdaysMinStrictRegex;}else{return this._weekdaysMinRegex;}}else{if(!hasOwnProp(this,'_weekdaysMinRegex')){this._weekdaysMinRegex=defaultWeekdaysMinRegex;}
return this._weekdaysMinStrictRegex&&isStrict?this._weekdaysMinStrictRegex:this._weekdaysMinRegex;}}
function computeWeekdaysParse(){function cmpLenRev(a,b){return b.length-a.length;}
var minPieces=[],shortPieces=[],longPieces=[],mixedPieces=[],i,mom,minp,shortp,longp;for(i=0;i<7;i++){mom=createUTC([2000,1]).day(i);minp=this.weekdaysMin(mom,'');shortp=this.weekdaysShort(mom,'');longp=this.weekdays(mom,'');minPieces.push(minp);shortPieces.push(shortp);longPieces.push(longp);mixedPieces.push(minp);mixedPieces.push(shortp);mixedPieces.push(longp);}
minPieces.sort(cmpLenRev);shortPieces.sort(cmpLenRev);longPieces.sort(cmpLenRev);mixedPieces.sort(cmpLenRev);for(i=0;i<7;i++){shortPieces[i]=regexEscape(shortPieces[i]);longPieces[i]=regexEscape(longPieces[i]);mixedPieces[i]=regexEscape(mixedPieces[i]);}
this._weekdaysRegex=new RegExp('^('+mixedPieces.join('|')+')','i');this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp('^('+longPieces.join('|')+')','i');this._weekdaysShortStrictRegex=new RegExp('^('+shortPieces.join('|')+')','i');this._weekdaysMinStrictRegex=new RegExp('^('+minPieces.join('|')+')','i');}
function hFormat(){return this.hours()%12||12;}
function kFormat(){return this.hours()||24;}
addFormatToken('H',['HH',2],0,'hour');addFormatToken('h',['hh',2],0,hFormat);addFormatToken('k',['kk',2],0,kFormat);addFormatToken('hmm',0,0,function(){return''+hFormat.apply(this)+zeroFill(this.minutes(),2);});addFormatToken('hmmss',0,0,function(){return''+hFormat.apply(this)+zeroFill(this.minutes(),2)+
zeroFill(this.seconds(),2);});addFormatToken('Hmm',0,0,function(){return''+this.hours()+zeroFill(this.minutes(),2);});addFormatToken('Hmmss',0,0,function(){return''+this.hours()+zeroFill(this.minutes(),2)+
zeroFill(this.seconds(),2);});function meridiem(token,lowercase){addFormatToken(token,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),lowercase);});}
meridiem('a',true);meridiem('A',false);addUnitAlias('hour','h');addUnitPriority('hour',13);function matchMeridiem(isStrict,locale){return locale._meridiemParse;}
addRegexToken('a',matchMeridiem);addRegexToken('A',matchMeridiem);addRegexToken('H',match1to2);addRegexToken('h',match1to2);addRegexToken('HH',match1to2,match2);addRegexToken('hh',match1to2,match2);addRegexToken('hmm',match3to4);addRegexToken('hmmss',match5to6);addRegexToken('Hmm',match3to4);addRegexToken('Hmmss',match5to6);addParseToken(['H','HH'],HOUR);addParseToken(['a','A'],function(input,array,config){config._isPm=config._locale.isPM(input);config._meridiem=input;});addParseToken(['h','hh'],function(input,array,config){array[HOUR]=toInt(input);getParsingFlags(config).bigHour=true;});addParseToken('hmm',function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos));array[MINUTE]=toInt(input.substr(pos));getParsingFlags(config).bigHour=true;});addParseToken('hmmss',function(input,array,config){var pos1=input.length-4;var pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1));array[MINUTE]=toInt(input.substr(pos1,2));array[SECOND]=toInt(input.substr(pos2));getParsingFlags(config).bigHour=true;});addParseToken('Hmm',function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos));array[MINUTE]=toInt(input.substr(pos));});addParseToken('Hmmss',function(input,array,config){var pos1=input.length-4;var pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1));array[MINUTE]=toInt(input.substr(pos1,2));array[SECOND]=toInt(input.substr(pos2));});function localeIsPM(input){return((input+'').toLowerCase().charAt(0)==='p');}
var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i;function localeMeridiem(hours,minutes,isLower){if(hours>11){return isLower?'pm':'PM';}else{return isLower?'am':'AM';}}
var getSetHour=makeGetSet('Hours',true);var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,ordinalParse:defaultOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse};var locales={};var localeFamilies={};var globalLocale;function normalizeLocale(key){return key?key.toLowerCase().replace('_','-'):key;}
function chooseLocale(names){var i=0,j,next,locale,split;while(i<names.length){split=normalizeLocale(names[i]).split('-');j=split.length;next=normalizeLocale(names[i+1]);next=next?next.split('-'):null;while(j>0){locale=loadLocale(split.slice(0,j).join('-'));if(locale){return locale;}
if(next&&next.length>=j&&compareArrays(split,next,true)>=j-1){break;}
j--;}
i++;}
return null;}
function loadLocale(name){var oldLocale=null;if(!locales[name]&&(typeof module!=='undefined')&&module&&module.exports){try{oldLocale=globalLocale._abbr;require('./locale/'+name);getSetGlobalLocale(oldLocale);}catch(e){}}
return locales[name];}
function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);}
else{data=defineLocale(key,values);}
if(data){globalLocale=data;}}
return globalLocale._abbr;}
function defineLocale(name,config){if(config!==null){var parentConfig=baseConfig;config.abbr=name;if(locales[name]!=null){deprecateSimple('defineLocaleOverride','use moment.updateLocale(localeName, config) to change '+'an existing locale. moment.defineLocale(localeName, '+'config) should only be used for creating a new locale '+'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');parentConfig=locales[name]._config;}else if(config.parentLocale!=null){if(locales[config.parentLocale]!=null){parentConfig=locales[config.parentLocale]._config;}else{if(!localeFamilies[config.parentLocale]){localeFamilies[config.parentLocale]=[];}
localeFamilies[config.parentLocale].push({name:name,config:config});return null;}}
locales[name]=new Locale(mergeConfigs(parentConfig,config));if(localeFamilies[name]){localeFamilies[name].forEach(function(x){defineLocale(x.name,x.config);});}
getSetGlobalLocale(name);return locales[name];}else{delete locales[name];return null;}}
function updateLocale(name,config){if(config!=null){var locale,parentConfig=baseConfig;if(locales[name]!=null){parentConfig=locales[name]._config;}
config=mergeConfigs(parentConfig,config);locale=new Locale(config);locale.parentLocale=locales[name];locales[name]=locale;getSetGlobalLocale(name);}else{if(locales[name]!=null){if(locales[name].parentLocale!=null){locales[name]=locales[name].parentLocale;}else if(locales[name]!=null){delete locales[name];}}}
return locales[name];}
function getLocale(key){var locale;if(key&&key._locale&&key._locale._abbr){key=key._locale._abbr;}
if(!key){return globalLocale;}
if(!isArray(key)){locale=loadLocale(key);if(locale){return locale;}
key=[key];}
return chooseLocale(key);}
function listLocales(){return keys$1(locales);}
function checkOverflow(m){var overflow;var a=m._a;if(a&&getParsingFlags(m).overflow===-2){overflow=a[MONTH]<0||a[MONTH]>11?MONTH:a[DATE]<1||a[DATE]>daysInMonth(a[YEAR],a[MONTH])?DATE:a[HOUR]<0||a[HOUR]>24||(a[HOUR]===24&&(a[MINUTE]!==0||a[SECOND]!==0||a[MILLISECOND]!==0))?HOUR:a[MINUTE]<0||a[MINUTE]>59?MINUTE:a[SECOND]<0||a[SECOND]>59?SECOND:a[MILLISECOND]<0||a[MILLISECOND]>999?MILLISECOND:-1;if(getParsingFlags(m)._overflowDayOfYear&&(overflow<YEAR||overflow>DATE)){overflow=DATE;}
if(getParsingFlags(m)._overflowWeeks&&overflow===-1){overflow=WEEK;}
if(getParsingFlags(m)._overflowWeekday&&overflow===-1){overflow=WEEKDAY;}
getParsingFlags(m).overflow=overflow;}
return m;}
var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;var basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;var tzRegex=/Z|[+-]\d\d(?::?\d\d)?/;var isoDates=[['YYYYYY-MM-DD',/[+-]\d{6}-\d\d-\d\d/],['YYYY-MM-DD',/\d{4}-\d\d-\d\d/],['GGGG-[W]WW-E',/\d{4}-W\d\d-\d/],['GGGG-[W]WW',/\d{4}-W\d\d/,false],['YYYY-DDD',/\d{4}-\d{3}/],['YYYY-MM',/\d{4}-\d\d/,false],['YYYYYYMMDD',/[+-]\d{10}/],['YYYYMMDD',/\d{8}/],['GGGG[W]WWE',/\d{4}W\d{3}/],['GGGG[W]WW',/\d{4}W\d{2}/,false],['YYYYDDD',/\d{7}/]];var isoTimes=[['HH:mm:ss.SSSS',/\d\d:\d\d:\d\d\.\d+/],['HH:mm:ss,SSSS',/\d\d:\d\d:\d\d,\d+/],['HH:mm:ss',/\d\d:\d\d:\d\d/],['HH:mm',/\d\d:\d\d/],['HHmmss.SSSS',/\d\d\d\d\d\d\.\d+/],['HHmmss,SSSS',/\d\d\d\d\d\d,\d+/],['HHmmss',/\d\d\d\d\d\d/],['HHmm',/\d\d\d\d/],['HH',/\d\d/]];var aspNetJsonRegex=/^\/?Date\((\-?\d+)/i;function configFromISO(config){var i,l,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string),allowTime,dateFormat,timeFormat,tzFormat;if(match){getParsingFlags(config).iso=true;for(i=0,l=isoDates.length;i<l;i++){if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0];allowTime=isoDates[i][2]!==false;break;}}
if(dateFormat==null){config._isValid=false;return;}
if(match[3]){for(i=0,l=isoTimes.length;i<l;i++){if(isoTimes[i][1].exec(match[3])){timeFormat=(match[2]||' ')+isoTimes[i][0];break;}}
if(timeFormat==null){config._isValid=false;return;}}
if(!allowTime&&timeFormat!=null){config._isValid=false;return;}
if(match[4]){if(tzRegex.exec(match[4])){tzFormat='Z';}else{config._isValid=false;return;}}
config._f=dateFormat+(timeFormat||'')+(tzFormat||'');configFromStringAndFormat(config);}else{config._isValid=false;}}
function configFromString(config){var matched=aspNetJsonRegex.exec(config._i);if(matched!==null){config._d=new Date(+matched[1]);return;}
configFromISO(config);if(config._isValid===false){delete config._isValid;hooks.createFromInputFallback(config);}}
hooks.createFromInputFallback=deprecate('value provided is not in a recognized ISO format. moment construction falls back to js Date(), '+'which is not reliable across all browsers and versions. Non ISO date formats are '+'discouraged and will be removed in an upcoming major release. Please refer to '+'http://momentjs.com/guides/#/warnings/js-date/ for more info.',function(config){config._d=new Date(config._i+(config._useUTC?' UTC':''));});function defaults(a,b,c){if(a!=null){return a;}
if(b!=null){return b;}
return c;}
function currentDateArray(config){var nowValue=new Date(hooks.now());if(config._useUTC){return[nowValue.getUTCFullYear(),nowValue.getUTCMonth(),nowValue.getUTCDate()];}
return[nowValue.getFullYear(),nowValue.getMonth(),nowValue.getDate()];}
function configFromArray(config){var i,date,input=[],currentDate,yearToUse;if(config._d){return;}
currentDate=currentDateArray(config);if(config._w&&config._a[DATE]==null&&config._a[MONTH]==null){dayOfYearFromWeekInfo(config);}
if(config._dayOfYear){yearToUse=defaults(config._a[YEAR],currentDate[YEAR]);if(config._dayOfYear>daysInYear(yearToUse)){getParsingFlags(config)._overflowDayOfYear=true;}
date=createUTCDate(yearToUse,0,config._dayOfYear);config._a[MONTH]=date.getUTCMonth();config._a[DATE]=date.getUTCDate();}
for(i=0;i<3&&config._a[i]==null;++i){config._a[i]=input[i]=currentDate[i];}
for(;i<7;i++){config._a[i]=input[i]=(config._a[i]==null)?(i===2?1:0):config._a[i];}
if(config._a[HOUR]===24&&config._a[MINUTE]===0&&config._a[SECOND]===0&&config._a[MILLISECOND]===0){config._nextDay=true;config._a[HOUR]=0;}
config._d=(config._useUTC?createUTCDate:createDate).apply(null,input);if(config._tzm!=null){config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm);}
if(config._nextDay){config._a[HOUR]=24;}}
function dayOfYearFromWeekInfo(config){var w,weekYear,week,weekday,dow,doy,temp,weekdayOverflow;w=config._w;if(w.GG!=null||w.W!=null||w.E!=null){dow=1;doy=4;weekYear=defaults(w.GG,config._a[YEAR],weekOfYear(createLocal(),1,4).year);week=defaults(w.W,1);weekday=defaults(w.E,1);if(weekday<1||weekday>7){weekdayOverflow=true;}}else{dow=config._locale._week.dow;doy=config._locale._week.doy;var curWeek=weekOfYear(createLocal(),dow,doy);weekYear=defaults(w.gg,config._a[YEAR],curWeek.year);week=defaults(w.w,curWeek.week);if(w.d!=null){weekday=w.d;if(weekday<0||weekday>6){weekdayOverflow=true;}}else if(w.e!=null){weekday=w.e+dow;if(w.e<0||w.e>6){weekdayOverflow=true;}}else{weekday=dow;}}
if(week<1||week>weeksInYear(weekYear,dow,doy)){getParsingFlags(config)._overflowWeeks=true;}else if(weekdayOverflow!=null){getParsingFlags(config)._overflowWeekday=true;}else{temp=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy);config._a[YEAR]=temp.year;config._dayOfYear=temp.dayOfYear;}}
hooks.ISO_8601=function(){};function configFromStringAndFormat(config){if(config._f===hooks.ISO_8601){configFromISO(config);return;}
config._a=[];getParsingFlags(config).empty=true;var string=''+config._i,i,parsedInput,tokens,token,skipped,stringLength=string.length,totalParsedInputLength=0;tokens=expandFormat(config._f,config._locale).match(formattingTokens)||[];for(i=0;i<tokens.length;i++){token=tokens[i];parsedInput=(string.match(getParseRegexForToken(token,config))||[])[0];if(parsedInput){skipped=string.substr(0,string.indexOf(parsedInput));if(skipped.length>0){getParsingFlags(config).unusedInput.push(skipped);}
string=string.slice(string.indexOf(parsedInput)+parsedInput.length);totalParsedInputLength+=parsedInput.length;}
if(formatTokenFunctions[token]){if(parsedInput){getParsingFlags(config).empty=false;}
else{getParsingFlags(config).unusedTokens.push(token);}
addTimeToArrayFromToken(token,parsedInput,config);}
else if(config._strict&&!parsedInput){getParsingFlags(config).unusedTokens.push(token);}}
getParsingFlags(config).charsLeftOver=stringLength-totalParsedInputLength;if(string.length>0){getParsingFlags(config).unusedInput.push(string);}
if(config._a[HOUR]<=12&&getParsingFlags(config).bigHour===true&&config._a[HOUR]>0){getParsingFlags(config).bigHour=undefined;}
getParsingFlags(config).parsedDateParts=config._a.slice(0);getParsingFlags(config).meridiem=config._meridiem;config._a[HOUR]=meridiemFixWrap(config._locale,config._a[HOUR],config._meridiem);configFromArray(config);checkOverflow(config);}
function meridiemFixWrap(locale,hour,meridiem){var isPm;if(meridiem==null){return hour;}
if(locale.meridiemHour!=null){return locale.meridiemHour(hour,meridiem);}else if(locale.isPM!=null){isPm=locale.isPM(meridiem);if(isPm&&hour<12){hour+=12;}
if(!isPm&&hour===12){hour=0;}
return hour;}else{return hour;}}
function configFromStringAndArray(config){var tempConfig,bestMoment,scoreToBeat,i,currentScore;if(config._f.length===0){getParsingFlags(config).invalidFormat=true;config._d=new Date(NaN);return;}
for(i=0;i<config._f.length;i++){currentScore=0;tempConfig=copyConfig({},config);if(config._useUTC!=null){tempConfig._useUTC=config._useUTC;}
tempConfig._f=config._f[i];configFromStringAndFormat(tempConfig);if(!isValid(tempConfig)){continue;}
currentScore+=getParsingFlags(tempConfig).charsLeftOver;currentScore+=getParsingFlags(tempConfig).unusedTokens.length*10;getParsingFlags(tempConfig).score=currentScore;if(scoreToBeat==null||currentScore<scoreToBeat){scoreToBeat=currentScore;bestMoment=tempConfig;}}
extend(config,bestMoment||tempConfig);}
function configFromObject(config){if(config._d){return;}
var i=normalizeObjectUnits(config._i);config._a=map([i.year,i.month,i.day||i.date,i.hour,i.minute,i.second,i.millisecond],function(obj){return obj&&parseInt(obj,10);});configFromArray(config);}
function createFromConfig(config){var res=new Moment(checkOverflow(prepareConfig(config)));if(res._nextDay){res.add(1,'d');res._nextDay=undefined;}
return res;}
function prepareConfig(config){var input=config._i,format=config._f;config._locale=config._locale||getLocale(config._l);if(input===null||(format===undefined&&input==='')){return createInvalid({nullInput:true});}
if(typeof input==='string'){config._i=input=config._locale.preparse(input);}
if(isMoment(input)){return new Moment(checkOverflow(input));}else if(isDate(input)){config._d=input;}else if(isArray(format)){configFromStringAndArray(config);}else if(format){configFromStringAndFormat(config);}else{configFromInput(config);}
if(!isValid(config)){config._d=null;}
return config;}
function configFromInput(config){var input=config._i;if(input===undefined){config._d=new Date(hooks.now());}else if(isDate(input)){config._d=new Date(input.valueOf());}else if(typeof input==='string'){configFromString(config);}else if(isArray(input)){config._a=map(input.slice(0),function(obj){return parseInt(obj,10);});configFromArray(config);}else if(typeof(input)==='object'){configFromObject(config);}else if(isNumber(input)){config._d=new Date(input);}else{hooks.createFromInputFallback(config);}}
function createLocalOrUTC(input,format,locale,strict,isUTC){var c={};if(locale===true||locale===false){strict=locale;locale=undefined;}
if((isObject(input)&&isObjectEmpty(input))||(isArray(input)&&input.length===0)){input=undefined;}
c._isAMomentObject=true;c._useUTC=c._isUTC=isUTC;c._l=locale;c._i=input;c._f=format;c._strict=strict;return createFromConfig(c);}
function createLocal(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,false);}
var prototypeMin=deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',function(){var other=createLocal.apply(null,arguments);if(this.isValid()&&other.isValid()){return other<this?this:other;}else{return createInvalid();}});var prototypeMax=deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',function(){var other=createLocal.apply(null,arguments);if(this.isValid()&&other.isValid()){return other>this?this:other;}else{return createInvalid();}});function pickBy(fn,moments){var res,i;if(moments.length===1&&isArray(moments[0])){moments=moments[0];}
if(!moments.length){return createLocal();}
res=moments[0];for(i=1;i<moments.length;++i){if(!moments[i].isValid()||moments[i][fn](res)){res=moments[i];}}
return res;}
function min(){var args=[].slice.call(arguments,0);return pickBy('isBefore',args);}
function max(){var args=[].slice.call(arguments,0);return pickBy('isAfter',args);}
var now=function(){return Date.now?Date.now():+(new Date());};function Duration(duration){var normalizedInput=normalizeObjectUnits(duration),years=normalizedInput.year||0,quarters=normalizedInput.quarter||0,months=normalizedInput.month||0,weeks=normalizedInput.week||0,days=normalizedInput.day||0,hours=normalizedInput.hour||0,minutes=normalizedInput.minute||0,seconds=normalizedInput.second||0,milliseconds=normalizedInput.millisecond||0;this._milliseconds=+milliseconds+
seconds*1e3+
minutes*6e4+
hours*1000*60*60;this._days=+days+
weeks*7;this._months=+months+
quarters*3+
years*12;this._data={};this._locale=getLocale();this._bubble();}
function isDuration(obj){return obj instanceof Duration;}
function absRound(number){if(number<0){return Math.round(-1*number)*-1;}else{return Math.round(number);}}
function offset(token,separator){addFormatToken(token,0,0,function(){var offset=this.utcOffset();var sign='+';if(offset<0){offset=-offset;sign='-';}
return sign+zeroFill(~~(offset/60),2)+separator+zeroFill(~~(offset)%60,2);});}
offset('Z',':');offset('ZZ','');addRegexToken('Z',matchShortOffset);addRegexToken('ZZ',matchShortOffset);addParseToken(['Z','ZZ'],function(input,array,config){config._useUTC=true;config._tzm=offsetFromString(matchShortOffset,input);});var chunkOffset=/([\+\-]|\d\d)/gi;function offsetFromString(matcher,string){var matches=(string||'').match(matcher);if(matches===null){return null;}
var chunk=matches[matches.length-1]||[];var parts=(chunk+'').match(chunkOffset)||['-',0,0];var minutes=+(parts[1]*60)+toInt(parts[2]);return minutes===0?0:parts[0]==='+'?minutes:-minutes;}
function cloneWithOffset(input,model){var res,diff;if(model._isUTC){res=model.clone();diff=(isMoment(input)||isDate(input)?input.valueOf():createLocal(input).valueOf())-res.valueOf();res._d.setTime(res._d.valueOf()+diff);hooks.updateOffset(res,false);return res;}else{return createLocal(input).local();}}
function getDateOffset(m){return-Math.round(m._d.getTimezoneOffset()/15)*15;}
hooks.updateOffset=function(){};function getSetOffset(input,keepLocalTime){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}
if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);if(input===null){return this;}}else if(Math.abs(input)<16){input=input*60;}
if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}
this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}
if(offset!==input){if(!keepLocalTime||this._changeInProgress){addSubtract(this,createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;hooks.updateOffset(this,true);this._changeInProgress=null;}}
return this;}else{return this._isUTC?offset:getDateOffset(this);}}
function getSetZone(input,keepLocalTime){if(input!=null){if(typeof input!=='string'){input=-input;}
this.utcOffset(input,keepLocalTime);return this;}else{return-this.utcOffset();}}
function setOffsetToUTC(keepLocalTime){return this.utcOffset(0,keepLocalTime);}
function setOffsetToLocal(keepLocalTime){if(this._isUTC){this.utcOffset(0,keepLocalTime);this._isUTC=false;if(keepLocalTime){this.subtract(getDateOffset(this),'m');}}
return this;}
function setOffsetToParsedOffset(){if(this._tzm!=null){this.utcOffset(this._tzm);}else if(typeof this._i==='string'){var tZone=offsetFromString(matchOffset,this._i);if(tZone!=null){this.utcOffset(tZone);}
else{this.utcOffset(0,true);}}
return this;}
function hasAlignedHourOffset(input){if(!this.isValid()){return false;}
input=input?createLocal(input).utcOffset():0;return(this.utcOffset()-input)%60===0;}
function isDaylightSavingTime(){return(this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset());}
function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted)){return this._isDSTShifted;}
var c={};copyConfig(c,this);c=prepareConfig(c);if(c._a){var other=c._isUTC?createUTC(c._a):createLocal(c._a);this._isDSTShifted=this.isValid()&&compareArrays(c._a,other.toArray())>0;}else{this._isDSTShifted=false;}
return this._isDSTShifted;}
function isLocal(){return this.isValid()?!this._isUTC:false;}
function isUtcOffset(){return this.isValid()?this._isUTC:false;}
function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:false;}
var aspNetRegex=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;var isoRegex=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;function createDuration(input,key){var duration=input,match=null,sign,ret,diffRes;if(isDuration(input)){duration={ms:input._milliseconds,d:input._days,M:input._months};}else if(isNumber(input)){duration={};if(key){duration[key]=input;}else{duration.milliseconds=input;}}else if(!!(match=aspNetRegex.exec(input))){sign=(match[1]==='-')?-1:1;duration={y:0,d:toInt(match[DATE])*sign,h:toInt(match[HOUR])*sign,m:toInt(match[MINUTE])*sign,s:toInt(match[SECOND])*sign,ms:toInt(absRound(match[MILLISECOND]*1000))*sign};}else if(!!(match=isoRegex.exec(input))){sign=(match[1]==='-')?-1:1;duration={y:parseIso(match[2],sign),M:parseIso(match[3],sign),w:parseIso(match[4],sign),d:parseIso(match[5],sign),h:parseIso(match[6],sign),m:parseIso(match[7],sign),s:parseIso(match[8],sign)};}else if(duration==null){duration={};}else if(typeof duration==='object'&&('from'in duration||'to'in duration)){diffRes=momentsDifference(createLocal(duration.from),createLocal(duration.to));duration={};duration.ms=diffRes.milliseconds;duration.M=diffRes.months;}
ret=new Duration(duration);if(isDuration(input)&&hasOwnProp(input,'_locale')){ret._locale=input._locale;}
return ret;}
createDuration.fn=Duration.prototype;function parseIso(inp,sign){var res=inp&&parseFloat(inp.replace(',','.'));return(isNaN(res)?0:res)*sign;}
function positiveMomentsDifference(base,other){var res={milliseconds:0,months:0};res.months=other.month()-base.month()+
(other.year()-base.year())*12;if(base.clone().add(res.months,'M').isAfter(other)){--res.months;}
res.milliseconds=+other-+(base.clone().add(res.months,'M'));return res;}
function momentsDifference(base,other){var res;if(!(base.isValid()&&other.isValid())){return{milliseconds:0,months:0};}
other=cloneWithOffset(other,base);if(base.isBefore(other)){res=positiveMomentsDifference(base,other);}else{res=positiveMomentsDifference(other,base);res.milliseconds=-res.milliseconds;res.months=-res.months;}
return res;}
function createAdder(direction,name){return function(val,period){var dur,tmp;if(period!==null&&!isNaN(+period)){deprecateSimple(name,'moment().'+name+'(period, number) is deprecated. Please use moment().'+name+'(number, period). '+'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');tmp=val;val=period;period=tmp;}
val=typeof val==='string'?+val:val;dur=createDuration(val,period);addSubtract(this,dur,direction);return this;};}
function addSubtract(mom,duration,isAdding,updateOffset){var milliseconds=duration._milliseconds,days=absRound(duration._days),months=absRound(duration._months);if(!mom.isValid()){return;}
updateOffset=updateOffset==null?true:updateOffset;if(milliseconds){mom._d.setTime(mom._d.valueOf()+milliseconds*isAdding);}
if(days){set$1(mom,'Date',get(mom,'Date')+days*isAdding);}
if(months){setMonth(mom,get(mom,'Month')+months*isAdding);}
if(updateOffset){hooks.updateOffset(mom,days||months);}}
var add=createAdder(1,'add');var subtract=createAdder(-1,'subtract');function getCalendarFormat(myMoment,now){var diff=myMoment.diff(now,'days',true);return diff<-6?'sameElse':diff<-1?'lastWeek':diff<0?'lastDay':diff<1?'sameDay':diff<2?'nextDay':diff<7?'nextWeek':'sameElse';}
function calendar$1(time,formats){var now=time||createLocal(),sod=cloneWithOffset(now,this).startOf('day'),format=hooks.calendarFormat(this,sod)||'sameElse';var output=formats&&(isFunction(formats[format])?formats[format].call(this,now):formats[format]);return this.format(output||this.localeData().calendar(format,this,createLocal(now)));}
function clone(){return new Moment(this);}
function isAfter(input,units){var localInput=isMoment(input)?input:createLocal(input);if(!(this.isValid()&&localInput.isValid())){return false;}
units=normalizeUnits(!isUndefined(units)?units:'millisecond');if(units==='millisecond'){return this.valueOf()>localInput.valueOf();}else{return localInput.valueOf()<this.clone().startOf(units).valueOf();}}
function isBefore(input,units){var localInput=isMoment(input)?input:createLocal(input);if(!(this.isValid()&&localInput.isValid())){return false;}
units=normalizeUnits(!isUndefined(units)?units:'millisecond');if(units==='millisecond'){return this.valueOf()<localInput.valueOf();}else{return this.clone().endOf(units).valueOf()<localInput.valueOf();}}
function isBetween(from,to,units,inclusivity){inclusivity=inclusivity||'()';return(inclusivity[0]==='('?this.isAfter(from,units):!this.isBefore(from,units))&&(inclusivity[1]===')'?this.isBefore(to,units):!this.isAfter(to,units));}
function isSame(input,units){var localInput=isMoment(input)?input:createLocal(input),inputMs;if(!(this.isValid()&&localInput.isValid())){return false;}
units=normalizeUnits(units||'millisecond');if(units==='millisecond'){return this.valueOf()===localInput.valueOf();}else{inputMs=localInput.valueOf();return this.clone().startOf(units).valueOf()<=inputMs&&inputMs<=this.clone().endOf(units).valueOf();}}
function isSameOrAfter(input,units){return this.isSame(input,units)||this.isAfter(input,units);}
function isSameOrBefore(input,units){return this.isSame(input,units)||this.isBefore(input,units);}
function diff(input,units,asFloat){var that,zoneDelta,delta,output;if(!this.isValid()){return NaN;}
that=cloneWithOffset(input,this);if(!that.isValid()){return NaN;}
zoneDelta=(that.utcOffset()-this.utcOffset())*6e4;units=normalizeUnits(units);if(units==='year'||units==='month'||units==='quarter'){output=monthDiff(this,that);if(units==='quarter'){output=output/3;}else if(units==='year'){output=output/12;}}else{delta=this-that;output=units==='second'?delta/1e3:units==='minute'?delta/6e4:units==='hour'?delta/36e5:units==='day'?(delta-zoneDelta)/864e5:units==='week'?(delta-zoneDelta)/6048e5:delta;}
return asFloat?output:absFloor(output);}
function monthDiff(a,b){var wholeMonthDiff=((b.year()-a.year())*12)+(b.month()-a.month()),anchor=a.clone().add(wholeMonthDiff,'months'),anchor2,adjust;if(b-anchor<0){anchor2=a.clone().add(wholeMonthDiff-1,'months');adjust=(b-anchor)/(anchor-anchor2);}else{anchor2=a.clone().add(wholeMonthDiff+1,'months');adjust=(b-anchor)/(anchor2-anchor);}
return-(wholeMonthDiff+adjust)||0;}
hooks.defaultFormat='YYYY-MM-DDTHH:mm:ssZ';hooks.defaultFormatUtc='YYYY-MM-DDTHH:mm:ss[Z]';function toString(){return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');}
function toISOString(){var m=this.clone().utc();if(0<m.year()&&m.year()<=9999){if(isFunction(Date.prototype.toISOString)){return this.toDate().toISOString();}else{return formatMoment(m,'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');}}else{return formatMoment(m,'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');}}
function inspect(){if(!this.isValid()){return'moment.invalid(/* '+this._i+' */)';}
var func='moment';var zone='';if(!this.isLocal()){func=this.utcOffset()===0?'moment.utc':'moment.parseZone';zone='Z';}
var prefix='['+func+'("]';var year=(0<this.year()&&this.year()<=9999)?'YYYY':'YYYYYY';var datetime='-MM-DD[T]HH:mm:ss.SSS';var suffix=zone+'[")]';return this.format(prefix+year+datetime+suffix);}
function format(inputString){if(!inputString){inputString=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat;}
var output=formatMoment(this,inputString);return this.localeData().postformat(output);}
function from(time,withoutSuffix){if(this.isValid()&&((isMoment(time)&&time.isValid())||createLocal(time).isValid())){return createDuration({to:this,from:time}).locale(this.locale()).humanize(!withoutSuffix);}else{return this.localeData().invalidDate();}}
function fromNow(withoutSuffix){return this.from(createLocal(),withoutSuffix);}
function to(time,withoutSuffix){if(this.isValid()&&((isMoment(time)&&time.isValid())||createLocal(time).isValid())){return createDuration({from:this,to:time}).locale(this.locale()).humanize(!withoutSuffix);}else{return this.localeData().invalidDate();}}
function toNow(withoutSuffix){return this.to(createLocal(),withoutSuffix);}
function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}
return this;}}
var lang=deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',function(key){if(key===undefined){return this.localeData();}else{return this.locale(key);}});function localeData(){return this._locale;}
function startOf(units){units=normalizeUnits(units);switch(units){case'year':this.month(0);case'quarter':case'month':this.date(1);case'week':case'isoWeek':case'day':case'date':this.hours(0);case'hour':this.minutes(0);case'minute':this.seconds(0);case'second':this.milliseconds(0);}
if(units==='week'){this.weekday(0);}
if(units==='isoWeek'){this.isoWeekday(1);}
if(units==='quarter'){this.month(Math.floor(this.month()/3)*3);}
return this;}
function endOf(units){units=normalizeUnits(units);if(units===undefined||units==='millisecond'){return this;}
if(units==='date'){units='day';}
return this.startOf(units).add(1,(units==='isoWeek'?'week':units)).subtract(1,'ms');}
function valueOf(){return this._d.valueOf()-((this._offset||0)*60000);}
function unix(){return Math.floor(this.valueOf()/1000);}
function toDate(){return new Date(this.valueOf());}
function toArray(){var m=this;return[m.year(),m.month(),m.date(),m.hour(),m.minute(),m.second(),m.millisecond()];}
function toObject(){var m=this;return{years:m.year(),months:m.month(),date:m.date(),hours:m.hours(),minutes:m.minutes(),seconds:m.seconds(),milliseconds:m.milliseconds()};}
function toJSON(){return this.isValid()?this.toISOString():null;}
function isValid$1(){return isValid(this);}
function parsingFlags(){return extend({},getParsingFlags(this));}
function invalidAt(){return getParsingFlags(this).overflow;}
function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict};}
addFormatToken(0,['gg',2],0,function(){return this.weekYear()%100;});addFormatToken(0,['GG',2],0,function(){return this.isoWeekYear()%100;});function addWeekYearFormatToken(token,getter){addFormatToken(0,[token,token.length],0,getter);}
addWeekYearFormatToken('gggg','weekYear');addWeekYearFormatToken('ggggg','weekYear');addWeekYearFormatToken('GGGG','isoWeekYear');addWeekYearFormatToken('GGGGG','isoWeekYear');addUnitAlias('weekYear','gg');addUnitAlias('isoWeekYear','GG');addUnitPriority('weekYear',1);addUnitPriority('isoWeekYear',1);addRegexToken('G',matchSigned);addRegexToken('g',matchSigned);addRegexToken('GG',match1to2,match2);addRegexToken('gg',match1to2,match2);addRegexToken('GGGG',match1to4,match4);addRegexToken('gggg',match1to4,match4);addRegexToken('GGGGG',match1to6,match6);addRegexToken('ggggg',match1to6,match6);addWeekParseToken(['gggg','ggggg','GGGG','GGGGG'],function(input,week,config,token){week[token.substr(0,2)]=toInt(input);});addWeekParseToken(['gg','GG'],function(input,week,config,token){week[token]=hooks.parseTwoDigitYear(input);});function getSetWeekYear(input){return getSetWeekYearHelper.call(this,input,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy);}
function getSetISOWeekYear(input){return getSetWeekYearHelper.call(this,input,this.isoWeek(),this.isoWeekday(),1,4);}
function getISOWeeksInYear(){return weeksInYear(this.year(),1,4);}
function getWeeksInYear(){var weekInfo=this.localeData()._week;return weeksInYear(this.year(),weekInfo.dow,weekInfo.doy);}
function getSetWeekYearHelper(input,week,weekday,dow,doy){var weeksTarget;if(input==null){return weekOfYear(this,dow,doy).year;}else{weeksTarget=weeksInYear(input,dow,doy);if(week>weeksTarget){week=weeksTarget;}
return setWeekAll.call(this,input,week,weekday,dow,doy);}}
function setWeekAll(weekYear,week,weekday,dow,doy){var dayOfYearData=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy),date=createUTCDate(dayOfYearData.year,0,dayOfYearData.dayOfYear);this.year(date.getUTCFullYear());this.month(date.getUTCMonth());this.date(date.getUTCDate());return this;}
addFormatToken('Q',0,'Qo','quarter');addUnitAlias('quarter','Q');addUnitPriority('quarter',7);addRegexToken('Q',match1);addParseToken('Q',function(input,array){array[MONTH]=(toInt(input)-1)*3;});function getSetQuarter(input){return input==null?Math.ceil((this.month()+1)/3):this.month((input-1)*3+this.month()%3);}
addFormatToken('D',['DD',2],'Do','date');addUnitAlias('date','D');addUnitPriority('date',9);addRegexToken('D',match1to2);addRegexToken('DD',match1to2,match2);addRegexToken('Do',function(isStrict,locale){return isStrict?locale._ordinalParse:locale._ordinalParseLenient;});addParseToken(['D','DD'],DATE);addParseToken('Do',function(input,array){array[DATE]=toInt(input.match(match1to2)[0],10);});var getSetDayOfMonth=makeGetSet('Date',true);addFormatToken('DDD',['DDDD',3],'DDDo','dayOfYear');addUnitAlias('dayOfYear','DDD');addUnitPriority('dayOfYear',4);addRegexToken('DDD',match1to3);addRegexToken('DDDD',match3);addParseToken(['DDD','DDDD'],function(input,array,config){config._dayOfYear=toInt(input);});function getSetDayOfYear(input){var dayOfYear=Math.round((this.clone().startOf('day')-this.clone().startOf('year'))/864e5)+1;return input==null?dayOfYear:this.add((input-dayOfYear),'d');}
addFormatToken('m',['mm',2],0,'minute');addUnitAlias('minute','m');addUnitPriority('minute',14);addRegexToken('m',match1to2);addRegexToken('mm',match1to2,match2);addParseToken(['m','mm'],MINUTE);var getSetMinute=makeGetSet('Minutes',false);addFormatToken('s',['ss',2],0,'second');addUnitAlias('second','s');addUnitPriority('second',15);addRegexToken('s',match1to2);addRegexToken('ss',match1to2,match2);addParseToken(['s','ss'],SECOND);var getSetSecond=makeGetSet('Seconds',false);addFormatToken('S',0,0,function(){return~~(this.millisecond()/100);});addFormatToken(0,['SS',2],0,function(){return~~(this.millisecond()/10);});addFormatToken(0,['SSS',3],0,'millisecond');addFormatToken(0,['SSSS',4],0,function(){return this.millisecond()*10;});addFormatToken(0,['SSSSS',5],0,function(){return this.millisecond()*100;});addFormatToken(0,['SSSSSS',6],0,function(){return this.millisecond()*1000;});addFormatToken(0,['SSSSSSS',7],0,function(){return this.millisecond()*10000;});addFormatToken(0,['SSSSSSSS',8],0,function(){return this.millisecond()*100000;});addFormatToken(0,['SSSSSSSSS',9],0,function(){return this.millisecond()*1000000;});addUnitAlias('millisecond','ms');addUnitPriority('millisecond',16);addRegexToken('S',match1to3,match1);addRegexToken('SS',match1to3,match2);addRegexToken('SSS',match1to3,match3);var token;for(token='SSSS';token.length<=9;token+='S'){addRegexToken(token,matchUnsigned);}
function parseMs(input,array){array[MILLISECOND]=toInt(('0.'+input)*1000);}
for(token='S';token.length<=9;token+='S'){addParseToken(token,parseMs);}
var getSetMillisecond=makeGetSet('Milliseconds',false);addFormatToken('z',0,0,'zoneAbbr');addFormatToken('zz',0,0,'zoneName');function getZoneAbbr(){return this._isUTC?'UTC':'';}
function getZoneName(){return this._isUTC?'Coordinated Universal Time':'';}
var proto=Moment.prototype;proto.add=add;proto.calendar=calendar$1;proto.clone=clone;proto.diff=diff;proto.endOf=endOf;proto.format=format;proto.from=from;proto.fromNow=fromNow;proto.to=to;proto.toNow=toNow;proto.get=stringGet;proto.invalidAt=invalidAt;proto.isAfter=isAfter;proto.isBefore=isBefore;proto.isBetween=isBetween;proto.isSame=isSame;proto.isSameOrAfter=isSameOrAfter;proto.isSameOrBefore=isSameOrBefore;proto.isValid=isValid$1;proto.lang=lang;proto.locale=locale;proto.localeData=localeData;proto.max=prototypeMax;proto.min=prototypeMin;proto.parsingFlags=parsingFlags;proto.set=stringSet;proto.startOf=startOf;proto.subtract=subtract;proto.toArray=toArray;proto.toObject=toObject;proto.toDate=toDate;proto.toISOString=toISOString;proto.inspect=inspect;proto.toJSON=toJSON;proto.toString=toString;proto.unix=unix;proto.valueOf=valueOf;proto.creationData=creationData;proto.year=getSetYear;proto.isLeapYear=getIsLeapYear;proto.weekYear=getSetWeekYear;proto.isoWeekYear=getSetISOWeekYear;proto.quarter=proto.quarters=getSetQuarter;proto.month=getSetMonth;proto.daysInMonth=getDaysInMonth;proto.week=proto.weeks=getSetWeek;proto.isoWeek=proto.isoWeeks=getSetISOWeek;proto.weeksInYear=getWeeksInYear;proto.isoWeeksInYear=getISOWeeksInYear;proto.date=getSetDayOfMonth;proto.day=proto.days=getSetDayOfWeek;proto.weekday=getSetLocaleDayOfWeek;proto.isoWeekday=getSetISODayOfWeek;proto.dayOfYear=getSetDayOfYear;proto.hour=proto.hours=getSetHour;proto.minute=proto.minutes=getSetMinute;proto.second=proto.seconds=getSetSecond;proto.millisecond=proto.milliseconds=getSetMillisecond;proto.utcOffset=getSetOffset;proto.utc=setOffsetToUTC;proto.local=setOffsetToLocal;proto.parseZone=setOffsetToParsedOffset;proto.hasAlignedHourOffset=hasAlignedHourOffset;proto.isDST=isDaylightSavingTime;proto.isLocal=isLocal;proto.isUtcOffset=isUtcOffset;proto.isUtc=isUtc;proto.isUTC=isUtc;proto.zoneAbbr=getZoneAbbr;proto.zoneName=getZoneName;proto.dates=deprecate('dates accessor is deprecated. Use date instead.',getSetDayOfMonth);proto.months=deprecate('months accessor is deprecated. Use month instead',getSetMonth);proto.years=deprecate('years accessor is deprecated. Use year instead',getSetYear);proto.zone=deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',getSetZone);proto.isDSTShifted=deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',isDaylightSavingTimeShifted);function createUnix(input){return createLocal(input*1000);}
function createInZone(){return createLocal.apply(null,arguments).parseZone();}
function preParsePostFormat(string){return string;}
var proto$1=Locale.prototype;proto$1.calendar=calendar;proto$1.longDateFormat=longDateFormat;proto$1.invalidDate=invalidDate;proto$1.ordinal=ordinal;proto$1.preparse=preParsePostFormat;proto$1.postformat=preParsePostFormat;proto$1.relativeTime=relativeTime;proto$1.pastFuture=pastFuture;proto$1.set=set;proto$1.months=localeMonths;proto$1.monthsShort=localeMonthsShort;proto$1.monthsParse=localeMonthsParse;proto$1.monthsRegex=monthsRegex;proto$1.monthsShortRegex=monthsShortRegex;proto$1.week=localeWeek;proto$1.firstDayOfYear=localeFirstDayOfYear;proto$1.firstDayOfWeek=localeFirstDayOfWeek;proto$1.weekdays=localeWeekdays;proto$1.weekdaysMin=localeWeekdaysMin;proto$1.weekdaysShort=localeWeekdaysShort;proto$1.weekdaysParse=localeWeekdaysParse;proto$1.weekdaysRegex=weekdaysRegex;proto$1.weekdaysShortRegex=weekdaysShortRegex;proto$1.weekdaysMinRegex=weekdaysMinRegex;proto$1.isPM=localeIsPM;proto$1.meridiem=localeMeridiem;function get$1(format,index,field,setter){var locale=getLocale();var utc=createUTC().set(setter,index);return locale[field](utc,format);}
function listMonthsImpl(format,index,field){if(isNumber(format)){index=format;format=undefined;}
format=format||'';if(index!=null){return get$1(format,index,field,'month');}
var i;var out=[];for(i=0;i<12;i++){out[i]=get$1(format,i,field,'month');}
return out;}
function listWeekdaysImpl(localeSorted,format,index,field){if(typeof localeSorted==='boolean'){if(isNumber(format)){index=format;format=undefined;}
format=format||'';}else{format=localeSorted;index=format;localeSorted=false;if(isNumber(format)){index=format;format=undefined;}
format=format||'';}
var locale=getLocale(),shift=localeSorted?locale._week.dow:0;if(index!=null){return get$1(format,(index+shift)%7,field,'day');}
var i;var out=[];for(i=0;i<7;i++){out[i]=get$1(format,(i+shift)%7,field,'day');}
return out;}
function listMonths(format,index){return listMonthsImpl(format,index,'months');}
function listMonthsShort(format,index){return listMonthsImpl(format,index,'monthsShort');}
function listWeekdays(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,'weekdays');}
function listWeekdaysShort(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,'weekdaysShort');}
function listWeekdaysMin(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,'weekdaysMin');}
getSetGlobalLocale('en',{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(number){var b=number%10,output=(toInt(number%100/10)===1)?'th':(b===1)?'st':(b===2)?'nd':(b===3)?'rd':'th';return number+output;}});hooks.lang=deprecate('moment.lang is deprecated. Use moment.locale instead.',getSetGlobalLocale);hooks.langData=deprecate('moment.langData is deprecated. Use moment.localeData instead.',getLocale);var mathAbs=Math.abs;function abs(){var data=this._data;this._milliseconds=mathAbs(this._milliseconds);this._days=mathAbs(this._days);this._months=mathAbs(this._months);data.milliseconds=mathAbs(data.milliseconds);data.seconds=mathAbs(data.seconds);data.minutes=mathAbs(data.minutes);data.hours=mathAbs(data.hours);data.months=mathAbs(data.months);data.years=mathAbs(data.years);return this;}
function addSubtract$1(duration,input,value,direction){var other=createDuration(input,value);duration._milliseconds+=direction*other._milliseconds;duration._days+=direction*other._days;duration._months+=direction*other._months;return duration._bubble();}
function add$1(input,value){return addSubtract$1(this,input,value,1);}
function subtract$1(input,value){return addSubtract$1(this,input,value,-1);}
function absCeil(number){if(number<0){return Math.floor(number);}else{return Math.ceil(number);}}
function bubble(){var milliseconds=this._milliseconds;var days=this._days;var months=this._months;var data=this._data;var seconds,minutes,hours,years,monthsFromDays;if(!((milliseconds>=0&&days>=0&&months>=0)||(milliseconds<=0&&days<=0&&months<=0))){milliseconds+=absCeil(monthsToDays(months)+days)*864e5;days=0;months=0;}
data.milliseconds=milliseconds%1000;seconds=absFloor(milliseconds/1000);data.seconds=seconds%60;minutes=absFloor(seconds/60);data.minutes=minutes%60;hours=absFloor(minutes/60);data.hours=hours%24;days+=absFloor(hours/24);monthsFromDays=absFloor(daysToMonths(days));months+=monthsFromDays;days-=absCeil(monthsToDays(monthsFromDays));years=absFloor(months/12);months%=12;data.days=days;data.months=months;data.years=years;return this;}
function daysToMonths(days){return days*4800/146097;}
function monthsToDays(months){return months*146097/4800;}
function as(units){var days;var months;var milliseconds=this._milliseconds;units=normalizeUnits(units);if(units==='month'||units==='year'){days=this._days+milliseconds/864e5;months=this._months+daysToMonths(days);return units==='month'?months:months/12;}else{days=this._days+Math.round(monthsToDays(this._months));switch(units){case'week':return days/7+milliseconds/6048e5;case'day':return days+milliseconds/864e5;case'hour':return days*24+milliseconds/36e5;case'minute':return days*1440+milliseconds/6e4;case'second':return days*86400+milliseconds/1000;case'millisecond':return Math.floor(days*864e5)+milliseconds;default:throw new Error('Unknown unit '+units);}}}
function valueOf$1(){return(this._milliseconds+
this._days*864e5+
(this._months%12)*2592e6+
toInt(this._months/12)*31536e6);}
function makeAs(alias){return function(){return this.as(alias);};}
var asMilliseconds=makeAs('ms');var asSeconds=makeAs('s');var asMinutes=makeAs('m');var asHours=makeAs('h');var asDays=makeAs('d');var asWeeks=makeAs('w');var asMonths=makeAs('M');var asYears=makeAs('y');function get$2(units){units=normalizeUnits(units);return this[units+'s']();}
function makeGetter(name){return function(){return this._data[name];};}
var milliseconds=makeGetter('milliseconds');var seconds=makeGetter('seconds');var minutes=makeGetter('minutes');var hours=makeGetter('hours');var days=makeGetter('days');var months=makeGetter('months');var years=makeGetter('years');function weeks(){return absFloor(this.days()/7);}
var round=Math.round;var thresholds={s:45,m:45,h:22,d:26,M:11};function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}
function relativeTime$1(posNegDuration,withoutSuffix,locale){var duration=createDuration(posNegDuration).abs();var seconds=round(duration.as('s'));var minutes=round(duration.as('m'));var hours=round(duration.as('h'));var days=round(duration.as('d'));var months=round(duration.as('M'));var years=round(duration.as('y'));var a=seconds<thresholds.s&&['s',seconds]||minutes<=1&&['m']||minutes<thresholds.m&&['mm',minutes]||hours<=1&&['h']||hours<thresholds.h&&['hh',hours]||days<=1&&['d']||days<thresholds.d&&['dd',days]||months<=1&&['M']||months<thresholds.M&&['MM',months]||years<=1&&['y']||['yy',years];a[2]=withoutSuffix;a[3]=+posNegDuration>0;a[4]=locale;return substituteTimeAgo.apply(null,a);}
function getSetRelativeTimeRounding(roundingFunction){if(roundingFunction===undefined){return round;}
if(typeof(roundingFunction)==='function'){round=roundingFunction;return true;}
return false;}
function getSetRelativeTimeThreshold(threshold,limit){if(thresholds[threshold]===undefined){return false;}
if(limit===undefined){return thresholds[threshold];}
thresholds[threshold]=limit;return true;}
function humanize(withSuffix){var locale=this.localeData();var output=relativeTime$1(this,!withSuffix,locale);if(withSuffix){output=locale.pastFuture(+this,output);}
return locale.postformat(output);}
var abs$1=Math.abs;function toISOString$1(){var seconds=abs$1(this._milliseconds)/1000;var days=abs$1(this._days);var months=abs$1(this._months);var minutes,hours,years;minutes=absFloor(seconds/60);hours=absFloor(minutes/60);seconds%=60;minutes%=60;years=absFloor(months/12);months%=12;var Y=years;var M=months;var D=days;var h=hours;var m=minutes;var s=seconds;var total=this.asSeconds();if(!total){return'P0D';}
return(total<0?'-':'')+'P'+
(Y?Y+'Y':'')+
(M?M+'M':'')+
(D?D+'D':'')+
((h||m||s)?'T':'')+
(h?h+'H':'')+
(m?m+'M':'')+
(s?s+'S':'');}
var proto$2=Duration.prototype;proto$2.abs=abs;proto$2.add=add$1;proto$2.subtract=subtract$1;proto$2.as=as;proto$2.asMilliseconds=asMilliseconds;proto$2.asSeconds=asSeconds;proto$2.asMinutes=asMinutes;proto$2.asHours=asHours;proto$2.asDays=asDays;proto$2.asWeeks=asWeeks;proto$2.asMonths=asMonths;proto$2.asYears=asYears;proto$2.valueOf=valueOf$1;proto$2._bubble=bubble;proto$2.get=get$2;proto$2.milliseconds=milliseconds;proto$2.seconds=seconds;proto$2.minutes=minutes;proto$2.hours=hours;proto$2.days=days;proto$2.weeks=weeks;proto$2.months=months;proto$2.years=years;proto$2.humanize=humanize;proto$2.toISOString=toISOString$1;proto$2.toString=toISOString$1;proto$2.toJSON=toISOString$1;proto$2.locale=locale;proto$2.localeData=localeData;proto$2.toIsoString=deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',toISOString$1);proto$2.lang=lang;addFormatToken('X',0,0,'unix');addFormatToken('x',0,0,'valueOf');addRegexToken('x',matchSigned);addRegexToken('X',matchTimestamp);addParseToken('X',function(input,array,config){config._d=new Date(parseFloat(input,10)*1000);});addParseToken('x',function(input,array,config){config._d=new Date(toInt(input));});hooks.version='2.17.1';setHookCallback(createLocal);hooks.fn=proto;hooks.min=min;hooks.max=max;hooks.now=now;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto;return hooks;})));;

/* /web/static/lib/jquery/jquery.js defined in bundle 'web.assets_common' */
(function(global,factory){"use strict";if(typeof module==="object"&&typeof module.exports==="object"){module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document");}
return factory(w);};}else{factory(global);}})(typeof window!=="undefined"?window:this,function(window,noGlobal){"use strict";var arr=[];var document=window.document;var getProto=Object.getPrototypeOf;var slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var fnToString=hasOwn.toString;var ObjectFunctionString=fnToString.call(Object);var support={};var isFunction=function isFunction(obj){return typeof obj==="function"&&typeof obj.nodeType!=="number";};var isWindow=function isWindow(obj){return obj!=null&&obj===obj.window;};var preservedScriptAttributes={type:true,src:true,noModule:true};function DOMEval(code,doc,node){doc=doc||document;var i,script=doc.createElement("script");script.text=code;if(node){for(i in preservedScriptAttributes){if(node[i]){script[i]=node[i];}}}
doc.head.appendChild(script).parentNode.removeChild(script);}
function toType(obj){if(obj==null){return obj+"";}
return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj;}
var
version="3.3.1",jQuery=function(selector,context){return new jQuery.fn.init(selector,context);},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,length:0,toArray:function(){return slice.call(this);},get:function(num){if(num==null){return slice.call(this);}
return num<0?this[num+this.length]:this[num];},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;return ret;},each:function(callback){return jQuery.each(this,callback);},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},slice:function(){return this.pushStack(slice.apply(this,arguments));},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[]);},end:function(){return this.prevObject||this.constructor();},push:push,sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[i]||{};i++;}
if(typeof target!=="object"&&!isFunction(target)){target={};}
if(i===length){target=this;i--;}
for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue;}
if(deep&&copy&&(jQuery.isPlainObject(copy)||(copyIsArray=Array.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&Array.isArray(src)?src:[];}else{clone=src&&jQuery.isPlainObject(src)?src:{};}
target[name]=jQuery.extend(deep,clone,copy);}else if(copy!==undefined){target[name]=copy;}}}}
return target;};jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:true,error:function(msg){throw new Error(msg);},noop:function(){},isPlainObject:function(obj){var proto,Ctor;if(!obj||toString.call(obj)!=="[object Object]"){return false;}
proto=getProto(obj);if(!proto){return true;}
Ctor=hasOwn.call(proto,"constructor")&&proto.constructor;return typeof Ctor==="function"&&fnToString.call(Ctor)===ObjectFunctionString;},isEmptyObject:function(obj){var name;for(name in obj){return false;}
return true;},globalEval:function(code){DOMEval(code);},each:function(obj,callback){var length,i=0;if(isArrayLike(obj)){length=obj.length;for(;i<length;i++){if(callback.call(obj[i],i,obj[i])===false){break;}}}else{for(i in obj){if(callback.call(obj[i],i,obj[i])===false){break;}}}
return obj;},trim:function(text){return text==null?"":(text+"").replace(rtrim,"");},makeArray:function(arr,results){var ret=results||[];if(arr!=null){if(isArrayLike(Object(arr))){jQuery.merge(ret,typeof arr==="string"?[arr]:arr);}else{push.call(ret,arr);}}
return ret;},inArray:function(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i);},merge:function(first,second){var len=+second.length,j=0,i=first.length;for(;j<len;j++){first[i++]=second[j];}
first.length=i;return first;},grep:function(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i]);}}
return matches;},map:function(elems,callback,arg){var length,value,i=0,ret=[];if(isArrayLike(elems)){length=elems.length;for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret.push(value);}}}else{for(i in elems){value=callback(elems[i],i,arg);if(value!=null){ret.push(value);}}}
return concat.apply([],ret);},guid:1,support:support});if(typeof Symbol==="function"){jQuery.fn[Symbol.iterator]=arr[Symbol.iterator];}
jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase();});function isArrayLike(obj){var length=!!obj&&"length"in obj&&obj.length,type=toType(obj);if(isFunction(obj)||isWindow(obj)){return false;}
return type==="array"||length===0||typeof length==="number"&&length>0&&(length-1)in obj;}
var Sizzle=(function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date(),preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true;}
return 0;},hasOwn=({}).hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){var i=0,len=list.length;for(;i<len;i++){if(list[i]===elem){return i;}}
return-1;},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",identifier="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+identifier+")(?:\\(("+"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+".*"+")\\)|)",rwhitespace=new RegExp(whitespace+"+","g"),rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={"ID":new RegExp("^#("+identifier+")"),"CLASS":new RegExp("^\\.("+identifier+")"),"TAG":new RegExp("^("+identifier+"|[*])"),"ATTR":new RegExp("^"+attributes),"PSEUDO":new RegExp("^"+pseudos),"CHILD":new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),"bool":new RegExp("^(?:"+booleans+")$","i"),"needsContext":new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+
whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-0x10000;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+0x10000):String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);},rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,fcssescape=function(ch,asCodePoint){if(asCodePoint){if(ch==="\0"){return"\uFFFD";}
return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ";}
return"\\"+ch;},unloadHandler=function(){setDocument();},disabledAncestor=addCombinator(function(elem){return elem.disabled===true&&("form"in elem||"label"in elem);},{dir:"parentNode",next:"legend"});try{push.apply((arr=slice.call(preferredDoc.childNodes)),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType;}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els));}:function(target,els){var j=target.length,i=0;while((target[j++]=els[i++])){}
target.length=j-1;}};}
function Sizzle(selector,context,results,seed){var m,i,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;results=results||[];if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results;}
if(!seed){if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context);}
context=context||document;if(documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if((m=match[1])){if(nodeType===9){if((elem=context.getElementById(m))){if(elem.id===m){results.push(elem);return results;}}else{return results;}}else{if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results;}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results;}else if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results;}}
if(support.qsa&&!compilerCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nodeType!==1){newContext=context;newSelector=selector;}else if(context.nodeName.toLowerCase()!=="object"){if((nid=context.getAttribute("id"))){nid=nid.replace(rcssescape,fcssescape);}else{context.setAttribute("id",(nid=expando));}
groups=tokenize(selector);i=groups.length;while(i--){groups[i]="#"+nid+" "+toSelector(groups[i]);}
newSelector=groups.join(",");newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;}
if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results;}catch(qsaError){}finally{if(nid===expando){context.removeAttribute("id");}}}}}}
return select(selector.replace(rtrim,"$1"),context,results,seed);}
function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()];}
return(cache[key+" "]=value);}
return cache;}
function markFunction(fn){fn[expando]=true;return fn;}
function assert(fn){var el=document.createElement("fieldset");try{return!!fn(el);}catch(e){return false;}finally{if(el.parentNode){el.parentNode.removeChild(el);}
el=null;}}
function addHandle(attrs,handler){var arr=attrs.split("|"),i=arr.length;while(i--){Expr.attrHandle[arr[i]]=handler;}}
function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&a.sourceIndex-b.sourceIndex;if(diff){return diff;}
if(cur){while((cur=cur.nextSibling)){if(cur===b){return-1;}}}
return a?1:-1;}
function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type;};}
function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type;};}
function createDisabledPseudo(disabled){return function(elem){if("form"in elem){if(elem.parentNode&&elem.disabled===false){if("label"in elem){if("label"in elem.parentNode){return elem.parentNode.disabled===disabled;}else{return elem.disabled===disabled;}}
return elem.isDisabled===disabled||elem.isDisabled!==!disabled&&disabledAncestor(elem)===disabled;}
return elem.disabled===disabled;}else if("label"in elem){return elem.disabled===disabled;}
return false;};}
function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[(j=matchIndexes[i])]){seed[j]=!(matches[j]=seed[j]);}}});});}
function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context;}
support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};setDocument=Sizzle.setDocument=function(node){var hasCompare,subWindow,doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document;}
document=doc;docElem=document.documentElement;documentIsHTML=!isXML(document);if(preferredDoc!==document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow){if(subWindow.addEventListener){subWindow.addEventListener("unload",unloadHandler,false);}else if(subWindow.attachEvent){subWindow.attachEvent("onunload",unloadHandler);}}
support.attributes=assert(function(el){el.className="i";return!el.getAttribute("className");});support.getElementsByTagName=assert(function(el){el.appendChild(document.createComment(""));return!el.getElementsByTagName("*").length;});support.getElementsByClassName=rnative.test(document.getElementsByClassName);support.getById=assert(function(el){docElem.appendChild(el).id=expando;return!document.getElementsByName||!document.getElementsByName(expando).length;});if(support.getById){Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId;};};Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var elem=context.getElementById(id);return elem?[elem]:[];}};}else{Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId;};};Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var node,i,elems,elem=context.getElementById(id);if(elem){node=elem.getAttributeNode("id");if(node&&node.value===id){return[elem];}
elems=context.getElementsByName(id);i=0;while((elem=elems[i++])){node=elem.getAttributeNode("id");if(node&&node.value===id){return[elem];}}}
return[];}};}
Expr.find["TAG"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag);}else if(support.qsa){return context.querySelectorAll(tag);}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while((elem=results[i++])){if(elem.nodeType===1){tmp.push(elem);}}
return tmp;}
return results;};Expr.find["CLASS"]=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){return context.getElementsByClassName(className);}};rbuggyMatches=[];rbuggyQSA=[];if((support.qsa=rnative.test(document.querySelectorAll))){assert(function(el){docElem.appendChild(el).innerHTML="<a id='"+expando+"'></a>"+"<select id='"+expando+"-\r\\' msallowcapture=''>"+"<option selected=''></option></select>";if(el.querySelectorAll("[msallowcapture^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")");}
if(!el.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");}
if(!el.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=");}
if(!el.querySelectorAll(":checked").length){rbuggyQSA.push(":checked");}
if(!el.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]");}});assert(function(el){el.innerHTML="<a href='' disabled='disabled'></a>"+"<select disabled='disabled'><option/></select>";var input=document.createElement("input");input.setAttribute("type","hidden");el.appendChild(input).setAttribute("name","D");if(el.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=");}
if(el.querySelectorAll(":enabled").length!==2){rbuggyQSA.push(":enabled",":disabled");}
docElem.appendChild(el).disabled=true;if(el.querySelectorAll(":disabled").length!==2){rbuggyQSA.push(":enabled",":disabled");}
el.querySelectorAll("*,:x");rbuggyQSA.push(",.*:");});}
if((support.matchesSelector=rnative.test((matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)))){assert(function(el){support.disconnectedMatch=matches.call(el,"*");matches.call(el,"[s!='']:x");rbuggyMatches.push("!=",pseudos);});}
rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16));}:function(a,b){if(b){while((b=b.parentNode)){if(b===a){return true;}}}
return false;};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0;}
var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare;}
compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){if(a===document||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1;}
if(b===document||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1;}
return sortInput?(indexOf(sortInput,a)-indexOf(sortInput,b)):0;}
return compare&4?-1:1;}:function(a,b){if(a===b){hasDuplicate=true;return 0;}
var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===document?-1:b===document?1:aup?-1:bup?1:sortInput?(indexOf(sortInput,a)-indexOf(sortInput,b)):0;}else if(aup===bup){return siblingCheck(a,b);}
cur=a;while((cur=cur.parentNode)){ap.unshift(cur);}
cur=b;while((cur=cur.parentNode)){bp.unshift(cur);}
while(ap[i]===bp[i]){i++;}
return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0;};return document;};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements);};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem);}
expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&!compilerCache[expr+" "]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret;}}catch(e){}}
return Sizzle(expr,document,null,[elem]).length>0;};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context);}
return contains(context,elem);};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem);}
var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null;};Sizzle.escape=function(sel){return(sel+"").replace(rcssescape,fcssescape);};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while((elem=results[i++])){if(elem===results[i]){j=duplicates.push(i);}}
while(j--){results.splice(duplicates[j],1);}}
sortInput=null;return results;};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while((node=elem[i++])){ret+=getText(node);}}else if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent;}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem);}}}else if(nodeType===3||nodeType===4){return elem.nodeValue;}
return ret;};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{"ATTR":function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" ";}
return match.slice(0,4);},"CHILD":function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0]);}
match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+((match[7]+match[8])||match[3]==="odd");}else if(match[3]){Sizzle.error(match[0]);}
return match;},"PSEUDO":function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr["CHILD"].test(match[0])){return null;}
if(match[3]){match[2]=match[4]||match[5]||"";}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess);}
return match.slice(0,3);}},filter:{"TAG":function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true;}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName;};},"CLASS":function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"");});},"ATTR":function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!=";}
if(!operator){return true;}
result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false;};},"CHILD":function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode;}:function(elem,context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent){if(simple){while(dir){node=elem;while((node=node[dir])){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false;}}
start=dir=type==="only"&&!start&&"nextSibling";}
return true;}
start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){node=parent;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if(node.nodeType===1&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break;}}}else{if(useCache){node=elem;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex;}
if(diff===false){while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});uniqueCache[type]=[dirruns,diff];}
if(node===elem){break;}}}}}
diff-=last;return diff===first||(diff%first===0&&diff/first>=0);}};},"PSEUDO":function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument);}
if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i]);}}):function(elem){return fn(elem,0,args);};}
return fn;}},pseudos:{"not":markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if((elem=unmatched[i])){seed[i]=!(matches[i]=elem);}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop();};}),"has":markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0;};}),"contains":markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1;};}),"lang":markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang);}
lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if((elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0;}}while((elem=elem.parentNode)&&elem.nodeType===1);return false;};}),"target":function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id;},"root":function(elem){return elem===docElem;},"focus":function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex);},"enabled":createDisabledPseudo(false),"disabled":createDisabledPseudo(true),"checked":function(elem){var nodeName=elem.nodeName.toLowerCase();return(nodeName==="input"&&!!elem.checked)||(nodeName==="option"&&!!elem.selected);},"selected":function(elem){if(elem.parentNode){elem.parentNode.selectedIndex;}
return elem.selected===true;},"empty":function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false;}}
return true;},"parent":function(elem){return!Expr.pseudos["empty"](elem);},"header":function(elem){return rheader.test(elem.nodeName);},"input":function(elem){return rinputs.test(elem.nodeName);},"button":function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button";},"text":function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text");},"first":createPositionalPseudo(function(){return[0];}),"last":createPositionalPseudo(function(matchIndexes,length){return[length-1];}),"eq":createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument];}),"even":createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i<length;i+=2){matchIndexes.push(i);}
return matchIndexes;}),"odd":createPositionalPseudo(function(matchIndexes,length){var i=1;for(;i<length;i+=2){matchIndexes.push(i);}
return matchIndexes;}),"lt":createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;--i>=0;){matchIndexes.push(i);}
return matchIndexes;}),"gt":createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i<length;){matchIndexes.push(i);}
return matchIndexes;})}};Expr.pseudos["nth"]=Expr.pseudos["eq"];for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i]=createInputPseudo(i);}
for(i in{submit:true,reset:true}){Expr.pseudos[i]=createButtonPseudo(i);}
function setFilters(){}
setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters();tokenize=Sizzle.tokenize=function(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached){return parseOnly?0:cached.slice(0);}
soFar=selector;groups=[];preFilters=Expr.preFilter;while(soFar){if(!matched||(match=rcomma.exec(soFar))){if(match){soFar=soFar.slice(match[0].length)||soFar;}
groups.push((tokens=[]));}
matched=false;if((match=rcombinators.exec(soFar))){matched=match.shift();tokens.push({value:matched,type:match[0].replace(rtrim," ")});soFar=soFar.slice(matched.length);}
for(type in Expr.filter){if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length);}}
if(!matched){break;}}
return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0);};function toSelector(tokens){var i=0,len=tokens.length,selector="";for(;i<len;i++){selector+=tokens[i].value;}
return selector;}
function addCombinator(matcher,combinator,base){var dir=combinator.dir,skip=combinator.next,key=skip||dir,checkNonElements=base&&key==="parentNode",doneName=done++;return combinator.first?function(elem,context,xml){while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml);}}
return false;}:function(elem,context,xml){var oldCache,uniqueCache,outerCache,newCache=[dirruns,doneName];if(xml){while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true;}}}}else{while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});uniqueCache=outerCache[elem.uniqueID]||(outerCache[elem.uniqueID]={});if(skip&&skip===elem.nodeName.toLowerCase()){elem=elem[dir]||elem;}else if((oldCache=uniqueCache[key])&&oldCache[0]===dirruns&&oldCache[1]===doneName){return(newCache[2]=oldCache[2]);}else{uniqueCache[key]=newCache;if((newCache[2]=matcher(elem,context,xml))){return true;}}}}}
return false;};}
function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false;}}
return true;}:matchers[0];}
function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i<len;i++){Sizzle(selector,contexts[i],results);}
return results;}
function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i<len;i++){if((elem=unmatched[i])){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i);}}}}
return newUnmatched;}
function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter);}
if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector);}
return markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems,matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher){matcher(matcherIn,matcherOut,context,xml);}
if(postFilter){temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);i=temp.length;while(i--){if((elem=temp[i])){matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem);}}}
if(seed){if(postFinder||preFilter){if(postFinder){temp=[];i=matcherOut.length;while(i--){if((elem=matcherOut[i])){temp.push((matcherIn[i]=elem));}}
postFinder(null,(matcherOut=[]),temp,xml);}
i=matcherOut.length;while(i--){if((elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1){seed[temp]=!(results[temp]=elem);}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml);}else{push.apply(results,matcherOut);}}});}
function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext;},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1;},implicitRelative,true),matchers=[function(elem,context,xml){var ret=(!leadingRelative&&(xml||context!==outermostContext))||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret;}];for(;i<len;i++){if((matcher=Expr.relative[tokens[i].type])){matchers=[addCombinator(elementMatcher(matchers),matcher)];}else{matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);if(matcher[expando]){j=++i;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break;}}
return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens((tokens=tokens.slice(j))),j<len&&toSelector(tokens));}
matchers.push(matcher);}}
return elementMatcher(matchers);}
function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find["TAG"]("*",outermost),dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1),len=elems.length;if(outermost){outermostContext=context===document||context||outermost;}
for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;if(!context&&elem.ownerDocument!==document){setDocument(elem);xml=!documentIsHTML;}
while((matcher=elementMatchers[j++])){if(matcher(elem,context||document,xml)){results.push(elem);break;}}
if(outermost){dirruns=dirrunsUnique;}}
if(bySet){if((elem=!matcher&&elem)){matchedCount--;}
if(seed){unmatched.push(elem);}}}
matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while((matcher=setMatchers[j++])){matcher(unmatched,setMatched,context,xml);}
if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results);}}}
setMatched=condense(setMatched);}
push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&(matchedCount+setMatchers.length)>1){Sizzle.uniqueSort(results);}}
if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup;}
return unmatched;};return bySet?markFunction(superMatcher):superMatcher;}
compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector);}
i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached);}else{elementMatchers.push(cached);}}
cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector;}
return cached;};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize((selector=compiled.selector||selector));results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find["ID"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results;}else if(compiled){context=context.parentNode;}
selector=selector.slice(tokens.shift().value.length);}
i=matchExpr["needsContext"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[(type=token.type)]){break;}
if((find=Expr.find[type])){if((seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results;}
break;}}}}
(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context);return results;};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(el){return el.compareDocumentPosition(document.createElement("fieldset"))&1;});if(!assert(function(el){el.innerHTML="<a href='#'></a>";return el.firstChild.getAttribute("href")==="#";})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2);}});}
if(!support.attributes||!assert(function(el){el.innerHTML="<input/>";el.firstChild.setAttribute("value","");return el.firstChild.getAttribute("value")==="";})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue;}});}
if(!assert(function(el){return el.getAttribute("disabled")==null;})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null;}});}
return Sizzle;})(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.uniqueSort=jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;jQuery.escapeSelector=Sizzle.escape;var dir=function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break;}
matched.push(elem);}}
return matched;};var siblings=function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n);}}
return matched;};var rneedsContext=jQuery.expr.match.needsContext;function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase();};var rsingleTag=(/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i);function winnow(elements,qualifier,not){if(isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not;});}
if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return(elem===qualifier)!==not;});}
if(typeof qualifier!=="string"){return jQuery.grep(elements,function(elem){return(indexOf.call(qualifier,elem)>-1)!==not;});}
return jQuery.filter(qualifier,elements,not);}
jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")";}
if(elems.length===1&&elem.nodeType===1){return jQuery.find.matchesSelector(elem,expr)?[elem]:[];}
return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1;}));};jQuery.fn.extend({find:function(selector){var i,ret,len=this.length,self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++){if(jQuery.contains(self[i],this)){return true;}}}));}
ret=this.pushStack([]);for(i=0;i<len;i++){jQuery.find(selector,self[i],ret);}
return len>1?jQuery.uniqueSort(ret):ret;},filter:function(selector){return this.pushStack(winnow(this,selector||[],false));},not:function(selector){return this.pushStack(winnow(this,selector||[],true));},is:function(selector){return!!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length;}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector){return this;}
root=root||rootjQuery;if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){match=[null,selector,null];}else{match=rquickExpr.exec(selector);}
if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(isFunction(this[match])){this[match](context[match]);}else{this.attr(match,context[match]);}}}
return this;}else{elem=document.getElementById(match[2]);if(elem){this[0]=elem;this.length=1;}
return this;}}else if(!context||context.jquery){return(context||root).find(selector);}else{return this.constructor(context).find(selector);}}else if(selector.nodeType){this[0]=selector;this.length=1;return this;}else if(isFunction(selector)){return root.ready!==undefined?root.ready(selector):selector(jQuery);}
return jQuery.makeArray(selector,this);};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i<l;i++){if(jQuery.contains(this,targets[i])){return true;}}});},closest:function(selectors,context){var cur,i=0,l=this.length,matched=[],targets=typeof selectors!=="string"&&jQuery(selectors);if(!rneedsContext.test(selectors)){for(;i<l;i++){for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){if(cur.nodeType<11&&(targets?targets.index(cur)>-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break;}}}}
return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched);},index:function(elem){if(!elem){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1;}
if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0]);}
return indexOf.call(this,elem.jquery?elem[0]:elem);},add:function(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))));},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector));}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}
return cur;}
jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return dir(elem,"parentNode",until);},next:function(elem){return sibling(elem,"nextSibling");},prev:function(elem){return sibling(elem,"previousSibling");},nextAll:function(elem){return dir(elem,"nextSibling");},prevAll:function(elem){return dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return dir(elem,"previousSibling",until);},siblings:function(elem){return siblings((elem.parentNode||{}).firstChild,elem);},children:function(elem){return siblings(elem.firstChild);},contents:function(elem){if(nodeName(elem,"iframe")){return elem.contentDocument;}
if(nodeName(elem,"template")){elem=elem.content||elem;}
return jQuery.merge([],elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until;}
if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched);}
if(this.length>1){if(!guaranteedUnique[name]){jQuery.uniqueSort(matched);}
if(rparentsprev.test(name)){matched.reverse();}}
return this.pushStack(matched);};});var rnothtmlwhite=(/[^\x20\t\r\n\f]+/g);function createOptions(options){var object={};jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){object[flag]=true;});return object;}
jQuery.Callbacks=function(options){options=typeof options==="string"?createOptions(options):jQuery.extend({},options);var
firing,memory,fired,locked,list=[],queue=[],firingIndex=-1,fire=function(){locked=locked||options.once;fired=firing=true;for(;queue.length;firingIndex=-1){memory=queue.shift();while(++firingIndex<list.length){if(list[firingIndex].apply(memory[0],memory[1])===false&&options.stopOnFalse){firingIndex=list.length;memory=false;}}}
if(!options.memory){memory=false;}
firing=false;if(locked){if(memory){list=[];}else{list="";}}},self={add:function(){if(list){if(memory&&!firing){firingIndex=list.length-1;queue.push(memory);}
(function add(args){jQuery.each(args,function(_,arg){if(isFunction(arg)){if(!options.unique||!self.has(arg)){list.push(arg);}}else if(arg&&arg.length&&toType(arg)!=="string"){add(arg);}});})(arguments);if(memory&&!firing){fire();}}
return this;},remove:function(){jQuery.each(arguments,function(_,arg){var index;while((index=jQuery.inArray(arg,list,index))>-1){list.splice(index,1);if(index<=firingIndex){firingIndex--;}}});return this;},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0;},empty:function(){if(list){list=[];}
return this;},disable:function(){locked=queue=[];list=memory="";return this;},disabled:function(){return!list;},lock:function(){locked=queue=[];if(!memory&&!firing){list=memory="";}
return this;},locked:function(){return!!locked;},fireWith:function(context,args){if(!locked){args=args||[];args=[context,args.slice?args.slice():args];queue.push(args);if(!firing){fire();}}
return this;},fire:function(){self.fireWith(this,arguments);return this;},fired:function(){return!!fired;}};return self;};function Identity(v){return v;}
function Thrower(ex){throw ex;}
function adoptValue(value,resolve,reject,noValue){var method;try{if(value&&isFunction((method=value.promise))){method.call(value).done(resolve).fail(reject);}else if(value&&isFunction((method=value.then))){method.call(value,resolve,reject);}else{resolve.apply(undefined,[value].slice(noValue));}}catch(value){reject.apply(undefined,[value]);}}
jQuery.extend({Deferred:function(func){var tuples=[["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],state="pending",promise={state:function(){return state;},always:function(){deferred.done(arguments).fail(arguments);return this;},"catch":function(fn){return promise.then(null,fn);},pipe:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&isFunction(returned.promise)){returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);}else{newDefer[tuple[0]+"With"](this,fn?[returned]:arguments);}});});fns=null;}).promise();},then:function(onFulfilled,onRejected,onProgress){var maxDepth=0;function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function(){var returned,then;if(depth<maxDepth){return;}
returned=handler.apply(that,args);if(returned===deferred.promise()){throw new TypeError("Thenable self-resolution");}
then=returned&&(typeof returned==="object"||typeof returned==="function")&&returned.then;if(isFunction(then)){if(special){then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special));}else{maxDepth++;then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special),resolve(maxDepth,deferred,Identity,deferred.notifyWith));}}else{if(handler!==Identity){that=undefined;args=[returned];}
(special||deferred.resolveWith)(that,args);}},process=special?mightThrow:function(){try{mightThrow();}catch(e){if(jQuery.Deferred.exceptionHook){jQuery.Deferred.exceptionHook(e,process.stackTrace);}
if(depth+1>=maxDepth){if(handler!==Thrower){that=undefined;args=[e];}
deferred.rejectWith(that,args);}}};if(depth){process();}else{if(jQuery.Deferred.getStackHook){process.stackTrace=jQuery.Deferred.getStackHook();}
window.setTimeout(process);}};}
return jQuery.Deferred(function(newDefer){tuples[0][3].add(resolve(0,newDefer,isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith));tuples[1][3].add(resolve(0,newDefer,isFunction(onFulfilled)?onFulfilled:Identity));tuples[2][3].add(resolve(0,newDefer,isFunction(onRejected)?onRejected:Thrower));}).promise();},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise;}},deferred={};jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[5];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString;},tuples[3-i][2].disable,tuples[3-i][3].disable,tuples[0][2].lock,tuples[0][3].lock);}
list.add(tuple[3].fire);deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?undefined:this,arguments);return this;};deferred[tuple[0]+"With"]=list.fireWith;});promise.promise(deferred);if(func){func.call(deferred,deferred);}
return deferred;},when:function(singleValue){var
remaining=arguments.length,i=remaining,resolveContexts=Array(i),resolveValues=slice.call(arguments),master=jQuery.Deferred(),updateFunc=function(i){return function(value){resolveContexts[i]=this;resolveValues[i]=arguments.length>1?slice.call(arguments):value;if(!(--remaining)){master.resolveWith(resolveContexts,resolveValues);}};};if(remaining<=1){adoptValue(singleValue,master.done(updateFunc(i)).resolve,master.reject,!remaining);if(master.state()==="pending"||isFunction(resolveValues[i]&&resolveValues[i].then)){return master.then();}}
while(i--){adoptValue(resolveValues[i],updateFunc(i),master.reject);}
return master.promise();}});var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(error,stack){if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){window.console.warn("jQuery.Deferred exception: "+error.message,error.stack,stack);}};jQuery.readyException=function(error){window.setTimeout(function(){throw error;});};var readyList=jQuery.Deferred();jQuery.fn.ready=function(fn){readyList.then(fn).catch(function(error){jQuery.readyException(error);});return this;};jQuery.extend({isReady:false,readyWait:1,ready:function(wait){if(wait===true?--jQuery.readyWait:jQuery.isReady){return;}
jQuery.isReady=true;if(wait!==true&&--jQuery.readyWait>0){return;}
readyList.resolveWith(document,[jQuery]);}});jQuery.ready.then=readyList.then;function completed(){document.removeEventListener("DOMContentLoaded",completed);window.removeEventListener("load",completed);jQuery.ready();}
if(document.readyState==="complete"||(document.readyState!=="loading"&&!document.documentElement.doScroll)){window.setTimeout(jQuery.ready);}else{document.addEventListener("DOMContentLoaded",completed);window.addEventListener("load",completed);}
var access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(toType(key)==="object"){chainable=true;for(i in key){access(elems,fn,i,key[i],true,emptyGet,raw);}}else if(value!==undefined){chainable=true;if(!isFunction(value)){raw=true;}
if(bulk){if(raw){fn.call(elems,value);fn=null;}else{bulk=fn;fn=function(elem,key,value){return bulk.call(jQuery(elem),value);};}}
if(fn){for(;i<len;i++){fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)));}}}
if(chainable){return elems;}
if(bulk){return fn.call(elems);}
return len?fn(elems[0],key):emptyGet;};var rmsPrefix=/^-ms-/,rdashAlpha=/-([a-z])/g;function fcamelCase(all,letter){return letter.toUpperCase();}
function camelCase(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);}
var acceptData=function(owner){return owner.nodeType===1||owner.nodeType===9||!(+owner.nodeType);};function Data(){this.expando=jQuery.expando+Data.uid++;}
Data.uid=1;Data.prototype={cache:function(owner){var value=owner[this.expando];if(!value){value={};if(acceptData(owner)){if(owner.nodeType){owner[this.expando]=value;}else{Object.defineProperty(owner,this.expando,{value:value,configurable:true});}}}
return value;},set:function(owner,data,value){var prop,cache=this.cache(owner);if(typeof data==="string"){cache[camelCase(data)]=value;}else{for(prop in data){cache[camelCase(prop)]=data[prop];}}
return cache;},get:function(owner,key){return key===undefined?this.cache(owner):owner[this.expando]&&owner[this.expando][camelCase(key)];},access:function(owner,key,value){if(key===undefined||((key&&typeof key==="string")&&value===undefined)){return this.get(owner,key);}
this.set(owner,key,value);return value!==undefined?value:key;},remove:function(owner,key){var i,cache=owner[this.expando];if(cache===undefined){return;}
if(key!==undefined){if(Array.isArray(key)){key=key.map(camelCase);}else{key=camelCase(key);key=key in cache?[key]:(key.match(rnothtmlwhite)||[]);}
i=key.length;while(i--){delete cache[key[i]];}}
if(key===undefined||jQuery.isEmptyObject(cache)){if(owner.nodeType){owner[this.expando]=undefined;}else{delete owner[this.expando];}}},hasData:function(owner){var cache=owner[this.expando];return cache!==undefined&&!jQuery.isEmptyObject(cache);}};var dataPriv=new Data();var dataUser=new Data();var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/[A-Z]/g;function getData(data){if(data==="true"){return true;}
if(data==="false"){return false;}
if(data==="null"){return null;}
if(data===+data+""){return+data;}
if(rbrace.test(data)){return JSON.parse(data);}
return data;}
function dataAttr(elem,key,data){var name;if(data===undefined&&elem.nodeType===1){name="data-"+key.replace(rmultiDash,"-$&").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=getData(data);}catch(e){}
dataUser.set(elem,key,data);}else{data=undefined;}}
return data;}
jQuery.extend({hasData:function(elem){return dataUser.hasData(elem)||dataPriv.hasData(elem);},data:function(elem,name,data){return dataUser.access(elem,name,data);},removeData:function(elem,name){dataUser.remove(elem,name);},_data:function(elem,name,data){return dataPriv.access(elem,name,data);},_removeData:function(elem,name){dataPriv.remove(elem,name);}});jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(key===undefined){if(this.length){data=dataUser.get(elem);if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){i=attrs.length;while(i--){if(attrs[i]){name=attrs[i].name;if(name.indexOf("data-")===0){name=camelCase(name.slice(5));dataAttr(elem,name,data[name]);}}}
dataPriv.set(elem,"hasDataAttrs",true);}}
return data;}
if(typeof key==="object"){return this.each(function(){dataUser.set(this,key);});}
return access(this,function(value){var data;if(elem&&value===undefined){data=dataUser.get(elem,key);if(data!==undefined){return data;}
data=dataAttr(elem,key);if(data!==undefined){return data;}
return;}
this.each(function(){dataUser.set(this,key,value);});},null,value,arguments.length>1,null,true);},removeData:function(key){return this.each(function(){dataUser.remove(this,key);});}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=dataPriv.get(elem,type);if(data){if(!queue||Array.isArray(data)){queue=dataPriv.access(elem,type,jQuery.makeArray(data));}else{queue.push(data);}}
return queue||[];}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type);};if(fn==="inprogress"){fn=queue.shift();startLength--;}
if(fn){if(type==="fx"){queue.unshift("inprogress");}
delete hooks.stop;fn.call(elem,next,hooks);}
if(!startLength&&hooks){hooks.empty.fire();}},_queueHooks:function(elem,type){var key=type+"queueHooks";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){dataPriv.remove(elem,[type+"queue",key]);})});}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--;}
if(arguments.length<setter){return jQuery.queue(this[0],type);}
return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type);}});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});},clearQueue:function(type){return this.queue(type||"fx",[]);},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){if(!(--count)){defer.resolveWith(elements,[elements]);}};if(typeof type!=="string"){obj=type;type=undefined;}
type=type||"fx";while(i--){tmp=dataPriv.get(elements[i],type+"queueHooks");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve);}}
resolve();return defer.promise(obj);}});var pnum=(/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i");var cssExpand=["Top","Right","Bottom","Left"];var isHiddenWithinTree=function(elem,el){elem=el||elem;return elem.style.display==="none"||elem.style.display===""&&jQuery.contains(elem.ownerDocument,elem)&&jQuery.css(elem,"display")==="none";};var swap=function(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
ret=callback.apply(elem,args||[]);for(name in options){elem.style[name]=old[name];}
return ret;};function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale,maxIterations=20,currentValue=tween?function(){return tween.cur();}:function(){return jQuery.css(elem,prop,"");},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),initialInUnit=(jQuery.cssNumber[prop]||unit!=="px"&&+initial)&&rcssNum.exec(jQuery.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){initial=initial/2;unit=unit||initialInUnit[3];initialInUnit=+initial||1;while(maxIterations--){jQuery.style(elem,prop,initialInUnit+unit);if((1-scale)*(1-(scale=currentValue()/initial||0.5))<=0){maxIterations=0;}
initialInUnit=initialInUnit/scale;}
initialInUnit=initialInUnit*2;jQuery.style(elem,prop,initialInUnit+unit);valueParts=valueParts||[];}
if(valueParts){initialInUnit=+initialInUnit||+initial||0;adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2];if(tween){tween.unit=unit;tween.start=initialInUnit;tween.end=adjusted;}}
return adjusted;}
var defaultDisplayMap={};function getDefaultDisplay(elem){var temp,doc=elem.ownerDocument,nodeName=elem.nodeName,display=defaultDisplayMap[nodeName];if(display){return display;}
temp=doc.body.appendChild(doc.createElement(nodeName));display=jQuery.css(temp,"display");temp.parentNode.removeChild(temp);if(display==="none"){display="block";}
defaultDisplayMap[nodeName]=display;return display;}
function showHide(elements,show){var display,elem,values=[],index=0,length=elements.length;for(;index<length;index++){elem=elements[index];if(!elem.style){continue;}
display=elem.style.display;if(show){if(display==="none"){values[index]=dataPriv.get(elem,"display")||null;if(!values[index]){elem.style.display="";}}
if(elem.style.display===""&&isHiddenWithinTree(elem)){values[index]=getDefaultDisplay(elem);}}else{if(display!=="none"){values[index]="none";dataPriv.set(elem,"display",display);}}}
for(index=0;index<length;index++){if(values[index]!=null){elements[index].style.display=values[index];}}
return elements;}
jQuery.fn.extend({show:function(){return showHide(this,true);},hide:function(){return showHide(this);},toggle:function(state){if(typeof state==="boolean"){return state?this.show():this.hide();}
return this.each(function(){if(isHiddenWithinTree(this)){jQuery(this).show();}else{jQuery(this).hide();}});}});var rcheckableType=(/^(?:checkbox|radio)$/i);var rtagName=(/<([a-z][^\/\0>\x20\t\r\n\f]+)/i);var rscriptType=(/^$|^module$|\/(?:java|ecma)script/i);var wrapMap={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function getAll(context,tag){var ret;if(typeof context.getElementsByTagName!=="undefined"){ret=context.getElementsByTagName(tag||"*");}else if(typeof context.querySelectorAll!=="undefined"){ret=context.querySelectorAll(tag||"*");}else{ret=[];}
if(tag===undefined||tag&&nodeName(context,tag)){return jQuery.merge([context],ret);}
return ret;}
function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i<l;i++){dataPriv.set(elems[i],"globalEval",!refElements||dataPriv.get(refElements[i],"globalEval"));}}
var rhtml=/<|&#?\w+;/;function buildFragment(elems,context,scripts,selection,ignored){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i<l;i++){elem=elems[i];if(elem||elem===0){if(toType(elem)==="object"){jQuery.merge(nodes,elem.nodeType?[elem]:elem);}else if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem));}else{tmp=tmp||fragment.appendChild(context.createElement("div"));tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild;}
jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent="";}}}
fragment.textContent="";i=0;while((elem=nodes[i++])){if(selection&&jQuery.inArray(elem,selection)>-1){if(ignored){ignored.push(elem);}
continue;}
contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),"script");if(contains){setGlobalEval(tmp);}
if(scripts){j=0;while((elem=tmp[j++])){if(rscriptType.test(elem.type||"")){scripts.push(elem);}}}}
return fragment;}
(function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;div.innerHTML="<textarea>x</textarea>";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;})();var documentElement=document.documentElement;var
rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rtypenamespace=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return true;}
function returnFalse(){return false;}
function safeActiveElement(){try{return document.activeElement;}catch(err){}}
function on(elem,types,selector,data,fn,one){var origFn,type;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector;selector=undefined;}
for(type in types){on(elem,type,selector,data,types[type],one);}
return elem;}
if(data==null&&fn==null){fn=selector;data=selector=undefined;}else if(fn==null){if(typeof selector==="string"){fn=data;data=undefined;}else{fn=data;data=selector;selector=undefined;}}
if(fn===false){fn=returnFalse;}else if(!fn){return elem;}
if(one===1){origFn=fn;fn=function(event){jQuery().off(event);return origFn.apply(this,arguments);};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++);}
return elem.each(function(){jQuery.event.add(this,types,fn,data,selector);});}
jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);if(!elemData){return;}
if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector;}
if(selector){jQuery.find.matchesSelector(documentElement,selector);}
if(!handler.guid){handler.guid=jQuery.guid++;}
if(!(events=elemData.events)){events=elemData.events={};}
if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined;};}
types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue;}
special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle);}}}
if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}}
if(selector){handlers.splice(handlers.delegateCount++,0,handleObj);}else{handlers.push(handleObj);}
jQuery.event.global[type]=true;}},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(!elemData||!(events=elemData.events)){return;}
types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true);}
continue;}
special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--;}
if(special.remove){special.remove.call(elem,handleObj);}}}
if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle);}
delete events[type];}}
if(jQuery.isEmptyObject(events)){dataPriv.remove(elem,"handle events");}},dispatch:function(nativeEvent){var event=jQuery.event.fix(nativeEvent);var i,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),handlers=(dataPriv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;for(i=1;i<arguments.length;i++){args[i]=arguments[i];}
event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return;}
handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.rnamespace||event.rnamespace.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation();}}}}}
if(special.postDispatch){special.postDispatch.call(this,event);}
return event.result;},handlers:function(event,handlers){var i,handleObj,sel,matchedHandlers,matchedSelectors,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&!(event.type==="click"&&event.button>=1)){for(;cur!==this;cur=cur.parentNode||this){if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){matchedHandlers=[];matchedSelectors={};for(i=0;i<delegateCount;i++){handleObj=handlers[i];sel=handleObj.selector+" ";if(matchedSelectors[sel]===undefined){matchedSelectors[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length;}
if(matchedSelectors[sel]){matchedHandlers.push(handleObj);}}
if(matchedHandlers.length){handlerQueue.push({elem:cur,handlers:matchedHandlers});}}}}
cur=this;if(delegateCount<handlers.length){handlerQueue.push({elem:cur,handlers:handlers.slice(delegateCount)});}
return handlerQueue;},addProp:function(name,hook){Object.defineProperty(jQuery.Event.prototype,name,{enumerable:true,configurable:true,get:isFunction(hook)?function(){if(this.originalEvent){return hook(this.originalEvent);}}:function(){if(this.originalEvent){return this.originalEvent[name];}},set:function(value){Object.defineProperty(this,name,{enumerable:true,configurable:true,writable:true,value:value});}});},fix:function(originalEvent){return originalEvent[jQuery.expando]?originalEvent:new jQuery.Event(originalEvent);},special:{load:{noBubble:true},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus){this.focus();return false;}},delegateType:"focusin"},blur:{trigger:function(){if(this===safeActiveElement()&&this.blur){this.blur();return false;}},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&nodeName(this,"input")){this.click();return false;}},_default:function(event){return nodeName(event.target,"a");}},beforeunload:{postDispatch:function(event){if(event.result!==undefined&&event.originalEvent){event.originalEvent.returnValue=event.result;}}}}};jQuery.removeEvent=function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle);}};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event)){return new jQuery.Event(src,props);}
if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&src.returnValue===false?returnTrue:returnFalse;this.target=(src.target&&src.target.nodeType===3)?src.target.parentNode:src.target;this.currentTarget=src.currentTarget;this.relatedTarget=src.relatedTarget;}else{this.type=src;}
if(props){jQuery.extend(this,props);}
this.timeStamp=src&&src.timeStamp||Date.now();this[jQuery.expando]=true;};jQuery.Event.prototype={constructor:jQuery.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:false,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e&&!this.isSimulated){e.preventDefault();}},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopPropagation();}},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopImmediatePropagation();}
this.stopPropagation();}};jQuery.each({altKey:true,bubbles:true,cancelable:true,changedTouches:true,ctrlKey:true,detail:true,eventPhase:true,metaKey:true,pageX:true,pageY:true,shiftKey:true,view:true,"char":true,charCode:true,key:true,keyCode:true,button:true,buttons:true,clientX:true,clientY:true,offsetX:true,offsetY:true,pointerId:true,pointerType:true,screenX:true,screenY:true,targetTouches:true,toElement:true,touches:true,which:function(event){var button=event.button;if(event.which==null&&rkeyEvent.test(event.type)){return event.charCode!=null?event.charCode:event.keyCode;}
if(!event.which&&button!==undefined&&rmouseEvent.test(event.type)){if(button&1){return 1;}
if(button&2){return 3;}
if(button&4){return 2;}
return 0;}
return event.which;}},jQuery.event.addProp);jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;if(!related||(related!==target&&!jQuery.contains(target,related))){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix;}
return ret;}};});jQuery.fn.extend({on:function(types,selector,data,fn){return on(this,types,selector,data,fn);},one:function(types,selector,data,fn){return on(this,types,selector,data,fn,1);},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj){handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this;}
if(typeof types==="object"){for(type in types){this.off(type,selector,types[type]);}
return this;}
if(selector===false||typeof selector==="function"){fn=selector;selector=undefined;}
if(fn===false){fn=returnFalse;}
return this.each(function(){jQuery.event.remove(this,types,fn,selector);});}});var
rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,rnoInnerhtml=/<script|<style|<link/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function manipulationTarget(elem,content){if(nodeName(elem,"table")&&nodeName(content.nodeType!==11?content:content.firstChild,"tr")){return jQuery(elem).children("tbody")[0]||elem;}
return elem;}
function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem;}
function restoreScript(elem){if((elem.type||"").slice(0,5)==="true/"){elem.type=elem.type.slice(5);}else{elem.removeAttribute("type");}
return elem;}
function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(dest.nodeType!==1){return;}
if(dataPriv.hasData(src)){pdataOld=dataPriv.access(src);pdataCur=dataPriv.set(dest,pdataOld);events=pdataOld.events;if(events){delete pdataCur.handle;pdataCur.events={};for(type in events){for(i=0,l=events[type].length;i<l;i++){jQuery.event.add(dest,type,events[type][i]);}}}}
if(dataUser.hasData(src)){udataOld=dataUser.access(src);udataCur=jQuery.extend({},udataOld);dataUser.set(dest,udataCur);}}
function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();if(nodeName==="input"&&rcheckableType.test(src.type)){dest.checked=src.checked;}else if(nodeName==="input"||nodeName==="textarea"){dest.defaultValue=src.defaultValue;}}
function domManip(collection,args,callback,ignored){args=concat.apply([],args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=collection.length,iNoClone=l-1,value=args[0],valueIsFunction=isFunction(value);if(valueIsFunction||(l>1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value))){return collection.each(function(index){var self=collection.eq(index);if(valueIsFunction){args[0]=value.call(this,index,self.html());}
domManip(self,args,callback,ignored);});}
if(l){fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first;}
if(first||ignored){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i<l;i++){node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);if(hasScripts){jQuery.merge(scripts,getAll(node,"script"));}}
callback.call(collection[i],node,i);}
if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;jQuery.map(scripts,restoreScript);for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||"")&&!dataPriv.access(node,"globalEval")&&jQuery.contains(doc,node)){if(node.src&&(node.type||"").toLowerCase()!=="module"){if(jQuery._evalUrl){jQuery._evalUrl(node.src);}}else{DOMEval(node.textContent.replace(rcleanScript,""),doc,node);}}}}}}
return collection;}
function remove(elem,selector,keepData){var node,nodes=selector?jQuery.filter(selector,elem):elem,i=0;for(;(node=nodes[i])!=null;i++){if(!keepData&&node.nodeType===1){jQuery.cleanData(getAll(node));}
if(node.parentNode){if(keepData&&jQuery.contains(node.ownerDocument,node)){setGlobalEval(getAll(node,"script"));}
node.parentNode.removeChild(node);}}
return elem;}
jQuery.extend({htmlPrefilter:function(html){return html.replace(rxhtmlTag,"<$1></$2>");},clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=jQuery.contains(elem.ownerDocument,elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++){fixInput(srcElements[i],destElements[i]);}}
if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++){cloneCopyEvent(srcElements[i],destElements[i]);}}else{cloneCopyEvent(elem,clone);}}
destElements=getAll(clone,"script");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"));}
return clone;},cleanData:function(elems){var data,elem,type,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(acceptData(elem)){if((data=elem[dataPriv.expando])){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type);}else{jQuery.removeEvent(elem,type,data.handle);}}}
elem[dataPriv.expando]=undefined;}
if(elem[dataUser.expando]){elem[dataUser.expando]=undefined;}}}}});jQuery.fn.extend({detach:function(selector){return remove(this,selector,true);},remove:function(selector){return remove(this,selector);},text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value;}});},null,value,arguments.length);},append:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem);}});},prepend:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild);}});},before:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this);}});},after:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling);}});},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent="";}}
return this;},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents);});},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML;}
if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value;}}
elem=0;}catch(e){}}
if(elem){this.empty().append(value);}},null,value,arguments.length);},replaceWith:function(){var ignored=[];return domManip(this,arguments,function(elem){var parent=this.parentNode;if(jQuery.inArray(this,ignored)<0){jQuery.cleanData(getAll(this));if(parent){parent.replaceChild(elem,this);}}},ignored);}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);push.apply(ret,elems.get());}
return this.pushStack(ret);};});var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var getStyles=function(elem){var view=elem.ownerDocument.defaultView;if(!view||!view.opener){view=window;}
return view.getComputedStyle(elem);};var rboxStyle=new RegExp(cssExpand.join("|"),"i");(function(){function computeStyleTests(){if(!div){return;}
container.style.cssText="position:absolute;left:-11111px;width:60px;"+"margin-top:1px;padding:0;border:0";div.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;"+"margin:auto;border:1px;padding:1px;"+"width:60%;top:1%";documentElement.appendChild(container).appendChild(div);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!=="1%";reliableMarginLeftVal=roundPixelMeasures(divStyle.marginLeft)===12;div.style.right="60%";pixelBoxStylesVal=roundPixelMeasures(divStyle.right)===36;boxSizingReliableVal=roundPixelMeasures(divStyle.width)===36;div.style.position="absolute";scrollboxSizeVal=div.offsetWidth===36||"absolute";documentElement.removeChild(container);div=null;}
function roundPixelMeasures(measure){return Math.round(parseFloat(measure));}
var pixelPositionVal,boxSizingReliableVal,scrollboxSizeVal,pixelBoxStylesVal,reliableMarginLeftVal,container=document.createElement("div"),div=document.createElement("div");if(!div.style){return;}
div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";jQuery.extend(support,{boxSizingReliable:function(){computeStyleTests();return boxSizingReliableVal;},pixelBoxStyles:function(){computeStyleTests();return pixelBoxStylesVal;},pixelPosition:function(){computeStyleTests();return pixelPositionVal;},reliableMarginLeft:function(){computeStyleTests();return reliableMarginLeftVal;},scrollboxSize:function(){computeStyleTests();return scrollboxSizeVal;}});})();function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;computed=computed||getStyles(elem);if(computed){ret=computed.getPropertyValue(name)||computed[name];if(ret===""&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name);}
if(!support.pixelBoxStyles()&&rnumnonpx.test(ret)&&rboxStyle.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth;}}
return ret!==undefined?ret+"":ret;}
function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return;}
return(this.get=hookFn).apply(this,arguments);}};}
var
rdisplayswap=/^(none|table(?!-c[ea]).+)/,rcustomProp=/^--/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","Moz","ms"],emptyStyle=document.createElement("div").style;function vendorPropName(name){if(name in emptyStyle){return name;}
var capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}
function finalPropName(name){var ret=jQuery.cssProps[name];if(!ret){ret=jQuery.cssProps[name]=vendorPropName(name)||name;}
return ret;}
function setPositiveNumber(elem,value,subtract){var matches=rcssNum.exec(value);return matches?Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):value;}
function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){var i=dimension==="width"?1:0,extra=0,delta=0;if(box===(isBorderBox?"border":"content")){return 0;}
for(;i<4;i+=2){if(box==="margin"){delta+=jQuery.css(elem,box+cssExpand[i],true,styles);}
if(!isBorderBox){delta+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(box!=="padding"){delta+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}else{extra+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}}else{if(box==="content"){delta-=jQuery.css(elem,"padding"+cssExpand[i],true,styles);}
if(box!=="margin"){delta-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}}}
if(!isBorderBox&&computedVal>=0){delta+=Math.max(0,Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-
computedVal-
delta-
extra-
0.5));}
return delta;}
function getWidthOrHeight(elem,dimension,extra){var styles=getStyles(elem),val=curCSS(elem,dimension,styles),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box",valueIsBorderBox=isBorderBox;if(rnumnonpx.test(val)){if(!extra){return val;}
val="auto";}
valueIsBorderBox=valueIsBorderBox&&(support.boxSizingReliable()||val===elem.style[dimension]);if(val==="auto"||!parseFloat(val)&&jQuery.css(elem,"display",false,styles)==="inline"){val=elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)];valueIsBorderBox=true;}
val=parseFloat(val)||0;return(val+
boxModelAdjustment(elem,dimension,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles,val))+"px";}
jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret;}}}},cssNumber:{"animationIterationCount":true,"columnCount":true,"fillOpacity":true,"flexGrow":true,"flexShrink":true,"fontWeight":true,"lineHeight":true,"opacity":true,"order":true,"orphans":true,"widows":true,"zIndex":true,"zoom":true},cssProps:{},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return;}
var ret,type,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name),style=elem.style;if(!isCustomProp){name=finalPropName(origName);}
hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){value=adjustCSS(elem,name,ret);type="number";}
if(value==null||value!==value){return;}
if(type==="number"){value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px");}
if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){style[name]="inherit";}
if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined){if(isCustomProp){style.setProperty(name,value);}else{style[name]=value;}}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret;}
return style[name];}},css:function(elem,name,extra,styles){var val,num,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name);if(!isCustomProp){name=finalPropName(origName);}
hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(hooks&&"get"in hooks){val=hooks.get(elem,true,extra);}
if(val===undefined){val=curCSS(elem,name,styles);}
if(val==="normal"&&name in cssNormalTransform){val=cssNormalTransform[name];}
if(extra===""||extra){num=parseFloat(val);return extra===true||isFinite(num)?num||0:val;}
return val;}});jQuery.each(["height","width"],function(i,dimension){jQuery.cssHooks[dimension]={get:function(elem,computed,extra){if(computed){return rdisplayswap.test(jQuery.css(elem,"display"))&&(!elem.getClientRects().length||!elem.getBoundingClientRect().width)?swap(elem,cssShow,function(){return getWidthOrHeight(elem,dimension,extra);}):getWidthOrHeight(elem,dimension,extra);}},set:function(elem,value,extra){var matches,styles=getStyles(elem),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box",subtract=extra&&boxModelAdjustment(elem,dimension,extra,isBorderBox,styles);if(isBorderBox&&support.scrollboxSize()===styles.position){subtract-=Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-
parseFloat(styles[dimension])-
boxModelAdjustment(elem,dimension,"border",false,styles)-
0.5);}
if(subtract&&(matches=rcssNum.exec(value))&&(matches[3]||"px")!=="px"){elem.style[dimension]=value;value=jQuery.css(elem,dimension);}
return setPositiveNumber(elem,value,subtract);}};});jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed){return(parseFloat(curCSS(elem,"marginLeft"))||elem.getBoundingClientRect().left-
swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left;}))+"px";}});jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){var i=0,expanded={},parts=typeof value==="string"?value.split(" "):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];}
return expanded;}};if(prefix!=="margin"){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber;}});jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(Array.isArray(name)){styles=getStyles(elem);len=name.length;for(;i<len;i++){map[name[i]]=jQuery.css(elem,name[i],false,styles);}
return map;}
return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name);},name,value,arguments.length>1);}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing);}
jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||jQuery.easing._default;this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px");},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this);},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration);}else{this.pos=eased=percent;}
this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this);}
if(hooks&&hooks.set){hooks.set(this);}else{Tween.propHooks._default.set(this);}
return this;}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem.nodeType!==1||tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){return tween.elem[tween.prop];}
result=jQuery.css(tween.elem,tween.prop,"");return!result||result==="auto"?0:result;},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween);}else if(tween.elem.nodeType===1&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit);}else{tween.elem[tween.prop]=tween.now;}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now;}}};jQuery.easing={linear:function(p){return p;},swing:function(p){return 0.5-Math.cos(p*Math.PI)/2;},_default:"swing"};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var
fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function schedule(){if(inProgress){if(document.hidden===false&&window.requestAnimationFrame){window.requestAnimationFrame(schedule);}else{window.setTimeout(schedule,jQuery.fx.interval);}
jQuery.fx.tick();}}
function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return(fxNow=Date.now());}
function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type;}
if(includeWidth){attrs.opacity=attrs.width=type;}
return attrs;}
function createTween(value,prop,animation){var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index=0,length=collection.length;for(;index<length;index++){if((tween=collection[index].call(animation,prop,value))){return tween;}}}
function defaultPrefilter(elem,props,opts){var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,isBox="width"in props||"height"in props,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHiddenWithinTree(elem),dataShow=dataPriv.get(elem,"fxshow");if(!opts.queue){hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire();}};}
hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,"fx").length){hooks.empty.fire();}});});}
for(prop in props){value=props[prop];if(rfxtypes.test(value)){delete props[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){if(value==="show"&&dataShow&&dataShow[prop]!==undefined){hidden=true;}else{continue;}}
orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop);}}
propTween=!jQuery.isEmptyObject(props);if(!propTween&&jQuery.isEmptyObject(orig)){return;}
if(isBox&&elem.nodeType===1){opts.overflow=[style.overflow,style.overflowX,style.overflowY];restoreDisplay=dataShow&&dataShow.display;if(restoreDisplay==null){restoreDisplay=dataPriv.get(elem,"display");}
display=jQuery.css(elem,"display");if(display==="none"){if(restoreDisplay){display=restoreDisplay;}else{showHide([elem],true);restoreDisplay=elem.style.display||restoreDisplay;display=jQuery.css(elem,"display");showHide([elem]);}}
if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){if(jQuery.css(elem,"float")==="none"){if(!propTween){anim.done(function(){style.display=restoreDisplay;});if(restoreDisplay==null){display=style.display;restoreDisplay=display==="none"?"":display;}}
style.display="inline-block";}}}
if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2];});}
propTween=false;for(prop in orig){if(!propTween){if(dataShow){if("hidden"in dataShow){hidden=dataShow.hidden;}}else{dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay});}
if(toggle){dataShow.hidden=!hidden;}
if(hidden){showHide([elem],true);}
anim.done(function(){if(!hidden){showHide([elem]);}
dataPriv.remove(elem,"fxshow");for(prop in orig){jQuery.style(elem,prop,orig[prop]);}});}
propTween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=propTween.start;if(hidden){propTween.end=propTween.start;propTween.start=0;}}}}
function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props){name=camelCase(index);easing=specialEasing[name];value=props[index];if(Array.isArray(value)){easing=value[1];value=props[index]=value[0];}
if(index!==name){props[name]=value;delete props[index];}
hooks=jQuery.cssHooks[name];if(hooks&&"expand"in hooks){value=hooks.expand(value);delete props[name];for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing;}}}else{specialEasing[name]=easing;}}}
function Animation(elem,properties,options){var result,stopped,index=0,length=Animation.prefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem;}),tick=function(){if(stopped){return false;}
var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;for(;index<length;index++){animation.tweens[index].run(percent);}
deferred.notifyWith(elem,[animation,percent,remaining]);if(percent<1&&length){return remaining;}
if(!length){deferred.notifyWith(elem,[animation,1,0]);}
deferred.resolveWith(elem,[animation]);return false;},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{},easing:jQuery.easing._default},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween;},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped){return this;}
stopped=true;for(;index<length;index++){animation.tweens[index].run(1);}
if(gotoEnd){deferred.notifyWith(elem,[animation,1,0]);deferred.resolveWith(elem,[animation,gotoEnd]);}else{deferred.rejectWith(elem,[animation,gotoEnd]);}
return this;}}),props=animation.props;propFilter(props,animation.opts.specialEasing);for(;index<length;index++){result=Animation.prefilters[index].call(animation,elem,props,animation.opts);if(result){if(isFunction(result.stop)){jQuery._queueHooks(animation.elem,animation.opts.queue).stop=result.stop.bind(result);}
return result;}}
jQuery.map(props,createTween,animation);if(isFunction(animation.opts.start)){animation.opts.start.call(elem,animation);}
animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue}));return animation;}
jQuery.Animation=jQuery.extend(Animation,{tweeners:{"*":[function(prop,value){var tween=this.createTween(prop,value);adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);return tween;}]},tweener:function(props,callback){if(isFunction(props)){callback=props;props=["*"];}else{props=props.match(rnothtmlwhite);}
var prop,index=0,length=props.length;for(;index<length;index++){prop=props[index];Animation.tweeners[prop]=Animation.tweeners[prop]||[];Animation.tweeners[prop].unshift(callback);}},prefilters:[defaultPrefilter],prefilter:function(callback,prepend){if(prepend){Animation.prefilters.unshift(callback);}else{Animation.prefilters.push(callback);}}});jQuery.speed=function(speed,easing,fn){var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!isFunction(easing)&&easing};if(jQuery.fx.off){opt.duration=0;}else{if(typeof opt.duration!=="number"){if(opt.duration in jQuery.fx.speeds){opt.duration=jQuery.fx.speeds[opt.duration];}else{opt.duration=jQuery.fx.speeds._default;}}}
if(opt.queue==null||opt.queue===true){opt.queue="fx";}
opt.old=opt.complete;opt.complete=function(){if(isFunction(opt.old)){opt.old.call(this);}
if(opt.queue){jQuery.dequeue(this,opt.queue);}};return opt;};jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHiddenWithinTree).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback);},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);if(empty||dataPriv.get(this,"finish")){anim.stop(true);}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation);},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd);};if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;type=undefined;}
if(clearQueue&&type!==false){this.queue(type||"fx",[]);}
return this.each(function(){var dequeue=true,index=type!=null&&type+"queueHooks",timers=jQuery.timers,data=dataPriv.get(this);if(index){if(data[index]&&data[index].stop){stopQueue(data[index]);}}else{for(index in data){if(data[index]&&data[index].stop&&rrun.test(index)){stopQueue(data[index]);}}}
for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1);}}
if(dequeue||!gotoEnd){jQuery.dequeue(this,type);}});},finish:function(type){if(type!==false){type=type||"fx";}
return this.each(function(){var index,data=dataPriv.get(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;data.finish=true;jQuery.queue(this,type,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true);}
for(index=timers.length;index--;){if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1);}}
for(index=0;index<length;index++){if(queue[index]&&queue[index].finish){queue[index].finish.call(this);}}
delete data.finish;});}});jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed==="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback);};});jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback);};});jQuery.timers=[];jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;fxNow=Date.now();for(;i<timers.length;i++){timer=timers[i];if(!timer()&&timers[i]===timer){timers.splice(i--,1);}}
if(!timers.length){jQuery.fx.stop();}
fxNow=undefined;};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);jQuery.fx.start();};jQuery.fx.interval=13;jQuery.fx.start=function(){if(inProgress){return;}
inProgress=true;schedule();};jQuery.fx.stop=function(){inProgress=null;};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=window.setTimeout(next,time);hooks.stop=function(){window.clearTimeout(timeout);};});};(function(){var input=document.createElement("input"),select=document.createElement("select"),opt=select.appendChild(document.createElement("option"));input.type="checkbox";support.checkOn=input.value!=="";support.optSelected=opt.selected;input=document.createElement("input");input.value="t";input.type="radio";support.radioValue=input.value==="t";})();var boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1);},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name);});}});jQuery.extend({attr:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return;}
if(typeof elem.getAttribute==="undefined"){return jQuery.prop(elem,name,value);}
if(nType!==1||!jQuery.isXMLDoc(elem)){hooks=jQuery.attrHooks[name.toLowerCase()]||(jQuery.expr.match.bool.test(name)?boolHook:undefined);}
if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return;}
if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}
elem.setAttribute(name,value+"");return value;}
if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}
ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret;},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val;}
return value;}}}},removeAttr:function(elem,value){var name,i=0,attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&elem.nodeType===1){while((name=attrNames[i++])){elem.removeAttribute(name);}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name);}else{elem.setAttribute(name,name);}
return name;}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();if(!isXML){handle=attrHandle[lowercaseName];attrHandle[lowercaseName]=ret;ret=getter(elem,name,isXML)!=null?lowercaseName:null;attrHandle[lowercaseName]=handle;}
return ret;};});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1);},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name];});}});jQuery.extend({prop:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return;}
if(nType!==1||!jQuery.isXMLDoc(elem)){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name];}
if(value!==undefined){if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}
return(elem[name]=value);}
if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}
return elem[name];},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");if(tabindex){return parseInt(tabindex,10);}
if(rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href){return 0;}
return-1;}}},propFix:{"for":"htmlFor","class":"className"}});if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex;}
return null;},set:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}}};}
jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this;});function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(" ");}
function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||"";}
function classesToArray(value){if(Array.isArray(value)){return value;}
if(typeof value==="string"){return value.match(rnothtmlwhite)||[];}
return[];}
jQuery.fn.extend({addClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)));});}
classes=classesToArray(value);if(classes.length){while((elem=this[i++])){curValue=getClass(elem);cur=elem.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");if(cur){j=0;while((clazz=classes[j++])){if(cur.indexOf(" "+clazz+" ")<0){cur+=clazz+" ";}}
finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute("class",finalValue);}}}}
return this;},removeClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,getClass(this)));});}
if(!arguments.length){return this.attr("class","");}
classes=classesToArray(value);if(classes.length){while((elem=this[i++])){curValue=getClass(elem);cur=elem.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");if(cur){j=0;while((clazz=classes[j++])){while(cur.indexOf(" "+clazz+" ")>-1){cur=cur.replace(" "+clazz+" "," ");}}
finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute("class",finalValue);}}}}
return this;},toggleClass:function(value,stateVal){var type=typeof value,isValidValue=type==="string"||Array.isArray(value);if(typeof stateVal==="boolean"&&isValidValue){return stateVal?this.addClass(value):this.removeClass(value);}
if(isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal);});}
return this.each(function(){var className,i,self,classNames;if(isValidValue){i=0;self=jQuery(this);classNames=classesToArray(value);while((className=classNames[i++])){if(self.hasClass(className)){self.removeClass(className);}else{self.addClass(className);}}}else if(value===undefined||type==="boolean"){className=getClass(this);if(className){dataPriv.set(this,"__className__",className);}
if(this.setAttribute){this.setAttribute("class",className||value===false?"":dataPriv.get(this,"__className__")||"");}}});},hasClass:function(selector){var className,elem,i=0;className=" "+selector+" ";while((elem=this[i++])){if(elem.nodeType===1&&(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){return true;}}
return false;}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,valueIsFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret;}
ret=elem.value;if(typeof ret==="string"){return ret.replace(rreturn,"");}
return ret==null?"":ret;}
return;}
valueIsFunction=isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return;}
if(valueIsFunction){val=value.call(this,i,jQuery(this).val());}else{val=value;}
if(val==null){val="";}else if(typeof val==="number"){val+="";}else if(Array.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+"";});}
hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val;}});}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:stripAndCollapse(jQuery.text(elem));}},select:{get:function(elem){var value,option,i,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one",values=one?null:[],max=one?index+1:options.length;if(index<0){i=max;}else{i=one?index:0;}
for(;i<max;i++){option=options[i];if((option.selected||i===index)&&!option.disabled&&(!option.parentNode.disabled||!nodeName(option.parentNode,"optgroup"))){value=jQuery(option).val();if(one){return value;}
values.push(value);}}
return values;},set:function(elem,value){var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;while(i--){option=options[i];if(option.selected=jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1){optionSet=true;}}
if(!optionSet){elem.selectedIndex=-1;}
return values;}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(Array.isArray(value)){return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1);}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value;};}});support.focusin="onfocusin"in window;var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function(e){e.stopPropagation();};jQuery.extend(jQuery.event,{trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=lastElement=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return;}
if(rfocusMorph.test(type+jQuery.event.triggered)){return;}
if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();namespaces.sort();}
ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem;}
data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return;}
if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode;}
for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur;}
if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window);}}
i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){lastElement=cur;event.type=i>1?bubbleType:special.bindType||type;handle=(dataPriv.get(cur,"events")||{})[event.type]&&dataPriv.get(cur,"handle");if(handle){handle.apply(cur,data);}
handle=ontype&&cur[ontype];if(handle&&handle.apply&&acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault();}}}
event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&acceptData(elem)){if(ontype&&isFunction(elem[type])&&!isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null;}
jQuery.event.triggered=type;if(event.isPropagationStopped()){lastElement.addEventListener(type,stopPropagationCallback);}
elem[type]();if(event.isPropagationStopped()){lastElement.removeEventListener(type,stopPropagationCallback);}
jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp;}}}}
return event.result;},simulate:function(type,elem,event){var e=jQuery.extend(new jQuery.Event(),event,{type:type,isSimulated:true});jQuery.event.trigger(e,null,elem);}});jQuery.fn.extend({trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true);}}});if(!support.focusin){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event));};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix);if(!attaches){doc.addEventListener(orig,handler,true);}
dataPriv.access(doc,fix,(attaches||0)+1);},teardown:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix)-1;if(!attaches){doc.removeEventListener(orig,handler,true);dataPriv.remove(doc,fix);}else{dataPriv.access(doc,fix,attaches);}}};});}
var location=window.location;var nonce=Date.now();var rquery=(/\?/);jQuery.parseXML=function(data){var xml;if(!data||typeof data!=="string"){return null;}
try{xml=(new window.DOMParser()).parseFromString(data,"text/xml");}catch(e){xml=undefined;}
if(!xml||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data);}
return xml;};var
rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(Array.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"&&v!=null?i:"")+"]",v,traditional,add);}});}else if(!traditional&&toType(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add);}}else{add(prefix,obj);}}
jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,valueOrFunction){var value=isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+"="+
encodeURIComponent(value==null?"":value);};if(Array.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){jQuery.each(a,function(){add(this.name,this.value);});}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add);}}
return s.join("&");};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this;}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type));}).map(function(i,elem){var val=jQuery(this).val();if(val==null){return null;}
if(Array.isArray(val)){return jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")};});}
return{name:elem.name,value:val.replace(rCRLF,"\r\n")};}).get();}});var
r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,prefilters={},transports={},allTypes="*/".concat("*"),originAnchor=document.createElement("a");originAnchor.href=location.href;function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*";}
var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];if(isFunction(func)){while((dataType=dataTypes[i++])){if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func);}else{(structure[dataType]=structure[dataType]||[]).push(func);}}}};}
function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=(structure===transports);function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false;}else if(seekingTransport){return!(selected=dataTypeOrTransport);}});return selected;}
return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*");}
function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:(deep||(deep={})))[key]=src[key];}}
if(deep){jQuery.extend(true,target,deep);}
return target;}
function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type");}}
if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}
if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break;}
if(!firstDataType){firstDataType=type;}}
finalDataType=finalDataType||firstDataType;}
if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}
return responses[finalDataType];}}
function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}
current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}
if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}
prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev;}else if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2];}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}
break;}}}}
if(conv!==true){if(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current};}}}}}}
return{state:"success",data:response};}
jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:rlocalProtocol.test(location.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":JSON.parse,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target);},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined;}
options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,completed,fireGlobals,i,uncached,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(completed){if(!responseHeaders){responseHeaders={};while((match=rheaders.exec(responseHeadersString))){responseHeaders[match[1].toLowerCase()]=match[2];}}
match=responseHeaders[key.toLowerCase()];}
return match==null?null:match;},getAllResponseHeaders:function(){return completed?responseHeadersString:null;},setRequestHeader:function(name,value){if(completed==null){name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name;requestHeaders[name]=value;}
return this;},overrideMimeType:function(type){if(completed==null){s.mimeType=type;}
return this;},statusCode:function(map){var code;if(map){if(completed){jqXHR.always(map[jqXHR.status]);}else{for(code in map){statusCode[code]=[statusCode[code],map[code]];}}}
return this;},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText);}
done(0,finalText);return this;}};deferred.promise(jqXHR);s.url=((url||s.url||location.href)+"").replace(rprotocol,location.protocol+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""];if(s.crossDomain==null){urlAnchor=document.createElement("a");try{urlAnchor.href=s.url;urlAnchor.href=urlAnchor.href;s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==urlAnchor.protocol+"//"+urlAnchor.host;}catch(e){s.crossDomain=true;}}
if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional);}
inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(completed){return jqXHR;}
fireGlobals=jQuery.event&&s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart");}
s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url.replace(rhash,"");if(!s.hasContent){uncached=s.url.slice(cacheURL.length);if(s.data&&(s.processData||typeof s.data==="string")){cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data;delete s.data;}
if(s.cache===false){cacheURL=cacheURL.replace(rantiCache,"$1");uncached=(rquery.test(cacheURL)?"&":"?")+"_="+(nonce++)+uncached;}
s.url=cacheURL+uncached;}else if(s.data&&s.processData&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){s.data=s.data.replace(r20,"+");}
if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]);}
if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]);}}
if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType);}
jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+
(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i]);}
if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){return jqXHR.abort();}
strAbort="abort";completeDeferred.add(s.complete);jqXHR.done(s.success);jqXHR.fail(s.error);transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport");}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s]);}
if(completed){return jqXHR;}
if(s.async&&s.timeout>0){timeoutTimer=window.setTimeout(function(){jqXHR.abort("timeout");},s.timeout);}
try{completed=false;transport.send(requestHeaders,done);}catch(e){if(completed){throw e;}
done(-1,e);}}
function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(completed){return;}
completed=true;if(timeoutTimer){window.clearTimeout(timeoutTimer);}
transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses);}
response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified;}
modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified;}}
if(status===204||s.type==="HEAD"){statusText="nocontent";}else if(status===304){statusText="notmodified";}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error;}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0;}}}
jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);}
jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]);}
completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--jQuery.active)){jQuery.event.trigger("ajaxStop");}}}
return jqXHR;},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script");}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(isFunction(data)){type=type||callback;callback=data;data=undefined;}
return jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url));};});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",cache:true,async:false,global:false,"throws":true});};jQuery.fn.extend({wrapAll:function(html){var wrap;if(this[0]){if(isFunction(html)){html=html.call(this[0]);}
wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);}
wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild;}
return elem;}).append(this);}
return this;},wrapInner:function(html){if(isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});}
return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){var htmlIsFunction=isFunction(html);return this.each(function(i){jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html);});},unwrap:function(selector){this.parent(selector).not("body").each(function(){jQuery(this).replaceWith(this.childNodes);});return this;}});jQuery.expr.pseudos.hidden=function(elem){return!jQuery.expr.pseudos.visible(elem);};jQuery.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);};jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest();}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&("withCredentials"in xhrSupported);support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr();xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i];}}
if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType);}
if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest";}
for(i in headers){xhr.setRequestHeader(i,headers[i]);}
callback=function(type){return function(){if(callback){callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.ontimeout=xhr.onreadystatechange=null;if(type==="abort"){xhr.abort();}else if(type==="error"){if(typeof xhr.status!=="number"){complete(0,"error");}else{complete(xhr.status,xhr.statusText);}}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,(xhr.responseType||"text")!=="text"||typeof xhr.responseText!=="string"?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders());}}};};xhr.onload=callback();errorCallback=xhr.onerror=xhr.ontimeout=callback("error");if(xhr.onabort!==undefined){xhr.onabort=errorCallback;}else{xhr.onreadystatechange=function(){if(xhr.readyState===4){window.setTimeout(function(){if(callback){errorCallback();}});}};}
callback=callback("abort");try{xhr.send(options.hasContent&&options.data||null);}catch(e){if(callback){throw e;}}},abort:function(){if(callback){callback();}}};}});jQuery.ajaxPrefilter(function(s){if(s.crossDomain){s.contents.script=false;}});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, "+"application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(text){jQuery.globalEval(text);return text;}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false;}
if(s.crossDomain){s.type="GET";}});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery("<script>").prop({charset:s.scriptCharset,src:s.url}).on("load error",callback=function(evt){script.remove();callback=null;if(evt){complete(evt.type==="error"?404:200,evt.type);}});document.head.appendChild(script[0]);},abort:function(){if(callback){callback();}}};}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||(jQuery.expando+"_"+(nonce++));this[callback]=true;return callback;}});jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?"url":typeof s.data==="string"&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&rjsonp.test(s.data)&&"data");if(jsonProp||s.dataTypes[0]==="jsonp"){callbackName=s.jsonpCallback=isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName);}else if(s.jsonp!==false){s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName;}
s.converters["script json"]=function(){if(!responseContainer){jQuery.error(callbackName+" was not called");}
return responseContainer[0];};s.dataTypes[0]="json";overwritten=window[callbackName];window[callbackName]=function(){responseContainer=arguments;};jqXHR.always(function(){if(overwritten===undefined){jQuery(window).removeProp(callbackName);}else{window[callbackName]=overwritten;}
if(s[callbackName]){s.jsonpCallback=originalSettings.jsonpCallback;oldCallbacks.push(callbackName);}
if(responseContainer&&isFunction(overwritten)){overwritten(responseContainer[0]);}
responseContainer=overwritten=undefined;});return"script";}});support.createHTMLDocument=(function(){var body=document.implementation.createHTMLDocument("").body;body.innerHTML="<form></form><form></form>";return body.childNodes.length===2;})();jQuery.parseHTML=function(data,context,keepScripts){if(typeof data!=="string"){return[];}
if(typeof context==="boolean"){keepScripts=context;context=false;}
var base,parsed,scripts;if(!context){if(support.createHTMLDocument){context=document.implementation.createHTMLDocument("");base=context.createElement("base");base.href=document.location.href;context.head.appendChild(base);}else{context=document;}}
parsed=rsingleTag.exec(data);scripts=!keepScripts&&[];if(parsed){return[context.createElement(parsed[1])];}
parsed=buildFragment([data],context,scripts);if(scripts&&scripts.length){jQuery(scripts).remove();}
return jQuery.merge([],parsed.childNodes);};jQuery.fn.load=function(url,params,callback){var selector,type,response,self=this,off=url.indexOf(" ");if(off>-1){selector=stripAndCollapse(url.slice(off));url=url.slice(0,off);}
if(isFunction(params)){callback=params;params=undefined;}else if(params&&typeof params==="object"){type="POST";}
if(self.length>0){jQuery.ajax({url:url,type:type||"GET",dataType:"html",data:params}).done(function(responseText){response=arguments;self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText);}).always(callback&&function(jqXHR,status){self.each(function(){callback.apply(this,response||[jqXHR.responseText,status,jqXHR]);});});}
return this;};jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn);};});jQuery.expr.pseudos.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};if(position==="static"){elem.style.position="relative";}
curOffset=curElem.offset();curCSSTop=jQuery.css(elem,"top");curCSSLeft=jQuery.css(elem,"left");calculatePosition=(position==="absolute"||position==="fixed")&&(curCSSTop+curCSSLeft).indexOf("auto")>-1;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left;}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0;}
if(isFunction(options)){options=options.call(elem,i,jQuery.extend({},curOffset));}
if(options.top!=null){props.top=(options.top-curOffset.top)+curTop;}
if(options.left!=null){props.left=(options.left-curOffset.left)+curLeft;}
if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};jQuery.fn.extend({offset:function(options){if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i);});}
var rect,win,elem=this[0];if(!elem){return;}
if(!elem.getClientRects().length){return{top:0,left:0};}
rect=elem.getBoundingClientRect();win=elem.ownerDocument.defaultView;return{top:rect.top+win.pageYOffset,left:rect.left+win.pageXOffset};},position:function(){if(!this[0]){return;}
var offsetParent,offset,doc,elem=this[0],parentOffset={top:0,left:0};if(jQuery.css(elem,"position")==="fixed"){offset=elem.getBoundingClientRect();}else{offset=this.offset();doc=elem.ownerDocument;offsetParent=elem.offsetParent||doc.documentElement;while(offsetParent&&(offsetParent===doc.body||offsetParent===doc.documentElement)&&jQuery.css(offsetParent,"position")==="static"){offsetParent=offsetParent.parentNode;}
if(offsetParent&&offsetParent!==elem&&offsetParent.nodeType===1){parentOffset=jQuery(offsetParent).offset();parentOffset.top+=jQuery.css(offsetParent,"borderTopWidth",true);parentOffset.left+=jQuery.css(offsetParent,"borderLeftWidth",true);}}
return{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)};},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent;while(offsetParent&&jQuery.css(offsetParent,"position")==="static"){offsetParent=offsetParent.offsetParent;}
return offsetParent||documentElement;});}});jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win;if(isWindow(elem)){win=elem;}else if(elem.nodeType===9){win=elem.defaultView;}
if(val===undefined){return win?win[prop]:elem[method];}
if(win){win.scrollTo(!top?val:win.pageXOffset,top?val:win.pageYOffset);}else{elem[method]=val;}},method,val,arguments.length);};});jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed;}});});jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),extra=defaultExtra||(margin===true||value===true?"margin":"border");return access(this,function(elem,type,value){var doc;if(isWindow(elem)){return funcName.indexOf("outer")===0?elem["inner"+name]:elem.document.documentElement["client"+name];}
if(elem.nodeType===9){doc=elem.documentElement;return Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name]);}
return value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra);},type,chainable?margin:undefined,chainable);};});});jQuery.each(("blur focus focusin focusout resize scroll click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup contextmenu").split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name);};});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver);}});jQuery.fn.extend({bind:function(types,data,fn){return this.on(types,null,data,fn);},unbind:function(types,fn){return this.off(types,null,fn);},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn);},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn);}});jQuery.proxy=function(fn,context){var tmp,args,proxy;if(typeof context==="string"){tmp=fn[context];context=fn;fn=tmp;}
if(!isFunction(fn)){return undefined;}
args=slice.call(arguments,2);proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)));};proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy;};jQuery.holdReady=function(hold){if(hold){jQuery.readyWait++;}else{jQuery.ready(true);}};jQuery.isArray=Array.isArray;jQuery.parseJSON=JSON.parse;jQuery.nodeName=nodeName;jQuery.isFunction=isFunction;jQuery.isWindow=isWindow;jQuery.camelCase=camelCase;jQuery.type=toType;jQuery.now=Date.now;jQuery.isNumeric=function(obj){var type=jQuery.type(obj);return(type==="number"||type==="string")&&!isNaN(obj-parseFloat(obj));};if(typeof define==="function"&&define.amd){define("jquery",[],function(){return jQuery;});}
var
_jQuery=window.jQuery,_$=window.$;jQuery.noConflict=function(deep){if(window.$===jQuery){window.$=_$;}
if(deep&&window.jQuery===jQuery){window.jQuery=_jQuery;}
return jQuery;};if(!noGlobal){window.jQuery=window.$=jQuery;}
return jQuery;});;

/* /web/static/lib/jquery.ui/jquery-ui.js defined in bundle 'web.assets_common' */
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory);}else{factory(jQuery);}}(function($){$.ui=$.ui||{};var version=$.ui.version="1.12.1";var widgetUuid=0;var widgetSlice=Array.prototype.slice;$.cleanData=(function(orig){return function(elems){var events,elem,i;for(i=0;(elem=elems[i])!=null;i++){try{events=$._data(elem,"events");if(events&&events.remove){$(elem).triggerHandler("remove");}}catch(e){}}
orig(elems);};})($.cleanData);$.widget=function(name,base,prototype){var existingConstructor,constructor,basePrototype;var proxiedPrototype={};var namespace=name.split(".")[0];name=name.split(".")[1];var fullName=namespace+"-"+name;if(!prototype){prototype=base;base=$.Widget;}
if($.isArray(prototype)){prototype=$.extend.apply(null,[{}].concat(prototype));}
$.expr[":"][fullName.toLowerCase()]=function(elem){return!!$.data(elem,fullName);};$[namespace]=$[namespace]||{};existingConstructor=$[namespace][name];constructor=$[namespace][name]=function(options,element){if(!this._createWidget){return new constructor(options,element);}
if(arguments.length){this._createWidget(options,element);}};$.extend(constructor,existingConstructor,{version:prototype.version,_proto:$.extend({},prototype),_childConstructors:[]});basePrototype=new base();basePrototype.options=$.widget.extend({},basePrototype.options);$.each(prototype,function(prop,value){if(!$.isFunction(value)){proxiedPrototype[prop]=value;return;}
proxiedPrototype[prop]=(function(){function _super(){return base.prototype[prop].apply(this,arguments);}
function _superApply(args){return base.prototype[prop].apply(this,args);}
return function(){var __super=this._super;var __superApply=this._superApply;var returnValue;this._super=_super;this._superApply=_superApply;returnValue=value.apply(this,arguments);this._super=__super;this._superApply=__superApply;return returnValue;};})();});constructor.prototype=$.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor?(basePrototype.widgetEventPrefix||name):name},proxiedPrototype,{constructor:constructor,namespace:namespace,widgetName:name,widgetFullName:fullName});if(existingConstructor){$.each(existingConstructor._childConstructors,function(i,child){var childPrototype=child.prototype;$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,child._proto);});delete existingConstructor._childConstructors;}else{base._childConstructors.push(constructor);}
$.widget.bridge(name,constructor);return constructor;};$.widget.extend=function(target){var input=widgetSlice.call(arguments,1);var inputIndex=0;var inputLength=input.length;var key;var value;for(;inputIndex<inputLength;inputIndex++){for(key in input[inputIndex]){value=input[inputIndex][key];if(input[inputIndex].hasOwnProperty(key)&&value!==undefined){if($.isPlainObject(value)){target[key]=$.isPlainObject(target[key])?$.widget.extend({},target[key],value):$.widget.extend({},value);}else{target[key]=value;}}}}
return target;};$.widget.bridge=function(name,object){var fullName=object.prototype.widgetFullName||name;$.fn[name]=function(options){var isMethodCall=typeof options==="string";var args=widgetSlice.call(arguments,1);var returnValue=this;if(isMethodCall){if(!this.length&&options==="instance"){returnValue=undefined;}else{this.each(function(){var methodValue;var instance=$.data(this,fullName);if(options==="instance"){returnValue=instance;return false;}
if(!instance){return $.error("cannot call methods on "+name+" prior to initialization; "+"attempted to call method '"+options+"'");}
if(!$.isFunction(instance[options])||options.charAt(0)==="_"){return $.error("no such method '"+options+"' for "+name+" widget instance");}
methodValue=instance[options].apply(instance,args);if(methodValue!==instance&&methodValue!==undefined){returnValue=methodValue&&methodValue.jquery?returnValue.pushStack(methodValue.get()):methodValue;return false;}});}}else{if(args.length){options=$.widget.extend.apply(null,[options].concat(args));}
this.each(function(){var instance=$.data(this,fullName);if(instance){instance.option(options||{});if(instance._init){instance._init();}}else{$.data(this,fullName,new object(options,this));}});}
return returnValue;};};$.Widget=function(){};$.Widget._childConstructors=[];$.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:false,create:null},_createWidget:function(options,element){element=$(element||this.defaultElement||this)[0];this.element=$(element);this.uuid=widgetUuid++;this.eventNamespace="."+this.widgetName+this.uuid;this.bindings=$();this.hoverable=$();this.focusable=$();this.classesElementLookup={};if(element!==this){$.data(element,this.widgetFullName,this);this._on(true,this.element,{remove:function(event){if(event.target===element){this.destroy();}}});this.document=$(element.style?element.ownerDocument:element.document||element);this.window=$(this.document[0].defaultView||this.document[0].parentWindow);}
this.options=$.widget.extend({},this.options,this._getCreateOptions(),options);this._create();if(this.options.disabled){this._setOptionDisabled(this.options.disabled);}
this._trigger("create",null,this._getCreateEventData());this._init();},_getCreateOptions:function(){return{};},_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){var that=this;this._destroy();$.each(this.classesElementLookup,function(key,value){that._removeClass(value,key);});this.element.off(this.eventNamespace).removeData(this.widgetFullName);this.widget().off(this.eventNamespace).removeAttr("aria-disabled");this.bindings.off(this.eventNamespace);},_destroy:$.noop,widget:function(){return this.element;},option:function(key,value){var options=key;var parts;var curOption;var i;if(arguments.length===0){return $.widget.extend({},this.options);}
if(typeof key==="string"){options={};parts=key.split(".");key=parts.shift();if(parts.length){curOption=options[key]=$.widget.extend({},this.options[key]);for(i=0;i<parts.length-1;i++){curOption[parts[i]]=curOption[parts[i]]||{};curOption=curOption[parts[i]];}
key=parts.pop();if(arguments.length===1){return curOption[key]===undefined?null:curOption[key];}
curOption[key]=value;}else{if(arguments.length===1){return this.options[key]===undefined?null:this.options[key];}
options[key]=value;}}
this._setOptions(options);return this;},_setOptions:function(options){var key;for(key in options){this._setOption(key,options[key]);}
return this;},_setOption:function(key,value){if(key==="classes"){this._setOptionClasses(value);}
this.options[key]=value;if(key==="disabled"){this._setOptionDisabled(value);}
return this;},_setOptionClasses:function(value){var classKey,elements,currentElements;for(classKey in value){currentElements=this.classesElementLookup[classKey];if(value[classKey]===this.options.classes[classKey]||!currentElements||!currentElements.length){continue;}
elements=$(currentElements.get());this._removeClass(currentElements,classKey);elements.addClass(this._classes({element:elements,keys:classKey,classes:value,add:true}));}},_setOptionDisabled:function(value){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!value);if(value){this._removeClass(this.hoverable,null,"ui-state-hover");this._removeClass(this.focusable,null,"ui-state-focus");}},enable:function(){return this._setOptions({disabled:false});},disable:function(){return this._setOptions({disabled:true});},_classes:function(options){var full=[];var that=this;options=$.extend({element:this.element,classes:this.options.classes||{}},options);function processClassString(classes,checkOption){var current,i;for(i=0;i<classes.length;i++){current=that.classesElementLookup[classes[i]]||$();if(options.add){current=$($.unique(current.get().concat(options.element.get())));}else{current=$(current.not(options.element).get());}
that.classesElementLookup[classes[i]]=current;full.push(classes[i]);if(checkOption&&options.classes[classes[i]]){full.push(options.classes[classes[i]]);}}}
this._on(options.element,{"remove":"_untrackClassesElement"});if(options.keys){processClassString(options.keys.match(/\S+/g)||[],true);}
if(options.extra){processClassString(options.extra.match(/\S+/g)||[]);}
return full.join(" ");},_untrackClassesElement:function(event){var that=this;$.each(that.classesElementLookup,function(key,value){if($.inArray(event.target,value)!==-1){that.classesElementLookup[key]=$(value.not(event.target).get());}});},_removeClass:function(element,keys,extra){return this._toggleClass(element,keys,extra,false);},_addClass:function(element,keys,extra){return this._toggleClass(element,keys,extra,true);},_toggleClass:function(element,keys,extra,add){add=(typeof add==="boolean")?add:extra;var shift=(typeof element==="string"||element===null),options={extra:shift?keys:extra,keys:shift?element:keys,element:shift?this.element:element,add:add};options.element.toggleClass(this._classes(options),add);return this;},_on:function(suppressDisabledCheck,element,handlers){var delegateElement;var instance=this;if(typeof suppressDisabledCheck!=="boolean"){handlers=element;element=suppressDisabledCheck;suppressDisabledCheck=false;}
if(!handlers){handlers=element;element=this.element;delegateElement=this.widget();}else{element=delegateElement=$(element);this.bindings=this.bindings.add(element);}
$.each(handlers,function(event,handler){function handlerProxy(){if(!suppressDisabledCheck&&(instance.options.disabled===true||$(this).hasClass("ui-state-disabled"))){return;}
return(typeof handler==="string"?instance[handler]:handler).apply(instance,arguments);}
if(typeof handler!=="string"){handlerProxy.guid=handler.guid=handler.guid||handlerProxy.guid||$.guid++;}
var match=event.match(/^([\w:-]*)\s*(.*)$/);var eventName=match[1]+instance.eventNamespace;var selector=match[2];if(selector){delegateElement.on(eventName,selector,handlerProxy);}else{element.on(eventName,handlerProxy);}});},_off:function(element,eventName){eventName=(eventName||"").split(" ").join(this.eventNamespace+" ")+
this.eventNamespace;element.off(eventName).off(eventName);this.bindings=$(this.bindings.not(element).get());this.focusable=$(this.focusable.not(element).get());this.hoverable=$(this.hoverable.not(element).get());},_delay:function(handler,delay){function handlerProxy(){return(typeof handler==="string"?instance[handler]:handler).apply(instance,arguments);}
var instance=this;return setTimeout(handlerProxy,delay||0);},_hoverable:function(element){this.hoverable=this.hoverable.add(element);this._on(element,{mouseenter:function(event){this._addClass($(event.currentTarget),null,"ui-state-hover");},mouseleave:function(event){this._removeClass($(event.currentTarget),null,"ui-state-hover");}});},_focusable:function(element){this.focusable=this.focusable.add(element);this._on(element,{focusin:function(event){this._addClass($(event.currentTarget),null,"ui-state-focus");},focusout:function(event){this._removeClass($(event.currentTarget),null,"ui-state-focus");}});},_trigger:function(type,event,data){var prop,orig;var callback=this.options[type];data=data||{};event=$.Event(event);event.type=(type===this.widgetEventPrefix?type:this.widgetEventPrefix+type).toLowerCase();event.target=this.element[0];orig=event.originalEvent;if(orig){for(prop in orig){if(!(prop in event)){event[prop]=orig[prop];}}}
this.element.trigger(event,data);return!($.isFunction(callback)&&callback.apply(this.element[0],[event].concat(data))===false||event.isDefaultPrevented());}};$.each({show:"fadeIn",hide:"fadeOut"},function(method,defaultEffect){$.Widget.prototype["_"+method]=function(element,options,callback){if(typeof options==="string"){options={effect:options};}
var hasOptions;var effectName=!options?method:options===true||typeof options==="number"?defaultEffect:options.effect||defaultEffect;options=options||{};if(typeof options==="number"){options={duration:options};}
hasOptions=!$.isEmptyObject(options);options.complete=callback;if(options.delay){element.delay(options.delay);}
if(hasOptions&&$.effects&&$.effects.effect[effectName]){element[method](options);}else if(effectName!==method&&element[effectName]){element[effectName](options.duration,options.easing,callback);}else{element.queue(function(next){$(this)[method]();if(callback){callback.call(element[0]);}
next();});}};});var widget=$.widget;(function(){var cachedScrollbarWidth,max=Math.max,abs=Math.abs,rhorizontal=/left|center|right/,rvertical=/top|center|bottom/,roffset=/[\+\-]\d+(\.[\d]+)?%?/,rposition=/^\w+/,rpercent=/%$/,_position=$.fn.position;function getOffsets(offsets,width,height){return[parseFloat(offsets[0])*(rpercent.test(offsets[0])?width/100:1),parseFloat(offsets[1])*(rpercent.test(offsets[1])?height/100:1)];}
function parseCss(element,property){return parseInt($.css(element,property),10)||0;}
function getDimensions(elem){var raw=elem[0];if(raw.nodeType===9){return{width:elem.width(),height:elem.height(),offset:{top:0,left:0}};}
if($.isWindow(raw)){return{width:elem.width(),height:elem.height(),offset:{top:elem.scrollTop(),left:elem.scrollLeft()}};}
if(raw.preventDefault){return{width:0,height:0,offset:{top:raw.pageY,left:raw.pageX}};}
return{width:elem.outerWidth(),height:elem.outerHeight(),offset:elem.offset()};}
$.position={scrollbarWidth:function(){if(cachedScrollbarWidth!==undefined){return cachedScrollbarWidth;}
var w1,w2,div=$("<div "+"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>"+"<div style='height:100px;width:auto;'></div></div>"),innerDiv=div.children()[0];$("body").append(div);w1=innerDiv.offsetWidth;div.css("overflow","scroll");w2=innerDiv.offsetWidth;if(w1===w2){w2=div[0].clientWidth;}
div.remove();return(cachedScrollbarWidth=w1-w2);},getScrollInfo:function(within){var overflowX=within.isWindow||within.isDocument?"":within.element.css("overflow-x"),overflowY=within.isWindow||within.isDocument?"":within.element.css("overflow-y"),hasOverflowX=overflowX==="scroll"||(overflowX==="auto"&&within.width<within.element[0].scrollWidth),hasOverflowY=overflowY==="scroll"||(overflowY==="auto"&&within.height<within.element[0].scrollHeight);return{width:hasOverflowY?$.position.scrollbarWidth():0,height:hasOverflowX?$.position.scrollbarWidth():0};},getWithinInfo:function(element){var withinElement=$(element||window),isWindow=$.isWindow(withinElement[0]),isDocument=!!withinElement[0]&&withinElement[0].nodeType===9,hasOffset=!isWindow&&!isDocument;return{element:withinElement,isWindow:isWindow,isDocument:isDocument,offset:hasOffset?$(element).offset():{left:0,top:0},scrollLeft:withinElement.scrollLeft(),scrollTop:withinElement.scrollTop(),width:withinElement.outerWidth(),height:withinElement.outerHeight()};}};$.fn.position=function(options){if(!options||!options.of){return _position.apply(this,arguments);}
options=$.extend({},options);var atOffset,targetWidth,targetHeight,targetOffset,basePosition,dimensions,target=$(options.of),within=$.position.getWithinInfo(options.within),scrollInfo=$.position.getScrollInfo(within),collision=(options.collision||"flip").split(" "),offsets={};dimensions=getDimensions(target);if(target[0].preventDefault){options.at="left top";}
targetWidth=dimensions.width;targetHeight=dimensions.height;targetOffset=dimensions.offset;basePosition=$.extend({},targetOffset);$.each(["my","at"],function(){var pos=(options[this]||"").split(" "),horizontalOffset,verticalOffset;if(pos.length===1){pos=rhorizontal.test(pos[0])?pos.concat(["center"]):rvertical.test(pos[0])?["center"].concat(pos):["center","center"];}
pos[0]=rhorizontal.test(pos[0])?pos[0]:"center";pos[1]=rvertical.test(pos[1])?pos[1]:"center";horizontalOffset=roffset.exec(pos[0]);verticalOffset=roffset.exec(pos[1]);offsets[this]=[horizontalOffset?horizontalOffset[0]:0,verticalOffset?verticalOffset[0]:0];options[this]=[rposition.exec(pos[0])[0],rposition.exec(pos[1])[0]];});if(collision.length===1){collision[1]=collision[0];}
if(options.at[0]==="right"){basePosition.left+=targetWidth;}else if(options.at[0]==="center"){basePosition.left+=targetWidth/2;}
if(options.at[1]==="bottom"){basePosition.top+=targetHeight;}else if(options.at[1]==="center"){basePosition.top+=targetHeight/2;}
atOffset=getOffsets(offsets.at,targetWidth,targetHeight);basePosition.left+=atOffset[0];basePosition.top+=atOffset[1];return this.each(function(){var collisionPosition,using,elem=$(this),elemWidth=elem.outerWidth(),elemHeight=elem.outerHeight(),marginLeft=parseCss(this,"marginLeft"),marginTop=parseCss(this,"marginTop"),collisionWidth=elemWidth+marginLeft+parseCss(this,"marginRight")+
scrollInfo.width,collisionHeight=elemHeight+marginTop+parseCss(this,"marginBottom")+
scrollInfo.height,position=$.extend({},basePosition),myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());if(options.my[0]==="right"){position.left-=elemWidth;}else if(options.my[0]==="center"){position.left-=elemWidth/2;}
if(options.my[1]==="bottom"){position.top-=elemHeight;}else if(options.my[1]==="center"){position.top-=elemHeight/2;}
position.left+=myOffset[0];position.top+=myOffset[1];collisionPosition={marginLeft:marginLeft,marginTop:marginTop};$.each(["left","top"],function(i,dir){if($.ui.position[collision[i]]){$.ui.position[collision[i]][dir](position,{targetWidth:targetWidth,targetHeight:targetHeight,elemWidth:elemWidth,elemHeight:elemHeight,collisionPosition:collisionPosition,collisionWidth:collisionWidth,collisionHeight:collisionHeight,offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],my:options.my,at:options.at,within:within,elem:elem});}});if(options.using){using=function(props){var left=targetOffset.left-position.left,right=left+targetWidth-elemWidth,top=targetOffset.top-position.top,bottom=top+targetHeight-elemHeight,feedback={target:{element:target,left:targetOffset.left,top:targetOffset.top,width:targetWidth,height:targetHeight},element:{element:elem,left:position.left,top:position.top,width:elemWidth,height:elemHeight},horizontal:right<0?"left":left>0?"right":"center",vertical:bottom<0?"top":top>0?"bottom":"middle"};if(targetWidth<elemWidth&&abs(left+right)<targetWidth){feedback.horizontal="center";}
if(targetHeight<elemHeight&&abs(top+bottom)<targetHeight){feedback.vertical="middle";}
if(max(abs(left),abs(right))>max(abs(top),abs(bottom))){feedback.important="horizontal";}else{feedback.important="vertical";}
options.using.call(this,props,feedback);};}
elem.offset($.extend(position,{using:using}));});};$.ui.position={fit:{left:function(position,data){var within=data.within,withinOffset=within.isWindow?within.scrollLeft:within.offset.left,outerWidth=within.width,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=withinOffset-collisionPosLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset,newOverRight;if(data.collisionWidth>outerWidth){if(overLeft>0&&overRight<=0){newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-
withinOffset;position.left+=overLeft-newOverRight;}else if(overRight>0&&overLeft<=0){position.left=withinOffset;}else{if(overLeft>overRight){position.left=withinOffset+outerWidth-data.collisionWidth;}else{position.left=withinOffset;}}}else if(overLeft>0){position.left+=overLeft;}else if(overRight>0){position.left-=overRight;}else{position.left=max(position.left-collisionPosLeft,position.left);}},top:function(position,data){var within=data.within,withinOffset=within.isWindow?within.scrollTop:within.offset.top,outerHeight=data.within.height,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=withinOffset-collisionPosTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset,newOverBottom;if(data.collisionHeight>outerHeight){if(overTop>0&&overBottom<=0){newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-
withinOffset;position.top+=overTop-newOverBottom;}else if(overBottom>0&&overTop<=0){position.top=withinOffset;}else{if(overTop>overBottom){position.top=withinOffset+outerHeight-data.collisionHeight;}else{position.top=withinOffset;}}}else if(overTop>0){position.top+=overTop;}else if(overBottom>0){position.top-=overBottom;}else{position.top=max(position.top-collisionPosTop,position.top);}}},flip:{left:function(position,data){var within=data.within,withinOffset=within.offset.left+within.scrollLeft,outerWidth=within.width,offsetLeft=within.isWindow?within.scrollLeft:within.offset.left,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=collisionPosLeft-offsetLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft,myOffset=data.my[0]==="left"?-data.elemWidth:data.my[0]==="right"?data.elemWidth:0,atOffset=data.at[0]==="left"?data.targetWidth:data.at[0]==="right"?-data.targetWidth:0,offset=-2*data.offset[0],newOverRight,newOverLeft;if(overLeft<0){newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-
outerWidth-withinOffset;if(newOverRight<0||newOverRight<abs(overLeft)){position.left+=myOffset+atOffset+offset;}}else if(overRight>0){newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+
atOffset+offset-offsetLeft;if(newOverLeft>0||abs(newOverLeft)<overRight){position.left+=myOffset+atOffset+offset;}}},top:function(position,data){var within=data.within,withinOffset=within.offset.top+within.scrollTop,outerHeight=within.height,offsetTop=within.isWindow?within.scrollTop:within.offset.top,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=collisionPosTop-offsetTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-offsetTop,top=data.my[1]==="top",myOffset=top?-data.elemHeight:data.my[1]==="bottom"?data.elemHeight:0,atOffset=data.at[1]==="top"?data.targetHeight:data.at[1]==="bottom"?-data.targetHeight:0,offset=-2*data.offset[1],newOverTop,newOverBottom;if(overTop<0){newOverBottom=position.top+myOffset+atOffset+offset+data.collisionHeight-
outerHeight-withinOffset;if(newOverBottom<0||newOverBottom<abs(overTop)){position.top+=myOffset+atOffset+offset;}}else if(overBottom>0){newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+
offset-offsetTop;if(newOverTop>0||abs(newOverTop)<overBottom){position.top+=myOffset+atOffset+offset;}}}},flipfit:{left:function(){$.ui.position.flip.left.apply(this,arguments);$.ui.position.fit.left.apply(this,arguments);},top:function(){$.ui.position.flip.top.apply(this,arguments);$.ui.position.fit.top.apply(this,arguments);}}};})();var position=$.ui.position;var data=$.extend($.expr[":"],{data:$.expr.createPseudo?$.expr.createPseudo(function(dataName){return function(elem){return!!$.data(elem,dataName);};}):function(elem,i,match){return!!$.data(elem,match[3]);}});var disableSelection=$.fn.extend({disableSelection:(function(){var eventType="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(eventType+".ui-disableSelection",function(event){event.preventDefault();});};})(),enableSelection:function(){return this.off(".ui-disableSelection");}});$.ui.focusable=function(element,hasTabindex){var map,mapName,img,focusableIfVisible,fieldset,nodeName=element.nodeName.toLowerCase();if("area"===nodeName){map=element.parentNode;mapName=map.name;if(!element.href||!mapName||map.nodeName.toLowerCase()!=="map"){return false;}
img=$("img[usemap='#"+mapName+"']");return img.length>0&&img.is(":visible");}
if(/^(input|select|textarea|button|object)$/.test(nodeName)){focusableIfVisible=!element.disabled;if(focusableIfVisible){fieldset=$(element).closest("fieldset")[0];if(fieldset){focusableIfVisible=!fieldset.disabled;}}}else if("a"===nodeName){focusableIfVisible=element.href||hasTabindex;}else{focusableIfVisible=hasTabindex;}
return focusableIfVisible&&$(element).is(":visible")&&visible($(element));};function visible(element){var visibility=element.css("visibility");while(visibility==="inherit"){element=element.parent();visibility=element.css("visibility");}
return visibility!=="hidden";}
$.extend($.expr[":"],{focusable:function(element){return $.ui.focusable(element,$.attr(element,"tabindex")!=null);}});var focusable=$.ui.focusable;var keycode=$.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};var scrollParent=$.fn.scrollParent=function(includeHidden){var position=this.css("position"),excludeStaticParent=position==="absolute",overflowRegex=includeHidden?/(auto|scroll|hidden)/:/(auto|scroll)/,scrollParent=this.parents().filter(function(){var parent=$(this);if(excludeStaticParent&&parent.css("position")==="static"){return false;}
return overflowRegex.test(parent.css("overflow")+parent.css("overflow-y")+
parent.css("overflow-x"));}).eq(0);return position==="fixed"||!scrollParent.length?$(this[0].ownerDocument||document):scrollParent;};var uniqueId=$.fn.extend({uniqueId:(function(){var uuid=0;return function(){return this.each(function(){if(!this.id){this.id="ui-id-"+(++uuid);}});};})(),removeUniqueId:function(){return this.each(function(){if(/^ui-id-\d+$/.test(this.id)){$(this).removeAttr("id");}});}});var ie=$.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var mouseHandled=false;$(document).on("mouseup",function(){mouseHandled=false;});var widgetsMouse=$.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var that=this;this.element.on("mousedown."+this.widgetName,function(event){return that._mouseDown(event);}).on("click."+this.widgetName,function(event){if(true===$.data(event.target,that.widgetName+".preventClickEvent")){$.removeData(event.target,that.widgetName+".preventClickEvent");event.stopImmediatePropagation();return false;}});this.started=false;},_mouseDestroy:function(){this.element.off("."+this.widgetName);if(this._mouseMoveDelegate){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate);}},_mouseDown:function(event){if(mouseHandled){return;}
this._mouseMoved=false;(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var that=this,btnIsLeft=(event.which===1),elIsCancel=(typeof this.options.cancel==="string"&&event.target.nodeName?$(event.target).closest(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true;}
this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){that.mouseDelayMet=true;},this.options.delay);}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true;}}
if(true===$.data(event.target,this.widgetName+".preventClickEvent")){$.removeData(event.target,this.widgetName+".preventClickEvent");}
this._mouseMoveDelegate=function(event){return that._mouseMove(event);};this._mouseUpDelegate=function(event){return that._mouseUp(event);};this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate);event.preventDefault();mouseHandled=true;return true;},_mouseMove:function(event){if(this._mouseMoved){if($.ui.ie&&(!document.documentMode||document.documentMode<9)&&!event.button){return this._mouseUp(event);}else if(!event.which){if(event.originalEvent.altKey||event.originalEvent.ctrlKey||event.originalEvent.metaKey||event.originalEvent.shiftKey){this.ignoreMissingWhich=true;}else if(!this.ignoreMissingWhich){return this._mouseUp(event);}}}
if(event.which||event.button){this._mouseMoved=true;}
if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault();}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event));}
return!this._mouseStarted;},_mouseUp:function(event){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(event.target===this._mouseDownEvent.target){$.data(event.target,this.widgetName+".preventClickEvent",true);}
this._mouseStop(event);}
if(this._mouseDelayTimer){clearTimeout(this._mouseDelayTimer);delete this._mouseDelayTimer;}
this.ignoreMissingWhich=false;mouseHandled=false;event.preventDefault();},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance);},_mouseDelayMet:function(){return this.mouseDelayMet;},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true;}});var plugin=$.ui.plugin={add:function(module,option,set){var i,proto=$.ui[module].prototype;for(i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args,allowDisconnected){var i,set=instance.plugins[name];if(!set){return;}
if(!allowDisconnected&&(!instance.element[0].parentNode||instance.element[0].parentNode.nodeType===11)){return;}
for(i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}};var safeActiveElement=$.ui.safeActiveElement=function(document){var activeElement;try{activeElement=document.activeElement;}catch(error){activeElement=document.body;}
if(!activeElement){activeElement=document.body;}
if(!activeElement.nodeName){activeElement=document.body;}
return activeElement;};var safeBlur=$.ui.safeBlur=function(element){if(element&&element.nodeName.toLowerCase()!=="body"){$(element).trigger("blur");}};$.widget("ui.draggable",$.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false,drag:null,start:null,stop:null},_create:function(){if(this.options.helper==="original"){this._setPositionRelative();}
if(this.options.addClasses){this._addClass("ui-draggable");}
this._setHandleClassName();this._mouseInit();},_setOption:function(key,value){this._super(key,value);if(key==="handle"){this._removeHandleClassName();this._setHandleClassName();}},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging")){this.destroyOnClear=true;return;}
this._removeHandleClassName();this._mouseDestroy();},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).closest(".ui-resizable-handle").length>0){return false;}
this.handle=this._getHandle(event);if(!this.handle){return false;}
this._blurActiveElement(event);this._blockFrames(o.iframeFix===true?"iframe":o.iframeFix);return true;},_blockFrames:function(selector){this.iframeBlocks=this.document.find(selector).map(function(){var iframe=$(this);return $("<div>").css("position","absolute").appendTo(iframe.parent()).outerWidth(iframe.outerWidth()).outerHeight(iframe.outerHeight()).offset(iframe.offset())[0];});},_unblockFrames:function(){if(this.iframeBlocks){this.iframeBlocks.remove();delete this.iframeBlocks;}},_blurActiveElement:function(event){var activeElement=$.ui.safeActiveElement(this.document[0]),target=$(event.target);if(target.closest(activeElement).length){return;}
$.ui.safeBlur(activeElement);},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._addClass(this.helper,"ui-draggable-dragging");this._cacheHelperProportions();if($.ui.ddmanager){$.ui.ddmanager.current=this;}
this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent(true);this.offsetParent=this.helper.offsetParent();this.hasFixedAncestor=this.helper.parents().filter(function(){return $(this).css("position")==="fixed";}).length>0;this.positionAbs=this.element.offset();this._refreshOffsets(event);this.originalPosition=this.position=this._generatePosition(event,false);this.originalPageX=event.pageX;this.originalPageY=event.pageY;(o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt));this._setContainment();if(this._trigger("start",event)===false){this._clear();return false;}
this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event);}
this._mouseDrag(event,true);if($.ui.ddmanager){$.ui.ddmanager.dragStart(this,event);}
return true;},_refreshOffsets:function(event){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:false,parent:this._getParentOffset(),relative:this._getRelativeOffset()};this.offset.click={left:event.pageX-this.offset.left,top:event.pageY-this.offset.top};},_mouseDrag:function(event,noPropagation){if(this.hasFixedAncestor){this.offset.parent=this._getParentOffset();}
this.position=this._generatePosition(event,true);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();if(this._trigger("drag",event,ui)===false){this._mouseUp(new $.Event("mouseup",event));return false;}
this.position=ui.position;}
this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";if($.ui.ddmanager){$.ui.ddmanager.drag(this,event);}
return false;},_mouseStop:function(event){var that=this,dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour){dropped=$.ui.ddmanager.drop(this,event);}
if(this.dropped){dropped=this.dropped;this.dropped=false;}
if((this.options.revert==="invalid"&&!dropped)||(this.options.revert==="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(that._trigger("stop",event)!==false){that._clear();}});}else{if(this._trigger("stop",event)!==false){this._clear();}}
return false;},_mouseUp:function(event){this._unblockFrames();if($.ui.ddmanager){$.ui.ddmanager.dragStop(this,event);}
if(this.handleElement.is(event.target)){this.element.trigger("focus");}
return $.ui.mouse.prototype._mouseUp.call(this,event);},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp(new $.Event("mouseup",{target:this.element[0]}));}else{this._clear();}
return this;},_getHandle:function(event){return this.options.handle?!!$(event.target).closest(this.element.find(this.options.handle)).length:true;},_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(event){var o=this.options,helperIsFunction=$.isFunction(o.helper),helper=helperIsFunction?$(o.helper.apply(this.element[0],[event])):(o.helper==="clone"?this.element.clone().removeAttr("id"):this.element);if(!helper.parents("body").length){helper.appendTo((o.appendTo==="parent"?this.element[0].parentNode:o.appendTo));}
if(helperIsFunction&&helper[0]===this.element[0]){this._setPositionRelative();}
if(helper[0]!==this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position"))){helper.css("position","absolute");}
return helper;},_setPositionRelative:function(){if(!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative";}},_adjustOffsetFromHelper:function(obj){if(typeof obj==="string"){obj=obj.split(" ");}
if($.isArray(obj)){obj={left:+obj[0],top:+obj[1]||0};}
if("left"in obj){this.offset.click.left=obj.left+this.margins.left;}
if("right"in obj){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;}
if("top"in obj){this.offset.click.top=obj.top+this.margins.top;}
if("bottom"in obj){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;}},_isRootNode:function(element){return(/(html|body)/i).test(element.tagName)||element===this.document[0];},_getParentOffset:function(){var po=this.offsetParent.offset(),document=this.document[0];if(this.cssPosition==="absolute"&&this.scrollParent[0]!==document&&$.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop();}
if(this._isRootNode(this.offsetParent[0])){po={top:0,left:0};}
return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition!=="relative"){return{top:0,left:0};}
var p=this.element.position(),scrollIsRootNode=this._isRootNode(this.scrollParent[0]);return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+
(!scrollIsRootNode?this.scrollParent.scrollTop():0),left:p.left-(parseInt(this.helper.css("left"),10)||0)+
(!scrollIsRootNode?this.scrollParent.scrollLeft():0)};},_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 isUserScrollable,c,ce,o=this.options,document=this.document[0];this.relativeContainer=null;if(!o.containment){this.containment=null;return;}
if(o.containment==="window"){this.containment=[$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,$(window).scrollLeft()+$(window).width()-
this.helperProportions.width-this.margins.left,$(window).scrollTop()+
($(window).height()||document.body.parentNode.scrollHeight)-
this.helperProportions.height-this.margins.top];return;}
if(o.containment==="document"){this.containment=[0,0,$(document).width()-this.helperProportions.width-this.margins.left,($(document).height()||document.body.parentNode.scrollHeight)-
this.helperProportions.height-this.margins.top];return;}
if(o.containment.constructor===Array){this.containment=o.containment;return;}
if(o.containment==="parent"){o.containment=this.helper[0].parentNode;}
c=$(o.containment);ce=c[0];if(!ce){return;}
isUserScrollable=/(scroll|auto)/.test(c.css("overflow"));this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+
(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+
(parseInt(c.css("paddingTop"),10)||0),(isUserScrollable?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-
(parseInt(c.css("borderRightWidth"),10)||0)-
(parseInt(c.css("paddingRight"),10)||0)-
this.helperProportions.width-
this.margins.left-
this.margins.right,(isUserScrollable?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-
(parseInt(c.css("borderBottomWidth"),10)||0)-
(parseInt(c.css("paddingBottom"),10)||0)-
this.helperProportions.height-
this.margins.top-
this.margins.bottom];this.relativeContainer=c;},_convertPositionTo:function(d,pos){if(!pos){pos=this.position;}
var mod=d==="absolute"?1:-1,scrollIsRootNode=this._isRootNode(this.scrollParent[0]);return{top:(pos.top+
this.offset.relative.top*mod+
this.offset.parent.top*mod-
((this.cssPosition==="fixed"?-this.offset.scroll.top:(scrollIsRootNode?0:this.offset.scroll.top))*mod)),left:(pos.left+
this.offset.relative.left*mod+
this.offset.parent.left*mod-
((this.cssPosition==="fixed"?-this.offset.scroll.left:(scrollIsRootNode?0:this.offset.scroll.left))*mod))};},_generatePosition:function(event,constrainPosition){var containment,co,top,left,o=this.options,scrollIsRootNode=this._isRootNode(this.scrollParent[0]),pageX=event.pageX,pageY=event.pageY;if(!scrollIsRootNode||!this.offset.scroll){this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()};}
if(constrainPosition){if(this.containment){if(this.relativeContainer){co=this.relativeContainer.offset();containment=[this.containment[0]+co.left,this.containment[1]+co.top,this.containment[2]+co.left,this.containment[3]+co.top];}else{containment=this.containment;}
if(event.pageX-this.offset.click.left<containment[0]){pageX=containment[0]+this.offset.click.left;}
if(event.pageY-this.offset.click.top<containment[1]){pageY=containment[1]+this.offset.click.top;}
if(event.pageX-this.offset.click.left>containment[2]){pageX=containment[2]+this.offset.click.left;}
if(event.pageY-this.offset.click.top>containment[3]){pageY=containment[3]+this.offset.click.top;}}
if(o.grid){top=o.grid[1]?this.originalPageY+Math.round((pageY-
this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY;pageY=containment?((top-this.offset.click.top>=containment[1]||top-this.offset.click.top>containment[3])?top:((top-this.offset.click.top>=containment[1])?top-o.grid[1]:top+o.grid[1])):top;left=o.grid[0]?this.originalPageX+
Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX;pageX=containment?((left-this.offset.click.left>=containment[0]||left-this.offset.click.left>containment[2])?left:((left-this.offset.click.left>=containment[0])?left-o.grid[0]:left+o.grid[0])):left;}
if(o.axis==="y"){pageX=this.originalPageX;}
if(o.axis==="x"){pageY=this.originalPageY;}}
return{top:(pageY-
this.offset.click.top-
this.offset.relative.top-
this.offset.parent.top+
(this.cssPosition==="fixed"?-this.offset.scroll.top:(scrollIsRootNode?0:this.offset.scroll.top))),left:(pageX-
this.offset.click.left-
this.offset.relative.left-
this.offset.parent.left+
(this.cssPosition==="fixed"?-this.offset.scroll.left:(scrollIsRootNode?0:this.offset.scroll.left)))};},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging");if(this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval){this.helper.remove();}
this.helper=null;this.cancelHelperRemoval=false;if(this.destroyOnClear){this.destroy();}},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui,this],true);if(/^(drag|start|stop)/.test(type)){this.positionAbs=this._convertPositionTo("absolute");ui.offset=this.positionAbs;}
return $.Widget.prototype._trigger.call(this,type,event,ui);},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs};}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui,draggable){var uiSortable=$.extend({},ui,{item:draggable.element});draggable.sortables=[];$(draggable.options.connectToSortable).each(function(){var sortable=$(this).sortable("instance");if(sortable&&!sortable.options.disabled){draggable.sortables.push(sortable);sortable.refreshPositions();sortable._trigger("activate",event,uiSortable);}});},stop:function(event,ui,draggable){var uiSortable=$.extend({},ui,{item:draggable.element});draggable.cancelHelperRemoval=false;$.each(draggable.sortables,function(){var sortable=this;if(sortable.isOver){sortable.isOver=0;draggable.cancelHelperRemoval=true;sortable.cancelHelperRemoval=false;sortable._storedCSS={position:sortable.placeholder.css("position"),top:sortable.placeholder.css("top"),left:sortable.placeholder.css("left")};sortable._mouseStop(event);sortable.options.helper=sortable.options._helper;}else{sortable.cancelHelperRemoval=true;sortable._trigger("deactivate",event,uiSortable);}});},drag:function(event,ui,draggable){$.each(draggable.sortables,function(){var innermostIntersecting=false,sortable=this;sortable.positionAbs=draggable.positionAbs;sortable.helperProportions=draggable.helperProportions;sortable.offset.click=draggable.offset.click;if(sortable._intersectsWith(sortable.containerCache)){innermostIntersecting=true;$.each(draggable.sortables,function(){this.positionAbs=draggable.positionAbs;this.helperProportions=draggable.helperProportions;this.offset.click=draggable.offset.click;if(this!==sortable&&this._intersectsWith(this.containerCache)&&$.contains(sortable.element[0],this.element[0])){innermostIntersecting=false;}
return innermostIntersecting;});}
if(innermostIntersecting){if(!sortable.isOver){sortable.isOver=1;draggable._parent=ui.helper.parent();sortable.currentItem=ui.helper.appendTo(sortable.element).data("ui-sortable-item",true);sortable.options._helper=sortable.options.helper;sortable.options.helper=function(){return ui.helper[0];};event.target=sortable.currentItem[0];sortable._mouseCapture(event,true);sortable._mouseStart(event,true,true);sortable.offset.click.top=draggable.offset.click.top;sortable.offset.click.left=draggable.offset.click.left;sortable.offset.parent.left-=draggable.offset.parent.left-
sortable.offset.parent.left;sortable.offset.parent.top-=draggable.offset.parent.top-
sortable.offset.parent.top;draggable._trigger("toSortable",event);draggable.dropped=sortable.element;$.each(draggable.sortables,function(){this.refreshPositions();});draggable.currentItem=draggable.element;sortable.fromOutside=draggable;}
if(sortable.currentItem){sortable._mouseDrag(event);ui.position=sortable.position;}}else{if(sortable.isOver){sortable.isOver=0;sortable.cancelHelperRemoval=true;sortable.options._revert=sortable.options.revert;sortable.options.revert=false;sortable._trigger("out",event,sortable._uiHash(sortable));sortable._mouseStop(event,true);sortable.options.revert=sortable.options._revert;sortable.options.helper=sortable.options._helper;if(sortable.placeholder){sortable.placeholder.remove();}
ui.helper.appendTo(draggable._parent);draggable._refreshOffsets(event);ui.position=draggable._generatePosition(event,true);draggable._trigger("fromSortable",event);draggable.dropped=false;$.each(draggable.sortables,function(){this.refreshPositions();});}}});}});$.ui.plugin.add("draggable","cursor",{start:function(event,ui,instance){var t=$("body"),o=instance.options;if(t.css("cursor")){o._cursor=t.css("cursor");}
t.css("cursor",o.cursor);},stop:function(event,ui,instance){var o=instance.options;if(o._cursor){$("body").css("cursor",o._cursor);}}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui,instance){var t=$(ui.helper),o=instance.options;if(t.css("opacity")){o._opacity=t.css("opacity");}
t.css("opacity",o.opacity);},stop:function(event,ui,instance){var o=instance.options;if(o._opacity){$(ui.helper).css("opacity",o._opacity);}}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui,i){if(!i.scrollParentNotHidden){i.scrollParentNotHidden=i.helper.scrollParent(false);}
if(i.scrollParentNotHidden[0]!==i.document[0]&&i.scrollParentNotHidden[0].tagName!=="HTML"){i.overflowOffset=i.scrollParentNotHidden.offset();}},drag:function(event,ui,i){var o=i.options,scrolled=false,scrollParent=i.scrollParentNotHidden[0],document=i.document[0];if(scrollParent!==document&&scrollParent.tagName!=="HTML"){if(!o.axis||o.axis!=="x"){if((i.overflowOffset.top+scrollParent.offsetHeight)-event.pageY<o.scrollSensitivity){scrollParent.scrollTop=scrolled=scrollParent.scrollTop+o.scrollSpeed;}else if(event.pageY-i.overflowOffset.top<o.scrollSensitivity){scrollParent.scrollTop=scrolled=scrollParent.scrollTop-o.scrollSpeed;}}
if(!o.axis||o.axis!=="y"){if((i.overflowOffset.left+scrollParent.offsetWidth)-event.pageX<o.scrollSensitivity){scrollParent.scrollLeft=scrolled=scrollParent.scrollLeft+o.scrollSpeed;}else if(event.pageX-i.overflowOffset.left<o.scrollSensitivity){scrollParent.scrollLeft=scrolled=scrollParent.scrollLeft-o.scrollSpeed;}}}else{if(!o.axis||o.axis!=="x"){if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);}else if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);}}
if(!o.axis||o.axis!=="y"){if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);}else if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}}}
if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(i,event);}}});$.ui.plugin.add("draggable","snap",{start:function(event,ui,i){var o=i.options;i.snapElements=[];$(o.snap.constructor!==String?(o.snap.items||":data(ui-draggable)"):o.snap).each(function(){var $t=$(this),$o=$t.offset();if(this!==i.element[0]){i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left});}});},drag:function(event,ui,inst){var ts,bs,ls,rs,l,r,t,b,i,first,o=inst.options,d=o.snapTolerance,x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(i=inst.snapElements.length-1;i>=0;i--){l=inst.snapElements[i].left-inst.margins.left;r=l+inst.snapElements[i].width;t=inst.snapElements[i].top-inst.margins.top;b=t+inst.snapElements[i].height;if(x2<l-d||x1>r+d||y2<t-d||y1>b+d||!$.contains(inst.snapElements[i].item.ownerDocument,inst.snapElements[i].item)){if(inst.snapElements[i].snapping){(inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})));}
inst.snapElements[i].snapping=false;continue;}
if(o.snapMode!=="inner"){ts=Math.abs(t-y2)<=d;bs=Math.abs(b-y1)<=d;ls=Math.abs(l-x2)<=d;rs=Math.abs(r-x1)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top;}
if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top;}
if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left;}
if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left;}}
first=(ts||bs||ls||rs);if(o.snapMode!=="outer"){ts=Math.abs(t-y1)<=d;bs=Math.abs(b-y2)<=d;ls=Math.abs(l-x1)<=d;rs=Math.abs(r-x2)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top;}
if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top;}
if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left;}
if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left;}}
if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)){(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})));}
inst.snapElements[i].snapping=(ts||bs||ls||rs||first);}}});$.ui.plugin.add("draggable","stack",{start:function(event,ui,instance){var min,o=instance.options,group=$.makeArray($(o.stack)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||0)-
(parseInt($(b).css("zIndex"),10)||0);});if(!group.length){return;}
min=parseInt($(group[0]).css("zIndex"),10)||0;$(group).each(function(i){$(this).css("zIndex",min+i);});this.css("zIndex",(min+group.length));}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui,instance){var t=$(ui.helper),o=instance.options;if(t.css("zIndex")){o._zIndex=t.css("zIndex");}
t.css("zIndex",o.zIndex);},stop:function(event,ui,instance){var o=instance.options;if(o._zIndex){$(ui.helper).css("zIndex",o._zIndex);}}});var widgetsDraggable=$.ui.draggable;$.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:true,greedy:false,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var proportions,o=this.options,accept=o.accept;this.isover=false;this.isout=true;this.accept=$.isFunction(accept)?accept:function(d){return d.is(accept);};this.proportions=function(){if(arguments.length){proportions=arguments[0];}else{return proportions?proportions:proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};}};this._addToManager(o.scope);o.addClasses&&this._addClass("ui-droppable");},_addToManager:function(scope){$.ui.ddmanager.droppables[scope]=$.ui.ddmanager.droppables[scope]||[];$.ui.ddmanager.droppables[scope].push(this);},_splice:function(drop){var i=0;for(;i<drop.length;i++){if(drop[i]===this){drop.splice(i,1);}}},_destroy:function(){var drop=$.ui.ddmanager.droppables[this.options.scope];this._splice(drop);},_setOption:function(key,value){if(key==="accept"){this.accept=$.isFunction(value)?value:function(d){return d.is(value);};}else if(key==="scope"){var drop=$.ui.ddmanager.droppables[this.options.scope];this._splice(drop);this._addToManager(value);}
this._super(key,value);},_activate:function(event){var draggable=$.ui.ddmanager.current;this._addActiveClass();if(draggable){this._trigger("activate",event,this.ui(draggable));}},_deactivate:function(event){var draggable=$.ui.ddmanager.current;this._removeActiveClass();if(draggable){this._trigger("deactivate",event,this.ui(draggable));}},_over:function(event){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]===this.element[0]){return;}
if(this.accept.call(this.element[0],(draggable.currentItem||draggable.element))){this._addHoverClass();this._trigger("over",event,this.ui(draggable));}},_out:function(event){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]===this.element[0]){return;}
if(this.accept.call(this.element[0],(draggable.currentItem||draggable.element))){this._removeHoverClass();this._trigger("out",event,this.ui(draggable));}},_drop:function(event,custom){var draggable=custom||$.ui.ddmanager.current,childrenIntersection=false;if(!draggable||(draggable.currentItem||draggable.element)[0]===this.element[0]){return false;}
this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var inst=$(this).droppable("instance");if(inst.options.greedy&&!inst.options.disabled&&inst.options.scope===draggable.options.scope&&inst.accept.call(inst.element[0],(draggable.currentItem||draggable.element))&&intersect(draggable,$.extend(inst,{offset:inst.element.offset()}),inst.options.tolerance,event)){childrenIntersection=true;return false;}});if(childrenIntersection){return false;}
if(this.accept.call(this.element[0],(draggable.currentItem||draggable.element))){this._removeActiveClass();this._removeHoverClass();this._trigger("drop",event,this.ui(draggable));return this.element;}
return false;},ui:function(c){return{draggable:(c.currentItem||c.element),helper:c.helper,position:c.position,offset:c.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 intersect=$.ui.intersect=(function(){function isOverAxis(x,reference,size){return(x>=reference)&&(x<(reference+size));}
return function(draggable,droppable,toleranceMode,event){if(!droppable.offset){return false;}
var x1=(draggable.positionAbs||draggable.position.absolute).left+draggable.margins.left,y1=(draggable.positionAbs||draggable.position.absolute).top+draggable.margins.top,x2=x1+draggable.helperProportions.width,y2=y1+draggable.helperProportions.height,l=droppable.offset.left,t=droppable.offset.top,r=l+droppable.proportions().width,b=t+droppable.proportions().height;switch(toleranceMode){case"fit":return(l<=x1&&x2<=r&&t<=y1&&y2<=b);case"intersect":return(l<x1+(draggable.helperProportions.width/2)&&x2-(draggable.helperProportions.width/2)<r&&t<y1+(draggable.helperProportions.height/2)&&y2-(draggable.helperProportions.height/2)<b);case"pointer":return isOverAxis(event.pageY,t,droppable.proportions().height)&&isOverAxis(event.pageX,l,droppable.proportions().width);case"touch":return((y1>=t&&y1<=b)||(y2>=t&&y2<=b)||(y1<t&&y2>b))&&((x1>=l&&x1<=r)||(x2>=l&&x2<=r)||(x1<l&&x2>r));default:return false;}};})();$.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,event){var i,j,m=$.ui.ddmanager.droppables[t.options.scope]||[],type=event?event.type:null,list=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();droppablesLoop:for(i=0;i<m.length;i++){if(m[i].options.disabled||(t&&!m[i].accept.call(m[i].element[0],(t.currentItem||t.element)))){continue;}
for(j=0;j<list.length;j++){if(list[j]===m[i].element[0]){m[i].proportions().height=0;continue droppablesLoop;}}
m[i].visible=m[i].element.css("display")!=="none";if(!m[i].visible){continue;}
if(type==="mousedown"){m[i]._activate.call(m[i],event);}
m[i].offset=m[i].element.offset();m[i].proportions({width:m[i].element[0].offsetWidth,height:m[i].element[0].offsetHeight});}},drop:function(draggable,event){var dropped=false;$.each(($.ui.ddmanager.droppables[draggable.options.scope]||[]).slice(),function(){if(!this.options){return;}
if(!this.options.disabled&&this.visible&&intersect(draggable,this,this.options.tolerance,event)){dropped=this._drop.call(this,event)||dropped;}
if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],(draggable.currentItem||draggable.element))){this.isout=true;this.isover=false;this._deactivate.call(this,event);}});return dropped;},dragStart:function(draggable,event){draggable.element.parentsUntil("body").on("scroll.droppable",function(){if(!draggable.options.refreshPositions){$.ui.ddmanager.prepareOffsets(draggable,event);}});},drag:function(draggable,event){if(draggable.options.refreshPositions){$.ui.ddmanager.prepareOffsets(draggable,event);}
$.each($.ui.ddmanager.droppables[draggable.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible){return;}
var parentInstance,scope,parent,intersects=intersect(draggable,this,this.options.tolerance,event),c=!intersects&&this.isover?"isout":(intersects&&!this.isover?"isover":null);if(!c){return;}
if(this.options.greedy){scope=this.options.scope;parent=this.element.parents(":data(ui-droppable)").filter(function(){return $(this).droppable("instance").options.scope===scope;});if(parent.length){parentInstance=$(parent[0]).droppable("instance");parentInstance.greedyChild=(c==="isover");}}
if(parentInstance&&c==="isover"){parentInstance.isover=false;parentInstance.isout=true;parentInstance._out.call(parentInstance,event);}
this[c]=true;this[c==="isout"?"isover":"isout"]=false;this[c==="isover"?"_over":"_out"].call(this,event);if(parentInstance&&c==="isout"){parentInstance.isout=false;parentInstance.isover=true;parentInstance._over.call(parentInstance,event);}});},dragStop:function(draggable,event){draggable.element.parentsUntil("body").off("scroll.droppable");if(!draggable.options.refreshPositions){$.ui.ddmanager.prepareOffsets(draggable,event);}}};if($.uiBackCompat!==false){$.widget("ui.droppable",$.ui.droppable,{options:{hoverClass:false,activeClass:false},_addActiveClass:function(){this._super();if(this.options.activeClass){this.element.addClass(this.options.activeClass);}},_removeActiveClass:function(){this._super();if(this.options.activeClass){this.element.removeClass(this.options.activeClass);}},_addHoverClass:function(){this._super();if(this.options.hoverClass){this.element.addClass(this.options.hoverClass);}},_removeHoverClass:function(){this._super();if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass);}}});}
var widgetsDroppable=$.ui.droppable;$.widget("ui.resizable",$.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(value){return parseFloat(value)||0;},_isNumber:function(value){return!isNaN(parseFloat(value));},_hasScroll:function(el,a){if($(el).css("overflow")==="hidden"){return false;}
var scroll=(a&&a==="left")?"scrollLeft":"scrollTop",has=false;if(el[scroll]>0){return true;}
el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;},_create:function(){var margins,o=this.options,that=this;this._addClass("ui-resizable");$.extend(this,{_aspectRatio:!!(o.aspectRatio),aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)){this.element.wrap($("<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=true;margins={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")};this.element.css(margins);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(margins);this._proportionallyResize();}
this._setupHandles();if(o.autoHide){$(this.element).on("mouseenter",function(){if(o.disabled){return;}
that._removeClass("ui-resizable-autohide");that._handles.show();}).on("mouseleave",function(){if(o.disabled){return;}
if(!that.resizing){that._addClass("ui-resizable-autohide");that._handles.hide();}});}
this._mouseInit();},_destroy:function(){this._mouseDestroy();var wrapper,_destroy=function(exp){$(exp).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove();};if(this.elementIsWrapper){_destroy(this.element);wrapper=this.element;this.originalElement.css({position:wrapper.css("position"),width:wrapper.outerWidth(),height:wrapper.outerHeight(),top:wrapper.css("top"),left:wrapper.css("left")}).insertAfter(wrapper);wrapper.remove();}
this.originalElement.css("resize",this.originalResizeStyle);_destroy(this.originalElement);return this;},_setOption:function(key,value){this._super(key,value);switch(key){case"handles":this._removeHandles();this._setupHandles();break;default:break;}},_setupHandles:function(){var o=this.options,handle,i,n,hname,axis,that=this;this.handles=o.handles||(!$(".ui-resizable-handle",this.element).length?"e,s,se":{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"});this._handles=$();if(this.handles.constructor===String){if(this.handles==="all"){this.handles="n,e,s,w,se,sw,ne,nw";}
n=this.handles.split(",");this.handles={};for(i=0;i<n.length;i++){handle=$.trim(n[i]);hname="ui-resizable-"+handle;axis=$("<div>");this._addClass(axis,"ui-resizable-handle "+hname);axis.css({zIndex:o.zIndex});this.handles[handle]=".ui-resizable-"+handle;this.element.append(axis);}}
this._renderAxis=function(target){var i,axis,padPos,padWrapper;target=target||this.element;for(i in this.handles){if(this.handles[i].constructor===String){this.handles[i]=this.element.children(this.handles[i]).first().show();}else if(this.handles[i].jquery||this.handles[i].nodeType){this.handles[i]=$(this.handles[i]);this._on(this.handles[i],{"mousedown":that._mouseDown});}
if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)){axis=$(this.handles[i],this.element);padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth();padPos=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");target.css(padPos,padWrapper);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(){if(!that.resizing){if(this.className){axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);}
that.axis=axis&&axis[1]?axis[1]:"se";}});if(o.autoHide){this._handles.hide();this._addClass("ui-resizable-autohide");}},_removeHandles:function(){this._handles.remove();},_mouseCapture:function(event){var i,handle,capture=false;for(i in this.handles){handle=$(this.handles[i])[0];if(handle===event.target||$.contains(handle,event.target)){capture=true;}}
return!this.options.disabled&&capture;},_mouseStart:function(event){var curleft,curtop,cursor,o=this.options,el=this.element;this.resizing=true;this._renderProxy();curleft=this._num(this.helper.css("left"));curtop=this._num(this.helper.css("top"));if(o.containment){curleft+=$(o.containment).scrollLeft()||0;curtop+=$(o.containment).scrollTop()||0;}
this.offset=this.helper.offset();this.position={left:curleft,top:curtop};this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:el.width(),height:el.height()};this.originalSize=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()};this.originalPosition={left:curleft,top:curtop};this.originalMousePosition={left:event.pageX,top:event.pageY};this.aspectRatio=(typeof o.aspectRatio==="number")?o.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);cursor=$(".ui-resizable-"+this.axis).css("cursor");$("body").css("cursor",cursor==="auto"?this.axis+"-resize":cursor);this._addClass("ui-resizable-resizing");this._propagate("start",event);return true;},_mouseDrag:function(event){var data,props,smp=this.originalMousePosition,a=this.axis,dx=(event.pageX-smp.left)||0,dy=(event.pageY-smp.top)||0,trigger=this._change[a];this._updatePrevProperties();if(!trigger){return false;}
data=trigger.apply(this,[event,dx,dy]);this._updateVirtualBoundaries(event.shiftKey);if(this._aspectRatio||event.shiftKey){data=this._updateRatio(data,event);}
data=this._respectSize(data,event);this._updateCache(data);this._propagate("resize",event);props=this._applyChanges();if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize();}
if(!$.isEmptyObject(props)){this._updatePrevProperties();this._trigger("resize",event,this.ui());this._applyChanges();}
return false;},_mouseStop:function(event){this.resizing=false;var pr,ista,soffseth,soffsetw,s,left,top,o=this.options,that=this;if(this._helper){pr=this._proportionallyResizeElements;ista=pr.length&&(/textarea/i).test(pr[0].nodeName);soffseth=ista&&this._hasScroll(pr[0],"left")?0:that.sizeDiff.height;soffsetw=ista?0:that.sizeDiff.width;s={width:(that.helper.width()-soffsetw),height:(that.helper.height()-soffseth)};left=(parseFloat(that.element.css("left"))+
(that.position.left-that.originalPosition.left))||null;top=(parseFloat(that.element.css("top"))+
(that.position.top-that.originalPosition.top))||null;if(!o.animate){this.element.css($.extend(s,{top:top,left:left}));}
that.helper.height(that.size.height);that.helper.width(that.size.width);if(this._helper&&!o.animate){this._proportionallyResize();}}
$("body").css("cursor","auto");this._removeClass("ui-resizable-resizing");this._propagate("stop",event);if(this._helper){this.helper.remove();}
return false;},_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 props={};if(this.position.top!==this.prevPosition.top){props.top=this.position.top+"px";}
if(this.position.left!==this.prevPosition.left){props.left=this.position.left+"px";}
if(this.size.width!==this.prevSize.width){props.width=this.size.width+"px";}
if(this.size.height!==this.prevSize.height){props.height=this.size.height+"px";}
this.helper.css(props);return props;},_updateVirtualBoundaries:function(forceAspectRatio){var pMinWidth,pMaxWidth,pMinHeight,pMaxHeight,b,o=this.options;b={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:Infinity,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:Infinity};if(this._aspectRatio||forceAspectRatio){pMinWidth=b.minHeight*this.aspectRatio;pMinHeight=b.minWidth/this.aspectRatio;pMaxWidth=b.maxHeight*this.aspectRatio;pMaxHeight=b.maxWidth/this.aspectRatio;if(pMinWidth>b.minWidth){b.minWidth=pMinWidth;}
if(pMinHeight>b.minHeight){b.minHeight=pMinHeight;}
if(pMaxWidth<b.maxWidth){b.maxWidth=pMaxWidth;}
if(pMaxHeight<b.maxHeight){b.maxHeight=pMaxHeight;}}
this._vBoundaries=b;},_updateCache:function(data){this.offset=this.helper.offset();if(this._isNumber(data.left)){this.position.left=data.left;}
if(this._isNumber(data.top)){this.position.top=data.top;}
if(this._isNumber(data.height)){this.size.height=data.height;}
if(this._isNumber(data.width)){this.size.width=data.width;}},_updateRatio:function(data){var cpos=this.position,csize=this.size,a=this.axis;if(this._isNumber(data.height)){data.width=(data.height*this.aspectRatio);}else if(this._isNumber(data.width)){data.height=(data.width/this.aspectRatio);}
if(a==="sw"){data.left=cpos.left+(csize.width-data.width);data.top=null;}
if(a==="nw"){data.top=cpos.top+(csize.height-data.height);data.left=cpos.left+(csize.width-data.width);}
return data;},_respectSize:function(data){var o=this._vBoundaries,a=this.axis,ismaxw=this._isNumber(data.width)&&o.maxWidth&&(o.maxWidth<data.width),ismaxh=this._isNumber(data.height)&&o.maxHeight&&(o.maxHeight<data.height),isminw=this._isNumber(data.width)&&o.minWidth&&(o.minWidth>data.width),isminh=this._isNumber(data.height)&&o.minHeight&&(o.minHeight>data.height),dw=this.originalPosition.left+this.originalSize.width,dh=this.originalPosition.top+this.originalSize.height,cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);if(isminw){data.width=o.minWidth;}
if(isminh){data.height=o.minHeight;}
if(ismaxw){data.width=o.maxWidth;}
if(ismaxh){data.height=o.maxHeight;}
if(isminw&&cw){data.left=dw-o.minWidth;}
if(ismaxw&&cw){data.left=dw-o.maxWidth;}
if(isminh&&ch){data.top=dh-o.minHeight;}
if(ismaxh&&ch){data.top=dh-o.maxHeight;}
if(!data.width&&!data.height&&!data.left&&data.top){data.top=null;}else if(!data.width&&!data.height&&!data.top&&data.left){data.left=null;}
return data;},_getPaddingPlusBorderDimensions:function(element){var i=0,widths=[],borders=[element.css("borderTopWidth"),element.css("borderRightWidth"),element.css("borderBottomWidth"),element.css("borderLeftWidth")],paddings=[element.css("paddingTop"),element.css("paddingRight"),element.css("paddingBottom"),element.css("paddingLeft")];for(;i<4;i++){widths[i]=(parseFloat(borders[i])||0);widths[i]+=(parseFloat(paddings[i])||0);}
return{height:widths[0]+widths[2],width:widths[1]+widths[3]};},_proportionallyResize:function(){if(!this._proportionallyResizeElements.length){return;}
var prel,i=0,element=this.helper||this.element;for(;i<this._proportionallyResizeElements.length;i++){prel=this._proportionallyResizeElements[i];if(!this.outerDimensions){this.outerDimensions=this._getPaddingPlusBorderDimensions(prel);}
prel.css({height:(element.height()-this.outerDimensions.height)||0,width:(element.width()-this.outerDimensions.width)||0});}},_renderProxy:function(){var el=this.element,o=this.options;this.elementOffset=el.offset();if(this._helper){this.helper=this.helper||$("<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:++o.zIndex});this.helper.appendTo("body").disableSelection();}else{this.helper=this.element;}},_change:{e:function(event,dx){return{width:this.originalSize.width+dx};},w:function(event,dx){var cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx};},n:function(event,dx,dy){var cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy};},s:function(event,dx,dy){return{height:this.originalSize.height+dy};},se:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]));},sw:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]));},ne:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]));},nw:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]));}},_propagate:function(n,event){$.ui.plugin.call(this,n,[event,this.ui()]);(n!=="resize"&&this._trigger(n,event,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};}});$.ui.plugin.add("resizable","animate",{stop:function(event){var that=$(this).resizable("instance"),o=that.options,pr=that._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),soffseth=ista&&that._hasScroll(pr[0],"left")?0:that.sizeDiff.height,soffsetw=ista?0:that.sizeDiff.width,style={width:(that.size.width-soffsetw),height:(that.size.height-soffseth)},left=(parseFloat(that.element.css("left"))+
(that.position.left-that.originalPosition.left))||null,top=(parseFloat(that.element.css("top"))+
(that.position.top-that.originalPosition.top))||null;that.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data={width:parseFloat(that.element.css("width")),height:parseFloat(that.element.css("height")),top:parseFloat(that.element.css("top")),left:parseFloat(that.element.css("left"))};if(pr&&pr.length){$(pr[0]).css({width:data.width,height:data.height});}
that._updateCache(data);that._propagate("resize",event);}});}});$.ui.plugin.add("resizable","containment",{start:function(){var element,p,co,ch,cw,width,height,that=$(this).resizable("instance"),o=that.options,el=that.element,oc=o.containment,ce=(oc instanceof $)?oc.get(0):(/parent/.test(oc))?el.parent().get(0):oc;if(!ce){return;}
that.containerElement=$(ce);if(/document/.test(oc)||oc===document){that.containerOffset={left:0,top:0};that.containerPosition={left:0,top:0};that.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight};}else{element=$(ce);p=[];$(["Top","Right","Left","Bottom"]).each(function(i,name){p[i]=that._num(element.css("padding"+name));});that.containerOffset=element.offset();that.containerPosition=element.position();that.containerSize={height:(element.innerHeight()-p[3]),width:(element.innerWidth()-p[1])};co=that.containerOffset;ch=that.containerSize.height;cw=that.containerSize.width;width=(that._hasScroll(ce,"left")?ce.scrollWidth:cw);height=(that._hasScroll(ce)?ce.scrollHeight:ch);that.parentData={element:ce,left:co.left,top:co.top,width:width,height:height};}},resize:function(event){var woset,hoset,isParent,isOffsetRelative,that=$(this).resizable("instance"),o=that.options,co=that.containerOffset,cp=that.position,pRatio=that._aspectRatio||event.shiftKey,cop={top:0,left:0},ce=that.containerElement,continueResize=true;if(ce[0]!==document&&(/static/).test(ce.css("position"))){cop=co;}
if(cp.left<(that._helper?co.left:0)){that.size.width=that.size.width+
(that._helper?(that.position.left-co.left):(that.position.left-cop.left));if(pRatio){that.size.height=that.size.width/that.aspectRatio;continueResize=false;}
that.position.left=o.helper?co.left:0;}
if(cp.top<(that._helper?co.top:0)){that.size.height=that.size.height+
(that._helper?(that.position.top-co.top):that.position.top);if(pRatio){that.size.width=that.size.height*that.aspectRatio;continueResize=false;}
that.position.top=that._helper?co.top:0;}
isParent=that.containerElement.get(0)===that.element.parent().get(0);isOffsetRelative=/relative|absolute/.test(that.containerElement.css("position"));if(isParent&&isOffsetRelative){that.offset.left=that.parentData.left+that.position.left;that.offset.top=that.parentData.top+that.position.top;}else{that.offset.left=that.element.offset().left;that.offset.top=that.element.offset().top;}
woset=Math.abs(that.sizeDiff.width+
(that._helper?that.offset.left-cop.left:(that.offset.left-co.left)));hoset=Math.abs(that.sizeDiff.height+
(that._helper?that.offset.top-cop.top:(that.offset.top-co.top)));if(woset+that.size.width>=that.parentData.width){that.size.width=that.parentData.width-woset;if(pRatio){that.size.height=that.size.width/that.aspectRatio;continueResize=false;}}
if(hoset+that.size.height>=that.parentData.height){that.size.height=that.parentData.height-hoset;if(pRatio){that.size.width=that.size.height*that.aspectRatio;continueResize=false;}}
if(!continueResize){that.position.left=that.prevPosition.left;that.position.top=that.prevPosition.top;that.size.width=that.prevSize.width;that.size.height=that.prevSize.height;}},stop:function(){var that=$(this).resizable("instance"),o=that.options,co=that.containerOffset,cop=that.containerPosition,ce=that.containerElement,helper=$(that.helper),ho=helper.offset(),w=helper.outerWidth()-that.sizeDiff.width,h=helper.outerHeight()-that.sizeDiff.height;if(that._helper&&!o.animate&&(/relative/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h});}
if(that._helper&&!o.animate&&(/static/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h});}}});$.ui.plugin.add("resizable","alsoResize",{start:function(){var that=$(this).resizable("instance"),o=that.options;$(o.alsoResize).each(function(){var el=$(this);el.data("ui-resizable-alsoresize",{width:parseFloat(el.width()),height:parseFloat(el.height()),left:parseFloat(el.css("left")),top:parseFloat(el.css("top"))});});},resize:function(event,ui){var that=$(this).resizable("instance"),o=that.options,os=that.originalSize,op=that.originalPosition,delta={height:(that.size.height-os.height)||0,width:(that.size.width-os.width)||0,top:(that.position.top-op.top)||0,left:(that.position.left-op.left)||0};$(o.alsoResize).each(function(){var el=$(this),start=$(this).data("ui-resizable-alsoresize"),style={},css=el.parents(ui.originalElement[0]).length?["width","height"]:["width","height","top","left"];$.each(css,function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);if(sum&&sum>=0){style[prop]=sum||null;}});el.css(style);});},stop:function(){$(this).removeData("ui-resizable-alsoresize");}});$.ui.plugin.add("resizable","ghost",{start:function(){var that=$(this).resizable("instance"),cs=that.size;that.ghost=that.originalElement.clone();that.ghost.css({opacity:0.25,display:"block",position:"relative",height:cs.height,width:cs.width,margin:0,left:0,top:0});that._addClass(that.ghost,"ui-resizable-ghost");if($.uiBackCompat!==false&&typeof that.options.ghost==="string"){that.ghost.addClass(this.options.ghost);}
that.ghost.appendTo(that.helper);},resize:function(){var that=$(this).resizable("instance");if(that.ghost){that.ghost.css({position:"relative",height:that.size.height,width:that.size.width});}},stop:function(){var that=$(this).resizable("instance");if(that.ghost&&that.helper){that.helper.get(0).removeChild(that.ghost.get(0));}}});$.ui.plugin.add("resizable","grid",{resize:function(){var outerDimensions,that=$(this).resizable("instance"),o=that.options,cs=that.size,os=that.originalSize,op=that.originalPosition,a=that.axis,grid=typeof o.grid==="number"?[o.grid,o.grid]:o.grid,gridX=(grid[0]||1),gridY=(grid[1]||1),ox=Math.round((cs.width-os.width)/gridX)*gridX,oy=Math.round((cs.height-os.height)/gridY)*gridY,newWidth=os.width+ox,newHeight=os.height+oy,isMaxWidth=o.maxWidth&&(o.maxWidth<newWidth),isMaxHeight=o.maxHeight&&(o.maxHeight<newHeight),isMinWidth=o.minWidth&&(o.minWidth>newWidth),isMinHeight=o.minHeight&&(o.minHeight>newHeight);o.grid=grid;if(isMinWidth){newWidth+=gridX;}
if(isMinHeight){newHeight+=gridY;}
if(isMaxWidth){newWidth-=gridX;}
if(isMaxHeight){newHeight-=gridY;}
if(/^(se|s|e)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight;}else if(/^(ne)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight;that.position.top=op.top-oy;}else if(/^(sw)$/.test(a)){that.size.width=newWidth;that.size.height=newHeight;that.position.left=op.left-ox;}else{if(newHeight-gridY<=0||newWidth-gridX<=0){outerDimensions=that._getPaddingPlusBorderDimensions(this);}
if(newHeight-gridY>0){that.size.height=newHeight;that.position.top=op.top-oy;}else{newHeight=gridY-outerDimensions.height;that.size.height=newHeight;that.position.top=op.top+os.height-newHeight;}
if(newWidth-gridX>0){that.size.width=newWidth;that.position.left=op.left-ox;}else{newWidth=gridX-outerDimensions.width;that.size.width=newWidth;that.position.left=op.left+os.width-newWidth;}}}});var widgetsResizable=$.ui.resizable;var widgetsSelectable=$.widget("ui.selectable",$.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var that=this;this._addClass("ui-selectable");this.dragged=false;this.refresh=function(){that.elementPos=$(that.element[0]).offset();that.selectees=$(that.options.filter,that.element[0]);that._addClass(that.selectees,"ui-selectee");that.selectees.each(function(){var $this=$(this),selecteeOffset=$this.offset(),pos={left:selecteeOffset.left-that.elementPos.left,top:selecteeOffset.top-that.elementPos.top};$.data(this,"selectable-item",{element:this,$element:$this,left:pos.left,top:pos.top,right:pos.left+$this.outerWidth(),bottom:pos.top+$this.outerHeight(),startselected:false,selected:$this.hasClass("ui-selected"),selecting:$this.hasClass("ui-selecting"),unselecting:$this.hasClass("ui-unselecting")});});};this.refresh();this._mouseInit();this.helper=$("<div>");this._addClass(this.helper,"ui-selectable-helper");},_destroy:function(){this.selectees.removeData("selectable-item");this._mouseDestroy();},_mouseStart:function(event){var that=this,options=this.options;this.opos=[event.pageX,event.pageY];this.elementPos=$(this.element[0]).offset();if(this.options.disabled){return;}
this.selectees=$(options.filter,this.element[0]);this._trigger("start",event);$(options.appendTo).append(this.helper);this.helper.css({"left":event.pageX,"top":event.pageY,"width":0,"height":0});if(options.autoRefresh){this.refresh();}
this.selectees.filter(".ui-selected").each(function(){var selectee=$.data(this,"selectable-item");selectee.startselected=true;if(!event.metaKey&&!event.ctrlKey){that._removeClass(selectee.$element,"ui-selected");selectee.selected=false;that._addClass(selectee.$element,"ui-unselecting");selectee.unselecting=true;that._trigger("unselecting",event,{unselecting:selectee.element});}});$(event.target).parents().addBack().each(function(){var doSelect,selectee=$.data(this,"selectable-item");if(selectee){doSelect=(!event.metaKey&&!event.ctrlKey)||!selectee.$element.hasClass("ui-selected");that._removeClass(selectee.$element,doSelect?"ui-unselecting":"ui-selected")._addClass(selectee.$element,doSelect?"ui-selecting":"ui-unselecting");selectee.unselecting=!doSelect;selectee.selecting=doSelect;selectee.selected=doSelect;if(doSelect){that._trigger("selecting",event,{selecting:selectee.element});}else{that._trigger("unselecting",event,{unselecting:selectee.element});}
return false;}});},_mouseDrag:function(event){this.dragged=true;if(this.options.disabled){return;}
var tmp,that=this,options=this.options,x1=this.opos[0],y1=this.opos[1],x2=event.pageX,y2=event.pageY;if(x1>x2){tmp=x2;x2=x1;x1=tmp;}
if(y1>y2){tmp=y2;y2=y1;y1=tmp;}
this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});this.selectees.each(function(){var selectee=$.data(this,"selectable-item"),hit=false,offset={};if(!selectee||selectee.element===that.element[0]){return;}
offset.left=selectee.left+that.elementPos.left;offset.right=selectee.right+that.elementPos.left;offset.top=selectee.top+that.elementPos.top;offset.bottom=selectee.bottom+that.elementPos.top;if(options.tolerance==="touch"){hit=(!(offset.left>x2||offset.right<x1||offset.top>y2||offset.bottom<y1));}else if(options.tolerance==="fit"){hit=(offset.left>x1&&offset.right<x2&&offset.top>y1&&offset.bottom<y2);}
if(hit){if(selectee.selected){that._removeClass(selectee.$element,"ui-selected");selectee.selected=false;}
if(selectee.unselecting){that._removeClass(selectee.$element,"ui-unselecting");selectee.unselecting=false;}
if(!selectee.selecting){that._addClass(selectee.$element,"ui-selecting");selectee.selecting=true;that._trigger("selecting",event,{selecting:selectee.element});}}else{if(selectee.selecting){if((event.metaKey||event.ctrlKey)&&selectee.startselected){that._removeClass(selectee.$element,"ui-selecting");selectee.selecting=false;that._addClass(selectee.$element,"ui-selected");selectee.selected=true;}else{that._removeClass(selectee.$element,"ui-selecting");selectee.selecting=false;if(selectee.startselected){that._addClass(selectee.$element,"ui-unselecting");selectee.unselecting=true;}
that._trigger("unselecting",event,{unselecting:selectee.element});}}
if(selectee.selected){if(!event.metaKey&&!event.ctrlKey&&!selectee.startselected){that._removeClass(selectee.$element,"ui-selected");selectee.selected=false;that._addClass(selectee.$element,"ui-unselecting");selectee.unselecting=true;that._trigger("unselecting",event,{unselecting:selectee.element});}}}});return false;},_mouseStop:function(event){var that=this;this.dragged=false;$(".ui-unselecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");that._removeClass(selectee.$element,"ui-unselecting");selectee.unselecting=false;selectee.startselected=false;that._trigger("unselected",event,{unselected:selectee.element});});$(".ui-selecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");that._removeClass(selectee.$element,"ui-selecting")._addClass(selectee.$element,"ui-selected");selectee.selecting=false;selectee.selected=true;selectee.startselected=true;that._trigger("selected",event,{selected:selectee.element});});this._trigger("stop",event);this.helper.remove();return false;}});var widgetsSortable=$.widget("ui.sortable",$.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:false,options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000,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(x,reference,size){return(x>=reference)&&(x<(reference+size));},_isFloating:function(item){return(/left|right/).test(item.css("float"))||(/inline|table-cell/).test(item.css("display"));},_create:function(){this.containerCache={};this._addClass("ui-sortable");this.refresh();this.offset=this.element.offset();this._mouseInit();this._setHandleClassName();this.ready=true;},_setOption:function(key,value){this._super(key,value);if(key==="handle"){this._setHandleClassName();}},_setHandleClassName:function(){var that=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle");$.each(this.items,function(){that._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle");});},_destroy:function(){this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--){this.items[i].item.removeData(this.widgetName+"-item");}
return this;},_mouseCapture:function(event,overrideHandle){var currentItem=null,validHandle=false,that=this;if(this.reverting){return false;}
if(this.options.disabled||this.options.type==="static"){return false;}
this._refreshItems(event);$(event.target).parents().each(function(){if($.data(this,that.widgetName+"-item")===that){currentItem=$(this);return false;}});if($.data(event.target,that.widgetName+"-item")===that){currentItem=$(event.target);}
if(!currentItem){return false;}
if(this.options.handle&&!overrideHandle){$(this.options.handle,currentItem).find("*").addBack().each(function(){if(this===event.target){validHandle=true;}});if(!validHandle){return false;}}
this.currentItem=currentItem;this._removeCurrentsFromItems();return true;},_mouseStart:function(event,overrideHandle,noActivation){var i,body,o=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);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};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.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(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;(o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt));this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!==this.currentItem[0]){this.currentItem.hide();}
this._createPlaceholder();if(o.containment){this._setContainment();}
if(o.cursor&&o.cursor!=="auto"){body=this.document.find("body");this.storedCursor=body.css("cursor");body.css("cursor",o.cursor);this.storedStylesheet=$("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(body);}
if(o.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity");}
this.helper.css("opacity",o.opacity);}
if(o.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex");}
this.helper.css("zIndex",o.zIndex);}
if(this.scrollParent[0]!==this.document[0]&&this.scrollParent[0].tagName!=="HTML"){this.overflowOffset=this.scrollParent.offset();}
this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions();}
if(!noActivation){for(i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("activate",event,this._uiHash(this));}}
if($.ui.ddmanager){$.ui.ddmanager.current=this;}
if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event);}
this.dragging=true;this._addClass(this.helper,"ui-sortable-helper");this._mouseDrag(event);return true;},_mouseDrag:function(event){var i,item,itemElement,intersection,o=this.options,scrolled=false;this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs;}
if(this.options.scroll){if(this.scrollParent[0]!==this.document[0]&&this.scrollParent[0].tagName!=="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-
event.pageY<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed;}else if(event.pageY-this.overflowOffset.top<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed;}
if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-
event.pageX<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed;}else if(event.pageX-this.overflowOffset.left<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed;}}else{if(event.pageY-this.document.scrollTop()<o.scrollSensitivity){scrolled=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed);}else if(this.window.height()-(event.pageY-this.document.scrollTop())<o.scrollSensitivity){scrolled=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed);}
if(event.pageX-this.document.scrollLeft()<o.scrollSensitivity){scrolled=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed);}else if(this.window.width()-(event.pageX-this.document.scrollLeft())<o.scrollSensitivity){scrolled=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed);}}
if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event);}}
this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!=="y"){this.helper[0].style.left=this.position.left+"px";}
if(!this.options.axis||this.options.axis!=="x"){this.helper[0].style.top=this.position.top+"px";}
for(i=this.items.length-1;i>=0;i--){item=this.items[i];itemElement=item.item[0];intersection=this._intersectsWithPointer(item);if(!intersection){continue;}
if(item.instance!==this.currentContainer){continue;}
if(itemElement!==this.currentItem[0]&&this.placeholder[intersection===1?"next":"prev"]()[0]!==itemElement&&!$.contains(this.placeholder[0],itemElement)&&(this.options.type==="semi-dynamic"?!$.contains(this.element[0],itemElement):true)){this.direction=intersection===1?"down":"up";if(this.options.tolerance==="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item);}else{break;}
this._trigger("change",event,this._uiHash());break;}}
this._contactContainers(event);if($.ui.ddmanager){$.ui.ddmanager.drag(this,event);}
this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false;},_mouseStop:function(event,noPropagation){if(!event){return;}
if($.ui.ddmanager&&!this.options.dropBehaviour){$.ui.ddmanager.drop(this,event);}
if(this.options.revert){var that=this,cur=this.placeholder.offset(),axis=this.options.axis,animation={};if(!axis||axis==="x"){animation.left=cur.left-this.offset.parent.left-this.margins.left+
(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft);}
if(!axis||axis==="y"){animation.top=cur.top-this.offset.parent.top-this.margins.top+
(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop);}
this.reverting=true;$(this.helper).animate(animation,parseInt(this.options.revert,10)||500,function(){that._clear(event);});}else{this._clear(event,noPropagation);}
return false;},cancel:function(){if(this.dragging){this._mouseUp(new $.Event("mouseup",{target:null}));if(this.options.helper==="original"){this.currentItem.css(this._storedCSS);this._removeClass(this.currentItem,"ui-sortable-helper");}else{this.currentItem.show();}
for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("deactivate",null,this._uiHash(this));if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",null,this._uiHash(this));this.containers[i].containerCache.over=0;}}}
if(this.placeholder){if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0]);}
if(this.options.helper!=="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove();}
$.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){$(this.domPosition.prev).after(this.currentItem);}else{$(this.domPosition.parent).prepend(this.currentItem);}}
return this;},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected),str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[\-=_](.+)/));if(res){str.push((o.key||res[1]+"[]")+"="+(o.key&&o.expression?res[1]:res[2]));}});if(!str.length&&o.key){str.push(o.key+"=");}
return str.join("&");},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected),ret=[];o=o||{};items.each(function(){ret.push($(o.item||this).attr(o.attribute||"id")||"");});return ret;},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height,l=item.left,r=l+item.width,t=item.top,b=t+item.height,dyClick=this.offset.click.top,dxClick=this.offset.click.left,isOverElementHeight=(this.options.axis==="x")||((y1+dyClick)>t&&(y1+dyClick)<b),isOverElementWidth=(this.options.axis==="y")||((x1+dxClick)>l&&(x1+dxClick)<r),isOverElement=isOverElementHeight&&isOverElementWidth;if(this.options.tolerance==="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!=="pointer"&&this.helperProportions[this.floating?"width":"height"]>item[this.floating?"width":"height"])){return isOverElement;}else{return(l<x1+(this.helperProportions.width/2)&&x2-(this.helperProportions.width/2)<r&&t<y1+(this.helperProportions.height/2)&&y2-(this.helperProportions.height/2)<b);}},_intersectsWithPointer:function(item){var verticalDirection,horizontalDirection,isOverElementHeight=(this.options.axis==="x")||this._isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height),isOverElementWidth=(this.options.axis==="y")||this._isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width),isOverElement=isOverElementHeight&&isOverElementWidth;if(!isOverElement){return false;}
verticalDirection=this._getDragVerticalDirection();horizontalDirection=this._getDragHorizontalDirection();return this.floating?((horizontalDirection==="right"||verticalDirection==="down")?2:1):(verticalDirection&&(verticalDirection==="down"?2:1));},_intersectsWithSides:function(item){var isOverBottomHalf=this._isOverAxis(this.positionAbs.top+
this.offset.click.top,item.top+(item.height/2),item.height),isOverRightHalf=this._isOverAxis(this.positionAbs.left+
this.offset.click.left,item.left+(item.width/2),item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection){return((horizontalDirection==="right"&&isOverRightHalf)||(horizontalDirection==="left"&&!isOverRightHalf));}else{return verticalDirection&&((verticalDirection==="down"&&isOverBottomHalf)||(verticalDirection==="up"&&!isOverBottomHalf));}},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return delta!==0&&(delta>0?"down":"up");},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!==0&&(delta>0?"right":"left");},refresh:function(event){this._refreshItems(event);this._setHandleClassName();this.refreshPositions();return this;},_connectWith:function(){var options=this.options;return options.connectWith.constructor===String?[options.connectWith]:options.connectWith;},_getItemsAsjQuery:function(connected){var i,j,cur,inst,items=[],queries=[],connectWith=this._connectWith();if(connectWith&&connected){for(i=connectWith.length-1;i>=0;i--){cur=$(connectWith[i],this.document[0]);for(j=cur.length-1;j>=0;j--){inst=$.data(cur[j],this.widgetFullName);if(inst&&inst!==this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),inst]);}}}}
queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);function addItems(){items.push(this);}
for(i=queries.length-1;i>=0;i--){queries[i][0].each(addItems);}
return $(items);},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=$.grep(this.items,function(item){for(var j=0;j<list.length;j++){if(list[j]===item.item[0]){return false;}}
return true;});},_refreshItems:function(event){this.items=[];this.containers=[this];var i,j,cur,inst,targetData,_queries,item,queriesLength,items=this.items,queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$(this.options.items,this.element),this]],connectWith=this._connectWith();if(connectWith&&this.ready){for(i=connectWith.length-1;i>=0;i--){cur=$(connectWith[i],this.document[0]);for(j=cur.length-1;j>=0;j--){inst=$.data(cur[j],this.widgetFullName);if(inst&&inst!==this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]);this.containers.push(inst);}}}}
for(i=queries.length-1;i>=0;i--){targetData=queries[i][1];_queries=queries[i][0];for(j=0,queriesLength=_queries.length;j<queriesLength;j++){item=$(_queries[j]);item.data(this.widgetName+"-item",targetData);items.push({item:item,instance:targetData,width:0,height:0,left:0,top:0});}}},refreshPositions:function(fast){this.floating=this.items.length?this.options.axis==="x"||this._isFloating(this.items[0].item):false;if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset();}
var i,item,t,p;for(i=this.items.length-1;i>=0;i--){item=this.items[i];if(item.instance!==this.currentContainer&&this.currentContainer&&item.item[0]!==this.currentItem[0]){continue;}
t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t.outerWidth();item.height=t.outerHeight();}
p=t.offset();item.left=p.left;item.top=p.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--){p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.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(that){that=that||this;var className,o=that.options;if(!o.placeholder||o.placeholder.constructor===String){className=o.placeholder;o.placeholder={element:function(){var nodeName=that.currentItem[0].nodeName.toLowerCase(),element=$("<"+nodeName+">",that.document[0]);that._addClass(element,"ui-sortable-placeholder",className||that.currentItem[0].className)._removeClass(element,"ui-sortable-helper");if(nodeName==="tbody"){that._createTrPlaceholder(that.currentItem.find("tr").eq(0),$("<tr>",that.document[0]).appendTo(element));}else if(nodeName==="tr"){that._createTrPlaceholder(that.currentItem,element);}else if(nodeName==="img"){element.attr("src",that.currentItem.attr("src"));}
if(!className){element.css("visibility","hidden");}
return element;},update:function(container,p){if(className&&!o.forcePlaceholderSize){return;}
if(!p.height()){p.height(that.currentItem.innerHeight()-
parseInt(that.currentItem.css("paddingTop")||0,10)-
parseInt(that.currentItem.css("paddingBottom")||0,10));}
if(!p.width()){p.width(that.currentItem.innerWidth()-
parseInt(that.currentItem.css("paddingLeft")||0,10)-
parseInt(that.currentItem.css("paddingRight")||0,10));}}};}
that.placeholder=$(o.placeholder.element.call(that.element,that.currentItem));that.currentItem.after(that.placeholder);o.placeholder.update(that,that.placeholder);},_createTrPlaceholder:function(sourceTr,targetTr){var that=this;sourceTr.children().each(function(){$("<td>&#160;</td>",that.document[0]).attr("colspan",$(this).attr("colspan")||1).appendTo(targetTr);});},_contactContainers:function(event){var i,j,dist,itemWithLeastDistance,posProperty,sizeProperty,cur,nearBottom,floating,axis,innermostContainer=null,innermostIndex=null;for(i=this.containers.length-1;i>=0;i--){if($.contains(this.currentItem[0],this.containers[i].element[0])){continue;}
if(this._intersectsWith(this.containers[i].containerCache)){if(innermostContainer&&$.contains(this.containers[i].element[0],innermostContainer.element[0])){continue;}
innermostContainer=this.containers[i];innermostIndex=i;}else{if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",event,this._uiHash(this));this.containers[i].containerCache.over=0;}}}
if(!innermostContainer){return;}
if(this.containers.length===1){if(!this.containers[innermostIndex].containerCache.over){this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));this.containers[innermostIndex].containerCache.over=1;}}else{dist=10000;itemWithLeastDistance=null;floating=innermostContainer.floating||this._isFloating(this.currentItem);posProperty=floating?"left":"top";sizeProperty=floating?"width":"height";axis=floating?"pageX":"pageY";for(j=this.items.length-1;j>=0;j--){if(!$.contains(this.containers[innermostIndex].element[0],this.items[j].item[0])){continue;}
if(this.items[j].item[0]===this.currentItem[0]){continue;}
cur=this.items[j].item.offset()[posProperty];nearBottom=false;if(event[axis]-cur>this.items[j][sizeProperty]/2){nearBottom=true;}
if(Math.abs(event[axis]-cur)<dist){dist=Math.abs(event[axis]-cur);itemWithLeastDistance=this.items[j];this.direction=nearBottom?"up":"down";}}
if(!itemWithLeastDistance&&!this.options.dropOnEmpty){return;}
if(this.currentContainer===this.containers[innermostIndex]){if(!this.currentContainer.containerCache.over){this.containers[innermostIndex]._trigger("over",event,this._uiHash());this.currentContainer.containerCache.over=1;}
return;}
itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,true):this._rearrange(event,null,this.containers[innermostIndex].element,true);this._trigger("change",event,this._uiHash());this.containers[innermostIndex]._trigger("change",event,this._uiHash(this));this.currentContainer=this.containers[innermostIndex];this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[innermostIndex]._trigger("over",event,this._uiHash(this));this.containers[innermostIndex].containerCache.over=1;}},_createHelper:function(event){var o=this.options,helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event,this.currentItem])):(o.helper==="clone"?this.currentItem.clone():this.currentItem);if(!helper.parents("body").length){$(o.appendTo!=="parent"?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0]);}
if(helper[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")};}
if(!helper[0].style.width||o.forceHelperSize){helper.width(this.currentItem.width());}
if(!helper[0].style.height||o.forceHelperSize){helper.height(this.currentItem.height());}
return helper;},_adjustOffsetFromHelper:function(obj){if(typeof obj==="string"){obj=obj.split(" ");}
if($.isArray(obj)){obj={left:+obj[0],top:+obj[1]||0};}
if("left"in obj){this.offset.click.left=obj.left+this.margins.left;}
if("right"in obj){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;}
if("top"in obj){this.offset.click.top=obj.top+this.margins.top;}
if("bottom"in obj){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition==="absolute"&&this.scrollParent[0]!==this.document[0]&&$.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop();}
if(this.offsetParent[0]===this.document[0].body||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()==="html"&&$.ui.ie)){po={top:0,left:0};}
return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition==="relative"){var p=this.currentItem.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+
this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+
this.scrollParent.scrollLeft()};}else{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 ce,co,over,o=this.options;if(o.containment==="parent"){o.containment=this.helper[0].parentNode;}
if(o.containment==="document"||o.containment==="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,o.containment==="document"?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,(o.containment==="document"?(this.document.height()||document.body.parentNode.scrollHeight):this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];}
if(!(/^(document|window|parent)$/).test(o.containment)){ce=$(o.containment)[0];co=$(o.containment).offset();over=($(ce).css("overflow")!=="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+
(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+
(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-
(parseInt($(ce).css("borderLeftWidth"),10)||0)-
(parseInt($(ce).css("paddingRight"),10)||0)-
this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-
(parseInt($(ce).css("borderTopWidth"),10)||0)-
(parseInt($(ce).css("paddingBottom"),10)||0)-
this.helperProportions.height-this.margins.top];}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position;}
var mod=d==="absolute"?1:-1,scroll=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==this.document[0]&&$.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+
this.offset.relative.top*mod+
this.offset.parent.top*mod-
((this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+
this.offset.relative.left*mod+
this.offset.parent.left*mod-
((this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))};},_generatePosition:function(event){var top,left,o=this.options,pageX=event.pageX,pageY=event.pageY,scroll=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==this.document[0]&&$.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition==="relative"&&!(this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0])){this.offset.relative=this._getRelativeOffset();}
if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left;}
if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top;}
if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left;}
if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top;}}
if(o.grid){top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?((top-this.offset.click.top>=this.containment[1]&&top-this.offset.click.top<=this.containment[3])?top:((top-this.offset.click.top>=this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?((left-this.offset.click.left>=this.containment[0]&&left-this.offset.click.left<=this.containment[2])?left:((left-this.offset.click.left>=this.containment[0])?left-o.grid[0]:left+o.grid[0])):left;}}
return{top:(pageY-
this.offset.click.top-
this.offset.relative.top-
this.offset.parent.top+
((this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-
this.offset.click.left-
this.offset.relative.left-
this.offset.parent.left+
((this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))};},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==="down"?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var counter=this.counter;this._delay(function(){if(counter===this.counter){this.refreshPositions(!hardRefresh);}});},_clear:function(event,noPropagation){this.reverting=false;var i,delayedTriggers=[];if(!this._noFinalSort&&this.currentItem.parent().length){this.placeholder.before(this.currentItem);}
this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(i in this._storedCSS){if(this._storedCSS[i]==="auto"||this._storedCSS[i]==="static"){this._storedCSS[i]="";}}
this.currentItem.css(this._storedCSS);this._removeClass(this.currentItem,"ui-sortable-helper");}else{this.currentItem.show();}
if(this.fromOutside&&!noPropagation){delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside));});}
if((this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!noPropagation){delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash());});}
if(this!==this.currentContainer){if(!noPropagation){delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash());});delayedTriggers.push((function(c){return function(event){c._trigger("receive",event,this._uiHash(this));};}).call(this,this.currentContainer));delayedTriggers.push((function(c){return function(event){c._trigger("update",event,this._uiHash(this));};}).call(this,this.currentContainer));}}
function delayEvent(type,instance,container){return function(event){container._trigger(type,event,instance._uiHash(instance));};}
for(i=this.containers.length-1;i>=0;i--){if(!noPropagation){delayedTriggers.push(delayEvent("deactivate",this,this.containers[i]));}
if(this.containers[i].containerCache.over){delayedTriggers.push(delayEvent("out",this,this.containers[i]));this.containers[i].containerCache.over=0;}}
if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove();}
if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity);}
if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex);}
this.dragging=false;if(!noPropagation){this._trigger("beforeStop",event,this._uiHash());}
this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(!this.cancelHelperRemoval){if(this.helper[0]!==this.currentItem[0]){this.helper.remove();}
this.helper=null;}
if(!noPropagation){for(i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event);}
this._trigger("stop",event,this._uiHash());}
this.fromOutside=false;return!this.cancelHelperRemoval;},_trigger:function(){if($.Widget.prototype._trigger.apply(this,arguments)===false){this.cancel();}},_uiHash:function(_inst){var inst=_inst||this;return{helper:inst.helper,placeholder:inst.placeholder||$([]),position:inst.position,originalPosition:inst.originalPosition,offset:inst.positionAbs,item:inst.currentItem,sender:_inst?_inst.element:null};}});var widgetsMenu=$.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=false;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(event){event.preventDefault();},"click .ui-menu-item":function(event){var target=$(event.target);var active=$($.ui.safeActiveElement(this.document[0]));if(!this.mouseHandled&&target.not(".ui-state-disabled").length){this.select(event);if(!event.isPropagationStopped()){this.mouseHandled=true;}
if(target.has(".ui-menu").length){this.expand(event);}else if(!this.element.is(":focus")&&active.closest(".ui-menu").length){this.element.trigger("focus",[true]);if(this.active&&this.active.parents(".ui-menu").length===1){clearTimeout(this.timer);}}}},"mouseenter .ui-menu-item":function(event){if(this.previousFilter){return;}
var actualTarget=$(event.target).closest(".ui-menu-item"),target=$(event.currentTarget);if(actualTarget[0]!==target[0]){return;}
this._removeClass(target.siblings().children(".ui-state-active"),null,"ui-state-active");this.focus(event,target);},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(event,keepActiveItem){var item=this.active||this.element.find(this.options.items).eq(0);if(!keepActiveItem){this.focus(event,item);}},blur:function(event){this._delay(function(){var notContained=!$.contains(this.element[0],$.ui.safeActiveElement(this.document[0]));if(notContained){this.collapseAll(event);}});},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(event){if(this._closeOnDocumentClick(event)){this.collapseAll(event);}
this.mouseHandled=false;}});},_destroy:function(){var items=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),submenus=items.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();submenus.children().each(function(){var elem=$(this);if(elem.data("ui-menu-submenu-caret")){elem.remove();}});},_keydown:function(event){var match,prev,character,skip,preventDefault=true;switch(event.keyCode){case $.ui.keyCode.PAGE_UP:this.previousPage(event);break;case $.ui.keyCode.PAGE_DOWN:this.nextPage(event);break;case $.ui.keyCode.HOME:this._move("first","first",event);break;case $.ui.keyCode.END:this._move("last","last",event);break;case $.ui.keyCode.UP:this.previous(event);break;case $.ui.keyCode.DOWN:this.next(event);break;case $.ui.keyCode.LEFT:this.collapse(event);break;case $.ui.keyCode.RIGHT:if(this.active&&!this.active.is(".ui-state-disabled")){this.expand(event);}
break;case $.ui.keyCode.ENTER:case $.ui.keyCode.SPACE:this._activate(event);break;case $.ui.keyCode.ESCAPE:this.collapse(event);break;default:preventDefault=false;prev=this.previousFilter||"";skip=false;character=event.keyCode>=96&&event.keyCode<=105?(event.keyCode-96).toString():String.fromCharCode(event.keyCode);clearTimeout(this.filterTimer);if(character===prev){skip=true;}else{character=prev+character;}
match=this._filterMenuItems(character);match=skip&&match.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):match;if(!match.length){character=String.fromCharCode(event.keyCode);match=this._filterMenuItems(character);}
if(match.length){this.focus(event,match);this.previousFilter=character;this.filterTimer=this._delay(function(){delete this.previousFilter;},1000);}else{delete this.previousFilter;}}
if(preventDefault){event.preventDefault();}},_activate:function(event){if(this.active&&!this.active.is(".ui-state-disabled")){if(this.active.children("[aria-haspopup='true']").length){this.expand(event);}else{this.select(event);}}},refresh:function(){var menus,items,newSubmenus,newItems,newWrappers,that=this,icon=this.options.icons.submenu,submenus=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length);newSubmenus=submenus.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var menu=$(this),item=menu.prev(),submenuCaret=$("<span>").data("ui-menu-submenu-caret",true);that._addClass(submenuCaret,"ui-menu-icon","ui-icon "+icon);item.attr("aria-haspopup","true").prepend(submenuCaret);menu.attr("aria-labelledby",item.attr("id"));});this._addClass(newSubmenus,"ui-menu","ui-widget ui-widget-content ui-front");menus=submenus.add(this.element);items=menus.find(this.options.items);items.not(".ui-menu-item").each(function(){var item=$(this);if(that._isDivider(item)){that._addClass(item,"ui-menu-divider","ui-widget-content");}});newItems=items.not(".ui-menu-item, .ui-menu-divider");newWrappers=newItems.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()});this._addClass(newItems,"ui-menu-item")._addClass(newWrappers,"ui-menu-item-wrapper");items.filter(".ui-state-disabled").attr("aria-disabled","true");if(this.active&&!$.contains(this.element[0],this.active[0])){this.blur();}},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role];},_setOption:function(key,value){if(key==="icons"){var icons=this.element.find(".ui-menu-icon");this._removeClass(icons,null,this.options.icons.submenu)._addClass(icons,null,value.submenu);}
this._super(key,value);},_setOptionDisabled:function(value){this._super(value);this.element.attr("aria-disabled",String(value));this._toggleClass(null,"ui-state-disabled",!!value);},focus:function(event,item){var nested,focused,activeParent;this.blur(event,event&&event.type==="focus");this._scrollIntoView(item);this.active=item.first();focused=this.active.children(".ui-menu-item-wrapper");this._addClass(focused,null,"ui-state-active");if(this.options.role){this.element.attr("aria-activedescendant",focused.attr("id"));}
activeParent=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper");this._addClass(activeParent,null,"ui-state-active");if(event&&event.type==="keydown"){this._close();}else{this.timer=this._delay(function(){this._close();},this.delay);}
nested=item.children(".ui-menu");if(nested.length&&event&&(/^mouse/.test(event.type))){this._startOpening(nested);}
this.activeMenu=item.parent();this._trigger("focus",event,{item:item});},_scrollIntoView:function(item){var borderTop,paddingTop,offset,scroll,elementHeight,itemHeight;if(this._hasScroll()){borderTop=parseFloat($.css(this.activeMenu[0],"borderTopWidth"))||0;paddingTop=parseFloat($.css(this.activeMenu[0],"paddingTop"))||0;offset=item.offset().top-this.activeMenu.offset().top-borderTop-paddingTop;scroll=this.activeMenu.scrollTop();elementHeight=this.activeMenu.height();itemHeight=item.outerHeight();if(offset<0){this.activeMenu.scrollTop(scroll+offset);}else if(offset+itemHeight>elementHeight){this.activeMenu.scrollTop(scroll+offset-elementHeight+itemHeight);}}},blur:function(event,fromFocus){if(!fromFocus){clearTimeout(this.timer);}
if(!this.active){return;}
this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active");this._trigger("blur",event,{item:this.active});this.active=null;},_startOpening:function(submenu){clearTimeout(this.timer);if(submenu.attr("aria-hidden")!=="true"){return;}
this.timer=this._delay(function(){this._close();this._open(submenu);},this.delay);},_open:function(submenu){var position=$.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(submenu.parents(".ui-menu")).hide().attr("aria-hidden","true");submenu.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(position);},collapseAll:function(event,all){clearTimeout(this.timer);this.timer=this._delay(function(){var currentMenu=all?this.element:$(event&&event.target).closest(this.element.find(".ui-menu"));if(!currentMenu.length){currentMenu=this.element;}
this._close(currentMenu);this.blur(event);this._removeClass(currentMenu.find(".ui-state-active"),null,"ui-state-active");this.activeMenu=currentMenu;},this.delay);},_close:function(startMenu){if(!startMenu){startMenu=this.active?this.active.parent():this.element;}
startMenu.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false");},_closeOnDocumentClick:function(event){return!$(event.target).closest(".ui-menu").length;},_isDivider:function(item){return!/[^\-\u2014\u2013\s]/.test(item.text());},collapse:function(event){var newItem=this.active&&this.active.parent().closest(".ui-menu-item",this.element);if(newItem&&newItem.length){this._close();this.focus(event,newItem);}},expand:function(event){var newItem=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();if(newItem&&newItem.length){this._open(newItem.parent());this._delay(function(){this.focus(event,newItem);});}},next:function(event){this._move("next","first",event);},previous:function(event){this._move("prev","last",event);},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(direction,filter,event){var next;if(this.active){if(direction==="first"||direction==="last"){next=this.active
[direction==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1);}else{next=this.active
[direction+"All"](".ui-menu-item").eq(0);}}
if(!next||!next.length||!this.active){next=this.activeMenu.find(this.options.items)[filter]();}
this.focus(event,next);},nextPage:function(event){var item,base,height;if(!this.active){this.next(event);return;}
if(this.isLastItem()){return;}
if(this._hasScroll()){base=this.active.offset().top;height=this.element.height();this.active.nextAll(".ui-menu-item").each(function(){item=$(this);return item.offset().top-base-height<0;});this.focus(event,item);}else{this.focus(event,this.activeMenu.find(this.options.items)
[!this.active?"first":"last"]());}},previousPage:function(event){var item,base,height;if(!this.active){this.next(event);return;}
if(this.isFirstItem()){return;}
if(this._hasScroll()){base=this.active.offset().top;height=this.element.height();this.active.prevAll(".ui-menu-item").each(function(){item=$(this);return item.offset().top-base+height>0;});this.focus(event,item);}else{this.focus(event,this.activeMenu.find(this.options.items).first());}},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight");},select:function(event){this.active=this.active||$(event.target).closest(".ui-menu-item");var ui={item:this.active};if(!this.active.has(".ui-menu").length){this.collapseAll(event,true);}
this._trigger("select",event,ui);},_filterMenuItems:function(character){var escapedCharacter=character.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),regex=new RegExp("^"+escapedCharacter,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return regex.test($.trim($(this).children(".ui-menu-item-wrapper").text()));});}});$.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:false,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 suppressKeyPress,suppressKeyPressRepeat,suppressInput,nodeName=this.element[0].nodeName.toLowerCase(),isTextarea=nodeName==="textarea",isInput=nodeName==="input";this.isMultiLine=isTextarea||!isInput&&this._isContentEditable(this.element);this.valueMethod=this.element[isTextarea||isInput?"val":"text"];this.isNewMenu=true;this._addClass("ui-autocomplete-input");this.element.attr("autocomplete","off");this._on(this.element,{keydown:function(event){if(this.element.prop("readOnly")){suppressKeyPress=true;suppressInput=true;suppressKeyPressRepeat=true;return;}
suppressKeyPress=false;suppressInput=false;suppressKeyPressRepeat=false;var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:suppressKeyPress=true;this._move("previousPage",event);break;case keyCode.PAGE_DOWN:suppressKeyPress=true;this._move("nextPage",event);break;case keyCode.UP:suppressKeyPress=true;this._keyEvent("previous",event);break;case keyCode.DOWN:suppressKeyPress=true;this._keyEvent("next",event);break;case keyCode.ENTER:if(this.menu.active){suppressKeyPress=true;event.preventDefault();this.menu.select(event);}
break;case keyCode.TAB:if(this.menu.active){this.menu.select(event);}
break;case keyCode.ESCAPE:if(this.menu.element.is(":visible")){if(!this.isMultiLine){this._value(this.term);}
this.close(event);event.preventDefault();}
break;default:suppressKeyPressRepeat=true;this._searchTimeout(event);break;}},keypress:function(event){if(suppressKeyPress){suppressKeyPress=false;if(!this.isMultiLine||this.menu.element.is(":visible")){event.preventDefault();}
return;}
if(suppressKeyPressRepeat){return;}
var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:this._move("previousPage",event);break;case keyCode.PAGE_DOWN:this._move("nextPage",event);break;case keyCode.UP:this._keyEvent("previous",event);break;case keyCode.DOWN:this._keyEvent("next",event);break;}},input:function(event){if(suppressInput){suppressInput=false;event.preventDefault();return;}
this._searchTimeout(event);},focus:function(){this.selectedItem=null;this.previous=this._value();},blur:function(event){if(this.cancelBlur){delete this.cancelBlur;return;}
clearTimeout(this.searching);this.close(event);this._change(event);}});this._initSource();this.menu=$("<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(event){event.preventDefault();this.cancelBlur=true;this._delay(function(){delete this.cancelBlur;if(this.element[0]!==$.ui.safeActiveElement(this.document[0])){this.element.trigger("focus");}});},menufocus:function(event,ui){var label,item;if(this.isNewMenu){this.isNewMenu=false;if(event.originalEvent&&/^mouse/.test(event.originalEvent.type)){this.menu.blur();this.document.one("mousemove",function(){$(event.target).trigger(event.originalEvent);});return;}}
item=ui.item.data("ui-autocomplete-item");if(false!==this._trigger("focus",event,{item:item})){if(event.originalEvent&&/^key/.test(event.originalEvent.type)){this._value(item.value);}}
label=ui.item.attr("aria-label")||item.value;if(label&&$.trim(label).length){this.liveRegion.children().hide();$("<div>").text(label).appendTo(this.liveRegion);}},menuselect:function(event,ui){var item=ui.item.data("ui-autocomplete-item"),previous=this.previous;if(this.element[0]!==$.ui.safeActiveElement(this.document[0])){this.element.trigger("focus");this.previous=previous;this._delay(function(){this.previous=previous;this.selectedItem=item;});}
if(false!==this._trigger("select",event,{item:item})){this._value(item.value);}
this.term=this._value();this.close(event);this.selectedItem=item;}});this.liveRegion=$("<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(key,value){this._super(key,value);if(key==="source"){this._initSource();}
if(key==="appendTo"){this.menu.element.appendTo(this._appendTo());}
if(key==="disabled"&&value&&this.xhr){this.xhr.abort();}},_isEventTargetInWidget:function(event){var menuElement=this.menu.element[0];return event.target===this.element[0]||event.target===menuElement||$.contains(menuElement,event.target);},_closeOnClickOutside:function(event){if(!this._isEventTargetInWidget(event)){this.close();}},_appendTo:function(){var element=this.options.appendTo;if(element){element=element.jquery||element.nodeType?$(element):this.document.find(element).eq(0);}
if(!element||!element[0]){element=this.element.closest(".ui-front, dialog");}
if(!element.length){element=this.document[0].body;}
return element;},_initSource:function(){var array,url,that=this;if($.isArray(this.options.source)){array=this.options.source;this.source=function(request,response){response($.ui.autocomplete.filter(array,request.term));};}else if(typeof this.options.source==="string"){url=this.options.source;this.source=function(request,response){if(that.xhr){that.xhr.abort();}
that.xhr=$.ajax({url:url,data:request,dataType:"json",success:function(data){response(data);},error:function(){response([]);}});};}else{this.source=this.options.source;}},_searchTimeout:function(event){clearTimeout(this.searching);this.searching=this._delay(function(){var equalValues=this.term===this._value(),menuVisible=this.menu.element.is(":visible"),modifierKey=event.altKey||event.ctrlKey||event.metaKey||event.shiftKey;if(!equalValues||(equalValues&&!menuVisible&&!modifierKey)){this.selectedItem=null;this.search(null,event);}},this.options.delay);},search:function(value,event){value=value!=null?value:this._value();this.term=this._value();if(value.length<this.options.minLength){return this.close(event);}
if(this._trigger("search",event)===false){return;}
return this._search(value);},_search:function(value){this.pending++;this._addClass("ui-autocomplete-loading");this.cancelSearch=false;this.source({term:value},this._response());},_response:function(){var index=++this.requestIndex;return $.proxy(function(content){if(index===this.requestIndex){this.__response(content);}
this.pending--;if(!this.pending){this._removeClass("ui-autocomplete-loading");}},this);},__response:function(content){if(content){content=this._normalize(content);}
this._trigger("response",null,{content:content});if(!this.options.disabled&&content&&content.length&&!this.cancelSearch){this._suggest(content);this._trigger("open");}else{this._close();}},close:function(event){this.cancelSearch=true;this._close(event);},_close:function(event){this._off(this.document,"mousedown");if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.blur();this.isNewMenu=true;this._trigger("close",event);}},_change:function(event){if(this.previous!==this._value()){this._trigger("change",event,{item:this.selectedItem});}},_normalize:function(items){if(items.length&&items[0].label&&items[0].value){return items;}
return $.map(items,function(item){if(typeof item==="string"){return{label:item,value:item};}
return $.extend({},item,{label:item.label||item.value,value:item.value||item.label});});},_suggest:function(items){var ul=this.menu.element.empty();this._renderMenu(ul,items);this.isNewMenu=true;this.menu.refresh();ul.show();this._resizeMenu();ul.position($.extend({of:this.element},this.options.position));if(this.options.autoFocus){this.menu.next();}
this._on(this.document,{mousedown:"_closeOnClickOutside"});},_resizeMenu:function(){var ul=this.menu.element;ul.outerWidth(Math.max(ul.width("").outerWidth()+1,this.element.outerWidth()));},_renderMenu:function(ul,items){var that=this;$.each(items,function(index,item){that._renderItemData(ul,item);});},_renderItemData:function(ul,item){return this._renderItem(ul,item).data("ui-autocomplete-item",item);},_renderItem:function(ul,item){return $("<li>").append($("<div>").text(item.label)).appendTo(ul);},_move:function(direction,event){if(!this.menu.element.is(":visible")){this.search(null,event);return;}
if(this.menu.isFirstItem()&&/^previous/.test(direction)||this.menu.isLastItem()&&/^next/.test(direction)){if(!this.isMultiLine){this._value(this.term);}
this.menu.blur();return;}
this.menu[direction](event);},widget:function(){return this.menu.element;},_value:function(){return this.valueMethod.apply(this.element,arguments);},_keyEvent:function(keyEvent,event){if(!this.isMultiLine||this.menu.element.is(":visible")){this._move(keyEvent,event);event.preventDefault();}},_isContentEditable:function(element){if(!element.length){return false;}
var editable=element.prop("contentEditable");if(editable==="inherit"){return this._isContentEditable(element.parent());}
return editable==="true";}});$.extend($.ui.autocomplete,{escapeRegex:function(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");},filter:function(array,term){var matcher=new RegExp($.ui.autocomplete.escapeRegex(term),"i");return $.grep(array,function(value){return matcher.test(value.label||value.value||value);});}});$.widget("ui.autocomplete",$.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(amount){return amount+(amount>1?" results are":" result is")+" available, use up and down arrow keys to navigate.";}}},__response:function(content){var message;this._superApply(arguments);if(this.options.disabled||this.cancelSearch){return;}
if(content&&content.length){message=this.options.messages.results(content.length);}else{message=this.options.messages.noResults;}
this.liveRegion.children().hide();$("<div>").text(message).appendTo(this.liveRegion);}});var widgetsAutocomplete=$.ui.autocomplete;$.extend($.ui,{datepicker:{version:"1.12.1"}});var datepicker_instActive;function datepicker_getZindex(elem){var position,value;while(elem.length&&elem[0]!==document){position=elem.css("position");if(position==="absolute"||position==="relative"||position==="fixed"){value=parseInt(elem.css("zIndex"),10);if(!isNaN(value)&&value!==0){return value;}}
elem=elem.parent();}
return 0;}
function Datepicker(){this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;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:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,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:true,showButtonPanel:false,autoSize:false,disabled:false};$.extend(this._defaults,this.regional[""]);this.regional.en=$.extend(true,{},this.regional[""]);this.regional["en-US"]=$.extend(true,{},this.regional.en);this.dpDiv=datepicker_bindHover($("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));}
$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv;},setDefaults:function(settings){datepicker_extendRemove(this._defaults,settings||{});return this;},_attachDatepicker:function(target,settings){var nodeName,inline,inst;nodeName=target.nodeName.toLowerCase();inline=(nodeName==="div"||nodeName==="span");if(!target.id){this.uuid+=1;target.id="dp"+this.uuid;}
inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{});if(nodeName==="input"){this._connectDatepicker(target,inst);}else if(inline){this._inlineDatepicker(target,inst);}},_newInst:function(target,inline){var id=target[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:datepicker_bindHover($("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return;}
this._attachments(input,inst);input.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp);this._autoSize(inst);$.data(target,"datepicker",inst);if(inst.settings.disabled){this._disableDatepicker(target);}},_attachments:function(input,inst){var showOn,buttonText,buttonImage,appendText=this._get(inst,"appendText"),isRTL=this._get(inst,"isRTL");if(inst.append){inst.append.remove();}
if(appendText){inst.append=$("<span class='"+this._appendClass+"'>"+appendText+"</span>");input[isRTL?"before":"after"](inst.append);}
input.off("focus",this._showDatepicker);if(inst.trigger){inst.trigger.remove();}
showOn=this._get(inst,"showOn");if(showOn==="focus"||showOn==="both"){input.on("focus",this._showDatepicker);}
if(showOn==="button"||showOn==="both"){buttonText=this._get(inst,"buttonText");buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$("<button type='button'></button>").addClass(this._triggerClass).html(!buttonImage?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.on("click",function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput===input[0]){$.datepicker._hideDatepicker();}else if($.datepicker._datepickerShowing&&$.datepicker._lastInput!==input[0]){$.datepicker._hideDatepicker();$.datepicker._showDatepicker(input[0]);}else{$.datepicker._showDatepicker(input[0]);}
return false;});}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var findMax,max,maxI,i,date=new Date(2009,12-1,20),dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){findMax=function(names){max=0;maxI=0;for(i=0;i<names.length;i++){if(names[i].length>max){max=names[i].length;maxI=i;}}
return maxI;};date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))));date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?"dayNames":"dayNamesShort")))+20-date.getDay());}
inst.input.attr("size",this._formatDate(inst,date).length);}},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return;}
divSpan.addClass(this.markerClassName).append(inst.dpDiv);$.data(target,"datepicker",inst);this._setDate(inst,this._getDefaultDate(inst),true);this._updateDatepicker(inst);this._updateAlternate(inst);if(inst.settings.disabled){this._disableDatepicker(target);}
inst.dpDiv.css("display","block");},_dialogDatepicker:function(input,date,onSelect,settings,pos){var id,browserWidth,browserHeight,scrollX,scrollY,inst=this._dialogInst;if(!inst){this.uuid+=1;id="dp"+this.uuid;this._dialogInput=$("<input type='text' id='"+id+"' style='position: absolute; top: -100px; width: 0px;'/>");this._dialogInput.on("keydown",this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],"datepicker",inst);}
datepicker_extendRemove(inst.settings,settings||{});date=(date&&date.constructor===Date?this._formatDate(inst,date):date);this._dialogInput.val(date);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){browserWidth=document.documentElement.clientWidth;browserHeight=document.documentElement.clientHeight;scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY];}
this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv);}
$.data(this._dialogInput[0],"datepicker",inst);return this;},_destroyDatepicker:function(target){var nodeName,$target=$(target),inst=$.data(target,"datepicker");if(!$target.hasClass(this.markerClassName)){return;}
nodeName=target.nodeName.toLowerCase();$.removeData(target,"datepicker");if(nodeName==="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp);}else if(nodeName==="div"||nodeName==="span"){$target.removeClass(this.markerClassName).empty();}
if(datepicker_instActive===inst){datepicker_instActive=null;}},_enableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,"datepicker");if(!$target.hasClass(this.markerClassName)){return;}
nodeName=target.nodeName.toLowerCase();if(nodeName==="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false;}).end().filter("img").css({opacity:"1.0",cursor:""});}else if(nodeName==="div"||nodeName==="span"){inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",false);}
this._disabledInputs=$.map(this._disabledInputs,function(value){return(value===target?null:value);});},_disableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,"datepicker");if(!$target.hasClass(this.markerClassName)){return;}
nodeName=target.nodeName.toLowerCase();if(nodeName==="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true;}).end().filter("img").css({opacity:"0.5",cursor:"default"});}else if(nodeName==="div"||nodeName==="span"){inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",true);}
this._disabledInputs=$.map(this._disabledInputs,function(value){return(value===target?null:value);});this._disabledInputs[this._disabledInputs.length]=target;},_isDisabledDatepicker:function(target){if(!target){return false;}
for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]===target){return true;}}
return false;},_getInst:function(target){try{return $.data(target,"datepicker");}
catch(err){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(target,name,value){var settings,date,minDate,maxDate,inst=this._getInst(target);if(arguments.length===2&&typeof name==="string"){return(name==="defaults"?$.extend({},$.datepicker._defaults):(inst?(name==="all"?$.extend({},inst.settings):this._get(inst,name)):null));}
settings=name||{};if(typeof name==="string"){settings={};settings[name]=value;}
if(inst){if(this._curInst===inst){this._hideDatepicker();}
date=this._getDateDatepicker(target,true);minDate=this._getMinMaxDate(inst,"min");maxDate=this._getMinMaxDate(inst,"max");datepicker_extendRemove(inst.settings,settings);if(minDate!==null&&settings.dateFormat!==undefined&&settings.minDate===undefined){inst.settings.minDate=this._formatDate(inst,minDate);}
if(maxDate!==null&&settings.dateFormat!==undefined&&settings.maxDate===undefined){inst.settings.maxDate=this._formatDate(inst,maxDate);}
if("disabled"in settings){if(settings.disabled){this._disableDatepicker(target);}else{this._enableDatepicker(target);}}
this._attachments($(target),inst);this._autoSize(inst);this._setDate(inst,date);this._updateAlternate(inst);this._updateDatepicker(inst);}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value);},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst);}},_setDateDatepicker:function(target,date){var inst=this._getInst(target);if(inst){this._setDate(inst,date);this._updateDatepicker(inst);this._updateAlternate(inst);}},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst,noDefault);}
return(inst?this._getDate(inst):null);},_doKeyDown:function(event){var onSelect,dateStr,sel,inst=$.datepicker._getInst(event.target),handled=true,isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker();handled=false;break;case 13:sel=$("td."+$.datepicker._dayOverClass+":not(."+
$.datepicker._currentClass+")",inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0]);}
onSelect=$.datepicker._get(inst,"onSelect");if(onSelect){dateStr=$.datepicker._formatDate(inst);onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);}else{$.datepicker._hideDatepicker();}
return false;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target);}
handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target);}
handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D");}
handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");}
break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D");}
handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D");}
handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");}
break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D");}
handled=event.ctrlKey||event.metaKey;break;default:handled=false;}}else if(event.keyCode===36&&event.ctrlKey){$.datepicker._showDatepicker(this);}else{handled=false;}
if(handled){event.preventDefault();event.stopPropagation();}},_doKeyPress:function(event){var chars,chr,inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));chr=String.fromCharCode(event.charCode==null?event.keyCode:event.charCode);return event.ctrlKey||event.metaKey||(chr<" "||!chars||chars.indexOf(chr)>-1);}},_doKeyUp:function(event){var date,inst=$.datepicker._getInst(event.target);if(inst.input.val()!==inst.lastVal){try{date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),(inst.input?inst.input.val():null),$.datepicker._getFormatConfig(inst));if(date){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);$.datepicker._updateDatepicker(inst);}}
catch(err){}}
return true;},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!=="input"){input=$("input",input.parentNode)[0];}
if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput===input){return;}
var inst,beforeShow,beforeShowSettings,isFixed,offset,showAnim,duration;inst=$.datepicker._getInst(input);if($.datepicker._curInst&&$.datepicker._curInst!==inst){$.datepicker._curInst.dpDiv.stop(true,true);if(inst&&$.datepicker._datepickerShowing){$.datepicker._hideDatepicker($.datepicker._curInst.input[0]);}}
beforeShow=$.datepicker._get(inst,"beforeShow");beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{};if(beforeShowSettings===false){return;}
datepicker_extendRemove(inst.settings,beforeShowSettings);inst.lastVal=null;$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value="";}
if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight;}
isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")==="fixed";return!isFixed;});offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.dpDiv.empty();inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){showAnim=$.datepicker._get(inst,"showAnim");duration=$.datepicker._get(inst,"duration");inst.dpDiv.css("z-index",datepicker_getZindex($(input))+1);$.datepicker._datepickerShowing=true;if($.effects&&$.effects.effect[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration);}else{inst.dpDiv[showAnim||"show"](showAnim?duration:null);}
if($.datepicker._shouldFocusInput(inst)){inst.input.trigger("focus");}
$.datepicker._curInst=inst;}},_updateDatepicker:function(inst){this.maxRows=4;datepicker_instActive=inst;inst.dpDiv.empty().append(this._generateHTML(inst));this._attachHandlers(inst);var origyearshtml,numMonths=this._getNumberOfMonths(inst),cols=numMonths[1],width=17,activeCell=inst.dpDiv.find("."+this._dayOverClass+" a");if(activeCell.length>0){datepicker_handleMouseover.apply(activeCell.get(0));}
inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em");}
inst.dpDiv[(numMonths[0]!==1||numMonths[1]!==1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst===$.datepicker._curInst&&$.datepicker._datepickerShowing&&$.datepicker._shouldFocusInput(inst)){inst.input.trigger("focus");}
if(inst.yearshtml){origyearshtml=inst.yearshtml;setTimeout(function(){if(origyearshtml===inst.yearshtml&&inst.yearshtml){inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);}
origyearshtml=inst.yearshtml=null;},0);}},_shouldFocusInput:function(inst){return inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")&&!inst.input.is(":focus");},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth(),dpHeight=inst.dpDiv.outerHeight(),inputWidth=inst.input?inst.input.outerWidth():0,inputHeight=inst.input?inst.input.outerHeight():0,viewWidth=document.documentElement.clientWidth+(isFixed?0:$(document).scrollLeft()),viewHeight=document.documentElement.clientHeight+(isFixed?0:$(document).scrollTop());offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left===inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top===(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(dpHeight+inputHeight):0);return offset;},_findPos:function(obj){var position,inst=this._getInst(obj),isRTL=this._get(inst,"isRTL");while(obj&&(obj.type==="hidden"||obj.nodeType!==1||$.expr.filters.hidden(obj))){obj=obj[isRTL?"previousSibling":"nextSibling"];}
position=$(obj).offset();return[position.left,position.top];},_hideDatepicker:function(input){var showAnim,duration,postProcess,onClose,inst=this._curInst;if(!inst||(input&&inst!==$.data(input,"datepicker"))){return;}
if(this._datepickerShowing){showAnim=this._get(inst,"showAnim");duration=this._get(inst,"duration");postProcess=function(){$.datepicker._tidyDialog(inst);};if($.effects&&($.effects.effect[showAnim]||$.effects[showAnim])){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess);}else{inst.dpDiv[(showAnim==="slideDown"?"slideUp":(showAnim==="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess);}
if(!showAnim){postProcess();}
this._datepickerShowing=false;onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst]);}
this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv);}}
this._inDialog=false;}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar");},_checkExternalClick:function(event){if(!$.datepicker._curInst){return;}
var $target=$(event.target),inst=$.datepicker._getInst($target[0]);if((($target[0].id!==$.datepicker._mainDivId&&$target.parents("#"+$.datepicker._mainDivId).length===0&&!$target.hasClass($.datepicker.markerClassName)&&!$target.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)))||($target.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!==inst)){$.datepicker._hideDatepicker();}},_adjustDate:function(id,offset,period){var target=$(id),inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return;}
this._adjustInstDate(inst,offset+
(period==="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst);},_gotoToday:function(id){var date,target=$(id),inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear;}else{date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();}
this._notifyChange(inst);this._adjustDate(target);},_selectMonthYear:function(id,select,period){var target=$(id),inst=this._getInst(target[0]);inst["selected"+(period==="M"?"Month":"Year")]=inst["draw"+(period==="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target);},_selectDay:function(id,month,year,td){var inst,target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return;}
inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));},_clearDate:function(id){var target=$(id);this._selectDate(target,"");},_selectDate:function(id,dateStr){var onSelect,target=$(id),inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr);}
this._updateAlternate(inst);onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);}else if(inst.input){inst.input.trigger("change");}
if(inst.inline){this._updateDatepicker(inst);}else{this._hideDatepicker();this._lastInput=inst.input[0];if(typeof(inst.input[0])!=="object"){inst.input.trigger("focus");}
this._lastInput=null;}},_updateAlternate:function(inst){var altFormat,date,dateStr,altField=this._get(inst,"altField");if(altField){altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).val(dateStr);}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""];},iso8601Week:function(date){var time,checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/86400000)/7)+1;},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments";}
value=(typeof value==="object"?value.toString():value+"");if(value===""){return null;}
var iFormat,dim,extra,iValue=0,shortYearCutoffTemp=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff,shortYearCutoff=(typeof shortYearCutoffTemp!=="string"?shortYearCutoffTemp:new Date().getFullYear()%100+parseInt(shortYearCutoffTemp,10)),dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,year=-1,month=-1,day=-1,doy=-1,literal=false,date,lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)===match);if(matches){iFormat++;}
return matches;},getNumber=function(match){var isDoubled=lookAhead(match),size=(match==="@"?14:(match==="!"?20:(match==="y"&&isDoubled?4:(match==="o"?3:2)))),minSize=(match==="y"?size:1),digits=new RegExp("^\\d{"+minSize+","+size+"}"),num=value.substring(iValue).match(digits);if(!num){throw"Missing number at position "+iValue;}
iValue+=num[0].length;return parseInt(num[0],10);},getName=function(match,shortNames,longNames){var index=-1,names=$.map(lookAhead(match)?longNames:shortNames,function(v,k){return[[k,v]];}).sort(function(a,b){return-(a[1].length-b[1].length);});$.each(names,function(i,pair){var name=pair[1];if(value.substr(iValue,name.length).toLowerCase()===name.toLowerCase()){index=pair[0];iValue+=name.length;return false;}});if(index!==-1){return index+1;}else{throw"Unknown name at position "+iValue;}},checkLiteral=function(){if(value.charAt(iValue)!==format.charAt(iFormat)){throw"Unexpected literal at position "+iValue;}
iValue++;};for(iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)==="'"&&!lookAhead("'")){literal=false;}else{checkLiteral();}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"!":date=new Date((getNumber("!")-this._ticksTo1970)/10000);year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral();}else{literal=true;}
break;default:checkLiteral();}}}
if(iValue<value.length){extra=value.substr(iValue);if(!/^\s+/.test(extra)){throw"Extra/unparsed characters found in date: "+extra;}}
if(year===-1){year=new Date().getFullYear();}else if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+
(year<=shortYearCutoff?0:-100);}
if(doy>-1){month=1;day=doy;do{dim=this._getDaysInMonth(year,month-1);if(day<=dim){break;}
month++;day-=dim;}while(true);}
date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!==year||date.getMonth()+1!==month||date.getDate()!==day){throw"Invalid date";}
return date;},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:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+
Math.floor(1970/400))*24*60*60*10000000),formatDate:function(format,date,settings){if(!date){return"";}
var iFormat,dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)===match);if(matches){iFormat++;}
return matches;},formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num;}}
return num;},formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value]);},output="",literal=false;if(date){for(iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)==="'"&&!lookAhead("'")){literal=false;}else{output+=format.charAt(iFormat);}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":output+=formatNumber("o",Math.round((new Date(date.getFullYear(),date.getMonth(),date.getDate()).getTime()-new Date(date.getFullYear(),0,0).getTime())/86400000),3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getFullYear()%100<10?"0":"")+date.getFullYear()%100);break;case"@":output+=date.getTime();break;case"!":output+=date.getTime()*10000+this._ticksTo1970;break;case"'":if(lookAhead("'")){output+="'";}else{literal=true;}
break;default:output+=format.charAt(iFormat);}}}}
return output;},_possibleChars:function(format){var iFormat,chars="",literal=false,lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)===match);if(matches){iFormat++;}
return matches;};for(iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)==="'"&&!lookAhead("'")){literal=false;}else{chars+=format.charAt(iFormat);}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'";}else{literal=true;}
break;default:chars+=format.charAt(iFormat);}}}
return chars;},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name];},_setDateFromField:function(inst,noDefault){if(inst.input.val()===inst.lastVal){return;}
var dateFormat=this._get(inst,"dateFormat"),dates=inst.lastVal=inst.input?inst.input.val():null,defaultDate=this._getDefaultDate(inst),date=defaultDate,settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate;}catch(event){dates=(noDefault?"":dates);}
inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst);},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date()));},_determineDate:function(inst,date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date;},offsetString=function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),offset,$.datepicker._getFormatConfig(inst));}
catch(e){}
var date=(offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date(),year=date.getFullYear(),month=date.getMonth(),day=date.getDate(),pattern=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;}
matches=pattern.exec(offset);}
return new Date(year,month,day);},newDate=(date==null||date===""?defaultDate:(typeof date==="string"?offsetString(date):(typeof date==="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):new Date(date.getTime()))));newDate=(newDate&&newDate.toString()==="Invalid Date"?defaultDate:newDate);if(newDate){newDate.setHours(0);newDate.setMinutes(0);newDate.setSeconds(0);newDate.setMilliseconds(0);}
return this._daylightSavingAdjust(newDate);},_daylightSavingAdjust:function(date){if(!date){return null;}
date.setHours(date.getHours()>12?date.getHours()+2:0);return date;},_setDate:function(inst,date,noChange){var clear=!date,origMonth=inst.selectedMonth,origYear=inst.selectedYear,newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date()));inst.selectedDay=inst.currentDay=newDate.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear();if((origMonth!==inst.selectedMonth||origYear!==inst.selectedYear)&&!noChange){this._notifyChange(inst);}
this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst));}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()==="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate;},_attachHandlers:function(inst){var stepMonths=this._get(inst,"stepMonths"),id="#"+inst.id.replace(/\\\\/g,"\\");inst.dpDiv.find("[data-handler]").map(function(){var handler={prev:function(){$.datepicker._adjustDate(id,-stepMonths,"M");},next:function(){$.datepicker._adjustDate(id,+stepMonths,"M");},hide:function(){$.datepicker._hideDatepicker();},today:function(){$.datepicker._gotoToday(id);},selectDay:function(){$.datepicker._selectDay(id,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return false;},selectMonth:function(){$.datepicker._selectMonthYear(id,this,"M");return false;},selectYear:function(){$.datepicker._selectMonthYear(id,this,"Y");return false;}};$(this).on(this.getAttribute("data-event"),handler[this.getAttribute("data-handler")]);});},_generateHTML:function(inst){var maxDraw,prevText,prev,nextText,next,currentText,gotoDate,controls,buttonPanel,firstDay,showWeek,dayNames,dayNamesMin,monthNames,monthNamesShort,beforeShowDay,showOtherMonths,selectOtherMonths,defaultDate,html,dow,row,group,col,selectedDate,cornerClass,calender,thead,day,daysInMonth,leadDays,curRows,numRows,printDate,dRow,tbody,daySettings,otherMonth,unselectable,tempDate=new Date(),today=this._daylightSavingAdjust(new Date(tempDate.getFullYear(),tempDate.getMonth(),tempDate.getDate())),isRTL=this._get(inst,"isRTL"),showButtonPanel=this._get(inst,"showButtonPanel"),hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext"),navigationAsDateFormat=this._get(inst,"navigationAsDateFormat"),numMonths=this._getNumberOfMonths(inst),showCurrentAtPos=this._get(inst,"showCurrentAtPos"),stepMonths=this._get(inst,"stepMonths"),isMultiMonth=(numMonths[0]!==1||numMonths[1]!==1),currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay))),minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),drawMonth=inst.drawMonth-showCurrentAtPos,drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--;}
if(maxDate){maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--;}}}
inst.drawMonth=drawMonth;inst.drawYear=drawYear;prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'"+" title='"+prevText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"e":"w")+"'>"+prevText+"</span></a>":(hideIfNoPrevNext?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+prevText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"e":"w")+"'>"+prevText+"</span></a>"));nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'"+" title='"+nextText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"w":"e")+"'>"+nextText+"</span></a>":(hideIfNoPrevNext?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+nextText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"w":"e")+"'>"+nextText+"</span></a>"));currentText=this._get(inst,"currentText");gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));controls=(!inst.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(inst,"closeText")+"</button>":"");buttonPanel=(showButtonPanel)?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(isRTL?controls:"")+
(this._isInRange(inst,gotoDate)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'"+">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);showWeek=this._get(inst,"showWeek");dayNames=this._get(inst,"dayNames");dayNamesMin=this._get(inst,"dayNamesMin");monthNames=this._get(inst,"monthNames");monthNamesShort=this._get(inst,"monthNamesShort");beforeShowDay=this._get(inst,"beforeShowDay");showOtherMonths=this._get(inst,"showOtherMonths");selectOtherMonths=this._get(inst,"selectOtherMonths");defaultDate=this._getDefaultDate(inst);html="";for(row=0;row<numMonths[0];row++){group="";this.maxRows=4;for(col=0;col<numMonths[1];col++){selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));cornerClass=" ui-corner-all";calender="";if(isMultiMonth){calender+="<div class='ui-datepicker-group";if(numMonths[1]>1){switch(col){case 0:calender+=" ui-datepicker-group-first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break;}}
calender+="'>";}
calender+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+cornerClass+"'>"+
(/all|left/.test(cornerClass)&&row===0?(isRTL?next:prev):"")+
(/all|right/.test(cornerClass)&&row===0?(isRTL?prev:next):"")+
this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>";thead=(showWeek?"<th class='ui-datepicker-week-col'>"+this._get(inst,"weekHeader")+"</th>":"");for(dow=0;dow<7;dow++){day=(dow+firstDay)%7;thead+="<th scope='col'"+((dow+firstDay+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+dayNames[day]+"'>"+dayNamesMin[day]+"</span></th>";}
calender+=thead+"</tr></thead><tbody>";daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth);}
leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;curRows=Math.ceil((leadDays+daysInMonth)/7);numRows=(isMultiMonth?this.maxRows>curRows?this.maxRows:curRows:curRows);this.maxRows=numRows;printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(dRow=0;dRow<numRows;dRow++){calender+="<tr>";tbody=(!showWeek?"":"<td class='ui-datepicker-week-col'>"+
this._get(inst,"calculateWeek")(printDate)+"</td>");for(dow=0;dow<7;dow++){daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);otherMonth=(printDate.getMonth()!==drawMonth);unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+="<td class='"+
((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+
(otherMonth?" ui-datepicker-other-month":"")+
((printDate.getTime()===selectedDate.getTime()&&drawMonth===inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()===printDate.getTime()&&defaultDate.getTime()===selectedDate.getTime())?" "+this._dayOverClass:"")+
(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+
(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+
(printDate.getTime()===currentDate.getTime()?" "+this._currentClass:"")+
(printDate.getTime()===today.getTime()?" ui-datepicker-today":""))+"'"+
((!otherMonth||showOtherMonths)&&daySettings[2]?" title='"+daySettings[2].replace(/'/g,"&#39;")+"'":"")+
(unselectable?"":" data-handler='selectDay' data-event='click' data-month='"+printDate.getMonth()+"' data-year='"+printDate.getFullYear()+"'")+">"+
(otherMonth&&!showOtherMonths?"&#xa0;":(unselectable?"<span class='ui-state-default'>"+printDate.getDate()+"</span>":"<a class='ui-state-default"+
(printDate.getTime()===today.getTime()?" ui-state-highlight":"")+
(printDate.getTime()===currentDate.getTime()?" ui-state-active":"")+
(otherMonth?" ui-priority-secondary":"")+"' href='#'>"+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate);}
calender+=tbody+"</tr>";}
drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++;}
calender+="</tbody></table>"+(isMultiMonth?"</div>"+
((numMonths[0]>0&&col===numMonths[1]-1)?"<div class='ui-datepicker-row-break'></div>":""):"");group+=calender;}
html+=group;}
html+=buttonPanel;inst._keyEvent=false;return html;},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var inMinYear,inMaxYear,month,years,thisYear,determineYear,year,endYear,changeMonth=this._get(inst,"changeMonth"),changeYear=this._get(inst,"changeYear"),showMonthAfterYear=this._get(inst,"showMonthAfterYear"),html="<div class='ui-datepicker-title'>",monthHtml="";if(secondary||!changeMonth){monthHtml+="<span class='ui-datepicker-month'>"+monthNames[drawMonth]+"</span>";}else{inMinYear=(minDate&&minDate.getFullYear()===drawYear);inMaxYear=(maxDate&&maxDate.getFullYear()===drawYear);monthHtml+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";for(month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+="<option value='"+month+"'"+
(month===drawMonth?" selected='selected'":"")+">"+monthNamesShort[month]+"</option>";}}
monthHtml+="</select>";}
if(!showMonthAfterYear){html+=monthHtml+(secondary||!(changeMonth&&changeYear)?"&#xa0;":"");}
if(!inst.yearshtml){inst.yearshtml="";if(secondary||!changeYear){html+="<span class='ui-datepicker-year'>"+drawYear+"</span>";}else{years=this._get(inst,"yearRange").split(":");thisYear=new Date().getFullYear();determineYear=function(value){var year=(value.match(/c[+\-].*/)?drawYear+parseInt(value.substring(1),10):(value.match(/[+\-].*/)?thisYear+parseInt(value,10):parseInt(value,10)));return(isNaN(year)?thisYear:year);};year=determineYear(years[0]);endYear=Math.max(year,determineYear(years[1]||""));year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);inst.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";for(;year<=endYear;year++){inst.yearshtml+="<option value='"+year+"'"+
(year===drawYear?" selected='selected'":"")+">"+year+"</option>";}
inst.yearshtml+="</select>";html+=inst.yearshtml;inst.yearshtml=null;}}
html+=this._get(inst,"yearSuffix");if(showMonthAfterYear){html+=(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")+monthHtml;}
html+="</div>";return html;},_adjustInstDate:function(inst,offset,period){var year=inst.selectedYear+(period==="Y"?offset:0),month=inst.selectedMonth+(period==="M"?offset:0),day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period==="D"?offset:0),date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period==="M"||period==="Y"){this._notifyChange(inst);}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),newDate=(minDate&&date<minDate?minDate:date);return(maxDate&&newDate>maxDate?maxDate:newDate);},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst]);}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths==="number"?[1,numMonths]:numMonths));},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null);},_getDaysInMonth:function(year,month){return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate();},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay();},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst),date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()));}
return this._isInRange(inst,date);},_isInRange:function(inst,date){var yearSplit,currentYear,minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),minYear=null,maxYear=null,years=this._get(inst,"yearRange");if(years){yearSplit=years.split(":");currentYear=new Date().getFullYear();minYear=parseInt(yearSplit[0],10);maxYear=parseInt(yearSplit[1],10);if(yearSplit[0].match(/[+\-].*/)){minYear+=currentYear;}
if(yearSplit[1].match(/[+\-].*/)){maxYear+=currentYear;}}
return((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime())&&(!minYear||date.getFullYear()>=minYear)&&(!maxYear||date.getFullYear()<=maxYear));},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!=="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")};},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear;}
var date=(day?(typeof day==="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst));}});function datepicker_bindHover(dpDiv){var selector="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return dpDiv.on("mouseout",selector,function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){$(this).removeClass("ui-datepicker-prev-hover");}
if(this.className.indexOf("ui-datepicker-next")!==-1){$(this).removeClass("ui-datepicker-next-hover");}}).on("mouseover",selector,datepicker_handleMouseover);}
function datepicker_handleMouseover(){if(!$.datepicker._isDisabledDatepicker(datepicker_instActive.inline?datepicker_instActive.dpDiv.parent()[0]:datepicker_instActive.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){$(this).addClass("ui-datepicker-prev-hover");}
if(this.className.indexOf("ui-datepicker-next")!==-1){$(this).addClass("ui-datepicker-next-hover");}}}
function datepicker_extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=props[name];}}
return target;}
$.fn.datepicker=function(options){if(!this.length){return this;}
if(!$.datepicker.initialized){$(document).on("mousedown",$.datepicker._checkExternalClick);$.datepicker.initialized=true;}
if($("#"+$.datepicker._mainDivId).length===0){$("body").append($.datepicker.dpDiv);}
var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options==="string"&&(options==="isDisabled"||options==="getDate"||options==="widget")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs));}
if(options==="option"&&arguments.length===2&&typeof arguments[1]==="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs));}
return this.each(function(){typeof options==="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options);});};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.12.1";var widgetsDatepicker=$.datepicker;$.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var title=$(this).attr("title")||"";return $("<a>").text(title).html();},hide:true,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:true,track:false,close:null,open:null},_addDescribedBy:function(elem,id){var describedby=(elem.attr("aria-describedby")||"").split(/\s+/);describedby.push(id);elem.data("ui-tooltip-id",id).attr("aria-describedby",$.trim(describedby.join(" ")));},_removeDescribedBy:function(elem){var id=elem.data("ui-tooltip-id"),describedby=(elem.attr("aria-describedby")||"").split(/\s+/),index=$.inArray(id,describedby);if(index!==-1){describedby.splice(index,1);}
elem.removeData("ui-tooltip-id");describedby=$.trim(describedby.join(" "));if(describedby){elem.attr("aria-describedby",describedby);}else{elem.removeAttr("aria-describedby");}},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.liveRegion=$("<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=$([]);},_setOption:function(key,value){var that=this;this._super(key,value);if(key==="content"){$.each(this.tooltips,function(id,tooltipData){that._updateContent(tooltipData.element);});}},_setOptionDisabled:function(value){this[value?"_disable":"_enable"]();},_disable:function(){var that=this;$.each(this.tooltips,function(id,tooltipData){var event=$.Event("blur");event.target=event.currentTarget=tooltipData.element[0];that.close(event,true);});this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var element=$(this);if(element.is("[title]")){return element.data("ui-tooltip-title",element.attr("title")).removeAttr("title");}}));},_enable:function(){this.disabledTitles.each(function(){var element=$(this);if(element.data("ui-tooltip-title")){element.attr("title",element.data("ui-tooltip-title"));}});this.disabledTitles=$([]);},open:function(event){var that=this,target=$(event?event.target:this.element).closest(this.options.items);if(!target.length||target.data("ui-tooltip-id")){return;}
if(target.attr("title")){target.data("ui-tooltip-title",target.attr("title"));}
target.data("ui-tooltip-open",true);if(event&&event.type==="mouseover"){target.parents().each(function(){var parent=$(this),blurEvent;if(parent.data("ui-tooltip-open")){blurEvent=$.Event("blur");blurEvent.target=blurEvent.currentTarget=this;that.close(blurEvent,true);}
if(parent.attr("title")){parent.uniqueId();that.parents[this.id]={element:this,title:parent.attr("title")};parent.attr("title","");}});}
this._registerCloseHandlers(event,target);this._updateContent(target,event);},_updateContent:function(target,event){var content,contentOption=this.options.content,that=this,eventType=event?event.type:null;if(typeof contentOption==="string"||contentOption.nodeType||contentOption.jquery){return this._open(event,target,contentOption);}
content=contentOption.call(target[0],function(response){that._delay(function(){if(!target.data("ui-tooltip-open")){return;}
if(event){event.type=eventType;}
this._open(event,target,response);});});if(content){this._open(event,target,content);}},_open:function(event,target,content){var tooltipData,tooltip,delayedShow,a11yContent,positionOption=$.extend({},this.options.position);if(!content){return;}
tooltipData=this._find(target);if(tooltipData){tooltipData.tooltip.find(".ui-tooltip-content").html(content);return;}
if(target.is("[title]")){if(event&&event.type==="mouseover"){target.attr("title","");}else{target.removeAttr("title");}}
tooltipData=this._tooltip(target);tooltip=tooltipData.tooltip;this._addDescribedBy(target,tooltip.attr("id"));tooltip.find(".ui-tooltip-content").html(content);this.liveRegion.children().hide();a11yContent=$("<div>").html(tooltip.find(".ui-tooltip-content").html());a11yContent.removeAttr("name").find("[name]").removeAttr("name");a11yContent.removeAttr("id").find("[id]").removeAttr("id");a11yContent.appendTo(this.liveRegion);function position(event){positionOption.of=event;if(tooltip.is(":hidden")){return;}
tooltip.position(positionOption);}
if(this.options.track&&event&&/^mouse/.test(event.type)){this._on(this.document,{mousemove:position});position(event);}else{tooltip.position($.extend({of:target},this.options.position));}
tooltip.hide();this._show(tooltip,this.options.show);if(this.options.track&&this.options.show&&this.options.show.delay){delayedShow=this.delayedShow=setInterval(function(){if(tooltip.is(":visible")){position(positionOption.of);clearInterval(delayedShow);}},$.fx.interval);}
this._trigger("open",event,{tooltip:tooltip});},_registerCloseHandlers:function(event,target){var events={keyup:function(event){if(event.keyCode===$.ui.keyCode.ESCAPE){var fakeEvent=$.Event(event);fakeEvent.currentTarget=target[0];this.close(fakeEvent,true);}}};if(target[0]!==this.element[0]){events.remove=function(){this._removeTooltip(this._find(target).tooltip);};}
if(!event||event.type==="mouseover"){events.mouseleave="close";}
if(!event||event.type==="focusin"){events.focusout="close";}
this._on(true,target,events);},close:function(event){var tooltip,that=this,target=$(event?event.currentTarget:this.element),tooltipData=this._find(target);if(!tooltipData){target.removeData("ui-tooltip-open");return;}
tooltip=tooltipData.tooltip;if(tooltipData.closing){return;}
clearInterval(this.delayedShow);if(target.data("ui-tooltip-title")&&!target.attr("title")){target.attr("title",target.data("ui-tooltip-title"));}
this._removeDescribedBy(target);tooltipData.hiding=true;tooltip.stop(true);this._hide(tooltip,this.options.hide,function(){that._removeTooltip($(this));});target.removeData("ui-tooltip-open");this._off(target,"mouseleave focusout keyup");if(target[0]!==this.element[0]){this._off(target,"remove");}
this._off(this.document,"mousemove");if(event&&event.type==="mouseleave"){$.each(this.parents,function(id,parent){$(parent.element).attr("title",parent.title);delete that.parents[id];});}
tooltipData.closing=true;this._trigger("close",event,{tooltip:tooltip});if(!tooltipData.hiding){tooltipData.closing=false;}},_tooltip:function(element){var tooltip=$("<div>").attr("role","tooltip"),content=$("<div>").appendTo(tooltip),id=tooltip.uniqueId().attr("id");this._addClass(content,"ui-tooltip-content");this._addClass(tooltip,"ui-tooltip","ui-widget ui-widget-content");tooltip.appendTo(this._appendTo(element));return this.tooltips[id]={element:element,tooltip:tooltip};},_find:function(target){var id=target.data("ui-tooltip-id");return id?this.tooltips[id]:null;},_removeTooltip:function(tooltip){tooltip.remove();delete this.tooltips[tooltip.attr("id")];},_appendTo:function(target){var element=target.closest(".ui-front, dialog");if(!element.length){element=this.document[0].body;}
return element;},_destroy:function(){var that=this;$.each(this.tooltips,function(id,tooltipData){var event=$.Event("blur"),element=tooltipData.element;event.target=event.currentTarget=element[0];that.close(event,true);$("#"+id).remove();if(element.data("ui-tooltip-title")){if(!element.attr("title")){element.attr("title",element.data("ui-tooltip-title"));}
element.removeData("ui-tooltip-title");}});this.liveRegion.remove();}});if($.uiBackCompat!==false){$.widget("ui.tooltip",$.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var tooltipData=this._superApply(arguments);if(this.options.tooltipClass){tooltipData.tooltip.addClass(this.options.tooltipClass);}
return tooltipData;}});}
var widgetsTooltip=$.ui.tooltip;var dataSpace="ui-effects-",dataSpaceStyle="ui-effects-style",dataSpaceAnimated="ui-effects-animated",jQuery=$;$.effects={effect:{}};(function(jQuery,undefined){var stepHooks="backgroundColor borderBottomColor borderLeftColor borderRightColor "+"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",rplusequals=/^([\-+])=\s*(\d+\.?\d*)/,stringParsers=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1],execResult[2],execResult[3],execResult[4]];}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1]*2.55,execResult[2]*2.55,execResult[3]*2.55,execResult[4]];}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(execResult){return[parseInt(execResult[1],16),parseInt(execResult[2],16),parseInt(execResult[3],16)];}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(execResult){return[parseInt(execResult[1]+execResult[1],16),parseInt(execResult[2]+execResult[2],16),parseInt(execResult[3]+execResult[3],16)];}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(execResult){return[execResult[1],execResult[2]/100,execResult[3]/100,execResult[4]];}}],color=jQuery.Color=function(color,green,blue,alpha){return new jQuery.Color.fn.parse(color,green,blue,alpha);},spaces={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"}}}},propTypes={"byte":{floor:true,max:255},"percent":{max:1},"degrees":{mod:360,floor:true}},support=color.support={},supportElem=jQuery("<p>")[0],colors,each=jQuery.each;supportElem.style.cssText="background-color:rgba(1,1,1,.5)";support.rgba=supportElem.style.backgroundColor.indexOf("rgba")>-1;each(spaces,function(spaceName,space){space.cache="_"+spaceName;space.props.alpha={idx:3,type:"percent",def:1};});function clamp(value,prop,allowEmpty){var type=propTypes[prop.type]||{};if(value==null){return(allowEmpty||!prop.def)?null:prop.def;}
value=type.floor?~~value:parseFloat(value);if(isNaN(value)){return prop.def;}
if(type.mod){return(value+type.mod)%type.mod;}
return 0>value?0:type.max<value?type.max:value;}
function stringParse(string){var inst=color(),rgba=inst._rgba=[];string=string.toLowerCase();each(stringParsers,function(i,parser){var parsed,match=parser.re.exec(string),values=match&&parser.parse(match),spaceName=parser.space||"rgba";if(values){parsed=inst[spaceName](values);inst[spaces[spaceName].cache]=parsed[spaces[spaceName].cache];rgba=inst._rgba=parsed._rgba;return false;}});if(rgba.length){if(rgba.join()==="0,0,0,0"){jQuery.extend(rgba,colors.transparent);}
return inst;}
return colors[string];}
color.fn=jQuery.extend(color.prototype,{parse:function(red,green,blue,alpha){if(red===undefined){this._rgba=[null,null,null,null];return this;}
if(red.jquery||red.nodeType){red=jQuery(red).css(green);green=undefined;}
var inst=this,type=jQuery.type(red),rgba=this._rgba=[];if(green!==undefined){red=[red,green,blue,alpha];type="array";}
if(type==="string"){return this.parse(stringParse(red)||colors._default);}
if(type==="array"){each(spaces.rgba.props,function(key,prop){rgba[prop.idx]=clamp(red[prop.idx],prop);});return this;}
if(type==="object"){if(red instanceof color){each(spaces,function(spaceName,space){if(red[space.cache]){inst[space.cache]=red[space.cache].slice();}});}else{each(spaces,function(spaceName,space){var cache=space.cache;each(space.props,function(key,prop){if(!inst[cache]&&space.to){if(key==="alpha"||red[key]==null){return;}
inst[cache]=space.to(inst._rgba);}
inst[cache][prop.idx]=clamp(red[key],prop,true);});if(inst[cache]&&jQuery.inArray(null,inst[cache].slice(0,3))<0){inst[cache][3]=1;if(space.from){inst._rgba=space.from(inst[cache]);}}});}
return this;}},is:function(compare){var is=color(compare),same=true,inst=this;each(spaces,function(_,space){var localCache,isCache=is[space.cache];if(isCache){localCache=inst[space.cache]||space.to&&space.to(inst._rgba)||[];each(space.props,function(_,prop){if(isCache[prop.idx]!=null){same=(isCache[prop.idx]===localCache[prop.idx]);return same;}});}
return same;});return same;},_space:function(){var used=[],inst=this;each(spaces,function(spaceName,space){if(inst[space.cache]){used.push(spaceName);}});return used.pop();},transition:function(other,distance){var end=color(other),spaceName=end._space(),space=spaces[spaceName],startColor=this.alpha()===0?color("transparent"):this,start=startColor[space.cache]||space.to(startColor._rgba),result=start.slice();end=end[space.cache];each(space.props,function(key,prop){var index=prop.idx,startValue=start[index],endValue=end[index],type=propTypes[prop.type]||{};if(endValue===null){return;}
if(startValue===null){result[index]=endValue;}else{if(type.mod){if(endValue-startValue>type.mod/2){startValue+=type.mod;}else if(startValue-endValue>type.mod/2){startValue-=type.mod;}}
result[index]=clamp((endValue-startValue)*distance+startValue,prop);}});return this[spaceName](result);},blend:function(opaque){if(this._rgba[3]===1){return this;}
var rgb=this._rgba.slice(),a=rgb.pop(),blend=color(opaque)._rgba;return color(jQuery.map(rgb,function(v,i){return(1-a)*blend[i]+a*v;}));},toRgbaString:function(){var prefix="rgba(",rgba=jQuery.map(this._rgba,function(v,i){return v==null?(i>2?1:0):v;});if(rgba[3]===1){rgba.pop();prefix="rgb(";}
return prefix+rgba.join()+")";},toHslaString:function(){var prefix="hsla(",hsla=jQuery.map(this.hsla(),function(v,i){if(v==null){v=i>2?1:0;}
if(i&&i<3){v=Math.round(v*100)+"%";}
return v;});if(hsla[3]===1){hsla.pop();prefix="hsl(";}
return prefix+hsla.join()+")";},toHexString:function(includeAlpha){var rgba=this._rgba.slice(),alpha=rgba.pop();if(includeAlpha){rgba.push(~~(alpha*255));}
return"#"+jQuery.map(rgba,function(v){v=(v||0).toString(16);return v.length===1?"0"+v:v;}).join("");},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString();}});color.fn.parse.prototype=color.fn;function hue2rgb(p,q,h){h=(h+1)%1;if(h*6<1){return p+(q-p)*h*6;}
if(h*2<1){return q;}
if(h*3<2){return p+(q-p)*((2/3)-h)*6;}
return p;}
spaces.hsla.to=function(rgba){if(rgba[0]==null||rgba[1]==null||rgba[2]==null){return[null,null,null,rgba[3]];}
var r=rgba[0]/255,g=rgba[1]/255,b=rgba[2]/255,a=rgba[3],max=Math.max(r,g,b),min=Math.min(r,g,b),diff=max-min,add=max+min,l=add*0.5,h,s;if(min===max){h=0;}else if(r===max){h=(60*(g-b)/diff)+360;}else if(g===max){h=(60*(b-r)/diff)+120;}else{h=(60*(r-g)/diff)+240;}
if(diff===0){s=0;}else if(l<=0.5){s=diff/add;}else{s=diff/(2-add);}
return[Math.round(h)%360,s,l,a==null?1:a];};spaces.hsla.from=function(hsla){if(hsla[0]==null||hsla[1]==null||hsla[2]==null){return[null,null,null,hsla[3]];}
var h=hsla[0]/360,s=hsla[1],l=hsla[2],a=hsla[3],q=l<=0.5?l*(1+s):l+s-l*s,p=2*l-q;return[Math.round(hue2rgb(p,q,h+(1/3))*255),Math.round(hue2rgb(p,q,h)*255),Math.round(hue2rgb(p,q,h-(1/3))*255),a];};each(spaces,function(spaceName,space){var props=space.props,cache=space.cache,to=space.to,from=space.from;color.fn[spaceName]=function(value){if(to&&!this[cache]){this[cache]=to(this._rgba);}
if(value===undefined){return this[cache].slice();}
var ret,type=jQuery.type(value),arr=(type==="array"||type==="object")?value:arguments,local=this[cache].slice();each(props,function(key,prop){var val=arr[type==="object"?key:prop.idx];if(val==null){val=local[prop.idx];}
local[prop.idx]=clamp(val,prop);});if(from){ret=color(from(local));ret[cache]=local;return ret;}else{return color(local);}};each(props,function(key,prop){if(color.fn[key]){return;}
color.fn[key]=function(value){var vtype=jQuery.type(value),fn=(key==="alpha"?(this._hsla?"hsla":"rgba"):spaceName),local=this[fn](),cur=local[prop.idx],match;if(vtype==="undefined"){return cur;}
if(vtype==="function"){value=value.call(this,cur);vtype=jQuery.type(value);}
if(value==null&&prop.empty){return this;}
if(vtype==="string"){match=rplusequals.exec(value);if(match){value=cur+parseFloat(match[2])*(match[1]==="+"?1:-1);}}
local[prop.idx]=value;return this[fn](local);};});});color.hook=function(hook){var hooks=hook.split(" ");each(hooks,function(i,hook){jQuery.cssHooks[hook]={set:function(elem,value){var parsed,curElem,backgroundColor="";if(value!=="transparent"&&(jQuery.type(value)!=="string"||(parsed=stringParse(value)))){value=color(parsed||value);if(!support.rgba&&value._rgba[3]!==1){curElem=hook==="backgroundColor"?elem.parentNode:elem;while((backgroundColor===""||backgroundColor==="transparent")&&curElem&&curElem.style){try{backgroundColor=jQuery.css(curElem,"backgroundColor");curElem=curElem.parentNode;}catch(e){}}
value=value.blend(backgroundColor&&backgroundColor!=="transparent"?backgroundColor:"_default");}
value=value.toRgbaString();}
try{elem.style[hook]=value;}catch(e){}}};jQuery.fx.step[hook]=function(fx){if(!fx.colorInit){fx.start=color(fx.elem,hook);fx.end=color(fx.end);fx.colorInit=true;}
jQuery.cssHooks[hook].set(fx.elem,fx.start.transition(fx.end,fx.pos));};});};color.hook(stepHooks);jQuery.cssHooks.borderColor={expand:function(value){var expanded={};each(["Top","Right","Bottom","Left"],function(i,part){expanded["border"+part+"Color"]=value;});return expanded;}};colors=jQuery.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"};})(jQuery);(function(){var classAnimationActions=["add","remove","toggle"],shorthandStyles={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};$.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(_,prop){$.fx.step[prop]=function(fx){if(fx.end!=="none"&&!fx.setAttr||fx.pos===1&&!fx.setAttr){jQuery.style(fx.elem,prop,fx.end);fx.setAttr=true;}};});function getElementStyles(elem){var key,len,style=elem.ownerDocument.defaultView?elem.ownerDocument.defaultView.getComputedStyle(elem,null):elem.currentStyle,styles={};if(style&&style.length&&style[0]&&style[style[0]]){len=style.length;while(len--){key=style[len];if(typeof style[key]==="string"){styles[$.camelCase(key)]=style[key];}}}else{for(key in style){if(typeof style[key]==="string"){styles[key]=style[key];}}}
return styles;}
function styleDifference(oldStyle,newStyle){var diff={},name,value;for(name in newStyle){value=newStyle[name];if(oldStyle[name]!==value){if(!shorthandStyles[name]){if($.fx.step[name]||!isNaN(parseFloat(value))){diff[name]=value;}}}}
return diff;}
if(!$.fn.addBack){$.fn.addBack=function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector));};}
$.effects.animateClass=function(value,duration,easing,callback){var o=$.speed(duration,easing,callback);return this.queue(function(){var animated=$(this),baseClass=animated.attr("class")||"",applyClassChange,allAnimations=o.children?animated.find("*").addBack():animated;allAnimations=allAnimations.map(function(){var el=$(this);return{el:el,start:getElementStyles(this)};});applyClassChange=function(){$.each(classAnimationActions,function(i,action){if(value[action]){animated[action+"Class"](value[action]);}});};applyClassChange();allAnimations=allAnimations.map(function(){this.end=getElementStyles(this.el[0]);this.diff=styleDifference(this.start,this.end);return this;});animated.attr("class",baseClass);allAnimations=allAnimations.map(function(){var styleInfo=this,dfd=$.Deferred(),opts=$.extend({},o,{queue:false,complete:function(){dfd.resolve(styleInfo);}});this.el.animate(this.diff,opts);return dfd.promise();});$.when.apply($,allAnimations.get()).done(function(){applyClassChange();$.each(arguments,function(){var el=this.el;$.each(this.diff,function(key){el.css(key,"");});});o.complete.call(animated[0]);});});};$.fn.extend({addClass:(function(orig){return function(classNames,speed,easing,callback){return speed?$.effects.animateClass.call(this,{add:classNames},speed,easing,callback):orig.apply(this,arguments);};})($.fn.addClass),removeClass:(function(orig){return function(classNames,speed,easing,callback){return arguments.length>1?$.effects.animateClass.call(this,{remove:classNames},speed,easing,callback):orig.apply(this,arguments);};})($.fn.removeClass),toggleClass:(function(orig){return function(classNames,force,speed,easing,callback){if(typeof force==="boolean"||force===undefined){if(!speed){return orig.apply(this,arguments);}else{return $.effects.animateClass.call(this,(force?{add:classNames}:{remove:classNames}),speed,easing,callback);}}else{return $.effects.animateClass.call(this,{toggle:classNames},force,speed,easing);}};})($.fn.toggleClass),switchClass:function(remove,add,speed,easing,callback){return $.effects.animateClass.call(this,{add:add,remove:remove},speed,easing,callback);}});})();(function(){if($.expr&&$.expr.filters&&$.expr.filters.animated){$.expr.filters.animated=(function(orig){return function(elem){return!!$(elem).data(dataSpaceAnimated)||orig(elem);};})($.expr.filters.animated);}
if($.uiBackCompat!==false){$.extend($.effects,{save:function(element,set){var i=0,length=set.length;for(;i<length;i++){if(set[i]!==null){element.data(dataSpace+set[i],element[0].style[set[i]]);}}},restore:function(element,set){var val,i=0,length=set.length;for(;i<length;i++){if(set[i]!==null){val=element.data(dataSpace+set[i]);element.css(set[i],val);}}},setMode:function(el,mode){if(mode==="toggle"){mode=el.is(":hidden")?"show":"hide";}
return mode;},createWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent();}
var props={width:element.outerWidth(true),height:element.outerHeight(true),"float":element.css("float")},wrapper=$("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),size={width:element.width(),height:element.height()},active=document.activeElement;try{active.id;}catch(e){active=document.body;}
element.wrap(wrapper);if(element[0]===active||$.contains(element[0],active)){$(active).trigger("focus");}
wrapper=element.parent();if(element.css("position")==="static"){wrapper.css({position:"relative"});element.css({position:"relative"});}else{$.extend(props,{position:element.css("position"),zIndex:element.css("z-index")});$.each(["top","left","bottom","right"],function(i,pos){props[pos]=element.css(pos);if(isNaN(parseInt(props[pos],10))){props[pos]="auto";}});element.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"});}
element.css(size);return wrapper.css(props).show();},removeWrapper:function(element){var active=document.activeElement;if(element.parent().is(".ui-effects-wrapper")){element.parent().replaceWith(element);if(element[0]===active||$.contains(element[0],active)){$(active).trigger("focus");}}
return element;}});}
$.extend($.effects,{version:"1.12.1",define:function(name,mode,effect){if(!effect){effect=mode;mode="effect";}
$.effects.effect[name]=effect;$.effects.effect[name].mode=mode;return effect;},scaledDimensions:function(element,percent,direction){if(percent===0){return{height:0,width:0,outerHeight:0,outerWidth:0};}
var x=direction!=="horizontal"?((percent||100)/100):1,y=direction!=="vertical"?((percent||100)/100):1;return{height:element.height()*y,width:element.width()*x,outerHeight:element.outerHeight()*y,outerWidth:element.outerWidth()*x};},clipToBox:function(animation){return{width:animation.clip.right-animation.clip.left,height:animation.clip.bottom-animation.clip.top,left:animation.clip.left,top:animation.clip.top};},unshift:function(element,queueLength,count){var queue=element.queue();if(queueLength>1){queue.splice.apply(queue,[1,0].concat(queue.splice(queueLength,count)));}
element.dequeue();},saveStyle:function(element){element.data(dataSpaceStyle,element[0].style.cssText);},restoreStyle:function(element){element[0].style.cssText=element.data(dataSpaceStyle)||"";element.removeData(dataSpaceStyle);},mode:function(element,mode){var hidden=element.is(":hidden");if(mode==="toggle"){mode=hidden?"show":"hide";}
if(hidden?mode==="hide":mode==="show"){mode="none";}
return mode;},getBaseline:function(origin,original){var y,x;switch(origin[0]){case"top":y=0;break;case"middle":y=0.5;break;case"bottom":y=1;break;default:y=origin[0]/original.height;}
switch(origin[1]){case"left":x=0;break;case"center":x=0.5;break;case"right":x=1;break;default:x=origin[1]/original.width;}
return{x:x,y:y};},createPlaceholder:function(element){var placeholder,cssPosition=element.css("position"),position=element.position();element.css({marginTop:element.css("marginTop"),marginBottom:element.css("marginBottom"),marginLeft:element.css("marginLeft"),marginRight:element.css("marginRight")}).outerWidth(element.outerWidth()).outerHeight(element.outerHeight());if(/^(static|relative)/.test(cssPosition)){cssPosition="absolute";placeholder=$("<"+element[0].nodeName+">").insertAfter(element).css({display:/^(inline|ruby)/.test(element.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:element.css("marginTop"),marginBottom:element.css("marginBottom"),marginLeft:element.css("marginLeft"),marginRight:element.css("marginRight"),"float":element.css("float")}).outerWidth(element.outerWidth()).outerHeight(element.outerHeight()).addClass("ui-effects-placeholder");element.data(dataSpace+"placeholder",placeholder);}
element.css({position:cssPosition,left:position.left,top:position.top});return placeholder;},removePlaceholder:function(element){var dataKey=dataSpace+"placeholder",placeholder=element.data(dataKey);if(placeholder){placeholder.remove();element.removeData(dataKey);}},cleanUp:function(element){$.effects.restoreStyle(element);$.effects.removePlaceholder(element);},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){var unit=element.cssUnit(x);if(unit[0]>0){value[x]=unit[0]*factor+unit[1];}});return value;}});function _normalizeArguments(effect,options,speed,callback){if($.isPlainObject(effect)){options=effect;effect=effect.effect;}
effect={effect:effect};if(options==null){options={};}
if($.isFunction(options)){callback=options;speed=null;options={};}
if(typeof options==="number"||$.fx.speeds[options]){callback=speed;speed=options;options={};}
if($.isFunction(speed)){callback=speed;speed=null;}
if(options){$.extend(effect,options);}
speed=speed||options.duration;effect.duration=$.fx.off?0:typeof speed==="number"?speed:speed in $.fx.speeds?$.fx.speeds[speed]:$.fx.speeds._default;effect.complete=callback||options.complete;return effect;}
function standardAnimationOption(option){if(!option||typeof option==="number"||$.fx.speeds[option]){return true;}
if(typeof option==="string"&&!$.effects.effect[option]){return true;}
if($.isFunction(option)){return true;}
if(typeof option==="object"&&!option.effect){return true;}
return false;}
$.fn.extend({effect:function(){var args=_normalizeArguments.apply(this,arguments),effectMethod=$.effects.effect[args.effect],defaultMode=effectMethod.mode,queue=args.queue,queueName=queue||"fx",complete=args.complete,mode=args.mode,modes=[],prefilter=function(next){var el=$(this),normalizedMode=$.effects.mode(el,mode)||defaultMode;el.data(dataSpaceAnimated,true);modes.push(normalizedMode);if(defaultMode&&(normalizedMode==="show"||(normalizedMode===defaultMode&&normalizedMode==="hide"))){el.show();}
if(!defaultMode||normalizedMode!=="none"){$.effects.saveStyle(el);}
if($.isFunction(next)){next();}};if($.fx.off||!effectMethod){if(mode){return this[mode](args.duration,complete);}else{return this.each(function(){if(complete){complete.call(this);}});}}
function run(next){var elem=$(this);function cleanup(){elem.removeData(dataSpaceAnimated);$.effects.cleanUp(elem);if(args.mode==="hide"){elem.hide();}
done();}
function done(){if($.isFunction(complete)){complete.call(elem[0]);}
if($.isFunction(next)){next();}}
args.mode=modes.shift();if($.uiBackCompat!==false&&!defaultMode){if(elem.is(":hidden")?mode==="hide":mode==="show"){elem[mode]();done();}else{effectMethod.call(elem[0],args,done);}}else{if(args.mode==="none"){elem[mode]();done();}else{effectMethod.call(elem[0],args,cleanup);}}}
return queue===false?this.each(prefilter).each(run):this.queue(queueName,prefilter).queue(queueName,run);},show:(function(orig){return function(option){if(standardAnimationOption(option)){return orig.apply(this,arguments);}else{var args=_normalizeArguments.apply(this,arguments);args.mode="show";return this.effect.call(this,args);}};})($.fn.show),hide:(function(orig){return function(option){if(standardAnimationOption(option)){return orig.apply(this,arguments);}else{var args=_normalizeArguments.apply(this,arguments);args.mode="hide";return this.effect.call(this,args);}};})($.fn.hide),toggle:(function(orig){return function(option){if(standardAnimationOption(option)||typeof option==="boolean"){return orig.apply(this,arguments);}else{var args=_normalizeArguments.apply(this,arguments);args.mode="toggle";return this.effect.call(this,args);}};})($.fn.toggle),cssUnit:function(key){var style=this.css(key),val=[];$.each(["em","px","%","pt"],function(i,unit){if(style.indexOf(unit)>0){val=[parseFloat(style),unit];}});return val;},cssClip:function(clipObj){if(clipObj){return this.css("clip","rect("+clipObj.top+"px "+clipObj.right+"px "+
clipObj.bottom+"px "+clipObj.left+"px)");}
return parseClip(this.css("clip"),this);},transfer:function(options,done){var element=$(this),target=$(options.to),targetFixed=target.css("position")==="fixed",body=$("body"),fixTop=targetFixed?body.scrollTop():0,fixLeft=targetFixed?body.scrollLeft():0,endPosition=target.offset(),animation={top:endPosition.top-fixTop,left:endPosition.left-fixLeft,height:target.innerHeight(),width:target.innerWidth()},startPosition=element.offset(),transfer=$("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(options.className).css({top:startPosition.top-fixTop,left:startPosition.left-fixLeft,height:element.innerHeight(),width:element.innerWidth(),position:targetFixed?"fixed":"absolute"}).animate(animation,options.duration,options.easing,function(){transfer.remove();if($.isFunction(done)){done();}});}});function parseClip(str,element){var outerWidth=element.outerWidth(),outerHeight=element.outerHeight(),clipRegex=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,values=clipRegex.exec(str)||["",0,outerWidth,outerHeight,0];return{top:parseFloat(values[1])||0,right:values[2]==="auto"?outerWidth:parseFloat(values[2]),bottom:values[3]==="auto"?outerHeight:parseFloat(values[3]),left:parseFloat(values[4])||0};}
$.fx.step.clip=function(fx){if(!fx.clipInit){fx.start=$(fx.elem).cssClip();if(typeof fx.end==="string"){fx.end=parseClip(fx.end,fx.elem);}
fx.clipInit=true;}
$(fx.elem).cssClip({top:fx.pos*(fx.end.top-fx.start.top)+fx.start.top,right:fx.pos*(fx.end.right-fx.start.right)+fx.start.right,bottom:fx.pos*(fx.end.bottom-fx.start.bottom)+fx.start.bottom,left:fx.pos*(fx.end.left-fx.start.left)+fx.start.left});};})();(function(){var baseEasings={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(i,name){baseEasings[name]=function(p){return Math.pow(p,i+2);};});$.extend(baseEasings,{Sine:function(p){return 1-Math.cos(p*Math.PI/2);},Circ:function(p){return 1-Math.sqrt(1-p*p);},Elastic:function(p){return p===0||p===1?p:-Math.pow(2,8*(p-1))*Math.sin(((p-1)*80-7.5)*Math.PI/15);},Back:function(p){return p*p*(3*p-2);},Bounce:function(p){var pow2,bounce=4;while(p<((pow2=Math.pow(2,--bounce))-1)/11){}
return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((pow2*3-2)/22-p,2);}});$.each(baseEasings,function(name,easeIn){$.easing["easeIn"+name]=easeIn;$.easing["easeOut"+name]=function(p){return 1-easeIn(1-p);};$.easing["easeInOut"+name]=function(p){return p<0.5?easeIn(p*2)/2:1-easeIn(p*-2+2)/2;};});})();var effect=$.effects;var effectsEffectBounce=$.effects.define("bounce",function(options,done){var upAnim,downAnim,refValue,element=$(this),mode=options.mode,hide=mode==="hide",show=mode==="show",direction=options.direction||"up",distance=options.distance,times=options.times||5,anims=times*2+(show||hide?1:0),speed=options.duration/anims,easing=options.easing,ref=(direction==="up"||direction==="down")?"top":"left",motion=(direction==="up"||direction==="left"),i=0,queuelen=element.queue().length;$.effects.createPlaceholder(element);refValue=element.css(ref);if(!distance){distance=element[ref==="top"?"outerHeight":"outerWidth"]()/3;}
if(show){downAnim={opacity:1};downAnim[ref]=refValue;element.css("opacity",0).css(ref,motion?-distance*2:distance*2).animate(downAnim,speed,easing);}
if(hide){distance=distance/Math.pow(2,times-1);}
downAnim={};downAnim[ref]=refValue;for(;i<times;i++){upAnim={};upAnim[ref]=(motion?"-=":"+=")+distance;element.animate(upAnim,speed,easing).animate(downAnim,speed,easing);distance=hide?distance*2:distance/2;}
if(hide){upAnim={opacity:0};upAnim[ref]=(motion?"-=":"+=")+distance;element.animate(upAnim,speed,easing);}
element.queue(done);$.effects.unshift(element,queuelen,anims+1);});}));;

/* /web/static/lib/jquery/jquery.browser.js defined in bundle 'web.assets_common' */
(function(){$.uaMatch=function(ua){var ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[\/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[\/]([\w.]+)/.exec(ua)||/(msie)([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};};if(!$.browser){var matched=$.uaMatch(navigator.userAgent);var browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version;}
if(browser.chrome){browser.webkit=true;}else if(browser.webkit){browser.safari=true;}
$.browser=browser;}})();;

/* /web/static/lib/jquery.blockUI/jquery.blockUI.js defined in bundle 'web.assets_common' */
;(function(){"use strict";function setup($){$.fn._fadeIn=$.fn.fadeIn;var noOp=$.noop||function(){};var msie=/MSIE/.test(navigator.userAgent);var ie6=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent);var mode=document.documentMode||0;var setExpr=$.isFunction(document.createElement('div').style.setExpression);$.blockUI=function(opts){install(window,opts);};$.unblockUI=function(opts){remove(window,opts);};$.growlUI=function(title,message,timeout,onClose){var $m=$('<div class="growlUI"></div>');if(title)$m.append('<h1>'+title+'</h1>');if(message)$m.append('<h2>'+message+'</h2>');if(timeout===undefined)timeout=3000;var callBlock=function(opts){opts=opts||{};$.blockUI({message:$m,fadeIn:typeof opts.fadeIn!=='undefined'?opts.fadeIn:700,fadeOut:typeof opts.fadeOut!=='undefined'?opts.fadeOut:1000,timeout:typeof opts.timeout!=='undefined'?opts.timeout:timeout,centerY:false,showOverlay:false,onUnblock:onClose,css:$.blockUI.defaults.growlCSS});};callBlock();var nonmousedOpacity=$m.css('opacity');$m.mouseover(function(){callBlock({fadeIn:0,timeout:30000});var displayBlock=$('.blockMsg');displayBlock.stop();displayBlock.fadeTo(300,1);}).mouseout(function(){$('.blockMsg').fadeOut(1000);});};$.fn.block=function(opts){if(this[0]===window){$.blockUI(opts);return this;}
var fullOpts=$.extend({},$.blockUI.defaults,opts||{});this.each(function(){var $el=$(this);if(fullOpts.ignoreIfBlocked&&$el.data('blockUI.isBlocked'))
return;$el.unblock({fadeOut:0});});return this.each(function(){if($.css(this,'position')=='static'){this.style.position='relative';$(this).data('blockUI.static',true);}
this.style.zoom=1;install(this,opts);});};$.fn.unblock=function(opts){if(this[0]===window){$.unblockUI(opts);return this;}
return this.each(function(){remove(this,opts);});};$.blockUI.version=2.70;$.blockUI.defaults={message:'<h1>Please wait...</h1>',title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:'30%',top:'40%',left:'35%',textAlign:'center',color:'#000',border:'3px solid #aaa',backgroundColor:'#fff',cursor:'wait'},themedCSS:{width:'30%',top:'40%',left:'35%'},overlayCSS:{backgroundColor:'#000',opacity:0.6,cursor:'wait'},cursorReset:'default',growlCSS:{width:'350px',top:'10px',left:'',right:'10px',border:'none',padding:'5px',opacity:0.6,cursor:'default',color:'#fff',backgroundColor:'#000','-webkit-border-radius':'10px','-moz-border-radius':'10px','border-radius':'10px'},iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank',forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,focusableElements:':input:enabled:visible',onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:'blockMsg',ignoreIfBlocked:false};var pageBlock=null;var pageBlockEls=[];function install(el,opts){var css,themedCSS;var full=(el==window);var msg=(opts&&opts.message!==undefined?opts.message:undefined);opts=$.extend({},$.blockUI.defaults,opts||{});if(opts.ignoreIfBlocked&&$(el).data('blockUI.isBlocked'))
return;opts.overlayCSS=$.extend({},$.blockUI.defaults.overlayCSS,opts.overlayCSS||{});css=$.extend({},$.blockUI.defaults.css,opts.css||{});if(opts.onOverlayClick)
opts.overlayCSS.cursor='pointer';themedCSS=$.extend({},$.blockUI.defaults.themedCSS,opts.themedCSS||{});msg=msg===undefined?opts.message:msg;if(full&&pageBlock)
remove(window,{fadeOut:0});if(msg&&typeof msg!='string'&&(msg.parentNode||msg.jquery)){var node=msg.jquery?msg[0]:msg;var data={};$(el).data('blockUI.history',data);data.el=node;data.parent=node.parentNode;data.display=node.style.display;data.position=node.style.position;if(data.parent)
data.parent.removeChild(node);}
$(el).data('blockUI.onUnblock',opts.onUnblock);var z=opts.baseZ;var lyr1,lyr2,lyr3,s;if(msie||opts.forceIframe)
lyr1=$('<iframe class="blockUI" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>');else
lyr1=$('<div class="blockUI" style="display:none"></div>');if(opts.theme)
lyr2=$('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+(z++)+';display:none"></div>');else
lyr2=$('<div class="blockUI blockOverlay" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');if(opts.theme&&full){s='<div class="blockUI '+opts.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">';if(opts.title){s+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title||'&nbsp;')+'</div>';}
s+='<div class="ui-widget-content ui-dialog-content"></div>';s+='</div>';}
else if(opts.theme){s='<div class="blockUI '+opts.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">';if(opts.title){s+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title||'&nbsp;')+'</div>';}
s+='<div class="ui-widget-content ui-dialog-content"></div>';s+='</div>';}
else if(full){s='<div class="blockUI '+opts.blockMsgClass+' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';}
else{s='<div class="blockUI '+opts.blockMsgClass+' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';}
lyr3=$(s);if(msg){if(opts.theme){lyr3.css(themedCSS);lyr3.addClass('ui-widget-content');}
else
lyr3.css(css);}
if(!opts.theme)
lyr2.css(opts.overlayCSS);lyr2.css('position',full?'fixed':'absolute');if(msie||opts.forceIframe)
lyr1.css('opacity',0.0);var layers=[lyr1,lyr2,lyr3],$par=full?$('body'):$(el);$.each(layers,function(){this.appendTo($par);});if(opts.theme&&opts.draggable&&$.fn.draggable){lyr3.draggable({handle:'.ui-dialog-titlebar',cancel:'li'});}
var expr=setExpr&&(!$.support.boxModel||$('object,embed',full?null:el).length>0);if(ie6||expr){if(full&&opts.allowBodyStretch&&$.support.boxModel)
$('html,body').css('height','100%');if((ie6||!$.support.boxModel)&&!full){var t=sz(el,'borderTopWidth'),l=sz(el,'borderLeftWidth');var fixT=t?'(0 - '+t+')':0;var fixL=l?'(0 - '+l+')':0;}
$.each(layers,function(i,o){var s=o[0].style;s.position='absolute';if(i<2){if(full)
s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"');else
s.setExpression('height','this.parentNode.offsetHeight + "px"');if(full)
s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');else
s.setExpression('width','this.parentNode.offsetWidth + "px"');if(fixL)s.setExpression('left',fixL);if(fixT)s.setExpression('top',fixT);}
else if(opts.centerY){if(full)s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');s.marginTop=0;}
else if(!opts.centerY&&full){var top=(opts.css&&opts.css.top)?parseInt(opts.css.top,10):0;var expression='((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';s.setExpression('top',expression);}});}
if(msg){if(opts.theme)
lyr3.find('.ui-widget-content').append(msg);else
lyr3.append(msg);if(msg.jquery||msg.nodeType)
$(msg).show();}
if((msie||opts.forceIframe)&&opts.showOverlay)
lyr1.show();if(opts.fadeIn){var cb=opts.onBlock?opts.onBlock:noOp;var cb1=(opts.showOverlay&&!msg)?cb:noOp;var cb2=msg?cb:noOp;if(opts.showOverlay)
lyr2._fadeIn(opts.fadeIn,cb1);if(msg)
lyr3._fadeIn(opts.fadeIn,cb2);}
else{if(opts.showOverlay)
lyr2.show();if(msg)
lyr3.show();if(opts.onBlock)
opts.onBlock.bind(lyr3)();}
bind(1,el,opts);if(full){pageBlock=lyr3[0];pageBlockEls=$(opts.focusableElements,pageBlock);if(opts.focusInput)
setTimeout(focus,20);}
else
center(lyr3[0],opts.centerX,opts.centerY);if(opts.timeout){var to=setTimeout(function(){if(full)
$.unblockUI(opts);else
$(el).unblock(opts);},opts.timeout);$(el).data('blockUI.timeout',to);}}
function remove(el,opts){var count;var full=(el==window);var $el=$(el);var data=$el.data('blockUI.history');var to=$el.data('blockUI.timeout');if(to){clearTimeout(to);$el.removeData('blockUI.timeout');}
opts=$.extend({},$.blockUI.defaults,opts||{});bind(0,el,opts);if(opts.onUnblock===null){opts.onUnblock=$el.data('blockUI.onUnblock');$el.removeData('blockUI.onUnblock');}
var els;if(full)
els=$('body').children().filter('.blockUI').add('body > .blockUI');else
els=$el.find('>.blockUI');if(opts.cursorReset){if(els.length>1)
els[1].style.cursor=opts.cursorReset;if(els.length>2)
els[2].style.cursor=opts.cursorReset;}
if(full)
pageBlock=pageBlockEls=null;if(opts.fadeOut){count=els.length;els.stop().fadeOut(opts.fadeOut,function(){if(--count===0)
reset(els,data,opts,el);});}
else
reset(els,data,opts,el);}
function reset(els,data,opts,el){var $el=$(el);if($el.data('blockUI.isBlocked'))
return;els.each(function(i,o){if(this.parentNode)
this.parentNode.removeChild(this);});if(data&&data.el){data.el.style.display=data.display;data.el.style.position=data.position;data.el.style.cursor='default';if(data.parent)
data.parent.appendChild(data.el);$el.removeData('blockUI.history');}
if($el.data('blockUI.static')){$el.css('position','static');}
if(typeof opts.onUnblock=='function')
opts.onUnblock(el,opts);var body=$(document.body),w=body.width(),cssW=body[0].style.width;body.width(w-1).width(w);body[0].style.width=cssW;}
function bind(b,el,opts){var full=el==window,$el=$(el);if(!b&&(full&&!pageBlock||!full&&!$el.data('blockUI.isBlocked')))
return;$el.data('blockUI.isBlocked',b);if(!full||!opts.bindEvents||(b&&!opts.showOverlay))
return;var events='mousedown mouseup keydown keypress keyup touchstart touchend touchmove';if(b)
$(document).bind(events,opts,handler);else
$(document).unbind(events,handler);}
function handler(e){if(e.type==='keydown'&&e.keyCode&&e.keyCode==9){if(pageBlock&&e.data.constrainTabKey){var els=pageBlockEls;var fwd=!e.shiftKey&&e.target===els[els.length-1];var back=e.shiftKey&&e.target===els[0];if(fwd||back){setTimeout(function(){focus(back);},10);return false;}}}
var opts=e.data;var target=$(e.target);if(target.hasClass('blockOverlay')&&opts.onOverlayClick)
opts.onOverlayClick(e);if(target.parents('div.'+opts.blockMsgClass).length>0)
return true;return target.parents().children().filter('div.blockUI').length===0;}
function focus(back){if(!pageBlockEls)
return;var e=pageBlockEls[back===true?pageBlockEls.length-1:0];if(e)
e.focus();}
function center(el,x,y){var p=el.parentNode,s=el.style;var l=((p.offsetWidth-el.offsetWidth)/2)-sz(p,'borderLeftWidth');var t=((p.offsetHeight-el.offsetHeight)/2)-sz(p,'borderTopWidth');if(x)s.left=l>0?(l+'px'):'0';if(y)s.top=t>0?(t+'px'):'0';}
function sz(el,p){return parseInt($.css(el,p),10)||0;}}
if(typeof define==='function'&&define.amd&&define.amd.jQuery){define(['jquery'],setup);}else{setup(jQuery);}})();;

/* /web/static/lib/jquery.hotkeys/jquery.hotkeys.js defined in bundle 'web.assets_common' */
(function(jQuery){jQuery.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",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:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":"\"",",":"<",".":">","/":"?","\\":"|"}};function keyHandler(handleObj){if(typeof handleObj.data!=="string"){return;}
var origHandler=handleObj.handler,keys=handleObj.data.toLowerCase().split(" ");handleObj.handler=function(event){if(this!==event.target&&(/textarea|select/i.test(event.target.nodeName)||event.target.type==="text")){return;}
var special=event.type!=="keypress"&&jQuery.hotkeys.specialKeys[event.which],character=String.fromCharCode(event.which).toLowerCase(),key,modif="",possible={};if(event.altKey&&special!=="alt"){modif+="alt+";}
if(event.ctrlKey&&special!=="ctrl"){modif+="ctrl+";}
if(event.metaKey&&!event.ctrlKey&&special!=="meta"){modif+="meta+";}
if(event.shiftKey&&special!=="shift"){modif+="shift+";}
if(special){possible[modif+special]=true;}else{possible[modif+character]=true;possible[modif+jQuery.hotkeys.shiftNums[character]]=true;if(modif==="shift+"){possible[jQuery.hotkeys.shiftNums[character]]=true;}}
for(var i=0,l=keys.length;i<l;i++){if(possible[keys[i]]){return origHandler.apply(this,arguments);}}};}
jQuery.each(["keydown","keyup","keypress"],function(){jQuery.event.special[this]={add:keyHandler};});})(jQuery);;

/* /web/static/lib/jquery.placeholder/jquery.placeholder.js defined in bundle 'web.assets_common' */
;(function(window,document,$){var isInputSupported='placeholder'in document.createElement('input'),isTextareaSupported='placeholder'in document.createElement('textarea'),prototype=$.fn,valHooks=$.valHooks,hooks,placeholder;if(isInputSupported&&isTextareaSupported){placeholder=prototype.placeholder=function(){return this;};placeholder.input=placeholder.textarea=true;}else{placeholder=prototype.placeholder=function(){var $this=this;$this.filter((isInputSupported?'textarea':':input')+'[placeholder]').not('.placeholder').bind({'focus.placeholder':clearPlaceholder,'blur.placeholder':setPlaceholder}).data('placeholder-enabled',true).trigger('blur.placeholder');return $this;};placeholder.input=isInputSupported;placeholder.textarea=isTextareaSupported;hooks={'get':function(element){var $element=$(element);return $element.data('placeholder-enabled')&&$element.hasClass('placeholder')?'':element.value;},'set':function(element,value){var $element=$(element);if(!$element.data('placeholder-enabled')){return element.value=value;}
if(value==''){element.value=value;if(element!=document.activeElement){setPlaceholder.call(element);}}else if($element.hasClass('placeholder')){clearPlaceholder.call(element,true,value)||(element.value=value);}else{element.value=value;}
return $element;}};isInputSupported||(valHooks.input=hooks);isTextareaSupported||(valHooks.textarea=hooks);$(function(){$(document).delegate('form','submit.placeholder',function(){var $inputs=$('.placeholder',this).each(clearPlaceholder);setTimeout(function(){$inputs.each(setPlaceholder);},10);});});$(window).bind('beforeunload.placeholder',function(){$('.placeholder').each(function(){this.value='';});});}
function args(elem){var newAttrs={},rinlinejQuery=/^jQuery\d+$/;$.each(elem.attributes,function(i,attr){if(attr.specified&&!rinlinejQuery.test(attr.name)){newAttrs[attr.name]=attr.value;}});return newAttrs;}
function clearPlaceholder(event,value){var input=this,$input=$(input);if(input.value==$input.attr('placeholder')&&$input.hasClass('placeholder')){if($input.data('placeholder-password')){$input=$input.hide().next().show().attr('id',$input.removeAttr('id').data('placeholder-id'));if(event===true){return $input[0].value=value;}
$input.focus();}else{input.value='';$input.removeClass('placeholder');input==document.activeElement&&input.select();}}}
function setPlaceholder(){var $replacement,input=this,$input=$(input),$origInput=$input,id=this.id;if(input.value==''){if(input.type=='password'){if(!$input.data('placeholder-textinput')){try{$replacement=$input.clone().attr({'type':'text'});}catch(e){$replacement=$('<input>').attr($.extend(args(this),{'type':'text'}));}
$replacement.removeAttr('name').data({'placeholder-password':true,'placeholder-id':id}).bind('focus.placeholder',clearPlaceholder);$input.data({'placeholder-textinput':$replacement,'placeholder-id':id}).before($replacement);}
$input=$input.removeAttr('id').hide().prev().attr('id',id).show();}
$input.addClass('placeholder');$input[0].value=$input.attr('placeholder');}else{$input.removeClass('placeholder');}}}(this,document,jQuery));;

/* /web/static/lib/jquery.form/jquery.form.js defined in bundle 'web.assets_common' */
(function(factory){"use strict";if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else{factory((typeof(jQuery)!='undefined')?jQuery:window.Zepto);}}
(function($){"use strict";var feature={};feature.fileapi=$("<input type='file'/>").get(0).files!==undefined;feature.formdata=window.FormData!==undefined;var hasProp=!!$.fn.prop;$.fn.attr2=function(){if(!hasProp){return this.attr.apply(this,arguments);}
var val=this.prop.apply(this,arguments);if((val&&val.jquery)||typeof val==='string'){return val;}
return this.attr.apply(this,arguments);};$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this;}
var method,action,url,$form=this;if(typeof options=='function'){options={success:options};}
else if(options===undefined){options={};}
method=options.type||this.attr2('method');action=options.url||this.attr2('action');url=(typeof action==='string')?$.trim(action):'';url=url||window.location.href||'';if(url){url=(url.match(/^([^#]+)/)||[])[1];}
options=$.extend(true,{url:url,success:$.ajaxSettings.success,type:method||$.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank'},options);var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this;}
if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this;}
var traditional=options.traditional;if(traditional===undefined){traditional=$.ajaxSettings.traditional;}
var elements=[];var qx,a=this.formToArray(options.semantic,elements);if(options.data){options.extraData=options.data;qx=$.param(options.data,traditional);}
if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this;}
this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this;}
var q=$.param(a,traditional);if(qx){q=(q?(q+'&'+qx):qx);}
if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;}
else{options.data=q;}
var callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm();});}
if(options.clearForm){callbacks.push(function(){$form.clearForm(options.includeHidden);});}
if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){var fn=options.replaceTarget?'replaceWith':'html';$(options.target)[fn](data).each(oldSuccess,arguments);});}
else if(options.success){callbacks.push(options.success);}
options.success=function(data,status,xhr){var context=options.context||this;for(var i=0,max=callbacks.length;i<max;i++){callbacks[i].apply(context,[data,status,xhr||$form,$form]);}};if(options.error){var oldError=options.error;options.error=function(xhr,status,error){var context=options.context||this;oldError.apply(context,[xhr,status,error,$form]);};}
if(options.complete){var oldComplete=options.complete;options.complete=function(xhr,status){var context=options.context||this;oldComplete.apply(context,[xhr,status,$form]);};}
var fileInputs=$('input[type=file]:enabled',this).filter(function(){return $(this).val()!=='';});var hasFileInputs=fileInputs.length>0;var mp='multipart/form-data';var multipart=($form.attr('enctype')==mp||$form.attr('encoding')==mp);var fileAPI=feature.fileapi&&feature.formdata;log("fileAPI :"+fileAPI);var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;var jqxhr;if(options.iframe!==false&&(options.iframe||shouldUseFrame)){if(options.closeKeepAlive){$.get(options.closeKeepAlive,function(){jqxhr=fileUploadIframe(a);});}
else{jqxhr=fileUploadIframe(a);}}
else if((hasFileInputs||multipart)&&fileAPI){jqxhr=fileUploadXhr(a);}
else{jqxhr=$.ajax(options);}
$form.removeData('jqxhr').data('jqxhr',jqxhr);for(var k=0;k<elements.length;k++){elements[k]=null;}
this.trigger('form-submit-notify',[this,options]);return this;function deepSerialize(extraData){var serialized=$.param(extraData,options.traditional).split('&');var len=serialized.length;var result=[];var i,part;for(i=0;i<len;i++){serialized[i]=serialized[i].replace(/\+/g,' ');part=serialized[i].split('=');result.push([decodeURIComponent(part[0]),decodeURIComponent(part[1])]);}
return result;}
function fileUploadXhr(a){var formdata=new FormData();for(var i=0;i<a.length;i++){formdata.append(a[i].name,a[i].value);}
if(options.extraData){var serializedData=deepSerialize(options.extraData);for(i=0;i<serializedData.length;i++){if(serializedData[i]){formdata.append(serializedData[i][0],serializedData[i][1]);}}}
options.data=null;var s=$.extend(true,{},$.ajaxSettings,options,{contentType:false,processData:false,cache:false,type:method||'POST'});if(options.uploadProgress){s.xhr=function(){var xhr=$.ajaxSettings.xhr();if(xhr.upload){xhr.upload.addEventListener('progress',function(event){var percent=0;var position=event.loaded||event.position;var total=event.total;if(event.lengthComputable){percent=Math.ceil(position/total*100);}
options.uploadProgress(event,position,total,percent);},false);}
return xhr;};}
s.data=null;var beforeSend=s.beforeSend;s.beforeSend=function(xhr,o){if(options.formData){o.data=options.formData;}
else{o.data=formdata;}
if(beforeSend){beforeSend.call(this,xhr,o);}};return $.ajax(s);}
function fileUploadIframe(a){var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;var deferred=$.Deferred();deferred.abort=function(status){xhr.abort(status);};if(a){for(i=0;i<elements.length;i++){el=$(elements[i]);if(hasProp){el.prop('disabled',false);}
else{el.removeAttr('disabled');}}}
s=$.extend(true,{},$.ajaxSettings,options);s.context=s.context||s;id='jqFormIO'+(new Date().getTime());if(s.iframeTarget){$io=$(s.iframeTarget);n=$io.attr2('name');if(!n){$io.attr2('name',id);}
else{id=n;}}
else{$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'" />');$io.css({position:'absolute',top:'-1000px',left:'-1000px'});}
io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=(status==='timeout'?'timeout':'aborted');log('aborting upload... '+e);this.aborted=1;try{if(io.contentWindow.document.execCommand){io.contentWindow.document.execCommand('Stop');}}
catch(ignore){}
$io.attr('src',s.iframeSrc);xhr.error=e;if(s.error){s.error.call(s.context,xhr,e,status);}
if(g){$.event.trigger("ajaxError",[xhr,s,e]);}
if(s.complete){s.complete.call(s.context,xhr,e);}}};g=s.global;if(g&&0===$.active++){$.event.trigger("ajaxStart");}
if(g){$.event.trigger("ajaxSend",[xhr,s]);}
if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;}
deferred.reject();return deferred;}
if(xhr.aborted){deferred.reject();return deferred;}
sub=form.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+'.x']=form.clk_x;s.extraData[n+'.y']=form.clk_y;}}}
var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc=null;try{if(frame.contentWindow){doc=frame.contentWindow.document;}}catch(err){log('cannot get iframe.contentWindow document: '+err);}
if(doc){return doc;}
try{doc=frame.contentDocument?frame.contentDocument:frame.document;}catch(err){log('cannot get iframe.contentDocument: '+err);doc=frame.document;}
return doc;}
var csrf_token=$('meta[name=csrf-token]').attr('content');var csrf_param=$('meta[name=csrf-param]').attr('content');if(csrf_param&&csrf_token){s.extraData=s.extraData||{};s.extraData[csrf_param]=csrf_token;}
function doSubmit(){var t=$form.attr2('target'),a=$form.attr2('action'),mp='multipart/form-data',et=$form.attr('enctype')||$form.attr('encoding')||mp;form.setAttribute('target',id);if(!method||/post/i.test(method)){form.setAttribute('method','POST');}
if(a!=s.url){form.setAttribute('action',s.url);}
if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});}
if(s.timeout){timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT);},s.timeout);}
function checkState(){try{var state=getDoc(io).readyState;log('state = '+state);if(state&&state.toLowerCase()=='uninitialized'){setTimeout(checkState,50);}}
catch(e){log('Server abort: ',e,' (',e.name,')');cb(SERVER_ABORT);if(timeoutHandle){clearTimeout(timeoutHandle);}
timeoutHandle=undefined;}}
var extraInputs=[];try{if(s.extraData){for(var n in s.extraData){if(s.extraData.hasOwnProperty(n)){if($.isPlainObject(s.extraData[n])&&s.extraData[n].hasOwnProperty('name')&&s.extraData[n].hasOwnProperty('value')){extraInputs.push($('<input type="hidden" name="'+s.extraData[n].name+'">').val(s.extraData[n].value).appendTo(form)[0]);}else{extraInputs.push($('<input type="hidden" name="'+n+'">').val(s.extraData[n]).appendTo(form)[0]);}}}}
if(!s.iframeTarget){$io.appendTo('body');}
if(io.attachEvent){io.attachEvent('onload',cb);}
else{io.addEventListener('load',cb,false);}
setTimeout(checkState,15);try{form.submit();}catch(err){var submitFn=document.createElement('form').submit;submitFn.apply(form);}}
finally{form.setAttribute('action',a);form.setAttribute('enctype',et);if(t){form.setAttribute('target',t);}else{$form.removeAttr('target');}
$(extraInputs).remove();}}
if(s.forceSync){doSubmit();}
else{setTimeout(doSubmit,10);}
var data,doc,domCheckCount=50,callbackProcessed;function cb(e){if(xhr.aborted||callbackProcessed){return;}
doc=getDoc(io);if(!doc){log('cannot access response document');e=SERVER_ABORT;}
if(e===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort('timeout');deferred.reject(xhr,'timeout');return;}
else if(e==SERVER_ABORT&&xhr){xhr.abort('server abort');deferred.reject(xhr,'error','server abort');return;}
if(!doc||doc.location.href==s.iframeSrc){if(!timedOut){return;}}
if(io.detachEvent){io.detachEvent('onload',cb);}
else{io.removeEventListener('load',cb,false);}
var status='success',errMsg;try{if(timedOut){throw'timeout';}
var isXml=s.dataType=='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML)){if(--domCheckCount){log('requeing onLoad callback, DOM not available');setTimeout(cb,250);return;}}
var docRoot=doc.body?doc.body:doc.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(isXml){s.dataType='xml';}
xhr.getResponseHeader=function(header){var headers={'content-type':s.dataType};return headers[header.toLowerCase()];};if(docRoot){xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;}
var dt=(s.dataType||'').toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s.textarea){var ta=doc.getElementsByTagName('textarea')[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute('status'))||xhr.status;xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;}
else if(scr){var pre=doc.getElementsByTagName('pre')[0];var b=doc.getElementsByTagName('body')[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerText;}
else if(b){xhr.responseText=b.textContent?b.textContent:b.innerText;}}}
else if(dt=='xml'&&!xhr.responseXML&&xhr.responseText){xhr.responseXML=toXml(xhr.responseText);}
try{data=httpData(xhr,dt,s);}
catch(err){status='parsererror';xhr.error=errMsg=(err||status);}}
catch(err){log('error caught: ',err);status='error';xhr.error=errMsg=(err||status);}
if(xhr.aborted){log('upload aborted');status=null;}
if(xhr.status){status=(xhr.status>=200&&xhr.status<300||xhr.status===304)?'success':'error';}
if(status==='success'){if(s.success){s.success.call(s.context,data,'success',xhr);}
deferred.resolve(xhr.responseText,'success',xhr);if(g){$.event.trigger("ajaxSuccess",[xhr,s]);}}
else if(status){if(errMsg===undefined){errMsg=xhr.statusText;}
if(s.error){s.error.call(s.context,xhr,status,errMsg);}
deferred.reject(xhr,'error',errMsg);if(g){$.event.trigger("ajaxError",[xhr,s,errMsg]);}}
if(g){$.event.trigger("ajaxComplete",[xhr,s]);}
if(g&&!--$.active){$.event.trigger("ajaxStop");}
if(s.complete){s.complete.call(s.context,xhr,status);}
callbackProcessed=true;if(s.timeout){clearTimeout(timeoutHandle);}
setTimeout(function(){if(!s.iframeTarget){$io.remove();}
else{$io.attr('src',s.iframeSrc);}
xhr.responseXML=null;},100);}
var toXml=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}
else{doc=(new DOMParser()).parseFromString(s,'text/xml');}
return(doc&&doc.documentElement&&doc.documentElement.nodeName!='parsererror')?doc:null;};var parseJSON=$.parseJSON||function(s){return window['eval']('('+s+')');};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader('content-type')||'',xml=type==='xml'||!type&&ct.indexOf('xml')>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==='parsererror'){if($.error){$.error('parsererror');}}
if(s&&s.dataFilter){data=s.dataFilter(data,type);}
if(typeof data==='string'){if(type==='json'||!type&&ct.indexOf('json')>=0){data=parseJSON(data);}else if(type==="script"||!type&&ct.indexOf("javascript")>=0){$.globalEval(data);}}
return data;};return deferred;}};$.fn.ajaxForm=function(options){options=options||{};options.delegation=options.delegation&&$.isFunction($.fn.on);if(!options.delegation&&this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log('DOM not ready, queuing ajaxForm');$(function(){$(o.s,o.c).ajaxForm(options);});return this;}
log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;}
if(options.delegation){$(document).off('submit.form-plugin',this.selector,doAjaxSubmit).off('click.form-plugin',this.selector,captureSubmittingElement).on('submit.form-plugin',this.selector,options,doAjaxSubmit).on('click.form-plugin',this.selector,options,captureSubmittingElement);return this;}
return this.ajaxFormUnbind().bind('submit.form-plugin',options,doAjaxSubmit).bind('click.form-plugin',options,captureSubmittingElement);};function doAjaxSubmit(e){var options=e.data;if(!e.isDefaultPrevented()){e.preventDefault();$(e.target).ajaxSubmit(options);}}
function captureSubmittingElement(e){var target=e.target;var $el=$(target);if(!($el.is("[type=submit],[type=image]"))){var t=$el.closest('[type=submit]');if(t.length===0){return;}
target=t[0];}
var form=this;form.clk=target;if(target.type=='image'){if(e.offsetX!==undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop;}}
setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},100);}
$.fn.ajaxFormUnbind=function(){return this.unbind('submit.form-plugin click.form-plugin');};$.fn.formToArray=function(semantic,elements){var a=[];if(this.length===0){return a;}
var form=this[0];var formId=this.attr('id');var els=semantic?form.getElementsByTagName('*'):form.elements;var els2;if(els&&!/MSIE [678]/.test(navigator.userAgent)){els=$(els).get();}
if(formId){els2=$(':input[form="'+formId+'"]').get();if(els2.length){els=(els||[]).concat(els2);}}
if(!els||!els.length){return a;}
var i,j,n,v,el,max,jmax;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n||el.disabled){continue;}
if(semantic&&form.clk&&el.type=="image"){if(form.clk==el){a.push({name:n,value:$(el).val(),type:el.type});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}
continue;}
v=$.fieldValue(el,true);if(v&&v.constructor==Array){if(elements){elements.push(el);}
for(j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]});}}
else if(feature.fileapi&&el.type=='file'){if(elements){elements.push(el);}
var files=el.files;if(files.length){for(j=0;j<files.length;j++){a.push({name:n,value:files[j],type:el.type});}}
else{a.push({name:n,value:'',type:el.type});}}
else if(v!==null&&typeof v!='undefined'){if(elements){elements.push(el);}
a.push({name:n,value:v,type:el.type,required:el.required});}}
if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0];n=input.name;if(n&&!input.disabled&&input.type=='image'){a.push({name:n,value:$input.val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}}
return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n){return;}
var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}
else if(v!==null&&typeof v!='undefined'){a.push({name:this.name,value:v});}});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length)){continue;}
if(v.constructor==Array){$.merge(val,v);}
else{val.push(v);}}
return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(successful===undefined){successful=true;}
if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1)){return null;}
if(tag=='select'){var index=el.selectedIndex;if(index<0){return null;}
var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v){v=(op.attributes&&op.attributes.value&&!(op.attributes.value.specified))?op.text:op.value;}
if(one){return v;}
a.push(v);}}
return a;}
return $(el).val();};$.fn.clearForm=function(includeHidden){return this.each(function(){$('input,select,textarea',this).clearFields(includeHidden);});};$.fn.clearFields=$.fn.clearInputs=function(includeHidden){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(re.test(t)||tag=='textarea'){this.value='';}
else if(t=='checkbox'||t=='radio'){this.checked=false;}
else if(tag=='select'){this.selectedIndex=-1;}
else if(t=="file"){if(/MSIE/.test(navigator.userAgent)){$(this).replaceWith($(this).clone(true));}else{$(this).val('');}}
else if(includeHidden){if((includeHidden===true&&/hidden/.test(t))||(typeof includeHidden=='string'&&$(this).is(includeHidden))){this.value='';}}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(b){if(b===undefined){b=true;}
return this.each(function(){this.disabled=!b;});};$.fn.selected=function(select){if(select===undefined){select=true;}
return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio'){this.checked=select;}
else if(this.tagName.toLowerCase()=='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type=='select-one'){$sel.find('option').selected(false);}
this.selected=select;}});};$.fn.ajaxSubmit.debug=false;function log(){if(!$.fn.ajaxSubmit.debug){return;}
var msg='[jquery.form] '+Array.prototype.join.call(arguments,'');if(window.console&&window.console.log){window.console.log(msg);}
else if(window.opera&&window.opera.postError){window.opera.postError(msg);}}}));;

/* /web/static/lib/jquery.ba-bbq/jquery.ba-bbq.js defined in bundle 'web.assets_common' */
(function($,window){'$:nomunge';var undefined,aps=Array.prototype.slice,decode=decodeURIComponent,jq_param=$.param,jq_param_sorted,jq_param_fragment,jq_deparam,jq_deparam_fragment,jq_bbq=$.bbq=$.bbq||{},jq_bbq_pushState,jq_bbq_getState,jq_elemUrlAttr,special=$.event.special,str_hashchange='hashchange',str_querystring='querystring',str_fragment='fragment',str_elemUrlAttr='elemUrlAttr',str_href='href',str_src='src',re_params_querystring=/^.*\?|#.*$/g,re_params_fragment,re_fragment,re_no_escape,ajax_crawlable,fragment_prefix,elemUrlAttr_cache={};function is_string(arg){return typeof arg==='string';};function curry(func){var args=aps.call(arguments,1);return function(){return func.apply(this,args.concat(aps.call(arguments)));};};function get_fragment(url){return url.replace(re_fragment,'$2');};function get_querystring(url){return url.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,'$1');};function jq_param_sub(is_fragment,get_func,url,params,merge_mode){var result,qs,matches,url_params,hash;if(params!==undefined){matches=url.match(is_fragment?re_fragment:/^([^#?]*)\??([^#]*)(#?.*)/);hash=matches[3]||'';if(merge_mode===2&&is_string(params)){qs=params.replace(is_fragment?re_params_fragment:re_params_querystring,'');}else{url_params=jq_deparam(matches[2]);params=is_string(params)?jq_deparam[is_fragment?str_fragment:str_querystring](params):params;qs=merge_mode===2?params:merge_mode===1?$.extend({},params,url_params):$.extend({},url_params,params);qs=jq_param_sorted(qs);if(is_fragment){qs=qs.replace(re_no_escape,decode);}}
result=matches[1]+(is_fragment?fragment_prefix:qs||!matches[1]?'?':'')+qs+hash;}else{result=get_func(url!==undefined?url:location.href);}
return result;};jq_param[str_querystring]=curry(jq_param_sub,0,get_querystring);jq_param[str_fragment]=jq_param_fragment=curry(jq_param_sub,1,get_fragment);jq_param.sorted=jq_param_sorted=function(a,traditional){var arr=[],obj={};$.each(jq_param(a,traditional).split('&'),function(i,v){var key=v.replace(/(?:%5B|=).*$/,''),key_obj=obj[key];if(!key_obj){key_obj=obj[key]=[];arr.push(key);}
key_obj.push(v);});return $.map(arr.sort(),function(v){return obj[v];}).join('&');};jq_param_fragment.noEscape=function(chars){chars=chars||'';var arr=$.map(chars.split(''),encodeURIComponent);re_no_escape=new RegExp(arr.join('|'),'g');};jq_param_fragment.noEscape(',/');jq_param_fragment.ajaxCrawlable=function(state){if(state!==undefined){if(state){re_params_fragment=/^.*(?:#!|#)/;re_fragment=/^([^#]*)(?:#!|#)?(.*)$/;fragment_prefix='#!';}else{re_params_fragment=/^.*#/;re_fragment=/^([^#]*)#?(.*)$/;fragment_prefix='#';}
ajax_crawlable=!!state;}
return ajax_crawlable;};jq_param_fragment.ajaxCrawlable(0);$.deparam=jq_deparam=function(params,coerce){var obj={},coerce_types={'true':!0,'false':!1,'null':null};$.each(params.replace(/\+/g,' ').split('&'),function(j,v){var param=v.split('='),key=decode(param[0]),val,cur=obj,i=0,keys=key.split(']['),keys_last=keys.length-1;if(/\[/.test(keys[0])&&/\]$/.test(keys[keys_last])){keys[keys_last]=keys[keys_last].replace(/\]$/,'');keys=keys.shift().split('[').concat(keys);keys_last=keys.length-1;}else{keys_last=0;}
if(param.length===2){val=decode(param[1]);if(coerce){val=val&&!isNaN(val)?+val:val==='undefined'?undefined:coerce_types[val]!==undefined?coerce_types[val]:val;}
if(keys_last){for(;i<=keys_last;i++){key=keys[i]===''?cur.length:keys[i];cur=cur[key]=i<keys_last?cur[key]||(keys[i+1]&&isNaN(keys[i+1])?{}:[]):val;}}else{if($.isArray(obj[key])){obj[key].push(val);}else if(obj[key]!==undefined){obj[key]=[obj[key],val];}else{obj[key]=val;}}}else if(key){obj[key]=coerce?undefined:'';}});return obj;};function jq_deparam_sub(is_fragment,url_or_params,coerce){if(url_or_params===undefined||typeof url_or_params==='boolean'){coerce=url_or_params;url_or_params=jq_param[is_fragment?str_fragment:str_querystring]();}else{url_or_params=is_string(url_or_params)?url_or_params.replace(is_fragment?re_params_fragment:re_params_querystring,''):url_or_params;}
return jq_deparam(url_or_params,coerce);};jq_deparam[str_querystring]=curry(jq_deparam_sub,0);jq_deparam[str_fragment]=jq_deparam_fragment=curry(jq_deparam_sub,1);$[str_elemUrlAttr]||($[str_elemUrlAttr]=function(obj){return $.extend(elemUrlAttr_cache,obj);})({a:str_href,base:str_href,iframe:str_src,img:str_src,input:str_src,form:'action',link:str_href,script:str_src});jq_elemUrlAttr=$[str_elemUrlAttr];function jq_fn_sub(mode,force_attr,params,merge_mode){if(!is_string(params)&&typeof params!=='object'){merge_mode=params;params=force_attr;force_attr=undefined;}
return this.each(function(){var that=$(this),attr=force_attr||jq_elemUrlAttr()[(this.nodeName||'').toLowerCase()]||'',url=attr&&that.attr(attr)||'';that.attr(attr,jq_param[mode](url,params,merge_mode));});};$.fn[str_querystring]=curry(jq_fn_sub,str_querystring);$.fn[str_fragment]=curry(jq_fn_sub,str_fragment);jq_bbq.pushState=jq_bbq_pushState=function(params,merge_mode){if(is_string(params)&&/^#/.test(params)&&merge_mode===undefined){merge_mode=2;}
var has_args=params!==undefined,url=jq_param_fragment(location.href,has_args?params:{},has_args?merge_mode:2);location.href=url;};jq_bbq.getState=jq_bbq_getState=function(key,coerce){return key===undefined||typeof key==='boolean'?jq_deparam_fragment(key):jq_deparam_fragment(coerce)[key];};jq_bbq.removeState=function(arr){var state={};if(arr!==undefined){state=jq_bbq_getState();$.each($.isArray(arr)?arr:arguments,function(i,v){delete state[v];});}
jq_bbq_pushState(state,2);};special[str_hashchange]=$.extend(special[str_hashchange],{add:function(handleObj){var old_handler;function new_handler(e){var hash=e[str_fragment]=jq_param_fragment();e.getState=function(key,coerce){return key===undefined||typeof key==='boolean'?jq_deparam(hash,key):jq_deparam(hash,coerce)[key];};old_handler.apply(this,arguments);};if($.isFunction(handleObj)){old_handler=handleObj;return new_handler;}else{old_handler=handleObj.handler;handleObj.handler=new_handler;}}});})(jQuery,this);(function($,window,undefined){'$:nomunge';var str_hashchange='hashchange',doc=document,fake_onhashchange,special=$.event.special,doc_mode=doc.documentMode,supports_onhashchange='on'+str_hashchange in window&&(doc_mode===undefined||doc_mode>7);function get_fragment(url){url=url||location.href;return'#'+url.replace(/^[^#]*#?(.*)$/,'$1');};$.fn[str_hashchange]=function(fn){return fn?this.bind(str_hashchange,fn):this.trigger(str_hashchange);};$.fn[str_hashchange].delay=50;special[str_hashchange]=$.extend(special[str_hashchange],{setup:function(){if(supports_onhashchange){return false;}
$(fake_onhashchange.start);},teardown:function(){if(supports_onhashchange){return false;}
$(fake_onhashchange.stop);}});fake_onhashchange=(function(){var self={},timeout_id,last_hash=get_fragment(),fn_retval=function(val){return val;},history_set=fn_retval,history_get=fn_retval;self.start=function(){timeout_id||poll();};self.stop=function(){timeout_id&&clearTimeout(timeout_id);timeout_id=undefined;};function poll(){var hash=get_fragment(),history_hash=history_get(last_hash);if(hash!==last_hash){history_set(last_hash=hash,history_hash);$(window).trigger(str_hashchange);}else if(history_hash!==last_hash){location.href=location.href.replace(/#.*/,'')+history_hash;}
timeout_id=setTimeout(poll,$.fn[str_hashchange].delay);};$.browser.msie&&!supports_onhashchange&&(function(){var iframe,iframe_src;self.start=function(){if(!iframe){iframe_src=$.fn[str_hashchange].src;iframe_src=iframe_src&&iframe_src+get_fragment();iframe=$('<iframe tabindex="-1" title="empty"/>').hide().one('load',function(){iframe_src||history_set(get_fragment());poll();}).attr('src',iframe_src||'javascript:0').insertAfter('body')[0].contentWindow;doc.onpropertychange=function(){try{if(event.propertyName==='title'){iframe.document.title=doc.title;}}catch(e){}};}};self.stop=fn_retval;history_get=function(){return get_fragment(iframe.location.href);};history_set=function(hash,history_hash){var iframe_doc=iframe.document,domain=$.fn[str_hashchange].domain;if(hash!==history_hash){iframe_doc.title=doc.title;iframe_doc.open();domain&&iframe_doc.write('<script>document.domain="'+domain+'"</script>');iframe_doc.close();iframe.location.hash=hash;}};})();return self;})();})(jQuery,this);;

/* /web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js defined in bundle 'web.assets_common' */
(function(factory){"use strict";if(typeof define==="function"&&define.amd){define(["jquery","jquery-ui/sortable"],factory);}else{factory(window.jQuery);}}(function($){"use strict";function isOverAxis(x,reference,size){return(x>reference)&&(x<(reference+size));}
$.widget("mjs.nestedSortable",$.extend({},$.ui.sortable.prototype,{options:{disableParentChange:false,doNotClear:false,expandOnHover:700,isAllowed:function(){return true;},isTree:false,listType:"ol",maxLevels:0,protectRoot:false,rootID:null,rtl:false,startCollapsed:false,tabSize:20,branchClass:"mjs-nestedSortable-branch",collapsedClass:"mjs-nestedSortable-collapsed",disableNestingClass:"mjs-nestedSortable-no-nesting",errorClass:"mjs-nestedSortable-error",expandedClass:"mjs-nestedSortable-expanded",hoveringClass:"mjs-nestedSortable-hovering",leafClass:"mjs-nestedSortable-leaf",disabledClass:"mjs-nestedSortable-disabled"},_create:function(){var self=this,err;this.element.data("ui-sortable",this.element.data("mjs-nestedSortable"));if(!this.element.is(this.options.listType)){err="nestedSortable: "+"Please check that the listType option is set to your actual list type";throw new Error(err);}
if(this.options.isTree&&this.options.expandOnHover){this.options.tolerance="intersect";}
$.ui.sortable.prototype._create.apply(this,arguments);if(this.options.isTree){$(this.items).each(function(){var $li=this.item,hasCollapsedClass=$li.hasClass(self.options.collapsedClass),hasExpandedClass=$li.hasClass(self.options.expandedClass);if($li.children(self.options.listType).length){$li.addClass(self.options.branchClass);if(!hasCollapsedClass&&!hasExpandedClass){if(self.options.startCollapsed){$li.addClass(self.options.collapsedClass);}else{$li.addClass(self.options.expandedClass);}}}else{$li.addClass(self.options.leafClass);}});}},_destroy:function(){this.element.removeData("mjs-nestedSortable").removeData("ui-sortable");return $.ui.sortable.prototype._destroy.apply(this,arguments);},_mouseDrag:function(event){var i,item,itemElement,intersection,self=this,o=this.options,scrolled=false,$document=$(document),previousTopOffset,parentItem,level,childLevels,itemAfter,itemBefore,newList,method,a,previousItem,nextItem,helperIsNotSibling;this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs;}
if(this.options.scroll){if(this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"){if((this.overflowOffset.top+
this.scrollParent[0].offsetHeight)-
event.pageY<o.scrollSensitivity){scrolled=this.scrollParent.scrollTop()+o.scrollSpeed;this.scrollParent.scrollTop(scrolled);}else if(event.pageY-
this.overflowOffset.top<o.scrollSensitivity){scrolled=this.scrollParent.scrollTop()-o.scrollSpeed;this.scrollParent.scrollTop(scrolled);}
if((this.overflowOffset.left+
this.scrollParent[0].offsetWidth)-
event.pageX<o.scrollSensitivity){scrolled=this.scrollParent.scrollLeft()+o.scrollSpeed;this.scrollParent.scrollLeft(scrolled);}else if(event.pageX-
this.overflowOffset.left<o.scrollSensitivity){scrolled=this.scrollParent.scrollLeft()-o.scrollSpeed;this.scrollParent.scrollLeft(scrolled);}}else{if(event.pageY-
$document.scrollTop()<o.scrollSensitivity){scrolled=$document.scrollTop()-o.scrollSpeed;$document.scrollTop(scrolled);}else if($(window).height()-
(event.pageY-
$document.scrollTop())<o.scrollSensitivity){scrolled=$document.scrollTop()+o.scrollSpeed;$document.scrollTop(scrolled);}
if(event.pageX-
$document.scrollLeft()<o.scrollSensitivity){scrolled=$document.scrollLeft()-o.scrollSpeed;$document.scrollLeft(scrolled);}else if($(window).width()-
(event.pageX-
$document.scrollLeft())<o.scrollSensitivity){scrolled=$document.scrollLeft()+o.scrollSpeed;$document.scrollLeft(scrolled);}}
if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event);}}
this.positionAbs=this._convertPositionTo("absolute");previousTopOffset=this.placeholder.offset().top;if(!this.options.axis||this.options.axis!=="y"){this.helper[0].style.left=this.position.left+"px";}
if(!this.options.axis||this.options.axis!=="x"){this.helper[0].style.top=(this.position.top)+"px";}
this.hovering=this.hovering?this.hovering:null;this.mouseentered=this.mouseentered?this.mouseentered:false;(function(){var _parentItem=this.placeholder.parent().parent();if(_parentItem&&_parentItem.closest(".ui-sortable").length){parentItem=_parentItem;}}.call(this));level=this._getLevel(this.placeholder);childLevels=this._getChildLevels(this.helper);newList=document.createElement(o.listType);for(i=this.items.length-1;i>=0;i--){item=this.items[i];itemElement=item.item[0];intersection=this._intersectsWithPointer(item);if(!intersection){continue;}
if(item.instance!==this.currentContainer){continue;}
if(itemElement.className.indexOf(o.disabledClass)!==-1){if(intersection===2){itemAfter=this.items[i+1];if(itemAfter&&itemAfter.item.hasClass(o.disabledClass)){continue;}}else if(intersection===1){itemBefore=this.items[i-1];if(itemBefore&&itemBefore.item.hasClass(o.disabledClass)){continue;}}}
method=intersection===1?"next":"prev";if(itemElement!==this.currentItem[0]&&this.placeholder[method]()[0]!==itemElement&&!$.contains(this.placeholder[0],itemElement)&&(this.options.type==="semi-dynamic"?!$.contains(this.element[0],itemElement):true)){if(!this.mouseentered){$(itemElement).mouseenter();this.mouseentered=true;}
if(o.isTree&&$(itemElement).hasClass(o.collapsedClass)&&o.expandOnHover){if(!this.hovering){$(itemElement).addClass(o.hoveringClass);this.hovering=window.setTimeout(function(){$(itemElement).removeClass(o.collapsedClass).addClass(o.expandedClass);self.refreshPositions();self._trigger("expand",event,self._uiHash());},o.expandOnHover);}}
this.direction=intersection===1?"down":"up";if(this.options.tolerance==="pointer"||this._intersectsWithSides(item)){$(itemElement).mouseleave();this.mouseentered=false;$(itemElement).removeClass(o.hoveringClass);if(this.hovering){window.clearTimeout(this.hovering);}
this.hovering=null;if(o.protectRoot&&!(this.currentItem[0].parentNode===this.element[0]&&itemElement.parentNode!==this.element[0])){if(this.currentItem[0].parentNode!==this.element[0]&&itemElement.parentNode===this.element[0]){if(!$(itemElement).children(o.listType).length){itemElement.appendChild(newList);if(o.isTree){$(itemElement).removeClass(o.leafClass).addClass(o.branchClass+" "+o.expandedClass);}}
if(this.direction==="down"){a=$(itemElement).prev().children(o.listType);}else{a=$(itemElement).children(o.listType);}
if(a[0]!==undefined){this._rearrange(event,null,a);}}else{this._rearrange(event,item);}}else if(!o.protectRoot){this._rearrange(event,item);}}else{break;}
this._clearEmpty(itemElement);this._trigger("change",event,this._uiHash());break;}}
(function(){var _previousItem=this.placeholder.prev();if(_previousItem.length){previousItem=_previousItem;}else{previousItem=null;}}.call(this));if(previousItem!=null){while(previousItem[0].nodeName.toLowerCase()!=="li"||previousItem[0].className.indexOf(o.disabledClass)!==-1||previousItem[0]===this.currentItem[0]||previousItem[0]===this.helper[0]){if(previousItem[0].previousSibling){previousItem=$(previousItem[0].previousSibling);}else{previousItem=null;break;}}}
(function(){var _nextItem=this.placeholder.next();if(_nextItem.length){nextItem=_nextItem;}else{nextItem=null;}}.call(this));if(nextItem!=null){while(nextItem[0].nodeName.toLowerCase()!=="li"||nextItem[0].className.indexOf(o.disabledClass)!==-1||nextItem[0]===this.currentItem[0]||nextItem[0]===this.helper[0]){if(nextItem[0].nextSibling){nextItem=$(nextItem[0].nextSibling);}else{nextItem=null;break;}}}
this.beyondMaxLevels=0;if(parentItem!=null&&nextItem==null&&!(o.protectRoot&&parentItem[0].parentNode==this.element[0])&&(o.rtl&&(this.positionAbs.left+
this.helper.outerWidth()>parentItem.offset().left+
parentItem.outerWidth())||!o.rtl&&(this.positionAbs.left<parentItem.offset().left))){parentItem.after(this.placeholder[0]);helperIsNotSibling=!parentItem.children(o.listItem).children("li:visible:not(.ui-sortable-helper)").length;if(o.isTree&&helperIsNotSibling){parentItem.removeClass(this.options.branchClass+" "+this.options.expandedClass).addClass(this.options.leafClass);}
if(typeof parentItem!=='undefined')
this._clearEmpty(parentItem[0]);this._trigger("change",event,this._uiHash());}else if(previousItem!=null&&!previousItem.hasClass(o.disableNestingClass)&&(previousItem.children(o.listType).length&&previousItem.children(o.listType).is(":visible")||!previousItem.children(o.listType).length)&&!(o.protectRoot&&this.currentItem[0].parentNode===this.element[0])&&(o.rtl&&(this.positionAbs.left+
this.helper.outerWidth()<previousItem.offset().left+
previousItem.outerWidth()-
o.tabSize)||!o.rtl&&(this.positionAbs.left>previousItem.offset().left+o.tabSize))){this._isAllowed(previousItem,level,level+childLevels+1);if(!previousItem.children(o.listType).length){previousItem[0].appendChild(newList);if(o.isTree){previousItem.removeClass(o.leafClass).addClass(o.branchClass+" "+o.expandedClass);}}
if(previousTopOffset&&(previousTopOffset<=previousItem.offset().top)){previousItem.children(o.listType).prepend(this.placeholder);}else{previousItem.children(o.listType)[0].appendChild(this.placeholder[0]);}
if(typeof parentItem!=='undefined')
this._clearEmpty(parentItem[0]);this._trigger("change",event,this._uiHash());}else{this._isAllowed(parentItem,level,level+childLevels);}
this._contactContainers(event);if($.ui.ddmanager){$.ui.ddmanager.drag(this,event);}
this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false;},_mouseStop:function(event){if(this.beyondMaxLevels){this.placeholder.removeClass(this.options.errorClass);if(this.domPosition.prev){$(this.domPosition.prev).after(this.placeholder);}else{$(this.domPosition.parent).prepend(this.placeholder);}
this._trigger("revert",event,this._uiHash());}
$("."+this.options.hoveringClass).mouseleave().removeClass(this.options.hoveringClass);this.mouseentered=false;if(this.hovering){window.clearTimeout(this.hovering);}
this.hovering=null;this._relocate_event=event;this._pid_current=$(this.domPosition.parent).parent().attr("id");this._sort_current=this.domPosition.prev?$(this.domPosition.prev).next().index():0;$.ui.sortable.prototype._mouseStop.apply(this,arguments);},_intersectsWithSides:function(item){var half=this.options.isTree?.8:.5,isOverBottomHalf=isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+(item.height*half),item.height),isOverTopHalf=isOverAxis(this.positionAbs.top+this.offset.click.top,item.top-(item.height*half),item.height),isOverRightHalf=isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+(item.width/2),item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection){return((horizontalDirection==="right"&&isOverRightHalf)||(horizontalDirection==="left"&&!isOverRightHalf));}else{return verticalDirection&&((verticalDirection==="down"&&isOverBottomHalf)||(verticalDirection==="up"&&isOverTopHalf));}},_contactContainers:function(){if(this.options.protectRoot&&this.currentItem[0].parentNode===this.element[0]){return;}
$.ui.sortable.prototype._contactContainers.apply(this,arguments);},_clear:function(){var i,item;$.ui.sortable.prototype._clear.apply(this,arguments);if(!(this._pid_current===this._uiHash().item.parent().parent().attr("id")&&this._sort_current===this._uiHash().item.index())){this._trigger("relocate",this._relocate_event,this._uiHash());}
for(i=this.items.length-1;i>=0;i--){item=this.items[i].item[0];this._clearEmpty(item);}},serialize:function(options){var o=$.extend({},this.options,options),items=this._getItemsAsjQuery(o&&o.connected),str=[];$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[-=_](.+)/)),pid=($(o.item||this).parent(o.listType).parent(o.items).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[-=_](.+)/));if(res){str.push(((o.key||res[1])+"["+
(o.key&&o.expression?res[1]:res[2])+"]")+"="+
(pid?(o.key&&o.expression?pid[1]:pid[2]):o.rootID));}});if(!str.length&&o.key){str.push(o.key+"=");}
return str.join("&");},toHierarchy:function(options){var o=$.extend({},this.options,options),ret=[];$(this.element).children(o.items).each(function(){var level=_recursiveItems(this);ret.push(level);});return ret;function _recursiveItems(item){var id=($(item).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[-=_](.+)/)),currentItem;var data=$(item).data();if(data.nestedSortableItem){delete data.nestedSortableItem;}
if(id){currentItem={"id":id[2]};currentItem=$.extend({},currentItem,data);if($(item).children(o.listType).children(o.items).length>0){currentItem.children=[];$(item).children(o.listType).children(o.items).each(function(){var level=_recursiveItems(this);currentItem.children.push(level);});}
return currentItem;}}},toArray:function(options){var o=$.extend({},this.options,options),sDepth=o.startDepthCount||0,ret=[],left=1;if(!o.excludeRoot){ret.push({"item_id":o.rootID,"parent_id":null,"depth":sDepth,"left":left,"right":($(o.items,this.element).length+1)*2});left++;}
$(this.element).children(o.items).each(function(){left=_recursiveArray(this,sDepth,left);});ret=ret.sort(function(a,b){return(a.left-b.left);});return ret;function _recursiveArray(item,depth,_left){var right=_left+1,id,pid,parentItem;if($(item).children(o.listType).children(o.items).length>0){depth++;$(item).children(o.listType).children(o.items).each(function(){right=_recursiveArray($(this),depth,right);});depth--;}
id=($(item).attr(o.attribute||"id")).match(o.expression||(/(.+)[-=_](.+)/));if(depth===sDepth){pid=o.rootID;}else{parentItem=($(item).parent(o.listType).parent(o.items).attr(o.attribute||"id")).match(o.expression||(/(.+)[-=_](.+)/));pid=parentItem[2];}
if(id){var data=$(item).children('div').data();var itemObj=$.extend(data,{"id":id[2],"parent_id":pid,"depth":depth,"left":_left,"right":right});ret.push(itemObj);}
_left=right+1;return _left;}},_clearEmpty:function(item){function replaceClass(elem,search,replace,swap){if(swap){search=[replace,replace=search][0];}
$(elem).removeClass(search).addClass(replace);}
var o=this.options,childrenList=$(item).children(o.listType),hasChildren=childrenList.has('li').length;var doNotClear=o.doNotClear||hasChildren||o.protectRoot&&$(item)[0]===this.element[0];if(o.isTree){replaceClass(item,o.branchClass,o.leafClass,doNotClear);}
if(!doNotClear){childrenList.parent().removeClass(o.expandedClass);childrenList.remove();}},_getLevel:function(item){var level=1,list;if(this.options.listType){list=item.closest(this.options.listType);while(list&&list.length>0&&!list.is(".ui-sortable")){level++;list=list.parent().closest(this.options.listType);}}
return level;},_getChildLevels:function(parent,depth){var self=this,o=this.options,result=0;depth=depth||0;$(parent).children(o.listType).children(o.items).each(function(index,child){result=Math.max(self._getChildLevels(child,depth+1),result);});return depth?result+1:result;},_isAllowed:function(parentItem,level,levels){var o=this.options,maxLevels=this.placeholder.closest(".ui-sortable").nestedSortable("option","maxLevels"),oldParent=this.currentItem.parent().parent(),disabledByParentchange=o.disableParentChange&&(typeof parentItem!=='undefined'&&!oldParent.is(parentItem)||typeof parentItem==='undefined'&&oldParent.is("li"));if(disabledByParentchange||!o.isAllowed(this.placeholder,parentItem,this.currentItem)){this.placeholder.addClass(o.errorClass);if(maxLevels<levels&&maxLevels!==0){this.beyondMaxLevels=levels-maxLevels;}else{this.beyondMaxLevels=1;}}else{if(maxLevels<levels&&maxLevels!==0){this.placeholder.addClass(o.errorClass);this.beyondMaxLevels=levels-maxLevels;}else{this.placeholder.removeClass(o.errorClass);this.beyondMaxLevels=0;}}}}));$.mjs.nestedSortable.prototype.options=$.extend({},$.ui.sortable.prototype.options,$.mjs.nestedSortable.prototype.options);}));;

/* /web/static/lib/popper/popper.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global.Popper=factory());}(this,(function(){'use strict';var isBrowser=typeof window!=='undefined'&&typeof document!=='undefined';var longerTimeoutBrowsers=['Edge','Trident','Firefox'];var timeoutDuration=0;for(var i=0;i<longerTimeoutBrowsers.length;i+=1){if(isBrowser&&navigator.userAgent.indexOf(longerTimeoutBrowsers[i])>=0){timeoutDuration=1;break;}}
function microtaskDebounce(fn){var called=false;return function(){if(called){return;}
called=true;window.Promise.resolve().then(function(){called=false;fn();});};}
function taskDebounce(fn){var scheduled=false;return function(){if(!scheduled){scheduled=true;setTimeout(function(){scheduled=false;fn();},timeoutDuration);}};}
var supportsMicroTasks=isBrowser&&window.Promise;var debounce=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction(functionToCheck){var getType={};return functionToCheck&&getType.toString.call(functionToCheck)==='[object Function]';}
function getStyleComputedProperty(element,property){if(element.nodeType!==1){return[];}
var css=getComputedStyle(element,null);return property?css[property]:css;}
function getParentNode(element){if(element.nodeName==='HTML'){return element;}
return element.parentNode||element.host;}
function getScrollParent(element){if(!element){return document.body;}
switch(element.nodeName){case'HTML':case'BODY':return element.ownerDocument.body;case'#document':return element.body;}
var _getStyleComputedProp=getStyleComputedProperty(element),overflow=_getStyleComputedProp.overflow,overflowX=_getStyleComputedProp.overflowX,overflowY=_getStyleComputedProp.overflowY;if(/(auto|scroll|overlay)/.test(overflow+overflowY+overflowX)){return element;}
return getScrollParent(getParentNode(element));}
var isIE11=isBrowser&&!!(window.MSInputMethodContext&&document.documentMode);var isIE10=isBrowser&&/MSIE 10/.test(navigator.userAgent);function isIE(version){if(version===11){return isIE11;}
if(version===10){return isIE10;}
return isIE11||isIE10;}
function getOffsetParent(element){if(!element){return document.documentElement;}
var noOffsetParent=isIE(10)?document.body:null;var offsetParent=element.offsetParent;while(offsetParent===noOffsetParent&&element.nextElementSibling){offsetParent=(element=element.nextElementSibling).offsetParent;}
var nodeName=offsetParent&&offsetParent.nodeName;if(!nodeName||nodeName==='BODY'||nodeName==='HTML'){return element?element.ownerDocument.documentElement:document.documentElement;}
if(['TD','TABLE'].indexOf(offsetParent.nodeName)!==-1&&getStyleComputedProperty(offsetParent,'position')==='static'){return getOffsetParent(offsetParent);}
return offsetParent;}
function isOffsetContainer(element){var nodeName=element.nodeName;if(nodeName==='BODY'){return false;}
return nodeName==='HTML'||getOffsetParent(element.firstElementChild)===element;}
function getRoot(node){if(node.parentNode!==null){return getRoot(node.parentNode);}
return node;}
function findCommonOffsetParent(element1,element2){if(!element1||!element1.nodeType||!element2||!element2.nodeType){return document.documentElement;}
var order=element1.compareDocumentPosition(element2)&Node.DOCUMENT_POSITION_FOLLOWING;var start=order?element1:element2;var end=order?element2:element1;var range=document.createRange();range.setStart(start,0);range.setEnd(end,0);var commonAncestorContainer=range.commonAncestorContainer;if(element1!==commonAncestorContainer&&element2!==commonAncestorContainer||start.contains(end)){if(isOffsetContainer(commonAncestorContainer)){return commonAncestorContainer;}
return getOffsetParent(commonAncestorContainer);}
var element1root=getRoot(element1);if(element1root.host){return findCommonOffsetParent(element1root.host,element2);}else{return findCommonOffsetParent(element1,getRoot(element2).host);}}
function getScroll(element){var side=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'top';var upperSide=side==='top'?'scrollTop':'scrollLeft';var nodeName=element.nodeName;if(nodeName==='BODY'||nodeName==='HTML'){var html=element.ownerDocument.documentElement;var scrollingElement=element.ownerDocument.scrollingElement||html;return scrollingElement[upperSide];}
return element[upperSide];}
function includeScroll(rect,element){var subtract=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var scrollTop=getScroll(element,'top');var scrollLeft=getScroll(element,'left');var modifier=subtract?-1:1;rect.top+=scrollTop*modifier;rect.bottom+=scrollTop*modifier;rect.left+=scrollLeft*modifier;rect.right+=scrollLeft*modifier;return rect;}
function getBordersSize(styles,axis){var sideA=axis==='x'?'Left':'Top';var sideB=sideA==='Left'?'Right':'Bottom';return parseFloat(styles['border'+sideA+'Width'],10)+parseFloat(styles['border'+sideB+'Width'],10);}
function getSize(axis,body,html,computedStyle){return Math.max(body['offset'+axis],body['scroll'+axis],html['client'+axis],html['offset'+axis],html['scroll'+axis],isIE(10)?html['offset'+axis]+computedStyle['margin'+(axis==='Height'?'Top':'Left')]+computedStyle['margin'+(axis==='Height'?'Bottom':'Right')]:0);}
function getWindowSizes(){var body=document.body;var html=document.documentElement;var computedStyle=isIE(10)&&getComputedStyle(html);return{height:getSize('Height',body,html,computedStyle),width:getSize('Width',body,html,computedStyle)};}
var classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}};var createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var defineProperty=function(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}
return obj;};var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}
return target;};function getClientRect(offsets){return _extends({},offsets,{right:offsets.left+offsets.width,bottom:offsets.top+offsets.height});}
function getBoundingClientRect(element){var rect={};try{if(isIE(10)){rect=element.getBoundingClientRect();var scrollTop=getScroll(element,'top');var scrollLeft=getScroll(element,'left');rect.top+=scrollTop;rect.left+=scrollLeft;rect.bottom+=scrollTop;rect.right+=scrollLeft;}else{rect=element.getBoundingClientRect();}}catch(e){}
var result={left:rect.left,top:rect.top,width:rect.right-rect.left,height:rect.bottom-rect.top};var sizes=element.nodeName==='HTML'?getWindowSizes():{};var width=sizes.width||element.clientWidth||result.right-result.left;var height=sizes.height||element.clientHeight||result.bottom-result.top;var horizScrollbar=element.offsetWidth-width;var vertScrollbar=element.offsetHeight-height;if(horizScrollbar||vertScrollbar){var styles=getStyleComputedProperty(element);horizScrollbar-=getBordersSize(styles,'x');vertScrollbar-=getBordersSize(styles,'y');result.width-=horizScrollbar;result.height-=vertScrollbar;}
return getClientRect(result);}
function getOffsetRectRelativeToArbitraryNode(children,parent){var fixedPosition=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var isIE10=isIE(10);var isHTML=parent.nodeName==='HTML';var childrenRect=getBoundingClientRect(children);var parentRect=getBoundingClientRect(parent);var scrollParent=getScrollParent(children);var styles=getStyleComputedProperty(parent);var borderTopWidth=parseFloat(styles.borderTopWidth,10);var borderLeftWidth=parseFloat(styles.borderLeftWidth,10);if(fixedPosition&&parent.nodeName==='HTML'){parentRect.top=Math.max(parentRect.top,0);parentRect.left=Math.max(parentRect.left,0);}
var offsets=getClientRect({top:childrenRect.top-parentRect.top-borderTopWidth,left:childrenRect.left-parentRect.left-borderLeftWidth,width:childrenRect.width,height:childrenRect.height});offsets.marginTop=0;offsets.marginLeft=0;if(!isIE10&&isHTML){var marginTop=parseFloat(styles.marginTop,10);var marginLeft=parseFloat(styles.marginLeft,10);offsets.top-=borderTopWidth-marginTop;offsets.bottom-=borderTopWidth-marginTop;offsets.left-=borderLeftWidth-marginLeft;offsets.right-=borderLeftWidth-marginLeft;offsets.marginTop=marginTop;offsets.marginLeft=marginLeft;}
if(isIE10&&!fixedPosition?parent.contains(scrollParent):parent===scrollParent&&scrollParent.nodeName!=='BODY'){offsets=includeScroll(offsets,parent);}
return offsets;}
function getViewportOffsetRectRelativeToArtbitraryNode(element){var excludeScroll=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var html=element.ownerDocument.documentElement;var relativeOffset=getOffsetRectRelativeToArbitraryNode(element,html);var width=Math.max(html.clientWidth,window.innerWidth||0);var height=Math.max(html.clientHeight,window.innerHeight||0);var scrollTop=!excludeScroll?getScroll(html):0;var scrollLeft=!excludeScroll?getScroll(html,'left'):0;var offset={top:scrollTop-relativeOffset.top+relativeOffset.marginTop,left:scrollLeft-relativeOffset.left+relativeOffset.marginLeft,width:width,height:height};return getClientRect(offset);}
function isFixed(element){var nodeName=element.nodeName;if(nodeName==='BODY'||nodeName==='HTML'){return false;}
if(getStyleComputedProperty(element,'position')==='fixed'){return true;}
return isFixed(getParentNode(element));}
function getFixedPositionOffsetParent(element){if(!element||!element.parentElement||isIE()){return document.documentElement;}
var el=element.parentElement;while(el&&getStyleComputedProperty(el,'transform')==='none'){el=el.parentElement;}
return el||document.documentElement;}
function getBoundaries(popper,reference,padding,boundariesElement){var fixedPosition=arguments.length>4&&arguments[4]!==undefined?arguments[4]:false;var boundaries={top:0,left:0};var offsetParent=fixedPosition?getFixedPositionOffsetParent(popper):findCommonOffsetParent(popper,reference);if(boundariesElement==='viewport'){boundaries=getViewportOffsetRectRelativeToArtbitraryNode(offsetParent,fixedPosition);}else{var boundariesNode=void 0;if(boundariesElement==='scrollParent'){boundariesNode=getScrollParent(getParentNode(reference));if(boundariesNode.nodeName==='BODY'){boundariesNode=popper.ownerDocument.documentElement;}}else if(boundariesElement==='window'){boundariesNode=popper.ownerDocument.documentElement;}else{boundariesNode=boundariesElement;}
var offsets=getOffsetRectRelativeToArbitraryNode(boundariesNode,offsetParent,fixedPosition);if(boundariesNode.nodeName==='HTML'&&!isFixed(offsetParent)){var _getWindowSizes=getWindowSizes(),height=_getWindowSizes.height,width=_getWindowSizes.width;boundaries.top+=offsets.top-offsets.marginTop;boundaries.bottom=height+offsets.top;boundaries.left+=offsets.left-offsets.marginLeft;boundaries.right=width+offsets.left;}else{boundaries=offsets;}}
boundaries.left+=padding;boundaries.top+=padding;boundaries.right-=padding;boundaries.bottom-=padding;return boundaries;}
function getArea(_ref){var width=_ref.width,height=_ref.height;return width*height;}
function computeAutoPlacement(placement,refRect,popper,reference,boundariesElement){var padding=arguments.length>5&&arguments[5]!==undefined?arguments[5]:0;if(placement.indexOf('auto')===-1){return placement;}
var boundaries=getBoundaries(popper,reference,padding,boundariesElement);var rects={top:{width:boundaries.width,height:refRect.top-boundaries.top},right:{width:boundaries.right-refRect.right,height:boundaries.height},bottom:{width:boundaries.width,height:boundaries.bottom-refRect.bottom},left:{width:refRect.left-boundaries.left,height:boundaries.height}};var sortedAreas=Object.keys(rects).map(function(key){return _extends({key:key},rects[key],{area:getArea(rects[key])});}).sort(function(a,b){return b.area-a.area;});var filteredAreas=sortedAreas.filter(function(_ref2){var width=_ref2.width,height=_ref2.height;return width>=popper.clientWidth&&height>=popper.clientHeight;});var computedPlacement=filteredAreas.length>0?filteredAreas[0].key:sortedAreas[0].key;var variation=placement.split('-')[1];return computedPlacement+(variation?'-'+variation:'');}
function getReferenceOffsets(state,popper,reference){var fixedPosition=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;var commonOffsetParent=fixedPosition?getFixedPositionOffsetParent(popper):findCommonOffsetParent(popper,reference);return getOffsetRectRelativeToArbitraryNode(reference,commonOffsetParent,fixedPosition);}
function getOuterSizes(element){var styles=getComputedStyle(element);var x=parseFloat(styles.marginTop)+parseFloat(styles.marginBottom);var y=parseFloat(styles.marginLeft)+parseFloat(styles.marginRight);var result={width:element.offsetWidth+y,height:element.offsetHeight+x};return result;}
function getOppositePlacement(placement){var hash={left:'right',right:'left',bottom:'top',top:'bottom'};return placement.replace(/left|right|bottom|top/g,function(matched){return hash[matched];});}
function getPopperOffsets(popper,referenceOffsets,placement){placement=placement.split('-')[0];var popperRect=getOuterSizes(popper);var popperOffsets={width:popperRect.width,height:popperRect.height};var isHoriz=['right','left'].indexOf(placement)!==-1;var mainSide=isHoriz?'top':'left';var secondarySide=isHoriz?'left':'top';var measurement=isHoriz?'height':'width';var secondaryMeasurement=!isHoriz?'height':'width';popperOffsets[mainSide]=referenceOffsets[mainSide]+referenceOffsets[measurement]/2-popperRect[measurement]/2;if(placement===secondarySide){popperOffsets[secondarySide]=referenceOffsets[secondarySide]-popperRect[secondaryMeasurement];}else{popperOffsets[secondarySide]=referenceOffsets[getOppositePlacement(secondarySide)];}
return popperOffsets;}
function find(arr,check){if(Array.prototype.find){return arr.find(check);}
return arr.filter(check)[0];}
function findIndex(arr,prop,value){if(Array.prototype.findIndex){return arr.findIndex(function(cur){return cur[prop]===value;});}
var match=find(arr,function(obj){return obj[prop]===value;});return arr.indexOf(match);}
function runModifiers(modifiers,data,ends){var modifiersToRun=ends===undefined?modifiers:modifiers.slice(0,findIndex(modifiers,'name',ends));modifiersToRun.forEach(function(modifier){if(modifier['function']){console.warn('`modifier.function` is deprecated, use `modifier.fn`!');}
var fn=modifier['function']||modifier.fn;if(modifier.enabled&&isFunction(fn)){data.offsets.popper=getClientRect(data.offsets.popper);data.offsets.reference=getClientRect(data.offsets.reference);data=fn(data,modifier);}});return data;}
function update(){if(this.state.isDestroyed){return;}
var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:false,offsets:{}};data.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed);data.placement=computeAutoPlacement(this.options.placement,data.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding);data.originalPlacement=data.placement;data.positionFixed=this.options.positionFixed;data.offsets.popper=getPopperOffsets(this.popper,data.offsets.reference,data.placement);data.offsets.popper.position=this.options.positionFixed?'fixed':'absolute';data=runModifiers(this.modifiers,data);if(!this.state.isCreated){this.state.isCreated=true;this.options.onCreate(data);}else{this.options.onUpdate(data);}}
function isModifierEnabled(modifiers,modifierName){return modifiers.some(function(_ref){var name=_ref.name,enabled=_ref.enabled;return enabled&&name===modifierName;});}
function getSupportedPropertyName(property){var prefixes=[false,'ms','Webkit','Moz','O'];var upperProp=property.charAt(0).toUpperCase()+property.slice(1);for(var i=0;i<prefixes.length;i++){var prefix=prefixes[i];var toCheck=prefix?''+prefix+upperProp:property;if(typeof document.body.style[toCheck]!=='undefined'){return toCheck;}}
return null;}
function destroy(){this.state.isDestroyed=true;if(isModifierEnabled(this.modifiers,'applyStyle')){this.popper.removeAttribute('x-placement');this.popper.style.position='';this.popper.style.top='';this.popper.style.left='';this.popper.style.right='';this.popper.style.bottom='';this.popper.style.willChange='';this.popper.style[getSupportedPropertyName('transform')]='';}
this.disableEventListeners();if(this.options.removeOnDestroy){this.popper.parentNode.removeChild(this.popper);}
return this;}
function getWindow(element){var ownerDocument=element.ownerDocument;return ownerDocument?ownerDocument.defaultView:window;}
function attachToScrollParents(scrollParent,event,callback,scrollParents){var isBody=scrollParent.nodeName==='BODY';var target=isBody?scrollParent.ownerDocument.defaultView:scrollParent;target.addEventListener(event,callback,{passive:true});if(!isBody){attachToScrollParents(getScrollParent(target.parentNode),event,callback,scrollParents);}
scrollParents.push(target);}
function setupEventListeners(reference,options,state,updateBound){state.updateBound=updateBound;getWindow(reference).addEventListener('resize',state.updateBound,{passive:true});var scrollElement=getScrollParent(reference);attachToScrollParents(scrollElement,'scroll',state.updateBound,state.scrollParents);state.scrollElement=scrollElement;state.eventsEnabled=true;return state;}
function enableEventListeners(){if(!this.state.eventsEnabled){this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate);}}
function removeEventListeners(reference,state){getWindow(reference).removeEventListener('resize',state.updateBound);state.scrollParents.forEach(function(target){target.removeEventListener('scroll',state.updateBound);});state.updateBound=null;state.scrollParents=[];state.scrollElement=null;state.eventsEnabled=false;return state;}
function disableEventListeners(){if(this.state.eventsEnabled){cancelAnimationFrame(this.scheduleUpdate);this.state=removeEventListeners(this.reference,this.state);}}
function isNumeric(n){return n!==''&&!isNaN(parseFloat(n))&&isFinite(n);}
function setStyles(element,styles){Object.keys(styles).forEach(function(prop){var unit='';if(['width','height','top','right','bottom','left'].indexOf(prop)!==-1&&isNumeric(styles[prop])){unit='px';}
element.style[prop]=styles[prop]+unit;});}
function setAttributes(element,attributes){Object.keys(attributes).forEach(function(prop){var value=attributes[prop];if(value!==false){element.setAttribute(prop,attributes[prop]);}else{element.removeAttribute(prop);}});}
function applyStyle(data){setStyles(data.instance.popper,data.styles);setAttributes(data.instance.popper,data.attributes);if(data.arrowElement&&Object.keys(data.arrowStyles).length){setStyles(data.arrowElement,data.arrowStyles);}
return data;}
function applyStyleOnLoad(reference,popper,options,modifierOptions,state){var referenceOffsets=getReferenceOffsets(state,popper,reference,options.positionFixed);var placement=computeAutoPlacement(options.placement,referenceOffsets,popper,reference,options.modifiers.flip.boundariesElement,options.modifiers.flip.padding);popper.setAttribute('x-placement',placement);setStyles(popper,{position:options.positionFixed?'fixed':'absolute'});return options;}
function computeStyle(data,options){var x=options.x,y=options.y;var popper=data.offsets.popper;var legacyGpuAccelerationOption=find(data.instance.modifiers,function(modifier){return modifier.name==='applyStyle';}).gpuAcceleration;if(legacyGpuAccelerationOption!==undefined){console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');}
var gpuAcceleration=legacyGpuAccelerationOption!==undefined?legacyGpuAccelerationOption:options.gpuAcceleration;var offsetParent=getOffsetParent(data.instance.popper);var offsetParentRect=getBoundingClientRect(offsetParent);var styles={position:popper.position};var offsets={left:Math.floor(popper.left),top:Math.round(popper.top),bottom:Math.round(popper.bottom),right:Math.floor(popper.right)};var sideA=x==='bottom'?'top':'bottom';var sideB=y==='right'?'left':'right';var prefixedProperty=getSupportedPropertyName('transform');var left=void 0,top=void 0;if(sideA==='bottom'){top=-offsetParentRect.height+offsets.bottom;}else{top=offsets.top;}
if(sideB==='right'){left=-offsetParentRect.width+offsets.right;}else{left=offsets.left;}
if(gpuAcceleration&&prefixedProperty){styles[prefixedProperty]='translate3d('+left+'px, '+top+'px, 0)';styles[sideA]=0;styles[sideB]=0;styles.willChange='transform';}else{var invertTop=sideA==='bottom'?-1:1;var invertLeft=sideB==='right'?-1:1;styles[sideA]=top*invertTop;styles[sideB]=left*invertLeft;styles.willChange=sideA+', '+sideB;}
var attributes={'x-placement':data.placement};data.attributes=_extends({},attributes,data.attributes);data.styles=_extends({},styles,data.styles);data.arrowStyles=_extends({},data.offsets.arrow,data.arrowStyles);return data;}
function isModifierRequired(modifiers,requestingName,requestedName){var requesting=find(modifiers,function(_ref){var name=_ref.name;return name===requestingName;});var isRequired=!!requesting&&modifiers.some(function(modifier){return modifier.name===requestedName&&modifier.enabled&&modifier.order<requesting.order;});if(!isRequired){var _requesting='`'+requestingName+'`';var requested='`'+requestedName+'`';console.warn(requested+' modifier is required by '+_requesting+' modifier in order to work, be sure to include it before '+_requesting+'!');}
return isRequired;}
function arrow(data,options){var _data$offsets$arrow;if(!isModifierRequired(data.instance.modifiers,'arrow','keepTogether')){return data;}
var arrowElement=options.element;if(typeof arrowElement==='string'){arrowElement=data.instance.popper.querySelector(arrowElement);if(!arrowElement){return data;}}else{if(!data.instance.popper.contains(arrowElement)){console.warn('WARNING: `arrow.element` must be child of its popper element!');return data;}}
var placement=data.placement.split('-')[0];var _data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var isVertical=['left','right'].indexOf(placement)!==-1;var len=isVertical?'height':'width';var sideCapitalized=isVertical?'Top':'Left';var side=sideCapitalized.toLowerCase();var altSide=isVertical?'left':'top';var opSide=isVertical?'bottom':'right';var arrowElementSize=getOuterSizes(arrowElement)[len];if(reference[opSide]-arrowElementSize<popper[side]){data.offsets.popper[side]-=popper[side]-(reference[opSide]-arrowElementSize);}
if(reference[side]+arrowElementSize>popper[opSide]){data.offsets.popper[side]+=reference[side]+arrowElementSize-popper[opSide];}
data.offsets.popper=getClientRect(data.offsets.popper);var center=reference[side]+reference[len]/2-arrowElementSize/2;var css=getStyleComputedProperty(data.instance.popper);var popperMarginSide=parseFloat(css['margin'+sideCapitalized],10);var popperBorderSide=parseFloat(css['border'+sideCapitalized+'Width'],10);var sideValue=center-data.offsets.popper[side]-popperMarginSide-popperBorderSide;sideValue=Math.max(Math.min(popper[len]-arrowElementSize,sideValue),0);data.arrowElement=arrowElement;data.offsets.arrow=(_data$offsets$arrow={},defineProperty(_data$offsets$arrow,side,Math.round(sideValue)),defineProperty(_data$offsets$arrow,altSide,''),_data$offsets$arrow);return data;}
function getOppositeVariation(variation){if(variation==='end'){return'start';}else if(variation==='start'){return'end';}
return variation;}
var placements=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'];var validPlacements=placements.slice(3);function clockwise(placement){var counter=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var index=validPlacements.indexOf(placement);var arr=validPlacements.slice(index+1).concat(validPlacements.slice(0,index));return counter?arr.reverse():arr;}
var BEHAVIORS={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'};function flip(data,options){if(isModifierEnabled(data.instance.modifiers,'inner')){return data;}
if(data.flipped&&data.placement===data.originalPlacement){return data;}
var boundaries=getBoundaries(data.instance.popper,data.instance.reference,options.padding,options.boundariesElement,data.positionFixed);var placement=data.placement.split('-')[0];var placementOpposite=getOppositePlacement(placement);var variation=data.placement.split('-')[1]||'';var flipOrder=[];switch(options.behavior){case BEHAVIORS.FLIP:flipOrder=[placement,placementOpposite];break;case BEHAVIORS.CLOCKWISE:flipOrder=clockwise(placement);break;case BEHAVIORS.COUNTERCLOCKWISE:flipOrder=clockwise(placement,true);break;default:flipOrder=options.behavior;}
flipOrder.forEach(function(step,index){if(placement!==step||flipOrder.length===index+1){return data;}
placement=data.placement.split('-')[0];placementOpposite=getOppositePlacement(placement);var popperOffsets=data.offsets.popper;var refOffsets=data.offsets.reference;var floor=Math.floor;var overlapsRef=placement==='left'&&floor(popperOffsets.right)>floor(refOffsets.left)||placement==='right'&&floor(popperOffsets.left)<floor(refOffsets.right)||placement==='top'&&floor(popperOffsets.bottom)>floor(refOffsets.top)||placement==='bottom'&&floor(popperOffsets.top)<floor(refOffsets.bottom);var overflowsLeft=floor(popperOffsets.left)<floor(boundaries.left);var overflowsRight=floor(popperOffsets.right)>floor(boundaries.right);var overflowsTop=floor(popperOffsets.top)<floor(boundaries.top);var overflowsBottom=floor(popperOffsets.bottom)>floor(boundaries.bottom);var overflowsBoundaries=placement==='left'&&overflowsLeft||placement==='right'&&overflowsRight||placement==='top'&&overflowsTop||placement==='bottom'&&overflowsBottom;var isVertical=['top','bottom'].indexOf(placement)!==-1;var flippedVariation=!!options.flipVariations&&(isVertical&&variation==='start'&&overflowsLeft||isVertical&&variation==='end'&&overflowsRight||!isVertical&&variation==='start'&&overflowsTop||!isVertical&&variation==='end'&&overflowsBottom);if(overlapsRef||overflowsBoundaries||flippedVariation){data.flipped=true;if(overlapsRef||overflowsBoundaries){placement=flipOrder[index+1];}
if(flippedVariation){variation=getOppositeVariation(variation);}
data.placement=placement+(variation?'-'+variation:'');data.offsets.popper=_extends({},data.offsets.popper,getPopperOffsets(data.instance.popper,data.offsets.reference,data.placement));data=runModifiers(data.instance.modifiers,data,'flip');}});return data;}
function keepTogether(data){var _data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var placement=data.placement.split('-')[0];var floor=Math.floor;var isVertical=['top','bottom'].indexOf(placement)!==-1;var side=isVertical?'right':'bottom';var opSide=isVertical?'left':'top';var measurement=isVertical?'width':'height';if(popper[side]<floor(reference[opSide])){data.offsets.popper[opSide]=floor(reference[opSide])-popper[measurement];}
if(popper[opSide]>floor(reference[side])){data.offsets.popper[opSide]=floor(reference[side]);}
return data;}
function toValue(str,measurement,popperOffsets,referenceOffsets){var split=str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);var value=+split[1];var unit=split[2];if(!value){return str;}
if(unit.indexOf('%')===0){var element=void 0;switch(unit){case'%p':element=popperOffsets;break;case'%':case'%r':default:element=referenceOffsets;}
var rect=getClientRect(element);return rect[measurement]/100*value;}else if(unit==='vh'||unit==='vw'){var size=void 0;if(unit==='vh'){size=Math.max(document.documentElement.clientHeight,window.innerHeight||0);}else{size=Math.max(document.documentElement.clientWidth,window.innerWidth||0);}
return size/100*value;}else{return value;}}
function parseOffset(offset,popperOffsets,referenceOffsets,basePlacement){var offsets=[0,0];var useHeight=['right','left'].indexOf(basePlacement)!==-1;var fragments=offset.split(/(\+|\-)/).map(function(frag){return frag.trim();});var divider=fragments.indexOf(find(fragments,function(frag){return frag.search(/,|\s/)!==-1;}));if(fragments[divider]&&fragments[divider].indexOf(',')===-1){console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');}
var splitRegex=/\s*,\s*|\s+/;var ops=divider!==-1?[fragments.slice(0,divider).concat([fragments[divider].split(splitRegex)[0]]),[fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider+1))]:[fragments];ops=ops.map(function(op,index){var measurement=(index===1?!useHeight:useHeight)?'height':'width';var mergeWithPrevious=false;return op.reduce(function(a,b){if(a[a.length-1]===''&&['+','-'].indexOf(b)!==-1){a[a.length-1]=b;mergeWithPrevious=true;return a;}else if(mergeWithPrevious){a[a.length-1]+=b;mergeWithPrevious=false;return a;}else{return a.concat(b);}},[]).map(function(str){return toValue(str,measurement,popperOffsets,referenceOffsets);});});ops.forEach(function(op,index){op.forEach(function(frag,index2){if(isNumeric(frag)){offsets[index]+=frag*(op[index2-1]==='-'?-1:1);}});});return offsets;}
function offset(data,_ref){var offset=_ref.offset;var placement=data.placement,_data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var basePlacement=placement.split('-')[0];var offsets=void 0;if(isNumeric(+offset)){offsets=[+offset,0];}else{offsets=parseOffset(offset,popper,reference,basePlacement);}
if(basePlacement==='left'){popper.top+=offsets[0];popper.left-=offsets[1];}else if(basePlacement==='right'){popper.top+=offsets[0];popper.left+=offsets[1];}else if(basePlacement==='top'){popper.left+=offsets[0];popper.top-=offsets[1];}else if(basePlacement==='bottom'){popper.left+=offsets[0];popper.top+=offsets[1];}
data.popper=popper;return data;}
function preventOverflow(data,options){var boundariesElement=options.boundariesElement||getOffsetParent(data.instance.popper);if(data.instance.reference===boundariesElement){boundariesElement=getOffsetParent(boundariesElement);}
var transformProp=getSupportedPropertyName('transform');var popperStyles=data.instance.popper.style;var top=popperStyles.top,left=popperStyles.left,transform=popperStyles[transformProp];popperStyles.top='';popperStyles.left='';popperStyles[transformProp]='';var boundaries=getBoundaries(data.instance.popper,data.instance.reference,options.padding,boundariesElement,data.positionFixed);popperStyles.top=top;popperStyles.left=left;popperStyles[transformProp]=transform;options.boundaries=boundaries;var order=options.priority;var popper=data.offsets.popper;var check={primary:function primary(placement){var value=popper[placement];if(popper[placement]<boundaries[placement]&&!options.escapeWithReference){value=Math.max(popper[placement],boundaries[placement]);}
return defineProperty({},placement,value);},secondary:function secondary(placement){var mainSide=placement==='right'?'left':'top';var value=popper[mainSide];if(popper[placement]>boundaries[placement]&&!options.escapeWithReference){value=Math.min(popper[mainSide],boundaries[placement]-(placement==='right'?popper.width:popper.height));}
return defineProperty({},mainSide,value);}};order.forEach(function(placement){var side=['left','top'].indexOf(placement)!==-1?'primary':'secondary';popper=_extends({},popper,check[side](placement));});data.offsets.popper=popper;return data;}
function shift(data){var placement=data.placement;var basePlacement=placement.split('-')[0];var shiftvariation=placement.split('-')[1];if(shiftvariation){var _data$offsets=data.offsets,reference=_data$offsets.reference,popper=_data$offsets.popper;var isVertical=['bottom','top'].indexOf(basePlacement)!==-1;var side=isVertical?'left':'top';var measurement=isVertical?'width':'height';var shiftOffsets={start:defineProperty({},side,reference[side]),end:defineProperty({},side,reference[side]+reference[measurement]-popper[measurement])};data.offsets.popper=_extends({},popper,shiftOffsets[shiftvariation]);}
return data;}
function hide(data){if(!isModifierRequired(data.instance.modifiers,'hide','preventOverflow')){return data;}
var refRect=data.offsets.reference;var bound=find(data.instance.modifiers,function(modifier){return modifier.name==='preventOverflow';}).boundaries;if(refRect.bottom<bound.top||refRect.left>bound.right||refRect.top>bound.bottom||refRect.right<bound.left){if(data.hide===true){return data;}
data.hide=true;data.attributes['x-out-of-boundaries']='';}else{if(data.hide===false){return data;}
data.hide=false;data.attributes['x-out-of-boundaries']=false;}
return data;}
function inner(data){var placement=data.placement;var basePlacement=placement.split('-')[0];var _data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var isHoriz=['left','right'].indexOf(basePlacement)!==-1;var subtractLength=['top','left'].indexOf(basePlacement)===-1;popper[isHoriz?'left':'top']=reference[basePlacement]-(subtractLength?popper[isHoriz?'width':'height']:0);data.placement=getOppositePlacement(placement);data.offsets.popper=getClientRect(popper);return data;}
var modifiers={shift:{order:100,enabled:true,fn:shift},offset:{order:200,enabled:true,fn:offset,offset:0},preventOverflow:{order:300,enabled:true,fn:preventOverflow,priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:true,fn:keepTogether},arrow:{order:500,enabled:true,fn:arrow,element:'[x-arrow]'},flip:{order:600,enabled:true,fn:flip,behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:false,fn:inner},hide:{order:800,enabled:true,fn:hide},computeStyle:{order:850,enabled:true,fn:computeStyle,gpuAcceleration:true,x:'bottom',y:'right'},applyStyle:{order:900,enabled:true,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:undefined}};var Defaults={placement:'bottom',positionFixed:false,eventsEnabled:true,removeOnDestroy:false,onCreate:function onCreate(){},onUpdate:function onUpdate(){},modifiers:modifiers};var Popper=function(){function Popper(reference,popper){var _this=this;var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};classCallCheck(this,Popper);this.scheduleUpdate=function(){return requestAnimationFrame(_this.update);};this.update=debounce(this.update.bind(this));this.options=_extends({},Popper.Defaults,options);this.state={isDestroyed:false,isCreated:false,scrollParents:[]};this.reference=reference&&reference.jquery?reference[0]:reference;this.popper=popper&&popper.jquery?popper[0]:popper;this.options.modifiers={};Object.keys(_extends({},Popper.Defaults.modifiers,options.modifiers)).forEach(function(name){_this.options.modifiers[name]=_extends({},Popper.Defaults.modifiers[name]||{},options.modifiers?options.modifiers[name]:{});});this.modifiers=Object.keys(this.options.modifiers).map(function(name){return _extends({name:name},_this.options.modifiers[name]);}).sort(function(a,b){return a.order-b.order;});this.modifiers.forEach(function(modifierOptions){if(modifierOptions.enabled&&isFunction(modifierOptions.onLoad)){modifierOptions.onLoad(_this.reference,_this.popper,_this.options,modifierOptions,_this.state);}});this.update();var eventsEnabled=this.options.eventsEnabled;if(eventsEnabled){this.enableEventListeners();}
this.state.eventsEnabled=eventsEnabled;}
createClass(Popper,[{key:'update',value:function update$$1(){return update.call(this);}},{key:'destroy',value:function destroy$$1(){return destroy.call(this);}},{key:'enableEventListeners',value:function enableEventListeners$$1(){return enableEventListeners.call(this);}},{key:'disableEventListeners',value:function disableEventListeners$$1(){return disableEventListeners.call(this);}}]);return Popper;}();Popper.Utils=(typeof window!=='undefined'?window:global).PopperUtils;Popper.placements=placements;Popper.Defaults=Defaults;return Popper;})));;

/* /web/static/lib/bootstrap/js/index.js defined in bundle 'web.assets_common' */
(function($){if(typeof $==='undefined'){throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');}
var version=$.fn.jquery.split(' ')[0].split('.');var minMajor=1;var ltMajor=2;var minMinor=9;var minPatch=1;var maxMajor=4;if(version[0]<ltMajor&&version[1]<minMinor||version[0]===minMajor&&version[1]===minMinor&&version[2]<minPatch||version[0]>=maxMajor){throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');}})($);;

/* /web/static/lib/bootstrap/js/util.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery')):typeof define==='function'&&define.amd?define(['jquery'],factory):(global=global||self,global.Util=factory(global.jQuery));}(this,function($){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;var TRANSITION_END='transitionend';var MAX_UID=1000000;var MILLISECONDS_MULTIPLIER=1000;function toType(obj){return{}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();}
function getSpecialTransitionEndEvent(){return{bindType:TRANSITION_END,delegateType:TRANSITION_END,handle:function handle(event){if($(event.target).is(this)){return event.handleObj.handler.apply(this,arguments);}
return undefined;}};}
function transitionEndEmulator(duration){var _this=this;var called=false;$(this).one(Util.TRANSITION_END,function(){called=true;});setTimeout(function(){if(!called){Util.triggerTransitionEnd(_this);}},duration);return this;}
function setTransitionEndSupport(){$.fn.emulateTransitionEnd=transitionEndEmulator;$.event.special[Util.TRANSITION_END]=getSpecialTransitionEndEvent();}
var Util={TRANSITION_END:'bsTransitionEnd',getUID:function getUID(prefix){do{prefix+=~~(Math.random()*MAX_UID);}while(document.getElementById(prefix));return prefix;},getSelectorFromElement:function getSelectorFromElement(element){var selector=element.getAttribute('data-target');if(!selector||selector==='#'){var hrefAttr=element.getAttribute('href');selector=hrefAttr&&hrefAttr!=='#'?hrefAttr.trim():'';}
try{return document.querySelector(selector)?selector:null;}catch(err){return null;}},getTransitionDurationFromElement:function getTransitionDurationFromElement(element){if(!element){return 0;}
var transitionDuration=$(element).css('transition-duration');var transitionDelay=$(element).css('transition-delay');var floatTransitionDuration=parseFloat(transitionDuration);var floatTransitionDelay=parseFloat(transitionDelay);if(!floatTransitionDuration&&!floatTransitionDelay){return 0;}
transitionDuration=transitionDuration.split(',')[0];transitionDelay=transitionDelay.split(',')[0];return(parseFloat(transitionDuration)+parseFloat(transitionDelay))*MILLISECONDS_MULTIPLIER;},reflow:function reflow(element){return element.offsetHeight;},triggerTransitionEnd:function triggerTransitionEnd(element){$(element).trigger(TRANSITION_END);},supportsTransitionEnd:function supportsTransitionEnd(){return Boolean(TRANSITION_END);},isElement:function isElement(obj){return(obj[0]||obj).nodeType;},typeCheckConfig:function typeCheckConfig(componentName,config,configTypes){for(var property in configTypes){if(Object.prototype.hasOwnProperty.call(configTypes,property)){var expectedTypes=configTypes[property];var value=config[property];var valueType=value&&Util.isElement(value)?'element':toType(value);if(!new RegExp(expectedTypes).test(valueType)){throw new Error(componentName.toUpperCase()+": "+("Option \""+property+"\" provided type \""+valueType+"\" ")+("but expected type \""+expectedTypes+"\"."));}}}},findShadowRoot:function findShadowRoot(element){if(!document.documentElement.attachShadow){return null;}
if(typeof element.getRootNode==='function'){var root=element.getRootNode();return root instanceof ShadowRoot?root:null;}
if(element instanceof ShadowRoot){return element;}
if(!element.parentNode){return null;}
return Util.findShadowRoot(element.parentNode);}};setTransitionEndSupport();return Util;}));;

/* /web/static/lib/bootstrap/js/alert.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=global||self,global.Alert=factory(global.jQuery,global.Util));}(this,function($,Util){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Util=Util&&Util.hasOwnProperty('default')?Util['default']:Util;function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
var NAME='alert';var VERSION='4.3.1';var DATA_KEY='bs.alert';var EVENT_KEY="."+DATA_KEY;var DATA_API_KEY='.data-api';var JQUERY_NO_CONFLICT=$.fn[NAME];var Selector={DISMISS:'[data-dismiss="alert"]'};var Event={CLOSE:"close"+EVENT_KEY,CLOSED:"closed"+EVENT_KEY,CLICK_DATA_API:"click"+EVENT_KEY+DATA_API_KEY};var ClassName={ALERT:'alert',FADE:'fade',SHOW:'show'};var Alert=function(){function Alert(element){this._element=element;}
var _proto=Alert.prototype;_proto.close=function close(element){var rootElement=this._element;if(element){rootElement=this._getRootElement(element);}
var customEvent=this._triggerCloseEvent(rootElement);if(customEvent.isDefaultPrevented()){return;}
this._removeElement(rootElement);};_proto.dispose=function dispose(){$.removeData(this._element,DATA_KEY);this._element=null;};_proto._getRootElement=function _getRootElement(element){var selector=Util.getSelectorFromElement(element);var parent=false;if(selector){parent=document.querySelector(selector);}
if(!parent){parent=$(element).closest("."+ClassName.ALERT)[0];}
return parent;};_proto._triggerCloseEvent=function _triggerCloseEvent(element){var closeEvent=$.Event(Event.CLOSE);$(element).trigger(closeEvent);return closeEvent;};_proto._removeElement=function _removeElement(element){var _this=this;$(element).removeClass(ClassName.SHOW);if(!$(element).hasClass(ClassName.FADE)){this._destroyElement(element);return;}
var transitionDuration=Util.getTransitionDurationFromElement(element);$(element).one(Util.TRANSITION_END,function(event){return _this._destroyElement(element,event);}).emulateTransitionEnd(transitionDuration);};_proto._destroyElement=function _destroyElement(element){$(element).detach().trigger(Event.CLOSED).remove();};Alert._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var $element=$(this);var data=$element.data(DATA_KEY);if(!data){data=new Alert(this);$element.data(DATA_KEY,data);}
if(config==='close'){data[config](this);}});};Alert._handleDismiss=function _handleDismiss(alertInstance){return function(event){if(event){event.preventDefault();}
alertInstance.close(this);};};_createClass(Alert,null,[{key:"VERSION",get:function get(){return VERSION;}}]);return Alert;}();$(document).on(Event.CLICK_DATA_API,Selector.DISMISS,Alert._handleDismiss(new Alert()));$.fn[NAME]=Alert._jQueryInterface;$.fn[NAME].Constructor=Alert;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Alert._jQueryInterface;};return Alert;}));;

/* /web/static/lib/bootstrap/js/button.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery')):typeof define==='function'&&define.amd?define(['jquery'],factory):(global=global||self,global.Button=factory(global.jQuery));}(this,function($){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
var NAME='button';var VERSION='4.3.1';var DATA_KEY='bs.button';var EVENT_KEY="."+DATA_KEY;var DATA_API_KEY='.data-api';var JQUERY_NO_CONFLICT=$.fn[NAME];var ClassName={ACTIVE:'active',BUTTON:'btn',FOCUS:'focus'};var Selector={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:'input:not([type="hidden"])',ACTIVE:'.active',BUTTON:'.btn'};var Event={CLICK_DATA_API:"click"+EVENT_KEY+DATA_API_KEY,FOCUS_BLUR_DATA_API:"focus"+EVENT_KEY+DATA_API_KEY+" "+("blur"+EVENT_KEY+DATA_API_KEY)};var Button=function(){function Button(element){this._element=element;}
var _proto=Button.prototype;_proto.toggle=function toggle(){var triggerChangeEvent=true;var addAriaPressed=true;var rootElement=$(this._element).closest(Selector.DATA_TOGGLE)[0];if(rootElement){var input=this._element.querySelector(Selector.INPUT);if(input){if(input.type==='radio'){if(input.checked&&this._element.classList.contains(ClassName.ACTIVE)){triggerChangeEvent=false;}else{var activeElement=rootElement.querySelector(Selector.ACTIVE);if(activeElement){$(activeElement).removeClass(ClassName.ACTIVE);}}}
if(triggerChangeEvent){if(input.hasAttribute('disabled')||rootElement.hasAttribute('disabled')||input.classList.contains('disabled')||rootElement.classList.contains('disabled')){return;}
input.checked=!this._element.classList.contains(ClassName.ACTIVE);$(input).trigger('change');}
input.focus();addAriaPressed=false;}}
if(addAriaPressed){this._element.setAttribute('aria-pressed',!this._element.classList.contains(ClassName.ACTIVE));}
if(triggerChangeEvent){$(this._element).toggleClass(ClassName.ACTIVE);}};_proto.dispose=function dispose(){$.removeData(this._element,DATA_KEY);this._element=null;};Button._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var data=$(this).data(DATA_KEY);if(!data){data=new Button(this);$(this).data(DATA_KEY,data);}
if(config==='toggle'){data[config]();}});};_createClass(Button,null,[{key:"VERSION",get:function get(){return VERSION;}}]);return Button;}();$(document).on(Event.CLICK_DATA_API,Selector.DATA_TOGGLE_CARROT,function(event){event.preventDefault();var button=event.target;if(!$(button).hasClass(ClassName.BUTTON)){button=$(button).closest(Selector.BUTTON);}
Button._jQueryInterface.call($(button),'toggle');}).on(Event.FOCUS_BLUR_DATA_API,Selector.DATA_TOGGLE_CARROT,function(event){var button=$(event.target).closest(Selector.BUTTON)[0];$(button).toggleClass(ClassName.FOCUS,/^focus(in)?$/.test(event.type));});$.fn[NAME]=Button._jQueryInterface;$.fn[NAME].Constructor=Button;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Button._jQueryInterface;};return Button;}));;

/* /web/static/lib/bootstrap/js/carousel.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=global||self,global.Carousel=factory(global.jQuery,global.Util));}(this,function($,Util){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Util=Util&&Util.hasOwnProperty('default')?Util['default']:Util;function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}
return obj;}
function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==='function'){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable;}));}
ownKeys.forEach(function(key){_defineProperty(target,key,source[key]);});}
return target;}
var NAME='carousel';var VERSION='4.3.1';var DATA_KEY='bs.carousel';var EVENT_KEY="."+DATA_KEY;var DATA_API_KEY='.data-api';var JQUERY_NO_CONFLICT=$.fn[NAME];var ARROW_LEFT_KEYCODE=37;var ARROW_RIGHT_KEYCODE=39;var TOUCHEVENT_COMPAT_WAIT=500;var SWIPE_THRESHOLD=40;var Default={interval:5000,keyboard:true,slide:false,pause:'hover',wrap:true,touch:true};var DefaultType={interval:'(number|boolean)',keyboard:'boolean',slide:'(boolean|string)',pause:'(string|boolean)',wrap:'boolean',touch:'boolean'};var Direction={NEXT:'next',PREV:'prev',LEFT:'left',RIGHT:'right'};var Event={SLIDE:"slide"+EVENT_KEY,SLID:"slid"+EVENT_KEY,KEYDOWN:"keydown"+EVENT_KEY,MOUSEENTER:"mouseenter"+EVENT_KEY,MOUSELEAVE:"mouseleave"+EVENT_KEY,TOUCHSTART:"touchstart"+EVENT_KEY,TOUCHMOVE:"touchmove"+EVENT_KEY,TOUCHEND:"touchend"+EVENT_KEY,POINTERDOWN:"pointerdown"+EVENT_KEY,POINTERUP:"pointerup"+EVENT_KEY,DRAG_START:"dragstart"+EVENT_KEY,LOAD_DATA_API:"load"+EVENT_KEY+DATA_API_KEY,CLICK_DATA_API:"click"+EVENT_KEY+DATA_API_KEY};var ClassName={CAROUSEL:'carousel',ACTIVE:'active',SLIDE:'slide',RIGHT:'carousel-item-right',LEFT:'carousel-item-left',NEXT:'carousel-item-next',PREV:'carousel-item-prev',ITEM:'carousel-item',POINTER_EVENT:'pointer-event'};var Selector={ACTIVE:'.active',ACTIVE_ITEM:'.active.carousel-item',ITEM:'.carousel-item',ITEM_IMG:'.carousel-item img',NEXT_PREV:'.carousel-item-next, .carousel-item-prev',INDICATORS:'.carousel-indicators',DATA_SLIDE:'[data-slide], [data-slide-to]',DATA_RIDE:'[data-ride="carousel"]'};var PointerType={TOUCH:'touch',PEN:'pen'};var Carousel=function(){function Carousel(element,config){this._items=null;this._interval=null;this._activeElement=null;this._isPaused=false;this._isSliding=false;this.touchTimeout=null;this.touchStartX=0;this.touchDeltaX=0;this._config=this._getConfig(config);this._element=element;this._indicatorsElement=this._element.querySelector(Selector.INDICATORS);this._touchSupported='ontouchstart'in document.documentElement||navigator.maxTouchPoints>0;this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent);this._addEventListeners();}
var _proto=Carousel.prototype;_proto.next=function next(){if(!this._isSliding){this._slide(Direction.NEXT);}};_proto.nextWhenVisible=function nextWhenVisible(){if(!document.hidden&&$(this._element).is(':visible')&&$(this._element).css('visibility')!=='hidden'){this.next();}};_proto.prev=function prev(){if(!this._isSliding){this._slide(Direction.PREV);}};_proto.pause=function pause(event){if(!event){this._isPaused=true;}
if(this._element.querySelector(Selector.NEXT_PREV)){Util.triggerTransitionEnd(this._element);this.cycle(true);}
clearInterval(this._interval);this._interval=null;};_proto.cycle=function cycle(event){if(!event){this._isPaused=false;}
if(this._interval){clearInterval(this._interval);this._interval=null;}
if(this._config.interval&&!this._isPaused){this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval);}};_proto.to=function to(index){var _this=this;this._activeElement=this._element.querySelector(Selector.ACTIVE_ITEM);var activeIndex=this._getItemIndex(this._activeElement);if(index>this._items.length-1||index<0){return;}
if(this._isSliding){$(this._element).one(Event.SLID,function(){return _this.to(index);});return;}
if(activeIndex===index){this.pause();this.cycle();return;}
var direction=index>activeIndex?Direction.NEXT:Direction.PREV;this._slide(direction,this._items[index]);};_proto.dispose=function dispose(){$(this._element).off(EVENT_KEY);$.removeData(this._element,DATA_KEY);this._items=null;this._config=null;this._element=null;this._interval=null;this._isPaused=null;this._isSliding=null;this._activeElement=null;this._indicatorsElement=null;};_proto._getConfig=function _getConfig(config){config=_objectSpread({},Default,config);Util.typeCheckConfig(NAME,config,DefaultType);return config;};_proto._handleSwipe=function _handleSwipe(){var absDeltax=Math.abs(this.touchDeltaX);if(absDeltax<=SWIPE_THRESHOLD){return;}
var direction=absDeltax/this.touchDeltaX;if(direction>0){this.prev();}
if(direction<0){this.next();}};_proto._addEventListeners=function _addEventListeners(){var _this2=this;if(this._config.keyboard){$(this._element).on(Event.KEYDOWN,function(event){return _this2._keydown(event);});}
if(this._config.pause==='hover'){$(this._element).on(Event.MOUSEENTER,function(event){return _this2.pause(event);}).on(Event.MOUSELEAVE,function(event){return _this2.cycle(event);});}
if(this._config.touch){this._addTouchEventListeners();}};_proto._addTouchEventListeners=function _addTouchEventListeners(){var _this3=this;if(!this._touchSupported){return;}
var start=function start(event){if(_this3._pointerEvent&&PointerType[event.originalEvent.pointerType.toUpperCase()]){_this3.touchStartX=event.originalEvent.clientX;}else if(!_this3._pointerEvent){_this3.touchStartX=event.originalEvent.touches[0].clientX;}};var move=function move(event){if(event.originalEvent.touches&&event.originalEvent.touches.length>1){_this3.touchDeltaX=0;}else{_this3.touchDeltaX=event.originalEvent.touches[0].clientX-_this3.touchStartX;}};var end=function end(event){if(_this3._pointerEvent&&PointerType[event.originalEvent.pointerType.toUpperCase()]){_this3.touchDeltaX=event.originalEvent.clientX-_this3.touchStartX;}
_this3._handleSwipe();if(_this3._config.pause==='hover'){_this3.pause();if(_this3.touchTimeout){clearTimeout(_this3.touchTimeout);}
_this3.touchTimeout=setTimeout(function(event){return _this3.cycle(event);},TOUCHEVENT_COMPAT_WAIT+_this3._config.interval);}};$(this._element.querySelectorAll(Selector.ITEM_IMG)).on(Event.DRAG_START,function(e){return e.preventDefault();});if(this._pointerEvent){$(this._element).on(Event.POINTERDOWN,function(event){return start(event);});$(this._element).on(Event.POINTERUP,function(event){return end(event);});this._element.classList.add(ClassName.POINTER_EVENT);}else{$(this._element).on(Event.TOUCHSTART,function(event){return start(event);});$(this._element).on(Event.TOUCHMOVE,function(event){return move(event);});$(this._element).on(Event.TOUCHEND,function(event){return end(event);});}};_proto._keydown=function _keydown(event){if(/input|textarea/i.test(event.target.tagName)){return;}
switch(event.which){case ARROW_LEFT_KEYCODE:event.preventDefault();this.prev();break;case ARROW_RIGHT_KEYCODE:event.preventDefault();this.next();break;default:}};_proto._getItemIndex=function _getItemIndex(element){this._items=element&&element.parentNode?[].slice.call(element.parentNode.querySelectorAll(Selector.ITEM)):[];return this._items.indexOf(element);};_proto._getItemByDirection=function _getItemByDirection(direction,activeElement){var isNextDirection=direction===Direction.NEXT;var isPrevDirection=direction===Direction.PREV;var activeIndex=this._getItemIndex(activeElement);var lastItemIndex=this._items.length-1;var isGoingToWrap=isPrevDirection&&activeIndex===0||isNextDirection&&activeIndex===lastItemIndex;if(isGoingToWrap&&!this._config.wrap){return activeElement;}
var delta=direction===Direction.PREV?-1:1;var itemIndex=(activeIndex+delta)%this._items.length;return itemIndex===-1?this._items[this._items.length-1]:this._items[itemIndex];};_proto._triggerSlideEvent=function _triggerSlideEvent(relatedTarget,eventDirectionName){var targetIndex=this._getItemIndex(relatedTarget);var fromIndex=this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM));var slideEvent=$.Event(Event.SLIDE,{relatedTarget:relatedTarget,direction:eventDirectionName,from:fromIndex,to:targetIndex});$(this._element).trigger(slideEvent);return slideEvent;};_proto._setActiveIndicatorElement=function _setActiveIndicatorElement(element){if(this._indicatorsElement){var indicators=[].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE));$(indicators).removeClass(ClassName.ACTIVE);var nextIndicator=this._indicatorsElement.children[this._getItemIndex(element)];if(nextIndicator){$(nextIndicator).addClass(ClassName.ACTIVE);}}};_proto._slide=function _slide(direction,element){var _this4=this;var activeElement=this._element.querySelector(Selector.ACTIVE_ITEM);var activeElementIndex=this._getItemIndex(activeElement);var nextElement=element||activeElement&&this._getItemByDirection(direction,activeElement);var nextElementIndex=this._getItemIndex(nextElement);var isCycling=Boolean(this._interval);var directionalClassName;var orderClassName;var eventDirectionName;if(direction===Direction.NEXT){directionalClassName=ClassName.LEFT;orderClassName=ClassName.NEXT;eventDirectionName=Direction.LEFT;}else{directionalClassName=ClassName.RIGHT;orderClassName=ClassName.PREV;eventDirectionName=Direction.RIGHT;}
if(nextElement&&$(nextElement).hasClass(ClassName.ACTIVE)){this._isSliding=false;return;}
var slideEvent=this._triggerSlideEvent(nextElement,eventDirectionName);if(slideEvent.isDefaultPrevented()){return;}
if(!activeElement||!nextElement){return;}
this._isSliding=true;if(isCycling){this.pause();}
this._setActiveIndicatorElement(nextElement);var slidEvent=$.Event(Event.SLID,{relatedTarget:nextElement,direction:eventDirectionName,from:activeElementIndex,to:nextElementIndex});if($(this._element).hasClass(ClassName.SLIDE)){$(nextElement).addClass(orderClassName);Util.reflow(nextElement);$(activeElement).addClass(directionalClassName);$(nextElement).addClass(directionalClassName);var nextElementInterval=parseInt(nextElement.getAttribute('data-interval'),10);if(nextElementInterval){this._config.defaultInterval=this._config.defaultInterval||this._config.interval;this._config.interval=nextElementInterval;}else{this._config.interval=this._config.defaultInterval||this._config.interval;}
var transitionDuration=Util.getTransitionDurationFromElement(activeElement);$(activeElement).one(Util.TRANSITION_END,function(){$(nextElement).removeClass(directionalClassName+" "+orderClassName).addClass(ClassName.ACTIVE);$(activeElement).removeClass(ClassName.ACTIVE+" "+orderClassName+" "+directionalClassName);_this4._isSliding=false;setTimeout(function(){return $(_this4._element).trigger(slidEvent);},0);}).emulateTransitionEnd(transitionDuration);}else{$(activeElement).removeClass(ClassName.ACTIVE);$(nextElement).addClass(ClassName.ACTIVE);this._isSliding=false;$(this._element).trigger(slidEvent);}
if(isCycling){this.cycle();}};Carousel._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var data=$(this).data(DATA_KEY);var _config=_objectSpread({},Default,$(this).data());if(typeof config==='object'){_config=_objectSpread({},_config,config);}
var action=typeof config==='string'?config:_config.slide;if(!data){data=new Carousel(this,_config);$(this).data(DATA_KEY,data);}
if(typeof config==='number'){data.to(config);}else if(typeof action==='string'){if(typeof data[action]==='undefined'){throw new TypeError("No method named \""+action+"\"");}
data[action]();}else if(_config.interval&&_config.ride){data.pause();data.cycle();}});};Carousel._dataApiClickHandler=function _dataApiClickHandler(event){var selector=Util.getSelectorFromElement(this);if(!selector){return;}
var target=$(selector)[0];if(!target||!$(target).hasClass(ClassName.CAROUSEL)){return;}
var config=_objectSpread({},$(target).data(),$(this).data());var slideIndex=this.getAttribute('data-slide-to');if(slideIndex){config.interval=false;}
Carousel._jQueryInterface.call($(target),config);if(slideIndex){$(target).data(DATA_KEY).to(slideIndex);}
event.preventDefault();};_createClass(Carousel,null,[{key:"VERSION",get:function get(){return VERSION;}},{key:"Default",get:function get(){return Default;}}]);return Carousel;}();$(document).on(Event.CLICK_DATA_API,Selector.DATA_SLIDE,Carousel._dataApiClickHandler);$(window).on(Event.LOAD_DATA_API,function(){var carousels=[].slice.call(document.querySelectorAll(Selector.DATA_RIDE));for(var i=0,len=carousels.length;i<len;i++){var $carousel=$(carousels[i]);Carousel._jQueryInterface.call($carousel,$carousel.data());}});$.fn[NAME]=Carousel._jQueryInterface;$.fn[NAME].Constructor=Carousel;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Carousel._jQueryInterface;};return Carousel;}));;

/* /web/static/lib/bootstrap/js/collapse.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=global||self,global.Collapse=factory(global.jQuery,global.Util));}(this,function($,Util){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Util=Util&&Util.hasOwnProperty('default')?Util['default']:Util;function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}
return obj;}
function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==='function'){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable;}));}
ownKeys.forEach(function(key){_defineProperty(target,key,source[key]);});}
return target;}
var NAME='collapse';var VERSION='4.3.1';var DATA_KEY='bs.collapse';var EVENT_KEY="."+DATA_KEY;var DATA_API_KEY='.data-api';var JQUERY_NO_CONFLICT=$.fn[NAME];var Default={toggle:true,parent:''};var DefaultType={toggle:'boolean',parent:'(string|element)'};var Event={SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY,HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,CLICK_DATA_API:"click"+EVENT_KEY+DATA_API_KEY};var ClassName={SHOW:'show',COLLAPSE:'collapse',COLLAPSING:'collapsing',COLLAPSED:'collapsed'};var Dimension={WIDTH:'width',HEIGHT:'height'};var Selector={ACTIVES:'.show, .collapsing',DATA_TOGGLE:'[data-toggle="collapse"]'};var Collapse=function(){function Collapse(element,config){this._isTransitioning=false;this._element=element;this._config=this._getConfig(config);this._triggerArray=[].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#"+element.id+"\"],"+("[data-toggle=\"collapse\"][data-target=\"#"+element.id+"\"]")));var toggleList=[].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));for(var i=0,len=toggleList.length;i<len;i++){var elem=toggleList[i];var selector=Util.getSelectorFromElement(elem);var filterElement=[].slice.call(document.querySelectorAll(selector)).filter(function(foundElem){return foundElem===element;});if(selector!==null&&filterElement.length>0){this._selector=selector;this._triggerArray.push(elem);}}
this._parent=this._config.parent?this._getParent():null;if(!this._config.parent){this._addAriaAndCollapsedClass(this._element,this._triggerArray);}
if(this._config.toggle){this.toggle();}}
var _proto=Collapse.prototype;_proto.toggle=function toggle(){if($(this._element).hasClass(ClassName.SHOW)){this.hide();}else{this.show();}};_proto.show=function show(){var _this=this;if(this._isTransitioning||$(this._element).hasClass(ClassName.SHOW)){return;}
var actives;var activesData;if(this._parent){actives=[].slice.call(this._parent.querySelectorAll(Selector.ACTIVES)).filter(function(elem){if(typeof _this._config.parent==='string'){return elem.getAttribute('data-parent')===_this._config.parent;}
return elem.classList.contains(ClassName.COLLAPSE);});if(actives.length===0){actives=null;}}
if(actives){activesData=$(actives).not(this._selector).data(DATA_KEY);if(activesData&&activesData._isTransitioning){return;}}
var startEvent=$.Event(Event.SHOW);$(this._element).trigger(startEvent);if(startEvent.isDefaultPrevented()){return;}
if(actives){Collapse._jQueryInterface.call($(actives).not(this._selector),'hide');if(!activesData){$(actives).data(DATA_KEY,null);}}
var dimension=this._getDimension();$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);this._element.style[dimension]=0;if(this._triggerArray.length){$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded',true);}
this.setTransitioning(true);var complete=function complete(){$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);_this._element.style[dimension]='';_this.setTransitioning(false);$(_this._element).trigger(Event.SHOWN);};var capitalizedDimension=dimension[0].toUpperCase()+dimension.slice(1);var scrollSize="scroll"+capitalizedDimension;var transitionDuration=Util.getTransitionDurationFromElement(this._element);$(this._element).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration);this._element.style[dimension]=this._element[scrollSize]+"px";};_proto.hide=function hide(){var _this2=this;if(this._isTransitioning||!$(this._element).hasClass(ClassName.SHOW)){return;}
var startEvent=$.Event(Event.HIDE);$(this._element).trigger(startEvent);if(startEvent.isDefaultPrevented()){return;}
var dimension=this._getDimension();this._element.style[dimension]=this._element.getBoundingClientRect()[dimension]+"px";Util.reflow(this._element);$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);var triggerArrayLength=this._triggerArray.length;if(triggerArrayLength>0){for(var i=0;i<triggerArrayLength;i++){var trigger=this._triggerArray[i];var selector=Util.getSelectorFromElement(trigger);if(selector!==null){var $elem=$([].slice.call(document.querySelectorAll(selector)));if(!$elem.hasClass(ClassName.SHOW)){$(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded',false);}}}}
this.setTransitioning(true);var complete=function complete(){_this2.setTransitioning(false);$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);};this._element.style[dimension]='';var transitionDuration=Util.getTransitionDurationFromElement(this._element);$(this._element).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration);};_proto.setTransitioning=function setTransitioning(isTransitioning){this._isTransitioning=isTransitioning;};_proto.dispose=function dispose(){$.removeData(this._element,DATA_KEY);this._config=null;this._parent=null;this._element=null;this._triggerArray=null;this._isTransitioning=null;};_proto._getConfig=function _getConfig(config){config=_objectSpread({},Default,config);config.toggle=Boolean(config.toggle);Util.typeCheckConfig(NAME,config,DefaultType);return config;};_proto._getDimension=function _getDimension(){var hasWidth=$(this._element).hasClass(Dimension.WIDTH);return hasWidth?Dimension.WIDTH:Dimension.HEIGHT;};_proto._getParent=function _getParent(){var _this3=this;var parent;if(Util.isElement(this._config.parent)){parent=this._config.parent;if(typeof this._config.parent.jquery!=='undefined'){parent=this._config.parent[0];}}else{parent=document.querySelector(this._config.parent);}
var selector="[data-toggle=\"collapse\"][data-parent=\""+this._config.parent+"\"]";var children=[].slice.call(parent.querySelectorAll(selector));$(children).each(function(i,element){_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element),[element]);});return parent;};_proto._addAriaAndCollapsedClass=function _addAriaAndCollapsedClass(element,triggerArray){var isOpen=$(element).hasClass(ClassName.SHOW);if(triggerArray.length){$(triggerArray).toggleClass(ClassName.COLLAPSED,!isOpen).attr('aria-expanded',isOpen);}};Collapse._getTargetFromElement=function _getTargetFromElement(element){var selector=Util.getSelectorFromElement(element);return selector?document.querySelector(selector):null;};Collapse._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var $this=$(this);var data=$this.data(DATA_KEY);var _config=_objectSpread({},Default,$this.data(),typeof config==='object'&&config?config:{});if(!data&&_config.toggle&&/show|hide/.test(config)){_config.toggle=false;}
if(!data){data=new Collapse(this,_config);$this.data(DATA_KEY,data);}
if(typeof config==='string'){if(typeof data[config]==='undefined'){throw new TypeError("No method named \""+config+"\"");}
data[config]();}});};_createClass(Collapse,null,[{key:"VERSION",get:function get(){return VERSION;}},{key:"Default",get:function get(){return Default;}}]);return Collapse;}();$(document).on(Event.CLICK_DATA_API,Selector.DATA_TOGGLE,function(event){if(event.currentTarget.tagName==='A'){event.preventDefault();}
var $trigger=$(this);var selector=Util.getSelectorFromElement(this);var selectors=[].slice.call(document.querySelectorAll(selector));$(selectors).each(function(){var $target=$(this);var data=$target.data(DATA_KEY);var config=data?'toggle':$trigger.data();Collapse._jQueryInterface.call($target,config);});});$.fn[NAME]=Collapse._jQueryInterface;$.fn[NAME].Constructor=Collapse;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Collapse._jQueryInterface;};return Collapse;}));;

/* /web/static/lib/bootstrap/js/dropdown.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('popper.js'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','popper.js','./util.js'],factory):(global=global||self,global.Dropdown=factory(global.jQuery,global.Popper,global.Util));}(this,function($,Popper,Util){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Popper=Popper&&Popper.hasOwnProperty('default')?Popper['default']:Popper;Util=Util&&Util.hasOwnProperty('default')?Util['default']:Util;function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}
return obj;}
function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==='function'){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable;}));}
ownKeys.forEach(function(key){_defineProperty(target,key,source[key]);});}
return target;}
var NAME='dropdown';var VERSION='4.3.1';var DATA_KEY='bs.dropdown';var EVENT_KEY="."+DATA_KEY;var DATA_API_KEY='.data-api';var JQUERY_NO_CONFLICT=$.fn[NAME];var ESCAPE_KEYCODE=27;var SPACE_KEYCODE=32;var TAB_KEYCODE=9;var ARROW_UP_KEYCODE=38;var ARROW_DOWN_KEYCODE=40;var RIGHT_MOUSE_BUTTON_WHICH=3;var REGEXP_KEYDOWN=new RegExp(ARROW_UP_KEYCODE+"|"+ARROW_DOWN_KEYCODE+"|"+ESCAPE_KEYCODE);var Event={HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY,CLICK:"click"+EVENT_KEY,CLICK_DATA_API:"click"+EVENT_KEY+DATA_API_KEY,KEYDOWN_DATA_API:"keydown"+EVENT_KEY+DATA_API_KEY,KEYUP_DATA_API:"keyup"+EVENT_KEY+DATA_API_KEY};var ClassName={DISABLED:'disabled',SHOW:'show',DROPUP:'dropup',DROPRIGHT:'dropright',DROPLEFT:'dropleft',MENURIGHT:'dropdown-menu-right',MENULEFT:'dropdown-menu-left',POSITION_STATIC:'position-static'};var Selector={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:'.dropdown form',MENU:'.dropdown-menu',NAVBAR_NAV:'.navbar-nav',VISIBLE_ITEMS:'.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'};var AttachmentMap={TOP:'top-start',TOPEND:'top-end',BOTTOM:'bottom-start',BOTTOMEND:'bottom-end',RIGHT:'right-start',RIGHTEND:'right-end',LEFT:'left-start',LEFTEND:'left-end'};var Default={offset:0,flip:true,boundary:'scrollParent',reference:'toggle',display:'dynamic'};var DefaultType={offset:'(number|string|function)',flip:'boolean',boundary:'(string|element)',reference:'(string|element)',display:'string'};var Dropdown=function(){function Dropdown(element,config){this._element=element;this._popper=null;this._config=this._getConfig(config);this._menu=this._getMenuElement();this._inNavbar=this._detectNavbar();this._addEventListeners();}
var _proto=Dropdown.prototype;_proto.toggle=function toggle(){if(this._element.disabled||$(this._element).hasClass(ClassName.DISABLED)){return;}
var parent=Dropdown._getParentFromElement(this._element);var isActive=$(this._menu).hasClass(ClassName.SHOW);Dropdown._clearMenus();if(isActive){return;}
var relatedTarget={relatedTarget:this._element};var showEvent=$.Event(Event.SHOW,relatedTarget);$(parent).trigger(showEvent);if(showEvent.isDefaultPrevented()){return;}
if(!this._inNavbar){if(typeof Popper==='undefined'){throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');}
var referenceElement=this._element;if(this._config.reference==='parent'){referenceElement=parent;}else if(Util.isElement(this._config.reference)){referenceElement=this._config.reference;if(typeof this._config.reference.jquery!=='undefined'){referenceElement=this._config.reference[0];}}
if(this._config.boundary!=='scrollParent'){$(parent).addClass(ClassName.POSITION_STATIC);}
this._popper=new Popper(referenceElement,this._menu,this._getPopperConfig());}
if('ontouchstart'in document.documentElement&&$(parent).closest(Selector.NAVBAR_NAV).length===0){$(document.body).children().on('mouseover',null,$.noop);}
this._element.focus();this._element.setAttribute('aria-expanded',true);$(this._menu).toggleClass(ClassName.SHOW);$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN,relatedTarget));};_proto.show=function show(){if(this._element.disabled||$(this._element).hasClass(ClassName.DISABLED)||$(this._menu).hasClass(ClassName.SHOW)){return;}
var relatedTarget={relatedTarget:this._element};var showEvent=$.Event(Event.SHOW,relatedTarget);var parent=Dropdown._getParentFromElement(this._element);$(parent).trigger(showEvent);if(showEvent.isDefaultPrevented()){return;}
$(this._menu).toggleClass(ClassName.SHOW);$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN,relatedTarget));};_proto.hide=function hide(){if(this._element.disabled||$(this._element).hasClass(ClassName.DISABLED)||!$(this._menu).hasClass(ClassName.SHOW)){return;}
var relatedTarget={relatedTarget:this._element};var hideEvent=$.Event(Event.HIDE,relatedTarget);var parent=Dropdown._getParentFromElement(this._element);$(parent).trigger(hideEvent);if(hideEvent.isDefaultPrevented()){return;}
$(this._menu).toggleClass(ClassName.SHOW);$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN,relatedTarget));};_proto.dispose=function dispose(){$.removeData(this._element,DATA_KEY);$(this._element).off(EVENT_KEY);this._element=null;this._menu=null;if(this._popper!==null){this._popper.destroy();this._popper=null;}};_proto.update=function update(){this._inNavbar=this._detectNavbar();if(this._popper!==null){this._popper.scheduleUpdate();}};_proto._addEventListeners=function _addEventListeners(){var _this=this;$(this._element).on(Event.CLICK,function(event){event.preventDefault();event.stopPropagation();_this.toggle();});};_proto._getConfig=function _getConfig(config){config=_objectSpread({},this.constructor.Default,$(this._element).data(),config);Util.typeCheckConfig(NAME,config,this.constructor.DefaultType);return config;};_proto._getMenuElement=function _getMenuElement(){if(!this._menu){var parent=Dropdown._getParentFromElement(this._element);if(parent){this._menu=parent.querySelector(Selector.MENU);}}
return this._menu;};_proto._getPlacement=function _getPlacement(){var $parentDropdown=$(this._element.parentNode);var placement=AttachmentMap.BOTTOM;if($parentDropdown.hasClass(ClassName.DROPUP)){placement=AttachmentMap.TOP;if($(this._menu).hasClass(ClassName.MENURIGHT)){placement=AttachmentMap.TOPEND;}}else if($parentDropdown.hasClass(ClassName.DROPRIGHT)){placement=AttachmentMap.RIGHT;}else if($parentDropdown.hasClass(ClassName.DROPLEFT)){placement=AttachmentMap.LEFT;}else if($(this._menu).hasClass(ClassName.MENURIGHT)){placement=AttachmentMap.BOTTOMEND;}
return placement;};_proto._detectNavbar=function _detectNavbar(){return $(this._element).closest('.navbar').length>0;};_proto._getOffset=function _getOffset(){var _this2=this;var offset={};if(typeof this._config.offset==='function'){offset.fn=function(data){data.offsets=_objectSpread({},data.offsets,_this2._config.offset(data.offsets,_this2._element)||{});return data;};}else{offset.offset=this._config.offset;}
return offset;};_proto._getPopperConfig=function _getPopperConfig(){var popperConfig={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};if(this._config.display==='static'){popperConfig.modifiers.applyStyle={enabled:false};}
return popperConfig;};Dropdown._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var data=$(this).data(DATA_KEY);var _config=typeof config==='object'?config:null;if(!data){data=new Dropdown(this,_config);$(this).data(DATA_KEY,data);}
if(typeof config==='string'){if(typeof data[config]==='undefined'){throw new TypeError("No method named \""+config+"\"");}
data[config]();}});};Dropdown._clearMenus=function _clearMenus(event){if(event&&(event.which===RIGHT_MOUSE_BUTTON_WHICH||event.type==='keyup'&&event.which!==TAB_KEYCODE)){return;}
var toggles=[].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));for(var i=0,len=toggles.length;i<len;i++){var parent=Dropdown._getParentFromElement(toggles[i]);var context=$(toggles[i]).data(DATA_KEY);var relatedTarget={relatedTarget:toggles[i]};if(event&&event.type==='click'){relatedTarget.clickEvent=event;}
if(!context){continue;}
var dropdownMenu=context._menu;if(!$(parent).hasClass(ClassName.SHOW)){continue;}
if(event&&(event.type==='click'&&/input|textarea/i.test(event.target.tagName)||event.type==='keyup'&&event.which===TAB_KEYCODE)&&$.contains(parent,event.target)){continue;}
var hideEvent=$.Event(Event.HIDE,relatedTarget);$(parent).trigger(hideEvent);if(hideEvent.isDefaultPrevented()){continue;}
if('ontouchstart'in document.documentElement){$(document.body).children().off('mouseover',null,$.noop);}
toggles[i].setAttribute('aria-expanded','false');$(dropdownMenu).removeClass(ClassName.SHOW);$(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN,relatedTarget));}};Dropdown._getParentFromElement=function _getParentFromElement(element){var parent;var selector=Util.getSelectorFromElement(element);if(selector){parent=document.querySelector(selector);}
return parent||element.parentNode;};Dropdown._dataApiKeydownHandler=function _dataApiKeydownHandler(event){if(/input|textarea/i.test(event.target.tagName)?event.which===SPACE_KEYCODE||event.which!==ESCAPE_KEYCODE&&(event.which!==ARROW_DOWN_KEYCODE&&event.which!==ARROW_UP_KEYCODE||$(event.target).closest(Selector.MENU).length):!REGEXP_KEYDOWN.test(event.which)){return;}
event.preventDefault();event.stopPropagation();if(this.disabled||$(this).hasClass(ClassName.DISABLED)){return;}
var parent=Dropdown._getParentFromElement(this);var isActive=$(parent).hasClass(ClassName.SHOW);if(!isActive||isActive&&(event.which===ESCAPE_KEYCODE||event.which===SPACE_KEYCODE)){if(event.which===ESCAPE_KEYCODE){var toggle=parent.querySelector(Selector.DATA_TOGGLE);$(toggle).trigger('focus');}
$(this).trigger('click');return;}
var items=[].slice.call(parent.querySelectorAll(Selector.VISIBLE_ITEMS));if(items.length===0){return;}
var index=items.indexOf(event.target);if(event.which===ARROW_UP_KEYCODE&&index>0){index--;}
if(event.which===ARROW_DOWN_KEYCODE&&index<items.length-1){index++;}
if(index<0){index=0;}
items[index].focus();};_createClass(Dropdown,null,[{key:"VERSION",get:function get(){return VERSION;}},{key:"Default",get:function get(){return Default;}},{key:"DefaultType",get:function get(){return DefaultType;}}]);return Dropdown;}();$(document).on(Event.KEYDOWN_DATA_API,Selector.DATA_TOGGLE,Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API,Selector.MENU,Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API+" "+Event.KEYUP_DATA_API,Dropdown._clearMenus).on(Event.CLICK_DATA_API,Selector.DATA_TOGGLE,function(event){event.preventDefault();event.stopPropagation();Dropdown._jQueryInterface.call($(this),'toggle');}).on(Event.CLICK_DATA_API,Selector.FORM_CHILD,function(e){e.stopPropagation();});$.fn[NAME]=Dropdown._jQueryInterface;$.fn[NAME].Constructor=Dropdown;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Dropdown._jQueryInterface;};return Dropdown;}));;

/* /web/static/lib/bootstrap/js/modal.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=global||self,global.Modal=factory(global.jQuery,global.Util));}(this,function($,Util){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Util=Util&&Util.hasOwnProperty('default')?Util['default']:Util;function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}
return obj;}
function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==='function'){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable;}));}
ownKeys.forEach(function(key){_defineProperty(target,key,source[key]);});}
return target;}
var NAME='modal';var VERSION='4.3.1';var DATA_KEY='bs.modal';var EVENT_KEY="."+DATA_KEY;var DATA_API_KEY='.data-api';var JQUERY_NO_CONFLICT=$.fn[NAME];var ESCAPE_KEYCODE=27;var Default={backdrop:true,keyboard:true,focus:true,show:true};var DefaultType={backdrop:'(boolean|string)',keyboard:'boolean',focus:'boolean',show:'boolean'};var Event={HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY,FOCUSIN:"focusin"+EVENT_KEY,RESIZE:"resize"+EVENT_KEY,CLICK_DISMISS:"click.dismiss"+EVENT_KEY,KEYDOWN_DISMISS:"keydown.dismiss"+EVENT_KEY,MOUSEUP_DISMISS:"mouseup.dismiss"+EVENT_KEY,MOUSEDOWN_DISMISS:"mousedown.dismiss"+EVENT_KEY,CLICK_DATA_API:"click"+EVENT_KEY+DATA_API_KEY};var ClassName={SCROLLABLE:'modal-dialog-scrollable',SCROLLBAR_MEASURER:'modal-scrollbar-measure',BACKDROP:'modal-backdrop',OPEN:'modal-open',FADE:'fade',SHOW:'show'};var Selector={DIALOG:'.modal-dialog',MODAL_BODY:'.modal-body',DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:'.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',STICKY_CONTENT:'.sticky-top'};var Modal=function(){function Modal(element,config){this._config=this._getConfig(config);this._element=element;this._dialog=element.querySelector(Selector.DIALOG);this._backdrop=null;this._isShown=false;this._isBodyOverflowing=false;this._ignoreBackdropClick=false;this._isTransitioning=false;this._scrollbarWidth=0;}
var _proto=Modal.prototype;_proto.toggle=function toggle(relatedTarget){return this._isShown?this.hide():this.show(relatedTarget);};_proto.show=function show(relatedTarget){var _this=this;if(this._isShown||this._isTransitioning){return;}
if($(this._element).hasClass(ClassName.FADE)){this._isTransitioning=true;}
var showEvent=$.Event(Event.SHOW,{relatedTarget:relatedTarget});$(this._element).trigger(showEvent);if(this._isShown||showEvent.isDefaultPrevented()){return;}
this._isShown=true;this._checkScrollbar();this._setScrollbar();this._adjustDialog();this._setEscapeEvent();this._setResizeEvent();$(this._element).on(Event.CLICK_DISMISS,Selector.DATA_DISMISS,function(event){return _this.hide(event);});$(this._dialog).on(Event.MOUSEDOWN_DISMISS,function(){$(_this._element).one(Event.MOUSEUP_DISMISS,function(event){if($(event.target).is(_this._element)){_this._ignoreBackdropClick=true;}});});this._showBackdrop(function(){return _this._showElement(relatedTarget);});};_proto.hide=function hide(event){var _this2=this;if(event){event.preventDefault();}
if(!this._isShown||this._isTransitioning){return;}
var hideEvent=$.Event(Event.HIDE);$(this._element).trigger(hideEvent);if(!this._isShown||hideEvent.isDefaultPrevented()){return;}
this._isShown=false;var transition=$(this._element).hasClass(ClassName.FADE);if(transition){this._isTransitioning=true;}
this._setEscapeEvent();this._setResizeEvent();$(document).off(Event.FOCUSIN);$(this._element).removeClass(ClassName.SHOW);$(this._element).off(Event.CLICK_DISMISS);$(this._dialog).off(Event.MOUSEDOWN_DISMISS);if(transition){var transitionDuration=Util.getTransitionDurationFromElement(this._element);$(this._element).one(Util.TRANSITION_END,function(event){return _this2._hideModal(event);}).emulateTransitionEnd(transitionDuration);}else{this._hideModal();}};_proto.dispose=function dispose(){[window,this._element,this._dialog].forEach(function(htmlElement){return $(htmlElement).off(EVENT_KEY);});$(document).off(Event.FOCUSIN);$.removeData(this._element,DATA_KEY);this._config=null;this._element=null;this._dialog=null;this._backdrop=null;this._isShown=null;this._isBodyOverflowing=null;this._ignoreBackdropClick=null;this._isTransitioning=null;this._scrollbarWidth=null;};_proto.handleUpdate=function handleUpdate(){this._adjustDialog();};_proto._getConfig=function _getConfig(config){config=_objectSpread({},Default,config);Util.typeCheckConfig(NAME,config,DefaultType);return config;};_proto._showElement=function _showElement(relatedTarget){var _this3=this;var transition=$(this._element).hasClass(ClassName.FADE);if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE){document.body.appendChild(this._element);}
this._element.style.display='block';this._element.removeAttribute('aria-hidden');this._element.setAttribute('aria-modal',true);if($(this._dialog).hasClass(ClassName.SCROLLABLE)){this._dialog.querySelector(Selector.MODAL_BODY).scrollTop=0;}else{this._element.scrollTop=0;}
if(transition){Util.reflow(this._element);}
$(this._element).addClass(ClassName.SHOW);if(this._config.focus){this._enforceFocus();}
var shownEvent=$.Event(Event.SHOWN,{relatedTarget:relatedTarget});var transitionComplete=function transitionComplete(){if(_this3._config.focus){_this3._element.focus();}
_this3._isTransitioning=false;$(_this3._element).trigger(shownEvent);};if(transition){var transitionDuration=Util.getTransitionDurationFromElement(this._dialog);$(this._dialog).one(Util.TRANSITION_END,transitionComplete).emulateTransitionEnd(transitionDuration);}else{transitionComplete();}};_proto._enforceFocus=function _enforceFocus(){var _this4=this;$(document).off(Event.FOCUSIN).on(Event.FOCUSIN,function(event){if(document!==event.target&&_this4._element!==event.target&&$(_this4._element).has(event.target).length===0){_this4._element.focus();}});};_proto._setEscapeEvent=function _setEscapeEvent(){var _this5=this;if(this._isShown&&this._config.keyboard){$(this._element).on(Event.KEYDOWN_DISMISS,function(event){if(event.which===ESCAPE_KEYCODE){event.preventDefault();_this5.hide();}});}else if(!this._isShown){$(this._element).off(Event.KEYDOWN_DISMISS);}};_proto._setResizeEvent=function _setResizeEvent(){var _this6=this;if(this._isShown){$(window).on(Event.RESIZE,function(event){return _this6.handleUpdate(event);});}else{$(window).off(Event.RESIZE);}};_proto._hideModal=function _hideModal(){var _this7=this;this._element.style.display='none';this._element.setAttribute('aria-hidden',true);this._element.removeAttribute('aria-modal');this._isTransitioning=false;this._showBackdrop(function(){$(document.body).removeClass(ClassName.OPEN);_this7._resetAdjustments();_this7._resetScrollbar();$(_this7._element).trigger(Event.HIDDEN);});};_proto._removeBackdrop=function _removeBackdrop(){if(this._backdrop){$(this._backdrop).remove();this._backdrop=null;}};_proto._showBackdrop=function _showBackdrop(callback){var _this8=this;var animate=$(this._element).hasClass(ClassName.FADE)?ClassName.FADE:'';if(this._isShown&&this._config.backdrop){this._backdrop=document.createElement('div');this._backdrop.className=ClassName.BACKDROP;if(animate){this._backdrop.classList.add(animate);}
$(this._backdrop).appendTo(document.body);$(this._element).on(Event.CLICK_DISMISS,function(event){if(_this8._ignoreBackdropClick){_this8._ignoreBackdropClick=false;return;}
if(event.target!==event.currentTarget){return;}
if(_this8._config.backdrop==='static'){_this8._element.focus();}else{_this8.hide();}});if(animate){Util.reflow(this._backdrop);}
$(this._backdrop).addClass(ClassName.SHOW);if(!callback){return;}
if(!animate){callback();return;}
var backdropTransitionDuration=Util.getTransitionDurationFromElement(this._backdrop);$(this._backdrop).one(Util.TRANSITION_END,callback).emulateTransitionEnd(backdropTransitionDuration);}else if(!this._isShown&&this._backdrop){$(this._backdrop).removeClass(ClassName.SHOW);var callbackRemove=function callbackRemove(){_this8._removeBackdrop();if(callback){callback();}};if($(this._element).hasClass(ClassName.FADE)){var _backdropTransitionDuration=Util.getTransitionDurationFromElement(this._backdrop);$(this._backdrop).one(Util.TRANSITION_END,callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);}else{callbackRemove();}}else if(callback){callback();}};_proto._adjustDialog=function _adjustDialog(){var isModalOverflowing=this._element.scrollHeight>document.documentElement.clientHeight;if(!this._isBodyOverflowing&&isModalOverflowing){this._element.style.paddingLeft=this._scrollbarWidth+"px";}
if(this._isBodyOverflowing&&!isModalOverflowing){this._element.style.paddingRight=this._scrollbarWidth+"px";}};_proto._resetAdjustments=function _resetAdjustments(){this._element.style.paddingLeft='';this._element.style.paddingRight='';};_proto._checkScrollbar=function _checkScrollbar(){var rect=document.body.getBoundingClientRect();this._isBodyOverflowing=rect.left+rect.right<window.innerWidth;this._scrollbarWidth=this._getScrollbarWidth();};_proto._setScrollbar=function _setScrollbar(){var _this9=this;if(this._isBodyOverflowing){var fixedContent=[].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));var stickyContent=[].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT));$(fixedContent).each(function(index,element){var actualPadding=element.style.paddingRight;var calculatedPadding=$(element).css('padding-right');$(element).data('padding-right',actualPadding).css('padding-right',parseFloat(calculatedPadding)+_this9._scrollbarWidth+"px");});$(stickyContent).each(function(index,element){var actualMargin=element.style.marginRight;var calculatedMargin=$(element).css('margin-right');$(element).data('margin-right',actualMargin).css('margin-right',parseFloat(calculatedMargin)-_this9._scrollbarWidth+"px");});var actualPadding=document.body.style.paddingRight;var calculatedPadding=$(document.body).css('padding-right');$(document.body).data('padding-right',actualPadding).css('padding-right',parseFloat(calculatedPadding)+this._scrollbarWidth+"px");}
$(document.body).addClass(ClassName.OPEN);};_proto._resetScrollbar=function _resetScrollbar(){var fixedContent=[].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));$(fixedContent).each(function(index,element){var padding=$(element).data('padding-right');$(element).removeData('padding-right');element.style.paddingRight=padding?padding:'';});var elements=[].slice.call(document.querySelectorAll(""+Selector.STICKY_CONTENT));$(elements).each(function(index,element){var margin=$(element).data('margin-right');if(typeof margin!=='undefined'){$(element).css('margin-right',margin).removeData('margin-right');}});var padding=$(document.body).data('padding-right');$(document.body).removeData('padding-right');document.body.style.paddingRight=padding?padding:'';};_proto._getScrollbarWidth=function _getScrollbarWidth(){var scrollDiv=document.createElement('div');scrollDiv.className=ClassName.SCROLLBAR_MEASURER;document.body.appendChild(scrollDiv);var scrollbarWidth=scrollDiv.getBoundingClientRect().width-scrollDiv.clientWidth;document.body.removeChild(scrollDiv);return scrollbarWidth;};Modal._jQueryInterface=function _jQueryInterface(config,relatedTarget){return this.each(function(){var data=$(this).data(DATA_KEY);var _config=_objectSpread({},Default,$(this).data(),typeof config==='object'&&config?config:{});if(!data){data=new Modal(this,_config);$(this).data(DATA_KEY,data);}
if(typeof config==='string'){if(typeof data[config]==='undefined'){throw new TypeError("No method named \""+config+"\"");}
data[config](relatedTarget);}else if(_config.show){data.show(relatedTarget);}});};_createClass(Modal,null,[{key:"VERSION",get:function get(){return VERSION;}},{key:"Default",get:function get(){return Default;}}]);return Modal;}();$(document).on(Event.CLICK_DATA_API,Selector.DATA_TOGGLE,function(event){var _this10=this;var target;var selector=Util.getSelectorFromElement(this);if(selector){target=document.querySelector(selector);}
var config=$(target).data(DATA_KEY)?'toggle':_objectSpread({},$(target).data(),$(this).data());if(this.tagName==='A'||this.tagName==='AREA'){event.preventDefault();}
var $target=$(target).one(Event.SHOW,function(showEvent){if(showEvent.isDefaultPrevented()){return;}
$target.one(Event.HIDDEN,function(){if($(_this10).is(':visible')){_this10.focus();}});});Modal._jQueryInterface.call($(target),config,this);});$.fn[NAME]=Modal._jQueryInterface;$.fn[NAME].Constructor=Modal;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Modal._jQueryInterface;};return Modal;}));;

/* /web/static/lib/bootstrap/js/tooltip.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('popper.js'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','popper.js','./util.js'],factory):(global=global||self,global.Tooltip=factory(global.jQuery,global.Popper,global.Util));}(this,function($,Popper,Util){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Popper=Popper&&Popper.hasOwnProperty('default')?Popper['default']:Popper;Util=Util&&Util.hasOwnProperty('default')?Util['default']:Util;function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}
return obj;}
function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==='function'){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable;}));}
ownKeys.forEach(function(key){_defineProperty(target,key,source[key]);});}
return target;}
var uriAttrs=['background','cite','href','itemtype','longdesc','poster','src','xlink:href'];var ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i;var DefaultWhitelist={'*':['class','dir','id','lang','role',ARIA_ATTRIBUTE_PATTERN],a:['target','href','title','rel'],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:['src','alt','title','width','height'],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};var SAFE_URL_PATTERN=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;var DATA_URL_PATTERN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function allowedAttribute(attr,allowedAttributeList){var attrName=attr.nodeName.toLowerCase();if(allowedAttributeList.indexOf(attrName)!==-1){if(uriAttrs.indexOf(attrName)!==-1){return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN)||attr.nodeValue.match(DATA_URL_PATTERN));}
return true;}
var regExp=allowedAttributeList.filter(function(attrRegex){return attrRegex instanceof RegExp;});for(var i=0,l=regExp.length;i<l;i++){if(attrName.match(regExp[i])){return true;}}
return false;}
function sanitizeHtml(unsafeHtml,whiteList,sanitizeFn){if(unsafeHtml.length===0){return unsafeHtml;}
if(sanitizeFn&&typeof sanitizeFn==='function'){return sanitizeFn(unsafeHtml);}
var domParser=new window.DOMParser();var createdDocument=domParser.parseFromString(unsafeHtml,'text/html');var whitelistKeys=Object.keys(whiteList);var elements=[].slice.call(createdDocument.body.querySelectorAll('*'));var _loop=function _loop(i,len){var el=elements[i];var elName=el.nodeName.toLowerCase();if(whitelistKeys.indexOf(el.nodeName.toLowerCase())===-1){el.parentNode.removeChild(el);return"continue";}
var attributeList=[].slice.call(el.attributes);var whitelistedAttributes=[].concat(whiteList['*']||[],whiteList[elName]||[]);attributeList.forEach(function(attr){if(!allowedAttribute(attr,whitelistedAttributes)){el.removeAttribute(attr.nodeName);}});};for(var i=0,len=elements.length;i<len;i++){var _ret=_loop(i,len);if(_ret==="continue")continue;}
return createdDocument.body.innerHTML;}
var NAME='tooltip';var VERSION='4.3.1';var DATA_KEY='bs.tooltip';var EVENT_KEY="."+DATA_KEY;var JQUERY_NO_CONFLICT=$.fn[NAME];var CLASS_PREFIX='bs-tooltip';var BSCLS_PREFIX_REGEX=new RegExp("(^|\\s)"+CLASS_PREFIX+"\\S+",'g');var DISALLOWED_ATTRIBUTES=['sanitize','whiteList','sanitizeFn'];var DefaultType={animation:'boolean',template:'string',title:'(string|element|function)',trigger:'string',delay:'(number|object)',html:'boolean',selector:'(string|boolean)',placement:'(string|function)',offset:'(number|string|function)',container:'(string|element|boolean)',fallbackPlacement:'(string|array)',boundary:'(string|element)',sanitize:'boolean',sanitizeFn:'(null|function)',whiteList:'object'};var AttachmentMap={AUTO:'auto',TOP:'top',RIGHT:'right',BOTTOM:'bottom',LEFT:'left'};var Default={animation:true,template:'<div class="tooltip" role="tooltip">'+'<div class="arrow"></div>'+'<div class="tooltip-inner"></div></div>',trigger:'hover focus',title:'',delay:0,html:false,selector:false,placement:'top',offset:0,container:false,fallbackPlacement:'flip',boundary:'scrollParent',sanitize:true,sanitizeFn:null,whiteList:DefaultWhitelist};var HoverState={SHOW:'show',OUT:'out'};var Event={HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY,INSERTED:"inserted"+EVENT_KEY,CLICK:"click"+EVENT_KEY,FOCUSIN:"focusin"+EVENT_KEY,FOCUSOUT:"focusout"+EVENT_KEY,MOUSEENTER:"mouseenter"+EVENT_KEY,MOUSELEAVE:"mouseleave"+EVENT_KEY};var ClassName={FADE:'fade',SHOW:'show'};var Selector={TOOLTIP:'.tooltip',TOOLTIP_INNER:'.tooltip-inner',ARROW:'.arrow'};var Trigger={HOVER:'hover',FOCUS:'focus',CLICK:'click',MANUAL:'manual'};var Tooltip=function(){function Tooltip(element,config){if(typeof Popper==='undefined'){throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');}
this._isEnabled=true;this._timeout=0;this._hoverState='';this._activeTrigger={};this._popper=null;this.element=element;this.config=this._getConfig(config);this.tip=null;this._setListeners();}
var _proto=Tooltip.prototype;_proto.enable=function enable(){this._isEnabled=true;};_proto.disable=function disable(){this._isEnabled=false;};_proto.toggleEnabled=function toggleEnabled(){this._isEnabled=!this._isEnabled;};_proto.toggle=function toggle(event){if(!this._isEnabled){return;}
if(event){var dataKey=this.constructor.DATA_KEY;var context=$(event.currentTarget).data(dataKey);if(!context){context=new this.constructor(event.currentTarget,this._getDelegateConfig());$(event.currentTarget).data(dataKey,context);}
context._activeTrigger.click=!context._activeTrigger.click;if(context._isWithActiveTrigger()){context._enter(null,context);}else{context._leave(null,context);}}else{if($(this.getTipElement()).hasClass(ClassName.SHOW)){this._leave(null,this);return;}
this._enter(null,this);}};_proto.dispose=function dispose(){clearTimeout(this._timeout);$.removeData(this.element,this.constructor.DATA_KEY);$(this.element).off(this.constructor.EVENT_KEY);$(this.element).closest('.modal').off('hide.bs.modal');if(this.tip){$(this.tip).remove();}
this._isEnabled=null;this._timeout=null;this._hoverState=null;this._activeTrigger=null;if(this._popper!==null){this._popper.destroy();}
this._popper=null;this.element=null;this.config=null;this.tip=null;};_proto.show=function show(){var _this=this;if($(this.element).css('display')==='none'){throw new Error('Please use show on visible elements');}
var showEvent=$.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){$(this.element).trigger(showEvent);var shadowRoot=Util.findShadowRoot(this.element);var isInTheDom=$.contains(shadowRoot!==null?shadowRoot:this.element.ownerDocument.documentElement,this.element);if(showEvent.isDefaultPrevented()||!isInTheDom){return;}
var tip=this.getTipElement();var tipId=Util.getUID(this.constructor.NAME);tip.setAttribute('id',tipId);this.element.setAttribute('aria-describedby',tipId);this.setContent();if(this.config.animation){$(tip).addClass(ClassName.FADE);}
var placement=typeof this.config.placement==='function'?this.config.placement.call(this,tip,this.element):this.config.placement;var attachment=this._getAttachment(placement);this.addAttachmentClass(attachment);var container=this._getContainer();$(tip).data(this.constructor.DATA_KEY,this);if(!$.contains(this.element.ownerDocument.documentElement,this.tip)){$(tip).appendTo(container);}
$(this.element).trigger(this.constructor.Event.INSERTED);this._popper=new Popper(this.element,tip,{placement:attachment,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:Selector.ARROW},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function onCreate(data){if(data.originalPlacement!==data.placement){_this._handlePopperPlacementChange(data);}},onUpdate:function onUpdate(data){return _this._handlePopperPlacementChange(data);}});$(tip).addClass(ClassName.SHOW);if('ontouchstart'in document.documentElement){$(document.body).children().on('mouseover',null,$.noop);}
var complete=function complete(){if(_this.config.animation){_this._fixTransition();}
var prevHoverState=_this._hoverState;_this._hoverState=null;$(_this.element).trigger(_this.constructor.Event.SHOWN);if(prevHoverState===HoverState.OUT){_this._leave(null,_this);}};if($(this.tip).hasClass(ClassName.FADE)){var transitionDuration=Util.getTransitionDurationFromElement(this.tip);$(this.tip).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration);}else{complete();}}};_proto.hide=function hide(callback){var _this2=this;var tip=this.getTipElement();var hideEvent=$.Event(this.constructor.Event.HIDE);var complete=function complete(){if(_this2._hoverState!==HoverState.SHOW&&tip.parentNode){tip.parentNode.removeChild(tip);}
_this2._cleanTipClass();_this2.element.removeAttribute('aria-describedby');$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);if(_this2._popper!==null){_this2._popper.destroy();}
if(callback){callback();}};$(this.element).trigger(hideEvent);if(hideEvent.isDefaultPrevented()){return;}
$(tip).removeClass(ClassName.SHOW);if('ontouchstart'in document.documentElement){$(document.body).children().off('mouseover',null,$.noop);}
this._activeTrigger[Trigger.CLICK]=false;this._activeTrigger[Trigger.FOCUS]=false;this._activeTrigger[Trigger.HOVER]=false;if($(this.tip).hasClass(ClassName.FADE)){var transitionDuration=Util.getTransitionDurationFromElement(tip);$(tip).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration);}else{complete();}
this._hoverState='';};_proto.update=function update(){if(this._popper!==null){this._popper.scheduleUpdate();}};_proto.isWithContent=function isWithContent(){return Boolean(this.getTitle());};_proto.addAttachmentClass=function addAttachmentClass(attachment){$(this.getTipElement()).addClass(CLASS_PREFIX+"-"+attachment);};_proto.getTipElement=function getTipElement(){this.tip=this.tip||$(this.config.template)[0];return this.tip;};_proto.setContent=function setContent(){var tip=this.getTipElement();this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)),this.getTitle());$(tip).removeClass(ClassName.FADE+" "+ClassName.SHOW);};_proto.setElementContent=function setElementContent($element,content){if(typeof content==='object'&&(content.nodeType||content.jquery)){if(this.config.html){if(!$(content).parent().is($element)){$element.empty().append(content);}}else{$element.text($(content).text());}
return;}
if(this.config.html){if(this.config.sanitize){content=sanitizeHtml(content,this.config.whiteList,this.config.sanitizeFn);}
$element.html(content);}else{$element.text(content);}};_proto.getTitle=function getTitle(){var title=this.element.getAttribute('data-original-title');if(!title){title=typeof this.config.title==='function'?this.config.title.call(this.element):this.config.title;}
return title;};_proto._getOffset=function _getOffset(){var _this3=this;var offset={};if(typeof this.config.offset==='function'){offset.fn=function(data){data.offsets=_objectSpread({},data.offsets,_this3.config.offset(data.offsets,_this3.element)||{});return data;};}else{offset.offset=this.config.offset;}
return offset;};_proto._getContainer=function _getContainer(){if(this.config.container===false){return document.body;}
if(Util.isElement(this.config.container)){return $(this.config.container);}
return $(document).find(this.config.container);};_proto._getAttachment=function _getAttachment(placement){return AttachmentMap[placement.toUpperCase()];};_proto._setListeners=function _setListeners(){var _this4=this;var triggers=this.config.trigger.split(' ');triggers.forEach(function(trigger){if(trigger==='click'){$(_this4.element).on(_this4.constructor.Event.CLICK,_this4.config.selector,function(event){return _this4.toggle(event);});}else if(trigger!==Trigger.MANUAL){var eventIn=trigger===Trigger.HOVER?_this4.constructor.Event.MOUSEENTER:_this4.constructor.Event.FOCUSIN;var eventOut=trigger===Trigger.HOVER?_this4.constructor.Event.MOUSELEAVE:_this4.constructor.Event.FOCUSOUT;$(_this4.element).on(eventIn,_this4.config.selector,function(event){return _this4._enter(event);}).on(eventOut,_this4.config.selector,function(event){return _this4._leave(event);});}});$(this.element).closest('.modal').on('hide.bs.modal',function(){if(_this4.element){_this4.hide();}});if(this.config.selector){this.config=_objectSpread({},this.config,{trigger:'manual',selector:''});}else{this._fixTitle();}};_proto._fixTitle=function _fixTitle(){var titleType=typeof this.element.getAttribute('data-original-title');if(this.element.getAttribute('title')||titleType!=='string'){this.element.setAttribute('data-original-title',this.element.getAttribute('title')||'');this.element.setAttribute('title','');}};_proto._enter=function _enter(event,context){var dataKey=this.constructor.DATA_KEY;context=context||$(event.currentTarget).data(dataKey);if(!context){context=new this.constructor(event.currentTarget,this._getDelegateConfig());$(event.currentTarget).data(dataKey,context);}
if(event){context._activeTrigger[event.type==='focusin'?Trigger.FOCUS:Trigger.HOVER]=true;}
if($(context.getTipElement()).hasClass(ClassName.SHOW)||context._hoverState===HoverState.SHOW){context._hoverState=HoverState.SHOW;return;}
clearTimeout(context._timeout);context._hoverState=HoverState.SHOW;if(!context.config.delay||!context.config.delay.show){context.show();return;}
context._timeout=setTimeout(function(){if(context._hoverState===HoverState.SHOW){context.show();}},context.config.delay.show);};_proto._leave=function _leave(event,context){var dataKey=this.constructor.DATA_KEY;context=context||$(event.currentTarget).data(dataKey);if(!context){context=new this.constructor(event.currentTarget,this._getDelegateConfig());$(event.currentTarget).data(dataKey,context);}
if(event){context._activeTrigger[event.type==='focusout'?Trigger.FOCUS:Trigger.HOVER]=false;}
if(context._isWithActiveTrigger()){return;}
clearTimeout(context._timeout);context._hoverState=HoverState.OUT;if(!context.config.delay||!context.config.delay.hide){context.hide();return;}
context._timeout=setTimeout(function(){if(context._hoverState===HoverState.OUT){context.hide();}},context.config.delay.hide);};_proto._isWithActiveTrigger=function _isWithActiveTrigger(){for(var trigger in this._activeTrigger){if(this._activeTrigger[trigger]){return true;}}
return false;};_proto._getConfig=function _getConfig(config){var dataAttributes=$(this.element).data();Object.keys(dataAttributes).forEach(function(dataAttr){if(DISALLOWED_ATTRIBUTES.indexOf(dataAttr)!==-1){delete dataAttributes[dataAttr];}});config=_objectSpread({},this.constructor.Default,dataAttributes,typeof config==='object'&&config?config:{});if(typeof config.delay==='number'){config.delay={show:config.delay,hide:config.delay};}
if(typeof config.title==='number'){config.title=config.title.toString();}
if(typeof config.content==='number'){config.content=config.content.toString();}
Util.typeCheckConfig(NAME,config,this.constructor.DefaultType);if(config.sanitize){config.template=sanitizeHtml(config.template,config.whiteList,config.sanitizeFn);}
return config;};_proto._getDelegateConfig=function _getDelegateConfig(){var config={};if(this.config){for(var key in this.config){if(this.constructor.Default[key]!==this.config[key]){config[key]=this.config[key];}}}
return config;};_proto._cleanTipClass=function _cleanTipClass(){var $tip=$(this.getTipElement());var tabClass=$tip.attr('class').match(BSCLS_PREFIX_REGEX);if(tabClass!==null&&tabClass.length){$tip.removeClass(tabClass.join(''));}};_proto._handlePopperPlacementChange=function _handlePopperPlacementChange(popperData){var popperInstance=popperData.instance;this.tip=popperInstance.popper;this._cleanTipClass();this.addAttachmentClass(this._getAttachment(popperData.placement));};_proto._fixTransition=function _fixTransition(){var tip=this.getTipElement();var initConfigAnimation=this.config.animation;if(tip.getAttribute('x-placement')!==null){return;}
$(tip).removeClass(ClassName.FADE);this.config.animation=false;this.hide();this.show();this.config.animation=initConfigAnimation;};Tooltip._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var data=$(this).data(DATA_KEY);var _config=typeof config==='object'&&config;if(!data&&/dispose|hide/.test(config)){return;}
if(!data){data=new Tooltip(this,_config);$(this).data(DATA_KEY,data);}
if(typeof config==='string'){if(typeof data[config]==='undefined'){throw new TypeError("No method named \""+config+"\"");}
data[config]();}});};_createClass(Tooltip,null,[{key:"VERSION",get:function get(){return VERSION;}},{key:"Default",get:function get(){return Default;}},{key:"NAME",get:function get(){return NAME;}},{key:"DATA_KEY",get:function get(){return DATA_KEY;}},{key:"Event",get:function get(){return Event;}},{key:"EVENT_KEY",get:function get(){return EVENT_KEY;}},{key:"DefaultType",get:function get(){return DefaultType;}}]);return Tooltip;}();$.fn[NAME]=Tooltip._jQueryInterface;$.fn[NAME].Constructor=Tooltip;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Tooltip._jQueryInterface;};return Tooltip;}));;

/* /web/static/lib/bootstrap/js/popover.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./tooltip.js')):typeof define==='function'&&define.amd?define(['jquery','./tooltip.js'],factory):(global=global||self,global.Popover=factory(global.jQuery,global.Tooltip));}(this,function($,Tooltip){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Tooltip=Tooltip&&Tooltip.hasOwnProperty('default')?Tooltip['default']:Tooltip;function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}
return obj;}
function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==='function'){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable;}));}
ownKeys.forEach(function(key){_defineProperty(target,key,source[key]);});}
return target;}
function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass;}
var NAME='popover';var VERSION='4.3.1';var DATA_KEY='bs.popover';var EVENT_KEY="."+DATA_KEY;var JQUERY_NO_CONFLICT=$.fn[NAME];var CLASS_PREFIX='bs-popover';var BSCLS_PREFIX_REGEX=new RegExp("(^|\\s)"+CLASS_PREFIX+"\\S+",'g');var Default=_objectSpread({},Tooltip.Default,{placement:'right',trigger:'click',content:'',template:'<div class="popover" role="tooltip">'+'<div class="arrow"></div>'+'<h3 class="popover-header"></h3>'+'<div class="popover-body"></div></div>'});var DefaultType=_objectSpread({},Tooltip.DefaultType,{content:'(string|element|function)'});var ClassName={FADE:'fade',SHOW:'show'};var Selector={TITLE:'.popover-header',CONTENT:'.popover-body'};var Event={HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY,INSERTED:"inserted"+EVENT_KEY,CLICK:"click"+EVENT_KEY,FOCUSIN:"focusin"+EVENT_KEY,FOCUSOUT:"focusout"+EVENT_KEY,MOUSEENTER:"mouseenter"+EVENT_KEY,MOUSELEAVE:"mouseleave"+EVENT_KEY};var Popover=function(_Tooltip){_inheritsLoose(Popover,_Tooltip);function Popover(){return _Tooltip.apply(this,arguments)||this;}
var _proto=Popover.prototype;_proto.isWithContent=function isWithContent(){return this.getTitle()||this._getContent();};_proto.addAttachmentClass=function addAttachmentClass(attachment){$(this.getTipElement()).addClass(CLASS_PREFIX+"-"+attachment);};_proto.getTipElement=function getTipElement(){this.tip=this.tip||$(this.config.template)[0];return this.tip;};_proto.setContent=function setContent(){var $tip=$(this.getTipElement());this.setElementContent($tip.find(Selector.TITLE),this.getTitle());var content=this._getContent();if(typeof content==='function'){content=content.call(this.element);}
this.setElementContent($tip.find(Selector.CONTENT),content);$tip.removeClass(ClassName.FADE+" "+ClassName.SHOW);};_proto._getContent=function _getContent(){return this.element.getAttribute('data-content')||this.config.content;};_proto._cleanTipClass=function _cleanTipClass(){var $tip=$(this.getTipElement());var tabClass=$tip.attr('class').match(BSCLS_PREFIX_REGEX);if(tabClass!==null&&tabClass.length>0){$tip.removeClass(tabClass.join(''));}};Popover._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var data=$(this).data(DATA_KEY);var _config=typeof config==='object'?config:null;if(!data&&/dispose|hide/.test(config)){return;}
if(!data){data=new Popover(this,_config);$(this).data(DATA_KEY,data);}
if(typeof config==='string'){if(typeof data[config]==='undefined'){throw new TypeError("No method named \""+config+"\"");}
data[config]();}});};_createClass(Popover,null,[{key:"VERSION",get:function get(){return VERSION;}},{key:"Default",get:function get(){return Default;}},{key:"NAME",get:function get(){return NAME;}},{key:"DATA_KEY",get:function get(){return DATA_KEY;}},{key:"Event",get:function get(){return Event;}},{key:"EVENT_KEY",get:function get(){return EVENT_KEY;}},{key:"DefaultType",get:function get(){return DefaultType;}}]);return Popover;}(Tooltip);$.fn[NAME]=Popover._jQueryInterface;$.fn[NAME].Constructor=Popover;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Popover._jQueryInterface;};return Popover;}));;

/* /web/static/lib/bootstrap/js/scrollspy.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=global||self,global.ScrollSpy=factory(global.jQuery,global.Util));}(this,function($,Util){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Util=Util&&Util.hasOwnProperty('default')?Util['default']:Util;function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}
return obj;}
function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==='function'){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable;}));}
ownKeys.forEach(function(key){_defineProperty(target,key,source[key]);});}
return target;}
var NAME='scrollspy';var VERSION='4.3.1';var DATA_KEY='bs.scrollspy';var EVENT_KEY="."+DATA_KEY;var DATA_API_KEY='.data-api';var JQUERY_NO_CONFLICT=$.fn[NAME];var Default={offset:10,method:'auto',target:''};var DefaultType={offset:'number',method:'string',target:'(string|element)'};var Event={ACTIVATE:"activate"+EVENT_KEY,SCROLL:"scroll"+EVENT_KEY,LOAD_DATA_API:"load"+EVENT_KEY+DATA_API_KEY};var ClassName={DROPDOWN_ITEM:'dropdown-item',DROPDOWN_MENU:'dropdown-menu',ACTIVE:'active'};var Selector={DATA_SPY:'[data-spy="scroll"]',ACTIVE:'.active',NAV_LIST_GROUP:'.nav, .list-group',NAV_LINKS:'.nav-link',NAV_ITEMS:'.nav-item',LIST_ITEMS:'.list-group-item',DROPDOWN:'.dropdown',DROPDOWN_ITEMS:'.dropdown-item',DROPDOWN_TOGGLE:'.dropdown-toggle'};var OffsetMethod={OFFSET:'offset',POSITION:'position'};var ScrollSpy=function(){function ScrollSpy(element,config){var _this=this;this._element=element;this._scrollElement=element.tagName==='BODY'?window:element;this._config=this._getConfig(config);this._selector=this._config.target+" "+Selector.NAV_LINKS+","+(this._config.target+" "+Selector.LIST_ITEMS+",")+(this._config.target+" "+Selector.DROPDOWN_ITEMS);this._offsets=[];this._targets=[];this._activeTarget=null;this._scrollHeight=0;$(this._scrollElement).on(Event.SCROLL,function(event){return _this._process(event);});this.refresh();this._process();}
var _proto=ScrollSpy.prototype;_proto.refresh=function refresh(){var _this2=this;var autoMethod=this._scrollElement===this._scrollElement.window?OffsetMethod.OFFSET:OffsetMethod.POSITION;var offsetMethod=this._config.method==='auto'?autoMethod:this._config.method;var offsetBase=offsetMethod===OffsetMethod.POSITION?this._getScrollTop():0;this._offsets=[];this._targets=[];this._scrollHeight=this._getScrollHeight();var targets=[].slice.call(document.querySelectorAll(this._selector));targets.map(function(element){var target;var targetSelector=Util.getSelectorFromElement(element);if(targetSelector){target=document.querySelector(targetSelector);}
if(target){var targetBCR=target.getBoundingClientRect();if(targetBCR.width||targetBCR.height){return[$(target)[offsetMethod]().top+offsetBase,targetSelector];}}
return null;}).filter(function(item){return item;}).sort(function(a,b){return a[0]-b[0];}).forEach(function(item){_this2._offsets.push(item[0]);_this2._targets.push(item[1]);});};_proto.dispose=function dispose(){$.removeData(this._element,DATA_KEY);$(this._scrollElement).off(EVENT_KEY);this._element=null;this._scrollElement=null;this._config=null;this._selector=null;this._offsets=null;this._targets=null;this._activeTarget=null;this._scrollHeight=null;};_proto._getConfig=function _getConfig(config){config=_objectSpread({},Default,typeof config==='object'&&config?config:{});if(typeof config.target!=='string'){var id=$(config.target).attr('id');if(!id){id=Util.getUID(NAME);$(config.target).attr('id',id);}
config.target="#"+id;}
Util.typeCheckConfig(NAME,config,DefaultType);return config;};_proto._getScrollTop=function _getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop;};_proto._getScrollHeight=function _getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);};_proto._getOffsetHeight=function _getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height;};_proto._process=function _process(){var scrollTop=this._getScrollTop()+this._config.offset;var scrollHeight=this._getScrollHeight();var maxScroll=this._config.offset+scrollHeight-this._getOffsetHeight();if(this._scrollHeight!==scrollHeight){this.refresh();}
if(scrollTop>=maxScroll){var target=this._targets[this._targets.length-1];if(this._activeTarget!==target){this._activate(target);}
return;}
if(this._activeTarget&&scrollTop<this._offsets[0]&&this._offsets[0]>0){this._activeTarget=null;this._clear();return;}
var offsetLength=this._offsets.length;for(var i=offsetLength;i--;){var isActiveTarget=this._activeTarget!==this._targets[i]&&scrollTop>=this._offsets[i]&&(typeof this._offsets[i+1]==='undefined'||scrollTop<this._offsets[i+1]);if(isActiveTarget){this._activate(this._targets[i]);}}};_proto._activate=function _activate(target){this._activeTarget=target;this._clear();var queries=this._selector.split(',').map(function(selector){return selector+"[data-target=\""+target+"\"],"+selector+"[href=\""+target+"\"]";});var $link=$([].slice.call(document.querySelectorAll(queries.join(','))));if($link.hasClass(ClassName.DROPDOWN_ITEM)){$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);$link.addClass(ClassName.ACTIVE);}else{$link.addClass(ClassName.ACTIVE);$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS+", "+Selector.LIST_ITEMS).addClass(ClassName.ACTIVE);$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);}
$(this._scrollElement).trigger(Event.ACTIVATE,{relatedTarget:target});};_proto._clear=function _clear(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(node){return node.classList.contains(ClassName.ACTIVE);}).forEach(function(node){return node.classList.remove(ClassName.ACTIVE);});};ScrollSpy._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var data=$(this).data(DATA_KEY);var _config=typeof config==='object'&&config;if(!data){data=new ScrollSpy(this,_config);$(this).data(DATA_KEY,data);}
if(typeof config==='string'){if(typeof data[config]==='undefined'){throw new TypeError("No method named \""+config+"\"");}
data[config]();}});};_createClass(ScrollSpy,null,[{key:"VERSION",get:function get(){return VERSION;}},{key:"Default",get:function get(){return Default;}}]);return ScrollSpy;}();$(window).on(Event.LOAD_DATA_API,function(){var scrollSpys=[].slice.call(document.querySelectorAll(Selector.DATA_SPY));var scrollSpysLength=scrollSpys.length;for(var i=scrollSpysLength;i--;){var $spy=$(scrollSpys[i]);ScrollSpy._jQueryInterface.call($spy,$spy.data());}});$.fn[NAME]=ScrollSpy._jQueryInterface;$.fn[NAME].Constructor=ScrollSpy;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return ScrollSpy._jQueryInterface;};return ScrollSpy;}));;

/* /web/static/lib/bootstrap/js/tab.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=global||self,global.Tab=factory(global.jQuery,global.Util));}(this,function($,Util){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Util=Util&&Util.hasOwnProperty('default')?Util['default']:Util;function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
var NAME='tab';var VERSION='4.3.1';var DATA_KEY='bs.tab';var EVENT_KEY="."+DATA_KEY;var DATA_API_KEY='.data-api';var JQUERY_NO_CONFLICT=$.fn[NAME];var Event={HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY,CLICK_DATA_API:"click"+EVENT_KEY+DATA_API_KEY};var ClassName={DROPDOWN_MENU:'dropdown-menu',ACTIVE:'active',DISABLED:'disabled',FADE:'fade',SHOW:'show'};var Selector={DROPDOWN:'.dropdown',NAV_LIST_GROUP:'.nav, .list-group',ACTIVE:'.active',ACTIVE_UL:'> li > .active',DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:'.dropdown-toggle',DROPDOWN_ACTIVE_CHILD:'> .dropdown-menu .active'};var Tab=function(){function Tab(element){this._element=element;}
var _proto=Tab.prototype;_proto.show=function show(){var _this=this;if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&$(this._element).hasClass(ClassName.ACTIVE)||$(this._element).hasClass(ClassName.DISABLED)){return;}
var target;var previous;var listElement=$(this._element).closest(Selector.NAV_LIST_GROUP)[0];var selector=Util.getSelectorFromElement(this._element);if(listElement){var itemSelector=listElement.nodeName==='UL'||listElement.nodeName==='OL'?Selector.ACTIVE_UL:Selector.ACTIVE;previous=$.makeArray($(listElement).find(itemSelector));previous=previous[previous.length-1];}
var hideEvent=$.Event(Event.HIDE,{relatedTarget:this._element});var showEvent=$.Event(Event.SHOW,{relatedTarget:previous});if(previous){$(previous).trigger(hideEvent);}
$(this._element).trigger(showEvent);if(showEvent.isDefaultPrevented()||hideEvent.isDefaultPrevented()){return;}
if(selector){target=document.querySelector(selector);}
this._activate(this._element,listElement);var complete=function complete(){var hiddenEvent=$.Event(Event.HIDDEN,{relatedTarget:_this._element});var shownEvent=$.Event(Event.SHOWN,{relatedTarget:previous});$(previous).trigger(hiddenEvent);$(_this._element).trigger(shownEvent);};if(target){this._activate(target,target.parentNode,complete);}else{complete();}};_proto.dispose=function dispose(){$.removeData(this._element,DATA_KEY);this._element=null;};_proto._activate=function _activate(element,container,callback){var _this2=this;var activeElements=container&&(container.nodeName==='UL'||container.nodeName==='OL')?$(container).find(Selector.ACTIVE_UL):$(container).children(Selector.ACTIVE);var active=activeElements[0];var isTransitioning=callback&&active&&$(active).hasClass(ClassName.FADE);var complete=function complete(){return _this2._transitionComplete(element,active,callback);};if(active&&isTransitioning){var transitionDuration=Util.getTransitionDurationFromElement(active);$(active).removeClass(ClassName.SHOW).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration);}else{complete();}};_proto._transitionComplete=function _transitionComplete(element,active,callback){if(active){$(active).removeClass(ClassName.ACTIVE);var dropdownChild=$(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];if(dropdownChild){$(dropdownChild).removeClass(ClassName.ACTIVE);}
if(active.getAttribute('role')==='tab'){active.setAttribute('aria-selected',false);}}
$(element).addClass(ClassName.ACTIVE);if(element.getAttribute('role')==='tab'){element.setAttribute('aria-selected',true);}
Util.reflow(element);if(element.classList.contains(ClassName.FADE)){element.classList.add(ClassName.SHOW);}
if(element.parentNode&&$(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)){var dropdownElement=$(element).closest(Selector.DROPDOWN)[0];if(dropdownElement){var dropdownToggleList=[].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE));$(dropdownToggleList).addClass(ClassName.ACTIVE);}
element.setAttribute('aria-expanded',true);}
if(callback){callback();}};Tab._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var $this=$(this);var data=$this.data(DATA_KEY);if(!data){data=new Tab(this);$this.data(DATA_KEY,data);}
if(typeof config==='string'){if(typeof data[config]==='undefined'){throw new TypeError("No method named \""+config+"\"");}
data[config]();}});};_createClass(Tab,null,[{key:"VERSION",get:function get(){return VERSION;}}]);return Tab;}();$(document).on(Event.CLICK_DATA_API,Selector.DATA_TOGGLE,function(event){event.preventDefault();Tab._jQueryInterface.call($(this),'show');});$.fn[NAME]=Tab._jQueryInterface;$.fn[NAME].Constructor=Tab;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Tab._jQueryInterface;};return Tab;}));;

/* /web/static/lib/bootstrap/js/toast.js defined in bundle 'web.assets_common' */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=global||self,global.Toast=factory(global.jQuery,global.Util));}(this,function($,Util){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Util=Util&&Util.hasOwnProperty('default')?Util['default']:Util;function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}
return obj;}
function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==='function'){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable;}));}
ownKeys.forEach(function(key){_defineProperty(target,key,source[key]);});}
return target;}
var NAME='toast';var VERSION='4.3.1';var DATA_KEY='bs.toast';var EVENT_KEY="."+DATA_KEY;var JQUERY_NO_CONFLICT=$.fn[NAME];var Event={CLICK_DISMISS:"click.dismiss"+EVENT_KEY,HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY};var ClassName={FADE:'fade',HIDE:'hide',SHOW:'show',SHOWING:'showing'};var DefaultType={animation:'boolean',autohide:'boolean',delay:'number'};var Default={animation:true,autohide:true,delay:500};var Selector={DATA_DISMISS:'[data-dismiss="toast"]'};var Toast=function(){function Toast(element,config){this._element=element;this._config=this._getConfig(config);this._timeout=null;this._setListeners();}
var _proto=Toast.prototype;_proto.show=function show(){var _this=this;$(this._element).trigger(Event.SHOW);if(this._config.animation){this._element.classList.add(ClassName.FADE);}
var complete=function complete(){_this._element.classList.remove(ClassName.SHOWING);_this._element.classList.add(ClassName.SHOW);$(_this._element).trigger(Event.SHOWN);if(_this._config.autohide){_this.hide();}};this._element.classList.remove(ClassName.HIDE);this._element.classList.add(ClassName.SHOWING);if(this._config.animation){var transitionDuration=Util.getTransitionDurationFromElement(this._element);$(this._element).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration);}else{complete();}};_proto.hide=function hide(withoutTimeout){var _this2=this;if(!this._element.classList.contains(ClassName.SHOW)){return;}
$(this._element).trigger(Event.HIDE);if(withoutTimeout){this._close();}else{this._timeout=setTimeout(function(){_this2._close();},this._config.delay);}};_proto.dispose=function dispose(){clearTimeout(this._timeout);this._timeout=null;if(this._element.classList.contains(ClassName.SHOW)){this._element.classList.remove(ClassName.SHOW);}
$(this._element).off(Event.CLICK_DISMISS);$.removeData(this._element,DATA_KEY);this._element=null;this._config=null;};_proto._getConfig=function _getConfig(config){config=_objectSpread({},Default,$(this._element).data(),typeof config==='object'&&config?config:{});Util.typeCheckConfig(NAME,config,this.constructor.DefaultType);return config;};_proto._setListeners=function _setListeners(){var _this3=this;$(this._element).on(Event.CLICK_DISMISS,Selector.DATA_DISMISS,function(){return _this3.hide(true);});};_proto._close=function _close(){var _this4=this;var complete=function complete(){_this4._element.classList.add(ClassName.HIDE);$(_this4._element).trigger(Event.HIDDEN);};this._element.classList.remove(ClassName.SHOW);if(this._config.animation){var transitionDuration=Util.getTransitionDurationFromElement(this._element);$(this._element).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration);}else{complete();}};Toast._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var $element=$(this);var data=$element.data(DATA_KEY);var _config=typeof config==='object'&&config;if(!data){data=new Toast(this,_config);$element.data(DATA_KEY,data);}
if(typeof config==='string'){if(typeof data[config]==='undefined'){throw new TypeError("No method named \""+config+"\"");}
data[config](this);}});};_createClass(Toast,null,[{key:"VERSION",get:function get(){return VERSION;}},{key:"DefaultType",get:function get(){return DefaultType;}},{key:"Default",get:function get(){return Default;}}]);return Toast;}();$.fn[NAME]=Toast._jQueryInterface;$.fn[NAME].Constructor=Toast;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Toast._jQueryInterface;};return Toast;}));;

/* /web/static/lib/tempusdominus/tempusdominus.js defined in bundle 'web.assets_common' */
if(typeof jQuery==='undefined'){throw new Error('Tempus Dominus Bootstrap4\'s requires jQuery. jQuery must be included before Tempus Dominus Bootstrap4\'s JavaScript.');}
+function($){var version=$.fn.jquery.split(' ')[0].split('.');if((version[0]<2&&version[1]<9)||(version[0]===1&&version[1]===9&&version[2]<1)||(version[0]>=4)){throw new Error('Tempus Dominus Bootstrap4\'s requires at least jQuery v3.0.0 but less than v4.0.0');}}(jQuery);if(typeof moment==='undefined'){throw new Error('Tempus Dominus Bootstrap4\'s requires moment.js. Moment.js must be included before Tempus Dominus Bootstrap4\'s JavaScript.');}
var version=moment.version.split('.')
if((version[0]<=2&&version[1]<17)||(version[0]>=3)){throw new Error('Tempus Dominus Bootstrap4\'s requires at least moment.js v2.17.0 but less than v3.0.0');}
+function(){var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}
function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
var DateTimePicker=function($,moment){var NAME='datetimepicker',DATA_KEY=''+NAME,EVENT_KEY='.'+DATA_KEY,DATA_API_KEY='.data-api',Selector={DATA_TOGGLE:'[data-toggle="'+DATA_KEY+'"]'},ClassName={INPUT:NAME+'-input'},Event={CHANGE:'change'+EVENT_KEY,BLUR:'blur'+EVENT_KEY,KEYUP:'keyup'+EVENT_KEY,KEYDOWN:'keydown'+EVENT_KEY,FOCUS:'focus'+EVENT_KEY,CLICK_DATA_API:'click'+EVENT_KEY+DATA_API_KEY,UPDATE:'update'+EVENT_KEY,ERROR:'error'+EVENT_KEY,HIDE:'hide'+EVENT_KEY,SHOW:'show'+EVENT_KEY},DatePickerModes=[{CLASS_NAME:'days',NAV_FUNCTION:'M',NAV_STEP:1},{CLASS_NAME:'months',NAV_FUNCTION:'y',NAV_STEP:1},{CLASS_NAME:'years',NAV_FUNCTION:'y',NAV_STEP:10},{CLASS_NAME:'decades',NAV_FUNCTION:'y',NAV_STEP:100}],KeyMap={'up':38,38:'up','down':40,40:'down','left':37,37:'left','right':39,39:'right','tab':9,9:'tab','escape':27,27:'escape','enter':13,13:'enter','pageUp':33,33:'pageUp','pageDown':34,34:'pageDown','shift':16,16:'shift','control':17,17:'control','space':32,32:'space','t':84,84:'t','delete':46,46:'delete'},ViewModes=['times','days','months','years','decades'],keyState={},keyPressHandled={};var MinViewModeNumber=0,Default={timeZone:'',format:false,dayViewHeaderFormat:'MMMM YYYY',extraFormats:false,stepping:1,minDate:false,maxDate:false,useCurrent:true,collapse:true,locale:moment.locale(),defaultDate:false,disabledDates:false,enabledDates:false,icons:{time:'fa fa-clock-o',date:'fa fa-calendar',up:'fa fa-arrow-up',down:'fa fa-arrow-down',previous:'fa fa-chevron-left',next:'fa fa-chevron-right',today:'fa fa-calendar-check-o',clear:'fa fa-delete',close:'fa fa-times'},tooltips:{today:'Go to today',clear:'Clear selection',close:'Close the picker',selectMonth:'Select Month',prevMonth:'Previous Month',nextMonth:'Next Month',selectYear:'Select Year',prevYear:'Previous Year',nextYear:'Next Year',selectDecade:'Select Decade',prevDecade:'Previous Decade',nextDecade:'Next Decade',prevCentury:'Previous Century',nextCentury:'Next Century',pickHour:'Pick Hour',incrementHour:'Increment Hour',decrementHour:'Decrement Hour',pickMinute:'Pick Minute',incrementMinute:'Increment Minute',decrementMinute:'Decrement Minute',pickSecond:'Pick Second',incrementSecond:'Increment Second',decrementSecond:'Decrement Second',togglePeriod:'Toggle Period',selectTime:'Select Time',selectDate:'Select Date'},useStrict:false,sideBySide:false,daysOfWeekDisabled:false,calendarWeeks:false,viewMode:'days',toolbarPlacement:'default',buttons:{showToday:false,showClear:false,showClose:false},widgetPositioning:{horizontal:'auto',vertical:'auto'},widgetParent:null,ignoreReadonly:false,keepOpen:false,focusOnShow:true,inline:false,keepInvalid:false,keyBinds:{up:function up(){if(!this.widget){return false;}
var d=this._dates[0]||this.getMoment();if(this.widget.find('.datepicker').is(':visible')){this.date(d.clone().subtract(7,'d'));}else{this.date(d.clone().add(this.stepping(),'m'));}
return true;},down:function down(){if(!this.widget){this.show();return false;}
var d=this._dates[0]||this.getMoment();if(this.widget.find('.datepicker').is(':visible')){this.date(d.clone().add(7,'d'));}else{this.date(d.clone().subtract(this.stepping(),'m'));}
return true;},'control up':function controlUp(){if(!this.widget){return false;}
var d=this._dates[0]||this.getMoment();if(this.widget.find('.datepicker').is(':visible')){this.date(d.clone().subtract(1,'y'));}else{this.date(d.clone().add(1,'h'));}
return true;},'control down':function controlDown(){if(!this.widget){return false;}
var d=this._dates[0]||this.getMoment();if(this.widget.find('.datepicker').is(':visible')){this.date(d.clone().add(1,'y'));}else{this.date(d.clone().subtract(1,'h'));}
return true;},left:function left(){if(!this.widget){return false;}
var d=this._dates[0]||this.getMoment();if(this.widget.find('.datepicker').is(':visible')){this.date(d.clone().subtract(1,'d'));}
return true;},right:function right(){if(!this.widget){return false;}
var d=this._dates[0]||this.getMoment();if(this.widget.find('.datepicker').is(':visible')){this.date(d.clone().add(1,'d'));}
return true;},pageUp:function pageUp(){if(!this.widget){return false;}
var d=this._dates[0]||this.getMoment();if(this.widget.find('.datepicker').is(':visible')){this.date(d.clone().subtract(1,'M'));}
return true;},pageDown:function pageDown(){if(!this.widget){return false;}
var d=this._dates[0]||this.getMoment();if(this.widget.find('.datepicker').is(':visible')){this.date(d.clone().add(1,'M'));}
return true;},enter:function enter(){if(!this.widget){return false;}
this.hide();return true;},escape:function escape(){if(!this.widget){return false;}
this.hide();return true;},'control space':function controlSpace(){if(!this.widget){return false;}
if(this.widget.find('.timepicker').is(':visible')){this.widget.find('.btn[data-action="togglePeriod"]').click();}
return true;},t:function t(){if(!this.widget){return false;}
this.date(this.getMoment());return true;},'delete':function _delete(){if(!this.widget){return false;}
this.clear();return true;}},debug:false,allowInputToggle:false,disabledTimeIntervals:false,disabledHours:false,enabledHours:false,viewDate:false,allowMultidate:false,multidateSeparator:','};var DateTimePicker=function(){function DateTimePicker(element,options){_classCallCheck(this,DateTimePicker);this._options=this._getOptions(options);this._element=element;this._dates=[];this._datesFormatted=[];this._viewDate=null;this.unset=true;this.component=false;this.widget=false;this.use24Hours=null;this.actualFormat=null;this.parseFormats=null;this.currentViewMode=null;this._int();}
DateTimePicker.prototype._int=function _int(){var targetInput=this._element.data('target-input');if(this._element.is('input')){this.input=this._element;}else if(targetInput!==undefined){if(targetInput==='nearest'){this.input=this._element.find('input');}else{this.input=$(targetInput);}}
this._dates=[];this._dates[0]=this.getMoment();this._viewDate=this.getMoment().clone();$.extend(true,this._options,this._dataToOptions());this.options(this._options);this._initFormatting();if(this.input!==undefined&&this.input.is('input')&&this.input.val().trim().length!==0){this._setValue(this._parseInputDate(this.input.val().trim()),0);}else if(this._options.defaultDate&&this.input!==undefined&&this.input.attr('placeholder')===undefined){this._setValue(this._options.defaultDate,0);}
if(this._options.inline){this.show();}};DateTimePicker.prototype._update=function _update(){if(!this.widget){return;}
this._fillDate();this._fillTime();};DateTimePicker.prototype._setValue=function _setValue(targetMoment,index){var oldDate=this.unset?null:this._dates[index];var outpValue='';if(!targetMoment){if(!this._options.allowMultidate||this._dates.length===1){this.unset=true;this._dates=[];this._datesFormatted=[];}else{outpValue=this._element.data('date')+',';outpValue=outpValue.replace(oldDate.format(this.actualFormat)+',','').replace(',,','').replace(/,\s*$/,'');this._dates.splice(index,1);this._datesFormatted.splice(index,1);}
if(this.input!==undefined){this.input.val(outpValue);this.input.trigger('input');}
this._element.data('date',outpValue);this._notifyEvent({type:DateTimePicker.Event.CHANGE,date:false,oldDate:oldDate});this._update();return;}
targetMoment=targetMoment.clone().locale(this._options.locale);if(this._hasTimeZone()){targetMoment.tz(this._options.timeZone);}
if(this._options.stepping!==1){targetMoment.minutes(Math.round(targetMoment.minutes()/this._options.stepping)*this._options.stepping).seconds(0);}
if(this._isValid(targetMoment)){this._dates[index]=targetMoment;this._datesFormatted[index]=targetMoment.format('YYYY-MM-DD');this._viewDate=targetMoment.clone();if(this._options.allowMultidate&&this._dates.length>1){for(var i=0;i<this._dates.length;i++){outpValue+=''+this._dates[i].format(this.actualFormat)+this._options.multidateSeparator;}
outpValue=outpValue.replace(/,\s*$/,'');}else{outpValue=this._dates[index].format(this.actualFormat);}
if(this.input!==undefined){this.input.val(outpValue);this.input.trigger('input');}
this._element.data('date',outpValue);this.unset=false;this._update();this._notifyEvent({type:DateTimePicker.Event.CHANGE,date:this._dates[index].clone(),oldDate:oldDate});}else{if(!this._options.keepInvalid){if(this.input!==undefined){this.input.val(''+(this.unset?'':this._dates[index].format(this.actualFormat)));this.input.trigger('input');}}else{this._notifyEvent({type:DateTimePicker.Event.CHANGE,date:targetMoment,oldDate:oldDate});}
this._notifyEvent({type:DateTimePicker.Event.ERROR,date:targetMoment,oldDate:oldDate});}};DateTimePicker.prototype._change=function _change(e){var val=$(e.target).val().trim(),parsedDate=val?this._parseInputDate(val):null;this._setValue(parsedDate);e.stopImmediatePropagation();return false;};DateTimePicker.prototype._getOptions=function _getOptions(options){options=$.extend(true,{},Default,options);return options;};DateTimePicker.prototype._hasTimeZone=function _hasTimeZone(){return moment.tz!==undefined&&this._options.timeZone!==undefined&&this._options.timeZone!==null&&this._options.timeZone!=='';};DateTimePicker.prototype._isEnabled=function _isEnabled(granularity){if(typeof granularity!=='string'||granularity.length>1){throw new TypeError('isEnabled expects a single character string parameter');}
switch(granularity){case'y':return this.actualFormat.indexOf('Y')!==-1;case'M':return this.actualFormat.indexOf('M')!==-1;case'd':return this.actualFormat.toLowerCase().indexOf('d')!==-1;case'h':case'H':return this.actualFormat.toLowerCase().indexOf('h')!==-1;case'm':return this.actualFormat.indexOf('m')!==-1;case's':return this.actualFormat.indexOf('s')!==-1;case'a':case'A':return this.actualFormat.toLowerCase().indexOf('a')!==-1;default:return false;}};DateTimePicker.prototype._hasTime=function _hasTime(){return this._isEnabled('h')||this._isEnabled('m')||this._isEnabled('s');};DateTimePicker.prototype._hasDate=function _hasDate(){return this._isEnabled('y')||this._isEnabled('M')||this._isEnabled('d');};DateTimePicker.prototype._dataToOptions=function _dataToOptions(){var eData=this._element.data();var dataOptions={};if(eData.dateOptions&&eData.dateOptions instanceof Object){dataOptions=$.extend(true,dataOptions,eData.dateOptions);}
$.each(this._options,function(key){var attributeName='date'+key.charAt(0).toUpperCase()+key.slice(1);if(eData[attributeName]!==undefined){dataOptions[key]=eData[attributeName];}else{delete dataOptions[key];}});return dataOptions;};DateTimePicker.prototype._notifyEvent=function _notifyEvent(e){if(e.type===DateTimePicker.Event.CHANGE){if(!e.date&&!e.oldDate){return;}
var bothUTC=e.date&&e.oldDate&&e.date._isUTC===e.oldDate._isUTC;if(bothUTC&&e.date.isSame(e.oldDate)){return;}}
this._element.trigger(e);};DateTimePicker.prototype._viewUpdate=function _viewUpdate(e){if(e==='y'){e='YYYY';}
this._notifyEvent({type:DateTimePicker.Event.UPDATE,change:e,viewDate:this._viewDate.clone()});};DateTimePicker.prototype._showMode=function _showMode(dir){if(!this.widget){return;}
if(dir){this.currentViewMode=Math.max(MinViewModeNumber,Math.min(3,this.currentViewMode+dir));}
this.widget.find('.datepicker > div').hide().filter('.datepicker-'+DatePickerModes[this.currentViewMode].CLASS_NAME).show();};DateTimePicker.prototype._isInDisabledDates=function _isInDisabledDates(testDate){return this._options.disabledDates[testDate.format('YYYY-MM-DD')]===true;};DateTimePicker.prototype._isInEnabledDates=function _isInEnabledDates(testDate){return this._options.enabledDates[testDate.format('YYYY-MM-DD')]===true;};DateTimePicker.prototype._isInDisabledHours=function _isInDisabledHours(testDate){return this._options.disabledHours[testDate.format('H')]===true;};DateTimePicker.prototype._isInEnabledHours=function _isInEnabledHours(testDate){return this._options.enabledHours[testDate.format('H')]===true;};DateTimePicker.prototype._isValid=function _isValid(targetMoment,granularity){if(!targetMoment.isValid()){return false;}
if(this._options.disabledDates&&granularity==='d'&&this._isInDisabledDates(targetMoment)){return false;}
if(this._options.enabledDates&&granularity==='d'&&!this._isInEnabledDates(targetMoment)){return false;}
if(this._options.minDate&&targetMoment.isBefore(this._options.minDate,granularity)){return false;}
if(this._options.maxDate&&targetMoment.isAfter(this._options.maxDate,granularity)){return false;}
if(this._options.daysOfWeekDisabled&&granularity==='d'&&this._options.daysOfWeekDisabled.indexOf(targetMoment.day())!==-1){return false;}
if(this._options.disabledHours&&(granularity==='h'||granularity==='m'||granularity==='s')&&this._isInDisabledHours(targetMoment)){return false;}
if(this._options.enabledHours&&(granularity==='h'||granularity==='m'||granularity==='s')&&!this._isInEnabledHours(targetMoment)){return false;}
if(this._options.disabledTimeIntervals&&(granularity==='h'||granularity==='m'||granularity==='s')){var found=false;$.each(this._options.disabledTimeIntervals,function(){if(targetMoment.isBetween(this[0],this[1])){found=true;return false;}});if(found){return false;}}
return true;};DateTimePicker.prototype._parseInputDate=function _parseInputDate(inputDate){if(this._options.parseInputDate===undefined){if(!moment.isMoment(inputDate)){inputDate=this.getMoment(inputDate);}}else{inputDate=this._options.parseInputDate(inputDate);}
return inputDate;};DateTimePicker.prototype._keydown=function _keydown(e){var handler=null,index=void 0,index2=void 0,keyBindKeys=void 0,allModifiersPressed=void 0;var pressedKeys=[],pressedModifiers={},currentKey=e.which,pressed='p';keyState[currentKey]=pressed;for(index in keyState){if(keyState.hasOwnProperty(index)&&keyState[index]===pressed){pressedKeys.push(index);if(parseInt(index,10)!==currentKey){pressedModifiers[index]=true;}}}
for(index in this._options.keyBinds){if(this._options.keyBinds.hasOwnProperty(index)&&typeof this._options.keyBinds[index]==='function'){keyBindKeys=index.split(' ');if(keyBindKeys.length===pressedKeys.length&&KeyMap[currentKey]===keyBindKeys[keyBindKeys.length-1]){allModifiersPressed=true;for(index2=keyBindKeys.length-2;index2>=0;index2--){if(!(KeyMap[keyBindKeys[index2]]in pressedModifiers)){allModifiersPressed=false;break;}}
if(allModifiersPressed){handler=this._options.keyBinds[index];break;}}}}
if(handler){if(handler.call(this)){e.stopPropagation();e.preventDefault();}}};DateTimePicker.prototype._keyup=function _keyup(e){keyState[e.which]='r';if(keyPressHandled[e.which]){keyPressHandled[e.which]=false;e.stopPropagation();e.preventDefault();}};DateTimePicker.prototype._indexGivenDates=function _indexGivenDates(givenDatesArray){var givenDatesIndexed={},self=this;$.each(givenDatesArray,function(){var dDate=self._parseInputDate(this);if(dDate.isValid()){givenDatesIndexed[dDate.format('YYYY-MM-DD')]=true;}});return Object.keys(givenDatesIndexed).length?givenDatesIndexed:false;};DateTimePicker.prototype._indexGivenHours=function _indexGivenHours(givenHoursArray){var givenHoursIndexed={};$.each(givenHoursArray,function(){givenHoursIndexed[this]=true;});return Object.keys(givenHoursIndexed).length?givenHoursIndexed:false;};DateTimePicker.prototype._initFormatting=function _initFormatting(){var format=this._options.format||'L LT',self=this;this.actualFormat=format.replace(/(\[[^\[]*])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(formatInput){return self._dates[0].localeData().longDateFormat(formatInput)||formatInput;});this.parseFormats=this._options.extraFormats?this._options.extraFormats.slice():[];if(this.parseFormats.indexOf(format)<0&&this.parseFormats.indexOf(this.actualFormat)<0){this.parseFormats.push(this.actualFormat);}
this.use24Hours=this.actualFormat.toLowerCase().indexOf('a')<1&&this.actualFormat.replace(/\[.*?]/g,'').indexOf('h')<1;if(this._isEnabled('y')){MinViewModeNumber=2;}
if(this._isEnabled('M')){MinViewModeNumber=1;}
if(this._isEnabled('d')){MinViewModeNumber=0;}
this.currentViewMode=Math.max(MinViewModeNumber,this.currentViewMode);if(!this.unset){this._setValue(this._dates[0],0);}};DateTimePicker.prototype._getLastPickedDate=function _getLastPickedDate(){return this._dates[this._getLastPickedDateIndex()]||this.getMoment();};DateTimePicker.prototype._getLastPickedDateIndex=function _getLastPickedDateIndex(){return this._dates.length-1;};DateTimePicker.prototype.getMoment=function getMoment(d){var returnMoment=void 0;if(d===undefined||d===null){returnMoment=moment();}else if(this._hasTimeZone()){returnMoment=moment.tz(d,this.parseFormats,this._options.locale,this._options.useStrict,this._options.timeZone);}else{returnMoment=moment(d,this.parseFormats,this._options.locale,this._options.useStrict);}
if(this._hasTimeZone()){returnMoment.tz(this._options.timeZone);}
return returnMoment;};DateTimePicker.prototype.toggle=function toggle(){return this.widget?this.hide():this.show();};DateTimePicker.prototype.ignoreReadonly=function ignoreReadonly(_ignoreReadonly){if(arguments.length===0){return this._options.ignoreReadonly;}
if(typeof _ignoreReadonly!=='boolean'){throw new TypeError('ignoreReadonly () expects a boolean parameter');}
this._options.ignoreReadonly=_ignoreReadonly;};DateTimePicker.prototype.options=function options(newOptions){if(arguments.length===0){return $.extend(true,{},this._options);}
if(!(newOptions instanceof Object)){throw new TypeError('options() this.options parameter should be an object');}
$.extend(true,this._options,newOptions);var self=this;$.each(this._options,function(key,value){if(self[key]!==undefined){self[key](value);}});};DateTimePicker.prototype.date=function date(newDate,index){index=index||0;if(arguments.length===0){if(this.unset){return null;}
if(this._options.allowMultidate){return this._dates.join(this._options.multidateSeparator);}else{return this._dates[index].clone();}}
if(newDate!==null&&typeof newDate!=='string'&&!moment.isMoment(newDate)&&!(newDate instanceof Date)){throw new TypeError('date() parameter must be one of [null, string, moment or Date]');}
this._setValue(newDate===null?null:this._parseInputDate(newDate),index);};DateTimePicker.prototype.format=function format(newFormat){if(arguments.length===0){return this._options.format;}
if(typeof newFormat!=='string'&&(typeof newFormat!=='boolean'||newFormat!==false)){throw new TypeError('format() expects a string or boolean:false parameter '+newFormat);}
this._options.format=newFormat;if(this.actualFormat){this._initFormatting();}};DateTimePicker.prototype.timeZone=function timeZone(newZone){if(arguments.length===0){return this._options.timeZone;}
if(typeof newZone!=='string'){throw new TypeError('newZone() expects a string parameter');}
this._options.timeZone=newZone;};DateTimePicker.prototype.dayViewHeaderFormat=function dayViewHeaderFormat(newFormat){if(arguments.length===0){return this._options.dayViewHeaderFormat;}
if(typeof newFormat!=='string'){throw new TypeError('dayViewHeaderFormat() expects a string parameter');}
this._options.dayViewHeaderFormat=newFormat;};DateTimePicker.prototype.extraFormats=function extraFormats(formats){if(arguments.length===0){return this._options.extraFormats;}
if(formats!==false&&!(formats instanceof Array)){throw new TypeError('extraFormats() expects an array or false parameter');}
this._options.extraFormats=formats;if(this.parseFormats){this._initFormatting();}};DateTimePicker.prototype.disabledDates=function disabledDates(dates){if(arguments.length===0){return this._options.disabledDates?$.extend({},this._options.disabledDates):this._options.disabledDates;}
if(!dates){this._options.disabledDates=false;this._update();return true;}
if(!(dates instanceof Array)){throw new TypeError('disabledDates() expects an array parameter');}
this._options.disabledDates=this._indexGivenDates(dates);this._options.enabledDates=false;this._update();};DateTimePicker.prototype.enabledDates=function enabledDates(dates){if(arguments.length===0){return this._options.enabledDates?$.extend({},this._options.enabledDates):this._options.enabledDates;}
if(!dates){this._options.enabledDates=false;this._update();return true;}
if(!(dates instanceof Array)){throw new TypeError('enabledDates() expects an array parameter');}
this._options.enabledDates=this._indexGivenDates(dates);this._options.disabledDates=false;this._update();};DateTimePicker.prototype.daysOfWeekDisabled=function daysOfWeekDisabled(_daysOfWeekDisabled){if(arguments.length===0){return this._options.daysOfWeekDisabled.splice(0);}
if(typeof _daysOfWeekDisabled==='boolean'&&!_daysOfWeekDisabled){this._options.daysOfWeekDisabled=false;this._update();return true;}
if(!(_daysOfWeekDisabled instanceof Array)){throw new TypeError('daysOfWeekDisabled() expects an array parameter');}
this._options.daysOfWeekDisabled=_daysOfWeekDisabled.reduce(function(previousValue,currentValue){currentValue=parseInt(currentValue,10);if(currentValue>6||currentValue<0||isNaN(currentValue)){return previousValue;}
if(previousValue.indexOf(currentValue)===-1){previousValue.push(currentValue);}
return previousValue;},[]).sort();if(this._options.useCurrent&&!this._options.keepInvalid){for(var i=0;i<this._dates.length;i++){var tries=0;while(!this._isValid(this._dates[i],'d')){this._dates[i].add(1,'d');if(tries===31){throw'Tried 31 times to find a valid date';}
tries++;}
this._setValue(this._dates[i],i);}}
this._update();};DateTimePicker.prototype.maxDate=function maxDate(_maxDate){if(arguments.length===0){return this._options.maxDate?this._options.maxDate.clone():this._options.maxDate;}
if(typeof _maxDate==='boolean'&&_maxDate===false){this._options.maxDate=false;this._update();return true;}
if(typeof _maxDate==='string'){if(_maxDate==='now'||_maxDate==='moment'){_maxDate=this.getMoment();}}
var parsedDate=this._parseInputDate(_maxDate);if(!parsedDate.isValid()){throw new TypeError('maxDate() Could not parse date parameter: '+_maxDate);}
if(this._options.minDate&&parsedDate.isBefore(this._options.minDate)){throw new TypeError('maxDate() date parameter is before this.options.minDate: '+parsedDate.format(this.actualFormat));}
this._options.maxDate=parsedDate;for(var i=0;i<this._dates.length;i++){if(this._options.useCurrent&&!this._options.keepInvalid&&this._dates[i].isAfter(_maxDate)){this._setValue(this._options.maxDate,i);}}
if(this._viewDate.isAfter(parsedDate)){this._viewDate=parsedDate.clone().subtract(this._options.stepping,'m');}
this._update();};DateTimePicker.prototype.minDate=function minDate(_minDate){if(arguments.length===0){return this._options.minDate?this._options.minDate.clone():this._options.minDate;}
if(typeof _minDate==='boolean'&&_minDate===false){this._options.minDate=false;this._update();return true;}
if(typeof _minDate==='string'){if(_minDate==='now'||_minDate==='moment'){_minDate=this.getMoment();}}
var parsedDate=this._parseInputDate(_minDate);if(!parsedDate.isValid()){throw new TypeError('minDate() Could not parse date parameter: '+_minDate);}
if(this._options.maxDate&&parsedDate.isAfter(this._options.maxDate)){throw new TypeError('minDate() date parameter is after this.options.maxDate: '+parsedDate.format(this.actualFormat));}
this._options.minDate=parsedDate;for(var i=0;i<this._dates.length;i++){if(this._options.useCurrent&&!this._options.keepInvalid&&this._dates[i].isBefore(_minDate)){this._setValue(this._options.minDate,i);}}
if(this._viewDate.isBefore(parsedDate)){this._viewDate=parsedDate.clone().add(this._options.stepping,'m');}
this._update();};DateTimePicker.prototype.defaultDate=function defaultDate(_defaultDate){if(arguments.length===0){return this._options.defaultDate?this._options.defaultDate.clone():this._options.defaultDate;}
if(!_defaultDate){this._options.defaultDate=false;return true;}
if(typeof _defaultDate==='string'){if(_defaultDate==='now'||_defaultDate==='moment'){_defaultDate=this.getMoment();}else{_defaultDate=this.getMoment(_defaultDate);}}
var parsedDate=this._parseInputDate(_defaultDate);if(!parsedDate.isValid()){throw new TypeError('defaultDate() Could not parse date parameter: '+_defaultDate);}
if(!this._isValid(parsedDate)){throw new TypeError('defaultDate() date passed is invalid according to component setup validations');}
this._options.defaultDate=parsedDate;if(this._options.defaultDate&&this._options.inline||this.input!==undefined&&this.input.val().trim()===''){this._setValue(this._options.defaultDate,0);}};DateTimePicker.prototype.locale=function locale(_locale){if(arguments.length===0){return this._options.locale;}
if(!moment.localeData(_locale)){throw new TypeError('locale() locale '+_locale+' is not loaded from moment locales!');}
this._options.locale=_locale;for(var i=0;i<this._dates.length;i++){this._dates[i].locale(this._options.locale);}
this._viewDate.locale(this._options.locale);if(this.actualFormat){this._initFormatting();}
if(this.widget){this.hide();this.show();}};DateTimePicker.prototype.stepping=function stepping(_stepping){if(arguments.length===0){return this._options.stepping;}
_stepping=parseInt(_stepping,10);if(isNaN(_stepping)||_stepping<1){_stepping=1;}
this._options.stepping=_stepping;};DateTimePicker.prototype.useCurrent=function useCurrent(_useCurrent){var useCurrentOptions=['year','month','day','hour','minute'];if(arguments.length===0){return this._options.useCurrent;}
if(typeof _useCurrent!=='boolean'&&typeof _useCurrent!=='string'){throw new TypeError('useCurrent() expects a boolean or string parameter');}
if(typeof _useCurrent==='string'&&useCurrentOptions.indexOf(_useCurrent.toLowerCase())===-1){throw new TypeError('useCurrent() expects a string parameter of '+useCurrentOptions.join(', '));}
this._options.useCurrent=_useCurrent;};DateTimePicker.prototype.collapse=function collapse(_collapse){if(arguments.length===0){return this._options.collapse;}
if(typeof _collapse!=='boolean'){throw new TypeError('collapse() expects a boolean parameter');}
if(this._options.collapse===_collapse){return true;}
this._options.collapse=_collapse;if(this.widget){this.hide();this.show();}};DateTimePicker.prototype.icons=function icons(_icons){if(arguments.length===0){return $.extend({},this._options.icons);}
if(!(_icons instanceof Object)){throw new TypeError('icons() expects parameter to be an Object');}
$.extend(this._options.icons,_icons);if(this.widget){this.hide();this.show();}};DateTimePicker.prototype.tooltips=function tooltips(_tooltips){if(arguments.length===0){return $.extend({},this._options.tooltips);}
if(!(_tooltips instanceof Object)){throw new TypeError('tooltips() expects parameter to be an Object');}
$.extend(this._options.tooltips,_tooltips);if(this.widget){this.hide();this.show();}};DateTimePicker.prototype.useStrict=function useStrict(_useStrict){if(arguments.length===0){return this._options.useStrict;}
if(typeof _useStrict!=='boolean'){throw new TypeError('useStrict() expects a boolean parameter');}
this._options.useStrict=_useStrict;};DateTimePicker.prototype.sideBySide=function sideBySide(_sideBySide){if(arguments.length===0){return this._options.sideBySide;}
if(typeof _sideBySide!=='boolean'){throw new TypeError('sideBySide() expects a boolean parameter');}
this._options.sideBySide=_sideBySide;if(this.widget){this.hide();this.show();}};DateTimePicker.prototype.viewMode=function viewMode(_viewMode){if(arguments.length===0){return this._options.viewMode;}
if(typeof _viewMode!=='string'){throw new TypeError('viewMode() expects a string parameter');}
if(DateTimePicker.ViewModes.indexOf(_viewMode)===-1){throw new TypeError('viewMode() parameter must be one of ('+DateTimePicker.ViewModes.join(', ')+') value');}
this._options.viewMode=_viewMode;this.currentViewMode=Math.max(DateTimePicker.ViewModes.indexOf(_viewMode)-1,DateTimePicker.MinViewModeNumber);this._showMode();};DateTimePicker.prototype.calendarWeeks=function calendarWeeks(_calendarWeeks){if(arguments.length===0){return this._options.calendarWeeks;}
if(typeof _calendarWeeks!=='boolean'){throw new TypeError('calendarWeeks() expects parameter to be a boolean value');}
this._options.calendarWeeks=_calendarWeeks;this._update();};DateTimePicker.prototype.buttons=function buttons(_buttons){if(arguments.length===0){return $.extend({},this._options.buttons);}
if(!(_buttons instanceof Object)){throw new TypeError('buttons() expects parameter to be an Object');}
$.extend(this._options.buttons,_buttons);if(typeof this._options.buttons.showToday!=='boolean'){throw new TypeError('buttons.showToday expects a boolean parameter');}
if(typeof this._options.buttons.showClear!=='boolean'){throw new TypeError('buttons.showClear expects a boolean parameter');}
if(typeof this._options.buttons.showClose!=='boolean'){throw new TypeError('buttons.showClose expects a boolean parameter');}
if(this.widget){this.hide();this.show();}};DateTimePicker.prototype.keepOpen=function keepOpen(_keepOpen){if(arguments.length===0){return this._options.keepOpen;}
if(typeof _keepOpen!=='boolean'){throw new TypeError('keepOpen() expects a boolean parameter');}
this._options.keepOpen=_keepOpen;};DateTimePicker.prototype.focusOnShow=function focusOnShow(_focusOnShow){if(arguments.length===0){return this._options.focusOnShow;}
if(typeof _focusOnShow!=='boolean'){throw new TypeError('focusOnShow() expects a boolean parameter');}
this._options.focusOnShow=_focusOnShow;};DateTimePicker.prototype.inline=function inline(_inline){if(arguments.length===0){return this._options.inline;}
if(typeof _inline!=='boolean'){throw new TypeError('inline() expects a boolean parameter');}
this._options.inline=_inline;};DateTimePicker.prototype.clear=function clear(){this._setValue(null);};DateTimePicker.prototype.keyBinds=function keyBinds(_keyBinds){if(arguments.length===0){return this._options.keyBinds;}
this._options.keyBinds=_keyBinds;};DateTimePicker.prototype.debug=function debug(_debug){if(typeof _debug!=='boolean'){throw new TypeError('debug() expects a boolean parameter');}
this._options.debug=_debug;};DateTimePicker.prototype.allowInputToggle=function allowInputToggle(_allowInputToggle){if(arguments.length===0){return this._options.allowInputToggle;}
if(typeof _allowInputToggle!=='boolean'){throw new TypeError('allowInputToggle() expects a boolean parameter');}
this._options.allowInputToggle=_allowInputToggle;};DateTimePicker.prototype.keepInvalid=function keepInvalid(_keepInvalid){if(arguments.length===0){return this._options.keepInvalid;}
if(typeof _keepInvalid!=='boolean'){throw new TypeError('keepInvalid() expects a boolean parameter');}
this._options.keepInvalid=_keepInvalid;};DateTimePicker.prototype.datepickerInput=function datepickerInput(_datepickerInput){if(arguments.length===0){return this._options.datepickerInput;}
if(typeof _datepickerInput!=='string'){throw new TypeError('datepickerInput() expects a string parameter');}
this._options.datepickerInput=_datepickerInput;};DateTimePicker.prototype.parseInputDate=function parseInputDate(_parseInputDate2){if(arguments.length===0){return this._options.parseInputDate;}
if(typeof _parseInputDate2!=='function'){throw new TypeError('parseInputDate() should be as function');}
this._options.parseInputDate=_parseInputDate2;};DateTimePicker.prototype.disabledTimeIntervals=function disabledTimeIntervals(_disabledTimeIntervals){if(arguments.length===0){return this._options.disabledTimeIntervals?$.extend({},this._options.disabledTimeIntervals):this._options.disabledTimeIntervals;}
if(!_disabledTimeIntervals){this._options.disabledTimeIntervals=false;this._update();return true;}
if(!(_disabledTimeIntervals instanceof Array)){throw new TypeError('disabledTimeIntervals() expects an array parameter');}
this._options.disabledTimeIntervals=_disabledTimeIntervals;this._update();};DateTimePicker.prototype.disabledHours=function disabledHours(hours){if(arguments.length===0){return this._options.disabledHours?$.extend({},this._options.disabledHours):this._options.disabledHours;}
if(!hours){this._options.disabledHours=false;this._update();return true;}
if(!(hours instanceof Array)){throw new TypeError('disabledHours() expects an array parameter');}
this._options.disabledHours=this._indexGivenHours(hours);this._options.enabledHours=false;if(this._options.useCurrent&&!this._options.keepInvalid){for(var i=0;i<this._dates.length;i++){var tries=0;while(!this._isValid(this._dates[i],'h')){this._dates[i].add(1,'h');if(tries===24){throw'Tried 24 times to find a valid date';}
tries++;}
this._setValue(this._dates[i],i);}}
this._update();};DateTimePicker.prototype.enabledHours=function enabledHours(hours){if(arguments.length===0){return this._options.enabledHours?$.extend({},this._options.enabledHours):this._options.enabledHours;}
if(!hours){this._options.enabledHours=false;this._update();return true;}
if(!(hours instanceof Array)){throw new TypeError('enabledHours() expects an array parameter');}
this._options.enabledHours=this._indexGivenHours(hours);this._options.disabledHours=false;if(this._options.useCurrent&&!this._options.keepInvalid){for(var i=0;i<this._dates.length;i++){var tries=0;while(!this._isValid(this._dates[i],'h')){this._dates[i].add(1,'h');if(tries===24){throw'Tried 24 times to find a valid date';}
tries++;}
this._setValue(this._dates[i],i);}}
this._update();};DateTimePicker.prototype.viewDate=function viewDate(newDate){if(arguments.length===0){return this._viewDate.clone();}
if(!newDate){this._viewDate=(this._dates[0]||this.getMoment()).clone();return true;}
if(typeof newDate!=='string'&&!moment.isMoment(newDate)&&!(newDate instanceof Date)){throw new TypeError('viewDate() parameter must be one of [string, moment or Date]');}
this._viewDate=this._parseInputDate(newDate);this._viewUpdate();};DateTimePicker.prototype.allowMultidate=function allowMultidate(_allowMultidate){if(typeof _allowMultidate!=='boolean'){throw new TypeError('allowMultidate() expects a boolean parameter');}
this._options.allowMultidate=_allowMultidate;};DateTimePicker.prototype.multidateSeparator=function multidateSeparator(_multidateSeparator){if(arguments.length===0){return this._options.multidateSeparator;}
if(typeof _multidateSeparator!=='string'||_multidateSeparator.length>1){throw new TypeError('multidateSeparator expects a single character string parameter');}
this._options.multidateSeparator=_multidateSeparator;};_createClass(DateTimePicker,null,[{key:'NAME',get:function get(){return NAME;}},{key:'DATA_KEY',get:function get(){return DATA_KEY;}},{key:'EVENT_KEY',get:function get(){return EVENT_KEY;}},{key:'DATA_API_KEY',get:function get(){return DATA_API_KEY;}},{key:'DatePickerModes',get:function get(){return DatePickerModes;}},{key:'ViewModes',get:function get(){return ViewModes;}},{key:'MinViewModeNumber',get:function get(){return MinViewModeNumber;}},{key:'Event',get:function get(){return Event;}},{key:'Selector',get:function get(){return Selector;}},{key:'Default',get:function get(){return Default;},set:function set(value){Default=value;}},{key:'ClassName',get:function get(){return ClassName;}}]);return DateTimePicker;}();return DateTimePicker;}(jQuery,moment);var TempusDominusBootstrap4=function($){var JQUERY_NO_CONFLICT=$.fn[DateTimePicker.NAME],verticalModes=['top','bottom','auto'],horizontalModes=['left','right','auto'],toolbarPlacements=['default','top','bottom'],getSelectorFromElement=function getSelectorFromElement($element){var selector=$element.data('target'),$selector=void 0;if(!selector){selector=$element.attr('href')||'';selector=/^#[a-z]/i.test(selector)?selector:null;}
$selector=$(selector);if($selector.length===0){return $selector;}
if(!$selector.data(DateTimePicker.DATA_KEY)){$.extend({},$selector.data(),$(this).data());}
return $selector;};var TempusDominusBootstrap4=function(_DateTimePicker){_inherits(TempusDominusBootstrap4,_DateTimePicker);function TempusDominusBootstrap4(element,options){_classCallCheck(this,TempusDominusBootstrap4);var _this=_possibleConstructorReturn(this,_DateTimePicker.call(this,element,options));_this._init();return _this;}
TempusDominusBootstrap4.prototype._init=function _init(){if(this._element.hasClass('input-group')){var datepickerButton=this._element.find('.datepickerbutton');if(datepickerButton.length===0){this.component=this._element.find('[data-toggle="datetimepicker"]');}else{this.component=datepickerButton;}}};TempusDominusBootstrap4.prototype._getDatePickerTemplate=function _getDatePickerTemplate(){var headTemplate=$('<thead>').append($('<tr>').append($('<th>').addClass('prev').attr('data-action','previous').append($('<span>').addClass(this._options.icons.previous))).append($('<th>').addClass('picker-switch').attr('data-action','pickerSwitch').attr('colspan',''+(this._options.calendarWeeks?'6':'5'))).append($('<th>').addClass('next').attr('data-action','next').append($('<span>').addClass(this._options.icons.next)))),contTemplate=$('<tbody>').append($('<tr>').append($('<td>').attr('colspan',''+(this._options.calendarWeeks?'8':'7'))));return[$('<div>').addClass('datepicker-days').append($('<table>').addClass('table table-sm').append(headTemplate).append($('<tbody>'))),$('<div>').addClass('datepicker-months').append($('<table>').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone())),$('<div>').addClass('datepicker-years').append($('<table>').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone())),$('<div>').addClass('datepicker-decades').append($('<table>').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone()))];};TempusDominusBootstrap4.prototype._getTimePickerMainTemplate=function _getTimePickerMainTemplate(){var topRow=$('<tr>'),middleRow=$('<tr>'),bottomRow=$('<tr>');if(this._isEnabled('h')){topRow.append($('<td>').append($('<a>').attr({href:'#',tabindex:'-1','title':this._options.tooltips.incrementHour}).addClass('btn').attr('data-action','incrementHours').append($('<span>').addClass(this._options.icons.up))));middleRow.append($('<td>').append($('<span>').addClass('timepicker-hour').attr({'data-time-component':'hours','title':this._options.tooltips.pickHour}).attr('data-action','showHours')));bottomRow.append($('<td>').append($('<a>').attr({href:'#',tabindex:'-1','title':this._options.tooltips.decrementHour}).addClass('btn').attr('data-action','decrementHours').append($('<span>').addClass(this._options.icons.down))));}
if(this._isEnabled('m')){if(this._isEnabled('h')){topRow.append($('<td>').addClass('separator'));middleRow.append($('<td>').addClass('separator').html(':'));bottomRow.append($('<td>').addClass('separator'));}
topRow.append($('<td>').append($('<a>').attr({href:'#',tabindex:'-1','title':this._options.tooltips.incrementMinute}).addClass('btn').attr('data-action','incrementMinutes').append($('<span>').addClass(this._options.icons.up))));middleRow.append($('<td>').append($('<span>').addClass('timepicker-minute').attr({'data-time-component':'minutes','title':this._options.tooltips.pickMinute}).attr('data-action','showMinutes')));bottomRow.append($('<td>').append($('<a>').attr({href:'#',tabindex:'-1','title':this._options.tooltips.decrementMinute}).addClass('btn').attr('data-action','decrementMinutes').append($('<span>').addClass(this._options.icons.down))));}
if(this._isEnabled('s')){if(this._isEnabled('m')){topRow.append($('<td>').addClass('separator'));middleRow.append($('<td>').addClass('separator').html(':'));bottomRow.append($('<td>').addClass('separator'));}
topRow.append($('<td>').append($('<a>').attr({href:'#',tabindex:'-1','title':this._options.tooltips.incrementSecond}).addClass('btn').attr('data-action','incrementSeconds').append($('<span>').addClass(this._options.icons.up))));middleRow.append($('<td>').append($('<span>').addClass('timepicker-second').attr({'data-time-component':'seconds','title':this._options.tooltips.pickSecond}).attr('data-action','showSeconds')));bottomRow.append($('<td>').append($('<a>').attr({href:'#',tabindex:'-1','title':this._options.tooltips.decrementSecond}).addClass('btn').attr('data-action','decrementSeconds').append($('<span>').addClass(this._options.icons.down))));}
if(!this.use24Hours){topRow.append($('<td>').addClass('separator'));middleRow.append($('<td>').append($('<button>').addClass('btn btn-primary').attr({'data-action':'togglePeriod',tabindex:'-1','title':this._options.tooltips.togglePeriod})));bottomRow.append($('<td>').addClass('separator'));}
return $('<div>').addClass('timepicker-picker').append($('<table>').addClass('table-condensed').append([topRow,middleRow,bottomRow]));};TempusDominusBootstrap4.prototype._getTimePickerTemplate=function _getTimePickerTemplate(){var hoursView=$('<div>').addClass('timepicker-hours').append($('<table>').addClass('table-condensed')),minutesView=$('<div>').addClass('timepicker-minutes').append($('<table>').addClass('table-condensed')),secondsView=$('<div>').addClass('timepicker-seconds').append($('<table>').addClass('table-condensed')),ret=[this._getTimePickerMainTemplate()];if(this._isEnabled('h')){ret.push(hoursView);}
if(this._isEnabled('m')){ret.push(minutesView);}
if(this._isEnabled('s')){ret.push(secondsView);}
return ret;};TempusDominusBootstrap4.prototype._getToolbar=function _getToolbar(){var row=[];if(this._options.buttons.showToday){row.push($('<td>').append($('<a>').attr({href:'#',tabindex:'-1','data-action':'today','title':this._options.tooltips.today}).append($('<span>').addClass(this._options.icons.today))));}
if(!this._options.sideBySide&&this._hasDate()&&this._hasTime()){var title=void 0,icon=void 0;if(this._options.viewMode==='times'){title=this._options.tooltips.selectDate;icon=this._options.icons.date;}else{title=this._options.tooltips.selectTime;icon=this._options.icons.time;}
row.push($('<td>').append($('<a>').attr({href:'#',tabindex:'-1','data-action':'togglePicker','title':title}).append($('<span>').addClass(icon))));}
if(this._options.buttons.showClear){row.push($('<td>').append($('<a>').attr({href:'#',tabindex:'-1','data-action':'clear','title':this._options.tooltips.clear}).append($('<span>').addClass(this._options.icons.clear))));}
if(this._options.buttons.showClose){row.push($('<td>').append($('<a>').attr({href:'#',tabindex:'-1','data-action':'close','title':this._options.tooltips.close}).append($('<span>').addClass(this._options.icons.close))));}
return row.length===0?'':$('<table>').addClass('table-condensed').append($('<tbody>').append($('<tr>').append(row)));};TempusDominusBootstrap4.prototype._getTemplate=function _getTemplate(){var template=$('<div>').addClass('bootstrap-datetimepicker-widget dropdown-menu'),dateView=$('<div>').addClass('datepicker').append(this._getDatePickerTemplate()),timeView=$('<div>').addClass('timepicker').append(this._getTimePickerTemplate()),content=$('<ul>').addClass('list-unstyled'),toolbar=$('<li>').addClass('picker-switch'+(this._options.collapse?' accordion-toggle':'')).append(this._getToolbar());if(this._options.inline){template.removeClass('dropdown-menu');}
if(this.use24Hours){template.addClass('usetwentyfour');}
if(this._isEnabled('s')&&!this.use24Hours){template.addClass('wider');}
if(this._options.sideBySide&&this._hasDate()&&this._hasTime()){template.addClass('timepicker-sbs');if(this._options.toolbarPlacement==='top'){template.append(toolbar);}
template.append($('<div>').addClass('row').append(dateView.addClass('col-md-6')).append(timeView.addClass('col-md-6')));if(this._options.toolbarPlacement==='bottom'||this._options.toolbarPlacement==='default'){template.append(toolbar);}
return template;}
if(this._options.toolbarPlacement==='top'){content.append(toolbar);}
if(this._hasDate()){content.append($('<li>').addClass(this._options.collapse&&this._hasTime()?'collapse':'').addClass(this._options.collapse&&this._hasTime()&&this._options.viewMode==='times'?'':'show').append(dateView));}
if(this._options.toolbarPlacement==='default'){content.append(toolbar);}
if(this._hasTime()){content.append($('<li>').addClass(this._options.collapse&&this._hasDate()?'collapse':'').addClass(this._options.collapse&&this._hasDate()&&this._options.viewMode==='times'?'show':'').append(timeView));}
if(this._options.toolbarPlacement==='bottom'){content.append(toolbar);}
return template.append(content);};TempusDominusBootstrap4.prototype._place=function _place(e){var self=e&&e.data&&e.data.picker||this,vertical=self._options.widgetPositioning.vertical,horizontal=self._options.widgetPositioning.horizontal,parent=void 0;var position=(self.component&&self.component.length?self.component:self._element).position(),offset=(self.component&&self.component.length?self.component:self._element).offset();if(self._options.widgetParent){parent=self._options.widgetParent.append(self.widget);}else if(self._element.is('input')){parent=self._element.after(self.widget).parent();}else if(self._options.inline){parent=self._element.append(self.widget);return;}else{parent=self._element;self._element.children().first().after(self.widget);}
var parentOffset=parent.offset();position.top=offset.top-parentOffset.top;position.left=offset.left-parentOffset.left;if(vertical==='auto'){if(offset.top+self.widget.height()*1.5>=$(window).height()+$(window).scrollTop()&&self.widget.height()+self._element.outerHeight()<offset.top){vertical='top';}else{vertical='bottom';}}
if(horizontal==='auto'){if(parent.width()<offset.left+self.widget.outerWidth()/2&&offset.left+self.widget.outerWidth()>$(window).width()){horizontal='right';}else{horizontal='left';}}
if(vertical==='top'){self.widget.addClass('top').removeClass('bottom');}else{self.widget.addClass('bottom').removeClass('top');}
if(horizontal==='right'){self.widget.addClass('float-right');}else{self.widget.removeClass('float-right');}
if(parent.css('position')!=='relative'){parent=parent.parents().filter(function(){return $(this).css('position')==='relative';}).first();}
if(parent.length===0){throw new Error('datetimepicker component should be placed within a relative positioned container');}
self.widget.css({top:vertical==='top'?'auto':position.top+self._element.outerHeight()+'px',bottom:vertical==='top'?parent.outerHeight()-(parent===self._element?0:position.top)+'px':'auto',left:horizontal==='left'?(parent===self._element?0:position.left)+'px':'auto',right:horizontal==='left'?'auto':parent.outerWidth()-self._element.outerWidth()-(parent===self._element?0:position.left)+'px'});};TempusDominusBootstrap4.prototype._fillDow=function _fillDow(){var row=$('<tr>'),currentDate=this._viewDate.clone().startOf('w').startOf('d');if(this._options.calendarWeeks===true){row.append($('<th>').addClass('cw').text('#'));}
while(currentDate.isBefore(this._viewDate.clone().endOf('w'))){row.append($('<th>').addClass('dow').text(currentDate.format('dd')));currentDate.add(1,'d');}
this.widget.find('.datepicker-days thead').append(row);};TempusDominusBootstrap4.prototype._fillMonths=function _fillMonths(){var spans=[],monthsShort=this._viewDate.clone().startOf('y').startOf('d');while(monthsShort.isSame(this._viewDate,'y')){spans.push($('<span>').attr('data-action','selectMonth').addClass('month').text(monthsShort.format('MMM')));monthsShort.add(1,'M');}
this.widget.find('.datepicker-months td').empty().append(spans);};TempusDominusBootstrap4.prototype._updateMonths=function _updateMonths(){var monthsView=this.widget.find('.datepicker-months'),monthsViewHeader=monthsView.find('th'),months=monthsView.find('tbody').find('span'),self=this;monthsViewHeader.eq(0).find('span').attr('title',this._options.tooltips.prevYear);monthsViewHeader.eq(1).attr('title',this._options.tooltips.selectYear);monthsViewHeader.eq(2).find('span').attr('title',this._options.tooltips.nextYear);monthsView.find('.disabled').removeClass('disabled');if(!this._isValid(this._viewDate.clone().subtract(1,'y'),'y')){monthsViewHeader.eq(0).addClass('disabled');}
monthsViewHeader.eq(1).text(this._viewDate.year());if(!this._isValid(this._viewDate.clone().add(1,'y'),'y')){monthsViewHeader.eq(2).addClass('disabled');}
months.removeClass('active');if(this._getLastPickedDate().isSame(this._viewDate,'y')&&!this.unset){months.eq(this._getLastPickedDate().month()).addClass('active');}
months.each(function(index){if(!self._isValid(self._viewDate.clone().month(index),'M')){$(this).addClass('disabled');}});};TempusDominusBootstrap4.prototype._getStartEndYear=function _getStartEndYear(factor,year){var step=factor/10,startYear=Math.floor(year/factor)*factor,endYear=startYear+step*9,focusValue=Math.floor(year/step)*step;return[startYear,endYear,focusValue];};TempusDominusBootstrap4.prototype._updateYears=function _updateYears(){var yearsView=this.widget.find('.datepicker-years'),yearsViewHeader=yearsView.find('th'),yearCaps=this._getStartEndYear(10,this._viewDate.year()),startYear=this._viewDate.clone().year(yearCaps[0]),endYear=this._viewDate.clone().year(yearCaps[1]);var html='';yearsViewHeader.eq(0).find('span').attr('title',this._options.tooltips.prevDecade);yearsViewHeader.eq(1).attr('title',this._options.tooltips.selectDecade);yearsViewHeader.eq(2).find('span').attr('title',this._options.tooltips.nextDecade);yearsView.find('.disabled').removeClass('disabled');if(this._options.minDate&&this._options.minDate.isAfter(startYear,'y')){yearsViewHeader.eq(0).addClass('disabled');}
yearsViewHeader.eq(1).text(startYear.year()+'-'+endYear.year());if(this._options.maxDate&&this._options.maxDate.isBefore(endYear,'y')){yearsViewHeader.eq(2).addClass('disabled');}
html+='<span data-action="selectYear" class="year old'+(!this._isValid(startYear,'y')?' disabled':'')+'">'+(startYear.year()-1)+'</span>';while(!startYear.isAfter(endYear,'y')){html+='<span data-action="selectYear" class="year'+(startYear.isSame(this._getLastPickedDate(),'y')&&!this.unset?' active':'')+(!this._isValid(startYear,'y')?' disabled':'')+'">'+startYear.year()+'</span>';startYear.add(1,'y');}
html+='<span data-action="selectYear" class="year old'+(!this._isValid(startYear,'y')?' disabled':'')+'">'+startYear.year()+'</span>';yearsView.find('td').html(html);};TempusDominusBootstrap4.prototype._updateDecades=function _updateDecades(){var decadesView=this.widget.find('.datepicker-decades'),decadesViewHeader=decadesView.find('th'),yearCaps=this._getStartEndYear(100,this._viewDate.year()),startDecade=this._viewDate.clone().year(yearCaps[0]),endDecade=this._viewDate.clone().year(yearCaps[1]);var minDateDecade=false,maxDateDecade=false,endDecadeYear=void 0,html='';decadesViewHeader.eq(0).find('span').attr('title',this._options.tooltips.prevCentury);decadesViewHeader.eq(2).find('span').attr('title',this._options.tooltips.nextCentury);decadesView.find('.disabled').removeClass('disabled');if(startDecade.year()===0||this._options.minDate&&this._options.minDate.isAfter(startDecade,'y')){decadesViewHeader.eq(0).addClass('disabled');}
decadesViewHeader.eq(1).text(startDecade.year()+'-'+endDecade.year());if(this._options.maxDate&&this._options.maxDate.isBefore(endDecade,'y')){decadesViewHeader.eq(2).addClass('disabled');}
if(startDecade.year()-10<0){html+='<span>&nbsp;</span>';}else{html+='<span data-action="selectDecade" class="decade old" data-selection="'+(startDecade.year()+6)+'">'+(startDecade.year()-10)+'</span>';}
while(!startDecade.isAfter(endDecade,'y')){endDecadeYear=startDecade.year()+11;minDateDecade=this._options.minDate&&this._options.minDate.isAfter(startDecade,'y')&&this._options.minDate.year()<=endDecadeYear;maxDateDecade=this._options.maxDate&&this._options.maxDate.isAfter(startDecade,'y')&&this._options.maxDate.year()<=endDecadeYear;html+='<span data-action="selectDecade" class="decade'+(this._getLastPickedDate().isAfter(startDecade)&&this._getLastPickedDate().year()<=endDecadeYear?' active':'')+(!this._isValid(startDecade,'y')&&!minDateDecade&&!maxDateDecade?' disabled':'')+'" data-selection="'+(startDecade.year()+6)+'">'+startDecade.year()+'</span>';startDecade.add(10,'y');}
html+='<span data-action="selectDecade" class="decade old" data-selection="'+(startDecade.year()+6)+'">'+startDecade.year()+'</span>';decadesView.find('td').html(html);};TempusDominusBootstrap4.prototype._fillDate=function _fillDate(){var daysView=this.widget.find('.datepicker-days'),daysViewHeader=daysView.find('th'),html=[];var currentDate=void 0,row=void 0,clsName=void 0,i=void 0;if(!this._hasDate()){return;}
daysViewHeader.eq(0).find('span').attr('title',this._options.tooltips.prevMonth);daysViewHeader.eq(1).attr('title',this._options.tooltips.selectMonth);daysViewHeader.eq(2).find('span').attr('title',this._options.tooltips.nextMonth);daysView.find('.disabled').removeClass('disabled');daysViewHeader.eq(1).text(this._viewDate.format(this._options.dayViewHeaderFormat));if(!this._isValid(this._viewDate.clone().subtract(1,'M'),'M')){daysViewHeader.eq(0).addClass('disabled');}
if(!this._isValid(this._viewDate.clone().add(1,'M'),'M')){daysViewHeader.eq(2).addClass('disabled');}
currentDate=this._viewDate.clone().startOf('M').startOf('w').startOf('d');var now=this.getMoment();for(i=0;i<42;i++){if(currentDate.weekday()===0){row=$('<tr>');if(this._options.calendarWeeks){row.append('<td class="cw">'+currentDate.week()+'</td>');}
html.push(row);}
clsName='';if(currentDate.isBefore(this._viewDate,'M')){clsName+=' old';}
if(currentDate.isAfter(this._viewDate,'M')){clsName+=' new';}
if(this._options.allowMultidate){var index=this._datesFormatted.indexOf(currentDate.format('YYYY-MM-DD'));if(index!==-1){if(currentDate.isSame(this._datesFormatted[index],'d')&&!this.unset){clsName+=' active';}}}else{if(currentDate.isSame(this._getLastPickedDate(),'d')&&!this.unset){clsName+=' active';}}
if(!this._isValid(currentDate,'d')){clsName+=' disabled';}
if(currentDate.date()===now.date()&&currentDate.month()===now.month()&&currentDate.year()===now.year()){clsName+=' today';}
if(currentDate.day()===0||currentDate.day()===6){clsName+=' weekend';}
row.append('<td data-action="selectDay" data-day="'+currentDate.format('L')+'" class="day'+clsName+'">'+currentDate.date()+'</td>');currentDate.add(1,'d');}
daysView.find('tbody').empty().append(html);this._updateMonths();this._updateYears();this._updateDecades();};TempusDominusBootstrap4.prototype._fillHours=function _fillHours(){var table=this.widget.find('.timepicker-hours table'),currentHour=this._viewDate.clone().startOf('d'),html=[];var row=$('<tr>');if(this._viewDate.hour()>11&&!this.use24Hours){currentHour.hour(12);}
while(currentHour.isSame(this._viewDate,'d')&&(this.use24Hours||this._viewDate.hour()<12&&currentHour.hour()<12||this._viewDate.hour()>11)){if(currentHour.hour()%4===0){row=$('<tr>');html.push(row);}
row.append('<td data-action="selectHour" class="hour'+(!this._isValid(currentHour,'h')?' disabled':'')+'">'+currentHour.format(this.use24Hours?'HH':'hh')+'</td>');currentHour.add(1,'h');}
table.empty().append(html);};TempusDominusBootstrap4.prototype._fillMinutes=function _fillMinutes(){var table=this.widget.find('.timepicker-minutes table'),currentMinute=this._viewDate.clone().startOf('h'),html=[],step=this._options.stepping===1?5:this._options.stepping;var row=$('<tr>');while(this._viewDate.isSame(currentMinute,'h')){if(currentMinute.minute()%(step*4)===0){row=$('<tr>');html.push(row);}
row.append('<td data-action="selectMinute" class="minute'+(!this._isValid(currentMinute,'m')?' disabled':'')+'">'+currentMinute.format('mm')+'</td>');currentMinute.add(step,'m');}
table.empty().append(html);};TempusDominusBootstrap4.prototype._fillSeconds=function _fillSeconds(){var table=this.widget.find('.timepicker-seconds table'),currentSecond=this._viewDate.clone().startOf('m'),html=[];var row=$('<tr>');while(this._viewDate.isSame(currentSecond,'m')){if(currentSecond.second()%20===0){row=$('<tr>');html.push(row);}
row.append('<td data-action="selectSecond" class="second'+(!this._isValid(currentSecond,'s')?' disabled':'')+'">'+currentSecond.format('ss')+'</td>');currentSecond.add(5,'s');}
table.empty().append(html);};TempusDominusBootstrap4.prototype._fillTime=function _fillTime(){var toggle=void 0,newDate=void 0;var timeComponents=this.widget.find('.timepicker span[data-time-component]');if(!this.use24Hours){toggle=this.widget.find('.timepicker [data-action=togglePeriod]');newDate=this._getLastPickedDate().clone().add(this._getLastPickedDate().hours()>=12?-12:12,'h');toggle.text(this._getLastPickedDate().format('A'));if(this._isValid(newDate,'h')){toggle.removeClass('disabled');}else{toggle.addClass('disabled');}}
timeComponents.filter('[data-time-component=hours]').text(this._getLastPickedDate().format(''+(this.use24Hours?'HH':'hh')));timeComponents.filter('[data-time-component=minutes]').text(this._getLastPickedDate().format('mm'));timeComponents.filter('[data-time-component=seconds]').text(this._getLastPickedDate().format('ss'));this._fillHours();this._fillMinutes();this._fillSeconds();};TempusDominusBootstrap4.prototype._doAction=function _doAction(e,action){var lastPicked=this._getLastPickedDate();if($(e.currentTarget).is('.disabled')){return false;}
action=action||$(e.currentTarget).data('action');switch(action){case'next':{var navFnc=DateTimePicker.DatePickerModes[this.currentViewMode].NAV_FUNCTION;this._viewDate.add(DateTimePicker.DatePickerModes[this.currentViewMode].NAV_STEP,navFnc);this._fillDate();this._viewUpdate(navFnc);break;}
case'previous':{var _navFnc=DateTimePicker.DatePickerModes[this.currentViewMode].NAV_FUNCTION;this._viewDate.subtract(DateTimePicker.DatePickerModes[this.currentViewMode].NAV_STEP,_navFnc);this._fillDate();this._viewUpdate(_navFnc);break;}
case'pickerSwitch':this._showMode(1);break;case'selectMonth':{var month=$(e.target).closest('tbody').find('span').index($(e.target));this._viewDate.month(month);if(this.currentViewMode===DateTimePicker.MinViewModeNumber){this._setValue(lastPicked.clone().year(this._viewDate.year()).month(this._viewDate.month()),this._getLastPickedDateIndex());if(!this._options.inline){this.hide();}}else{this._showMode(-1);this._fillDate();}
this._viewUpdate('M');break;}
case'selectYear':{var year=parseInt($(e.target).text(),10)||0;this._viewDate.year(year);if(this.currentViewMode===DateTimePicker.MinViewModeNumber){this._setValue(lastPicked.clone().year(this._viewDate.year()),this._getLastPickedDateIndex());if(!this._options.inline){this.hide();}}else{this._showMode(-1);this._fillDate();}
this._viewUpdate('YYYY');break;}
case'selectDecade':{var _year=parseInt($(e.target).data('selection'),10)||0;this._viewDate.year(_year);if(this.currentViewMode===DateTimePicker.MinViewModeNumber){this._setValue(lastPicked.clone().year(this._viewDate.year()),this._getLastPickedDateIndex());if(!this._options.inline){this.hide();}}else{this._showMode(-1);this._fillDate();}
this._viewUpdate('YYYY');break;}
case'selectDay':{var day=this._viewDate.clone();if($(e.target).is('.old')){day.subtract(1,'M');}
if($(e.target).is('.new')){day.add(1,'M');}
this._setValue(day.date(parseInt($(e.target).text(),10)),this._getLastPickedDateIndex());if(!this._hasTime()&&!this._options.keepOpen&&!this._options.inline){this.hide();}
break;}
case'incrementHours':{var newDate=lastPicked.clone().add(1,'h');if(this._isValid(newDate,'h')){this._setValue(newDate,this._getLastPickedDateIndex());}
break;}
case'incrementMinutes':{var _newDate=lastPicked.clone().add(this._options.stepping,'m');if(this._isValid(_newDate,'m')){this._setValue(_newDate,this._getLastPickedDateIndex());}
break;}
case'incrementSeconds':{var _newDate2=lastPicked.clone().add(1,'s');if(this._isValid(_newDate2,'s')){this._setValue(_newDate2,this._getLastPickedDateIndex());}
break;}
case'decrementHours':{var _newDate3=lastPicked.clone().subtract(1,'h');if(this._isValid(_newDate3,'h')){this._setValue(_newDate3,this._getLastPickedDateIndex());}
break;}
case'decrementMinutes':{var _newDate4=lastPicked.clone().subtract(this._options.stepping,'m');if(this._isValid(_newDate4,'m')){this._setValue(_newDate4,this._getLastPickedDateIndex());}
break;}
case'decrementSeconds':{var _newDate5=lastPicked.clone().subtract(1,'s');if(this._isValid(_newDate5,'s')){this._setValue(_newDate5,this._getLastPickedDateIndex());}
break;}
case'togglePeriod':{this._setValue(lastPicked.clone().add(lastPicked.hours()>=12?-12:12,'h'),this._getLastPickedDateIndex());break;}
case'togglePicker':{var $this=$(e.target),$link=$this.closest('a'),$parent=$this.closest('ul'),expanded=$parent.find('.show'),closed=$parent.find('.collapse:not(.show)'),$span=$this.is('span')?$this:$this.find('span');var collapseData=void 0;if(expanded&&expanded.length){collapseData=expanded.data('collapse');if(collapseData&&collapseData.transitioning){return true;}
if(expanded.collapse){expanded.collapse('hide');closed.collapse('show');}else{expanded.removeClass('show');closed.addClass('show');}
$span.toggleClass(this._options.icons.time+' '+this._options.icons.date);if($span.hasClass(this._options.icons.date)){$link.attr('title',this._options.tooltips.selectDate);}else{$link.attr('title',this._options.tooltips.selectTime);}}}
break;case'showPicker':this.widget.find('.timepicker > div:not(.timepicker-picker)').hide();this.widget.find('.timepicker .timepicker-picker').show();break;case'showHours':this.widget.find('.timepicker .timepicker-picker').hide();this.widget.find('.timepicker .timepicker-hours').show();break;case'showMinutes':this.widget.find('.timepicker .timepicker-picker').hide();this.widget.find('.timepicker .timepicker-minutes').show();break;case'showSeconds':this.widget.find('.timepicker .timepicker-picker').hide();this.widget.find('.timepicker .timepicker-seconds').show();break;case'selectHour':{var hour=parseInt($(e.target).text(),10);if(!this.use24Hours){if(lastPicked.hours()>=12){if(hour!==12){hour+=12;}}else{if(hour===12){hour=0;}}}
this._setValue(lastPicked.clone().hours(hour),this._getLastPickedDateIndex());if(!this._isEnabled('a')&&!this._isEnabled('m')&&!this._options.keepOpen&&!this._options.inline){this.hide();}else{this._doAction(e,'showPicker');}
break;}
case'selectMinute':this._setValue(lastPicked.clone().minutes(parseInt($(e.target).text(),10)),this._getLastPickedDateIndex());if(!this._isEnabled('a')&&!this._isEnabled('s')&&!this._options.keepOpen&&!this._options.inline){this.hide();}else{this._doAction(e,'showPicker');}
break;case'selectSecond':this._setValue(lastPicked.clone().seconds(parseInt($(e.target).text(),10)),this._getLastPickedDateIndex());if(!this._isEnabled('a')&&!this._options.keepOpen&&!this._options.inline){this.hide();}else{this._doAction(e,'showPicker');}
break;case'clear':this.clear();break;case'close':this.hide();break;case'today':{var todaysDate=this.getMoment();if(this._isValid(todaysDate,'d')){this._setValue(todaysDate,this._getLastPickedDateIndex());}
break;}}
return false;};TempusDominusBootstrap4.prototype.hide=function hide(){var transitioning=false;if(!this.widget){return;}
this.widget.find('.collapse').each(function(){var collapseData=$(this).data('collapse');if(collapseData&&collapseData.transitioning){transitioning=true;return false;}
return true;});if(transitioning){return;}
if(this.component&&this.component.hasClass('btn')){this.component.toggleClass('active');}
this.widget.hide();$(window).off('resize',this._place());this.widget.off('click','[data-action]');this.widget.off('mousedown',false);this.widget.remove();this.widget=false;this._notifyEvent({type:DateTimePicker.Event.HIDE,date:this._getLastPickedDate().clone()});if(this.input!==undefined){this.input.blur();}
this._viewDate=this._getLastPickedDate().clone();};TempusDominusBootstrap4.prototype.show=function show(){var currentMoment=void 0;var useCurrentGranularity={'year':function year(m){return m.month(0).date(1).hours(0).seconds(0).minutes(0);},'month':function month(m){return m.date(1).hours(0).seconds(0).minutes(0);},'day':function day(m){return m.hours(0).seconds(0).minutes(0);},'hour':function hour(m){return m.seconds(0).minutes(0);},'minute':function minute(m){return m.seconds(0);}};if(this.input!==undefined){if(this.input.prop('disabled')||!this._options.ignoreReadonly&&this.input.prop('readonly')||this.widget){return;}
if(this.input.val()!==undefined&&this.input.val().trim().length!==0){this._setValue(this._parseInputDate(this.input.val().trim()),0);}else if(this.unset&&this._options.useCurrent){currentMoment=this.getMoment();if(typeof this._options.useCurrent==='string'){currentMoment=useCurrentGranularity[this._options.useCurrent](currentMoment);}
this._setValue(currentMoment,0);}}else if(this.unset&&this._options.useCurrent){currentMoment=this.getMoment();if(typeof this._options.useCurrent==='string'){currentMoment=useCurrentGranularity[this._options.useCurrent](currentMoment);}
this._setValue(currentMoment,0);}
this.widget=this._getTemplate();this._fillDow();this._fillMonths();this.widget.find('.timepicker-hours').hide();this.widget.find('.timepicker-minutes').hide();this.widget.find('.timepicker-seconds').hide();this._update();this._showMode();$(window).on('resize',{picker:this},this._place);this.widget.on('click','[data-action]',$.proxy(this._doAction,this));this.widget.on('mousedown',false);if(this.component&&this.component.hasClass('btn')){this.component.toggleClass('active');}
this._place();this.widget.show();if(this.input!==undefined&&this._options.focusOnShow&&!this.input.is(':focus')){this.input.focus();}
this._notifyEvent({type:DateTimePicker.Event.SHOW});};TempusDominusBootstrap4.prototype.destroy=function destroy(){this.hide();this._element.removeData(DateTimePicker.DATA_KEY);this._element.removeData('date');};TempusDominusBootstrap4.prototype.disable=function disable(){this.hide();if(this.component&&this.component.hasClass('btn')){this.component.addClass('disabled');}
if(this.input!==undefined){this.input.prop('disabled',true);}};TempusDominusBootstrap4.prototype.enable=function enable(){if(this.component&&this.component.hasClass('btn')){this.component.removeClass('disabled');}
if(this.input!==undefined){this.input.prop('disabled',false);}};TempusDominusBootstrap4.prototype.toolbarPlacement=function toolbarPlacement(_toolbarPlacement){if(arguments.length===0){return this._options.toolbarPlacement;}
if(typeof _toolbarPlacement!=='string'){throw new TypeError('toolbarPlacement() expects a string parameter');}
if(toolbarPlacements.indexOf(_toolbarPlacement)===-1){throw new TypeError('toolbarPlacement() parameter must be one of ('+toolbarPlacements.join(', ')+') value');}
this._options.toolbarPlacement=_toolbarPlacement;if(this.widget){this.hide();this.show();}};TempusDominusBootstrap4.prototype.widgetPositioning=function widgetPositioning(_widgetPositioning){if(arguments.length===0){return $.extend({},this._options.widgetPositioning);}
if({}.toString.call(_widgetPositioning)!=='[object Object]'){throw new TypeError('widgetPositioning() expects an object variable');}
if(_widgetPositioning.horizontal){if(typeof _widgetPositioning.horizontal!=='string'){throw new TypeError('widgetPositioning() horizontal variable must be a string');}
_widgetPositioning.horizontal=_widgetPositioning.horizontal.toLowerCase();if(horizontalModes.indexOf(_widgetPositioning.horizontal)===-1){throw new TypeError('widgetPositioning() expects horizontal parameter to be one of ('+horizontalModes.join(', ')+')');}
this._options.widgetPositioning.horizontal=_widgetPositioning.horizontal;}
if(_widgetPositioning.vertical){if(typeof _widgetPositioning.vertical!=='string'){throw new TypeError('widgetPositioning() vertical variable must be a string');}
_widgetPositioning.vertical=_widgetPositioning.vertical.toLowerCase();if(verticalModes.indexOf(_widgetPositioning.vertical)===-1){throw new TypeError('widgetPositioning() expects vertical parameter to be one of ('+verticalModes.join(', ')+')');}
this._options.widgetPositioning.vertical=_widgetPositioning.vertical;}
this._update();};TempusDominusBootstrap4.prototype.widgetParent=function widgetParent(_widgetParent){if(arguments.length===0){return this._options.widgetParent;}
if(typeof _widgetParent==='string'){_widgetParent=$(_widgetParent);}
if(_widgetParent!==null&&typeof _widgetParent!=='string'&&!(_widgetParent instanceof $)){throw new TypeError('widgetParent() expects a string or a jQuery object parameter');}
this._options.widgetParent=_widgetParent;if(this.widget){this.hide();this.show();}};TempusDominusBootstrap4._jQueryHandleThis=function _jQueryHandleThis(me,option,argument){var data=$(me).data(DateTimePicker.DATA_KEY);if((typeof option==='undefined'?'undefined':_typeof(option))==='object'){$.extend({},DateTimePicker.Default,option);}
if(!data){data=new TempusDominusBootstrap4($(me),option);$(me).data(DateTimePicker.DATA_KEY,data);}
if(typeof option==='string'){if(data[option]===undefined){throw new Error('No method named "'+option+'"');}
if(argument===undefined){return data[option]();}else{return data[option](argument);}}};TempusDominusBootstrap4._jQueryInterface=function _jQueryInterface(option,argument){if(this.length===1){return TempusDominusBootstrap4._jQueryHandleThis(this[0],option,argument);}
return this.each(function(){TempusDominusBootstrap4._jQueryHandleThis(this,option,argument);});};return TempusDominusBootstrap4;}(DateTimePicker);$(document).on(DateTimePicker.Event.CLICK_DATA_API,DateTimePicker.Selector.DATA_TOGGLE,function(){var $target=getSelectorFromElement($(this));if($target.length===0){return;}
TempusDominusBootstrap4._jQueryInterface.call($target,'toggle');}).on(DateTimePicker.Event.CHANGE,'.'+DateTimePicker.ClassName.INPUT,function(event){var $target=getSelectorFromElement($(this));if($target.length===0){return;}
TempusDominusBootstrap4._jQueryInterface.call($target,'_change',event);}).on(DateTimePicker.Event.BLUR,'.'+DateTimePicker.ClassName.INPUT,function(event){var $target=getSelectorFromElement($(this)),config=$target.data(DateTimePicker.DATA_KEY);if($target.length===0){return;}
if(config._options.debug||window.debug){return;}
TempusDominusBootstrap4._jQueryInterface.call($target,'hide',event);}).on(DateTimePicker.Event.KEYDOWN,'.'+DateTimePicker.ClassName.INPUT,function(event){var $target=getSelectorFromElement($(this));if($target.length===0){return;}
TempusDominusBootstrap4._jQueryInterface.call($target,'_keydown',event);}).on(DateTimePicker.Event.KEYUP,'.'+DateTimePicker.ClassName.INPUT,function(event){var $target=getSelectorFromElement($(this));if($target.length===0){return;}
TempusDominusBootstrap4._jQueryInterface.call($target,'_keyup',event);}).on(DateTimePicker.Event.FOCUS,'.'+DateTimePicker.ClassName.INPUT,function(event){var $target=getSelectorFromElement($(this)),config=$target.data(DateTimePicker.DATA_KEY);if($target.length===0){return;}
if(!config._options.allowInputToggle){return;}
TempusDominusBootstrap4._jQueryInterface.call($target,'show',event);});$.fn[DateTimePicker.NAME]=TempusDominusBootstrap4._jQueryInterface;$.fn[DateTimePicker.NAME].Constructor=TempusDominusBootstrap4;$.fn[DateTimePicker.NAME].noConflict=function(){$.fn[DateTimePicker.NAME]=JQUERY_NO_CONFLICT;return TempusDominusBootstrap4._jQueryInterface;};return TempusDominusBootstrap4;}(jQuery);}();;

/* /web/static/lib/select2/select2.js defined in bundle 'web.assets_common' */
(function($){if(typeof $.fn.each2=="undefined"){$.extend($.fn,{each2:function(c){var j=$([0]),i=-1,l=this.length;while(++i<l&&(j.context=j[0]=this[i])&&c.call(j[0],i,j)!==false);return this;}});}})(jQuery);(function($,undefined){"use strict";if(window.Select2!==undefined){return;}
var AbstractSelect2,SingleSelect2,MultiSelect2,nextUid,sizer,lastMousePosition={x:0,y:0},$document,scrollBarDimensions,KEY={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(k){k=k.which?k.which:k;switch(k){case KEY.LEFT:case KEY.RIGHT:case KEY.UP:case KEY.DOWN:return true;}
return false;},isControl:function(e){var k=e.which;switch(k){case KEY.SHIFT:case KEY.CTRL:case KEY.ALT:return true;}
if(e.metaKey)return true;return false;},isFunctionKey:function(k){k=k.which?k.which:k;return k>=112&&k<=123;}},MEASURE_SCROLLBAR_TEMPLATE="<div class='select2-measure-scrollbar'></div>",DIACRITICS={"\u24B6":"A","\uFF21":"A","\u00C0":"A","\u00C1":"A","\u00C2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\u00C3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\u00C4":"A","\u01DE":"A","\u1EA2":"A","\u00C5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\u00C6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24B8":"C","\uFF23":"C","\u0106":"C","\u0108":"C","\u010A":"C","\u010C":"C","\u00C7":"C","\u1E08":"C","\u0187":"C","\u023B":"C","\uA73E":"C","\u24B9":"D","\uFF24":"D","\u1E0A":"D","\u010E":"D","\u1E0C":"D","\u1E10":"D","\u1E12":"D","\u1E0E":"D","\u0110":"D","\u018B":"D","\u018A":"D","\u0189":"D","\uA779":"D","\u01F1":"DZ","\u01C4":"DZ","\u01F2":"Dz","\u01C5":"Dz","\u24BA":"E","\uFF25":"E","\u00C8":"E","\u00C9":"E","\u00CA":"E","\u1EC0":"E","\u1EBE":"E","\u1EC4":"E","\u1EC2":"E","\u1EBC":"E","\u0112":"E","\u1E14":"E","\u1E16":"E","\u0114":"E","\u0116":"E","\u00CB":"E","\u1EBA":"E","\u011A":"E","\u0204":"E","\u0206":"E","\u1EB8":"E","\u1EC6":"E","\u0228":"E","\u1E1C":"E","\u0118":"E","\u1E18":"E","\u1E1A":"E","\u0190":"E","\u018E":"E","\u24BB":"F","\uFF26":"F","\u1E1E":"F","\u0191":"F","\uA77B":"F","\u24BC":"G","\uFF27":"G","\u01F4":"G","\u011C":"G","\u1E20":"G","\u011E":"G","\u0120":"G","\u01E6":"G","\u0122":"G","\u01E4":"G","\u0193":"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H","\uFF28":"H","\u0124":"H","\u1E22":"H","\u1E26":"H","\u021E":"H","\u1E24":"H","\u1E28":"H","\u1E2A":"H","\u0126":"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I","\uFF29":"I","\u00CC":"I","\u00CD":"I","\u00CE":"I","\u0128":"I","\u012A":"I","\u012C":"I","\u0130":"I","\u00CF":"I","\u1E2E":"I","\u1EC8":"I","\u01CF":"I","\u0208":"I","\u020A":"I","\u1ECA":"I","\u012E":"I","\u1E2C":"I","\u0197":"I","\u24BF":"J","\uFF2A":"J","\u0134":"J","\u0248":"J","\u24C0":"K","\uFF2B":"K","\u1E30":"K","\u01E8":"K","\u1E32":"K","\u0136":"K","\u1E34":"K","\u0198":"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L","\uFF2C":"L","\u013F":"L","\u0139":"L","\u013D":"L","\u1E36":"L","\u1E38":"L","\u013B":"L","\u1E3C":"L","\u1E3A":"L","\u0141":"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L","\u01C7":"LJ","\u01C8":"Lj","\u24C2":"M","\uFF2D":"M","\u1E3E":"M","\u1E40":"M","\u1E42":"M","\u2C6E":"M","\u019C":"M","\u24C3":"N","\uFF2E":"N","\u01F8":"N","\u0143":"N","\u00D1":"N","\u1E44":"N","\u0147":"N","\u1E46":"N","\u0145":"N","\u1E4A":"N","\u1E48":"N","\u0220":"N","\u019D":"N","\uA790":"N","\uA7A4":"N","\u01CA":"NJ","\u01CB":"Nj","\u24C4":"O","\uFF2F":"O","\u00D2":"O","\u00D3":"O","\u00D4":"O","\u1ED2":"O","\u1ED0":"O","\u1ED6":"O","\u1ED4":"O","\u00D5":"O","\u1E4C":"O","\u022C":"O","\u1E4E":"O","\u014C":"O","\u1E50":"O","\u1E52":"O","\u014E":"O","\u022E":"O","\u0230":"O","\u00D6":"O","\u022A":"O","\u1ECE":"O","\u0150":"O","\u01D1":"O","\u020C":"O","\u020E":"O","\u01A0":"O","\u1EDC":"O","\u1EDA":"O","\u1EE0":"O","\u1EDE":"O","\u1EE2":"O","\u1ECC":"O","\u1ED8":"O","\u01EA":"O","\u01EC":"O","\u00D8":"O","\u01FE":"O","\u0186":"O","\u019F":"O","\uA74A":"O","\uA74C":"O","\u01A2":"OI","\uA74E":"OO","\u0222":"OU","\u24C5":"P","\uFF30":"P","\u1E54":"P","\u1E56":"P","\u01A4":"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q","\uFF31":"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R","\uFF32":"R","\u0154":"R","\u1E58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1E5A":"R","\u1E5C":"R","\u0156":"R","\u1E5E":"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S","\uFF33":"S","\u1E9E":"S","\u015A":"S","\u1E64":"S","\u015C":"S","\u1E60":"S","\u0160":"S","\u1E66":"S","\u1E62":"S","\u1E68":"S","\u0218":"S","\u015E":"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T","\uFF34":"T","\u1E6A":"T","\u0164":"T","\u1E6C":"T","\u021A":"T","\u0162":"T","\u1E70":"T","\u1E6E":"T","\u0166":"T","\u01AC":"T","\u01AE":"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U","\uFF35":"U","\u00D9":"U","\u00DA":"U","\u00DB":"U","\u0168":"U","\u1E78":"U","\u016A":"U","\u1E7A":"U","\u016C":"U","\u00DC":"U","\u01DB":"U","\u01D7":"U","\u01D5":"U","\u01D9":"U","\u1EE6":"U","\u016E":"U","\u0170":"U","\u01D3":"U","\u0214":"U","\u0216":"U","\u01AF":"U","\u1EEA":"U","\u1EE8":"U","\u1EEE":"U","\u1EEC":"U","\u1EF0":"U","\u1EE4":"U","\u1E72":"U","\u0172":"U","\u1E76":"U","\u1E74":"U","\u0244":"U","\u24CB":"V","\uFF36":"V","\u1E7C":"V","\u1E7E":"V","\u01B2":"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W","\uFF37":"W","\u1E80":"W","\u1E82":"W","\u0174":"W","\u1E86":"W","\u1E84":"W","\u1E88":"W","\u2C72":"W","\u24CD":"X","\uFF38":"X","\u1E8A":"X","\u1E8C":"X","\u24CE":"Y","\uFF39":"Y","\u1EF2":"Y","\u00DD":"Y","\u0176":"Y","\u1EF8":"Y","\u0232":"Y","\u1E8E":"Y","\u0178":"Y","\u1EF6":"Y","\u1EF4":"Y","\u01B3":"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z","\uFF3A":"Z","\u0179":"Z","\u1E90":"Z","\u017B":"Z","\u017D":"Z","\u1E92":"Z","\u1E94":"Z","\u01B5":"Z","\u0224":"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a","\uFF41":"a","\u1E9A":"a","\u00E0":"a","\u00E1":"a","\u00E2":"a","\u1EA7":"a","\u1EA5":"a","\u1EAB":"a","\u1EA9":"a","\u00E3":"a","\u0101":"a","\u0103":"a","\u1EB1":"a","\u1EAF":"a","\u1EB5":"a","\u1EB3":"a","\u0227":"a","\u01E1":"a","\u00E4":"a","\u01DF":"a","\u1EA3":"a","\u00E5":"a","\u01FB":"a","\u01CE":"a","\u0201":"a","\u0203":"a","\u1EA1":"a","\u1EAD":"a","\u1EB7":"a","\u1E01":"a","\u0105":"a","\u2C65":"a","\u0250":"a","\uA733":"aa","\u00E6":"ae","\u01FD":"ae","\u01E3":"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b","\uFF42":"b","\u1E03":"b","\u1E05":"b","\u1E07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24D2":"c","\uFF43":"c","\u0107":"c","\u0109":"c","\u010B":"c","\u010D":"c","\u00E7":"c","\u1E09":"c","\u0188":"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d","\uFF44":"d","\u1E0B":"d","\u010F":"d","\u1E0D":"d","\u1E11":"d","\u1E13":"d","\u1E0F":"d","\u0111":"d","\u018C":"d","\u0256":"d","\u0257":"d","\uA77A":"d","\u01F3":"dz","\u01C6":"dz","\u24D4":"e","\uFF45":"e","\u00E8":"e","\u00E9":"e","\u00EA":"e","\u1EC1":"e","\u1EBF":"e","\u1EC5":"e","\u1EC3":"e","\u1EBD":"e","\u0113":"e","\u1E15":"e","\u1E17":"e","\u0115":"e","\u0117":"e","\u00EB":"e","\u1EBB":"e","\u011B":"e","\u0205":"e","\u0207":"e","\u1EB9":"e","\u1EC7":"e","\u0229":"e","\u1E1D":"e","\u0119":"e","\u1E19":"e","\u1E1B":"e","\u0247":"e","\u025B":"e","\u01DD":"e","\u24D5":"f","\uFF46":"f","\u1E1F":"f","\u0192":"f","\uA77C":"f","\u24D6":"g","\uFF47":"g","\u01F5":"g","\u011D":"g","\u1E21":"g","\u011F":"g","\u0121":"g","\u01E7":"g","\u0123":"g","\u01E5":"g","\u0260":"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h","\uFF48":"h","\u0125":"h","\u1E23":"h","\u1E27":"h","\u021F":"h","\u1E25":"h","\u1E29":"h","\u1E2B":"h","\u1E96":"h","\u0127":"h","\u2C68":"h","\u2C76":"h","\u0265":"h","\u0195":"hv","\u24D8":"i","\uFF49":"i","\u00EC":"i","\u00ED":"i","\u00EE":"i","\u0129":"i","\u012B":"i","\u012D":"i","\u00EF":"i","\u1E2F":"i","\u1EC9":"i","\u01D0":"i","\u0209":"i","\u020B":"i","\u1ECB":"i","\u012F":"i","\u1E2D":"i","\u0268":"i","\u0131":"i","\u24D9":"j","\uFF4A":"j","\u0135":"j","\u01F0":"j","\u0249":"j","\u24DA":"k","\uFF4B":"k","\u1E31":"k","\u01E9":"k","\u1E33":"k","\u0137":"k","\u1E35":"k","\u0199":"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l","\uFF4C":"l","\u0140":"l","\u013A":"l","\u013E":"l","\u1E37":"l","\u1E39":"l","\u013C":"l","\u1E3D":"l","\u1E3B":"l","\u017F":"l","\u0142":"l","\u019A":"l","\u026B":"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l","\u01C9":"lj","\u24DC":"m","\uFF4D":"m","\u1E3F":"m","\u1E41":"m","\u1E43":"m","\u0271":"m","\u026F":"m","\u24DD":"n","\uFF4E":"n","\u01F9":"n","\u0144":"n","\u00F1":"n","\u1E45":"n","\u0148":"n","\u1E47":"n","\u0146":"n","\u1E4B":"n","\u1E49":"n","\u019E":"n","\u0272":"n","\u0149":"n","\uA791":"n","\uA7A5":"n","\u01CC":"nj","\u24DE":"o","\uFF4F":"o","\u00F2":"o","\u00F3":"o","\u00F4":"o","\u1ED3":"o","\u1ED1":"o","\u1ED7":"o","\u1ED5":"o","\u00F5":"o","\u1E4D":"o","\u022D":"o","\u1E4F":"o","\u014D":"o","\u1E51":"o","\u1E53":"o","\u014F":"o","\u022F":"o","\u0231":"o","\u00F6":"o","\u022B":"o","\u1ECF":"o","\u0151":"o","\u01D2":"o","\u020D":"o","\u020F":"o","\u01A1":"o","\u1EDD":"o","\u1EDB":"o","\u1EE1":"o","\u1EDF":"o","\u1EE3":"o","\u1ECD":"o","\u1ED9":"o","\u01EB":"o","\u01ED":"o","\u00F8":"o","\u01FF":"o","\u0254":"o","\uA74B":"o","\uA74D":"o","\u0275":"o","\u01A3":"oi","\u0223":"ou","\uA74F":"oo","\u24DF":"p","\uFF50":"p","\u1E55":"p","\u1E57":"p","\u01A5":"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q","\uFF51":"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r","\uFF52":"r","\u0155":"r","\u1E59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1E5B":"r","\u1E5D":"r","\u0157":"r","\u1E5F":"r","\u024D":"r","\u027D":"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s","\uFF53":"s","\u00DF":"s","\u015B":"s","\u1E65":"s","\u015D":"s","\u1E61":"s","\u0161":"s","\u1E67":"s","\u1E63":"s","\u1E69":"s","\u0219":"s","\u015F":"s","\u023F":"s","\uA7A9":"s","\uA785":"s","\u1E9B":"s","\u24E3":"t","\uFF54":"t","\u1E6B":"t","\u1E97":"t","\u0165":"t","\u1E6D":"t","\u021B":"t","\u0163":"t","\u1E71":"t","\u1E6F":"t","\u0167":"t","\u01AD":"t","\u0288":"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u","\uFF55":"u","\u00F9":"u","\u00FA":"u","\u00FB":"u","\u0169":"u","\u1E79":"u","\u016B":"u","\u1E7B":"u","\u016D":"u","\u00FC":"u","\u01DC":"u","\u01D8":"u","\u01D6":"u","\u01DA":"u","\u1EE7":"u","\u016F":"u","\u0171":"u","\u01D4":"u","\u0215":"u","\u0217":"u","\u01B0":"u","\u1EEB":"u","\u1EE9":"u","\u1EEF":"u","\u1EED":"u","\u1EF1":"u","\u1EE5":"u","\u1E73":"u","\u0173":"u","\u1E77":"u","\u1E75":"u","\u0289":"u","\u24E5":"v","\uFF56":"v","\u1E7D":"v","\u1E7F":"v","\u028B":"v","\uA75F":"v","\u028C":"v","\uA761":"vy","\u24E6":"w","\uFF57":"w","\u1E81":"w","\u1E83":"w","\u0175":"w","\u1E87":"w","\u1E85":"w","\u1E98":"w","\u1E89":"w","\u2C73":"w","\u24E7":"x","\uFF58":"x","\u1E8B":"x","\u1E8D":"x","\u24E8":"y","\uFF59":"y","\u1EF3":"y","\u00FD":"y","\u0177":"y","\u1EF9":"y","\u0233":"y","\u1E8F":"y","\u00FF":"y","\u1EF7":"y","\u1E99":"y","\u1EF5":"y","\u01B4":"y","\u024F":"y","\u1EFF":"y","\u24E9":"z","\uFF5A":"z","\u017A":"z","\u1E91":"z","\u017C":"z","\u017E":"z","\u1E93":"z","\u1E95":"z","\u01B6":"z","\u0225":"z","\u0240":"z","\u2C6C":"z","\uA763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038A":"\u0399","\u03AA":"\u0399","\u038C":"\u039F","\u038E":"\u03A5","\u03AB":"\u03A5","\u038F":"\u03A9","\u03AC":"\u03B1","\u03AD":"\u03B5","\u03AE":"\u03B7","\u03AF":"\u03B9","\u03CA":"\u03B9","\u0390":"\u03B9","\u03CC":"\u03BF","\u03CD":"\u03C5","\u03CB":"\u03C5","\u03B0":"\u03C5","\u03C9":"\u03C9","\u03C2":"\u03C3"};$document=$(document);nextUid=(function(){var counter=1;return function(){return counter++;};}());function reinsertElement(element){var placeholder=$(document.createTextNode(''));element.before(placeholder);placeholder.before(element);placeholder.remove();}
function stripDiacritics(str){function match(a){return DIACRITICS[a]||a;}
return str.replace(/[^\u0000-\u007E]/g,match);}
function indexOf(value,array){var i=0,l=array.length;for(;i<l;i=i+1){if(equal(value,array[i]))return i;}
return-1;}
function measureScrollbar(){var $template=$(MEASURE_SCROLLBAR_TEMPLATE);$template.appendTo(document.body);var dim={width:$template.width()-$template[0].clientWidth,height:$template.height()-$template[0].clientHeight};$template.remove();return dim;}
function equal(a,b){if(a===b)return true;if(a===undefined||b===undefined)return false;if(a===null||b===null)return false;if(a.constructor===String)return a+''===b+'';if(b.constructor===String)return b+''===a+'';return false;}
function splitVal(string,separator,transform){var val,i,l;if(string===null||string.length<1)return[];val=string.split(separator);for(i=0,l=val.length;i<l;i=i+1)val[i]=transform(val[i]);return val;}
function getSideBorderPadding(element){return element.outerWidth(false)-element.width();}
function installKeyUpChangeEvent(element){var key="keyup-change-value";element.on("keydown",function(){if($.data(element,key)===undefined){$.data(element,key,element.val());}});element.on("keyup",function(){var val=$.data(element,key);if(val!==undefined&&element.val()!==val){$.removeData(element,key);element.trigger("keyup-change");}});}
function installFilteredMouseMove(element){element.on("mousemove",function(e){var lastpos=lastMousePosition;if(lastpos===undefined||lastpos.x!==e.pageX||lastpos.y!==e.pageY){$(e.target).trigger("mousemove-filtered",e);}});}
function debounce(quietMillis,fn,ctx){ctx=ctx||undefined;var timeout;return function(){var args=arguments;window.clearTimeout(timeout);timeout=window.setTimeout(function(){fn.apply(ctx,args);},quietMillis);};}
function installDebouncedScroll(threshold,element){var notify=debounce(threshold,function(e){element.trigger("scroll-debounced",e);});element.on("scroll",function(e){if(indexOf(e.target,element.get())>=0)notify(e);});}
function focus($el){if($el[0]===document.activeElement)return;window.setTimeout(function(){var el=$el[0],pos=$el.val().length,range;$el.focus();var isVisible=(el.offsetWidth>0||el.offsetHeight>0);if(isVisible&&el===document.activeElement){if(el.setSelectionRange)
{el.setSelectionRange(pos,pos);}
else if(el.createTextRange){range=el.createTextRange();range.collapse(false);range.select();}}},0);}
function getCursorInfo(el){el=$(el)[0];var offset=0;var length=0;if('selectionStart'in el){offset=el.selectionStart;length=el.selectionEnd-offset;}else if('selection'in document){el.focus();var sel=document.selection.createRange();length=document.selection.createRange().text.length;sel.moveStart('character',-el.value.length);offset=sel.text.length-length;}
return{offset:offset,length:length};}
function killEvent(event){event.preventDefault();event.stopPropagation();}
function killEventImmediately(event){event.preventDefault();event.stopImmediatePropagation();}
function measureTextWidth(e){if(!sizer){var style=e[0].currentStyle||window.getComputedStyle(e[0],null);sizer=$(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:style.fontSize,fontFamily:style.fontFamily,fontStyle:style.fontStyle,fontWeight:style.fontWeight,letterSpacing:style.letterSpacing,textTransform:style.textTransform,whiteSpace:"nowrap"});sizer.attr("class","select2-sizer");$(document.body).append(sizer);}
sizer.text(e.val());return sizer.width();}
function syncCssClasses(dest,src,adapter){var classes,replacements=[],adapted;classes=$.trim(dest.attr("class"));if(classes){classes=''+classes;$(classes.split(/\s+/)).each2(function(){if(this.indexOf("select2-")===0){replacements.push(this);}});}
classes=$.trim(src.attr("class"));if(classes){classes=''+classes;$(classes.split(/\s+/)).each2(function(){if(this.indexOf("select2-")!==0){adapted=adapter(this);if(adapted){replacements.push(adapted);}}});}
dest.attr("class",replacements.join(" "));}
function markMatch(text,term,markup,escapeMarkup){var match=stripDiacritics(text.toUpperCase()).indexOf(stripDiacritics(term.toUpperCase())),tl=term.length;if(match<0){markup.push(escapeMarkup(text));return;}
markup.push(escapeMarkup(text.substring(0,match)));markup.push("<span class='select2-match'>");markup.push(escapeMarkup(text.substring(match,match+tl)));markup.push("</span>");markup.push(escapeMarkup(text.substring(match+tl,text.length)));}
function defaultEscapeMarkup(markup){var replace_map={'\\':'&#92;','&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;',"/":'&#47;'};return String(markup).replace(/[&<>"'\/\\]/g,function(match){return replace_map[match];});}
function ajax(options){var timeout,handler=null,quietMillis=options.quietMillis||100,ajaxUrl=options.url,self=this;return function(query){window.clearTimeout(timeout);timeout=window.setTimeout(function(){var data=options.data,url=ajaxUrl,transport=options.transport||$.fn.select2.ajaxDefaults.transport,deprecated={type:options.type||'GET',cache:options.cache||false,jsonpCallback:options.jsonpCallback||undefined,dataType:options.dataType||"json"},params=$.extend({},$.fn.select2.ajaxDefaults.params,deprecated);data=data?data.call(self,query.term,query.page,query.context):null;url=(typeof url==='function')?url.call(self,query.term,query.page,query.context):url;if(handler&&typeof handler.abort==="function"){handler.abort();}
if(options.params){if($.isFunction(options.params)){$.extend(params,options.params.call(self));}else{$.extend(params,options.params);}}
$.extend(params,{url:url,dataType:options.dataType,data:data,success:function(data){var results=options.results(data,query.page,query);query.callback(results);},error:function(jqXHR,textStatus,errorThrown){var results={hasError:true,jqXHR:jqXHR,textStatus:textStatus,errorThrown:errorThrown};query.callback(results);}});handler=transport.call(self,params);},quietMillis);};}
function local(options){var data=options,dataText,tmp,text=function(item){return""+item.text;};if($.isArray(data)){tmp=data;data={results:tmp};}
if($.isFunction(data)===false){tmp=data;data=function(){return tmp;};}
var dataItem=data();if(dataItem.text){text=dataItem.text;if(!$.isFunction(text)){dataText=dataItem.text;text=function(item){return item[dataText];};}}
return function(query){var t=query.term,filtered={results:[]},process;if(t===""){query.callback(data());return;}
process=function(datum,collection){var group,attr;datum=datum[0];if(datum.children){group={};for(attr in datum){if(datum.hasOwnProperty(attr))group[attr]=datum[attr];}
group.children=[];$(datum.children).each2(function(i,childDatum){process(childDatum,group.children);});if(group.children.length||query.matcher(t,text(group),datum)){collection.push(group);}}else{if(query.matcher(t,text(datum),datum)){collection.push(datum);}}};$(data().results).each2(function(i,datum){process(datum,filtered.results);});query.callback(filtered);};}
function tags(data){var isFunc=$.isFunction(data);return function(query){var t=query.term,filtered={results:[]};var result=isFunc?data(query):data;if($.isArray(result)){$(result).each(function(){var isObject=this.text!==undefined,text=isObject?this.text:this;if(t===""||query.matcher(t,text)){filtered.results.push(isObject?this:{id:this,text:this});}});query.callback(filtered);}};}
function checkFormatter(formatter,formatterName){if($.isFunction(formatter))return true;if(!formatter)return false;if(typeof(formatter)==='string')return true;throw new Error(formatterName+" must be a string, function, or falsy value");}
function evaluate(val,context){if($.isFunction(val)){var args=Array.prototype.slice.call(arguments,2);return val.apply(context,args);}
return val;}
function countResults(results){var count=0;$.each(results,function(i,item){if(item.children){count+=countResults(item.children);}else{count++;}});return count;}
function defaultTokenizer(input,selection,selectCallback,opts){var original=input,dupe=false,token,index,i,l,separator;if(!opts.createSearchChoice||!opts.tokenSeparators||opts.tokenSeparators.length<1)return undefined;while(true){index=-1;for(i=0,l=opts.tokenSeparators.length;i<l;i++){separator=opts.tokenSeparators[i];index=input.indexOf(separator);if(index>=0)break;}
if(index<0)break;token=input.substring(0,index);input=input.substring(index+separator.length);if(token.length>0){token=opts.createSearchChoice.call(this,token,selection);if(token!==undefined&&token!==null&&opts.id(token)!==undefined&&opts.id(token)!==null){dupe=false;for(i=0,l=selection.length;i<l;i++){if(equal(opts.id(token),opts.id(selection[i]))){dupe=true;break;}}
if(!dupe)selectCallback(token);}}}
if(original!==input)return input;}
function cleanupJQueryElements(){var self=this;$.each(arguments,function(i,element){self[element].remove();self[element]=null;});}
function clazz(SuperClass,methods){var constructor=function(){};constructor.prototype=new SuperClass;constructor.prototype.constructor=constructor;constructor.prototype.parent=SuperClass.prototype;constructor.prototype=$.extend(constructor.prototype,methods);return constructor;}
AbstractSelect2=clazz(Object,{bind:function(func){var self=this;return function(){func.apply(self,arguments);};},init:function(opts){var results,search,resultsSelector=".select2-results";this.opts=opts=this.prepareOpts(opts);this.id=opts.id;if(opts.element.data("select2")!==undefined&&opts.element.data("select2")!==null){opts.element.data("select2").destroy();}
this.container=this.createContainer();this.liveRegion=$('.select2-hidden-accessible');if(this.liveRegion.length==0){this.liveRegion=$("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body);}
this.containerId="s2id_"+(opts.element.attr("id")||"autogen"+nextUid());this.containerEventName=this.containerId.replace(/([.])/g,'_').replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,'\\$1');this.container.attr("id",this.containerId);this.container.attr("title",opts.element.attr("title"));this.body=$(document.body);syncCssClasses(this.container,this.opts.element,this.opts.adaptContainerCssClass);this.container.attr("style",opts.element.attr("style"));this.container.css(evaluate(opts.containerCss,this.opts.element));this.container.addClass(evaluate(opts.containerCssClass,this.opts.element));this.elementTabIndex=this.opts.element.attr("tabindex");this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",killEvent);this.container.data("select2",this);this.dropdown=this.container.find(".select2-drop");syncCssClasses(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass);this.dropdown.addClass(evaluate(opts.dropdownCssClass,this.opts.element));this.dropdown.data("select2",this);this.dropdown.on("click",killEvent);this.results=results=this.container.find(resultsSelector);this.search=search=this.container.find("input.select2-input");this.queryCount=0;this.resultsPage=0;this.context=null;this.initContainer();this.container.on("click",killEvent);installFilteredMouseMove(this.results);this.dropdown.on("mousemove-filtered",resultsSelector,this.bind(this.highlightUnderEvent));this.dropdown.on("touchstart touchmove touchend",resultsSelector,this.bind(function(event){this._touchEvent=true;this.highlightUnderEvent(event);}));this.dropdown.on("touchmove",resultsSelector,this.bind(this.touchMoved));this.dropdown.on("touchstart touchend",resultsSelector,this.bind(this.clearTouchMoved));this.dropdown.on('click',this.bind(function(event){if(this._touchEvent){this._touchEvent=false;this.selectHighlighted();}}));installDebouncedScroll(80,this.results);this.dropdown.on("scroll-debounced",resultsSelector,this.bind(this.loadMoreIfNeeded));$(this.container).on("change",".select2-input",function(e){e.stopPropagation();});$(this.dropdown).on("change",".select2-input",function(e){e.stopPropagation();});if($.fn.mousewheel){results.mousewheel(function(e,delta,deltaX,deltaY){var top=results.scrollTop();if(deltaY>0&&top-deltaY<=0){results.scrollTop(0);killEvent(e);}else if(deltaY<0&&results.get(0).scrollHeight-results.scrollTop()+deltaY<=results.height()){results.scrollTop(results.get(0).scrollHeight-results.height());killEvent(e);}});}
installKeyUpChangeEvent(search);search.on("keyup-change input paste",this.bind(this.updateResults));search.on("focus",function(){search.addClass("select2-focused");});search.on("blur",function(){search.removeClass("select2-focused");});this.dropdown.on("mouseup",resultsSelector,this.bind(function(e){if($(e.target).closest(".select2-result-selectable").length>0){this.highlightUnderEvent(e);this.selectHighlighted(e);}}));this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(e){e.stopPropagation();});this.lastSearchTerm=undefined;if($.isFunction(this.opts.initSelection)){this.initSelection();this.monitorSource();}
if(opts.maximumInputLength!==null){this.search.attr("maxlength",opts.maximumInputLength);}
var disabled=opts.element.prop("disabled");if(disabled===undefined)disabled=false;this.enable(!disabled);var readonly=opts.element.prop("readonly");if(readonly===undefined)readonly=false;this.readonly(readonly);scrollBarDimensions=scrollBarDimensions||measureScrollbar();this.autofocus=opts.element.prop("autofocus");opts.element.prop("autofocus",false);if(this.autofocus)this.focus();this.search.attr("placeholder",opts.searchInputPlaceholder);},destroy:function(){var element=this.opts.element,select2=element.data("select2"),self=this;this.close();if(element.length&&element[0].detachEvent&&self._sync){element.each(function(){if(self._sync){this.detachEvent("onpropertychange",self._sync);}});}
if(this.propertyObserver){this.propertyObserver.disconnect();this.propertyObserver=null;}
this._sync=null;if(select2!==undefined){select2.container.remove();select2.liveRegion.remove();select2.dropdown.remove();element.removeData("select2").off(".select2");if(!element.is("input[type='hidden']")){element.show().prop("autofocus",this.autofocus||false);if(this.elementTabIndex){element.attr({tabindex:this.elementTabIndex});}else{element.removeAttr("tabindex");}
element.show();}else{element.css("display","");}}
cleanupJQueryElements.call(this,"container","liveRegion","dropdown","results","search");},optionToData:function(element){if(element.is("option")){return{id:element.prop("value"),text:element.text(),element:element.get(),css:element.attr("class"),disabled:element.prop("disabled"),locked:equal(element.attr("locked"),"locked")||equal(element.data("locked"),true)};}else if(element.is("optgroup")){return{text:element.attr("label"),children:[],element:element.get(),css:element.attr("class")};}},prepareOpts:function(opts){var element,select,idKey,ajaxUrl,self=this;element=opts.element;if(element.get(0).tagName.toLowerCase()==="select"){this.select=select=opts.element;}
if(select){$.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in opts){throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.");}});}
opts.debug=opts.debug||$.fn.select2.defaults.debug;if(opts.debug&&console&&console.warn){if(opts.id!=null){console.warn('Select2: The `id` option has been removed in Select2 4.0.0, '+'consider renaming your `id` property or mapping the property before your data makes it to Select2. '+'You can read more at https://select2.github.io/announcements-4.0.html#changed-id');}
if(opts.text!=null){console.warn('Select2: The `text` option has been removed in Select2 4.0.0, '+'consider renaming your `text` property or mapping the property before your data makes it to Select2. '+'You can read more at https://select2.github.io/announcements-4.0.html#changed-id');}
if(opts.sortResults!=null){console.warn('Select2: the `sortResults` option has been renamed to `sorter` in Select2 4.0.0. ');}
if(opts.selectOnBlur!=null){console.warn('Select2: The `selectOnBlur` option has been renamed to `selectOnClose` in Select2 4.0.0.');}
if(opts.ajax!=null&&opts.ajax.results!=null){console.warn('Select2: The `ajax.results` option has been renamed to `ajax.processResults` in Select2 4.0.0.');}
if(opts.formatNoResults!=null){console.warn('Select2: The `formatNoResults` option has been renamed to `language.noResults` in Select2 4.0.0.');}
if(opts.formatSearching!=null){console.warn('Select2: The `formatSearching` option has been renamed to `language.searching` in Select2 4.0.0.');}
if(opts.formatInputTooShort!=null){console.warn('Select2: The `formatInputTooShort` option has been renamed to `language.inputTooShort` in Select2 4.0.0.');}
if(opts.formatInputTooLong!=null){console.warn('Select2: The `formatInputTooLong` option has been renamed to `language.inputTooLong` in Select2 4.0.0.');}
if(opts.formatLoading!=null){console.warn('Select2: The `formatLoading` option has been renamed to `language.loadingMore` in Select2 4.0.0.');}
if(opts.formatSelectionTooBig!=null){console.warn('Select2: The `formatSelectionTooBig` option has been renamed to `language.maximumSelected` in Select2 4.0.0.');}
if(opts.element.data('select2Tags')){console.warn('Select2: The `data-select2-tags` attribute has been renamed to `data-tags` in Select2 4.0.0.');}}
if(opts.element.data('tags')!=null){var elemTags=opts.element.data('tags');if(!$.isArray(elemTags)){elemTags=[];}
opts.element.data('select2Tags',elemTags);}
if(opts.sorter!=null){opts.sortResults=opts.sorter;}
if(opts.selectOnClose!=null){opts.selectOnBlur=opts.selectOnClose;}
if(opts.ajax!=null){if($.isFunction(opts.ajax.processResults)){opts.ajax.results=opts.ajax.processResults;}}
if(opts.language!=null){var lang=opts.language;if($.isFunction(lang.noMatches)){opts.formatNoMatches=lang.noMatches;}
if($.isFunction(lang.searching)){opts.formatSearching=lang.searching;}
if($.isFunction(lang.inputTooShort)){opts.formatInputTooShort=lang.inputTooShort;}
if($.isFunction(lang.inputTooLong)){opts.formatInputTooLong=lang.inputTooLong;}
if($.isFunction(lang.loadingMore)){opts.formatLoading=lang.loadingMore;}
if($.isFunction(lang.maximumSelected)){opts.formatSelectionTooBig=lang.maximumSelected;}}
opts=$.extend({},{populateResults:function(container,results,query){var populate,id=this.opts.id,liveRegion=this.liveRegion;populate=function(results,container,depth){var i,l,result,selectable,disabled,compound,node,label,innerContainer,formatted;results=opts.sortResults(results,container,query);var nodes=[];for(i=0,l=results.length;i<l;i=i+1){result=results[i];disabled=(result.disabled===true);selectable=(!disabled)&&(id(result)!==undefined);compound=result.children&&result.children.length>0;node=$("<li></li>");node.addClass("select2-results-dept-"+depth);node.addClass("select2-result");node.addClass(selectable?"select2-result-selectable":"select2-result-unselectable");if(disabled){node.addClass("select2-disabled");}
if(compound){node.addClass("select2-result-with-children");}
node.addClass(self.opts.formatResultCssClass(result));node.attr("role","presentation");label=$(document.createElement("div"));label.addClass("select2-result-label");label.attr("id","select2-result-label-"+nextUid());label.attr("role","option");formatted=opts.formatResult(result,label,query,self.opts.escapeMarkup);if(formatted!==undefined){label.html(formatted);node.append(label);}
if(compound){innerContainer=$("<ul></ul>");innerContainer.addClass("select2-result-sub");populate(result.children,innerContainer,depth+1);node.append(innerContainer);}
node.data("select2-data",result);nodes.push(node[0]);}
container.append(nodes);liveRegion.text(opts.formatMatches(results.length));};populate(results,container,0);}},$.fn.select2.defaults,opts);if(typeof(opts.id)!=="function"){idKey=opts.id;opts.id=function(e){return e[idKey];};}
if($.isArray(opts.element.data("select2Tags"))){if("tags"in opts){throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+opts.element.attr("id");}
opts.tags=opts.element.data("select2Tags");}
if(select){opts.query=this.bind(function(query){var data={results:[],more:false},term=query.term,children,placeholderOption,process;process=function(element,collection){var group;if(element.is("option")){if(query.matcher(term,element.text(),element)){collection.push(self.optionToData(element));}}else if(element.is("optgroup")){group=self.optionToData(element);element.children().each2(function(i,elm){process(elm,group.children);});if(group.children.length>0){collection.push(group);}}};children=element.children();if(this.getPlaceholder()!==undefined&&children.length>0){placeholderOption=this.getPlaceholderOption();if(placeholderOption){children=children.not(placeholderOption);}}
children.each2(function(i,elm){process(elm,data.results);});query.callback(data);});opts.id=function(e){return e.id;};}else{if(!("query"in opts)){if("ajax"in opts){ajaxUrl=opts.element.data("ajax-url");if(ajaxUrl&&ajaxUrl.length>0){opts.ajax.url=ajaxUrl;}
opts.query=ajax.call(opts.element,opts.ajax);}else if("data"in opts){opts.query=local(opts.data);}else if("tags"in opts){opts.query=tags(opts.tags);if(opts.createSearchChoice===undefined){opts.createSearchChoice=function(term){return{id:$.trim(term),text:$.trim(term)};};}
if(opts.initSelection===undefined){opts.initSelection=function(element,callback){var data=[];$(splitVal(element.val(),opts.separator,opts.transformVal)).each(function(){var obj={id:this,text:this},tags=opts.tags;if($.isFunction(tags))tags=tags();$(tags).each(function(){if(equal(this.id,obj.id)){obj=this;return false;}});data.push(obj);});callback(data);};}}}}
if(typeof(opts.query)!=="function"){throw"query function not defined for Select2 "+opts.element.attr("id");}
if(opts.createSearchChoicePosition==='top'){opts.createSearchChoicePosition=function(list,item){list.unshift(item);};}
else if(opts.createSearchChoicePosition==='bottom'){opts.createSearchChoicePosition=function(list,item){list.push(item);};}
else if(typeof(opts.createSearchChoicePosition)!=="function"){throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";}
return opts;},monitorSource:function(){var el=this.opts.element,observer,self=this;el.on("change.select2",this.bind(function(e){if(this.opts.element.data("select2-change-triggered")!==true){this.initSelection();}}));this._sync=this.bind(function(){var disabled=el.prop("disabled");if(disabled===undefined)disabled=false;this.enable(!disabled);var readonly=el.prop("readonly");if(readonly===undefined)readonly=false;this.readonly(readonly);if(this.container){syncCssClasses(this.container,this.opts.element,this.opts.adaptContainerCssClass);this.container.addClass(evaluate(this.opts.containerCssClass,this.opts.element));}
if(this.dropdown){syncCssClasses(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass);this.dropdown.addClass(evaluate(this.opts.dropdownCssClass,this.opts.element));}});if(el.length&&el[0].attachEvent){el.each(function(){this.attachEvent("onpropertychange",self._sync);});}
observer=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(observer!==undefined){if(this.propertyObserver){delete this.propertyObserver;this.propertyObserver=null;}
this.propertyObserver=new observer(function(mutations){$.each(mutations,self._sync);});this.propertyObserver.observe(el.get(0),{attributes:true,subtree:false});}},triggerSelect:function(data){var evt=$.Event("select2-selecting",{val:this.id(data),object:data,choice:data});this.opts.element.trigger(evt);return!evt.isDefaultPrevented();},triggerChange:function(details){details=details||{};details=$.extend({},details,{type:"change",val:this.val()});this.opts.element.data("select2-change-triggered",true);this.opts.element.trigger(details);this.opts.element.data("select2-change-triggered",false);this.opts.element.click();if(this.opts.blurOnChange)
this.opts.element.blur();},isInterfaceEnabled:function()
{return this.enabledInterface===true;},enableInterface:function(){var enabled=this._enabled&&!this._readonly,disabled=!enabled;if(enabled===this.enabledInterface)return false;this.container.toggleClass("select2-container-disabled",disabled);this.close();this.enabledInterface=enabled;return true;},enable:function(enabled){if(enabled===undefined)enabled=true;if(this._enabled===enabled)return;this._enabled=enabled;this.opts.element.prop("disabled",!enabled);this.enableInterface();},disable:function(){this.enable(false);},readonly:function(enabled){if(enabled===undefined)enabled=false;if(this._readonly===enabled)return;this._readonly=enabled;this.opts.element.prop("readonly",enabled);this.enableInterface();},opened:function(){return(this.container)?this.container.hasClass("select2-dropdown-open"):false;},positionDropdown:function(){var $dropdown=this.dropdown,container=this.container,offset=container.offset(),height=container.outerHeight(false),width=container.outerWidth(false),dropHeight=$dropdown.outerHeight(false),$window=$(window),windowWidth=$window.width(),windowHeight=$window.height(),viewPortRight=$window.scrollLeft()+windowWidth,viewportBottom=$window.scrollTop()+windowHeight,dropTop=offset.top+height,dropLeft=offset.left,enoughRoomBelow=dropTop+dropHeight<=viewportBottom,enoughRoomAbove=(offset.top-dropHeight)>=$window.scrollTop(),dropWidth=$dropdown.outerWidth(false),enoughRoomOnRight=function(){return dropLeft+dropWidth<=viewPortRight;},enoughRoomOnLeft=function(){return offset.left+viewPortRight+container.outerWidth(false)>dropWidth;},aboveNow=$dropdown.hasClass("select2-drop-above"),bodyOffset,above,changeDirection,css,resultsListNode;if(aboveNow){above=true;if(!enoughRoomAbove&&enoughRoomBelow){changeDirection=true;above=false;}}else{above=false;if(!enoughRoomBelow&&enoughRoomAbove){changeDirection=true;above=true;}}
if(changeDirection){$dropdown.hide();offset=this.container.offset();height=this.container.outerHeight(false);width=this.container.outerWidth(false);dropHeight=$dropdown.outerHeight(false);viewPortRight=$window.scrollLeft()+windowWidth;viewportBottom=$window.scrollTop()+windowHeight;dropTop=offset.top+height;dropLeft=offset.left;dropWidth=$dropdown.outerWidth(false);$dropdown.show();this.focusSearch();}
if(this.opts.dropdownAutoWidth){resultsListNode=$('.select2-results',$dropdown)[0];$dropdown.addClass('select2-drop-auto-width');$dropdown.css('width','');dropWidth=$dropdown.outerWidth(false)+(resultsListNode.scrollHeight===resultsListNode.clientHeight?0:scrollBarDimensions.width);dropWidth>width?width=dropWidth:dropWidth=width;dropHeight=$dropdown.outerHeight(false);}
else{this.container.removeClass('select2-drop-auto-width');}
if(this.body.css('position')!=='static'){bodyOffset=this.body.offset();dropTop-=bodyOffset.top;dropLeft-=bodyOffset.left;}
if(!enoughRoomOnRight()&&enoughRoomOnLeft()){dropLeft=offset.left+this.container.outerWidth(false)-dropWidth;}
css={left:dropLeft,width:width};if(above){this.container.addClass("select2-drop-above");$dropdown.addClass("select2-drop-above");dropHeight=$dropdown.outerHeight(false);css.top=offset.top-dropHeight;css.bottom='auto';}
else{css.top=dropTop;css.bottom='auto';this.container.removeClass("select2-drop-above");$dropdown.removeClass("select2-drop-above");}
css=$.extend(css,evaluate(this.opts.dropdownCss,this.opts.element));$dropdown.css(css);},shouldOpen:function(){var event;if(this.opened())return false;if(this._enabled===false||this._readonly===true)return false;event=$.Event("select2-opening");this.opts.element.trigger(event);return!event.isDefaultPrevented();},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above");this.dropdown.removeClass("select2-drop-above");},open:function(){if(!this.shouldOpen())return false;this.opening();$document.on("mousemove.select2Event",function(e){lastMousePosition.x=e.pageX;lastMousePosition.y=e.pageY;});return true;},opening:function(){var cid=this.containerEventName,scroll="scroll."+cid,resize="resize."+cid,orient="orientationchange."+cid,mask;this.container.addClass("select2-dropdown-open").addClass("select2-container-active");this.clearDropdownAlignmentPreference();if(this.dropdown[0]!==this.body.children().last()[0]){this.dropdown.detach().appendTo(this.body);}
mask=$("#select2-drop-mask");if(mask.length===0){mask=$(document.createElement("div"));mask.attr("id","select2-drop-mask").attr("class","select2-drop-mask");mask.hide();mask.appendTo(this.body);mask.on("mousedown touchstart click",function(e){reinsertElement(mask);var dropdown=$("#select2-drop"),self;if(dropdown.length>0){self=dropdown.data("select2");if(self.opts.selectOnBlur){self.selectHighlighted({noFocus:true});}
self.close();e.preventDefault();e.stopPropagation();}});}
if(this.dropdown.prev()[0]!==mask[0]){this.dropdown.before(mask);}
$("#select2-drop").removeAttr("id");this.dropdown.attr("id","select2-drop");mask.show();this.positionDropdown();this.dropdown.show();this.positionDropdown();this.dropdown.addClass("select2-drop-active");var that=this;this.container.parents().add(window).each(function(){$(this).on(resize+" "+scroll+" "+orient,function(e){if(that.opened())that.positionDropdown();});});},close:function(){if(!this.opened())return;var cid=this.containerEventName,scroll="scroll."+cid,resize="resize."+cid,orient="orientationchange."+cid;this.container.parents().add(window).each(function(){$(this).off(scroll).off(resize).off(orient);});this.clearDropdownAlignmentPreference();$("#select2-drop-mask").hide();this.dropdown.removeAttr("id");this.dropdown.hide();this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active");this.results.empty();$document.off("mousemove.select2Event");this.clearSearch();this.search.removeClass("select2-active");this.search.removeAttr("aria-activedescendant");this.opts.element.trigger($.Event("select2-close"));},externalSearch:function(term){this.open();this.search.val(term);this.updateResults(false);},clearSearch:function(){},prefillNextSearchTerm:function(){if(this.search.val()!==""){return false;}
var nextSearchTerm=this.opts.nextSearchTerm(this.data(),this.lastSearchTerm);if(nextSearchTerm!==undefined){this.search.val(nextSearchTerm);this.search.select();return true;}
return false;},getMaximumSelectionSize:function(){return evaluate(this.opts.maximumSelectionSize,this.opts.element);},ensureHighlightVisible:function(){var results=this.results,children,index,child,hb,rb,y,more,topOffset;index=this.highlight();if(index<0)return;if(index==0){results.scrollTop(0);return;}
children=this.findHighlightableChoices().find('.select2-result-label');child=$(children[index]);topOffset=(child.offset()||{}).top||0;hb=topOffset+child.outerHeight(true);if(index===children.length-1){more=results.find("li.select2-more-results");if(more.length>0){hb=more.offset().top+more.outerHeight(true);}}
rb=results.offset().top+results.outerHeight(false);if(hb>rb){results.scrollTop(results.scrollTop()+(hb-rb));}
y=topOffset-results.offset().top;if(y<0&&child.css('display')!='none'){results.scrollTop(results.scrollTop()+y);}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)");},moveHighlight:function(delta){var choices=this.findHighlightableChoices(),index=this.highlight();while(index>-1&&index<choices.length){index+=delta;var choice=$(choices[index]);if(choice.hasClass("select2-result-selectable")&&!choice.hasClass("select2-disabled")&&!choice.hasClass("select2-selected")){this.highlight(index);break;}}},highlight:function(index){var choices=this.findHighlightableChoices(),choice,data;if(arguments.length===0){return indexOf(choices.filter(".select2-highlighted")[0],choices.get());}
if(index>=choices.length)index=choices.length-1;if(index<0)index=0;this.removeHighlight();choice=$(choices[index]);choice.addClass("select2-highlighted");this.search.attr("aria-activedescendant",choice.find(".select2-result-label").attr("id"));this.ensureHighlightVisible();this.liveRegion.text(choice.text());data=choice.data("select2-data");if(data){this.opts.element.trigger({type:"select2-highlight",val:this.id(data),choice:data});}},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted");},touchMoved:function(){this._touchMoved=true;},clearTouchMoved:function(){this._touchMoved=false;},countSelectableResults:function(){return this.findHighlightableChoices().length;},highlightUnderEvent:function(event){var el=$(event.target).closest(".select2-result-selectable");if(el.length>0&&!el.is(".select2-highlighted")){var choices=this.findHighlightableChoices();this.highlight(choices.index(el));}else if(el.length==0){this.removeHighlight();}},loadMoreIfNeeded:function(){var results=this.results,more=results.find("li.select2-more-results"),below,page=this.resultsPage+1,self=this,term=this.search.val(),context=this.context;if(more.length===0)return;below=more.offset().top-results.offset().top-results.height();if(below<=this.opts.loadMorePadding){more.addClass("select2-active");this.opts.query({element:this.opts.element,term:term,page:page,context:context,matcher:this.opts.matcher,callback:this.bind(function(data){if(!self.opened())return;self.opts.populateResults.call(this,results,data.results,{term:term,page:page,context:context});self.postprocessResults(data,false,false);if(data.more===true){more.detach().appendTo(results).html(self.opts.escapeMarkup(evaluate(self.opts.formatLoadMore,self.opts.element,page+1)));window.setTimeout(function(){self.loadMoreIfNeeded();},10);}else{more.remove();}
self.positionDropdown();self.resultsPage=page;self.context=data.context;this.opts.element.trigger({type:"select2-loaded",items:data});})});}},tokenize:function(){},updateResults:function(initial){var search=this.search,results=this.results,opts=this.opts,data,self=this,input,term=search.val(),lastTerm=$.data(this.container,"select2-last-term"),queryNumber;if(initial!==true&&lastTerm&&equal(term,lastTerm))return;$.data(this.container,"select2-last-term",term);if(initial!==true&&(this.showSearchInput===false||!this.opened())){return;}
function postRender(){search.removeClass("select2-active");self.positionDropdown();if(results.find('.select2-no-results,.select2-selection-limit,.select2-searching').length){self.liveRegion.text(results.text());}
else{self.liveRegion.text(self.opts.formatMatches(results.find('.select2-result-selectable:not(".select2-selected")').length));}}
function render(html){results.html(html);postRender();}
queryNumber=++this.queryCount;var maxSelSize=this.getMaximumSelectionSize();if(maxSelSize>=1){data=this.data();if($.isArray(data)&&data.length>=maxSelSize&&checkFormatter(opts.formatSelectionTooBig,"formatSelectionTooBig")){render("<li class='select2-selection-limit'>"+evaluate(opts.formatSelectionTooBig,opts.element,maxSelSize)+"</li>");return;}}
if(search.val().length<opts.minimumInputLength){if(checkFormatter(opts.formatInputTooShort,"formatInputTooShort")){render("<li class='select2-no-results'>"+evaluate(opts.formatInputTooShort,opts.element,search.val(),opts.minimumInputLength)+"</li>");}else{render("");}
if(initial&&this.showSearch)this.showSearch(true);return;}
if(opts.maximumInputLength&&search.val().length>opts.maximumInputLength){if(checkFormatter(opts.formatInputTooLong,"formatInputTooLong")){render("<li class='select2-no-results'>"+evaluate(opts.formatInputTooLong,opts.element,search.val(),opts.maximumInputLength)+"</li>");}else{render("");}
return;}
if(opts.formatSearching&&this.findHighlightableChoices().length===0){render("<li class='select2-searching'>"+evaluate(opts.formatSearching,opts.element)+"</li>");}
search.addClass("select2-active");this.removeHighlight();input=this.tokenize();if(input!=undefined&&input!=null){search.val(input);}
this.resultsPage=1;opts.query({element:opts.element,term:search.val(),page:this.resultsPage,context:null,matcher:opts.matcher,callback:this.bind(function(data){var def;if(queryNumber!=this.queryCount){return;}
if(!this.opened()){this.search.removeClass("select2-active");return;}
if(data.hasError!==undefined&&checkFormatter(opts.formatAjaxError,"formatAjaxError")){render("<li class='select2-ajax-error'>"+evaluate(opts.formatAjaxError,opts.element,data.jqXHR,data.textStatus,data.errorThrown)+"</li>");return;}
this.context=(data.context===undefined)?null:data.context;if(this.opts.createSearchChoice&&search.val()!==""){def=this.opts.createSearchChoice.call(self,search.val(),data.results);if(def!==undefined&&def!==null&&self.id(def)!==undefined&&self.id(def)!==null){if($(data.results).filter(function(){return equal(self.id(this),self.id(def));}).length===0){this.opts.createSearchChoicePosition(data.results,def);}}}
if(data.results.length===0&&checkFormatter(opts.formatNoMatches,"formatNoMatches")){render("<li class='select2-no-results'>"+evaluate(opts.formatNoMatches,opts.element,search.val())+"</li>");if(this.showSearch){this.showSearch(search.val());}
return;}
results.empty();self.opts.populateResults.call(this,results,data.results,{term:search.val(),page:this.resultsPage,context:null});if(data.more===true&&checkFormatter(opts.formatLoadMore,"formatLoadMore")){results.append("<li class='select2-more-results'>"+opts.escapeMarkup(evaluate(opts.formatLoadMore,opts.element,this.resultsPage))+"</li>");window.setTimeout(function(){self.loadMoreIfNeeded();},10);}
this.postprocessResults(data,initial);postRender();this.opts.element.trigger({type:"select2-loaded",items:data});})});},cancel:function(){this.close();},blur:function(){if(this.opts.selectOnBlur)
this.selectHighlighted({noFocus:true});this.close();this.container.removeClass("select2-container-active");if(this.search[0]===document.activeElement){this.search.blur();}
this.clearSearch();this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");},focusSearch:function(){focus(this.search);},selectHighlighted:function(options){if(this._touchMoved){this.clearTouchMoved();return;}
var index=this.highlight(),highlighted=this.results.find(".select2-highlighted"),data=highlighted.closest('.select2-result').data("select2-data");if(data){this.highlight(index);this.onSelect(data,options);}else if(options&&options.noFocus){this.close();}},getPlaceholder:function(){var placeholderOption;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((placeholderOption=this.getPlaceholderOption())!==undefined?placeholderOption.text():undefined);},getPlaceholderOption:function(){if(this.select){var firstOption=this.select.children('option').first();if(this.opts.placeholderOption!==undefined){return(this.opts.placeholderOption==="first"&&firstOption)||(typeof this.opts.placeholderOption==="function"&&this.opts.placeholderOption(this.select));}else if($.trim(firstOption.text())===""&&firstOption.val()===""){return firstOption;}}},initContainerWidth:function(){function resolveContainerWidth(){var style,attrs,matches,i,l,attr;if(this.opts.width==="off"){return null;}else if(this.opts.width==="element"){return this.opts.element.outerWidth(false)===0?'auto':this.opts.element.outerWidth(false)+'px';}else if(this.opts.width==="copy"||this.opts.width==="resolve"){style=this.opts.element.attr('style');if(typeof(style)==="string"){attrs=style.split(';');for(i=0,l=attrs.length;i<l;i=i+1){attr=attrs[i].replace(/\s/g,'');matches=attr.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);if(matches!==null&&matches.length>=1)
return matches[1];}}
if(this.opts.width==="resolve"){style=this.opts.element.css('width');if(style.indexOf("%")>0)return style;return(this.opts.element.outerWidth(false)===0?'auto':this.opts.element.outerWidth(false)+'px');}
return null;}else if($.isFunction(this.opts.width)){return this.opts.width();}else{return this.opts.width;}};var width=resolveContainerWidth.call(this);if(width!==null){this.container.css("width",width);}}});SingleSelect2=clazz(AbstractSelect2,{createContainer:function(){var container=$(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>","   <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>","   <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>","   <div class='select2-search'>","       <label for='' class='select2-offscreen'></label>","       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'","       aria-autocomplete='list' />","   </div>","   <ul class='select2-results' role='listbox'>","   </ul>","</div>"].join(""));return container;},enableInterface:function(){if(this.parent.enableInterface.apply(this,arguments)){this.focusser.prop("disabled",!this.isInterfaceEnabled());}},opening:function(){var el,range,len;if(this.opts.minimumResultsForSearch>=0){this.showSearch(true);}
this.parent.opening.apply(this,arguments);if(this.showSearchInput!==false){this.search.val(this.focusser.val());}
if(this.opts.shouldFocusInput(this)){this.search.focus();el=this.search.get(0);if(el.createTextRange){range=el.createTextRange();range.collapse(false);range.select();}else if(el.setSelectionRange){len=this.search.val().length;el.setSelectionRange(len,len);}}
this.prefillNextSearchTerm();this.focusser.prop("disabled",true).val("");this.updateResults(true);this.opts.element.trigger($.Event("select2-open"));},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments);this.focusser.prop("disabled",false);if(this.opts.shouldFocusInput(this)){this.focusser.focus();}},focus:function(){if(this.opened()){this.close();}else{this.focusser.prop("disabled",false);if(this.opts.shouldFocusInput(this)){this.focusser.focus();}}},isFocused:function(){return this.container.hasClass("select2-container-active");},cancel:function(){this.parent.cancel.apply(this,arguments);this.focusser.prop("disabled",false);if(this.opts.shouldFocusInput(this)){this.focusser.focus();}},destroy:function(){$("label[for='"+this.focusser.attr('id')+"']").attr('for',this.opts.element.attr("id"));this.parent.destroy.apply(this,arguments);cleanupJQueryElements.call(this,"selection","focusser");},initContainer:function(){var selection,container=this.container,dropdown=this.dropdown,idSuffix=nextUid(),elementLabel;if(this.opts.minimumResultsForSearch<0){this.showSearch(false);}else{this.showSearch(true);}
this.selection=selection=container.find(".select2-choice");this.focusser=container.find(".select2-focusser");selection.find(".select2-chosen").attr("id","select2-chosen-"+idSuffix);this.focusser.attr("aria-labelledby","select2-chosen-"+idSuffix);this.results.attr("id","select2-results-"+idSuffix);this.search.attr("aria-owns","select2-results-"+idSuffix);this.focusser.attr("id","s2id_autogen"+idSuffix);elementLabel=$("label[for='"+this.opts.element.attr("id")+"']");this.opts.element.on('focus.select2',this.bind(function(){this.focus();}));this.focusser.prev().text(elementLabel.text()).attr('for',this.focusser.attr('id'));var originalTitle=this.opts.element.attr("title");this.opts.element.attr("title",(originalTitle||elementLabel.text()));this.focusser.attr("tabindex",this.elementTabIndex);this.search.attr("id",this.focusser.attr('id')+'_search');this.search.prev().text($("label[for='"+this.focusser.attr('id')+"']").text()).attr('for',this.search.attr('id'));this.search.on("keydown",this.bind(function(e){if(!this.isInterfaceEnabled())return;if(229==e.keyCode)return;if(e.which===KEY.PAGE_UP||e.which===KEY.PAGE_DOWN){killEvent(e);return;}
switch(e.which){case KEY.UP:case KEY.DOWN:this.moveHighlight((e.which===KEY.UP)?-1:1);killEvent(e);return;case KEY.ENTER:this.selectHighlighted();killEvent(e);return;case KEY.TAB:this.selectHighlighted({noFocus:true});return;case KEY.ESC:this.cancel(e);killEvent(e);return;}}));this.search.on("blur",this.bind(function(e){if(document.activeElement===this.body.get(0)){window.setTimeout(this.bind(function(){if(this.opened()&&this.results&&this.results.length>1){this.search.focus();}}),0);}}));this.focusser.on("keydown",this.bind(function(e){if(!this.isInterfaceEnabled())return;if(e.which===KEY.TAB||KEY.isControl(e)||KEY.isFunctionKey(e)||e.which===KEY.ESC){return;}
if(this.opts.openOnEnter===false&&e.which===KEY.ENTER){killEvent(e);return;}
if(e.which==KEY.DOWN||e.which==KEY.UP||(e.which==KEY.ENTER&&this.opts.openOnEnter)){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return;this.open();killEvent(e);return;}
if(e.which==KEY.DELETE||e.which==KEY.BACKSPACE){if(this.opts.allowClear){this.clear();}
killEvent(e);return;}}));installKeyUpChangeEvent(this.focusser);this.focusser.on("keyup-change input",this.bind(function(e){if(this.opts.minimumResultsForSearch>=0){e.stopPropagation();if(this.opened())return;this.open();}}));selection.on("mousedown touchstart","abbr",this.bind(function(e){if(!this.isInterfaceEnabled()){return;}
this.clear();killEventImmediately(e);this.close();if(this.selection){this.selection.focus();}}));selection.on("mousedown touchstart",this.bind(function(e){reinsertElement(selection);if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger($.Event("select2-focus"));}
if(this.opened()){this.close();}else if(this.isInterfaceEnabled()){this.open();}
killEvent(e);}));dropdown.on("mousedown touchstart",this.bind(function(){if(this.opts.shouldFocusInput(this)){this.search.focus();}}));selection.on("focus",this.bind(function(e){killEvent(e);}));this.focusser.on("focus",this.bind(function(){if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger($.Event("select2-focus"));}
this.container.addClass("select2-container-active");})).on("blur",this.bind(function(){if(!this.opened()){this.container.removeClass("select2-container-active");this.opts.element.trigger($.Event("select2-blur"));}}));this.search.on("focus",this.bind(function(){if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger($.Event("select2-focus"));}
this.container.addClass("select2-container-active");}));this.initContainerWidth();this.opts.element.hide();this.setPlaceholder();},clear:function(triggerChange){var data=this.selection.data("select2-data");if(data){var evt=$.Event("select2-clearing");this.opts.element.trigger(evt);if(evt.isDefaultPrevented()){return;}
var placeholderOption=this.getPlaceholderOption();this.opts.element.val(placeholderOption?placeholderOption.val():"");this.selection.find(".select2-chosen").empty();this.selection.removeData("select2-data");this.setPlaceholder();if(triggerChange!==false){this.opts.element.trigger({type:"select2-removed",val:this.id(data),choice:data});this.triggerChange({removed:data});}}},initSelection:function(){var selected;if(this.isPlaceholderOptionSelected()){this.updateSelection(null);this.close();this.setPlaceholder();}else{var self=this;this.opts.initSelection.call(null,this.opts.element,function(selected){if(selected!==undefined&&selected!==null){self.updateSelection(selected);self.close();self.setPlaceholder();self.lastSearchTerm=self.search.val();}});}},isPlaceholderOptionSelected:function(){var placeholderOption;if(this.getPlaceholder()===undefined)return false;return((placeholderOption=this.getPlaceholderOption())!==undefined&&placeholderOption.prop("selected"))||(this.opts.element.val()==="")||(this.opts.element.val()===undefined)||(this.opts.element.val()===null);},prepareOpts:function(){var opts=this.parent.prepareOpts.apply(this,arguments),self=this;if(opts.element.get(0).tagName.toLowerCase()==="select"){opts.initSelection=function(element,callback){var selected=element.find("option").filter(function(){return this.selected&&!this.disabled});callback(self.optionToData(selected));};}else if("data"in opts){opts.initSelection=opts.initSelection||function(element,callback){var id=element.val();var match=null;opts.query({matcher:function(term,text,el){var is_match=equal(id,opts.id(el));if(is_match){match=el;}
return is_match;},callback:!$.isFunction(callback)?$.noop:function(){callback(match);}});};}
return opts;},getPlaceholder:function(){if(this.select){if(this.getPlaceholderOption()===undefined){return undefined;}}
return this.parent.getPlaceholder.apply(this,arguments);},setPlaceholder:function(){var placeholder=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&placeholder!==undefined){if(this.select&&this.getPlaceholderOption()===undefined)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(placeholder));this.selection.addClass("select2-default");this.container.removeClass("select2-allowclear");}},postprocessResults:function(data,initial,noHighlightUpdate){var selected=0,self=this,showSearchInput=true;this.findHighlightableChoices().each2(function(i,elm){if(equal(self.id(elm.data("select2-data")),self.opts.element.val())){selected=i;return false;}});if(noHighlightUpdate!==false){if(initial===true&&selected>=0){this.highlight(selected);}else{this.highlight(0);}}
if(initial===true){var min=this.opts.minimumResultsForSearch;if(min>=0){this.showSearch(countResults(data.results)>=min);}}},showSearch:function(showSearchInput){if(this.showSearchInput===showSearchInput)return;this.showSearchInput=showSearchInput;this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!showSearchInput);this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!showSearchInput);$(this.dropdown,this.container).toggleClass("select2-with-searchbox",showSearchInput);},onSelect:function(data,options){if(!this.triggerSelect(data)){return;}
var old=this.opts.element.val(),oldData=this.data();this.opts.element.val(this.id(data));this.updateSelection(data);this.opts.element.trigger({type:"select2-selected",val:this.id(data),choice:data});this.lastSearchTerm=this.search.val();this.close();if((!options||!options.noFocus)&&this.opts.shouldFocusInput(this)){this.focusser.focus();}
if(!equal(old,this.id(data))){this.triggerChange({added:data,removed:oldData});}},updateSelection:function(data){var container=this.selection.find(".select2-chosen"),formatted,cssClass;this.selection.data("select2-data",data);container.empty();if(data!==null){formatted=this.opts.formatSelection(data,container,this.opts.escapeMarkup);}
if(formatted!==undefined){container.append(formatted);}
cssClass=this.opts.formatSelectionCssClass(data,container);if(cssClass!==undefined){container.addClass(cssClass);}
this.selection.removeClass("select2-default");if(this.opts.allowClear&&this.getPlaceholder()!==undefined){this.container.addClass("select2-allowclear");}},val:function(){var val,triggerChange=false,data=null,self=this,oldData=this.data();if(arguments.length===0){return this.opts.element.val();}
val=arguments[0];if(arguments.length>1){triggerChange=arguments[1];if(this.opts.debug&&console&&console.warn){console.warn('Select2: The second option to `select2("val")` is not supported in Select2 4.0.0. '+'The `change` event will always be triggered in 4.0.0.');}}
if(this.select){if(this.opts.debug&&console&&console.warn){console.warn('Select2: Setting the value on a <select> using `select2("val")` is no longer supported in 4.0.0. '+'You can use the `.val(newValue).trigger("change")` method provided by jQuery instead.');}
this.select.val(val).find("option").filter(function(){return this.selected}).each2(function(i,elm){data=self.optionToData(elm);return false;});this.updateSelection(data);this.setPlaceholder();if(triggerChange){this.triggerChange({added:data,removed:oldData});}}else{if(!val&&val!==0){this.clear(triggerChange);return;}
if(this.opts.initSelection===undefined){throw new Error("cannot call val() if initSelection() is not defined");}
this.opts.element.val(val);this.opts.initSelection(this.opts.element,function(data){self.opts.element.val(!data?"":self.id(data));self.updateSelection(data);self.setPlaceholder();if(triggerChange){self.triggerChange({added:data,removed:oldData});}});}},clearSearch:function(){this.search.val("");this.focusser.val("");},data:function(value){var data,triggerChange=false;if(arguments.length===0){data=this.selection.data("select2-data");if(data==undefined)data=null;return data;}else{if(this.opts.debug&&console&&console.warn){console.warn('Select2: The `select2("data")` method can no longer set selected values in 4.0.0, '+'consider using the `.val()` method instead.');}
if(arguments.length>1){triggerChange=arguments[1];}
if(!value){this.clear(triggerChange);}else{data=this.data();this.opts.element.val(!value?"":this.id(value));this.updateSelection(value);if(triggerChange){this.triggerChange({added:value,removed:data});}}}}});MultiSelect2=clazz(AbstractSelect2,{createContainer:function(){var container=$(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>","  <li class='select2-search-field'>","    <label for='' class='select2-offscreen'></label>","    <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>","  </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>","   <ul class='select2-results'>","   </ul>","</div>"].join(""));return container;},prepareOpts:function(){var opts=this.parent.prepareOpts.apply(this,arguments),self=this;if(opts.element.get(0).tagName.toLowerCase()==="select"){opts.initSelection=function(element,callback){var data=[];element.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(i,elm){data.push(self.optionToData(elm));});callback(data);};}else if("data"in opts){opts.initSelection=opts.initSelection||function(element,callback){var ids=splitVal(element.val(),opts.separator,opts.transformVal);var matches=[];opts.query({matcher:function(term,text,el){var is_match=$.grep(ids,function(id){return equal(id,opts.id(el));}).length;if(is_match){matches.push(el);}
return is_match;},callback:!$.isFunction(callback)?$.noop:function(){var ordered=[];for(var i=0;i<ids.length;i++){var id=ids[i];for(var j=0;j<matches.length;j++){var match=matches[j];if(equal(id,opts.id(match))){ordered.push(match);matches.splice(j,1);break;}}}
callback(ordered);}});};}
return opts;},selectChoice:function(choice){var selected=this.container.find(".select2-search-choice-focus");if(selected.length&&choice&&choice[0]==selected[0]){}else{if(selected.length){this.opts.element.trigger("choice-deselected",selected);}
selected.removeClass("select2-search-choice-focus");if(choice&&choice.length){this.close();choice.addClass("select2-search-choice-focus");this.opts.element.trigger("choice-selected",choice);}}},destroy:function(){$("label[for='"+this.search.attr('id')+"']").attr('for',this.opts.element.attr("id"));this.parent.destroy.apply(this,arguments);cleanupJQueryElements.call(this,"searchContainer","selection");},initContainer:function(){var selector=".select2-choices",selection;this.searchContainer=this.container.find(".select2-search-field");this.selection=selection=this.container.find(selector);var _this=this;this.selection.on("click",".select2-container:not(.select2-container-disabled) .select2-search-choice:not(.select2-locked)",function(e){_this.search[0].focus();_this.selectChoice($(this));});this.search.attr("id","s2id_autogen"+nextUid());this.search.prev().text($("label[for='"+this.opts.element.attr("id")+"']").text()).attr('for',this.search.attr('id'));this.opts.element.on('focus.select2',this.bind(function(){this.focus();}));this.search.on("input paste",this.bind(function(){if(this.search.attr('placeholder')&&this.search.val().length==0)return;if(!this.isInterfaceEnabled())return;if(!this.opened()){this.open();}}));this.search.attr("tabindex",this.elementTabIndex);this.keydowns=0;this.search.on("keydown",this.bind(function(e){if(!this.isInterfaceEnabled())return;++this.keydowns;var selected=selection.find(".select2-search-choice-focus");var prev=selected.prev(".select2-search-choice:not(.select2-locked)");var next=selected.next(".select2-search-choice:not(.select2-locked)");var pos=getCursorInfo(this.search);if(selected.length&&(e.which==KEY.LEFT||e.which==KEY.RIGHT||e.which==KEY.BACKSPACE||e.which==KEY.DELETE||e.which==KEY.ENTER)){var selectedChoice=selected;if(e.which==KEY.LEFT&&prev.length){selectedChoice=prev;}
else if(e.which==KEY.RIGHT){selectedChoice=next.length?next:null;}
else if(e.which===KEY.BACKSPACE){if(this.unselect(selected.first())){this.search.width(10);selectedChoice=prev.length?prev:next;}}else if(e.which==KEY.DELETE){if(this.unselect(selected.first())){this.search.width(10);selectedChoice=next.length?next:null;}}else if(e.which==KEY.ENTER){selectedChoice=null;}
this.selectChoice(selectedChoice);killEvent(e);if(!selectedChoice||!selectedChoice.length){this.open();}
return;}else if(((e.which===KEY.BACKSPACE&&this.keydowns==1)||e.which==KEY.LEFT)&&(pos.offset==0&&!pos.length)){this.selectChoice(selection.find(".select2-search-choice:not(.select2-locked)").last());killEvent(e);return;}else{this.selectChoice(null);}
if(this.opened()){switch(e.which){case KEY.UP:case KEY.DOWN:this.moveHighlight((e.which===KEY.UP)?-1:1);killEvent(e);return;case KEY.ENTER:this.selectHighlighted();killEvent(e);return;case KEY.TAB:this.selectHighlighted({noFocus:true});this.close();return;case KEY.ESC:this.cancel(e);killEvent(e);return;}}
if(e.which===KEY.TAB||KEY.isControl(e)||KEY.isFunctionKey(e)||e.which===KEY.BACKSPACE||e.which===KEY.ESC){return;}
if(e.which===KEY.ENTER){if(this.opts.openOnEnter===false){return;}else if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return;}}
this.open();if(e.which===KEY.PAGE_UP||e.which===KEY.PAGE_DOWN){killEvent(e);}
if(e.which===KEY.ENTER){killEvent(e);}}));this.search.on("keyup",this.bind(function(e){this.keydowns=0;this.resizeSearch();}));this.search.on("blur",this.bind(function(e){this.container.removeClass("select2-container-active");this.search.removeClass("select2-focused");this.selectChoice(null);if(!this.opened())this.clearSearch();e.stopImmediatePropagation();this.opts.element.trigger($.Event("select2-blur"));}));this.container.on("click",selector,this.bind(function(e){if(!this.isInterfaceEnabled())return;if($(e.target).closest(".select2-search-choice").length>0){return;}
this.selectChoice(null);this.clearPlaceholder();if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger($.Event("select2-focus"));}
this.open();this.focusSearch();e.preventDefault();}));this.container.on("focus",selector,this.bind(function(){if(!this.isInterfaceEnabled())return;if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger($.Event("select2-focus"));}
this.container.addClass("select2-container-active");this.dropdown.addClass("select2-drop-active");this.clearPlaceholder();}));this.initContainerWidth();this.opts.element.hide();this.clearSearch();},enableInterface:function(){if(this.parent.enableInterface.apply(this,arguments)){this.search.prop("disabled",!this.isInterfaceEnabled());}},initSelection:function(){var data;if(this.opts.element.val()===""&&this.opts.element.text()===""){this.updateSelection([]);this.close();this.clearSearch();}
if(this.select||this.opts.element.val()!==""){var self=this;this.opts.initSelection.call(null,this.opts.element,function(data){if(data!==undefined&&data!==null){self.updateSelection(data);self.close();self.clearSearch();}});}},clearSearch:function(){var placeholder=this.getPlaceholder(),maxWidth=this.getMaxSearchWidth();if(placeholder!==undefined&&this.getVal().length===0&&this.search.hasClass("select2-focused")===false){this.search.val(placeholder).addClass("select2-default");this.search.width(maxWidth>0?maxWidth:this.container.css("width"));}else{this.search.val("").width(10);}},clearPlaceholder:function(){if(this.search.hasClass("select2-default")){this.search.val("").removeClass("select2-default");}},opening:function(){this.clearPlaceholder();this.resizeSearch();this.parent.opening.apply(this,arguments);this.focusSearch();this.prefillNextSearchTerm();this.updateResults(true);if(this.opts.shouldFocusInput(this)){this.search.focus();}
this.opts.element.trigger($.Event("select2-open"));},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments);},focus:function(){this.close();this.search.focus();},isFocused:function(){return this.search.hasClass("select2-focused");},updateSelection:function(data){var ids={},filtered=[],self=this;$(data).each(function(){if(!(self.id(this)in ids)){ids[self.id(this)]=0;filtered.push(this);}});this.selection.find(".select2-search-choice").remove();this.addSelectedChoice(filtered);self.postprocessResults();},tokenize:function(){var input=this.search.val();input=this.opts.tokenizer.call(this,input,this.data(),this.bind(this.onSelect),this.opts);if(input!=null&&input!=undefined){this.search.val(input);if(input.length>0){this.open();}}},onSelect:function(data,options){if(!this.triggerSelect(data)||data.text===""){return;}
this.addSelectedChoice(data);this.opts.element.trigger({type:"selected",val:this.id(data),choice:data});this.lastSearchTerm=this.search.val();this.clearSearch();this.updateResults();if(this.select||!this.opts.closeOnSelect)this.postprocessResults(data,false,this.opts.closeOnSelect===true);if(this.opts.closeOnSelect){this.close();this.search.width(10);}else{if(this.countSelectableResults()>0){this.search.width(10);this.resizeSearch();if(this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()){this.updateResults(true);}else{if(this.prefillNextSearchTerm()){this.updateResults();}}
this.positionDropdown();}else{this.close();this.search.width(10);}}
this.triggerChange({added:data});if(!options||!options.noFocus)
this.focusSearch();},cancel:function(){this.close();this.focusSearch();},addSelectedChoice:function(data){var val=this.getVal(),self=this;$(data).each(function(){val.push(self.createChoice(this));});this.setVal(val);},createChoice:function(data){var enableChoice=!data.locked,enabledItem=$("<li class='select2-search-choice'>"+"    <div></div>"+"    <a href='#' class='select2-search-choice-close' tabindex='-1'></a>"+"</li>"),disabledItem=$("<li class='select2-search-choice select2-locked'>"+"<div></div>"+"</li>");var choice=enableChoice?enabledItem:disabledItem,id=this.id(data),formatted,cssClass;formatted=this.opts.formatSelection(data,choice.find("div"),this.opts.escapeMarkup);if(formatted!=undefined){choice.find("div").replaceWith($("<div></div>").html(formatted));}
cssClass=this.opts.formatSelectionCssClass(data,choice.find("div"));if(cssClass!=undefined){choice.addClass(cssClass);}
if(enableChoice){choice.find(".select2-search-choice-close").on("mousedown",killEvent).on("click dblclick",this.bind(function(e){if(!this.isInterfaceEnabled())return;this.unselect($(e.target));this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");killEvent(e);this.close();this.focusSearch();})).on("focus",this.bind(function(){if(!this.isInterfaceEnabled())return;this.container.addClass("select2-container-active");this.dropdown.addClass("select2-drop-active");}));}
choice.data("select2-data",data);choice.insertBefore(this.searchContainer);return id;},unselect:function(selected){var val=this.getVal(),data,index;selected=selected.closest(".select2-search-choice");if(selected.length===0){throw"Invalid argument: "+selected+". Must be .select2-search-choice";}
data=selected.data("select2-data");if(!data){return;}
var evt=$.Event("select2-removing");evt.val=this.id(data);evt.choice=data;this.opts.element.trigger(evt);if(evt.isDefaultPrevented()){return false;}
while((index=indexOf(this.id(data),val))>=0){val.splice(index,1);this.setVal(val);if(this.select)this.postprocessResults();}
selected.remove();this.opts.element.trigger({type:"select2-removed",val:this.id(data),choice:data});this.triggerChange({removed:data});return true;},postprocessResults:function(data,initial,noHighlightUpdate){var val=this.getVal(),choices=this.results.find(".select2-result"),compound=this.results.find(".select2-result-with-children"),self=this;choices.each2(function(i,choice){var id=self.id(choice.data("select2-data"));if(indexOf(id,val)>=0){choice.addClass("select2-selected");choice.find(".select2-result-selectable").addClass("select2-selected");}});compound.each2(function(i,choice){if(!choice.is('.select2-result-selectable')&&choice.find(".select2-result-selectable:not(.select2-selected)").length===0){choice.addClass("select2-selected");}});if(this.highlight()==-1&&noHighlightUpdate!==false&&this.opts.closeOnSelect===true){self.highlight(0);}
if(!this.opts.createSearchChoice&&!choices.filter('.select2-result:not(.select2-selected)').length>0){if(!data||data&&!data.more&&this.results.find(".select2-no-results").length===0){if(checkFormatter(self.opts.formatNoMatches,"formatNoMatches")){this.results.append("<li class='select2-no-results'>"+evaluate(self.opts.formatNoMatches,self.opts.element,self.search.val())+"</li>");}}}},getMaxSearchWidth:function(){return this.selection.width()-getSideBorderPadding(this.search);},resizeSearch:function(){var minimumWidth,left,maxWidth,containerLeft,searchWidth,sideBorderPadding=getSideBorderPadding(this.search);minimumWidth=measureTextWidth(this.search)+10;left=this.search.offset().left;maxWidth=this.selection.width();containerLeft=this.selection.offset().left;searchWidth=maxWidth-(left-containerLeft)-sideBorderPadding;if(searchWidth<minimumWidth){searchWidth=maxWidth-sideBorderPadding;}
if(searchWidth<40){searchWidth=maxWidth-sideBorderPadding;}
if(searchWidth<=0){searchWidth=minimumWidth;}
this.search.width(Math.floor(searchWidth));},getVal:function(){var val;if(this.select){val=this.select.val();return val===null?[]:val;}else{val=this.opts.element.val();return splitVal(val,this.opts.separator,this.opts.transformVal);}},setVal:function(val){if(this.select){this.select.val(val);}else{var unique=[],valMap={};$(val).each(function(){if(!(this in valMap)){unique.push(this);valMap[this]=0;}});this.opts.element.val(unique.length===0?"":unique.join(this.opts.separator));}},buildChangeDetails:function(old,current){var current=current.slice(0),old=old.slice(0);for(var i=0;i<current.length;i++){for(var j=0;j<old.length;j++){if(equal(this.opts.id(current[i]),this.opts.id(old[j]))){current.splice(i,1);i--;old.splice(j,1);break;}}}
return{added:current,removed:old};},val:function(val,triggerChange){var oldData,self=this;if(arguments.length===0){return this.getVal();}
oldData=this.data();if(!oldData.length)oldData=[];if(!val&&val!==0){this.opts.element.val("");this.updateSelection([]);this.clearSearch();if(triggerChange){this.triggerChange({added:this.data(),removed:oldData});}
return;}
this.setVal(val);if(this.select){this.opts.initSelection(this.select,this.bind(this.updateSelection));if(triggerChange){this.triggerChange(this.buildChangeDetails(oldData,this.data()));}}else{if(this.opts.initSelection===undefined){throw new Error("val() cannot be called if initSelection() is not defined");}
this.opts.initSelection(this.opts.element,function(data){var ids=$.map(data,self.id);self.setVal(ids);self.updateSelection(data);self.clearSearch();if(triggerChange){self.triggerChange(self.buildChangeDetails(oldData,self.data()));}});}
this.clearSearch();},onSortStart:function(){if(this.select){throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");}
this.search.width(0);this.searchContainer.hide();},onSortEnd:function(){var val=[],self=this;this.searchContainer.show();this.searchContainer.appendTo(this.searchContainer.parent());this.resizeSearch();this.selection.find(".select2-search-choice").each(function(){val.push(self.opts.id($(this).data("select2-data")));});this.setVal(val);this.triggerChange();},data:function(values,triggerChange){var self=this,ids,old;if(arguments.length===0){return this.selection.children(".select2-search-choice").map(function(){return $(this).data("select2-data");}).get();}else{old=this.data();if(!values){values=[];}
ids=$.map(values,function(e){return self.opts.id(e);});this.setVal(ids);this.updateSelection(values);this.clearSearch();if(triggerChange){this.triggerChange(this.buildChangeDetails(old,this.data()));}}}});$.fn.select2=function(){var args=Array.prototype.slice.call(arguments,0),opts,select2,method,value,multiple,allowedMethods=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],valueMethods=["opened","isFocused","container","dropdown"],propertyMethods=["val","data"],methodsMap={search:"externalSearch"};this.each(function(){if(args.length===0||typeof(args[0])==="object"){opts=args.length===0?{}:$.extend({},args[0]);opts.element=$(this);if(opts.element.get(0).tagName.toLowerCase()==="select"){multiple=opts.element.prop("multiple");}else{multiple=opts.multiple||false;if("tags"in opts){opts.multiple=multiple=true;}}
select2=multiple?new window.Select2["class"].multi():new window.Select2["class"].single();select2.init(opts);}else if(typeof(args[0])==="string"){if(indexOf(args[0],allowedMethods)<0){throw"Unknown method: "+args[0];}
value=undefined;select2=$(this).data("select2");if(select2===undefined)return;method=args[0];if(method==="container"){value=select2.container;}else if(method==="dropdown"){value=select2.dropdown;}else{if(methodsMap[method])method=methodsMap[method];value=select2[method].apply(select2,args.slice(1));}
if(indexOf(args[0],valueMethods)>=0||(indexOf(args[0],propertyMethods)>=0&&args.length==1)){return false;}}else{throw"Invalid arguments to select2 plugin: "+args;}});return(value===undefined)?this:value;};$.fn.select2.defaults={debug:false,width:"copy",loadMorePadding:0,closeOnSelect:true,openOnEnter:true,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(result,container,query,escapeMarkup){var markup=[];markMatch(this.text(result),query.term,markup,escapeMarkup);return markup.join("");},transformVal:function(val){return $.trim(val);},formatSelection:function(data,container,escapeMarkup){return data?escapeMarkup(this.text(data)):undefined;},sortResults:function(results,container,query){return results;},formatResultCssClass:function(data){return data.css;},formatSelectionCssClass:function(data,container){return undefined;},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e==undefined?null:e.id;},text:function(e){if(e&&this.data&&this.data.text){if($.isFunction(this.data.text)){return this.data.text(e);}else{return e[this.data.text];}}else{return e.text;}},matcher:function(term,text){return stripDiacritics(''+text).toUpperCase().indexOf(stripDiacritics(''+term).toUpperCase())>=0;},separator:",",tokenSeparators:[],tokenizer:defaultTokenizer,escapeMarkup:defaultEscapeMarkup,blurOnChange:false,selectOnBlur:false,adaptContainerCssClass:function(c){return c;},adaptDropdownCssClass:function(c){return null;},nextSearchTerm:function(selectedObject,currentSearchTerm){return undefined;},searchInputPlaceholder:'',createSearchChoicePosition:'top',shouldFocusInput:function(instance){var supportsTouchEvents=(('ontouchstart'in window)||(navigator.msMaxTouchPoints>0));if(!supportsTouchEvents){return true;}
if(instance.opts.minimumResultsForSearch<0){return false;}
return true;}};$.fn.select2.locales=[];$.fn.select2.locales['en']={formatMatches:function(matches){if(matches===1){return"One result is available, press enter to select it.";}return matches+" results are available, use up and down arrow keys to navigate.";},formatNoMatches:function(){return"No matches found";},formatAjaxError:function(jqXHR,textStatus,errorThrown){return"Loading failed";},formatInputTooShort:function(input,min){var n=min-input.length;return"Please enter "+n+" or more character"+(n==1?"":"s");},formatInputTooLong:function(input,max){var n=input.length-max;return"Please delete "+n+" character"+(n==1?"":"s");},formatSelectionTooBig:function(limit){return"You can only select "+limit+" item"+(limit==1?"":"s");},formatLoadMore:function(pageNumber){return"Loading more results…";},formatSearching:function(){return"Searching…";}};$.extend($.fn.select2.defaults,$.fn.select2.locales['en']);$.fn.select2.ajaxDefaults={transport:$.ajax,params:{type:"GET",cache:false,dataType:"json"}};window.Select2={query:{ajax:ajax,local:local,tags:tags},util:{debounce:debounce,markMatch:markMatch,escapeMarkup:defaultEscapeMarkup,stripDiacritics:stripDiacritics},"class":{"abstract":AbstractSelect2,"single":SingleSelect2,"multi":MultiSelect2}};}(jQuery));;

/* /web/static/lib/clipboard/clipboard.js defined in bundle 'web.assets_common' */
(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==='object'&&typeof module==='object')
module.exports=factory();else if(typeof define==='function'&&define.amd)
define([],factory);else if(typeof exports==='object')
exports["ClipboardJS"]=factory();else
root["ClipboardJS"]=factory();})(this,function(){return(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports;}
var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports;}
__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.i=function(value){return value;};__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{configurable:false,enumerable:true,get:getter});}};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module['default'];}:function getModuleExports(){return module;};__webpack_require__.d(getter,'a',getter);return getter;};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property);};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=3);})
([(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(global,factory){if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__=[module,__webpack_require__(7)],__WEBPACK_AMD_DEFINE_FACTORY__=(factory),__WEBPACK_AMD_DEFINE_RESULT__=(typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__)):__WEBPACK_AMD_DEFINE_FACTORY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports!=="undefined"){factory(module,require('select'));}else{var mod={exports:{}};factory(mod,global.select);global.clipboardAction=mod.exports;}})(this,function(module,_select){'use strict';var _select2=_interopRequireDefault(_select);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}
var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var ClipboardAction=function(){function ClipboardAction(options){_classCallCheck(this,ClipboardAction);this.resolveOptions(options);this.initSelection();}
_createClass(ClipboardAction,[{key:'resolveOptions',value:function resolveOptions(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.action=options.action;this.container=options.container;this.emitter=options.emitter;this.target=options.target;this.text=options.text;this.trigger=options.trigger;this.selectedText='';}},{key:'initSelection',value:function initSelection(){if(this.text){this.selectFake();}else if(this.target){this.selectTarget();}}},{key:'selectFake',value:function selectFake(){var _this=this;var isRTL=document.documentElement.getAttribute('dir')=='rtl';this.removeFake();this.fakeHandlerCallback=function(){return _this.removeFake();};this.fakeHandler=this.container.addEventListener('click',this.fakeHandlerCallback)||true;this.fakeElem=document.createElement('textarea');this.fakeElem.style.fontSize='12pt';this.fakeElem.style.border='0';this.fakeElem.style.padding='0';this.fakeElem.style.margin='0';this.fakeElem.style.position='absolute';this.fakeElem.style[isRTL?'right':'left']='-9999px';var yPosition=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=yPosition+'px';this.fakeElem.setAttribute('readonly','');this.fakeElem.value=this.text;this.container.appendChild(this.fakeElem);this.selectedText=(0,_select2.default)(this.fakeElem);this.copyText();}},{key:'removeFake',value:function removeFake(){if(this.fakeHandler){this.container.removeEventListener('click',this.fakeHandlerCallback);this.fakeHandler=null;this.fakeHandlerCallback=null;}
if(this.fakeElem){this.container.removeChild(this.fakeElem);this.fakeElem=null;}}},{key:'selectTarget',value:function selectTarget(){this.selectedText=(0,_select2.default)(this.target);this.copyText();}},{key:'copyText',value:function copyText(){var succeeded=void 0;try{succeeded=document.execCommand(this.action);}catch(err){succeeded=false;}
this.handleResult(succeeded);}},{key:'handleResult',value:function handleResult(succeeded){this.emitter.emit(succeeded?'success':'error',{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)});}},{key:'clearSelection',value:function clearSelection(){if(this.trigger){this.trigger.focus();}
window.getSelection().removeAllRanges();}},{key:'destroy',value:function destroy(){this.removeFake();}},{key:'action',set:function set(){var action=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'copy';this._action=action;if(this._action!=='copy'&&this._action!=='cut'){throw new Error('Invalid "action" value, use either "copy" or "cut"');}},get:function get(){return this._action;}},{key:'target',set:function set(target){if(target!==undefined){if(target&&(typeof target==='undefined'?'undefined':_typeof(target))==='object'&&target.nodeType===1){if(this.action==='copy'&&target.hasAttribute('disabled')){throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');}
if(this.action==='cut'&&(target.hasAttribute('readonly')||target.hasAttribute('disabled'))){throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');}
this._target=target;}else{throw new Error('Invalid "target" value, use a valid Element');}}},get:function get(){return this._target;}}]);return ClipboardAction;}();module.exports=ClipboardAction;});}),(function(module,exports,__webpack_require__){var is=__webpack_require__(6);var delegate=__webpack_require__(5);function listen(target,type,callback){if(!target&&!type&&!callback){throw new Error('Missing required arguments');}
if(!is.string(type)){throw new TypeError('Second argument must be a String');}
if(!is.fn(callback)){throw new TypeError('Third argument must be a Function');}
if(is.node(target)){return listenNode(target,type,callback);}
else if(is.nodeList(target)){return listenNodeList(target,type,callback);}
else if(is.string(target)){return listenSelector(target,type,callback);}
else{throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');}}
function listenNode(node,type,callback){node.addEventListener(type,callback);return{destroy:function(){node.removeEventListener(type,callback);}}}
function listenNodeList(nodeList,type,callback){Array.prototype.forEach.call(nodeList,function(node){node.addEventListener(type,callback);});return{destroy:function(){Array.prototype.forEach.call(nodeList,function(node){node.removeEventListener(type,callback);});}}}
function listenSelector(selector,type,callback){return delegate(document.body,selector,type,callback);}
module.exports=listen;}),(function(module,exports){function E(){}
E.prototype={on:function(name,callback,ctx){var e=this.e||(this.e={});(e[name]||(e[name]=[])).push({fn:callback,ctx:ctx});return this;},once:function(name,callback,ctx){var self=this;function listener(){self.off(name,listener);callback.apply(ctx,arguments);};listener._=callback
return this.on(name,listener,ctx);},emit:function(name){var data=[].slice.call(arguments,1);var evtArr=((this.e||(this.e={}))[name]||[]).slice();var i=0;var len=evtArr.length;for(i;i<len;i++){evtArr[i].fn.apply(evtArr[i].ctx,data);}
return this;},off:function(name,callback){var e=this.e||(this.e={});var evts=e[name];var liveEvents=[];if(evts&&callback){for(var i=0,len=evts.length;i<len;i++){if(evts[i].fn!==callback&&evts[i].fn._!==callback)
liveEvents.push(evts[i]);}}
(liveEvents.length)?e[name]=liveEvents:delete e[name];return this;}};module.exports=E;}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(global,factory){if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__=[module,__webpack_require__(0),__webpack_require__(2),__webpack_require__(1)],__WEBPACK_AMD_DEFINE_FACTORY__=(factory),__WEBPACK_AMD_DEFINE_RESULT__=(typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__)):__WEBPACK_AMD_DEFINE_FACTORY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports!=="undefined"){factory(module,require('./clipboard-action'),require('tiny-emitter'),require('good-listener'));}else{var mod={exports:{}};factory(mod,global.clipboardAction,global.tinyEmitter,global.goodListener);global.clipboard=mod.exports;}})(this,function(module,_clipboardAction,_tinyEmitter,_goodListener){'use strict';var _clipboardAction2=_interopRequireDefault(_clipboardAction);var _tinyEmitter2=_interopRequireDefault(_tinyEmitter);var _goodListener2=_interopRequireDefault(_goodListener);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}
var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}
return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}
return call&&(typeof call==="object"||typeof call==="function")?call:self;}
function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}
subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}
var Clipboard=function(_Emitter){_inherits(Clipboard,_Emitter);function Clipboard(trigger,options){_classCallCheck(this,Clipboard);var _this=_possibleConstructorReturn(this,(Clipboard.__proto__||Object.getPrototypeOf(Clipboard)).call(this));_this.resolveOptions(options);_this.listenClick(trigger);return _this;}
_createClass(Clipboard,[{key:'resolveOptions',value:function resolveOptions(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.action=typeof options.action==='function'?options.action:this.defaultAction;this.target=typeof options.target==='function'?options.target:this.defaultTarget;this.text=typeof options.text==='function'?options.text:this.defaultText;this.container=_typeof(options.container)==='object'?options.container:document.body;}},{key:'listenClick',value:function listenClick(trigger){var _this2=this;this.listener=(0,_goodListener2.default)(trigger,'click',function(e){return _this2.onClick(e);});}},{key:'onClick',value:function onClick(e){var trigger=e.delegateTarget||e.currentTarget;if(this.clipboardAction){this.clipboardAction=null;}
this.clipboardAction=new _clipboardAction2.default({action:this.action(trigger),target:this.target(trigger),text:this.text(trigger),container:this.container,trigger:trigger,emitter:this});}},{key:'defaultAction',value:function defaultAction(trigger){return getAttributeValue('action',trigger);}},{key:'defaultTarget',value:function defaultTarget(trigger){var selector=getAttributeValue('target',trigger);if(selector){return document.querySelector(selector);}}},{key:'defaultText',value:function defaultText(trigger){return getAttributeValue('text',trigger);}},{key:'destroy',value:function destroy(){this.listener.destroy();if(this.clipboardAction){this.clipboardAction.destroy();this.clipboardAction=null;}}}],[{key:'isSupported',value:function isSupported(){var action=arguments.length>0&&arguments[0]!==undefined?arguments[0]:['copy','cut'];var actions=typeof action==='string'?[action]:action;var support=!!document.queryCommandSupported;actions.forEach(function(action){support=support&&!!document.queryCommandSupported(action);});return support;}}]);return Clipboard;}(_tinyEmitter2.default);function getAttributeValue(suffix,element){var attribute='data-clipboard-'+suffix;if(!element.hasAttribute(attribute)){return;}
return element.getAttribute(attribute);}
module.exports=Clipboard;});}),(function(module,exports){var DOCUMENT_NODE_TYPE=9;if(typeof Element!=='undefined'&&!Element.prototype.matches){var proto=Element.prototype;proto.matches=proto.matchesSelector||proto.mozMatchesSelector||proto.msMatchesSelector||proto.oMatchesSelector||proto.webkitMatchesSelector;}
function closest(element,selector){while(element&&element.nodeType!==DOCUMENT_NODE_TYPE){if(typeof element.matches==='function'&&element.matches(selector)){return element;}
element=element.parentNode;}}
module.exports=closest;}),(function(module,exports,__webpack_require__){var closest=__webpack_require__(4);function _delegate(element,selector,type,callback,useCapture){var listenerFn=listener.apply(this,arguments);element.addEventListener(type,listenerFn,useCapture);return{destroy:function(){element.removeEventListener(type,listenerFn,useCapture);}}}
function delegate(elements,selector,type,callback,useCapture){if(typeof elements.addEventListener==='function'){return _delegate.apply(null,arguments);}
if(typeof type==='function'){return _delegate.bind(null,document).apply(null,arguments);}
if(typeof elements==='string'){elements=document.querySelectorAll(elements);}
return Array.prototype.map.call(elements,function(element){return _delegate(element,selector,type,callback,useCapture);});}
function listener(element,selector,type,callback){return function(e){e.delegateTarget=closest(e.target,selector);if(e.delegateTarget){callback.call(element,e);}}}
module.exports=delegate;}),(function(module,exports){exports.node=function(value){return value!==undefined&&value instanceof HTMLElement&&value.nodeType===1;};exports.nodeList=function(value){var type=Object.prototype.toString.call(value);return value!==undefined&&(type==='[object NodeList]'||type==='[object HTMLCollection]')&&('length'in value)&&(value.length===0||exports.node(value[0]));};exports.string=function(value){return typeof value==='string'||value instanceof String;};exports.fn=function(value){var type=Object.prototype.toString.call(value);return type==='[object Function]';};}),(function(module,exports){function select(element){var selectedText;if(element.nodeName==='SELECT'){element.focus();selectedText=element.value;}
else if(element.nodeName==='INPUT'||element.nodeName==='TEXTAREA'){var isReadOnly=element.hasAttribute('readonly');if(!isReadOnly){element.setAttribute('readonly','');}
element.select();element.setSelectionRange(0,element.value.length);if(!isReadOnly){element.removeAttribute('readonly');}
selectedText=element.value;}
else{if(element.hasAttribute('contenteditable')){element.focus();}
var selection=window.getSelection();var range=document.createRange();range.selectNodeContents(element);selection.removeAllRanges();selection.addRange(range);selectedText=selection.toString();}
return selectedText;}
module.exports=select;})]);});;

/* /web/static/lib/qweb/qweb2.js defined in bundle 'web.assets_common' */
var QWeb2={expressions_cache:{},RESERVED_WORDS:'true,false,NaN,null,undefined,debugger,console,window,in,instanceof,new,function,return,this,typeof,eval,void,Math,RegExp,Array,Object,Date'.split(','),ACTIONS_PRECEDENCE:'foreach,if,elif,else,call,set,tag,esc,raw,js,debug,log'.split(','),WORD_REPLACEMENT:{'and':'&&','or':'||','gt':'>','gte':'>=','lt':'<','lte':'<='},VOID_ELEMENTS:'area,base,br,col,embed,hr,img,input,keygen,link,menuitem,meta,param,source,track,wbr'.split(','),tools:{exception:function(message,context){context=context||{};var prefix='QWeb2';if(context.template){prefix+=" - template['"+context.template+"']";}
throw new Error(prefix+": "+message);},warning:function(message){if(typeof(window)!=='undefined'&&window.console){window.console.warn(message);}},trim:function(s,mode){switch(mode){case"left":return s.replace(/^\s*/,"");case"right":return s.replace(/\s*$/,"");default:return s.replace(/^\s*|\s*$/g,"");}},js_escape:function(s,noquotes){return(noquotes?'':"'")+s.replace(/\r?\n/g,"\\n").replace(/'/g,"\\'")+(noquotes?'':"'");},html_escape:function(s,attribute){if(s==null){return'';}
s=String(s).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');if(attribute){s=s.replace(/"/g,'&quot;');}
return s;},gen_attribute:function(o){if(o!==null&&o!==undefined){if(o.constructor===Array){if(o[1]!==null&&o[1]!==undefined){return this.format_attribute(o[0],o[1]);}}else if(typeof o==='object'){var r='';for(var k in o){if(o.hasOwnProperty(k)){r+=this.gen_attribute([k,o[k]]);}}
return r;}}
return'';},format_attribute:function(name,value){return' '+name+'="'+this.html_escape(value,true)+'"';},extend:function(dst,src,exclude){for(var p in src){if(src.hasOwnProperty(p)&&!(exclude&&this.arrayIndexOf(exclude,p)!==-1)){dst[p]=src[p];}}
return dst;},arrayIndexOf:function(array,item){for(var i=0,ilen=array.length;i<ilen;i++){if(array[i]===item){return i;}}
return-1;},get_element_sibling:function(node,dom_attr){var sibling=node[dom_attr];while(sibling&&sibling.nodeType!==1){sibling=sibling[dom_attr];}
return sibling;},xml_node_to_string:function(node,childs_only){if(childs_only){var childs=node.childNodes,r=[];for(var i=0,ilen=childs.length;i<ilen;i++){r.push(this.xml_node_to_string(childs[i]));}
return r.join('');}else{if(node.nodeType==3){return node.data;}
if(typeof XMLSerializer!=='undefined'){return(new XMLSerializer()).serializeToString(node);}else{switch(node.nodeType){case 1:return node.outerHTML;case 4:return'<![CDATA['+node.data+']]>';case 8:return'<!-- '+node.data+'-->';}
throw new Error('Unknown node type '+node.nodeType);}}},call:function(context,template,old_dict,_import,callback){var new_dict=this.extend({},old_dict);new_dict['__caller__']=old_dict['__template__'];if(callback){new_dict[0]=callback(context,new_dict);}
return context.engine._render(template,new_dict);},foreach:function(context,enu,as,old_dict,callback){if(enu!=null){var index,jlen,cur;var new_dict=this.extend({},old_dict);new_dict[as+"_all"]=enu;var as_value=as+"_value",as_index=as+"_index",as_first=as+"_first",as_last=as+"_last",as_parity=as+"_parity";if(enu instanceof Array){var size=enu.length;new_dict[as+"_size"]=size;for(index=0,jlen=enu.length;index<jlen;index++){cur=enu[index];new_dict[as_value]=cur;new_dict[as_index]=index;new_dict[as_first]=index===0;new_dict[as_last]=index+1===size;new_dict[as_parity]=(index%2==1?'odd':'even');if(cur&&cur.constructor===Object){this.extend(new_dict,cur);}
new_dict[as]=cur;callback(context,new_dict);}}else if(enu.constructor==Number){var _enu=[];for(var i=0;i<enu;i++){_enu.push(i);}
this.foreach(context,_enu,as,old_dict,callback);}else{index=0;for(var k in enu){if(enu.hasOwnProperty(k)){cur=enu[k];new_dict[as_value]=cur;new_dict[as_index]=index;new_dict[as_first]=index===0;new_dict[as_parity]=(index%2==1?'odd':'even');new_dict[as]=k;callback(context,new_dict);index+=1;}}}
_.each(Object.keys(old_dict),function(z){old_dict[z]=new_dict[z];});}else{this.exception("No enumerator given to foreach",context);}}}};QWeb2.Engine=(function(){function Engine(){this.prefix='t';this.debug=false;this.templates_resources=[];this.templates={};this.compiled_templates={};this.extend_templates={};this.default_dict={};this.tools=QWeb2.tools;this.jQuery=window.jQuery;this.reserved_words=QWeb2.RESERVED_WORDS.slice(0);this.actions_precedence=QWeb2.ACTIONS_PRECEDENCE.slice(0);this.void_elements=QWeb2.VOID_ELEMENTS.slice(0);this.word_replacement=QWeb2.tools.extend({},QWeb2.WORD_REPLACEMENT);this.preprocess_node=null;for(var i=0;i<arguments.length;i++){this.add_template(arguments[i]);}}
QWeb2.tools.extend(Engine.prototype,{add_template:function(template,callback){var self=this;this.templates_resources.push(template);if(template.constructor===String){return this.load_xml(template,function(err,xDoc){if(err){if(callback){return callback(err);}else{throw err;}}
self.add_template(xDoc,callback);});}
template=this.preprocess(template);var ec=(template.documentElement&&template.documentElement.childNodes)||template.childNodes||[];for(var i=0;i<ec.length;i++){var node=ec[i];if(node.nodeType===1){var name=node.getAttribute(this.prefix+'-name');var extend=node.getAttribute(this.prefix+'-extend');if(name&&extend){if(!this.templates[extend]){return this.tools.exception("Can't clone undefined template "+extend);}
this.templates[name]=this.templates[extend].cloneNode(true);extend=name;name=undefined;}
if(name){this.templates[name]=node;this.compiled_templates[name]=null;}else if(extend){delete(this.compiled_templates[extend]);if(this.extend_templates[extend]){this.extend_templates[extend].push(node);}else{this.extend_templates[extend]=[node];}}}}
if(callback){callback(null,template);}
return true;},preprocess:function(doc){var self=this;var childs=(doc.documentElement&&doc.documentElement.childNodes)||doc.childNodes||[];for(var i=0;i<childs.length;i++){var node=childs[i];if(node.nodeType===1&&node.nodeName=='parsererror'){return this.tools.exception(node.innerText);}}
var tbranch=doc.querySelectorAll('[t-elif], [t-else]');for(var i=0,ilen=tbranch.length;i<ilen;i++){var node=tbranch[i];var prev_elem=self.tools.get_element_sibling(node,'previousSibling');var pattr=function(name){return prev_elem.getAttribute(name);}
var nattr=function(name){return+!!node.getAttribute(name);}
if(prev_elem&&(pattr('t-if')||pattr('t-elif'))){if(pattr('t-foreach')){return self.tools.exception("Error: t-if cannot stay at the same level as t-foreach when using t-elif or t-else");}
if(['t-if','t-elif','t-else'].map(nattr).reduce(function(a,b){return a+b;})>1){return self.tools.exception("Error: only one conditional branching directive is allowed per node");}
var text_node;while((text_node=node.previousSibling)!==prev_elem){if(self.tools.trim(text_node.nodeValue)){return self.tools.exception("Error: text is not allowed between branching directives");}
text_node.parentNode.removeChild(text_node);}}else{return self.tools.exception("Error: t-elif and t-else directives must be preceded by a t-if or t-elif directive");}}
return doc;},load_xml:function(s,callback){var self=this;var async=!!callback;s=this.tools.trim(s);if(s.charAt(0)==='<'){var tpl=this.load_xml_string(s);if(callback){callback(null,tpl);}
return tpl;}else{var req=this.get_xhr();if(this.debug){s+='?debug='+(new Date()).getTime();}
req.open('GET',s,async);if(async){req.addEventListener("load",function(){if(req.status==200||req.status==0){callback(null,self._parse_from_request(req));}else{callback(new Error("Can't load template "+s+", http status "+req.status));}});}
req.send(null);if(!async){return this._parse_from_request(req);}}},_parse_from_request:function(req){var xDoc=req.responseXML;if(xDoc){if(!xDoc.documentElement){throw new Error("QWeb2: This xml document has no root document : "+xDoc.responseText);}
if(xDoc.documentElement.nodeName=="parsererror"){throw new Error("QWeb2: Could not parse document :"+xDoc.documentElement.childNodes[0].nodeValue);}
return xDoc;}else{return this.load_xml_string(req.responseText);}},load_xml_string:function(s){if(window.DOMParser){var dp=new DOMParser();var r=dp.parseFromString(s,"text/xml");if(r.body&&r.body.firstChild&&r.body.firstChild.nodeName=='parsererror'){throw new Error("QWeb2: Could not parse document :"+r.body.innerText);}
return r;}
var xDoc;try{xDoc=new ActiveXObject("MSXML2.DOMDocument");}catch(e){throw new Error("Could not find a DOM Parser: "+e.message);}
xDoc.async=false;xDoc.preserveWhiteSpace=true;xDoc.loadXML(s);return xDoc;},has_template:function(template){return!!this.templates[template];},get_xhr:function(){if(window.XMLHttpRequest){return new window.XMLHttpRequest();}
try{return new ActiveXObject('MSXML2.XMLHTTP.3.0');}catch(e){throw new Error("Could not get XHR");}},compile:function(node){var e=new QWeb2.Element(this,node);var template=node.getAttribute(this.prefix+'-name');return"   /* 'this' refers to Qweb2.Engine instance */\n"+"   var context = { engine : this, template : "+(this.tools.js_escape(template))+" };\n"+"   dict = dict || {};\n"+"   dict['__template__'] = '"+template+"';\n"+"   var r = [];\n"+"   /* START TEMPLATE */"+
(this.debug?"":" try {\n")+
(e.compile())+"\n"+"   /* END OF TEMPLATE */"+
(this.debug?"":" } catch(error) {\n"+"       if (console && console.exception) console.exception(error);\n"+"       context.engine.tools.exception('Runtime Error: ' + error, context);\n")+
(this.debug?"":"   }\n")+"   return r.join('');";},render:function(template,dict){dict=dict||{};QWeb2.tools.extend(dict,this.default_dict);var r=this._render(template,dict);return r;},_render:function(template,dict){if(this.compiled_templates[template]){return this.compiled_templates[template].apply(this,[dict||{}]);}else if(this.templates[template]){var ext;if(ext=this.extend_templates[template]){var extend_node;while(extend_node=ext.shift()){this.extend(template,extend_node);}}
var code=this.compile(this.templates[template]),tcompiled;try{tcompiled=new Function(['dict'],code);}catch(error){if(this.debug&&window.console){console.log(code);}
this.tools.exception("Error evaluating template: "+error,{template:template});}
if(!tcompiled){this.tools.exception("Error evaluating template: (IE?)"+error,{template:template});}
this.compiled_templates[template]=tcompiled;return this.render(template,dict);}else{return this.tools.exception("Template '"+template+"' not found");}},extend:function(template,extend_node){var jQuery=this.jQuery;if(!jQuery){return this.tools.exception("Can't extend template "+template+" without jQuery");}
var template_dest=this.templates[template];for(var i=0,ilen=extend_node.childNodes.length;i<ilen;i++){var child=extend_node.childNodes[i];if(child.nodeType===1){var jquery=child.getAttribute(this.prefix+'-jquery'),operation=child.getAttribute(this.prefix+'-operation'),target,error_msg="Error while extending template '"+template;if(jquery){target=jQuery(jquery,template_dest);if(!target.length&&window.console){console.debug('Can\'t find "'+jquery+'" when extending template '+template);}}else{this.tools.exception(error_msg+"No expression given");}
error_msg+="' (expression='"+jquery+"') : ";if(operation){var allowed_operations="append,prepend,before,after,replace,inner,attributes".split(',');if(this.tools.arrayIndexOf(allowed_operations,operation)==-1){this.tools.exception(error_msg+"Invalid operation : '"+operation+"'");}
operation={'replace':'replaceWith','inner':'html'}[operation]||operation;if(operation==='attributes'){jQuery('attribute',child).each(function(){var attrib=jQuery(this);target.attr(attrib.attr('name'),attrib.text()||attrib.attr('value'));});}else{target[operation](child.cloneNode(true).childNodes);}}else{try{var f=new Function(['$','document'],this.tools.xml_node_to_string(child,true));}catch(error){return this.tools.exception("Parse "+error_msg+error);}
try{f.apply(target,[jQuery,template_dest.ownerDocument]);}catch(error){return this.tools.exception("Runtime "+error_msg+error);}}}}}});return Engine;})();QWeb2.Element=(function(){function Element(engine,node){this.engine=engine;this.node=node;this.tag=node.tagName;this.actions={tag:this.tag};this.actions_done=[];this.attributes={};this.children=[];this._top=[];this._bottom=[];this._indent=1;this.process_children=true;this.is_void_element=~QWeb2.tools.arrayIndexOf(this.engine.void_elements,this.tag);var childs=this.node.childNodes;if(childs){for(var i=0,ilen=childs.length;i<ilen;i++){this.children.push(new QWeb2.Element(this.engine,childs[i]));}}
var attrs=this.node.attributes;if(attrs){for(var j=0,jlen=attrs.length;j<jlen;j++){var attr=attrs[j];var name=attr.name;var m=name.match(new RegExp("^"+this.engine.prefix+"-(.+)"));if(m){name=m[1];if(name==='name'){continue;}
if(name.match(/^attf?(-.*)?/)){this.attributes[m[0]]=attr.value;}else{this.actions[name]=attr.value;}}else{this.attributes[name]=attr.value;}}}
if(this.engine.preprocess_node){this.engine.preprocess_node.call(this);}}
QWeb2.tools.extend(Element.prototype,{compile:function(){var r=[],instring=false,lines=this._compile().split('\n');for(var i=0,ilen=lines.length;i<ilen;i++){var m,line=lines[i];if(m=line.match(/^(\s*)\/\/@string=(.*)/)){if(instring){if(this.engine.debug){r.push((m[2].indexOf("\\n")!=-1?"',\n\t"+m[1]+"'":'')+m[2]);}else{r.push(m[2]);}}else{r.push(m[1]+"r.push('"+m[2]);instring=true;}}else{if(instring){r.push("');\n");}
instring=false;r.push(line+'\n');}}
return r.join('');},_compile:function(){switch(this.node.nodeType){case 3:case 4:this.top_string(this.node.data);break;case 1:this.compile_element();}
var r=this._top.join('');if(this.process_children){for(var i=0,ilen=this.children.length;i<ilen;i++){var child=this.children[i];child._indent=this._indent;r+=child._compile();}}
r+=this._bottom.join('');return r;},format_expression:function(e){if(QWeb2.expressions_cache[e]){return QWeb2.expressions_cache[e];}
var chars=e.split(''),instring='',invar='',invar_pos=0,r='';chars.push(' ');for(var i=0,ilen=chars.length;i<ilen;i++){var c=chars[i];if(instring.length){if(c===instring&&chars[i-1]!=="\\"){instring='';}}else if(c==='"'||c==="'"){instring=c;}else if(c.match(/[a-zA-Z_\$]/)&&!invar.length){invar=c;invar_pos=i;continue;}else if(c.match(/\W/)&&invar.length){if(chars[invar_pos-1]!=='.'&&QWeb2.tools.arrayIndexOf(this.engine.reserved_words,invar)<0){invar=this.engine.word_replacement[invar]||("dict['"+invar+"']");}
r+=invar;invar='';}else if(invar.length){invar+=c;continue;}
r+=c;}
r=r.slice(0,-1);QWeb2.expressions_cache[e]=r;return r;},format_str:function(e){if(e=='0'){return'dict[0]';}
return this.format_expression(e);},string_interpolation:function(s){var _this=this;if(!s){return"''";}
function append_literal(s){s&&r.push(_this.engine.tools.js_escape(s));}
var re=/(?:#{(.+?)}|{{(.+?)}})/g,start=0,r=[],m;while(m=re.exec(s)){append_literal(s.slice(start,re.lastIndex-m[0].length));r.push('('+this.format_str(m[2]||m[1])+')');start=re.lastIndex;}
append_literal(s.slice(start));return r.join(' + ');},indent:function(){return this._indent++;},dedent:function(){if(this._indent!==0){return this._indent--;}},get_indent:function(){return new Array(this._indent+1).join("\t");},top:function(s){return this._top.push(this.get_indent()+s+'\n');},top_string:function(s){return this._top.push(this.get_indent()+"//@string="+this.engine.tools.js_escape(s,true)+'\n');},bottom:function(s){return this._bottom.unshift(this.get_indent()+s+'\n');},bottom_string:function(s){return this._bottom.unshift(this.get_indent()+"//@string="+this.engine.tools.js_escape(s,true)+'\n');},compile_element:function(){for(var i=0,ilen=this.engine.actions_precedence.length;i<ilen;i++){var a=this.engine.actions_precedence[i];if(a in this.actions){var value=this.actions[a];var key='compile_action_'+a;if(this[key]){this[key](value);}else if(this.engine[key]){this.engine[key].call(this,value);}else{this.engine.tools.exception("No handler method for action '"+a+"'");}}}},compile_action_tag:function(){if(this.tag.toLowerCase()!==this.engine.prefix){this.top_string("<"+this.tag);for(var a in this.attributes){var v=this.attributes[a];var d=a.split('-');if(d[0]===this.engine.prefix&&d.length>1){if(d.length===2){this.top("r.push(context.engine.tools.gen_attribute("+(this.format_expression(v))+"));");}else{this.top("r.push(context.engine.tools.gen_attribute(['"+d.slice(2).join('-')+"', ("+
(d[1]==='att'?this.format_expression(v):this.string_interpolation(v))+")]));");}}else{this.top_string(this.engine.tools.gen_attribute([a,v]));}}
if(this.actions.opentag==='true'||(!this.children.length&&this.is_void_element)){this.top_string("/>");}else{this.top_string(">");this.bottom_string("</"+this.tag+">");}}},compile_action_if:function(value){this.top("if ("+(this.format_expression(value))+") {");this.bottom("}");this.indent();},compile_action_elif:function(value){this.top("else if ("+(this.format_expression(value))+") {");this.bottom("}");this.indent();},compile_action_else:function(value){this.top("else {");this.bottom("}");this.indent();},compile_action_foreach:function(value){var as=this.actions['as']||value.replace(/[^a-zA-Z0-9]/g,'_');this.top("context.engine.tools.foreach(context, "+(this.format_expression(value))+", "+(this.engine.tools.js_escape(as))+", dict, function(context, dict) {");this.bottom("});");this.indent();},compile_action_call:function(value){if(this.children.length===0){return this.top("r.push(context.engine.tools.call(context, "+(this.string_interpolation(value))+", dict));");}else{this.top("r.push(context.engine.tools.call(context, "+(this.string_interpolation(value))+", dict, null, function(context, dict) {");this.bottom("}));");this.indent();this.top("var r = [];");return this.bottom("return r.join('');");}},compile_action_set:function(value){var variable=this.format_expression(value);if(this.actions['value']){if(this.children.length){this.engine.tools.warning("@set with @value plus node chidren found. Children are ignored.");}
this.top(variable+" = ("+(this.format_expression(this.actions['value']))+");");this.process_children=false;}else{if(this.children.length===0){this.top(variable+" = '';");}else if(this.children.length===1&&this.children[0].node.nodeType===3){this.top(variable+" = "+(this.engine.tools.js_escape(this.children[0].node.data))+";");this.process_children=false;}else{this.top(variable+" = (function(dict) {");this.bottom("})(dict);");this.indent();this.top("var r = [];");this.bottom("return r.join('');");}}},compile_action_esc:function(value){this.top("var t = "+this.format_str(value)+";");this.top("if (t != null) r.push(context.engine.tools.html_escape(t));");this.top("else {");this.bottom("}");this.indent();},compile_action_raw:function(value){this.top("var t = "+this.format_str(value)+";");this.top("if (t != null) r.push(t);");this.top("else {");this.bottom("}");this.indent();},compile_action_js:function(value){this.top("(function("+value+") {");this.bottom("})(dict);");this.indent();var lines=this.engine.tools.xml_node_to_string(this.node,true).split(/\r?\n/);for(var i=0,ilen=lines.length;i<ilen;i++){this.top(lines[i]);}
this.process_children=false;},compile_action_debug:function(value){this.top("debugger;");},compile_action_log:function(value){this.top("console.log("+this.format_expression(value)+");");}});return Element;})();;

/* /web/static/src/js/promise_extension.js defined in bundle 'web.assets_common' */
(function(){var _catch=Promise.prototype.catch;Promise.prototype.guardedCatch=function(onRejected){return _catch.call(this,function(reason){if(!reason||!(reason instanceof Error)){if(onRejected){onRejected.call(this,reason);}}
return Promise.reject(reason);});};})();;

/* /web/static/src/js/boot.js defined in bundle 'web.assets_common' */
(function(){"use strict";var jobs=[];var factories=Object.create(null);var job_names=[];var job_deps=[];var job_promise=[];var services=Object.create({});var commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg;var cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g;var debug=($.deparam($.param.querystring()).debug!==undefined);var odoo=window.odoo=window.odoo||{};var didLogInfoResolve;var didLogInfoPromise=new Promise(function(resolve){didLogInfoResolve=resolve;});_.extend(odoo,{testing:typeof QUnit==="object",debug:debug,remaining_jobs:jobs,__DEBUG__:{didLogInfo:didLogInfoPromise,get_dependencies:function(name,transitive){var deps=name instanceof Array?name:[name],changed;do{changed=false;_.each(job_deps,function(dep){if(_.contains(deps,dep.to)&&(!_.contains(deps,dep.from))){deps.push(dep.from);changed=true;}});}while(changed&&transitive);return deps;},get_dependents:function(name){return _.pluck(_.where(job_deps,{from:name}),'to');},get_waited_jobs:function(){return _.uniq(_.map(jobs,function(job){return job.name;}));},get_missing_jobs:function(){var self=this;var waited=this.get_waited_jobs();var missing=[];_.each(waited,function(job){_.each(self.get_dependencies(job),function(job){if(!(job in self.services)){missing.push(job);}});});return _.filter(_.difference(_.uniq(missing),waited),function(job){return!job.error;});},get_failed_jobs:function(){return _.filter(jobs,function(job){return!!job.error;});},factories:factories,services:services,},define:function(){var args=Array.prototype.slice.call(arguments);var name=typeof args[0]==='string'?args.shift():_.uniqueId('__job');var factory=args[args.length-1];var deps;if(args[0]instanceof Array){deps=args[0];}else{deps=[];factory.toString().replace(commentRegExp,'').replace(cjsRequireRegExp,function(match,dep){deps.push(dep);});}
if(odoo.debug){if(!(deps instanceof Array)){throw new Error('Dependencies should be defined by an array',deps);}
if(typeof factory!=='function'){throw new Error('Factory should be defined by a function',factory);}
if(typeof name!=='string'){throw new Error("Invalid name definition (should be a string",name);}
if(name in factories){throw new Error("Service "+name+" already defined");}}
factory.deps=deps;factories[name]=factory;jobs.push({name:name,factory:factory,deps:deps,});job_names.push(name);_.each(deps,function(dep){job_deps.push({from:dep,to:name});});this.process_jobs(jobs,services);},log:function(){var missing=[];var failed=[];if(jobs.length){var debug_jobs={};var rejected=[];var rejected_linked=[];var job;var jobdep;for(var k=0;k<jobs.length;k++){debug_jobs[jobs[k].name]=job={dependencies:jobs[k].deps,dependents:odoo.__DEBUG__.get_dependents(jobs[k].name),name:jobs[k].name};if(jobs[k].error){job.error=jobs[k].error;}
if(jobs[k].rejected){job.rejected=jobs[k].rejected;rejected.push(job.name);}
var deps=odoo.__DEBUG__.get_dependencies(job.name);for(var i=0;i<deps.length;i++){if(job.name!==deps[i]&&!(deps[i]in services)){jobdep=debug_jobs[deps[i]]||(deps[i]in factories&&_.find(jobs,function(job){return job.name===deps[i];}));if(jobdep&&jobdep.rejected){if(!job.rejected){job.rejected=[];rejected_linked.push(job.name);}
job.rejected.push(deps[i]);}else{if(!job.missing){job.missing=[];}
job.missing.push(deps[i]);}}}}
missing=odoo.__DEBUG__.get_missing_jobs();failed=odoo.__DEBUG__.get_failed_jobs();var unloaded=_.filter(debug_jobs,function(job){return job.missing;});}
odoo.__DEBUG__.js_modules={missing:missing,failed:_.pluck(failed,'name'),};didLogInfoResolve();},process_jobs:function(jobs,services){var job;function process_job(job){var require=make_require(job);var job_exec;var def=new Promise(function(resolve){try{job_exec=job.factory.call(null,require);jobs.splice(jobs.indexOf(job),1);}catch(e){job.error=e;console.error('Error while loading '+job.name);console.error(e.stack);}
if(!job.error){Promise.resolve(job_exec).then(function(data){services[job.name]=data;resolve();odoo.process_jobs(jobs,services);}).guardedCatch(function(e){job.rejected=e||true;jobs.push(job);resolve();});}});job_promise.push(def);}
function is_ready(job){return!job.error&&!job.rejected&&_.every(job.factory.deps,function(name){return name in services;});}
function make_require(job){var deps=_.pick(services,job.deps);function require(name){if(!(name in deps)){console.error('Undefined dependency: ',name);}else{require.__require_calls++;}
return deps[name];}
require.__require_calls=0;return require;}
while(jobs.length&&(job=_.find(jobs,is_ready))){process_job(job);}
return services;}});var log_when_loaded=function(){_.delay(function(){var len=job_promise.length;Promise.all(job_promise).then(function(){if(len===job_promise.length){odoo.log();}else{log_when_loaded();}});},6000);};$(log_when_loaded);})();;

/* /web/static/src/js/libs/autocomplete.js defined in bundle 'web.assets_common' */
odoo.define('web.autocomplete.extensions',function(){'use strict';var proto=$.ui.autocomplete.prototype;var initSource=proto._initSource;function filter(array,term){var matcher=new RegExp($.ui.autocomplete.escapeRegex(term),"i");return $.grep(array,function(value_){return matcher.test($("<div>").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);}},_renderItem:function(ul,item){return $("<li></li>").data("item.autocomplete",item).append($("<a></a>")[this.options.html?"html":"text"](item.label)).appendTo(ul).addClass(item.classname);},});});;

/* /web/static/src/js/libs/bootstrap.js defined in bundle 'web.assets_common' */
odoo.define('web.bootstrap.extensions',function(){'use strict';$.fn.tooltip.Constructor.Default.placement='auto';$.fn.tooltip.Constructor.Default.fallbackPlacement=['bottom','right','left','top'];$.fn.tooltip.Constructor.Default.html=true;$.fn.tooltip.Constructor.Default.sanitize=false;$.fn.tooltip.Constructor.Default.trigger='hover';$.fn.tooltip.Constructor.Default.container='body';$.fn.tooltip.Constructor.Default.boundary='window';$.fn.tooltip.Constructor.Default.delay={show:1000,hide:0};var bootstrapShowFunction=$.fn.tooltip.Constructor.prototype.show;$.fn.tooltip.Constructor.prototype.show=function(){$('.tooltip').remove();return bootstrapShowFunction.call(this);};});;

/* /web/static/src/js/libs/jquery.js defined in bundle 'web.assets_common' */
odoo.define('web.jquery.extensions',function(){'use strict';$.extend($.expr[':'],{containsLike:function(element,index,matches){return element.innerHTML.toUpperCase().indexOf(matches[3].toUpperCase())>=0;},containsTextLike:function(element,index,matches){return element.innerText.toUpperCase().indexOf(matches[3].toUpperCase())>=0;},containsExact:function(element,index,matches){return $.trim(element.innerHTML)===matches[3];},containsRegex:function(element,index,matches){var regreg=/^\/((?:\\\/|[^\/])+)\/([mig]{0,3})$/,reg=regreg.exec(matches[3]);return reg?new RegExp(reg[1],reg[2]).test($.trim(element.innerHTML)):false;},propChecked:function(element,index,matches){return $(element).prop("checked")===true;},propSelected:function(element,index,matches){return $(element).prop("selected")===true;},propValue:function(element,index,matches){return $(element).prop("value")===matches[3];},propValueContains:function(element,index,matches){return $(element).prop("value")&&$(element).prop("value").indexOf(matches[3])!==-1;},hasData:function(element){return!!_.toArray(element.dataset).length;},data:function(element,index,matches){return $(element).data(matches[3]);},hasVisibility:function(element,index,matches){var $element=$(element);if($(element).css('visibility')==='hidden'){return false;}
var $parent=$element.parent();if(!$parent.length||$element.is('html')){return true;}
return $parent.is(':hasVisibility');},hasOpacity:function(element,index,matches){var $element=$(element);if(parseFloat($(element).css('opacity'))<=0.01){return false;}
var $parent=$element.parent();if(!$parent.length||$element.is('html')){return true;}
return $parent.is(':hasOpacity');},});$.fn.extend({getAttributes:function(){var o={};if(this.length){var attrs=this[0].attributes;for(var i=0,l=attrs.length;i<l;i++){var attr=attrs.item(i);o[attr.name]=attr.value;}}
return o;},odooBounce:function(){return this.each(function(){var $el=$(this);$el.addClass('o_catch_attention');setTimeout(function(){$el.removeClass('o_catch_attention');},400);});},prependEvent:function(events,selector,data,handler){this.on.apply(this,arguments);events=events.split(' ');return this.each(function(){var el=this;_.each(events,function(evNameNamespaced){var evName=evNameNamespaced.split('.')[0];var handler=$._data(el,'events')[evName].pop();$._data(el,'events')[evName].unshift(handler);});});},});});;

/* /web/static/src/js/libs/download.js defined in bundle 'web.assets_common' */
odoo.define('web.download',function(){return function download(data,filename,mimetype){var self=window,defaultMime="application/octet-stream",mimeType=mimetype||defaultMime,payload=data,url=!filename&&!mimetype&&payload,anchor=document.createElement("a"),toString=function(a){return String(a);},myBlob=(self.Blob||self.MozBlob||self.WebKitBlob||toString),fileName=filename||"download",blob,reader;myBlob=myBlob.call?myBlob.bind(self):Blob;if(String(this)==="true"){payload=[payload,mimeType];mimeType=payload[0];payload=payload[1];}
if(url&&url.length<2048){fileName=url.split("/").pop().split("?")[0];anchor.href=url;if(anchor.href.indexOf(url)!==-1){var ajax=new XMLHttpRequest();ajax.open("GET",url,true);ajax.responseType='blob';ajax.onload=function(e){download(e.target.response,fileName,defaultMime);};setTimeout(function(){ajax.send();},0);return ajax;}}
if(/^data:[\w+\-]+\/[\w+\-]+[,;]/.test(payload)){if(payload.length>(1024*1024*1.999)&&myBlob!==toString){payload=dataUrlToBlob(payload);mimeType=payload.type||defaultMime;}else{return navigator.msSaveBlob?navigator.msSaveBlob(dataUrlToBlob(payload),fileName):saver(payload);}}
blob=payload instanceof myBlob?payload:new myBlob([payload],{type:mimeType});function dataUrlToBlob(strUrl){var parts=strUrl.split(/[:;,]/),type=parts[1],decoder=parts[2]==="base64"?atob:decodeURIComponent,binData=decoder(parts.pop()),mx=binData.length,i=0,uiArr=new Uint8Array(mx);for(i;i<mx;++i)uiArr[i]=binData.charCodeAt(i);return new myBlob([uiArr],{type:type});}
function saver(url,winMode){if('download'in anchor){anchor.href=url;anchor.setAttribute("download",fileName);anchor.className="download-js-link";anchor.innerHTML="downloading...";anchor.style.display="none";document.body.appendChild(anchor);setTimeout(function(){anchor.click();document.body.removeChild(anchor);if(winMode===true){setTimeout(function(){self.URL.revokeObjectURL(anchor.href);},250);}},66);return true;}
if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent)){url=url.replace(/^data:([\w\/\-+]+)/,defaultMime);if(!window.open(url)){if(confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")){location.href=url;}}
return true;}
var f=document.createElement("iframe");document.body.appendChild(f);if(!winMode){url="data:"+url.replace(/^data:([\w\/\-+]+)/,defaultMime);}
f.src=url;setTimeout(function(){document.body.removeChild(f);},333);}
if(navigator.msSaveBlob){return navigator.msSaveBlob(blob,fileName);}
if(self.URL){saver(self.URL.createObjectURL(blob),true);}else{if(typeof blob==="string"||blob.constructor===toString){try{return saver("data:"+mimeType+";base64,"+self.btoa(blob));}catch(y){return saver("data:"+mimeType+","+encodeURIComponent(blob));}}
reader=new FileReader();reader.onload=function(){saver(this.result);};reader.readAsDataURL(blob);}
return true;};});;

/* /web/static/src/js/libs/content-disposition.js defined in bundle 'web.assets_common' */
odoo.define('web.contentdisposition',function(){'use strict';var HEX_ESCAPE_REPLACE_REGEXP=/%([0-9A-Fa-f]{2})/g;var NON_LATIN1_REGEXP=/[^\x20-\x7e\xa0-\xff]/g;var QESC_REGEXP=/\\([\u0000-\u007f])/g;var PARAM_REGEXP=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g;var EXT_VALUE_REGEXP=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/;var DISPOSITION_TYPE_REGEXP=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function decodefield(str){var match=EXT_VALUE_REGEXP.exec(str);if(!match){throw new TypeError('invalid extended field value')}
var charset=match[1].toLowerCase();var encoded=match[2];switch(charset){case'iso-8859-1':return encoded.replace(HEX_ESCAPE_REPLACE_REGEXP,pdecode).replace(NON_LATIN1_REGEXP,'?');case'utf-8':return decodeURIComponent(encoded);default:throw new TypeError('unsupported charset in extended field')}}
function parse(string){if(!string||typeof string!=='string'){throw new TypeError('argument string is required')}
var match=DISPOSITION_TYPE_REGEXP.exec(string);if(!match){throw new TypeError('invalid type format')}
var index=match[0].length;var type=match[1].toLowerCase();var key;var names=[];var params={};var value;index=PARAM_REGEXP.lastIndex=match[0].substr(-1)===';'?index-1:index;while((match=PARAM_REGEXP.exec(string))){if(match.index!==index){throw new TypeError('invalid parameter format')}
index+=match[0].length;key=match[1].toLowerCase();value=match[2];if(names.indexOf(key)!==-1){throw new TypeError('invalid duplicate parameter')}
names.push(key);if(key.indexOf('*')+1===key.length){key=key.slice(0,-1);value=decodefield(value);params[key]=value;continue}
if(typeof params[key]==='string'){continue}
if(value[0]==='"'){value=value.substr(1,value.length-2).replace(QESC_REGEXP,'$1')}
params[key]=value}
if(index!==-1&&index!==string.length){throw new TypeError('invalid parameter format')}
return new ContentDisposition(type,params)}
function pdecode(str,hex){return String.fromCharCode(parseInt(hex,16))}
function ContentDisposition(type,parameters){this.type=type;this.parameters=parameters}
return{parse:parse,};});;

/* /web/static/src/js/libs/underscore.js defined in bundle 'web.assets_common' */
_.cancellableThrottleRemoveMeSoon=function(func,wait,options){var timeout,context,args,result;var previous=0;if(!options)options={};var later=function(){previous=options.leading===false?0:_.now();timeout=null;result=func.apply(context,args);if(!timeout)context=args=null;};var throttled=function(){var now=_.now();if(!previous&&options.leading===false)previous=now;var remaining=wait-(now-previous);context=this;args=arguments;if(remaining<=0||remaining>wait){if(timeout){clearTimeout(timeout);timeout=null;}
previous=now;result=func.apply(context,args);if(!timeout)context=args=null;}else if(!timeout&&options.trailing!==false){timeout=setTimeout(later,remaining);}
return result;};throttled.cancel=function(){clearTimeout(timeout);previous=0;timeout=context=args=null;};return throttled;};;

/* /web/static/src/js/services/config.js defined in bundle 'web.assets_common' */
odoo.define('web.config',function(){"use strict";var debugParam=$.deparam($.param.querystring()).debug;var debug=false;if(debugParam!==undefined){debug=debugParam==='assets'?'assets':true;}
var config={debug:debug,device:{touch:'ontouchstart'in window||'onmsgesturechange'in window,size_class:null,isMobile:null,SIZES:{XS:0,VSM:1,SM:2,MD:3,LG:4,XL:5,XXL:6},},};var medias=[window.matchMedia('(max-width: 474px)'),window.matchMedia('(min-width: 475px) and (max-width: 575px)'),window.matchMedia('(min-width: 576px) and (max-width: 767px)'),window.matchMedia('(min-width: 768px) and (max-width: 991px)'),window.matchMedia('(min-width: 992px) and (max-width: 1199px)'),window.matchMedia('(min-width: 1200px) and (max-width: 1533px)'),window.matchMedia('(min-width: 1534px)'),];function _getSizeClass(){for(var i=0;i<medias.length;i++){if(medias[i].matches){return i;}}}
function _updateSizeProps(){var sc=_getSizeClass();if(sc!==config.device.size_class){config.device.size_class=sc;config.device.isMobile=config.device.size_class<=config.device.SIZES.SM;}}
_.invoke(medias,'addListener',_updateSizeProps);_updateSizeProps();return config;});;

/* /web/static/src/js/core/abstract_service.js defined in bundle 'web.assets_common' */
odoo.define('web.AbstractService',function(require){"use strict";var Class=require('web.Class');var Mixins=require('web.mixins');var ServicesMixin=require('web.ServicesMixin');var AbstractService=Class.extend(Mixins.EventDispatcherMixin,ServicesMixin,{dependencies:[],init:function(parent){Mixins.EventDispatcherMixin.init.call(this,arguments);this.setParent(parent);},start:function(){},});return AbstractService;});;

/* /web/static/src/js/core/abstract_storage_service.js defined in bundle 'web.assets_common' */
odoo.define('web.AbstractStorageService',function(require){'use strict';var AbstractService=require('web.AbstractService');var AbstractStorageService=AbstractService.extend({storage:null,destroy:function(){if((this.storage||{}).destroy){this.storage.destroy();}
this._super.apply(this,arguments);},clear:function(){this.storage.clear();},getItem:function(key,defaultValue){var val=this.storage.getItem(key);return val?JSON.parse(val):defaultValue;},removeItem:function(key){this.storage.removeItem(key);},setItem:function(key,value){this.storage.setItem(key,JSON.stringify(value));},onStorage:function(){this.storage.on.apply(this.storage,["storage"].concat(Array.prototype.slice.call(arguments)));},});return AbstractStorageService;});;

/* /web/static/src/js/core/class.js defined in bundle 'web.assets_common' */
odoo.define('web.Class',function(){"use strict";function OdooClass(){}
var initializing=false;var fnTest=/xyz/.test(function(){xyz();})?/\b_super\b/:/.*/;OdooClass.extend=function(){var _super=this.prototype;var args=_.toArray(arguments);args.unshift({});var prop=_.extend.apply(_,args);initializing=true;var This=this;var prototype=new This();initializing=false;_.each(prop,function(val,name){prototype[name]=typeof prop[name]=="function"&&fnTest.test(prop[name])?(function(name,fn){return function(){var tmp=this._super;this._super=_super[name];var ret=fn.apply(this,arguments);this._super=tmp;return ret;};})(name,prop[name]):prop[name];});function Class(){if(this.constructor!==OdooClass){throw new Error("You can only instanciate objects with the 'new' operator");}
this._super=null;if(!initializing&&this.init){var ret=this.init.apply(this,arguments);if(ret){return ret;}}
return this;}
Class.include=function(properties){_.each(properties,function(val,name){if(typeof properties[name]!=='function'||!fnTest.test(properties[name])){prototype[name]=properties[name];}else if(typeof prototype[name]==='function'&&prototype.hasOwnProperty(name)){prototype[name]=(function(name,fn,previous){return function(){var tmp=this._super;this._super=previous;var ret=fn.apply(this,arguments);this._super=tmp;return ret;};})(name,properties[name],prototype[name]);}else if(typeof _super[name]==='function'){prototype[name]=(function(name,fn){return function(){var tmp=this._super;this._super=_super[name];var ret=fn.apply(this,arguments);this._super=tmp;return ret;};})(name,properties[name]);}});};Class.prototype=prototype;Class.constructor=Class;Class.extend=this.extend;return Class;};return OdooClass;});;

/* /web/static/src/js/core/collections.js defined in bundle 'web.assets_common' */
odoo.define("web.collections",function(require){"use strict";var Class=require("web.Class");var Tree=Class.extend({init:function(data){this._data=data;this._children=[];},getData:function(){return this._data;},addChild:function(tree){this._children.push(tree);},});return{Tree:Tree,};});;

/* /web/static/src/js/core/translation.js defined in bundle 'web.assets_common' */
odoo.define('web.translation',function(require){"use strict";var Class=require('web.Class');var TranslationDataBase=Class.extend({init:function(){this.db={};this.multi_lang=false
this.parameters={"direction":'ltr',"date_format":'%m/%d/%Y',"time_format":'%H:%M:%S',"grouping":[],"decimal_point":".","thousands_sep":","};},set_bundle:function(translation_bundle){var self=this;this.multi_lang=translation_bundle.multi_lang
var modules=_.keys(translation_bundle.modules);modules.sort();if(_.include(modules,"web")){modules=["web"].concat(_.without(modules,"web"));}
_.each(modules,function(name){self.add_module_translation(translation_bundle.modules[name]);});if(translation_bundle.lang_parameters){this.parameters=translation_bundle.lang_parameters;this.parameters.grouping=JSON.parse(this.parameters.grouping);}},add_module_translation:function(mod){var self=this;_.each(mod.messages,function(message){self.db[message.id]=message.string;});},build_translation_function:function(){var self=this;var fcnt=function(str){var tmp=self.get(str);return tmp===undefined?str:tmp;};fcnt.database=this;return fcnt;},get:function(key){return this.db[key];},load_translations:function(session,modules,lang,url){var self=this;return session.rpc(url||'/web/webclient/translations',{"mods":modules||null,"lang":lang||null}).then(function(trans){self.set_bundle(trans);});}});var _t=new TranslationDataBase().build_translation_function();var _lt=function(s){return{toString:function(){return _t(s);}};};{_t('less than a minute ago');_t('about a minute ago');_t('%d minutes ago');_t('about an hour ago');_t('%d hours ago');_t('a day ago');_t('%d days ago');_t('about a month ago');_t('%d months ago');_t('about a year ago');_t('%d years ago');}
return{_t:_t,_lt:_lt,TranslationDataBase:TranslationDataBase,};});;

/* /web/static/src/js/core/ajax.js defined in bundle 'web.assets_common' */
odoo.define('web.ajax',function(require){"use strict";var config=require('web.config');var core=require('web.core');var time=require('web.time');var download=require('web.download');var contentdisposition=require('web.contentdisposition');var _t=core._t;function _genericJsonRpc(fct_name,params,settings,fct){var shadow=settings.shadow||false;delete settings.shadow;if(!shadow){core.bus.trigger('rpc_request');}
var data={jsonrpc:"2.0",method:fct_name,params:params,id:Math.floor(Math.random()*1000*1000*1000)};var xhr=fct(data);var result=xhr.then(function(result){core.bus.trigger('rpc:result',data,result);if(result.error!==undefined){if(result.error.data.arguments[0]!=="bus.Bus not available in test mode"){if(result.error.data.exception_type==="user_error"){console.log("Server application error",JSON.stringify(result.error));}else{console.error("Server application error",JSON.stringify(result.error));}}
return Promise.reject({type:"server",error:result.error});}else{return result.result;}},function(){var reason={type:'communication',error:arguments[0],textStatus:arguments[1],errorThrown:arguments[2],};return Promise.reject(reason);});var rejection;var promise=new Promise(function(resolve,reject){rejection=reject;result.then(function(result){if(!shadow){core.bus.trigger('rpc_response');}
resolve(result);},function(reason){var type=reason.type;var error=reason.error;var textStatus=reason.textStatus;var errorThrown=reason.errorThrown;if(type==="server"){if(!shadow){core.bus.trigger('rpc_response');}
if(error.code===100){core.bus.trigger('invalidate_session');}
reject({message:error,event:$.Event()});}else{if(!shadow){core.bus.trigger('rpc_response_failed');}
var nerror={code:-32098,message:"XmlHttpRequestError "+errorThrown,data:{type:"xhr"+textStatus,debug:error.responseText,objects:[error,errorThrown]},};reject({message:nerror,event:$.Event()});}});});promise.abort=function(){rejection({message:"XmlHttpRequestError abort",event:$.Event('abort')});if(xhr.abort){xhr.abort();}};promise.guardedCatch(function(reason){setTimeout(function(){if(!reason.event.isDefaultPrevented()){core.bus.trigger('rpc_error',reason.message,reason.event);}},0);});return promise;};function jsonRpc(url,fct_name,params,settings){settings=settings||{};return _genericJsonRpc(fct_name,params,settings,function(data){return $.ajax(url,_.extend({},settings,{url:url,dataType:'json',type:'POST',data:JSON.stringify(data,time.date_to_utc),contentType:'application/json'}));});}
function rpc(url,params,settings){return jsonRpc(url,'call',params,settings);}
var loadCSS=(function(){var urlDefs={};return function loadCSS(url){if(url in urlDefs){}else if($('link[href="'+url+'"]').length){urlDefs[url]=Promise.resolve();}else{var $link=$('<link>',{'href':url,'rel':'stylesheet','type':'text/css'});urlDefs[url]=new Promise(function(resolve,reject){$link.on('load',function(){resolve();});});$('head').append($link);}
return urlDefs[url];};})();var loadJS=(function(){var dependenciesPromise={};var load=function loadJS(url){var alreadyRequired=($('script[src="'+url+'"]').length>0);if(url in dependenciesPromise){return dependenciesPromise[url];}
var scriptLoadedPromise=new Promise(function(resolve,reject){if(alreadyRequired){resolve();}else{var script=document.createElement('script');script.type='text/javascript';script.src=url;script.onload=script.onreadystatechange=function(){if((script.readyState&&script.readyState!=="loaded"&&script.readyState!=="complete")||script.onload_done){return;}
script.onload_done=true;resolve(url);};script.onerror=function(){console.error("Error loading file",script.src);reject(url);};var head=document.head||document.getElementsByTagName('head')[0];head.appendChild(script);}});dependenciesPromise[url]=scriptLoadedPromise;return scriptLoadedPromise;};return load;})();function get_file(options){var xhr=new XMLHttpRequest();var data;if(options.form){xhr.open(options.form.method,options.form.action);data=new FormData(options.form);}else{xhr.open('POST',options.url);data=new FormData();_.each(options.data||{},function(v,k){data.append(k,v);});}
data.append('token','dummy-because-api-expects-one');if(core.csrf_token){data.append('csrf_token',core.csrf_token);}
xhr.responseType='blob';xhr.onload=function(){var mimetype=xhr.response.type;if(xhr.status===200&&mimetype!=='text/html'){var header=(xhr.getResponseHeader('Content-Disposition')||'').replace(/;$/,'');var filename=header?contentdisposition.parse(header).parameters.filename:null;download(xhr.response,filename,mimetype);if(options.success){options.success();}
return true;}
if(!options.error){return true;}
var decoder=new FileReader();decoder.onload=function(){var contents=decoder.result;var err;var doc=new DOMParser().parseFromString(contents,'text/html');var nodes=doc.body.children.length===0?doc.body.childNodes:doc.body.children;try{var node=nodes[1]||nodes[0];err=JSON.parse(node.textContent);}catch(e){err={message:nodes.length>1?nodes[1].textContent:'',data:{name:String(xhr.status),title:nodes.length>0?nodes[0].textContent:'',}};}
options.error(err);};decoder.readAsText(xhr.response);};xhr.onerror=function(){if(options.error){options.error({message:_("Something happened while trying to contact the server, check that the server is online and that you still have a working network connection."),data:{title:_t("Could not connect to the server")}});}};if(options.complete){xhr.onloadend=function(){options.complete();};}
xhr.send(data);return true;}
function post(controller_url,data){var postData=new FormData();$.each(data,function(i,val){postData.append(i,val);});if(core.csrf_token){postData.append('csrf_token',core.csrf_token);}
return new Promise(function(resolve,reject){$.ajax(controller_url,{data:postData,processData:false,contentType:false,type:'POST'}).then(resolve).fail(reject);});}
var loadXML=(function(){var isLoading=false;var loadingsData=[];var seenURLs=[];return function(url,qweb){function _load(){isLoading=true;if(loadingsData.length){var loadingData=loadingsData[0];loadingData.qweb.add_template(loadingData.url,function(){loadingsData.shift();loadingData.resolve();_load();});}else{isLoading=false;}}
if(!url||!qweb){return Promise.resolve();}
if(_.contains(seenURLs,url)){var oldLoadingData=_.findWhere(loadingsData,{url:url});return oldLoadingData?oldLoadingData.def:Promise.resolve();}
seenURLs.push(url);var newLoadingData={url:url,qweb:qweb,};newLoadingData.def=new Promise(function(resolve,reject){newLoadingData.resolve=resolve;newLoadingData.reject=reject;});loadingsData.push(newLoadingData);if(!isLoading){_load();}
return newLoadingData.def;};})();var loadAsset=(function(){var cache={};var load=function loadAsset(xmlId){if(cache[xmlId]){return Promise.resolve(cache[xmlId]);}
var params={args:[xmlId,{debug:config.debug}],kwargs:{context:odoo.session_info.user_context,},method:'render_template',model:'ir.ui.view',};return rpc('/web/dataset/call_kw/ir.ui.view/render_template',params).then(function(xml){var $xml=$(xml);cache[xmlId]={cssLibs:$xml.filter('link[href]:not([type="image/x-icon"])').map(function(){return $(this).attr('href');}).get(),cssContents:$xml.filter('style').map(function(){return $(this).html();}).get(),jsLibs:$xml.filter('script[src]').map(function(){return $(this).attr('src');}).get(),jsContents:$xml.filter('script:not([src])').map(function(){return $(this).html();}).get(),};return cache[xmlId];});};return load;})();function loadLibs(libs){var defs=[];(libs.jsLibs||[]).forEach(function(urls){defs.push(Promise.all(defs).then(function(){if(typeof(urls)==='string'){return ajax.loadJS(urls);}else{return Promise.all(urls.map(ajax.loadJS));}}));});(libs.cssLibs||[]).forEach(function(url){defs.push(ajax.loadCSS(url));});_.each(libs.assetLibs||[],function(xmlId){defs.push(loadAsset(xmlId).then(function(asset){return loadLibs(asset);}));});return Promise.all(defs);}
var ajax={jsonRpc:jsonRpc,rpc:rpc,loadCSS:loadCSS,loadJS:loadJS,loadXML:loadXML,loadAsset:loadAsset,loadLibs:loadLibs,get_file:get_file,post:post,};return ajax;});;

/* /web/static/src/js/services/ajax_service.js defined in bundle 'web.assets_common' */
odoo.define('web.AjaxService',function(require){"use strict";var AbstractService=require('web.AbstractService');var core=require('web.core');var session=require('web.session');var AjaxService=AbstractService.extend({rpc:function(route,args,options,target){var rpcPromise;var promise=new Promise(function(resolve,reject){rpcPromise=session.rpc(route,args,options);rpcPromise.then(function(result){if(!target.isDestroyed()){resolve(result);}}).guardedCatch(function(reason){if(!target.isDestroyed()){reject(reason);}});});promise.abort=rpcPromise.abort.bind(rpcPromise);return promise;},});core.serviceRegistry.add('ajax',AjaxService);return AjaxService;});;

/* /web/static/src/js/core/time.js defined in bundle 'web.assets_common' */
odoo.define('web.time',function(require){"use strict";var translation=require('web.translation');var utils=require('web.utils');var lpad=utils.lpad;var rpad=utils.rpad;var _t=translation._t;function date_to_utc(k,v){var value=this[k];if(!(value instanceof Date)){return v;}
return datetime_to_str(value);}
function str_to_datetime(str){if(!str){return str;}
var regex=/^(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d(?:\.(\d+))?)$/;var res=regex.exec(str);if(!res){throw new Error("'"+str+"' is not a valid datetime");}
var tmp=new Date(2000,0,1);tmp.setUTCMonth(1970);tmp.setUTCMonth(0);tmp.setUTCDate(1);tmp.setUTCFullYear(parseFloat(res[1]));tmp.setUTCMonth(parseFloat(res[2])-1);tmp.setUTCDate(parseFloat(res[3]));tmp.setUTCHours(parseFloat(res[4]));tmp.setUTCMinutes(parseFloat(res[5]));tmp.setUTCSeconds(parseFloat(res[6]));tmp.setUTCSeconds(parseFloat(res[6]));tmp.setUTCMilliseconds(parseFloat(utils.rpad((res[7]||"").slice(0,3),3)));return tmp;}
function str_to_date(str){if(!str){return str;}
var regex=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var res=regex.exec(str);if(!res){throw new Error("'"+str+"' is not a valid date");}
var tmp=new Date(2000,0,1);tmp.setFullYear(parseFloat(res[1]));tmp.setMonth(parseFloat(res[2])-1);tmp.setDate(parseFloat(res[3]));tmp.setHours(0);tmp.setMinutes(0);tmp.setSeconds(0);return tmp;}
function str_to_time(str){if(!str){return str;}
var regex=/^(\d\d):(\d\d):(\d\d(?:\.(\d+))?)$/;var res=regex.exec(str);if(!res){throw new Error("'"+str+"' is not a valid time");}
var tmp=new Date();tmp.setFullYear(1970);tmp.setMonth(0);tmp.setDate(1);tmp.setHours(parseFloat(res[1]));tmp.setMinutes(parseFloat(res[2]));tmp.setSeconds(parseFloat(res[3]));tmp.setMilliseconds(parseFloat(rpad((res[4]||"").slice(0,3),3)));return tmp;}
function datetime_to_str(obj){if(!obj){return false;}
return lpad(obj.getUTCFullYear(),4)+"-"+lpad(obj.getUTCMonth()+1,2)+"-"
+lpad(obj.getUTCDate(),2)+" "+lpad(obj.getUTCHours(),2)+":"
+lpad(obj.getUTCMinutes(),2)+":"+lpad(obj.getUTCSeconds(),2);}
function date_to_str(obj){if(!obj){return false;}
return lpad(obj.getFullYear(),4)+"-"+lpad(obj.getMonth()+1,2)+"-"
+lpad(obj.getDate(),2);}
function time_to_str(obj){if(!obj){return false;}
return lpad(obj.getHours(),2)+":"+lpad(obj.getMinutes(),2)+":"
+lpad(obj.getSeconds(),2);}
function auto_str_to_date(value){try{return str_to_datetime(value);}catch(e){}
try{return str_to_date(value);}catch(e){}
try{return str_to_time(value);}catch(e){}
throw new Error(_.str.sprintf(_t("'%s' is not a correct date, datetime nor time"),value));}
function auto_date_to_str(value,type){switch(type){case'datetime':return datetime_to_str(value);case'date':return date_to_str(value);case'time':return time_to_str(value);default:throw new Error(_.str.sprintf(_t("'%s' is not convertible to date, datetime nor time"),type));}}
function strftime_to_moment_format(value){if(_normalize_format_cache[value]===undefined){var isletter=/[a-zA-Z]/,output=[],inToken=false;for(var index=0;index<value.length;++index){var character=value[index];if(character==='%'&&!inToken){inToken=true;continue;}
if(isletter.test(character)){if(inToken&&normalize_format_table[character]!==undefined){character=normalize_format_table[character];}else{character='['+character+']';}}
output.push(character);inToken=false;}
_normalize_format_cache[value]=output.join('');}
return _normalize_format_cache[value];}
function moment_to_strftime_format(value){var regex=/(MMMM|DDDD|dddd|YYYY|MMM|ddd|mm|ss|ww|WW|MM|YY|hh|HH|DD|A|d)/g;return value.replace(regex,function(val){return'%'+inverse_normalize_format_table[val];});}
var _normalize_format_cache={};var normalize_format_table={'a':'ddd','A':'dddd','b':'MMM','B':'MMMM','d':'DD','H':'HH','I':'hh','j':'DDDD','m':'MM','M':'mm','p':'A','S':'ss','U':'ww','W':'WW','w':'d','y':'YY','Y':'YYYY','c':'ddd MMM D HH:mm:ss YYYY','x':'MM/DD/YY','X':'HH:mm:ss'};var inverse_normalize_format_table=_.invert(normalize_format_table);function getLangDateFormat(){return this.strftime_to_moment_format(_t.database.parameters.date_format);}
function getLangTimeFormat(){return this.strftime_to_moment_format(_t.database.parameters.time_format);}
function getLangDatetimeFormat(){return this.strftime_to_moment_format(_t.database.parameters.date_format+" "+_t.database.parameters.time_format);}
return{date_to_utc:date_to_utc,str_to_datetime:str_to_datetime,str_to_date:str_to_date,str_to_time:str_to_time,datetime_to_str:datetime_to_str,date_to_str:date_to_str,time_to_str:time_to_str,auto_str_to_date:auto_str_to_date,auto_date_to_str:auto_date_to_str,strftime_to_moment_format:strftime_to_moment_format,moment_to_strftime_format:moment_to_strftime_format,getLangDateFormat:getLangDateFormat,getLangTimeFormat:getLangTimeFormat,getLangDatetimeFormat:getLangDatetimeFormat,};});;

/* /web/static/src/js/core/mixins.js defined in bundle 'web.assets_common' */
odoo.define('web.mixins',function(require){"use strict";var Class=require('web.Class');var utils=require('web.utils');var ParentedMixin={__parentedMixin:true,init:function(){this.__parentedDestroyed=false;this.__parentedChildren=[];this.__parentedParent=null;},setParent:function(parent){if(this.getParent()){if(this.getParent().__parentedMixin){this.getParent().__parentedChildren=_.without(this.getParent().getChildren(),this);}}
this.__parentedParent=parent;if(parent&&parent.__parentedMixin){parent.__parentedChildren.push(this);}},getParent:function(){return this.__parentedParent;},getChildren:function(){return _.clone(this.__parentedChildren);},isDestroyed:function(){return this.__parentedDestroyed;},alive:function(promise,shouldReject){var self=this;return new Promise(function(resolve,reject){promise.then(function(result){if(!self.isDestroyed()){resolve(result);}else if(shouldReject){reject();}}).guardedCatch(function(reason){if(!self.isDestroyed()){reject(reason);}else if(shouldReject){reject();}});});},destroy:function(){_.each(this.getChildren(),function(el){el.destroy();});this.setParent(undefined);this.__parentedDestroyed=true;},findAncestor:function(predicate){var ancestor=this;while(ancestor&&!(predicate(ancestor))&&ancestor.getParent){ancestor=ancestor.getParent();}
return ancestor;},};function OdooEvent(target,name,data){this.target=target;this.name=name;this.data=Object.create(null);_.extend(this.data,data);this.stopped=false;}
OdooEvent.prototype.stopPropagation=function(){this.stopped=true;};OdooEvent.prototype.is_stopped=function(){return this.stopped;};var Events=Class.extend({on:function(events,callback,context){var ev;events=events.split(/\s+/);var calls=this._callbacks||(this._callbacks={});while((ev=events.shift())){var list=calls[ev]||(calls[ev]={});var tail=list.tail||(list.tail=list.next={});tail.callback=callback;tail.context=context;list.tail=tail.next={};}
return this;},off:function(events,callback,context){var ev,calls,node;if(!events){delete this._callbacks;}else if((calls=this._callbacks)){events=events.split(/\s+/);while((ev=events.shift())){node=calls[ev];delete calls[ev];if(!callback||!node)
continue;while((node=node.next)&&node.next){if(node.callback===callback&&(!context||node.context===context))
continue;this.on(ev,node.callback,node.context);}}}
return this;},callbackList:function(){var lst=[];_.each(this._callbacks||{},function(el,eventName){var node=el;while((node=node.next)&&node.next){lst.push([eventName,node.callback,node.context]);}});return lst;},trigger:function(events){var event,node,calls,tail,args,all,rest;if(!(calls=this._callbacks))
return this;all=calls.all;(events=events.split(/\s+/)).push(null);while((event=events.shift())){if(all)
events.push({next:all.next,tail:all.tail,event:event});if(!(node=calls[event]))
continue;events.push({next:node.next,tail:node.tail});}
rest=Array.prototype.slice.call(arguments,1);while((node=events.pop())){tail=node.tail;args=node.event?[node.event].concat(rest):rest;while((node=node.next)!==tail){node.callback.apply(node.context||this,args);}}
return this;}});var EventDispatcherMixin=_.extend({},ParentedMixin,{__eventDispatcherMixin:true,custom_events:{},init:function(){ParentedMixin.init.call(this);this.__edispatcherEvents=new Events();this.__edispatcherRegisteredEvents=[];this._delegateCustomEvents();},proxy:function(method){var self=this;return function(){var fn=(typeof method==='string')?self[method]:method;if(fn===void 0){throw new Error("Couldn't find method '"+method+"' in widget "+self);}
return fn.apply(self,arguments);};},_delegateCustomEvents:function(){if(_.isEmpty(this.custom_events)){return;}
for(var key in this.custom_events){if(!this.custom_events.hasOwnProperty(key)){continue;}
var method=this.proxy(this.custom_events[key]);this.on(key,this,method);}},on:function(events,dest,func){var self=this;if(typeof func!=="function"){throw new Error("Event handler must be a function.");}
events=events.split(/\s+/);_.each(events,function(eventName){self.__edispatcherEvents.on(eventName,func,dest);if(dest&&dest.__eventDispatcherMixin){dest.__edispatcherRegisteredEvents.push({name:eventName,func:func,source:self});}});return this;},off:function(events,dest,func){var self=this;events=events.split(/\s+/);_.each(events,function(eventName){self.__edispatcherEvents.off(eventName,func,dest);if(dest&&dest.__eventDispatcherMixin){dest.__edispatcherRegisteredEvents=_.filter(dest.__edispatcherRegisteredEvents,function(el){return!(el.name===eventName&&el.func===func&&el.source===self);});}});return this;},once:function(events,dest,func){var self=this;if(typeof func!=="function"){throw new Error("Event handler must be a function.");}
self.on(events,dest,function what(){func.apply(this,arguments);self.off(events,dest,what);});},trigger:function(){this.__edispatcherEvents.trigger.apply(this.__edispatcherEvents,arguments);return this;},trigger_up:function(name,info){var event=new OdooEvent(this,name,info);this._trigger_up(event);return event;},_trigger_up:function(event){var parent;this.__edispatcherEvents.trigger(event.name,event);if(!event.is_stopped()&&(parent=this.getParent())){parent._trigger_up(event);}},destroy:function(){var self=this;_.each(this.__edispatcherRegisteredEvents,function(event){event.source.__edispatcherEvents.off(event.name,event.func,self);});this.__edispatcherRegisteredEvents=[];_.each(this.__edispatcherEvents.callbackList(),function(cal){this.off(cal[0],cal[2],cal[1]);},this);this.__edispatcherEvents.off();ParentedMixin.destroy.call(this);}});var PropertiesMixin=_.extend({},EventDispatcherMixin,{init:function(){EventDispatcherMixin.init.call(this);this.__getterSetterInternalMap={};},set:function(arg1,arg2,arg3){var map;var options;if(typeof arg1==="string"){map={};map[arg1]=arg2;options=arg3||{};}else{map=arg1;options=arg2||{};}
var self=this;var changed=false;_.each(map,function(val,key){var tmp=self.__getterSetterInternalMap[key];if(tmp===val)
return;if(key==='value'&&self.field&&self.field.type==='float'&&tmp&&val){var digits=self.field.digits;if(_.isArray(digits)){if(utils.float_is_zero(tmp-val,digits[1])){return;}}}
changed=true;self.__getterSetterInternalMap[key]=val;if(!options.silent)
self.trigger("change:"+key,self,{oldValue:tmp,newValue:val});});if(changed)
self.trigger("change",self);},get:function(key){return this.__getterSetterInternalMap[key];}});return{ParentedMixin:ParentedMixin,EventDispatcherMixin:EventDispatcherMixin,PropertiesMixin:PropertiesMixin,};});;

/* /web/static/src/js/core/service_mixins.js defined in bundle 'web.assets_common' */
odoo.define('web.ServiceProviderMixin',function(require){"use strict";var core=require('web.core');var ServiceProviderMixin={services:{},UndeployedServices:{},init:function(parent){var self=this;this.on('call_service',this,this._call_service.bind(this));_.each(core.serviceRegistry.map,function(Service,serviceName){if(serviceName in self.UndeployedServices){throw new Error('Service "'+serviceName+'" is already loaded.');}
self.UndeployedServices[serviceName]=Service;});this._deployServices();core.serviceRegistry.onAdd(function(serviceName,Service){if(serviceName in self.services||serviceName in self.UndeployedServices){throw new Error('Service "'+serviceName+'" is already loaded.');}
self.UndeployedServices[serviceName]=Service;self._deployServices();});},_deployServices:function(){var self=this;var done=false;while(!done){var serviceName=_.findKey(this.UndeployedServices,function(Service){return!_.some(Service.prototype.dependencies,function(depName){return!self.services[depName];});});if(serviceName){var service=new this.UndeployedServices[serviceName](this);this.services[serviceName]=service;delete this.UndeployedServices[serviceName];service.start();}else{done=true;}}},_call_service:function(event){var args=event.data.args||[];if(event.data.service==='ajax'&&event.data.method==='rpc'){args=args.concat(event.target);}
var service=this.services[event.data.service];var result=service[event.data.method].apply(service,args);event.data.callback(result);},};return ServiceProviderMixin;});odoo.define('web.ServicesMixin',function(require){"use strict";var rpc=require('web.rpc');var ServicesMixin={call:function(service,method){var args=Array.prototype.slice.call(arguments,2);var result;this.trigger_up('call_service',{service:service,method:method,args:args,callback:function(r){result=r;},});return result;},_rpc:function(params,options){var query=rpc.buildQuery(params);var prom=this.call('ajax','rpc',query.route,query.params,options,this);if(!prom){prom=new Promise(function(){});prom.abort=function(){};}
var abort=prom.abort?prom.abort:prom.reject;if(!abort){throw new Error("a rpc promise should always have a reject function");}
prom.abort=abort.bind(prom);return prom;},loadFieldView:function(modelName,context,view_id,view_type,options){return this.loadViews(modelName,context,[[view_id,view_type]],options).then(function(result){return result[view_type];});},loadViews:function(modelName,context,views,options){var self=this;return new Promise(function(resolve){self.trigger_up('load_views',{modelName:modelName,context:context,views:views,options:options,on_success:resolve,});});},loadFilters:function(modelName,actionId,context){var self=this;return new Promise(function(resolve,reject){self.trigger_up('load_filters',{modelName:modelName,actionId:actionId,context:context,on_success:resolve,});});},createFilter:function(filter){var self=this;return new Promise(function(resolve,reject){self.trigger_up('create_filter',{filter:filter,on_success:resolve,});});},deleteFilter:function(filterId){var self=this;return new Promise(function(resolve,reject){self.trigger_up('delete_filter',{filterId:filterId,on_success:resolve,});});},getSession:function(){var session;this.trigger_up('get_session',{callback:function(result){session=result;}});return session;},do_action:function(action,options){var self=this;return new Promise(function(resolve,reject){self.trigger_up('do_action',{action:action,options:options,on_success:resolve,on_fail:reject,});});},do_notify:function(title,message,sticky,className){return this.call('notification','notify',{title:title,message:message,sticky:sticky,className:className});},do_warn:function(title,message,sticky,className){return this.call('notification','notify',{type:'warning',title:title,message:message,sticky:sticky,className:className});},};return ServicesMixin;});;

/* /web/static/src/js/core/rpc.js defined in bundle 'web.assets_common' */
odoo.define('web.rpc',function(require){"use strict";var ajax=require('web.ajax');return{query:function(params,options){var query=this.buildQuery(params);return ajax.rpc(query.route,query.params,options);},buildQuery:function(options){var route;var params=options.params||{};var orderBy;if(options.route){route=options.route;}else if(options.model&&options.method){route='/web/dataset/call_kw/'+options.model+'/'+options.method;}
if(options.method){params.args=options.args||[];params.model=options.model;params.method=options.method;params.kwargs=_.extend(params.kwargs||{},options.kwargs);params.kwargs.context=options.context||params.context||params.kwargs.context;}
if(options.method==='read_group'||options.method==='web_read_group'){if(!(params.args&&params.args[0]!==undefined)){params.kwargs.domain=options.domain||params.domain||params.kwargs.domain||[];}
if(!(params.args&&params.args[1]!==undefined)){params.kwargs.fields=options.fields||params.fields||params.kwargs.fields||[];}
if(!(params.args&&params.args[2]!==undefined)){params.kwargs.groupby=options.groupBy||params.groupBy||params.kwargs.groupby||[];}
params.kwargs.offset=options.offset||params.offset||params.kwargs.offset;params.kwargs.limit=options.limit||params.limit||params.kwargs.limit;orderBy=options.orderBy||params.orderBy||params.kwargs.orderby;params.kwargs.orderby=orderBy?this._serializeSort(orderBy):orderBy;params.kwargs.lazy='lazy'in options?options.lazy:params.lazy;if(options.method==='web_read_group'){params.kwargs.expand=options.expand||params.expand||params.kwargs.expand;params.kwargs.expand_limit=options.expand_limit||params.expand_limit||params.kwargs.expand_limit;var expandOrderBy=options.expand_orderby||params.expand_orderby||params.kwargs.expand_orderby;params.kwargs.expand_orderby=expandOrderBy?this._serializeSort(expandOrderBy):expandOrderBy;}}
if(options.method==='search_read'){params.kwargs.domain=options.domain||params.domain||params.kwargs.domain;params.kwargs.fields=options.fields||params.fields||params.kwargs.fields;params.kwargs.offset=options.offset||params.offset||params.kwargs.offset;params.kwargs.limit=options.limit||params.limit||params.kwargs.limit;orderBy=options.orderBy||params.orderBy||params.kwargs.order;params.kwargs.order=orderBy?this._serializeSort(orderBy):orderBy;}
if(options.route==='/web/dataset/search_read'){params.model=options.model||params.model;params.domain=options.domain||params.domain;params.fields=options.fields||params.fields;params.limit=options.limit||params.limit;params.offset=options.offset||params.offset;orderBy=options.orderBy||params.orderBy;params.sort=orderBy?this._serializeSort(orderBy):orderBy;params.context=options.context||params.context||{};}
return{route:route,params:JSON.parse(JSON.stringify(params)),};},_serializeSort:function(orderBy){return _.map(orderBy,function(order){return order.name+(order.asc!==false?' ASC':' DESC');}).join(', ');},};});;

/* /web/static/src/js/core/widget.js defined in bundle 'web.assets_common' */
odoo.define('web.Widget',function(require){"use strict";var ajax=require('web.ajax');var core=require('web.core');var mixins=require('web.mixins');var ServicesMixin=require('web.ServicesMixin');var Widget=core.Class.extend(mixins.PropertiesMixin,ServicesMixin,{tagName:'div',id:null,className:null,attributes:{},events:{},template:null,xmlDependencies:null,cssLibs:null,jsLibs:null,assetLibs:null,init:function(parent){mixins.PropertiesMixin.init.call(this);this.setParent(parent);for(var name in this){if(typeof(this[name])==="function"){if((/^on_|^do_/).test(name)){this[name]=this[name].bind(this);}}}},willStart:function(){var proms=[];if(this.xmlDependencies){proms.push.apply(proms,_.map(this.xmlDependencies,function(xmlPath){return ajax.loadXML(xmlPath,core.qweb);}));}
if(this.jsLibs||this.cssLibs||this.assetLibs){proms.push(ajax.loadLibs(this));}
return Promise.all(proms);},start:function(){return Promise.resolve();},destroy:function(){this.getChildren().forEach(function(child){child.destroy();});if(this.$el){this.$el.remove();}
mixins.PropertiesMixin.destroy.call(this);},appendTo:function(target){var self=this;return this._widgetRenderAndInsert(function(t){self.$el.appendTo(t);},target);},attachTo:function(target){var self=this;this.setElement(target.$el||target);return this.willStart().then(function(){return self.start();});},do_hide:function(){this.$el.addClass('o_hidden');},do_show:function(){this.$el.removeClass('o_hidden');},do_toggle:function(display){if(_.isBoolean(display)){display?this.do_show():this.do_hide();}else{this.$el.hasClass('o_hidden')?this.do_show():this.do_hide();}},insertAfter:function(target){var self=this;return this._widgetRenderAndInsert(function(t){self.$el.insertAfter(t);},target);},insertBefore:function(target){var self=this;return this._widgetRenderAndInsert(function(t){self.$el.insertBefore(t);},target);},prependTo:function(target){var self=this;return this._widgetRenderAndInsert(function(t){self.$el.prependTo(t);},target);},renderElement:function(){var $el;if(this.template){$el=$(core.qweb.render(this.template,{widget:this}).trim());}else{$el=this._makeDescriptive();}
this._replaceElement($el);},replace:function(target){return this._widgetRenderAndInsert(_.bind(function(t){this.$el.replaceAll(t);},this),target);},setElement:function(element){if(this.$el){this._undelegateEvents();}
this.$el=(element instanceof $)?element:$(element);this.el=this.$el[0];this._delegateEvents();return this;},$:function(selector){if(selector===undefined){return this.$el;}
return this.$el.find(selector);},_delegateEvents:function(){var events=this.events;if(_.isEmpty(events)){return;}
for(var key in events){if(!events.hasOwnProperty(key)){continue;}
var method=this.proxy(events[key]);var match=/^(\S+)(\s+(.*))?$/.exec(key);var event=match[1];var selector=match[3];event+='.widget_events';if(!selector){this.$el.on(event,method);}else{this.$el.on(event,selector,method);}}},_makeDescriptive:function(){var attrs=_.extend({},this.attributes||{});if(this.id){attrs.id=this.id;}
if(this.className){attrs['class']=this.className;}
var $el=$(document.createElement(this.tagName));if(!_.isEmpty(attrs)){$el.attr(attrs);}
return $el;},_replaceElement:function($el){var $oldel=this.$el;this.setElement($el);if($oldel&&!$oldel.is(this.$el)){if($oldel.length>1){$oldel.wrapAll('<div/>');$oldel.parent().replaceWith(this.$el);}else{$oldel.replaceWith(this.$el);}}
return this;},_undelegateEvents:function(){this.$el.off('.widget_events');},_widgetRenderAndInsert:function(insertion,target){var self=this;return this.willStart().then(function(){if(self.__parentedDestroyed){return;}
self.renderElement();insertion(target);return self.start();});},});return Widget;});;

/* /web/static/src/js/core/registry.js defined in bundle 'web.assets_common' */
odoo.define('web.Registry',function(require){"use strict";var Class=require('web.Class');var Registry=Class.extend({init:function(mapping){this.map=Object.create(mapping||null);this._scoreMapping=Object.create(null);this._sortedKeys=null;this.listeners=[];},add:function(key,value,score){this._scoreMapping[key]=score===undefined?key:score;this._sortedKeys=null;this.map[key]=value;_.each(this.listeners,function(callback){callback(key,value);});return this;},contains:function(key){return(key in this.map);},entries:function(){return Object.create(this.map);},get:function(key){return this.map[key];},getAny:function(keys){for(var i=0;i<keys.length;i++){if(keys[i]in this.map){return this.map[keys[i]];}}
return null;},keys:function(){var self=this;if(!this._sortedKeys){this._sortedKeys=_.sortBy(Object.keys(this.map),function(key){return self._scoreMapping[key]||0;});}
return this._sortedKeys;},onAdd:function(callback){this.listeners.push(callback);},values:function(){var self=this;return this.keys().map(function(key){return self.map[key];});},});return Registry;});;

/* /web/static/src/js/core/session.js defined in bundle 'web.assets_common' */
odoo.define('web.Session',function(require){"use strict";var ajax=require('web.ajax');var concurrency=require('web.concurrency');var config=require('web.config');var core=require('web.core');var mixins=require('web.mixins');var utils=require('web.utils');var _t=core._t;var qweb=core.qweb;var Session=core.Class.extend(mixins.EventDispatcherMixin,{init:function(parent,origin,options){mixins.EventDispatcherMixin.init.call(this);this.setParent(parent);options=options||{};this.module_list=(options.modules&&options.modules.slice())||(window.odoo._modules&&window.odoo._modules.slice())||[];this.server=null;this.avoid_recursion=false;this.use_cors=options.use_cors||false;this.setup(origin);this.debug=config.debug;this.name="instance0";this.qweb_mutex=new concurrency.Mutex();this.currencies={};this._groups_def={};core.bus.on('invalidate_session',this,this._onInvalidateSession);},setup:function(origin,options){var window_origin=location.protocol+"//"+location.host;origin=origin?origin.replace(/\/+$/,''):window_origin;if(!_.isUndefined(this.origin)&&this.origin!==origin)
throw new Error('Session already bound to '+this.origin);else
this.origin=origin;this.prefix=this.origin;this.server=this.origin;options=options||{};if('use_cors'in options){this.use_cors=options.use_cors;}},session_bind:function(origin){var self=this;this.setup(origin);qweb.default_dict._s=this.origin;this.uid=null;this.username=null;this.user_context={};this.db=null;this.module_loaded={};_(this.module_list).each(function(mod){self.module_loaded[mod]=true;});this.active_id=null;return this.session_init();},session_init:function(){var self=this;var prom=this.session_reload();if(this.is_frontend){return prom.then(function(){return self.load_translations();});}
return prom.then(function(){var modules=self.module_list.join(',');var promise=self.load_qweb(modules);if(self.session_is_valid()){return promise.then(function(){return self.load_modules();});}
return Promise.all([promise,self.rpc('/web/webclient/bootstrap_translations',{mods:self.module_list}).then(function(trans){_t.database.set_bundle(trans);})]);});},session_is_valid:function(){var db=$.deparam.querystring().db;if(db&&this.db!==db){return false;}
return!!this.uid;},session_authenticate:function(){var self=this;return Promise.resolve(this._session_authenticate.apply(this,arguments)).then(function(){return self.load_modules();});},_session_authenticate:function(db,login,password){var self=this;var params={db:db,login:login,password:password};return this.rpc("/web/session/authenticate",params).then(function(result){if(!result.uid){return Promise.reject();}
_.extend(self,result);});},session_logout:function(){$.bbq.removeState();return this.rpc("/web/session/destroy",{});},user_has_group:function(group){if(!this.uid){return Promise.resolve(false);}
var def=this._groups_def[group];if(!def){def=this._groups_def[group]=this.rpc('/web/dataset/call_kw/res.users/has_group',{"model":"res.users","method":"has_group","args":[group],"kwargs":{}});}
return def;},get_cookie:function(name){if(!this.name){return null;}
var nameEQ=this.name+'|'+name+'=';var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;++i){var cookie=cookies[i].replace(/^\s*/,'');if(cookie.indexOf(nameEQ)===0){try{return JSON.parse(decodeURIComponent(cookie.substring(nameEQ.length)));}catch(err){this.set_cookie(name,'',-1);}}}
return null;},set_cookie:function(name,value,ttl){if(!this.name){return;}
ttl=ttl||24*60*60*365;utils.set_cookie(this.name+'|'+name,value,ttl);},load_modules:function(){var self=this;var modules=odoo._modules;var all_modules=_.uniq(self.module_list.concat(modules));var to_load=_.difference(modules,self.module_list).join(',');this.module_list=all_modules;var loaded=Promise.resolve(self.load_translations());var locale="/web/webclient/locale/"+self.user_context.lang||'en_US';var file_list=[locale];if(to_load.length){loaded=Promise.all([loaded,self.rpc('/web/webclient/csslist',{mods:to_load}).then(self.load_css.bind(self)),self.load_qweb(to_load),self.rpc('/web/webclient/jslist',{mods:to_load}).then(function(files){file_list=file_list.concat(files);})]);}
return loaded.then(function(){return self.load_js(file_list);}).then(function(){self.on_modules_loaded();self.trigger('module_loaded');});},load_translations:function(){return _t.database.load_translations(this,this.module_list,this.user_context.lang,this.translationURL);},load_css:function(files){var self=this;_.each(files,function(file){ajax.loadCSS(self.url(file,null));});},load_js:function(files){var self=this;return new Promise(function(resolve,reject){if(files.length!==0){var file=files.shift();var url=self.url(file,null);ajax.loadJS(url).then(resolve);}else{resolve();}});},load_qweb:function(mods){var lock=this.qweb_mutex.exec(function(){return $.get('/web/webclient/qweb?mods='+mods).then(function(doc){if(!doc){return;}
qweb.add_template(doc);});});return lock;},on_modules_loaded:function(){var openerp=window.openerp;for(var j=0;j<this.module_list.length;j++){var mod=this.module_list[j];if(this.module_loaded[mod])
continue;openerp[mod]={};var fct=openerp._openerp[mod];if(typeof(fct)==="function"){openerp._openerp[mod]={};for(var k in fct){openerp._openerp[mod][k]=fct[k];}
fct(openerp,openerp._openerp[mod]);}
this.module_loaded[mod]=true;}},get_currency:function(currency_id){return this.currencies[currency_id];},get_file:function(options){options.session=this;return ajax.get_file(options);},session_reload:function(){var result=_.extend({},window.odoo.session_info);_.extend(this,result);return Promise.resolve();},rpc:function(url,params,options){var self=this;options=_.clone(options||{});options.headers=_.extend({},options.headers);if(odoo.debug){options.headers["X-Debug-Mode"]=$.deparam($.param.querystring()).debug;}
if(!_.isString(url)){_.extend(options,url);url=url.url;}
if(self.use_cors){url=self.url(url,null);}
return ajax.jsonRpc(url,"call",params,options);},url:function(path,params){params=_.extend(params||{});var qs=$.param(params);if(qs.length>0)
qs="?"+qs;var prefix=_.any(['http://','https://','//'],function(el){return path.length>=el.length&&path.slice(0,el.length)===el;})?'':this.prefix;return prefix+path+qs;},getTZOffset:function(date){return-new Date(date).getTimezoneOffset();},reloadCurrencies:function(){var self=this;return this.rpc('/web/session/get_session_info').then(function(result){self.currencies=result.currencies;});},_onInvalidateSession:function(){this.uid=false;},});return Session;});;

/* /web/static/src/js/core/dom.js defined in bundle 'web.assets_common' */
odoo.define('web.dom_ready',function(require){'use strict';return new Promise(function(resolve,reject){$(resolve);});});odoo.define('web.dom',function(require){"use strict";var concurrency=require('web.concurrency');var config=require('web.config');var core=require('web.core');var _t=core._t;function _notify(content,callbacks){callbacks.forEach(function(c){if(c.widget&&c.widget.on_attach_callback){c.widget.on_attach_callback(c.callback_args);}});core.bus.trigger('DOM_updated',content);}
var dom={DEBOUNCE:400,append:function($target,content,options){$target.append(content);if(options&&options.in_DOM){_notify(content,options.callbacks);}},autoresize:function($textarea,options){if($textarea.data("auto_resize")){return;}
var $fixedTextarea;var minHeight;function resize(){$fixedTextarea.insertAfter($textarea);var heightOffset=0;var style=window.getComputedStyle($textarea[0],null);if(style.boxSizing==='border-box'){var paddingHeight=parseFloat(style.paddingTop)+parseFloat(style.paddingBottom);var borderHeight=parseFloat(style.borderTopWidth)+parseFloat(style.borderBottomWidth);heightOffset=borderHeight+paddingHeight;}
$fixedTextarea.width($textarea.width());$fixedTextarea.val($textarea.val());var height=$fixedTextarea[0].scrollHeight;$textarea.css({height:Math.max(height+heightOffset,minHeight)});}
function removeVerticalResize(){var style=window.getComputedStyle($textarea[0],null);if(style.resize==='vertical'){$textarea[0].style.resize='none';}else if(style.resize==='both'){$textarea[0].style.resize='horizontal';}}
options=options||{};minHeight='min_height'in options?options.min_height:50;$fixedTextarea=$('<textarea disabled>',{class:$textarea[0].className,});var direction=_t.database.parameters.direction==='rtl'?'right':'left';$fixedTextarea.css({position:'absolute',opacity:0,height:10,borderTopWidth:0,borderBottomWidth:0,padding:0,top:-10000,}).css(direction,-10000);$fixedTextarea.data("auto_resize",true);$textarea.css({'overflow-y':'hidden'});resize();removeVerticalResize();$textarea.data("auto_resize",true);$textarea.on('input focus change',resize);if(options.parent){core.bus.on('DOM_updated',options.parent,function(){resize();removeVerticalResize();});}},cssFind:function($from,selector){return $from.find('*').filter(selector);},detach:function(to_detach,options){to_detach.forEach(function(d){if(d.widget.on_detach_callback){d.widget.on_detach_callback(d.callback_args);}});var $to_detach=options&&options.$to_detach;if(!$to_detach){$to_detach=$(to_detach.map(function(d){return d.widget.el;}));}
return $to_detach.detach();},getSelectionRange:function(node){return{start:node.selectionStart,end:node.selectionEnd,};},getPosition:function(e){var position={left:0,top:0};while(e){position.left+=e.offsetLeft;position.top+=e.offsetTop;e=e.offsetParent;}
return position;},makeAsyncHandler:function(fct,preventDefault,stopPropagation){var pending=false;function _isLocked(){return pending;}
function _lock(){pending=true;}
function _unlock(){pending=false;}
return function(ev){if(preventDefault===true||preventDefault&&preventDefault()){ev.preventDefault();}
if(stopPropagation===true||stopPropagation&&stopPropagation()){ev.stopPropagation();}
if(_isLocked()){return;}
_lock();var result=fct.apply(this,arguments);Promise.resolve(result).then(_unlock).guardedCatch(_unlock);return result;};},makeButtonHandler:function(fct){fct=dom.makeAsyncHandler(fct);return function(ev){var result=fct.apply(this,arguments);var $button=$(ev.target).closest('.btn');if(!$button.length){return result;}
$button.addClass('o_debounce_disabled');Promise.resolve(dom.DEBOUNCE&&concurrency.delay(dom.DEBOUNCE)).then(function(){$button.addClass('disabled').prop('disabled',true);$button.removeClass('o_debounce_disabled');return Promise.resolve(result).then(function(){$button.removeClass('disabled').prop('disabled',false);}).guardedCatch(function(){$button.removeClass('disabled').prop('disabled',false);});});return result;};},prepend:function($target,content,options){$target.prepend(content);if(options&&options.in_DOM){_notify(content,options.callbacks);}},renderButton:function(options){var jQueryParams=_.extend({type:'button',},options.attrs||{});var extraClasses=jQueryParams.class;if(extraClasses){extraClasses=extraClasses.replace(/\boe_highlight\b/g,'btn-primary').replace(/\boe_link\b/g,'btn-link');}
jQueryParams.class='btn';if(options.size){jQueryParams.class+=(' btn-'+options.size);}
jQueryParams.class+=(' '+(extraClasses||'btn-secondary'));var $button=$('<button/>',jQueryParams);if(options.icon){if(options.icon.substr(0,3)==='fa-'){$button.append($('<i/>',{class:'fa fa-fw o_button_icon '+options.icon,}));}else{$button.append($('<img/>',{src:options.icon,}));}}
if(options.text){$button.append($('<span/>',{text:options.text,}));}
return $button;},renderCheckbox:function(options){var id=_.uniqueId('checkbox-');var $container=$('<div/>',{class:'custom-control custom-checkbox',});var $input=$('<input/>',{type:'checkbox',id:id,class:'custom-control-input',});var $label=$('<label/>',{for:id,class:'custom-control-label',text:options&&options.text||'',});if(!options||!options.text){$label.html('&#8203;');}
if(options&&options.prop){$input.prop(options.prop);}
return $container.append($input,$label);},setSelectionRange:function(node,range){if(node.setSelectionRange){node.setSelectionRange(range.start,range.end);}else if(node.createTextRange){node.createTextRange().collapse(true).moveEnd('character',range.start).moveStart('character',range.end).select();}},initAutoMoreMenu:function($el,options){options=_.extend({unfoldable:'none',maxWidth:false,sizeClass:'SM',},options||{});var $extraItemsToggle=null;var debouncedAdapt=_.debounce(_adapt,250);core.bus.on('resize',null,debouncedAdapt);_adapt();$el.data('dom:autoMoreMenu:destroy',function(){_restore();core.bus.off('resize',null,debouncedAdapt);$el.removeData('dom:autoMoreMenu:destroy');});function _restore(){if($extraItemsToggle===null){return;}
var $items=$extraItemsToggle.children('.dropdown-menu').children();$items.addClass('nav-item');$items.children('.dropdown-item, a').removeClass('dropdown-item').addClass('nav-link');$items.insertBefore($extraItemsToggle);$extraItemsToggle.remove();$extraItemsToggle=null;}
function _adapt(){if(!$el.is(':visible')){return;}
_restore();if(config.device.size_class<=config.device.SIZES[options.sizeClass]){return;}
var $allItems=$el.children();var $unfoldableItems=$allItems.filter(options.unfoldable);var $items=$allItems.not($unfoldableItems);var maxWidth=0;if(options.maxWidth){maxWidth=options.maxWidth();}else{var mLeft=$el.is('.ml-auto, .mx-auto, .m-auto');var mRight=$el.is('.mr-auto, .mx-auto, .m-auto');maxWidth=computeFloatOuterWidthWithMargins($el[0],mLeft,mRight);var style=window.getComputedStyle($el[0]);maxWidth-=(parseFloat(style.paddingLeft)+parseFloat(style.paddingRight)+parseFloat(style.borderLeftWidth)+parseFloat(style.borderRightWidth));maxWidth-=_.reduce($unfoldableItems,function(sum,el){return sum+computeFloatOuterWidthWithMargins(el);},0);}
var nbItems=$items.length;var menuItemsWidth=_.reduce($items,function(sum,el){return sum+computeFloatOuterWidthWithMargins(el);},0);if(maxWidth-menuItemsWidth>=-0.001){return;}
var $dropdownMenu=$('<ul/>',{class:'dropdown-menu'});$extraItemsToggle=$('<li/>',{class:'nav-item dropdown o_extra_menu_items'}).append($('<a/>',{role:'button',href:'#',class:'nav-link dropdown-toggle o-no-caret','data-toggle':'dropdown','aria-expanded':false}).append($('<i/>',{class:'fa fa-plus'}))).append($dropdownMenu);$extraItemsToggle.insertAfter($items.last());menuItemsWidth+=computeFloatOuterWidthWithMargins($extraItemsToggle[0]);do{menuItemsWidth-=computeFloatOuterWidthWithMargins($items.eq(--nbItems)[0]);}while(!(maxWidth-menuItemsWidth>=-0.001));var $extraItems=$items.slice(nbItems).detach();$extraItems.removeClass('nav-item');$extraItems.children('.nav-link, a').removeClass('nav-link').addClass('dropdown-item');$dropdownMenu.append($extraItems);$extraItemsToggle.find('.nav-link').toggleClass('active',$extraItems.children().hasClass('active'));}
function computeFloatOuterWidthWithMargins(el,mLeft,mRight){var rect=el.getBoundingClientRect();var style=window.getComputedStyle(el);var outerWidth=rect.right-rect.left;if(mLeft!==false){outerWidth+=parseFloat(style.marginLeft);}
if(mRight!==false){outerWidth+=parseFloat(style.marginRight);}
return outerWidth;}},destroyAutoMoreMenu:function($el){var destroyFunc=$el.data('dom:autoMoreMenu:destroy');if(destroyFunc){destroyFunc.call(null);}},};return dom;});;

/* /web/static/src/js/core/concurrency.js defined in bundle 'web.assets_common' */
odoo.define('web.concurrency',function(require){"use strict";var Class=require('web.Class');return{delay:function(wait){return new Promise(function(resolve){setTimeout(resolve,wait);});},DropMisordered:Class.extend({init:function(failMisordered){this.lsn=0;this.rsn=-1;this.failMisordered=failMisordered||false;},add:function(promise){var self=this;var seq=this.lsn++;var res=new Promise(function(resolve,reject){promise.then(function(result){if(seq>self.rsn){self.rsn=seq;resolve(result);}else if(self.failMisordered){reject();}}).guardedCatch(function(result){reject(result);});});return res;},}),DropPrevious:Class.extend({add:function(promise){if(this.currentDef){this.currentDef.reject();}
var rejection;var res=new Promise(function(resolve,reject){rejection=reject;promise.then(resolve).catch(function(reason){reject(reason);});});this.currentDef=res;this.currentDef.reject=rejection;return res;}}),Mutex:Class.extend({init:function(){this.lock=Promise.resolve();this.queueSize=0;this.unlockedProm=undefined;this._unlock=undefined;},exec:function(action){var self=this;var currentLock=this.lock;var result;this.queueSize++;this.unlockedProm=this.unlockedProm||new Promise(function(resolve){self._unlock=resolve;});this.lock=new Promise(function(unlockCurrent){currentLock.then(function(){result=action();var always=function(returnedResult){unlockCurrent();self.queueSize--;if(self.queueSize===0){self.unlockedProm=undefined;self._unlock();}
return returnedResult;};Promise.resolve(result).then(always).guardedCatch(always);});});return this.lock.then(function(){return result;});},getUnlockedDef:function(){return this.unlockedProm||Promise.resolve();},}),MutexedDropPrevious:Class.extend({init:function(){this.locked=false;this.currentProm=null;this.pendingAction=null;this.pendingProm=null;},exec:function(action){var self=this;var resolution;var rejection;if(this.locked){this.pendingAction=action;var oldPendingDef=this.pendingProm;this.pendingProm=new Promise(function(resolve,reject){resolution=resolve;rejection=reject;if(oldPendingDef){oldPendingDef.reject();}
self.currentProm.reject();});this.pendingProm.resolve=resolution;this.pendingProm.reject=rejection;return this.pendingProm;}else{this.locked=true;this.currentProm=new Promise(function(resolve,reject){resolution=resolve;rejection=reject;function unlock(){self.locked=false;if(self.pendingAction){var action=self.pendingAction;var prom=self.pendingProm;self.pendingAction=null;self.pendingProm=null;self.exec(action).then(prom.resolve).guardedCatch(prom.reject);}}
Promise.resolve(action()).then(function(result){resolve(result);unlock();}).guardedCatch(function(reason){reject(reason);unlock();});});this.currentProm.resolve=resolution;this.currentProm.reject=rejection;return this.currentProm;}}}),rejectAfter:function(target_def,reference_def){return new Promise(function(resolve,reject){target_def.then(resolve).guardedCatch(reject);reference_def.then(reject).guardedCatch(reject);});}};});;

/* /web/static/src/js/core/utils.js defined in bundle 'web.assets_common' */
odoo.define('web.utils',function(require){"use strict";var translation=require('web.translation');var _t=translation._t;var id=-1;var diacriticsMap={'\u0041':'A','\u24B6':'A','\uFF21':'A','\u00C0':'A','\u00C1':'A','\u00C2':'A','\u1EA6':'A','\u1EA4':'A','\u1EAA':'A','\u1EA8':'A','\u00C3':'A','\u0100':'A','\u0102':'A','\u1EB0':'A','\u1EAE':'A','\u1EB4':'A','\u1EB2':'A','\u0226':'A','\u01E0':'A','\u00C4':'A','\u01DE':'A','\u1EA2':'A','\u00C5':'A','\u01FA':'A','\u01CD':'A','\u0200':'A','\u0202':'A','\u1EA0':'A','\u1EAC':'A','\u1EB6':'A','\u1E00':'A','\u0104':'A','\u023A':'A','\u2C6F':'A','\uA732':'AA','\u00C6':'AE','\u01FC':'AE','\u01E2':'AE','\uA734':'AO','\uA736':'AU','\uA738':'AV','\uA73A':'AV','\uA73C':'AY','\u0042':'B','\u24B7':'B','\uFF22':'B','\u1E02':'B','\u1E04':'B','\u1E06':'B','\u0243':'B','\u0182':'B','\u0181':'B','\u0043':'C','\u24B8':'C','\uFF23':'C','\u0106':'C','\u0108':'C','\u010A':'C','\u010C':'C','\u00C7':'C','\u1E08':'C','\u0187':'C','\u023B':'C','\uA73E':'C','\u0044':'D','\u24B9':'D','\uFF24':'D','\u1E0A':'D','\u010E':'D','\u1E0C':'D','\u1E10':'D','\u1E12':'D','\u1E0E':'D','\u0110':'D','\u018B':'D','\u018A':'D','\u0189':'D','\uA779':'D','\u01F1':'DZ','\u01C4':'DZ','\u01F2':'Dz','\u01C5':'Dz','\u0045':'E','\u24BA':'E','\uFF25':'E','\u00C8':'E','\u00C9':'E','\u00CA':'E','\u1EC0':'E','\u1EBE':'E','\u1EC4':'E','\u1EC2':'E','\u1EBC':'E','\u0112':'E','\u1E14':'E','\u1E16':'E','\u0114':'E','\u0116':'E','\u00CB':'E','\u1EBA':'E','\u011A':'E','\u0204':'E','\u0206':'E','\u1EB8':'E','\u1EC6':'E','\u0228':'E','\u1E1C':'E','\u0118':'E','\u1E18':'E','\u1E1A':'E','\u0190':'E','\u018E':'E','\u0046':'F','\u24BB':'F','\uFF26':'F','\u1E1E':'F','\u0191':'F','\uA77B':'F','\u0047':'G','\u24BC':'G','\uFF27':'G','\u01F4':'G','\u011C':'G','\u1E20':'G','\u011E':'G','\u0120':'G','\u01E6':'G','\u0122':'G','\u01E4':'G','\u0193':'G','\uA7A0':'G','\uA77D':'G','\uA77E':'G','\u0048':'H','\u24BD':'H','\uFF28':'H','\u0124':'H','\u1E22':'H','\u1E26':'H','\u021E':'H','\u1E24':'H','\u1E28':'H','\u1E2A':'H','\u0126':'H','\u2C67':'H','\u2C75':'H','\uA78D':'H','\u0049':'I','\u24BE':'I','\uFF29':'I','\u00CC':'I','\u00CD':'I','\u00CE':'I','\u0128':'I','\u012A':'I','\u012C':'I','\u0130':'I','\u00CF':'I','\u1E2E':'I','\u1EC8':'I','\u01CF':'I','\u0208':'I','\u020A':'I','\u1ECA':'I','\u012E':'I','\u1E2C':'I','\u0197':'I','\u004A':'J','\u24BF':'J','\uFF2A':'J','\u0134':'J','\u0248':'J','\u004B':'K','\u24C0':'K','\uFF2B':'K','\u1E30':'K','\u01E8':'K','\u1E32':'K','\u0136':'K','\u1E34':'K','\u0198':'K','\u2C69':'K','\uA740':'K','\uA742':'K','\uA744':'K','\uA7A2':'K','\u004C':'L','\u24C1':'L','\uFF2C':'L','\u013F':'L','\u0139':'L','\u013D':'L','\u1E36':'L','\u1E38':'L','\u013B':'L','\u1E3C':'L','\u1E3A':'L','\u0141':'L','\u023D':'L','\u2C62':'L','\u2C60':'L','\uA748':'L','\uA746':'L','\uA780':'L','\u01C7':'LJ','\u01C8':'Lj','\u004D':'M','\u24C2':'M','\uFF2D':'M','\u1E3E':'M','\u1E40':'M','\u1E42':'M','\u2C6E':'M','\u019C':'M','\u004E':'N','\u24C3':'N','\uFF2E':'N','\u01F8':'N','\u0143':'N','\u00D1':'N','\u1E44':'N','\u0147':'N','\u1E46':'N','\u0145':'N','\u1E4A':'N','\u1E48':'N','\u0220':'N','\u019D':'N','\uA790':'N','\uA7A4':'N','\u01CA':'NJ','\u01CB':'Nj','\u004F':'O','\u24C4':'O','\uFF2F':'O','\u00D2':'O','\u00D3':'O','\u00D4':'O','\u1ED2':'O','\u1ED0':'O','\u1ED6':'O','\u1ED4':'O','\u00D5':'O','\u1E4C':'O','\u022C':'O','\u1E4E':'O','\u014C':'O','\u1E50':'O','\u1E52':'O','\u014E':'O','\u022E':'O','\u0230':'O','\u00D6':'O','\u022A':'O','\u1ECE':'O','\u0150':'O','\u01D1':'O','\u020C':'O','\u020E':'O','\u01A0':'O','\u1EDC':'O','\u1EDA':'O','\u1EE0':'O','\u1EDE':'O','\u1EE2':'O','\u1ECC':'O','\u1ED8':'O','\u01EA':'O','\u01EC':'O','\u00D8':'O','\u01FE':'O','\u0186':'O','\u019F':'O','\uA74A':'O','\uA74C':'O','\u01A2':'OI','\uA74E':'OO','\u0222':'OU','\u0050':'P','\u24C5':'P','\uFF30':'P','\u1E54':'P','\u1E56':'P','\u01A4':'P','\u2C63':'P','\uA750':'P','\uA752':'P','\uA754':'P','\u0051':'Q','\u24C6':'Q','\uFF31':'Q','\uA756':'Q','\uA758':'Q','\u024A':'Q','\u0052':'R','\u24C7':'R','\uFF32':'R','\u0154':'R','\u1E58':'R','\u0158':'R','\u0210':'R','\u0212':'R','\u1E5A':'R','\u1E5C':'R','\u0156':'R','\u1E5E':'R','\u024C':'R','\u2C64':'R','\uA75A':'R','\uA7A6':'R','\uA782':'R','\u0053':'S','\u24C8':'S','\uFF33':'S','\u1E9E':'S','\u015A':'S','\u1E64':'S','\u015C':'S','\u1E60':'S','\u0160':'S','\u1E66':'S','\u1E62':'S','\u1E68':'S','\u0218':'S','\u015E':'S','\u2C7E':'S','\uA7A8':'S','\uA784':'S','\u0054':'T','\u24C9':'T','\uFF34':'T','\u1E6A':'T','\u0164':'T','\u1E6C':'T','\u021A':'T','\u0162':'T','\u1E70':'T','\u1E6E':'T','\u0166':'T','\u01AC':'T','\u01AE':'T','\u023E':'T','\uA786':'T','\uA728':'TZ','\u0055':'U','\u24CA':'U','\uFF35':'U','\u00D9':'U','\u00DA':'U','\u00DB':'U','\u0168':'U','\u1E78':'U','\u016A':'U','\u1E7A':'U','\u016C':'U','\u00DC':'U','\u01DB':'U','\u01D7':'U','\u01D5':'U','\u01D9':'U','\u1EE6':'U','\u016E':'U','\u0170':'U','\u01D3':'U','\u0214':'U','\u0216':'U','\u01AF':'U','\u1EEA':'U','\u1EE8':'U','\u1EEE':'U','\u1EEC':'U','\u1EF0':'U','\u1EE4':'U','\u1E72':'U','\u0172':'U','\u1E76':'U','\u1E74':'U','\u0244':'U','\u0056':'V','\u24CB':'V','\uFF36':'V','\u1E7C':'V','\u1E7E':'V','\u01B2':'V','\uA75E':'V','\u0245':'V','\uA760':'VY','\u0057':'W','\u24CC':'W','\uFF37':'W','\u1E80':'W','\u1E82':'W','\u0174':'W','\u1E86':'W','\u1E84':'W','\u1E88':'W','\u2C72':'W','\u0058':'X','\u24CD':'X','\uFF38':'X','\u1E8A':'X','\u1E8C':'X','\u0059':'Y','\u24CE':'Y','\uFF39':'Y','\u1EF2':'Y','\u00DD':'Y','\u0176':'Y','\u1EF8':'Y','\u0232':'Y','\u1E8E':'Y','\u0178':'Y','\u1EF6':'Y','\u1EF4':'Y','\u01B3':'Y','\u024E':'Y','\u1EFE':'Y','\u005A':'Z','\u24CF':'Z','\uFF3A':'Z','\u0179':'Z','\u1E90':'Z','\u017B':'Z','\u017D':'Z','\u1E92':'Z','\u1E94':'Z','\u01B5':'Z','\u0224':'Z','\u2C7F':'Z','\u2C6B':'Z','\uA762':'Z','\u0061':'a','\u24D0':'a','\uFF41':'a','\u1E9A':'a','\u00E0':'a','\u00E1':'a','\u00E2':'a','\u1EA7':'a','\u1EA5':'a','\u1EAB':'a','\u1EA9':'a','\u00E3':'a','\u0101':'a','\u0103':'a','\u1EB1':'a','\u1EAF':'a','\u1EB5':'a','\u1EB3':'a','\u0227':'a','\u01E1':'a','\u00E4':'a','\u01DF':'a','\u1EA3':'a','\u00E5':'a','\u01FB':'a','\u01CE':'a','\u0201':'a','\u0203':'a','\u1EA1':'a','\u1EAD':'a','\u1EB7':'a','\u1E01':'a','\u0105':'a','\u2C65':'a','\u0250':'a','\uA733':'aa','\u00E6':'ae','\u01FD':'ae','\u01E3':'ae','\uA735':'ao','\uA737':'au','\uA739':'av','\uA73B':'av','\uA73D':'ay','\u0062':'b','\u24D1':'b','\uFF42':'b','\u1E03':'b','\u1E05':'b','\u1E07':'b','\u0180':'b','\u0183':'b','\u0253':'b','\u0063':'c','\u24D2':'c','\uFF43':'c','\u0107':'c','\u0109':'c','\u010B':'c','\u010D':'c','\u00E7':'c','\u1E09':'c','\u0188':'c','\u023C':'c','\uA73F':'c','\u2184':'c','\u0064':'d','\u24D3':'d','\uFF44':'d','\u1E0B':'d','\u010F':'d','\u1E0D':'d','\u1E11':'d','\u1E13':'d','\u1E0F':'d','\u0111':'d','\u018C':'d','\u0256':'d','\u0257':'d','\uA77A':'d','\u01F3':'dz','\u01C6':'dz','\u0065':'e','\u24D4':'e','\uFF45':'e','\u00E8':'e','\u00E9':'e','\u00EA':'e','\u1EC1':'e','\u1EBF':'e','\u1EC5':'e','\u1EC3':'e','\u1EBD':'e','\u0113':'e','\u1E15':'e','\u1E17':'e','\u0115':'e','\u0117':'e','\u00EB':'e','\u1EBB':'e','\u011B':'e','\u0205':'e','\u0207':'e','\u1EB9':'e','\u1EC7':'e','\u0229':'e','\u1E1D':'e','\u0119':'e','\u1E19':'e','\u1E1B':'e','\u0247':'e','\u025B':'e','\u01DD':'e','\u0066':'f','\u24D5':'f','\uFF46':'f','\u1E1F':'f','\u0192':'f','\uA77C':'f','\u0067':'g','\u24D6':'g','\uFF47':'g','\u01F5':'g','\u011D':'g','\u1E21':'g','\u011F':'g','\u0121':'g','\u01E7':'g','\u0123':'g','\u01E5':'g','\u0260':'g','\uA7A1':'g','\u1D79':'g','\uA77F':'g','\u0068':'h','\u24D7':'h','\uFF48':'h','\u0125':'h','\u1E23':'h','\u1E27':'h','\u021F':'h','\u1E25':'h','\u1E29':'h','\u1E2B':'h','\u1E96':'h','\u0127':'h','\u2C68':'h','\u2C76':'h','\u0265':'h','\u0195':'hv','\u0069':'i','\u24D8':'i','\uFF49':'i','\u00EC':'i','\u00ED':'i','\u00EE':'i','\u0129':'i','\u012B':'i','\u012D':'i','\u00EF':'i','\u1E2F':'i','\u1EC9':'i','\u01D0':'i','\u0209':'i','\u020B':'i','\u1ECB':'i','\u012F':'i','\u1E2D':'i','\u0268':'i','\u0131':'i','\u006A':'j','\u24D9':'j','\uFF4A':'j','\u0135':'j','\u01F0':'j','\u0249':'j','\u006B':'k','\u24DA':'k','\uFF4B':'k','\u1E31':'k','\u01E9':'k','\u1E33':'k','\u0137':'k','\u1E35':'k','\u0199':'k','\u2C6A':'k','\uA741':'k','\uA743':'k','\uA745':'k','\uA7A3':'k','\u006C':'l','\u24DB':'l','\uFF4C':'l','\u0140':'l','\u013A':'l','\u013E':'l','\u1E37':'l','\u1E39':'l','\u013C':'l','\u1E3D':'l','\u1E3B':'l','\u017F':'l','\u0142':'l','\u019A':'l','\u026B':'l','\u2C61':'l','\uA749':'l','\uA781':'l','\uA747':'l','\u01C9':'lj','\u006D':'m','\u24DC':'m','\uFF4D':'m','\u1E3F':'m','\u1E41':'m','\u1E43':'m','\u0271':'m','\u026F':'m','\u006E':'n','\u24DD':'n','\uFF4E':'n','\u01F9':'n','\u0144':'n','\u00F1':'n','\u1E45':'n','\u0148':'n','\u1E47':'n','\u0146':'n','\u1E4B':'n','\u1E49':'n','\u019E':'n','\u0272':'n','\u0149':'n','\uA791':'n','\uA7A5':'n','\u01CC':'nj','\u006F':'o','\u24DE':'o','\uFF4F':'o','\u00F2':'o','\u00F3':'o','\u00F4':'o','\u1ED3':'o','\u1ED1':'o','\u1ED7':'o','\u1ED5':'o','\u00F5':'o','\u1E4D':'o','\u022D':'o','\u1E4F':'o','\u014D':'o','\u1E51':'o','\u1E53':'o','\u014F':'o','\u022F':'o','\u0231':'o','\u00F6':'o','\u022B':'o','\u1ECF':'o','\u0151':'o','\u01D2':'o','\u020D':'o','\u020F':'o','\u01A1':'o','\u1EDD':'o','\u1EDB':'o','\u1EE1':'o','\u1EDF':'o','\u1EE3':'o','\u1ECD':'o','\u1ED9':'o','\u01EB':'o','\u01ED':'o','\u00F8':'o','\u01FF':'o','\u0254':'o','\uA74B':'o','\uA74D':'o','\u0275':'o','\u01A3':'oi','\u0223':'ou','\uA74F':'oo','\u0070':'p','\u24DF':'p','\uFF50':'p','\u1E55':'p','\u1E57':'p','\u01A5':'p','\u1D7D':'p','\uA751':'p','\uA753':'p','\uA755':'p','\u0071':'q','\u24E0':'q','\uFF51':'q','\u024B':'q','\uA757':'q','\uA759':'q','\u0072':'r','\u24E1':'r','\uFF52':'r','\u0155':'r','\u1E59':'r','\u0159':'r','\u0211':'r','\u0213':'r','\u1E5B':'r','\u1E5D':'r','\u0157':'r','\u1E5F':'r','\u024D':'r','\u027D':'r','\uA75B':'r','\uA7A7':'r','\uA783':'r','\u0073':'s','\u24E2':'s','\uFF53':'s','\u00DF':'s','\u015B':'s','\u1E65':'s','\u015D':'s','\u1E61':'s','\u0161':'s','\u1E67':'s','\u1E63':'s','\u1E69':'s','\u0219':'s','\u015F':'s','\u023F':'s','\uA7A9':'s','\uA785':'s','\u1E9B':'s','\u0074':'t','\u24E3':'t','\uFF54':'t','\u1E6B':'t','\u1E97':'t','\u0165':'t','\u1E6D':'t','\u021B':'t','\u0163':'t','\u1E71':'t','\u1E6F':'t','\u0167':'t','\u01AD':'t','\u0288':'t','\u2C66':'t','\uA787':'t','\uA729':'tz','\u0075':'u','\u24E4':'u','\uFF55':'u','\u00F9':'u','\u00FA':'u','\u00FB':'u','\u0169':'u','\u1E79':'u','\u016B':'u','\u1E7B':'u','\u016D':'u','\u00FC':'u','\u01DC':'u','\u01D8':'u','\u01D6':'u','\u01DA':'u','\u1EE7':'u','\u016F':'u','\u0171':'u','\u01D4':'u','\u0215':'u','\u0217':'u','\u01B0':'u','\u1EEB':'u','\u1EE9':'u','\u1EEF':'u','\u1EED':'u','\u1EF1':'u','\u1EE5':'u','\u1E73':'u','\u0173':'u','\u1E77':'u','\u1E75':'u','\u0289':'u','\u0076':'v','\u24E5':'v','\uFF56':'v','\u1E7D':'v','\u1E7F':'v','\u028B':'v','\uA75F':'v','\u028C':'v','\uA761':'vy','\u0077':'w','\u24E6':'w','\uFF57':'w','\u1E81':'w','\u1E83':'w','\u0175':'w','\u1E87':'w','\u1E85':'w','\u1E98':'w','\u1E89':'w','\u2C73':'w','\u0078':'x','\u24E7':'x','\uFF58':'x','\u1E8B':'x','\u1E8D':'x','\u0079':'y','\u24E8':'y','\uFF59':'y','\u1EF3':'y','\u00FD':'y','\u0177':'y','\u1EF9':'y','\u0233':'y','\u1E8F':'y','\u00FF':'y','\u1EF7':'y','\u1E99':'y','\u1EF5':'y','\u01B4':'y','\u024F':'y','\u1EFF':'y','\u007A':'z','\u24E9':'z','\uFF5A':'z','\u017A':'z','\u1E91':'z','\u017C':'z','\u017E':'z','\u1E93':'z','\u1E95':'z','\u01B6':'z','\u0225':'z','\u0240':'z','\u2C6C':'z','\uA763':'z',};var utils={assert:function(bool){if(!bool){throw new Error("AssertionError");}},binaryToBinsize:function(value){if(!this.is_bin_size(value)){return this.human_size(value.length/1.37);}
return value;},confine:function(val,min,max){return Math.max(min,Math.min(max,val));},float_is_zero:function(value,decimals){var epsilon=Math.pow(10,-decimals);return Math.abs(utils.round_precision(value,epsilon))<epsilon;},generateID:function(){return++id;},get_cookie:function(c_name){var cookies=document.cookie?document.cookie.split('; '):[];for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split('=');var name=parts.shift();var cookie=parts.join('=');if(c_name&&c_name===name){return cookie;}}
return"";},human_number:function(number,decimals,minDigits,formatterCallback){number=Math.round(number);decimals=decimals|0;minDigits=minDigits||1;formatterCallback=formatterCallback||utils.insert_thousand_seps;var d2=Math.pow(10,decimals);var val=_t('kMGTPE');var symbol='';var numberMagnitude=number.toExponential().split('e')[1];if(numberMagnitude>=21){number=Math.round(number*Math.pow(10,decimals-numberMagnitude))/d2;return number+'e'+numberMagnitude;}
for(var i=val.length;i>0;i--){var s=Math.pow(10,i*3);if(s<=number/Math.pow(10,minDigits-1)){number=Math.round(number*d2/s)/d2;symbol=val[i-1];break;}}
return formatterCallback(''+number)+symbol;},human_size:function(size){var units=_t("Bytes,Kb,Mb,Gb,Tb,Pb,Eb,Zb,Yb").split(',');var i=0;while(size>=1024){size/=1024;++i;}
return size.toFixed(2)+' '+units[i].trim();},insert_thousand_seps:function(num){var negative=num[0]==='-';num=(negative?num.slice(1):num);return(negative?'-':'')+utils.intersperse(num,_t.database.parameters.grouping,_t.database.parameters.thousands_sep);},intersperse:function(str,indices,separator){separator=separator||'';var result=[],last=str.length;for(var i=0;i<indices.length;++i){var section=indices[i];if(section===-1||last<=0){break;}else if(section===0&&i===0){break;}else if(section===0){section=indices[--i];}
result.push(str.substring(last-section,last));last-=section;}
var s=str.substring(0,last);if(s){result.push(s);}
return result.reverse().join(separator);},into:function(object,path){if(!_(path).isArray()){path=path.split('.');}
for(var i=0;i<path.length;i++){object=object[path[i]];}
return object;},is_bin_size:function(v){return(/^\d+(\.\d*)? [^0-9]+$/).test(v);},json_node_to_xml:function(node,human_readable,indent){indent=indent||0;var sindent=(human_readable?(new Array(indent+1).join('\t')):''),r=sindent+'<'+node.tag,cr=human_readable?'\n':'';if(typeof(node)==='string'){return sindent+node.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;');}else if(typeof(node.tag)!=='string'||!node.children instanceof Array||!node.attrs instanceof Object){throw new Error(_.str.sprintf(_t("Node [%s] is not a JSONified XML node"),JSON.stringify(node)));}
for(var attr in node.attrs){var vattr=node.attrs[attr];if(typeof(vattr)!=='string'){vattr=JSON.stringify(vattr);}
vattr=vattr.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;');if(human_readable){vattr=vattr.replace(/&quot;/g,"'");}
r+=' '+attr+'="'+vattr+'"';}
if(node.children&&node.children.length){r+='>'+cr;var childs=[];for(var i=0,ii=node.children.length;i<ii;i++){childs.push(utils.json_node_to_xml(node.children[i],human_readable,indent+1));}
r+=childs.join(cr);r+=cr+sindent+'</'+node.tag+'>';return r;}else{return r+'/>';}},lpad:function(str,size){str=""+str;return new Array(size-str.length+1).join('0')+str;},round_decimals:function(value,decimals){return utils.round_precision(value,Math.pow(10,-decimals));},round_precision:function(value,precision){if(!value){return 0;}else if(!precision||precision<0){precision=1;}
var normalized_value=value/precision;var epsilon_magnitude=Math.log(Math.abs(normalized_value))/Math.log(2);var epsilon=Math.pow(2,epsilon_magnitude-53);normalized_value+=normalized_value>=0?epsilon:-epsilon;var sign=normalized_value<0?-1.0:1.0;var rounded_value=sign*Math.round(Math.abs(normalized_value));return rounded_value*precision;},rpad:function(str,size){str=""+str;return str+new Array(size-str.length+1).join('0');},set_cookie:function(name,value,ttl){ttl=ttl||24*60*60*365;document.cookie=[name+'='+value,'path=/','max-age='+ttl,'expires='+new Date(new Date().getTime()+ttl*1000).toGMTString()].join(';');},stableSort:function(array,iteratee){var stable=array.slice();return array.sort(function stableCompare(a,b){var order=iteratee(a,b);if(order!==0){return order;}else{return stable.indexOf(a)-stable.indexOf(b);}});},swap:function(array,elem1,elem2){var i1=array.indexOf(elem1);var i2=array.indexOf(elem2);array[i2]=elem1;array[i1]=elem2;},is_email:function(value,allow_mailto){var re;if(allow_mailto){re=/^(mailto:)?(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;}else{re=/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;}
return re.test(value);},toBoolElse:function(str,elseValues,trueValues,falseValues){var ret=_.str.toBool(str,trueValues,falseValues);if(_.isUndefined(ret)){return elseValues;}
return ret;},traverse_records:function(data,f){if(data.type==='record'){f(data);}else if(data.data){for(var i=0;i<data.data.length;i++){utils.traverse_records(data.data[i],f);}}},unaccent:function(str,casesensetive){str=str.replace(/[^\u0000-\u007E]/g,function(accented){return diacriticsMap[accented]||accented;});return casesensetive?str:str.toLowerCase();},xml_to_json:function(node,strip_whitespace){switch(node.nodeType){case 9:return utils.xml_to_json(node.documentElement,strip_whitespace);case 3:case 4:return(strip_whitespace&&node.data.trim()==='')?undefined:node.data;case 1:var attrs=$(node).getAttributes();return{tag:node.tagName.toLowerCase(),attrs:attrs,children:_.compact(_.map(node.childNodes,function(node){return utils.xml_to_json(node,strip_whitespace);})),};}},xml_to_str:function(node){var str="";if(window.XMLSerializer){str=(new XMLSerializer()).serializeToString(node);}else if(window.ActiveXObject){str=node.xml;}else{throw new Error(_t("Could not serialize XML"));}
var void_elements='area base br col command embed hr img input keygen link meta param source track wbr'.split(' ');str=str.replace(/<([a-z]+)([^<>]*)\s*\/\s*>/g,function(match,tag,attrs){if(void_elements.indexOf(tag)<0){return"<"+tag+attrs+"></"+tag+">";}else{return match;}});return str;},traverse:function(tree,f){if(f(tree)){_.each(tree.children,function(c){utils.traverse(c,f);});}},traversePath:function(tree,f,path){path=path||[];f(tree,path);_.each(tree.children,function(node){utils.traversePath(node,f,path.concat(tree));});},deepFreeze:function(obj){var propNames=Object.getOwnPropertyNames(obj);propNames.forEach(function(name){var prop=obj[name];if(typeof prop=='object'&&prop!==null)
utils.deepFreeze(prop);});return Object.freeze(obj);},closestNumber:function(num,arr){var curr=arr[0];var diff=Math.abs(num-curr);for(var val=0;val<arr.length;val++){var newdiff=Math.abs(num-arr[val]);if(newdiff<diff){diff=newdiff;curr=arr[val];}}
return curr;},};return utils;});;

/* /web/static/src/js/core/qweb.js defined in bundle 'web.assets_common' */
odoo.define('web.QWeb',function(require){"use strict";var translation=require('web.translation');var _t=translation._t;function QWeb(debug,default_dict,enableTranslation){if(enableTranslation===undefined){enableTranslation=true;}
var qweb=new QWeb2.Engine();qweb.default_dict=_.extend({},default_dict||{},{'_':_,'JSON':JSON,'_t':translation._t,'__debug__':debug,'moment':function(date){return new moment(date);},'csrf_token':odoo.csrf_token,});qweb.debug=debug;qweb.preprocess_node=enableTranslation?preprocess_node:function(){};return qweb;}
function preprocess_node(){switch(this.node.nodeType){case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:var translation=this.node.parentNode.attributes['t-translation'];if(translation&&translation.value==='off'){return;}
var match=/^(\s*)([\s\S]+?)(\s*)$/.exec(this.node.data);if(match){this.node.data=match[1]+_t(match[2])+match[3];}
break;case Node.ELEMENT_NODE:var attr,attrs=['label','title','alt','placeholder'];while((attr=attrs.pop())){if(this.attributes[attr]){this.attributes[attr]=_t(this.attributes[attr]);}}}}
return QWeb;});;

/* /web/static/src/js/core/bus.js defined in bundle 'web.assets_common' */
odoo.define('web.Bus',function(require){"use strict";var Class=require('web.Class');var mixins=require('web.mixins');return Class.extend(mixins.EventDispatcherMixin,{init:function(parent){mixins.EventDispatcherMixin.init.call(this);this.setParent(parent);},});});;

/* /web/static/src/js/services/core.js defined in bundle 'web.assets_common' */
odoo.define('web.core',function(require){"use strict";var Bus=require('web.Bus');var Class=require('web.Class');var config=require('web.config');var QWeb=require('web.QWeb');var Registry=require('web.Registry');var translation=require('web.translation');var bus=new Bus();_.each('click,dblclick,keydown,keypress,keyup'.split(','),function(evtype){$('html').on(evtype,function(ev){bus.trigger(evtype,ev);});});_.each('resize,scroll'.split(','),function(evtype){$(window).on(evtype,function(ev){bus.trigger(evtype,ev);});});return{qweb:new QWeb(config.debug),Class:Class,bus:bus,main_bus:new Bus(),_t:translation._t,_lt:translation._lt,action_registry:new Registry(),crash_registry:new Registry(),serviceRegistry:new Registry(),csrf_token:odoo.csrf_token,};});;

/* /web/static/src/js/core/dialog.js defined in bundle 'web.assets_common' */
odoo.define('web.Dialog',function(require){"use strict";var core=require('web.core');var dom=require('web.dom');var Widget=require('web.Widget');var QWeb=core.qweb;var _t=core._t;var Dialog=Widget.extend({tagName:'main',xmlDependencies:['/web/static/src/xml/dialog.xml'],custom_events:_.extend({},Widget.prototype.custom_events,{focus_control_button:'_onFocusControlButton',}),events:_.extend({},Widget.prototype.events,{'keydown .modal-footer button':'_onFooterButtonKeyDown',}),init:function(parent,options){var self=this;this._super(parent);this._opened=new Promise(function(resolve){self._openedResolver=resolve;});options=_.defaults(options||{},{title:_t('Odoo'),subtitle:'',size:'large',fullscreen:false,dialogClass:'',$content:false,buttons:[{text:_t("Ok"),close:true}],technical:true,});this.$content=options.$content;this.title=options.title;this.subtitle=options.subtitle;this.fullscreen=options.fullscreen;this.dialogClass=options.dialogClass;this.size=options.size;this.buttons=options.buttons;this.technical=options.technical;},willStart:function(){var self=this;return this._super.apply(this,arguments).then(function(){self.$modal=$(QWeb.render('Dialog',{fullscreen:self.fullscreen,title:self.title,subtitle:self.subtitle,technical:self.technical,}));switch(self.size){case'large':self.$modal.find('.modal-dialog').addClass('modal-lg');break;case'small':self.$modal.find('.modal-dialog').addClass('modal-sm');break;}
self.$footer=self.$modal.find(".modal-footer");self.set_buttons(self.buttons);self.$modal.on('hidden.bs.modal',_.bind(self.destroy,self));});},renderElement:function(){this._super();if(this.$content){this.setElement(this.$content);}
this.$el.addClass('modal-body '+this.dialogClass);},set_buttons:function(buttons){var self=this;this.$footer.empty();_.each(buttons,function(buttonData){var $button=dom.renderButton({attrs:{class:buttonData.classes||(buttons.length>1?'btn-secondary':'btn-primary'),disabled:buttonData.disabled,},icon:buttonData.icon,text:buttonData.text,});$button.on('click',function(e){var def;if(buttonData.click){def=buttonData.click.call(self,e);}
if(buttonData.close){Promise.resolve(def).then(self.close.bind(self)).guardedCatch(self.close.bind(self));}});if(self.technical){self.$footer.append($button);}else{self.$footer.prepend($button);}});},set_title:function(title,subtitle){this.title=title||"";if(subtitle!==undefined){this.subtitle=subtitle||"";}
var $title=this.$modal.find('.modal-title').first();var $subtitle=$title.find('.o_subtitle').detach();$title.html(this.title);$subtitle.html(this.subtitle).appendTo($title);return this;},opened:function(handler){return(handler)?this._opened.then(handler):this._opened;},open:function(options){$('.tooltip').remove();var self=this;this.appendTo($('<div/>')).then(function(){self.$modal.find(".modal-body").replaceWith(self.$el);self.$modal.attr('open',true);self.$modal.removeAttr("aria-hidden");self.$modal.modal('show');self._openedResolver();if(options&&options.shouldFocusButtons){self._onFocusControlButton();}});return self;},close:function(){this.destroy();},destroy:function(options){if(!this.__closed){this.__closed=true;this.trigger('closed',options);}
if(this.isDestroyed()){return;}
var isFocusSet=this._focusOnClose();this._super();$('.tooltip').remove();if(this.$modal){this.$modal.modal('hide');this.$modal.remove();}
var modals=$('body > .modal').filter(':visible');if(modals.length){if(!isFocusSet){modals.last().focus();}
$('body').addClass('modal-open');}},rebindButtonBehavior:function(){this.$footer.on('keydown',this._onFooterButtonKeyDown);},_focusOnClose:function(){return false;},_onFocusControlButton:function(e){if(this.$footer){if(e){e.stopPropagation();}
this.$footer.find('.btn-primary:visible:first()').focus();}},_onFooterButtonKeyDown:function(e){switch(e.which){case $.ui.keyCode.TAB:if(!e.shiftKey&&e.target.classList.contains("btn-primary")){e.preventDefault();var $primaryButton=$(e.target);$primaryButton.tooltip({delay:{show:200,hide:0},title:function(){return QWeb.render('FormButton.tooltip',{title:$primaryButton.text().toUpperCase()});},trigger:'manual',});$primaryButton.tooltip('show');}
break;}}});Dialog.alert=function(owner,message,options){var buttons=[{text:_t("Ok"),close:true,click:options&&options.confirm_callback,}];return new Dialog(owner,_.extend({size:'medium',buttons:buttons,$content:$('<main/>',{role:'alert',text:message,}),title:_t("Alert"),},options)).open({shouldFocusButtons:true});};Dialog.confirm=function(owner,message,options){var buttons=[{text:_t("Ok"),classes:'btn-primary',close:true,click:options&&options.confirm_callback,},{text:_t("Cancel"),close:true,click:options&&options.cancel_callback}];return new Dialog(owner,_.extend({size:'medium',buttons:buttons,$content:$('<main/>',{role:'alert',text:message,}),title:_t("Confirmation"),},options)).open({shouldFocusButtons:true});};Dialog.safeConfirm=function(owner,message,options){var $checkbox=dom.renderCheckbox({text:options&&options.securityMessage||_t("I am sure about this."),}).addClass('mb0');var $securityCheck=$('<div/>',{class:'alert alert-'+(options&&options.securityLevel||'warning')+' mt8 mb0',}).prepend($checkbox);var $content;if(options&&options.$content){$content=options.$content;delete options.$content;}else{$content=$('<div>',{text:message,});}
$content=$('<main/>',{role:'alert'}).append($content,$securityCheck);var buttons=[{text:_t("Ok"),classes:'btn-primary o_safe_confirm_button',close:true,click:options&&options.confirm_callback,disabled:true,},{text:_t("Cancel"),close:true,click:options&&options.cancel_callback}];var dialog=new Dialog(owner,_.extend({size:'medium',buttons:buttons,$content:$content,title:_t("Confirmation"),},options));dialog.opened(function(){var $button=dialog.$footer.find('.o_safe_confirm_button');$securityCheck.on('click','input[type="checkbox"]',function(ev){$button.prop('disabled',!$(ev.currentTarget).prop('checked'));});});return dialog.open();};return Dialog;});;

/* /web/static/src/js/core/local_storage.js defined in bundle 'web.assets_common' */
odoo.define('web.local_storage',function(require){'use strict';var RamStorage=require('web.RamStorage');var mixins=require('web.mixins');var storage;var localStorage=window.localStorage;try{var uid=new Date();localStorage.setItem(uid,uid);localStorage.removeItem(uid);storage=(function(){var storage=Object.create(_.extend({getItem:localStorage.getItem.bind(localStorage),setItem:localStorage.setItem.bind(localStorage),removeItem:localStorage.removeItem.bind(localStorage),clear:localStorage.clear.bind(localStorage),},mixins.EventDispatcherMixin));storage.init();$(window).on('storage',function(e){var key=e.originalEvent.key;var newValue=e.originalEvent.newValue;try{JSON.parse(newValue);if(localStorage.getItem(key)===newValue){storage.trigger('storage',{key:key,newValue:newValue,});}}catch(error){}});return storage;})();}catch(exception){console.warn('Fail to load localStorage');storage=new RamStorage();}
return storage;});;

/* /web/static/src/js/services/local_storage_service.js defined in bundle 'web.assets_common' */
odoo.define('web.LocalStorageService',function(require){'use strict';var AbstractStorageService=require('web.AbstractStorageService');var core=require('web.core');var localStorage=require('web.local_storage');var LocalStorageService=AbstractStorageService.extend({storage:localStorage,});core.serviceRegistry.add('local_storage',LocalStorageService);return LocalStorageService;});;

/* /web/static/src/js/core/session_storage.js defined in bundle 'web.assets_common' */
odoo.define('web.sessionStorage',function(require){'use strict';var RamStorage=require('web.RamStorage');var mixins=require('web.mixins');var storage;var sessionStorage=window.sessionStorage;try{var uid=new Date();sessionStorage.setItem(uid,uid);sessionStorage.removeItem(uid);storage=(function(){var storage=Object.create(_.extend({getItem:sessionStorage.getItem.bind(sessionStorage),setItem:sessionStorage.setItem.bind(sessionStorage),removeItem:sessionStorage.removeItem.bind(sessionStorage),clear:sessionStorage.clear.bind(sessionStorage),},mixins.EventDispatcherMixin));storage.init();$(window).on('storage',function(e){var key=e.originalEvent.key;var newValue=e.originalEvent.newValue;try{JSON.parse(newValue);if(sessionStorage.getItem(key)===newValue){storage.trigger('storage',{key:key,newValue:newValue,});}}catch(error){}});return storage;})();}catch(exception){console.warn('Fail to load sessionStorage');storage=new RamStorage();}
return storage;});;

/* /web/static/src/js/services/session_storage_service.js defined in bundle 'web.assets_common' */
odoo.define('web.SessionStorageService',function(require){'use strict';var AbstractStorageService=require('web.AbstractStorageService');var core=require('web.core');var sessionStorage=require('web.sessionStorage');var SessionStorageService=AbstractStorageService.extend({storage:sessionStorage,});core.serviceRegistry.add('session_storage',SessionStorageService);return SessionStorageService;});;

/* /web/static/src/js/core/ram_storage.js defined in bundle 'web.assets_common' */
odoo.define('web.RamStorage',function(require){'use strict';var Class=require('web.Class');var mixins=require('web.mixins');var RamStorage=Class.extend(mixins.EventDispatcherMixin,{init:function(){mixins.EventDispatcherMixin.init.call(this);if(!this.storage){this.clear();}},clear:function(){this.storage=Object.create(null);},getItem:function(key){return this.storage[key];},removeItem:function(key){delete this.storage[key];this.trigger('storage',{key:key,newValue:null});},setItem:function(key,value){this.storage[key]=value;this.trigger('storage',{key:key,newValue:value});},});return RamStorage;});;

/* /web/static/src/js/widgets/rainbow_man.js defined in bundle 'web.assets_common' */
odoo.define('web.RainbowMan',function(require){"use strict";var Widget=require('web.Widget');var core=require('web.core');var _t=core._t;var RainbowMan=Widget.extend({template:'rainbow_man.notification',xmlDependencies:['/web/static/src/xml/rainbow_man.xml'],init:function(options){this._super.apply(this,arguments);var rainbowDelay={slow:4500,medium:3500,fast:2000,no:false};this.options=_.defaults(options||{},{fadeout:'medium',img_url:'/web/static/src/img/smile.svg',message:_t('Well Done!'),});this.delay=rainbowDelay[this.options.fadeout];},start:function(){var self=this;setTimeout(function(){core.bus.on('click',self,function(ev){if(ev.originalEvent&&ev.target.className.indexOf('o_reward')===-1){this.destroy();}});});if(this.delay){setTimeout(function(){self.$el.addClass('o_reward_fading');setTimeout(function(){self.destroy();},600);},this.delay);}
this.$('.o_reward_msg_content').append(this.options.message);return this._super.apply(this,arguments);}});return RainbowMan;});;

/* /web/static/lib/jSignature/jSignatureCustom.js defined in bundle 'web.assets_common' */
;(function(){var apinamespace='jSignature'
var KickTimerClass=function(time,callback){var timer;this.kick=function(){clearTimeout(timer);timer=setTimeout(callback,time);}
this.clear=function(){clearTimeout(timer);}
return this;}
var PubSubClass=function(context){'use strict'
this.topics={};this.context=context?context:this;this.publish=function(topic,arg1,arg2,etc){'use strict'
if(this.topics[topic]){var currentTopic=this.topics[topic],args=Array.prototype.slice.call(arguments,1),toremove=[],torun=[],fn,i,l,pair;for(i=0,l=currentTopic.length;i<l;i++){pair=currentTopic[i];fn=pair[0];if(pair[1]){pair[0]=function(){};toremove.push(i);}
torun.push(fn);}
for(i=0,l=toremove.length;i<l;i++){currentTopic.splice(toremove[i],1);}
for(i=0,l=torun.length;i<l;i++){torun[i].apply(this.context,args);}}}
this.subscribe=function(topic,callback,once){'use strict'
if(!this.topics[topic]){this.topics[topic]=[[callback,once]];}else{this.topics[topic].push([callback,once]);}
return{"topic":topic,"callback":callback};};this.unsubscribe=function(token){if(this.topics[token.topic]){var currentTopic=this.topics[token.topic];for(var i=0,l=currentTopic.length;i<l;i++){if(currentTopic[i]&&currentTopic[i][0]===token.callback){currentTopic.splice(i,1);}}}}}
function getColors($e){var tmp,undef,frontcolor=$e.css('color'),backcolor,e=$e[0];var toOfDOM=false;while(e&&!backcolor&&!toOfDOM){try{tmp=$(e).css('background-color');}catch(ex){tmp='transparent';}
if(tmp!=='transparent'&&tmp!=='rgba(0, 0, 0, 0)'){backcolor=tmp;}
toOfDOM=e.body;e=e.parentNode;}
var rgbaregex=/rgb[a]*\((\d+),\s*(\d+),\s*(\d+)/,hexregex=/#([AaBbCcDdEeFf\d]{2})([AaBbCcDdEeFf\d]{2})([AaBbCcDdEeFf\d]{2})/,frontcolorcomponents;tmp=undef;tmp=frontcolor.match(rgbaregex);if(tmp){frontcolorcomponents={'r':parseInt(tmp[1],10),'g':parseInt(tmp[2],10),'b':parseInt(tmp[3],10)};}else{tmp=frontcolor.match(hexregex);if(tmp){frontcolorcomponents={'r':parseInt(tmp[1],16),'g':parseInt(tmp[2],16),'b':parseInt(tmp[3],16)};}}
var backcolorcomponents
if(!backcolor){if(frontcolorcomponents){if(Math.max.apply(null,[frontcolorcomponents.r,frontcolorcomponents.g,frontcolorcomponents.b])>127){backcolorcomponents={'r':0,'g':0,'b':0};}else{backcolorcomponents={'r':255,'g':255,'b':255};}}else{backcolorcomponents={'r':255,'g':255,'b':255};}}else{tmp=undef;tmp=backcolor.match(rgbaregex);if(tmp){backcolorcomponents={'r':parseInt(tmp[1],10),'g':parseInt(tmp[2],10),'b':parseInt(tmp[3],10)};}else{tmp=backcolor.match(hexregex);if(tmp){backcolorcomponents={'r':parseInt(tmp[1],16),'g':parseInt(tmp[2],16),'b':parseInt(tmp[3],16)};}}}
var toRGBfn=function(o){return'rgb('+[o.r,o.g,o.b].join(', ')+')'},decorcolorcomponents,frontcolorbrightness,adjusted;if(frontcolorcomponents&&backcolorcomponents){var backcolorbrightness=Math.max.apply(null,[frontcolorcomponents.r,frontcolorcomponents.g,frontcolorcomponents.b]);frontcolorbrightness=Math.max.apply(null,[backcolorcomponents.r,backcolorcomponents.g,backcolorcomponents.b]);adjusted=Math.round(frontcolorbrightness+(-1*(frontcolorbrightness-backcolorbrightness)*0.75));decorcolorcomponents={'r':adjusted,'g':adjusted,'b':adjusted};}else if(frontcolorcomponents){frontcolorbrightness=Math.max.apply(null,[frontcolorcomponents.r,frontcolorcomponents.g,frontcolorcomponents.b]);var polarity=+1;if(frontcolorbrightness>127){polarity=-1;}
adjusted=Math.round(frontcolorbrightness+(polarity*96));decorcolorcomponents={'r':adjusted,'g':adjusted,'b':adjusted};}else{decorcolorcomponents={'r':191,'g':191,'b':191};}
return{'color':frontcolor,'background-color':backcolorcomponents?toRGBfn(backcolorcomponents):backcolor,'decor-color':toRGBfn(decorcolorcomponents)};}
function Vector(x,y){this.x=x;this.y=y;this.reverse=function(){return new this.constructor(this.x*-1,this.y*-1);};this._length=null;this.getLength=function(){if(!this._length){this._length=Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2));}
return this._length;};var polarity=function(e){return Math.round(e/Math.abs(e));};this.resizeTo=function(length){if(this.x===0&&this.y===0){this._length=0;}else if(this.x===0){this._length=length;this.y=length*polarity(this.y);}else if(this.y===0){this._length=length;this.x=length*polarity(this.x);}else{var proportion=Math.abs(this.y/this.x),x=Math.sqrt(Math.pow(length,2)/(1+Math.pow(proportion,2))),y=proportion*x;this._length=length;this.x=x*polarity(this.x);this.y=y*polarity(this.y);}
return this;};this.angleTo=function(vectorB){var divisor=this.getLength()*vectorB.getLength();if(divisor===0){return 0;}else{return Math.acos(Math.min(Math.max((this.x*vectorB.x+this.y*vectorB.y)/divisor,-1.0),1.0))/Math.PI;}};}
function Point(x,y){this.x=x;this.y=y;this.getVectorToCoordinates=function(x,y){return new Vector(x-this.x,y-this.y);};this.getVectorFromCoordinates=function(x,y){return this.getVectorToCoordinates(x,y).reverse();};this.getVectorToPoint=function(point){return new Vector(point.x-this.x,point.y-this.y);};this.getVectorFromPoint=function(point){return this.getVectorToPoint(point).reverse();};}
function DataEngine(storageObject,context,startStrokeFn,addToStrokeFn,endStrokeFn){this.data=storageObject;this.context=context;if(storageObject.length){var numofstrokes=storageObject.length,stroke,numofpoints;for(var i=0;i<numofstrokes;i++){stroke=storageObject[i];numofpoints=stroke.x.length;startStrokeFn.call(context,stroke);for(var j=1;j<numofpoints;j++){addToStrokeFn.call(context,stroke,j);}
endStrokeFn.call(context,stroke);}}
this.changed=function(){};this.startStrokeFn=startStrokeFn;this.addToStrokeFn=addToStrokeFn;this.endStrokeFn=endStrokeFn;this.inStroke=false;this._lastPoint=null;this._stroke=null;this.startStroke=function(point){if(point&&typeof(point.x)=="number"&&typeof(point.y)=="number"){this._stroke={'x':[point.x],'y':[point.y]};this.data.push(this._stroke);this._lastPoint=point;this.inStroke=true;var stroke=this._stroke,fn=this.startStrokeFn,context=this.context;setTimeout(function(){fn.call(context,stroke)},3);return point;}else{return null;}};this.addToStroke=function(point){if(this.inStroke&&typeof(point.x)==="number"&&typeof(point.y)==="number"&&(Math.abs(point.x-this._lastPoint.x)+Math.abs(point.y-this._lastPoint.y))>4){var positionInStroke=this._stroke.x.length;this._stroke.x.push(point.x);this._stroke.y.push(point.y);this._lastPoint=point;var stroke=this._stroke,fn=this.addToStrokeFn,context=this.context;setTimeout(function(){fn.call(context,stroke,positionInStroke)},3);return point;}else{return null;}};this.endStroke=function(){var c=this.inStroke;this.inStroke=false;this._lastPoint=null;if(c){var stroke=this._stroke,fn=this.endStrokeFn,context=this.context,changedfn=this.changed;setTimeout(function(){fn.call(context,stroke);changedfn.call(context);},3);return true;}else{return null;}};}
var basicDot=function(ctx,x,y,size){var fillStyle=ctx.fillStyle;ctx.fillStyle=ctx.strokeStyle;ctx.fillRect(x+size/-2,y+size/-2,size,size);ctx.fillStyle=fillStyle;},basicLine=function(ctx,startx,starty,endx,endy){ctx.beginPath();ctx.moveTo(startx,starty);ctx.lineTo(endx,endy);ctx.closePath();ctx.stroke();},basicCurve=function(ctx,startx,starty,endx,endy,cp1x,cp1y,cp2x,cp2y){ctx.beginPath();ctx.moveTo(startx,starty);ctx.bezierCurveTo(cp1x,cp1y,cp2x,cp2y,endx,endy);ctx.closePath();ctx.stroke();},strokeStartCallback=function(stroke){basicDot(this.canvasContext,stroke.x[0],stroke.y[0],this.settings.lineWidth);},strokeAddCallback=function(stroke,positionInStroke){var Cpoint=new Point(stroke.x[positionInStroke-1],stroke.y[positionInStroke-1]),Dpoint=new Point(stroke.x[positionInStroke],stroke.y[positionInStroke]),CDvector=Cpoint.getVectorToPoint(Dpoint);if(positionInStroke>1){var Bpoint=new Point(stroke.x[positionInStroke-2],stroke.y[positionInStroke-2]),BCvector=Bpoint.getVectorToPoint(Cpoint),ABvector;if(BCvector.getLength()>this.lineCurveThreshold){if(positionInStroke>2){ABvector=(new Point(stroke.x[positionInStroke-3],stroke.y[positionInStroke-3])).getVectorToPoint(Bpoint);}else{ABvector=new Vector(0,0);}
var minlenfraction=0.05,maxlen=BCvector.getLength()*0.35,ABCangle=BCvector.angleTo(ABvector.reverse()),BCDangle=CDvector.angleTo(BCvector.reverse()),BCP1vector=new Vector(ABvector.x+BCvector.x,ABvector.y+BCvector.y).resizeTo(Math.max(minlenfraction,ABCangle)*maxlen),CCP2vector=(new Vector(BCvector.x+CDvector.x,BCvector.y+CDvector.y)).reverse().resizeTo(Math.max(minlenfraction,BCDangle)*maxlen);basicCurve(this.canvasContext,Bpoint.x,Bpoint.y,Cpoint.x,Cpoint.y,Bpoint.x+BCP1vector.x,Bpoint.y+BCP1vector.y,Cpoint.x+CCP2vector.x,Cpoint.y+CCP2vector.y);}}
if(CDvector.getLength()<=this.lineCurveThreshold){basicLine(this.canvasContext,Cpoint.x,Cpoint.y,Dpoint.x,Dpoint.y);}},strokeEndCallback=function(stroke){var positionInStroke=stroke.x.length-1;if(positionInStroke>0){var Cpoint=new Point(stroke.x[positionInStroke],stroke.y[positionInStroke]),Bpoint=new Point(stroke.x[positionInStroke-1],stroke.y[positionInStroke-1]),BCvector=Bpoint.getVectorToPoint(Cpoint),ABvector;if(BCvector.getLength()>this.lineCurveThreshold){if(positionInStroke>1){ABvector=(new Point(stroke.x[positionInStroke-2],stroke.y[positionInStroke-2])).getVectorToPoint(Bpoint);var BCP1vector=new Vector(ABvector.x+BCvector.x,ABvector.y+BCvector.y).resizeTo(BCvector.getLength()/2);basicCurve(this.canvasContext,Bpoint.x,Bpoint.y,Cpoint.x,Cpoint.y,Bpoint.x+BCP1vector.x,Bpoint.y+BCP1vector.y,Cpoint.x,Cpoint.y);}else{basicLine(this.canvasContext,Bpoint.x,Bpoint.y,Cpoint.x,Cpoint.y);}}}}
function conditionallyLinkCanvasResizeToWindowResize(jSignatureInstance,settingsWidth,apinamespace,globalEvents){'use strict'
if(settingsWidth==='ratio'||settingsWidth.split('')[settingsWidth.length-1]==='%'){this.eventTokens[apinamespace+'.parentresized']=globalEvents.subscribe(apinamespace+'.parentresized',(function(eventTokens,$parent,originalParentWidth,sizeRatio){'use strict'
return function(){'use strict'
var w=$parent.width();if(w!==originalParentWidth){for(var key in eventTokens){if(eventTokens.hasOwnProperty(key)){globalEvents.unsubscribe(eventTokens[key]);delete eventTokens[key];}}
var settings=jSignatureInstance.settings;jSignatureInstance.$parent.children().remove();for(var key in jSignatureInstance){if(jSignatureInstance.hasOwnProperty(key)){delete jSignatureInstance[key];}}
settings.data=(function(data,scale){var newData=[];var o,i,l,j,m,stroke;for(i=0,l=data.length;i<l;i++){stroke=data[i];o={'x':[],'y':[]};for(j=0,m=stroke.x.length;j<m;j++){o.x.push(stroke.x[j]*scale);o.y.push(stroke.y[j]*scale);}
newData.push(o);}
return newData;})(settings.data,w*1.0/originalParentWidth)
$parent[apinamespace](settings);}}})(this.eventTokens,this.$parent,this.$parent.width(),this.canvas.width*1.0/this.canvas.height))}};function jSignatureClass(parent,options,instanceExtensions){var $parent=this.$parent=$(parent),eventTokens=this.eventTokens={},events=this.events=new PubSubClass(this),globalEvents=$.fn[apinamespace]('globalEvents'),settings={'width':'ratio','height':'ratio','sizeRatio':4,'color':'#000','background-color':'#fff','decor-color':'#eee','lineWidth':0,'minFatFingerCompensation':-10,'showUndoButton':false,'readOnly':false,'data':[]};$.extend(settings,getColors($parent));if(options){$.extend(settings,options);}
this.settings=settings;for(var extensionName in instanceExtensions){if(instanceExtensions.hasOwnProperty(extensionName)){instanceExtensions[extensionName].call(this,extensionName);}}
this.events.publish(apinamespace+'.initializing');this.$controlbarUpper=(function(){var controlbarstyle='padding:0 !important; margin:0 !important;'+'width: 100% !important; height: 0 !important; -ms-touch-action: none;'+'margin-top:-1em !important; margin-bottom:1em !important;';return $('<div style="'+controlbarstyle+'"></div>').appendTo($parent);})();this.isCanvasEmulator=false;var canvas=this.canvas=this.initializeCanvas(settings),$canvas=$(canvas);this.$controlbarLower=(function(){var controlbarstyle='padding:0 !important; margin:0 !important;'+'width: 100% !important; height: 0 !important; -ms-touch-action: none;'+'margin-top:-1.5em !important; margin-bottom:1.5em !important; position: relative;';return $('<div style="'+controlbarstyle+'"></div>').appendTo($parent);})();this.canvasContext=canvas.getContext("2d");$canvas.data(apinamespace+'.this',this);settings.lineWidth=(function(defaultLineWidth,canvasWidth){if(!defaultLineWidth){return Math.max(Math.round(canvasWidth/400),2);}else{return defaultLineWidth;}})(settings.lineWidth,canvas.width);this.lineCurveThreshold=settings.lineWidth*3;if(settings.cssclass&&$.trim(settings.cssclass)!=""){$canvas.addClass(settings.cssclass);}
this.fatFingerCompensation=0;var movementHandlers=(function(jSignatureInstance){var shiftX,shiftY,setStartValues=function(){var tos=$(jSignatureInstance.canvas).offset()
shiftX=tos.left*-1
shiftY=tos.top*-1},getPointFromEvent=function(e){var firstEvent=(e.changedTouches&&e.changedTouches.length>0?e.changedTouches[0]:e);return new Point(Math.round(firstEvent.pageX+shiftX),Math.round(firstEvent.pageY+shiftY)+jSignatureInstance.fatFingerCompensation);},timer=new KickTimerClass(750,function(){jSignatureInstance.dataEngine.endStroke();});this.drawEndHandler=function(e){if(!jSignatureInstance.settings.readOnly){try{e.preventDefault();}catch(ex){}
timer.clear();jSignatureInstance.dataEngine.endStroke();}};this.drawStartHandler=function(e){if(!jSignatureInstance.settings.readOnly){e.preventDefault();setStartValues();jSignatureInstance.dataEngine.startStroke(getPointFromEvent(e));timer.kick();}};this.drawMoveHandler=function(e){if(!jSignatureInstance.settings.readOnly){e.preventDefault();if(!jSignatureInstance.dataEngine.inStroke){return;}
jSignatureInstance.dataEngine.addToStroke(getPointFromEvent(e));timer.kick();}};return this;}).call({},this);(function(drawEndHandler,drawStartHandler,drawMoveHandler){var canvas=this.canvas,$canvas=$(canvas),undef;if(this.isCanvasEmulator){$canvas.bind('mousemove.'+apinamespace,drawMoveHandler);$canvas.bind('mouseup.'+apinamespace,drawEndHandler);$canvas.bind('mousedown.'+apinamespace,drawStartHandler);}else{canvas.ontouchstart=function(e){canvas.onmousedown=canvas.onmouseup=canvas.onmousemove=undef;this.fatFingerCompensation=(settings.minFatFingerCompensation&&settings.lineWidth*-3>settings.minFatFingerCompensation)?settings.lineWidth*-3:settings.minFatFingerCompensation;drawStartHandler(e);canvas.ontouchend=drawEndHandler;canvas.ontouchstart=drawStartHandler;canvas.ontouchmove=drawMoveHandler;};canvas.onmousedown=function(e){canvas.ontouchstart=canvas.ontouchend=canvas.ontouchmove=undef;drawStartHandler(e);canvas.onmousedown=drawStartHandler;canvas.onmouseup=drawEndHandler;canvas.onmousemove=drawMoveHandler;}
if(window.navigator.msPointerEnabled){canvas.onmspointerdown=drawStartHandler;canvas.onmspointerup=drawEndHandler;canvas.onmspointermove=drawMoveHandler;}}}).call(this,movementHandlers.drawEndHandler,movementHandlers.drawStartHandler,movementHandlers.drawMoveHandler)
eventTokens[apinamespace+'.windowmouseup']=globalEvents.subscribe(apinamespace+'.windowmouseup',movementHandlers.drawEndHandler);this.events.publish(apinamespace+'.attachingEventHandlers');conditionallyLinkCanvasResizeToWindowResize.call(this,this,settings.width.toString(10),apinamespace,globalEvents);this.resetCanvas(settings.data);this.events.publish(apinamespace+'.initialized');return this;}
jSignatureClass.prototype.resetCanvas=function(data,dontClear){var canvas=this.canvas,settings=this.settings,ctx=this.canvasContext,isCanvasEmulator=this.isCanvasEmulator,cw=canvas.width,ch=canvas.height;if(!dontClear){ctx.clearRect(0,0,cw+30,ch+30);}
ctx.shadowColor=ctx.fillStyle=settings['background-color']
if(isCanvasEmulator){ctx.fillRect(0,0,cw+30,ch+30);}
ctx.lineWidth=Math.ceil(parseInt(settings.lineWidth,10));ctx.lineCap=ctx.lineJoin="round";if(null!=settings['decor-color']){ctx.strokeStyle=settings['decor-color'];ctx.shadowOffsetX=0;ctx.shadowOffsetY=0;var lineoffset=Math.round(ch/5);basicLine(ctx,lineoffset*1.5,ch-lineoffset,cw-(lineoffset*1.5),ch-lineoffset);}
ctx.strokeStyle=settings.color;if(!isCanvasEmulator){ctx.shadowColor=ctx.strokeStyle;ctx.shadowOffsetX=ctx.lineWidth*0.5;ctx.shadowOffsetY=ctx.lineWidth*-0.6;ctx.shadowBlur=0;}
if(!data){data=[];}
var dataEngine=this.dataEngine=new DataEngine(data,this,strokeStartCallback,strokeAddCallback,strokeEndCallback);settings.data=data;$(canvas).data(apinamespace+'.data',data).data(apinamespace+'.settings',settings);dataEngine.changed=(function(target,events,apinamespace){'use strict'
return function(){events.publish(apinamespace+'.change');target.trigger('change');}})(this.$parent,this.events,apinamespace);dataEngine.changed();return true;};function initializeCanvasEmulator(canvas){if(canvas.getContext){return false;}else{var window=canvas.ownerDocument.parentWindow;var FC=window.FlashCanvas?canvas.ownerDocument.parentWindow.FlashCanvas:(typeof FlashCanvas==="undefined"?undefined:FlashCanvas);if(FC){canvas=FC.initElement(canvas);var zoom=1;if(window&&window.screen&&window.screen.deviceXDPI&&window.screen.logicalXDPI){zoom=window.screen.deviceXDPI*1.0/window.screen.logicalXDPI;}
if(zoom!==1){try{$(canvas).children('object').get(0).resize(Math.ceil(canvas.width*zoom),Math.ceil(canvas.height*zoom));canvas.getContext('2d').scale(zoom,zoom);}catch(ex){}}
return true;}else{throw new Error("Canvas element does not support 2d context. jSignature cannot proceed.");}}}
jSignatureClass.prototype.initializeCanvas=function(settings){var canvas=document.createElement('canvas'),$canvas=$(canvas);if(settings.width===settings.height&&settings.height==='ratio'){settings.width='100%';}
$canvas.css('margin',0).css('padding',0).css('border','none').css('height',settings.height==='ratio'||!settings.height?1:settings.height.toString(10)).css('width',settings.width==='ratio'||!settings.width?1:settings.width.toString(10)).css('-ms-touch-action','none').css('background-color',settings['background-color']);$canvas.appendTo(this.$parent);if(settings.height==='ratio'){$canvas.css('height',Math.round($canvas.width()/settings.sizeRatio));}else if(settings.width==='ratio'){$canvas.css('width',Math.round($canvas.height()*settings.sizeRatio));}
$canvas.addClass(apinamespace);canvas.width=$canvas.width();canvas.height=$canvas.height();this.isCanvasEmulator=initializeCanvasEmulator(canvas);canvas.onselectstart=function(e){if(e&&e.preventDefault){e.preventDefault()};if(e&&e.stopPropagation){e.stopPropagation()};return false;};return canvas;}
var GlobalJSignatureObjectInitializer=function(window){var globalEvents=new PubSubClass();;(function(globalEvents,apinamespace,$,window){'use strict'
var resizetimer,runner=function(){globalEvents.publish(apinamespace+'.parentresized')};$(window).bind('resize.'+apinamespace,function(){if(resizetimer){clearTimeout(resizetimer);}
resizetimer=setTimeout(runner,500);}).bind('mouseup.'+apinamespace,function(e){globalEvents.publish(apinamespace+'.windowmouseup')});})(globalEvents,apinamespace,$,window)
var jSignatureInstanceExtensions={};var exportplugins={'default':function(data){return this.toDataURL()},'native':function(data){return data},'image':function(data){var imagestring=this.toDataURL();if(typeof imagestring==='string'&&imagestring.length>4&&imagestring.slice(0,5)==='data:'&&imagestring.indexOf(',')!==-1){var splitterpos=imagestring.indexOf(',');return[imagestring.slice(5,splitterpos),imagestring.substr(splitterpos+1)];}
return[];}};function _renderImageOnCanvas(data,formattype,rerendercallable){'use strict'
var img=new Image(),c=this;img.onload=function(){var ctx=c.getContext("2d");var oldShadowColor=ctx.shadowColor;ctx.shadowColor="transparent";ctx.drawImage(img,0,0,(img.width<c.width)?img.width:c.width,(img.height<c.height)?img.height:c.height);ctx.shadowColor=oldShadowColor;};img.src='data:'+formattype+','+data;}
var importplugins={'native':function(data,formattype,rerendercallable){rerendercallable(data);},'image':_renderImageOnCanvas,'image/png;base64':_renderImageOnCanvas,'image/jpeg;base64':_renderImageOnCanvas,'image/jpg;base64':_renderImageOnCanvas};function _clearDrawingArea(data,dontClear){this.find('canvas.'+apinamespace).add(this.filter('canvas.'+apinamespace)).data(apinamespace+'.this').resetCanvas(data,dontClear);return this;}
function _setDrawingData(data,formattype){var undef;if(formattype===undef&&typeof data==='string'&&data.substr(0,5)==='data:'){formattype=data.slice(5).split(',')[0];data=data.slice(6+formattype.length);if(formattype===data){return;}}
var $canvas=this.find('canvas.'+apinamespace).add(this.filter('canvas.'+apinamespace));if(!importplugins.hasOwnProperty(formattype)){throw new Error(apinamespace+" is unable to find import plugin with for format '"+String(formattype)+"'");}else if($canvas.length!==0){importplugins[formattype].call($canvas[0],data,formattype,(function(jSignatureInstance){return function(){return jSignatureInstance.resetCanvas.apply(jSignatureInstance,arguments)}})($canvas.data(apinamespace+'.this')));}
return this;}
var elementIsOrphan=function(e){var topOfDOM=false;e=e.parentNode;while(e&&!topOfDOM){topOfDOM=e.body;e=e.parentNode;}
return!topOfDOM;}
var plugins={'export':exportplugins,'import':importplugins,'instance':jSignatureInstanceExtensions},methods={'init':function(options){return this.each(function(){if(!elementIsOrphan(this)){new jSignatureClass(this,options,jSignatureInstanceExtensions);}})},'getSettings':function(){return this.find('canvas.'+apinamespace).add(this.filter('canvas.'+apinamespace)).data(apinamespace+'.this').settings;},'isModified':function(){return this.find('canvas.'+apinamespace).add(this.filter('canvas.'+apinamespace)).data(apinamespace+'.this').dataEngine._stroke!==null;},'updateSetting':function(param,val,forFuture){var $canvas=this.find('canvas.'+apinamespace).add(this.filter('canvas.'+apinamespace)).data(apinamespace+'.this');$canvas.settings[param]=val;$canvas.resetCanvas((forFuture?null:$canvas.settings.data),true);return $canvas.settings[param];},'clear':_clearDrawingArea,'reset':_clearDrawingArea,'addPlugin':function(pluginType,pluginName,callable){if(plugins.hasOwnProperty(pluginType)){plugins[pluginType][pluginName]=callable;}
return this;},'listPlugins':function(pluginType){var answer=[];if(plugins.hasOwnProperty(pluginType)){var o=plugins[pluginType];for(var k in o){if(o.hasOwnProperty(k)){answer.push(k);}}}
return answer;},'getData':function(formattype){var undef,$canvas=this.find('canvas.'+apinamespace).add(this.filter('canvas.'+apinamespace));if(formattype===undef){formattype='default';}
if($canvas.length!==0&&exportplugins.hasOwnProperty(formattype)){return exportplugins[formattype].call($canvas.get(0),$canvas.data(apinamespace+'.data'),$canvas.data(apinamespace+'.settings'));}},'importData':_setDrawingData,'setData':_setDrawingData,'globalEvents':function(){return globalEvents},'disable':function(){this.find("input").attr("disabled",1);this.find('canvas.'+apinamespace).addClass("disabled").data(apinamespace+'.this').settings.readOnly=true;},'enable':function(){this.find("input").removeAttr("disabled");this.find('canvas.'+apinamespace).removeClass("disabled").data(apinamespace+'.this').settings.readOnly=false;},'events':function(){return this.find('canvas.'+apinamespace).add(this.filter('canvas.'+apinamespace)).data(apinamespace+'.this').events;}}
$.fn[apinamespace]=function(method){'use strict'
if(!method||typeof method==='object'){return methods.init.apply(this,arguments);}else if(typeof method==='string'&&methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else{$.error('Method '+String(method)+' does not exist on jQuery.'+apinamespace);}}}
GlobalJSignatureObjectInitializer(window)})();;

/* /web/static/src/js/widgets/name_and_signature.js defined in bundle 'web.assets_common' */
odoo.define('web.name_and_signature',function(require){'use strict';var core=require('web.core');var Widget=require('web.Widget');var _t=core._t;var NameAndSignature=Widget.extend({template:'web.sign_name_and_signature',xmlDependencies:['/web/static/src/xml/name_and_signature.xml'],events:{'input .o_web_sign_name_input':'_onInputSignName','click .o_web_sign_signature':'_onClickSignature','change .o_web_sign_signature':'_onChangeSignature','click .o_web_sign_draw_button':'_onClickSignDrawButton','click .o_web_sign_draw_clear a':'_onClickSignDrawClear','click .o_web_sign_auto_button':'_onClickSignAutoButton','click .o_web_sign_auto_select_style a':'_onClickSignAutoSelectStyle','click .o_web_sign_auto_font_selection a':'_onClickSignAutoFontSelection','mouseover .o_web_sign_auto_font_selection a':'_onMouseOverSignAutoFontSelection','touchmove .o_web_sign_auto_font_selection a':'_onTouchStartSignAutoFontSelection','click .o_web_sign_load_button':'_onClickSignLoadButton','change .o_web_sign_load_file input':'_onChangeSignLoadInput',},init:function(parent,options){this._super.apply(this,arguments);options=options||{};this.htmlId=_.uniqueId();this.defaultName=options.defaultName||'';this.defaultFont=options.defaultFont||'';this.displaySignatureRatio=options.displaySignatureRatio||3.0;this.signatureType=options.signatureType||'signature';this.signMode=options.mode||'draw';this.noInputName=options.noInputName||false;this.currentFont=0;this.drawTimeout=null;this.drawPreviewTimeout=null;},willStart:function(){var self=this;return Promise.all([this._super.apply(this,arguments),this._rpc({route:'/web/sign/get_fonts/'+self.defaultFont}).then(function(data){self.fonts=data;})]);},start:function(){var self=this;this.$signatureGroup=this.$('.o_web_sign_signature_group');this.$signatureField=this.$('.o_web_sign_signature');this.$nameInput=this.$('.o_web_sign_name_input');this.$nameInputGroup=this.$('.o_web_sign_name_group');this.$drawButton=this.$('a.o_web_sign_draw_button');this.$autoButton=this.$('a.o_web_sign_auto_button');this.$loadButton=this.$('a.o_web_sign_load_button');this.$drawClear=this.$('.o_web_sign_draw_clear');this.$autoSelectStyle=this.$('.o_web_sign_auto_select_style');this.$autoFontSelection=this.$('.o_web_sign_auto_font_selection');this.$autoFontList=this.$('.o_web_sign_auto_font_list');for(var i in this.fonts){var $img=$('<img/>').addClass('img-fluid');var $a=$('<a/>').addClass('btn p-0').append($img).data('fontNb',i);this.$autoFontList.append($a);}
this.$loadFile=this.$('.o_web_sign_load_file');this.$loadInvalid=this.$('.o_web_sign_load_invalid');if(this.fonts&&this.fonts.length<2){this.$autoSelectStyle.hide();}
if(this.noInputName){if(this.defaultName===""){this.$autoButton.hide();}
this.$nameInputGroup.hide();}
$(window).on('resize.o_web_sign_name_and_signature',_.debounce(function(){if(self.isDestroyed()){return;}
self.resetSignature();},250));return this._super.apply(this,arguments).then(function(){return self.resetSignature();});},destroy:function(){this._super.apply(this,arguments);$(window).off('resize.o_web_sign_name_and_signature');},focusName:function(){this.$nameInput.focus();},getName:function(){return this.$nameInput.val();},getSignatureImage:function(){return this.$signatureField.jSignature('getData','image');},getSignatureImageSrc:function(){return this.$signatureField.jSignature('getData');},isSignatureEmpty:function(){var signature=this.$signatureField.jSignature('getData');return signature&&this.emptySignature?this.emptySignature===signature:true;},resetSignature:function(){if(!this.$signatureField){return Promise.reject();}
this.$signatureField.css({width:'unset'});var width=this.$signatureField.width();var height=parseInt(width/this.displaySignatureRatio);this.$signatureField.css({width:width,height:height,});this.$signatureField.empty().jSignature({'decor-color':'#D1D0CE','background-color':'#FFF','color':'#000','lineWidth':2,'width':width,'height':height,});this.emptySignature=this.$signatureField.jSignature('getData');this.setMode(this.signMode,true);this.focusName();return Promise.resolve();},setMode:function(mode,reset){if(reset!==true&&mode===this.signMode){return;}
this.signMode=mode;this.$drawClear.toggleClass('d-none',this.signMode!=='draw');this.$autoSelectStyle.toggleClass('d-none',this.signMode!=='auto');this.$loadFile.toggleClass('d-none',this.signMode!=='load');this.$drawButton.toggleClass('active',this.signMode==='draw');this.$autoButton.toggleClass('active',this.signMode==='auto');this.$loadButton.toggleClass('active',this.signMode==='load');this.$signatureField.jSignature(this.signMode==='draw'?'enable':'disable');this.$signatureField.jSignature('reset');if(this.signMode==='auto'){this._drawCurrentName();}else{this.$autoFontSelection.addClass('d-none');}
if(this.signMode!=='load'){this.$loadInvalid.addClass('d-none');}},validateSignature:function(){var name=this.getName();var isSignatureEmpty=this.isSignatureEmpty();this.$nameInput.parent().toggleClass('o_has_error',!name).find('.form-control, .custom-select').toggleClass('is-invalid',!name);this.$signatureGroup.toggleClass('border-danger',isSignatureEmpty);return name&&!isSignatureEmpty;},_drawCurrentName:function(){var font=this.fonts[this.currentFont];var text=this._getCleanedName();var canvas=this.$signatureField.find('canvas')[0];var img=this._getSVGText(font,text,canvas.width,canvas.height);return this._printImage(img);},_getCleanedName:function(){var regexRemoveSpecialCharacters=/[^\w\u00E0-\u00FC-'" ]/g;var text=this.getName().replace(regexRemoveSpecialCharacters,'');if(this.signatureType==='initial'){return(text.split(' ').map(function(w){return w[0];}).join('.')+'.');}
return text;},_getSVGText:function(font,text,width,height){var $svg=$(core.qweb.render('web.sign_svg_text',{width:width,height:height,font:font,text:text,type:this.signatureType,}));$svg.attr({'xmlns':"http://www.w3.org/2000/svg",'xmlns:xlink':"http://www.w3.org/1999/xlink",});return"data:image/svg+xml,"+encodeURI($svg[0].outerHTML);},_printImage:function(imgSrc){var self=this;var image=new Image;image.onload=function(){clearTimeout(self.drawTimeout);self.drawTimeout=setTimeout(function(){var width=0;var height=0;var ratio=image.width/image.height;var $canvas=self.$signatureField.find('canvas');var context=$canvas[0].getContext('2d');if(image.width/$canvas[0].width>image.height/$canvas[0].height){width=$canvas[0].width;height=parseInt(width/ratio);}else{height=$canvas[0].height;width=parseInt(height*ratio);}
self.$signatureField.jSignature('reset');var ignoredContext=_.pick(context,['shadowOffsetX','shadowOffsetY']);_.extend(context,{shadowOffsetX:0,shadowOffsetY:0});context.drawImage(image,0,0,image.width,image.height,($canvas[0].width-width)/2,($canvas[0].height-height)/2,width,height);_.extend(context,ignoredContext);self.trigger_up('signature_changed');},0);};image.src=imgSrc;},_setFont:function(index){if(index!==this.currentFont){this.currentFont=index;this._drawCurrentName();}},_updatePreviewButtons:function(){var self=this;clearTimeout(this.drawPreviewTimeout);this.drawPreviewTimeout=setTimeout(function(){var height=100;var width=parseInt(height*self.displaySignatureRatio);var $existingButtons=self.$autoFontList.find('a');for(var i=0;i<self.fonts.length;i++){var imgSrc=self._getSVGText(self.fonts[i],self._getCleanedName()||_t("Your name"),width,height);$existingButtons.eq(i).find('img').attr('src',imgSrc);}},0);},_waitForSignatureNotEmpty:function(def){def=def||$.Deferred();if(!this.isSignatureEmpty()){this.trigger_up('signature_changed');def.resolve();}else{setTimeout(this._waitForSignatureNotEmpty.bind(this,def),10);}
return def;},_onClickSignature:function(ev){this.$autoFontSelection.addClass('d-none');},_onClickSignAutoButton:function(ev){ev.preventDefault();this.setMode('auto');},_onClickSignAutoFontSelection:function(ev){this.$autoFontSelection.addClass('d-none').removeClass('d-flex').css('width',0);this._setFont(parseInt($(ev.currentTarget).data('font-nb')));},_onClickSignAutoSelectStyle:function(ev){var self=this;var width=Math.min(self.$autoFontSelection.find('a').first().height()*self.displaySignatureRatio*1.25,this.$signatureField.width());ev.preventDefault();self._updatePreviewButtons();this.$autoFontSelection.removeClass('d-none').addClass('d-flex');this.$autoFontSelection.show().animate({'width':width},500,function(){});},_onClickSignDrawButton:function(ev){ev.preventDefault();this.setMode('draw');},_onClickSignDrawClear:function(ev){ev.preventDefault();this.$signatureField.jSignature('reset');},_onClickSignLoadButton:function(ev){ev.preventDefault();this.$loadFile.find('input').click();this.setMode('load');},_onChangeSignature:function(ev){this.trigger_up('signature_changed');},_onChangeSignLoadInput:function(ev){var self=this;var f=ev.target.files[0];if(f===undefined){return false;}
if(f.type.substr(0,5)!=='image'){this.$signatureField.jSignature('reset');this.$loadInvalid.removeClass('d-none');return false;}
this.$loadInvalid.addClass('d-none');var reader=new FileReader();reader.onload=function(ev){self._printImage(reader.result);};reader.readAsDataURL(f);},_onInputSignName:function(ev){if(this.signMode!=='auto'){return;}
this._drawCurrentName();if(!this.$autoFontSelection.hasClass('d-none')){this._updatePreviewButtons();}},_onMouseOverSignAutoFontSelection:function(ev){this._setFont(parseInt($(ev.currentTarget).data('font-nb')));},_onTouchStartSignAutoFontSelection:function(ev){this._setFont(parseInt($(ev.currentTarget).data('font-nb')));},});return{NameAndSignature:NameAndSignature,};});;

/* /web_editor/static/lib/vkbeautify/vkbeautify.0.99.00.beta.js defined in bundle 'web.assets_common' */
(function(){function createShiftArr(step){var space='    ';if(isNaN(parseInt(step))){space=step;}else{switch(step){case 1:space=' ';break;case 2:space='  ';break;case 3:space='   ';break;case 4:space='    ';break;case 5:space='     ';break;case 6:space='      ';break;case 7:space='       ';break;case 8:space='        ';break;case 9:space='         ';break;case 10:space='          ';break;case 11:space='           ';break;case 12:space='            ';break;}}
var shift=['\n'];for(ix=0;ix<100;ix++){shift.push(shift[ix]+space);}
return shift;}
function vkbeautify(){this.step='    ';this.shift=createShiftArr(this.step);};vkbeautify.prototype.xml=function(text,step){var ar=text.replace(/>\s{0,}</g,"><").replace(/</g,"~::~<").replace(/\s*xmlns\:/g,"~::~xmlns:").replace(/\s*xmlns\=/g,"~::~xmlns=").split('~::~'),len=ar.length,inComment=false,deep=0,str='',ix=0,shift=step?createShiftArr(step):this.shift;for(ix=0;ix<len;ix++){if(ar[ix].search(/<!/)>-1){str+=shift[deep]+ar[ix];inComment=true;if(ar[ix].search(/-->/)>-1||ar[ix].search(/\]>/)>-1||ar[ix].search(/!DOCTYPE/)>-1){inComment=false;}}else
if(ar[ix].search(/-->/)>-1||ar[ix].search(/\]>/)>-1){str+=ar[ix];inComment=false;}else
if(/^<\w/.exec(ar[ix-1])&&/^<\/\w/.exec(ar[ix])&&/^<[\w:\-\.\,]+/.exec(ar[ix-1])==/^<\/[\w:\-\.\,]+/.exec(ar[ix])[0].replace('/','')){str+=ar[ix];if(!inComment)deep--;}else
if(ar[ix].search(/<\w/)>-1&&ar[ix].search(/<\//)==-1&&ar[ix].search(/\/>/)==-1){str=!inComment?str+=shift[deep++]+ar[ix]:str+=ar[ix];}else
if(ar[ix].search(/<\w/)>-1&&ar[ix].search(/<\//)>-1){str=!inComment?str+=shift[deep]+ar[ix]:str+=ar[ix];}else
if(ar[ix].search(/<\//)>-1){str=!inComment?str+=shift[--deep]+ar[ix]:str+=ar[ix];}else
if(ar[ix].search(/\/>/)>-1){str=!inComment?str+=shift[deep]+ar[ix]:str+=ar[ix];}else
if(ar[ix].search(/<\?/)>-1){str+=shift[deep]+ar[ix];}else
if(ar[ix].search(/xmlns\:/)>-1||ar[ix].search(/xmlns\=/)>-1){str+=shift[deep]+ar[ix];}
else{str+=ar[ix];}}
return(str[0]=='\n')?str.slice(1):str;}
vkbeautify.prototype.json=function(text,step){var step=step?step:this.step;if(typeof JSON==='undefined')return text;if(typeof text==="string")return JSON.stringify(JSON.parse(text),null,step);if(typeof text==="object")return JSON.stringify(text,null,step);return text;}
vkbeautify.prototype.css=function(text,step){var ar=text.replace(/\s{1,}/g,' ').replace(/\{/g,"{~::~").replace(/\}/g,"~::~}~::~").replace(/\;/g,";~::~").replace(/\/\*/g,"~::~/*").replace(/\*\//g,"*/~::~").replace(/~::~\s{0,}~::~/g,"~::~").split('~::~'),len=ar.length,deep=0,str='',ix=0,shift=step?createShiftArr(step):this.shift;for(ix=0;ix<len;ix++){if(/\{/.exec(ar[ix])){str+=shift[deep++]+ar[ix];}else
if(/\}/.exec(ar[ix])){str+=shift[--deep]+ar[ix];}else
if(/\*\\/.exec(ar[ix])){str+=shift[deep]+ar[ix];}
else{str+=shift[deep]+ar[ix];}}
return str.replace(/^\n{1,}/,'');}
function isSubquery(str,parenthesisLevel){return parenthesisLevel-(str.replace(/\(/g,'').length-str.replace(/\)/g,'').length)}
function split_sql(str,tab){return str.replace(/\s{1,}/g," ").replace(/ AND /ig,"~::~"+tab+tab+"AND ").replace(/ BETWEEN /ig,"~::~"+tab+"BETWEEN ").replace(/ CASE /ig,"~::~"+tab+"CASE ").replace(/ ELSE /ig,"~::~"+tab+"ELSE ").replace(/ END /ig,"~::~"+tab+"END ").replace(/ FROM /ig,"~::~FROM ").replace(/ GROUP\s{1,}BY/ig,"~::~GROUP BY ").replace(/ HAVING /ig,"~::~HAVING ").replace(/ IN /ig," IN ").replace(/ JOIN /ig,"~::~JOIN ").replace(/ CROSS~::~{1,}JOIN /ig,"~::~CROSS JOIN ").replace(/ INNER~::~{1,}JOIN /ig,"~::~INNER JOIN ").replace(/ LEFT~::~{1,}JOIN /ig,"~::~LEFT JOIN ").replace(/ RIGHT~::~{1,}JOIN /ig,"~::~RIGHT JOIN ").replace(/ ON /ig,"~::~"+tab+"ON ").replace(/ OR /ig,"~::~"+tab+tab+"OR ").replace(/ ORDER\s{1,}BY/ig,"~::~ORDER BY ").replace(/ OVER /ig,"~::~"+tab+"OVER ").replace(/\(\s{0,}SELECT /ig,"~::~(SELECT ").replace(/\)\s{0,}SELECT /ig,")~::~SELECT ").replace(/ THEN /ig," THEN~::~"+tab+"").replace(/ UNION /ig,"~::~UNION~::~").replace(/ USING /ig,"~::~USING ").replace(/ WHEN /ig,"~::~"+tab+"WHEN ").replace(/ WHERE /ig,"~::~WHERE ").replace(/ WITH /ig,"~::~WITH ").replace(/ ALL /ig," ALL ").replace(/ AS /ig," AS ").replace(/ ASC /ig," ASC ").replace(/ DESC /ig," DESC ").replace(/ DISTINCT /ig," DISTINCT ").replace(/ EXISTS /ig," EXISTS ").replace(/ NOT /ig," NOT ").replace(/ NULL /ig," NULL ").replace(/ LIKE /ig," LIKE ").replace(/\s{0,}SELECT /ig,"SELECT ").replace(/\s{0,}UPDATE /ig,"UPDATE ").replace(/ SET /ig," SET ").replace(/~::~{1,}/g,"~::~").split('~::~');}
vkbeautify.prototype.sql=function(text,step){var ar_by_quote=text.replace(/\s{1,}/g," ").replace(/\'/ig,"~::~\'").split('~::~'),len=ar_by_quote.length,ar=[],deep=0,tab=this.step,inComment=true,inQuote=false,parenthesisLevel=0,str='',ix=0,shift=step?createShiftArr(step):this.shift;;for(ix=0;ix<len;ix++){if(ix%2){ar=ar.concat(ar_by_quote[ix]);}else{ar=ar.concat(split_sql(ar_by_quote[ix],tab));}}
len=ar.length;for(ix=0;ix<len;ix++){parenthesisLevel=isSubquery(ar[ix],parenthesisLevel);if(/\s{0,}\s{0,}SELECT\s{0,}/.exec(ar[ix])){ar[ix]=ar[ix].replace(/\,/g,",\n"+tab+tab+"")}
if(/\s{0,}\s{0,}SET\s{0,}/.exec(ar[ix])){ar[ix]=ar[ix].replace(/\,/g,",\n"+tab+tab+"")}
if(/\s{0,}\(\s{0,}SELECT\s{0,}/.exec(ar[ix])){deep++;str+=shift[deep]+ar[ix];}else
if(/\'/.exec(ar[ix])){if(parenthesisLevel<1&&deep){deep--;}
str+=ar[ix];}
else{str+=shift[deep]+ar[ix];if(parenthesisLevel<1&&deep){deep--;}}
var junk=0;}
str=str.replace(/^\n{1,}/,'').replace(/\n{1,}/g,"\n");return str;}
vkbeautify.prototype.xmlmin=function(text,preserveComments){var str=preserveComments?text:text.replace(/\<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)\>/g,"").replace(/[ \r\n\t]{1,}xmlns/g,' xmlns');return str.replace(/>\s{0,}</g,"><");}
vkbeautify.prototype.jsonmin=function(text){if(typeof JSON==='undefined')return text;return JSON.stringify(JSON.parse(text),null,0);}
vkbeautify.prototype.cssmin=function(text,preserveComments){var str=preserveComments?text:text.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,"");return str.replace(/\s{1,}/g,' ').replace(/\{\s{1,}/g,"{").replace(/\}\s{1,}/g,"}").replace(/\;\s{1,}/g,";").replace(/\/\*\s{1,}/g,"/*").replace(/\*\/\s{1,}/g,"*/");}
vkbeautify.prototype.sqlmin=function(text){return text.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")");}
window.vkbeautify=new vkbeautify();})();;

/* /web_editor/static/src/js/common/ace.js defined in bundle 'web.assets_common' */
odoo.define('web_editor.ace',function(require){'use strict';var ajax=require('web.ajax');var concurrency=require('web.concurrency');var core=require('web.core');var Dialog=require('web.Dialog');var Widget=require('web.Widget');var localStorage=require('web.local_storage');var session=require('web.session');var _t=core._t;function _getCheckReturn(isValid,errorLine,errorMessage){return{isValid:isValid,error:isValid?null:{line:errorLine,message:errorMessage,},};}
function checkXML(xml){if(typeof window.DOMParser!='undefined'){var xmlDoc=(new window.DOMParser()).parseFromString(xml,'text/xml');var error=xmlDoc.getElementsByTagName('parsererror');if(error.length>0){return _getCheckReturn(false,parseInt(error[0].innerHTML.match(/[Ll]ine[^\d]+(\d+)/)[1],10),error[0].innerHTML);}}else if(typeof window.ActiveXObject!='undefined'&&new window.ActiveXObject('Microsoft.XMLDOM')){var xmlDocIE=new window.ActiveXObject('Microsoft.XMLDOM');xmlDocIE.async='false';xmlDocIE.loadXML(xml);if(xmlDocIE.parseError.line>0){return _getCheckReturn(false,xmlDocIE.parseError.line,xmlDocIE.parseError.reason);}}
return _getCheckReturn(true);}
function formatXML(xml){if(/<script(?: [^>]*)?>[^<][\s\S]*<\/script>/i.test(xml)){return xml;}
return window.vkbeautify.xml(xml,4);}
var checkSCSS=(function(){var mapping={'{':'}','}':'{','(':')',')':'(','[':']',']':'[',};var openings=['{','(','['];var closings=['}',')',']'];return function(scss){var stack=[];var line=1;for(var i=0;i<scss.length;i++){if(_.contains(openings,scss[i])){stack.push(scss[i]);}else if(_.contains(closings,scss[i])){if(stack.pop()!==mapping[scss[i]]){return _getCheckReturn(false,line,_t("Unexpected ")+scss[i]);}}else if(scss[i]==='\n'){line++;}}
if(stack.length>0){return _getCheckReturn(false,line,_t("Expected ")+mapping[stack.pop()]);}
return _getCheckReturn(true);};})();function formatSCSS(scss){return scss;}
var ViewEditor=Widget.extend({template:'web_editor.ace_view_editor',xmlDependencies:['/web_editor/static/src/xml/ace.xml'],jsLibs:['/web/static/lib/ace/ace.js',['/web/static/lib/ace/javascript_highlight_rules.js','/web/static/lib/ace/mode-xml.js','/web/static/lib/ace/mode-scss.js','/web/static/lib/ace/mode-js.js','/web/static/lib/ace/theme-monokai.js']],events:{'click .o_ace_type_switcher_choice':'_onTypeChoice','change .o_res_list':'_onResChange','click .o_ace_filter':'_onFilterChange','click button[data-action=save]':'_onSaveClick','click button[data-action=reset]':'_onResetClick','click button[data-action=format]':'_onFormatClick','click button[data-action=close]':'_onCloseClick','click #ace-view-id > .alert-warning .close':'_onCloseWarningClick'},init:function(parent,viewKey,options){this._super.apply(this,arguments);this.context=options.context;this.viewKey=viewKey;this.options=_.defaults({},options,{position:'right',doNotLoadViews:false,doNotLoadSCSS:false,doNotLoadJS:false,includeBundles:false,filesFilter:'custom',defaultBundlesRestriction:[],});this.resources={xml:{},scss:{},js:{}};this.editingSessions={xml:{},scss:{},js:{}};this.currentType='xml';this.views=this.resources.xml;this.scss=this.resources.scss;this.js=this.resources.js;},willStart:function(){return Promise.all([this._super.apply(this,arguments),this._loadResources()]);},start:function(){this.$viewEditor=this.$('#ace-view-editor');this.$typeSwitcherChoices=this.$('.o_ace_type_switcher_choice');this.$typeSwitcherBtn=this.$('.o_ace_type_switcher > .dropdown-toggle');this.$lists={xml:this.$('#ace-view-list'),scss:this.$('#ace-scss-list'),js:this.$('#ace-js-list'),};this.$includeBundlesArea=this.$('.oe_include_bundles');this.$includeAllSCSSArea=this.$('.o_include_all_scss');this.$viewID=this.$('#ace-view-id > span');this.$warningMessage=this.$('#ace-view-id > .alert-warning');this.$formatButton=this.$('button[data-action=format]');this.$resetButton=this.$('button[data-action=reset]');this.aceEditor=window.ace.edit(this.$viewEditor[0]);this.aceEditor.setTheme('ace/theme/monokai');this.$editor=this.$('.ace_editor');var refX=0;var resizing=false;var minWidth=400;var debounceStoreEditorWidth=_.debounce(storeEditorWidth,500);this._updateViewSelectDOM();var initResID;var initType;if(this.options.initialResID){initResID=this.options.initialResID;if(_.isString(initResID)&&initResID[0]==='/'){if(_.str.endsWith(initResID,'.scss')){initType='scss';}else{initType='js';}}else{initType='xml';}}else{if(!this.options.doNotLoadSCSS){initResID=this.sortedSCSS[0][1][0].url;initType='scss';}
if(!this.options.doNotLoadJS){initResID=this.sortedJS[0][1][0].url;initType='js';}
if(!this.options.doNotLoadViews){if(typeof this.viewKey==="number"){initResID=this.viewKey;}else{var view=_.findWhere(this.views,{xml_id:this.viewKey});if(!view){view=_.findWhere(this.views,{key:this.viewKey});}
initResID=view.id;}
initType='xml';}}
if(initResID){this._displayResource(initResID,initType);}
if(!this.sortedViews.length||!this.sortedSCSS.length){_.defer((function(){this._switchType(this.sortedViews.length?'xml':'scss');this.$typeSwitcherBtn.parent('.btn-group').addClass('d-none');}).bind(this));}
$(document).on('mouseup.ViewEditor',stopResizing.bind(this)).on('mousemove.ViewEditor',updateWidth.bind(this));if(this.options.position==='left'){this.$('.ace_scroller').after($('<div>').addClass('ace_resize_bar'));this.$('.ace_gutter').css({'cursor':'default'});this.$el.on('mousedown.ViewEditor','.ace_resize_bar',startResizing.bind(this));}else{this.$el.on('mousedown.ViewEditor','.ace_gutter',startResizing.bind(this));}
resizeEditor.call(this,readEditorWidth.call(this));return this._super.apply(this,arguments);function resizeEditor(target){var width=Math.min(document.body.clientWidth,Math.max(parseInt(target,10),minWidth));this.$editor.width(width);this.aceEditor.resize();this.$el.width(width);}
function storeEditorWidth(){localStorage.setItem('ace_editor_width',this.$el.width());}
function readEditorWidth(){var width=localStorage.getItem('ace_editor_width');return parseInt(width||720,10);}
function startResizing(e){refX=e.pageX;resizing=true;}
function stopResizing(){resizing=false;}
function updateWidth(e){if(!resizing)return;var offset=e.pageX-refX;if(this.options.position==='left'){offset=-offset;}
var width=this.$el.width()-offset;refX=e.pageX;resizeEditor.call(this,width);debounceStoreEditorWidth.call(this);}},destroy:function(){this._super.apply(this,arguments);this.$el.off('.ViewEditor');$(document).off('.ViewEditor');},_buildEditingSession:function(resID,type){var self=this;type=type||this.currentType;var editingSession=new window.ace.EditSession(this.resources[type][resID].arch);editingSession.setUseWorker(false);editingSession.setMode('ace/mode/'+(type||this.currentType));editingSession.setUndoManager(new window.ace.UndoManager());editingSession.on('change',function(){_.defer(function(){self._toggleDirtyInfo(resID);self._showErrorLine();});});return editingSession;},_displayResource:function(resID,type){if(type){this._switchType(type);}
var editingSession=this.editingSessions[this.currentType][resID];if(!editingSession){editingSession=this.editingSessions[this.currentType][resID]=this._buildEditingSession(resID);}
this.aceEditor.setSession(editingSession);var isCustomized=false;if(this.currentType==='xml'){this.$viewID.text(_.str.sprintf(_t("Template ID: %s"),this.views[resID].key));}else if(this.currentType==='scss'){isCustomized=this.scss[resID].customized;this.$viewID.text(_.str.sprintf(_t("SCSS file: %s"),resID));}else{isCustomized=this.js[resID].customized;this.$viewID.text(_.str.sprintf(_t("JS file: %s"),resID));}
this.$lists[this.currentType].select2('val',resID);this.$resetButton.toggleClass('d-none',this.currentType==='xml'||!isCustomized);this.$warningMessage.toggleClass('d-none',this.currentType!=='xml'&&(resID.indexOf('/user_custom_')>=0||isCustomized));this.aceEditor.resize(true);},_formatResource:function(){var res=this.aceEditor.getValue();var check=(this.currentType==='xml'?checkXML:checkSCSS)(res);if(check.isValid){this.aceEditor.setValue((this.currentType==='xml'?formatXML:formatSCSS)(res));}else{this._showErrorLine(check.error.line,check.error.message,this._getSelectedResource());}},_getSelectedResource:function(){var value=this.$lists[this.currentType].select2('val');return parseInt(value,10)||value;},_loadResources:function(){this.resources={xml:{},scss:{},js:{}};this.editingSessions={xml:{},scss:{},js:{}};this.views=this.resources.xml;this.scss=this.resources.scss;this.js=this.resources.js;return this._rpc({route:'/web_editor/get_assets_editor_resources',params:{key:this.viewKey,get_views:!this.options.doNotLoadViews,get_scss:!this.options.doNotLoadSCSS,get_js:!this.options.doNotLoadJS,bundles:this.options.includeBundles,bundles_restriction:this.options.filesFilter==='all'?[]:this.options.defaultBundlesRestriction,only_user_custom_files:this.options.filesFilter==='custom',},}).then((function(resources){_processViews.call(this,resources.views||[]);_processJSorSCSS.call(this,resources.scss||[],'scss');_processJSorSCSS.call(this,resources.js||[],'js');}).bind(this));function _processViews(views){_.extend(this.views,_.indexBy(_.filter(views,function(view){return view.active;}),'id'));var self=this;var roots=[];_.each(this.views,function(view){view.level=0;view.children=[];});_.each(this.views,function(view){var parentId=view.inherit_id[0];var parent=parentId&&self.views[parentId];if(parent){parent.children.push(view);}else{roots.push(view);}});this.sortedViews=[];function visit(view,level){view.level=level;self.sortedViews.push(view);_.each(view.children,function(child){visit(child,level+1);});}
_.each(roots,function(root){visit(root,0);});}
function _processJSorSCSS(data,type){if(type==='scss'){this.sortedSCSS=data;}else{this.sortedJS=data;}
var resources=type==='scss'?this.scss:this.js;_.each(data,function(bundleInfos){_.each(bundleInfos[1],function(info){info.bundle_xmlid=bundleInfos[0].xmlid;});_.extend(resources,_.indexBy(bundleInfos[1],'url'));});}},_resetResource:function(resID,type){resID=resID||this._getSelectedResource();type=type||this.currentType;if(this.currentType==='xml'){return Promise.reject(_t("Reseting views is not supported yet"));}else{var resource=type==='scss'?this.scss[resID]:this.js[resID];return this._rpc({route:'/web_editor/reset_asset',params:{url:resID,bundle_xmlid:resource.bundle_xmlid,},});}},_saveSCSSorJS:function(session){var self=this;var sessionIdEndsWithJS=_.string.endsWith(session.id,'.js');var bundleXmlID=sessionIdEndsWithJS?this.js[session.id].bundle_xmlid:this.scss[session.id].bundle_xmlid;var fileType=sessionIdEndsWithJS?'js':'scss';return self._rpc({route:'/web_editor/save_asset',params:{url:session.id,bundle_xmlid:bundleXmlID,content:session.text,file_type:fileType,},}).then(function(){self._toggleDirtyInfo(session.id,fileType,false);});},_saveResources:function(){var self=this;var toSave={};var errorFound=false;_.each(this.editingSessions,(function(editingSessions,type){if(errorFound)return;var dirtySessions=_.pick(editingSessions,function(session){return session.getUndoManager().hasUndo();});toSave[type]=_.map(dirtySessions,function(session,resID){return{id:parseInt(resID,10)||resID,text:session.getValue(),};});this._showErrorLine();for(var i=0;i<toSave[type].length&&!errorFound;i++){var check=(type==='xml'?checkXML:checkSCSS)(toSave[type][i].text);if(!check.isValid){this._showErrorLine(check.error.line,check.error.message,toSave[type][i].id,type);errorFound=toSave[type][i];}}}).bind(this));if(errorFound)return Promise.reject(errorFound);var defs=[];var mutex=new concurrency.Mutex();_.each(toSave,(function(_toSave,type){_toSave=_.sortBy(_toSave,'id').reverse();_.each(_toSave,function(session){defs.push(mutex.exec(function(){return(type==='xml'?self._saveView(session):self._saveSCSSorJS(session));}));});}).bind(this));var self=this;return Promise.all(defs).guardedCatch(function(results){var error=results[1];Dialog.alert(self,'',{title:_t("Server error"),$content:$('<div/>').html(_t("A server error occured. Please check you correctly signed in and that the file you are saving is correctly formatted.")
+'<br/>'
+error)});});},_saveView:function(session){var self=this;return new Promise(function(resolve,reject){self._rpc({model:'ir.ui.view',method:'write',args:[[session.id],{arch:session.text}],},{noContextKeys:'lang',}).then(function(){self._toggleDirtyInfo(session.id,'xml',false);resolve();},function(source,error){reject(session,error);});});},_showErrorLine:function(line,message,resID,type){if(line===undefined||line<=0){if(this.$errorLine){this.$errorLine.removeClass('o_error');this.$errorLine.off('.o_error');this.$errorLine=undefined;this.$errorContent.removeClass('o_error');this.$errorContent=undefined;}
return;}
if(type)this._switchType(type);if(this._getSelectedResource()===resID){__showErrorLine.call(this,line);}else{var onChangeSession=(function(){this.aceEditor.off('changeSession',onChangeSession);_.delay(__showErrorLine.bind(this,line),400);}).bind(this);this.aceEditor.on('changeSession',onChangeSession);this._displayResource(resID,this.currentType);}
function __showErrorLine(line){this.aceEditor.gotoLine(line);this.$errorLine=this.$viewEditor.find('.ace_gutter-cell').filter(function(){return parseInt($(this).text())===line;}).addClass('o_error');this.$errorLine.addClass('o_error').on('click.o_error',function(){var $message=$('<div/>').html(message);$message.text($message.text());Dialog.alert(this,"",{$content:$message});});this.$errorContent=this.$viewEditor.find('.ace_scroller').addClass('o_error');}},_switchType:function(type){this.currentType=type;this.$typeSwitcherBtn.html(this.$typeSwitcherChoices.filter('[data-type='+type+']').html());_.each(this.$lists,function($list,_type){$list.toggleClass('d-none',type!==_type);});this.$lists[type].change();this.$includeBundlesArea.toggleClass('d-none',this.currentType!=='xml'||!session.debug);this.$includeAllSCSSArea.toggleClass('d-none',this.currentType!=='scss'||!session.debug);this.$includeAllSCSSArea.find('[data-value="restricted"]').toggleClass('d-none',this.options.defaultBundlesRestriction.length===0);this.$formatButton.toggleClass('d-none',this.currentType!=='xml');},_toggleDirtyInfo:function(resID,type,isDirty){type=type||this.currentType;if(!resID||!this.editingSessions[type][resID])return;var $option=this.$lists[type].find('[value="'+resID+'"]');if(isDirty===undefined){isDirty=this.editingSessions[type][resID].getUndoManager().hasUndo();}
$option.data('dirty',isDirty);},_updateViewSelectDOM:function(){var currentId=this._getSelectedResource();var self=this;this.$lists.xml.empty();_.each(this.sortedViews,function(view){self.$lists.xml.append($('<option/>',{value:view.id,text:view.name,selected:currentId===view.id,'data-level':view.level,'data-debug':view.xml_id,}));});this.$lists.scss.empty();_populateList(this.sortedSCSS,this.$lists.scss,5);this.$lists.js.empty();_populateList(this.sortedJS,this.$lists.js,3);this.$lists.xml.select2('destroy');this.$lists.xml.select2({formatResult:_formatDisplay.bind(this,false),formatSelection:_formatDisplay.bind(this,true),});this.$lists.xml.data('select2').dropdown.addClass('o_ace_select2_dropdown');this.$lists.scss.select2('destroy');this.$lists.scss.select2({formatResult:_formatDisplay.bind(this,false),formatSelection:_formatDisplay.bind(this,true),});this.$lists.scss.data('select2').dropdown.addClass('o_ace_select2_dropdown');this.$lists.js.select2('destroy');this.$lists.js.select2({formatResult:_formatDisplay.bind(this,false),formatSelection:_formatDisplay.bind(this,true),});this.$lists.js.data('select2').dropdown.addClass('o_ace_select2_dropdown');function _populateList(sortedData,$list,lettersToRemove){_.each(sortedData,function(bundleInfos){var $optgroup=$('<optgroup/>',{label:bundleInfos[0].name,}).appendTo($list);_.each(bundleInfos[1],function(dataInfo){var name=dataInfo.url.substring(_.lastIndexOf(dataInfo.url,'/')+1,dataInfo.url.length-lettersToRemove);$optgroup.append($('<option/>',{value:dataInfo.url,text:name,selected:currentId===dataInfo.url,'data-debug':dataInfo.url,'data-customized':dataInfo.customized}));});});}
function _formatDisplay(isSelected,data){var $elem=$(data.element);var text=data.text||'';if(!isSelected){text=Array(($elem.data('level')||0)+1).join('-')+' '+text;}
var $div=$('<div/>',{text:text,class:'o_ace_select2_result',});if($elem.data('dirty')||$elem.data('customized')){$div.prepend($('<span/>',{class:'mr8 fa fa-floppy-o '+($elem.data('dirty')?'text-warning':'text-success'),}));}
if(!isSelected&&session.debug&&$elem.data('debug')){$div.append($('<span/>',{text:' ('+$elem.data('debug')+')',class:'ml4 small text-muted',}));}
return $div;}},_onCloseClick:function(){this.do_hide();},_onFormatClick:function(){this._formatResource();},_onFilterChange:function(ev){var $item=$(ev.target);$item.addClass('active').siblings().removeClass('active');if($item.data('type')==='xml'){this.options.includeBundles=$(ev.target).data('value')==='all';}else{this.options.filesFilter=$item.data('value');}
this._loadResources().then(this._updateViewSelectDOM.bind(this));},_onResChange:function(){this._displayResource(this._getSelectedResource());},_onResetClick:function(){var self=this;Dialog.confirm(this,_t("If you reset this file, all your customizations will be lost as it will be reverted to the default file."),{title:_t("Careful !"),confirm_callback:function(){self._resetResource(self._getSelectedResource());},});},_onSaveClick:function(){this._saveResources();},_onTypeChoice:function(ev){ev.preventDefault();this._switchType($(ev.target).data('type'));},_onCloseWarningClick:function(){this.$warningMessage.addClass('d-none');},});return ViewEditor;});;

/* /web_editor/static/src/js/wysiwyg/root.js defined in bundle 'web.assets_common' */
odoo.define('web_editor.wysiwyg.root',function(require){'use strict';var Widget=require('web.Widget');var assetsLoaded=false;var WysiwygRoot=Widget.extend({assetLibs:['web_editor.compiled_assets_wysiwyg'],publicMethods:['isDirty','save','getValue','setValue','getEditable','on','trigger','focus'],init:function(parent,params){this._super.apply(this,arguments);this._params=params;this.$editor=null;},willStart:function(){var self=this;var $target=this.$el;this.$el=null;return this._super().then(function(){if(!assetsLoaded){var Wysiwyg=odoo.__DEBUG__.services['web_editor.wysiwyg'];_.each(['getRange','setRange','setRangeFromNode'],function(methodName){WysiwygRoot[methodName]=Wysiwyg[methodName].bind(Wysiwyg);});assetsLoaded=true;}
var Wysiwyg=self._getWysiwygContructor();var instance=new Wysiwyg(self,self._params);self._params=null;_.each(self.publicMethods,function(methodName){self[methodName]=instance[methodName].bind(instance);});return instance.attachTo($target).then(function(){self.$editor=instance.$el;});});},_getWysiwygContructor:function(){return odoo.__DEBUG__.services['web_editor.wysiwyg'];}});return WysiwygRoot;});;

/* /web_tour/static/src/js/tip.js defined in bundle 'web.assets_common' */
odoo.define('web_tour.Tip',function(require){"use strict";var config=require('web.config');var core=require('web.core');var Widget=require('web.Widget');var _t=core._t;var Tip=Widget.extend({template:"Tip",xmlDependencies:['/web_tour/static/src/xml/tip.xml'],events:{click:'_onTipClicked',mouseenter:"_to_info_mode",mouseleave:"_to_bubble_mode",},init:function(parent,info){this._super(parent);this.info=_.defaults(info,{position:"right",width:270,space:10,overlay:{x:50,y:50,},});this.position={top:"50%",left:"50%",};},attach_to:function($anchor){this.$anchor=$anchor;this.$ideal_location=this._get_ideal_location();var position=this.$ideal_location.css("position");if(position==="static"||position==="relative"){this.$ideal_location.addClass("o_tooltip_parent");}
return this.appendTo(this.$ideal_location);},start:function(){this.$tooltip_overlay=this.$(".o_tooltip_overlay");this.$tooltip_content=this.$(".o_tooltip_content");this.init_width=this.$el.innerWidth();this.init_height=this.$el.innerHeight();this.double_border_width=this.$el.outerWidth()-this.init_width;this.content_width=this.$tooltip_content.outerWidth(true);this.content_height=this.$tooltip_content.outerHeight(true);this.$window=$(window);this.$tooltip_content.css({width:"100%",height:"100%",});_.each(this.info.event_handlers,(function(data){this.$tooltip_content.on(data.event,data.selector,data.handler);}).bind(this));this._bind_anchor_events();this._reposition();this.$el.css("opacity",1);core.bus.on("resize",this,_.debounce(function(){if(this.tip_opened){this._to_bubble_mode(true);}
this._reposition();},500));this.$el.on("transitionend oTransitionEnd webkitTransitionEnd",(function(){if(!this.tip_opened&&this.$el.parent()[0]===document.body){this.$el.detach();this.$el.css(this.position);this.$el.appendTo(this.$ideal_location);}}).bind(this));return this._super.apply(this,arguments);},destroy:function(){this._unbind_anchor_events();clearTimeout(this.timerIn);clearTimeout(this.timerOut);if(this.$ideal_location.children(".o_tooltip").not(this.$el[0]).length===0){this.$ideal_location.removeClass("o_tooltip_parent");}
return this._super.apply(this,arguments);},update:function($anchor){if(!$anchor.is(this.$anchor)){this._unbind_anchor_events();this.$anchor=$anchor;this.$ideal_location=this._get_ideal_location();if(this.$el.parent()[0]!==document.body){this.$el.appendTo(this.$ideal_location);}
this._bind_anchor_events();}
this._reposition();},_get_ideal_location:function(){var $location=this.$anchor;if($location.is("html,body")){return $(document.body);}
var o;var p;do{$location=$location.parent();o=$location.css("overflow");p=$location.css("position");}while($location.hasClass('dropdown-menu')||((o==="visible"||o==="hidden")&&p!=="fixed"&&$location[0].tagName.toUpperCase()!=='BODY'));return $location;},_reposition:function(){if(this.tip_opened)return;this.$el.removeClass("o_animated");var appendAt=this.info.position;if(_t.database.parameters.direction==='rtl'){appendAt=appendAt==='right'?'left':'right';}
this.$el.position({my:this._get_spaced_inverted_position(appendAt),at:appendAt,of:this.$anchor,collision:"none",});var positionRight=_t.database.parameters.direction==='rtl'?"right":"left";var positionLeft=_t.database.parameters.direction==='rtl'?"left":"right";var offset=this.$el.offset();this.$tooltip_overlay.css({top:-Math.min((this.info.position==="bottom"?this.info.space:this.info.overlay.y),offset.top),right:-Math.min((this.info.position===positionRight?this.info.space:this.info.overlay.x),this.$window.width()-(offset.left+this.init_width+this.double_border_width)),bottom:-Math.min((this.info.position==="top"?this.info.space:this.info.overlay.y),this.$window.height()-(offset.top+this.init_height+this.double_border_width)),left:-Math.min((this.info.position===positionLeft?this.info.space:this.info.overlay.x),offset.left),});this.position=this.$el.position();this.$el.addClass("o_animated");},_bind_anchor_events:function(){this.consume_event=Tip.getConsumeEventType(this.$anchor);this.$anchor.on(this.consume_event+".anchor",(function(e){if(e.type!=="mousedown"||e.which===1){this.trigger("tip_consumed");this._unbind_anchor_events();}}).bind(this));this.$anchor.on('mouseenter.anchor',this._to_info_mode.bind(this));this.$anchor.on('mouseleave.anchor',this._to_bubble_mode.bind(this));},_unbind_anchor_events:function(){this.$anchor.off(".anchor");},_get_spaced_inverted_position:function(position){if(position==="right")return"left+"+this.info.space;if(position==="left")return"right-"+this.info.space;if(position==="bottom")return"top+"+this.info.space;return"bottom-"+this.info.space;},_to_info_mode:function(force){if(this.timerOut!==undefined){clearTimeout(this.timerOut);this.timerOut=undefined;return;}
if(this.tip_opened){return;}
if(force===true){this._build_info_mode();}else{this.timerIn=setTimeout(this._build_info_mode.bind(this),100);}},_build_info_mode:function(){clearTimeout(this.timerIn);this.timerIn=undefined;this.tip_opened=true;var offset=this.$el.offset();if(this.$el.parent()[0]!==document.body){this.$el.detach();this.$el.css(offset);this.$el.appendTo(document.body);}
var mbLeft=0;var mbTop=0;var overflow=false;var posVertical=(this.info.position==="top"||this.info.position==="bottom");if(posVertical){overflow=(offset.left+this.content_width+this.double_border_width+this.info.overlay.x>this.$window.width());}else{overflow=(offset.top+this.content_height+this.double_border_width+this.info.overlay.y>this.$window.height());}
if(posVertical&&overflow||this.info.position==="left"||(_t.database.parameters.direction==='rtl'&&this.info.position=="right")){mbLeft-=(this.content_width-this.init_width);}
if(!posVertical&&overflow||this.info.position==="top"){mbTop-=(this.content_height-this.init_height);}
this.$el.toggleClass("inverse",overflow);this.$el.removeClass("o_animated").addClass("active");this.$el.css({width:this.content_width,height:this.content_height,"margin-left":mbLeft,"margin-top":mbTop,});},_to_bubble_mode:function(force){if(this.timerIn!==undefined){clearTimeout(this.timerIn);this.timerIn=undefined;return;}
if(!this.tip_opened){return;}
if(force===true){this._build_bubble_mode();}else{this.timerOut=setTimeout(this._build_bubble_mode.bind(this),300);}},_build_bubble_mode:function(){clearTimeout(this.timerOut);this.timerOut=undefined;this.tip_opened=false;this.$el.removeClass("active").addClass("o_animated");this.$el.css({width:this.init_width,height:this.init_height,margin:0,});},_onTipClicked:function(){if(config.device.touch&&this.tip_opened){this._to_bubble_mode();}},});Tip.getConsumeEventType=function($element){if($element.is("textarea")||$element.filter("input").is(function(){var type=$(this).attr("type");return!type||!!type.match(/^(email|number|password|search|tel|text|url)$/);})){return"input";}
return"click";};return Tip;});;

/* /web_tour/static/src/js/tour_utils.js defined in bundle 'web.assets_common' */
odoo.define('web_tour.utils',function(require){"use strict";function get_step_key(name){return'tour_'+name+'_step';}
function get_running_key(){return'running_tour';}
function get_running_delay_key(){return get_running_key()+"_delay";}
function get_first_visible_element($elements){for(var i=0;i<$elements.length;i++){var $i=$elements.eq(i);if($i.is(':visible:hasVisibility')){return $i;}}
return $();}
function do_before_unload(if_unload_callback,if_not_unload_callback){if_unload_callback=if_unload_callback||function(){};if_not_unload_callback=if_not_unload_callback||if_unload_callback;var old_before=window.onbeforeunload;var reload_timeout;window.onbeforeunload=function(){clearTimeout(reload_timeout);window.onbeforeunload=old_before;if_unload_callback();if(old_before)return old_before.apply(this,arguments);};reload_timeout=_.defer(function(){window.onbeforeunload=old_before;if_not_unload_callback();});}
function get_jquery_element_from_selector(selector){if(_.isString(selector)&&selector.indexOf('iframe')!==-1){var $iframe=$(selector.split('iframe')[0]+' iframe');var $el=$iframe.contents().find(selector.split('iframe')[1]);$el.iframeContainer=$iframe[0];return $el;}else{return $(selector);}}
return{'get_step_key':get_step_key,'get_running_key':get_running_key,'get_running_delay_key':get_running_delay_key,'get_first_visible_element':get_first_visible_element,'do_before_unload':do_before_unload,'get_jquery_element_from_selector':get_jquery_element_from_selector,};});;

/* /web_tour/static/src/js/running_tour_action_helper.js defined in bundle 'web.assets_common' */
odoo.define('web_tour.RunningTourActionHelper',function(require){"use strict";var core=require('web.core');var utils=require('web_tour.utils');var Tip=require('web_tour.Tip');var get_first_visible_element=utils.get_first_visible_element;var get_jquery_element_from_selector=utils.get_jquery_element_from_selector;var RunningTourActionHelper=core.Class.extend({init:function(tip_widget){this.tip_widget=tip_widget;},click:function(element){this._click(this._get_action_values(element));},dblclick:function(element){this._click(this._get_action_values(element),2);},tripleclick:function(element){this._click(this._get_action_values(element),3);},clicknoleave:function(element){this._click(this._get_action_values(element),1,false);},text:function(text,element){this._text(this._get_action_values(element),text);},drag_and_drop:function(to,element){this._drag_and_drop(this._get_action_values(element),to);},keydown:function(keyCodes,element){this._keydown(this._get_action_values(element),keyCodes.split(/[,\s]+/));},auto:function(element){var values=this._get_action_values(element);if(values.consume_event==="input"){this._text(values);}else{this._click(values);}},_get_action_values:function(element){var $e=get_jquery_element_from_selector(element);var $element=element?get_first_visible_element($e):this.tip_widget.$anchor;if($element.length===0){$element=$e.first();}
var consume_event=element?Tip.getConsumeEventType($element):this.tip_widget.consume_event;return{$element:$element,consume_event:consume_event,};},_click:function(values,nb,leave){trigger_mouse_event(values.$element,"mouseover");values.$element.trigger("mouseenter");for(var i=1;i<=(nb||1);i++){trigger_mouse_event(values.$element,"mousedown");trigger_mouse_event(values.$element,"mouseup");trigger_mouse_event(values.$element,"click",i);if(i%2===0){trigger_mouse_event(values.$element,"dblclick");}}
if(leave!==false){trigger_mouse_event(values.$element,"mouseout");values.$element.trigger("mouseleave");}
function trigger_mouse_event($element,type,count){var e=document.createEvent("MouseEvents");e.initMouseEvent(type,true,true,window,count||0,0,0,0,0,false,false,false,false,0,$element[0]);$element[0].dispatchEvent(e);}},_text:function(values,text){this._click(values);text=text||"Test";if(values.consume_event==="input"){values.$element.trigger("keydown").val(text).trigger("keyup").trigger("input");}else if(values.$element.is("select")){var $options=values.$element.children("option");$options.prop("selected",false).removeProp("selected");var $selectedOption=$options.filter(function(){return $(this).val()===text;});if($selectedOption.length===0){$selectedOption=$options.filter(function(){return $(this).text()===text;});}
$selectedOption.prop("selected",true);this._click(values);}else{values.$element.focusIn();values.$element.trigger($.Event("keydown",{key:'_',keyCode:95}));values.$element.text(text);values.$element.focusInEnd();values.$element.trigger($.Event("keyup",{key:'_',keyCode:95}));}
values.$element.trigger("change");},_drag_and_drop:function(values,to){var $to;if(to){$to=get_jquery_element_from_selector(to);}else{$to=$(document.body);}
var elementCenter=values.$element.offset();elementCenter.left+=values.$element.outerWidth()/2;elementCenter.top+=values.$element.outerHeight()/2;var toCenter=$to.offset();if(to&&to.indexOf('iframe')!==-1){var iFrameOffset=$('iframe').offset();toCenter.left+=iFrameOffset.left;toCenter.top+=iFrameOffset.top;}
toCenter.left+=$to.outerWidth()/2;toCenter.top+=$to.outerHeight()/2;values.$element.trigger($.Event("mouseenter"));values.$element.trigger($.Event("mousedown",{which:1,pageX:elementCenter.left,pageY:elementCenter.top}));values.$element.trigger($.Event("mousemove",{which:1,pageX:toCenter.left,pageY:toCenter.top}));values.$element.trigger($.Event("mouseup",{which:1,pageX:toCenter.left,pageY:toCenter.top}));},_keydown:function(values,keyCodes){while(keyCodes.length){var keyCode=+keyCodes.shift();values.$element.trigger({type:"keydown",keyCode:keyCode});if((keyCode>47&&keyCode<58)||keyCode===32||(keyCode>64&&keyCode<91)||(keyCode>95&&keyCode<112)||(keyCode>185&&keyCode<193)||(keyCode>218&&keyCode<223)){document.execCommand("insertText",0,String.fromCharCode(keyCode));}
values.$element.trigger({type:"keyup",keyCode:keyCode});}},});return RunningTourActionHelper;});;

/* /web_tour/static/src/js/tour_manager.js defined in bundle 'web.assets_common' */
odoo.define('web_tour.TourManager',function(require){"use strict";var core=require('web.core');var local_storage=require('web.local_storage');var mixins=require('web.mixins');var utils=require('web_tour.utils');var RainbowMan=require('web.RainbowMan');var RunningTourActionHelper=require('web_tour.RunningTourActionHelper');var ServicesMixin=require('web.ServicesMixin');var session=require('web.session');var Tip=require('web_tour.Tip');var _t=core._t;var RUNNING_TOUR_TIMEOUT=10000;var get_step_key=utils.get_step_key;var get_running_key=utils.get_running_key;var get_running_delay_key=utils.get_running_delay_key;var get_first_visible_element=utils.get_first_visible_element;var do_before_unload=utils.do_before_unload;var get_jquery_element_from_selector=utils.get_jquery_element_from_selector;return core.Class.extend(mixins.EventDispatcherMixin,ServicesMixin,{init:function(parent,consumed_tours){mixins.EventDispatcherMixin.init.call(this);this.setParent(parent);this.$body=$('body');this.active_tooltips={};this.tours={};this.consumed_tours=consumed_tours||[];this.running_tour=local_storage.getItem(get_running_key());this.running_step_delay=parseInt(local_storage.getItem(get_running_delay_key()),10)||0;this.edition=(_.last(session.server_version_info)==='e')?'enterprise':'community';this._log=[];console.log('Tour Manager is ready.  running_tour='+this.running_tour);},register:function(){var args=Array.prototype.slice.call(arguments);var last_arg=args[args.length-1];var name=args[0];if(this.tours[name]){console.warn(_.str.sprintf("Tour %s is already defined",name));return;}
var options=args.length===2?{}:args[1];var steps=last_arg instanceof Array?last_arg:[last_arg];var tour={name:name,steps:steps,url:options.url,rainbowMan:options.rainbowMan===undefined?true:!!options.rainbowMan,test:options.test,wait_for:options.wait_for||Promise.resolve(),};if(options.skip_enabled){tour.skip_link='<p><span class="o_skip_tour">'+_t('Skip tour')+'</span></p>';tour.skip_handler=function(tip){this._deactivate_tip(tip);this._consume_tour(name);};}
this.tours[name]=tour;},_register_all:function(do_update){if(this._all_registered)return;this._all_registered=true;_.each(this.tours,this._register.bind(this,do_update));},_register:function(do_update,tour,name){if(tour.ready)return Promise.resolve();var tour_is_consumed=_.contains(this.consumed_tours,name);return tour.wait_for.then((function(){tour.current_step=parseInt(local_storage.getItem(get_step_key(name)))||0;tour.steps=_.filter(tour.steps,(function(step){return!step.edition||step.edition===this.edition;}).bind(this));if(tour_is_consumed||tour.current_step>=tour.steps.length){local_storage.removeItem(get_step_key(name));tour.current_step=0;}
tour.ready=true;if(do_update&&(this.running_tour===name||(!this.running_tour&&!tour.test&&!tour_is_consumed))){this._to_next_step(name,0);this.update(name);}}).bind(this));},run:function(tour_name,step_delay){console.log(_.str.sprintf("Preparing tour %s",tour_name));if(this.running_tour){this._deactivate_tip(this.active_tooltips[this.running_tour]);this._consume_tour(this.running_tour,_.str.sprintf("Killing tour %s",this.running_tour));return;}
var tour=this.tours[tour_name];if(!tour){console.warn(_.str.sprintf("Unknown Tour %s",name));return;}
console.log(_.str.sprintf("Running tour %s",tour_name));this.running_tour=tour_name;this.running_step_delay=step_delay||this.running_step_delay;local_storage.setItem(get_running_key(),this.running_tour);local_storage.setItem(get_running_delay_key(),this.running_step_delay);this._deactivate_tip(this.active_tooltips[tour_name]);tour.current_step=0;this._to_next_step(tour_name,0);local_storage.setItem(get_step_key(tour_name),tour.current_step);if(tour.url){this.pause();do_before_unload(null,(function(){this.play();this.update();}).bind(this));var url=session.debug?$.param.querystring(tour.url,{debug:session.debug}):tour.url;window.location.href=window.location.origin+url;}else{this.update();}},pause:function(){this.paused=true;},play:function(){this.paused=false;},update:function(tour_name){if(this.paused)return;this.$modal_displayed=$('.modal:visible').last();tour_name=this.running_tour||tour_name;if(tour_name){var tour=this.tours[tour_name];if(!tour||!tour.ready)return;if(this.running_tour&&this.running_tour_timeout===undefined){this._set_running_tour_timeout(this.running_tour,this.active_tooltips[this.running_tour]);}
var self=this;setTimeout(function(){self._check_for_tooltip(self.active_tooltips[tour_name],tour_name);});}else{for(var tourName in this.active_tooltips){var tip=this.active_tooltips[tourName];var activated=this._check_for_tooltip(tip,tourName);if(activated){break;}}}},_check_for_tooltip:function(tip,tour_name){if($('body').hasClass('o_ui_blocked')){this._deactivate_tip(tip);this._log.push("blockUI is preventing the tip to be consumed");return false;}
var $trigger;if(tip.in_modal!==false&&this.$modal_displayed.length){$trigger=this.$modal_displayed.find(tip.trigger);}else{$trigger=get_jquery_element_from_selector(tip.trigger);}
var $visible_trigger=get_first_visible_element($trigger);var extra_trigger=true;var $extra_trigger;if(tip.extra_trigger){$extra_trigger=get_jquery_element_from_selector(tip.extra_trigger);extra_trigger=get_first_visible_element($extra_trigger).length;}
var triggered=$visible_trigger.length&&extra_trigger;if(triggered){if(!tip.widget){this._activate_tip(tip,tour_name,$visible_trigger);}else{tip.widget.update($visible_trigger);}}else{if($trigger.iframeContainer||($extra_trigger&&$extra_trigger.iframeContainer)){var $el=$();if($trigger.iframeContainer){$el=$el.add($trigger.iframeContainer);}
if(($extra_trigger&&$extra_trigger.iframeContainer)&&$trigger.iframeContainer!==$extra_trigger.iframeContainer){$el=$el.add($extra_trigger.iframeContainer);}
var self=this;$el.off('load').one('load',function(){$el.off('load');if(self.active_tooltips[tour_name]===tip){self.update(tour_name);}});}
this._deactivate_tip(tip);if(this.running_tour===tour_name){this._log.push("_check_for_tooltip");this._log.push("- modal_displayed: "+this.$modal_displayed.length);this._log.push("- trigger '"+tip.trigger+"': "+$trigger.length);this._log.push("- visible trigger '"+tip.trigger+"': "+$visible_trigger.length);if($extra_trigger!==undefined){this._log.push("- extra_trigger '"+tip.extra_trigger+"': "+$extra_trigger.length);this._log.push("- visible extra_trigger '"+tip.extra_trigger+"': "+extra_trigger);}}}
return!!triggered;},_activate_tip:function(tip,tour_name,$anchor){var tour=this.tours[tour_name];var tip_info=tip;if(tour.skip_link){tip_info=_.extend(_.omit(tip_info,'content'),{content:tip.content+tour.skip_link,event_handlers:[{event:'click',selector:'.o_skip_tour',handler:tour.skip_handler.bind(this,tip),}],});}
tip.widget=new Tip(this,tip_info);if(this.running_tour!==tour_name){tip.widget.on('tip_consumed',this,this._consume_tip.bind(this,tip,tour_name));}
tip.widget.attach_to($anchor).then(this._to_next_running_step.bind(this,tip,tour_name));},_deactivate_tip:function(tip){if(tip&&tip.widget){tip.widget.destroy();delete tip.widget;}},_describeTip:function(tip){return tip.content?tip.content+' (trigger: '+tip.trigger+')':tip.trigger;},_consume_tip:function(tip,tour_name){this._deactivate_tip(tip);this._to_next_step(tour_name);var is_running=(this.running_tour===tour_name);if(is_running){var stepDescription=this._describeTip(tip);console.log(_.str.sprintf("Tour %s: step '%s' succeeded",tour_name,stepDescription));}
if(this.active_tooltips[tour_name]){local_storage.setItem(get_step_key(tour_name),this.tours[tour_name].current_step);if(is_running){this._log=[];this._set_running_tour_timeout(tour_name,this.active_tooltips[tour_name]);}
this.update(tour_name);}else{this._consume_tour(tour_name);}},_to_next_step:function(tour_name,inc){var tour=this.tours[tour_name];tour.current_step+=(inc!==undefined?inc:1);if(this.running_tour!==tour_name){var index=_.findIndex(tour.steps.slice(tour.current_step),function(tip){return!tip.auto;});if(index>=0){tour.current_step+=index;}else{tour.current_step=tour.steps.length;}}
this.active_tooltips[tour_name]=tour.steps[tour.current_step];},_consume_tour:function(tour_name,error){delete this.active_tooltips[tour_name];if(this.tours[tour_name].rainbowMan&&this.running_tour!==tour_name&&this.tours[tour_name].current_step===this.tours[tour_name].steps.length){var $rainbow_message=$('<strong>'+'<b>Good job!</b>'+' You went through all steps of this tour.'+'</strong>');new RainbowMan({message:$rainbow_message}).appendTo(this.$body);}
this.tours[tour_name].current_step=0;local_storage.removeItem(get_step_key(tour_name));if(this.running_tour===tour_name){this._stop_running_tour_timeout();local_storage.removeItem(get_running_key());local_storage.removeItem(get_running_delay_key());this.running_tour=undefined;this.running_step_delay=undefined;if(error){_.each(this._log,function(log){console.log(log);});console.log(document.body.parentElement.outerHTML);console.error(error);console.error("test failed");}else{console.log(_.str.sprintf("Tour %s succeeded",tour_name));console.log("test successful");}
this._log=[];}else{var self=this;this._rpc({model:'web_tour.tour',method:'consume',args:[[tour_name]],}).then(function(){self.consumed_tours.push(tour_name);});}},_set_running_tour_timeout:function(tour_name,step){this._stop_running_tour_timeout();this.running_tour_timeout=setTimeout((function(){var descr=this._describeTip(step);this._consume_tour(tour_name,_.str.sprintf("Tour %s failed at step %s",tour_name,descr));}).bind(this),(step.timeout||RUNNING_TOUR_TIMEOUT)+this.running_step_delay);},_stop_running_tour_timeout:function(){clearTimeout(this.running_tour_timeout);this.running_tour_timeout=undefined;},_to_next_running_step:function(tip,tour_name){if(this.running_tour!==tour_name)return;var self=this;this._stop_running_tour_timeout();if(this.running_step_delay){_.delay(exec,this.running_step_delay);}else{exec();}
function exec(){var action_helper=new RunningTourActionHelper(tip.widget);do_before_unload(self._consume_tip.bind(self,tip,tour_name));if(typeof tip.run==="function"){tip.run.call(tip.widget,action_helper);}else if(tip.run!==undefined){var m=tip.run.match(/^([a-zA-Z0-9_]+) *(?:\(? *(.+?) *\)?)?$/);action_helper[m[1]](m[2]);}else{action_helper.auto();}}},STEPS:{SHOW_APPS_MENU_ITEM:{edition:'community',trigger:'.o_menu_apps a',auto:true,position:"bottom",},TOGGLE_HOME_MENU:{edition:"enterprise",trigger:".o_main_navbar .o_menu_toggle",content:_t('Click on the <i>Home icon</i> to navigate across apps.'),position:"bottom",},WEBSITE_NEW_PAGE:{trigger:"#new-content-menu > a",auto:true,position:"bottom",},},});});;

/* /web_tour/static/src/js/tour_service.js defined in bundle 'web.assets_common' */
odoo.define('web_tour.tour',function(require){"use strict";var config=require('web.config');var rootWidget=require('root.widget');var rpc=require('web.rpc');var session=require('web.session');var TourManager=require('web_tour.TourManager');if(config.device.isMobile){return Promise.reject();}
return session.is_bound.then(function(){var defs=[];if(session.is_frontend&&session.is_admin){var def=rpc.query({model:'web_tour.tour',method:'get_consumed_tours',});defs.push(def);}
return Promise.all(defs).then(function(results){var consumed_tours=session.is_frontend?results[0]:session.web_tours;var tour_manager=new TourManager(rootWidget,consumed_tours);var untracked_classnames=["o_tooltip","o_tooltip_content","o_tooltip_overlay"];var check_tooltip=_.debounce(function(records){var update=_.some(records,function(record){return!(is_untracked(record.target)||_.some(record.addedNodes,is_untracked)||_.some(record.removedNodes,is_untracked));function is_untracked(node){var record_class=node.className;return(_.isString(record_class)&&_.intersection(record_class.split(' '),untracked_classnames).length!==0);}});if(update){tour_manager.update();}},500);var observer=new MutationObserver(check_tooltip);var start_service=(function(){return function(observe){var promise=new Promise(function(resolve,reject){$(function(){_.defer(function(){tour_manager._register_all(observe);if(observe){observer.observe(document.body,{attributes:true,childList:true,subtree:true,});}
resolve();});});});return promise;};})();start_service(session.is_admin||tour_manager.running_tour);if(!session.is_admin){var run=tour_manager.run;tour_manager.run=function(){var self=this;var args=arguments;start_service(true).then(function(){run.apply(self,args);if(!self.running_tour){observer.disconnect();}});};var _consume_tour=tour_manager._consume_tour;tour_manager._consume_tour=function(){_consume_tour.apply(this,arguments);observer.disconnect();};}
odoo.startTour=tour_manager.run.bind(tour_manager);return tour_manager;});});});;

/* /web_tour/static/src/js/tour_disable.js defined in bundle 'web.assets_common' */
odoo.define('web_tour.DisableTour',function(require){"use strict";var TourManager=require('web_tour.TourManager');TourManager.include({_register:function(do_update,tour,name){if(!this.running_tour){this.consumed_tours.push(name);}
return this._super.apply(this,arguments);},});});