{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap dd7e6f7a02017778d454","webpack:///./src/main.js","webpack:///external {\"root\":\"jQuery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\",\"amd\":\"jquery\"}","webpack:///./~/sprintf-js/src/sprintf.js","webpack:///(webpack)/buildin/amd-define.js","webpack:///./~/timekit-sdk/src/timekit.js","webpack:///./~/es6-promise-promise/index.js","webpack:///./~/es6-promise/dist/es6-promise.js","webpack:///./~/process/browser.js","webpack:///vertx (ignored)","webpack:///./~/axios/index.js","webpack:///./~/axios/lib/axios.js","webpack:///./~/axios/lib/defaults.js","webpack:///./~/axios/lib/utils.js","webpack:///./~/axios/lib/helpers/normalizeHeaderName.js","webpack:///./~/axios/lib/core/dispatchRequest.js","webpack:///./~/axios/lib/adapters/xhr.js","webpack:///./~/axios/lib/helpers/buildURL.js","webpack:///./~/axios/lib/helpers/parseHeaders.js","webpack:///./~/axios/lib/helpers/transformData.js","webpack:///./~/axios/lib/helpers/isURLSameOrigin.js","webpack:///./~/axios/lib/helpers/btoa.js","webpack:///./~/axios/lib/helpers/settle.js","webpack:///./~/axios/lib/helpers/cookies.js","webpack:///./~/axios/lib/core/InterceptorManager.js","webpack:///./~/axios/lib/helpers/isAbsoluteURL.js","webpack:///./~/axios/lib/helpers/combineURLs.js","webpack:///./~/axios/lib/helpers/bind.js","webpack:///./~/axios/lib/helpers/spread.js","webpack:///./~/base-64/base64.js","webpack:///(webpack)/buildin/module.js","webpack:///./~/humps/humps.js","webpack:///./~/deepmerge/dist/cjs.js","webpack:///./~/fullcalendar/dist/fullcalendar.js","webpack:///./~/moment/moment.js","webpack:///./~/moment/locale en-gb","webpack:///./~/moment/locale/en-gb.js","webpack:///./~/moment-timezone/builds/moment-timezone-with-data-2012-2022.js","webpack:///./~/fullcalendar/dist/fullcalendar.css?34a3","webpack:///./~/fullcalendar/dist/fullcalendar.css","webpack:///./~/css-loader/lib/css-base.js","webpack:///./~/style-loader/addStyles.js","webpack:///./src/utils.js","webpack:///./~/console-polyfill/index.js","webpack:///./src/defaults.js","webpack:///./src/styles/fullcalendar.scss?64b6","webpack:///./src/styles/fullcalendar.scss","webpack:///./src/styles/utils.scss?c3d7","webpack:///./src/styles/utils.scss","webpack:///./src/styles/main.scss?04c9","webpack:///./src/styles/main.scss","webpack:///./src/styles/testmoderibbon.scss?891a","webpack:///./src/styles/testmoderibbon.scss","webpack:///./src/assets/timezone-icon.svg","webpack:///./src/templates/timezone-helper.html","webpack:///./~/hogan.js/lib/hogan.js","webpack:///./~/hogan.js/lib/compiler.js","webpack:///./~/hogan.js/lib/template.js","webpack:///./src/templates/testmoderibbon.html","webpack:///./src/templates/user-avatar.html","webpack:///./src/templates/user-displayname.html","webpack:///./src/templates/loading.html","webpack:///./src/assets/loading-spinner.svg","webpack:///./src/templates/error.html","webpack:///./src/assets/error-warning-icon.svg","webpack:///./src/templates/booking-fields.html","webpack:///./src/templates/booking-page.html","webpack:///./src/assets/close-icon.svg","webpack:///./src/assets/checkmark-icon.svg","webpack:///./src/assets/error-icon.svg","webpack:///./src/templates/poweredby.html","webpack:///./src/assets/timekit-logo.svg"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,MAAK;AACL;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,MAAK;AACL;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,MAAK;AACL;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAwB,oBAAoB;;AAE5C;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;;AAEP;;AAEA,MAAK;AACL;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,MAAK;;AAEL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA,gDAA+C,kBAAkB;AACjE,8CAA6C,mBAAmB;AAChE,6CAA4C,oBAAoB;AAChE,iDAAgD,gBAAgB;AAChE,mDAAkD,cAAc;;AAEhE;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA6B,mBAAmB;AAChD,MAAK;;AAEL;;AAEA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,MAAK;;AAEL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,MAAK;;AAEL;;AAEA,MAAK;;AAEL;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,uBAAsB;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;;AAEL;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,2BAA0B,kCAAkC;AAC5D,6BAA4B,gCAAgC;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;;AAEA;AACA;;AAEA,6BAA4B;;AAE5B;;AAEA;;AAEA;AACA,8CAA6C;AAC7C;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,sCAAqC;;AAErC;AACA;AACA;AACA;;AAEA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C;AAC1C;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;;AAEL;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAuB,8BAA8B;AACrD;AACA;AACA;AACA,yBAAwB,kCAAkC;AAC1D,MAAK;AACL;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA,kBAAiB;AACjB;AACA;;AAEA;;AAEA;AACA;;AAEA,qDAAoD,kBAAkB;AACtE;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,EAAC;AACD;AACA;;;;;;;ACt9BA,gD;;;;;;ACAA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B;AACA,gCAA+B,qBAAqB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,qCAAoC;AACpC;AACA;AACA,uBAAsB;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA,EAAC;;;;;;;ACzND,8BAA6B,mDAAmD;;;;;;;ACAhF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,uCAAsC,kBAAkB;AACxD;AACA;AACA;;AAEA;AACA,yDAAwD,6CAA6C;;AAErG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;AACA,+BAA8B,6BAA6B;AAC3D;AACA;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;AACL;AACA,MAAK;;AAEL;;AAEA;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;AACA,aAAY;AACZ,eAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;ACl9BA;;;;;;;aCAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC,qBAAqB;;AAEtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kFAAiF;;AAEjF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA0B,sBAAsB;;AAEhD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAiB,SAAS;AAC1B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA,EAAC;AACD;AACA,EAAC;AACD;AACA,EAAC;AACD;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;AACH;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,IAAI;AACd;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAiB,wBAAwB;AACzC;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAiB,uCAAuC;AACxD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,QAAO;AACP;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,MAAM;AAChB,WAAU,OAAO;AACjB;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAU,MAAM;AAChB;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA,sBAAqB,YAAY;AACjC;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,IAAI;AACd;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;;AAEA;AACA,WAAU,SAAS;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,gBAAe;AACf;AACA;AACA;AACA,YAAW;AACX,UAAS;AACT;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;;AAEA;AACA,aAAY,SAAS;AACrB,aAAY,SAAS;AACrB;AACA,cAAa;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA,aAAY,SAAS;AACrB;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,EAAC;AACD,qC;;;;;;;ACjoCA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAqC;;AAErC;AACA;AACA;;AAEA,4BAA2B;AAC3B;AACA;AACA;AACA,6BAA4B,UAAU;;;;;;;ACvLtC,gB;;;;;;ACAA,0C;;;;;;ACAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAgC;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA,kDAAiD,gBAAgB;;AAEjE;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B,wCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA,MAAK;AACL;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,EAAC;;;;;;;;AC1HD;;AAEA;AACA;;AAEA,iCAAgC;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAwE;AACxE;AACA;AACA;AACA,wDAAuD;AACvD;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,QAAO,YAAY;AACnB;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;;AAEH;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;;;;;ACvEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,aAAa;AACxB,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAmC,OAAO;AAC1C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA2B;AAC3B;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA,wCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpRA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;;;;;;ACXA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;;;;;;;;;AChCA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2CAA0C;AAC1C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACjKA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAiB,eAAe;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACpCA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,cAAc;AACzB,YAAW,MAAM;AACjB,YAAW,eAAe;AAC1B,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACnBA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;;;;;;ACnEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACnCA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;;;;;;ACjBA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yCAAwC;AACxC,QAAO;;AAEP;AACA,2DAA0D,wBAAwB;AAClF;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,iCAAgC;AAChC,8BAA6B,aAAa,EAAE;AAC5C;AACA;AACA,IAAG;AACH;;;;;;;ACpDA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB;AACA,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;;;;;;ACnDA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;;;;;;ACXA;;AAEA;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;;;;;;;ACVA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA,YAAW,SAAS;AACpB,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;;;;;;;mCC1BA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAEA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;AACF,oBAAmB;AACnB;AACA,IAAG,OAAO;AACV;AACA;AACA;AACA;AACA,GAAE,OAAO;AACT;AACA;;AAEA,EAAC;;;;;;;;ACpKD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wBAAuB,KAAK;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA,EAAC;;;;;;;AClID;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,uCAAsC;AACtC;;AAEA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;;;;;;;AChGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,sDAAqD;AACrD,iBAAgB;;AAEhB,mCAAkC;AAClC;AACA,+CAA8C;AAC9C,iBAAgB;;AAEhB;AACA;;AAEA;AACA,cAAa;AACb;AACA;AACA;AACA,qCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAqB;AACrB;AACA,iCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB;AACvB;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,4DAA2D;AAC3D,+EAA8E;AAC9E,mBAAkB;AAClB,uBAAsB;AACtB,uBAAsB;AACtB;;AAEA,0BAAyB;;AAEzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,gFAA+E;AAC/E;;AAEA;AACA;AACA;AACA;AACA;AACA,+DAA8D;;AAE9D,mCAAkC;AAClC;AACA;AACA,GAAE;AACF;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF,kBAAiB;;AAEjB;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF,uDAAsD;AACtD,YAAW,yBAAyB,EAAE;;AAEtC;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,2BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,YAAW;;AAEX,iEAAgE;AAChE;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA,6BAA4B;AAC5B;AACA;AACA;;;AAGA;;AAEA;;AAEA,oCAAmC;AACnC;AACA;AACA;AACA;AACA;;AAEA,wCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,qDAAoD;AACpD;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAY,mBAAmB;AAC/B;;AAEA;AACA;AACA;AACA,OAAM,uCAAuC;AAC7C,OAAM;AACN;AACA;AACA;AACA,gBAAe,cAAc;AAC7B;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA,aAAY,uBAAuB;AACnC;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+FAA8F;;;AAG9F;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;;AAGA;AACA;AACA;AACA;AACA,GAAE;AACF;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAY,sBAAsB;AAClC;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAa;AACb;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA,oBAAmB,UAAU;AAC7B;AACA;AACA;;AAEA,oBAAmB;AACnB;AACA;AACA,sCAAqC;AACrC;AACA;AACA,QAAO,WAAW,aAAa;AAC/B;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA0B,qBAAqB;AAC/C;AACA,0BAAyB,yBAAyB;AAClD;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA,8BAA6B,EAAE;AAC/B;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA,0BAAyB;;;AAGzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAa,yBAAyB;AACtC;AACA;;AAEA;AACA,iCAAgC,QAAQ;AACxC;;AAEA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA8B,QAAQ;AACtC;;AAEA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,oBAAoB;AAC/B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA,4BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA,eAAc,oBAAoB;AAClC;AACA;AACA;AACA;AACA;;;AAGA;AACA,sCAAqC;AACrC,uBAAsB;AACtB,uBAAsB;AACtB,yBAAwB;AACxB,yBAAwB;AACxB;AACA;;;AAGA;AACA,4BAA2B;AAC3B;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF,2BAA0B;AAC1B;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;;AAGA;AACA;AACA;;;AAGA,gCAA+B;AAC/B;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAoC,EAAE;AACtC;AACA,UAAS,EAAE;AACX,gCAA+B;AAC/B,iCAAgC,kBAAkB;;AAElD;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,sBAAqB;AACrB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;AACA;AACA;AACA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAAyB;AACzB;AACA,wBAAuB;AACvB;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;;AAEA,2BAA0B;;AAE1B;AACA;;;AAGA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,wDAAuD;AACvD;AACA;AACA;AACA,wDAAuD;AACvD;;AAEA,oDAAmD;AACnD;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,QAAO;;AAEP,2BAA0B;;AAE1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,kBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,0BAAyB;AACzB;;AAEA,cAAa;AACb;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,kBAAiB;;AAEjB;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAa;AACb;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAa;AACb;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA,oBAAmB;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;;AAEA,2CAA0C;AAC1C,yCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA0B;AAC1B;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA8B;;AAE9B;AACA;AACA;AACA;AACA,qCAAoC;;AAEpC;AACA;AACA;AACA;AACA,6BAA4B;AAC5B,gGAA+F;;AAE/F;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA,GAAE;AACF,qBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK,yBAAyB;AAC9B,MAAK,0BAA0B;AAC/B,MAAK,yBAAyB;AAC9B,MAAK,yBAAyB;AAC9B,MAAK,wBAAwB;AAC7B,MAAK,wBAAwB;AAC7B;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAmD;AACnD;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+CAA8C;AAC9C,+CAA8C;;AAE9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uBAAsB,mBAAmB;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA,uBAAsB;AACtB,iBAAgB,qCAAqC;AACrD;AACA,uBAAsB;AACtB,iBAAgB,kBAAkB;AAClC;AACA,uBAAsB;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAY,mBAAmB;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAY,mBAAmB;AAC/B;;AAEA;AACA;AACA,sDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAY,sBAAsB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mDAAkD;AAClD,2BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAY,mBAAmB;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA,kBAAiB;;AAEjB;AACA,mBAAkB;;;AAGlB;AACA;AACA;AACA;AACA;;AAEA,aAAY,sBAAsB;AAClC;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA,eAAc;AACd,GAAE;;;AAGF;AACA;AACA,eAAc;AACd,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;AAEA,eAAc;AACd,GAAE;;;AAGF;AACA,uDAAsD;;AAEtD;AACA,kCAAiC,aAAa;;AAE9C,eAAc;AACd,GAAE;;;AAGF;;AAEA;AACA;AACA,kCAAiC,+BAA+B;;AAEhE,eAAc;AACd,GAAE;;;AAGF;AACA,sCAAqC;;AAErC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;AACD;;AAEA;;AAEA,qBAAoB;;;AAGpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA,cAAa,oBAAoB;AACjC;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA,sBAAqB;AACrB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF,yBAAwB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAa,kBAAkB;AAC/B;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,uBAAsB;AACtB;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,mBAAkB;AAClB,uBAAsB;AACtB;;AAEA;AACA;AACA,gCAA+B;AAC/B,iCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,4BAA2B;;AAE3B;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,2BAA0B;;AAE1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA,KAAI;;AAEJ;AACA;AACA,KAAI;AACJ,IAAG;;AAEH;AACA;AACA;;AAEA,oCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA,EAAC;;;AAGD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;;;AAGA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oBAAmB;AACnB;AACA;AACA,MAAK;AACL,iBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA,wCAAuC;AACvC;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF,uBAAsB;AACtB;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA,wBAAuB;;AAEvB;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,+BAA8B,cAAc;AAC5C;AACA,kBAAiB;AACjB;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,2BAA0B,QAAQ;AAClC;;AAEA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA,8BAA6B;;AAE7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA6B;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV,YAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA,iCAAgC;AAChC;AACA;AACA;AACA;;AAEA,0DAAyD;AACzD;AACA,oBAAmB;AACnB,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,SAAS;AAC5B,kEAAiE,sBAAsB;AACvF;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAwB;AACxB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,gCAA+B;AAC/B;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA,qCAAoC;AACpC,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,2CAA0C;;AAE1C;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,kBAAiB;;AAEjB;AACA;AACA,kDAAiD;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,6BAA4B;AAC5B,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA,kCAAiC;AACjC;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,EAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;;AAEA,0BAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA,wBAAuB;;AAEvB;AACA;AACA,kDAAiD;AACjD;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAe;;AAEf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAkD;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA,qDAAoD;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;;AAEA,6BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,+BAA8B;AAC9B,8BAA6B;AAC7B;AACA;AACA;AACA,oCAAmC;AACnC,oEAAmE;AACnE;AACA;AACA;;AAEA,gCAA+B;AAC/B,+BAA8B;AAC9B;AACA;AACA;AACA,qCAAoC;AACpC,mEAAkE;AAClE;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,2CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA4B;;AAE5B;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,EAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA,oCAAmC;;AAEnC;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA6B;;AAE7B;AACA,iBAAgB;AAChB;;AAEA;AACA;AACA,2CAA0C;AAC1C;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAkB;AAClB;;AAEA;AACA;;AAEA,oDAAmD;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,iEAAgE;;AAEhE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,4DAA2D;;AAE3D;;AAEA,qCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,+DAA8D;AAC9D,GAAE;;;AAGF;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,sEAAqE;;AAErE;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,iEAAgE;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAgC;AAChC;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,KAAI,iBAAiB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;;AAEA;AACA;AACA,4BAA2B;;AAE3B;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;AACA;;AAEA,EAAC;;;AAGD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,uBAAsB;AACtB;AACA;;;AAGA;AACA;AACA;;AAEA,sBAAqB;AACrB;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,8EAA6E;AAC7E,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA,wBAAuB;AACvB;AACA;;AAEA,oCAAmC;;AAEnC;AACA;AACA;AACA;;AAEA,+CAA8C;AAC9C;;AAEA;;AAEA,2DAA0D;AAC1D;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,gBAAe;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA,GAAE;;;AAGF;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA,cAAa,qBAAqB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAa,qBAAqB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAa,qBAAqB;AAClC;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;;AAIF;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAoB;;AAEpB;AACA,eAAc,iBAAiB;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,kCAAiC;AACjC;AACA;;AAEA;AACA,6BAA4B;AAC5B;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH,0BAAyB;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;AACA,0BAAyB;;AAEzB,mBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gDAA+C;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAiC;AACjC;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAmC;AACnC;AACA;AACA;;AAEA,wCAAuC;AACvC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA,qEAAoE;AACpE;AACA,+BAA8B;AAC9B,wCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,WAAU;AACV,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,cAAa,qBAAqB;AAClC;AACA;AACA;AACA,GAAE;;;AAGF,4BAA2B;AAC3B;AACA,GAAE;;;AAGF,wBAAuB;AACvB;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,sDAAqD;AACrD;;AAEA;AACA;AACA,oDAAmD;AACnD;;AAEA;AACA;AACA,GAAE;;;;AAIF;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sDAAqD;AACrD;;AAEA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAAyC;AACzC;AACA;AACA,4CAA2C;AAC3C;AACA;AACA,+CAA8C;AAC9C;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;;AAEA,cAAa,wBAAwB;AACrC;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;;AAEA,cAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAa,iBAAiB;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,mBAAkB;;AAElB;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,wBAAuB;AACvB;AACA,KAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,0BAAyB;;AAEzB;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,2BAA0B;AAC1B,KAAI;AACJ;AACA;AACA;;AAEA,mBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,wBAAuB;AACvB;AACA;AACA,KAAI;AACJ,yBAAwB;AACxB;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,4BAA2B;AAC3B;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAM,yBAAyB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA,qCAAoC;;AAEpC;AACA;AACA,yCAAwC;AACxC;AACA,IAAG;AACH,GAAE;;;AAGF;AACA,iDAAgD;AAChD;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;;AAGF;AACA;AACA;AACA,iBAAgB;;AAEhB;AACA,oCAAmC;AACnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;;AAGF;AACA,kDAAiD,cAAc;;AAE/D;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAoD;;AAEpD;AACA;AACA,sDAAqD;AACrD;;AAEA;AACA;AACA,sCAAqC;;AAErC,uCAAsC;AACtC;AACA,KAAI;AACJ;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD;;AAElD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA,cAAa,4BAA4B;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAkD;AAClD;AACA,qBAAoB;AACpB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,0BAAyB;AACzB;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC;AACrC;AACA,wCAAuC;AACvC,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA0B;AAC1B;AACA;AACA,2BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ,wBAAuB;AACvB,yBAAwB;AACxB,0BAAyB;AACzB;AACA,KAAI;AACJ,yBAAwB;AACxB;AACA,KAAI;AACJ;AACA,0BAAyB;;AAEzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,sCAAqC;AACrC;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,wBAAuB;AACvB;AACA,wCAAuC;AACvC,KAAI;AACJ,yBAAwB;AACxB;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;;AAEA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;;AAEA,+BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;AACA,oCAAmC;AACnC;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,mCAAkC;AAClC,sBAAqB;;AAErB;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,+DAA8D;AAC9D;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,2BAA0B;AAC1B,KAAI;AACJ,yBAAwB;AACxB;AACA;AACA,KAAI;AACJ;;AAEA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH,8BAA6B;AAC7B,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,eAAc;AACd;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA,cAAa,4BAA4B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,EAAC;;;AAGD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,gBAAe;AACf;AACA;;AAEA,eAAc,eAAe;AAC7B;;AAEA;AACA;AACA,4BAA2B,cAAc;AACzC;AACA,SAAQ;AACR;AACA;;AAEA;AACA;AACA,2BAA0B,6BAA6B,EAAE;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAAyB,uCAAuC;AAChE,0BAAyB,sCAAsC,EAAE;AACjE,yBAAwB,yCAAyC;AACjE,sBAAqB,mCAAmC;;AAExD;AACA;AACA;AACA;;AAEA,UAAS;AACT;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,eAAc,iBAAiB;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAa;AACb,iBAAgB;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA,GAAE;;;AAGF;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gEAA+D;;AAE/D;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA8B;AAC9B;AACA,qCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,WAAU;AACV,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA,wCAAuC;AACvC;AACA;AACA;AACA,kBAAiB;AACjB;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,6DAA4D;AAC5D,4DAA2D;AAC3D,qFAAoF;AACpF;AACA;AACA,yBAAwB;AACxB,yBAAwB;;AAExB,gBAAe,mBAAmB;AAClC;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mCAAkC;AAClC,kCAAiC;;AAEjC,8BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,6DAA4D;AAC5D,4DAA2D;AAC3D,qFAAoF;AACpF;AACA;AACA,yBAAwB;AACxB;AACA,yBAAwB;;AAExB,gBAAe,mBAAmB;AAClC;AACA;;AAEA,sBAAqB,cAAc;;AAEnC;AACA;AACA;;AAEA;AACA,oCAAmC;AACnC,mCAAkC;;AAElC,+BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA,iCAAgC;AAChC,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,gBAAe,mBAAmB;AAClC;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,gEAA+D;AAC/D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAA+C;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO,6DAA6D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA,iCAAgC;AAChC,GAAE;;;AAGF;AACA;AACA;;AAEA,gBAAe,mBAAmB;AAClC;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,gEAA+D;AAC/D;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;;AAGA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAe,cAAc;AAC7B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;;AAEH;AACA,gBAAe,cAAc;AAC7B,iBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA,+CAA8C;AAC9C;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,gBAAe,mBAAmB;AAClC;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,gEAA+D;AAC/D;AACA;AACA;;AAEA;AACA;AACA,mBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK,2BAA2B;AAChC,MAAK,4BAA4B;AACjC;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK,2BAA2B;AAChC;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,2CAA0C;AAC1C,GAAE;;;AAGF;AACA;AACA,2BAA0B;AAC1B,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,0EAAyE;AACzE,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,cAAa,4BAA4B;AACzC;AACA;;AAEA;AACA;AACA,kEAAiE;AACjE;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;;AAEA,cAAa,4BAA4B;AACzC;AACA;;AAEA,iEAAgE;AAChE,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA,oCAAmC;AACnC;;AAEA;AACA;AACA,2BAA0B;AAC1B,yEAAwE;AACxE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,4CAA2C;;AAE3C,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;;AAEA;;AAEA;;;AAGA;AACA;AACA,2BAA0B;AAC1B,wDAAuD;AACvD,GAAE;;;AAGF;AACA;AACA;AACA,oCAAmC;AACnC,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH,6DAA4D;AAC5D,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH,eAAc;AACd,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAoC;;AAEpC;AACA,gBAAe,sBAAsB;AACrC;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iDAAgD;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,gDAA+C;AAC/C,gDAA+C;AAC/C;AACA,sBAAqB;AACrB,uBAAsB;AACtB,2BAA0B;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAa,cAAc,OAAO;AAClC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,sBAAsB,OAAO;AAC5C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA2B;AAC3B;AACA;AACA;;AAEA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;;AAEA;AACA,eAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,cAAa,mBAAmB;AAChC;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;;AAEA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA;;AAEA,aAAY,sBAAsB;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA,2BAA0B;AAC1B;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,WAAU;AACV;;AAEA,gBAAe,yBAAyB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,mCAAkC;AAClC,kCAAiC;AACjC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,cAAa,kBAAkB;AAC/B,iDAAgD;;AAEhD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAe;AACf,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB,eAAc;AACd,iBAAgB;AAChB,kBAAiB;AACjB,oBAAmB;AACnB;AACA,iBAAgB;AAChB,sBAAqB;AACrB,oBAAmB;AACnB;AACA,oBAAmB;AACnB;AACA;;AAEA;AACA,qCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+DAA8D;AAC9D;AACA;;AAEA;AACA,mCAAkC;;AAElC;AACA,eAAc,sBAAsB;AACpC;AACA,kCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAAyB;AACzB,mDAAkD;AAClD;AACA;;AAEA;AACA,iBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uDAAsD;AACtD;AACA;AACA;;AAEA,iCAAgC;AAChC,qCAAoC;AACpC,2CAA0C;AAC1C;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA,OAAM;AACN;;AAEA;AACA;AACA;AACA,gDAA+C;AAC/C;AACA;AACA,KAAI;AACJ,GAAE;;;AAGF;AACA;AACA;AACA;AACA,oCAAmC;AACnC,aAAY;AACZ;;AAEA;AACA,oBAAmB;AACnB;AACA;AACA,gCAA+B;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAgB,8BAA8B;AAC9C;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uEAAsE;AACtE;AACA;AACA,8CAA6C;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAAyC;AACzC;;AAEA,cAAa,iBAAiB;;AAE9B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA,+BAA8B;;AAE9B;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAqD;AACrD;AACA,gBAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mDAAkD;;AAElD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAA+B;;AAE/B;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA,kDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAuC;AACvC,GAAE;;;AAGF;AACA;AACA,2CAA0C;AAC1C,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,sDAAqD;AACrD,6DAA4D;AAC5D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA,4CAA2C;AAC3C,6CAA4C;AAC5C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,qBAAoB,4BAA4B;;AAEhD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA,kCAAiC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,qEAAoE;AACpE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;;;AAIF;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,aAAY;;AAEZ;AACA;AACA;AACA;AACA,SAAQ;;AAER,eAAc,4BAA4B;AAC1C;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,iEAAgE;AAChE,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA,mBAAkB;AAClB,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA,yBAAwB;AACxB;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,4CAA2C;AAC3C;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,eAAc;AACd,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;;AAEA,uBAAsB;AACtB,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA,iDAAgD;AAChD;AACA;AACA;AACA,eAAc;AACd,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA,mDAAkD;AAClD;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA,uDAAsD;AACtD;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAe,mBAAmB,SAAS;AAC3C;;AAEA,eAAc,iBAAiB;AAC/B;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA,GAAE;;;;AAIF;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA,oCAAmC;AACnC;;AAEA,gBAAe,mBAAmB;AAClC;AACA;;AAEA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB;AACnB,qBAAoB;;AAEpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAwF;AACxF;AACA;AACA;AACA;AACA;AACA;AACA,sEAAqE;AACrE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,kCAAiC;AACjC,sCAAqC;AACrC;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA,4BAA2B;AAC3B;AACA;;AAEA;;AAEA,eAAc,mBAAmB;AACjC;AACA;;AAEA,eAAc,mBAAmB;AACjC;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAuC;;AAEvC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kCAAiC;;AAEjC;AACA;AACA,aAAY,sBAAsB;AAClC;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,cAAa,iBAAiB;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,yCAAwC;AACxC,uCAAsC;AACtC,gDAA+C;AAC/C,YAAW;AACX,aAAY;;AAEZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAA+B;AAC/B;AACA;;AAEA;AACA;AACA,8DAA6D;AAC7D;;AAEA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAU,eAAe;AACzB;;AAEA;AACA,YAAW,iBAAiB;AAC5B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAU,iBAAiB;AAC3B;;AAEA,YAAW,gBAAgB;AAC3B;;AAEA;AACA,eAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAAyC;;AAEzC,YAAW,sBAAsB;AACjC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,eAAc,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC;AACtC;AACA;AACA,gBAAe;AACf;AACA;AACA,gBAAe;AACf;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,gEAA+D;;AAE/D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA,kBAAiB;AACjB;;AAEA;AACA;AACA,8BAA6B;AAC7B;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mBAAkB;AAClB;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;;AAEZ;AACA;AACA;AACA,gDAA+C;;AAE/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC,gEAA+D;AAC/D,MAAK;AACL;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,gCAA+B;;AAE/B;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,sBAAqB,iBAAiB;AACtC;AACA,GAAE;;;AAGF;AACA,kEAAiE;;AAEjE;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA,aAAY;AACZ,GAAE;;;AAGF;AACA,aAAY;AACZ,GAAE;;;AAGF;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;;AAEA,2BAA0B;AAC1B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA,yBAAwB;AACxB;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAiB;AACjB;;AAEA;AACA;AACA;AACA,OAAM;AACN;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,kBAAiB;AACjB;;AAEA;AACA;AACA;AACA,OAAM;AACN;AACA,KAAI;AACJ;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM,OAAO;AACb;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM,OAAO;AACb;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA,8BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,qEAAoE;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,6BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA,kBAAiB;AACjB;AACA;AACA,KAAI;;AAEJ;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA,qEAAoE;;AAEpE;AACA;AACA;AACA,IAAG;AACH;;AAEA,EAAC;;;AAGD;AACA;AACA,EAAC;AACD;AACA,EAAC;;;AAGD;AACA;AACA,EAAC;;;AAGD;AACA;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;;;AAGD;AACA,sDAAqD;AACrD,EAAC;AACD;AACA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,cAAa,2BAA2B;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,uBAAsB;AACtB,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAU;AACV,GAAE;;;AAGF;AACA,2BAA0B,UAAU;AACpC,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,wCAAuC;AACvC;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,UAAU;AACrC;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,iDAAgD;AAChD,4BAA2B;AAC3B;AACA;;AAEA;AACA,0BAAyB;AACzB;;AAEA,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA8B;AAC9B;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAqB,mDAAmD;AACxE,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,EAAC;;AAED;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAoB;AACpB,qBAAoB;AACpB;AACA;AACA;;AAEA;AACA,sDAAqD,SAAS;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAiD;AACjD;AACA,uCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,sDAAqD;AACrD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA,sDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC;AACrC;AACA,KAAI;AACJ;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,8BAA6B;AAC7B;AACA;;AAEA,2BAA0B;AAC1B;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAwB;AACxB;;AAEA;AACA;AACA;;AAEA,yCAAwC;;AAExC;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,mBAAkB;AAClB,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;;AAEA;;AAEA,+CAA8C;AAC9C,iCAAgC;AAChC;AACA,MAAK;AACL;AACA,UAAS;AACT,6DAA4D;AAC5D;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,gCAA+B;AAC/B;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qCAAoC;AACpC;AACA,GAAE;;;AAGF;AACA,uCAAsC;AACtC;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA,oCAAmC;AACnC;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,+CAA8C;AAC9C,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF,wBAAuB;AACvB;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF,8BAA6B;AAC7B;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA,+BAA8B,aAAa;AAC3C;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA,8BAA6B;AAC7B;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,uCAAsC;AACtC;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,6CAA4C;;AAE5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA0B;AAC1B;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAwB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAgD;;AAEhD;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA0B;AAC1B,8BAA6B;AAC7B;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC;AAClC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6CAA4C,YAAY;AACxD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+DAA8D;AAC9D;;AAEA;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAuB;AACvB;AACA;AACA;AACA;AACA,+CAA8C;AAC9C;AACA;AACA,qDAAoD;AACpD;;AAEA,4BAA2B;;AAE3B;AACA,GAAE;;;AAGF;AACA,+BAA8B;;AAE9B;AACA;AACA;AACA;AACA,kCAAiC;AACjC;;AAEA;;AAEA;AACA,GAAE;;;AAGF;AACA,+BAA8B;;AAE9B;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oBAAmB;AACnB,0DAAyD;AACzD,uDAAsD;AACtD;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;;AAIF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAmB;AACnB;;AAEA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;;;AAGA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,kDAAiD;AACjD,yCAAwC;AACxC;AACA,KAAI;;AAEJ,eAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,sBAAqB;AACrB,0BAAyB;AACzB,2BAA0B;AAC1B;AACA,YAAW;AACX,iBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAmB;;AAEnB,qCAAoC;AACpC,aAAY;AACZ;;AAEA;AACA;AACA,8CAA6C;AAC7C;AACA;AACA;;AAEA;AACA,uCAAsC;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,6BAA4B;;AAE5B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,sDAAqD;AACrD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8BAA6B;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAqB;;AAErB;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;;AAIF;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,+BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+BAA8B;AAC9B;;AAEA,gBAAe;AACf;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF,yBAAwB;AACxB;AACA;;AAEA,gDAA+C;AAC/C;AACA;AACA,uDAAsD;AACtD;AACA;AACA,8CAA6C;AAC7C;AACA;AACA,gDAA+C;AAC/C;AACA;AACA,uCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,sEAAqE;AACrE;AACA,IAAG;AACH;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;;AAEA,aAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA,8BAA6B;;AAE7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,aAAY,4BAA4B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAa,4BAA4B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA0B;AAC1B,6BAA4B;;AAE5B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;;AAGA;AACA;;AAEA,aAAY,iCAAiC;AAC7C;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA,iEAAgE;;AAEhE,yBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;;AAGA;AACA;AACA;;AAEA,aAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA,aAAY,mCAAmC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAY,mCAAmC;AAC/C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA,aAAY,wBAAwB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;;AAGA;AACA,iDAAgD;AAChD,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,eAAc,oBAAoB;AAClC;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;;AAEA,cAAa,oBAAoB;AACjC;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;;AAEA,cAAa,oBAAoB;AACjC;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA,kBAAiB,wBAAwB;AACzC;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;;AAEA;AACA,eAAc,4BAA4B;AAC1C;AACA;AACA;;AAEA;;AAEA,sBAAqB;AACrB;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;;AAGF;AACA;;AAEA,kBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,wEAAuE;AACvE;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP,qBAAoB;;AAEpB;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,+BAA8B,UAAU;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;AAGA,6BAA4B;AAC5B;AACA;;;AAGA,yBAAwB;AACxB,WAAU;AACV;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wCAAuC;;;AAGvC;;;AAGA;AACA;AACA;;AAEA;AACA,oFAAmF;;AAEnF;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,gFAA+E;;AAE/E;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+CAA8C;AAC9C;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,+CAA8C;;AAE9C;AACA;;AAEA;AACA,qBAAoB;AACpB;AACA;AACA,6BAA4B;AAC5B;AACA;AACA,GAAE;;AAEF;AACA,0CAAyC;AACzC;AACA,4BAA2B;AAC3B,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,4BAA2B;AAC3B,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,4BAA2B;AAC3B,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,4BAA2B;AAC3B,GAAE;;AAEF;AACA;AACA;AACA,2BAA0B;AAC1B;;AAEA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAuC;AACvC;AACA;;AAEA;AACA;;AAEA,aAAY,mBAAmB;AAC/B;;AAEA;AACA,qCAAoC;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wCAAuC;AACvC;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,yCAAwC;AACxC;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;AACA,kDAAiD;AACjD;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA,iDAAgD;AAChD;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA,yCAAwC;AACxC;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,cAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA,6CAA4C;AAC5C;AACA,GAAE;;;AAGF;AACA;AACA;AACA,IAAG;;AAEH;AACA,oDAAmD;AACnD;AACA,GAAE;;;AAGF;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;;AAEA;AACA;;AAEA,oBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAqB;AACrB,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAa,sBAAsB;AACnC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;;AAGD;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA,kBAAiB,oBAAoB;AACrC;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,kBAAiB;;AAEjB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG,cAAc;AACjB;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,8BAA6B;AAC7B;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA,qBAAoB;AACpB;;AAEA;AACA,GAAE;;;AAGF;AACA,kBAAiB,sBAAsB;AACvC;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,cAAa,2BAA2B;AACxC;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA,iCAAgC;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA,qDAAoD;AACpD;;AAEA;AACA,GAAE;;;AAGF,oDAAmD;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA,uBAAsB;;AAEtB;;AAEA,mCAAkC;AAClC,+BAA8B;;AAE9B;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sDAAqD;AACrD,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mDAAkD;AAClD,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA,wBAAuB;;AAEvB;AACA;AACA,kCAAiC;AACjC;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;;AAGF;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8BAA6B;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,EAAC;;AAED;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;AAGD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,mEAAkE;;AAElE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;;AAGD;AACA;;;AAGA,+BAA8B;AAC9B;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;;AAGF;;AAEA;AACA;AACA;;AAEA,kBAAiB,uBAAuB;AACxC;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6BAA4B;AAC5B;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,EAAC;;;AAGD;AACA;;;AAGA,kCAAiC;AACjC;AACA;AACA;AACA,EAAC;;AAED;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA,cAAa,2BAA2B;AACxC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;;AAEA;AACA,kDAAiD;AACjD,IAAG;AACH,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAuC;AACvC;AACA,+CAA8C;AAC9C;AACA;AACA,iCAAgC;AAChC;AACA;AACA,qCAAoC;AACpC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,aAAY,sBAAsB;AAClC;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;;AAGA;AACA;AACA;AACA,GAAE;AACF;;;AAGA;AACA;AACA;AACA,GAAE;AACF;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,cAAa,yBAAyB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,EAAC;;;AAGD;AACA;;;AAGA;AACA;AACA;;;AAGA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;;AAEA;;AAEA;;AAEA;;;AAGA;AACA,gDAA+C;AAC/C,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA,cAAa,0BAA0B;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA,sCAAqC;AACrC,uBAAsB;AACtB,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;;AAEA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA,EAAC;;;AAGD;AACA;;AAEA;AACA,mCAAkC;AAClC;AACA;AACA,iCAAgC;AAChC,eAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;;AAEA;;AAEA;;AAEA;;AAEA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;;AAEA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA,EAAC;;;AAGD;AACA;;AAEA;AACA,sCAAqC;AACrC;AACA;AACA,oCAAmC;AACnC,eAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,2DAA0D;;AAE1D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;;AAEA,0CAAyC;AACzC;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,EAAC;;;AAGD;AACA;;AAEA;AACA,yCAAwC;AACxC;AACA;AACA,0CAAyC;AACzC,eAAc,iBAAiB;AAC/B;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;;AAEA;;AAEA;;AAEA;;AAEA,oBAAmB;;;AAGnB;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAY;AACZ,iBAAgB;AAChB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA,iCAAgC;;AAEhC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA,mDAAkD;AAClD;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA,mFAAkF;AAClF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wCAAuC;AACvC;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;AAEA,6EAA4E;AAC5E;;AAEA,oDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAkC;;AAElC;AACA;AACA,uCAAsC;AACtC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,uCAAsC;AACtC;;AAEA,iBAAgB;;AAEhB;AACA;;AAEA,wDAAuD;;AAEvD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,qDAAoD;AACpD,GAAE;;;AAGF;AACA;AACA;AACA,4CAA2C;AAC3C;AACA;AACA,wDAAuD;AACvD;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA,WAAU;AACV,GAAE;;;AAGF;AACA,WAAU;AACV,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,EAAC;;;AAGD;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO,6DAA6D;AACpE;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;AAEA;AACA;AACA;AACA;;AAEA,0DAAyD;AACzD,GAAE;;;AAGF;AACA;AACA,GAAE;;;AAGF;AACA,gFAA+E;AAC/E;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ;;AAEA;AACA;AACA,aAAY;AACZ;;AAEA;AACA;AACA,aAAY,YAAY;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA,gCAA+B;AAC/B,6CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,gCAA+B;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qEAAoE;AACpE,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;;AAEA,kDAAiD;AACjD,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA2B;AAC3B,yBAAwB;AACxB;;AAEA;AACA;AACA,oCAAmC;;AAEnC;AACA;AACA,6CAA4C;AAC5C;AACA;AACA;AACA;AACA;;AAEA,iBAAgB;;AAEhB;AACA;AACA;;AAEA,wDAAuD;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,qDAAoD;AACpD,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,UAAS;AACT;;AAEA,WAAU;AACV,GAAE;;;AAGF;AACA,WAAU;AACV,GAAE;;;AAGF;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;;AAGA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAO,2DAA2D;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;;AAEA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;AAGA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,GAAE,WAAW;AACb,GAAE,cAAc;AAChB,GAAE,cAAc;AAChB,GAAE,cAAc;AAChB,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY;AACZ;;AAEA;AACA;AACA,aAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA,2BAA0B;AAC1B,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,qDAAoD;AACpD,GAAE;;AAEF;AACA,+CAA8C;AAC9C,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA,EAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAoB,6BAA6B;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA,wDAAuD;;AAEvD;AACA;AACA;;AAEA,0CAAyC;AACzC,gCAA+B;AAC/B;AACA;AACA,GAAE;;AAEF;AACA;AACA,oCAAmC;;AAEnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,gDAA+C;AAC/C;AACA;AACA;AACA;AACA;;AAEA,qBAAoB,6BAA6B;AACjD;;AAEA,kBAAiB;;AAEjB;AACA;;AAEA;;AAEA,gBAAe,oBAAoB;AACnC,oCAAmC;AACnC;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA,sBAAqB;AACrB;;AAEA,cAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO,kCAAkC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,QAAO,iCAAiC;AACxC;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY,UAAU;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY,WAAW;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAY,UAAU;AACtB;AACA;AACA;AACA;;AAEA;;AAEA,WAAU;AACV,EAAC,E;;;;;;ACh7iBD;AACA;AACA;AACA;AACA;;AAEA,EAAC;AACD;AACA;AACA;AACA,EAAC,qBAAqB;;AAEtB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,gBAAgB;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;;AAEA,wBAAuB,SAAS;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,4CAA2C;AAC3C,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,IAAI;AAC3B;;AAEA;AACA,wBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAiC;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,yCAAwC,IAAI;;AAE5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6BAA4B;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAoB,iCAAiC;AACrD;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,wBAAuB,wBAAwB;AAC/C;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yLAAwL,IAAI;;AAE5L,kEAAiE,IAAI;;AAErE;;AAEA;;AAEA;AACA;AACA;AACA,2BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uCAAsC,YAAY;AAClD;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,2BAA0B;AAC1B,6BAA4B;AAC5B,0BAAyB,EAAE,EAAE;AAC7B,0BAAyB,EAAE,EAAE;AAC7B,+BAA8B,EAAE,EAAE;AAClC,8BAA6B;AAC7B,kCAAiC;AACjC,sCAAqC;AACrC,0BAAyB,IAAI,EAAE;AAC/B,0BAAyB,IAAI,EAAE;AAC/B,+BAA8B,IAAI,EAAE;;AAEpC,4BAA2B;AAC3B,iCAAgC;;AAEhC,2CAA0C;AAC1C,kDAAiD;;AAEjD,qCAAoC,IAAI,IAAI;;AAE5C;AACA;AACA,6HAA4H,IAAI;;;AAGhI;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA,2CAA0C;AAC1C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe,kBAAkB;AACjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe,QAAQ;AACvB;AACA;AACA;AACA,gBAAe,QAAQ;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAe,OAAO;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS,YAAY;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa;AACb;;AAEA;AACA;AACA;AACA;;;AAGA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wCAAuC,EAAE,IAAI,EAAE;AAC/C,qCAAoC,EAAE,IAAI,EAAE;;AAE5C;;AAEA;AACA,8BAA6B,EAAE;AAC/B,wBAAuB,EAAE;AACzB,0BAAyB,EAAE;AAC3B,wBAAuB,EAAE;AACzB,sBAAqB,EAAE,IAAI,EAAE;AAC7B,qBAAoB,EAAE;AACtB,4BAA2B,GAAG;AAC9B,sBAAqB,EAAE;AACvB;AACA,wBAAuB,EAAE,IAAI,EAAE;AAC/B,uBAAsB,EAAE,IAAI,EAAE;AAC9B,qBAAoB,EAAE;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA,6MAA4M,EAAE;;AAE9M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kCAAiC;AACjC;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wBAAuB;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAe,+BAA+B;AAC9C;AACA;;AAEA;AACA,WAAU,OAAO;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gBAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAe,sBAAsB;AACrC;AACA,mCAAkC;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,+BAA8B,gBAAgB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,UAAS;AACT;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAmB,qBAAqB;AACxC;AACA;AACA,8BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK,6BAA6B;AAClC;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe;;AAEf;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAgB;AAChB;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB,cAAc;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gCAA+B,qBAAqB;AACpD,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gCAA+B,qBAAqB;AACpD,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qBAAoB;AACpB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA,EAAC;;AAED;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;;;AAGD;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,qBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA;AACA;;AAEA,kBAAiB,mBAAmB;AACpC;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,QAAQ;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iCAAgC,IAAI;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;;AAED;;;AAGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,EAAC;;;;;;;;AC92ID;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAiC,uDAAuD;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACfA;AACA;AACA;;AAEA,EAAC;AACD,SACA;AACA;AACA;AACA,EAAC,2BAA2B;;;AAG5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,iCAAgC,IAAI;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA,EAAC;;;;;;;AClED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qZAA8B;AAC9B,GAAE;AACF,+CAA8C;AAC9C,GAAE;AACF,wBAAuB;AACvB;AACA,EAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAY;AACZ,aAAY;AACZ,aAAY;AACZ,eAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAS,kBAAkB;AAC3B;AACA;AACA;;AAEA;AACA,cAAa,uBAAuB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAiB,kBAAkB;AACnC;AACA;AACA;;AAEA;AACA,kBAAiB,YAAY;AAC7B,oEAAmE;AACnE;;AAEA;AACA;;AAEA;AACA;;AAEA,cAAa,oBAAoB;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA,eAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAc,SAAS;AACvB;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,mCAAkC,IAAI;AACtC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa,oBAAoB;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAuB;AACvB;AACA;;AAEA,cAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,cAAa,oBAAoB;AACjC;AACA,eAAc,mBAAmB;AACjC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,cAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,cAAa,oBAAoB;AACjC;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,iBAAgB,qBAAqB;AACrC;;AAEA;AACA;AACA,kBAAiB,2BAA2B;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;;AAGF;AACA,EAAC;;;;;;;AChrCD;;AAEA;AACA;AACA;AACA;AACA,gDAAmE,iBAAiB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;ACpBA;AACA;;;AAGA;AACA,8IAA6I,cAAc,gBAAgB,QAAQ,iBAAiB,SAAS,cAAc,cAAc,mBAAmB,WAAW,YAAY,mBAAmB,WAAW,gBAAgB,mBAAmB,WAAW,sBAAsB,SAAS,aAAa,eAAe,cAAc,mBAAmB,eAAe,6BAA6B,SAAS,UAAU,kBAAkB,iBAAiB,iCAAiC,2BAA2B,8BAA8B,kCAAkC,4BAA4B,+BAA+B,oBAAoB,kBAAkB,WAAW,cAAc,sBAAsB,kBAAkB,yBAAyB,sDAAsD,2BAA2B,qCAAqC,2DAA2D,WAAW,0CAA0C,sEAAsE,mEAAmE,WAAW,yBAAyB,gBAAgB,WAAW,qBAAqB,4BAA4B,0CAA0C,gCAAgC,sBAAsB,sBAAsB,qEAAqE,mBAAmB,eAAe,sBAAsB,YAAY,gBAAgB,iBAAiB,qBAAqB,uBAAuB,WAAW,kBAAkB,kCAAkC,cAAc,YAAY,kBAAkB,qCAAqC,uBAAuB,gBAAgB,iCAAiC,aAAa,iCAAiC,eAAe,kFAAkF,WAAW,kFAAkF,YAAY,YAAY,mBAAmB,iBAAiB,cAAc,SAAS,SAAS,gBAAgB,mBAAmB,UAAU,WAAW,uEAAuE,kBAAkB,MAAM,OAAO,QAAQ,OAAO,SAAS,aAAa,YAAY,UAAU,WAAW,sBAAsB,mBAAmB,yBAAyB,iBAAiB,cAAc,OAAO,kBAAkB,cAAc,mBAAmB,iBAAiB,UAAU,mBAAmB,gBAAgB,oBAAoB,aAAa,eAAe,mBAAmB,0BAA0B,YAAY,mBAAmB,eAAe,cAAc,iCAAiC,kCAAkC,mCAAmC,0BAA0B,gCAAgC,QAAQ,kBAAkB,eAAe,UAAU,4DAA4D,SAAS,wEAAwE,YAAY,kEAAkE,yBAAyB,6BAA6B,UAAU,+BAA+B,UAAU,6BAA6B,kBAAkB,UAAU,mBAAmB,4BAA4B,UAAU,8GAA8G,gBAAgB,yBAAyB,+DAA+D,gBAAgB,2EAA2E,aAAa,aAAa,iCAAiC,qDAAqD,kBAAkB,WAAW,UAAU,kBAAkB,cAAc,gBAAgB,gBAAgB,kBAAkB,yBAAyB,wBAAwB,yBAAyB,0BAA0B,WAAW,qBAAqB,uCAAuC,eAAe,0CAA0C,mBAAmB,iBAAiB,UAAU,gBAAgB,YAAY,sBAAsB,kBAAkB,UAAU,sBAAsB,kBAAkB,UAAU,aAAa,8EAA8E,cAAc,yCAAyC,aAAa,kBAAkB,aAAa,QAAQ,SAAS,WAAW,YAAY,kBAAkB,iBAAiB,sBAAsB,uBAAuB,oCAAoC,kCAAkC,oCAAoC,+BAA+B,aAAa,kBAAkB,UAAU,UAAU,aAAa,OAAO,QAAQ,gEAAgE,cAAc,oBAAoB,iBAAiB,yBAAyB,4BAA4B,gEAAgE,eAAe,qBAAqB,kBAAkB,0BAA0B,6BAA6B,0EAA0E,gBAAgB,UAAU,0EAA0E,gBAAgB,WAAW,8CAA8C,UAAU,SAAS,YAAY,oCAAoC,kBAAkB,iBAAiB,UAAU,WAAW,mBAAmB,qBAAqB,gBAAgB,QAAQ,gBAAgB,kGAAkG,iBAAiB,kGAAkG,kBAAkB,mBAAmB,iBAAiB,cAAc,qCAAqC,eAAe,qCAAqC,aAAa,kBAAkB,UAAU,SAAS,WAAW,YAAY,UAAU,gBAAgB,YAAY,+BAA+B,mBAAmB,gBAAgB,4BAA4B,gBAAgB,oIAAoI,iBAAiB,oIAAoI,kBAAkB,UAAU,eAAe,gBAAgB,eAAe,qBAAqB,gBAAgB,0BAA0B,YAAY,aAAa,qBAAqB,UAAU,iBAAiB,UAAU,YAAY,qCAAqC,aAAa,kBAAkB,kBAAkB,mBAAmB,iBAAiB,yBAAyB,sBAAsB,qBAAqB,iBAAiB,2BAA2B,0CAA0C,kOAAkO,kBAAkB,yBAAyB,sBAAsB,8FAA8F,gBAAgB,8CAA8C,WAAW,yBAAyB,mBAAmB,8BAA8B,mBAAmB,WAAW,SAAS,qBAAqB,WAAW,gBAAgB,cAAc,kBAAkB,gBAAgB,0CAA0C,2BAA2B,yBAAyB,sBAAsB,qBAAqB,iBAAiB,eAAe,kBAAkB,iCAAiC,mBAAmB,gBAAgB,eAAe,QAAQ,kCAAkC,mBAAmB,gBAAgB,eAAe,QAAQ,iCAAiC,iBAAiB,eAAe,QAAQ,kCAAkC,iBAAiB,eAAe,QAAQ,6BAA6B,mBAAmB,eAAe,OAAO,8BAA8B,mBAAmB,eAAe,OAAO,6BAA6B,mBAAmB,eAAe,OAAO,iBAAiB,iBAAiB,eAAe,OAAO,yBAAyB,iBAAiB,mBAAmB,8CAA8C,eAAe,eAAe,oCAAoC,yBAAyB,4BAA4B,sBAAsB,iDAAiD,aAAa,qBAAqB,WAAW,qBAAqB,gBAAgB,sBAAsB,gBAAgB,2CAA2C,gBAAgB,oBAAoB,qBAAqB,qCAAqC,0BAA0B,6BAA6B,qBAAqB,+BAA+B,gBAAgB,uCAAuC,UAAU,6CAA6C,gBAAgB,YAAY,kBAAkB,8BAA8B,kBAAkB,8BAA8B,eAAe,qBAAqB,WAAW,sBAAsB,YAAY,uBAAuB,qBAAqB,oBAAoB,WAAW,kBAAkB,+BAA+B,cAAc,eAAe,SAAS,mBAAmB,kBAAkB,wDAAwD,UAAU,2BAA2B,UAAU,0DAA0D,UAAU,yBAAyB,UAAU,0EAA0E,uBAAuB,wBAAwB,kBAAkB,UAAU,+EAA+E,mBAAmB,gCAAgC,eAAe,iBAAiB,gBAAgB,sCAAsC,kBAAkB,MAAM,OAAO,QAAQ,2BAA2B,WAAW,6DAA6D,YAAY,iEAAiE,cAAc,kDAAkD,YAAY,kDAAkD,WAAW,mDAAmD,WAAW,wBAAwB,mDAAmD,YAAY,wBAAwB,2CAA2C,gBAAgB,kBAAkB,yBAAyB,WAAW,iCAAiC,kBAAkB,mCAAmC,qBAAqB,iBAAiB,6BAA6B,kBAAkB,UAAU,qCAAqC,eAAe,0DAA0D,mBAAmB,aAAa,sBAAsB,cAAc,mBAAmB,iBAAiB,iBAAiB,iBAAiB,gBAAgB,sCAAsC,kBAAkB,UAAU,cAAc,gBAAgB,oBAAoB,4BAA4B,qBAAqB,UAAU,yCAAyC,kBAAkB,UAAU,8BAA8B,kBAAkB,mCAAmC,kBAAkB,UAAU,MAAM,OAAO,QAAQ,qCAAqC,kBAAkB,UAAU,oCAAoC,kBAAkB,UAAU,sCAAsC,UAAU,kCAAkC,kBAAkB,UAAU,qCAAqC,UAAU,mCAAmC,kBAAkB,UAAU,2BAA2B,aAAa,gBAAgB,qCAAqC,wBAAwB,sCAAsC,kBAAkB,4BAA4B,kBAAkB,OAAO,QAAQ,0CAA0C,oBAAoB,0CAA0C,oBAAoB,kDAAkD,kBAAkB,UAAU,0BAA0B,OAAO,QAAQ,yBAAyB,mBAAmB,gBAAgB,yBAAyB,0BAA0B,uBAAuB,sBAAsB,mBAAmB,4BAA4B,6BAA6B,oBAAoB,gBAAgB,gCAAgC,iBAAiB,uCAAuC,aAAa,gCAAgC,gBAAgB,2DAA2D,cAAc,6BAA6B,gBAAgB,mBAAmB,yCAAyC,mBAAmB,6EAA6E,qBAAqB,mBAAmB,2CAA2C,aAAa,6CAA6C,yBAAyB,4CAA4C,sBAAsB,uCAAuC,gBAAgB,UAAU,sDAAsD,OAAO,QAAQ,SAAS,WAAW,gBAAgB,gBAAgB,eAAe,sBAAsB,kBAAkB,gBAAgB,4DAA4D,cAAc,4CAA4C,kBAAkB,iBAAiB,UAAU,WAAW,mBAAmB,qBAAqB,gBAAgB,SAAS,iBAAiB,YAAY,qCAAqC,qBAAqB,OAAO,QAAQ,sCAAsC,gBAAgB,8CAA8C,OAAO,2BAA2B,6BAA6B,gCAAgC,8CAA8C,QAAQ,2BAA2B,6BAA6B,gCAAgC,cAAc,qBAAqB,WAAW,YAAY,kBAAkB,sBAAsB,cAAc,cAAc,iBAAiB,mBAAmB,mBAAmB,kBAAkB,kBAAkB,qBAAqB,iBAAiB,iCAAiC,mBAAmB,iBAAiB,wBAAwB,oBAAoB,gBAAgB,8BAA8B,WAAW,2DAA2D,YAAY,6BAA6B,WAAW,yBAAyB,eAAe,wCAAwC,mBAAmB,UAAU,6BAA6B,gBAAgB,6BAA6B,eAAe,sBAAsB,qBAAqB,cAAc,kCAAkC,0BAA0B,qBAAqB,kBAAkB,MAAM,OAAO,QAAQ,SAAS,qBAAqB,WAAW,YAAY,cAAc,eAAe,mBAAmB,sBAAsB,kBAAkB,4BAA4B,sBAAsB;;AAE7qe;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAgB,iBAAiB;AACjC;AACA;AACA,yCAAwC,gBAAgB;AACxD,KAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,aAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjDA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB,sBAAsB;AACtC;AACA;AACA,mBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,kBAAiB,2BAA2B;AAC5C;AACA;AACA,SAAQ,uBAAuB;AAC/B;AACA;AACA,IAAG;AACH;AACA,kBAAiB,uBAAuB;AACxC;AACA;AACA,4BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA,iCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wDAAuD;AACvD;;AAEA,8BAA6B,mBAAmB;;AAEhD;;AAEA;;AAEA;AACA;AACA;;;;;;;ACrPA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA,wBAAuB,2EAA2E;AAClG;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;;;;;;AClBD;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,IAAG;AACH,0BAAyB,EAAE;AAC3B,0BAAyB,EAAE;AAC3B;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,oBAAmB,gBAAgB;AACnC;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjSA;;AAEA;AACA;AACA;AACA;AACA,gDAAgF,iBAAiB;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;ACpBA;AACA;AACA,kGAAiG;;AAEjG;AACA,8CAA6C,yBAAyB,WAAW,yBAAyB,gCAAgC,wCAAwC,eAAe,gBAAgB,cAAc,SAAS,cAAc,eAAe,kBAAkB,iBAAiB,gBAAgB,sBAAsB,sBAAsB,kBAAkB,WAAW,yBAAyB,gBAAgB,gBAAgB,SAAS,aAAa,uEAAuE,aAAa,SAAS,6BAA6B,qBAAqB,0BAA0B,gBAAgB,UAAU,gBAAgB,gCAAgC,gBAAgB,yBAAyB,kBAAkB,YAAY,UAAU,cAAc,4BAA4B,WAAW,+BAA+B,UAAU,2CAA2C,sBAAsB,UAAU,wCAAwC,kBAAkB,wCAAwC,iBAAiB,kCAAkC,gBAAgB,iDAAiD,iBAAiB,6BAA6B,eAAe,yBAAyB,WAAW,gBAAgB,yBAAyB,gBAAgB,6DAA6D,mBAAmB,OAAO,kBAAkB,YAAY,6DAA6D,6BAA6B,0BAA0B,UAAU,UAAU,qFAAqF,YAAY,8BAA8B,YAAY,sBAAsB,kBAAkB,WAAW,aAAa,qCAAqC,eAAe,kBAAkB,UAAU,kCAAkC,qCAAqC,8BAA8B,cAAc,gBAAgB,iBAAiB,sBAAsB,gCAAgC,wBAAwB,sCAAsC,8BAA8B,yDAAyD,4BAA4B,kCAAkC,0BAA0B,iBAAiB,UAAU,mBAAmB,kBAAkB,iBAAiB,oDAAoD,kBAAkB,yDAAyD,eAAe,gBAAgB,6BAA6B,kBAAkB,8IAA8I,gBAAgB,qCAAqC,sBAAsB,2BAA2B,yBAAyB,mCAAmC,yBAAyB,yCAAyC,eAAe,iBAAiB,4CAA4C,aAAa,6BAA6B,gBAAgB,YAAY,8BAA8B,kBAAkB,gBAAgB,6IAA6I,qBAAqB,iCAAiC,WAAW,kBAAkB,8BAA8B,yCAAyC,iBAAiB,iDAAiD,aAAa,wCAAwC,eAAe,cAAc,eAAe,eAAe,UAAU,gBAAgB,mBAAmB,iCAAiC,uBAAuB,yBAAyB,gBAAgB,gBAAgB,uBAAuB,gBAAgB,cAAc,sDAAsD,cAAc,2CAA2C,gBAAgB,oCAAoC,6BAA6B,cAAc,cAAc,qFAAqF,YAAY,8BAA8B,sBAAsB,kBAAkB,WAAW,aAAa,qCAAqC,eAAe,kBAAkB,gBAAgB,eAAe,oBAAoB,qCAAqC,8BAA8B,cAAc,gBAAgB,iBAAiB,iBAAiB,uBAAuB,yBAAyB,gCAAgC,wBAAwB,sCAAsC,8BAA8B,yDAAyD,uBAAuB,uBAAuB,kCAAkC,0BAA0B,mCAAmC,aAAa,iCAAiC,gBAAgB,gBAAgB,oCAAoC,gBAAgB,4BAA4B,6BAA6B;;AAE98J;;;;;;;ACPA;;AAEA;AACA;AACA;AACA;AACA,gDAAgF,iBAAiB;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;ACpBA;AACA;;;AAGA;AACA,mDAAkD,GAAG,gCAAgC,yBAAyB,gBAAgB,GAAG,gCAAgC,yBAAyB,yBAAyB,GAAG,gCAAgC,wBAAwB,IAAI,kCAAkC,0BAA0B,IAAI,mCAAmC,2BAA2B,IAAI,kCAAkC,0BAA0B,GAAG,gCAAgC,yBAAyB,iBAAiB,GAAG,gCAAgC,wBAAwB,IAAI,kCAAkC,0BAA0B,IAAI,mCAAmC,2BAA2B,IAAI,kCAAkC,0BAA0B,GAAG,gCAAgC,yBAAyB;;AAEt1B;;;;;;;ACPA;;AAEA;AACA;AACA;AACA;AACA,gDAAgF,iBAAiB;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;ACpBA;AACA;AACA,kGAAiG;;AAEjG;AACA,6GAA4G,kBAAkB,wDAAwD,eAAe,kBAAkB,sBAAsB,wCAAwC,iBAAiB,WAAW,UAAU,WAAW,6BAA6B,iBAAiB,sBAAsB,gBAAgB,qEAAqE,oBAAoB,2EAA2E,kBAAkB,UAAU,kEAAkE,aAAa,0BAA0B,cAAc,kBAAkB,iBAAiB,yBAAyB,6BAA6B,gBAAgB,WAAW,0BAA0B,wBAAwB,WAAW,iBAAiB,kBAAkB,kBAAkB,UAAU,SAAS,mCAAmC,2BAA2B,oBAAoB,sBAAsB,uCAAuC,gBAAgB,WAAW,sBAAsB,4BAA4B,UAAU,sBAAsB,eAAe,sBAAsB,qBAAqB,WAAW,YAAY,gCAAgC,WAAW,YAAY,uBAAuB,kBAAkB,MAAM,OAAO,kBAAkB,WAAW,gBAAgB,4CAA4C,SAAS,eAAe,kBAAkB,OAAO,QAAQ,sBAAsB,oBAAoB,kBAAkB,YAAY,WAAW,MAAM,OAAO,yBAAyB,WAAW,UAAU,4BAA4B,kBAAkB,kBAAkB,yBAAyB,UAAU,0BAA0B,kBAAkB,MAAM,QAAQ,aAAa,4BAA4B,WAAW,gCAAgC,UAAU,2BAA2B,iBAAiB,gDAAgD,kBAAkB,eAAe,gBAAgB,gBAAgB,mBAAmB,oEAAoE,eAAe,6EAA6E,kBAAkB,eAAe,gBAAgB,mBAAmB,gBAAgB,2GAA2G,eAAe,mBAAmB,oCAAoC,kBAAkB,eAAe,gBAAgB,qBAAqB,kBAAkB,2CAA2C,WAAW,qFAAqF,aAAa,cAAc,WAAW,SAAS,6BAA6B,kBAAkB,QAAQ,0CAA0C,YAAY,qBAAqB,YAAY,WAAW,gBAAgB,YAAY,kBAAkB,cAAc,kBAAkB,0BAA0B,UAAU,oBAAoB,kBAAkB,sCAAsC,gBAAgB,sBAAsB,cAAc,gCAAgC,kBAAkB,WAAW,OAAO,QAAQ,aAAa,WAAW,sBAAsB,UAAU,4BAA4B,mBAAmB,0CAA0C,kBAAkB,uCAAuC,eAAe,cAAc,mBAAmB,sCAAsC,cAAc,oDAAoD,cAAc,wDAAwD,UAAU,MAAM,SAAS,sBAAsB,kBAAkB,mDAAmD,UAAU,SAAS,eAAe,cAAc,mDAAmD,sBAAsB,6DAA6D,uBAAuB,sBAAsB,kBAAkB,SAAS,UAAU,WAAW,UAAU,eAAe,2EAA2E,oHAAoH,+BAA+B,WAAW,kBAAkB,SAAS,uBAAuB,cAAc,+CAA+C,gBAAgB,sBAAsB,kBAAkB,wDAAwD,WAAW,cAAc,gCAAgC,4IAA4I,UAAU,qCAAqC,gJAAgJ,aAAa,gLAAgL,mBAAmB,kBAAkB,4JAA4J,mBAAmB,kBAAkB,wMAAwM,qCAAqC,oLAAoL,qCAAqC,gCAAgC,uBAAuB,cAAc,uBAAuB,kBAAkB,8CAA8C,qBAAqB,kBAAkB,yBAAyB,yBAAyB,uCAAuC,WAAW,SAAS,kBAAkB,gBAAgB,gBAAgB,gBAAgB,eAAe,YAAY,UAAU,kBAAkB,gBAAgB,6GAA6G,4BAA4B,kBAAkB,SAAS,SAAS,mCAAmC,2BAA2B,UAAU,sCAAsC,mBAAmB,UAAU,yCAAyC,YAAY,WAAW,2CAA2C,mCAAmC,uCAAuC,YAAY,WAAW,eAAe,yCAAyC,YAAY,eAAe,2BAA2B,mBAAmB,sCAAsC,8BAA8B,yDAAyD,0DAA0D,yBAAyB,oCAAoC,mCAAmC,2BAA2B,oGAAoG,eAAe,yBAAyB,mBAAmB,kIAAkI,UAAU,gIAAgI,UAAU,gGAAgG,eAAe,yBAAyB,mBAAmB,8HAA8H,UAAU,wHAAwH,UAAU,oGAAoG,eAAe,yBAAyB,eAAe,kIAAkI,UAAU,gIAAgI,UAAU,wIAAwI,2BAA2B,mBAAmB,qBAAqB,kBAAkB,SAAS,OAAO,QAAQ,kBAAkB,iBAAiB,uBAAuB,0BAA0B,cAAc,qBAAqB,gCAAgC,yBAAyB,aAAa,6BAA6B,WAAW,sCAAsC,UAAU,uBAAuB,WAAW,YAAY,iBAAiB,mBAAmB,mBAAmB,kBAAkB,YAAY,WAAW,MAAM,OAAO,yBAAyB,WAAW,UAAU,4BAA4B,kBAAkB,wBAAwB,UAAU,wBAAwB,kBAAkB,QAAQ,SAAS,uCAAuC,+BAA+B,4BAA4B,YAAY,WAAW,2CAA2C,mCAAmC,iCAAiC,aAAa,iBAAiB,kBAAkB,YAAY,WAAW,MAAM,OAAO,yBAAyB,WAAW,UAAU,4BAA4B,kBAAkB,sBAAsB,UAAU,uBAAuB,kBAAkB,QAAQ,mCAAmC,2BAA2B,kBAAkB,gBAAgB,gBAAgB,aAAa,sBAAsB,WAAW,0BAA0B,YAAY,WAAW,4BAA4B,aAAa,yBAAyB,cAAc,eAAe,cAAc,sBAAsB,eAAe,cAAc,sBAAsB,gBAAgB,2DAA2D,cAAc;;AAE1nU;;;;;;;ACPA;;AAEA;AACA;AACA;AACA;AACA,gDAAgF,iBAAiB;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;ACpBA;AACA;AACA,kGAAiG;;AAEjG;AACA,qDAAoD,aAAa,WAAW,aAAa,WAAW,WAAW,mCAAmC,gFAAgF,uBAAuB,kBAAkB,gCAAgC,wBAAwB,gBAAgB,sDAAsD,aAAa,YAAY,WAAW,SAAS,6DAA6D,aAAa,cAAc,kBAAkB,WAAW,MAAM,QAAQ,SAAS,kCAAkC,mCAAmC,gCAAgC,4DAA4D,aAAa,cAAc,kBAAkB,QAAQ,SAAS,QAAQ,SAAS,iCAAiC,oCAAoC,8BAA8B,wEAAwE,YAAY,YAAY,kBAAkB,SAAS,UAAU,UAAU,gBAAgB,gCAAgC,wBAAwB,mBAAmB,6EAA6E,kBAAkB,cAAc,kBAAkB,YAAY,iCAAiC,yBAAyB,eAAe,cAAc,yBAAyB,gBAAgB,mBAAmB,cAAc;;AAE36C;;;;;;;ACPA,ooD;;;;;;ACAA;AACA,8BAA6B,yBAAyB,wBAAwB,YAAY,aAAa,gDAAgD,UAAU,cAAc,UAAU,oCAAoC,UAAU,cAAc,4CAA4C,GAAG,IAAI,yBAAyB,kBAAkB,mCAAmC,eAAe,eAAe,EAAE,SAAS,cAAc,4CAA4C,wDAAwD,GAAG,IAAI,yBAAyB,oBAAoB,yCAAyC,eAAe,eAAe,EAAE,SAAS,cAAc,uDAAuD,oBAAoB,oCAAoC,eAAe,kBAAkB,cAAc,cAAc,UAAU,cAAc,EAAE,aAAa,SAAS,IAAI,mDAAmD,iBAAiB,QAAQ,YAAY,cAAc,eAAe,aAAa,YAAY,QAAQ,YAAY,QAAQ,uBAAuB,gBAAgB,qBAAqB,eAAe,uBAAuB,UAAU,uBAAuB,gBAAgB,gBAAgB,eAAe,uBAAuB,MAAM,YAAY,kBAAkB,SAAS,EAAE,G;;;;;;ACDvyC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAkB;AAClB,mBAAkB;;AAElB;AACA;AACA,sBAAqB,iCAAiC;AACtD;AACA;AACA;;AAEA;AACA;AACA,8BAA6B,mBAAmB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,sCAAqC,mBAAmB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP,sBAAqB,SAAS;AAC9B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,YAAW;AACX;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,wBAAuB;AACvB,sFAAqF;AACrF;AACA;AACA;AACA,4BAA2B;AAC3B,4BAA2B;AAC3B;AACA,cAAa;AACb;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,kDAAiD;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oCAAmC,OAAO;AAC1C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,yBAAwB;;AAExB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0DAAyD,iBAAiB;AAC1E;AACA,cAAa,0BAA0B;AACvC;;AAEA;AACA;AACA;AACA,0CAAyC,iGAAiG;AAC1I;AACA,wBAAuB,2BAA2B;AAClD;;AAEA;AACA,cAAa,wBAAwB,uCAAuC,qCAAqC;AACjH;;AAEA;AACA;AACA;AACA,oBAAmB,mBAAmB,cAAc;AACpD;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAuB,aAAa,0BAA0B;AAC9D;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAAyB,QAAQ;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA6B;AAC7B,uFAAsF;AACtF;AACA;;AAEA;AACA;AACA;AACA,sGAAqG;AACrG,sDAAqD;AACrD;AACA,yBAAwB,EAAE,SAAS;AACnC,MAAK;;AAEL;AACA,2GAA0G;AAC1G;AACA,0BAAyB;AACzB,MAAK;;AAEL;AACA;AACA,kBAAiB,YAAY,oBAAoB;AACjD;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA,kBAAiB,QAAQ;AACzB;AACA;AACA;AACA,6DAA4D;AAC5D;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA,8FAA6F;AAC7F,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL,OAAM;;AAEN;AACA;;AAEA;AACA,4FAA2F;AAC3F;;AAEA;AACA,4BAA2B;AAC3B;;AAEA;AACA;AACA,yCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;;;;;;;ACtaD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,8CAA6C,WAAW,EAAE;;AAE1D;AACA;;AAEA;AACA;;AAEA;AACA,+CAA8C;AAC9C,MAAK;;AAEL;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,sBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP,wBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA,mCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA,qBAAoB,eAAe,EAAE;;AAErC,qBAAoB,kBAAkB,eAAe,UAAU,EAAE;;AAEjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8BAA6B;AAC7B,4BAA2B;AAC3B,4BAA2B;AAC3B,+BAA8B;AAC9B,gCAA+B;AAC/B;AACA;;AAEA;AACA;AACA;;AAEA,EAAC;;;;;;;ACpVD;AACA,8BAA6B,yBAAyB,wBAAwB,YAAY,aAAa,gDAAgD,cAAc,oDAAoD,cAAc,4CAA4C,cAAc,oBAAoB,cAAc,gBAAgB,kCAAkC,cAAc,qBAAqB,cAAc,kBAAkB,cAAc,gBAAgB,cAAc,cAAc,UAAU,cAAc,EAAE,aAAa,SAAS,IAAI,yJAAyJ,cAAc,qDAAqD,SAAS,EAAE,G;;;;;;ACD7wB;AACA,8BAA6B,yBAAyB,wBAAwB,YAAY,aAAa,wCAAwC,cAAc,qBAAqB,6BAA6B,aAAa,cAAc,cAAc,UAAU,cAAc,EAAE,aAAa,SAAS,IAAI,oDAAoD,UAAU,qBAAqB,SAAS,EAAE,G;;;;;;ACD1Y;AACA,8BAA6B,yBAAyB,wBAAwB,YAAY,aAAa,6CAA6C,cAAc,gBAAgB,4BAA4B,eAAe,cAAc,cAAc,UAAU,cAAc,EAAE,aAAa,SAAS,IAAI,oDAAoD,QAAQ,uBAAuB,SAAS,EAAE,G;;;;;;ACD3Y;AACA,8BAA6B,yBAAyB,wBAAwB,YAAY,aAAa,8CAA8C,cAAc,gDAAgD,cAAc,YAAY,mCAAmC,cAAc,gBAAgB,cAAc,cAAc,UAAU,cAAc,EAAE,aAAa,SAAS,IAAI,2FAA2F,gBAAgB,0BAA0B,SAAS,EAAE,G;;;;;;ACD9gB,8b;;;;;;ACAA;AACA,8BAA6B,yBAAyB,wBAAwB,YAAY,aAAa,4CAA4C,cAAc,+CAA+C,cAAc,gDAAgD,cAAc,cAAc,wCAAwC,cAAc,kBAAkB,cAAc,mDAAmD,cAAc,+CAA+C,cAAc,kBAAkB,cAAc,gDAAgD,cAAc,2DAA2D,+BAA+B,eAAe,cAAc,2DAA2D,+BAA+B,eAAe,cAAc,kBAAkB,cAAc,gBAAgB,cAAc,cAAc,UAAU,cAAc,EAAE,aAAa,SAAS,IAAI,oIAAoI,qBAAqB,+MAA+M,YAAY,8DAA8D,YAAY,6CAA6C,SAAS,EAAE,G;;;;;;ACDh8C,gqC;;;;;;ACAA;AACA,8BAA6B,yBAAyB,wBAAwB,YAAY,aAAa,4CAA4C,cAAc,gBAAgB,cAAc,8BAA8B,cAAc,sDAAsD,cAAc,YAAY,+CAA+C,cAAc,kBAAkB,cAAc,gBAAgB,cAAc,6BAA6B,cAAc,qDAAqD,cAAc,yBAAyB,cAAc,yBAAyB,cAAc,0BAA0B,+CAA+C,UAAU,cAAc,YAAY,2DAA2D,GAAG,IAAI,yBAAyB,iBAAiB,6CAA6C,YAAY,EAAE,SAAS,cAAc,YAAY,wDAAwD,GAAG,IAAI,yBAAyB,mBAAmB,EAAE,SAAS,cAAc,oBAAoB,cAAc,YAAY,cAAc,cAAc,UAAU,cAAc,4CAA4C,cAAc,gBAAgB,cAAc,+BAA+B,cAAc,uDAAuD,cAAc,YAAY,gDAAgD,cAAc,kBAAkB,cAAc,gBAAgB,cAAc,8BAA8B,cAAc,sDAAsD,cAAc,0BAA0B,cAAc,0BAA0B,cAAc,0BAA0B,gDAAgD,UAAU,cAAc,YAAY,4DAA4D,GAAG,IAAI,yBAAyB,iBAAiB,8CAA8C,YAAY,EAAE,SAAS,cAAc,YAAY,yDAAyD,GAAG,IAAI,yBAAyB,mBAAmB,EAAE,SAAS,cAAc,oBAAoB,cAAc,YAAY,cAAc,cAAc,UAAU,cAAc,4DAA4D,GAAG,IAAI,yBAAyB,4CAA4C,cAAc,gBAAgB,cAAc,+BAA+B,cAAc,uDAAuD,cAAc,YAAY,gDAAgD,cAAc,kBAAkB,cAAc,gBAAgB,cAAc,8BAA8B,cAAc,sDAAsD,cAAc,wBAAwB,cAAc,0BAA0B,cAAc,0BAA0B,gDAAgD,UAAU,cAAc,YAAY,8DAA8D,GAAG,IAAI,yBAAyB,iBAAiB,8CAA8C,YAAY,EAAE,SAAS,cAAc,YAAY,6DAA6D,GAAG,IAAI,yBAAyB,mBAAmB,EAAE,SAAS,cAAc,YAAY,2DAA2D,GAAG,IAAI,yBAAyB,mBAAmB,EAAE,SAAS,cAAc,YAAY,cAAc,cAAc,eAAe,EAAE,SAAS,cAAc,2DAA2D,GAAG,IAAI,yBAAyB,4CAA4C,cAAc,gBAAgB,cAAc,8BAA8B,cAAc,sDAAsD,cAAc,YAAY,+CAA+C,cAAc,kBAAkB,cAAc,gBAAgB,cAAc,6BAA6B,cAAc,qDAAqD,cAAc,yBAAyB,cAAc,yBAAyB,cAAc,0BAA0B,+CAA+C,UAAU,cAAc,YAAY,6DAA6D,GAAG,IAAI,yBAAyB,iBAAiB,6CAA6C,YAAY,EAAE,SAAS,cAAc,YAAY,4DAA4D,GAAG,IAAI,yBAAyB,mBAAmB,EAAE,SAAS,cAAc,YAAY,0DAA0D,GAAG,IAAI,yBAAyB,mBAAmB,EAAE,SAAS,cAAc,YAAY,cAAc,cAAc,eAAe,EAAE,SAAS,cAAc,+DAA+D,GAAG,IAAI,yBAAyB,4CAA4C,cAAc,gBAAgB,cAAc,kCAAkC,cAAc,0DAA0D,cAAc,YAAY,mDAAmD,cAAc,kBAAkB,cAAc,gBAAgB,cAAc,iCAAiC,cAAc,yDAAyD,cAAc,yBAAyB,cAAc,6BAA6B,cAAc,0BAA0B,mDAAmD,UAAU,cAAc,YAAY,iEAAiE,GAAG,IAAI,yBAAyB,iBAAiB,iDAAiD,YAAY,EAAE,SAAS,cAAc,YAAY,gEAAgE,GAAG,IAAI,yBAAyB,mBAAmB,EAAE,SAAS,cAAc,YAAY,8DAA8D,GAAG,IAAI,yBAAyB,mBAAmB,EAAE,SAAS,cAAc,YAAY,cAAc,cAAc,eAAe,EAAE,SAAS,cAAc,8DAA8D,GAAG,IAAI,yBAAyB,4CAA4C,cAAc,gBAAgB,cAAc,iCAAiC,cAAc,yDAAyD,cAAc,YAAY,kDAAkD,cAAc,kBAAkB,cAAc,mBAAmB,cAAc,gCAAgC,cAAc,uFAAuF,cAAc,sBAAsB,cAAc,4BAA4B,cAAc,0BAA0B,kDAAkD,UAAU,cAAc,YAAY,+DAA+D,GAAG,IAAI,yBAAyB,mBAAmB,EAAE,SAAS,cAAc,YAAY,6DAA6D,GAAG,IAAI,yBAAyB,mBAAmB,EAAE,SAAS,SAAS,gEAAgE,GAAG,IAAI,yBAAyB,iDAAiD,EAAE,SAAS,mBAAmB,cAAc,cAAc,eAAe,EAAE,SAAS,cAAc,EAAE,aAAa,SAAS,IAAI,iIAAiI,2BAA2B,wJAAwJ,2BAA2B,UAAU,0BAA0B,WAAW,yBAAyB,KAAK,0BAA0B,QAAQ,uBAAuB,YAAY,uBAAuB,gKAAgK,4BAA4B,4JAA4J,4BAA4B,UAAU,2BAA2B,WAAW,0BAA0B,KAAK,2BAA2B,QAAQ,wBAAwB,YAAY,wBAAwB,kCAAkC,yBAAyB,kIAAkI,4BAA4B,0JAA0J,4BAA4B,UAAU,2BAA2B,WAAW,0BAA0B,KAAK,2BAA2B,QAAQ,0BAA0B,YAAY,0BAA0B,QAAQ,wBAAwB,YAAY,wBAAwB,kBAAkB,yBAAyB,MAAM,wBAAwB,gIAAgI,2BAA2B,wJAAwJ,2BAA2B,UAAU,0BAA0B,WAAW,yBAAyB,KAAK,0BAA0B,QAAQ,yBAAyB,YAAY,yBAAyB,QAAQ,uBAAuB,YAAY,uBAAuB,kBAAkB,wBAAwB,MAAM,4BAA4B,wIAAwI,+BAA+B,oKAAoK,+BAA+B,UAAU,8BAA8B,WAAW,6BAA6B,KAAK,8BAA8B,QAAQ,6BAA6B,YAAY,6BAA6B,QAAQ,2BAA2B,YAAY,2BAA2B,kBAAkB,4BAA4B,MAAM,2BAA2B,sIAAsI,8BAA8B,gMAAgM,8BAA8B,UAAU,4BAA4B,YAAY,4BAA4B,QAAQ,0BAA0B,YAAY,0BAA0B,GAAG,+BAA+B,8BAA8B,6BAA6B,uBAAuB,2BAA2B,QAAQ,SAAS,EAAE,G;;;;;;ACD3jW;AACA,8BAA6B,yBAAyB,wBAAwB,YAAY,aAAa,0CAA0C,cAAc,2DAA2D,iCAAiC,YAAY,cAAc,mDAAmD,cAAc,kDAAkD,kCAAkC,aAAa,cAAc,kDAAkD,kCAAkC,aAAa,cAAc,uDAAuD,GAAG,IAAI,yBAAyB,iEAAiE,+CAA+C,eAAe,cAAc,wDAAwD,yCAAyC,aAAa,eAAe,EAAE,SAAS,gBAAgB,cAAc,sDAAsD,cAAc,8CAA8C,cAAc,4DAA4D,cAAc,qCAAqC,2CAA2C,cAAc,cAAc,oCAAoC,0CAA0C,cAAc,cAAc,oBAAoB,cAAc,mDAAmD,cAAc,yCAAyC,oBAAoB,cAAc,kBAAkB,cAAc,oEAAoE,cAAc,4CAA4C,kCAAkC,eAAe,cAAc,2CAA2C,mCAAmC,eAAe,cAAc,yCAAyC,iCAAiC,eAAe,cAAc,2CAA2C,qCAAqC,eAAe,cAAc,qBAAqB,cAAc,iBAAiB,cAAc,cAAc,UAAU,cAAc,EAAE,YAAY,gBAAgB,+BAA+B,SAAS,KAAK,SAAS,IAAI,4FAA4F,cAAc,+FAA+F,cAAc,mDAAmD,cAAc,aAAa,oBAAoB,6DAA6D,2BAA2B,2DAA2D,qBAAqB,aAAa,oBAAoB,yLAAyL,uBAAuB,sCAAsC,uBAAuB,6EAA6E,eAAe,gIAAgI,cAAc,8CAA8C,gBAAgB,4CAA4C,cAAc,8CAA8C,kBAAkB,iDAAiD,SAAS,EAAE,G;;;;;;ACDr9G,g3B;;;;;;ACAA,67B;;;;;;ACAA,g3B;;;;;;ACAA;AACA,8BAA6B,yBAAyB,wBAAwB,YAAY,aAAa,2CAA2C,cAAc,iEAAiE,sCAAsC,sBAAsB,oCAAoC,oDAAoD,cAAc,YAAY,mCAAmC,cAAc,2CAA2C,cAAc,cAAc,cAAc,cAAc,UAAU,cAAc,EAAE,aAAa,SAAS,IAAI,mGAAmG,kBAAkB,gBAAgB,gBAAgB,oDAAoD,gBAAgB,6DAA6D,SAAS,EAAE,G;;;;;;ACDx3B,+8D","file":"booking.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TimekitBooking\"] = factory(require(\"jquery\"));\n\telse\n\t\troot[\"TimekitBooking\"] = factory(root[\"jQuery\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap dd7e6f7a02017778d454","'use strict';\n\n/*!\n * Booking.js\n * http://timekit.io\n *\n * Copyright 2015 Timekit, Inc.\n * Booking.js is freely distributable under the MIT license.\n *\n */\n\n// External depenencies\nvar $ = require('jquery');\nvar interpolate = require('sprintf-js');\nvar timekitSDK = require('timekit-sdk');\nwindow.fullcalendar = require('fullcalendar');\nvar moment = window.moment = require('moment');\nrequire('moment-timezone/builds/moment-timezone-with-data-2012-2022.js');\nrequire('fullcalendar/dist/fullcalendar.css');\n\n// Internal dependencies\nvar utils = require('./utils');\nvar defaultConfig = require('./defaults');\nrequire('./styles/fullcalendar.scss');\nrequire('./styles/utils.scss');\nrequire('./styles/main.scss');\nrequire('./styles/testmoderibbon.scss');\n\n// Main library\nfunction TimekitBooking() {\n\n // SDK instance\n var timekit = timekitSDK.newInstance();\n\n // Library config\n var config = {};\n\n // DOM nodes\n var rootTarget;\n var calendarTarget;\n var bookingPageTarget;\n var loadingTarget;\n var errorTarget;\n\n // Make sure DOM element is ready and clean it\n var prepareDOM = function(suppliedConfig) {\n\n var targetElement = suppliedConfig.targetEl || config.targetEl || defaultConfig.primary.targetEl;\n\n rootTarget = $(targetElement);\n\n if (rootTarget.length === 0) {\n throw triggerError('No target DOM element was found (' + targetElement + ')');\n }\n\n rootTarget.addClass('bookingjs');\n rootTarget.children(':not(script)').remove();\n\n };\n\n // Setup the Timekit SDK with correct config\n var timekitSetupConfig = function() {\n\n timekit.configure(config.timekitConfig);\n\n };\n\n // Setup the Timekit SDK with correct credentials\n var timekitSetupUser = function() {\n\n timekit.setUser(config.email, config.apiToken);\n\n };\n\n // Fetch availabile time through Timekit SDK\n var timekitFindTime = function() {\n\n var args = {};\n\n // Only add email to findtime if no calendars or users are explicitly specified\n if (!config.timekitFindTime.calendar_ids && !config.timekitFindTime.user_ids) {\n args.emails = [config.email];\n }\n $.extend(args, config.timekitFindTime);\n\n utils.doCallback('findTimeStarted', config, args);\n\n timekit.findTime(args)\n .then(function(response){\n\n utils.doCallback('findTimeSuccessful', config, response);\n hideLoadingScreen();\n\n // Render available timeslots in FullCalendar\n if(response.data.length > 0) renderCalendarEvents(response.data);\n\n // Render test ribbon if enabled\n if (response.headers['timekit-testmode']) renderTestModeRibbon();\n\n }).catch(function(response){\n utils.doCallback('findTimeFailed', config, response);\n hideLoadingScreen();\n triggerError(['An error with Timekit FindTime occured', response]);\n });\n\n };\n\n // Fetch availabile team time through Timekit SDK\n var timekitFindTimeTeam = function() {\n\n var requestData = {\n url: '/findtime/team',\n method: 'post',\n data: config.timekitFindTimeTeam\n }\n\n $.each(config.timekitFindTimeTeam.users, function (index, item) {\n $.extend(item, config.timekitFindTime);\n // Only add email to findtime if no calendars are explicitly specified\n if (!item.calendar_ids && !item.user_ids) {\n item.emails = [item._email];\n }\n })\n\n utils.doCallback('findTimeTeamStarted', config, requestData);\n\n timekit.makeRequest(requestData)\n .then(function(response){\n\n utils.doCallback('findTimeTeamSuccessful', config, response);\n hideLoadingScreen();\n\n // Render available timeslots in FullCalendar\n if(response.data.length > 0) renderCalendarEvents(response.data);\n\n // Render test ribbon if enabled\n if (response.headers['timekit-testmode']) renderTestModeRibbon();\n\n }).catch(function(response){\n utils.doCallback('findTimeTeamFailed', config, response);\n hideLoadingScreen();\n triggerError(['An error with Timekit FindTimeTeam occured', response]);\n });\n\n };\n\n // Fetch availabile time through Timekit SDK\n var timekitGetBookingSlots = function() {\n\n utils.doCallback('GetBookingSlotsStarted', config);\n\n var requestData = {\n url: '/bookings/groups',\n method: 'get'\n }\n\n // scope group booking slots by widget ID if possible\n if (config.widgetId) requestData.params = {\n search: 'widget.id:' + config.widgetId\n }\n\n timekit\n .makeRequest(requestData)\n .then(function(response){\n\n var slots = response.data.map(function(item) {\n return {\n title: item.attributes.event_info.what,\n start: item.attributes.event_info.start,\n end: item.attributes.event_info.end,\n booking: item\n }\n })\n\n // Make sure to sort the slots chronologically,\n // otherwise FullCalendar might skip rendering some of them\n slots.sort(function(a, b) {\n return moment(a.start) - moment(b.start);\n })\n\n utils.doCallback('getBookingSlotsSuccessful', config, response);\n hideLoadingScreen();\n\n // Render available timeslots in FullCalendar\n if(slots.length > 0) renderCalendarEvents(slots);\n\n // Render test ribbon if enabled\n if (response.headers['timekit-testmode']) renderTestModeRibbon();\n\n }).catch(function(response){\n utils.doCallback('getBookingSlotsFailed', config, response);\n hideLoadingScreen();\n triggerError(['An error with Timekit GetBookings occured', response]);\n });\n\n };\n\n // Universal functional to retrieve availability through either findtime or group booking slots\n var getAvailability = function() {\n\n showLoadingScreen();\n\n calendarTarget.fullCalendar('removeEventSources');\n\n if (config.bookingGraph === 'group_customer' || config.bookingGraph === 'group_customer_payment') {\n // If in group bookings mode, fetch slots\n timekitGetBookingSlots();\n } else if (config.timekitFindTimeTeam) {\n // If in team availability mode, call findtime team\n timekitFindTimeTeam();\n } else {\n // If in normal single-participant mode, call findtime\n timekitFindTime();\n }\n\n };\n\n // Go to the first timeslot in a list of timeslots\n var goToFirstEvent = function(firstEventStart) {\n\n calendarTarget.fullCalendar('gotoDate', firstEventStart);\n\n var firstEventStartHour = moment(firstEventStart).format('H');\n scrollToTime(firstEventStartHour);\n\n };\n\n // Scrolls fullcalendar to the specified hour\n var scrollToTime = function(time) {\n\n // Only proceed for agendaWeek view\n if (calendarTarget.fullCalendar('getView').name !== 'agendaWeek'){\n return;\n }\n\n // Get height of each hour row\n var slotDuration = calendarTarget.fullCalendar('option', 'slotDuration');\n var slotDurationMinutes = 30;\n if (slotDuration) slotDurationMinutes = slotDuration.slice(3, 5);\n var hours = calendarTarget.find('.fc-slats .fc-minor');\n var hourHeight = $(hours[0]).height() * (60 / slotDurationMinutes);\n\n // If minTime is set in fullCalendar config, subtract that from the scollTo calculationn\n var minTimeHeight = 0;\n if (config.fullCalendar.minTime) {\n var minTime = moment(config.fullCalendar.minTime, 'HH:mm:ss').format('H');\n minTimeHeight = hourHeight * minTime;\n }\n\n // Calculate scrolling location and container sizes\n var scrollTo = (hourHeight * time) - minTimeHeight;\n var scrollable = calendarTarget.find('.fc-scroller');\n var scrollableHeight = scrollable.height();\n var scrollableScrollTop = scrollable.scrollTop();\n var maximumHeight = scrollable.find('.fc-time-grid').height();\n\n // Only perform the scroll if the scrollTo is outside the current visible boundary\n if (scrollTo > scrollableScrollTop && scrollTo < scrollableScrollTop + scrollableHeight) {\n return;\n }\n\n // If scrollTo point is past the maximum height, then scroll to maximum possible while still animating\n if (scrollTo > maximumHeight - scrollableHeight) {\n scrollTo = maximumHeight - scrollableHeight;\n }\n\n // Perform the scrollTo animation\n scrollable.animate({scrollTop: scrollTo});\n\n };\n\n // Calculate and display timezone helper\n var renderTimezoneHelper = function() {\n\n var localTzOffset = (moment().utcOffset()/60);\n var timezoneIcon = require('!svg-inline!./assets/timezone-icon.svg');\n\n var template = require('./templates/timezone-helper.html');\n\n var timezoneHelperTarget = $(template.render({\n timezoneIcon: timezoneIcon,\n loadingText: config.localization.strings.timezoneHelperLoading,\n loading: true\n }));\n\n rootTarget.addClass('has-timezonehelper');\n rootTarget.append(timezoneHelperTarget);\n\n var args = {\n email: config.email\n };\n\n utils.doCallback('getUserTimezoneStarted', config, args);\n\n timekit.getUserTimezone(args).then(function(response){\n\n utils.doCallback('getUserTimezoneSuccessful', config, response);\n\n var hostTzOffset = response.data.utc_offset;\n var tzOffsetDiff = localTzOffset - hostTzOffset;\n var tzOffsetDiffAbs = Math.abs(localTzOffset - hostTzOffset);\n var tzDirection = (tzOffsetDiff > 0 ? 'ahead of' : 'behind');\n\n var template = require('./templates/timezone-helper.html');\n var newTimezoneHelperTarget = $(template.render({\n timezoneIcon: timezoneIcon,\n timezoneDifference: (tzOffsetDiffAbs === 0 ? false : true),\n timezoneDifferent: interpolate.sprintf(config.localization.strings.timezoneHelperDifferent, tzOffsetDiffAbs, tzDirection, config.name),\n timezoneSame: interpolate.sprintf(config.localization.strings.timezoneHelperSame, config.name)\n }));\n\n timezoneHelperTarget.replaceWith(newTimezoneHelperTarget);\n\n }).catch(function(response){\n utils.doCallback('getUserTimezoneFailed', config, response);\n utils.logError(['An error with Timekit getUserTimezone occured', response]);\n });\n\n };\n\n // Display ribbon if in testmode\n var renderTestModeRibbon = function() {\n\n var template = require('./templates/testmoderibbon.html');\n\n var testModeRibbonTarget = $(template.render({\n ribbonText: 'Test Mode',\n }));\n\n rootTarget.append(testModeRibbonTarget);\n\n };\n\n // Setup and render FullCalendar\n var initializeCalendar = function() {\n\n var sizing = decideCalendarSize(config.fullCalendar.defaultView);\n\n var args = {\n height: sizing.height,\n eventClick: clickTimeslot,\n windowResize: function() {\n var sizing = decideCalendarSize();\n calendarTarget.fullCalendar('changeView', sizing.view);\n calendarTarget.fullCalendar('option', 'height', sizing.height);\n }\n };\n\n $.extend(true, args, config.fullCalendar);\n args.defaultView = sizing.view;\n\n calendarTarget = $('
');\n rootTarget.append(calendarTarget);\n\n calendarTarget.fullCalendar(args);\n\n utils.doCallback('fullCalendarInitialized', config);\n\n };\n\n // Clicking a timeslot\n var clickTimeslot = function(eventData) {\n\n if (!config.disableConfirmPage) {\n showBookingPage(eventData)\n } else {\n $('.fc-event-clicked').removeClass('fc-event-clicked');\n $(this).addClass('fc-event-clicked');\n utils.doCallback('clickTimeslot', config, eventData);\n }\n\n };\n\n // Fires when window is resized and calendar must adhere\n var decideCalendarSize = function(currentView) {\n\n currentView = currentView || calendarTarget.fullCalendar('getView').name\n\n var view = config.fullCalendar.defaultView\n var height = 430;\n\n if (rootTarget.width() < 480) {\n height = 390;\n rootTarget.addClass('is-small');\n if (config.avatar) height -= 15;\n if (currentView === 'agendaWeek' || currentView === 'basicDay') {\n view = 'basicDay';\n }\n } else {\n rootTarget.removeClass('is-small');\n }\n\n if (config.bookingFields.comment.enabled) { height += 100; }\n if (config.bookingFields.phone.enabled) { height += 64; }\n if (config.bookingFields.voip.enabled) { height += 64; }\n if (config.bookingFields.location.enabled) { height += 64; }\n if (!config.localization.showTimezoneHelper) { height += 33; }\n\n return {\n height: height,\n view: view\n };\n\n };\n\n // Render the supplied calendar events in FullCalendar\n var renderCalendarEvents = function(eventData) {\n\n var firstEventStart = moment(eventData[0].start)\n var firstEventEnd = moment(eventData[0].end)\n var firstEventDuration = firstEventEnd.diff(firstEventStart, 'minutes')\n\n if (firstEventDuration <= 90) {\n calendarTarget.fullCalendar('option', 'slotDuration', '00:15:00')\n }\n\n calendarTarget.fullCalendar('addEventSource', {\n events: eventData\n });\n\n calendarTarget.removeClass('empty-calendar');\n\n // Go to first event if enabled\n if (config.goToFirstEvent) goToFirstEvent(eventData[0].start);\n\n };\n\n // Render the avatar image\n var renderAvatarImage = function() {\n\n var template = require('./templates/user-avatar.html');\n var avatarTarget = $(template.render({\n image: config.avatar\n }));\n\n rootTarget.addClass('has-avatar');\n rootTarget.append(avatarTarget);\n\n };\n\n // Render the avatar image\n var renderDisplayName = function() {\n\n var template = require('./templates/user-displayname.html');\n var displayNameTarget = $(template.render({\n name: config.name\n }));\n\n rootTarget.addClass('has-displayname');\n rootTarget.append(displayNameTarget);\n\n };\n\n // Show loading spinner screen\n var showLoadingScreen = function() {\n\n utils.doCallback('showLoadingScreen', config);\n\n var template = require('./templates/loading.html');\n loadingTarget = $(template.render({\n loadingIcon: require('!svg-inline!./assets/loading-spinner.svg')\n }));\n\n rootTarget.append(loadingTarget);\n\n };\n\n // Remove the booking page DOM node\n var hideLoadingScreen = function() {\n\n utils.doCallback('hideLoadingScreen', config);\n loadingTarget.removeClass('show');\n\n setTimeout(function(){\n loadingTarget.remove();\n }, 500);\n\n };\n\n // Show error and warning screen\n var triggerError = function(message) {\n\n // If an error already has been thrown, exit\n if (errorTarget) return message\n\n utils.doCallback('errorTriggered', message);\n utils.logError(message)\n\n // If no target DOM element exists, only do the logging\n if (!rootTarget) return message\n\n var messageProcessed = message\n var contextProcessed = null\n\n if (utils.isArray(message)) {\n messageProcessed = message[0]\n if (message[1].data) {\n contextProcessed = JSON.stringify(message[1].data.errors || message[1].data.error || message[1].data)\n } else {\n contextProcessed = JSON.stringify(message[1])\n }\n }\n\n var template = require('./templates/error.html');\n errorTarget = $(template.render({\n errorWarningIcon: require('!svg-inline!./assets/error-warning-icon.svg'),\n message: messageProcessed,\n context: contextProcessed\n }));\n\n rootTarget.append(errorTarget);\n\n return message\n\n };\n\n // Event handler when a timeslot is clicked in FullCalendar\n var showBookingPage = function(eventData) {\n\n utils.doCallback('showBookingPage', config, eventData);\n\n var fieldsTemplate = require('./templates/booking-fields.html');\n var template = require('./templates/booking-page.html');\n\n var dateFormat = config.localization.bookingDateFormat || moment.localeData().longDateFormat('LL');\n var timeFormat = config.localization.bookingTimeFormat || moment.localeData().longDateFormat('LT');\n\n var allocatedResource = eventData.users ? eventData.users[0].name : false;\n\n bookingPageTarget = $(template.render({\n chosenDate: moment(eventData.start).format(dateFormat),\n chosenTime: moment(eventData.start).format(timeFormat) + ' - ' + moment(eventData.end).format(timeFormat),\n allocatedResourcePrefix: config.localization.strings.allocatedResourcePrefix,\n allocatedResource: allocatedResource,\n closeIcon: require('!svg-inline!./assets/close-icon.svg'),\n checkmarkIcon: require('!svg-inline!./assets/checkmark-icon.svg'),\n loadingIcon: require('!svg-inline!./assets/loading-spinner.svg'),\n errorIcon: require('!svg-inline!./assets/error-icon.svg'),\n submitText: config.localization.strings.submitText,\n successMessageTitle: config.localization.strings.successMessageTitle,\n successMessageBody: interpolate.sprintf(config.localization.strings.successMessageBody, ''),\n fields: config.bookingFields\n }, {\n formFields: fieldsTemplate\n }));\n\n var form = bookingPageTarget.children('.bookingjs-form');\n\n bookingPageTarget.children('.bookingjs-bookpage-close').click(function(e) {\n e.preventDefault();\n var bookingHasBeenCreated = $(form).hasClass('success');\n if (bookingHasBeenCreated) getAvailability();\n hideBookingPage();\n });\n\n if (eventData.users) {\n utils.logDebug(['Available users for chosen timeslot:', eventData.users], config);\n }\n\n\n form.find('.bookingjs-form-input').on('input', function() {\n var field = $(this).closest('.bookingjs-form-field');\n if (this.value) field.addClass('bookingjs-form-field--dirty');\n else field.removeClass('bookingjs-form-field--dirty');\n });\n\n form.submit(function(e) {\n submitBookingForm(this, e, eventData);\n });\n\n // Show powered by Timekit message\n if (config.showCredits) {\n renderPoweredByMessage(bookingPageTarget);\n }\n\n $(document).on('keyup', function(e) {\n // escape key maps to keycode `27`\n if (e.keyCode === 27) { hideBookingPage(); }\n });\n\n rootTarget.append(bookingPageTarget);\n\n setTimeout(function(){\n bookingPageTarget.addClass('show');\n }, 100);\n\n };\n\n // Remove the booking page DOM node\n var hideBookingPage = function() {\n\n utils.doCallback('closeBookingPage', config);\n\n bookingPageTarget.removeClass('show');\n\n setTimeout(function(){\n bookingPageTarget.remove();\n }, 200);\n\n $(document).off('keyup');\n\n };\n\n // Event handler on form submit\n var submitBookingForm = function(form, e, eventData) {\n\n e.preventDefault();\n\n var formElement = $(form);\n\n if(formElement.hasClass('success')) {\n getAvailability();\n hideBookingPage();\n return;\n }\n\n // Abort if form is submitting, have submitted or does not validate\n if(formElement.hasClass('loading') || formElement.hasClass('error') || !e.target.checkValidity()) {\n var submitButton = formElement.find('.bookingjs-form-button');\n submitButton.addClass('button-shake');\n setTimeout(function() {\n submitButton.removeClass('button-shake');\n }, 500);\n return;\n }\n\n var formData = {};\n $.each(formElement.serializeArray(), function(i, field) {\n formData[field.name] = field.value;\n });\n\n formElement.addClass('loading');\n\n utils.doCallback('submitBookingForm', config, formData);\n\n // Call create event endpoint\n timekitCreateBooking(formData, eventData).then(function(response){\n\n formElement.find('.booked-email').html(formData.email);\n formElement.removeClass('loading').addClass('success');\n\n }).catch(function(response){\n\n showBookingFailed(formElement)\n\n });\n\n };\n\n var showBookingFailed = function (formElement) {\n\n var submitButton = formElement.find('.bookingjs-form-button');\n submitButton.addClass('button-shake');\n setTimeout(function() {\n submitButton.removeClass('button-shake');\n }, 500);\n\n formElement.removeClass('loading').addClass('error');\n setTimeout(function() {\n formElement.removeClass('error');\n }, 2000);\n\n }\n\n // Create new booking\n var timekitCreateBooking = function(formData, eventData) {\n\n var args = {\n event: {\n start: eventData.start.format(),\n end: eventData.end.format(),\n what: config.name + ' x ' + formData.name,\n where: 'TBD',\n description: '',\n participants: [formData.email]\n },\n customer: {\n name: formData.name,\n email: formData.email,\n timezone: moment.tz.guess()\n }\n };\n\n if (config.calendar) {\n args.event.calendar_id = config.calendar;\n }\n\n if (config.bookingFields.location.enabled) {\n args.customer.where = formData.location;\n args.event.where = formData.location;\n }\n if (config.bookingFields.comment.enabled) {\n args.customer.comment = formData.comment;\n args.event.description += config.bookingFields.comment.placeholder + ': ' + formData.comment + '\\n';\n }\n if (config.bookingFields.phone.enabled) {\n args.customer.phone = formData.phone;\n args.event.description += config.bookingFields.phone.placeholder + ': ' + formData.phone + '\\n';\n }\n if (config.bookingFields.voip.enabled) {\n args.customer.voip = formData.voip;\n args.event.description += config.bookingFields.voip.placeholder + ': ' + formData.voip + '\\n';\n }\n\n $.extend(true, args, config.timekitCreateBooking);\n\n // Handle group booking specifics\n if (config.bookingGraph === 'group_customer' || config.bookingGraph === 'group_customer_payment') {\n delete args.event\n args.related = { owner_booking_id: eventData.booking.id }\n }\n\n // Handle team availability specifics\n if (eventData.users) {\n var designatedUser = eventData.users[0]\n var teamUser = $.grep(config.timekitFindTimeTeam.users, function(user) {\n return designatedUser.email === user._email\n })\n if (teamUser.length < 1) {\n throw triggerError(['Encountered an error when picking designated team user to receive booking', designatedUser, config.timekitFindTimeTeam.users]);\n } else {\n timekit = timekit.asUser(designatedUser.email, designatedUser.token)\n if (teamUser[0]._calendar) args.event.calendar_id = teamUser[0]._calendar\n }\n utils.logDebug(['Creating booking for user:', designatedUser], config);\n }\n\n // if a remote widget (has ID) is used, pass that reference when creating booking\n // TODO had to be disabled for team availability because not all members own the widget\n if (!eventData.users && config.widgetId) args.widget_id = config.widgetId\n\n utils.doCallback('createBookingStarted', config, args);\n\n var requestHeaders = {\n 'Timekit-OutputTimestampFormat': 'Y-m-d ' + config.localization.emailTimeFormat + ' (P e)'\n };\n\n var request = timekit\n .include('attributes', 'event', 'user')\n .headers(requestHeaders)\n .createBooking(args);\n\n request\n .then(function(response){\n utils.doCallback('createBookingSuccessful', config, response);\n }).catch(function(response){\n utils.doCallback('createBookingFailed', config, response);\n triggerError(['An error with Timekit CreateBooking occured', response]);\n });\n\n return request;\n\n };\n\n // Render the powered by Timekit message\n var renderPoweredByMessage = function(pageTarget) {\n\n var campaignName = 'widget'\n var campaignSource = window.location.hostname.replace(/\\./g, '-')\n if (config.widgetId) { campaignName = 'embedded-widget'; }\n if (config.widgetSlug) { campaignName = 'hosted-widget'; }\n\n var template = require('./templates/poweredby.html');\n var timekitLogo = require('!svg-inline!./assets/timekit-logo.svg');\n var poweredTarget = $(template.render({\n timekitLogo: timekitLogo,\n campaignName: campaignName,\n campaignSource: campaignSource\n }));\n\n pageTarget.append(poweredTarget);\n\n };\n\n // Set config defaults\n var setConfigDefaults = function(suppliedConfig) {\n\n return $.extend(true, {}, defaultConfig.primary, suppliedConfig);\n\n };\n\n var applyConfigPreset = function (config, propertyName, propertyObject) {\n\n var presetCheck = defaultConfig.presets[propertyName][propertyObject];\n if (presetCheck) return $.extend(true, {}, presetCheck, config);\n return config\n\n };\n\n // Setup config\n var setConfig = function(suppliedConfig) {\n\n // Check whether a config is supplied\n if(suppliedConfig === undefined || typeof suppliedConfig !== 'object' || $.isEmptyObject(suppliedConfig)) {\n throw triggerError('No configuration was supplied or found. Please supply a config object upon library initialization');\n }\n\n // Extend the default config with supplied settings\n var newConfig = setConfigDefaults(suppliedConfig);\n if (suppliedConfig.app) newConfig.timekitConfig.app = suppliedConfig.app\n\n // Apply presets\n newConfig = applyConfigPreset(newConfig, 'timeDateFormat', newConfig.localization.timeDateFormat)\n newConfig = applyConfigPreset(newConfig, 'bookingGraph', newConfig.bookingGraph)\n newConfig = applyConfigPreset(newConfig, 'availabilityView', newConfig.availabilityView)\n\n // Check for required settings\n if (!newConfig.app && !newConfig.timekitConfig.app) {\n throw triggerError('A required config setting (\"app\") was missing');\n }\n if (!newConfig.email) {\n throw triggerError('A required config setting (\"email\") was missing');\n }\n if (!newConfig.apiToken) {\n throw triggerError('A required config setting (\"apiToken\") was missing');\n }\n\n // Set new config to instance config\n config = newConfig;\n\n utils.logDebug(['Final config:', config], config);\n utils.logDebug(['Version:', getVersion()], config);\n\n return config;\n\n };\n\n // Get library config\n var getConfig = function() {\n\n return config;\n\n };\n\n // Get library version\n var getVersion = function() {\n\n return VERSION;\n\n };\n\n // Render method\n var render = function() {\n\n utils.doCallback('renderStarted', config);\n\n // Setup Timekit SDK config\n timekitSetupConfig();\n timekitSetupUser();\n\n // Initialize FullCalendar\n initializeCalendar();\n\n // Get availability through Timekit SDK\n getAvailability();\n\n // Show timezone helper if enabled\n if (config.localization.showTimezoneHelper) {\n renderTimezoneHelper();\n }\n\n // Show image avatar if set\n if (config.avatar) {\n renderAvatarImage();\n }\n\n // Print out display name\n if (config.name) {\n renderDisplayName();\n }\n\n utils.doCallback('renderCompleted', config);\n\n return this;\n\n };\n\n // Initilization method\n var init = function(suppliedConfig) {\n\n utils.logDebug(['Supplied config:', suppliedConfig], suppliedConfig);\n\n try {\n\n // Set rootTarget to the target element and clean before child nodes before continuing\n prepareDOM(suppliedConfig || {});\n\n // Start from local config\n if (!suppliedConfig || (!suppliedConfig.widgetId && !suppliedConfig.widgetSlug) || suppliedConfig.disableRemoteLoad) {\n return start(suppliedConfig)\n }\n\n } catch (e) {\n return this\n }\n\n // Load remote config\n loadRemoteConfig(suppliedConfig)\n .then(function (response) {\n // save widget ID from remote to reference it when creating bookings\n var remoteConfig = response.data.config\n if (response.data.id) remoteConfig.widgetId = response.data.id\n // merge with supplied config for overwriting settings\n var mergedConfig = $.extend(true, {}, remoteConfig, suppliedConfig);\n utils.logDebug(['Remote config:', remoteConfig], mergedConfig);\n start(mergedConfig)\n })\n .catch(function () {\n triggerError('The widget could not be found, please double-check your widgetId/widgetSlug');\n })\n\n return this\n\n };\n\n // Load config from remote (embed or hosted)\n var loadRemoteConfig = function(suppliedConfig) {\n\n config = setConfigDefaults(suppliedConfig)\n timekitSetupConfig();\n if (suppliedConfig.widgetId) {\n return timekit\n .getEmbedWidget({ id: suppliedConfig.widgetId })\n }\n if (suppliedConfig.widgetSlug) {\n return timekit\n .getHostedWidget({ slug: suppliedConfig.widgetSlug })\n } else {\n throw triggerError('No widget configuration, widgetSlug or widgetId found');\n }\n\n };\n\n var start = function(suppliedConfig) {\n\n // Handle config and defaults\n setConfig(suppliedConfig);\n return render();\n\n };\n\n var destroy = function() {\n\n prepareDOM({});\n config = {};\n return this;\n\n };\n\n // The fullCalendar object for advanced puppeting\n var fullCalendar = function() {\n\n if (calendarTarget.fullCalendar === undefined) { return undefined; }\n return calendarTarget.fullCalendar.apply(calendarTarget, arguments);\n\n };\n\n // Expose methods\n return {\n setConfig: setConfig,\n getConfig: getConfig,\n getVersion: getVersion,\n render: render,\n init: init,\n destroy: destroy,\n timekitCreateBooking: timekitCreateBooking,\n fullCalendar: fullCalendar,\n timekitSdk: timekit\n };\n\n}\n\n// Autoload if config is available on window, else export function\nvar globalLibraryConfig = window.timekitBookingConfig\nif (window && globalLibraryConfig && globalLibraryConfig.autoload !== false) {\n $(window).on('load', function(){\n var instance = new TimekitBooking();\n instance.init(globalLibraryConfig);\n module.exports = instance;\n });\n} else {\n module.exports = TimekitBooking;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/main.js\n// module id = 0\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"jQuery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\",\"amd\":\"jquery\"}\n// module id = 1\n// module chunks = 0","/* global window, exports, define */\n\n!function() {\n 'use strict'\n\n var re = {\n not_string: /[^s]/,\n not_bool: /[^t]/,\n not_type: /[^T]/,\n not_primitive: /[^v]/,\n number: /[diefg]/,\n numeric_arg: /[bcdiefguxX]/,\n json: /[j]/,\n not_json: /[^j]/,\n text: /^[^\\x25]+/,\n modulo: /^\\x25{2}/,\n placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\n key: /^([a-z_][a-z_\\d]*)/i,\n key_access: /^\\.([a-z_][a-z_\\d]*)/i,\n index_access: /^\\[(\\d+)\\]/,\n sign: /^[\\+\\-]/\n }\n\n function sprintf(key) {\n // `arguments` is not an array, but should be fine for this call\n return sprintf_format(sprintf_parse(key), arguments)\n }\n\n function vsprintf(fmt, argv) {\n return sprintf.apply(null, [fmt].concat(argv || []))\n }\n\n function sprintf_format(parse_tree, argv) {\n var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, match, pad, pad_character, pad_length, is_positive, sign\n for (i = 0; i < tree_length; i++) {\n if (typeof parse_tree[i] === 'string') {\n output += parse_tree[i]\n }\n else if (Array.isArray(parse_tree[i])) {\n match = parse_tree[i] // convenience purposes only\n if (match[2]) { // keyword argument\n arg = argv[cursor]\n for (k = 0; k < match[2].length; k++) {\n if (!arg.hasOwnProperty(match[2][k])) {\n throw new Error(sprintf('[sprintf] property \"%s\" does not exist', match[2][k]))\n }\n arg = arg[match[2][k]]\n }\n }\n else if (match[1]) { // positional argument (explicit)\n arg = argv[match[1]]\n }\n else { // positional argument (implicit)\n arg = argv[cursor++]\n }\n\n if (re.not_type.test(match[8]) && re.not_primitive.test(match[8]) && arg instanceof Function) {\n arg = arg()\n }\n\n if (re.numeric_arg.test(match[8]) && (typeof arg !== 'number' && isNaN(arg))) {\n throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))\n }\n\n if (re.number.test(match[8])) {\n is_positive = arg >= 0\n }\n\n switch (match[8]) {\n case 'b':\n arg = parseInt(arg, 10).toString(2)\n break\n case 'c':\n arg = String.fromCharCode(parseInt(arg, 10))\n break\n case 'd':\n case 'i':\n arg = parseInt(arg, 10)\n break\n case 'j':\n arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0)\n break\n case 'e':\n arg = match[7] ? parseFloat(arg).toExponential(match[7]) : parseFloat(arg).toExponential()\n break\n case 'f':\n arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg)\n break\n case 'g':\n arg = match[7] ? String(Number(arg.toPrecision(match[7]))) : parseFloat(arg)\n break\n case 'o':\n arg = (parseInt(arg, 10) >>> 0).toString(8)\n break\n case 's':\n arg = String(arg)\n arg = (match[7] ? arg.substring(0, match[7]) : arg)\n break\n case 't':\n arg = String(!!arg)\n arg = (match[7] ? arg.substring(0, match[7]) : arg)\n break\n case 'T':\n arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\n arg = (match[7] ? arg.substring(0, match[7]) : arg)\n break\n case 'u':\n arg = parseInt(arg, 10) >>> 0\n break\n case 'v':\n arg = arg.valueOf()\n arg = (match[7] ? arg.substring(0, match[7]) : arg)\n break\n case 'x':\n arg = (parseInt(arg, 10) >>> 0).toString(16)\n break\n case 'X':\n arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\n break\n }\n if (re.json.test(match[8])) {\n output += arg\n }\n else {\n if (re.number.test(match[8]) && (!is_positive || match[3])) {\n sign = is_positive ? '+' : '-'\n arg = arg.toString().replace(re.sign, '')\n }\n else {\n sign = ''\n }\n pad_character = match[4] ? match[4] === '0' ? '0' : match[4].charAt(1) : ' '\n pad_length = match[6] - (sign + arg).length\n pad = match[6] ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\n output += match[5] ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\n }\n }\n }\n return output\n }\n\n var sprintf_cache = Object.create(null)\n\n function sprintf_parse(fmt) {\n if (sprintf_cache[fmt]) {\n return sprintf_cache[fmt]\n }\n\n var _fmt = fmt, match, parse_tree = [], arg_names = 0\n while (_fmt) {\n if ((match = re.text.exec(_fmt)) !== null) {\n parse_tree.push(match[0])\n }\n else if ((match = re.modulo.exec(_fmt)) !== null) {\n parse_tree.push('%')\n }\n else if ((match = re.placeholder.exec(_fmt)) !== null) {\n if (match[2]) {\n arg_names |= 1\n var field_list = [], replacement_field = match[2], field_match = []\n if ((field_match = re.key.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\n if ((field_match = re.key_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n }\n else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n }\n else {\n throw new SyntaxError('[sprintf] failed to parse named argument key')\n }\n }\n }\n else {\n throw new SyntaxError('[sprintf] failed to parse named argument key')\n }\n match[2] = field_list\n }\n else {\n arg_names |= 2\n }\n if (arg_names === 3) {\n throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\n }\n parse_tree.push(match)\n }\n else {\n throw new SyntaxError('[sprintf] unexpected placeholder')\n }\n _fmt = _fmt.substring(match[0].length)\n }\n return sprintf_cache[fmt] = parse_tree\n }\n\n /**\n * export to either browser or node.js\n */\n /* eslint-disable quote-props */\n if (typeof exports !== 'undefined') {\n exports['sprintf'] = sprintf\n exports['vsprintf'] = vsprintf\n }\n if (typeof window !== 'undefined') {\n window['sprintf'] = sprintf\n window['vsprintf'] = vsprintf\n\n if (typeof define === 'function' && define['amd']) {\n define(function() {\n return {\n 'sprintf': sprintf,\n 'vsprintf': vsprintf\n }\n })\n }\n }\n /* eslint-enable quote-props */\n}()\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/sprintf-js/src/sprintf.js\n// module id = 2\n// module chunks = 0","module.exports = function() { throw new Error(\"define cannot be used indirect\"); };\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/amd-define.js\n// module id = 3\n// module chunks = 0","'use strict';\n\n/*!\n * Timekit JavaScript SDK\n * http://timekit.io\n *\n * Copyright 2015 Timekit, Inc.\n * The Timekit JavaScript SDK is freely distributable under the MIT license.\n *\n */\nvar axios = require('axios');\nvar base64 = require('base-64');\nvar humps = require('humps');\nvar merge = require('deepmerge');\n\nfunction Timekit() {\n\n /**\n * Auth variables for login gated API methods\n * @type {String}\n */\n var userEmail;\n var userToken;\n var includes = [];\n var headers = {};\n var nextPayload = {};\n\n /**\n * Default config\n * @type {Object}\n */\n var config = {\n app: '',\n apiBaseUrl: 'https://api.timekit.io/',\n apiVersion: 'v2',\n convertResponseToCamelcase: false,\n convertRequestToSnakecase: true,\n autoFlattenResponse: true\n };\n\n /**\n * Generate base64 string for basic auth purposes\n * @type {Function}\n * @return {String}\n */\n\n var encodeAuthHeader = function(email, token) {\n return base64.encode(email + ':' + token);\n };\n\n /**\n * Build absolute URL for API call\n * @type {Function}\n * @return {String}\n */\n var buildUrl = function(endpoint) {\n return config.apiBaseUrl + config.apiVersion + endpoint;\n };\n\n var copyResponseMetaData = function(response) {\n if (Object.keys(response.data).length < 2) return\n response.metaData = {}\n Object.keys(response.data).forEach(function(key) {\n if (key !== 'data') response.metaData[key] = response.data[key]\n })\n }\n\n /**\n * Add the carried payload for next request to the actual payload\n * @type {Function}\n * @return {String}\n */\n var mergeNextPayload = function (args) {\n if (Object.keys(nextPayload).length === 0) return args\n // Merge potential query string params manually\n if (nextPayload.params && args.params) {\n var nextParams = nextPayload.params\n for (var param in nextParams) {\n if (typeof args.params[param] !== 'undefined') {\n args.params[param] += (';' + nextParams[param])\n }\n }\n }\n args = merge(nextPayload, args)\n nextPayload = {};\n return args\n }\n\n /**\n * Root Object that holds methods to expose for API consumption\n * @type {Object}\n */\n var TK = {};\n\n /**\n * Prepare and make HTTP request to API\n * @type {Object}\n * @return {Promise}\n */\n TK.makeRequest = function(args) {\n\n // Handle chained payload data if applicable\n args = mergeNextPayload(args)\n\n // construct URL with base, version and endpoint\n args.url = buildUrl(args.url);\n\n // add http headers if applicable\n args.headers = args.headers || headers || {};\n\n if (config.headers) {\n args.headers = merge(config.headers, args.headers)\n }\n if (!args.headers['Timekit-App'] && config.app) {\n args.headers['Timekit-App'] = config.app;\n }\n if (config.inputTimestampFormat) {\n args.headers['Timekit-InputTimestampFormat'] = config.inputTimestampFormat;\n }\n if (config.outputTimestampFormat) {\n args.headers['Timekit-OutputTimestampFormat'] = config.outputTimestampFormat;\n }\n if (config.timezone) {\n args.headers['Timekit-Timezone'] = config.timezone;\n }\n\n // add auth headers if not being overwritten by request/asUser\n if (!args.headers['Authorization'] && userEmail && userToken) {\n args.headers['Authorization'] = 'Basic ' + encodeAuthHeader(userEmail, userToken);\n }\n\n // reset headers\n if (Object.keys(headers).length > 0) {\n headers = {};\n }\n\n // add dynamic includes if applicable\n if (includes && includes.length > 0) {\n if (args.params === undefined) { args.params = {}; }\n args.params.include = includes.join();\n includes = [];\n }\n\n // decamelize keys in data objects\n if (args.data && config.convertRequestToSnakecase) { args.data = humps.decamelizeKeys(args.data); }\n\n // register response interceptor for data manipulation\n var interceptor = axios.interceptors.response.use(function (response) {\n if (response.data && response.data.data) {\n if (config.autoFlattenResponse) {\n copyResponseMetaData(response)\n response.data = response.data.data;\n }\n if (config.convertResponseToCamelcase) {\n response.data = humps.camelizeKeys(response.data);\n }\n }\n return response;\n }, function (error) {\n return Promise.reject(error);\n });\n\n // execute request!\n var request = axios(args);\n\n // deregister response interceptor\n axios.interceptors.response.eject(interceptor);\n\n return request;\n };\n\n /**\n * Overwrite default config with supplied settings\n * @type {Function}\n * @return {Object}\n */\n TK.configure = function(custom) {\n for (var attr in custom) { config[attr] = custom[attr]; }\n return config;\n };\n\n /**\n * Returns the current config\n * @type {Function}\n * @return {Object}\n */\n TK.getConfig = function() {\n return config;\n };\n\n /**\n * Set the active user manually (happens automatically on timekit.auth())\n * @type {Function}\n */\n TK.setUser = function(email, apiToken) {\n userEmail = email;\n userToken = apiToken;\n };\n\n /**\n * Returns the current active user\n * @type {Function}\n * @return {Object}\n */\n TK.getUser = function() {\n return {\n email: userEmail,\n apiToken: userToken\n };\n };\n\n /**\n * Set the active user temporarily for the next request (fluent/chainable return)\n * @type {Function}\n */\n TK.asUser = function(email, apiToken) {\n headers['Authorization'] = 'Basic ' + encodeAuthHeader(email, apiToken);\n return this;\n };\n\n /**\n * Set the timekit app slug temporarily for the next request (fluent/chainable return)\n * @type {Function}\n */\n TK.asApp = function(slug) {\n headers['Timekit-App'] = slug;\n return this;\n };\n\n /**\n * Add supplied dynamic includes to the next request (fluent/chainable return)\n * @type {Function}\n * @return {Object}\n */\n TK.include = function() {\n includes = Array.prototype.slice.call(arguments);\n return this;\n };\n\n /**\n * Add supplied headers to the next request (fluent/chainable return)\n * @type {Function}\n * @return {Object}\n */\n TK.headers = function(data) {\n headers = merge(headers, data)\n return this;\n };\n\n /**\n * Add supplied payload to the next request only\n * @type {Function}\n * @return {Object}\n */\n TK.carry = function(data) {\n nextPayload = merge(nextPayload, data)\n return this;\n };\n\n /**\n * Get user's connected accounts\n * @type {Function}\n * @return {Promise}\n */\n TK.getAccounts = function() {\n\n return TK.makeRequest({\n url: '/accounts',\n method: 'get'\n });\n\n };\n\n /**\n * Redirect to the Google signup/login page\n * @type {Function}\n * @return {String}\n */\n TK.accountGoogleSignup = function(data, shouldAutoRedirect) {\n\n var app = config.app;\n\n // If app header exists (using .asApp() function), use that\n if (headers['Timekit-App']) {\n app = headers['Timekit-App'];\n delete headers['Timekit-App'];\n }\n\n var url = buildUrl('/accounts/google/signup') + '?Timekit-App=' + app + (data && data.callback ? '&callback=' + data.callback : '');\n\n if(shouldAutoRedirect && window) {\n window.location.href = url;\n } else {\n return url;\n }\n\n };\n\n /**\n * Initiate an account sync\n * @type {Function}\n * @return {Promise}\n */\n TK.accountSync = function(data) {\n\n return TK.makeRequest({\n url: '/accounts/sync',\n method: 'get',\n params: data\n });\n\n };\n\n /**\n * Authenticate a user to retrive API token for future calls\n * @type {Function}\n * @return {Promise}\n */\n TK.auth = function(data) {\n\n var r = TK.makeRequest({\n url: '/auth',\n method: 'post',\n data: data\n });\n\n r.then(function(response) {\n TK.setUser(response.data.email, response.data.api_token);\n }).catch(function(){\n TK.setUser('','');\n });\n\n return r;\n\n };\n\n /**\n * Get list of apps\n * @type {Function}\n * @return {Promise}\n */\n TK.getApps = function() {\n\n return TK.makeRequest({\n url: '/apps',\n method: 'get'\n });\n\n };\n\n /**\n * Get settings for a specific app\n * @type {Function}\n * @return {Promise}\n */\n TK.getApp = function(data) {\n\n return TK.makeRequest({\n url: '/apps/' + data.slug,\n method: 'get'\n });\n\n };\n\n /**\n * Create a new Timekit app\n * @type {Function}\n * @return {Promise}\n */\n TK.createApp = function(data) {\n\n return TK.makeRequest({\n url: '/apps',\n method: 'post',\n data: data\n });\n\n };\n\n /**\n * Update settings for a specific app\n * @type {Function}\n * @return {Promise}\n */\n TK.updateApp = function(data) {\n\n var slug = data.slug;\n delete data.slug;\n\n return TK.makeRequest({\n url: '/apps/' + slug,\n method: 'put',\n data: data\n });\n\n };\n\n /**\n * Delete an app\n * @type {Function}\n * @return {Promise}\n */\n TK.deleteApp = function(data) {\n\n return TK.makeRequest({\n url: '/apps/' + data.slug,\n method: 'delete'\n });\n\n };\n\n /**\n * Get users calendars that are present on Timekit (synced from providers)\n * @type {Function}\n * @return {Promise}\n */\n TK.getCalendars = function() {\n\n return TK.makeRequest({\n url: '/calendars',\n method: 'get'\n });\n\n };\n\n /**\n * Get users calendars that are present on Timekit (synced from providers)\n * @type {Function}\n * @return {Promise}\n */\n TK.getCalendar = function(data) {\n\n return TK.makeRequest({\n url: '/calendars/' + data.id,\n method: 'get'\n });\n\n };\n\n /**\n * Create a new calendar for current user\n * @type {Function}\n * @return {Promise}\n */\n TK.createCalendar = function(data) {\n\n return TK.makeRequest({\n url: '/calendars/',\n method: 'post',\n data: data\n });\n\n };\n\n /**\n * Update a calendar for current user\n * @type {Function}\n * @return {Promise}\n */\n TK.updateCalendar = function(data) {\n\n var id = data.id;\n delete data.id;\n\n return TK.makeRequest({\n url: '/calendars/' + id,\n method: 'put',\n data: data\n });\n\n };\n\n /**\n * Delete a calendar\n * @type {Function}\n * @return {Promise}\n */\n TK.deleteCalendar = function(data) {\n\n return TK.makeRequest({\n url: '/calendars/' + data.id,\n method: 'delete'\n });\n\n };\n\n /**\n * Get all user's events\n * @type {Function}\n * @return {Promise}\n */\n TK.getEvents = function(data) {\n\n return TK.makeRequest({\n url: '/events',\n method: 'get',\n params: data\n });\n\n };\n\n /**\n * Get a user's event by ID\n * @type {Function}\n * @return {Promise}\n */\n TK.getEvent = function(data) {\n\n return TK.makeRequest({\n url: '/events/' + data.id,\n method: 'get'\n });\n\n };\n\n /**\n * Create a new event\n * @type {Function}\n * @return {Promise}\n */\n TK.createEvent = function(data) {\n\n return TK.makeRequest({\n url: '/events',\n method: 'post',\n data: data\n });\n\n };\n\n /**\n * Update an existing event\n * @type {Function}\n * @return {Promise}\n */\n TK.updateEvent = function(data) {\n\n var id = data.id;\n delete data.id;\n\n return TK.makeRequest({\n url: '/events/' + id,\n method: 'put',\n data: data\n });\n\n };\n\n /**\n * Delete a user's event by ID\n * @type {Function}\n * @return {Promise}\n */\n TK.deleteEvent = function(data) {\n\n return TK.makeRequest({\n url: '/events/' + data.id,\n method: 'delete'\n });\n\n };\n\n /**\n * Find mutual availability across multiple users/calendars\n * @type {Function}\n * @return {Promise}\n */\n TK.findTime = function(data) {\n\n return TK.makeRequest({\n url: '/findtime',\n method: 'post',\n data: data\n });\n\n };\n\n /**\n * Find bulk availability across multiple users/calendars\n * @type {Function}\n * @return {Promise}\n */\n TK.findTimeBulk = function(data) {\n\n return TK.makeRequest({\n url: '/findtime/bulk',\n method: 'post',\n data: data\n });\n\n };\n\n /**\n * Find team availability across multiple users/calendars\n * @type {Function}\n * @return {Promise}\n */\n TK.findTimeTeam = function(data) {\n\n return TK.makeRequest({\n url: '/findtime/team',\n method: 'post',\n data: data\n });\n\n };\n\n /**\n * Create a findtime filtercollection\n * @type {Function}\n * @return {Promise}\n */\n TK.createFindTimeFilterCollection = function(data) {\n\n return TK.makeRequest({\n url: '/findtime/filtercollections',\n method: 'post',\n data: data\n });\n\n };\n\n /**\n * Get findtime filtercollections\n * @type {Function}\n * @return {Promise}\n */\n TK.getFindTimeFilterCollections = function() {\n\n return TK.makeRequest({\n url: '/findtime/filtercollections',\n method: 'get'\n });\n\n };\n\n /**\n * Update a findtime filtercollections\n * @type {Function}\n * @return {Promise}\n */\n TK.updateFindTimeFilterCollection = function(data) {\n\n var id = data.id;\n delete data.id;\n\n return TK.makeRequest({\n url: '/findtime/filtercollections/' + id,\n method: 'get',\n data: data\n });\n\n };\n\n /**\n * Create a new user with the given properties\n * @type {Function}\n * @return {Promise}\n */\n TK.createUser = function(data) {\n\n return TK.makeRequest({\n url: '/users',\n method: 'post',\n data: data\n });\n\n };\n\n /**\n * Fetch current user data from server\n * @type {Function}\n * @return {Promise}\n */\n TK.getUserInfo = function() {\n\n return TK.makeRequest({\n url: '/users/me',\n method: 'get'\n });\n\n };\n\n /**\n * Fetch current user data from server\n * @type {Function}\n * @return {Promise}\n */\n TK.updateUser = function(data) {\n\n return TK.makeRequest({\n url: '/users/me',\n method: 'put',\n data: data\n });\n\n };\n\n /**\n * Reset password for a user\n * @type {Function}\n * @return {Promise}\n */\n TK.resetUserPassword = function(data) {\n\n return TK.makeRequest({\n url: '/users/resetpassword',\n method: 'post',\n data: data\n });\n\n };\n\n /**\n * Get a specific users' timezone\n * @type {Function}\n * @return {Promise}\n */\n TK.getUserTimezone = function(data) {\n\n return TK.makeRequest({\n url: '/users/timezone/' + data.email,\n method: 'get'\n });\n\n };\n\n /**\n * Get all user auth credentials\n * @type {Function}\n * @return {Promise}\n */\n TK.getCredentials = function() {\n\n return TK.makeRequest({\n url: '/credentials',\n method: 'get'\n });\n\n };\n\n /**\n * Create a new pair of auth credentials\n * @type {Function}\n * @return {Promise}\n */\n TK.createCredential = function(data) {\n\n return TK.makeRequest({\n url: '/credentials',\n method: 'post',\n data: data\n });\n\n };\n\n /**\n * Delete a pair of auth credentials\n * @type {Function}\n * @return {Promise}\n */\n TK.deleteCredential = function(data) {\n\n return TK.makeRequest({\n url: '/credentials/' + data.id,\n method: 'delete'\n });\n\n };\n\n /**\n * Get all bookings\n * @type {Function}\n * @return {Promise}\n */\n TK.getBookings = function() {\n\n return TK.makeRequest({\n url: '/bookings',\n method: 'get'\n });\n\n };\n\n /**\n * Get specific booking\n * @type {Function}\n * @return {Promise}\n */\n TK.getBooking = function(data) {\n\n return TK.makeRequest({\n url: '/bookings/' + data.id,\n method: 'get'\n });\n\n };\n\n /**\n * Create a new booking\n * @type {Function}\n * @return {Promise}\n */\n TK.createBooking = function(data) {\n\n return TK.makeRequest({\n url: '/bookings',\n method: 'post',\n data: data\n });\n\n };\n\n /**\n * Update an existing booking\n * @type {Function}\n * @return {Promise}\n */\n TK.updateBooking = function(data) {\n\n var id = data.id;\n delete data.id;\n\n var action = data.action;\n delete data.action;\n\n return TK.makeRequest({\n url: '/bookings/' + id + '/' + action,\n method: 'put',\n data: data\n });\n\n };\n\n /**\n * Get all bookings\n * @type {Function}\n * @return {Promise}\n */\n TK.getGroupBookings = function() {\n\n return TK.makeRequest({\n url: '/bookings/groups',\n method: 'get'\n });\n\n };\n\n /**\n * Get specific booking\n * @type {Function}\n * @return {Promise}\n */\n TK.getGroupBooking = function(data) {\n\n return TK.makeRequest({\n url: '/bookings/' + data.id + '/groups',\n method: 'get'\n });\n\n };\n\n /**\n * Get widgets\n * @type {Function}\n * @return {Promise}\n */\n TK.getWidgets = function() {\n\n return TK.makeRequest({\n url: '/widgets',\n method: 'get'\n });\n\n };\n\n /**\n * Get a specific widget\n * @type {Function}\n * @return {Promise}\n */\n TK.getWidget = function(data) {\n\n return TK.makeRequest({\n url: '/widgets/' + data.id,\n method: 'get'\n });\n\n };\n\n /**\n * Get public widget by slug\n * @type {Function}\n * @return {Promise}\n */\n TK.getHostedWidget = function(data) {\n\n return TK.makeRequest({\n url: '/widgets/hosted/' + data.slug,\n method: 'get'\n });\n\n };\n\n /**\n * Get public widget by slug\n * @type {Function}\n * @return {Promise}\n */\n TK.getEmbedWidget = function(data) {\n\n return TK.makeRequest({\n url: '/widgets/embed/' + data.id,\n method: 'get'\n });\n\n };\n\n /**\n * Create a new widget\n * @type {Function}\n * @return {Promise}\n */\n TK.createWidget = function(data) {\n\n return TK.makeRequest({\n url: '/widgets',\n method: 'post',\n data: data\n });\n\n };\n\n /**\n * Update an existing widget\n * @type {Function}\n * @return {Promise}\n */\n TK.updateWidget = function(data) {\n\n var id = data.id;\n delete data.id;\n\n return TK.makeRequest({\n url: '/widgets/' + id,\n method: 'put',\n data: data\n });\n\n };\n\n /**\n * Delete a widget\n * @type {Function}\n * @return {Promise}\n */\n TK.deleteWidget = function(data) {\n\n return TK.makeRequest({\n url: '/widgets/' + data.id,\n method: 'delete'\n });\n\n };\n\n /**\n * Return a new instance of the SDK\n * @type {Function}\n * @return {Object}\n */\n TK.newInstance = function() {\n return new Timekit();\n }\n\n return TK;\n\n}\n\nmodule.exports = new Timekit();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/timekit-sdk/src/timekit.js\n// module id = 4\n// module chunks = 0","module.exports = require('es6-promise').Promise;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es6-promise-promise/index.js\n// module id = 5\n// module chunks = 0","/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 3.3.1\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n return typeof x === 'function' || typeof x === 'object' && x !== null;\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nvar _isArray = undefined;\nif (!Array.isArray) {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n} else {\n _isArray = Array.isArray;\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n return function () {\n vertxNext(flush);\n };\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n _resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n _reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n _reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n _reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return _resolve(promise, value);\n }, function (reason) {\n return _reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$) {\n if (maybeThenable.constructor === promise.constructor && then$$ === then && maybeThenable.constructor.resolve === resolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$ === GET_THEN_ERROR) {\n _reject(promise, GET_THEN_ERROR.error);\n } else if (then$$ === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$)) {\n handleForeignThenable(promise, maybeThenable, then$$);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction _resolve(promise, value) {\n if (promise === value) {\n _reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction _reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n _reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n _resolve(promise, value);\n } else if (failed) {\n _reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n _reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n _resolve(promise, value);\n }, function rejectPromise(reason) {\n _reject(promise, reason);\n });\n } catch (e) {\n _reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this._input = input;\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate();\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n _reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function () {\n var length = this.length;\n var _input = this._input;\n\n for (var i = 0; this._state === PENDING && i < length; i++) {\n this._eachEntry(_input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve$$ = c.resolve;\n\n if (resolve$$ === resolve) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$) {\n return resolve$$(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n _reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = resolve;\nPromise.reject = reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};\n\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}\n\npolyfill();\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\n\nreturn Promise;\n\n})));\n//# sourceMappingURL=es6-promise.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es6-promise/dist/es6-promise.js\n// module id = 6\n// module chunks = 0","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 7\n// module chunks = 0","/* (ignored) */\n\n\n//////////////////\n// WEBPACK FOOTER\n// vertx (ignored)\n// module id = 8\n// module chunks = 0","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/index.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar defaults = require('./defaults');\nvar utils = require('./utils');\nvar dispatchRequest = require('./core/dispatchRequest');\nvar InterceptorManager = require('./core/InterceptorManager');\nvar isAbsoluteURL = require('./helpers/isAbsoluteURL');\nvar combineURLs = require('./helpers/combineURLs');\nvar bind = require('./helpers/bind');\nvar transformData = require('./helpers/transformData');\n\nfunction Axios(defaultConfig) {\n this.defaults = utils.merge({}, defaultConfig);\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, this.defaults, { method: 'get' }, config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Don't allow overriding defaults.withCredentials\n config.withCredentials = config.withCredentials || this.defaults.withCredentials;\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nvar defaultInstance = new Axios(defaults);\nvar axios = module.exports = bind(Axios.prototype.request, defaultInstance);\naxios.request = bind(Axios.prototype.request, defaultInstance);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose properties from defaultInstance\naxios.defaults = defaultInstance.defaults;\naxios.interceptors = defaultInstance.interceptors;\n\n// Factory for creating new instances\naxios.create = function create(defaultConfig) {\n return new Axios(defaultConfig);\n};\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n axios[method] = bind(Axios.prototype[method], defaultInstance);\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n axios[method] = bind(Axios.prototype[method], defaultInstance);\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/axios.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nmodule.exports = {\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n data = data.replace(PROTECTION_PREFIX, '');\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n patch: utils.merge(DEFAULT_CONTENT_TYPE),\n post: utils.merge(DEFAULT_CONTENT_TYPE),\n put: utils.merge(DEFAULT_CONTENT_TYPE)\n },\n\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/defaults.js\n// module id = 11\n// module chunks = 0","'use strict';\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * typeof document.createElement -> undefined\n */\nfunction isStandardBrowserEnv() {\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined' &&\n typeof document.createElement === 'function'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object' && !isArray(obj)) {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n trim: trim\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/utils.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/helpers/normalizeHeaderName.js\n// module id = 13\n// module chunks = 0","'use strict';\n\n/**\n * Dispatch a request to the server using whichever adapter\n * is supported by the current environment.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n return new Promise(function executor(resolve, reject) {\n try {\n var adapter;\n\n if (typeof config.adapter === 'function') {\n // For custom adapter support\n adapter = config.adapter;\n } else if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('../adapters/xhr');\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = require('../adapters/http');\n }\n\n if (typeof adapter === 'function') {\n adapter(resolve, reject, config);\n }\n } catch (e) {\n reject(e);\n }\n });\n};\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/core/dispatchRequest.js\n// module id = 14\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar transformData = require('./../helpers/transformData');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar btoa = (typeof window !== 'undefined' && window.btoa) || require('./../helpers/btoa');\nvar settle = require('../helpers/settle');\n\nmodule.exports = function xhrAdapter(resolve, reject, config) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' && typeof window !== 'undefined' && window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || (request.readyState !== 4 && !xDomain)) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n if (request.status === 0) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: transformData(\n responseData,\n responseHeaders,\n config.transformResponse\n ),\n // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new Error('Network Error'));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var err = new Error('timeout of ' + config.timeout + 'ms exceeded');\n err.timeout = config.timeout;\n err.code = 'ECONNABORTED';\n reject(err);\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = config.withCredentials || isURLSameOrigin(config.url) ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n if (request.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (config.progress) {\n if (config.method === 'post' || config.method === 'put') {\n request.upload.addEventListener('progress', config.progress);\n } else if (config.method === 'get') {\n request.addEventListener('progress', config.progress);\n }\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/adapters/xhr.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n }\n\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/helpers/buildURL.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/helpers/parseHeaders.js\n// module id = 17\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/helpers/transformData.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/helpers/isURLSameOrigin.js\n// module id = 19\n// module chunks = 0","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/helpers/btoa.js\n// module id = 20\n// module chunks = 0","'use strict';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(response);\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/helpers/settle.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/helpers/cookies.js\n// module id = 22\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/core/InterceptorManager.js\n// module id = 23\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/helpers/isAbsoluteURL.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '');\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/helpers/combineURLs.js\n// module id = 25\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/helpers/bind.js\n// module id = 26\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/axios/lib/helpers/spread.js\n// module id = 27\n// module chunks = 0","/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */\n;(function(root) {\n\n\t// Detect free variables `exports`.\n\tvar freeExports = typeof exports == 'object' && exports;\n\n\t// Detect free variable `module`.\n\tvar freeModule = typeof module == 'object' && module &&\n\t\tmodule.exports == freeExports && module;\n\n\t// Detect free variable `global`, from Node.js or Browserified code, and use\n\t// it as `root`.\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t\troot = freeGlobal;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar InvalidCharacterError = function(message) {\n\t\tthis.message = message;\n\t};\n\tInvalidCharacterError.prototype = new Error;\n\tInvalidCharacterError.prototype.name = 'InvalidCharacterError';\n\n\tvar error = function(message) {\n\t\t// Note: the error messages used throughout this file match those used by\n\t\t// the native `atob`/`btoa` implementation in Chromium.\n\t\tthrow new InvalidCharacterError(message);\n\t};\n\n\tvar TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t// http://whatwg.org/html/common-microsyntaxes.html#space-character\n\tvar REGEX_SPACE_CHARACTERS = /[\\t\\n\\f\\r ]/g;\n\n\t// `decode` is designed to be fully compatible with `atob` as described in the\n\t// HTML Standard. http://whatwg.org/html/webappapis.html#dom-windowbase64-atob\n\t// The optimized base64-decoding algorithm used is based on @atk’s excellent\n\t// implementation. https://gist.github.com/atk/1020396\n\tvar decode = function(input) {\n\t\tinput = String(input)\n\t\t\t.replace(REGEX_SPACE_CHARACTERS, '');\n\t\tvar length = input.length;\n\t\tif (length % 4 == 0) {\n\t\t\tinput = input.replace(/==?$/, '');\n\t\t\tlength = input.length;\n\t\t}\n\t\tif (\n\t\t\tlength % 4 == 1 ||\n\t\t\t// http://whatwg.org/C#alphanumeric-ascii-characters\n\t\t\t/[^+a-zA-Z0-9/]/.test(input)\n\t\t) {\n\t\t\terror(\n\t\t\t\t'Invalid character: the string to be decoded is not correctly encoded.'\n\t\t\t);\n\t\t}\n\t\tvar bitCounter = 0;\n\t\tvar bitStorage;\n\t\tvar buffer;\n\t\tvar output = '';\n\t\tvar position = -1;\n\t\twhile (++position < length) {\n\t\t\tbuffer = TABLE.indexOf(input.charAt(position));\n\t\t\tbitStorage = bitCounter % 4 ? bitStorage * 64 + buffer : buffer;\n\t\t\t// Unless this is the first of a group of 4 characters…\n\t\t\tif (bitCounter++ % 4) {\n\t\t\t\t// …convert the first 8 bits to a single ASCII character.\n\t\t\t\toutput += String.fromCharCode(\n\t\t\t\t\t0xFF & bitStorage >> (-2 * bitCounter & 6)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t};\n\n\t// `encode` is designed to be fully compatible with `btoa` as described in the\n\t// HTML Standard: http://whatwg.org/html/webappapis.html#dom-windowbase64-btoa\n\tvar encode = function(input) {\n\t\tinput = String(input);\n\t\tif (/[^\\0-\\xFF]/.test(input)) {\n\t\t\t// Note: no need to special-case astral symbols here, as surrogates are\n\t\t\t// matched, and the input is supposed to only contain ASCII anyway.\n\t\t\terror(\n\t\t\t\t'The string to be encoded contains characters outside of the ' +\n\t\t\t\t'Latin1 range.'\n\t\t\t);\n\t\t}\n\t\tvar padding = input.length % 3;\n\t\tvar output = '';\n\t\tvar position = -1;\n\t\tvar a;\n\t\tvar b;\n\t\tvar c;\n\t\tvar d;\n\t\tvar buffer;\n\t\t// Make sure any padding is handled outside of the loop.\n\t\tvar length = input.length - padding;\n\n\t\twhile (++position < length) {\n\t\t\t// Read three bytes, i.e. 24 bits.\n\t\t\ta = input.charCodeAt(position) << 16;\n\t\t\tb = input.charCodeAt(++position) << 8;\n\t\t\tc = input.charCodeAt(++position);\n\t\t\tbuffer = a + b + c;\n\t\t\t// Turn the 24 bits into four chunks of 6 bits each, and append the\n\t\t\t// matching character for each of them to the output.\n\t\t\toutput += (\n\t\t\t\tTABLE.charAt(buffer >> 18 & 0x3F) +\n\t\t\t\tTABLE.charAt(buffer >> 12 & 0x3F) +\n\t\t\t\tTABLE.charAt(buffer >> 6 & 0x3F) +\n\t\t\t\tTABLE.charAt(buffer & 0x3F)\n\t\t\t);\n\t\t}\n\n\t\tif (padding == 2) {\n\t\t\ta = input.charCodeAt(position) << 8;\n\t\t\tb = input.charCodeAt(++position);\n\t\t\tbuffer = a + b;\n\t\t\toutput += (\n\t\t\t\tTABLE.charAt(buffer >> 10) +\n\t\t\t\tTABLE.charAt((buffer >> 4) & 0x3F) +\n\t\t\t\tTABLE.charAt((buffer << 2) & 0x3F) +\n\t\t\t\t'='\n\t\t\t);\n\t\t} else if (padding == 1) {\n\t\t\tbuffer = input.charCodeAt(position);\n\t\t\toutput += (\n\t\t\t\tTABLE.charAt(buffer >> 2) +\n\t\t\t\tTABLE.charAt((buffer << 4) & 0x3F) +\n\t\t\t\t'=='\n\t\t\t);\n\t\t}\n\n\t\treturn output;\n\t};\n\n\tvar base64 = {\n\t\t'encode': encode,\n\t\t'decode': decode,\n\t\t'version': '0.1.0'\n\t};\n\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine(function() {\n\t\t\treturn base64;\n\t\t});\n\t}\telse if (freeExports && !freeExports.nodeType) {\n\t\tif (freeModule) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = base64;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (var key in base64) {\n\t\t\t\tbase64.hasOwnProperty(key) && (freeExports[key] = base64[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.base64 = base64;\n\t}\n\n}(this));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/base-64/base64.js\n// module id = 28\n// module chunks = 0","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tmodule.children = [];\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n}\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 29\n// module chunks = 0","// =========\n// = humps =\n// =========\n// version 0.7.0\n// Underscore-to-camelCase converter (and vice versa)\n// for strings and object keys\n\n// humps is copyright © 2012+ Dom Christie\n// Released under the MIT license.\n\n\n;(function(global) {\n\n var _processKeys = function(convert, obj, separator, ignoreNumbers) {\n if(!_isObject(obj) || _isDate(obj) || _isRegExp(obj) || _isBoolean(obj)) {\n return obj;\n }\n\n var output,\n i = 0,\n l = 0;\n\n if(_isArray(obj)) {\n output = [];\n for(l=obj.length; i 2.8.0)\n\t// and the below integer should be incremented.\n\tinternalApiVersion: 10\n};\nvar fcViews = FC.views = {};\n\n\n$.fn.fullCalendar = function(options) {\n\tvar args = Array.prototype.slice.call(arguments, 1); // for a possible method call\n\tvar res = this; // what this function will return (this jQuery object by default)\n\n\tthis.each(function(i, _element) { // loop each DOM element involved\n\t\tvar element = $(_element);\n\t\tvar calendar = element.data('fullCalendar'); // get the existing calendar object (if any)\n\t\tvar singleRes; // the returned value of this single method call\n\n\t\t// a method call\n\t\tif (typeof options === 'string') {\n\n\t\t\tif (options === 'getCalendar') {\n\t\t\t\tif (!i) { // first element only\n\t\t\t\t\tres = calendar;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (options === 'destroy') { // don't warn if no calendar object\n\t\t\t\tif (calendar) {\n\t\t\t\t\tcalendar.destroy();\n\t\t\t\t\telement.removeData('fullCalendar');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!calendar) {\n\t\t\t\tFC.warn(\"Attempting to call a FullCalendar method on an element with no calendar.\");\n\t\t\t}\n\t\t\telse if ($.isFunction(calendar[options])) {\n\t\t\t\tsingleRes = calendar[options].apply(calendar, args);\n\n\t\t\t\tif (!i) {\n\t\t\t\t\tres = singleRes; // record the first method call result\n\t\t\t\t}\n\t\t\t\tif (options === 'destroy') { // for the destroy method, must remove Calendar object data\n\t\t\t\t\telement.removeData('fullCalendar');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tFC.warn(\"'\" + options + \"' is an unknown FullCalendar method.\");\n\t\t\t}\n\t\t}\n\t\t// a new calendar initialization\n\t\telse if (!calendar) { // don't initialize twice\n\t\t\tcalendar = new Calendar(element, options);\n\t\t\telement.data('fullCalendar', calendar);\n\t\t\tcalendar.render();\n\t\t}\n\t});\n\n\treturn res;\n};\n\n\nvar complexOptions = [ // names of options that are objects whose properties should be combined\n\t'header',\n\t'footer',\n\t'buttonText',\n\t'buttonIcons',\n\t'themeButtonIcons'\n];\n\n\n// Merges an array of option objects into a single object\nfunction mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}\n\n;;\n\n// exports\nFC.applyAll = applyAll;\nFC.debounce = debounce;\nFC.isInt = isInt;\nFC.htmlEscape = htmlEscape;\nFC.cssToStr = cssToStr;\nFC.proxy = proxy;\nFC.capitaliseFirstLetter = capitaliseFirstLetter;\n\n\n/* FullCalendar-specific DOM Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\n\n// Given the scrollbar widths of some other container, create borders/margins on rowEls in order to match the left\n// and right space that was offset by the scrollbars. A 1-pixel border first, then margin beyond that.\nfunction compensateScroll(rowEls, scrollbarWidths) {\n\tif (scrollbarWidths.left) {\n\t\trowEls.css({\n\t\t\t'border-left-width': 1,\n\t\t\t'margin-left': scrollbarWidths.left - 1\n\t\t});\n\t}\n\tif (scrollbarWidths.right) {\n\t\trowEls.css({\n\t\t\t'border-right-width': 1,\n\t\t\t'margin-right': scrollbarWidths.right - 1\n\t\t});\n\t}\n}\n\n\n// Undoes compensateScroll and restores all borders/margins\nfunction uncompensateScroll(rowEls) {\n\trowEls.css({\n\t\t'margin-left': '',\n\t\t'margin-right': '',\n\t\t'border-left-width': '',\n\t\t'border-right-width': ''\n\t});\n}\n\n\n// Make the mouse cursor express that an event is not allowed in the current area\nfunction disableCursor() {\n\t$('body').addClass('fc-not-allowed');\n}\n\n\n// Returns the mouse cursor to its original look\nfunction enableCursor() {\n\t$('body').removeClass('fc-not-allowed');\n}\n\n\n// Given a total available height to fill, have `els` (essentially child rows) expand to accomodate.\n// By default, all elements that are shorter than the recommended height are expanded uniformly, not considering\n// any other els that are already too tall. if `shouldRedistribute` is on, it considers these tall rows and \n// reduces the available height.\nfunction distributeHeight(els, availableHeight, shouldRedistribute) {\n\n\t// *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions,\n\t// and it is better to be shorter than taller, to avoid creating unnecessary scrollbars.\n\n\tvar minOffset1 = Math.floor(availableHeight / els.length); // for non-last element\n\tvar minOffset2 = Math.floor(availableHeight - minOffset1 * (els.length - 1)); // for last element *FLOORING NOTE*\n\tvar flexEls = []; // elements that are allowed to expand. array of DOM nodes\n\tvar flexOffsets = []; // amount of vertical space it takes up\n\tvar flexHeights = []; // actual css height\n\tvar usedHeight = 0;\n\n\tundistributeHeight(els); // give all elements their natural height\n\n\t// find elements that are below the recommended height (expandable).\n\t// important to query for heights in a single first pass (to avoid reflow oscillation).\n\tels.each(function(i, el) {\n\t\tvar minOffset = i === els.length - 1 ? minOffset2 : minOffset1;\n\t\tvar naturalOffset = $(el).outerHeight(true);\n\n\t\tif (naturalOffset < minOffset) {\n\t\t\tflexEls.push(el);\n\t\t\tflexOffsets.push(naturalOffset);\n\t\t\tflexHeights.push($(el).height());\n\t\t}\n\t\telse {\n\t\t\t// this element stretches past recommended height (non-expandable). mark the space as occupied.\n\t\t\tusedHeight += naturalOffset;\n\t\t}\n\t});\n\n\t// readjust the recommended height to only consider the height available to non-maxed-out rows.\n\tif (shouldRedistribute) {\n\t\tavailableHeight -= usedHeight;\n\t\tminOffset1 = Math.floor(availableHeight / flexEls.length);\n\t\tminOffset2 = Math.floor(availableHeight - minOffset1 * (flexEls.length - 1)); // *FLOORING NOTE*\n\t}\n\n\t// assign heights to all expandable elements\n\t$(flexEls).each(function(i, el) {\n\t\tvar minOffset = i === flexEls.length - 1 ? minOffset2 : minOffset1;\n\t\tvar naturalOffset = flexOffsets[i];\n\t\tvar naturalHeight = flexHeights[i];\n\t\tvar newHeight = minOffset - (naturalOffset - naturalHeight); // subtract the margin/padding\n\n\t\tif (naturalOffset < minOffset) { // we check this again because redistribution might have changed things\n\t\t\t$(el).height(newHeight);\n\t\t}\n\t});\n}\n\n\n// Undoes distrubuteHeight, restoring all els to their natural height\nfunction undistributeHeight(els) {\n\tels.height('');\n}\n\n\n// Given `els`, a jQuery set of cells, find the cell with the largest natural width and set the widths of all the\n// cells to be that width.\n// PREREQUISITE: if you want a cell to take up width, it needs to have a single inner element w/ display:inline\nfunction matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}\n\n\n// Given one element that resides inside another,\n// Subtracts the height of the inner element from the outer element.\nfunction subtractInnerElHeight(outerEl, innerEl) {\n\tvar both = outerEl.add(innerEl);\n\tvar diff;\n\n\t// effin' IE8/9/10/11 sometimes returns 0 for dimensions. this weird hack was the only thing that worked\n\tboth.css({\n\t\tposition: 'relative', // cause a reflow, which will force fresh dimension recalculation\n\t\tleft: -1 // ensure reflow in case the el was already relative. negative is less likely to cause new scroll\n\t});\n\tdiff = outerEl.outerHeight() - innerEl.outerHeight(); // grab the dimensions\n\tboth.css({ position: '', left: '' }); // undo hack\n\n\treturn diff;\n}\n\n\n/* Element Geom Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\nFC.getOuterRect = getOuterRect;\nFC.getClientRect = getClientRect;\nFC.getContentRect = getContentRect;\nFC.getScrollbarWidths = getScrollbarWidths;\n\n\n// borrowed from https://github.com/jquery/jquery-ui/blob/1.11.0/ui/core.js#L51\nfunction getScrollParent(el) {\n\tvar position = el.css('position'),\n\t\tscrollParent = el.parents().filter(function() {\n\t\t\tvar parent = $(this);\n\t\t\treturn (/(auto|scroll)/).test(\n\t\t\t\tparent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x')\n\t\t\t);\n\t\t}).eq(0);\n\n\treturn position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;\n}\n\n\n// Queries the outer bounding area of a jQuery element.\n// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).\n// Origin is optional.\nfunction getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}\n\n\n// Queries the area within the margin/border/scrollbars of a jQuery element. Does not go within the padding.\n// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).\n// Origin is optional.\n// WARNING: given element can't have borders\n// NOTE: should use clientLeft/clientTop, but very unreliable cross-browser.\nfunction getClientRect(el, origin) {\n\tvar offset = el.offset();\n\tvar scrollbarWidths = getScrollbarWidths(el);\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + scrollbarWidths.left - (origin ? origin.left : 0);\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + scrollbarWidths.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el[0].clientWidth, // clientWidth includes padding but NOT scrollbars\n\t\ttop: top,\n\t\tbottom: top + el[0].clientHeight // clientHeight includes padding but NOT scrollbars\n\t};\n}\n\n\n// Queries the area within the margin/border/padding of a jQuery element. Assumed not to have scrollbars.\n// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).\n// Origin is optional.\nfunction getContentRect(el, origin) {\n\tvar offset = el.offset(); // just outside of border, margin not included\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n\t\t(origin ? origin.left : 0);\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n\t\t(origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.width(),\n\t\ttop: top,\n\t\tbottom: top + el.height()\n\t};\n}\n\n\n// Returns the computed left/right/top/bottom scrollbar widths for the given jQuery element.\n// WARNING: given element can't have borders (which will cause offsetWidth/offsetHeight to be larger).\n// NOTE: should use clientLeft/clientTop, but very unreliable cross-browser.\nfunction getScrollbarWidths(el) {\n\tvar leftRightWidth = el[0].offsetWidth - el[0].clientWidth;\n\tvar bottomWidth = el[0].offsetHeight - el[0].clientHeight;\n\tvar widths;\n\n\tleftRightWidth = sanitizeScrollbarWidth(leftRightWidth);\n\tbottomWidth = sanitizeScrollbarWidth(bottomWidth);\n\n\twidths = { left: 0, right: 0, top: 0, bottom: bottomWidth };\n\n\tif (getIsLeftRtlScrollbars() && el.css('direction') == 'rtl') { // is the scrollbar on the left side?\n\t\twidths.left = leftRightWidth;\n\t}\n\telse {\n\t\twidths.right = leftRightWidth;\n\t}\n\n\treturn widths;\n}\n\n\n// The scrollbar width computations in getScrollbarWidths are sometimes flawed when it comes to\n// retina displays, rounding, and IE11. Massage them into a usable value.\nfunction sanitizeScrollbarWidth(width) {\n\twidth = Math.max(0, width); // no negatives\n\twidth = Math.round(width);\n\treturn width;\n}\n\n\n// Logic for determining if, when the element is right-to-left, the scrollbar appears on the left side\n\nvar _isLeftRtlScrollbars = null;\n\nfunction getIsLeftRtlScrollbars() { // responsible for caching the computation\n\tif (_isLeftRtlScrollbars === null) {\n\t\t_isLeftRtlScrollbars = computeIsLeftRtlScrollbars();\n\t}\n\treturn _isLeftRtlScrollbars;\n}\n\nfunction computeIsLeftRtlScrollbars() { // creates an offscreen test element, then removes it\n\tvar el = $('
')\n\t\t.css({\n\t\t\tposition: 'absolute',\n\t\t\ttop: -1000,\n\t\t\tleft: 0,\n\t\t\tborder: 0,\n\t\t\tpadding: 0,\n\t\t\toverflow: 'scroll',\n\t\t\tdirection: 'rtl'\n\t\t})\n\t\t.appendTo('body');\n\tvar innerEl = el.children();\n\tvar res = innerEl.offset().left > el.offset().left; // is the inner div shifted to accommodate a left scrollbar?\n\tel.remove();\n\treturn res;\n}\n\n\n// Retrieves a jQuery element's computed CSS value as a floating-point number.\n// If the queried value is non-numeric (ex: IE can return \"medium\" for border width), will just return zero.\nfunction getCssFloat(el, prop) {\n\treturn parseFloat(el.css(prop)) || 0;\n}\n\n\n/* Mouse / Touch Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\nFC.preventDefault = preventDefault;\n\n\n// Returns a boolean whether this was a left mouse click and no ctrl key (which means right click on Mac)\nfunction isPrimaryMouseButton(ev) {\n\treturn ev.which == 1 && !ev.ctrlKey;\n}\n\n\nfunction getEvX(ev) {\n\tvar touches = ev.originalEvent.touches;\n\n\t// on mobile FF, pageX for touch events is present, but incorrect,\n\t// so, look at touch coordinates first.\n\tif (touches && touches.length) {\n\t\treturn touches[0].pageX;\n\t}\n\n\treturn ev.pageX;\n}\n\n\nfunction getEvY(ev) {\n\tvar touches = ev.originalEvent.touches;\n\n\t// on mobile FF, pageX for touch events is present, but incorrect,\n\t// so, look at touch coordinates first.\n\tif (touches && touches.length) {\n\t\treturn touches[0].pageY;\n\t}\n\n\treturn ev.pageY;\n}\n\n\nfunction getEvIsTouch(ev) {\n\treturn /^touch/.test(ev.type);\n}\n\n\nfunction preventSelection(el) {\n\tel.addClass('fc-unselectable')\n\t\t.on('selectstart', preventDefault);\n}\n\n\nfunction allowSelection(el) {\n\tel.removeClass('fc-unselectable')\n\t\t.off('selectstart', preventDefault);\n}\n\n\n// Stops a mouse/touch event from doing it's native browser action\nfunction preventDefault(ev) {\n\tev.preventDefault();\n}\n\n\n/* General Geometry Utils\n----------------------------------------------------------------------------------------------------------------------*/\n\nFC.intersectRects = intersectRects;\n\n// Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false\nfunction intersectRects(rect1, rect2) {\n\tvar res = {\n\t\tleft: Math.max(rect1.left, rect2.left),\n\t\tright: Math.min(rect1.right, rect2.right),\n\t\ttop: Math.max(rect1.top, rect2.top),\n\t\tbottom: Math.min(rect1.bottom, rect2.bottom)\n\t};\n\n\tif (res.left < res.right && res.top < res.bottom) {\n\t\treturn res;\n\t}\n\treturn false;\n}\n\n\n// Returns a new point that will have been moved to reside within the given rectangle\nfunction constrainPoint(point, rect) {\n\treturn {\n\t\tleft: Math.min(Math.max(point.left, rect.left), rect.right),\n\t\ttop: Math.min(Math.max(point.top, rect.top), rect.bottom)\n\t};\n}\n\n\n// Returns a point that is the center of the given rectangle\nfunction getRectCenter(rect) {\n\treturn {\n\t\tleft: (rect.left + rect.right) / 2,\n\t\ttop: (rect.top + rect.bottom) / 2\n\t};\n}\n\n\n// Subtracts point2's coordinates from point1's coordinates, returning a delta\nfunction diffPoints(point1, point2) {\n\treturn {\n\t\tleft: point1.left - point2.left,\n\t\ttop: point1.top - point2.top\n\t};\n}\n\n\n/* Object Ordering by Field\n----------------------------------------------------------------------------------------------------------------------*/\n\nFC.parseFieldSpecs = parseFieldSpecs;\nFC.compareByFieldSpecs = compareByFieldSpecs;\nFC.compareByFieldSpec = compareByFieldSpec;\nFC.flexibleCompare = flexibleCompare;\n\n\nfunction parseFieldSpecs(input) {\n\tvar specs = [];\n\tvar tokens = [];\n\tvar i, token;\n\n\tif (typeof input === 'string') {\n\t\ttokens = input.split(/\\s*,\\s*/);\n\t}\n\telse if (typeof input === 'function') {\n\t\ttokens = [ input ];\n\t}\n\telse if ($.isArray(input)) {\n\t\ttokens = input;\n\t}\n\n\tfor (i = 0; i < tokens.length; i++) {\n\t\ttoken = tokens[i];\n\n\t\tif (typeof token === 'string') {\n\t\t\tspecs.push(\n\t\t\t\ttoken.charAt(0) == '-' ?\n\t\t\t\t\t{ field: token.substring(1), order: -1 } :\n\t\t\t\t\t{ field: token, order: 1 }\n\t\t\t);\n\t\t}\n\t\telse if (typeof token === 'function') {\n\t\t\tspecs.push({ func: token });\n\t\t}\n\t}\n\n\treturn specs;\n}\n\n\nfunction compareByFieldSpecs(obj1, obj2, fieldSpecs) {\n\tvar i;\n\tvar cmp;\n\n\tfor (i = 0; i < fieldSpecs.length; i++) {\n\t\tcmp = compareByFieldSpec(obj1, obj2, fieldSpecs[i]);\n\t\tif (cmp) {\n\t\t\treturn cmp;\n\t\t}\n\t}\n\n\treturn 0;\n}\n\n\nfunction compareByFieldSpec(obj1, obj2, fieldSpec) {\n\tif (fieldSpec.func) {\n\t\treturn fieldSpec.func(obj1, obj2);\n\t}\n\treturn flexibleCompare(obj1[fieldSpec.field], obj2[fieldSpec.field]) *\n\t\t(fieldSpec.order || 1);\n}\n\n\nfunction flexibleCompare(a, b) {\n\tif (!a && !b) {\n\t\treturn 0;\n\t}\n\tif (b == null) {\n\t\treturn -1;\n\t}\n\tif (a == null) {\n\t\treturn 1;\n\t}\n\tif ($.type(a) === 'string' || $.type(b) === 'string') {\n\t\treturn String(a).localeCompare(String(b));\n\t}\n\treturn a - b;\n}\n\n\n/* Date Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\nFC.computeGreatestUnit = computeGreatestUnit;\nFC.divideRangeByDuration = divideRangeByDuration;\nFC.divideDurationByDuration = divideDurationByDuration;\nFC.multiplyDuration = multiplyDuration;\nFC.durationHasTime = durationHasTime;\n\nvar dayIDs = [ 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat' ];\nvar unitsDesc = [ 'year', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond' ]; // descending\n\n\n// Diffs the two moments into a Duration where full-days are recorded first, then the remaining time.\n// Moments will have their timezones normalized.\nfunction diffDayTime(a, b) {\n\treturn moment.duration({\n\t\tdays: a.clone().stripTime().diff(b.clone().stripTime(), 'days'),\n\t\tms: a.time() - b.time() // time-of-day from day start. disregards timezone\n\t});\n}\n\n\n// Diffs the two moments via their start-of-day (regardless of timezone). Produces whole-day durations.\nfunction diffDay(a, b) {\n\treturn moment.duration({\n\t\tdays: a.clone().stripTime().diff(b.clone().stripTime(), 'days')\n\t});\n}\n\n\n// Diffs two moments, producing a duration, made of a whole-unit-increment of the given unit. Uses rounding.\nfunction diffByUnit(a, b, unit) {\n\treturn moment.duration(\n\t\tMath.round(a.diff(b, unit, true)), // returnFloat=true\n\t\tunit\n\t);\n}\n\n\n// Computes the unit name of the largest whole-unit period of time.\n// For example, 48 hours will be \"days\" whereas 49 hours will be \"hours\".\n// Accepts start/end, a range object, or an original duration object.\nfunction computeGreatestUnit(start, end) {\n\tvar i, unit;\n\tvar val;\n\n\tfor (i = 0; i < unitsDesc.length; i++) {\n\t\tunit = unitsDesc[i];\n\t\tval = computeRangeAs(unit, start, end);\n\n\t\tif (val >= 1 && isInt(val)) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn unit; // will be \"milliseconds\" if nothing else matches\n}\n\n\n// like computeGreatestUnit, but has special abilities to interpret the source input for clues\nfunction computeDurationGreatestUnit(duration, durationInput) {\n\tvar unit = computeGreatestUnit(duration);\n\n\t// prevent days:7 from being interpreted as a week\n\tif (unit === 'week' && typeof durationInput === 'object' && durationInput.days) {\n\t\tunit = 'day';\n\t}\n\n\treturn unit;\n}\n\n\n// Computes the number of units (like \"hours\") in the given range.\n// Range can be a {start,end} object, separate start/end args, or a Duration.\n// Results are based on Moment's .as() and .diff() methods, so results can depend on internal handling\n// of month-diffing logic (which tends to vary from version to version).\nfunction computeRangeAs(unit, start, end) {\n\n\tif (end != null) { // given start, end\n\t\treturn end.diff(start, unit, true);\n\t}\n\telse if (moment.isDuration(start)) { // given duration\n\t\treturn start.as(unit);\n\t}\n\telse { // given { start, end } range object\n\t\treturn start.end.diff(start.start, unit, true);\n\t}\n}\n\n\n// Intelligently divides a range (specified by a start/end params) by a duration\nfunction divideRangeByDuration(start, end, dur) {\n\tvar months;\n\n\tif (durationHasTime(dur)) {\n\t\treturn (end - start) / dur;\n\t}\n\tmonths = dur.asMonths();\n\tif (Math.abs(months) >= 1 && isInt(months)) {\n\t\treturn end.diff(start, 'months', true) / months;\n\t}\n\treturn end.diff(start, 'days', true) / dur.asDays();\n}\n\n\n// Intelligently divides one duration by another\nfunction divideDurationByDuration(dur1, dur2) {\n\tvar months1, months2;\n\n\tif (durationHasTime(dur1) || durationHasTime(dur2)) {\n\t\treturn dur1 / dur2;\n\t}\n\tmonths1 = dur1.asMonths();\n\tmonths2 = dur2.asMonths();\n\tif (\n\t\tMath.abs(months1) >= 1 && isInt(months1) &&\n\t\tMath.abs(months2) >= 1 && isInt(months2)\n\t) {\n\t\treturn months1 / months2;\n\t}\n\treturn dur1.asDays() / dur2.asDays();\n}\n\n\n// Intelligently multiplies a duration by a number\nfunction multiplyDuration(dur, n) {\n\tvar months;\n\n\tif (durationHasTime(dur)) {\n\t\treturn moment.duration(dur * n);\n\t}\n\tmonths = dur.asMonths();\n\tif (Math.abs(months) >= 1 && isInt(months)) {\n\t\treturn moment.duration({ months: months * n });\n\t}\n\treturn moment.duration({ days: dur.asDays() * n });\n}\n\n\n// Returns a boolean about whether the given duration has any time parts (hours/minutes/seconds/ms)\nfunction durationHasTime(dur) {\n\treturn Boolean(dur.hours() || dur.minutes() || dur.seconds() || dur.milliseconds());\n}\n\n\nfunction isNativeDate(input) {\n\treturn Object.prototype.toString.call(input) === '[object Date]' || input instanceof Date;\n}\n\n\n// Returns a boolean about whether the given input is a time string, like \"06:40:00\" or \"06:00\"\nfunction isTimeString(str) {\n\treturn typeof str === 'string' &&\n\t\t/^\\d+\\:\\d+(?:\\:\\d+\\.?(?:\\d{3})?)?$/.test(str);\n}\n\n\n/* Logging and Debug\n----------------------------------------------------------------------------------------------------------------------*/\n\nFC.log = function() {\n\tvar console = window.console;\n\n\tif (console && console.log) {\n\t\treturn console.log.apply(console, arguments);\n\t}\n};\n\nFC.warn = function() {\n\tvar console = window.console;\n\n\tif (console && console.warn) {\n\t\treturn console.warn.apply(console, arguments);\n\t}\n\telse {\n\t\treturn FC.log.apply(FC, arguments);\n\t}\n};\n\n\n/* General Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\nvar hasOwnPropMethod = {}.hasOwnProperty;\n\n\n// Merges an array of objects into a single object.\n// The second argument allows for an array of property names who's object values will be merged together.\nfunction mergeProps(propObjs, complexProps) {\n\tvar dest = {};\n\tvar i, name;\n\tvar complexObjs;\n\tvar j, val;\n\tvar props;\n\n\tif (complexProps) {\n\t\tfor (i = 0; i < complexProps.length; i++) {\n\t\t\tname = complexProps[i];\n\t\t\tcomplexObjs = [];\n\n\t\t\t// collect the trailing object values, stopping when a non-object is discovered\n\t\t\tfor (j = propObjs.length - 1; j >= 0; j--) {\n\t\t\t\tval = propObjs[j][name];\n\n\t\t\t\tif (typeof val === 'object') {\n\t\t\t\t\tcomplexObjs.unshift(val);\n\t\t\t\t}\n\t\t\t\telse if (val !== undefined) {\n\t\t\t\t\tdest[name] = val; // if there were no objects, this value will be used\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if the trailing values were objects, use the merged value\n\t\t\tif (complexObjs.length) {\n\t\t\t\tdest[name] = mergeProps(complexObjs);\n\t\t\t}\n\t\t}\n\t}\n\n\t// copy values into the destination, going from last to first\n\tfor (i = propObjs.length - 1; i >= 0; i--) {\n\t\tprops = propObjs[i];\n\n\t\tfor (name in props) {\n\t\t\tif (!(name in dest)) { // if already assigned by previous props or complex props, don't reassign\n\t\t\t\tdest[name] = props[name];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dest;\n}\n\n\nfunction copyOwnProps(src, dest) {\n\tfor (var name in src) {\n\t\tif (hasOwnProp(src, name)) {\n\t\t\tdest[name] = src[name];\n\t\t}\n\t}\n}\n\n\nfunction hasOwnProp(obj, name) {\n\treturn hasOwnPropMethod.call(obj, name);\n}\n\n\nfunction applyAll(functions, thisObj, args) {\n\tif ($.isFunction(functions)) {\n\t\tfunctions = [ functions ];\n\t}\n\tif (functions) {\n\t\tvar i;\n\t\tvar ret;\n\t\tfor (i=0; i/g, '>')\n\t\t.replace(/'/g, ''')\n\t\t.replace(/\"/g, '"')\n\t\t.replace(/\\n/g, '
');\n}\n\n\nfunction stripHtmlEntities(text) {\n\treturn text.replace(/&.*?;/g, '');\n}\n\n\n// Given a hash of CSS properties, returns a string of CSS.\n// Uses property names as-is (no camel-case conversion). Will not make statements for null/undefined values.\nfunction cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}\n\n\n// Given an object hash of HTML attribute names to values,\n// generates a string that can be injected between < > in HTML\nfunction attrsToStr(attrs) {\n\tvar parts = [];\n\n\t$.each(attrs, function(name, val) {\n\t\tif (val != null) {\n\t\t\tparts.push(name + '=\"' + htmlEscape(val) + '\"');\n\t\t}\n\t});\n\n\treturn parts.join(' ');\n}\n\n\nfunction capitaliseFirstLetter(str) {\n\treturn str.charAt(0).toUpperCase() + str.slice(1);\n}\n\n\nfunction compareNumbers(a, b) { // for .sort()\n\treturn a - b;\n}\n\n\nfunction isInt(n) {\n\treturn n % 1 === 0;\n}\n\n\n// Returns a method bound to the given object context.\n// Just like one of the jQuery.proxy signatures, but without the undesired behavior of treating the same method with\n// different contexts as identical when binding/unbinding events.\nfunction proxy(obj, methodName) {\n\tvar method = obj[methodName];\n\n\treturn function() {\n\t\treturn method.apply(obj, arguments);\n\t};\n}\n\n\n// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immediate` is passed, trigger the function on the\n// leading edge, instead of the trailing.\n// https://github.com/jashkenas/underscore/blob/1.6.0/underscore.js#L714\nfunction debounce(func, wait, immediate) {\n\tvar timeout, args, context, timestamp, result;\n\n\tvar later = function() {\n\t\tvar last = +new Date() - timestamp;\n\t\tif (last < wait) {\n\t\t\ttimeout = setTimeout(later, wait - last);\n\t\t}\n\t\telse {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) {\n\t\t\t\tresult = func.apply(context, args);\n\t\t\t\tcontext = args = null;\n\t\t\t}\n\t\t}\n\t};\n\n\treturn function() {\n\t\tcontext = this;\n\t\targs = arguments;\n\t\ttimestamp = +new Date();\n\t\tvar callNow = immediate && !timeout;\n\t\tif (!timeout) {\n\t\t\ttimeout = setTimeout(later, wait);\n\t\t}\n\t\tif (callNow) {\n\t\t\tresult = func.apply(context, args);\n\t\t\tcontext = args = null;\n\t\t}\n\t\treturn result;\n\t};\n}\n\n;;\n\n/*\nGENERAL NOTE on moments throughout the *entire rest* of the codebase:\nAll moments are assumed to be ambiguously-zoned unless otherwise noted,\nwith the NOTABLE EXCEOPTION of start/end dates that live on *Event Objects*.\nAmbiguously-TIMED moments are assumed to be ambiguously-zoned by nature.\n*/\n\nvar ambigDateOfMonthRegex = /^\\s*\\d{4}-\\d\\d$/;\nvar ambigTimeOrZoneRegex =\n\t/^\\s*\\d{4}-(?:(\\d\\d-\\d\\d)|(W\\d\\d$)|(W\\d\\d-\\d)|(\\d\\d\\d))((T| )(\\d\\d(:\\d\\d(:\\d\\d(\\.\\d+)?)?)?)?)?$/;\nvar newMomentProto = moment.fn; // where we will attach our new methods\nvar oldMomentProto = $.extend({}, newMomentProto); // copy of original moment methods\n\n// tell momentjs to transfer these properties upon clone\nvar momentProperties = moment.momentProperties;\nmomentProperties.push('_fullCalendar');\nmomentProperties.push('_ambigTime');\nmomentProperties.push('_ambigZone');\n\n\n// Creating\n// -------------------------------------------------------------------------------------------------\n\n// Creates a new moment, similar to the vanilla moment(...) constructor, but with\n// extra features (ambiguous time, enhanced formatting). When given an existing moment,\n// it will function as a clone (and retain the zone of the moment). Anything else will\n// result in a moment in the local zone.\nFC.moment = function() {\n\treturn makeMoment(arguments);\n};\n\n// Sames as FC.moment, but forces the resulting moment to be in the UTC timezone.\nFC.moment.utc = function() {\n\tvar mom = makeMoment(arguments, true);\n\n\t// Force it into UTC because makeMoment doesn't guarantee it\n\t// (if given a pre-existing moment for example)\n\tif (mom.hasTime()) { // don't give ambiguously-timed moments a UTC zone\n\t\tmom.utc();\n\t}\n\n\treturn mom;\n};\n\n// Same as FC.moment, but when given an ISO8601 string, the timezone offset is preserved.\n// ISO8601 strings with no timezone offset will become ambiguously zoned.\nFC.moment.parseZone = function() {\n\treturn makeMoment(arguments, true, true);\n};\n\n// Builds an enhanced moment from args. When given an existing moment, it clones. When given a\n// native Date, or called with no arguments (the current time), the resulting moment will be local.\n// Anything else needs to be \"parsed\" (a string or an array), and will be affected by:\n// parseAsUTC - if there is no zone information, should we parse the input in UTC?\n// parseZone - if there is zone information, should we force the zone of the moment?\nfunction makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}\n\n\n// Week Number\n// -------------------------------------------------------------------------------------------------\n\n\n// Returns the week number, considering the locale's custom week number calcuation\n// `weeks` is an alias for `week`\nnewMomentProto.week = newMomentProto.weeks = function(input) {\n\tvar weekCalc = this._locale._fullCalendar_weekCalc;\n\n\tif (input == null && typeof weekCalc === 'function') { // custom function only works for getter\n\t\treturn weekCalc(this);\n\t}\n\telse if (weekCalc === 'ISO') {\n\t\treturn oldMomentProto.isoWeek.apply(this, arguments); // ISO getter/setter\n\t}\n\n\treturn oldMomentProto.week.apply(this, arguments); // local getter/setter\n};\n\n\n// Time-of-day\n// -------------------------------------------------------------------------------------------------\n\n// GETTER\n// Returns a Duration with the hours/minutes/seconds/ms values of the moment.\n// If the moment has an ambiguous time, a duration of 00:00 will be returned.\n//\n// SETTER\n// You can supply a Duration, a Moment, or a Duration-like argument.\n// When setting the time, and the moment has an ambiguous time, it then becomes unambiguous.\nnewMomentProto.time = function(time) {\n\n\t// Fallback to the original method (if there is one) if this moment wasn't created via FullCalendar.\n\t// `time` is a generic enough method name where this precaution is necessary to avoid collisions w/ other plugins.\n\tif (!this._fullCalendar) {\n\t\treturn oldMomentProto.time.apply(this, arguments);\n\t}\n\n\tif (time == null) { // getter\n\t\treturn moment.duration({\n\t\t\thours: this.hours(),\n\t\t\tminutes: this.minutes(),\n\t\t\tseconds: this.seconds(),\n\t\t\tmilliseconds: this.milliseconds()\n\t\t});\n\t}\n\telse { // setter\n\n\t\tthis._ambigTime = false; // mark that the moment now has a time\n\n\t\tif (!moment.isDuration(time) && !moment.isMoment(time)) {\n\t\t\ttime = moment.duration(time);\n\t\t}\n\n\t\t// The day value should cause overflow (so 24 hours becomes 00:00:00 of next day).\n\t\t// Only for Duration times, not Moment times.\n\t\tvar dayHours = 0;\n\t\tif (moment.isDuration(time)) {\n\t\t\tdayHours = Math.floor(time.asDays()) * 24;\n\t\t}\n\n\t\t// We need to set the individual fields.\n\t\t// Can't use startOf('day') then add duration. In case of DST at start of day.\n\t\treturn this.hours(dayHours + time.hours())\n\t\t\t.minutes(time.minutes())\n\t\t\t.seconds(time.seconds())\n\t\t\t.milliseconds(time.milliseconds());\n\t}\n};\n\n// Converts the moment to UTC, stripping out its time-of-day and timezone offset,\n// but preserving its YMD. A moment with a stripped time will display no time\n// nor timezone offset when .format() is called.\nnewMomentProto.stripTime = function() {\n\n\tif (!this._ambigTime) {\n\n\t\tthis.utc(true); // keepLocalTime=true (for keeping *date* value)\n\n\t\t// set time to zero\n\t\tthis.set({\n\t\t\thours: 0,\n\t\t\tminutes: 0,\n\t\t\tseconds: 0,\n\t\t\tms: 0\n\t\t});\n\n\t\t// Mark the time as ambiguous. This needs to happen after the .utc() call, which might call .utcOffset(),\n\t\t// which clears all ambig flags.\n\t\tthis._ambigTime = true;\n\t\tthis._ambigZone = true; // if ambiguous time, also ambiguous timezone offset\n\t}\n\n\treturn this; // for chaining\n};\n\n// Returns if the moment has a non-ambiguous time (boolean)\nnewMomentProto.hasTime = function() {\n\treturn !this._ambigTime;\n};\n\n\n// Timezone\n// -------------------------------------------------------------------------------------------------\n\n// Converts the moment to UTC, stripping out its timezone offset, but preserving its\n// YMD and time-of-day. A moment with a stripped timezone offset will display no\n// timezone offset when .format() is called.\nnewMomentProto.stripZone = function() {\n\tvar wasAmbigTime;\n\n\tif (!this._ambigZone) {\n\n\t\twasAmbigTime = this._ambigTime;\n\n\t\tthis.utc(true); // keepLocalTime=true (for keeping date and time values)\n\n\t\t// the above call to .utc()/.utcOffset() unfortunately might clear the ambig flags, so restore\n\t\tthis._ambigTime = wasAmbigTime || false;\n\n\t\t// Mark the zone as ambiguous. This needs to happen after the .utc() call, which might call .utcOffset(),\n\t\t// which clears the ambig flags.\n\t\tthis._ambigZone = true;\n\t}\n\n\treturn this; // for chaining\n};\n\n// Returns of the moment has a non-ambiguous timezone offset (boolean)\nnewMomentProto.hasZone = function() {\n\treturn !this._ambigZone;\n};\n\n\n// implicitly marks a zone\nnewMomentProto.local = function(keepLocalTime) {\n\n\t// for when converting from ambiguously-zoned to local,\n\t// keep the time values when converting from UTC -> local\n\toldMomentProto.local.call(this, this._ambigZone || keepLocalTime);\n\n\t// ensure non-ambiguous\n\t// this probably already happened via local() -> utcOffset(), but don't rely on Moment's internals\n\tthis._ambigTime = false;\n\tthis._ambigZone = false;\n\n\treturn this; // for chaining\n};\n\n\n// implicitly marks a zone\nnewMomentProto.utc = function(keepLocalTime) {\n\n\toldMomentProto.utc.call(this, keepLocalTime);\n\n\t// ensure non-ambiguous\n\t// this probably already happened via utc() -> utcOffset(), but don't rely on Moment's internals\n\tthis._ambigTime = false;\n\tthis._ambigZone = false;\n\n\treturn this;\n};\n\n\n// implicitly marks a zone (will probably get called upon .utc() and .local())\nnewMomentProto.utcOffset = function(tzo) {\n\n\tif (tzo != null) { // setter\n\t\t// these assignments needs to happen before the original zone method is called.\n\t\t// I forget why, something to do with a browser crash.\n\t\tthis._ambigTime = false;\n\t\tthis._ambigZone = false;\n\t}\n\n\treturn oldMomentProto.utcOffset.apply(this, arguments);\n};\n\n\n// Formatting\n// -------------------------------------------------------------------------------------------------\n\nnewMomentProto.format = function() {\n\n\tif (this._fullCalendar && arguments[0]) { // an enhanced moment? and a format string provided?\n\t\treturn formatDate(this, arguments[0]); // our extended formatting\n\t}\n\tif (this._ambigTime) {\n\t\treturn oldMomentFormat(englishMoment(this), 'YYYY-MM-DD');\n\t}\n\tif (this._ambigZone) {\n\t\treturn oldMomentFormat(englishMoment(this), 'YYYY-MM-DD[T]HH:mm:ss');\n\t}\n\tif (this._fullCalendar) { // enhanced non-ambig moment?\n\t\t// moment.format() doesn't ensure english, but we want to.\n\t\treturn oldMomentFormat(englishMoment(this));\n\t}\n\n\treturn oldMomentProto.format.apply(this, arguments);\n};\n\nnewMomentProto.toISOString = function() {\n\n\tif (this._ambigTime) {\n\t\treturn oldMomentFormat(englishMoment(this), 'YYYY-MM-DD');\n\t}\n\tif (this._ambigZone) {\n\t\treturn oldMomentFormat(englishMoment(this), 'YYYY-MM-DD[T]HH:mm:ss');\n\t}\n\tif (this._fullCalendar) { // enhanced non-ambig moment?\n\t\t// depending on browser, moment might not output english. ensure english.\n\t\t// https://github.com/moment/moment/blob/2.18.1/src/lib/moment/format.js#L22\n\t\treturn oldMomentProto.toISOString.apply(englishMoment(this), arguments);\n\t}\n\n\treturn oldMomentProto.toISOString.apply(this, arguments);\n};\n\nfunction englishMoment(mom) {\n\tif (mom.locale() !== 'en') {\n\t\treturn mom.clone().locale('en');\n\t}\n\treturn mom;\n}\n\n;;\n(function() {\n\n// exports\nFC.formatDate = formatDate;\nFC.formatRange = formatRange;\nFC.oldMomentFormat = oldMomentFormat;\nFC.queryMostGranularFormatUnit = queryMostGranularFormatUnit;\n\n\n// Config\n// ---------------------------------------------------------------------------------------------------------------------\n\n/*\nInserted between chunks in the fake (\"intermediate\") formatting string.\nImportant that it passes as whitespace (\\s) because moment often identifies non-standalone months\nvia a regexp with an \\s.\n*/\nvar PART_SEPARATOR = '\\u000b'; // vertical tab\n\n/*\nInserted as the first character of a literal-text chunk to indicate that the literal text is not actually literal text,\nbut rather, a \"special\" token that has custom rendering (see specialTokens map).\n*/\nvar SPECIAL_TOKEN_MARKER = '\\u001f'; // information separator 1\n\n/*\nInserted at the beginning and end of a span of text that must have non-zero numeric characters.\nHandling of these markers is done in a post-processing step at the very end of text rendering.\n*/\nvar MAYBE_MARKER = '\\u001e'; // information separator 2\nvar MAYBE_REGEXP = new RegExp(MAYBE_MARKER + '([^' + MAYBE_MARKER + ']*)' + MAYBE_MARKER, 'g'); // must be global\n\n/*\nAddition formatting tokens we want recognized\n*/\nvar specialTokens = {\n\tt: function(date) { // \"a\" or \"p\"\n\t\treturn oldMomentFormat(date, 'a').charAt(0);\n\t},\n\tT: function(date) { // \"A\" or \"P\"\n\t\treturn oldMomentFormat(date, 'A').charAt(0);\n\t}\n};\n\n/*\nThe first characters of formatting tokens for units that are 1 day or larger.\n`value` is for ranking relative size (lower means bigger).\n`unit` is a normalized unit, used for comparing moments.\n*/\nvar largeTokenMap = {\n\tY: { value: 1, unit: 'year' },\n\tM: { value: 2, unit: 'month' },\n\tW: { value: 3, unit: 'week' }, // ISO week\n\tw: { value: 3, unit: 'week' }, // local week\n\tD: { value: 4, unit: 'day' }, // day of month\n\td: { value: 4, unit: 'day' } // day of week\n};\n\n\n// Single Date Formatting\n// ---------------------------------------------------------------------------------------------------------------------\n\n/*\nFormats `date` with a Moment formatting string, but allow our non-zero areas and special token\n*/\nfunction formatDate(date, formatStr) {\n\treturn renderFakeFormatString(\n\t\tgetParsedFormatString(formatStr).fakeFormatString,\n\t\tdate\n\t);\n}\n\n/*\nCall this if you want Moment's original format method to be used\n*/\nfunction oldMomentFormat(mom, formatStr) {\n\treturn oldMomentProto.format.call(mom, formatStr); // oldMomentProto defined in moment-ext.js\n}\n\n\n// Date Range Formatting\n// -------------------------------------------------------------------------------------------------\n// TODO: make it work with timezone offset\n\n/*\nUsing a formatting string meant for a single date, generate a range string, like\n\"Sep 2 - 9 2013\", that intelligently inserts a separator where the dates differ.\nIf the dates are the same as far as the format string is concerned, just return a single\nrendering of one date, without any separator.\n*/\nfunction formatRange(date1, date2, formatStr, separator, isRTL) {\n\tvar localeData;\n\n\tdate1 = FC.moment.parseZone(date1);\n\tdate2 = FC.moment.parseZone(date2);\n\n\tlocaleData = date1.localeData();\n\n\t// Expand localized format strings, like \"LL\" -> \"MMMM D YYYY\".\n\t// BTW, this is not important for `formatDate` because it is impossible to put custom tokens\n\t// or non-zero areas in Moment's localized format strings.\n\tformatStr = localeData.longDateFormat(formatStr) || formatStr;\n\n\treturn renderParsedFormat(\n\t\tgetParsedFormatString(formatStr),\n\t\tdate1,\n\t\tdate2,\n\t\tseparator || ' - ',\n\t\tisRTL\n\t);\n}\n\n/*\nRenders a range with an already-parsed format string.\n*/\nfunction renderParsedFormat(parsedFormat, date1, date2, separator, isRTL) {\n\tvar sameUnits = parsedFormat.sameUnits;\n\tvar unzonedDate1 = date1.clone().stripZone(); // for same-unit comparisons\n\tvar unzonedDate2 = date2.clone().stripZone(); // \"\n\n\tvar renderedParts1 = renderFakeFormatStringParts(parsedFormat.fakeFormatString, date1);\n\tvar renderedParts2 = renderFakeFormatStringParts(parsedFormat.fakeFormatString, date2);\n\n\tvar leftI;\n\tvar leftStr = '';\n\tvar rightI;\n\tvar rightStr = '';\n\tvar middleI;\n\tvar middleStr1 = '';\n\tvar middleStr2 = '';\n\tvar middleStr = '';\n\n\t// Start at the leftmost side of the formatting string and continue until you hit a token\n\t// that is not the same between dates.\n\tfor (\n\t\tleftI = 0;\n\t\tleftI < sameUnits.length && (!sameUnits[leftI] || unzonedDate1.isSame(unzonedDate2, sameUnits[leftI]));\n\t\tleftI++\n\t) {\n\t\tleftStr += renderedParts1[leftI];\n\t}\n\n\t// Similarly, start at the rightmost side of the formatting string and move left\n\tfor (\n\t\trightI = sameUnits.length - 1;\n\t\trightI > leftI && (!sameUnits[rightI] || unzonedDate1.isSame(unzonedDate2, sameUnits[rightI]));\n\t\trightI--\n\t) {\n\t\t// If current chunk is on the boundary of unique date-content, and is a special-case\n\t\t// date-formatting postfix character, then don't consume it. Consider it unique date-content.\n\t\t// TODO: make configurable\n\t\tif (rightI - 1 === leftI && renderedParts1[rightI] === '.') {\n\t\t\tbreak;\n\t\t}\n\n\t\trightStr = renderedParts1[rightI] + rightStr;\n\t}\n\n\t// The area in the middle is different for both of the dates.\n\t// Collect them distinctly so we can jam them together later.\n\tfor (middleI = leftI; middleI <= rightI; middleI++) {\n\t\tmiddleStr1 += renderedParts1[middleI];\n\t\tmiddleStr2 += renderedParts2[middleI];\n\t}\n\n\tif (middleStr1 || middleStr2) {\n\t\tif (isRTL) {\n\t\t\tmiddleStr = middleStr2 + separator + middleStr1;\n\t\t}\n\t\telse {\n\t\t\tmiddleStr = middleStr1 + separator + middleStr2;\n\t\t}\n\t}\n\n\treturn processMaybeMarkers(\n\t\tleftStr + middleStr + rightStr\n\t);\n}\n\n\n// Format String Parsing\n// ---------------------------------------------------------------------------------------------------------------------\n\nvar parsedFormatStrCache = {};\n\n/*\nReturns a parsed format string, leveraging a cache.\n*/\nfunction getParsedFormatString(formatStr) {\n\treturn parsedFormatStrCache[formatStr] ||\n\t\t(parsedFormatStrCache[formatStr] = parseFormatString(formatStr));\n}\n\n/*\nParses a format string into the following:\n- fakeFormatString: a momentJS formatting string, littered with special control characters that get post-processed.\n- sameUnits: for every part in fakeFormatString, if the part is a token, the value will be a unit string (like \"day\"),\n that indicates how similar a range's start & end must be in order to share the same formatted text.\n If not a token, then the value is null.\n Always a flat array (not nested liked \"chunks\").\n*/\nfunction parseFormatString(formatStr) {\n\tvar chunks = chunkFormatString(formatStr);\n\t\n\treturn {\n\t\tfakeFormatString: buildFakeFormatString(chunks),\n\t\tsameUnits: buildSameUnits(chunks)\n\t};\n}\n\n/*\nBreak the formatting string into an array of chunks.\nA 'maybe' chunk will have nested chunks.\n*/\nfunction chunkFormatString(formatStr) {\n\tvar chunks = [];\n\tvar match;\n\n\t// TODO: more descrimination\n\t// \\4 is a backreference to the first character of a multi-character set.\n\tvar chunker = /\\[([^\\]]*)\\]|\\(([^\\)]*)\\)|(LTS|LT|(\\w)\\4*o?)|([^\\w\\[\\(]+)/g;\n\n\twhile ((match = chunker.exec(formatStr))) {\n\t\tif (match[1]) { // a literal string inside [ ... ]\n\t\t\tchunks.push.apply(chunks, // append\n\t\t\t\tsplitStringLiteral(match[1])\n\t\t\t);\n\t\t}\n\t\telse if (match[2]) { // non-zero formatting inside ( ... )\n\t\t\tchunks.push({ maybe: chunkFormatString(match[2]) });\n\t\t}\n\t\telse if (match[3]) { // a formatting token\n\t\t\tchunks.push({ token: match[3] });\n\t\t}\n\t\telse if (match[5]) { // an unenclosed literal string\n\t\t\tchunks.push.apply(chunks, // append\n\t\t\t\tsplitStringLiteral(match[5])\n\t\t\t);\n\t\t}\n\t}\n\n\treturn chunks;\n}\n\n/*\nPotentially splits a literal-text string into multiple parts. For special cases.\n*/\nfunction splitStringLiteral(s) {\n\tif (s === '. ') {\n\t\treturn [ '.', ' ' ]; // for locales with periods bound to the end of each year/month/date\n\t}\n\telse {\n\t\treturn [ s ];\n\t}\n}\n\n/*\nGiven chunks parsed from a real format string, generate a fake (aka \"intermediate\") format string with special control\ncharacters that will eventually be given to moment for formatting, and then post-processed.\n*/\nfunction buildFakeFormatString(chunks) {\n\tvar parts = [];\n\tvar i, chunk;\n\n\tfor (i = 0; i < chunks.length; i++) {\n\t\tchunk = chunks[i];\n\n\t\tif (typeof chunk === 'string') {\n\t\t\tparts.push('[' + chunk + ']');\n\t\t}\n\t\telse if (chunk.token) {\n\t\t\tif (chunk.token in specialTokens) {\n\t\t\t\tparts.push(\n\t\t\t\t\tSPECIAL_TOKEN_MARKER + // useful during post-processing\n\t\t\t\t\t'[' + chunk.token + ']' // preserve as literal text\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tparts.push(chunk.token); // unprotected text implies a format string\n\t\t\t}\n\t\t}\n\t\telse if (chunk.maybe) {\n\t\t\tparts.push(\n\t\t\t\tMAYBE_MARKER + // useful during post-processing\n\t\t\t\tbuildFakeFormatString(chunk.maybe) +\n\t\t\t\tMAYBE_MARKER\n\t\t\t);\n\t\t}\n\t}\n\n\treturn parts.join(PART_SEPARATOR);\n}\n\n/*\nGiven parsed chunks from a real formatting string, generates an array of unit strings (like \"day\") that indicate\nin which regard two dates must be similar in order to share range formatting text.\nThe `chunks` can be nested (because of \"maybe\" chunks), however, the returned array will be flat.\n*/\nfunction buildSameUnits(chunks) {\n\tvar units = [];\n\tvar i, chunk;\n\tvar tokenInfo;\n\n\tfor (i = 0; i < chunks.length; i++) {\n\t\tchunk = chunks[i];\n\n\t\tif (chunk.token) {\n\t\t\ttokenInfo = largeTokenMap[chunk.token.charAt(0)];\n\t\t\tunits.push(tokenInfo ? tokenInfo.unit : 'second'); // default to a very strict same-second\n\t\t}\n\t\telse if (chunk.maybe) {\n\t\t\tunits.push.apply(units, // append\n\t\t\t\tbuildSameUnits(chunk.maybe)\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\tunits.push(null);\n\t\t}\n\t}\n\n\treturn units;\n}\n\n\n// Rendering to text\n// ---------------------------------------------------------------------------------------------------------------------\n\n/*\nFormats a date with a fake format string, post-processes the control characters, then returns.\n*/\nfunction renderFakeFormatString(fakeFormatString, date) {\n\treturn processMaybeMarkers(\n\t\trenderFakeFormatStringParts(fakeFormatString, date).join('')\n\t);\n}\n\n/*\nFormats a date into parts that will have been post-processed, EXCEPT for the \"maybe\" markers.\n*/\nfunction renderFakeFormatStringParts(fakeFormatString, date) {\n\tvar parts = [];\n\tvar fakeRender = oldMomentFormat(date, fakeFormatString);\n\tvar fakeParts = fakeRender.split(PART_SEPARATOR);\n\tvar i, fakePart;\n\n\tfor (i = 0; i < fakeParts.length; i++) {\n\t\tfakePart = fakeParts[i];\n\n\t\tif (fakePart.charAt(0) === SPECIAL_TOKEN_MARKER) {\n\t\t\tparts.push(\n\t\t\t\t// the literal string IS the token's name.\n\t\t\t\t// call special token's registered function.\n\t\t\t\tspecialTokens[fakePart.substring(1)](date)\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\tparts.push(fakePart);\n\t\t}\n\t}\n\n\treturn parts;\n}\n\n/*\nAccepts an almost-finally-formatted string and processes the \"maybe\" control characters, returning a new string.\n*/\nfunction processMaybeMarkers(s) {\n\treturn s.replace(MAYBE_REGEXP, function(m0, m1) { // regex assumed to have 'g' flag\n\t\tif (m1.match(/[1-9]/)) { // any non-zero numeric characters?\n\t\t\treturn m1;\n\t\t}\n\t\telse {\n\t\t\treturn '';\n\t\t}\n\t});\n}\n\n\n// Misc Utils\n// -------------------------------------------------------------------------------------------------\n\n/*\nReturns a unit string, either 'year', 'month', 'day', or null for the most granular formatting token in the string.\n*/\nfunction queryMostGranularFormatUnit(formatStr) {\n\tvar chunks = chunkFormatString(formatStr);\n\tvar i, chunk;\n\tvar candidate;\n\tvar best;\n\n\tfor (i = 0; i < chunks.length; i++) {\n\t\tchunk = chunks[i];\n\n\t\tif (chunk.token) {\n\t\t\tcandidate = largeTokenMap[chunk.token.charAt(0)];\n\t\t\tif (candidate) {\n\t\t\t\tif (!best || candidate.value > best.value) {\n\t\t\t\t\tbest = candidate;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (best) {\n\t\treturn best.unit;\n\t}\n\n\treturn null;\n};\n\n})();\n\n// quick local references\nvar formatDate = FC.formatDate;\nvar formatRange = FC.formatRange;\nvar oldMomentFormat = FC.oldMomentFormat;\n\n;;\n\nFC.Class = Class; // export\n\n// Class that all other classes will inherit from\nfunction Class() { }\n\n\n// Called on a class to create a subclass.\n// Last argument contains instance methods. Any argument before the last are considered mixins.\nClass.extend = function() {\n\tvar members = {};\n\tvar i;\n\n\tfor (i = 0; i < arguments.length; i++) {\n\t\tcopyOwnProps(arguments[i], members);\n\t}\n\n\treturn extendClass(this, members);\n};\n\n\n// Adds new member variables/methods to the class's prototype.\n// Can be called with another class, or a plain object hash containing new members.\nClass.mixin = function(members) {\n\tcopyOwnProps(members, this.prototype);\n};\n\n\nfunction extendClass(superClass, members) {\n\tvar subClass;\n\n\t// ensure a constructor for the subclass, forwarding all arguments to the super-constructor if it doesn't exist\n\tif (hasOwnProp(members, 'constructor')) {\n\t\tsubClass = members.constructor;\n\t}\n\tif (typeof subClass !== 'function') {\n\t\tsubClass = members.constructor = function() {\n\t\t\tsuperClass.apply(this, arguments);\n\t\t};\n\t}\n\n\t// build the base prototype for the subclass, which is an new object chained to the superclass's prototype\n\tsubClass.prototype = Object.create(superClass.prototype);\n\n\t// copy each member variable/method onto the the subclass's prototype\n\tcopyOwnProps(members, subClass.prototype);\n\n\t// copy over all class variables/methods to the subclass, such as `extend` and `mixin`\n\tcopyOwnProps(superClass, subClass);\n\n\treturn subClass;\n}\n\n;;\n\nvar EmitterMixin = FC.EmitterMixin = {\n\n\t// jQuery-ification via $(this) allows a non-DOM object to have\n\t// the same event handling capabilities (including namespaces).\n\n\n\ton: function(types, handler) {\n\t\t$(this).on(types, this._prepareIntercept(handler));\n\t\treturn this; // for chaining\n\t},\n\n\n\tone: function(types, handler) {\n\t\t$(this).one(types, this._prepareIntercept(handler));\n\t\treturn this; // for chaining\n\t},\n\n\n\t_prepareIntercept: function(handler) {\n\t\t// handlers are always called with an \"event\" object as their first param.\n\t\t// sneak the `this` context and arguments into the extra parameter object\n\t\t// and forward them on to the original handler.\n\t\tvar intercept = function(ev, extra) {\n\t\t\treturn handler.apply(\n\t\t\t\textra.context || this,\n\t\t\t\textra.args || []\n\t\t\t);\n\t\t};\n\n\t\t// mimick jQuery's internal \"proxy\" system (risky, I know)\n\t\t// causing all functions with the same .guid to appear to be the same.\n\t\t// https://github.com/jquery/jquery/blob/2.2.4/src/core.js#L448\n\t\t// this is needed for calling .off with the original non-intercept handler.\n\t\tif (!handler.guid) {\n\t\t\thandler.guid = $.guid++;\n\t\t}\n\t\tintercept.guid = handler.guid;\n\n\t\treturn intercept;\n\t},\n\n\n\toff: function(types, handler) {\n\t\t$(this).off(types, handler);\n\n\t\treturn this; // for chaining\n\t},\n\n\n\ttrigger: function(types) {\n\t\tvar args = Array.prototype.slice.call(arguments, 1); // arguments after the first\n\n\t\t// pass in \"extra\" info to the intercept\n\t\t$(this).triggerHandler(types, { args: args });\n\n\t\treturn this; // for chaining\n\t},\n\n\n\ttriggerWith: function(types, context, args) {\n\n\t\t// `triggerHandler` is less reliant on the DOM compared to `trigger`.\n\t\t// pass in \"extra\" info to the intercept.\n\t\t$(this).triggerHandler(types, { context: context, args: args });\n\n\t\treturn this; // for chaining\n\t},\n\n\n\thasHandlers: function(type) {\n\t\tvar hash = $._data(this, 'events'); // http://blog.jquery.com/2012/08/09/jquery-1-8-released/\n\n\t\treturn hash && hash[type] && hash[type].length > 0;\n\t}\n\n};\n\n;;\n\n/*\nUtility methods for easily listening to events on another object,\nand more importantly, easily unlistening from them.\n*/\nvar ListenerMixin = FC.ListenerMixin = (function() {\n\tvar guid = 0;\n\tvar ListenerMixin = {\n\n\t\tlistenerId: null,\n\n\t\t/*\n\t\tGiven an `other` object that has on/off methods, bind the given `callback` to an event by the given name.\n\t\tThe `callback` will be called with the `this` context of the object that .listenTo is being called on.\n\t\tCan be called:\n\t\t\t.listenTo(other, eventName, callback)\n\t\tOR\n\t\t\t.listenTo(other, {\n\t\t\t\teventName1: callback1,\n\t\t\t\teventName2: callback2\n\t\t\t})\n\t\t*/\n\t\tlistenTo: function(other, arg, callback) {\n\t\t\tif (typeof arg === 'object') { // given dictionary of callbacks\n\t\t\t\tfor (var eventName in arg) {\n\t\t\t\t\tif (arg.hasOwnProperty(eventName)) {\n\t\t\t\t\t\tthis.listenTo(other, eventName, arg[eventName]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (typeof arg === 'string') {\n\t\t\t\tother.on(\n\t\t\t\t\targ + '.' + this.getListenerNamespace(), // use event namespacing to identify this object\n\t\t\t\t\t$.proxy(callback, this) // always use `this` context\n\t\t\t\t\t\t// the usually-undesired jQuery guid behavior doesn't matter,\n\t\t\t\t\t\t// because we always unbind via namespace\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\n\t\t/*\n\t\tCauses the current object to stop listening to events on the `other` object.\n\t\t`eventName` is optional. If omitted, will stop listening to ALL events on `other`.\n\t\t*/\n\t\tstopListeningTo: function(other, eventName) {\n\t\t\tother.off((eventName || '') + '.' + this.getListenerNamespace());\n\t\t},\n\n\t\t/*\n\t\tReturns a string, unique to this object, to be used for event namespacing\n\t\t*/\n\t\tgetListenerNamespace: function() {\n\t\t\tif (this.listenerId == null) {\n\t\t\t\tthis.listenerId = guid++;\n\t\t\t}\n\t\t\treturn '_listener' + this.listenerId;\n\t\t}\n\n\t};\n\treturn ListenerMixin;\n})();\n;;\n\nvar ParsableModelMixin = {\n\n\tstandardPropMap: {}, // will be cloned by allowRawProps\n\n\n\t/*\n\tReturns true/false for success\n\t*/\n\tapplyRawProps: function(rawProps) {\n\t\tvar standardPropMap = this.standardPropMap;\n\t\tvar manualProps = {};\n\t\tvar otherProps = {};\n\t\tvar propName;\n\n\t\tfor (propName in rawProps) {\n\t\t\tif (standardPropMap[propName] === true) { // copy automatically\n\t\t\t\tthis[propName] = rawProps[propName];\n\t\t\t}\n\t\t\telse if (standardPropMap[propName] === false) {\n\t\t\t\tmanualProps[propName] = rawProps[propName];\n\t\t\t}\n\t\t\telse {\n\t\t\t\totherProps[propName] = rawProps[propName];\n\t\t\t}\n\t\t}\n\n\t\tthis.applyOtherRawProps(otherProps);\n\n\t\treturn this.applyManualRawProps(manualProps);\n\t},\n\n\n\t/*\n\tIf subclasses override, they must call this supermethod and return the boolean response.\n\t*/\n\tapplyManualRawProps: function(rawProps) {\n\t\treturn true;\n\t},\n\n\n\tapplyOtherRawProps: function(rawProps) {\n\t\t// subclasses can implement\n\t}\n\n};\n\n\n/*\nTODO: devise a better system\n*/\nvar ParsableModelMixin_allowRawProps = function(propDefs) {\n\tvar proto = this.prototype;\n\n\tproto.standardPropMap = Object.create(proto.standardPropMap);\n\n\tcopyOwnProps(propDefs, proto.standardPropMap);\n};\n\n\n/*\nTODO: devise a better system\n*/\nvar ParsableModelMixin_copyVerbatimStandardProps = function(src, dest) {\n\tvar map = this.prototype.standardPropMap;\n\tvar propName;\n\n\tfor (propName in map) {\n\t\tif (\n\t\t\tsrc[propName] != null && // in the src object?\n\t\t\tmap[propName] === true // false means \"copy verbatim\"\n\t\t) {\n\t\t\tdest[propName] = src[propName];\n\t\t}\n\t}\n};\n\n;;\n\nvar Model = Class.extend(EmitterMixin, ListenerMixin, {\n\n\t_props: null,\n\t_watchers: null,\n\t_globalWatchArgs: null,\n\n\tconstructor: function() {\n\t\tthis._watchers = {};\n\t\tthis._props = {};\n\t\tthis.applyGlobalWatchers();\n\t},\n\n\tapplyGlobalWatchers: function() {\n\t\tvar argSets = this._globalWatchArgs || [];\n\t\tvar i;\n\n\t\tfor (i = 0; i < argSets.length; i++) {\n\t\t\tthis.watch.apply(this, argSets[i]);\n\t\t}\n\t},\n\n\thas: function(name) {\n\t\treturn name in this._props;\n\t},\n\n\tget: function(name) {\n\t\tif (name === undefined) {\n\t\t\treturn this._props;\n\t\t}\n\n\t\treturn this._props[name];\n\t},\n\n\tset: function(name, val) {\n\t\tvar newProps;\n\n\t\tif (typeof name === 'string') {\n\t\t\tnewProps = {};\n\t\t\tnewProps[name] = val === undefined ? null : val;\n\t\t}\n\t\telse {\n\t\t\tnewProps = name;\n\t\t}\n\n\t\tthis.setProps(newProps);\n\t},\n\n\treset: function(newProps) {\n\t\tvar oldProps = this._props;\n\t\tvar changeset = {}; // will have undefined's to signal unsets\n\t\tvar name;\n\n\t\tfor (name in oldProps) {\n\t\t\tchangeset[name] = undefined;\n\t\t}\n\n\t\tfor (name in newProps) {\n\t\t\tchangeset[name] = newProps[name];\n\t\t}\n\n\t\tthis.setProps(changeset);\n\t},\n\n\tunset: function(name) { // accepts a string or array of strings\n\t\tvar newProps = {};\n\t\tvar names;\n\t\tvar i;\n\n\t\tif (typeof name === 'string') {\n\t\t\tnames = [ name ];\n\t\t}\n\t\telse {\n\t\t\tnames = name;\n\t\t}\n\n\t\tfor (i = 0; i < names.length; i++) {\n\t\t\tnewProps[names[i]] = undefined;\n\t\t}\n\n\t\tthis.setProps(newProps);\n\t},\n\n\tsetProps: function(newProps) {\n\t\tvar changedProps = {};\n\t\tvar changedCnt = 0;\n\t\tvar name, val;\n\n\t\tfor (name in newProps) {\n\t\t\tval = newProps[name];\n\n\t\t\t// a change in value?\n\t\t\t// if an object, don't check equality, because might have been mutated internally.\n\t\t\t// TODO: eventually enforce immutability.\n\t\t\tif (\n\t\t\t\ttypeof val === 'object' ||\n\t\t\t\tval !== this._props[name]\n\t\t\t) {\n\t\t\t\tchangedProps[name] = val;\n\t\t\t\tchangedCnt++;\n\t\t\t}\n\t\t}\n\n\t\tif (changedCnt) {\n\n\t\t\tthis.trigger('before:batchChange', changedProps);\n\n\t\t\tfor (name in changedProps) {\n\t\t\t\tval = changedProps[name];\n\n\t\t\t\tthis.trigger('before:change', name, val);\n\t\t\t\tthis.trigger('before:change:' + name, val);\n\t\t\t}\n\n\t\t\tfor (name in changedProps) {\n\t\t\t\tval = changedProps[name];\n\n\t\t\t\tif (val === undefined) {\n\t\t\t\t\tdelete this._props[name];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._props[name] = val;\n\t\t\t\t}\n\n\t\t\t\tthis.trigger('change:' + name, val);\n\t\t\t\tthis.trigger('change', name, val);\n\t\t\t}\n\n\t\t\tthis.trigger('batchChange', changedProps);\n\t\t}\n\t},\n\n\twatch: function(name, depList, startFunc, stopFunc) {\n\t\tvar _this = this;\n\n\t\tthis.unwatch(name);\n\n\t\tthis._watchers[name] = this._watchDeps(depList, function(deps) {\n\t\t\tvar res = startFunc.call(_this, deps);\n\n\t\t\tif (res && res.then) {\n\t\t\t\t_this.unset(name); // put in an unset state while resolving\n\t\t\t\tres.then(function(val) {\n\t\t\t\t\t_this.set(name, val);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_this.set(name, res);\n\t\t\t}\n\t\t}, function() {\n\t\t\t_this.unset(name);\n\n\t\t\tif (stopFunc) {\n\t\t\t\tstopFunc.call(_this);\n\t\t\t}\n\t\t});\n\t},\n\n\tunwatch: function(name) {\n\t\tvar watcher = this._watchers[name];\n\n\t\tif (watcher) {\n\t\t\tdelete this._watchers[name];\n\t\t\twatcher.teardown();\n\t\t}\n\t},\n\n\t_watchDeps: function(depList, startFunc, stopFunc) {\n\t\tvar _this = this;\n\t\tvar queuedChangeCnt = 0;\n\t\tvar depCnt = depList.length;\n\t\tvar satisfyCnt = 0;\n\t\tvar values = {}; // what's passed as the `deps` arguments\n\t\tvar bindTuples = []; // array of [ eventName, handlerFunc ] arrays\n\t\tvar isCallingStop = false;\n\n\t\tfunction onBeforeDepChange(depName, val, isOptional) {\n\t\t\tqueuedChangeCnt++;\n\t\t\tif (queuedChangeCnt === 1) { // first change to cause a \"stop\" ?\n\t\t\t\tif (satisfyCnt === depCnt) { // all deps previously satisfied?\n\t\t\t\t\tisCallingStop = true;\n\t\t\t\t\tstopFunc();\n\t\t\t\t\tisCallingStop = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction onDepChange(depName, val, isOptional) {\n\n\t\t\tif (val === undefined) { // unsetting a value?\n\n\t\t\t\t// required dependency that was previously set?\n\t\t\t\tif (!isOptional && values[depName] !== undefined) {\n\t\t\t\t\tsatisfyCnt--;\n\t\t\t\t}\n\n\t\t\t\tdelete values[depName];\n\t\t\t}\n\t\t\telse { // setting a value?\n\n\t\t\t\t// required dependency that was previously unset?\n\t\t\t\tif (!isOptional && values[depName] === undefined) {\n\t\t\t\t\tsatisfyCnt++;\n\t\t\t\t}\n\n\t\t\t\tvalues[depName] = val;\n\t\t\t}\n\n\t\t\tqueuedChangeCnt--;\n\t\t\tif (!queuedChangeCnt) { // last change to cause a \"start\"?\n\n\t\t\t\t// now finally satisfied or satisfied all along?\n\t\t\t\tif (satisfyCnt === depCnt) {\n\n\t\t\t\t\t// if the stopFunc initiated another value change, ignore it.\n\t\t\t\t\t// it will be processed by another change event anyway.\n\t\t\t\t\tif (!isCallingStop) {\n\t\t\t\t\t\tstartFunc(values);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// intercept for .on() that remembers handlers\n\t\tfunction bind(eventName, handler) {\n\t\t\t_this.on(eventName, handler);\n\t\t\tbindTuples.push([ eventName, handler ]);\n\t\t}\n\n\t\t// listen to dependency changes\n\t\tdepList.forEach(function(depName) {\n\t\t\tvar isOptional = false;\n\n\t\t\tif (depName.charAt(0) === '?') { // TODO: more DRY\n\t\t\t\tdepName = depName.substring(1);\n\t\t\t\tisOptional = true;\n\t\t\t}\n\n\t\t\tbind('before:change:' + depName, function(val) {\n\t\t\t\tonBeforeDepChange(depName, val, isOptional);\n\t\t\t});\n\n\t\t\tbind('change:' + depName, function(val) {\n\t\t\t\tonDepChange(depName, val, isOptional);\n\t\t\t});\n\t\t});\n\n\t\t// process current dependency values\n\t\tdepList.forEach(function(depName) {\n\t\t\tvar isOptional = false;\n\n\t\t\tif (depName.charAt(0) === '?') { // TODO: more DRY\n\t\t\t\tdepName = depName.substring(1);\n\t\t\t\tisOptional = true;\n\t\t\t}\n\n\t\t\tif (_this.has(depName)) {\n\t\t\t\tvalues[depName] = _this.get(depName);\n\t\t\t\tsatisfyCnt++;\n\t\t\t}\n\t\t\telse if (isOptional) {\n\t\t\t\tsatisfyCnt++;\n\t\t\t}\n\t\t});\n\n\t\t// initially satisfied\n\t\tif (satisfyCnt === depCnt) {\n\t\t\tstartFunc(values);\n\t\t}\n\n\t\treturn {\n\t\t\tteardown: function() {\n\t\t\t\t// remove all handlers\n\t\t\t\tfor (var i = 0; i < bindTuples.length; i++) {\n\t\t\t\t\t_this.off(bindTuples[i][0], bindTuples[i][1]);\n\t\t\t\t}\n\t\t\t\tbindTuples = null;\n\n\t\t\t\t// was satisfied, so call stopFunc\n\t\t\t\tif (satisfyCnt === depCnt) {\n\t\t\t\t\tstopFunc();\n\t\t\t\t}\n\t\t\t},\n\t\t\tflash: function() {\n\t\t\t\tif (satisfyCnt === depCnt) {\n\t\t\t\t\tstopFunc();\n\t\t\t\t\tstartFunc(values);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t},\n\n\tflash: function(name) {\n\t\tvar watcher = this._watchers[name];\n\n\t\tif (watcher) {\n\t\t\twatcher.flash();\n\t\t}\n\t}\n\n});\n\n\nModel.watch = function(/* same arguments as this.watch() */) {\n\tvar proto = this.prototype;\n\n\tif (!proto._globalWatchArgs) {\n\t\tproto._globalWatchArgs = [];\n\t}\n\n\tproto._globalWatchArgs.push(arguments);\n};\n\n\nFC.Model = Model;\n\n\n;;\n\nvar Promise = {\n\n\tconstruct: function(executor) {\n\t\tvar deferred = $.Deferred();\n\t\tvar promise = deferred.promise();\n\n\t\tif (typeof executor === 'function') {\n\t\t\texecutor(\n\t\t\t\tfunction(val) { // resolve\n\t\t\t\t\tdeferred.resolve(val);\n\t\t\t\t\tattachImmediatelyResolvingThen(promise, val);\n\t\t\t\t},\n\t\t\t\tfunction() { // reject\n\t\t\t\t\tdeferred.reject();\n\t\t\t\t\tattachImmediatelyRejectingThen(promise);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\treturn promise;\n\t},\n\n\tresolve: function(val) {\n\t\tvar deferred = $.Deferred().resolve(val);\n\t\tvar promise = deferred.promise();\n\n\t\tattachImmediatelyResolvingThen(promise, val);\n\n\t\treturn promise;\n\t},\n\n\treject: function() {\n\t\tvar deferred = $.Deferred().reject();\n\t\tvar promise = deferred.promise();\n\n\t\tattachImmediatelyRejectingThen(promise);\n\n\t\treturn promise;\n\t}\n\n};\n\n\nfunction attachImmediatelyResolvingThen(promise, val) {\n\tpromise.then = function(onResolve) {\n\t\tif (typeof onResolve === 'function') {\n\t\t\treturn Promise.resolve(onResolve(val));\n\t\t}\n\t\treturn promise;\n\t};\n}\n\n\nfunction attachImmediatelyRejectingThen(promise) {\n\tpromise.then = function(onResolve, onReject) {\n\t\tif (typeof onReject === 'function') {\n\t\t\tonReject();\n\t\t}\n\t\treturn promise;\n\t};\n}\n\n\nFC.Promise = Promise;\n\n;;\n\nvar TaskQueue = Class.extend(EmitterMixin, {\n\n\tq: null,\n\tisPaused: false,\n\tisRunning: false,\n\n\n\tconstructor: function() {\n\t\tthis.q = [];\n\t},\n\n\n\tqueue: function(/* taskFunc, taskFunc... */) {\n\t\tthis.q.push.apply(this.q, arguments); // append\n\t\tthis.tryStart();\n\t},\n\n\n\tpause: function() {\n\t\tthis.isPaused = true;\n\t},\n\n\n\tresume: function() {\n\t\tthis.isPaused = false;\n\t\tthis.tryStart();\n\t},\n\n\n\ttryStart: function() {\n\t\tif (!this.isRunning && this.canRunNext()) {\n\t\t\tthis.isRunning = true;\n\t\t\tthis.trigger('start');\n\t\t\tthis.runNext();\n\t\t}\n\t},\n\n\n\tcanRunNext: function() {\n\t\treturn !this.isPaused && this.q.length;\n\t},\n\n\n\trunNext: function() { // does not check canRunNext\n\t\tthis.runTask(this.q.shift());\n\t},\n\n\n\trunTask: function(task) {\n\t\tthis.runTaskFunc(task);\n\t},\n\n\n\trunTaskFunc: function(taskFunc) {\n\t\tvar _this = this;\n\t\tvar res = taskFunc();\n\n\t\tif (res && res.then) {\n\t\t\tres.then(done);\n\t\t}\n\t\telse {\n\t\t\tdone();\n\t\t}\n\n\t\tfunction done() {\n\t\t\tif (_this.canRunNext()) {\n\t\t\t\t_this.runNext();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_this.isRunning = false;\n\t\t\t\t_this.trigger('stop');\n\t\t\t}\n\t\t}\n\t}\n\n});\n\nFC.TaskQueue = TaskQueue;\n\n;;\n\nvar RenderQueue = TaskQueue.extend({\n\n\twaitsByNamespace: null,\n\twaitNamespace: null,\n\twaitId: null,\n\n\n\tconstructor: function(waitsByNamespace) {\n\t\tTaskQueue.call(this); // super-constructor\n\n\t\tthis.waitsByNamespace = waitsByNamespace || {};\n\t},\n\n\n\tqueue: function(taskFunc, namespace, type) {\n\t\tvar task = {\n\t\t\tfunc: taskFunc,\n\t\t\tnamespace: namespace,\n\t\t\ttype: type\n\t\t};\n\t\tvar waitMs;\n\n\t\tif (namespace) {\n\t\t\twaitMs = this.waitsByNamespace[namespace];\n\t\t}\n\n\t\tif (this.waitNamespace) {\n\t\t\tif (namespace === this.waitNamespace && waitMs != null) {\n\t\t\t\tthis.delayWait(waitMs);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.clearWait();\n\t\t\t\tthis.tryStart();\n\t\t\t}\n\t\t}\n\n\t\tif (this.compoundTask(task)) { // appended to queue?\n\n\t\t\tif (!this.waitNamespace && waitMs != null) {\n\t\t\t\tthis.startWait(namespace, waitMs);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.tryStart();\n\t\t\t}\n\t\t}\n\t},\n\n\n\tstartWait: function(namespace, waitMs) {\n\t\tthis.waitNamespace = namespace;\n\t\tthis.spawnWait(waitMs);\n\t},\n\n\n\tdelayWait: function(waitMs) {\n\t\tclearTimeout(this.waitId);\n\t\tthis.spawnWait(waitMs);\n\t},\n\n\n\tspawnWait: function(waitMs) {\n\t\tvar _this = this;\n\n\t\tthis.waitId = setTimeout(function() {\n\t\t\t_this.waitNamespace = null;\n\t\t\t_this.tryStart();\n\t\t}, waitMs);\n\t},\n\n\n\tclearWait: function() {\n\t\tif (this.waitNamespace) {\n\t\t\tclearTimeout(this.waitId);\n\t\t\tthis.waitId = null;\n\t\t\tthis.waitNamespace = null;\n\t\t}\n\t},\n\n\n\tcanRunNext: function() {\n\t\tif (!TaskQueue.prototype.canRunNext.apply(this, arguments)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// waiting for a certain namespace to stop receiving tasks?\n\t\tif (this.waitNamespace) {\n\n\t\t\t// if there was a different namespace task in the meantime,\n\t\t\t// that forces all previously-waiting tasks to suddenly execute.\n\t\t\t// TODO: find a way to do this in constant time.\n\t\t\tfor (var q = this.q, i = 0; i < q.length; i++) {\n\t\t\t\tif (q[i].namespace !== this.waitNamespace) {\n\t\t\t\t\treturn true; // allow execution\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\n\n\trunTask: function(task) {\n\t\tthis.runTaskFunc(task.func);\n\t},\n\n\n\tcompoundTask: function(newTask) {\n\t\tvar q = this.q;\n\t\tvar shouldAppend = true;\n\t\tvar i, task;\n\n\t\tif (newTask.namespace) {\n\n\t\t\tif (newTask.type === 'destroy' || newTask.type === 'init') {\n\n\t\t\t\t// remove all add/remove ops with same namespace, regardless of order\n\t\t\t\tfor (i = q.length - 1; i >= 0; i--) {\n\t\t\t\t\ttask = q[i];\n\n\t\t\t\t\tif (\n\t\t\t\t\t\ttask.namespace === newTask.namespace &&\n\t\t\t\t\t\t(task.type === 'add' || task.type === 'remove')\n\t\t\t\t\t) {\n\t\t\t\t\t\tq.splice(i, 1); // remove task\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (newTask.type === 'destroy') {\n\t\t\t\t\t// eat away final init/destroy operation\n\t\t\t\t\tif (q.length) {\n\t\t\t\t\t\ttask = q[q.length - 1]; // last task\n\n\t\t\t\t\t\tif (task.namespace === newTask.namespace) {\n\n\t\t\t\t\t\t\t// the init and our destroy cancel each other out\n\t\t\t\t\t\t\tif (task.type === 'init') {\n\t\t\t\t\t\t\t\tshouldAppend = false;\n\t\t\t\t\t\t\t\tq.pop();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// prefer to use the destroy operation that's already present\n\t\t\t\t\t\t\telse if (task.type === 'destroy') {\n\t\t\t\t\t\t\t\tshouldAppend = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (newTask.type === 'init') {\n\t\t\t\t\t// eat away final init operation\n\t\t\t\t\tif (q.length) {\n\t\t\t\t\t\ttask = q[q.length - 1]; // last task\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttask.namespace === newTask.namespace &&\n\t\t\t\t\t\t\ttask.type === 'init'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// our init operation takes precedence\n\t\t\t\t\t\t\tq.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (shouldAppend) {\n\t\t\tq.push(newTask);\n\t\t}\n\n\t\treturn shouldAppend;\n\t}\n\n});\n\nFC.RenderQueue = RenderQueue;\n\n;;\n\n/* A rectangular panel that is absolutely positioned over other content\n------------------------------------------------------------------------------------------------------------------------\nOptions:\n\t- className (string)\n\t- content (HTML string or jQuery element set)\n\t- parentEl\n\t- top\n\t- left\n\t- right (the x coord of where the right edge should be. not a \"CSS\" right)\n\t- autoHide (boolean)\n\t- show (callback)\n\t- hide (callback)\n*/\n\nvar Popover = Class.extend(ListenerMixin, {\n\n\tisHidden: true,\n\toptions: null,\n\tel: null, // the container element for the popover. generated by this object\n\tmargin: 10, // the space required between the popover and the edges of the scroll container\n\n\n\tconstructor: function(options) {\n\t\tthis.options = options || {};\n\t},\n\n\n\t// Shows the popover on the specified position. Renders it if not already\n\tshow: function() {\n\t\tif (this.isHidden) {\n\t\t\tif (!this.el) {\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t\tthis.el.show();\n\t\t\tthis.position();\n\t\t\tthis.isHidden = false;\n\t\t\tthis.trigger('show');\n\t\t}\n\t},\n\n\n\t// Hides the popover, through CSS, but does not remove it from the DOM\n\thide: function() {\n\t\tif (!this.isHidden) {\n\t\t\tthis.el.hide();\n\t\t\tthis.isHidden = true;\n\t\t\tthis.trigger('hide');\n\t\t}\n\t},\n\n\n\t// Creates `this.el` and renders content inside of it\n\trender: function() {\n\t\tvar _this = this;\n\t\tvar options = this.options;\n\n\t\tthis.el = $('
')\n\t\t\t.addClass(options.className || '')\n\t\t\t.css({\n\t\t\t\t// position initially to the top left to avoid creating scrollbars\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0\n\t\t\t})\n\t\t\t.append(options.content)\n\t\t\t.appendTo(options.parentEl);\n\n\t\t// when a click happens on anything inside with a 'fc-close' className, hide the popover\n\t\tthis.el.on('click', '.fc-close', function() {\n\t\t\t_this.hide();\n\t\t});\n\n\t\tif (options.autoHide) {\n\t\t\tthis.listenTo($(document), 'mousedown', this.documentMousedown);\n\t\t}\n\t},\n\n\n\t// Triggered when the user clicks *anywhere* in the document, for the autoHide feature\n\tdocumentMousedown: function(ev) {\n\t\t// only hide the popover if the click happened outside the popover\n\t\tif (this.el && !$(ev.target).closest(this.el).length) {\n\t\t\tthis.hide();\n\t\t}\n\t},\n\n\n\t// Hides and unregisters any handlers\n\tremoveElement: function() {\n\t\tthis.hide();\n\n\t\tif (this.el) {\n\t\t\tthis.el.remove();\n\t\t\tthis.el = null;\n\t\t}\n\n\t\tthis.stopListeningTo($(document), 'mousedown');\n\t},\n\n\n\t// Positions the popover optimally, using the top/left/right options\n\tposition: function() {\n\t\tvar options = this.options;\n\t\tvar origin = this.el.offsetParent().offset();\n\t\tvar width = this.el.outerWidth();\n\t\tvar height = this.el.outerHeight();\n\t\tvar windowEl = $(window);\n\t\tvar viewportEl = getScrollParent(this.el);\n\t\tvar viewportTop;\n\t\tvar viewportLeft;\n\t\tvar viewportOffset;\n\t\tvar top; // the \"position\" (not \"offset\") values for the popover\n\t\tvar left; //\n\n\t\t// compute top and left\n\t\ttop = options.top || 0;\n\t\tif (options.left !== undefined) {\n\t\t\tleft = options.left;\n\t\t}\n\t\telse if (options.right !== undefined) {\n\t\t\tleft = options.right - width; // derive the left value from the right value\n\t\t}\n\t\telse {\n\t\t\tleft = 0;\n\t\t}\n\n\t\tif (viewportEl.is(window) || viewportEl.is(document)) { // normalize getScrollParent's result\n\t\t\tviewportEl = windowEl;\n\t\t\tviewportTop = 0; // the window is always at the top left\n\t\t\tviewportLeft = 0; // (and .offset() won't work if called here)\n\t\t}\n\t\telse {\n\t\t\tviewportOffset = viewportEl.offset();\n\t\t\tviewportTop = viewportOffset.top;\n\t\t\tviewportLeft = viewportOffset.left;\n\t\t}\n\n\t\t// if the window is scrolled, it causes the visible area to be further down\n\t\tviewportTop += windowEl.scrollTop();\n\t\tviewportLeft += windowEl.scrollLeft();\n\n\t\t// constrain to the view port. if constrained by two edges, give precedence to top/left\n\t\tif (options.viewportConstrain !== false) {\n\t\t\ttop = Math.min(top, viewportTop + viewportEl.outerHeight() - height - this.margin);\n\t\t\ttop = Math.max(top, viewportTop + this.margin);\n\t\t\tleft = Math.min(left, viewportLeft + viewportEl.outerWidth() - width - this.margin);\n\t\t\tleft = Math.max(left, viewportLeft + this.margin);\n\t\t}\n\n\t\tthis.el.css({\n\t\t\ttop: top - origin.top,\n\t\t\tleft: left - origin.left\n\t\t});\n\t},\n\n\n\t// Triggers a callback. Calls a function in the option hash of the same name.\n\t// Arguments beyond the first `name` are forwarded on.\n\t// TODO: better code reuse for this. Repeat code\n\ttrigger: function(name) {\n\t\tif (this.options[name]) {\n\t\t\tthis.options[name].apply(this, Array.prototype.slice.call(arguments, 1));\n\t\t}\n\t}\n\n});\n\n;;\n\n/*\nA cache for the left/right/top/bottom/width/height values for one or more elements.\nWorks with both offset (from topleft document) and position (from offsetParent).\n\noptions:\n- els\n- isHorizontal\n- isVertical\n*/\nvar CoordCache = FC.CoordCache = Class.extend({\n\n\tels: null, // jQuery set (assumed to be siblings)\n\tforcedOffsetParentEl: null, // options can override the natural offsetParent\n\torigin: null, // {left,top} position of offsetParent of els\n\tboundingRect: null, // constrain cordinates to this rectangle. {left,right,top,bottom} or null\n\tisHorizontal: false, // whether to query for left/right/width\n\tisVertical: false, // whether to query for top/bottom/height\n\n\t// arrays of coordinates (offsets from topleft of document)\n\tlefts: null,\n\trights: null,\n\ttops: null,\n\tbottoms: null,\n\n\n\tconstructor: function(options) {\n\t\tthis.els = $(options.els);\n\t\tthis.isHorizontal = options.isHorizontal;\n\t\tthis.isVertical = options.isVertical;\n\t\tthis.forcedOffsetParentEl = options.offsetParent ? $(options.offsetParent) : null;\n\t},\n\n\n\t// Queries the els for coordinates and stores them.\n\t// Call this method before using and of the get* methods below.\n\tbuild: function() {\n\t\tvar offsetParentEl = this.forcedOffsetParentEl;\n\t\tif (!offsetParentEl && this.els.length > 0) {\n\t\t\toffsetParentEl = this.els.eq(0).offsetParent();\n\t\t}\n\n\t\tthis.origin = offsetParentEl ?\n\t\t\toffsetParentEl.offset() :\n\t\t\tnull;\n\n\t\tthis.boundingRect = this.queryBoundingRect();\n\n\t\tif (this.isHorizontal) {\n\t\t\tthis.buildElHorizontals();\n\t\t}\n\t\tif (this.isVertical) {\n\t\t\tthis.buildElVerticals();\n\t\t}\n\t},\n\n\n\t// Destroys all internal data about coordinates, freeing memory\n\tclear: function() {\n\t\tthis.origin = null;\n\t\tthis.boundingRect = null;\n\t\tthis.lefts = null;\n\t\tthis.rights = null;\n\t\tthis.tops = null;\n\t\tthis.bottoms = null;\n\t},\n\n\n\t// When called, if coord caches aren't built, builds them\n\tensureBuilt: function() {\n\t\tif (!this.origin) {\n\t\t\tthis.build();\n\t\t}\n\t},\n\n\n\t// Populates the left/right internal coordinate arrays\n\tbuildElHorizontals: function() {\n\t\tvar lefts = [];\n\t\tvar rights = [];\n\n\t\tthis.els.each(function(i, node) {\n\t\t\tvar el = $(node);\n\t\t\tvar left = el.offset().left;\n\t\t\tvar width = el.outerWidth();\n\n\t\t\tlefts.push(left);\n\t\t\trights.push(left + width);\n\t\t});\n\n\t\tthis.lefts = lefts;\n\t\tthis.rights = rights;\n\t},\n\n\n\t// Populates the top/bottom internal coordinate arrays\n\tbuildElVerticals: function() {\n\t\tvar tops = [];\n\t\tvar bottoms = [];\n\n\t\tthis.els.each(function(i, node) {\n\t\t\tvar el = $(node);\n\t\t\tvar top = el.offset().top;\n\t\t\tvar height = el.outerHeight();\n\n\t\t\ttops.push(top);\n\t\t\tbottoms.push(top + height);\n\t\t});\n\n\t\tthis.tops = tops;\n\t\tthis.bottoms = bottoms;\n\t},\n\n\n\t// Given a left offset (from document left), returns the index of the el that it horizontally intersects.\n\t// If no intersection is made, returns undefined.\n\tgetHorizontalIndex: function(leftOffset) {\n\t\tthis.ensureBuilt();\n\n\t\tvar lefts = this.lefts;\n\t\tvar rights = this.rights;\n\t\tvar len = lefts.length;\n\t\tvar i;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (leftOffset >= lefts[i] && leftOffset < rights[i]) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Given a top offset (from document top), returns the index of the el that it vertically intersects.\n\t// If no intersection is made, returns undefined.\n\tgetVerticalIndex: function(topOffset) {\n\t\tthis.ensureBuilt();\n\n\t\tvar tops = this.tops;\n\t\tvar bottoms = this.bottoms;\n\t\tvar len = tops.length;\n\t\tvar i;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (topOffset >= tops[i] && topOffset < bottoms[i]) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Gets the left offset (from document left) of the element at the given index\n\tgetLeftOffset: function(leftIndex) {\n\t\tthis.ensureBuilt();\n\t\treturn this.lefts[leftIndex];\n\t},\n\n\n\t// Gets the left position (from offsetParent left) of the element at the given index\n\tgetLeftPosition: function(leftIndex) {\n\t\tthis.ensureBuilt();\n\t\treturn this.lefts[leftIndex] - this.origin.left;\n\t},\n\n\n\t// Gets the right offset (from document left) of the element at the given index.\n\t// This value is NOT relative to the document's right edge, like the CSS concept of \"right\" would be.\n\tgetRightOffset: function(leftIndex) {\n\t\tthis.ensureBuilt();\n\t\treturn this.rights[leftIndex];\n\t},\n\n\n\t// Gets the right position (from offsetParent left) of the element at the given index.\n\t// This value is NOT relative to the offsetParent's right edge, like the CSS concept of \"right\" would be.\n\tgetRightPosition: function(leftIndex) {\n\t\tthis.ensureBuilt();\n\t\treturn this.rights[leftIndex] - this.origin.left;\n\t},\n\n\n\t// Gets the width of the element at the given index\n\tgetWidth: function(leftIndex) {\n\t\tthis.ensureBuilt();\n\t\treturn this.rights[leftIndex] - this.lefts[leftIndex];\n\t},\n\n\n\t// Gets the top offset (from document top) of the element at the given index\n\tgetTopOffset: function(topIndex) {\n\t\tthis.ensureBuilt();\n\t\treturn this.tops[topIndex];\n\t},\n\n\n\t// Gets the top position (from offsetParent top) of the element at the given position\n\tgetTopPosition: function(topIndex) {\n\t\tthis.ensureBuilt();\n\t\treturn this.tops[topIndex] - this.origin.top;\n\t},\n\n\t// Gets the bottom offset (from the document top) of the element at the given index.\n\t// This value is NOT relative to the offsetParent's bottom edge, like the CSS concept of \"bottom\" would be.\n\tgetBottomOffset: function(topIndex) {\n\t\tthis.ensureBuilt();\n\t\treturn this.bottoms[topIndex];\n\t},\n\n\n\t// Gets the bottom position (from the offsetParent top) of the element at the given index.\n\t// This value is NOT relative to the offsetParent's bottom edge, like the CSS concept of \"bottom\" would be.\n\tgetBottomPosition: function(topIndex) {\n\t\tthis.ensureBuilt();\n\t\treturn this.bottoms[topIndex] - this.origin.top;\n\t},\n\n\n\t// Gets the height of the element at the given index\n\tgetHeight: function(topIndex) {\n\t\tthis.ensureBuilt();\n\t\treturn this.bottoms[topIndex] - this.tops[topIndex];\n\t},\n\n\n\t// Bounding Rect\n\t// TODO: decouple this from CoordCache\n\n\t// Compute and return what the elements' bounding rectangle is, from the user's perspective.\n\t// Right now, only returns a rectangle if constrained by an overflow:scroll element.\n\t// Returns null if there are no elements\n\tqueryBoundingRect: function() {\n\t\tvar scrollParentEl;\n\n\t\tif (this.els.length > 0) {\n\t\t\tscrollParentEl = getScrollParent(this.els.eq(0));\n\n\t\t\tif (!scrollParentEl.is(document)) {\n\t\t\t\treturn getClientRect(scrollParentEl);\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t},\n\n\tisPointInBounds: function(leftOffset, topOffset) {\n\t\treturn this.isLeftInBounds(leftOffset) && this.isTopInBounds(topOffset);\n\t},\n\n\tisLeftInBounds: function(leftOffset) {\n\t\treturn !this.boundingRect || (leftOffset >= this.boundingRect.left && leftOffset < this.boundingRect.right);\n\t},\n\n\tisTopInBounds: function(topOffset) {\n\t\treturn !this.boundingRect || (topOffset >= this.boundingRect.top && topOffset < this.boundingRect.bottom);\n\t}\n\n});\n\n;;\n\n/* Tracks a drag's mouse movement, firing various handlers\n----------------------------------------------------------------------------------------------------------------------*/\n// TODO: use Emitter\n\nvar DragListener = FC.DragListener = Class.extend(ListenerMixin, {\n\n\toptions: null,\n\tsubjectEl: null,\n\n\t// coordinates of the initial mousedown\n\toriginX: null,\n\toriginY: null,\n\n\t// the wrapping element that scrolls, or MIGHT scroll if there's overflow.\n\t// TODO: do this for wrappers that have overflow:hidden as well.\n\tscrollEl: null,\n\n\tisInteracting: false,\n\tisDistanceSurpassed: false,\n\tisDelayEnded: false,\n\tisDragging: false,\n\tisTouch: false,\n\tisGeneric: false, // initiated by 'dragstart' (jqui)\n\n\tdelay: null,\n\tdelayTimeoutId: null,\n\tminDistance: null,\n\n\tshouldCancelTouchScroll: true,\n\tscrollAlwaysKills: false,\n\n\n\tconstructor: function(options) {\n\t\tthis.options = options || {};\n\t},\n\n\n\t// Interaction (high-level)\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tstartInteraction: function(ev, extraOptions) {\n\n\t\tif (ev.type === 'mousedown') {\n\t\t\tif (GlobalEmitter.get().shouldIgnoreMouse()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (!isPrimaryMouseButton(ev)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tev.preventDefault(); // prevents native selection in most browsers\n\t\t\t}\n\t\t}\n\n\t\tif (!this.isInteracting) {\n\n\t\t\t// process options\n\t\t\textraOptions = extraOptions || {};\n\t\t\tthis.delay = firstDefined(extraOptions.delay, this.options.delay, 0);\n\t\t\tthis.minDistance = firstDefined(extraOptions.distance, this.options.distance, 0);\n\t\t\tthis.subjectEl = this.options.subjectEl;\n\n\t\t\tpreventSelection($('body'));\n\n\t\t\tthis.isInteracting = true;\n\t\t\tthis.isTouch = getEvIsTouch(ev);\n\t\t\tthis.isGeneric = ev.type === 'dragstart';\n\t\t\tthis.isDelayEnded = false;\n\t\t\tthis.isDistanceSurpassed = false;\n\n\t\t\tthis.originX = getEvX(ev);\n\t\t\tthis.originY = getEvY(ev);\n\t\t\tthis.scrollEl = getScrollParent($(ev.target));\n\n\t\t\tthis.bindHandlers();\n\t\t\tthis.initAutoScroll();\n\t\t\tthis.handleInteractionStart(ev);\n\t\t\tthis.startDelay(ev);\n\n\t\t\tif (!this.minDistance) {\n\t\t\t\tthis.handleDistanceSurpassed(ev);\n\t\t\t}\n\t\t}\n\t},\n\n\n\thandleInteractionStart: function(ev) {\n\t\tthis.trigger('interactionStart', ev);\n\t},\n\n\n\tendInteraction: function(ev, isCancelled) {\n\t\tif (this.isInteracting) {\n\t\t\tthis.endDrag(ev);\n\n\t\t\tif (this.delayTimeoutId) {\n\t\t\t\tclearTimeout(this.delayTimeoutId);\n\t\t\t\tthis.delayTimeoutId = null;\n\t\t\t}\n\n\t\t\tthis.destroyAutoScroll();\n\t\t\tthis.unbindHandlers();\n\n\t\t\tthis.isInteracting = false;\n\t\t\tthis.handleInteractionEnd(ev, isCancelled);\n\n\t\t\tallowSelection($('body'));\n\t\t}\n\t},\n\n\n\thandleInteractionEnd: function(ev, isCancelled) {\n\t\tthis.trigger('interactionEnd', ev, isCancelled || false);\n\t},\n\n\n\t// Binding To DOM\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tbindHandlers: function() {\n\t\t// some browsers (Safari in iOS 10) don't allow preventDefault on touch events that are bound after touchstart,\n\t\t// so listen to the GlobalEmitter singleton, which is always bound, instead of the document directly.\n\t\tvar globalEmitter = GlobalEmitter.get();\n\n\t\tif (this.isGeneric) {\n\t\t\tthis.listenTo($(document), { // might only work on iOS because of GlobalEmitter's bind :(\n\t\t\t\tdrag: this.handleMove,\n\t\t\t\tdragstop: this.endInteraction\n\t\t\t});\n\t\t}\n\t\telse if (this.isTouch) {\n\t\t\tthis.listenTo(globalEmitter, {\n\t\t\t\ttouchmove: this.handleTouchMove,\n\t\t\t\ttouchend: this.endInteraction,\n\t\t\t\tscroll: this.handleTouchScroll\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tthis.listenTo(globalEmitter, {\n\t\t\t\tmousemove: this.handleMouseMove,\n\t\t\t\tmouseup: this.endInteraction\n\t\t\t});\n\t\t}\n\n\t\tthis.listenTo(globalEmitter, {\n\t\t\tselectstart: preventDefault, // don't allow selection while dragging\n\t\t\tcontextmenu: preventDefault // long taps would open menu on Chrome dev tools\n\t\t});\n\t},\n\n\n\tunbindHandlers: function() {\n\t\tthis.stopListeningTo(GlobalEmitter.get());\n\t\tthis.stopListeningTo($(document)); // for isGeneric\n\t},\n\n\n\t// Drag (high-level)\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// extraOptions ignored if drag already started\n\tstartDrag: function(ev, extraOptions) {\n\t\tthis.startInteraction(ev, extraOptions); // ensure interaction began\n\n\t\tif (!this.isDragging) {\n\t\t\tthis.isDragging = true;\n\t\t\tthis.handleDragStart(ev);\n\t\t}\n\t},\n\n\n\thandleDragStart: function(ev) {\n\t\tthis.trigger('dragStart', ev);\n\t},\n\n\n\thandleMove: function(ev) {\n\t\tvar dx = getEvX(ev) - this.originX;\n\t\tvar dy = getEvY(ev) - this.originY;\n\t\tvar minDistance = this.minDistance;\n\t\tvar distanceSq; // current distance from the origin, squared\n\n\t\tif (!this.isDistanceSurpassed) {\n\t\t\tdistanceSq = dx * dx + dy * dy;\n\t\t\tif (distanceSq >= minDistance * minDistance) { // use pythagorean theorem\n\t\t\t\tthis.handleDistanceSurpassed(ev);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDragging) {\n\t\t\tthis.handleDrag(dx, dy, ev);\n\t\t}\n\t},\n\n\n\t// Called while the mouse is being moved and when we know a legitimate drag is taking place\n\thandleDrag: function(dx, dy, ev) {\n\t\tthis.trigger('drag', dx, dy, ev);\n\t\tthis.updateAutoScroll(ev); // will possibly cause scrolling\n\t},\n\n\n\tendDrag: function(ev) {\n\t\tif (this.isDragging) {\n\t\t\tthis.isDragging = false;\n\t\t\tthis.handleDragEnd(ev);\n\t\t}\n\t},\n\n\n\thandleDragEnd: function(ev) {\n\t\tthis.trigger('dragEnd', ev);\n\t},\n\n\n\t// Delay\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tstartDelay: function(initialEv) {\n\t\tvar _this = this;\n\n\t\tif (this.delay) {\n\t\t\tthis.delayTimeoutId = setTimeout(function() {\n\t\t\t\t_this.handleDelayEnd(initialEv);\n\t\t\t}, this.delay);\n\t\t}\n\t\telse {\n\t\t\tthis.handleDelayEnd(initialEv);\n\t\t}\n\t},\n\n\n\thandleDelayEnd: function(initialEv) {\n\t\tthis.isDelayEnded = true;\n\n\t\tif (this.isDistanceSurpassed) {\n\t\t\tthis.startDrag(initialEv);\n\t\t}\n\t},\n\n\n\t// Distance\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\thandleDistanceSurpassed: function(ev) {\n\t\tthis.isDistanceSurpassed = true;\n\n\t\tif (this.isDelayEnded) {\n\t\t\tthis.startDrag(ev);\n\t\t}\n\t},\n\n\n\t// Mouse / Touch\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\thandleTouchMove: function(ev) {\n\n\t\t// prevent inertia and touchmove-scrolling while dragging\n\t\tif (this.isDragging && this.shouldCancelTouchScroll) {\n\t\t\tev.preventDefault();\n\t\t}\n\n\t\tthis.handleMove(ev);\n\t},\n\n\n\thandleMouseMove: function(ev) {\n\t\tthis.handleMove(ev);\n\t},\n\n\n\t// Scrolling (unrelated to auto-scroll)\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\thandleTouchScroll: function(ev) {\n\t\t// if the drag is being initiated by touch, but a scroll happens before\n\t\t// the drag-initiating delay is over, cancel the drag\n\t\tif (!this.isDragging || this.scrollAlwaysKills) {\n\t\t\tthis.endInteraction(ev, true); // isCancelled=true\n\t\t}\n\t},\n\n\n\t// Utils\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// Triggers a callback. Calls a function in the option hash of the same name.\n\t// Arguments beyond the first `name` are forwarded on.\n\ttrigger: function(name) {\n\t\tif (this.options[name]) {\n\t\t\tthis.options[name].apply(this, Array.prototype.slice.call(arguments, 1));\n\t\t}\n\t\t// makes _methods callable by event name. TODO: kill this\n\t\tif (this['_' + name]) {\n\t\t\tthis['_' + name].apply(this, Array.prototype.slice.call(arguments, 1));\n\t\t}\n\t}\n\n\n});\n\n;;\n/*\nthis.scrollEl is set in DragListener\n*/\nDragListener.mixin({\n\n\tisAutoScroll: false,\n\n\tscrollBounds: null, // { top, bottom, left, right }\n\tscrollTopVel: null, // pixels per second\n\tscrollLeftVel: null, // pixels per second\n\tscrollIntervalId: null, // ID of setTimeout for scrolling animation loop\n\n\t// defaults\n\tscrollSensitivity: 30, // pixels from edge for scrolling to start\n\tscrollSpeed: 200, // pixels per second, at maximum speed\n\tscrollIntervalMs: 50, // millisecond wait between scroll increment\n\n\n\tinitAutoScroll: function() {\n\t\tvar scrollEl = this.scrollEl;\n\n\t\tthis.isAutoScroll =\n\t\t\tthis.options.scroll &&\n\t\t\tscrollEl &&\n\t\t\t!scrollEl.is(window) &&\n\t\t\t!scrollEl.is(document);\n\n\t\tif (this.isAutoScroll) {\n\t\t\t// debounce makes sure rapid calls don't happen\n\t\t\tthis.listenTo(scrollEl, 'scroll', debounce(this.handleDebouncedScroll, 100));\n\t\t}\n\t},\n\n\n\tdestroyAutoScroll: function() {\n\t\tthis.endAutoScroll(); // kill any animation loop\n\n\t\t// remove the scroll handler if there is a scrollEl\n\t\tif (this.isAutoScroll) {\n\t\t\tthis.stopListeningTo(this.scrollEl, 'scroll'); // will probably get removed by unbindHandlers too :(\n\t\t}\n\t},\n\n\n\t// Computes and stores the bounding rectangle of scrollEl\n\tcomputeScrollBounds: function() {\n\t\tif (this.isAutoScroll) {\n\t\t\tthis.scrollBounds = getOuterRect(this.scrollEl);\n\t\t\t// TODO: use getClientRect in future. but prevents auto scrolling when on top of scrollbars\n\t\t}\n\t},\n\n\n\t// Called when the dragging is in progress and scrolling should be updated\n\tupdateAutoScroll: function(ev) {\n\t\tvar sensitivity = this.scrollSensitivity;\n\t\tvar bounds = this.scrollBounds;\n\t\tvar topCloseness, bottomCloseness;\n\t\tvar leftCloseness, rightCloseness;\n\t\tvar topVel = 0;\n\t\tvar leftVel = 0;\n\n\t\tif (bounds) { // only scroll if scrollEl exists\n\n\t\t\t// compute closeness to edges. valid range is from 0.0 - 1.0\n\t\t\ttopCloseness = (sensitivity - (getEvY(ev) - bounds.top)) / sensitivity;\n\t\t\tbottomCloseness = (sensitivity - (bounds.bottom - getEvY(ev))) / sensitivity;\n\t\t\tleftCloseness = (sensitivity - (getEvX(ev) - bounds.left)) / sensitivity;\n\t\t\trightCloseness = (sensitivity - (bounds.right - getEvX(ev))) / sensitivity;\n\n\t\t\t// translate vertical closeness into velocity.\n\t\t\t// mouse must be completely in bounds for velocity to happen.\n\t\t\tif (topCloseness >= 0 && topCloseness <= 1) {\n\t\t\t\ttopVel = topCloseness * this.scrollSpeed * -1; // negative. for scrolling up\n\t\t\t}\n\t\t\telse if (bottomCloseness >= 0 && bottomCloseness <= 1) {\n\t\t\t\ttopVel = bottomCloseness * this.scrollSpeed;\n\t\t\t}\n\n\t\t\t// translate horizontal closeness into velocity\n\t\t\tif (leftCloseness >= 0 && leftCloseness <= 1) {\n\t\t\t\tleftVel = leftCloseness * this.scrollSpeed * -1; // negative. for scrolling left\n\t\t\t}\n\t\t\telse if (rightCloseness >= 0 && rightCloseness <= 1) {\n\t\t\t\tleftVel = rightCloseness * this.scrollSpeed;\n\t\t\t}\n\t\t}\n\n\t\tthis.setScrollVel(topVel, leftVel);\n\t},\n\n\n\t// Sets the speed-of-scrolling for the scrollEl\n\tsetScrollVel: function(topVel, leftVel) {\n\n\t\tthis.scrollTopVel = topVel;\n\t\tthis.scrollLeftVel = leftVel;\n\n\t\tthis.constrainScrollVel(); // massages into realistic values\n\n\t\t// if there is non-zero velocity, and an animation loop hasn't already started, then START\n\t\tif ((this.scrollTopVel || this.scrollLeftVel) && !this.scrollIntervalId) {\n\t\t\tthis.scrollIntervalId = setInterval(\n\t\t\t\tproxy(this, 'scrollIntervalFunc'), // scope to `this`\n\t\t\t\tthis.scrollIntervalMs\n\t\t\t);\n\t\t}\n\t},\n\n\n\t// Forces scrollTopVel and scrollLeftVel to be zero if scrolling has already gone all the way\n\tconstrainScrollVel: function() {\n\t\tvar el = this.scrollEl;\n\n\t\tif (this.scrollTopVel < 0) { // scrolling up?\n\t\t\tif (el.scrollTop() <= 0) { // already scrolled all the way up?\n\t\t\t\tthis.scrollTopVel = 0;\n\t\t\t}\n\t\t}\n\t\telse if (this.scrollTopVel > 0) { // scrolling down?\n\t\t\tif (el.scrollTop() + el[0].clientHeight >= el[0].scrollHeight) { // already scrolled all the way down?\n\t\t\t\tthis.scrollTopVel = 0;\n\t\t\t}\n\t\t}\n\n\t\tif (this.scrollLeftVel < 0) { // scrolling left?\n\t\t\tif (el.scrollLeft() <= 0) { // already scrolled all the left?\n\t\t\t\tthis.scrollLeftVel = 0;\n\t\t\t}\n\t\t}\n\t\telse if (this.scrollLeftVel > 0) { // scrolling right?\n\t\t\tif (el.scrollLeft() + el[0].clientWidth >= el[0].scrollWidth) { // already scrolled all the way right?\n\t\t\t\tthis.scrollLeftVel = 0;\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// This function gets called during every iteration of the scrolling animation loop\n\tscrollIntervalFunc: function() {\n\t\tvar el = this.scrollEl;\n\t\tvar frac = this.scrollIntervalMs / 1000; // considering animation frequency, what the vel should be mult'd by\n\n\t\t// change the value of scrollEl's scroll\n\t\tif (this.scrollTopVel) {\n\t\t\tel.scrollTop(el.scrollTop() + this.scrollTopVel * frac);\n\t\t}\n\t\tif (this.scrollLeftVel) {\n\t\t\tel.scrollLeft(el.scrollLeft() + this.scrollLeftVel * frac);\n\t\t}\n\n\t\tthis.constrainScrollVel(); // since the scroll values changed, recompute the velocities\n\n\t\t// if scrolled all the way, which causes the vels to be zero, stop the animation loop\n\t\tif (!this.scrollTopVel && !this.scrollLeftVel) {\n\t\t\tthis.endAutoScroll();\n\t\t}\n\t},\n\n\n\t// Kills any existing scrolling animation loop\n\tendAutoScroll: function() {\n\t\tif (this.scrollIntervalId) {\n\t\t\tclearInterval(this.scrollIntervalId);\n\t\t\tthis.scrollIntervalId = null;\n\n\t\t\tthis.handleScrollEnd();\n\t\t}\n\t},\n\n\n\t// Get called when the scrollEl is scrolled (NOTE: this is delayed via debounce)\n\thandleDebouncedScroll: function() {\n\t\t// recompute all coordinates, but *only* if this is *not* part of our scrolling animation\n\t\tif (!this.scrollIntervalId) {\n\t\t\tthis.handleScrollEnd();\n\t\t}\n\t},\n\n\n\t// Called when scrolling has stopped, whether through auto scroll, or the user scrolling\n\thandleScrollEnd: function() {\n\t}\n\n});\n;;\n\n/* Tracks mouse movements over a component and raises events about which hit the mouse is over.\n------------------------------------------------------------------------------------------------------------------------\noptions:\n- subjectEl\n- subjectCenter\n*/\n\nvar HitDragListener = DragListener.extend({\n\n\tcomponent: null, // converts coordinates to hits\n\t\t// methods: hitsNeeded, hitsNotNeeded, queryHit\n\n\torigHit: null, // the hit the mouse was over when listening started\n\thit: null, // the hit the mouse is over\n\tcoordAdjust: null, // delta that will be added to the mouse coordinates when computing collisions\n\n\n\tconstructor: function(component, options) {\n\t\tDragListener.call(this, options); // call the super-constructor\n\n\t\tthis.component = component;\n\t},\n\n\n\t// Called when drag listening starts (but a real drag has not necessarily began).\n\t// ev might be undefined if dragging was started manually.\n\thandleInteractionStart: function(ev) {\n\t\tvar subjectEl = this.subjectEl;\n\t\tvar subjectRect;\n\t\tvar origPoint;\n\t\tvar point;\n\n\t\tthis.component.hitsNeeded();\n\t\tthis.computeScrollBounds(); // for autoscroll\n\n\t\tif (ev) {\n\t\t\torigPoint = { left: getEvX(ev), top: getEvY(ev) };\n\t\t\tpoint = origPoint;\n\n\t\t\t// constrain the point to bounds of the element being dragged\n\t\t\tif (subjectEl) {\n\t\t\t\tsubjectRect = getOuterRect(subjectEl); // used for centering as well\n\t\t\t\tpoint = constrainPoint(point, subjectRect);\n\t\t\t}\n\n\t\t\tthis.origHit = this.queryHit(point.left, point.top);\n\n\t\t\t// treat the center of the subject as the collision point?\n\t\t\tif (subjectEl && this.options.subjectCenter) {\n\n\t\t\t\t// only consider the area the subject overlaps the hit. best for large subjects.\n\t\t\t\t// TODO: skip this if hit didn't supply left/right/top/bottom\n\t\t\t\tif (this.origHit) {\n\t\t\t\t\tsubjectRect = intersectRects(this.origHit, subjectRect) ||\n\t\t\t\t\t\tsubjectRect; // in case there is no intersection\n\t\t\t\t}\n\n\t\t\t\tpoint = getRectCenter(subjectRect);\n\t\t\t}\n\n\t\t\tthis.coordAdjust = diffPoints(point, origPoint); // point - origPoint\n\t\t}\n\t\telse {\n\t\t\tthis.origHit = null;\n\t\t\tthis.coordAdjust = null;\n\t\t}\n\n\t\t// call the super-method. do it after origHit has been computed\n\t\tDragListener.prototype.handleInteractionStart.apply(this, arguments);\n\t},\n\n\n\t// Called when the actual drag has started\n\thandleDragStart: function(ev) {\n\t\tvar hit;\n\n\t\tDragListener.prototype.handleDragStart.apply(this, arguments); // call the super-method\n\n\t\t// might be different from this.origHit if the min-distance is large\n\t\thit = this.queryHit(getEvX(ev), getEvY(ev));\n\n\t\t// report the initial hit the mouse is over\n\t\t// especially important if no min-distance and drag starts immediately\n\t\tif (hit) {\n\t\t\tthis.handleHitOver(hit);\n\t\t}\n\t},\n\n\n\t// Called when the drag moves\n\thandleDrag: function(dx, dy, ev) {\n\t\tvar hit;\n\n\t\tDragListener.prototype.handleDrag.apply(this, arguments); // call the super-method\n\n\t\thit = this.queryHit(getEvX(ev), getEvY(ev));\n\n\t\tif (!isHitsEqual(hit, this.hit)) { // a different hit than before?\n\t\t\tif (this.hit) {\n\t\t\t\tthis.handleHitOut();\n\t\t\t}\n\t\t\tif (hit) {\n\t\t\t\tthis.handleHitOver(hit);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Called when dragging has been stopped\n\thandleDragEnd: function() {\n\t\tthis.handleHitDone();\n\t\tDragListener.prototype.handleDragEnd.apply(this, arguments); // call the super-method\n\t},\n\n\n\t// Called when a the mouse has just moved over a new hit\n\thandleHitOver: function(hit) {\n\t\tvar isOrig = isHitsEqual(hit, this.origHit);\n\n\t\tthis.hit = hit;\n\n\t\tthis.trigger('hitOver', this.hit, isOrig, this.origHit);\n\t},\n\n\n\t// Called when the mouse has just moved out of a hit\n\thandleHitOut: function() {\n\t\tif (this.hit) {\n\t\t\tthis.trigger('hitOut', this.hit);\n\t\t\tthis.handleHitDone();\n\t\t\tthis.hit = null;\n\t\t}\n\t},\n\n\n\t// Called after a hitOut. Also called before a dragStop\n\thandleHitDone: function() {\n\t\tif (this.hit) {\n\t\t\tthis.trigger('hitDone', this.hit);\n\t\t}\n\t},\n\n\n\t// Called when the interaction ends, whether there was a real drag or not\n\thandleInteractionEnd: function() {\n\t\tDragListener.prototype.handleInteractionEnd.apply(this, arguments); // call the super-method\n\n\t\tthis.origHit = null;\n\t\tthis.hit = null;\n\n\t\tthis.component.hitsNotNeeded();\n\t},\n\n\n\t// Called when scrolling has stopped, whether through auto scroll, or the user scrolling\n\thandleScrollEnd: function() {\n\t\tDragListener.prototype.handleScrollEnd.apply(this, arguments); // call the super-method\n\n\t\t// hits' absolute positions will be in new places after a user's scroll.\n\t\t// HACK for recomputing.\n\t\tif (this.isDragging) {\n\t\t\tthis.component.releaseHits();\n\t\t\tthis.component.prepareHits();\n\t\t}\n\t},\n\n\n\t// Gets the hit underneath the coordinates for the given mouse event\n\tqueryHit: function(left, top) {\n\n\t\tif (this.coordAdjust) {\n\t\t\tleft += this.coordAdjust.left;\n\t\t\ttop += this.coordAdjust.top;\n\t\t}\n\n\t\treturn this.component.queryHit(left, top);\n\t}\n\n});\n\n\n// Returns `true` if the hits are identically equal. `false` otherwise. Must be from the same component.\n// Two null values will be considered equal, as two \"out of the component\" states are the same.\nfunction isHitsEqual(hit0, hit1) {\n\n\tif (!hit0 && !hit1) {\n\t\treturn true;\n\t}\n\n\tif (hit0 && hit1) {\n\t\treturn hit0.component === hit1.component &&\n\t\t\tisHitPropsWithin(hit0, hit1) &&\n\t\t\tisHitPropsWithin(hit1, hit0); // ensures all props are identical\n\t}\n\n\treturn false;\n}\n\n\n// Returns true if all of subHit's non-standard properties are within superHit\nfunction isHitPropsWithin(subHit, superHit) {\n\tfor (var propName in subHit) {\n\t\tif (!/^(component|left|right|top|bottom)$/.test(propName)) {\n\t\t\tif (subHit[propName] !== superHit[propName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n\n;;\n\n/*\nListens to document and window-level user-interaction events, like touch events and mouse events,\nand fires these events as-is to whoever is observing a GlobalEmitter.\nBest when used as a singleton via GlobalEmitter.get()\n\nNormalizes mouse/touch events. For examples:\n- ignores the the simulated mouse events that happen after a quick tap: mousemove+mousedown+mouseup+click\n- compensates for various buggy scenarios where a touchend does not fire\n*/\n\nFC.touchMouseIgnoreWait = 500;\n\nvar GlobalEmitter = Class.extend(ListenerMixin, EmitterMixin, {\n\n\tisTouching: false,\n\tmouseIgnoreDepth: 0,\n\thandleScrollProxy: null,\n\n\n\tbind: function() {\n\t\tvar _this = this;\n\n\t\tthis.listenTo($(document), {\n\t\t\ttouchstart: this.handleTouchStart,\n\t\t\ttouchcancel: this.handleTouchCancel,\n\t\t\ttouchend: this.handleTouchEnd,\n\t\t\tmousedown: this.handleMouseDown,\n\t\t\tmousemove: this.handleMouseMove,\n\t\t\tmouseup: this.handleMouseUp,\n\t\t\tclick: this.handleClick,\n\t\t\tselectstart: this.handleSelectStart,\n\t\t\tcontextmenu: this.handleContextMenu\n\t\t});\n\n\t\t// because we need to call preventDefault\n\t\t// because https://www.chromestatus.com/features/5093566007214080\n\t\t// TODO: investigate performance because this is a global handler\n\t\twindow.addEventListener(\n\t\t\t'touchmove',\n\t\t\tthis.handleTouchMoveProxy = function(ev) {\n\t\t\t\t_this.handleTouchMove($.Event(ev));\n\t\t\t},\n\t\t\t{ passive: false } // allows preventDefault()\n\t\t);\n\n\t\t// attach a handler to get called when ANY scroll action happens on the page.\n\t\t// this was impossible to do with normal on/off because 'scroll' doesn't bubble.\n\t\t// http://stackoverflow.com/a/32954565/96342\n\t\twindow.addEventListener(\n\t\t\t'scroll',\n\t\t\tthis.handleScrollProxy = function(ev) {\n\t\t\t\t_this.handleScroll($.Event(ev));\n\t\t\t},\n\t\t\ttrue // useCapture\n\t\t);\n\t},\n\n\tunbind: function() {\n\t\tthis.stopListeningTo($(document));\n\n\t\twindow.removeEventListener(\n\t\t\t'touchmove',\n\t\t\tthis.handleTouchMoveProxy\n\t\t);\n\n\t\twindow.removeEventListener(\n\t\t\t'scroll',\n\t\t\tthis.handleScrollProxy,\n\t\t\ttrue // useCapture\n\t\t);\n\t},\n\n\n\t// Touch Handlers\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\thandleTouchStart: function(ev) {\n\n\t\t// if a previous touch interaction never ended with a touchend, then implicitly end it,\n\t\t// but since a new touch interaction is about to begin, don't start the mouse ignore period.\n\t\tthis.stopTouch(ev, true); // skipMouseIgnore=true\n\n\t\tthis.isTouching = true;\n\t\tthis.trigger('touchstart', ev);\n\t},\n\n\thandleTouchMove: function(ev) {\n\t\tif (this.isTouching) {\n\t\t\tthis.trigger('touchmove', ev);\n\t\t}\n\t},\n\n\thandleTouchCancel: function(ev) {\n\t\tif (this.isTouching) {\n\t\t\tthis.trigger('touchcancel', ev);\n\n\t\t\t// Have touchcancel fire an artificial touchend. That way, handlers won't need to listen to both.\n\t\t\t// If touchend fires later, it won't have any effect b/c isTouching will be false.\n\t\t\tthis.stopTouch(ev);\n\t\t}\n\t},\n\n\thandleTouchEnd: function(ev) {\n\t\tthis.stopTouch(ev);\n\t},\n\n\n\t// Mouse Handlers\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\thandleMouseDown: function(ev) {\n\t\tif (!this.shouldIgnoreMouse()) {\n\t\t\tthis.trigger('mousedown', ev);\n\t\t}\n\t},\n\n\thandleMouseMove: function(ev) {\n\t\tif (!this.shouldIgnoreMouse()) {\n\t\t\tthis.trigger('mousemove', ev);\n\t\t}\n\t},\n\n\thandleMouseUp: function(ev) {\n\t\tif (!this.shouldIgnoreMouse()) {\n\t\t\tthis.trigger('mouseup', ev);\n\t\t}\n\t},\n\n\thandleClick: function(ev) {\n\t\tif (!this.shouldIgnoreMouse()) {\n\t\t\tthis.trigger('click', ev);\n\t\t}\n\t},\n\n\n\t// Misc Handlers\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\thandleSelectStart: function(ev) {\n\t\tthis.trigger('selectstart', ev);\n\t},\n\n\thandleContextMenu: function(ev) {\n\t\tthis.trigger('contextmenu', ev);\n\t},\n\n\thandleScroll: function(ev) {\n\t\tthis.trigger('scroll', ev);\n\t},\n\n\n\t// Utils\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\tstopTouch: function(ev, skipMouseIgnore) {\n\t\tif (this.isTouching) {\n\t\t\tthis.isTouching = false;\n\t\t\tthis.trigger('touchend', ev);\n\n\t\t\tif (!skipMouseIgnore) {\n\t\t\t\tthis.startTouchMouseIgnore();\n\t\t\t}\n\t\t}\n\t},\n\n\tstartTouchMouseIgnore: function() {\n\t\tvar _this = this;\n\t\tvar wait = FC.touchMouseIgnoreWait;\n\n\t\tif (wait) {\n\t\t\tthis.mouseIgnoreDepth++;\n\t\t\tsetTimeout(function() {\n\t\t\t\t_this.mouseIgnoreDepth--;\n\t\t\t}, wait);\n\t\t}\n\t},\n\n\tshouldIgnoreMouse: function() {\n\t\treturn this.isTouching || Boolean(this.mouseIgnoreDepth);\n\t}\n\n});\n\n\n// Singleton\n// ---------------------------------------------------------------------------------------------------------------------\n\n(function() {\n\tvar globalEmitter = null;\n\tvar neededCount = 0;\n\n\n\t// gets the singleton\n\tGlobalEmitter.get = function() {\n\n\t\tif (!globalEmitter) {\n\t\t\tglobalEmitter = new GlobalEmitter();\n\t\t\tglobalEmitter.bind();\n\t\t}\n\n\t\treturn globalEmitter;\n\t};\n\n\n\t// called when an object knows it will need a GlobalEmitter in the near future.\n\tGlobalEmitter.needed = function() {\n\t\tGlobalEmitter.get(); // ensures globalEmitter\n\t\tneededCount++;\n\t};\n\n\n\t// called when the object that originally called needed() doesn't need a GlobalEmitter anymore.\n\tGlobalEmitter.unneeded = function() {\n\t\tneededCount--;\n\n\t\tif (!neededCount) { // nobody else needs it\n\t\t\tglobalEmitter.unbind();\n\t\t\tglobalEmitter = null;\n\t\t}\n\t};\n\n})();\n\n;;\n\n/* Creates a clone of an element and lets it track the mouse as it moves\n----------------------------------------------------------------------------------------------------------------------*/\n\nvar MouseFollower = Class.extend(ListenerMixin, {\n\n\toptions: null,\n\n\tsourceEl: null, // the element that will be cloned and made to look like it is dragging\n\tel: null, // the clone of `sourceEl` that will track the mouse\n\tparentEl: null, // the element that `el` (the clone) will be attached to\n\n\t// the initial position of el, relative to the offset parent. made to match the initial offset of sourceEl\n\ttop0: null,\n\tleft0: null,\n\n\t// the absolute coordinates of the initiating touch/mouse action\n\ty0: null,\n\tx0: null,\n\n\t// the number of pixels the mouse has moved from its initial position\n\ttopDelta: null,\n\tleftDelta: null,\n\n\tisFollowing: false,\n\tisHidden: false,\n\tisAnimating: false, // doing the revert animation?\n\n\tconstructor: function(sourceEl, options) {\n\t\tthis.options = options = options || {};\n\t\tthis.sourceEl = sourceEl;\n\t\tthis.parentEl = options.parentEl ? $(options.parentEl) : sourceEl.parent(); // default to sourceEl's parent\n\t},\n\n\n\t// Causes the element to start following the mouse\n\tstart: function(ev) {\n\t\tif (!this.isFollowing) {\n\t\t\tthis.isFollowing = true;\n\n\t\t\tthis.y0 = getEvY(ev);\n\t\t\tthis.x0 = getEvX(ev);\n\t\t\tthis.topDelta = 0;\n\t\t\tthis.leftDelta = 0;\n\n\t\t\tif (!this.isHidden) {\n\t\t\t\tthis.updatePosition();\n\t\t\t}\n\n\t\t\tif (getEvIsTouch(ev)) {\n\t\t\t\tthis.listenTo($(document), 'touchmove', this.handleMove);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.listenTo($(document), 'mousemove', this.handleMove);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Causes the element to stop following the mouse. If shouldRevert is true, will animate back to original position.\n\t// `callback` gets invoked when the animation is complete. If no animation, it is invoked immediately.\n\tstop: function(shouldRevert, callback) {\n\t\tvar _this = this;\n\t\tvar revertDuration = this.options.revertDuration;\n\n\t\tfunction complete() { // might be called by .animate(), which might change `this` context\n\t\t\t_this.isAnimating = false;\n\t\t\t_this.removeElement();\n\n\t\t\t_this.top0 = _this.left0 = null; // reset state for future updatePosition calls\n\n\t\t\tif (callback) {\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}\n\n\t\tif (this.isFollowing && !this.isAnimating) { // disallow more than one stop animation at a time\n\t\t\tthis.isFollowing = false;\n\n\t\t\tthis.stopListeningTo($(document));\n\n\t\t\tif (shouldRevert && revertDuration && !this.isHidden) { // do a revert animation?\n\t\t\t\tthis.isAnimating = true;\n\t\t\t\tthis.el.animate({\n\t\t\t\t\ttop: this.top0,\n\t\t\t\t\tleft: this.left0\n\t\t\t\t}, {\n\t\t\t\t\tduration: revertDuration,\n\t\t\t\t\tcomplete: complete\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcomplete();\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Gets the tracking element. Create it if necessary\n\tgetEl: function() {\n\t\tvar el = this.el;\n\n\t\tif (!el) {\n\t\t\tel = this.el = this.sourceEl.clone()\n\t\t\t\t.addClass(this.options.additionalClass || '')\n\t\t\t\t.css({\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tvisibility: '', // in case original element was hidden (commonly through hideEvents())\n\t\t\t\t\tdisplay: this.isHidden ? 'none' : '', // for when initially hidden\n\t\t\t\t\tmargin: 0,\n\t\t\t\t\tright: 'auto', // erase and set width instead\n\t\t\t\t\tbottom: 'auto', // erase and set height instead\n\t\t\t\t\twidth: this.sourceEl.width(), // explicit height in case there was a 'right' value\n\t\t\t\t\theight: this.sourceEl.height(), // explicit width in case there was a 'bottom' value\n\t\t\t\t\topacity: this.options.opacity || '',\n\t\t\t\t\tzIndex: this.options.zIndex\n\t\t\t\t});\n\n\t\t\t// we don't want long taps or any mouse interaction causing selection/menus.\n\t\t\t// would use preventSelection(), but that prevents selectstart, causing problems.\n\t\t\tel.addClass('fc-unselectable');\n\n\t\t\tel.appendTo(this.parentEl);\n\t\t}\n\n\t\treturn el;\n\t},\n\n\n\t// Removes the tracking element if it has already been created\n\tremoveElement: function() {\n\t\tif (this.el) {\n\t\t\tthis.el.remove();\n\t\t\tthis.el = null;\n\t\t}\n\t},\n\n\n\t// Update the CSS position of the tracking element\n\tupdatePosition: function() {\n\t\tvar sourceOffset;\n\t\tvar origin;\n\n\t\tthis.getEl(); // ensure this.el\n\n\t\t// make sure origin info was computed\n\t\tif (this.top0 === null) {\n\t\t\tsourceOffset = this.sourceEl.offset();\n\t\t\torigin = this.el.offsetParent().offset();\n\t\t\tthis.top0 = sourceOffset.top - origin.top;\n\t\t\tthis.left0 = sourceOffset.left - origin.left;\n\t\t}\n\n\t\tthis.el.css({\n\t\t\ttop: this.top0 + this.topDelta,\n\t\t\tleft: this.left0 + this.leftDelta\n\t\t});\n\t},\n\n\n\t// Gets called when the user moves the mouse\n\thandleMove: function(ev) {\n\t\tthis.topDelta = getEvY(ev) - this.y0;\n\t\tthis.leftDelta = getEvX(ev) - this.x0;\n\n\t\tif (!this.isHidden) {\n\t\t\tthis.updatePosition();\n\t\t}\n\t},\n\n\n\t// Temporarily makes the tracking element invisible. Can be called before following starts\n\thide: function() {\n\t\tif (!this.isHidden) {\n\t\t\tthis.isHidden = true;\n\t\t\tif (this.el) {\n\t\t\t\tthis.el.hide();\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Show the tracking element after it has been temporarily hidden\n\tshow: function() {\n\t\tif (this.isHidden) {\n\t\t\tthis.isHidden = false;\n\t\t\tthis.updatePosition();\n\t\t\tthis.getEl().show();\n\t\t}\n\t}\n\n});\n\n;;\n\nvar ChronoComponent = Model.extend({\n\n\tchildren: null,\n\n\tel: null, // the view's containing element. set by Calendar(?)\n\n\t// frequently accessed options\n\tisRTL: false,\n\tnextDayThreshold: null,\n\n\n\tconstructor: function() {\n\t\tModel.call(this);\n\n\t\tthis.children = [];\n\n\t\tthis.nextDayThreshold = moment.duration(this.opt('nextDayThreshold'));\n\t\tthis.isRTL = this.opt('isRTL');\n\t},\n\n\n\taddChild: function(chronoComponent) {\n\t\tthis.children.push(chronoComponent);\n\t},\n\n\n\t// Options\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\topt: function(name) {\n\t\t// subclasses must implement\n\t},\n\n\n\tpubliclyTrigger: function(/**/) {\n\t\tvar calendar = this._getCalendar();\n\n\t\treturn calendar.publiclyTrigger.apply(calendar, arguments);\n\t},\n\n\n\thasPublicHandlers: function(/**/) {\n\t\tvar calendar = this._getCalendar();\n\n\t\treturn calendar.hasPublicHandlers.apply(calendar, arguments);\n\t},\n\n\n\t// Element\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// Sets the container element that the view should render inside of, does global DOM-related initializations,\n\t// and renders all the non-date-related content inside.\n\tsetElement: function(el) {\n\t\tthis.el = el;\n\t\tthis.bindGlobalHandlers();\n\t\tthis.renderSkeleton();\n\t},\n\n\n\t// Removes the view's container element from the DOM, clearing any content beforehand.\n\t// Undoes any other DOM-related attachments.\n\tremoveElement: function() {\n\t\tthis.unrenderSkeleton();\n\t\tthis.unbindGlobalHandlers();\n\n\t\tthis.el.remove();\n\t\t// NOTE: don't null-out this.el in case the View was destroyed within an API callback.\n\t\t// We don't null-out the View's other jQuery element references upon destroy,\n\t\t// so we shouldn't kill this.el either.\n\t},\n\n\n\tbindGlobalHandlers: function() {\n\t},\n\n\n\tunbindGlobalHandlers: function() {\n\t},\n\n\n\t// Skeleton\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// Renders the basic structure of the view before any content is rendered\n\trenderSkeleton: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Unrenders the basic structure of the view\n\tunrenderSkeleton: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Date Low-level Rendering\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// date-cell content only\n\trenderDates: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// date-cell content only\n\tunrenderDates: function() {\n\t\t// subclasses should override\n\t},\n\n\n\t// Now-Indicator\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// Returns a string unit, like 'second' or 'minute' that defined how often the current time indicator\n\t// should be refreshed. If something falsy is returned, no time indicator is rendered at all.\n\tgetNowIndicatorUnit: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Renders a current time indicator at the given datetime\n\trenderNowIndicator: function(date) {\n\t\tthis.callChildren('renderNowIndicator', date);\n\t},\n\n\n\t// Undoes the rendering actions from renderNowIndicator\n\tunrenderNowIndicator: function() {\n\t\tthis.callChildren('unrenderNowIndicator');\n\t},\n\n\n\t// Business Hours\n\t// ---------------------------------------------------------------------------------------------------------------\n\n\n\t// Renders business-hours onto the view. Assumes updateSize has already been called.\n\trenderBusinessHours: function() {\n\t\tthis.callChildren('renderBusinessHours');\n\t},\n\n\n\t// Unrenders previously-rendered business-hours\n\tunrenderBusinessHours: function() {\n\t\tthis.callChildren('unrenderBusinessHours');\n\t},\n\n\n\t// Event Low-level Rendering\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// Renders the events onto the view.\n\t// TODO: eventually rename to `renderEvents` once legacy is gone.\n\trenderEventsPayload: function(eventsPayload) {\n\t\tthis.callChildren('renderEventsPayload', eventsPayload);\n\t},\n\n\n\t// Removes event elements from the view.\n\tunrenderEvents: function() {\n\t\tthis.callChildren('unrenderEvents');\n\n\t\t// we DON'T need to call updateHeight() because\n\t\t// a renderEventsPayload() call always happens after this, which will eventually call updateHeight()\n\t},\n\n\n\t// Retrieves all segment objects that are rendered in the view\n\tgetEventSegs: function() {\n\t\tvar children = this.children;\n\t\tvar segs = [];\n\t\tvar i;\n\n\t\tfor (i = 0; i < children.length; i++) {\n\t\t\tsegs.push.apply( // append\n\t\t\t\tsegs,\n\t\t\t\tchildren[i].getEventSegs()\n\t\t\t);\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\t// Drag-n-Drop Rendering (for both events and external elements)\n\t// ---------------------------------------------------------------------------------------------------------------\n\n\n\t// Renders a visual indication of a event or external-element drag over the given drop zone.\n\t// If an external-element, seg will be `null`.\n\t// Must return elements used for any mock events.\n\trenderDrag: function(eventFootprints, seg) {\n\t\tvar dragEls = null;\n\t\tvar children = this.children;\n\t\tvar i;\n\t\tvar childDragEls;\n\n\t\tfor (i = 0; i < children.length; i++) {\n\t\t\tchildDragEls = children[i].renderDrag(eventFootprints, seg);\n\n\t\t\tif (childDragEls) {\n\t\t\t\tif (!dragEls) {\n\t\t\t\t\tdragEls = childDragEls;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdragEls = dragEls.add(childDragEls);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn dragEls;\n\t},\n\n\n\t// Unrenders a visual indication of an event or external-element being dragged.\n\tunrenderDrag: function() {\n\t\tthis.callChildren('unrenderDrag');\n\t},\n\n\n\t// Selection\n\t// ---------------------------------------------------------------------------------------------------------------\n\n\n\t// Renders a visual indication of the selection\n\t// TODO: rename to `renderSelection` after legacy is gone\n\trenderSelectionFootprint: function(componentFootprint) {\n\t\tthis.callChildren('renderSelectionFootprint', componentFootprint);\n\t},\n\n\n\t// Unrenders a visual indication of selection\n\tunrenderSelection: function() {\n\t\tthis.callChildren('unrenderSelection');\n\t},\n\n\n\t// Hit Areas\n\t// ---------------------------------------------------------------------------------------------------------------\n\n\n\thitsNeeded: function() {\n\t\tthis.callChildren('hitsNeeded');\n\t},\n\n\n\thitsNotNeeded: function() {\n\t\tthis.callChildren('hitsNotNeeded');\n\t},\n\n\n\t// Called before one or more queryHit calls might happen. Should prepare any cached coordinates for queryHit\n\tprepareHits: function() {\n\t\tthis.callChildren('prepareHits');\n\t},\n\n\n\t// Called when queryHit calls have subsided. Good place to clear any coordinate caches.\n\treleaseHits: function() {\n\t\tthis.callChildren('releaseHits');\n\t},\n\n\n\t// Given coordinates from the topleft of the document, return data about the date-related area underneath.\n\t// Can return an object with arbitrary properties (although top/right/left/bottom are encouraged).\n\t// Must have a `grid` property, a reference to this current grid. TODO: avoid this\n\t// The returned object will be processed by getHitFootprint and getHitEl.\n\tqueryHit: function(leftOffset, topOffset) {\n\t\tvar children = this.children;\n\t\tvar i;\n\t\tvar hit;\n\n\t\tfor (i = 0; i < children.length; i++) {\n\t\t\thit = children[i].queryHit(leftOffset, topOffset);\n\n\t\t\tif (hit) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn hit;\n\t},\n\n\n\n\t// Event Drag-n-Drop\n\t// ---------------------------------------------------------------------------------------------------------------\n\n\n\t// Computes if the given event is allowed to be dragged by the user\n\tisEventDefDraggable: function(eventDef) {\n\t\treturn this.isEventDefStartEditable(eventDef);\n\t},\n\n\n\tisEventDefStartEditable: function(eventDef) {\n\t\tvar isEditable = eventDef.isStartExplicitlyEditable();\n\n\t\tif (isEditable == null) {\n\t\t\tisEditable = this.opt('eventStartEditable');\n\n\t\t\tif (isEditable == null) {\n\t\t\t\tisEditable = this.isEventDefGenerallyEditable(eventDef);\n\t\t\t}\n\t\t}\n\n\t\treturn isEditable;\n\t},\n\n\n\tisEventDefGenerallyEditable: function(eventDef) {\n\t\tvar isEditable = eventDef.isExplicitlyEditable();\n\n\t\tif (isEditable == null) {\n\t\t\tisEditable = this.opt('editable');\n\t\t}\n\n\t\treturn isEditable;\n\t},\n\n\n\t// Event Resizing\n\t// ---------------------------------------------------------------------------------------------------------------\n\n\n\t// Computes if the given event is allowed to be resized from its starting edge\n\tisEventDefResizableFromStart: function(eventDef) {\n\t\treturn this.opt('eventResizableFromStart') && this.isEventDefResizable(eventDef);\n\t},\n\n\n\t// Computes if the given event is allowed to be resized from its ending edge\n\tisEventDefResizableFromEnd: function(eventDef) {\n\t\treturn this.isEventDefResizable(eventDef);\n\t},\n\n\n\t// Computes if the given event is allowed to be resized by the user at all\n\tisEventDefResizable: function(eventDef) {\n\t\tvar isResizable = eventDef.isDurationExplicitlyEditable();\n\n\t\tif (isResizable == null) {\n\t\t\tisResizable = this.opt('eventDurationEditable');\n\n\t\t\tif (isResizable == null) {\n\t\t\t\tisResizable = this.isEventDefGenerallyEditable(eventDef);\n\t\t\t}\n\t\t}\n\t\treturn isResizable;\n\t},\n\n\n\t// Foreground Segment Rendering\n\t// ---------------------------------------------------------------------------------------------------------------\n\n\n\t// Renders foreground event segments onto the grid. May return a subset of segs that were rendered.\n\trenderFgSegs: function(segs) {\n\t\t// subclasses must implement\n\t},\n\n\n\t// Unrenders all currently rendered foreground segments\n\tunrenderFgSegs: function() {\n\t\t// subclasses must implement\n\t},\n\n\n\t// Renders and assigns an `el` property for each foreground event segment.\n\t// Only returns segments that successfully rendered.\n\t// A utility that subclasses may use.\n\trenderFgSegEls: function(segs, disableResizing) {\n\t\tvar _this = this;\n\t\tvar hasEventRenderHandlers = this.hasPublicHandlers('eventRender');\n\t\tvar html = '';\n\t\tvar renderedSegs = [];\n\t\tvar i;\n\n\t\tif (segs.length) { // don't build an empty html string\n\n\t\t\t// build a large concatenation of event segment HTML\n\t\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\t\thtml += this.fgSegHtml(segs[i], disableResizing);\n\t\t\t}\n\n\t\t\t// Grab individual elements from the combined HTML string. Use each as the default rendering.\n\t\t\t// Then, compute the 'el' for each segment. An el might be null if the eventRender callback returned false.\n\t\t\t$(html).each(function(i, node) {\n\t\t\t\tvar seg = segs[i];\n\t\t\t\tvar el = $(node);\n\n\t\t\t\tif (hasEventRenderHandlers) { // optimization\n\t\t\t\t\tel = _this.filterEventRenderEl(seg.footprint, el);\n\t\t\t\t}\n\n\t\t\t\tif (el) {\n\t\t\t\t\tel.data('fc-seg', seg); // used by handlers\n\t\t\t\t\tseg.el = el;\n\t\t\t\t\trenderedSegs.push(seg);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn renderedSegs;\n\t},\n\n\n\t// Generates the HTML for the default rendering of a foreground event segment. Used by renderFgSegEls()\n\tfgSegHtml: function(seg, disableResizing) {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Given an event and the default element used for rendering, returns the element that should actually be used.\n\t// Basically runs events and elements through the eventRender hook.\n\tfilterEventRenderEl: function(eventFootprint, el) {\n\t\tvar legacy = eventFootprint.getEventLegacy();\n\n\t\tvar custom = this.publiclyTrigger('eventRender', {\n\t\t\tcontext: legacy,\n\t\t\targs: [ legacy, el, this._getView() ]\n\t\t});\n\n\t\tif (custom === false) { // means don't render at all\n\t\t\tel = null;\n\t\t}\n\t\telse if (custom && custom !== true) {\n\t\t\tel = $(custom);\n\t\t}\n\n\t\treturn el;\n\t},\n\n\n\t// Navigation\n\t// ----------------------------------------------------------------------------------------------------------------\n\n\n\t// Generates HTML for an anchor to another view into the calendar.\n\t// Will either generate an tag or a non-clickable tag, depending on enabled settings.\n\t// `gotoOptions` can either be a moment input, or an object with the form:\n\t// { date, type, forceOff }\n\t// `type` is a view-type like \"day\" or \"week\". default value is \"day\".\n\t// `attrs` and `innerHtml` are use to generate the rest of the HTML tag.\n\tbuildGotoAnchorHtml: function(gotoOptions, attrs, innerHtml) {\n\t\tvar date, type, forceOff;\n\t\tvar finalOptions;\n\n\t\tif ($.isPlainObject(gotoOptions)) {\n\t\t\tdate = gotoOptions.date;\n\t\t\ttype = gotoOptions.type;\n\t\t\tforceOff = gotoOptions.forceOff;\n\t\t}\n\t\telse {\n\t\t\tdate = gotoOptions; // a single moment input\n\t\t}\n\t\tdate = FC.moment(date); // if a string, parse it\n\n\t\tfinalOptions = { // for serialization into the link\n\t\t\tdate: date.format('YYYY-MM-DD'),\n\t\t\ttype: type || 'day'\n\t\t};\n\n\t\tif (typeof attrs === 'string') {\n\t\t\tinnerHtml = attrs;\n\t\t\tattrs = null;\n\t\t}\n\n\t\tattrs = attrs ? ' ' + attrsToStr(attrs) : ''; // will have a leading space\n\t\tinnerHtml = innerHtml || '';\n\n\t\tif (!forceOff && this.opt('navLinks')) {\n\t\t\treturn '' +\n\t\t\t\tinnerHtml +\n\t\t\t\t'';\n\t\t}\n\t\telse {\n\t\t\treturn '' +\n\t\t\t\tinnerHtml +\n\t\t\t\t'';\n\t\t}\n\t},\n\n\n\t// Date Formatting Utils\n\t// ---------------------------------------------------------------------------------------------------------------\n\n\n\t// Utility for formatting a range. Accepts a range object, formatting string, and optional separator.\n\t// Displays all-day ranges naturally, with an inclusive end. Takes the current isRTL into account.\n\t// The timezones of the dates within `range` will be respected.\n\tformatRange: function(range, isAllDay, formatStr, separator) {\n\t\tvar end = range.end;\n\n\t\tif (isAllDay) {\n\t\t\tend = end.clone().subtract(1); // convert to inclusive. last ms of previous day\n\t\t}\n\n\t\treturn formatRange(range.start, end, formatStr, separator, this.isRTL);\n\t},\n\n\n\tgetAllDayHtml: function() {\n\t\treturn this.opt('allDayHtml') || htmlEscape(this.opt('allDayText'));\n\t},\n\n\n\t// Computes HTML classNames for a single-day element\n\tgetDayClasses: function(date, noThemeHighlight) {\n\t\tvar view = this._getView();\n\t\tvar classes = [];\n\t\tvar today;\n\n\t\tif (!view.activeUnzonedRange.containsDate(date)) {\n\t\t\tclasses.push('fc-disabled-day'); // TODO: jQuery UI theme?\n\t\t}\n\t\telse {\n\t\t\tclasses.push('fc-' + dayIDs[date.day()]);\n\n\t\t\tif (view.isDateInOtherMonth(date)) { // TODO: use ChronoComponent subclass somehow\n\t\t\t\tclasses.push('fc-other-month');\n\t\t\t}\n\n\t\t\ttoday = view.calendar.getNow();\n\n\t\t\tif (date.isSame(today, 'day')) {\n\t\t\t\tclasses.push('fc-today');\n\n\t\t\t\tif (noThemeHighlight !== true) {\n\t\t\t\t\tclasses.push(view.calendar.theme.getClass('today'));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (date < today) {\n\t\t\t\tclasses.push('fc-past');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tclasses.push('fc-future');\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t},\n\n\n\t// Date Utils\n\t// ---------------------------------------------------------------------------------------------------------------\n\n\n\t// Returns the date range of the full days the given range visually appears to occupy.\n\t// Returns a plain object with start/end, NOT an UnzonedRange!\n\tcomputeDayRange: function(unzonedRange) {\n\t\tvar calendar = this._getCalendar();\n\t\tvar startDay = calendar.msToUtcMoment(unzonedRange.startMs, true); // the beginning of the day the range starts\n\t\tvar end = calendar.msToUtcMoment(unzonedRange.endMs);\n\t\tvar endTimeMS = +end.time(); // # of milliseconds into `endDay`\n\t\tvar endDay = end.clone().stripTime(); // the beginning of the day the range exclusively ends\n\n\t\t// If the end time is actually inclusively part of the next day and is equal to or\n\t\t// beyond the next day threshold, adjust the end to be the exclusive end of `endDay`.\n\t\t// Otherwise, leaving it as inclusive will cause it to exclude `endDay`.\n\t\tif (endTimeMS && endTimeMS >= this.nextDayThreshold) {\n\t\t\tendDay.add(1, 'days');\n\t\t}\n\n\t\t// If end is within `startDay` but not past nextDayThreshold, assign the default duration of one day.\n\t\tif (endDay <= startDay) {\n\t\t\tendDay = startDay.clone().add(1, 'days');\n\t\t}\n\n\t\treturn { start: startDay, end: endDay };\n\t},\n\n\n\t// Does the given range visually appear to occupy more than one day?\n\tisMultiDayRange: function(unzonedRange) {\n\t\tvar dayRange = this.computeDayRange(unzonedRange);\n\n\t\treturn dayRange.end.diff(dayRange.start, 'days') > 1;\n\t},\n\n\n\t// Utils\n\t// ---------------------------------------------------------------------------------------------------------------\n\n\n\tcallChildren: function(methodName) {\n\t\tvar args = Array.prototype.slice.call(arguments, 1);\n\t\tvar children = this.children;\n\t\tvar i, child;\n\n\t\tfor (i = 0; i < children.length; i++) {\n\t\t\tchild = children[i];\n\t\t\tchild[methodName].apply(child, args);\n\t\t}\n\t},\n\n\n\t_getCalendar: function() { // TODO: strip out. move to generic parent.\n\t\treturn this.calendar || this.view.calendar;\n\t},\n\n\n\t_getView: function() { // TODO: strip out. move to generic parent.\n\t\treturn this.view;\n\t}\n\n});\n\n;;\n\n/* An abstract class comprised of a \"grid\" of areas that each represent a specific datetime\n----------------------------------------------------------------------------------------------------------------------\nContains:\n- hit system\n- range->footprint->seg pipeline\n- initializing day click\n- initializing selection system\n- initializing mouse/touch handlers for everything\n- initializing event rendering-related options\n*/\n\nvar Grid = FC.Grid = ChronoComponent.extend({\n\n\t// self-config, overridable by subclasses\n\thasDayInteractions: true, // can user click/select ranges of time?\n\n\tview: null, // a View object\n\tisRTL: null, // shortcut to the view's isRTL option\n\n\tunzonedRange: null,\n\n\thitsNeededDepth: 0, // necessary because multiple callers might need the same hits\n\n\tdayClickListener: null,\n\tdaySelectListener: null,\n\tsegDragListener: null,\n\tsegResizeListener: null,\n\texternalDragListener: null,\n\n\n\tconstructor: function(view) {\n\t\tthis.view = view;\n\n\t\tChronoComponent.call(this);\n\n\t\tthis.initFillInternals();\n\n\t\tthis.dayClickListener = this.buildDayClickListener();\n\t\tthis.daySelectListener = this.buildDaySelectListener();\n\t},\n\n\n\topt: function(name) {\n\t\treturn this.view.opt(name);\n\t},\n\n\n\t/* Dates\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Tells the grid about what period of time to display.\n\t// Any date-related internal data should be generated.\n\tsetRange: function(unzonedRange) {\n\t\tthis.unzonedRange = unzonedRange;\n\n\t\tthis.rangeUpdated();\n\t\tthis.processRangeOptions();\n\t},\n\n\n\t// Called when internal variables that rely on the range should be updated\n\trangeUpdated: function() {\n\t},\n\n\n\t// Updates values that rely on options and also relate to range\n\tprocessRangeOptions: function() {\n\t\tvar displayEventTime;\n\t\tvar displayEventEnd;\n\n\t\tthis.eventTimeFormat = // for Grid.event-rendering.js\n\t\t\tthis.opt('eventTimeFormat') ||\n\t\t\tthis.opt('timeFormat') || // deprecated\n\t\t\tthis.computeEventTimeFormat();\n\n\t\tdisplayEventTime = this.opt('displayEventTime');\n\t\tif (displayEventTime == null) {\n\t\t\tdisplayEventTime = this.computeDisplayEventTime(); // might be based off of range\n\t\t}\n\n\t\tdisplayEventEnd = this.opt('displayEventEnd');\n\t\tif (displayEventEnd == null) {\n\t\t\tdisplayEventEnd = this.computeDisplayEventEnd(); // might be based off of range\n\t\t}\n\n\t\tthis.displayEventTime = displayEventTime;\n\t\tthis.displayEventEnd = displayEventEnd;\n\t},\n\n\n\n\t/* Hit Area\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\thitsNeeded: function() {\n\t\tif (!(this.hitsNeededDepth++)) {\n\t\t\tthis.prepareHits();\n\t\t}\n\t},\n\n\n\thitsNotNeeded: function() {\n\t\tif (this.hitsNeededDepth && !(--this.hitsNeededDepth)) {\n\t\t\tthis.releaseHits();\n\t\t}\n\t},\n\n\n\tgetSafeHitFootprint: function(hit) {\n\t\tvar footprint = this.getHitFootprint(hit);\n\n\t\tif (!this.view.activeUnzonedRange.containsRange(footprint.unzonedRange)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn footprint;\n\t},\n\n\n\tgetHitFootprint: function(hit) {\n\t},\n\n\n\t// Given position-level information about a date-related area within the grid,\n\t// should return a jQuery element that best represents it. passed to dayClick callback.\n\tgetHitEl: function(hit) {\n\t},\n\n\n\t/* Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Sets the container element that the grid should render inside of.\n\t// Does other DOM-related initializations.\n\tsetElement: function(el) {\n\t\tChronoComponent.prototype.setElement.apply(this, arguments);\n\n\t\tif (this.hasDayInteractions) {\n\t\t\tpreventSelection(el);\n\n\t\t\tthis.bindDayHandler('touchstart', this.dayTouchStart);\n\t\t\tthis.bindDayHandler('mousedown', this.dayMousedown);\n\t\t}\n\n\t\t// attach event-element-related handlers. in Grid.events\n\t\t// same garbage collection note as above.\n\t\tthis.bindSegHandlers();\n\t},\n\n\n\tbindDayHandler: function(name, handler) {\n\t\tvar _this = this;\n\n\t\t// attach a handler to the grid's root element.\n\t\t// jQuery will take care of unregistering them when removeElement gets called.\n\t\tthis.el.on(name, function(ev) {\n\t\t\tif (\n\t\t\t\t!$(ev.target).is(\n\t\t\t\t\t_this.segSelector + ',' + // directly on an event element\n\t\t\t\t\t_this.segSelector + ' *,' + // within an event element\n\t\t\t\t\t'.fc-more,' + // a \"more..\" link\n\t\t\t\t\t'a[data-goto]' // a clickable nav link\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn handler.call(_this, ev);\n\t\t\t}\n\t\t});\n\t},\n\n\n\t// Removes the grid's container element from the DOM. Undoes any other DOM-related attachments.\n\t// DOES NOT remove any content beforehand (doesn't clear events or call unrenderDates), unlike View\n\tremoveElement: function() {\n\t\tChronoComponent.prototype.removeElement.apply(this, arguments);\n\n\t\tthis.clearDragListeners();\n\t},\n\n\n\t/* Handlers\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Binds DOM handlers to elements that reside outside the grid, such as the document\n\tbindGlobalHandlers: function() {\n\t\tChronoComponent.prototype.bindGlobalHandlers.apply(this, arguments);\n\n\t\tthis.listenTo($(document), {\n\t\t\tdragstart: this.externalDragStart, // jqui\n\t\t\tsortstart: this.externalDragStart // jqui\n\t\t});\n\t},\n\n\n\t// Unbinds DOM handlers from elements that reside outside the grid\n\tunbindGlobalHandlers: function() {\n\t\tChronoComponent.prototype.unbindGlobalHandlers.apply(this, arguments);\n\n\t\tthis.stopListeningTo($(document));\n\t},\n\n\n\t// Process a mousedown on an element that represents a day. For day clicking and selecting.\n\tdayMousedown: function(ev) {\n\n\t\t// HACK\n\t\t// This will still work even though bindDayHandler doesn't use GlobalEmitter.\n\t\tif (GlobalEmitter.get().shouldIgnoreMouse()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.dayClickListener.startInteraction(ev);\n\n\t\tif (this.opt('selectable')) {\n\t\t\tthis.daySelectListener.startInteraction(ev, {\n\t\t\t\tdistance: this.opt('selectMinDistance')\n\t\t\t});\n\t\t}\n\t},\n\n\n\tdayTouchStart: function(ev) {\n\t\tvar view = this.view;\n\t\tvar selectLongPressDelay;\n\n\t\t// On iOS (and Android?) when a new selection is initiated overtop another selection,\n\t\t// the touchend never fires because the elements gets removed mid-touch-interaction (my theory).\n\t\t// HACK: simply don't allow this to happen.\n\t\t// ALSO: prevent selection when an *event* is already raised.\n\t\tif (view.isSelected || view.selectedEvent) {\n\t\t\treturn;\n\t\t}\n\n\t\tselectLongPressDelay = this.opt('selectLongPressDelay');\n\t\tif (selectLongPressDelay == null) {\n\t\t\tselectLongPressDelay = this.opt('longPressDelay'); // fallback\n\t\t}\n\n\t\tthis.dayClickListener.startInteraction(ev);\n\n\t\tif (this.opt('selectable')) {\n\t\t\tthis.daySelectListener.startInteraction(ev, {\n\t\t\t\tdelay: selectLongPressDelay\n\t\t\t});\n\t\t}\n\t},\n\n\n\t// Kills all in-progress dragging.\n\t// Useful for when public API methods that result in re-rendering are invoked during a drag.\n\t// Also useful for when touch devices misbehave and don't fire their touchend.\n\tclearDragListeners: function() {\n\t\tthis.dayClickListener.endInteraction();\n\t\tthis.daySelectListener.endInteraction();\n\n\t\tif (this.segDragListener) {\n\t\t\tthis.segDragListener.endInteraction(); // will clear this.segDragListener\n\t\t}\n\t\tif (this.segResizeListener) {\n\t\t\tthis.segResizeListener.endInteraction(); // will clear this.segResizeListener\n\t\t}\n\t\tif (this.externalDragListener) {\n\t\t\tthis.externalDragListener.endInteraction(); // will clear this.externalDragListener\n\t\t}\n\t},\n\n\n\t/* Highlight\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders an emphasis on the given date range. Given a span (unzoned start/end and other misc data)\n\trenderHighlight: function(componentFootprint) {\n\t\tthis.renderFill('highlight', this.componentFootprintToSegs(componentFootprint));\n\t},\n\n\n\t// Unrenders the emphasis on a date range\n\tunrenderHighlight: function() {\n\t\tthis.unrenderFill('highlight');\n\t},\n\n\n\t/* Converting eventRange -> eventFootprint\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\teventRangesToEventFootprints: function(eventRanges) {\n\t\tvar eventFootprints = [];\n\t\tvar i;\n\n\t\tfor (i = 0; i < eventRanges.length; i++) {\n\t\t\teventFootprints.push.apply(eventFootprints,\n\t\t\t\tthis.eventRangeToEventFootprints(eventRanges[i])\n\t\t\t);\n\t\t}\n\n\t\treturn eventFootprints;\n\t},\n\n\n\t// Given an event's unzoned date range, return an array of eventSpan objects.\n\t// eventSpan - { start, end, isStart, isEnd, otherthings... }\n\t// Subclasses can override.\n\t// Subclasses are obligated to forward eventRange.isStart/isEnd to the resulting spans.\n\t// TODO: somehow more DRY with Calendar::eventRangeToEventFootprints\n\teventRangeToEventFootprints: function(eventRange) {\n\t\treturn [\n\t\t\tnew EventFootprint(\n\t\t\t\tnew ComponentFootprint(\n\t\t\t\t\teventRange.unzonedRange,\n\t\t\t\t\teventRange.eventDef.isAllDay()\n\t\t\t\t),\n\t\t\t\teventRange.eventDef,\n\t\t\t\teventRange.eventInstance // might not exist\n\t\t\t)\n\t\t];\n\t},\n\n\n\t/* Converting componentFootprint/eventFootprint -> segs\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\teventFootprintsToSegs: function(eventFootprints) {\n\t\tvar segs = [];\n\t\tvar i;\n\n\t\tfor (i = 0; i < eventFootprints.length; i++) {\n\t\t\tsegs.push.apply(segs,\n\t\t\t\tthis.eventFootprintToSegs(eventFootprints[i])\n\t\t\t);\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\t// Given an event's span (unzoned start/end and other misc data), and the event itself,\n\t// slices into segments and attaches event-derived properties to them.\n\t// eventSpan - { start, end, isStart, isEnd, otherthings... }\n\t// constraintRange allow additional clipping. optional. eventually remove this.\n\teventFootprintToSegs: function(eventFootprint, constraintRange) {\n\t\tvar unzonedRange = eventFootprint.componentFootprint.unzonedRange;\n\t\tvar segs;\n\t\tvar i, seg;\n\n\t\tif (constraintRange) {\n\t\t\tunzonedRange = unzonedRange.intersect(constraintRange);\n\t\t}\n\n\t\tsegs = this.componentFootprintToSegs(eventFootprint.componentFootprint);\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\n\t\t\tif (!unzonedRange.isStart) {\n\t\t\t\tseg.isStart = false;\n\t\t\t}\n\t\t\tif (!unzonedRange.isEnd) {\n\t\t\t\tseg.isEnd = false;\n\t\t\t}\n\n\t\t\tseg.footprint = eventFootprint;\n\t\t\t// TODO: rename to seg.eventFootprint\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\tcomponentFootprintToSegs: function(componentFootprint) {\n\t\t// subclasses must implement\n\t}\n\n});\n\n;;\n\nGrid.mixin({\n\n\t// Creates a listener that tracks the user's drag across day elements, for day clicking.\n\tbuildDayClickListener: function() {\n\t\tvar _this = this;\n\t\tvar dayClickHit; // null if invalid dayClick\n\n\t\tvar dragListener = new HitDragListener(this, {\n\t\t\tscroll: this.opt('dragScroll'),\n\t\t\tinteractionStart: function() {\n\t\t\t\tdayClickHit = dragListener.origHit;\n\t\t\t},\n\t\t\thitOver: function(hit, isOrig, origHit) {\n\t\t\t\t// if user dragged to another cell at any point, it can no longer be a dayClick\n\t\t\t\tif (!isOrig) {\n\t\t\t\t\tdayClickHit = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\thitOut: function() { // called before mouse moves to a different hit OR moved out of all hits\n\t\t\t\tdayClickHit = null;\n\t\t\t},\n\t\t\tinteractionEnd: function(ev, isCancelled) {\n\t\t\t\tvar componentFootprint;\n\n\t\t\t\tif (!isCancelled && dayClickHit) {\n\t\t\t\t\tcomponentFootprint = _this.getSafeHitFootprint(dayClickHit);\n\n\t\t\t\t\tif (componentFootprint) {\n\t\t\t\t\t\t_this.view.triggerDayClick(componentFootprint, _this.getHitEl(dayClickHit), ev);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// because dayClickListener won't be called with any time delay, \"dragging\" will begin immediately,\n\t\t// which will kill any touchmoving/scrolling. Prevent this.\n\t\tdragListener.shouldCancelTouchScroll = false;\n\n\t\tdragListener.scrollAlwaysKills = true;\n\n\t\treturn dragListener;\n\t}\n\n});\n\n;;\n\nGrid.mixin({\n\n\t// Creates a listener that tracks the user's drag across day elements, for day selecting.\n\tbuildDaySelectListener: function() {\n\t\tvar _this = this;\n\t\tvar selectionFootprint; // null if invalid selection\n\n\t\tvar dragListener = new HitDragListener(this, {\n\t\t\tscroll: this.opt('dragScroll'),\n\t\t\tinteractionStart: function() {\n\t\t\t\tselectionFootprint = null;\n\t\t\t},\n\t\t\tdragStart: function() {\n\t\t\t\t_this.view.unselect(); // since we could be rendering a new selection, we want to clear any old one\n\t\t\t},\n\t\t\thitOver: function(hit, isOrig, origHit) {\n\t\t\t\tvar origHitFootprint;\n\t\t\t\tvar hitFootprint;\n\n\t\t\t\tif (origHit) { // click needs to have started on a hit\n\n\t\t\t\t\torigHitFootprint = _this.getSafeHitFootprint(origHit);\n\t\t\t\t\thitFootprint = _this.getSafeHitFootprint(hit);\n\n\t\t\t\t\tif (origHitFootprint && hitFootprint) {\n\t\t\t\t\t\tselectionFootprint = _this.computeSelection(origHitFootprint, hitFootprint);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tselectionFootprint = null;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (selectionFootprint) {\n\t\t\t\t\t\t_this.renderSelectionFootprint(selectionFootprint);\n\t\t\t\t\t}\n\t\t\t\t\telse if (selectionFootprint === false) {\n\t\t\t\t\t\tdisableCursor();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\thitOut: function() { // called before mouse moves to a different hit OR moved out of all hits\n\t\t\t\tselectionFootprint = null;\n\t\t\t\t_this.unrenderSelection();\n\t\t\t},\n\t\t\thitDone: function() { // called after a hitOut OR before a dragEnd\n\t\t\t\tenableCursor();\n\t\t\t},\n\t\t\tinteractionEnd: function(ev, isCancelled) {\n\t\t\t\tif (!isCancelled && selectionFootprint) {\n\t\t\t\t\t// the selection will already have been rendered. just report it\n\t\t\t\t\t_this.view.reportSelection(selectionFootprint, ev);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn dragListener;\n\t},\n\n\n\t// Renders a visual indication of a selection. Will highlight by default but can be overridden by subclasses.\n\t// Given a span (unzoned start/end and other misc data)\n\trenderSelectionFootprint: function(componentFootprint) {\n\t\tthis.renderHighlight(componentFootprint);\n\t},\n\n\n\t// Unrenders any visual indications of a selection. Will unrender a highlight by default.\n\tunrenderSelection: function() {\n\t\tthis.unrenderHighlight();\n\t},\n\n\n\t// Given the first and last date-spans of a selection, returns another date-span object.\n\t// Subclasses can override and provide additional data in the span object. Will be passed to renderSelectionFootprint().\n\t// Will return false if the selection is invalid and this should be indicated to the user.\n\t// Will return null/undefined if a selection invalid but no error should be reported.\n\tcomputeSelection: function(footprint0, footprint1) {\n\t\tvar wholeFootprint = this.computeSelectionFootprint(footprint0, footprint1);\n\n\t\tif (wholeFootprint && !this.isSelectionFootprintAllowed(wholeFootprint)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn wholeFootprint;\n\t},\n\n\n\t// Given two spans, must return the combination of the two.\n\t// TODO: do this separation of concerns (combining VS validation) for event dnd/resize too.\n\t// Assumes both footprints are non-open-ended.\n\tcomputeSelectionFootprint: function(footprint0, footprint1) {\n\t\tvar ms = [\n\t\t\tfootprint0.unzonedRange.startMs,\n\t\t\tfootprint0.unzonedRange.endMs,\n\t\t\tfootprint1.unzonedRange.startMs,\n\t\t\tfootprint1.unzonedRange.endMs\n\t\t];\n\n\t\tms.sort(compareNumbers);\n\n\t\treturn new ComponentFootprint(\n\t\t\tnew UnzonedRange(ms[0], ms[3]),\n\t\t\tfootprint0.isAllDay\n\t\t);\n\t},\n\n\n\tisSelectionFootprintAllowed: function(componentFootprint) {\n\t\treturn this.view.validUnzonedRange.containsRange(componentFootprint.unzonedRange) &&\n\t\t\tthis.view.calendar.isSelectionFootprintAllowed(componentFootprint);\n\t}\n\n});\n\n;;\n\nGrid.mixin({\n\n\t// Generates an array of classNames to be used for the rendering business hours overlay. Called by the fill system.\n\t// Called by fillSegHtml.\n\tbusinessHoursSegClasses: function(seg) {\n\t\treturn [ 'fc-nonbusiness', 'fc-bgevent' ];\n\t},\n\n\n\t// Compute business hour segs for the grid's current date range.\n\t// Caller must ask if whole-day business hours are needed.\n\tbuildBusinessHourSegs: function(wholeDay) {\n\t\treturn this.eventFootprintsToSegs(\n\t\t\tthis.buildBusinessHourEventFootprints(wholeDay)\n\t\t);\n\t},\n\n\n\t// Compute business hour *events* for the grid's current date range.\n\t// Caller must ask if whole-day business hours are needed.\n\t// FOR RENDERING\n\tbuildBusinessHourEventFootprints: function(wholeDay) {\n\t\tvar calendar = this.view.calendar;\n\n\t\treturn this._buildBusinessHourEventFootprints(wholeDay, calendar.opt('businessHours'));\n\t},\n\n\n\t_buildBusinessHourEventFootprints: function(wholeDay, businessHourDef) {\n\t\tvar calendar = this.view.calendar;\n\t\tvar eventInstanceGroup;\n\t\tvar eventRanges;\n\n\t\teventInstanceGroup = calendar.buildBusinessInstanceGroup(\n\t\t\twholeDay,\n\t\t\tbusinessHourDef,\n\t\t\tthis.unzonedRange\n\t\t);\n\n\t\tif (eventInstanceGroup) {\n\t\t\teventRanges = eventInstanceGroup.sliceRenderRanges(\n\t\t\t\tthis.unzonedRange,\n\t\t\t\tcalendar\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\teventRanges = [];\n\t\t}\n\n\t\treturn this.eventRangesToEventFootprints(eventRanges);\n\t}\n\n});\n\n;;\n\nGrid.mixin({\n\n\tsegs: null, // the *event* segments currently rendered in the grid. TODO: rename to `eventSegs`\n\n\t// derived from options\n\t// TODO: move initialization from Grid.js\n\teventTimeFormat: null,\n\tdisplayEventTime: null,\n\tdisplayEventEnd: null,\n\n\n\t// Generates the format string used for event time text, if not explicitly defined by 'timeFormat'\n\tcomputeEventTimeFormat: function() {\n\t\treturn this.opt('smallTimeFormat');\n\t},\n\n\n\t// Determines whether events should have their end times displayed, if not explicitly defined by 'displayEventTime'.\n\t// Only applies to non-all-day events.\n\tcomputeDisplayEventTime: function() {\n\t\treturn true;\n\t},\n\n\n\t// Determines whether events should have their end times displayed, if not explicitly defined by 'displayEventEnd'\n\tcomputeDisplayEventEnd: function() {\n\t\treturn true;\n\t},\n\n\n\trenderEventsPayload: function(eventsPayload) {\n\t\tvar id, eventInstanceGroup;\n\t\tvar eventRenderRanges;\n\t\tvar eventFootprints;\n\t\tvar eventSegs;\n\t\tvar bgSegs = [];\n\t\tvar fgSegs = [];\n\n\t\tfor (id in eventsPayload) {\n\t\t\teventInstanceGroup = eventsPayload[id];\n\n\t\t\teventRenderRanges = eventInstanceGroup.sliceRenderRanges(this.view.activeUnzonedRange);\n\t\t\teventFootprints = this.eventRangesToEventFootprints(eventRenderRanges);\n\t\t\teventSegs = this.eventFootprintsToSegs(eventFootprints);\n\n\t\t\tif (eventInstanceGroup.getEventDef().hasBgRendering()) {\n\t\t\t\tbgSegs.push.apply(bgSegs, // append\n\t\t\t\t\teventSegs\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfgSegs.push.apply(fgSegs, // append\n\t\t\t\t\teventSegs\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.segs = [].concat( // record all segs\n\t\t\tthis.renderBgSegs(bgSegs) || bgSegs,\n\t\t\tthis.renderFgSegs(fgSegs) || fgSegs\n\t\t);\n\t},\n\n\n\t// Unrenders all events currently rendered on the grid\n\tunrenderEvents: function() {\n\t\tthis.handleSegMouseout(); // trigger an eventMouseout if user's mouse is over an event\n\t\tthis.clearDragListeners();\n\n\t\tthis.unrenderFgSegs();\n\t\tthis.unrenderBgSegs();\n\n\t\tthis.segs = null;\n\t},\n\n\n\t// Retrieves all rendered segment objects currently rendered on the grid\n\tgetEventSegs: function() {\n\t\treturn this.segs || [];\n\t},\n\n\n\t// Background Segment Rendering\n\t// ---------------------------------------------------------------------------------------------------------------\n\t// TODO: move this to ChronoComponent, but without fill\n\n\n\t// Renders the given background event segments onto the grid.\n\t// Returns a subset of the segs that were actually rendered.\n\trenderBgSegs: function(segs) {\n\t\treturn this.renderFill('bgEvent', segs);\n\t},\n\n\n\t// Unrenders all the currently rendered background event segments\n\tunrenderBgSegs: function() {\n\t\tthis.unrenderFill('bgEvent');\n\t},\n\n\n\t// Renders a background event element, given the default rendering. Called by the fill system.\n\tbgEventSegEl: function(seg, el) {\n\t\treturn this.filterEventRenderEl(seg.footprint, el);\n\t},\n\n\n\t// Generates an array of classNames to be used for the default rendering of a background event.\n\t// Called by fillSegHtml.\n\tbgEventSegClasses: function(seg) {\n\t\tvar eventDef = seg.footprint.eventDef;\n\n\t\treturn [ 'fc-bgevent' ].concat(\n\t\t\teventDef.className,\n\t\t\teventDef.source.className\n\t\t);\n\t},\n\n\n\t// Generates a semicolon-separated CSS string to be used for the default rendering of a background event.\n\t// Called by fillSegHtml.\n\tbgEventSegCss: function(seg) {\n\t\treturn {\n\t\t\t'background-color': this.getSegSkinCss(seg)['background-color']\n\t\t};\n\t},\n\n\n\t/* Rendering Utils\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Compute the text that should be displayed on an event's element.\n\t// `range` can be the Event object itself, or something range-like, with at least a `start`.\n\t// If event times are disabled, or the event has no time, will return a blank string.\n\t// If not specified, formatStr will default to the eventTimeFormat setting,\n\t// and displayEnd will default to the displayEventEnd setting.\n\tgetEventTimeText: function(eventFootprint, formatStr, displayEnd) {\n\t\treturn this._getEventTimeText(\n\t\t\teventFootprint.eventInstance.dateProfile.start,\n\t\t\teventFootprint.eventInstance.dateProfile.end,\n\t\t\teventFootprint.componentFootprint.isAllDay,\n\t\t\tformatStr,\n\t\t\tdisplayEnd\n\t\t);\n\t},\n\n\n\t_getEventTimeText: function(start, end, isAllDay, formatStr, displayEnd) {\n\n\t\tif (formatStr == null) {\n\t\t\tformatStr = this.eventTimeFormat;\n\t\t}\n\n\t\tif (displayEnd == null) {\n\t\t\tdisplayEnd = this.displayEventEnd;\n\t\t}\n\n\t\tif (this.displayEventTime && !isAllDay) {\n\t\t\tif (displayEnd && end) {\n\t\t\t\treturn this.view.formatRange(\n\t\t\t\t\t{ start: start, end: end },\n\t\t\t\t\tfalse, // allDay\n\t\t\t\t\tformatStr\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn start.format(formatStr);\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t},\n\n\n\t// Generic utility for generating the HTML classNames for an event segment's element\n\tgetSegClasses: function(seg, isDraggable, isResizable) {\n\t\tvar view = this.view;\n\t\tvar classes = [\n\t\t\t'fc-event',\n\t\t\tseg.isStart ? 'fc-start' : 'fc-not-start',\n\t\t\tseg.isEnd ? 'fc-end' : 'fc-not-end'\n\t\t].concat(this.getSegCustomClasses(seg));\n\n\t\tif (isDraggable) {\n\t\t\tclasses.push('fc-draggable');\n\t\t}\n\t\tif (isResizable) {\n\t\t\tclasses.push('fc-resizable');\n\t\t}\n\n\t\t// event is currently selected? attach a className.\n\t\tif (view.isEventDefSelected(seg.footprint.eventDef)) {\n\t\t\tclasses.push('fc-selected');\n\t\t}\n\n\t\treturn classes;\n\t},\n\n\n\t// List of classes that were defined by the caller of the API in some way\n\tgetSegCustomClasses: function(seg) {\n\t\tvar eventDef = seg.footprint.eventDef;\n\n\t\treturn [].concat(\n\t\t\teventDef.className, // guaranteed to be an array\n\t\t\teventDef.source.className\n\t\t);\n\t},\n\n\n\t// Utility for generating event skin-related CSS properties\n\tgetSegSkinCss: function(seg) {\n\t\treturn {\n\t\t\t'background-color': this.getSegBackgroundColor(seg),\n\t\t\t'border-color': this.getSegBorderColor(seg),\n\t\t\tcolor: this.getSegTextColor(seg)\n\t\t};\n\t},\n\n\n\t// Queries for caller-specified color, then falls back to default\n\tgetSegBackgroundColor: function(seg) {\n\t\tvar eventDef = seg.footprint.eventDef;\n\n\t\treturn eventDef.backgroundColor ||\n\t\t\teventDef.color ||\n\t\t\tthis.getSegDefaultBackgroundColor(seg);\n\t},\n\n\n\tgetSegDefaultBackgroundColor: function(seg) {\n\t\tvar source = seg.footprint.eventDef.source;\n\n\t\treturn source.backgroundColor ||\n\t\t\tsource.color ||\n\t\t\tthis.opt('eventBackgroundColor') ||\n\t\t\tthis.opt('eventColor');\n\t},\n\n\n\t// Queries for caller-specified color, then falls back to default\n\tgetSegBorderColor: function(seg) {\n\t\tvar eventDef = seg.footprint.eventDef;\n\n\t\treturn eventDef.borderColor ||\n\t\t\teventDef.color ||\n\t\t\tthis.getSegDefaultBorderColor(seg);\n\t},\n\n\n\tgetSegDefaultBorderColor: function(seg) {\n\t\tvar source = seg.footprint.eventDef.source;\n\n\t\treturn source.borderColor ||\n\t\t\tsource.color ||\n\t\t\tthis.opt('eventBorderColor') ||\n\t\t\tthis.opt('eventColor');\n\t},\n\n\n\t// Queries for caller-specified color, then falls back to default\n\tgetSegTextColor: function(seg) {\n\t\tvar eventDef = seg.footprint.eventDef;\n\n\t\treturn eventDef.textColor ||\n\t\t\tthis.getSegDefaultTextColor(seg);\n\t},\n\n\n\tgetSegDefaultTextColor: function(seg) {\n\t\tvar source = seg.footprint.eventDef.source;\n\n\t\treturn source.textColor ||\n\t\t\tthis.opt('eventTextColor');\n\t},\n\n\n\tsortEventSegs: function(segs) {\n\t\tsegs.sort(proxy(this, 'compareEventSegs'));\n\t},\n\n\n\t// A cmp function for determining which segments should take visual priority\n\tcompareEventSegs: function(seg1, seg2) {\n\t\tvar f1 = seg1.footprint.componentFootprint;\n\t\tvar r1 = f1.unzonedRange;\n\t\tvar f2 = seg2.footprint.componentFootprint;\n\t\tvar r2 = f2.unzonedRange;\n\n\t\treturn r1.startMs - r2.startMs || // earlier events go first\n\t\t\t(r2.endMs - r2.startMs) - (r1.endMs - r1.startMs) || // tie? longer events go first\n\t\t\tf2.isAllDay - f1.isAllDay || // tie? put all-day events first (booleans cast to 0/1)\n\t\t\tcompareByFieldSpecs(\n\t\t\t\tseg1.footprint.eventDef,\n\t\t\t\tseg2.footprint.eventDef,\n\t\t\t\tthis.view.eventOrderSpecs\n\t\t\t);\n\t}\n\n});\n\n;;\n\n/*\nContains:\n- event clicking/mouseover/mouseout\n- things that are common to event dragging AND resizing\n- event helper rendering\n*/\nGrid.mixin({\n\n\t// self-config, overridable by subclasses\n\tsegSelector: '.fc-event-container > *', // what constitutes an event element?\n\n\tmousedOverSeg: null, // the segment object the user's mouse is over. null if over nothing\n\n\t// if defined, holds the unit identified (ex: \"year\" or \"month\") that determines the level of granularity\n\t// of the date areas. if not defined, assumes to be day and time granularity.\n\t// TODO: port isTimeScale into same system?\n\tlargeUnit: null,\n\n\n\t// Diffs the two dates, returning a duration, based on granularity of the grid\n\t// TODO: port isTimeScale into this system?\n\tdiffDates: function(a, b) {\n\t\tif (this.largeUnit) {\n\t\t\treturn diffByUnit(a, b, this.largeUnit);\n\t\t}\n\t\telse {\n\t\t\treturn diffDayTime(a, b);\n\t\t}\n\t},\n\n\n\t// Attaches event-element-related handlers for *all* rendered event segments of the view.\n\tbindSegHandlers: function() {\n\t\tthis.bindSegHandlersToEl(this.el);\n\t},\n\n\n\t// Attaches event-element-related handlers to an arbitrary container element. leverages bubbling.\n\tbindSegHandlersToEl: function(el) {\n\t\tthis.bindSegHandlerToEl(el, 'touchstart', this.handleSegTouchStart);\n\t\tthis.bindSegHandlerToEl(el, 'mouseenter', this.handleSegMouseover);\n\t\tthis.bindSegHandlerToEl(el, 'mouseleave', this.handleSegMouseout);\n\t\tthis.bindSegHandlerToEl(el, 'mousedown', this.handleSegMousedown);\n\t\tthis.bindSegHandlerToEl(el, 'click', this.handleSegClick);\n\t},\n\n\n\t// Executes a handler for any a user-interaction on a segment.\n\t// Handler gets called with (seg, ev), and with the `this` context of the Grid\n\tbindSegHandlerToEl: function(el, name, handler) {\n\t\tvar _this = this;\n\n\t\tel.on(name, this.segSelector, function(ev) {\n\t\t\tvar seg = $(this).data('fc-seg'); // grab segment data. put there by View::renderEventsPayload\n\n\t\t\t// only call the handlers if there is not a drag/resize in progress\n\t\t\tif (seg && !_this.isDraggingSeg && !_this.isResizingSeg) {\n\t\t\t\treturn handler.call(_this, seg, ev); // context will be the Grid\n\t\t\t}\n\t\t});\n\t},\n\n\n\thandleSegClick: function(seg, ev) {\n\t\tvar res = this.publiclyTrigger('eventClick', { // can return `false` to cancel\n\t\t\tcontext: seg.el[0],\n\t\t\targs: [ seg.footprint.getEventLegacy(), ev, this.view ]\n\t\t});\n\n\t\tif (res === false) {\n\t\t\tev.preventDefault();\n\t\t}\n\t},\n\n\n\t// Updates internal state and triggers handlers for when an event element is moused over\n\thandleSegMouseover: function(seg, ev) {\n\t\tif (\n\t\t\t!GlobalEmitter.get().shouldIgnoreMouse() &&\n\t\t\t!this.mousedOverSeg\n\t\t) {\n\t\t\tthis.mousedOverSeg = seg;\n\n\t\t\tif (this.view.isEventDefResizable(seg.footprint.eventDef)) {\n\t\t\t\tseg.el.addClass('fc-allow-mouse-resize');\n\t\t\t}\n\n\t\t\tthis.publiclyTrigger('eventMouseover', {\n\t\t\t\tcontext: seg.el[0],\n\t\t\t\targs: [ seg.footprint.getEventLegacy(), ev, this.view ]\n\t\t\t});\n\t\t}\n\t},\n\n\n\t// Updates internal state and triggers handlers for when an event element is moused out.\n\t// Can be given no arguments, in which case it will mouseout the segment that was previously moused over.\n\thandleSegMouseout: function(seg, ev) {\n\t\tev = ev || {}; // if given no args, make a mock mouse event\n\n\t\tif (this.mousedOverSeg) {\n\t\t\tseg = seg || this.mousedOverSeg; // if given no args, use the currently moused-over segment\n\t\t\tthis.mousedOverSeg = null;\n\n\t\t\tif (this.view.isEventDefResizable(seg.footprint.eventDef)) {\n\t\t\t\tseg.el.removeClass('fc-allow-mouse-resize');\n\t\t\t}\n\n\t\t\tthis.publiclyTrigger('eventMouseout', {\n\t\t\t\tcontext: seg.el[0],\n\t\t\t\targs: [ seg.footprint.getEventLegacy(), ev, this.view ]\n\t\t\t});\n\t\t}\n\t},\n\n\n\thandleSegMousedown: function(seg, ev) {\n\t\tvar isResizing = this.startSegResize(seg, ev, { distance: 5 });\n\n\t\tif (!isResizing && this.view.isEventDefDraggable(seg.footprint.eventDef)) {\n\t\t\tthis.buildSegDragListener(seg)\n\t\t\t\t.startInteraction(ev, {\n\t\t\t\t\tdistance: 5\n\t\t\t\t});\n\t\t}\n\t},\n\n\n\thandleSegTouchStart: function(seg, ev) {\n\t\tvar view = this.view;\n\t\tvar eventDef = seg.footprint.eventDef;\n\t\tvar isSelected = view.isEventDefSelected(eventDef);\n\t\tvar isDraggable = view.isEventDefDraggable(eventDef);\n\t\tvar isResizable = view.isEventDefResizable(eventDef);\n\t\tvar isResizing = false;\n\t\tvar dragListener;\n\t\tvar eventLongPressDelay;\n\n\t\tif (isSelected && isResizable) {\n\t\t\t// only allow resizing of the event is selected\n\t\t\tisResizing = this.startSegResize(seg, ev);\n\t\t}\n\n\t\tif (!isResizing && (isDraggable || isResizable)) { // allowed to be selected?\n\n\t\t\teventLongPressDelay = this.opt('eventLongPressDelay');\n\t\t\tif (eventLongPressDelay == null) {\n\t\t\t\teventLongPressDelay = this.opt('longPressDelay'); // fallback\n\t\t\t}\n\n\t\t\tdragListener = isDraggable ?\n\t\t\t\tthis.buildSegDragListener(seg) :\n\t\t\t\tthis.buildSegSelectListener(seg); // seg isn't draggable, but still needs to be selected\n\n\t\t\tdragListener.startInteraction(ev, { // won't start if already started\n\t\t\t\tdelay: isSelected ? 0 : eventLongPressDelay // do delay if not already selected\n\t\t\t});\n\t\t}\n\t},\n\n\n\t// seg isn't draggable, but let's use a generic DragListener\n\t// simply for the delay, so it can be selected.\n\t// Has side effect of setting/unsetting `segDragListener`\n\tbuildSegSelectListener: function(seg) {\n\t\tvar _this = this;\n\t\tvar view = this.view;\n\t\tvar eventDef = seg.footprint.eventDef;\n\t\tvar eventInstance = seg.footprint.eventInstance; // null for inverse-background events\n\n\t\tif (this.segDragListener) {\n\t\t\treturn this.segDragListener;\n\t\t}\n\n\t\tvar dragListener = this.segDragListener = new DragListener({\n\t\t\tdragStart: function(ev) {\n\t\t\t\tif (\n\t\t\t\t\tdragListener.isTouch &&\n\t\t\t\t\t!view.isEventDefSelected(eventDef) &&\n\t\t\t\t\teventInstance\n\t\t\t\t) {\n\t\t\t\t\t// if not previously selected, will fire after a delay. then, select the event\n\t\t\t\t\tview.selectEventInstance(eventInstance);\n\t\t\t\t}\n\t\t\t},\n\t\t\tinteractionEnd: function(ev) {\n\t\t\t\t_this.segDragListener = null;\n\t\t\t}\n\t\t});\n\n\t\treturn dragListener;\n\t},\n\n\n\t// is it allowed, in relation to the view's validRange?\n\t// NOTE: very similar to isExternalInstanceGroupAllowed\n\tisEventInstanceGroupAllowed: function(eventInstanceGroup) {\n\t\tvar eventFootprints = this.eventRangesToEventFootprints(eventInstanceGroup.getAllEventRanges());\n\t\tvar i;\n\n\t\tfor (i = 0; i < eventFootprints.length; i++) {\n\t\t\t// TODO: just use getAllEventRanges directly\n\t\t\tif (!this.view.validUnzonedRange.containsRange(eventFootprints[i].componentFootprint.unzonedRange)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn this.view.calendar.isEventInstanceGroupAllowed(eventInstanceGroup);\n\t},\n\n\n\t/* Event Helper\n\t------------------------------------------------------------------------------------------------------------------*/\n\t// TODO: should probably move this to Grid.events, like we did event dragging / resizing\n\n\n\trenderHelperEventFootprints: function(eventFootprints, sourceSeg) {\n\t\treturn this.renderHelperEventFootprintEls(eventFootprints, sourceSeg)\n\t\t\t.addClass('fc-helper');\n\t},\n\n\n\trenderHelperEventFootprintEls: function(eventFootprints, sourceSeg) {\n\t\t// Subclasses must implement.\n\t\t// Must return all mock event elements.\n\t},\n\n\n\t// Unrenders a mock event\n\t// TODO: have this in ChronoComponent\n\tunrenderHelper: function() {\n\t\t// subclasses must implement\n\t},\n\n\n\tfabricateEventFootprint: function(componentFootprint) {\n\t\tvar calendar = this.view.calendar;\n\t\tvar eventDateProfile = calendar.footprintToDateProfile(componentFootprint);\n\t\tvar dummyEvent = new SingleEventDef(new EventSource(calendar));\n\t\tvar dummyInstance;\n\n\t\tdummyEvent.dateProfile = eventDateProfile;\n\t\tdummyInstance = dummyEvent.buildInstance();\n\n\t\treturn new EventFootprint(componentFootprint, dummyEvent, dummyInstance);\n\t}\n\n});\n\n;;\n\n/*\nWired up via Grid.event-interation.js by calling\nbuildSegDragListener\n*/\nGrid.mixin({\n\n\tisDraggingSeg: false, // is a segment being dragged? boolean\n\n\n\t// Builds a listener that will track user-dragging on an event segment.\n\t// Generic enough to work with any type of Grid.\n\t// Has side effect of setting/unsetting `segDragListener`\n\tbuildSegDragListener: function(seg) {\n\t\tvar _this = this;\n\t\tvar view = this.view;\n\t\tvar calendar = view.calendar;\n\t\tvar eventManager = calendar.eventManager;\n\t\tvar el = seg.el;\n\t\tvar eventDef = seg.footprint.eventDef;\n\t\tvar eventInstance = seg.footprint.eventInstance; // null for inverse-background events\n\t\tvar isDragging;\n\t\tvar mouseFollower; // A clone of the original element that will move with the mouse\n\t\tvar eventDefMutation;\n\n\t\tif (this.segDragListener) {\n\t\t\treturn this.segDragListener;\n\t\t}\n\n\t\t// Tracks mouse movement over the *view's* coordinate map. Allows dragging and dropping between subcomponents\n\t\t// of the view.\n\t\tvar dragListener = this.segDragListener = new HitDragListener(view, {\n\t\t\tscroll: this.opt('dragScroll'),\n\t\t\tsubjectEl: el,\n\t\t\tsubjectCenter: true,\n\t\t\tinteractionStart: function(ev) {\n\t\t\t\tseg.component = _this; // for renderDrag\n\t\t\t\tisDragging = false;\n\t\t\t\tmouseFollower = new MouseFollower(seg.el, {\n\t\t\t\t\tadditionalClass: 'fc-dragging',\n\t\t\t\t\tparentEl: view.el,\n\t\t\t\t\topacity: dragListener.isTouch ? null : _this.opt('dragOpacity'),\n\t\t\t\t\trevertDuration: _this.opt('dragRevertDuration'),\n\t\t\t\t\tzIndex: 2 // one above the .fc-view\n\t\t\t\t});\n\t\t\t\tmouseFollower.hide(); // don't show until we know this is a real drag\n\t\t\t\tmouseFollower.start(ev);\n\t\t\t},\n\t\t\tdragStart: function(ev) {\n\t\t\t\tif (\n\t\t\t\t\tdragListener.isTouch &&\n\t\t\t\t\t!view.isEventDefSelected(eventDef) &&\n\t\t\t\t\teventInstance\n\t\t\t\t) {\n\t\t\t\t\t// if not previously selected, will fire after a delay. then, select the event\n\t\t\t\t\tview.selectEventInstance(eventInstance);\n\t\t\t\t}\n\t\t\t\tisDragging = true;\n\t\t\t\t_this.handleSegMouseout(seg, ev); // ensure a mouseout on the manipulated event has been reported\n\t\t\t\t_this.segDragStart(seg, ev);\n\t\t\t\tview.hideEventsWithId(eventDef.id); // hide all event segments. our mouseFollower will take over\n\t\t\t},\n\t\t\thitOver: function(hit, isOrig, origHit) {\n\t\t\t\tvar isAllowed = true;\n\t\t\t\tvar origFootprint;\n\t\t\t\tvar footprint;\n\t\t\t\tvar mutatedEventInstanceGroup;\n\t\t\t\tvar dragHelperEls;\n\n\t\t\t\t// starting hit could be forced (DayGrid.limit)\n\t\t\t\tif (seg.hit) {\n\t\t\t\t\torigHit = seg.hit;\n\t\t\t\t}\n\n\t\t\t\t// hit might not belong to this grid, so query origin grid\n\t\t\t\torigFootprint = origHit.component.getSafeHitFootprint(origHit);\n\t\t\t\tfootprint = hit.component.getSafeHitFootprint(hit);\n\n\t\t\t\tif (origFootprint && footprint) {\n\t\t\t\t\teventDefMutation = _this.computeEventDropMutation(origFootprint, footprint, eventDef);\n\n\t\t\t\t\tif (eventDefMutation) {\n\t\t\t\t\t\tmutatedEventInstanceGroup = eventManager.buildMutatedEventInstanceGroup(\n\t\t\t\t\t\t\teventDef.id,\n\t\t\t\t\t\t\teventDefMutation\n\t\t\t\t\t\t);\n\t\t\t\t\t\tisAllowed = _this.isEventInstanceGroupAllowed(mutatedEventInstanceGroup);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tisAllowed = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tisAllowed = false;\n\t\t\t\t}\n\n\t\t\t\tif (!isAllowed) {\n\t\t\t\t\teventDefMutation = null;\n\t\t\t\t\tdisableCursor();\n\t\t\t\t}\n\n\t\t\t\t// if a valid drop location, have the subclass render a visual indication\n\t\t\t\tif (\n\t\t\t\t\teventDefMutation &&\n\t\t\t\t\t(dragHelperEls = view.renderDrag(\n\t\t\t\t\t\t_this.eventRangesToEventFootprints(\n\t\t\t\t\t\t\tmutatedEventInstanceGroup.sliceRenderRanges(_this.unzonedRange, calendar)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tseg\n\t\t\t\t\t))\n\t\t\t\t) {\n\t\t\t\t\tdragHelperEls.addClass('fc-dragging');\n\t\t\t\t\tif (!dragListener.isTouch) {\n\t\t\t\t\t\t_this.applyDragOpacity(dragHelperEls);\n\t\t\t\t\t}\n\n\t\t\t\t\tmouseFollower.hide(); // if the subclass is already using a mock event \"helper\", hide our own\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmouseFollower.show(); // otherwise, have the helper follow the mouse (no snapping)\n\t\t\t\t}\n\n\t\t\t\tif (isOrig) {\n\t\t\t\t\t// needs to have moved hits to be a valid drop\n\t\t\t\t\teventDefMutation = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\thitOut: function() { // called before mouse moves to a different hit OR moved out of all hits\n\t\t\t\tview.unrenderDrag(); // unrender whatever was done in renderDrag\n\t\t\t\tmouseFollower.show(); // show in case we are moving out of all hits\n\t\t\t\teventDefMutation = null;\n\t\t\t},\n\t\t\thitDone: function() { // Called after a hitOut OR before a dragEnd\n\t\t\t\tenableCursor();\n\t\t\t},\n\t\t\tinteractionEnd: function(ev) {\n\t\t\t\tdelete seg.component; // prevent side effects\n\n\t\t\t\t// do revert animation if hasn't changed. calls a callback when finished (whether animation or not)\n\t\t\t\tmouseFollower.stop(!eventDefMutation, function() {\n\t\t\t\t\tif (isDragging) {\n\t\t\t\t\t\tview.unrenderDrag();\n\t\t\t\t\t\t_this.segDragStop(seg, ev);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (eventDefMutation) {\n\t\t\t\t\t\t// no need to re-show original, will rerender all anyways. esp important if eventRenderWait\n\t\t\t\t\t\tview.reportEventDrop(eventInstance, eventDefMutation, el, ev);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tview.showEventsWithId(eventDef.id);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t_this.segDragListener = null;\n\t\t\t}\n\t\t});\n\n\t\treturn dragListener;\n\t},\n\n\n\t// Called before event segment dragging starts\n\tsegDragStart: function(seg, ev) {\n\t\tthis.isDraggingSeg = true;\n\t\tthis.publiclyTrigger('eventDragStart', {\n\t\t\tcontext: seg.el[0],\n\t\t\targs: [\n\t\t\t\tseg.footprint.getEventLegacy(),\n\t\t\t\tev,\n\t\t\t\t{}, // jqui dummy\n\t\t\t\tthis.view\n\t\t\t]\n\t\t});\n\t},\n\n\n\t// Called after event segment dragging stops\n\tsegDragStop: function(seg, ev) {\n\t\tthis.isDraggingSeg = false;\n\t\tthis.publiclyTrigger('eventDragStop', {\n\t\t\tcontext: seg.el[0],\n\t\t\targs: [\n\t\t\t\tseg.footprint.getEventLegacy(),\n\t\t\t\tev,\n\t\t\t\t{}, // jqui dummy\n\t\t\t\tthis.view\n\t\t\t]\n\t\t});\n\t},\n\n\n\t// DOES NOT consider overlap/constraint\n\tcomputeEventDropMutation: function(startFootprint, endFootprint, eventDef) {\n\t\tvar date0 = startFootprint.unzonedRange.getStart();\n\t\tvar date1 = endFootprint.unzonedRange.getStart();\n\t\tvar clearEnd = false;\n\t\tvar forceTimed = false;\n\t\tvar forceAllDay = false;\n\t\tvar dateDelta;\n\t\tvar dateMutation;\n\t\tvar eventDefMutation;\n\n\t\tif (startFootprint.isAllDay !== endFootprint.isAllDay) {\n\t\t\tclearEnd = true;\n\n\t\t\tif (endFootprint.isAllDay) {\n\t\t\t\tforceAllDay = true;\n\t\t\t\tdate0.stripTime();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tforceTimed = true;\n\t\t\t}\n\t\t}\n\n\t\tdateDelta = this.diffDates(date1, date0);\n\n\t\tdateMutation = new EventDefDateMutation();\n\t\tdateMutation.clearEnd = clearEnd;\n\t\tdateMutation.forceTimed = forceTimed;\n\t\tdateMutation.forceAllDay = forceAllDay;\n\t\tdateMutation.setDateDelta(dateDelta);\n\n\t\teventDefMutation = new EventDefMutation();\n\t\teventDefMutation.setDateMutation(dateMutation);\n\n\t\treturn eventDefMutation;\n\t},\n\n\n\t// Utility for apply dragOpacity to a jQuery set\n\tapplyDragOpacity: function(els) {\n\t\tvar opacity = this.opt('dragOpacity');\n\n\t\tif (opacity != null) {\n\t\t\tels.css('opacity', opacity);\n\t\t}\n\t}\n\n});\n\n;;\n\n/*\nWired up via Grid.event-interation.js by calling\nstartSegResize\n*/\nGrid.mixin({\n\n\tisResizingSeg: false, // is a segment being resized? boolean\n\n\n\t// returns boolean whether resizing actually started or not.\n\t// assumes the seg allows resizing.\n\t// `dragOptions` are optional.\n\tstartSegResize: function(seg, ev, dragOptions) {\n\t\tif ($(ev.target).is('.fc-resizer')) {\n\t\t\tthis.buildSegResizeListener(seg, $(ev.target).is('.fc-start-resizer'))\n\t\t\t\t.startInteraction(ev, dragOptions);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},\n\n\n\t// Creates a listener that tracks the user as they resize an event segment.\n\t// Generic enough to work with any type of Grid.\n\tbuildSegResizeListener: function(seg, isStart) {\n\t\tvar _this = this;\n\t\tvar view = this.view;\n\t\tvar calendar = view.calendar;\n\t\tvar eventManager = calendar.eventManager;\n\t\tvar el = seg.el;\n\t\tvar eventDef = seg.footprint.eventDef;\n\t\tvar eventInstance = seg.footprint.eventInstance;\n\t\tvar isDragging;\n\t\tvar resizeMutation; // zoned event date properties. falsy if invalid resize\n\n\t\t// Tracks mouse movement over the *grid's* coordinate map\n\t\tvar dragListener = this.segResizeListener = new HitDragListener(this, {\n\t\t\tscroll: this.opt('dragScroll'),\n\t\t\tsubjectEl: el,\n\t\t\tinteractionStart: function() {\n\t\t\t\tisDragging = false;\n\t\t\t},\n\t\t\tdragStart: function(ev) {\n\t\t\t\tisDragging = true;\n\t\t\t\t_this.handleSegMouseout(seg, ev); // ensure a mouseout on the manipulated event has been reported\n\t\t\t\t_this.segResizeStart(seg, ev);\n\t\t\t},\n\t\t\thitOver: function(hit, isOrig, origHit) {\n\t\t\t\tvar isAllowed = true;\n\t\t\t\tvar origHitFootprint = _this.getSafeHitFootprint(origHit);\n\t\t\t\tvar hitFootprint = _this.getSafeHitFootprint(hit);\n\t\t\t\tvar mutatedEventInstanceGroup;\n\n\t\t\t\tif (origHitFootprint && hitFootprint) {\n\t\t\t\t\tresizeMutation = isStart ?\n\t\t\t\t\t\t_this.computeEventStartResizeMutation(origHitFootprint, hitFootprint, seg.footprint) :\n\t\t\t\t\t\t_this.computeEventEndResizeMutation(origHitFootprint, hitFootprint, seg.footprint);\n\n\t\t\t\t\tif (resizeMutation) {\n\t\t\t\t\t\tmutatedEventInstanceGroup = eventManager.buildMutatedEventInstanceGroup(\n\t\t\t\t\t\t\teventDef.id,\n\t\t\t\t\t\t\tresizeMutation\n\t\t\t\t\t\t);\n\t\t\t\t\t\tisAllowed = _this.isEventInstanceGroupAllowed(mutatedEventInstanceGroup);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tisAllowed = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tisAllowed = false;\n\t\t\t\t}\n\n\t\t\t\tif (!isAllowed) {\n\t\t\t\t\tresizeMutation = null;\n\t\t\t\t\tdisableCursor();\n\t\t\t\t}\n\t\t\t\telse if (resizeMutation.isEmpty()) {\n\t\t\t\t\t// no change. (FYI, event dates might have zones)\n\t\t\t\t\tresizeMutation = null;\n\t\t\t\t}\n\n\t\t\t\tif (resizeMutation) {\n\t\t\t\t\tview.hideEventsWithId(eventDef.id);\n\n\t\t\t\t\t_this.renderEventResize(\n\t\t\t\t\t\t_this.eventRangesToEventFootprints(\n\t\t\t\t\t\t\tmutatedEventInstanceGroup.sliceRenderRanges(_this.unzonedRange, calendar)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tseg\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t\thitOut: function() { // called before mouse moves to a different hit OR moved out of all hits\n\t\t\t\tresizeMutation = null;\n\t\t\t\tview.showEventsWithId(eventDef.id); // for when out-of-bounds. show original\n\t\t\t},\n\t\t\thitDone: function() { // resets the rendering to show the original event\n\t\t\t\t_this.unrenderEventResize();\n\t\t\t\tenableCursor();\n\t\t\t},\n\t\t\tinteractionEnd: function(ev) {\n\t\t\t\tif (isDragging) {\n\t\t\t\t\t_this.segResizeStop(seg, ev);\n\t\t\t\t}\n\n\t\t\t\tif (resizeMutation) { // valid date to resize to?\n\t\t\t\t\t// no need to re-show original, will rerender all anyways. esp important if eventRenderWait\n\t\t\t\t\tview.reportEventResize(eventInstance, resizeMutation, el, ev);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tview.showEventsWithId(eventDef.id);\n\t\t\t\t}\n\t\t\t\t_this.segResizeListener = null;\n\t\t\t}\n\t\t});\n\n\t\treturn dragListener;\n\t},\n\n\n\t// Called before event segment resizing starts\n\tsegResizeStart: function(seg, ev) {\n\t\tthis.isResizingSeg = true;\n\t\tthis.publiclyTrigger('eventResizeStart', {\n\t\t\tcontext: seg.el[0],\n\t\t\targs: [\n\t\t\t\tseg.footprint.getEventLegacy(),\n\t\t\t\tev,\n\t\t\t\t{}, // jqui dummy\n\t\t\t\tthis.view\n\t\t\t]\n\t\t});\n\t},\n\n\n\t// Called after event segment resizing stops\n\tsegResizeStop: function(seg, ev) {\n\t\tthis.isResizingSeg = false;\n\t\tthis.publiclyTrigger('eventResizeStop', {\n\t\t\tcontext: seg.el[0],\n\t\t\targs: [\n\t\t\t\tseg.footprint.getEventLegacy(),\n\t\t\t\tev,\n\t\t\t\t{}, // jqui dummy\n\t\t\t\tthis.view\n\t\t\t]\n\t\t});\n\t},\n\n\n\t// Returns new date-information for an event segment being resized from its start\n\tcomputeEventStartResizeMutation: function(startFootprint, endFootprint, origEventFootprint) {\n\t\tvar origRange = origEventFootprint.componentFootprint.unzonedRange;\n\t\tvar startDelta = this.diffDates(\n\t\t\tendFootprint.unzonedRange.getStart(),\n\t\t\tstartFootprint.unzonedRange.getStart()\n\t\t);\n\t\tvar dateMutation;\n\t\tvar eventDefMutation;\n\n\t\tif (origRange.getStart().add(startDelta) < origRange.getEnd()) {\n\n\t\t\tdateMutation = new EventDefDateMutation();\n\t\t\tdateMutation.setStartDelta(startDelta);\n\n\t\t\teventDefMutation = new EventDefMutation();\n\t\t\teventDefMutation.setDateMutation(dateMutation);\n\n\t\t\treturn eventDefMutation;\n\t\t}\n\n\t\treturn false;\n\t},\n\n\n\t// Returns new date-information for an event segment being resized from its end\n\tcomputeEventEndResizeMutation: function(startFootprint, endFootprint, origEventFootprint) {\n\t\tvar origRange = origEventFootprint.componentFootprint.unzonedRange;\n\t\tvar endDelta = this.diffDates(\n\t\t\tendFootprint.unzonedRange.getEnd(),\n\t\t\tstartFootprint.unzonedRange.getEnd()\n\t\t);\n\t\tvar dateMutation;\n\t\tvar eventDefMutation;\n\n\t\tif (origRange.getEnd().add(endDelta) > origRange.getStart()) {\n\n\t\t\tdateMutation = new EventDefDateMutation();\n\t\t\tdateMutation.setEndDelta(endDelta);\n\n\t\t\teventDefMutation = new EventDefMutation();\n\t\t\teventDefMutation.setDateMutation(dateMutation);\n\n\t\t\treturn eventDefMutation;\n\t\t}\n\n\t\treturn false;\n\t},\n\n\n\t// Renders a visual indication of an event being resized.\n\t// Must return elements used for any mock events.\n\trenderEventResize: function(eventFootprints, seg) {\n\t\t// subclasses must implement\n\t},\n\n\n\t// Unrenders a visual indication of an event being resized.\n\tunrenderEventResize: function() {\n\t\t// subclasses must implement\n\t}\n\n});\n\n;;\n\n/*\nWired up via Grid.js by calling\nexternalDragStart\n*/\nGrid.mixin({\n\n\tisDraggingExternal: false, // jqui-dragging an external element? boolean\n\n\n\t// Called when a jQuery UI drag is initiated anywhere in the DOM\n\texternalDragStart: function(ev, ui) {\n\t\tvar el;\n\t\tvar accept;\n\n\t\tif (this.opt('droppable')) { // only listen if this setting is on\n\t\t\tel = $((ui ? ui.item : null) || ev.target);\n\n\t\t\t// Test that the dragged element passes the dropAccept selector or filter function.\n\t\t\t// FYI, the default is \"*\" (matches all)\n\t\t\taccept = this.opt('dropAccept');\n\t\t\tif ($.isFunction(accept) ? accept.call(el[0], el) : el.is(accept)) {\n\t\t\t\tif (!this.isDraggingExternal) { // prevent double-listening if fired twice\n\t\t\t\t\tthis.listenToExternalDrag(el, ev, ui);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Called when a jQuery UI drag starts and it needs to be monitored for dropping\n\tlistenToExternalDrag: function(el, ev, ui) {\n\t\tvar _this = this;\n\t\tvar view = this.view;\n\t\tvar meta = getDraggedElMeta(el); // extra data about event drop, including possible event to create\n\t\tvar singleEventDef; // a null value signals an unsuccessful drag\n\n\t\t// listener that tracks mouse movement over date-associated pixel regions\n\t\tvar dragListener = _this.externalDragListener = new HitDragListener(this, {\n\t\t\tinteractionStart: function() {\n\t\t\t\t_this.isDraggingExternal = true;\n\t\t\t},\n\t\t\thitOver: function(hit) {\n\t\t\t\tvar isAllowed = true;\n\t\t\t\tvar hitFootprint = hit.component.getSafeHitFootprint(hit); // hit might not belong to this grid\n\t\t\t\tvar mutatedEventInstanceGroup;\n\n\t\t\t\tif (hitFootprint) {\n\t\t\t\t\tsingleEventDef = _this.computeExternalDrop(hitFootprint, meta);\n\n\t\t\t\t\tif (singleEventDef) {\n\t\t\t\t\t\tmutatedEventInstanceGroup = new EventInstanceGroup(\n\t\t\t\t\t\t\tsingleEventDef.buildInstances()\n\t\t\t\t\t\t);\n\t\t\t\t\t\tisAllowed = meta.eventProps ? // isEvent?\n\t\t\t\t\t\t\t_this.isEventInstanceGroupAllowed(mutatedEventInstanceGroup) :\n\t\t\t\t\t\t\t_this.isExternalInstanceGroupAllowed(mutatedEventInstanceGroup);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tisAllowed = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tisAllowed = false;\n\t\t\t\t}\n\n\t\t\t\tif (!isAllowed) {\n\t\t\t\t\tsingleEventDef = null;\n\t\t\t\t\tdisableCursor();\n\t\t\t\t}\n\n\t\t\t\tif (singleEventDef) {\n\t\t\t\t\t_this.renderDrag( // called without a seg parameter\n\t\t\t\t\t\t_this.eventRangesToEventFootprints(\n\t\t\t\t\t\t\tmutatedEventInstanceGroup.sliceRenderRanges(_this.unzonedRange, view.calendar)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t\thitOut: function() {\n\t\t\t\tsingleEventDef = null; // signal unsuccessful\n\t\t\t},\n\t\t\thitDone: function() { // Called after a hitOut OR before a dragEnd\n\t\t\t\tenableCursor();\n\t\t\t\t_this.unrenderDrag();\n\t\t\t},\n\t\t\tinteractionEnd: function(ev) {\n\n\t\t\t\tif (singleEventDef) { // element was dropped on a valid hit\n\t\t\t\t\tview.reportExternalDrop(\n\t\t\t\t\t\tsingleEventDef,\n\t\t\t\t\t\tBoolean(meta.eventProps), // isEvent\n\t\t\t\t\t\tBoolean(meta.stick), // isSticky\n\t\t\t\t\t\tel, ev, ui\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t_this.isDraggingExternal = false;\n\t\t\t\t_this.externalDragListener = null;\n\t\t\t}\n\t\t});\n\n\t\tdragListener.startDrag(ev); // start listening immediately\n\t},\n\n\n\t// Given a hit to be dropped upon, and misc data associated with the jqui drag (guaranteed to be a plain object),\n\t// returns the zoned start/end dates for the event that would result from the hypothetical drop. end might be null.\n\t// Returning a null value signals an invalid drop hit.\n\t// DOES NOT consider overlap/constraint.\n\t// Assumes both footprints are non-open-ended.\n\tcomputeExternalDrop: function(componentFootprint, meta) {\n\t\tvar calendar = this.view.calendar;\n\t\tvar start = FC.moment.utc(componentFootprint.unzonedRange.startMs).stripZone();\n\t\tvar end;\n\t\tvar eventDef;\n\n\t\tif (componentFootprint.isAllDay) {\n\t\t\t// if dropped on an all-day span, and element's metadata specified a time, set it\n\t\t\tif (meta.startTime) {\n\t\t\t\tstart.time(meta.startTime);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tstart.stripTime();\n\t\t\t}\n\t\t}\n\n\t\tif (meta.duration) {\n\t\t\tend = start.clone().add(meta.duration);\n\t\t}\n\n\t\tstart = calendar.applyTimezone(start);\n\n\t\tif (end) {\n\t\t\tend = calendar.applyTimezone(end);\n\t\t}\n\n\t\teventDef = SingleEventDef.parse(\n\t\t\t$.extend({}, meta.eventProps, {\n\t\t\t\tstart: start,\n\t\t\t\tend: end\n\t\t\t}),\n\t\t\tnew EventSource(calendar)\n\t\t);\n\n\t\treturn eventDef;\n\t},\n\n\n\t// NOTE: very similar to isEventInstanceGroupAllowed\n\t// when it's a completely anonymous external drag, no event.\n\tisExternalInstanceGroupAllowed: function(eventInstanceGroup) {\n\t\tvar calendar = this.view.calendar;\n\t\tvar eventFootprints = this.eventRangesToEventFootprints(eventInstanceGroup.getAllEventRanges());\n\t\tvar i;\n\n\t\tfor (i = 0; i < eventFootprints.length; i++) {\n\t\t\tif (!this.view.validUnzonedRange.containsRange(eventFootprints[i].componentFootprint.unzonedRange)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0; i < eventFootprints.length; i++) {\n\t\t\t// treat it as a selection\n\t\t\t// TODO: pass in eventInstanceGroup instead\n\t\t\t// because we don't want calendar's constraint system to depend on a component's\n\t\t\t// determination of footprints.\n\t\t\tif (!calendar.isSelectionFootprintAllowed(eventFootprints[i].componentFootprint)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n});\n\n\n/* External-Dragging-Element Data\n----------------------------------------------------------------------------------------------------------------------*/\n\n// Require all HTML5 data-* attributes used by FullCalendar to have this prefix.\n// A value of '' will query attributes like data-event. A value of 'fc' will query attributes like data-fc-event.\nFC.dataAttrPrefix = '';\n\n// Given a jQuery element that might represent a dragged FullCalendar event, returns an intermediate data structure\n// to be used for Event Object creation.\n// A defined `.eventProps`, even when empty, indicates that an event should be created.\nfunction getDraggedElMeta(el) {\n\tvar prefix = FC.dataAttrPrefix;\n\tvar eventProps; // properties for creating the event, not related to date/time\n\tvar startTime; // a Duration\n\tvar duration;\n\tvar stick;\n\n\tif (prefix) { prefix += '-'; }\n\teventProps = el.data(prefix + 'event') || null;\n\n\tif (eventProps) {\n\t\tif (typeof eventProps === 'object') {\n\t\t\teventProps = $.extend({}, eventProps); // make a copy\n\t\t}\n\t\telse { // something like 1 or true. still signal event creation\n\t\t\teventProps = {};\n\t\t}\n\n\t\t// pluck special-cased date/time properties\n\t\tstartTime = eventProps.start;\n\t\tif (startTime == null) { startTime = eventProps.time; } // accept 'time' as well\n\t\tduration = eventProps.duration;\n\t\tstick = eventProps.stick;\n\t\tdelete eventProps.start;\n\t\tdelete eventProps.time;\n\t\tdelete eventProps.duration;\n\t\tdelete eventProps.stick;\n\t}\n\n\t// fallback to standalone attribute values for each of the date/time properties\n\tif (startTime == null) { startTime = el.data(prefix + 'start'); }\n\tif (startTime == null) { startTime = el.data(prefix + 'time'); } // accept 'time' as well\n\tif (duration == null) { duration = el.data(prefix + 'duration'); }\n\tif (stick == null) { stick = el.data(prefix + 'stick'); }\n\n\t// massage into correct data types\n\tstartTime = startTime != null ? moment.duration(startTime) : null;\n\tduration = duration != null ? moment.duration(duration) : null;\n\tstick = Boolean(stick);\n\n\treturn { eventProps: eventProps, startTime: startTime, duration: duration, stick: stick };\n}\n\n;;\n\nGrid.mixin({\n\n\t/* Fill System (highlight, background events, business hours)\n\t--------------------------------------------------------------------------------------------------------------------\n\tTODO: remove this system. like we did in TimeGrid\n\t*/\n\n\n\telsByFill: null, // a hash of jQuery element sets used for rendering each fill. Keyed by fill name.\n\n\n\tinitFillInternals: function() {\n\t\tthis.elsByFill = {};\n\t},\n\n\n\t// Renders a set of rectangles over the given segments of time.\n\t// MUST RETURN a subset of segs, the segs that were actually rendered.\n\t// Responsible for populating this.elsByFill. TODO: better API for expressing this requirement\n\trenderFill: function(type, segs) {\n\t\t// subclasses must implement\n\t},\n\n\n\t// Unrenders a specific type of fill that is currently rendered on the grid\n\tunrenderFill: function(type) {\n\t\tvar el = this.elsByFill[type];\n\n\t\tif (el) {\n\t\t\tel.remove();\n\t\t\tdelete this.elsByFill[type];\n\t\t}\n\t},\n\n\n\t// Renders and assigns an `el` property for each fill segment. Generic enough to work with different types.\n\t// Only returns segments that successfully rendered.\n\t// To be harnessed by renderFill (implemented by subclasses).\n\t// Analagous to renderFgSegEls.\n\trenderFillSegEls: function(type, segs) {\n\t\tvar _this = this;\n\t\tvar segElMethod = this[type + 'SegEl'];\n\t\tvar html = '';\n\t\tvar renderedSegs = [];\n\t\tvar i;\n\n\t\tif (segs.length) {\n\n\t\t\t// build a large concatenation of segment HTML\n\t\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\t\thtml += this.fillSegHtml(type, segs[i]);\n\t\t\t}\n\n\t\t\t// Grab individual elements from the combined HTML string. Use each as the default rendering.\n\t\t\t// Then, compute the 'el' for each segment.\n\t\t\t$(html).each(function(i, node) {\n\t\t\t\tvar seg = segs[i];\n\t\t\t\tvar el = $(node);\n\n\t\t\t\t// allow custom filter methods per-type\n\t\t\t\tif (segElMethod) {\n\t\t\t\t\tel = segElMethod.call(_this, seg, el);\n\t\t\t\t}\n\n\t\t\t\tif (el) { // custom filters did not cancel the render\n\t\t\t\t\tel = $(el); // allow custom filter to return raw DOM node\n\n\t\t\t\t\t// correct element type? (would be bad if a non-TD were inserted into a table for example)\n\t\t\t\t\tif (el.is(_this.fillSegTag)) {\n\t\t\t\t\t\tseg.el = el;\n\t\t\t\t\t\trenderedSegs.push(seg);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn renderedSegs;\n\t},\n\n\n\tfillSegTag: 'div', // subclasses can override\n\n\n\t// Builds the HTML needed for one fill segment. Generic enough to work with different types.\n\tfillSegHtml: function(type, seg) {\n\n\t\t// custom hooks per-type\n\t\tvar classesMethod = this[type + 'SegClasses'];\n\t\tvar cssMethod = this[type + 'SegCss'];\n\n\t\tvar classes = classesMethod ? classesMethod.call(this, seg) : [];\n\t\tvar css = cssToStr(cssMethod ? cssMethod.call(this, seg) : {});\n\n\t\treturn '<' + this.fillSegTag +\n\t\t\t(classes.length ? ' class=\"' + classes.join(' ') + '\"' : '') +\n\t\t\t(css ? ' style=\"' + css + '\"' : '') +\n\t\t\t' />';\n\t},\n\n\n\t// Generates an array of classNames for rendering the highlight. Used by the fill system.\n\thighlightSegClasses: function() {\n\t\treturn [ 'fc-highlight' ];\n\t}\n\n});\n\n;;\n\n/*\nA set of rendering and date-related methods for a visual component comprised of one or more rows of day columns.\nPrerequisite: the object being mixed into needs to be a *Grid*\n*/\nvar DayTableMixin = FC.DayTableMixin = {\n\n\tbreakOnWeeks: false, // should create a new row for each week?\n\tdayDates: null, // whole-day dates for each column. left to right\n\tdayIndices: null, // for each day from start, the offset\n\tdaysPerRow: null,\n\trowCnt: null,\n\tcolCnt: null,\n\tcolHeadFormat: null,\n\n\n\t// Populates internal variables used for date calculation and rendering\n\tupdateDayTable: function() {\n\t\tvar view = this.view;\n\t\tvar calendar = view.calendar;\n\t\tvar date = calendar.msToUtcMoment(this.unzonedRange.startMs, true);\n\t\tvar end = calendar.msToUtcMoment(this.unzonedRange.endMs, true);\n\t\tvar dayIndex = -1;\n\t\tvar dayIndices = [];\n\t\tvar dayDates = [];\n\t\tvar daysPerRow;\n\t\tvar firstDay;\n\t\tvar rowCnt;\n\n\t\twhile (date.isBefore(end)) { // loop each day from start to end\n\t\t\tif (view.isHiddenDay(date)) {\n\t\t\t\tdayIndices.push(dayIndex + 0.5); // mark that it's between indices\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdayIndex++;\n\t\t\t\tdayIndices.push(dayIndex);\n\t\t\t\tdayDates.push(date.clone());\n\t\t\t}\n\t\t\tdate.add(1, 'days');\n\t\t}\n\n\t\tif (this.breakOnWeeks) {\n\t\t\t// count columns until the day-of-week repeats\n\t\t\tfirstDay = dayDates[0].day();\n\t\t\tfor (daysPerRow = 1; daysPerRow < dayDates.length; daysPerRow++) {\n\t\t\t\tif (dayDates[daysPerRow].day() == firstDay) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\trowCnt = Math.ceil(dayDates.length / daysPerRow);\n\t\t}\n\t\telse {\n\t\t\trowCnt = 1;\n\t\t\tdaysPerRow = dayDates.length;\n\t\t}\n\n\t\tthis.dayDates = dayDates;\n\t\tthis.dayIndices = dayIndices;\n\t\tthis.daysPerRow = daysPerRow;\n\t\tthis.rowCnt = rowCnt;\n\n\t\tthis.updateDayTableCols();\n\t},\n\n\n\t// Computes and assigned the colCnt property and updates any options that may be computed from it\n\tupdateDayTableCols: function() {\n\t\tthis.colCnt = this.computeColCnt();\n\t\tthis.colHeadFormat = this.opt('columnFormat') || this.computeColHeadFormat();\n\t},\n\n\n\t// Determines how many columns there should be in the table\n\tcomputeColCnt: function() {\n\t\treturn this.daysPerRow;\n\t},\n\n\n\t// Computes the ambiguously-timed moment for the given cell\n\tgetCellDate: function(row, col) {\n\t\treturn this.dayDates[\n\t\t\t\tthis.getCellDayIndex(row, col)\n\t\t\t].clone();\n\t},\n\n\n\t// Computes the ambiguously-timed date range for the given cell\n\tgetCellRange: function(row, col) {\n\t\tvar start = this.getCellDate(row, col);\n\t\tvar end = start.clone().add(1, 'days');\n\n\t\treturn { start: start, end: end };\n\t},\n\n\n\t// Returns the number of day cells, chronologically, from the first of the grid (0-based)\n\tgetCellDayIndex: function(row, col) {\n\t\treturn row * this.daysPerRow + this.getColDayIndex(col);\n\t},\n\n\n\t// Returns the numner of day cells, chronologically, from the first cell in *any given row*\n\tgetColDayIndex: function(col) {\n\t\tif (this.isRTL) {\n\t\t\treturn this.colCnt - 1 - col;\n\t\t}\n\t\telse {\n\t\t\treturn col;\n\t\t}\n\t},\n\n\n\t// Given a date, returns its chronolocial cell-index from the first cell of the grid.\n\t// If the date lies between cells (because of hiddenDays), returns a floating-point value between offsets.\n\t// If before the first offset, returns a negative number.\n\t// If after the last offset, returns an offset past the last cell offset.\n\t// Only works for *start* dates of cells. Will not work for exclusive end dates for cells.\n\tgetDateDayIndex: function(date) {\n\t\tvar dayIndices = this.dayIndices;\n\t\tvar dayOffset = date.diff(this.dayDates[0], 'days');\n\n\t\tif (dayOffset < 0) {\n\t\t\treturn dayIndices[0] - 1;\n\t\t}\n\t\telse if (dayOffset >= dayIndices.length) {\n\t\t\treturn dayIndices[dayIndices.length - 1] + 1;\n\t\t}\n\t\telse {\n\t\t\treturn dayIndices[dayOffset];\n\t\t}\n\t},\n\n\n\t/* Options\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Computes a default column header formatting string if `colFormat` is not explicitly defined\n\tcomputeColHeadFormat: function() {\n\t\t// if more than one week row, or if there are a lot of columns with not much space,\n\t\t// put just the day numbers will be in each cell\n\t\tif (this.rowCnt > 1 || this.colCnt > 10) {\n\t\t\treturn 'ddd'; // \"Sat\"\n\t\t}\n\t\t// multiple days, so full single date string WON'T be in title text\n\t\telse if (this.colCnt > 1) {\n\t\t\treturn this.opt('dayOfMonthFormat'); // \"Sat 12/10\"\n\t\t}\n\t\t// single day, so full single date string will probably be in title text\n\t\telse {\n\t\t\treturn 'dddd'; // \"Saturday\"\n\t\t}\n\t},\n\n\n\t/* Slicing\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Slices up a date range into a segment for every week-row it intersects with\n\tsliceRangeByRow: function(unzonedRange) {\n\t\tvar daysPerRow = this.daysPerRow;\n\t\tvar normalRange = this.view.computeDayRange(unzonedRange); // make whole-day range, considering nextDayThreshold\n\t\tvar rangeFirst = this.getDateDayIndex(normalRange.start); // inclusive first index\n\t\tvar rangeLast = this.getDateDayIndex(normalRange.end.clone().subtract(1, 'days')); // inclusive last index\n\t\tvar segs = [];\n\t\tvar row;\n\t\tvar rowFirst, rowLast; // inclusive day-index range for current row\n\t\tvar segFirst, segLast; // inclusive day-index range for segment\n\n\t\tfor (row = 0; row < this.rowCnt; row++) {\n\t\t\trowFirst = row * daysPerRow;\n\t\t\trowLast = rowFirst + daysPerRow - 1;\n\n\t\t\t// intersect segment's offset range with the row's\n\t\t\tsegFirst = Math.max(rangeFirst, rowFirst);\n\t\t\tsegLast = Math.min(rangeLast, rowLast);\n\n\t\t\t// deal with in-between indices\n\t\t\tsegFirst = Math.ceil(segFirst); // in-between starts round to next cell\n\t\t\tsegLast = Math.floor(segLast); // in-between ends round to prev cell\n\n\t\t\tif (segFirst <= segLast) { // was there any intersection with the current row?\n\t\t\t\tsegs.push({\n\t\t\t\t\trow: row,\n\n\t\t\t\t\t// normalize to start of row\n\t\t\t\t\tfirstRowDayIndex: segFirst - rowFirst,\n\t\t\t\t\tlastRowDayIndex: segLast - rowFirst,\n\n\t\t\t\t\t// must be matching integers to be the segment's start/end\n\t\t\t\t\tisStart: segFirst === rangeFirst,\n\t\t\t\t\tisEnd: segLast === rangeLast\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\t// Slices up a date range into a segment for every day-cell it intersects with.\n\t// TODO: make more DRY with sliceRangeByRow somehow.\n\tsliceRangeByDay: function(unzonedRange) {\n\t\tvar daysPerRow = this.daysPerRow;\n\t\tvar normalRange = this.view.computeDayRange(unzonedRange); // make whole-day range, considering nextDayThreshold\n\t\tvar rangeFirst = this.getDateDayIndex(normalRange.start); // inclusive first index\n\t\tvar rangeLast = this.getDateDayIndex(normalRange.end.clone().subtract(1, 'days')); // inclusive last index\n\t\tvar segs = [];\n\t\tvar row;\n\t\tvar rowFirst, rowLast; // inclusive day-index range for current row\n\t\tvar i;\n\t\tvar segFirst, segLast; // inclusive day-index range for segment\n\n\t\tfor (row = 0; row < this.rowCnt; row++) {\n\t\t\trowFirst = row * daysPerRow;\n\t\t\trowLast = rowFirst + daysPerRow - 1;\n\n\t\t\tfor (i = rowFirst; i <= rowLast; i++) {\n\n\t\t\t\t// intersect segment's offset range with the row's\n\t\t\t\tsegFirst = Math.max(rangeFirst, i);\n\t\t\t\tsegLast = Math.min(rangeLast, i);\n\n\t\t\t\t// deal with in-between indices\n\t\t\t\tsegFirst = Math.ceil(segFirst); // in-between starts round to next cell\n\t\t\t\tsegLast = Math.floor(segLast); // in-between ends round to prev cell\n\n\t\t\t\tif (segFirst <= segLast) { // was there any intersection with the current row?\n\t\t\t\t\tsegs.push({\n\t\t\t\t\t\trow: row,\n\n\t\t\t\t\t\t// normalize to start of row\n\t\t\t\t\t\tfirstRowDayIndex: segFirst - rowFirst,\n\t\t\t\t\t\tlastRowDayIndex: segLast - rowFirst,\n\n\t\t\t\t\t\t// must be matching integers to be the segment's start/end\n\t\t\t\t\t\tisStart: segFirst === rangeFirst,\n\t\t\t\t\t\tisEnd: segLast === rangeLast\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\t/* Header Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderHeadHtml: function() {\n\t\tvar theme = this.view.calendar.theme;\n\n\t\treturn '' +\n\t\t\t'
' +\n\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t\t\tthis.renderHeadTrHtml() +\n\t\t\t\t\t'' +\n\t\t\t\t'
' +\n\t\t\t'
';\n\t},\n\n\n\trenderHeadIntroHtml: function() {\n\t\treturn this.renderIntroHtml(); // fall back to generic\n\t},\n\n\n\trenderHeadTrHtml: function() {\n\t\treturn '' +\n\t\t\t'' +\n\t\t\t\t(this.isRTL ? '' : this.renderHeadIntroHtml()) +\n\t\t\t\tthis.renderHeadDateCellsHtml() +\n\t\t\t\t(this.isRTL ? this.renderHeadIntroHtml() : '') +\n\t\t\t'';\n\t},\n\n\n\trenderHeadDateCellsHtml: function() {\n\t\tvar htmls = [];\n\t\tvar col, date;\n\n\t\tfor (col = 0; col < this.colCnt; col++) {\n\t\t\tdate = this.getCellDate(0, col);\n\t\t\thtmls.push(this.renderHeadDateCellHtml(date));\n\t\t}\n\n\t\treturn htmls.join('');\n\t},\n\n\n\t// TODO: when internalApiVersion, accept an object for HTML attributes\n\t// (colspan should be no different)\n\trenderHeadDateCellHtml: function(date, colspan, otherAttrs) {\n\t\tvar view = this.view;\n\t\tvar isDateValid = view.activeUnzonedRange.containsDate(date); // TODO: called too frequently. cache somehow.\n\t\tvar classNames = [\n\t\t\t'fc-day-header',\n\t\t\tview.calendar.theme.getClass('widgetHeader')\n\t\t];\n\t\tvar innerHtml = htmlEscape(date.format(this.colHeadFormat));\n\n\t\t// if only one row of days, the classNames on the header can represent the specific days beneath\n\t\tif (this.rowCnt === 1) {\n\t\t\tclassNames = classNames.concat(\n\t\t\t\t// includes the day-of-week class\n\t\t\t\t// noThemeHighlight=true (don't highlight the header)\n\t\t\t\tthis.getDayClasses(date, true)\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\tclassNames.push('fc-' + dayIDs[date.day()]); // only add the day-of-week class\n\t\t}\n\n\t\treturn '' +\n ' 1 ?\n\t\t\t\t\t' colspan=\"' + colspan + '\"' :\n\t\t\t\t\t'') +\n\t\t\t\t(otherAttrs ?\n\t\t\t\t\t' ' + otherAttrs :\n\t\t\t\t\t'') +\n\t\t\t\t'>' +\n\t\t\t\t(isDateValid ?\n\t\t\t\t\t// don't make a link if the heading could represent multiple days, or if there's only one day (forceOff)\n\t\t\t\t\tview.buildGotoAnchorHtml(\n\t\t\t\t\t\t{ date: date, forceOff: this.rowCnt > 1 || this.colCnt === 1 },\n\t\t\t\t\t\tinnerHtml\n\t\t\t\t\t) :\n\t\t\t\t\t// if not valid, display text, but no link\n\t\t\t\t\tinnerHtml\n\t\t\t\t) +\n\t\t\t'';\n\t},\n\n\n\t/* Background Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderBgTrHtml: function(row) {\n\t\treturn '' +\n\t\t\t'' +\n\t\t\t\t(this.isRTL ? '' : this.renderBgIntroHtml(row)) +\n\t\t\t\tthis.renderBgCellsHtml(row) +\n\t\t\t\t(this.isRTL ? this.renderBgIntroHtml(row) : '') +\n\t\t\t'';\n\t},\n\n\n\trenderBgIntroHtml: function(row) {\n\t\treturn this.renderIntroHtml(); // fall back to generic\n\t},\n\n\n\trenderBgCellsHtml: function(row) {\n\t\tvar htmls = [];\n\t\tvar col, date;\n\n\t\tfor (col = 0; col < this.colCnt; col++) {\n\t\t\tdate = this.getCellDate(row, col);\n\t\t\thtmls.push(this.renderBgCellHtml(date));\n\t\t}\n\n\t\treturn htmls.join('');\n\t},\n\n\n\trenderBgCellHtml: function(date, otherAttrs) {\n\t\tvar view = this.view;\n\t\tvar isDateValid = view.activeUnzonedRange.containsDate(date); // TODO: called too frequently. cache somehow.\n\t\tvar classes = this.getDayClasses(date);\n\n\t\tclasses.unshift('fc-day', view.calendar.theme.getClass('widgetContent'));\n\n\t\treturn '';\n\t},\n\n\n\t/* Generic\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Generates the default HTML intro for any row. User classes should override\n\trenderIntroHtml: function() {\n\t},\n\n\n\t// TODO: a generic method for dealing with , RTL, intro\n\t// when increment internalApiVersion\n\t// wrapTr (scheduler)\n\n\n\t/* Utils\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Applies the generic \"intro\" and \"outro\" HTML to the given cells.\n\t// Intro means the leftmost cell when the calendar is LTR and the rightmost cell when RTL. Vice-versa for outro.\n\tbookendCells: function(trEl) {\n\t\tvar introHtml = this.renderIntroHtml();\n\n\t\tif (introHtml) {\n\t\t\tif (this.isRTL) {\n\t\t\t\ttrEl.append(introHtml);\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttrEl.prepend(introHtml);\n\t\t\t}\n\t\t}\n\t}\n\n};\n\n;;\n\n/* A component that renders a grid of whole-days that runs horizontally. There can be multiple rows, one per week.\n----------------------------------------------------------------------------------------------------------------------*/\n\nvar DayGrid = FC.DayGrid = Grid.extend(DayTableMixin, {\n\n\tnumbersVisible: false, // should render a row for day/week numbers? set by outside view. TODO: make internal\n\tbottomCoordPadding: 0, // hack for extending the hit area for the last row of the coordinate grid\n\n\trowEls: null, // set of fake row elements\n\tcellEls: null, // set of whole-day elements comprising the row's background\n\thelperEls: null, // set of cell skeleton elements for rendering the mock event \"helper\"\n\n\trowCoordCache: null,\n\tcolCoordCache: null,\n\n\n\t// Renders the rows and columns into the component's `this.el`, which should already be assigned.\n\t// isRigid determins whether the individual rows should ignore the contents and be a constant height.\n\t// Relies on the view's colCnt and rowCnt. In the future, this component should probably be self-sufficient.\n\trenderDates: function(isRigid) {\n\t\tvar view = this.view;\n\t\tvar rowCnt = this.rowCnt;\n\t\tvar colCnt = this.colCnt;\n\t\tvar html = '';\n\t\tvar row;\n\t\tvar col;\n\n\t\tfor (row = 0; row < rowCnt; row++) {\n\t\t\thtml += this.renderDayRowHtml(row, isRigid);\n\t\t}\n\t\tthis.el.html(html);\n\n\t\tthis.rowEls = this.el.find('.fc-row');\n\t\tthis.cellEls = this.el.find('.fc-day, .fc-disabled-day');\n\n\t\tthis.rowCoordCache = new CoordCache({\n\t\t\tels: this.rowEls,\n\t\t\tisVertical: true\n\t\t});\n\t\tthis.colCoordCache = new CoordCache({\n\t\t\tels: this.cellEls.slice(0, this.colCnt), // only the first row\n\t\t\tisHorizontal: true\n\t\t});\n\n\t\t// trigger dayRender with each cell's element\n\t\tfor (row = 0; row < rowCnt; row++) {\n\t\t\tfor (col = 0; col < colCnt; col++) {\n\t\t\t\tthis.publiclyTrigger('dayRender', {\n\t\t\t\t\tcontext: view,\n\t\t\t\t\targs: [\n\t\t\t\t\t\tthis.getCellDate(row, col),\n\t\t\t\t\t\tthis.getCellEl(row, col),\n\t\t\t\t\t\tview\n\t\t\t\t\t]\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n\n\n\tunrenderDates: function() {\n\t\tthis.removeSegPopover();\n\t},\n\n\n\trenderBusinessHours: function() {\n\t\tvar segs = this.buildBusinessHourSegs(true); // wholeDay=true\n\t\tthis.renderFill('businessHours', segs, 'bgevent');\n\t},\n\n\n\tunrenderBusinessHours: function() {\n\t\tthis.unrenderFill('businessHours');\n\t},\n\n\n\t// Generates the HTML for a single row, which is a div that wraps a table.\n\t// `row` is the row number.\n\trenderDayRowHtml: function(row, isRigid) {\n\t\tvar theme = this.view.calendar.theme;\n\t\tvar classes = [ 'fc-row', 'fc-week', theme.getClass('dayRow') ];\n\n\t\tif (isRigid) {\n\t\t\tclasses.push('fc-rigid');\n\t\t}\n\n\t\treturn '' +\n\t\t\t'
' +\n\t\t\t\t'
' +\n\t\t\t\t\t'' +\n\t\t\t\t\t\tthis.renderBgTrHtml(row) +\n\t\t\t\t\t'
' +\n\t\t\t\t'
' +\n\t\t\t\t'
' +\n\t\t\t\t\t'' +\n\t\t\t\t\t\t(this.numbersVisible ?\n\t\t\t\t\t\t\t'' +\n\t\t\t\t\t\t\t\tthis.renderNumberTrHtml(row) +\n\t\t\t\t\t\t\t'' :\n\t\t\t\t\t\t\t''\n\t\t\t\t\t\t\t) +\n\t\t\t\t\t'
' +\n\t\t\t\t'
' +\n\t\t\t'
';\n\t},\n\n\n\t/* Grid Number Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderNumberTrHtml: function(row) {\n\t\treturn '' +\n\t\t\t'' +\n\t\t\t\t(this.isRTL ? '' : this.renderNumberIntroHtml(row)) +\n\t\t\t\tthis.renderNumberCellsHtml(row) +\n\t\t\t\t(this.isRTL ? this.renderNumberIntroHtml(row) : '') +\n\t\t\t'';\n\t},\n\n\n\trenderNumberIntroHtml: function(row) {\n\t\treturn this.renderIntroHtml();\n\t},\n\n\n\trenderNumberCellsHtml: function(row) {\n\t\tvar htmls = [];\n\t\tvar col, date;\n\n\t\tfor (col = 0; col < this.colCnt; col++) {\n\t\t\tdate = this.getCellDate(row, col);\n\t\t\thtmls.push(this.renderNumberCellHtml(date));\n\t\t}\n\n\t\treturn htmls.join('');\n\t},\n\n\n\t// Generates the HTML for the s of the \"number\" row in the DayGrid's content skeleton.\n\t// The number row will only exist if either day numbers or week numbers are turned on.\n\trenderNumberCellHtml: function(date) {\n\t\tvar view = this.view;\n\t\tvar html = '';\n\t\tvar isDateValid = view.activeUnzonedRange.containsDate(date); // TODO: called too frequently. cache somehow.\n\t\tvar isDayNumberVisible = view.dayNumbersVisible && isDateValid;\n\t\tvar classes;\n\t\tvar weekCalcFirstDoW;\n\n\t\tif (!isDayNumberVisible && !view.cellWeekNumbersVisible) {\n\t\t\t// no numbers in day cell (week number must be along the side)\n\t\t\treturn ''; // will create an empty space above events :(\n\t\t}\n\n\t\tclasses = this.getDayClasses(date);\n\t\tclasses.unshift('fc-day-top');\n\n\t\tif (view.cellWeekNumbersVisible) {\n\t\t\t// To determine the day of week number change under ISO, we cannot\n\t\t\t// rely on moment.js methods such as firstDayOfWeek() or weekday(),\n\t\t\t// because they rely on the locale's dow (possibly overridden by\n\t\t\t// our firstDay option), which may not be Monday. We cannot change\n\t\t\t// dow, because that would affect the calendar start day as well.\n\t\t\tif (date._locale._fullCalendar_weekCalc === 'ISO') {\n\t\t\t\tweekCalcFirstDoW = 1; // Monday by ISO 8601 definition\n\t\t\t}\n\t\t\telse {\n\t\t\t\tweekCalcFirstDoW = date._locale.firstDayOfWeek();\n\t\t\t}\n\t\t}\n\n\t\thtml += '';\n\n\t\tif (view.cellWeekNumbersVisible && (date.day() == weekCalcFirstDoW)) {\n\t\t\thtml += view.buildGotoAnchorHtml(\n\t\t\t\t{ date: date, type: 'week' },\n\t\t\t\t{ 'class': 'fc-week-number' },\n\t\t\t\tdate.format('w') // inner HTML\n\t\t\t);\n\t\t}\n\n\t\tif (isDayNumberVisible) {\n\t\t\thtml += view.buildGotoAnchorHtml(\n\t\t\t\tdate,\n\t\t\t\t{ 'class': 'fc-day-number' },\n\t\t\t\tdate.date() // inner HTML\n\t\t\t);\n\t\t}\n\n\t\thtml += '';\n\n\t\treturn html;\n\t},\n\n\n\t/* Options\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Computes a default event time formatting string if `timeFormat` is not explicitly defined\n\tcomputeEventTimeFormat: function() {\n\t\treturn this.opt('extraSmallTimeFormat'); // like \"6p\" or \"6:30p\"\n\t},\n\n\n\t// Computes a default `displayEventEnd` value if one is not expliclty defined\n\tcomputeDisplayEventEnd: function() {\n\t\treturn this.colCnt == 1; // we'll likely have space if there's only one day\n\t},\n\n\n\t/* Dates\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trangeUpdated: function() {\n\t\tthis.updateDayTable();\n\t},\n\n\n\t// Slices up the given span (unzoned start/end with other misc data) into an array of segments\n\tcomponentFootprintToSegs: function(componentFootprint) {\n\t\tvar segs = this.sliceRangeByRow(componentFootprint.unzonedRange);\n\t\tvar i, seg;\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\n\t\t\tif (this.isRTL) {\n\t\t\t\tseg.leftCol = this.daysPerRow - 1 - seg.lastRowDayIndex;\n\t\t\t\tseg.rightCol = this.daysPerRow - 1 - seg.firstRowDayIndex;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tseg.leftCol = seg.firstRowDayIndex;\n\t\t\t\tseg.rightCol = seg.lastRowDayIndex;\n\t\t\t}\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\t/* Hit System\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tprepareHits: function() {\n\t\tthis.colCoordCache.build();\n\t\tthis.rowCoordCache.build();\n\t\tthis.rowCoordCache.bottoms[this.rowCnt - 1] += this.bottomCoordPadding; // hack\n\t},\n\n\n\treleaseHits: function() {\n\t\tthis.colCoordCache.clear();\n\t\tthis.rowCoordCache.clear();\n\t},\n\n\n\tqueryHit: function(leftOffset, topOffset) {\n\t\tif (this.colCoordCache.isLeftInBounds(leftOffset) && this.rowCoordCache.isTopInBounds(topOffset)) {\n\t\t\tvar col = this.colCoordCache.getHorizontalIndex(leftOffset);\n\t\t\tvar row = this.rowCoordCache.getVerticalIndex(topOffset);\n\n\t\t\tif (row != null && col != null) {\n\t\t\t\treturn this.getCellHit(row, col);\n\t\t\t}\n\t\t}\n\t},\n\n\n\tgetHitFootprint: function(hit) {\n\t\tvar range = this.getCellRange(hit.row, hit.col);\n\n\t\treturn new ComponentFootprint(\n\t\t\tnew UnzonedRange(range.start, range.end),\n\t\t\ttrue // all-day?\n\t\t);\n\t},\n\n\n\tgetHitEl: function(hit) {\n\t\treturn this.getCellEl(hit.row, hit.col);\n\t},\n\n\n\t/* Cell System\n\t------------------------------------------------------------------------------------------------------------------*/\n\t// FYI: the first column is the leftmost column, regardless of date\n\n\n\tgetCellHit: function(row, col) {\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col,\n\t\t\tcomponent: this, // needed unfortunately :(\n\t\t\tleft: this.colCoordCache.getLeftOffset(col),\n\t\t\tright: this.colCoordCache.getRightOffset(col),\n\t\t\ttop: this.rowCoordCache.getTopOffset(row),\n\t\t\tbottom: this.rowCoordCache.getBottomOffset(row)\n\t\t};\n\t},\n\n\n\tgetCellEl: function(row, col) {\n\t\treturn this.cellEls.eq(row * this.colCnt + col);\n\t},\n\n\n\t/* Event Drag Visualization\n\t------------------------------------------------------------------------------------------------------------------*/\n\t// TODO: move to DayGrid.event, similar to what we did with Grid's drag methods\n\n\n\t// Renders a visual indication of an event or external element being dragged.\n\t// `eventLocation` has zoned start and end (optional)\n\trenderDrag: function(eventFootprints, seg) {\n\t\tvar i;\n\n\t\tfor (i = 0; i < eventFootprints.length; i++) {\n\t\t\tthis.renderHighlight(eventFootprints[i].componentFootprint);\n\t\t}\n\n\t\t// if a segment from the same calendar but another component is being dragged, render a helper event\n\t\tif (seg && seg.component !== this) {\n\t\t\treturn this.renderHelperEventFootprints(eventFootprints, seg); // returns mock event elements\n\t\t}\n\t},\n\n\n\t// Unrenders any visual indication of a hovering event\n\tunrenderDrag: function() {\n\t\tthis.unrenderHighlight();\n\t\tthis.unrenderHelper();\n\t},\n\n\n\t/* Event Resize Visualization\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of an event being resized\n\trenderEventResize: function(eventFootprints, seg) {\n\t\tvar i;\n\n\t\tfor (i = 0; i < eventFootprints.length; i++) {\n\t\t\tthis.renderHighlight(eventFootprints[i].componentFootprint);\n\t\t}\n\n\t\treturn this.renderHelperEventFootprints(eventFootprints, seg); // returns mock event elements\n\t},\n\n\n\t// Unrenders a visual indication of an event being resized\n\tunrenderEventResize: function() {\n\t\tthis.unrenderHighlight();\n\t\tthis.unrenderHelper();\n\t},\n\n\n\t/* Event Helper\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a mock \"helper\" event. `sourceSeg` is the associated internal segment object. It can be null.\n\trenderHelperEventFootprintEls: function(eventFootprints, sourceSeg) {\n\t\tvar helperNodes = [];\n\t\tvar segs = this.eventFootprintsToSegs(eventFootprints);\n\t\tvar rowStructs;\n\n\t\tsegs = this.renderFgSegEls(segs); // assigns each seg's el and returns a subset of segs that were rendered\n\t\trowStructs = this.renderSegRows(segs);\n\n\t\t// inject each new event skeleton into each associated row\n\t\tthis.rowEls.each(function(row, rowNode) {\n\t\t\tvar rowEl = $(rowNode); // the .fc-row\n\t\t\tvar skeletonEl = $('
'); // will be absolutely positioned\n\t\t\tvar skeletonTop;\n\n\t\t\t// If there is an original segment, match the top position. Otherwise, put it at the row's top level\n\t\t\tif (sourceSeg && sourceSeg.row === row) {\n\t\t\t\tskeletonTop = sourceSeg.el.position().top;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tskeletonTop = rowEl.find('.fc-content-skeleton tbody').position().top;\n\t\t\t}\n\n\t\t\tskeletonEl.css('top', skeletonTop)\n\t\t\t\t.find('table')\n\t\t\t\t\t.append(rowStructs[row].tbodyEl);\n\n\t\t\trowEl.append(skeletonEl);\n\t\t\thelperNodes.push(skeletonEl[0]);\n\t\t});\n\n\t\treturn ( // must return the elements rendered\n\t\t\tthis.helperEls = $(helperNodes) // array -> jQuery set\n\t\t);\n\t},\n\n\n\t// Unrenders any visual indication of a mock helper event\n\tunrenderHelper: function() {\n\t\tif (this.helperEls) {\n\t\t\tthis.helperEls.remove();\n\t\t\tthis.helperEls = null;\n\t\t}\n\t},\n\n\n\t/* Fill System (highlight, background events, business hours)\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tfillSegTag: 'td', // override the default tag name\n\n\n\t// Renders a set of rectangles over the given segments of days.\n\t// Only returns segments that successfully rendered.\n\trenderFill: function(type, segs, className) {\n\t\tvar nodes = [];\n\t\tvar i, seg;\n\t\tvar skeletonEl;\n\n\t\tsegs = this.renderFillSegEls(type, segs); // assignes `.el` to each seg. returns successfully rendered segs\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\t\t\tskeletonEl = this.renderFillRow(type, seg, className);\n\t\t\tthis.rowEls.eq(seg.row).append(skeletonEl);\n\t\t\tnodes.push(skeletonEl[0]);\n\t\t}\n\n\t\tif (this.elsByFill[type]) {\n\t\t\tthis.elsByFill[type] = this.elsByFill[type].add(nodes);\n\t\t}\n\t\telse {\n\t\t\tthis.elsByFill[type] = $(nodes);\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\t// Generates the HTML needed for one row of a fill. Requires the seg's el to be rendered.\n\trenderFillRow: function(type, seg, className) {\n\t\tvar colCnt = this.colCnt;\n\t\tvar startCol = seg.leftCol;\n\t\tvar endCol = seg.rightCol + 1;\n\t\tvar skeletonEl;\n\t\tvar trEl;\n\n\t\tclassName = className || type.toLowerCase();\n\n\t\tskeletonEl = $(\n\t\t\t'
' +\n\t\t\t\t'
' +\n\t\t\t'
'\n\t\t);\n\t\ttrEl = skeletonEl.find('tr');\n\n\t\tif (startCol > 0) {\n\t\t\ttrEl.append('');\n\t\t}\n\n\t\ttrEl.append(\n\t\t\tseg.el.attr('colspan', endCol - startCol)\n\t\t);\n\n\t\tif (endCol < colCnt) {\n\t\t\ttrEl.append('');\n\t\t}\n\n\t\tthis.bookendCells(trEl);\n\n\t\treturn skeletonEl;\n\t}\n\n});\n\n;;\n\n/* Event-rendering methods for the DayGrid class\n----------------------------------------------------------------------------------------------------------------------*/\n\nDayGrid.mixin({\n\n\trowStructs: null, // an array of objects, each holding information about a row's foreground event-rendering\n\n\n\t// Unrenders all events currently rendered on the grid\n\tunrenderEvents: function() {\n\t\tthis.removeSegPopover(); // removes the \"more..\" events popover\n\t\tGrid.prototype.unrenderEvents.apply(this, arguments); // calls the super-method\n\t},\n\n\n\t// Retrieves all rendered segment objects currently rendered on the grid\n\tgetEventSegs: function() {\n\t\treturn Grid.prototype.getEventSegs.call(this) // get the segments from the super-method\n\t\t\t.concat(this.popoverSegs || []); // append the segments from the \"more...\" popover\n\t},\n\n\n\t// Renders the given background event segments onto the grid\n\trenderBgSegs: function(segs) {\n\n\t\t// don't render timed background events\n\t\tvar allDaySegs = $.grep(segs, function(seg) {\n\t\t\treturn seg.footprint.componentFootprint.isAllDay;\n\t\t});\n\n\t\treturn Grid.prototype.renderBgSegs.call(this, allDaySegs); // call the super-method\n\t},\n\n\n\t// Renders the given foreground event segments onto the grid\n\trenderFgSegs: function(segs) {\n\t\tvar rowStructs;\n\n\t\t// render an `.el` on each seg\n\t\t// returns a subset of the segs. segs that were actually rendered\n\t\tsegs = this.renderFgSegEls(segs);\n\n\t\trowStructs = this.rowStructs = this.renderSegRows(segs);\n\n\t\t// append to each row's content skeleton\n\t\tthis.rowEls.each(function(i, rowNode) {\n\t\t\t$(rowNode).find('.fc-content-skeleton > table').append(\n\t\t\t\trowStructs[i].tbodyEl\n\t\t\t);\n\t\t});\n\n\t\treturn segs; // return only the segs that were actually rendered\n\t},\n\n\n\t// Unrenders all currently rendered foreground event segments\n\tunrenderFgSegs: function() {\n\t\tvar rowStructs = this.rowStructs || [];\n\t\tvar rowStruct;\n\n\t\twhile ((rowStruct = rowStructs.pop())) {\n\t\t\trowStruct.tbodyEl.remove();\n\t\t}\n\n\t\tthis.rowStructs = null;\n\t},\n\n\n\t// Uses the given events array to generate elements that should be appended to each row's content skeleton.\n\t// Returns an array of rowStruct objects (see the bottom of `renderSegRow`).\n\t// PRECONDITION: each segment shoud already have a rendered and assigned `.el`\n\trenderSegRows: function(segs) {\n\t\tvar rowStructs = [];\n\t\tvar segRows;\n\t\tvar row;\n\n\t\tsegRows = this.groupSegRows(segs); // group into nested arrays\n\n\t\t// iterate each row of segment groupings\n\t\tfor (row = 0; row < segRows.length; row++) {\n\t\t\trowStructs.push(\n\t\t\t\tthis.renderSegRow(row, segRows[row])\n\t\t\t);\n\t\t}\n\n\t\treturn rowStructs;\n\t},\n\n\n\t// Builds the HTML to be used for the default element for an individual segment\n\tfgSegHtml: function(seg, disableResizing) {\n\t\tvar view = this.view;\n\t\tvar eventDef = seg.footprint.eventDef;\n\t\tvar isAllDay = seg.footprint.componentFootprint.isAllDay;\n\t\tvar isDraggable = view.isEventDefDraggable(eventDef);\n\t\tvar isResizableFromStart = !disableResizing && isAllDay &&\n\t\t\tseg.isStart && view.isEventDefResizableFromStart(eventDef);\n\t\tvar isResizableFromEnd = !disableResizing && isAllDay &&\n\t\t\tseg.isEnd && view.isEventDefResizableFromEnd(eventDef);\n\t\tvar classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd);\n\t\tvar skinCss = cssToStr(this.getSegSkinCss(seg));\n\t\tvar timeHtml = '';\n\t\tvar timeText;\n\t\tvar titleHtml;\n\n\t\tclasses.unshift('fc-day-grid-event', 'fc-h-event');\n\n\t\t// Only display a timed events time if it is the starting segment\n\t\tif (seg.isStart) {\n\t\t\ttimeText = this.getEventTimeText(seg.footprint);\n\t\t\tif (timeText) {\n\t\t\t\ttimeHtml = '' + htmlEscape(timeText) + '';\n\t\t\t}\n\t\t}\n\n\t\ttitleHtml =\n\t\t\t'' +\n\t\t\t\t(htmlEscape(eventDef.title || '') || ' ') + // we always want one line of height\n\t\t\t'';\n\t\t\n\t\treturn '' +\n\t\t\t\t'
' +\n\t\t\t\t\t(this.isRTL ?\n\t\t\t\t\t\ttitleHtml + ' ' + timeHtml : // put a natural space in between\n\t\t\t\t\t\ttimeHtml + ' ' + titleHtml //\n\t\t\t\t\t\t) +\n\t\t\t\t'
' +\n\t\t\t\t(isResizableFromStart ?\n\t\t\t\t\t'
' :\n\t\t\t\t\t''\n\t\t\t\t\t) +\n\t\t\t\t(isResizableFromEnd ?\n\t\t\t\t\t'
' :\n\t\t\t\t\t''\n\t\t\t\t\t) +\n\t\t\t'';\n\t},\n\n\n\t// Given a row # and an array of segments all in the same row, render a element, a skeleton that contains\n\t// the segments. Returns object with a bunch of internal data about how the render was calculated.\n\t// NOTE: modifies rowSegs\n\trenderSegRow: function(row, rowSegs) {\n\t\tvar colCnt = this.colCnt;\n\t\tvar segLevels = this.buildSegLevels(rowSegs); // group into sub-arrays of levels\n\t\tvar levelCnt = Math.max(1, segLevels.length); // ensure at least one level\n\t\tvar tbody = $('');\n\t\tvar segMatrix = []; // lookup for which segments are rendered into which level+col cells\n\t\tvar cellMatrix = []; // lookup for all elements of the level+col matrix\n\t\tvar loneCellMatrix = []; // lookup for elements that only take up a single column\n\t\tvar i, levelSegs;\n\t\tvar col;\n\t\tvar tr;\n\t\tvar j, seg;\n\t\tvar td;\n\n\t\t// populates empty cells from the current column (`col`) to `endCol`\n\t\tfunction emptyCellsUntil(endCol) {\n\t\t\twhile (col < endCol) {\n\t\t\t\t// try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n\t\t\t\ttd = (loneCellMatrix[i - 1] || [])[col];\n\t\t\t\tif (td) {\n\t\t\t\t\ttd.attr(\n\t\t\t\t\t\t'rowspan',\n\t\t\t\t\t\tparseInt(td.attr('rowspan') || 1, 10) + 1\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttd = $('');\n\t\t\t\t\ttr.append(td);\n\t\t\t\t}\n\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0; i < levelCnt; i++) { // iterate through all levels\n\t\t\tlevelSegs = segLevels[i];\n\t\t\tcol = 0;\n\t\t\ttr = $('');\n\n\t\t\tsegMatrix.push([]);\n\t\t\tcellMatrix.push([]);\n\t\t\tloneCellMatrix.push([]);\n\n\t\t\t// levelCnt might be 1 even though there are no actual levels. protect against this.\n\t\t\t// this single empty row is useful for styling.\n\t\t\tif (levelSegs) {\n\t\t\t\tfor (j = 0; j < levelSegs.length; j++) { // iterate through segments in level\n\t\t\t\t\tseg = levelSegs[j];\n\n\t\t\t\t\temptyCellsUntil(seg.leftCol);\n\n\t\t\t\t\t// create a container that occupies or more columns. append the event element.\n\t\t\t\t\ttd = $('').append(seg.el);\n\t\t\t\t\tif (seg.leftCol != seg.rightCol) {\n\t\t\t\t\t\ttd.attr('colspan', seg.rightCol - seg.leftCol + 1);\n\t\t\t\t\t}\n\t\t\t\t\telse { // a single-column segment\n\t\t\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (col <= seg.rightCol) {\n\t\t\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\t\t\tsegMatrix[i][col] = seg;\n\t\t\t\t\t\tcol++;\n\t\t\t\t\t}\n\n\t\t\t\t\ttr.append(td);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\temptyCellsUntil(colCnt); // finish off the row\n\t\t\tthis.bookendCells(tr);\n\t\t\ttbody.append(tr);\n\t\t}\n\n\t\treturn { // a \"rowStruct\"\n\t\t\trow: row, // the row number\n\t\t\ttbodyEl: tbody,\n\t\t\tcellMatrix: cellMatrix,\n\t\t\tsegMatrix: segMatrix,\n\t\t\tsegLevels: segLevels,\n\t\t\tsegs: rowSegs\n\t\t};\n\t},\n\n\n\t// Stacks a flat array of segments, which are all assumed to be in the same row, into subarrays of vertical levels.\n\t// NOTE: modifies segs\n\tbuildSegLevels: function(segs) {\n\t\tvar levels = [];\n\t\tvar i, seg;\n\t\tvar j;\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tthis.sortEventSegs(segs);\n\t\t\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\n\t\t\t// loop through levels, starting with the topmost, until the segment doesn't collide with other segments\n\t\t\tfor (j = 0; j < levels.length; j++) {\n\t\t\t\tif (!isDaySegCollision(seg, levels[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tseg.level = j;\n\n\t\t\t// create new level array if needed and append segment\n\t\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t\t}\n\n\t\t// order segments left-to-right. very important if calendar is RTL\n\t\tfor (j = 0; j < levels.length; j++) {\n\t\t\tlevels[j].sort(compareDaySegCols);\n\t\t}\n\n\t\treturn levels;\n\t},\n\n\n\t// Given a flat array of segments, return an array of sub-arrays, grouped by each segment's row\n\tgroupSegRows: function(segs) {\n\t\tvar segRows = [];\n\t\tvar i;\n\n\t\tfor (i = 0; i < this.rowCnt; i++) {\n\t\t\tsegRows.push([]);\n\t\t}\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tsegRows[segs[i].row].push(segs[i]);\n\t\t}\n\n\t\treturn segRows;\n\t}\n\n});\n\n\n// Computes whether two segments' columns collide. They are assumed to be in the same row.\nfunction isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n\n// A cmp function for determining the leftmost event\nfunction compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}\n\n;;\n\n/* Methods relate to limiting the number events for a given day on a DayGrid\n----------------------------------------------------------------------------------------------------------------------*/\n// NOTE: all the segs being passed around in here are foreground segs\n\nDayGrid.mixin({\n\n\tsegPopover: null, // the Popover that holds events that can't fit in a cell. null when not visible\n\tpopoverSegs: null, // an array of segment objects that the segPopover holds. null when not visible\n\n\n\tremoveSegPopover: function() {\n\t\tif (this.segPopover) {\n\t\t\tthis.segPopover.hide(); // in handler, will call segPopover's removeElement\n\t\t}\n\t},\n\n\n\t// Limits the number of \"levels\" (vertically stacking layers of events) for each row of the grid.\n\t// `levelLimit` can be false (don't limit), a number, or true (should be computed).\n\tlimitRows: function(levelLimit) {\n\t\tvar rowStructs = this.rowStructs || [];\n\t\tvar row; // row #\n\t\tvar rowLevelLimit;\n\n\t\tfor (row = 0; row < rowStructs.length; row++) {\n\t\t\tthis.unlimitRow(row);\n\n\t\t\tif (!levelLimit) {\n\t\t\t\trowLevelLimit = false;\n\t\t\t}\n\t\t\telse if (typeof levelLimit === 'number') {\n\t\t\t\trowLevelLimit = levelLimit;\n\t\t\t}\n\t\t\telse {\n\t\t\t\trowLevelLimit = this.computeRowLevelLimit(row);\n\t\t\t}\n\n\t\t\tif (rowLevelLimit !== false) {\n\t\t\t\tthis.limitRow(row, rowLevelLimit);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Computes the number of levels a row will accomodate without going outside its bounds.\n\t// Assumes the row is \"rigid\" (maintains a constant height regardless of what is inside).\n\t// `row` is the row number.\n\tcomputeRowLevelLimit: function(row) {\n\t\tvar rowEl = this.rowEls.eq(row); // the containing \"fake\" row div\n\t\tvar rowHeight = rowEl.height(); // TODO: cache somehow?\n\t\tvar trEls = this.rowStructs[row].tbodyEl.children();\n\t\tvar i, trEl;\n\t\tvar trHeight;\n\n\t\tfunction iterInnerHeights(i, childNode) {\n\t\t\ttrHeight = Math.max(trHeight, $(childNode).outerHeight());\n\t\t}\n\n\t\t// Reveal one level at a time and stop when we find one out of bounds\n\t\tfor (i = 0; i < trEls.length; i++) {\n\t\t\ttrEl = trEls.eq(i).removeClass('fc-limited'); // reset to original state (reveal)\n\n\t\t\t// with rowspans>1 and IE8, trEl.outerHeight() would return the height of the largest cell,\n\t\t\t// so instead, find the tallest inner content element.\n\t\t\ttrHeight = 0;\n\t\t\ttrEl.find('> td > :first-child').each(iterInnerHeights);\n\n\t\t\tif (trEl.position().top + trHeight > rowHeight) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\n\t\treturn false; // should not limit at all\n\t},\n\n\n\t// Limits the given grid row to the maximum number of levels and injects \"more\" links if necessary.\n\t// `row` is the row number.\n\t// `levelLimit` is a number for the maximum (inclusive) number of levels allowed.\n\tlimitRow: function(row, levelLimit) {\n\t\tvar _this = this;\n\t\tvar rowStruct = this.rowStructs[row];\n\t\tvar moreNodes = []; // array of \"more\" links and DOM nodes\n\t\tvar col = 0; // col #, left-to-right (not chronologically)\n\t\tvar levelSegs; // array of segment objects in the last allowable level, ordered left-to-right\n\t\tvar cellMatrix; // a matrix (by level, then column) of all jQuery elements in the row\n\t\tvar limitedNodes; // array of temporarily hidden level and segment DOM nodes\n\t\tvar i, seg;\n\t\tvar segsBelow; // array of segment objects below `seg` in the current `col`\n\t\tvar totalSegsBelow; // total number of segments below `seg` in any of the columns `seg` occupies\n\t\tvar colSegsBelow; // array of segment arrays, below seg, one for each column (offset from segs's first column)\n\t\tvar td, rowspan;\n\t\tvar segMoreNodes; // array of \"more\" cells that will stand-in for the current seg's cell\n\t\tvar j;\n\t\tvar moreTd, moreWrap, moreLink;\n\n\t\t// Iterates through empty level cells and places \"more\" links inside if need be\n\t\tfunction emptyCellsUntil(endCol) { // goes from current `col` to `endCol`\n\t\t\twhile (col < endCol) {\n\t\t\t\tsegsBelow = _this.getCellSegs(row, col, levelLimit);\n\t\t\t\tif (segsBelow.length) {\n\t\t\t\t\ttd = cellMatrix[levelLimit - 1][col];\n\t\t\t\t\tmoreLink = _this.renderMoreLink(row, col, segsBelow);\n\t\t\t\t\tmoreWrap = $('
').append(moreLink);\n\t\t\t\t\ttd.append(moreWrap);\n\t\t\t\t\tmoreNodes.push(moreWrap[0]);\n\t\t\t\t}\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}\n\n\t\tif (levelLimit && levelLimit < rowStruct.segLevels.length) { // is it actually over the limit?\n\t\t\tlevelSegs = rowStruct.segLevels[levelLimit - 1];\n\t\t\tcellMatrix = rowStruct.cellMatrix;\n\n\t\t\tlimitedNodes = rowStruct.tbodyEl.children().slice(levelLimit) // get level elements past the limit\n\t\t\t\t.addClass('fc-limited').get(); // hide elements and get a simple DOM-nodes array\n\n\t\t\t// iterate though segments in the last allowable level\n\t\t\tfor (i = 0; i < levelSegs.length; i++) {\n\t\t\t\tseg = levelSegs[i];\n\t\t\t\temptyCellsUntil(seg.leftCol); // process empty cells before the segment\n\n\t\t\t\t// determine *all* segments below `seg` that occupy the same columns\n\t\t\t\tcolSegsBelow = [];\n\t\t\t\ttotalSegsBelow = 0;\n\t\t\t\twhile (col <= seg.rightCol) {\n\t\t\t\t\tsegsBelow = this.getCellSegs(row, col, levelLimit);\n\t\t\t\t\tcolSegsBelow.push(segsBelow);\n\t\t\t\t\ttotalSegsBelow += segsBelow.length;\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\n\t\t\t\tif (totalSegsBelow) { // do we need to replace this segment with one or many \"more\" links?\n\t\t\t\t\ttd = cellMatrix[levelLimit - 1][seg.leftCol]; // the segment's parent cell\n\t\t\t\t\trowspan = td.attr('rowspan') || 1;\n\t\t\t\t\tsegMoreNodes = [];\n\n\t\t\t\t\t// make a replacement for each column the segment occupies. will be one for each colspan\n\t\t\t\t\tfor (j = 0; j < colSegsBelow.length; j++) {\n\t\t\t\t\t\tmoreTd = $('').attr('rowspan', rowspan);\n\t\t\t\t\t\tsegsBelow = colSegsBelow[j];\n\t\t\t\t\t\tmoreLink = this.renderMoreLink(\n\t\t\t\t\t\t\trow,\n\t\t\t\t\t\t\tseg.leftCol + j,\n\t\t\t\t\t\t\t[ seg ].concat(segsBelow) // count seg as hidden too\n\t\t\t\t\t\t);\n\t\t\t\t\t\tmoreWrap = $('
').append(moreLink);\n\t\t\t\t\t\tmoreTd.append(moreWrap);\n\t\t\t\t\t\tsegMoreNodes.push(moreTd[0]);\n\t\t\t\t\t\tmoreNodes.push(moreTd[0]);\n\t\t\t\t\t}\n\n\t\t\t\t\ttd.addClass('fc-limited').after($(segMoreNodes)); // hide original and inject replacements\n\t\t\t\t\tlimitedNodes.push(td[0]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\temptyCellsUntil(this.colCnt); // finish off the level\n\t\t\trowStruct.moreEls = $(moreNodes); // for easy undoing later\n\t\t\trowStruct.limitedEls = $(limitedNodes); // for easy undoing later\n\t\t}\n\t},\n\n\n\t// Reveals all levels and removes all \"more\"-related elements for a grid's row.\n\t// `row` is a row number.\n\tunlimitRow: function(row) {\n\t\tvar rowStruct = this.rowStructs[row];\n\n\t\tif (rowStruct.moreEls) {\n\t\t\trowStruct.moreEls.remove();\n\t\t\trowStruct.moreEls = null;\n\t\t}\n\n\t\tif (rowStruct.limitedEls) {\n\t\t\trowStruct.limitedEls.removeClass('fc-limited');\n\t\t\trowStruct.limitedEls = null;\n\t\t}\n\t},\n\n\n\t// Renders an element that represents hidden event element for a cell.\n\t// Responsible for attaching click handler as well.\n\trenderMoreLink: function(row, col, hiddenSegs) {\n\t\tvar _this = this;\n\t\tvar view = this.view;\n\n\t\treturn $('')\n\t\t\t.text(\n\t\t\t\tthis.getMoreLinkText(hiddenSegs.length)\n\t\t\t)\n\t\t\t.on('click', function(ev) {\n\t\t\t\tvar clickOption = _this.opt('eventLimitClick');\n\t\t\t\tvar date = _this.getCellDate(row, col);\n\t\t\t\tvar moreEl = $(this);\n\t\t\t\tvar dayEl = _this.getCellEl(row, col);\n\t\t\t\tvar allSegs = _this.getCellSegs(row, col);\n\n\t\t\t\t// rescope the segments to be within the cell's date\n\t\t\t\tvar reslicedAllSegs = _this.resliceDaySegs(allSegs, date);\n\t\t\t\tvar reslicedHiddenSegs = _this.resliceDaySegs(hiddenSegs, date);\n\n\t\t\t\tif (typeof clickOption === 'function') {\n\t\t\t\t\t// the returned value can be an atomic option\n\t\t\t\t\tclickOption = _this.publiclyTrigger('eventLimitClick', {\n\t\t\t\t\t\tcontext: view,\n\t\t\t\t\t\targs: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdate: date.clone(),\n\t\t\t\t\t\t\t\tdayEl: dayEl,\n\t\t\t\t\t\t\t\tmoreEl: moreEl,\n\t\t\t\t\t\t\t\tsegs: reslicedAllSegs,\n\t\t\t\t\t\t\t\thiddenSegs: reslicedHiddenSegs\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tev,\n\t\t\t\t\t\t\tview\n\t\t\t\t\t\t]\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (clickOption === 'popover') {\n\t\t\t\t\t_this.showSegPopover(row, col, moreEl, reslicedAllSegs);\n\t\t\t\t}\n\t\t\t\telse if (typeof clickOption === 'string') { // a view name\n\t\t\t\t\tview.calendar.zoomTo(date, clickOption);\n\t\t\t\t}\n\t\t\t});\n\t},\n\n\n\t// Reveals the popover that displays all events within a cell\n\tshowSegPopover: function(row, col, moreLink, segs) {\n\t\tvar _this = this;\n\t\tvar view = this.view;\n\t\tvar moreWrap = moreLink.parent(); // the
wrapper around the \n\t\tvar topEl; // the element we want to match the top coordinate of\n\t\tvar options;\n\n\t\tif (this.rowCnt == 1) {\n\t\t\ttopEl = view.el; // will cause the popover to cover any sort of header\n\t\t}\n\t\telse {\n\t\t\ttopEl = this.rowEls.eq(row); // will align with top of row\n\t\t}\n\n\t\toptions = {\n\t\t\tclassName: 'fc-more-popover ' + view.calendar.theme.getClass('popover'),\n\t\t\tcontent: this.renderSegPopoverContent(row, col, segs),\n\t\t\tparentEl: view.el, // attach to root of view. guarantees outside of scrollbars.\n\t\t\ttop: topEl.offset().top,\n\t\t\tautoHide: true, // when the user clicks elsewhere, hide the popover\n\t\t\tviewportConstrain: this.opt('popoverViewportConstrain'),\n\t\t\thide: function() {\n\t\t\t\t// kill everything when the popover is hidden\n\t\t\t\t// notify events to be removed\n\t\t\t\tif (_this.popoverSegs) {\n\t\t\t\t\tvar seg;\n\t\t\t\t\tvar legacy;\n\t\t\t\t\tvar i;\n\n\t\t\t\t\tfor (i = 0; i < _this.popoverSegs.length; ++i) {\n\t\t\t\t\t\tseg = _this.popoverSegs[i];\n\t\t\t\t\t\tlegacy = seg.footprint.getEventLegacy();\n\n\t\t\t\t\t\t_this.publiclyTrigger('eventDestroy', {\n\t\t\t\t\t\t\tcontext: legacy,\n\t\t\t\t\t\t\targs: [ legacy, seg.el, view ]\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_this.segPopover.removeElement();\n\t\t\t\t_this.segPopover = null;\n\t\t\t\t_this.popoverSegs = null;\n\t\t\t}\n\t\t};\n\n\t\t// Determine horizontal coordinate.\n\t\t// We use the moreWrap instead of the to avoid border confusion.\n\t\tif (this.isRTL) {\n\t\t\toptions.right = moreWrap.offset().left + moreWrap.outerWidth() + 1; // +1 to be over cell border\n\t\t}\n\t\telse {\n\t\t\toptions.left = moreWrap.offset().left - 1; // -1 to be over cell border\n\t\t}\n\n\t\tthis.segPopover = new Popover(options);\n\t\tthis.segPopover.show();\n\n\t\t// the popover doesn't live within the grid's container element, and thus won't get the event\n\t\t// delegated-handlers for free. attach event-related handlers to the popover.\n\t\tthis.bindSegHandlersToEl(this.segPopover.el);\n\t},\n\n\n\t// Builds the inner DOM contents of the segment popover\n\trenderSegPopoverContent: function(row, col, segs) {\n\t\tvar view = this.view;\n\t\tvar theme = view.calendar.theme;\n\t\tvar title = this.getCellDate(row, col).format(this.opt('dayPopoverFormat'));\n\t\tvar content = $(\n\t\t\t'
' +\n\t\t\t\t'' +\n\t\t\t\t'' +\n\t\t\t\t\thtmlEscape(title) +\n\t\t\t\t'' +\n\t\t\t\t'
' +\n\t\t\t'
' +\n\t\t\t'
' +\n\t\t\t\t'
' +\n\t\t\t'
'\n\t\t);\n\t\tvar segContainer = content.find('.fc-event-container');\n\t\tvar i;\n\n\t\t// render each seg's `el` and only return the visible segs\n\t\tsegs = this.renderFgSegEls(segs, true); // disableResizing=true\n\t\tthis.popoverSegs = segs;\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\n\t\t\t// because segments in the popover are not part of a grid coordinate system, provide a hint to any\n\t\t\t// grids that want to do drag-n-drop about which cell it came from\n\t\t\tthis.hitsNeeded();\n\t\t\tsegs[i].hit = this.getCellHit(row, col);\n\t\t\tthis.hitsNotNeeded();\n\n\t\t\tsegContainer.append(segs[i].el);\n\t\t}\n\n\t\treturn content;\n\t},\n\n\n\t// Given the events within an array of segment objects, reslice them to be in a single day\n\tresliceDaySegs: function(segs, dayDate) {\n\t\tvar dayStart = dayDate.clone();\n\t\tvar dayEnd = dayStart.clone().add(1, 'days');\n\t\tvar dayRange = new UnzonedRange(dayStart, dayEnd);\n\t\tvar newSegs = [];\n\t\tvar i;\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tnewSegs.push.apply(newSegs, // append\n\t\t\t\tthis.eventFootprintToSegs(segs[i].footprint, dayRange)\n\t\t\t);\n\t\t}\n\n\t\t// force an order because eventsToSegs doesn't guarantee one\n\t\t// TODO: research if still needed\n\t\tthis.sortEventSegs(newSegs);\n\n\t\treturn newSegs;\n\t},\n\n\n\t// Generates the text that should be inside a \"more\" link, given the number of events it represents\n\tgetMoreLinkText: function(num) {\n\t\tvar opt = this.opt('eventLimitText');\n\n\t\tif (typeof opt === 'function') {\n\t\t\treturn opt(num);\n\t\t}\n\t\telse {\n\t\t\treturn '+' + num + ' ' + opt;\n\t\t}\n\t},\n\n\n\t// Returns segments within a given cell.\n\t// If `startLevel` is specified, returns only events including and below that level. Otherwise returns all segs.\n\tgetCellSegs: function(row, col, startLevel) {\n\t\tvar segMatrix = this.rowStructs[row].segMatrix;\n\t\tvar level = startLevel || 0;\n\t\tvar segs = [];\n\t\tvar seg;\n\n\t\twhile (level < segMatrix.length) {\n\t\t\tseg = segMatrix[level][col];\n\t\t\tif (seg) {\n\t\t\t\tsegs.push(seg);\n\t\t\t}\n\t\t\tlevel++;\n\t\t}\n\n\t\treturn segs;\n\t}\n\n});\n\n;;\n\n/* A component that renders one or more columns of vertical time slots\n----------------------------------------------------------------------------------------------------------------------*/\n// We mixin DayTable, even though there is only a single row of days\n\nvar TimeGrid = FC.TimeGrid = Grid.extend(DayTableMixin, {\n\n\tdayRanges: null, // UnzonedRange[], of start-end of each day\n\tslotDuration: null, // duration of a \"slot\", a distinct time segment on given day, visualized by lines\n\tsnapDuration: null, // granularity of time for dragging and selecting\n\tsnapsPerSlot: null,\n\tlabelFormat: null, // formatting string for times running along vertical axis\n\tlabelInterval: null, // duration of how often a label should be displayed for a slot\n\n\tcolEls: null, // cells elements in the day-row background\n\tslatContainerEl: null, // div that wraps all the slat rows\n\tslatEls: null, // elements running horizontally across all columns\n\tnowIndicatorEls: null,\n\n\tcolCoordCache: null,\n\tslatCoordCache: null,\n\n\n\tconstructor: function() {\n\t\tGrid.apply(this, arguments); // call the super-constructor\n\n\t\tthis.processOptions();\n\t},\n\n\n\t// Renders the time grid into `this.el`, which should already be assigned.\n\t// Relies on the view's colCnt. In the future, this component should probably be self-sufficient.\n\trenderDates: function() {\n\t\tthis.el.html(this.renderHtml());\n\t\tthis.colEls = this.el.find('.fc-day, .fc-disabled-day');\n\t\tthis.slatContainerEl = this.el.find('.fc-slats');\n\t\tthis.slatEls = this.slatContainerEl.find('tr');\n\n\t\tthis.colCoordCache = new CoordCache({\n\t\t\tels: this.colEls,\n\t\t\tisHorizontal: true\n\t\t});\n\t\tthis.slatCoordCache = new CoordCache({\n\t\t\tels: this.slatEls,\n\t\t\tisVertical: true\n\t\t});\n\n\t\tthis.renderContentSkeleton();\n\t},\n\n\n\t// Renders the basic HTML skeleton for the grid\n\trenderHtml: function() {\n\t\tvar theme = this.view.calendar.theme;\n\n\t\treturn '' +\n\t\t\t'
' +\n\t\t\t\t'' +\n\t\t\t\t\tthis.renderBgTrHtml(0) + // row=0\n\t\t\t\t'
' +\n\t\t\t'
' +\n\t\t\t'
' +\n\t\t\t\t'' +\n\t\t\t\t\tthis.renderSlatRowHtml() +\n\t\t\t\t'
' +\n\t\t\t'
';\n\t},\n\n\n\t// Generates the HTML for the horizontal \"slats\" that run width-wise. Has a time axis on a side. Depends on RTL.\n\trenderSlatRowHtml: function() {\n\t\tvar view = this.view;\n\t\tvar calendar = view.calendar;\n\t\tvar theme = calendar.theme;\n\t\tvar isRTL = this.isRTL;\n\t\tvar html = '';\n\t\tvar slotTime = moment.duration(+this.view.minTime); // wish there was .clone() for durations\n\t\tvar slotIterator = moment.duration(0);\n\t\tvar slotDate; // will be on the view's first day, but we only care about its time\n\t\tvar isLabeled;\n\t\tvar axisHtml;\n\n\t\t// Calculate the time for each slot\n\t\twhile (slotTime < view.maxTime) {\n\t\t\tslotDate = calendar.msToUtcMoment(this.unzonedRange.startMs).time(slotTime);\n\t\t\tisLabeled = isInt(divideDurationByDuration(slotIterator, this.labelInterval));\n\n\t\t\taxisHtml =\n\t\t\t\t'' +\n\t\t\t\t\t(isLabeled ?\n\t\t\t\t\t\t'' + // for matchCellWidths\n\t\t\t\t\t\t\thtmlEscape(slotDate.format(this.labelFormat)) +\n\t\t\t\t\t\t'' :\n\t\t\t\t\t\t''\n\t\t\t\t\t\t) +\n\t\t\t\t'';\n\n\t\t\thtml +=\n\t\t\t\t'' +\n\t\t\t\t\t(!isRTL ? axisHtml : '') +\n\t\t\t\t\t'' +\n\t\t\t\t\t(isRTL ? axisHtml : '') +\n\t\t\t\t\"\";\n\n\t\t\tslotTime.add(this.slotDuration);\n\t\t\tslotIterator.add(this.slotDuration);\n\t\t}\n\n\t\treturn html;\n\t},\n\n\n\t/* Options\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Parses various options into properties of this object\n\tprocessOptions: function() {\n\t\tvar slotDuration = this.opt('slotDuration');\n\t\tvar snapDuration = this.opt('snapDuration');\n\t\tvar input;\n\n\t\tslotDuration = moment.duration(slotDuration);\n\t\tsnapDuration = snapDuration ? moment.duration(snapDuration) : slotDuration;\n\n\t\tthis.slotDuration = slotDuration;\n\t\tthis.snapDuration = snapDuration;\n\t\tthis.snapsPerSlot = slotDuration / snapDuration; // TODO: ensure an integer multiple?\n\n\t\t// might be an array value (for TimelineView).\n\t\t// if so, getting the most granular entry (the last one probably).\n\t\tinput = this.opt('slotLabelFormat');\n\t\tif ($.isArray(input)) {\n\t\t\tinput = input[input.length - 1];\n\t\t}\n\n\t\tthis.labelFormat = input ||\n\t\t\tthis.opt('smallTimeFormat'); // the computed default\n\n\t\tinput = this.opt('slotLabelInterval');\n\t\tthis.labelInterval = input ?\n\t\t\tmoment.duration(input) :\n\t\t\tthis.computeLabelInterval(slotDuration);\n\t},\n\n\n\t// Computes an automatic value for slotLabelInterval\n\tcomputeLabelInterval: function(slotDuration) {\n\t\tvar i;\n\t\tvar labelInterval;\n\t\tvar slotsPerLabel;\n\n\t\t// find the smallest stock label interval that results in more than one slots-per-label\n\t\tfor (i = AGENDA_STOCK_SUB_DURATIONS.length - 1; i >= 0; i--) {\n\t\t\tlabelInterval = moment.duration(AGENDA_STOCK_SUB_DURATIONS[i]);\n\t\t\tslotsPerLabel = divideDurationByDuration(labelInterval, slotDuration);\n\t\t\tif (isInt(slotsPerLabel) && slotsPerLabel > 1) {\n\t\t\t\treturn labelInterval;\n\t\t\t}\n\t\t}\n\n\t\treturn moment.duration(slotDuration); // fall back. clone\n\t},\n\n\n\t// Computes a default event time formatting string if `timeFormat` is not explicitly defined\n\tcomputeEventTimeFormat: function() {\n\t\treturn this.opt('noMeridiemTimeFormat'); // like \"6:30\" (no AM/PM)\n\t},\n\n\n\t// Computes a default `displayEventEnd` value if one is not expliclty defined\n\tcomputeDisplayEventEnd: function() {\n\t\treturn true;\n\t},\n\n\n\t/* Hit System\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tprepareHits: function() {\n\t\tthis.colCoordCache.build();\n\t\tthis.slatCoordCache.build();\n\t},\n\n\n\treleaseHits: function() {\n\t\tthis.colCoordCache.clear();\n\t\t// NOTE: don't clear slatCoordCache because we rely on it for computeTimeTop\n\t},\n\n\n\tqueryHit: function(leftOffset, topOffset) {\n\t\tvar snapsPerSlot = this.snapsPerSlot;\n\t\tvar colCoordCache = this.colCoordCache;\n\t\tvar slatCoordCache = this.slatCoordCache;\n\n\t\tif (colCoordCache.isLeftInBounds(leftOffset) && slatCoordCache.isTopInBounds(topOffset)) {\n\t\t\tvar colIndex = colCoordCache.getHorizontalIndex(leftOffset);\n\t\t\tvar slatIndex = slatCoordCache.getVerticalIndex(topOffset);\n\n\t\t\tif (colIndex != null && slatIndex != null) {\n\t\t\t\tvar slatTop = slatCoordCache.getTopOffset(slatIndex);\n\t\t\t\tvar slatHeight = slatCoordCache.getHeight(slatIndex);\n\t\t\t\tvar partial = (topOffset - slatTop) / slatHeight; // floating point number between 0 and 1\n\t\t\t\tvar localSnapIndex = Math.floor(partial * snapsPerSlot); // the snap # relative to start of slat\n\t\t\t\tvar snapIndex = slatIndex * snapsPerSlot + localSnapIndex;\n\t\t\t\tvar snapTop = slatTop + (localSnapIndex / snapsPerSlot) * slatHeight;\n\t\t\t\tvar snapBottom = slatTop + ((localSnapIndex + 1) / snapsPerSlot) * slatHeight;\n\n\t\t\t\treturn {\n\t\t\t\t\tcol: colIndex,\n\t\t\t\t\tsnap: snapIndex,\n\t\t\t\t\tcomponent: this, // needed unfortunately :(\n\t\t\t\t\tleft: colCoordCache.getLeftOffset(colIndex),\n\t\t\t\t\tright: colCoordCache.getRightOffset(colIndex),\n\t\t\t\t\ttop: snapTop,\n\t\t\t\t\tbottom: snapBottom\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t},\n\n\n\tgetHitFootprint: function(hit) {\n\t\tvar start = this.getCellDate(0, hit.col); // row=0\n\t\tvar time = this.computeSnapTime(hit.snap); // pass in the snap-index\n\t\tvar end;\n\n\t\tstart.time(time);\n\t\tend = start.clone().add(this.snapDuration);\n\n\t\treturn new ComponentFootprint(\n\t\t\tnew UnzonedRange(start, end),\n\t\t\tfalse // all-day?\n\t\t);\n\t},\n\n\n\tgetHitEl: function(hit) {\n\t\treturn this.colEls.eq(hit.col);\n\t},\n\n\n\t/* Dates\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trangeUpdated: function() {\n\t\tvar view = this.view;\n\n\t\tthis.updateDayTable();\n\n\t\tthis.dayRanges = this.dayDates.map(function(dayDate) {\n\t\t\treturn new UnzonedRange(\n\t\t\t\tdayDate.clone().add(view.minTime),\n\t\t\t\tdayDate.clone().add(view.maxTime)\n\t\t\t);\n\t\t});\n\t},\n\n\n\t// Given a row number of the grid, representing a \"snap\", returns a time (Duration) from its start-of-day\n\tcomputeSnapTime: function(snapIndex) {\n\t\treturn moment.duration(this.view.minTime + this.snapDuration * snapIndex);\n\t},\n\n\n\t// Slices up the given span (unzoned start/end with other misc data) into an array of segments\n\tcomponentFootprintToSegs: function(componentFootprint) {\n\t\tvar segs = this.sliceRangeByTimes(componentFootprint.unzonedRange);\n\t\tvar i;\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tif (this.isRTL) {\n\t\t\t\tsegs[i].col = this.daysPerRow - 1 - segs[i].dayIndex;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsegs[i].col = segs[i].dayIndex;\n\t\t\t}\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\tsliceRangeByTimes: function(unzonedRange) {\n\t\tvar segs = [];\n\t\tvar segRange;\n\t\tvar dayIndex;\n\n\t\tfor (dayIndex = 0; dayIndex < this.daysPerRow; dayIndex++) {\n\n\t\t\tsegRange = unzonedRange.intersect(this.dayRanges[dayIndex]);\n\n\t\t\tif (segRange) {\n\t\t\t\tsegs.push({\n\t\t\t\t\tstartMs: segRange.startMs,\n\t\t\t\t\tendMs: segRange.endMs,\n\t\t\t\t\tisStart: segRange.isStart,\n\t\t\t\t\tisEnd: segRange.isEnd,\n\t\t\t\t\tdayIndex: dayIndex\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\t/* Coordinates\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tupdateSize: function(isResize) { // NOT a standard Grid method\n\t\tthis.slatCoordCache.build();\n\n\t\tif (isResize) {\n\t\t\tthis.updateSegVerticals(\n\t\t\t\t[].concat(this.fgSegs || [], this.bgSegs || [], this.businessSegs || [])\n\t\t\t);\n\t\t}\n\t},\n\n\n\tgetTotalSlatHeight: function() {\n\t\treturn this.slatContainerEl.outerHeight();\n\t},\n\n\n\t// Computes the top coordinate, relative to the bounds of the grid, of the given date.\n\t// `ms` can be a millisecond UTC time OR a UTC moment.\n\t// A `startOfDayDate` must be given for avoiding ambiguity over how to treat midnight.\n\tcomputeDateTop: function(ms, startOfDayDate) {\n\t\treturn this.computeTimeTop(\n\t\t\tmoment.duration(\n\t\t\t\tms - startOfDayDate.clone().stripTime()\n\t\t\t)\n\t\t);\n\t},\n\n\n\t// Computes the top coordinate, relative to the bounds of the grid, of the given time (a Duration).\n\tcomputeTimeTop: function(time) {\n\t\tvar len = this.slatEls.length;\n\t\tvar slatCoverage = (time - this.view.minTime) / this.slotDuration; // floating-point value of # of slots covered\n\t\tvar slatIndex;\n\t\tvar slatRemainder;\n\n\t\t// compute a floating-point number for how many slats should be progressed through.\n\t\t// from 0 to number of slats (inclusive)\n\t\t// constrained because minTime/maxTime might be customized.\n\t\tslatCoverage = Math.max(0, slatCoverage);\n\t\tslatCoverage = Math.min(len, slatCoverage);\n\n\t\t// an integer index of the furthest whole slat\n\t\t// from 0 to number slats (*exclusive*, so len-1)\n\t\tslatIndex = Math.floor(slatCoverage);\n\t\tslatIndex = Math.min(slatIndex, len - 1);\n\n\t\t// how much further through the slatIndex slat (from 0.0-1.0) must be covered in addition.\n\t\t// could be 1.0 if slatCoverage is covering *all* the slots\n\t\tslatRemainder = slatCoverage - slatIndex;\n\n\t\treturn this.slatCoordCache.getTopPosition(slatIndex) +\n\t\t\tthis.slatCoordCache.getHeight(slatIndex) * slatRemainder;\n\t},\n\n\n\n\t/* Event Drag Visualization\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of an event being dragged over the specified date(s).\n\t// A returned value of `true` signals that a mock \"helper\" event has been rendered.\n\trenderDrag: function(eventFootprints, seg) {\n\t\tvar i;\n\n\t\tif (seg) { // if there is event information for this drag, render a helper event\n\n\t\t\t// returns mock event elements\n\t\t\t// signal that a helper has been rendered\n\t\t\treturn this.renderHelperEventFootprints(eventFootprints);\n\t\t}\n\t\telse { // otherwise, just render a highlight\n\n\t\t\tfor (i = 0; i < eventFootprints.length; i++) {\n\t\t\t\tthis.renderHighlight(eventFootprints[i].componentFootprint);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Unrenders any visual indication of an event being dragged\n\tunrenderDrag: function() {\n\t\tthis.unrenderHelper();\n\t\tthis.unrenderHighlight();\n\t},\n\n\n\t/* Event Resize Visualization\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of an event being resized\n\trenderEventResize: function(eventFootprints, seg) {\n\t\treturn this.renderHelperEventFootprints(eventFootprints, seg); // returns mock event elements\n\t},\n\n\n\t// Unrenders any visual indication of an event being resized\n\tunrenderEventResize: function() {\n\t\tthis.unrenderHelper();\n\t},\n\n\n\t/* Event Helper\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a mock \"helper\" event. `sourceSeg` is the original segment object and might be null (an external drag)\n\trenderHelperEventFootprintEls: function(eventFootprints, sourceSeg) {\n\t\tvar segs = this.eventFootprintsToSegs(eventFootprints);\n\n\t\treturn this.renderHelperSegs( // returns mock event elements\n\t\t\tsegs,\n\t\t\tsourceSeg\n\t\t);\n\t},\n\n\n\t// Unrenders any mock helper event\n\tunrenderHelper: function() {\n\t\tthis.unrenderHelperSegs();\n\t},\n\n\n\t/* Business Hours\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderBusinessHours: function() {\n\t\tthis.renderBusinessSegs(\n\t\t\tthis.buildBusinessHourSegs()\n\t\t);\n\t},\n\n\n\tunrenderBusinessHours: function() {\n\t\tthis.unrenderBusinessSegs();\n\t},\n\n\n\t/* Now Indicator\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tgetNowIndicatorUnit: function() {\n\t\treturn 'minute'; // will refresh on the minute\n\t},\n\n\n\trenderNowIndicator: function(date) {\n\t\t// seg system might be overkill, but it handles scenario where line needs to be rendered\n\t\t// more than once because of columns with the same date (resources columns for example)\n\t\tvar segs = this.componentFootprintToSegs(\n\t\t\tnew ComponentFootprint(\n\t\t\t\tnew UnzonedRange(date, date.valueOf() + 1), // protect against null range\n\t\t\t\tfalse // all-day\n\t\t\t)\n\t\t);\n\t\tvar top = this.computeDateTop(date, date);\n\t\tvar nodes = [];\n\t\tvar i;\n\n\t\t// render lines within the columns\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tnodes.push($('
')\n\t\t\t\t.css('top', top)\n\t\t\t\t.appendTo(this.colContainerEls.eq(segs[i].col))[0]);\n\t\t}\n\n\t\t// render an arrow over the axis\n\t\tif (segs.length > 0) { // is the current time in view?\n\t\t\tnodes.push($('
')\n\t\t\t\t.css('top', top)\n\t\t\t\t.appendTo(this.el.find('.fc-content-skeleton'))[0]);\n\t\t}\n\n\t\tthis.nowIndicatorEls = $(nodes);\n\t},\n\n\n\tunrenderNowIndicator: function() {\n\t\tif (this.nowIndicatorEls) {\n\t\t\tthis.nowIndicatorEls.remove();\n\t\t\tthis.nowIndicatorEls = null;\n\t\t}\n\t},\n\n\n\t/* Selection\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of a selection. Overrides the default, which was to simply render a highlight.\n\trenderSelectionFootprint: function(componentFootprint) {\n\t\tif (this.opt('selectHelper')) { // this setting signals that a mock helper event should be rendered\n\t\t\tthis.renderHelperEventFootprints([\n\t\t\t\tthis.fabricateEventFootprint(componentFootprint)\n\t\t\t]);\n\t\t}\n\t\telse {\n\t\t\tthis.renderHighlight(componentFootprint);\n\t\t}\n\t},\n\n\n\t// Unrenders any visual indication of a selection\n\tunrenderSelection: function() {\n\t\tthis.unrenderHelper();\n\t\tthis.unrenderHighlight();\n\t},\n\n\n\t/* Highlight\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderHighlight: function(componentFootprint) {\n\t\tthis.renderHighlightSegs(\n\t\t\tthis.componentFootprintToSegs(componentFootprint)\n\t\t);\n\t},\n\n\n\tunrenderHighlight: function() {\n\t\tthis.unrenderHighlightSegs();\n\t}\n\n});\n\n;;\n\n/* Methods for rendering SEGMENTS, pieces of content that live on the view\n ( this file is no longer just for events )\n----------------------------------------------------------------------------------------------------------------------*/\n\nTimeGrid.mixin({\n\n\tcolContainerEls: null, // containers for each column\n\n\t// inner-containers for each column where different types of segs live\n\tfgContainerEls: null,\n\tbgContainerEls: null,\n\thelperContainerEls: null,\n\thighlightContainerEls: null,\n\tbusinessContainerEls: null,\n\n\t// arrays of different types of displayed segments\n\tfgSegs: null,\n\tbgSegs: null,\n\thelperSegs: null,\n\thighlightSegs: null,\n\tbusinessSegs: null,\n\n\n\t// Renders the DOM that the view's content will live in\n\trenderContentSkeleton: function() {\n\t\tvar cellHtml = '';\n\t\tvar i;\n\t\tvar skeletonEl;\n\n\t\tfor (i = 0; i < this.colCnt; i++) {\n\t\t\tcellHtml +=\n\t\t\t\t'' +\n\t\t\t\t\t'
' +\n\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t'
' +\n\t\t\t\t\t'
' +\n\t\t\t\t'';\n\t\t}\n\n\t\tskeletonEl = $(\n\t\t\t'
' +\n\t\t\t\t'' +\n\t\t\t\t\t'' + cellHtml + '' +\n\t\t\t\t'
' +\n\t\t\t'
'\n\t\t);\n\n\t\tthis.colContainerEls = skeletonEl.find('.fc-content-col');\n\t\tthis.helperContainerEls = skeletonEl.find('.fc-helper-container');\n\t\tthis.fgContainerEls = skeletonEl.find('.fc-event-container:not(.fc-helper-container)');\n\t\tthis.bgContainerEls = skeletonEl.find('.fc-bgevent-container');\n\t\tthis.highlightContainerEls = skeletonEl.find('.fc-highlight-container');\n\t\tthis.businessContainerEls = skeletonEl.find('.fc-business-container');\n\n\t\tthis.bookendCells(skeletonEl.find('tr')); // TODO: do this on string level\n\t\tthis.el.append(skeletonEl);\n\t},\n\n\n\t/* Foreground Events\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderFgSegs: function(segs) {\n\t\tsegs = this.renderFgSegsIntoContainers(segs, this.fgContainerEls);\n\t\tthis.fgSegs = segs;\n\t\treturn segs; // needed for Grid::renderEvents\n\t},\n\n\n\tunrenderFgSegs: function() {\n\t\tthis.unrenderNamedSegs('fgSegs');\n\t},\n\n\n\t/* Foreground Helper Events\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderHelperSegs: function(segs, sourceSeg) {\n\t\tvar helperEls = [];\n\t\tvar i, seg;\n\t\tvar sourceEl;\n\n\t\tsegs = this.renderFgSegsIntoContainers(segs, this.helperContainerEls);\n\n\t\t// Try to make the segment that is in the same row as sourceSeg look the same\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (sourceSeg && sourceSeg.col === seg.col) {\n\t\t\t\tsourceEl = sourceSeg.el;\n\t\t\t\tseg.el.css({\n\t\t\t\t\tleft: sourceEl.css('left'),\n\t\t\t\t\tright: sourceEl.css('right'),\n\t\t\t\t\t'margin-left': sourceEl.css('margin-left'),\n\t\t\t\t\t'margin-right': sourceEl.css('margin-right')\n\t\t\t\t});\n\t\t\t}\n\t\t\thelperEls.push(seg.el[0]);\n\t\t}\n\n\t\tthis.helperSegs = segs;\n\n\t\treturn $(helperEls); // must return rendered helpers\n\t},\n\n\n\tunrenderHelperSegs: function() {\n\t\tthis.unrenderNamedSegs('helperSegs');\n\t},\n\n\n\t/* Background Events\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderBgSegs: function(segs) {\n\t\tsegs = this.renderFillSegEls('bgEvent', segs); // TODO: old fill system\n\t\tthis.updateSegVerticals(segs);\n\t\tthis.attachSegsByCol(this.groupSegsByCol(segs), this.bgContainerEls);\n\t\tthis.bgSegs = segs;\n\t\treturn segs; // needed for Grid::renderEvents\n\t},\n\n\n\tunrenderBgSegs: function() {\n\t\tthis.unrenderNamedSegs('bgSegs');\n\t},\n\n\n\t/* Highlight\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderHighlightSegs: function(segs) {\n\t\tsegs = this.renderFillSegEls('highlight', segs); // TODO: instead of calling renderFill directly\n\t\tthis.updateSegVerticals(segs);\n\t\tthis.attachSegsByCol(this.groupSegsByCol(segs), this.highlightContainerEls);\n\t\tthis.highlightSegs = segs;\n\t},\n\n\n\tunrenderHighlightSegs: function() {\n\t\tthis.unrenderNamedSegs('highlightSegs');\n\t},\n\n\n\t/* Business Hours\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderBusinessSegs: function(segs) {\n\t\tsegs = this.renderFillSegEls('businessHours', segs); // TODO: instead of calling renderFill directly\n\t\tthis.updateSegVerticals(segs);\n\t\tthis.attachSegsByCol(this.groupSegsByCol(segs), this.businessContainerEls);\n\t\tthis.businessSegs = segs;\n\t},\n\n\n\tunrenderBusinessSegs: function() {\n\t\tthis.unrenderNamedSegs('businessSegs');\n\t},\n\n\n\t/* Seg Rendering Utils\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Given a flat array of segments, return an array of sub-arrays, grouped by each segment's col\n\tgroupSegsByCol: function(segs) {\n\t\tvar segsByCol = [];\n\t\tvar i;\n\n\t\tfor (i = 0; i < this.colCnt; i++) {\n\t\t\tsegsByCol.push([]);\n\t\t}\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tsegsByCol[segs[i].col].push(segs[i]);\n\t\t}\n\n\t\treturn segsByCol;\n\t},\n\n\n\t// Given segments grouped by column, insert the segments' elements into a parallel array of container\n\t// elements, each living within a column.\n\tattachSegsByCol: function(segsByCol, containerEls) {\n\t\tvar col;\n\t\tvar segs;\n\t\tvar i;\n\n\t\tfor (col = 0; col < this.colCnt; col++) { // iterate each column grouping\n\t\t\tsegs = segsByCol[col];\n\n\t\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\t\tcontainerEls.eq(col).append(segs[i].el);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Given the name of a property of `this` object, assumed to be an array of segments,\n\t// loops through each segment and removes from DOM. Will null-out the property afterwards.\n\tunrenderNamedSegs: function(propName) {\n\t\tvar segs = this[propName];\n\t\tvar i;\n\n\t\tif (segs) {\n\t\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\t\tsegs[i].el.remove();\n\t\t\t}\n\t\t\tthis[propName] = null;\n\t\t}\n\t},\n\n\n\n\t/* Foreground Event Rendering Utils\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Given an array of foreground segments, render a DOM element for each, computes position,\n\t// and attaches to the column inner-container elements.\n\trenderFgSegsIntoContainers: function(segs, containerEls) {\n\t\tvar segsByCol;\n\t\tvar col;\n\n\t\tsegs = this.renderFgSegEls(segs); // will call fgSegHtml\n\t\tsegsByCol = this.groupSegsByCol(segs);\n\n\t\tfor (col = 0; col < this.colCnt; col++) {\n\t\t\tthis.updateFgSegCoords(segsByCol[col]);\n\t\t}\n\n\t\tthis.attachSegsByCol(segsByCol, containerEls);\n\n\t\treturn segs;\n\t},\n\n\n\t// Renders the HTML for a single event segment's default rendering\n\tfgSegHtml: function(seg, disableResizing) {\n\t\tvar view = this.view;\n\t\tvar calendar = view.calendar;\n\t\tvar componentFootprint = seg.footprint.componentFootprint;\n\t\tvar isAllDay = componentFootprint.isAllDay;\n\t\tvar eventDef = seg.footprint.eventDef;\n\t\tvar isDraggable = view.isEventDefDraggable(eventDef);\n\t\tvar isResizableFromStart = !disableResizing && seg.isStart && view.isEventDefResizableFromStart(eventDef);\n\t\tvar isResizableFromEnd = !disableResizing && seg.isEnd && view.isEventDefResizableFromEnd(eventDef);\n\t\tvar classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd);\n\t\tvar skinCss = cssToStr(this.getSegSkinCss(seg));\n\t\tvar timeText;\n\t\tvar fullTimeText; // more verbose time text. for the print stylesheet\n\t\tvar startTimeText; // just the start time text\n\n\t\tclasses.unshift('fc-time-grid-event', 'fc-v-event');\n\n\t\t// if the event appears to span more than one day...\n\t\tif (view.isMultiDayRange(componentFootprint.unzonedRange)) {\n\t\t\t// Don't display time text on segments that run entirely through a day.\n\t\t\t// That would appear as midnight-midnight and would look dumb.\n\t\t\t// Otherwise, display the time text for the *segment's* times (like 6pm-midnight or midnight-10am)\n\t\t\tif (seg.isStart || seg.isEnd) {\n\t\t\t\tvar zonedStart = calendar.msToMoment(seg.startMs);\n\t\t\t\tvar zonedEnd = calendar.msToMoment(seg.endMs);\n\t\t\t\ttimeText = this._getEventTimeText(zonedStart, zonedEnd, isAllDay);\n\t\t\t\tfullTimeText = this._getEventTimeText(zonedStart, zonedEnd, isAllDay, 'LT');\n\t\t\t\tstartTimeText = this._getEventTimeText(zonedStart, zonedEnd, isAllDay, null, false); // displayEnd=false\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Display the normal time text for the *event's* times\n\t\t\ttimeText = this.getEventTimeText(seg.footprint);\n\t\t\tfullTimeText = this.getEventTimeText(seg.footprint, 'LT');\n\t\t\tstartTimeText = this.getEventTimeText(seg.footprint, null, false); // displayEnd=false\n\t\t}\n\n\t\treturn '
' +\n\t\t\t\t'
' +\n\t\t\t\t\t(timeText ?\n\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\t'' + htmlEscape(timeText) + '' +\n\t\t\t\t\t\t'
' :\n\t\t\t\t\t\t''\n\t\t\t\t\t\t) +\n\t\t\t\t\t(eventDef.title ?\n\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\thtmlEscape(eventDef.title) +\n\t\t\t\t\t\t'
' :\n\t\t\t\t\t\t''\n\t\t\t\t\t\t) +\n\t\t\t\t'
' +\n\t\t\t\t'
' +\n\t\t\t\t/* TODO: write CSS for this\n\t\t\t\t(isResizableFromStart ?\n\t\t\t\t\t'
' :\n\t\t\t\t\t''\n\t\t\t\t\t) +\n\t\t\t\t*/\n\t\t\t\t(isResizableFromEnd ?\n\t\t\t\t\t'
' :\n\t\t\t\t\t''\n\t\t\t\t\t) +\n\t\t\t'';\n\t},\n\n\n\t/* Seg Position Utils\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Refreshes the CSS top/bottom coordinates for each segment element.\n\t// Works when called after initial render, after a window resize/zoom for example.\n\tupdateSegVerticals: function(segs) {\n\t\tthis.computeSegVerticals(segs);\n\t\tthis.assignSegVerticals(segs);\n\t},\n\n\n\t// For each segment in an array, computes and assigns its top and bottom properties\n\tcomputeSegVerticals: function(segs) {\n\t\tvar i, seg;\n\t\tvar dayDate;\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\t\t\tdayDate = this.dayDates[seg.dayIndex];\n\n\t\t\tseg.top = this.computeDateTop(seg.startMs, dayDate);\n\t\t\tseg.bottom = this.computeDateTop(seg.endMs, dayDate);\n\t\t}\n\t},\n\n\n\t// Given segments that already have their top/bottom properties computed, applies those values to\n\t// the segments' elements.\n\tassignSegVerticals: function(segs) {\n\t\tvar i, seg;\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\t\t\tseg.el.css(this.generateSegVerticalCss(seg));\n\t\t}\n\t},\n\n\n\t// Generates an object with CSS properties for the top/bottom coordinates of a segment element\n\tgenerateSegVerticalCss: function(seg) {\n\t\treturn {\n\t\t\ttop: seg.top,\n\t\t\tbottom: -seg.bottom // flipped because needs to be space beyond bottom edge of event container\n\t\t};\n\t},\n\n\n\t/* Foreground Event Positioning Utils\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Given segments that are assumed to all live in the *same column*,\n\t// compute their verical/horizontal coordinates and assign to their elements.\n\tupdateFgSegCoords: function(segs) {\n\t\tthis.computeSegVerticals(segs); // horizontals relies on this\n\t\tthis.computeFgSegHorizontals(segs); // compute horizontal coordinates, z-index's, and reorder the array\n\t\tthis.assignSegVerticals(segs);\n\t\tthis.assignFgSegHorizontals(segs);\n\t},\n\n\n\t// Given an array of segments that are all in the same column, sets the backwardCoord and forwardCoord on each.\n\t// NOTE: Also reorders the given array by date!\n\tcomputeFgSegHorizontals: function(segs) {\n\t\tvar levels;\n\t\tvar level0;\n\t\tvar i;\n\n\t\tthis.sortEventSegs(segs); // order by certain criteria\n\t\tlevels = buildSlotSegLevels(segs);\n\t\tcomputeForwardSlotSegs(levels);\n\n\t\tif ((level0 = levels[0])) {\n\n\t\t\tfor (i = 0; i < level0.length; i++) {\n\t\t\t\tcomputeSlotSegPressures(level0[i]);\n\t\t\t}\n\n\t\t\tfor (i = 0; i < level0.length; i++) {\n\t\t\t\tthis.computeFgSegForwardBack(level0[i], 0, 0);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Calculate seg.forwardCoord and seg.backwardCoord for the segment, where both values range\n\t// from 0 to 1. If the calendar is left-to-right, the seg.backwardCoord maps to \"left\" and\n\t// seg.forwardCoord maps to \"right\" (via percentage). Vice-versa if the calendar is right-to-left.\n\t//\n\t// The segment might be part of a \"series\", which means consecutive segments with the same pressure\n\t// who's width is unknown until an edge has been hit. `seriesBackwardPressure` is the number of\n\t// segments behind this one in the current series, and `seriesBackwardCoord` is the starting\n\t// coordinate of the first segment in the series.\n\tcomputeFgSegForwardBack: function(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\t\tvar forwardSegs = seg.forwardSegs;\n\t\tvar i;\n\n\t\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\t\tif (!forwardSegs.length) {\n\n\t\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\t\tseg.forwardCoord = 1;\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t// sort highest pressure first\n\t\t\t\tthis.sortForwardSegs(forwardSegs);\n\n\t\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t\t// highest-pressure forward segment.\n\t\t\t\tthis.computeFgSegForwardBack(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t\t}\n\n\t\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t\t// forward segments\n\t\t\tfor (i=0; i seg2.top && seg1.top < seg2.bottom;\n}\n\n;;\n\n/* An abstract class from which other views inherit from\n----------------------------------------------------------------------------------------------------------------------*/\n\nvar View = FC.View = ChronoComponent.extend({\n\n\ttype: null, // subclass' view name (string)\n\tname: null, // deprecated. use `type` instead\n\ttitle: null, // the text that will be displayed in the header's title\n\n\tcalendar: null, // owner Calendar object\n\tviewSpec: null,\n\toptions: null, // hash containing all options. already merged with view-specific-options\n\n\trenderQueue: null,\n\tbatchRenderDepth: 0,\n\tisDatesRendered: false,\n\tisEventsRendered: false,\n\tisBaseRendered: false, // related to viewRender/viewDestroy triggers\n\n\tqueuedScroll: null,\n\n\tisSelected: false, // boolean whether a range of time is user-selected or not\n\tselectedEventInstance: null,\n\n\teventOrderSpecs: null, // criteria for ordering events when they have same date/time\n\n\t// for date utils, computed from options\n\tisHiddenDayHash: null,\n\n\t// now indicator\n\tisNowIndicatorRendered: null,\n\tinitialNowDate: null, // result first getNow call\n\tinitialNowQueriedMs: null, // ms time the getNow was called\n\tnowIndicatorTimeoutID: null, // for refresh timing of now indicator\n\tnowIndicatorIntervalID: null, // \"\n\n\n\tconstructor: function(calendar, viewSpec) {\n\t\tthis.calendar = calendar;\n\t\tthis.viewSpec = viewSpec;\n\n\t\t// shortcuts\n\t\tthis.type = viewSpec.type;\n\t\tthis.options = viewSpec.options;\n\n\t\t// .name is deprecated\n\t\tthis.name = this.type;\n\n\t\tChronoComponent.call(this);\n\n\t\tthis.initHiddenDays();\n\t\tthis.eventOrderSpecs = parseFieldSpecs(this.opt('eventOrder'));\n\n\t\tthis.renderQueue = this.buildRenderQueue();\n\t\tthis.initAutoBatchRender();\n\n\t\tthis.initialize();\n\t},\n\n\n\tbuildRenderQueue: function() {\n\t\tvar _this = this;\n\t\tvar renderQueue = new RenderQueue({\n\t\t\tevent: this.opt('eventRenderWait')\n\t\t});\n\n\t\trenderQueue.on('start', function() {\n\t\t\t_this.freezeHeight();\n\t\t\t_this.addScroll(_this.queryScroll());\n\t\t});\n\n\t\trenderQueue.on('stop', function() {\n\t\t\t_this.thawHeight();\n\t\t\t_this.popScroll();\n\t\t});\n\n\t\treturn renderQueue;\n\t},\n\n\n\tinitAutoBatchRender: function() {\n\t\tvar _this = this;\n\n\t\tthis.on('before:change', function() {\n\t\t\t_this.startBatchRender();\n\t\t});\n\n\t\tthis.on('change', function() {\n\t\t\t_this.stopBatchRender();\n\t\t});\n\t},\n\n\n\tstartBatchRender: function() {\n\t\tif (!(this.batchRenderDepth++)) {\n\t\t\tthis.renderQueue.pause();\n\t\t}\n\t},\n\n\n\tstopBatchRender: function() {\n\t\tif (!(--this.batchRenderDepth)) {\n\t\t\tthis.renderQueue.resume();\n\t\t}\n\t},\n\n\n\t// A good place for subclasses to initialize member variables\n\tinitialize: function() {\n\t\t// subclasses can implement\n\t},\n\n\n\t// Retrieves an option with the given name\n\topt: function(name) {\n\t\treturn this.options[name];\n\t},\n\n\n\t/* Title and Date Formatting\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Computes what the title at the top of the calendar should be for this view\n\tcomputeTitle: function() {\n\t\tvar unzonedRange;\n\n\t\t// for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n\t\tif (/^(year|month)$/.test(this.currentRangeUnit)) {\n\t\t\tunzonedRange = this.currentUnzonedRange;\n\t\t}\n\t\telse { // for day units or smaller, use the actual day range\n\t\t\tunzonedRange = this.activeUnzonedRange;\n\t\t}\n\n\t\treturn this.formatRange(\n\t\t\t{\n\t\t\t\tstart: this.calendar.msToMoment(unzonedRange.startMs, this.isRangeAllDay),\n\t\t\t\tend: this.calendar.msToMoment(unzonedRange.endMs, this.isRangeAllDay)\n\t\t\t},\n\t\t\tthis.isRangeAllDay,\n\t\t\tthis.opt('titleFormat') || this.computeTitleFormat(),\n\t\t\tthis.opt('titleRangeSeparator')\n\t\t);\n\t},\n\n\n\t// Generates the format string that should be used to generate the title for the current date range.\n\t// Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.\n\tcomputeTitleFormat: function() {\n\t\tif (this.currentRangeUnit == 'year') {\n\t\t\treturn 'YYYY';\n\t\t}\n\t\telse if (this.currentRangeUnit == 'month') {\n\t\t\treturn this.opt('monthYearFormat'); // like \"September 2014\"\n\t\t}\n\t\telse if (this.currentRangeAs('days') > 1) {\n\t\t\treturn 'll'; // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n\t\t}\n\t\telse {\n\t\t\treturn 'LL'; // one day. longer, like \"September 9 2014\"\n\t\t}\n\t},\n\n\n\t// Element\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tsetElement: function(el) {\n\t\tChronoComponent.prototype.setElement.apply(this, arguments);\n\n\t\tthis.bindBaseRenderHandlers();\n\t},\n\n\n\tremoveElement: function() {\n\t\tthis.unsetDate();\n\t\tthis.unbindBaseRenderHandlers();\n\n\t\tChronoComponent.prototype.removeElement.apply(this, arguments);\n\t},\n\n\n\t// Date Setting/Unsetting\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tsetDate: function(date) {\n\t\tvar currentDateProfile = this.get('dateProfile');\n\t\tvar newDateProfile = this.buildDateProfile(date, null, true); // forceToValid=true\n\n\t\tif (\n\t\t\t!currentDateProfile ||\n\t\t\t!currentDateProfile.activeUnzonedRange.equals(newDateProfile.activeUnzonedRange)\n\t\t) {\n\t\t\tthis.set('dateProfile', newDateProfile);\n\t\t}\n\n\t\treturn newDateProfile.date;\n\t},\n\n\n\tunsetDate: function() {\n\t\tthis.unset('dateProfile');\n\t},\n\n\n\t// Date Rendering\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\trequestDateRender: function(dateProfile) {\n\t\tvar _this = this;\n\n\t\tthis.renderQueue.queue(function() {\n\t\t\t_this.executeDateRender(dateProfile);\n\t\t}, 'date', 'init');\n\t},\n\n\n\trequestDateUnrender: function() {\n\t\tvar _this = this;\n\n\t\tthis.renderQueue.queue(function() {\n\t\t\t_this.executeDateUnrender();\n\t\t}, 'date', 'destroy');\n\t},\n\n\n\t// Event Data\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tfetchInitialEvents: function(dateProfile) {\n\t\tvar calendar = this.calendar;\n\t\tvar forceAllDay = dateProfile.isRangeAllDay && !this.usesMinMaxTime;\n\n\t\treturn calendar.requestEvents(\n\t\t\tcalendar.msToMoment(dateProfile.activeUnzonedRange.startMs, forceAllDay),\n\t\t\tcalendar.msToMoment(dateProfile.activeUnzonedRange.endMs, forceAllDay)\n\t\t);\n\t},\n\n\n\tbindEventChanges: function() {\n\t\tthis.listenTo(this.calendar, 'eventsReset', this.resetEvents);\n\t},\n\n\n\tunbindEventChanges: function() {\n\t\tthis.stopListeningTo(this.calendar, 'eventsReset');\n\t},\n\n\n\tsetEvents: function(eventsPayload) {\n\t\tthis.set('currentEvents', eventsPayload);\n\t\tthis.set('hasEvents', true);\n\t},\n\n\n\tunsetEvents: function() {\n\t\tthis.unset('currentEvents');\n\t\tthis.unset('hasEvents');\n\t},\n\n\n\tresetEvents: function(eventsPayload) {\n\t\tthis.startBatchRender();\n\t\tthis.unsetEvents();\n\t\tthis.setEvents(eventsPayload);\n\t\tthis.stopBatchRender();\n\t},\n\n\n\t// Event Rendering\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\trequestEventsRender: function(eventsPayload) {\n\t\tvar _this = this;\n\n\t\tthis.renderQueue.queue(function() {\n\t\t\t_this.executeEventsRender(eventsPayload);\n\t\t}, 'event', 'init');\n\t},\n\n\n\trequestEventsUnrender: function() {\n\t\tvar _this = this;\n\n\t\tthis.renderQueue.queue(function() {\n\t\t\t_this.executeEventsUnrender();\n\t\t}, 'event', 'destroy');\n\t},\n\n\n\t// Date High-level Rendering\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// if dateProfile not specified, uses current\n\texecuteDateRender: function(dateProfile, skipScroll) {\n\n\t\tthis.setDateProfileForRendering(dateProfile);\n\n\t\tif (this.render) {\n\t\t\tthis.render(); // TODO: deprecate\n\t\t}\n\n\t\tthis.renderDates();\n\t\tthis.updateSize();\n\t\tthis.renderBusinessHours(); // might need coordinates, so should go after updateSize()\n\t\tthis.startNowIndicator();\n\n\t\tif (!skipScroll) {\n\t\t\tthis.addScroll(this.computeInitialDateScroll());\n\t\t}\n\n\t\tthis.isDatesRendered = true;\n\t\tthis.trigger('datesRendered');\n\t},\n\n\n\texecuteDateUnrender: function() {\n\n\t\tthis.unselect();\n\t\tthis.stopNowIndicator();\n\n\t\tthis.trigger('before:datesUnrendered');\n\n\t\tthis.unrenderBusinessHours();\n\t\tthis.unrenderDates();\n\n\t\tif (this.destroy) {\n\t\t\tthis.destroy(); // TODO: deprecate\n\t\t}\n\n\t\tthis.isDatesRendered = false;\n\t},\n\n\n\t// Determing when the \"meat\" of the view is rendered (aka the base)\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tbindBaseRenderHandlers: function() {\n\t\tvar _this = this;\n\n\t\tthis.on('datesRendered.baseHandler', function() {\n\t\t\t_this.onBaseRender();\n\t\t});\n\n\t\tthis.on('before:datesUnrendered.baseHandler', function() {\n\t\t\t_this.onBeforeBaseUnrender();\n\t\t});\n\t},\n\n\n\tunbindBaseRenderHandlers: function() {\n\t\tthis.off('.baseHandler');\n\t},\n\n\n\tonBaseRender: function() {\n\t\tthis.applyScreenState();\n\t\tthis.publiclyTrigger('viewRender', {\n\t\t\tcontext: this,\n\t\t\targs: [ this, this.el ]\n\t\t});\n\t},\n\n\n\tonBeforeBaseUnrender: function() {\n\t\tthis.applyScreenState();\n\t\tthis.publiclyTrigger('viewDestroy', {\n\t\t\tcontext: this,\n\t\t\targs: [ this, this.el ]\n\t\t});\n\t},\n\n\n\t// Misc view rendering utils\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// Binds DOM handlers to elements that reside outside the view container, such as the document\n\tbindGlobalHandlers: function() {\n\t\tthis.listenTo(GlobalEmitter.get(), {\n\t\t\ttouchstart: this.processUnselect,\n\t\t\tmousedown: this.handleDocumentMousedown\n\t\t});\n\t},\n\n\n\t// Unbinds DOM handlers from elements that reside outside the view container\n\tunbindGlobalHandlers: function() {\n\t\tthis.stopListeningTo(GlobalEmitter.get());\n\t},\n\n\n\t/* Now Indicator\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Immediately render the current time indicator and begins re-rendering it at an interval,\n\t// which is defined by this.getNowIndicatorUnit().\n\t// TODO: somehow do this for the current whole day's background too\n\tstartNowIndicator: function() {\n\t\tvar _this = this;\n\t\tvar unit;\n\t\tvar update;\n\t\tvar delay; // ms wait value\n\n\t\tif (this.opt('nowIndicator')) {\n\t\t\tunit = this.getNowIndicatorUnit();\n\t\t\tif (unit) {\n\t\t\t\tupdate = proxy(this, 'updateNowIndicator'); // bind to `this`\n\n\t\t\t\tthis.initialNowDate = this.calendar.getNow();\n\t\t\t\tthis.initialNowQueriedMs = +new Date();\n\t\t\t\tthis.renderNowIndicator(this.initialNowDate);\n\t\t\t\tthis.isNowIndicatorRendered = true;\n\n\t\t\t\t// wait until the beginning of the next interval\n\t\t\t\tdelay = this.initialNowDate.clone().startOf(unit).add(1, unit) - this.initialNowDate;\n\t\t\t\tthis.nowIndicatorTimeoutID = setTimeout(function() {\n\t\t\t\t\t_this.nowIndicatorTimeoutID = null;\n\t\t\t\t\tupdate();\n\t\t\t\t\tdelay = +moment.duration(1, unit);\n\t\t\t\t\tdelay = Math.max(100, delay); // prevent too frequent\n\t\t\t\t\t_this.nowIndicatorIntervalID = setInterval(update, delay); // update every interval\n\t\t\t\t}, delay);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// rerenders the now indicator, computing the new current time from the amount of time that has passed\n\t// since the initial getNow call.\n\tupdateNowIndicator: function() {\n\t\tif (this.isNowIndicatorRendered) {\n\t\t\tthis.unrenderNowIndicator();\n\t\t\tthis.renderNowIndicator(\n\t\t\t\tthis.initialNowDate.clone().add(new Date() - this.initialNowQueriedMs) // add ms\n\t\t\t);\n\t\t}\n\t},\n\n\n\t// Immediately unrenders the view's current time indicator and stops any re-rendering timers.\n\t// Won't cause side effects if indicator isn't rendered.\n\tstopNowIndicator: function() {\n\t\tif (this.isNowIndicatorRendered) {\n\n\t\t\tif (this.nowIndicatorTimeoutID) {\n\t\t\t\tclearTimeout(this.nowIndicatorTimeoutID);\n\t\t\t\tthis.nowIndicatorTimeoutID = null;\n\t\t\t}\n\t\t\tif (this.nowIndicatorIntervalID) {\n\t\t\t\tclearTimeout(this.nowIndicatorIntervalID);\n\t\t\t\tthis.nowIndicatorIntervalID = null;\n\t\t\t}\n\n\t\t\tthis.unrenderNowIndicator();\n\t\t\tthis.isNowIndicatorRendered = false;\n\t\t}\n\t},\n\n\n\t/* Dimensions\n\t------------------------------------------------------------------------------------------------------------------*/\n\t// TODO: move some of these to ChronoComponent\n\n\n\t// Refreshes anything dependant upon sizing of the container element of the grid\n\tupdateSize: function(isResize) {\n\t\tvar scroll;\n\n\t\tif (isResize) {\n\t\t\tscroll = this.queryScroll();\n\t\t}\n\n\t\tthis.updateHeight(isResize);\n\t\tthis.updateWidth(isResize);\n\t\tthis.updateNowIndicator();\n\n\t\tif (isResize) {\n\t\t\tthis.applyScroll(scroll);\n\t\t}\n\t},\n\n\n\t// Refreshes the horizontal dimensions of the calendar\n\tupdateWidth: function(isResize) {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Refreshes the vertical dimensions of the calendar\n\tupdateHeight: function(isResize) {\n\t\tvar calendar = this.calendar; // we poll the calendar for height information\n\n\t\tthis.setHeight(\n\t\t\tcalendar.getSuggestedViewHeight(),\n\t\t\tcalendar.isHeightAuto()\n\t\t);\n\t},\n\n\n\t// Updates the vertical dimensions of the calendar to the specified height.\n\t// if `isAuto` is set to true, height becomes merely a suggestion and the view should use its \"natural\" height.\n\tsetHeight: function(height, isAuto) {\n\t\t// subclasses should implement\n\t},\n\n\n\t/* Scroller\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\taddForcedScroll: function(scroll) {\n\t\tthis.addScroll(\n\t\t\t$.extend(scroll, { isForced: true })\n\t\t);\n\t},\n\n\n\taddScroll: function(scroll) {\n\t\tvar queuedScroll = this.queuedScroll || (this.queuedScroll = {});\n\n\t\tif (!queuedScroll.isForced) {\n\t\t\t$.extend(queuedScroll, scroll);\n\t\t}\n\t},\n\n\n\tpopScroll: function() {\n\t\tthis.applyQueuedScroll();\n\t\tthis.queuedScroll = null;\n\t},\n\n\n\tapplyQueuedScroll: function() {\n\t\tif (this.queuedScroll) {\n\t\t\tthis.applyScroll(this.queuedScroll);\n\t\t}\n\t},\n\n\n\tqueryScroll: function() {\n\t\tvar scroll = {};\n\n\t\tif (this.isDatesRendered) {\n\t\t\t$.extend(scroll, this.queryDateScroll());\n\t\t}\n\n\t\treturn scroll;\n\t},\n\n\n\tapplyScroll: function(scroll) {\n\t\tif (this.isDatesRendered) {\n\t\t\tthis.applyDateScroll(scroll);\n\t\t}\n\t},\n\n\n\tcomputeInitialDateScroll: function() {\n\t\treturn {}; // subclasses must implement\n\t},\n\n\n\tqueryDateScroll: function() {\n\t\treturn {}; // subclasses must implement\n\t},\n\n\n\tapplyDateScroll: function(scroll) {\n\t\t; // subclasses must implement\n\t},\n\n\n\t/* Height Freezing\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tfreezeHeight: function() {\n\t\tthis.calendar.freezeContentHeight();\n\t},\n\n\n\tthawHeight: function() {\n\t\tthis.calendar.thawContentHeight();\n\t},\n\n\n\t// Event High-level Rendering\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\texecuteEventsRender: function(eventsPayload) {\n\n\t\tif (this.renderEvents) { // for legacy custom views\n\t\t\tthis.renderEvents(convertEventsPayloadToLegacyArray(eventsPayload));\n\t\t}\n\t\telse {\n\t\t\tthis.renderEventsPayload(eventsPayload);\n\t\t}\n\n\t\tthis.isEventsRendered = true;\n\n\t\tthis.onEventsRender();\n\t},\n\n\n\texecuteEventsUnrender: function() {\n\t\tthis.onBeforeEventsUnrender();\n\n\t\tif (this.destroyEvents) {\n\t\t\tthis.destroyEvents(); // TODO: deprecate\n\t\t}\n\n\t\tthis.unrenderEvents();\n\t\tthis.isEventsRendered = false;\n\t},\n\n\n\t// Event Rendering Triggers\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// Signals that all events have been rendered\n\tonEventsRender: function() {\n\t\tvar _this = this;\n\t\tvar hasSingleHandlers = this.hasPublicHandlers('eventAfterRender');\n\n\t\tif (hasSingleHandlers || this.hasPublicHandlers('eventAfterAllRender')) {\n\t\t\tthis.applyScreenState();\n\t\t}\n\n\t\tif (hasSingleHandlers) {\n\t\t\tthis.getEventSegs().forEach(function(seg) {\n\t\t\t\tvar legacy;\n\n\t\t\t\tif (seg.el) { // necessary?\n\t\t\t\t\tlegacy = seg.footprint.getEventLegacy();\n\n\t\t\t\t\t_this.publiclyTrigger('eventAfterRender', {\n\t\t\t\t\t\tcontext: legacy,\n\t\t\t\t\t\targs: [ legacy, seg.el, _this ]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis.publiclyTrigger('eventAfterAllRender', {\n\t\t\tcontext: this,\n\t\t\targs: [ this ]\n\t\t});\n\t},\n\n\n\t// Signals that all event elements are about to be removed\n\tonBeforeEventsUnrender: function() {\n\t\tvar _this = this;\n\n\t\tif (this.hasPublicHandlers('eventDestroy')) {\n\n\t\t\tthis.applyScreenState();\n\n\t\t\tthis.getEventSegs().forEach(function(seg) {\n\t\t\t\tvar legacy;\n\n\t\t\t\tif (seg.el) { // necessary?\n\t\t\t\t\tlegacy = seg.footprint.getEventLegacy();\n\n\t\t\t\t\t_this.publiclyTrigger('eventDestroy', {\n\t\t\t\t\t\tcontext: legacy,\n\t\t\t\t\t\targs: [ legacy, seg.el, _this ]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\n\n\tapplyScreenState: function() {\n\t\tthis.thawHeight();\n\t\tthis.freezeHeight();\n\t\tthis.applyQueuedScroll();\n\t},\n\n\n\t// Event Rendering Utils\n\t// -----------------------------------------------------------------------------------------------------------------\n\t// TODO: move this to ChronoComponent\n\n\n\t// Hides all rendered event segments linked to the given event\n\tshowEventsWithId: function(eventDefId) {\n\t\tthis.getEventSegs().forEach(function(seg) {\n\t\t\tif (\n\t\t\t\tseg.footprint.eventDef.id === eventDefId &&\n\t\t\t\tseg.el // necessary?\n\t\t\t) {\n\t\t\t\tseg.el.css('visibility', '');\n\t\t\t}\n\t\t});\n\t},\n\n\n\t// Shows all rendered event segments linked to the given event\n\thideEventsWithId: function(eventDefId) {\n\t\tthis.getEventSegs().forEach(function(seg) {\n\t\t\tif (\n\t\t\t\tseg.footprint.eventDef.id === eventDefId &&\n\t\t\t\tseg.el // necessary?\n\t\t\t) {\n\t\t\t\tseg.el.css('visibility', 'hidden');\n\t\t\t}\n\t\t});\n\t},\n\n\n\t/* Event Drag-n-Drop\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\treportEventDrop: function(eventInstance, eventMutation, el, ev) {\n\t\tvar eventManager = this.calendar.eventManager;\n\t\tvar undoFunc = eventManager.mutateEventsWithId(\n\t\t\teventInstance.def.id,\n\t\t\teventMutation,\n\t\t\tthis.calendar\n\t\t);\n\t\tvar dateMutation = eventMutation.dateMutation;\n\n\t\t// update the EventInstance, for handlers\n\t\tif (dateMutation) {\n\t\t\teventInstance.dateProfile = dateMutation.buildNewDateProfile(\n\t\t\t\teventInstance.dateProfile,\n\t\t\t\tthis.calendar\n\t\t\t);\n\t\t}\n\n\t\tthis.triggerEventDrop(\n\t\t\teventInstance,\n\t\t\t// a drop doesn't necessarily mean a date mutation (ex: resource change)\n\t\t\t(dateMutation && dateMutation.dateDelta) || moment.duration(),\n\t\t\tundoFunc,\n\t\t\tel, ev\n\t\t);\n\t},\n\n\n\t// Triggers event-drop handlers that have subscribed via the API\n\ttriggerEventDrop: function(eventInstance, dateDelta, undoFunc, el, ev) {\n\t\tthis.publiclyTrigger('eventDrop', {\n\t\t\tcontext: el[0],\n\t\t\targs: [\n\t\t\t\teventInstance.toLegacy(),\n\t\t\t\tdateDelta,\n\t\t\t\tundoFunc,\n\t\t\t\tev,\n\t\t\t\t{}, // {} = jqui dummy\n\t\t\t\tthis\n\t\t\t]\n\t\t});\n\t},\n\n\n\t/* External Element Drag-n-Drop\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Must be called when an external element, via jQuery UI, has been dropped onto the calendar.\n\t// `meta` is the parsed data that has been embedded into the dragging event.\n\t// `dropLocation` is an object that contains the new zoned start/end/allDay values for the event.\n\treportExternalDrop: function(singleEventDef, isEvent, isSticky, el, ev, ui) {\n\n\t\tif (isEvent) {\n\t\t\tthis.calendar.eventManager.addEventDef(singleEventDef, isSticky);\n\t\t}\n\n\t\tthis.triggerExternalDrop(singleEventDef, isEvent, el, ev, ui);\n\t},\n\n\n\t// Triggers external-drop handlers that have subscribed via the API\n\ttriggerExternalDrop: function(singleEventDef, isEvent, el, ev, ui) {\n\n\t\t// trigger 'drop' regardless of whether element represents an event\n\t\tthis.publiclyTrigger('drop', {\n\t\t\tcontext: el[0],\n\t\t\targs: [\n\t\t\t\tsingleEventDef.dateProfile.start.clone(),\n\t\t\t\tev,\n\t\t\t\tui,\n\t\t\t\tthis\n\t\t\t]\n\t\t});\n\n\t\tif (isEvent) {\n\t\t\t// signal an external event landed\n\t\t\tthis.publiclyTrigger('eventReceive', {\n\t\t\t\tcontext: this,\n\t\t\t\targs: [\n\t\t\t\t\tsingleEventDef.buildInstance().toLegacy(),\n\t\t\t\t\tthis\n\t\t\t\t]\n\t\t\t});\n\t\t}\n\t},\n\n\n\t/* Event Resizing\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Must be called when an event in the view has been resized to a new length\n\treportEventResize: function(eventInstance, eventMutation, el, ev) {\n\t\tvar eventManager = this.calendar.eventManager;\n\t\tvar undoFunc = eventManager.mutateEventsWithId(\n\t\t\teventInstance.def.id,\n\t\t\teventMutation,\n\t\t\tthis.calendar\n\t\t);\n\n\t\t// update the EventInstance, for handlers\n\t\teventInstance.dateProfile = eventMutation.dateMutation.buildNewDateProfile(\n\t\t\teventInstance.dateProfile,\n\t\t\tthis.calendar\n\t\t);\n\n\t\tthis.triggerEventResize(\n\t\t\teventInstance,\n\t\t\teventMutation.dateMutation.endDelta,\n\t\t\tundoFunc,\n\t\t\tel, ev\n\t\t);\n\t},\n\n\n\t// Triggers event-resize handlers that have subscribed via the API\n\ttriggerEventResize: function(eventInstance, durationDelta, undoFunc, el, ev) {\n\t\tthis.publiclyTrigger('eventResize', {\n\t\t\tcontext: el[0],\n\t\t\targs: [\n\t\t\t\teventInstance.toLegacy(),\n\t\t\t\tdurationDelta,\n\t\t\t\tundoFunc,\n\t\t\t\tev,\n\t\t\t\t{}, // {} = jqui dummy\n\t\t\t\tthis\n\t\t\t]\n\t\t});\n\t},\n\n\n\t/* Selection (time range)\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Selects a date span on the view. `start` and `end` are both Moments.\n\t// `ev` is the native mouse event that begin the interaction.\n\tselect: function(footprint, ev) {\n\t\tthis.unselect(ev);\n\t\tthis.renderSelectionFootprint(footprint);\n\t\tthis.reportSelection(footprint, ev);\n\t},\n\n\n\trenderSelectionFootprint: function(footprint, ev) {\n\t\tif (this.renderSelection) { // legacy method in custom view classes\n\t\t\tthis.renderSelection(\n\t\t\t\tfootprint.toLegacy(this.calendar)\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\tChronoComponent.prototype.renderSelectionFootprint.apply(this, arguments);\n\t\t}\n\t},\n\n\n\t// Called when a new selection is made. Updates internal state and triggers handlers.\n\treportSelection: function(footprint, ev) {\n\t\tthis.isSelected = true;\n\t\tthis.triggerSelect(footprint, ev);\n\t},\n\n\n\t// Triggers handlers to 'select'\n\ttriggerSelect: function(footprint, ev) {\n\t\tvar dateProfile = this.calendar.footprintToDateProfile(footprint); // abuse of \"Event\"DateProfile?\n\n\t\tthis.publiclyTrigger('select', {\n\t\t\tcontext: this,\n\t\t\targs: [\n\t\t\t\tdateProfile.start,\n\t\t\t\tdateProfile.end,\n\t\t\t\tev,\n\t\t\t\tthis\n\t\t\t]\n\t\t});\n\t},\n\n\n\t// Undoes a selection. updates in the internal state and triggers handlers.\n\t// `ev` is the native mouse event that began the interaction.\n\tunselect: function(ev) {\n\t\tif (this.isSelected) {\n\t\t\tthis.isSelected = false;\n\t\t\tif (this.destroySelection) {\n\t\t\t\tthis.destroySelection(); // TODO: deprecate\n\t\t\t}\n\t\t\tthis.unrenderSelection();\n\t\t\tthis.publiclyTrigger('unselect', {\n\t\t\t\tcontext: this,\n\t\t\t\targs: [ ev, this ]\n\t\t\t});\n\t\t}\n\t},\n\n\n\t/* Event Selection\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tselectEventInstance: function(eventInstance) {\n\t\tif (\n\t\t\t!this.selectedEventInstance ||\n\t\t\tthis.selectedEventInstance !== eventInstance\n\t\t) {\n\t\t\tthis.unselectEventInstance();\n\n\t\t\tthis.getEventSegs().forEach(function(seg) {\n\t\t\t\tif (\n\t\t\t\t\tseg.footprint.eventInstance === eventInstance &&\n\t\t\t\t\tseg.el // necessary?\n\t\t\t\t) {\n\t\t\t\t\tseg.el.addClass('fc-selected');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.selectedEventInstance = eventInstance;\n\t\t}\n\t},\n\n\n\tunselectEventInstance: function() {\n\t\tif (this.selectedEventInstance) {\n\n\t\t\tthis.getEventSegs().forEach(function(seg) {\n\t\t\t\tif (seg.el) { // necessary?\n\t\t\t\t\tseg.el.removeClass('fc-selected');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.selectedEventInstance = null;\n\t\t}\n\t},\n\n\n\tisEventDefSelected: function(eventDef) {\n\t\t// event references might change on refetchEvents(), while selectedEventInstance doesn't,\n\t\t// so compare IDs\n\t\treturn this.selectedEventInstance && this.selectedEventInstance.def.id === eventDef.id;\n\t},\n\n\n\t/* Mouse / Touch Unselecting (time range & event unselection)\n\t------------------------------------------------------------------------------------------------------------------*/\n\t// TODO: move consistently to down/start or up/end?\n\t// TODO: don't kill previous selection if touch scrolling\n\n\n\thandleDocumentMousedown: function(ev) {\n\t\tif (isPrimaryMouseButton(ev)) {\n\t\t\tthis.processUnselect(ev);\n\t\t}\n\t},\n\n\n\tprocessUnselect: function(ev) {\n\t\tthis.processRangeUnselect(ev);\n\t\tthis.processEventUnselect(ev);\n\t},\n\n\n\tprocessRangeUnselect: function(ev) {\n\t\tvar ignore;\n\n\t\t// is there a time-range selection?\n\t\tif (this.isSelected && this.opt('unselectAuto')) {\n\t\t\t// only unselect if the clicked element is not identical to or inside of an 'unselectCancel' element\n\t\t\tignore = this.opt('unselectCancel');\n\t\t\tif (!ignore || !$(ev.target).closest(ignore).length) {\n\t\t\t\tthis.unselect(ev);\n\t\t\t}\n\t\t}\n\t},\n\n\n\tprocessEventUnselect: function(ev) {\n\t\tif (this.selectedEventInstance) {\n\t\t\tif (!$(ev.target).closest('.fc-selected').length) {\n\t\t\t\tthis.unselectEventInstance();\n\t\t\t}\n\t\t}\n\t},\n\n\n\t/* Day Click\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Triggers handlers to 'dayClick'\n\t// Span has start/end of the clicked area. Only the start is useful.\n\ttriggerDayClick: function(footprint, dayEl, ev) {\n\t\tvar dateProfile = this.calendar.footprintToDateProfile(footprint); // abuse of \"Event\"DateProfile?\n\n\t\tthis.publiclyTrigger('dayClick', {\n\t\t\tcontext: dayEl,\n\t\t\targs: [ dateProfile.start, ev, this ]\n\t\t});\n\t}\n\n});\n\n\nView.watch('displayingDates', [ 'dateProfile' ], function(deps) {\n\tthis.requestDateRender(deps.dateProfile);\n}, function() {\n\tthis.requestDateUnrender();\n});\n\n\nView.watch('initialEvents', [ 'dateProfile' ], function(deps) {\n\treturn this.fetchInitialEvents(deps.dateProfile);\n});\n\n\nView.watch('bindingEvents', [ 'initialEvents' ], function(deps) {\n\tthis.setEvents(deps.initialEvents);\n\tthis.bindEventChanges();\n}, function() {\n\tthis.unbindEventChanges();\n\tthis.unsetEvents();\n});\n\n\nView.watch('displayingEvents', [ 'displayingDates', 'hasEvents' ], function() {\n\tthis.requestEventsRender(this.get('currentEvents')); // if there were event mutations after initialEvents\n}, function() {\n\tthis.requestEventsUnrender();\n});\n\n\nfunction convertEventsPayloadToLegacyArray(eventsPayload) {\n\tvar legacyEvents = [];\n\tvar id;\n\tvar eventInstances;\n\tvar i;\n\n\tfor (id in eventsPayload) {\n\n\t\teventInstances = eventsPayload[id].eventInstances;\n\n\t\tfor (i = 0; i < eventInstances.length; i++) {\n\t\t\tlegacyEvents.push(\n\t\t\t\teventInstances[i].toLegacy()\n\t\t\t);\n\t\t}\n\t}\n\n\treturn legacyEvents;\n}\n\n;;\n\nView.mixin({\n\n\t// range the view is formally responsible for.\n\t// for example, a month view might have 1st-31st, excluding padded dates\n\tcurrentUnzonedRange: null,\n\tcurrentRangeUnit: null, // name of largest unit being displayed, like \"month\" or \"week\"\n\n\tisRangeAllDay: false,\n\n\t// date range with a rendered skeleton\n\t// includes not-active days that need some sort of DOM\n\trenderUnzonedRange: null,\n\n\t// dates that display events and accept drag-n-drop\n\tactiveUnzonedRange: null,\n\n\t// constraint for where prev/next operations can go and where events can be dragged/resized to.\n\t// an object with optional start and end properties.\n\tvalidUnzonedRange: null,\n\n\t// how far the current date will move for a prev/next operation\n\tdateIncrement: null,\n\n\tminTime: null, // Duration object that denotes the first visible time of any given day\n\tmaxTime: null, // Duration object that denotes the exclusive visible end time of any given day\n\tusesMinMaxTime: false, // whether minTime/maxTime will affect the activeUnzonedRange. Views must opt-in.\n\n\t// DEPRECATED\n\tstart: null, // use activeUnzonedRange\n\tend: null, // use activeUnzonedRange\n\tintervalStart: null, // use currentUnzonedRange\n\tintervalEnd: null, // use currentUnzonedRange\n\n\n\t/* Date Range Computation\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tsetDateProfileForRendering: function(dateProfile) {\n\t\tvar calendar = this.calendar;\n\n\t\tthis.currentUnzonedRange = dateProfile.currentUnzonedRange;\n\t\tthis.currentRangeUnit = dateProfile.currentRangeUnit;\n\t\tthis.isRangeAllDay = dateProfile.isRangeAllDay;\n\t\tthis.renderUnzonedRange = dateProfile.renderUnzonedRange;\n\t\tthis.activeUnzonedRange = dateProfile.activeUnzonedRange;\n\t\tthis.validUnzonedRange = dateProfile.validUnzonedRange;\n\t\tthis.dateIncrement = dateProfile.dateIncrement;\n\t\tthis.minTime = dateProfile.minTime;\n\t\tthis.maxTime = dateProfile.maxTime;\n\n\t\t// DEPRECATED, but we need to keep it updated...\n\t\tthis.start = calendar.msToMoment(dateProfile.activeUnzonedRange.startMs, this.isRangeAllDay);\n\t\tthis.end = calendar.msToMoment(dateProfile.activeUnzonedRange.endMs, this.isRangeAllDay);\n\t\tthis.intervalStart = calendar.msToMoment(dateProfile.currentUnzonedRange.startMs, this.isRangeAllDay);\n\t\tthis.intervalEnd = calendar.msToMoment(dateProfile.currentUnzonedRange.endMs, this.isRangeAllDay);\n\n\t\tthis.title = this.computeTitle();\n\t\tthis.calendar.reportViewDatesChanged(this, dateProfile);\n\t},\n\n\n\t// Builds a structure with info about what the dates/ranges will be for the \"prev\" view.\n\tbuildPrevDateProfile: function(date) {\n\t\tvar prevDate = date.clone().startOf(this.currentRangeUnit).subtract(this.dateIncrement);\n\n\t\treturn this.buildDateProfile(prevDate, -1);\n\t},\n\n\n\t// Builds a structure with info about what the dates/ranges will be for the \"next\" view.\n\tbuildNextDateProfile: function(date) {\n\t\tvar nextDate = date.clone().startOf(this.currentRangeUnit).add(this.dateIncrement);\n\n\t\treturn this.buildDateProfile(nextDate, 1);\n\t},\n\n\n\t// Builds a structure holding dates/ranges for rendering around the given date.\n\t// Optional direction param indicates whether the date is being incremented/decremented\n\t// from its previous value. decremented = -1, incremented = 1 (default).\n\tbuildDateProfile: function(date, direction, forceToValid) {\n\t\tvar isDateAllDay = !date.hasTime();\n\t\tvar validUnzonedRange = this.buildValidRange();\n\t\tvar minTime = null;\n\t\tvar maxTime = null;\n\t\tvar currentInfo;\n\t\tvar renderUnzonedRange;\n\t\tvar activeUnzonedRange;\n\t\tvar isValid;\n\n\t\tif (forceToValid) {\n\t\t\tdate = this.calendar.msToUtcMoment(\n\t\t\t\tvalidUnzonedRange.constrainDate(date), // returns MS\n\t\t\t\tisDateAllDay\n\t\t\t);\n\t\t}\n\n\t\tcurrentInfo = this.buildCurrentRangeInfo(date, direction);\n\t\trenderUnzonedRange = this.buildRenderRange(currentInfo.unzonedRange, currentInfo.unit);\n\t\tactiveUnzonedRange = renderUnzonedRange.clone();\n\n\t\tif (!this.opt('showNonCurrentDates')) {\n\t\t\tactiveUnzonedRange = activeUnzonedRange.intersect(currentInfo.unzonedRange);\n\t\t}\n\n\t\tminTime = moment.duration(this.opt('minTime'));\n\t\tmaxTime = moment.duration(this.opt('maxTime'));\n\t\tactiveUnzonedRange = this.adjustActiveRange(activeUnzonedRange, minTime, maxTime);\n\n\t\tactiveUnzonedRange = activeUnzonedRange.intersect(validUnzonedRange);\n\n\t\tif (activeUnzonedRange) {\n\t\t\tdate = this.calendar.msToUtcMoment(\n\t\t\t\tactiveUnzonedRange.constrainDate(date), // returns MS\n\t\t\t\tisDateAllDay\n\t\t\t);\n\t\t}\n\n\t\t// it's invalid if the originally requested date is not contained,\n\t\t// or if the range is completely outside of the valid range.\n\t\tisValid = currentInfo.unzonedRange.intersectsWith(validUnzonedRange);\n\n\t\treturn {\n\t\t\tvalidUnzonedRange: validUnzonedRange,\n\t\t\tcurrentUnzonedRange: currentInfo.unzonedRange,\n\t\t\tcurrentRangeUnit: currentInfo.unit,\n\t\t\tisRangeAllDay: /^(year|month|week|day)$/.test(currentInfo.unit),\n\t\t\tactiveUnzonedRange: activeUnzonedRange,\n\t\t\trenderUnzonedRange: renderUnzonedRange,\n\t\t\tminTime: minTime,\n\t\t\tmaxTime: maxTime,\n\t\t\tisValid: isValid,\n\t\t\tdate: date,\n\t\t\tdateIncrement: this.buildDateIncrement(currentInfo.duration)\n\t\t\t\t// pass a fallback (might be null) ^\n\t\t};\n\t},\n\n\n\t// Builds an object with optional start/end properties.\n\t// Indicates the minimum/maximum dates to display.\n\tbuildValidRange: function() {\n\t\treturn this.getUnzonedRangeOption('validRange', this.calendar.getNow()) ||\n\t\t\tnew UnzonedRange(); // completely open-ended\n\t},\n\n\n\t// Builds a structure with info about the \"current\" range, the range that is\n\t// highlighted as being the current month for example.\n\t// See buildDateProfile for a description of `direction`.\n\t// Guaranteed to have `range` and `unit` properties. `duration` is optional.\n\t// TODO: accept a MS-time instead of a moment `date`?\n\tbuildCurrentRangeInfo: function(date, direction) {\n\t\tvar duration = null;\n\t\tvar unit = null;\n\t\tvar unzonedRange = null;\n\t\tvar dayCount;\n\n\t\tif (this.viewSpec.duration) {\n\t\t\tduration = this.viewSpec.duration;\n\t\t\tunit = this.viewSpec.durationUnit;\n\t\t\tunzonedRange = this.buildRangeFromDuration(date, direction, duration, unit);\n\t\t}\n\t\telse if ((dayCount = this.opt('dayCount'))) {\n\t\t\tunit = 'day';\n\t\t\tunzonedRange = this.buildRangeFromDayCount(date, direction, dayCount);\n\t\t}\n\t\telse if ((unzonedRange = this.buildCustomVisibleRange(date))) {\n\t\t\tunit = computeGreatestUnit(unzonedRange.getStart(), unzonedRange.getEnd());\n\t\t}\n\t\telse {\n\t\t\tduration = this.getFallbackDuration();\n\t\t\tunit = computeGreatestUnit(duration);\n\t\t\tunzonedRange = this.buildRangeFromDuration(date, direction, duration, unit);\n\t\t}\n\n\t\treturn { duration: duration, unit: unit, unzonedRange: unzonedRange };\n\t},\n\n\n\tgetFallbackDuration: function() {\n\t\treturn moment.duration({ days: 1 });\n\t},\n\n\n\t// Returns a new activeUnzonedRange to have time values (un-ambiguate)\n\t// minTime or maxTime causes the range to expand.\n\tadjustActiveRange: function(unzonedRange, minTime, maxTime) {\n\t\tvar start = unzonedRange.getStart();\n\t\tvar end = unzonedRange.getEnd();\n\n\t\tif (this.usesMinMaxTime) {\n\n\t\t\tif (minTime < 0) {\n\t\t\t\tstart.time(0).add(minTime);\n\t\t\t}\n\n\t\t\tif (maxTime > 24 * 60 * 60 * 1000) { // beyond 24 hours?\n\t\t\t\tend.time(maxTime - (24 * 60 * 60 * 1000));\n\t\t\t}\n\t\t}\n\n\t\treturn new UnzonedRange(start, end);\n\t},\n\n\n\t// Builds the \"current\" range when it is specified as an explicit duration.\n\t// `unit` is the already-computed computeGreatestUnit value of duration.\n\t// TODO: accept a MS-time instead of a moment `date`?\n\tbuildRangeFromDuration: function(date, direction, duration, unit) {\n\t\tvar alignment = this.opt('dateAlignment');\n\t\tvar start = date.clone();\n\t\tvar end;\n\t\tvar dateIncrementInput;\n\t\tvar dateIncrementDuration;\n\n\t\t// if the view displays a single day or smaller\n\t\tif (duration.as('days') <= 1) {\n\t\t\tif (this.isHiddenDay(start)) {\n\t\t\t\tstart = this.skipHiddenDays(start, direction);\n\t\t\t\tstart.startOf('day');\n\t\t\t}\n\t\t}\n\n\t\t// compute what the alignment should be\n\t\tif (!alignment) {\n\t\t\tdateIncrementInput = this.opt('dateIncrement');\n\n\t\t\tif (dateIncrementInput) {\n\t\t\t\tdateIncrementDuration = moment.duration(dateIncrementInput);\n\n\t\t\t\t// use the smaller of the two units\n\t\t\t\tif (dateIncrementDuration < duration) {\n\t\t\t\t\talignment = computeDurationGreatestUnit(dateIncrementDuration, dateIncrementInput);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\talignment = unit;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\talignment = unit;\n\t\t\t}\n\t\t}\n\n\t\tstart.startOf(alignment);\n\t\tend = start.clone().add(duration);\n\n\t\treturn new UnzonedRange(start, end);\n\t},\n\n\n\t// Builds the \"current\" range when a dayCount is specified.\n\t// TODO: accept a MS-time instead of a moment `date`?\n\tbuildRangeFromDayCount: function(date, direction, dayCount) {\n\t\tvar customAlignment = this.opt('dateAlignment');\n\t\tvar runningCount = 0;\n\t\tvar start = date.clone();\n\t\tvar end;\n\n\t\tif (customAlignment) {\n\t\t\tstart.startOf(customAlignment);\n\t\t}\n\n\t\tstart.startOf('day');\n\t\tstart = this.skipHiddenDays(start, direction);\n\n\t\tend = start.clone();\n\t\tdo {\n\t\t\tend.add(1, 'day');\n\t\t\tif (!this.isHiddenDay(end)) {\n\t\t\t\trunningCount++;\n\t\t\t}\n\t\t} while (runningCount < dayCount);\n\n\t\treturn new UnzonedRange(start, end);\n\t},\n\n\n\t// Builds a normalized range object for the \"visible\" range,\n\t// which is a way to define the currentUnzonedRange and activeUnzonedRange at the same time.\n\t// TODO: accept a MS-time instead of a moment `date`?\n\tbuildCustomVisibleRange: function(date) {\n\t\tvar visibleUnzonedRange = this.getUnzonedRangeOption(\n\t\t\t'visibleRange',\n\t\t\tthis.calendar.applyTimezone(date) // correct zone. also generates new obj that avoids mutations\n\t\t);\n\n\t\tif (visibleUnzonedRange && (visibleUnzonedRange.startMs === null || visibleUnzonedRange.endMs === null)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn visibleUnzonedRange;\n\t},\n\n\n\t// Computes the range that will represent the element/cells for *rendering*,\n\t// but which may have voided days/times.\n\tbuildRenderRange: function(currentUnzonedRange, currentRangeUnit) {\n\t\t// cut off days in the currentUnzonedRange that are hidden\n\t\treturn this.trimHiddenDays(currentUnzonedRange);\n\t},\n\n\n\t// Compute the duration value that should be added/substracted to the current date\n\t// when a prev/next operation happens.\n\tbuildDateIncrement: function(fallback) {\n\t\tvar dateIncrementInput = this.opt('dateIncrement');\n\t\tvar customAlignment;\n\n\t\tif (dateIncrementInput) {\n\t\t\treturn moment.duration(dateIncrementInput);\n\t\t}\n\t\telse if ((customAlignment = this.opt('dateAlignment'))) {\n\t\t\treturn moment.duration(1, customAlignment);\n\t\t}\n\t\telse if (fallback) {\n\t\t\treturn fallback;\n\t\t}\n\t\telse {\n\t\t\treturn moment.duration({ days: 1 });\n\t\t}\n\t},\n\n\n\t// Remove days from the beginning and end of the range that are computed as hidden.\n\ttrimHiddenDays: function(inputUnzonedRange) {\n\t\tvar start = inputUnzonedRange.getStart();\n\t\tvar end = inputUnzonedRange.getEnd();\n\n\t\tstart = this.skipHiddenDays(start);\n\t\tend = this.skipHiddenDays(end, -1, true);\n\n\t\treturn new UnzonedRange(start, end);\n\t},\n\n\n\t// Compute the number of the give units in the \"current\" range.\n\t// Will return a floating-point number. Won't round.\n\tcurrentRangeAs: function(unit) {\n\t\tvar currentUnzonedRange = this.currentUnzonedRange;\n\n\t\treturn moment.utc(currentUnzonedRange.endMs).diff(\n\t\t\tmoment.utc(currentUnzonedRange.startMs),\n\t\t\tunit,\n\t\t\ttrue\n\t\t);\n\t},\n\n\n\t// For ChronoComponent::getDayClasses\n\tisDateInOtherMonth: function(date) {\n\t\treturn false;\n\t},\n\n\n\t// Arguments after name will be forwarded to a hypothetical function value\n\t// WARNING: passed-in arguments will be given to generator functions as-is and can cause side-effects.\n\t// Always clone your objects if you fear mutation.\n\tgetUnzonedRangeOption: function(name) {\n\t\tvar val = this.opt(name);\n\n\t\tif (typeof val === 'function') {\n\t\t\tval = val.apply(\n\t\t\t\tnull,\n\t\t\t\tArray.prototype.slice.call(arguments, 1)\n\t\t\t);\n\t\t}\n\n\t\tif (val) {\n\t\t\treturn this.calendar.parseUnzonedRange(val);\n\t\t}\n\t},\n\n\n\t/* Hidden Days\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Initializes internal variables related to calculating hidden days-of-week\n\tinitHiddenDays: function() {\n\t\tvar hiddenDays = this.opt('hiddenDays') || []; // array of day-of-week indices that are hidden\n\t\tvar isHiddenDayHash = []; // is the day-of-week hidden? (hash with day-of-week-index -> bool)\n\t\tvar dayCnt = 0;\n\t\tvar i;\n\n\t\tif (this.opt('weekends') === false) {\n\t\t\thiddenDays.push(0, 6); // 0=sunday, 6=saturday\n\t\t}\n\n\t\tfor (i = 0; i < 7; i++) {\n\t\t\tif (\n\t\t\t\t!(isHiddenDayHash[i] = $.inArray(i, hiddenDays) !== -1)\n\t\t\t) {\n\t\t\t\tdayCnt++;\n\t\t\t}\n\t\t}\n\n\t\tif (!dayCnt) {\n\t\t\tthrow 'invalid hiddenDays'; // all days were hidden? bad.\n\t\t}\n\n\t\tthis.isHiddenDayHash = isHiddenDayHash;\n\t},\n\n\n\t// Is the current day hidden?\n\t// `day` is a day-of-week index (0-6), or a Moment\n\tisHiddenDay: function(day) {\n\t\tif (moment.isMoment(day)) {\n\t\t\tday = day.day();\n\t\t}\n\t\treturn this.isHiddenDayHash[day];\n\t},\n\n\n\t// Incrementing the current day until it is no longer a hidden day, returning a copy.\n\t// DOES NOT CONSIDER validUnzonedRange!\n\t// If the initial value of `date` is not a hidden day, don't do anything.\n\t// Pass `isExclusive` as `true` if you are dealing with an end date.\n\t// `inc` defaults to `1` (increment one day forward each time)\n\tskipHiddenDays: function(date, inc, isExclusive) {\n\t\tvar out = date.clone();\n\t\tinc = inc || 1;\n\t\twhile (\n\t\t\tthis.isHiddenDayHash[(out.day() + (isExclusive ? inc : 0) + 7) % 7]\n\t\t) {\n\t\t\tout.add(inc, 'days');\n\t\t}\n\t\treturn out;\n\t}\n\n});\n\n;;\n\n/*\nEmbodies a div that has potential scrollbars\n*/\nvar Scroller = FC.Scroller = Class.extend({\n\n\tel: null, // the guaranteed outer element\n\tscrollEl: null, // the element with the scrollbars\n\toverflowX: null,\n\toverflowY: null,\n\n\n\tconstructor: function(options) {\n\t\toptions = options || {};\n\t\tthis.overflowX = options.overflowX || options.overflow || 'auto';\n\t\tthis.overflowY = options.overflowY || options.overflow || 'auto';\n\t},\n\n\n\trender: function() {\n\t\tthis.el = this.renderEl();\n\t\tthis.applyOverflow();\n\t},\n\n\n\trenderEl: function() {\n\t\treturn (this.scrollEl = $('
'));\n\t},\n\n\n\t// sets to natural height, unlocks overflow\n\tclear: function() {\n\t\tthis.setHeight('auto');\n\t\tthis.applyOverflow();\n\t},\n\n\n\tdestroy: function() {\n\t\tthis.el.remove();\n\t},\n\n\n\t// Overflow\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tapplyOverflow: function() {\n\t\tthis.scrollEl.css({\n\t\t\t'overflow-x': this.overflowX,\n\t\t\t'overflow-y': this.overflowY\n\t\t});\n\t},\n\n\n\t// Causes any 'auto' overflow values to resolves to 'scroll' or 'hidden'.\n\t// Useful for preserving scrollbar widths regardless of future resizes.\n\t// Can pass in scrollbarWidths for optimization.\n\tlockOverflow: function(scrollbarWidths) {\n\t\tvar overflowX = this.overflowX;\n\t\tvar overflowY = this.overflowY;\n\n\t\tscrollbarWidths = scrollbarWidths || this.getScrollbarWidths();\n\n\t\tif (overflowX === 'auto') {\n\t\t\toverflowX = (\n\t\t\t\t\tscrollbarWidths.top || scrollbarWidths.bottom || // horizontal scrollbars?\n\t\t\t\t\t// OR scrolling pane with massless scrollbars?\n\t\t\t\t\tthis.scrollEl[0].scrollWidth - 1 > this.scrollEl[0].clientWidth\n\t\t\t\t\t\t// subtract 1 because of IE off-by-one issue\n\t\t\t\t) ? 'scroll' : 'hidden';\n\t\t}\n\n\t\tif (overflowY === 'auto') {\n\t\t\toverflowY = (\n\t\t\t\t\tscrollbarWidths.left || scrollbarWidths.right || // vertical scrollbars?\n\t\t\t\t\t// OR scrolling pane with massless scrollbars?\n\t\t\t\t\tthis.scrollEl[0].scrollHeight - 1 > this.scrollEl[0].clientHeight\n\t\t\t\t\t\t// subtract 1 because of IE off-by-one issue\n\t\t\t\t) ? 'scroll' : 'hidden';\n\t\t}\n\n\t\tthis.scrollEl.css({ 'overflow-x': overflowX, 'overflow-y': overflowY });\n\t},\n\n\n\t// Getters / Setters\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tsetHeight: function(height) {\n\t\tthis.scrollEl.height(height);\n\t},\n\n\n\tgetScrollTop: function() {\n\t\treturn this.scrollEl.scrollTop();\n\t},\n\n\n\tsetScrollTop: function(top) {\n\t\tthis.scrollEl.scrollTop(top);\n\t},\n\n\n\tgetClientWidth: function() {\n\t\treturn this.scrollEl[0].clientWidth;\n\t},\n\n\n\tgetClientHeight: function() {\n\t\treturn this.scrollEl[0].clientHeight;\n\t},\n\n\n\tgetScrollbarWidths: function() {\n\t\treturn getScrollbarWidths(this.scrollEl);\n\t}\n\n});\n\n;;\nfunction Iterator(items) {\n this.items = items || [];\n}\n\n\n/* Calls a method on every item passing the arguments through */\nIterator.prototype.proxyCall = function(methodName) {\n var args = Array.prototype.slice.call(arguments, 1);\n var results = [];\n\n this.items.forEach(function(item) {\n results.push(item[methodName].apply(item, args));\n });\n\n return results;\n};\n\n;;\n\n/* Toolbar with buttons and title\n----------------------------------------------------------------------------------------------------------------------*/\n\nfunction Toolbar(calendar, toolbarOptions) {\n\tvar t = this;\n\n\t// exports\n\tt.setToolbarOptions = setToolbarOptions;\n\tt.render = render;\n\tt.removeElement = removeElement;\n\tt.updateTitle = updateTitle;\n\tt.activateButton = activateButton;\n\tt.deactivateButton = deactivateButton;\n\tt.disableButton = disableButton;\n\tt.enableButton = enableButton;\n\tt.getViewsWithButtons = getViewsWithButtons;\n\tt.el = null; // mirrors local `el`\n\n\t// locals\n\tvar el;\n\tvar viewsWithButtons = [];\n\n\t// method to update toolbar-specific options, not calendar-wide options\n\tfunction setToolbarOptions(newToolbarOptions) {\n\t\ttoolbarOptions = newToolbarOptions;\n\t}\n\n\t// can be called repeatedly and will rerender\n\tfunction render() {\n\t\tvar sections = toolbarOptions.layout;\n\n\t\tif (sections) {\n\t\t\tif (!el) {\n\t\t\t\tel = this.el = $(\"
\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tel.empty();\n\t\t\t}\n\t\t\tel.append(renderSection('left'))\n\t\t\t\t.append(renderSection('right'))\n\t\t\t\t.append(renderSection('center'))\n\t\t\t\t.append('
');\n\t\t}\n\t\telse {\n\t\t\tremoveElement();\n\t\t}\n\t}\n\n\n\tfunction removeElement() {\n\t\tif (el) {\n\t\t\tel.remove();\n\t\t\tel = t.el = null;\n\t\t}\n\t}\n\n\n\tfunction renderSection(position) {\n\t\tvar theme = calendar.theme;\n\t\tvar sectionEl = $('
');\n\t\tvar buttonStr = toolbarOptions.layout[position];\n\t\tvar calendarCustomButtons = calendar.opt('customButtons') || {};\n\t\tvar calendarButtonTextOverrides = calendar.overrides.buttonText || {};\n\t\tvar calendarButtonText = calendar.opt('buttonText') || {};\n\n\t\tif (buttonStr) {\n\t\t\t$.each(buttonStr.split(' '), function(i) {\n\t\t\t\tvar groupChildren = $();\n\t\t\t\tvar isOnlyButtons = true;\n\t\t\t\tvar groupEl;\n\n\t\t\t\t$.each(this.split(','), function(j, buttonName) {\n\t\t\t\t\tvar customButtonProps;\n\t\t\t\t\tvar viewSpec;\n\t\t\t\t\tvar buttonClick;\n\t\t\t\t\tvar buttonIcon; // only one of these will be set\n\t\t\t\t\tvar buttonText; // \"\n\t\t\t\t\tvar buttonInnerHtml;\n\t\t\t\t\tvar buttonClasses;\n\t\t\t\t\tvar buttonEl;\n\n\t\t\t\t\tif (buttonName == 'title') {\n\t\t\t\t\t\tgroupChildren = groupChildren.add($('

 

')); // we always want it to take up height\n\t\t\t\t\t\tisOnlyButtons = false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\tif ((customButtonProps = calendarCustomButtons[buttonName])) {\n\t\t\t\t\t\t\tbuttonClick = function(ev) {\n\t\t\t\t\t\t\t\tif (customButtonProps.click) {\n\t\t\t\t\t\t\t\t\tcustomButtonProps.click.call(buttonEl[0], ev);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t(buttonIcon = theme.getCustomButtonIconClass(customButtonProps)) ||\n\t\t\t\t\t\t\t(buttonIcon = theme.getIconClass(buttonName)) ||\n\t\t\t\t\t\t\t(buttonText = customButtonProps.text); // jshint ignore:line\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ((viewSpec = calendar.getViewSpec(buttonName))) {\n\t\t\t\t\t\t\tviewsWithButtons.push(buttonName);\n\t\t\t\t\t\t\tbuttonClick = function() {\n\t\t\t\t\t\t\t\tcalendar.changeView(buttonName);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t(buttonText = viewSpec.buttonTextOverride) ||\n\t\t\t\t\t\t\t(buttonIcon = theme.getIconClass(buttonName)) ||\n\t\t\t\t\t\t\t(buttonText = viewSpec.buttonTextDefault); // jshint ignore:line\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (calendar[buttonName]) { // a calendar method\n\t\t\t\t\t\t\tbuttonClick = function() {\n\t\t\t\t\t\t\t\tcalendar[buttonName]();\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t(buttonText = calendarButtonTextOverrides[buttonName]) ||\n\t\t\t\t\t\t\t(buttonIcon = theme.getIconClass(buttonName)) ||\n\t\t\t\t\t\t\t(buttonText = calendarButtonText[buttonName]); // jshint ignore:line\n\t\t\t\t\t\t\t// ^ everything else is considered default\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (buttonClick) {\n\n\t\t\t\t\t\t\tbuttonClasses = [\n\t\t\t\t\t\t\t\t'fc-' + buttonName + '-button',\n\t\t\t\t\t\t\t\ttheme.getClass('button'),\n\t\t\t\t\t\t\t\ttheme.getClass('stateDefault')\n\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\tif (buttonText) {\n\t\t\t\t\t\t\t\tbuttonInnerHtml = htmlEscape(buttonText);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (buttonIcon) {\n\t\t\t\t\t\t\t\tbuttonInnerHtml = \"\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbuttonEl = $( // type=\"button\" so that it doesn't submit a form\n\t\t\t\t\t\t\t\t''\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.click(function(ev) {\n\t\t\t\t\t\t\t\t\t// don't process clicks for disabled buttons\n\t\t\t\t\t\t\t\t\tif (!buttonEl.hasClass(theme.getClass('stateDisabled'))) {\n\n\t\t\t\t\t\t\t\t\t\tbuttonClick(ev);\n\n\t\t\t\t\t\t\t\t\t\t// after the click action, if the button becomes the \"active\" tab, or disabled,\n\t\t\t\t\t\t\t\t\t\t// it should never have a hover class, so remove it now.\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\tbuttonEl.hasClass(theme.getClass('stateActive')) ||\n\t\t\t\t\t\t\t\t\t\t\tbuttonEl.hasClass(theme.getClass('stateDisabled'))\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tbuttonEl.removeClass(theme.getClass('stateHover'));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.mousedown(function() {\n\t\t\t\t\t\t\t\t\t// the *down* effect (mouse pressed in).\n\t\t\t\t\t\t\t\t\t// only on buttons that are not the \"active\" tab, or disabled\n\t\t\t\t\t\t\t\t\tbuttonEl\n\t\t\t\t\t\t\t\t\t\t.not('.' + theme.getClass('stateActive'))\n\t\t\t\t\t\t\t\t\t\t.not('.' + theme.getClass('stateDisabled'))\n\t\t\t\t\t\t\t\t\t\t.addClass(theme.getClass('stateDown'));\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.mouseup(function() {\n\t\t\t\t\t\t\t\t\t// undo the *down* effect\n\t\t\t\t\t\t\t\t\tbuttonEl.removeClass(theme.getClass('stateDown'));\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.hover(\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\t// the *hover* effect.\n\t\t\t\t\t\t\t\t\t\t// only on buttons that are not the \"active\" tab, or disabled\n\t\t\t\t\t\t\t\t\t\tbuttonEl\n\t\t\t\t\t\t\t\t\t\t\t.not('.' + theme.getClass('stateActive'))\n\t\t\t\t\t\t\t\t\t\t\t.not('.' + theme.getClass('stateDisabled'))\n\t\t\t\t\t\t\t\t\t\t\t.addClass(theme.getClass('stateHover'));\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\t// undo the *hover* effect\n\t\t\t\t\t\t\t\t\t\tbuttonEl\n\t\t\t\t\t\t\t\t\t\t\t.removeClass(theme.getClass('stateHover'))\n\t\t\t\t\t\t\t\t\t\t\t.removeClass(theme.getClass('stateDown')); // if mouseleave happens before mouseup\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tgroupChildren = groupChildren.add(buttonEl);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (isOnlyButtons) {\n\t\t\t\t\tgroupChildren\n\t\t\t\t\t\t.first().addClass(theme.getClass('cornerLeft')).end()\n\t\t\t\t\t\t.last().addClass(theme.getClass('cornerRight')).end();\n\t\t\t\t}\n\n\t\t\t\tif (groupChildren.length > 1) {\n\t\t\t\t\tgroupEl = $('
');\n\t\t\t\t\tif (isOnlyButtons) {\n\t\t\t\t\t\tgroupEl.addClass(theme.getClass('buttonGroup'));\n\t\t\t\t\t}\n\t\t\t\t\tgroupEl.append(groupChildren);\n\t\t\t\t\tsectionEl.append(groupEl);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsectionEl.append(groupChildren); // 1 or 0 children\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn sectionEl;\n\t}\n\n\n\tfunction updateTitle(text) {\n\t\tif (el) {\n\t\t\tel.find('h2').text(text);\n\t\t}\n\t}\n\n\n\tfunction activateButton(buttonName) {\n\t\tif (el) {\n\t\t\tel.find('.fc-' + buttonName + '-button')\n\t\t\t\t.addClass(calendar.theme.getClass('stateActive'));\n\t\t}\n\t}\n\n\n\tfunction deactivateButton(buttonName) {\n\t\tif (el) {\n\t\t\tel.find('.fc-' + buttonName + '-button')\n\t\t\t\t.removeClass(calendar.theme.getClass('stateActive'));\n\t\t}\n\t}\n\n\n\tfunction disableButton(buttonName) {\n\t\tif (el) {\n\t\t\tel.find('.fc-' + buttonName + '-button')\n\t\t\t\t.prop('disabled', true)\n\t\t\t\t.addClass(calendar.theme.getClass('stateDisabled'));\n\t\t}\n\t}\n\n\n\tfunction enableButton(buttonName) {\n\t\tif (el) {\n\t\t\tel.find('.fc-' + buttonName + '-button')\n\t\t\t\t.prop('disabled', false)\n\t\t\t\t.removeClass(calendar.theme.getClass('stateDisabled'));\n\t\t}\n\t}\n\n\n\tfunction getViewsWithButtons() {\n\t\treturn viewsWithButtons;\n\t}\n\n}\n\n;;\n\nvar Calendar = FC.Calendar = Class.extend(EmitterMixin, {\n\n\tview: null, // current View object\n\tviewsByType: null, // holds all instantiated view instances, current or not\n\tcurrentDate: null, // unzoned moment. private (public API should use getDate instead)\n\ttheme: null,\n\tloadingLevel: 0, // number of simultaneous loading tasks\n\n\n\tconstructor: function(el, overrides) {\n\n\t\t// declare the current calendar instance relies on GlobalEmitter. needed for garbage collection.\n\t\t// unneeded() is called in destroy.\n\t\tGlobalEmitter.needed();\n\n\t\tthis.el = el;\n\t\tthis.viewsByType = {};\n\t\tthis.viewSpecCache = {};\n\n\t\tthis.initOptionsInternals(overrides);\n\t\tthis.initMomentInternals(); // needs to happen after options hash initialized\n\t\tthis.initCurrentDate();\n\t\tthis.initEventManager();\n\n\t\tEventManager.call(this); // needs options immediately\n\t\tthis.initialize();\n\t},\n\n\n\t// Subclasses can override this for initialization logic after the constructor has been called\n\tinitialize: function() {\n\t},\n\n\n\t// Public API\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tgetView: function() {\n\t\treturn this.view;\n\t},\n\n\n\tpubliclyTrigger: function(name, triggerInfo) {\n\t\tvar optHandler = this.opt(name);\n\t\tvar context;\n\t\tvar args;\n\n\t\tif ($.isPlainObject(triggerInfo)) {\n\t\t\tcontext = triggerInfo.context;\n\t\t\targs = triggerInfo.args;\n\t\t}\n\t\telse if ($.isArray(triggerInfo)) {\n\t\t\targs = triggerInfo;\n\t\t}\n\n\t\tif (context == null) {\n\t\t\tcontext = this.el[0]; // fallback context\n\t\t}\n\n\t\tif (!args) {\n\t\t\targs = [];\n\t\t}\n\n\t\tthis.triggerWith(name, context, args); // Emitter's method\n\n\t\tif (optHandler) {\n\t\t\treturn optHandler.apply(context, args);\n\t\t}\n\t},\n\n\n\thasPublicHandlers: function(name) {\n\t\treturn this.hasHandlers(name) ||\n\t\t\tthis.opt(name); // handler specified in options\n\t},\n\n\n\t// View\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// Given a view name for a custom view or a standard view, creates a ready-to-go View object\n\tinstantiateView: function(viewType) {\n\t\tvar spec = this.getViewSpec(viewType);\n\n\t\treturn new spec['class'](this, spec);\n\t},\n\n\n\t// Returns a boolean about whether the view is okay to instantiate at some point\n\tisValidViewType: function(viewType) {\n\t\treturn Boolean(this.getViewSpec(viewType));\n\t},\n\n\n\tchangeView: function(viewName, dateOrRange) {\n\n\t\tif (dateOrRange) {\n\n\t\t\tif (dateOrRange.start && dateOrRange.end) { // a range\n\t\t\t\tthis.recordOptionOverrides({ // will not rerender\n\t\t\t\t\tvisibleRange: dateOrRange\n\t\t\t\t});\n\t\t\t}\n\t\t\telse { // a date\n\t\t\t\tthis.currentDate = this.moment(dateOrRange).stripZone(); // just like gotoDate\n\t\t\t}\n\t\t}\n\n\t\tthis.renderView(viewName);\n\t},\n\n\n\t// Forces navigation to a view for the given date.\n\t// `viewType` can be a specific view name or a generic one like \"week\" or \"day\".\n\tzoomTo: function(newDate, viewType) {\n\t\tvar spec;\n\n\t\tviewType = viewType || 'day'; // day is default zoom\n\t\tspec = this.getViewSpec(viewType) || this.getUnitViewSpec(viewType);\n\n\t\tthis.currentDate = newDate.clone();\n\t\tthis.renderView(spec ? spec.type : null);\n\t},\n\n\n\t// Current Date\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tinitCurrentDate: function() {\n\t\tvar defaultDateInput = this.opt('defaultDate');\n\n\t\t// compute the initial ambig-timezone date\n\t\tif (defaultDateInput != null) {\n\t\t\tthis.currentDate = this.moment(defaultDateInput).stripZone();\n\t\t}\n\t\telse {\n\t\t\tthis.currentDate = this.getNow(); // getNow already returns unzoned\n\t\t}\n\t},\n\n\n\treportViewDatesChanged: function(view, dateProfile) {\n\t\tthis.currentDate = dateProfile.date; // might have been constrained by view dates\n\t\tthis.setToolbarsTitle(view.title);\n\t\tthis.updateToolbarButtons();\n\t},\n\n\n\tprev: function() {\n\t\tvar prevInfo = this.view.buildPrevDateProfile(this.currentDate);\n\n\t\tif (prevInfo.isValid) {\n\t\t\tthis.currentDate = prevInfo.date;\n\t\t\tthis.renderView();\n\t\t}\n\t},\n\n\n\tnext: function() {\n\t\tvar nextInfo = this.view.buildNextDateProfile(this.currentDate);\n\n\t\tif (nextInfo.isValid) {\n\t\t\tthis.currentDate = nextInfo.date;\n\t\t\tthis.renderView();\n\t\t}\n\t},\n\n\n\tprevYear: function() {\n\t\tthis.currentDate.add(-1, 'years');\n\t\tthis.renderView();\n\t},\n\n\n\tnextYear: function() {\n\t\tthis.currentDate.add(1, 'years');\n\t\tthis.renderView();\n\t},\n\n\n\ttoday: function() {\n\t\tthis.currentDate = this.getNow(); // should deny like prev/next?\n\t\tthis.renderView();\n\t},\n\n\n\tgotoDate: function(zonedDateInput) {\n\t\tthis.currentDate = this.moment(zonedDateInput).stripZone();\n\t\tthis.renderView();\n\t},\n\n\n\tincrementDate: function(delta) {\n\t\tthis.currentDate.add(moment.duration(delta));\n\t\tthis.renderView();\n\t},\n\n\n\t// for external API\n\tgetDate: function() {\n\t\treturn this.applyTimezone(this.currentDate); // infuse the calendar's timezone\n\t},\n\n\n\t// Loading Triggering\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// Should be called when any type of async data fetching begins\n\tpushLoading: function() {\n\t\tif (!(this.loadingLevel++)) {\n\t\t\tthis.publiclyTrigger('loading', [ true, this.view ]);\n\t\t}\n\t},\n\n\n\t// Should be called when any type of async data fetching completes\n\tpopLoading: function() {\n\t\tif (!(--this.loadingLevel)) {\n\t\t\tthis.publiclyTrigger('loading', [ false, this.view ]);\n\t\t}\n\t},\n\n\n\t// Selection\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// this public method receives start/end dates in any format, with any timezone\n\tselect: function(zonedStartInput, zonedEndInput) {\n\t\tthis.view.select(\n\t\t\tthis.buildSelectFootprint.apply(this, arguments)\n\t\t);\n\t},\n\n\n\tunselect: function() { // safe to be called before renderView\n\t\tif (this.view) {\n\t\t\tthis.view.unselect();\n\t\t}\n\t},\n\n\n\t// Given arguments to the select method in the API, returns a span (unzoned start/end and other info)\n\tbuildSelectFootprint: function(zonedStartInput, zonedEndInput) {\n\t\tvar start = this.moment(zonedStartInput).stripZone();\n\t\tvar end;\n\n\t\tif (zonedEndInput) {\n\t\t\tend = this.moment(zonedEndInput).stripZone();\n\t\t}\n\t\telse if (start.hasTime()) {\n\t\t\tend = start.clone().add(this.defaultTimedEventDuration);\n\t\t}\n\t\telse {\n\t\t\tend = start.clone().add(this.defaultAllDayEventDuration);\n\t\t}\n\n\t\treturn new ComponentFootprint(\n\t\t\tnew UnzonedRange(start, end),\n\t\t\t!start.hasTime()\n\t\t);\n\t},\n\n\n\t// Misc\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// will return `null` if invalid range\n\tparseUnzonedRange: function(rangeInput) {\n\t\tvar start = null;\n\t\tvar end = null;\n\n\t\tif (rangeInput.start) {\n\t\t\tstart = this.moment(rangeInput.start).stripZone();\n\t\t}\n\n\t\tif (rangeInput.end) {\n\t\t\tend = this.moment(rangeInput.end).stripZone();\n\t\t}\n\n\t\tif (!start && !end) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (start && end && end.isBefore(start)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn new UnzonedRange(start, end);\n\t},\n\n\n\trerenderEvents: function() { // API method. destroys old events if previously rendered.\n\t\tif (this.elementVisible()) {\n\t\t\tthis.view.flash('displayingEvents');\n\t\t}\n\t},\n\n\n\tinitEventManager: function() {\n\t\tvar _this = this;\n\t\tvar eventManager = new EventManager(this);\n\t\tvar rawSources = this.opt('eventSources') || [];\n\t\tvar singleRawSource = this.opt('events');\n\n\t\tthis.eventManager = eventManager;\n\n\t\tif (singleRawSource) {\n\t\t\trawSources.unshift(singleRawSource);\n\t\t}\n\n\t\teventManager.on('release', function(eventsPayload) {\n\t\t\t_this.trigger('eventsReset', eventsPayload);\n\t\t});\n\n\t\teventManager.freeze();\n\n\t\trawSources.forEach(function(rawSource) {\n\t\t\tvar source = EventSourceParser.parse(rawSource, _this);\n\n\t\t\tif (source) {\n\t\t\t\teventManager.addSource(source);\n\t\t\t}\n\t\t});\n\n\t\teventManager.thaw();\n\t},\n\n\n\trequestEvents: function(start, end) {\n\t\treturn this.eventManager.requestEvents(\n\t\t\tstart,\n\t\t\tend,\n\t\t\tthis.opt('timezone'),\n\t\t\t!this.opt('lazyFetching')\n\t\t);\n\t}\n\n});\n\n;;\n/*\nOptions binding/triggering system.\n*/\nCalendar.mixin({\n\n\tdirDefaults: null, // option defaults related to LTR or RTL\n\tlocaleDefaults: null, // option defaults related to current locale\n\toverrides: null, // option overrides given to the fullCalendar constructor\n\tdynamicOverrides: null, // options set with dynamic setter method. higher precedence than view overrides.\n\toptionsModel: null, // all defaults combined with overrides\n\n\n\tinitOptionsInternals: function(overrides) {\n\t\tthis.overrides = $.extend({}, overrides); // make a copy\n\t\tthis.dynamicOverrides = {};\n\t\tthis.optionsModel = new Model();\n\n\t\tthis.populateOptionsHash();\n\t},\n\n\n\t// public getter/setter\n\toption: function(name, value) {\n\t\tvar newOptionHash;\n\n\t\tif (typeof name === 'string') {\n\t\t\tif (value === undefined) { // getter\n\t\t\t\treturn this.optionsModel.get(name);\n\t\t\t}\n\t\t\telse { // setter for individual option\n\t\t\t\tnewOptionHash = {};\n\t\t\t\tnewOptionHash[name] = value;\n\t\t\t\tthis.setOptions(newOptionHash);\n\t\t\t}\n\t\t}\n\t\telse if (typeof name === 'object') { // compound setter with object input\n\t\t\tthis.setOptions(name);\n\t\t}\n\t},\n\n\n\t// private getter\n\topt: function(name) {\n\t\treturn this.optionsModel.get(name);\n\t},\n\n\n\tsetOptions: function(newOptionHash) {\n\t\tvar optionCnt = 0;\n\t\tvar optionName;\n\n\t\tthis.recordOptionOverrides(newOptionHash); // will trigger optionsModel watchers\n\n\t\tfor (optionName in newOptionHash) {\n\t\t\toptionCnt++;\n\t\t}\n\n\t\t// special-case handling of single option change.\n\t\t// if only one option change, `optionName` will be its name.\n\t\tif (optionCnt === 1) {\n\t\t\tif (optionName === 'height' || optionName === 'contentHeight' || optionName === 'aspectRatio') {\n\t\t\t\tthis.updateSize(true); // true = allow recalculation of height\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (optionName === 'defaultDate') {\n\t\t\t\treturn; // can't change date this way. use gotoDate instead\n\t\t\t}\n\t\t\telse if (optionName === 'businessHours') {\n\t\t\t\tif (this.view) {\n\t\t\t\t\tthis.view.unrenderBusinessHours();\n\t\t\t\t\tthis.view.renderBusinessHours();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (optionName === 'timezone') {\n\t\t\t\tthis.view.flash('initialEvents');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// catch-all. rerender the header and footer and rebuild/rerender the current view\n\t\tthis.renderHeader();\n\t\tthis.renderFooter();\n\n\t\t// even non-current views will be affected by this option change. do before rerender\n\t\t// TODO: detangle\n\t\tthis.viewsByType = {};\n\n\t\tthis.reinitView();\n\t},\n\n\n\t// Computes the flattened options hash for the calendar and assigns to `this.options`.\n\t// Assumes this.overrides and this.dynamicOverrides have already been initialized.\n\tpopulateOptionsHash: function() {\n\t\tvar locale, localeDefaults;\n\t\tvar isRTL, dirDefaults;\n\t\tvar rawOptions;\n\n\t\tlocale = firstDefined( // explicit locale option given?\n\t\t\tthis.dynamicOverrides.locale,\n\t\t\tthis.overrides.locale\n\t\t);\n\t\tlocaleDefaults = localeOptionHash[locale];\n\t\tif (!localeDefaults) { // explicit locale option not given or invalid?\n\t\t\tlocale = Calendar.defaults.locale;\n\t\t\tlocaleDefaults = localeOptionHash[locale] || {};\n\t\t}\n\n\t\tisRTL = firstDefined( // based on options computed so far, is direction RTL?\n\t\t\tthis.dynamicOverrides.isRTL,\n\t\t\tthis.overrides.isRTL,\n\t\t\tlocaleDefaults.isRTL,\n\t\t\tCalendar.defaults.isRTL\n\t\t);\n\t\tdirDefaults = isRTL ? Calendar.rtlDefaults : {};\n\n\t\tthis.dirDefaults = dirDefaults;\n\t\tthis.localeDefaults = localeDefaults;\n\n\t\trawOptions = mergeOptions([ // merge defaults and overrides. lowest to highest precedence\n\t\t\tCalendar.defaults, // global defaults\n\t\t\tdirDefaults,\n\t\t\tlocaleDefaults,\n\t\t\tthis.overrides,\n\t\t\tthis.dynamicOverrides\n\t\t]);\n\t\tpopulateInstanceComputableOptions(rawOptions); // fill in gaps with computed options\n\n\t\tthis.optionsModel.reset(rawOptions);\n\t},\n\n\n\t// stores the new options internally, but does not rerender anything.\n\trecordOptionOverrides: function(newOptionHash) {\n\t\tvar optionName;\n\n\t\tfor (optionName in newOptionHash) {\n\t\t\tthis.dynamicOverrides[optionName] = newOptionHash[optionName];\n\t\t}\n\n\t\tthis.viewSpecCache = {}; // the dynamic override invalidates the options in this cache, so just clear it\n\t\tthis.populateOptionsHash(); // this.options needs to be recomputed after the dynamic override\n\t}\n\n});\n\n;;\n\nCalendar.mixin({\n\n\tdefaultAllDayEventDuration: null,\n\tdefaultTimedEventDuration: null,\n\tlocaleData: null,\n\n\n\tinitMomentInternals: function() {\n\t\tvar _this = this;\n\n\t\tthis.defaultAllDayEventDuration = moment.duration(this.opt('defaultAllDayEventDuration'));\n\t\tthis.defaultTimedEventDuration = moment.duration(this.opt('defaultTimedEventDuration'));\n\n\t\t// Called immediately, and when any of the options change.\n\t\t// Happens before any internal objects rebuild or rerender, because this is very core.\n\t\tthis.optionsModel.watch('buildingMomentLocale', [\n\t\t\t'?locale', '?monthNames', '?monthNamesShort', '?dayNames', '?dayNamesShort',\n\t\t\t'?firstDay', '?weekNumberCalculation'\n\t\t], function(opts) {\n\t\t\tvar weekNumberCalculation = opts.weekNumberCalculation;\n\t\t\tvar firstDay = opts.firstDay;\n\t\t\tvar _week;\n\n\t\t\t// normalize\n\t\t\tif (weekNumberCalculation === 'iso') {\n\t\t\t\tweekNumberCalculation = 'ISO'; // normalize\n\t\t\t}\n\n\t\t\tvar localeData = Object.create( // make a cheap copy\n\t\t\t\tgetMomentLocaleData(opts.locale) // will fall back to en\n\t\t\t);\n\n\t\t\tif (opts.monthNames) {\n\t\t\t\tlocaleData._months = opts.monthNames;\n\t\t\t}\n\t\t\tif (opts.monthNamesShort) {\n\t\t\t\tlocaleData._monthsShort = opts.monthNamesShort;\n\t\t\t}\n\t\t\tif (opts.dayNames) {\n\t\t\t\tlocaleData._weekdays = opts.dayNames;\n\t\t\t}\n\t\t\tif (opts.dayNamesShort) {\n\t\t\t\tlocaleData._weekdaysShort = opts.dayNamesShort;\n\t\t\t}\n\n\t\t\tif (firstDay == null && weekNumberCalculation === 'ISO') {\n\t\t\t\tfirstDay = 1;\n\t\t\t}\n\t\t\tif (firstDay != null) {\n\t\t\t\t_week = Object.create(localeData._week); // _week: { dow: # }\n\t\t\t\t_week.dow = firstDay;\n\t\t\t\tlocaleData._week = _week;\n\t\t\t}\n\n\t\t\tif ( // whitelist certain kinds of input\n\t\t\t\tweekNumberCalculation === 'ISO' ||\n\t\t\t\tweekNumberCalculation === 'local' ||\n\t\t\t\ttypeof weekNumberCalculation === 'function'\n\t\t\t) {\n\t\t\t\tlocaleData._fullCalendar_weekCalc = weekNumberCalculation; // moment-ext will know what to do with it\n\t\t\t}\n\n\t\t\t_this.localeData = localeData;\n\n\t\t\t// If the internal current date object already exists, move to new locale.\n\t\t\t// We do NOT need to do this technique for event dates, because this happens when converting to \"segments\".\n\t\t\tif (_this.currentDate) {\n\t\t\t\t_this.localizeMoment(_this.currentDate); // sets to localeData\n\t\t\t}\n\t\t});\n\t},\n\n\n\t// Builds a moment using the settings of the current calendar: timezone and locale.\n\t// Accepts anything the vanilla moment() constructor accepts.\n\tmoment: function() {\n\t\tvar mom;\n\n\t\tif (this.opt('timezone') === 'local') {\n\t\t\tmom = FC.moment.apply(null, arguments);\n\n\t\t\t// Force the moment to be local, because FC.moment doesn't guarantee it.\n\t\t\tif (mom.hasTime()) { // don't give ambiguously-timed moments a local zone\n\t\t\t\tmom.local();\n\t\t\t}\n\t\t}\n\t\telse if (this.opt('timezone') === 'UTC') {\n\t\t\tmom = FC.moment.utc.apply(null, arguments); // process as UTC\n\t\t}\n\t\telse {\n\t\t\tmom = FC.moment.parseZone.apply(null, arguments); // let the input decide the zone\n\t\t}\n\n\t\tthis.localizeMoment(mom); // TODO\n\n\t\treturn mom;\n\t},\n\n\n\tmsToMoment: function(ms, forceAllDay) {\n\t\tvar mom = FC.moment.utc(ms); // TODO: optimize by using Date.UTC\n\n\t\tif (forceAllDay) {\n\t\t\tmom.stripTime();\n\t\t}\n\t\telse {\n\t\t\tmom = this.applyTimezone(mom); // may or may not apply locale\n\t\t}\n\n\t\tthis.localizeMoment(mom);\n\n\t\treturn mom;\n\t},\n\n\n\tmsToUtcMoment: function(ms, forceAllDay) {\n\t\tvar mom = FC.moment.utc(ms); // TODO: optimize by using Date.UTC\n\n\t\tif (forceAllDay) {\n\t\t\tmom.stripTime();\n\t\t}\n\n\t\tthis.localizeMoment(mom);\n\n\t\treturn mom;\n\t},\n\n\n\t// Updates the given moment's locale settings to the current calendar locale settings.\n\tlocalizeMoment: function(mom) {\n\t\tmom._locale = this.localeData;\n\t},\n\n\n\t// Returns a boolean about whether or not the calendar knows how to calculate\n\t// the timezone offset of arbitrary dates in the current timezone.\n\tgetIsAmbigTimezone: function() {\n\t\treturn this.opt('timezone') !== 'local' && this.opt('timezone') !== 'UTC';\n\t},\n\n\n\t// Returns a copy of the given date in the current timezone. Has no effect on dates without times.\n\tapplyTimezone: function(date) {\n\t\tif (!date.hasTime()) {\n\t\t\treturn date.clone();\n\t\t}\n\n\t\tvar zonedDate = this.moment(date.toArray());\n\t\tvar timeAdjust = date.time() - zonedDate.time();\n\t\tvar adjustedZonedDate;\n\n\t\t// Safari sometimes has problems with this coersion when near DST. Adjust if necessary. (bug #2396)\n\t\tif (timeAdjust) { // is the time result different than expected?\n\t\t\tadjustedZonedDate = zonedDate.clone().add(timeAdjust); // add milliseconds\n\t\t\tif (date.time() - adjustedZonedDate.time() === 0) { // does it match perfectly now?\n\t\t\t\tzonedDate = adjustedZonedDate;\n\t\t\t}\n\t\t}\n\n\t\treturn zonedDate;\n\t},\n\n\n\t/*\n\tAssumes the footprint is non-open-ended.\n\t*/\n\tfootprintToDateProfile: function(componentFootprint, ignoreEnd) {\n\t\tvar start = FC.moment.utc(componentFootprint.unzonedRange.startMs);\n\t\tvar end;\n\n\t\tif (!ignoreEnd) {\n\t\t\tend = FC.moment.utc(componentFootprint.unzonedRange.endMs);\n\t\t}\n\n\t\tif (componentFootprint.isAllDay) {\n\t\t\tstart.stripTime();\n\n\t\t\tif (end) {\n\t\t\t\tend.stripTime();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tstart = this.applyTimezone(start);\n\n\t\t\tif (end) {\n\t\t\t\tend = this.applyTimezone(end);\n\t\t\t}\n\t\t}\n\n\t\treturn new EventDateProfile(start, end, this);\n\t},\n\n\n\t// Returns a moment for the current date, as defined by the client's computer or from the `now` option.\n\t// Will return an moment with an ambiguous timezone.\n\tgetNow: function() {\n\t\tvar now = this.opt('now');\n\t\tif (typeof now === 'function') {\n\t\t\tnow = now();\n\t\t}\n\t\treturn this.moment(now).stripZone();\n\t},\n\n\n\t// Produces a human-readable string for the given duration.\n\t// Side-effect: changes the locale of the given duration.\n\thumanizeDuration: function(duration) {\n\t\treturn duration.locale(this.opt('locale')).humanize();\n\t},\n\n\n\n\t// Event-Specific Date Utilities. TODO: move\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t// Get an event's normalized end date. If not present, calculate it from the defaults.\n\tgetEventEnd: function(event) {\n\t\tif (event.end) {\n\t\t\treturn event.end.clone();\n\t\t}\n\t\telse {\n\t\t\treturn this.getDefaultEventEnd(event.allDay, event.start);\n\t\t}\n\t},\n\n\n\t// Given an event's allDay status and start date, return what its fallback end date should be.\n\t// TODO: rename to computeDefaultEventEnd\n\tgetDefaultEventEnd: function(allDay, zonedStart) {\n\t\tvar end = zonedStart.clone();\n\n\t\tif (allDay) {\n\t\t\tend.stripTime().add(this.defaultAllDayEventDuration);\n\t\t}\n\t\telse {\n\t\t\tend.add(this.defaultTimedEventDuration);\n\t\t}\n\n\t\tif (this.getIsAmbigTimezone()) {\n\t\t\tend.stripZone(); // we don't know what the tzo should be\n\t\t}\n\n\t\treturn end;\n\t}\n\n});\n\n;;\n\nCalendar.mixin({\n\n\tviewSpecCache: null, // cache of view definitions (initialized in Calendar.js)\n\n\n\t// Gets information about how to create a view. Will use a cache.\n\tgetViewSpec: function(viewType) {\n\t\tvar cache = this.viewSpecCache;\n\n\t\treturn cache[viewType] || (cache[viewType] = this.buildViewSpec(viewType));\n\t},\n\n\n\t// Given a duration singular unit, like \"week\" or \"day\", finds a matching view spec.\n\t// Preference is given to views that have corresponding buttons.\n\tgetUnitViewSpec: function(unit) {\n\t\tvar viewTypes;\n\t\tvar i;\n\t\tvar spec;\n\n\t\tif ($.inArray(unit, unitsDesc) != -1) {\n\n\t\t\t// put views that have buttons first. there will be duplicates, but oh well\n\t\t\tviewTypes = this.header.getViewsWithButtons(); // TODO: include footer as well?\n\t\t\t$.each(FC.views, function(viewType) { // all views\n\t\t\t\tviewTypes.push(viewType);\n\t\t\t});\n\n\t\t\tfor (i = 0; i < viewTypes.length; i++) {\n\t\t\t\tspec = this.getViewSpec(viewTypes[i]);\n\t\t\t\tif (spec) {\n\t\t\t\t\tif (spec.singleUnit == unit) {\n\t\t\t\t\t\treturn spec;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Builds an object with information on how to create a given view\n\tbuildViewSpec: function(requestedViewType) {\n\t\tvar viewOverrides = this.overrides.views || {};\n\t\tvar specChain = []; // for the view. lowest to highest priority\n\t\tvar defaultsChain = []; // for the view. lowest to highest priority\n\t\tvar overridesChain = []; // for the view. lowest to highest priority\n\t\tvar viewType = requestedViewType;\n\t\tvar spec; // for the view\n\t\tvar overrides; // for the view\n\t\tvar durationInput;\n\t\tvar duration;\n\t\tvar unit;\n\n\t\t// iterate from the specific view definition to a more general one until we hit an actual View class\n\t\twhile (viewType) {\n\t\t\tspec = fcViews[viewType];\n\t\t\toverrides = viewOverrides[viewType];\n\t\t\tviewType = null; // clear. might repopulate for another iteration\n\n\t\t\tif (typeof spec === 'function') { // TODO: deprecate\n\t\t\t\tspec = { 'class': spec };\n\t\t\t}\n\n\t\t\tif (spec) {\n\t\t\t\tspecChain.unshift(spec);\n\t\t\t\tdefaultsChain.unshift(spec.defaults || {});\n\t\t\t\tdurationInput = durationInput || spec.duration;\n\t\t\t\tviewType = viewType || spec.type;\n\t\t\t}\n\n\t\t\tif (overrides) {\n\t\t\t\toverridesChain.unshift(overrides); // view-specific option hashes have options at zero-level\n\t\t\t\tdurationInput = durationInput || overrides.duration;\n\t\t\t\tviewType = viewType || overrides.type;\n\t\t\t}\n\t\t}\n\n\t\tspec = mergeProps(specChain);\n\t\tspec.type = requestedViewType;\n\t\tif (!spec['class']) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// fall back to top-level `duration` option\n\t\tdurationInput = durationInput ||\n\t\t\tthis.dynamicOverrides.duration ||\n\t\t\tthis.overrides.duration;\n\n\t\tif (durationInput) {\n\t\t\tduration = moment.duration(durationInput);\n\n\t\t\tif (duration.valueOf()) { // valid?\n\n\t\t\t\tunit = computeDurationGreatestUnit(duration, durationInput);\n\n\t\t\t\tspec.duration = duration;\n\t\t\t\tspec.durationUnit = unit;\n\n\t\t\t\t// view is a single-unit duration, like \"week\" or \"day\"\n\t\t\t\t// incorporate options for this. lowest priority\n\t\t\t\tif (duration.as(unit) === 1) {\n\t\t\t\t\tspec.singleUnit = unit;\n\t\t\t\t\toverridesChain.unshift(viewOverrides[unit] || {});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tspec.defaults = mergeOptions(defaultsChain);\n\t\tspec.overrides = mergeOptions(overridesChain);\n\n\t\tthis.buildViewSpecOptions(spec);\n\t\tthis.buildViewSpecButtonText(spec, requestedViewType);\n\n\t\treturn spec;\n\t},\n\n\n\t// Builds and assigns a view spec's options object from its already-assigned defaults and overrides\n\tbuildViewSpecOptions: function(spec) {\n\t\tspec.options = mergeOptions([ // lowest to highest priority\n\t\t\tCalendar.defaults, // global defaults\n\t\t\tspec.defaults, // view's defaults (from ViewSubclass.defaults)\n\t\t\tthis.dirDefaults,\n\t\t\tthis.localeDefaults, // locale and dir take precedence over view's defaults!\n\t\t\tthis.overrides, // calendar's overrides (options given to constructor)\n\t\t\tspec.overrides, // view's overrides (view-specific options)\n\t\t\tthis.dynamicOverrides // dynamically set via setter. highest precedence\n\t\t]);\n\t\tpopulateInstanceComputableOptions(spec.options);\n\t},\n\n\n\t// Computes and assigns a view spec's buttonText-related options\n\tbuildViewSpecButtonText: function(spec, requestedViewType) {\n\n\t\t// given an options object with a possible `buttonText` hash, lookup the buttonText for the\n\t\t// requested view, falling back to a generic unit entry like \"week\" or \"day\"\n\t\tfunction queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t// view can decide to look up a certain key\n\t\t\t\t(spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\n\t\t\t\t// a key like \"month\"\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}\n\n\t\t// highest to lowest priority\n\t\tspec.buttonTextOverride =\n\t\t\tqueryButtonText(this.dynamicOverrides) ||\n\t\t\tqueryButtonText(this.overrides) || // constructor-specified buttonText lookup hash takes precedence\n\t\t\tspec.overrides.buttonText; // `buttonText` for view-specific options is a string\n\n\t\t// highest to lowest priority. mirrors buildViewSpecOptions\n\t\tspec.buttonTextDefault =\n\t\t\tqueryButtonText(this.localeDefaults) ||\n\t\t\tqueryButtonText(this.dirDefaults) ||\n\t\t\tspec.defaults.buttonText || // a single string. from ViewSubclass.defaults\n\t\t\tqueryButtonText(Calendar.defaults) ||\n\t\t\t(spec.duration ? this.humanizeDuration(spec.duration) : null) || // like \"3 days\"\n\t\t\trequestedViewType; // fall back to given view name\n\t}\n\n});\n\n;;\n\nCalendar.mixin({\n\n\tel: null,\n\tcontentEl: null,\n\tsuggestedViewHeight: null,\n\twindowResizeProxy: null,\n\tignoreWindowResize: 0,\n\n\n\trender: function() {\n\t\tif (!this.contentEl) {\n\t\t\tthis.initialRender();\n\t\t}\n\t\telse if (this.elementVisible()) {\n\t\t\t// mainly for the public API\n\t\t\tthis.calcSize();\n\t\t\tthis.renderView();\n\t\t}\n\t},\n\n\n\tinitialRender: function() {\n\t\tvar _this = this;\n\t\tvar el = this.el;\n\n\t\tel.addClass('fc');\n\n\t\t// event delegation for nav links\n\t\tel.on('click.fc', 'a[data-goto]', function(ev) {\n\t\t\tvar anchorEl = $(this);\n\t\t\tvar gotoOptions = anchorEl.data('goto'); // will automatically parse JSON\n\t\t\tvar date = _this.moment(gotoOptions.date);\n\t\t\tvar viewType = gotoOptions.type;\n\n\t\t\t// property like \"navLinkDayClick\". might be a string or a function\n\t\t\tvar customAction = _this.view.opt('navLink' + capitaliseFirstLetter(viewType) + 'Click');\n\n\t\t\tif (typeof customAction === 'function') {\n\t\t\t\tcustomAction(date, ev);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (typeof customAction === 'string') {\n\t\t\t\t\tviewType = customAction;\n\t\t\t\t}\n\t\t\t\t_this.zoomTo(date, viewType);\n\t\t\t}\n\t\t});\n\n\t\t// called immediately, and upon option change\n\t\tthis.optionsModel.watch('settingTheme', [ '?theme', '?themeSystem' ], function(opts) {\n\t\t\tvar themeClass = ThemeRegistry.getThemeClass(opts.themeSystem || opts.theme);\n\t\t\tvar theme = new themeClass(_this.optionsModel);\n\t\t\tvar widgetClass = theme.getClass('widget');\n\n\t\t\t_this.theme = theme;\n\n\t\t\tif (widgetClass) {\n\t\t\t\tel.addClass(widgetClass);\n\t\t\t}\n\t\t}, function() {\n\t\t\tvar widgetClass = _this.theme.getClass('widget');\n\n\t\t\t_this.theme = null;\n\n\t\t\tif (widgetClass) {\n\t\t\t\tel.removeClass(widgetClass);\n\t\t\t}\n\t\t});\n\n\t\t// called immediately, and upon option change.\n\t\t// HACK: locale often affects isRTL, so we explicitly listen to that too.\n\t\tthis.optionsModel.watch('applyingDirClasses', [ '?isRTL', '?locale' ], function(opts) {\n\t\t\tel.toggleClass('fc-ltr', !opts.isRTL);\n\t\t\tel.toggleClass('fc-rtl', opts.isRTL);\n\t\t});\n\n\t\tthis.contentEl = $(\"
\").prependTo(el);\n\n\t\tthis.initToolbars();\n\t\tthis.renderHeader();\n\t\tthis.renderFooter();\n\t\tthis.renderView(this.opt('defaultView'));\n\n\t\tif (this.opt('handleWindowResize')) {\n\t\t\t$(window).resize(\n\t\t\t\tthis.windowResizeProxy = debounce( // prevents rapid calls\n\t\t\t\t\tthis.windowResize.bind(this),\n\t\t\t\t\tthis.opt('windowResizeDelay')\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t},\n\n\n\tdestroy: function() {\n\n\t\tif (this.view) {\n\t\t\tthis.view.removeElement();\n\n\t\t\t// NOTE: don't null-out this.view in case API methods are called after destroy.\n\t\t\t// It is still the \"current\" view, just not rendered.\n\t\t}\n\n\t\tthis.toolbarsManager.proxyCall('removeElement');\n\t\tthis.contentEl.remove();\n\t\tthis.el.removeClass('fc fc-ltr fc-rtl');\n\n\t\t// removes theme-related root className\n\t\tthis.optionsModel.unwatch('settingTheme');\n\n\t\tthis.el.off('.fc'); // unbind nav link handlers\n\n\t\tif (this.windowResizeProxy) {\n\t\t\t$(window).unbind('resize', this.windowResizeProxy);\n\t\t\tthis.windowResizeProxy = null;\n\t\t}\n\n\t\tGlobalEmitter.unneeded();\n\t},\n\n\n\telementVisible: function() {\n\t\treturn this.el.is(':visible');\n\t},\n\n\n\n\t// View Rendering\n\t// -----------------------------------------------------------------------------------\n\n\n\t// Renders a view because of a date change, view-type change, or for the first time.\n\t// If not given a viewType, keep the current view but render different dates.\n\t// Accepts an optional scroll state to restore to.\n\trenderView: function(viewType, forcedScroll) {\n\n\t\tthis.ignoreWindowResize++;\n\n\t\tvar needsClearView = this.view && viewType && this.view.type !== viewType;\n\n\t\t// if viewType is changing, remove the old view's rendering\n\t\tif (needsClearView) {\n\t\t\tthis.freezeContentHeight(); // prevent a scroll jump when view element is removed\n\t\t\tthis.clearView();\n\t\t}\n\n\t\t// if viewType changed, or the view was never created, create a fresh view\n\t\tif (!this.view && viewType) {\n\t\t\tthis.view =\n\t\t\t\tthis.viewsByType[viewType] ||\n\t\t\t\t(this.viewsByType[viewType] = this.instantiateView(viewType));\n\n\t\t\tthis.view.setElement(\n\t\t\t\t$(\"
\").appendTo(this.contentEl)\n\t\t\t);\n\t\t\tthis.toolbarsManager.proxyCall('activateButton', viewType);\n\t\t}\n\n\t\tif (this.view) {\n\n\t\t\tif (forcedScroll) {\n\t\t\t\tthis.view.addForcedScroll(forcedScroll);\n\t\t\t}\n\n\t\t\tif (this.elementVisible()) {\n\t\t\t\tthis.view.setDate(this.currentDate);\n\t\t\t}\n\t\t}\n\n\t\tif (needsClearView) {\n\t\t\tthis.thawContentHeight();\n\t\t}\n\n\t\tthis.ignoreWindowResize--;\n\t},\n\n\n\t// Unrenders the current view and reflects this change in the Header.\n\t// Unregsiters the `view`, but does not remove from viewByType hash.\n\tclearView: function() {\n\t\tthis.toolbarsManager.proxyCall('deactivateButton', this.view.type);\n\t\tthis.view.removeElement();\n\t\tthis.view = null;\n\t},\n\n\n\t// Destroys the view, including the view object. Then, re-instantiates it and renders it.\n\t// Maintains the same scroll state.\n\t// TODO: maintain any other user-manipulated state.\n\treinitView: function() {\n\t\tthis.ignoreWindowResize++;\n\t\tthis.freezeContentHeight();\n\n\t\tvar viewType = this.view.type;\n\t\tvar scrollState = this.view.queryScroll();\n\t\tthis.clearView();\n\t\tthis.calcSize();\n\t\tthis.renderView(viewType, scrollState);\n\n\t\tthis.thawContentHeight();\n\t\tthis.ignoreWindowResize--;\n\t},\n\n\n\t// Resizing\n\t// -----------------------------------------------------------------------------------\n\n\n\tgetSuggestedViewHeight: function() {\n\t\tif (this.suggestedViewHeight === null) {\n\t\t\tthis.calcSize();\n\t\t}\n\t\treturn this.suggestedViewHeight;\n\t},\n\n\n\tisHeightAuto: function() {\n\t\treturn this.opt('contentHeight') === 'auto' || this.opt('height') === 'auto';\n\t},\n\n\n\tupdateSize: function(shouldRecalc) {\n\t\tif (this.elementVisible()) {\n\n\t\t\tif (shouldRecalc) {\n\t\t\t\tthis._calcSize();\n\t\t\t}\n\n\t\t\tthis.ignoreWindowResize++;\n\t\t\tthis.view.updateSize(true); // isResize=true. will poll getSuggestedViewHeight() and isHeightAuto()\n\t\t\tthis.ignoreWindowResize--;\n\n\t\t\treturn true; // signal success\n\t\t}\n\t},\n\n\n\tcalcSize: function() {\n\t\tif (this.elementVisible()) {\n\t\t\tthis._calcSize();\n\t\t}\n\t},\n\n\n\t_calcSize: function() { // assumes elementVisible\n\t\tvar contentHeightInput = this.opt('contentHeight');\n\t\tvar heightInput = this.opt('height');\n\n\t\tif (typeof contentHeightInput === 'number') { // exists and not 'auto'\n\t\t\tthis.suggestedViewHeight = contentHeightInput;\n\t\t}\n\t\telse if (typeof contentHeightInput === 'function') { // exists and is a function\n\t\t\tthis.suggestedViewHeight = contentHeightInput();\n\t\t}\n\t\telse if (typeof heightInput === 'number') { // exists and not 'auto'\n\t\t\tthis.suggestedViewHeight = heightInput - this.queryToolbarsHeight();\n\t\t}\n\t\telse if (typeof heightInput === 'function') { // exists and is a function\n\t\t\tthis.suggestedViewHeight = heightInput() - this.queryToolbarsHeight();\n\t\t}\n\t\telse if (heightInput === 'parent') { // set to height of parent element\n\t\t\tthis.suggestedViewHeight = this.el.parent().height() - this.queryToolbarsHeight();\n\t\t}\n\t\telse {\n\t\t\tthis.suggestedViewHeight = Math.round(\n\t\t\t\tthis.contentEl.width() /\n\t\t\t\tMath.max(this.opt('aspectRatio'), .5)\n\t\t\t);\n\t\t}\n\t},\n\n\n\twindowResize: function(ev) {\n\t\tif (\n\t\t\t!this.ignoreWindowResize &&\n\t\t\tev.target === window && // so we don't process jqui \"resize\" events that have bubbled up\n\t\t\tthis.view.renderUnzonedRange // view has already been rendered\n\t\t) {\n\t\t\tif (this.updateSize(true)) {\n\t\t\t\tthis.publiclyTrigger('windowResize', [ this.view ]);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t/* Height \"Freezing\"\n\t-----------------------------------------------------------------------------*/\n\n\n\tfreezeContentHeight: function() {\n\t\tthis.contentEl.css({\n\t\t\twidth: '100%',\n\t\t\theight: this.contentEl.height(),\n\t\t\toverflow: 'hidden'\n\t\t});\n\t},\n\n\n\tthawContentHeight: function() {\n\t\tthis.contentEl.css({\n\t\t\twidth: '',\n\t\t\theight: '',\n\t\t\toverflow: ''\n\t\t});\n\t}\n\n});\n\n;;\n\nCalendar.mixin({\n\n\theader: null,\n\tfooter: null,\n\ttoolbarsManager: null,\n\n\n\tinitToolbars: function() {\n\t\tthis.header = new Toolbar(this, this.computeHeaderOptions());\n\t\tthis.footer = new Toolbar(this, this.computeFooterOptions());\n\t\tthis.toolbarsManager = new Iterator([ this.header, this.footer ]);\n\t},\n\n\n\tcomputeHeaderOptions: function() {\n\t\treturn {\n\t\t\textraClasses: 'fc-header-toolbar',\n\t\t\tlayout: this.opt('header')\n\t\t};\n\t},\n\n\n\tcomputeFooterOptions: function() {\n\t\treturn {\n\t\t\textraClasses: 'fc-footer-toolbar',\n\t\t\tlayout: this.opt('footer')\n\t\t};\n\t},\n\n\n\t// can be called repeatedly and Header will rerender\n\trenderHeader: function() {\n\t\tvar header = this.header;\n\n\t\theader.setToolbarOptions(this.computeHeaderOptions());\n\t\theader.render();\n\n\t\tif (header.el) {\n\t\t\tthis.el.prepend(header.el);\n\t\t}\n\t},\n\n\n\t// can be called repeatedly and Footer will rerender\n\trenderFooter: function() {\n\t\tvar footer = this.footer;\n\n\t\tfooter.setToolbarOptions(this.computeFooterOptions());\n\t\tfooter.render();\n\n\t\tif (footer.el) {\n\t\t\tthis.el.append(footer.el);\n\t\t}\n\t},\n\n\n\tsetToolbarsTitle: function(title) {\n\t\tthis.toolbarsManager.proxyCall('updateTitle', title);\n\t},\n\n\n\tupdateToolbarButtons: function() {\n\t\tvar now = this.getNow();\n\t\tvar view = this.view;\n\t\tvar todayInfo = view.buildDateProfile(now);\n\t\tvar prevInfo = view.buildPrevDateProfile(this.currentDate);\n\t\tvar nextInfo = view.buildNextDateProfile(this.currentDate);\n\n\t\tthis.toolbarsManager.proxyCall(\n\t\t\t(todayInfo.isValid && !view.currentUnzonedRange.containsDate(now)) ?\n\t\t\t\t'enableButton' :\n\t\t\t\t'disableButton',\n\t\t\t'today'\n\t\t);\n\n\t\tthis.toolbarsManager.proxyCall(\n\t\t\tprevInfo.isValid ?\n\t\t\t\t'enableButton' :\n\t\t\t\t'disableButton',\n\t\t\t'prev'\n\t\t);\n\n\t\tthis.toolbarsManager.proxyCall(\n\t\t\tnextInfo.isValid ?\n\t\t\t\t'enableButton' :\n\t\t\t\t'disableButton',\n\t\t\t'next'\n\t\t);\n\t},\n\n\n\tqueryToolbarsHeight: function() {\n\t\treturn this.toolbarsManager.items.reduce(function(accumulator, toolbar) {\n\t\t\tvar toolbarHeight = toolbar.el ? toolbar.el.outerHeight(true) : 0; // includes margin\n\t\t\treturn accumulator + toolbarHeight;\n\t\t}, 0);\n\t}\n\n});\n\n;;\n\nvar BUSINESS_HOUR_EVENT_DEFAULTS = {\n\tstart: '09:00',\n\tend: '17:00',\n\tdow: [ 1, 2, 3, 4, 5 ], // monday - friday\n\trendering: 'inverse-background'\n\t// classNames are defined in businessHoursSegClasses\n};\n\n\n/*\nreturns ComponentFootprint[]\n`businessHourDef` is optional. Use Calendar's setting if omitted.\n*/\nCalendar.prototype.buildCurrentBusinessFootprints = function(wholeDay) {\n\treturn this._buildCurrentBusinessFootprints(wholeDay, this.opt('businessHours'));\n};\n\n\nCalendar.prototype._buildCurrentBusinessFootprints = function(wholeDay, businessDefInput) {\n\tvar eventPeriod = this.eventManager.currentPeriod;\n\tvar businessInstanceGroup;\n\n\tif (eventPeriod) {\n\t\tbusinessInstanceGroup = this.buildBusinessInstanceGroup(\n\t\t\twholeDay,\n\t\t\tbusinessDefInput,\n\t\t\teventPeriod.unzonedRange\n\t\t);\n\n\t\tif (businessInstanceGroup) {\n\t\t\treturn this.eventInstancesToFootprints( // in Calendar.constraints.js\n\t\t\t\tbusinessInstanceGroup.eventInstances\n\t\t\t);\n\t\t}\n\t}\n\n\treturn [];\n};\n\n\n/*\nIf there are business hours, and they are within range, returns populated EventInstanceGroup.\nIf there are business hours, but they aren't within range, returns a zero-item EventInstanceGroup.\nIf there are NOT business hours, returns undefined.\n*/\nCalendar.prototype.buildBusinessInstanceGroup = function(wholeDay, rawComplexDef, unzonedRange) {\n\tvar eventDefs = this.buildBusinessDefs(wholeDay, rawComplexDef);\n\tvar eventInstanceGroup;\n\n\tif (eventDefs.length) {\n\t\teventInstanceGroup = new EventInstanceGroup(\n\t\t\teventDefsToEventInstances(eventDefs, unzonedRange)\n\t\t);\n\n\t\t// so that inverse-background rendering can happen even when no eventRanges in view\n\t\teventInstanceGroup.explicitEventDef = eventDefs[0];\n\n\t\treturn eventInstanceGroup;\n\t}\n};\n\n\nCalendar.prototype.buildBusinessDefs = function(wholeDay, rawComplexDef) {\n\tvar rawDefs = [];\n\tvar requireDow = false;\n\tvar i;\n\tvar defs = [];\n\n\tif (rawComplexDef === true) {\n\t\trawDefs = [ {} ]; // will get BUSINESS_HOUR_EVENT_DEFAULTS verbatim\n\t}\n\telse if ($.isPlainObject(rawComplexDef)) {\n\t\trawDefs = [ rawComplexDef ];\n\t}\n\telse if ($.isArray(rawComplexDef)) {\n\t\trawDefs = rawComplexDef;\n\t\trequireDow = true; // every sub-definition NEEDS a day-of-week\n\t}\n\n\tfor (i = 0; i < rawDefs.length; i++) {\n\t\tif (!requireDow || rawDefs[i].dow) {\n\t\t\tdefs.push(\n\t\t\t\tthis.buildBusinessDef(wholeDay, rawDefs[i])\n\t\t\t);\n\t\t}\n\t}\n\n\treturn defs;\n};\n\n\nCalendar.prototype.buildBusinessDef = function(wholeDay, rawDef) {\n\tvar fullRawDef = $.extend({}, BUSINESS_HOUR_EVENT_DEFAULTS, rawDef);\n\n\tif (wholeDay) {\n\t\tfullRawDef.start = null;\n\t\tfullRawDef.end = null;\n\t}\n\n\treturn RecurringEventDef.parse(\n\t\tfullRawDef,\n\t\tnew EventSource(this) // dummy source\n\t);\n};\n\n;;\n\n/*\ndetermines if eventInstanceGroup is allowed,\nin relation to other EVENTS and business hours.\n*/\nCalendar.prototype.isEventInstanceGroupAllowed = function(eventInstanceGroup) {\n\tvar eventDef = eventInstanceGroup.getEventDef();\n\tvar eventFootprints = this.eventRangesToEventFootprints(eventInstanceGroup.getAllEventRanges());\n\tvar i;\n\n\tvar peerEventInstances = this.getPeerEventInstances(eventDef);\n\tvar peerEventRanges = eventInstancesToEventRanges(peerEventInstances);\n\tvar peerEventFootprints = this.eventRangesToEventFootprints(peerEventRanges);\n\n\tvar constraintVal = eventDef.getConstraint();\n\tvar overlapVal = eventDef.getOverlap();\n\n\tvar eventAllowFunc = this.opt('eventAllow');\n\n\tfor (i = 0; i < eventFootprints.length; i++) {\n\t\tif (\n\t\t\t!this.isFootprintAllowed(\n\t\t\t\teventFootprints[i].componentFootprint,\n\t\t\t\tpeerEventFootprints,\n\t\t\t\tconstraintVal,\n\t\t\t\toverlapVal,\n\t\t\t\teventFootprints[i].eventInstance\n\t\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (eventAllowFunc) {\n\t\tfor (i = 0; i < eventFootprints.length; i++) {\n\t\t\tif (\n\t\t\t\teventAllowFunc(\n\t\t\t\t\teventFootprints[i].componentFootprint.toLegacy(this),\n\t\t\t\t\teventFootprints[i].getEventLegacy()\n\t\t\t\t) === false\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n};\n\n\nCalendar.prototype.getPeerEventInstances = function(eventDef) {\n\treturn this.eventManager.getEventInstancesWithoutId(eventDef.id);\n};\n\n\nCalendar.prototype.isSelectionFootprintAllowed = function(componentFootprint) {\n\tvar peerEventInstances = this.eventManager.getEventInstances();\n\tvar peerEventRanges = eventInstancesToEventRanges(peerEventInstances);\n\tvar peerEventFootprints = this.eventRangesToEventFootprints(peerEventRanges);\n\n\tvar selectAllowFunc;\n\n\tif (\n\t\tthis.isFootprintAllowed(\n\t\t\tcomponentFootprint,\n\t\t\tpeerEventFootprints,\n\t\t\tthis.opt('selectConstraint'),\n\t\t\tthis.opt('selectOverlap')\n\t\t)\n\t) {\n\t\tselectAllowFunc = this.opt('selectAllow');\n\n\t\tif (selectAllowFunc) {\n\t\t\treturn selectAllowFunc(componentFootprint.toLegacy(this)) !== false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n};\n\n\nCalendar.prototype.isFootprintAllowed = function(\n\tcomponentFootprint,\n\tpeerEventFootprints,\n\tconstraintVal,\n\toverlapVal,\n\tsubjectEventInstance // optional\n) {\n\tvar constraintFootprints; // ComponentFootprint[]\n\tvar overlapEventFootprints; // EventFootprint[]\n\n\tif (constraintVal != null) {\n\t\tconstraintFootprints = this.constraintValToFootprints(constraintVal, componentFootprint.isAllDay);\n\n\t\tif (!this.isFootprintWithinConstraints(componentFootprint, constraintFootprints)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\toverlapEventFootprints = this.collectOverlapEventFootprints(peerEventFootprints, componentFootprint);\n\n\tif (overlapVal === false) {\n\t\tif (overlapEventFootprints.length) {\n\t\t\treturn false;\n\t\t}\n\t}\n\telse if (typeof overlapVal === 'function') {\n\t\tif (!isOverlapsAllowedByFunc(overlapEventFootprints, overlapVal, subjectEventInstance)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (subjectEventInstance) {\n\t\tif (!isOverlapEventInstancesAllowed(overlapEventFootprints, subjectEventInstance)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n};\n\n\n// Constraint\n// ------------------------------------------------------------------------------------------------\n\n\nCalendar.prototype.isFootprintWithinConstraints = function(componentFootprint, constraintFootprints) {\n\tvar i;\n\n\tfor (i = 0; i < constraintFootprints.length; i++) {\n\t\tif (this.footprintContainsFootprint(constraintFootprints[i], componentFootprint)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n};\n\n\nCalendar.prototype.constraintValToFootprints = function(constraintVal, isAllDay) {\n\tvar eventInstances;\n\n\tif (constraintVal === 'businessHours') {\n\t\treturn this.buildCurrentBusinessFootprints(isAllDay);\n\t}\n\telse if (typeof constraintVal === 'object') {\n\t\teventInstances = this.parseEventDefToInstances(constraintVal); // handles recurring events\n\n\t\tif (!eventInstances) { // invalid input. fallback to parsing footprint directly\n\t\t\treturn this.parseFootprints(constraintVal);\n\t\t}\n\t\telse {\n\t\t\treturn this.eventInstancesToFootprints(eventInstances);\n\t\t}\n\t}\n\telse if (constraintVal != null) { // an ID\n\t\teventInstances = this.eventManager.getEventInstancesWithId(constraintVal);\n\n\t\treturn this.eventInstancesToFootprints(eventInstances);\n\t}\n};\n\n\n// conversion util\nCalendar.prototype.eventInstancesToFootprints = function(eventInstances) {\n\treturn eventFootprintsToComponentFootprints(\n\t\tthis.eventRangesToEventFootprints(\n\t\t\teventInstancesToEventRanges(eventInstances)\n\t\t)\n\t);\n};\n\n\n// Overlap\n// ------------------------------------------------------------------------------------------------\n\n\nCalendar.prototype.collectOverlapEventFootprints = function(peerEventFootprints, targetFootprint) {\n\tvar overlapEventFootprints = [];\n\tvar i;\n\n\tfor (i = 0; i < peerEventFootprints.length; i++) {\n\t\tif (\n\t\t\tthis.footprintsIntersect(\n\t\t\t\ttargetFootprint,\n\t\t\t\tpeerEventFootprints[i].componentFootprint\n\t\t\t)\n\t\t) {\n\t\t\toverlapEventFootprints.push(peerEventFootprints[i]);\n\t\t}\n\t}\n\n\treturn overlapEventFootprints;\n};\n\n\n// optional subjectEventInstance\nfunction isOverlapsAllowedByFunc(overlapEventFootprints, overlapFunc, subjectEventInstance) {\n\tvar i;\n\n\tfor (i = 0; i < overlapEventFootprints.length; i++) {\n\t\tif (\n\t\t\t!overlapFunc(\n\t\t\t\toverlapEventFootprints[i].eventInstance.toLegacy(),\n\t\t\t\tsubjectEventInstance ? subjectEventInstance.toLegacy() : null\n\t\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n\nfunction isOverlapEventInstancesAllowed(overlapEventFootprints, subjectEventInstance) {\n\tvar subjectLegacyInstance = subjectEventInstance.toLegacy();\n\tvar i;\n\tvar overlapEventInstance;\n\tvar overlapEventDef;\n\tvar overlapVal;\n\n\tfor (i = 0; i < overlapEventFootprints.length; i++) {\n\t\toverlapEventInstance = overlapEventFootprints[i].eventInstance;\n\t\toverlapEventDef = overlapEventInstance.def;\n\n\t\t// don't need to pass in calendar, because don't want to consider global eventOverlap property,\n\t\t// because we already considered that earlier in the process.\n\t\toverlapVal = overlapEventDef.getOverlap();\n\n\t\tif (overlapVal === false) {\n\t\t\treturn false;\n\t\t}\n\t\telse if (typeof overlapVal === 'function') {\n\t\t\tif (\n\t\t\t\t!overlapVal(\n\t\t\t\t\toverlapEventInstance.toLegacy(),\n\t\t\t\t\tsubjectLegacyInstance\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n}\n\n\n// Conversion: eventDefs -> eventInstances -> eventRanges -> eventFootprints -> componentFootprints\n// ------------------------------------------------------------------------------------------------\n// NOTE: this might seem like repetitive code with the Grid class, however, this code is related to\n// constraints whereas the Grid code is related to rendering. Each approach might want to convert\n// eventRanges -> eventFootprints in a different way. Regardless, there are opportunities to make\n// this more DRY.\n\n\n/*\nReturns false on invalid input.\n*/\nCalendar.prototype.parseEventDefToInstances = function(eventInput) {\n\tvar eventPeriod = this.eventManager.currentPeriod;\n\tvar eventDef = EventDefParser.parse(eventInput, new EventSource(this));\n\n\tif (!eventDef) { // invalid\n\t\treturn false;\n\t}\n\n\tif (eventPeriod) {\n\t\treturn eventDef.buildInstances(eventPeriod.unzonedRange);\n\t}\n\telse {\n\t\treturn [];\n\t}\n};\n\n\nCalendar.prototype.eventRangesToEventFootprints = function(eventRanges) {\n\tvar i;\n\tvar eventFootprints = [];\n\n\tfor (i = 0; i < eventRanges.length; i++) {\n\t\teventFootprints.push.apply(eventFootprints, // append\n\t\t\tthis.eventRangeToEventFootprints(eventRanges[i])\n\t\t);\n\t}\n\n\treturn eventFootprints;\n};\n\n\n/*\nTODO: somehow more DRY with Grid::eventRangeToEventFootprints\n*/\nCalendar.prototype.eventRangeToEventFootprints = function(eventRange) {\n\treturn [\n\t\tnew EventFootprint(\n\t\t\tnew ComponentFootprint(\n\t\t\t\teventRange.unzonedRange,\n\t\t\t\teventRange.eventDef.isAllDay()\n\t\t\t),\n\t\t\teventRange.eventDef,\n\t\t\teventRange.eventInstance // might not exist\n\t\t)\n\t];\n};\n\n\n/*\nParses footprints directly.\nVery similar to EventDateProfile::parse :(\n*/\nCalendar.prototype.parseFootprints = function(rawInput) {\n\tvar start, end;\n\n\tif (rawInput.start) {\n\t\tstart = this.moment(rawInput.start);\n\n\t\tif (!start.isValid()) {\n\t\t\tstart = null;\n\t\t}\n\t}\n\n\tif (rawInput.end) {\n\t\tend = this.moment(rawInput.end);\n\n\t\tif (!end.isValid()) {\n\t\t\tend = null;\n\t\t}\n\t}\n\n\treturn [\n\t\tnew ComponentFootprint(\n\t\t\tnew UnzonedRange(start, end),\n\t\t\t(start && !start.hasTime()) || (end && !end.hasTime()) // isAllDay\n\t\t)\n\t];\n};\n\n\n// Footprint Utils\n// ----------------------------------------------------------------------------------------\n\n\nCalendar.prototype.footprintContainsFootprint = function(outerFootprint, innerFootprint) {\n\treturn outerFootprint.unzonedRange.containsRange(innerFootprint.unzonedRange);\n};\n\n\nCalendar.prototype.footprintsIntersect = function(footprint0, footprint1) {\n\treturn footprint0.unzonedRange.intersectsWith(footprint1.unzonedRange);\n};\n\n;;\n\nCalendar.mixin({\n\n\t// Sources\n\t// ------------------------------------------------------------------------------------\n\n\n\tgetEventSources: function() {\n\t\treturn this.eventManager.otherSources.slice(); // clone\n\t},\n\n\n\tgetEventSourceById: function(id) {\n\t\treturn this.eventManager.getSourceById(\n\t\t\tEventSource.normalizeId(id)\n\t\t);\n\t},\n\n\n\taddEventSource: function(sourceInput) {\n\t\tvar source = EventSourceParser.parse(sourceInput, this);\n\n\t\tif (source) {\n\t\t\tthis.eventManager.addSource(source);\n\t\t}\n\t},\n\n\n\tremoveEventSources: function(sourceMultiQuery) {\n\t\tvar eventManager = this.eventManager;\n\t\tvar sources;\n\t\tvar i;\n\n\t\tif (sourceMultiQuery == null) {\n\t\t\tthis.eventManager.removeAllSources();\n\t\t}\n\t\telse {\n\t\t\tsources = eventManager.multiQuerySources(sourceMultiQuery);\n\n\t\t\teventManager.freeze();\n\n\t\t\tfor (i = 0; i < sources.length; i++) {\n\t\t\t\teventManager.removeSource(sources[i]);\n\t\t\t}\n\n\t\t\teventManager.thaw();\n\t\t}\n\t},\n\n\n\tremoveEventSource: function(sourceQuery) {\n\t\tvar eventManager = this.eventManager;\n\t\tvar sources = eventManager.querySources(sourceQuery);\n\t\tvar i;\n\n\t\teventManager.freeze();\n\n\t\tfor (i = 0; i < sources.length; i++) {\n\t\t\teventManager.removeSource(sources[i]);\n\t\t}\n\n\t\teventManager.thaw();\n\t},\n\n\n\trefetchEventSources: function(sourceMultiQuery) {\n\t\tvar eventManager = this.eventManager;\n\t\tvar sources = eventManager.multiQuerySources(sourceMultiQuery);\n\t\tvar i;\n\n\t\teventManager.freeze();\n\n\t\tfor (i = 0; i < sources.length; i++) {\n\t\t\teventManager.refetchSource(sources[i]);\n\t\t}\n\n\t\teventManager.thaw();\n\t},\n\n\n\t// Events\n\t// ------------------------------------------------------------------------------------\n\n\n\trefetchEvents: function() {\n\t\tthis.eventManager.refetchAllSources();\n\t},\n\n\n\trenderEvents: function(eventInputs, isSticky) {\n\t\tthis.eventManager.freeze();\n\n\t\tfor (var i = 0; i < eventInputs.length; i++) {\n\t\t\tthis.renderEvent(eventInputs[i], isSticky);\n\t\t}\n\n\t\tthis.eventManager.thaw();\n\t},\n\n\n\trenderEvent: function(eventInput, isSticky) {\n\t\tvar eventManager = this.eventManager;\n\t\tvar eventDef = EventDefParser.parse(\n\t\t\teventInput,\n\t\t\teventInput.source || eventManager.stickySource\n\t\t);\n\n\t\tif (eventDef) {\n\t\t\teventManager.addEventDef(eventDef, isSticky);\n\t\t}\n\t},\n\n\n\t// legacyQuery operates on legacy event instance objects\n\tremoveEvents: function(legacyQuery) {\n\t\tvar eventManager = this.eventManager;\n\t\tvar eventInstances = eventManager.getEventInstances();\n\t\tvar legacyInstances;\n\t\tvar idMap = {};\n\t\tvar eventDef;\n\t\tvar i;\n\n\t\tif (legacyQuery == null) { // shortcut for removing all\n\t\t\teventManager.removeAllEventDefs();\n\t\t}\n\t\telse {\n\t\t\tlegacyInstances = eventInstances.map(function(eventInstance) {\n\t\t\t\treturn eventInstance.toLegacy();\n\t\t\t});\n\n\t\t\tlegacyInstances = filterLegacyEventInstances(legacyInstances, legacyQuery);\n\n\t\t\t// compute unique IDs\n\t\t\tfor (i = 0; i < legacyInstances.length; i++) {\n\t\t\t\teventDef = this.eventManager.getEventDefByUid(legacyInstances[i]._id);\n\t\t\t\tidMap[eventDef.id] = true;\n\t\t\t}\n\n\t\t\teventManager.freeze();\n\n\t\t\tfor (i in idMap) { // reuse `i` as an \"id\"\n\t\t\t\teventManager.removeEventDefsById(i);\n\t\t\t}\n\n\t\t\teventManager.thaw();\n\t\t}\n\t},\n\n\n\t// legacyQuery operates on legacy event instance objects\n\tclientEvents: function(legacyQuery) {\n\t\tvar eventInstances = this.eventManager.getEventInstances();\n\t\tvar legacyEventInstances = eventInstances.map(function(eventInstance) {\n\t\t\treturn eventInstance.toLegacy();\n\t\t});\n\n\t\treturn filterLegacyEventInstances(legacyEventInstances, legacyQuery);\n\t},\n\n\n\tupdateEvents: function(eventPropsArray) {\n\t\tthis.eventManager.freeze();\n\n\t\tfor (var i = 0; i < eventPropsArray.length; i++) {\n\t\t\tthis.updateEvent(eventPropsArray[i]);\n\t\t}\n\n\t\tthis.eventManager.thaw();\n\t},\n\n\n\tupdateEvent: function(eventProps) {\n\t\tvar eventDef = this.eventManager.getEventDefByUid(eventProps._id);\n\t\tvar eventInstance;\n\t\tvar eventDefMutation;\n\n\t\tif (eventDef instanceof SingleEventDef) {\n\t\t\teventInstance = eventDef.buildInstance();\n\n\t\t\teventDefMutation = EventDefMutation.createFromRawProps(\n\t\t\t\teventInstance,\n\t\t\t\teventProps, // raw props\n\t\t\t\tnull // largeUnit -- who uses it?\n\t\t\t);\n\n\t\t\tthis.eventManager.mutateEventsWithId(eventDef.id, eventDefMutation); // will release\n\t\t}\n\t}\n\n});\n\n\nfunction filterLegacyEventInstances(legacyEventInstances, legacyQuery) {\n\tif (legacyQuery == null) {\n\t\treturn legacyEventInstances;\n\t}\n\telse if ($.isFunction(legacyQuery)) {\n\t\treturn legacyEventInstances.filter(legacyQuery);\n\t}\n\telse { // an event ID\n\t\tlegacyQuery += ''; // normalize to string\n\n\t\treturn legacyEventInstances.filter(function(legacyEventInstance) {\n\t\t\t// soft comparison because id not be normalized to string\n\t\t\treturn legacyEventInstance.id == legacyQuery;\n\t\t});\n\t}\n}\n\n;;\n\nCalendar.defaults = {\n\n\ttitleRangeSeparator: ' \\u2013 ', // en dash\n\tmonthYearFormat: 'MMMM YYYY', // required for en. other locales rely on datepicker computable option\n\n\tdefaultTimedEventDuration: '02:00:00',\n\tdefaultAllDayEventDuration: { days: 1 },\n\tforceEventDuration: false,\n\tnextDayThreshold: '09:00:00', // 9am\n\n\t// display\n\tdefaultView: 'month',\n\taspectRatio: 1.35,\n\theader: {\n\t\tleft: 'title',\n\t\tcenter: '',\n\t\tright: 'today prev,next'\n\t},\n\tweekends: true,\n\tweekNumbers: false,\n\n\tweekNumberTitle: 'W',\n\tweekNumberCalculation: 'local',\n\t\n\t//editable: false,\n\n\t//nowIndicator: false,\n\n\tscrollTime: '06:00:00',\n\tminTime: '00:00:00',\n\tmaxTime: '24:00:00',\n\tshowNonCurrentDates: true,\n\t\n\t// event ajax\n\tlazyFetching: true,\n\tstartParam: 'start',\n\tendParam: 'end',\n\ttimezoneParam: 'timezone',\n\n\ttimezone: false,\n\n\t//allDayDefault: undefined,\n\n\t// locale\n\tisRTL: false,\n\tbuttonText: {\n\t\tprev: \"prev\",\n\t\tnext: \"next\",\n\t\tprevYear: \"prev year\",\n\t\tnextYear: \"next year\",\n\t\tyear: 'year', // TODO: locale files need to specify this\n\t\ttoday: 'today',\n\t\tmonth: 'month',\n\t\tweek: 'week',\n\t\tday: 'day'\n\t},\n\t//buttonIcons: null,\n\n\tallDayText: 'all-day',\n\t\n\t// jquery-ui theming\n\ttheme: false,\n\t//themeButtonIcons: null,\n\n\t//eventResizableFromStart: false,\n\tdragOpacity: .75,\n\tdragRevertDuration: 500,\n\tdragScroll: true,\n\t\n\t//selectable: false,\n\tunselectAuto: true,\n\t//selectMinDistance: 0,\n\t\n\tdropAccept: '*',\n\n\teventOrder: 'title',\n\t//eventRenderWait: null,\n\n\teventLimit: false,\n\teventLimitText: 'more',\n\teventLimitClick: 'popover',\n\tdayPopoverFormat: 'LL',\n\t\n\thandleWindowResize: true,\n\twindowResizeDelay: 100, // milliseconds before an updateSize happens\n\n\tlongPressDelay: 1000\n\t\n};\n\n\nCalendar.englishDefaults = { // used by locale.js\n\tdayPopoverFormat: 'dddd, MMMM D'\n};\n\n\nCalendar.rtlDefaults = { // right-to-left defaults\n\theader: { // TODO: smarter solution (first/center/last ?)\n\t\tleft: 'next,prev today',\n\t\tcenter: '',\n\t\tright: 'title'\n\t},\n\tbuttonIcons: {\n\t\tprev: 'right-single-arrow',\n\t\tnext: 'left-single-arrow',\n\t\tprevYear: 'right-double-arrow',\n\t\tnextYear: 'left-double-arrow'\n\t},\n\tthemeButtonIcons: {\n\t\tprev: 'circle-triangle-e',\n\t\tnext: 'circle-triangle-w',\n\t\tnextYear: 'seek-prev',\n\t\tprevYear: 'seek-next'\n\t}\n};\n\n;;\n\nvar localeOptionHash = FC.locales = {}; // initialize and expose\n\n\n// TODO: document the structure and ordering of a FullCalendar locale file\n\n\n// Initialize jQuery UI datepicker translations while using some of the translations\n// Will set this as the default locales for datepicker.\nFC.datepickerLocale = function(localeCode, dpLocaleCode, dpOptions) {\n\n\t// get the FullCalendar internal option hash for this locale. create if necessary\n\tvar fcOptions = localeOptionHash[localeCode] || (localeOptionHash[localeCode] = {});\n\n\t// transfer some simple options from datepicker to fc\n\tfcOptions.isRTL = dpOptions.isRTL;\n\tfcOptions.weekNumberTitle = dpOptions.weekHeader;\n\n\t// compute some more complex options from datepicker\n\t$.each(dpComputableOptions, function(name, func) {\n\t\tfcOptions[name] = func(dpOptions);\n\t});\n\n\t// is jQuery UI Datepicker is on the page?\n\tif ($.datepicker) {\n\n\t\t// Register the locale data.\n\t\t// FullCalendar and MomentJS use locale codes like \"pt-br\" but Datepicker\n\t\t// does it like \"pt-BR\" or if it doesn't have the locale, maybe just \"pt\".\n\t\t// Make an alias so the locale can be referenced either way.\n\t\t$.datepicker.regional[dpLocaleCode] =\n\t\t\t$.datepicker.regional[localeCode] = // alias\n\t\t\t\tdpOptions;\n\n\t\t// Alias 'en' to the default locale data. Do this every time.\n\t\t$.datepicker.regional.en = $.datepicker.regional[''];\n\n\t\t// Set as Datepicker's global defaults.\n\t\t$.datepicker.setDefaults(dpOptions);\n\t}\n};\n\n\n// Sets FullCalendar-specific translations. Will set the locales as the global default.\nFC.locale = function(localeCode, newFcOptions) {\n\tvar fcOptions;\n\tvar momOptions;\n\n\t// get the FullCalendar internal option hash for this locale. create if necessary\n\tfcOptions = localeOptionHash[localeCode] || (localeOptionHash[localeCode] = {});\n\n\t// provided new options for this locales? merge them in\n\tif (newFcOptions) {\n\t\tfcOptions = localeOptionHash[localeCode] = mergeOptions([ fcOptions, newFcOptions ]);\n\t}\n\n\t// compute locale options that weren't defined.\n\t// always do this. newFcOptions can be undefined when initializing from i18n file,\n\t// so no way to tell if this is an initialization or a default-setting.\n\tmomOptions = getMomentLocaleData(localeCode); // will fall back to en\n\t$.each(momComputableOptions, function(name, func) {\n\t\tif (fcOptions[name] == null) {\n\t\t\tfcOptions[name] = func(momOptions, fcOptions);\n\t\t}\n\t});\n\n\t// set it as the default locale for FullCalendar\n\tCalendar.defaults.locale = localeCode;\n};\n\n\n// NOTE: can't guarantee any of these computations will run because not every locale has datepicker\n// configs, so make sure there are English fallbacks for these in the defaults file.\nvar dpComputableOptions = {\n\n\tbuttonText: function(dpOptions) {\n\t\treturn {\n\t\t\t// the translations sometimes wrongly contain HTML entities\n\t\t\tprev: stripHtmlEntities(dpOptions.prevText),\n\t\t\tnext: stripHtmlEntities(dpOptions.nextText),\n\t\t\ttoday: stripHtmlEntities(dpOptions.currentText)\n\t\t};\n\t},\n\n\t// Produces format strings like \"MMMM YYYY\" -> \"September 2014\"\n\tmonthYearFormat: function(dpOptions) {\n\t\treturn dpOptions.showMonthAfterYear ?\n\t\t\t'YYYY[' + dpOptions.yearSuffix + '] MMMM' :\n\t\t\t'MMMM YYYY[' + dpOptions.yearSuffix + ']';\n\t}\n\n};\n\nvar momComputableOptions = {\n\n\t// Produces format strings like \"ddd M/D\" -> \"Fri 9/15\"\n\tdayOfMonthFormat: function(momOptions, fcOptions) {\n\t\tvar format = momOptions.longDateFormat('l'); // for the format like \"M/D/YYYY\"\n\n\t\t// strip the year off the edge, as well as other misc non-whitespace chars\n\t\tformat = format.replace(/^Y+[^\\w\\s]*|[^\\w\\s]*Y+$/g, '');\n\n\t\tif (fcOptions.isRTL) {\n\t\t\tformat += ' ddd'; // for RTL, add day-of-week to end\n\t\t}\n\t\telse {\n\t\t\tformat = 'ddd ' + format; // for LTR, add day-of-week to beginning\n\t\t}\n\t\treturn format;\n\t},\n\n\t// Produces format strings like \"h:mma\" -> \"6:00pm\"\n\tmediumTimeFormat: function(momOptions) { // can't be called `timeFormat` because collides with option\n\t\treturn momOptions.longDateFormat('LT')\n\t\t\t.replace(/\\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand\n\t},\n\n\t// Produces format strings like \"h(:mm)a\" -> \"6pm\" / \"6:30pm\"\n\tsmallTimeFormat: function(momOptions) {\n\t\treturn momOptions.longDateFormat('LT')\n\t\t\t.replace(':mm', '(:mm)')\n\t\t\t.replace(/(\\Wmm)$/, '($1)') // like above, but for foreign locales\n\t\t\t.replace(/\\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand\n\t},\n\n\t// Produces format strings like \"h(:mm)t\" -> \"6p\" / \"6:30p\"\n\textraSmallTimeFormat: function(momOptions) {\n\t\treturn momOptions.longDateFormat('LT')\n\t\t\t.replace(':mm', '(:mm)')\n\t\t\t.replace(/(\\Wmm)$/, '($1)') // like above, but for foreign locales\n\t\t\t.replace(/\\s*a$/i, 't'); // convert to AM/PM/am/pm to lowercase one-letter. remove any spaces beforehand\n\t},\n\n\t// Produces format strings like \"ha\" / \"H\" -> \"6pm\" / \"18\"\n\thourFormat: function(momOptions) {\n\t\treturn momOptions.longDateFormat('LT')\n\t\t\t.replace(':mm', '')\n\t\t\t.replace(/(\\Wmm)$/, '') // like above, but for foreign locales\n\t\t\t.replace(/\\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand\n\t},\n\n\t// Produces format strings like \"h:mm\" -> \"6:30\" (with no AM/PM)\n\tnoMeridiemTimeFormat: function(momOptions) {\n\t\treturn momOptions.longDateFormat('LT')\n\t\t\t.replace(/\\s*a$/i, ''); // remove trailing AM/PM\n\t}\n\n};\n\n\n// options that should be computed off live calendar options (considers override options)\n// TODO: best place for this? related to locale?\n// TODO: flipping text based on isRTL is a bad idea because the CSS `direction` might want to handle it\nvar instanceComputableOptions = {\n\n\t// Produces format strings for results like \"Mo 16\"\n\tsmallDayDateFormat: function(options) {\n\t\treturn options.isRTL ?\n\t\t\t'D dd' :\n\t\t\t'dd D';\n\t},\n\n\t// Produces format strings for results like \"Wk 5\"\n\tweekFormat: function(options) {\n\t\treturn options.isRTL ?\n\t\t\t'w[ ' + options.weekNumberTitle + ']' :\n\t\t\t'[' + options.weekNumberTitle + ' ]w';\n\t},\n\n\t// Produces format strings for results like \"Wk5\"\n\tsmallWeekFormat: function(options) {\n\t\treturn options.isRTL ?\n\t\t\t'w[' + options.weekNumberTitle + ']' :\n\t\t\t'[' + options.weekNumberTitle + ']w';\n\t}\n\n};\n\n// TODO: make these computable properties in optionsModel\nfunction populateInstanceComputableOptions(options) {\n\t$.each(instanceComputableOptions, function(name, func) {\n\t\tif (options[name] == null) {\n\t\t\toptions[name] = func(options);\n\t\t}\n\t});\n}\n\n\n// Returns moment's internal locale data. If doesn't exist, returns English.\nfunction getMomentLocaleData(localeCode) {\n\treturn moment.localeData(localeCode) || moment.localeData('en');\n}\n\n\n// Initialize English by forcing computation of moment-derived options.\n// Also, sets it as the default.\nFC.locale('en', Calendar.englishDefaults);\n\n;;\n\nvar UnzonedRange = FC.UnzonedRange = Class.extend({\n\n\tstartMs: null, // if null, no start constraint\n\tendMs: null, // if null, no end constraint\n\n\t// TODO: move these into footprint.\n\t// Especially, doesn't make sense for null startMs/endMs.\n\tisStart: true,\n\tisEnd: true,\n\n\tconstructor: function(startInput, endInput) {\n\n\t\tif (moment.isMoment(startInput)) {\n\t\t\tstartInput = startInput.clone().stripZone();\n\t\t}\n\n\t\tif (moment.isMoment(endInput)) {\n\t\t\tendInput = endInput.clone().stripZone();\n\t\t}\n\n\t\tif (startInput) {\n\t\t\tthis.startMs = startInput.valueOf();\n\t\t}\n\n\t\tif (endInput) {\n\t\t\tthis.endMs = endInput.valueOf();\n\t\t}\n\t},\n\n\tintersect: function(otherRange) {\n\t\tvar startMs = this.startMs;\n\t\tvar endMs = this.endMs;\n\t\tvar newRange = null;\n\n\t\tif (otherRange.startMs !== null) {\n\t\t\tif (startMs === null) {\n\t\t\t\tstartMs = otherRange.startMs;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tstartMs = Math.max(startMs, otherRange.startMs);\n\t\t\t}\n\t\t}\n\n\t\tif (otherRange.endMs !== null) {\n\t\t\tif (endMs === null) {\n\t\t\t\tendMs = otherRange.endMs;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tendMs = Math.min(endMs, otherRange.endMs);\n\t\t\t}\n\t\t}\n\n\t\tif (startMs === null || endMs === null || startMs < endMs) {\n\t\t\tnewRange = new UnzonedRange(startMs, endMs);\n\t\t\tnewRange.isStart = this.isStart && startMs === this.startMs;\n\t\t\tnewRange.isEnd = this.isEnd && endMs === this.endMs;\n\t\t}\n\n\t\treturn newRange;\n\t},\n\n\n\tintersectsWith: function(otherRange) {\n\t\treturn (this.endMs === null || otherRange.startMs === null || this.endMs > otherRange.startMs) &&\n\t\t\t(this.startMs === null || otherRange.endMs === null || this.startMs < otherRange.endMs);\n\t},\n\n\n\tcontainsRange: function(innerRange) {\n\t\treturn (this.startMs === null || (innerRange.startMs !== null && innerRange.startMs >= this.startMs)) &&\n\t\t\t(this.endMs === null || (innerRange.endMs !== null && innerRange.endMs <= this.endMs));\n\t},\n\n\n\t// `date` can be a moment, a Date, or a millisecond time.\n\tcontainsDate: function(date) {\n\t\tvar ms = date.valueOf();\n\n\t\treturn (this.startMs === null || ms >= this.startMs) &&\n\t\t\t(this.endMs === null || ms < this.endMs);\n\t},\n\n\n\t// If the given date is not within the given range, move it inside.\n\t// (If it's past the end, make it one millisecond before the end).\n\t// `date` can be a moment, a Date, or a millisecond time.\n\t// Returns a MS-time.\n\tconstrainDate: function(date) {\n\t\tvar ms = date.valueOf();\n\n\t\tif (this.startMs !== null && ms < this.startMs) {\n\t\t\tms = this.startMs;\n\t\t}\n\n\t\tif (this.endMs !== null && ms >= this.endMs) {\n\t\t\tms = this.endMs - 1;\n\t\t}\n\n\t\treturn ms;\n\t},\n\n\n\tequals: function(otherRange) {\n\t\treturn this.startMs === otherRange.startMs && this.endMs === otherRange.endMs;\n\t},\n\n\n\tclone: function() {\n\t\tvar range = new UnzonedRange(this.startMs, this.endMs);\n\n\t\trange.isStart = this.isStart;\n\t\trange.isEnd = this.isEnd;\n\n\t\treturn range;\n\t},\n\n\n\t// Returns an ambig-zoned moment from startMs.\n\t// BEWARE: returned moment is not localized.\n\t// Formatting and start-of-week will be default.\n\tgetStart: function() {\n\t\tif (this.startMs !== null) {\n\t\t\treturn FC.moment.utc(this.startMs).stripZone();\n\t\t}\n\t},\n\n\t// Returns an ambig-zoned moment from startMs.\n\t// BEWARE: returned moment is not localized.\n\t// Formatting and start-of-week will be default.\n\tgetEnd: function() {\n\t\tif (this.endMs !== null) {\n\t\t\treturn FC.moment.utc(this.endMs).stripZone();\n\t\t}\n\t}\n\n});\n\n\n/*\nSIDEEFFECT: will mutate eventRanges.\nWill return a new array result.\nOnly works for non-open-ended ranges.\n*/\nfunction invertUnzonedRanges(ranges, constraintRange) {\n\tvar invertedRanges = [];\n\tvar startMs = constraintRange.startMs; // the end of the previous range. the start of the new range\n\tvar i;\n\tvar dateRange;\n\n\t// ranges need to be in order. required for our date-walking algorithm\n\tranges.sort(compareUnzonedRanges);\n\n\tfor (i = 0; i < ranges.length; i++) {\n\t\tdateRange = ranges[i];\n\n\t\t// add the span of time before the event (if there is any)\n\t\tif (dateRange.startMs > startMs) { // compare millisecond time (skip any ambig logic)\n\t\t\tinvertedRanges.push(\n\t\t\t\tnew UnzonedRange(startMs, dateRange.startMs)\n\t\t\t);\n\t\t}\n\n\t\tif (dateRange.endMs > startMs) {\n\t\t\tstartMs = dateRange.endMs;\n\t\t}\n\t}\n\n\t// add the span of time after the last event (if there is any)\n\tif (startMs < constraintRange.endMs) { // compare millisecond time (skip any ambig logic)\n\t\tinvertedRanges.push(\n\t\t\tnew UnzonedRange(startMs, constraintRange.endMs)\n\t\t);\n\t}\n\n\treturn invertedRanges;\n}\n\n\n/*\nOnly works for non-open-ended ranges.\n*/\nfunction compareUnzonedRanges(range1, range2) {\n\treturn range1.startMs - range2.startMs; // earlier ranges go first\n}\n\n;;\n\n/*\nMeant to be immutable\n*/\nvar ComponentFootprint = FC.ComponentFootprint = Class.extend({\n\n\tunzonedRange: null,\n\tisAllDay: false, // component can choose to ignore this\n\n\n\tconstructor: function(unzonedRange, isAllDay) {\n\t\tthis.unzonedRange = unzonedRange;\n\t\tthis.isAllDay = isAllDay;\n\t},\n\n\n\t/*\n\tOnly works for non-open-ended ranges.\n\t*/\n\ttoLegacy: function(calendar) {\n\t\treturn {\n\t\t\tstart: calendar.msToMoment(this.unzonedRange.startMs, this.isAllDay),\n\t\t\tend: calendar.msToMoment(this.unzonedRange.endMs, this.isAllDay)\n\t\t};\n\t}\n\n});\n\n;;\n\nvar EventManager = Class.extend(EmitterMixin, ListenerMixin, {\n\n\tcurrentPeriod: null,\n\n\tcalendar: null,\n\tstickySource: null,\n\totherSources: null, // does not include sticky source\n\n\n\tconstructor: function(calendar) {\n\t\tthis.calendar = calendar;\n\t\tthis.stickySource = new ArrayEventSource(calendar);\n\t\tthis.otherSources = [];\n\t},\n\n\n\trequestEvents: function(start, end, timezone, force) {\n\t\tif (\n\t\t\tforce ||\n\t\t\t!this.currentPeriod ||\n\t\t\t!this.currentPeriod.isWithinRange(start, end) ||\n\t\t\ttimezone !== this.currentPeriod.timezone\n\t\t) {\n\t\t\tthis.setPeriod( // will change this.currentPeriod\n\t\t\t\tnew EventPeriod(start, end, timezone)\n\t\t\t);\n\t\t}\n\n\t\treturn this.currentPeriod.whenReleased();\n\t},\n\n\n\t// Source Adding/Removing\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\taddSource: function(eventSource) {\n\t\tthis.otherSources.push(eventSource);\n\n\t\tif (this.currentPeriod) {\n\t\t\tthis.currentPeriod.requestSource(eventSource); // might release\n\t\t}\n\t},\n\n\n\tremoveSource: function(doomedSource) {\n\t\tremoveExact(this.otherSources, doomedSource);\n\n\t\tif (this.currentPeriod) {\n\t\t\tthis.currentPeriod.purgeSource(doomedSource); // might release\n\t\t}\n\t},\n\n\n\tremoveAllSources: function() {\n\t\tthis.otherSources = [];\n\n\t\tif (this.currentPeriod) {\n\t\t\tthis.currentPeriod.purgeAllSources(); // might release\n\t\t}\n\t},\n\n\n\t// Source Refetching\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\trefetchSource: function(eventSource) {\n\t\tvar currentPeriod = this.currentPeriod;\n\n\t\tif (currentPeriod) {\n\t\t\tcurrentPeriod.freeze();\n\t\t\tcurrentPeriod.purgeSource(eventSource);\n\t\t\tcurrentPeriod.requestSource(eventSource);\n\t\t\tcurrentPeriod.thaw();\n\t\t}\n\t},\n\n\n\trefetchAllSources: function() {\n\t\tvar currentPeriod = this.currentPeriod;\n\n\t\tif (currentPeriod) {\n\t\t\tcurrentPeriod.freeze();\n\t\t\tcurrentPeriod.purgeAllSources();\n\t\t\tcurrentPeriod.requestSources(this.getSources());\n\t\t\tcurrentPeriod.thaw();\n\t\t}\n\t},\n\n\n\t// Source Querying\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tgetSources: function() {\n\t\treturn [ this.stickySource ].concat(this.otherSources);\n\t},\n\n\n\t// like querySources, but accepts multple match criteria (like multiple IDs)\n\tmultiQuerySources: function(matchInputs) {\n\n\t\t// coerce into an array\n\t\tif (!matchInputs) {\n\t\t\tmatchInputs = [];\n\t\t}\n\t\telse if (!$.isArray(matchInputs)) {\n\t\t\tmatchInputs = [ matchInputs ];\n\t\t}\n\n\t\tvar matchingSources = [];\n\t\tvar i;\n\n\t\t// resolve raw inputs to real event source objects\n\t\tfor (i = 0; i < matchInputs.length; i++) {\n\t\t\tmatchingSources.push.apply( // append\n\t\t\t\tmatchingSources,\n\t\t\t\tthis.querySources(matchInputs[i])\n\t\t\t);\n\t\t}\n\n\t\treturn matchingSources;\n\t},\n\n\n\t// matchInput can either by a real event source object, an ID, or the function/URL for the source.\n\t// returns an array of matching source objects.\n\tquerySources: function(matchInput) {\n\t\tvar sources = this.otherSources;\n\t\tvar i, source;\n\n\t\t// given a proper event source object\n\t\tfor (i = 0; i < sources.length; i++) {\n\t\t\tsource = sources[i];\n\n\t\t\tif (source === matchInput) {\n\t\t\t\treturn [ source ];\n\t\t\t}\n\t\t}\n\n\t\t// an ID match\n\t\tsource = this.getSourceById(EventSource.normalizeId(matchInput));\n\t\tif (source) {\n\t\t\treturn [ source ];\n\t\t}\n\n\t\t// parse as an event source\n\t\tmatchInput = EventSourceParser.parse(matchInput, this.calendar);\n\t\tif (matchInput) {\n\n\t\t\treturn $.grep(sources, function(source) {\n\t\t\t\treturn isSourcesEquivalent(matchInput, source);\n\t\t\t});\n\t\t}\n\t},\n\n\n\t/*\n\tID assumed to already be normalized\n\t*/\n\tgetSourceById: function(id) {\n\t\treturn $.grep(this.otherSources, function(source) {\n\t\t\treturn source.id && source.id === id;\n\t\t})[0];\n\t},\n\n\n\t// Event-Period\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tsetPeriod: function(eventPeriod) {\n\t\tif (this.currentPeriod) {\n\t\t\tthis.unbindPeriod(this.currentPeriod);\n\t\t\tthis.currentPeriod = null;\n\t\t}\n\n\t\tthis.currentPeriod = eventPeriod;\n\t\tthis.bindPeriod(eventPeriod);\n\n\t\teventPeriod.requestSources(this.getSources());\n\t},\n\n\n\tbindPeriod: function(eventPeriod) {\n\t\tthis.listenTo(eventPeriod, 'release', function(eventsPayload) {\n\t\t\tthis.trigger('release', eventsPayload);\n\t\t});\n\t},\n\n\n\tunbindPeriod: function(eventPeriod) {\n\t\tthis.stopListeningTo(eventPeriod);\n\t},\n\n\n\t// Event Getting/Adding/Removing\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tgetEventDefByUid: function(uid) {\n\t\tif (this.currentPeriod) {\n\t\t\treturn this.currentPeriod.getEventDefByUid(uid);\n\t\t}\n\t},\n\n\n\taddEventDef: function(eventDef, isSticky) {\n\t\tif (isSticky) {\n\t\t\tthis.stickySource.addEventDef(eventDef);\n\t\t}\n\n\t\tif (this.currentPeriod) {\n\t\t\tthis.currentPeriod.addEventDef(eventDef); // might release\n\t\t}\n\t},\n\n\n\tremoveEventDefsById: function(eventId) {\n\t\tthis.getSources().forEach(function(eventSource) {\n\t\t\teventSource.removeEventDefsById(eventId);\n\t\t});\n\n\t\tif (this.currentPeriod) {\n\t\t\tthis.currentPeriod.removeEventDefsById(eventId); // might release\n\t\t}\n\t},\n\n\n\tremoveAllEventDefs: function() {\n\t\tthis.getSources().forEach(function(eventSource) {\n\t\t\teventSource.removeAllEventDefs();\n\t\t});\n\n\t\tif (this.currentPeriod) {\n\t\t\tthis.currentPeriod.removeAllEventDefs();\n\t\t}\n\t},\n\n\n\t// Event Mutating\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\t/*\n\tReturns an undo function.\n\t*/\n\tmutateEventsWithId: function(eventDefId, eventDefMutation) {\n\t\tvar currentPeriod = this.currentPeriod;\n\t\tvar eventDefs;\n\t\tvar undoFuncs = [];\n\n\t\tif (currentPeriod) {\n\n\t\t\tcurrentPeriod.freeze();\n\n\t\t\teventDefs = currentPeriod.getEventDefsById(eventDefId);\n\t\t\teventDefs.forEach(function(eventDef) {\n\t\t\t\t// add/remove esp because id might change\n\t\t\t\tcurrentPeriod.removeEventDef(eventDef);\n\t\t\t\tundoFuncs.push(eventDefMutation.mutateSingle(eventDef));\n\t\t\t\tcurrentPeriod.addEventDef(eventDef);\n\t\t\t});\n\n\t\t\tcurrentPeriod.thaw();\n\n\t\t\treturn function() {\n\t\t\t\tcurrentPeriod.freeze();\n\n\t\t\t\tfor (var i = 0; i < eventDefs.length; i++) {\n\t\t\t\t\tcurrentPeriod.removeEventDef(eventDefs[i]);\n\t\t\t\t\tundoFuncs[i]();\n\t\t\t\t\tcurrentPeriod.addEventDef(eventDefs[i]);\n\t\t\t\t}\n\n\t\t\t\tcurrentPeriod.thaw();\n\t\t\t};\n\t\t}\n\n\t\treturn function() { };\n\t},\n\n\n\t/*\n\tcopies and then mutates\n\t*/\n\tbuildMutatedEventInstanceGroup: function(eventDefId, eventDefMutation) {\n\t\tvar eventDefs = this.getEventDefsById(eventDefId);\n\t\tvar i;\n\t\tvar defCopy;\n\t\tvar allInstances = [];\n\n\t\tfor (i = 0; i < eventDefs.length; i++) {\n\t\t\tdefCopy = eventDefs[i].clone();\n\n\t\t\tif (defCopy instanceof SingleEventDef) {\n\t\t\t\teventDefMutation.mutateSingle(defCopy);\n\n\t\t\t\tallInstances.push.apply(allInstances, // append\n\t\t\t\t\tdefCopy.buildInstances()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn new EventInstanceGroup(allInstances);\n\t},\n\n\n\t// Freezing\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tfreeze: function() {\n\t\tif (this.currentPeriod) {\n\t\t\tthis.currentPeriod.freeze();\n\t\t}\n\t},\n\n\n\tthaw: function() {\n\t\tif (this.currentPeriod) {\n\t\t\tthis.currentPeriod.thaw();\n\t\t}\n\t}\n\n});\n\n\n// Methods that straight-up query the current EventPeriod for an array of results.\n[\n\t'getEventDefsById',\n\t'getEventInstances',\n\t'getEventInstancesWithId',\n\t'getEventInstancesWithoutId'\n].forEach(function(methodName) {\n\n\tEventManager.prototype[methodName] = function() {\n\t\tvar currentPeriod = this.currentPeriod;\n\n\t\tif (currentPeriod) {\n\t\t\treturn currentPeriod[methodName].apply(currentPeriod, arguments);\n\t\t}\n\n\t\treturn [];\n\t};\n});\n\n\nfunction isSourcesEquivalent(source0, source1) {\n\treturn source0.getPrimitive() == source1.getPrimitive();\n}\n\n;;\n\nvar EventPeriod = Class.extend(EmitterMixin, {\n\n\tstart: null,\n\tend: null,\n\ttimezone: null,\n\n\tunzonedRange: null,\n\n\trequestsByUid: null,\n\tpendingCnt: 0,\n\n\tfreezeDepth: 0,\n\tstuntedReleaseCnt: 0,\n\treleaseCnt: 0,\n\n\teventDefsByUid: null,\n\teventDefsById: null,\n\teventInstanceGroupsById: null,\n\n\n\tconstructor: function(start, end, timezone) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.timezone = timezone;\n\n\t\tthis.unzonedRange = new UnzonedRange(\n\t\t\tstart.clone().stripZone(),\n\t\t\tend.clone().stripZone()\n\t\t);\n\n\t\tthis.requestsByUid = {};\n\t\tthis.eventDefsByUid = {};\n\t\tthis.eventDefsById = {};\n\t\tthis.eventInstanceGroupsById = {};\n\t},\n\n\n\tisWithinRange: function(start, end) {\n\t\t// TODO: use a range util function?\n\t\treturn !start.isBefore(this.start) && !end.isAfter(this.end);\n\t},\n\n\n\t// Requesting and Purging\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\trequestSources: function(sources) {\n\t\tthis.freeze();\n\n\t\tfor (var i = 0; i < sources.length; i++) {\n\t\t\tthis.requestSource(sources[i]);\n\t\t}\n\n\t\tthis.thaw();\n\t},\n\n\n\trequestSource: function(source) {\n\t\tvar _this = this;\n\t\tvar request = { source: source, status: 'pending' };\n\n\t\tthis.requestsByUid[source.uid] = request;\n\t\tthis.pendingCnt += 1;\n\n\t\tsource.fetch(this.start, this.end, this.timezone).then(function(eventDefs) {\n\t\t\tif (request.status !== 'cancelled') {\n\t\t\t\trequest.status = 'completed';\n\t\t\t\trequest.eventDefs = eventDefs;\n\n\t\t\t\t_this.addEventDefs(eventDefs);\n\t\t\t\t_this.pendingCnt--;\n\t\t\t\t_this.tryRelease();\n\t\t\t}\n\t\t}, function() { // failure\n\t\t\tif (request.status !== 'cancelled') {\n\t\t\t\trequest.status = 'failed';\n\n\t\t\t\t_this.pendingCnt--;\n\t\t\t\t_this.tryRelease();\n\t\t\t}\n\t\t});\n\t},\n\n\n\tpurgeSource: function(source) {\n\t\tvar request = this.requestsByUid[source.uid];\n\n\t\tif (request) {\n\t\t\tdelete this.requestsByUid[source.uid];\n\n\t\t\tif (request.status === 'pending') {\n\t\t\t\trequest.status = 'cancelled';\n\t\t\t\tthis.pendingCnt--;\n\t\t\t\tthis.tryRelease();\n\t\t\t}\n\t\t\telse if (request.status === 'completed') {\n\t\t\t\trequest.eventDefs.forEach(this.removeEventDef.bind(this));\n\t\t\t}\n\t\t}\n\t},\n\n\n\tpurgeAllSources: function() {\n\t\tvar requestsByUid = this.requestsByUid;\n\t\tvar uid, request;\n\t\tvar completedCnt = 0;\n\n\t\tfor (uid in requestsByUid) {\n\t\t\trequest = requestsByUid[uid];\n\n\t\t\tif (request.status === 'pending') {\n\t\t\t\trequest.status = 'cancelled';\n\t\t\t}\n\t\t\telse if (request.status === 'completed') {\n\t\t\t\tcompletedCnt++;\n\t\t\t}\n\t\t}\n\n\t\tthis.requestsByUid = {};\n\t\tthis.pendingCnt = 0;\n\n\t\tif (completedCnt) {\n\t\t\tthis.removeAllEventDefs(); // might release\n\t\t}\n\t},\n\n\n\t// Event Definitions\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tgetEventDefByUid: function(eventDefUid) {\n\t\treturn this.eventDefsByUid[eventDefUid];\n\t},\n\n\n\tgetEventDefsById: function(eventDefId) {\n\t\tvar a = this.eventDefsById[eventDefId];\n\n\t\tif (a) {\n\t\t\treturn a.slice(); // clone\n\t\t}\n\n\t\treturn [];\n\t},\n\n\n\taddEventDefs: function(eventDefs) {\n\t\tfor (var i = 0; i < eventDefs.length; i++) {\n\t\t\tthis.addEventDef(eventDefs[i]);\n\t\t}\n\t},\n\n\n\taddEventDef: function(eventDef) {\n\t\tvar eventDefsById = this.eventDefsById;\n\t\tvar eventDefId = eventDef.id;\n\t\tvar eventDefs = eventDefsById[eventDefId] || (eventDefsById[eventDefId] = []);\n\t\tvar eventInstances = eventDef.buildInstances(this.unzonedRange);\n\t\tvar i;\n\n\t\teventDefs.push(eventDef);\n\n\t\tthis.eventDefsByUid[eventDef.uid] = eventDef;\n\n\t\tfor (i = 0; i < eventInstances.length; i++) {\n\t\t\tthis.addEventInstance(eventInstances[i], eventDefId);\n\t\t}\n\t},\n\n\n\tremoveEventDefsById: function(eventDefId) {\n\t\tvar _this = this;\n\n\t\tthis.getEventDefsById(eventDefId).forEach(function(eventDef) {\n\t\t\t_this.removeEventDef(eventDef);\n\t\t});\n\t},\n\n\n\tremoveAllEventDefs: function() {\n\t\tvar isEmpty = $.isEmptyObject(this.eventDefsByUid);\n\n\t\tthis.eventDefsByUid = {};\n\t\tthis.eventDefsById = {};\n\t\tthis.eventInstanceGroupsById = {};\n\n\t\tif (!isEmpty) {\n\t\t\tthis.tryRelease();\n\t\t}\n\t},\n\n\n\tremoveEventDef: function(eventDef) {\n\t\tvar eventDefsById = this.eventDefsById;\n\t\tvar eventDefs = eventDefsById[eventDef.id];\n\n\t\tdelete this.eventDefsByUid[eventDef.uid];\n\n\t\tif (eventDefs) {\n\t\t\tremoveExact(eventDefs, eventDef);\n\n\t\t\tif (!eventDefs.length) {\n\t\t\t\tdelete eventDefsById[eventDef.id];\n\t\t\t}\n\n\t\t\tthis.removeEventInstancesForDef(eventDef);\n\t\t}\n\t},\n\n\n\t// Event Instances\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\tgetEventInstances: function() { // TODO: consider iterator\n\t\tvar eventInstanceGroupsById = this.eventInstanceGroupsById;\n\t\tvar eventInstances = [];\n\t\tvar id;\n\n\t\tfor (id in eventInstanceGroupsById) {\n\t\t\teventInstances.push.apply(eventInstances, // append\n\t\t\t\teventInstanceGroupsById[id].eventInstances\n\t\t\t);\n\t\t}\n\n\t\treturn eventInstances;\n\t},\n\n\n\tgetEventInstancesWithId: function(eventDefId) {\n\t\tvar eventInstanceGroup = this.eventInstanceGroupsById[eventDefId];\n\n\t\tif (eventInstanceGroup) {\n\t\t\treturn eventInstanceGroup.eventInstances.slice(); // clone\n\t\t}\n\n\t\treturn [];\n\t},\n\n\n\tgetEventInstancesWithoutId: function(eventDefId) { // TODO: consider iterator\n\t\tvar eventInstanceGroupsById = this.eventInstanceGroupsById;\n\t\tvar matchingInstances = [];\n\t\tvar id;\n\n\t\tfor (id in eventInstanceGroupsById) {\n\t\t\tif (id !== eventDefId) {\n\t\t\t\tmatchingInstances.push.apply(matchingInstances, // append\n\t\t\t\t\teventInstanceGroupsById[id].eventInstances\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn matchingInstances;\n\t},\n\n\n\taddEventInstance: function(eventInstance, eventDefId) {\n\t\tvar eventInstanceGroupsById = this.eventInstanceGroupsById;\n\t\tvar eventInstanceGroup = eventInstanceGroupsById[eventDefId] ||\n\t\t\t(eventInstanceGroupsById[eventDefId] = new EventInstanceGroup());\n\n\t\teventInstanceGroup.eventInstances.push(eventInstance);\n\n\t\tthis.tryRelease();\n\t},\n\n\n\tremoveEventInstancesForDef: function(eventDef) {\n\t\tvar eventInstanceGroupsById = this.eventInstanceGroupsById;\n\t\tvar eventInstanceGroup = eventInstanceGroupsById[eventDef.id];\n\t\tvar removeCnt;\n\n\t\tif (eventInstanceGroup) {\n\t\t\tremoveCnt = removeMatching(eventInstanceGroup.eventInstances, function(currentEventInstance) {\n\t\t\t\treturn currentEventInstance.def === eventDef;\n\t\t\t});\n\n\t\t\tif (!eventInstanceGroup.eventInstances.length) {\n\t\t\t\tdelete eventInstanceGroupsById[eventDef.id];\n\t\t\t}\n\n\t\t\tif (removeCnt) {\n\t\t\t\tthis.tryRelease();\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Releasing and Freezing\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\n\ttryRelease: function() {\n\t\tif (!this.pendingCnt) {\n\t\t\tif (!this.freezeDepth) {\n\t\t\t\tthis.release();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.stuntedReleaseCnt++;\n\t\t\t}\n\t\t}\n\t},\n\n\n\trelease: function() {\n\t\tthis.releaseCnt++;\n\t\tthis.trigger('release', this.eventInstanceGroupsById);\n\t},\n\n\n\twhenReleased: function() {\n\t\tvar _this = this;\n\n\t\tif (this.releaseCnt) {\n\t\t\treturn Promise.resolve(this.eventInstanceGroupsById);\n\t\t}\n\t\telse {\n\t\t\treturn Promise.construct(function(onResolve) {\n\t\t\t\t_this.one('release', onResolve);\n\t\t\t});\n\t\t}\n\t},\n\n\n\tfreeze: function() {\n\t\tif (!(this.freezeDepth++)) {\n\t\t\tthis.stuntedReleaseCnt = 0;\n\t\t}\n\t},\n\n\n\tthaw: function() {\n\t\tif (!(--this.freezeDepth) && this.stuntedReleaseCnt && !this.pendingCnt) {\n\t\t\tthis.release();\n\t\t}\n\t}\n\n});\n\n;;\n\nvar EventDefParser = {\n\n\tparse: function(eventInput, source) {\n\t\tif (\n\t\t\tisTimeString(eventInput.start) || moment.isDuration(eventInput.start) ||\n\t\t\tisTimeString(eventInput.end) || moment.isDuration(eventInput.end)\n\t\t) {\n\t\t\treturn RecurringEventDef.parse(eventInput, source);\n\t\t}\n\t\telse {\n\t\t\treturn SingleEventDef.parse(eventInput, source);\n\t\t}\n\t}\n\n};\n\n;;\n\nvar EventDef = FC.EventDef = Class.extend(ParsableModelMixin, {\n\n\tsource: null, // required\n\n\tid: null, // normalized supplied ID\n\trawId: null, // unnormalized supplied ID\n\tuid: null, // internal ID. new ID for every definition\n\n\t// NOTE: eventOrder sorting relies on these\n\ttitle: null,\n\turl: null,\n\trendering: null,\n\tconstraint: null,\n\toverlap: null,\n\teditable: null,\n\tstartEditable: null,\n\tdurationEditable: null,\n\tcolor: null,\n\tbackgroundColor: null,\n\tborderColor: null,\n\ttextColor: null,\n\n\tclassName: null, // an array. TODO: rename to className*s* (API breakage)\n\tmiscProps: null,\n\n\n\tconstructor: function(source) {\n\t\tthis.source = source;\n\t\tthis.className = [];\n\t\tthis.miscProps = {};\n\t},\n\n\n\tisAllDay: function() {\n\t\t// subclasses must implement\n\t},\n\n\n\tbuildInstances: function(unzonedRange) {\n\t\t// subclasses must implement\n\t},\n\n\n\tclone: function() {\n\t\tvar copy = new this.constructor(this.source);\n\n\t\tcopy.id = this.id;\n\t\tcopy.rawId = this.rawId;\n\t\tcopy.uid = this.uid; // not really unique anymore :(\n\n\t\tEventDef.copyVerbatimStandardProps(this, copy);\n\n\t\tcopy.className = this.className; // should clone?\n\t\tcopy.miscProps = $.extend({}, this.miscProps);\n\n\t\treturn copy;\n\t},\n\n\n\thasInverseRendering: function() {\n\t\treturn this.getRendering() === 'inverse-background';\n\t},\n\n\n\thasBgRendering: function() {\n\t\tvar rendering = this.getRendering();\n\n\t\treturn rendering === 'inverse-background' || rendering === 'background';\n\t},\n\n\n\tgetRendering: function() {\n\t\tif (this.rendering != null) {\n\t\t\treturn this.rendering;\n\t\t}\n\n\t\treturn this.source.rendering;\n\t},\n\n\n\tgetConstraint: function() {\n\t\tif (this.constraint != null) {\n\t\t\treturn this.constraint;\n\t\t}\n\n\t\tif (this.source.constraint != null) {\n\t\t\treturn this.source.constraint;\n\t\t}\n\n\t\treturn this.source.calendar.opt('eventConstraint'); // what about View option?\n\t},\n\n\n\tgetOverlap: function() {\n\t\tif (this.overlap != null) {\n\t\t\treturn this.overlap;\n\t\t}\n\n\t\tif (this.source.overlap != null) {\n\t\t\treturn this.source.overlap;\n\t\t}\n\n\t\treturn this.source.calendar.opt('eventOverlap'); // what about View option?\n\t},\n\n\n\tisStartExplicitlyEditable: function() {\n\t\tif (this.startEditable !== null) {\n\t\t\treturn this.startEditable;\n\t\t}\n\n\t\treturn this.source.startEditable;\n\t},\n\n\n\tisDurationExplicitlyEditable: function() {\n\t\tif (this.durationEditable !== null) {\n\t\t\treturn this.durationEditable;\n\t\t}\n\n\t\treturn this.source.durationEditable;\n\t},\n\n\n\tisExplicitlyEditable: function() {\n\t\tif (this.editable !== null) {\n\t\t\treturn this.editable;\n\t\t}\n\n\t\treturn this.source.editable;\n\t},\n\n\n\ttoLegacy: function() {\n\t\tvar obj = $.extend({}, this.miscProps);\n\n\t\tobj._id = this.uid;\n\t\tobj.source = this.source;\n\t\tobj.className = this.className; // should clone?\n\t\tobj.allDay = this.isAllDay();\n\n\t\tif (this.rawId != null) {\n\t\t\tobj.id = this.rawId;\n\t\t}\n\n\t\tEventDef.copyVerbatimStandardProps(this, obj);\n\n\t\treturn obj;\n\t},\n\n\n\tapplyManualRawProps: function(rawProps) {\n\n\t\tif (rawProps.id != null) {\n\t\t\tthis.id = EventDef.normalizeId((this.rawId = rawProps.id));\n\t\t}\n\t\telse {\n\t\t\tthis.id = EventDef.generateId();\n\t\t}\n\n\t\tif (rawProps._id != null) { // accept this prop, even tho somewhat internal\n\t\t\tthis.uid = String(rawProps._id);\n\t\t}\n\t\telse {\n\t\t\tthis.uid = EventDef.generateId();\n\t\t}\n\n\t\t// TODO: converge with EventSource\n\t\tif ($.isArray(rawProps.className)) {\n\t\t\tthis.className = rawProps.className;\n\t\t}\n\t\tif (typeof rawProps.className === 'string') {\n\t\t\tthis.className = rawProps.className.split(/\\s+/);\n\t\t}\n\n\t\treturn true;\n\t},\n\n\n\tapplyOtherRawProps: function(rawProps) {\n\t\tthis.miscProps = rawProps;\n\t}\n\n});\n\n// finish initializing the mixin\nEventDef.allowRawProps = ParsableModelMixin_allowRawProps;\nEventDef.copyVerbatimStandardProps = ParsableModelMixin_copyVerbatimStandardProps;\n\n\n// IDs\n// ---------------------------------------------------------------------------------------------------------------------\n// TODO: converge with EventSource\n\n\nEventDef.uuid = 0;\n\n\nEventDef.normalizeId = function(id) {\n\treturn String(id);\n};\n\n\nEventDef.generateId = function() {\n\treturn '_fc' + (EventDef.uuid++);\n};\n\n\n// Parsing\n// ---------------------------------------------------------------------------------------------------------------------\n\n\nEventDef.allowRawProps({\n\t// not automatically assigned (`false`)\n\t_id: false,\n\tid: false,\n\tclassName: false,\n\tsource: false, // will ignored\n\n\t// automatically assigned (`true`)\n\ttitle: true,\n\turl: true,\n\trendering: true,\n\tconstraint: true,\n\toverlap: true,\n\teditable: true,\n\tstartEditable: true,\n\tdurationEditable: true,\n\tcolor: true,\n\tbackgroundColor: true,\n\tborderColor: true,\n\ttextColor: true\n});\n\n\nEventDef.parse = function(rawInput, source) {\n\tvar def = new this(source);\n\tvar calendarTransform = source.calendar.opt('eventDataTransform');\n\tvar sourceTransform = source.eventDataTransform;\n\n\tif (calendarTransform) {\n\t\trawInput = calendarTransform(rawInput);\n\t}\n\tif (sourceTransform) {\n\t\trawInput = sourceTransform(rawInput);\n\t}\n\n\tif (def.applyRawProps(rawInput)) {\n\t\treturn def;\n\t}\n\n\treturn false;\n};\n\n;;\n\nvar SingleEventDef = EventDef.extend({\n\n\tdateProfile: null,\n\n\n\t/*\n\tWill receive start/end params, but will be ignored.\n\t*/\n\tbuildInstances: function() {\n\t\treturn [ this.buildInstance() ];\n\t},\n\n\n\tbuildInstance: function() {\n\t\treturn new EventInstance(\n\t\t\tthis, // definition\n\t\t\tthis.dateProfile\n\t\t);\n\t},\n\n\n\tisAllDay: function() {\n\t\treturn this.dateProfile.isAllDay();\n\t},\n\n\n\tclone: function() {\n\t\tvar def = EventDef.prototype.clone.call(this);\n\n\t\tdef.dateProfile = this.dateProfile;\n\n\t\treturn def;\n\t},\n\n\n\trezone: function() {\n\t\tvar calendar = this.source.calendar;\n\t\tvar dateProfile = this.dateProfile;\n\n\t\tthis.dateProfile = new EventDateProfile(\n\t\t\tcalendar.moment(dateProfile.start),\n\t\t\tdateProfile.end ? calendar.moment(dateProfile.end) : null,\n\t\t\tcalendar\n\t\t);\n\t},\n\n\n\t/*\n\tNOTE: if super-method fails, should still attempt to apply\n\t*/\n\tapplyManualRawProps: function(rawProps) {\n\t\tvar superSuccess = EventDef.prototype.applyManualRawProps.apply(this, arguments);\n\t\tvar dateProfile = EventDateProfile.parse(rawProps, this.source); // returns null on failure\n\n\t\tif (dateProfile) {\n\t\t\tthis.dateProfile = dateProfile;\n\n\t\t\t// make sure `date` shows up in the legacy event objects as-is\n\t\t\tif (rawProps.date != null) {\n\t\t\t\tthis.miscProps.date = rawProps.date;\n\t\t\t}\n\n\t\t\treturn superSuccess;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}\n\n});\n\n\n// Parsing\n// ---------------------------------------------------------------------------------------------------------------------\n\n\nSingleEventDef.allowRawProps({ // false = manually process\n\tstart: false,\n\tdate: false, // alias for 'start'\n\tend: false,\n\tallDay: false\n});\n\n;;\n\nvar RecurringEventDef = EventDef.extend({\n\n\tstartTime: null, // duration\n\tendTime: null, // duration, or null\n\tdowHash: null, // object hash, or null\n\n\n\tisAllDay: function() {\n\t\treturn !this.startTime && !this.endTime;\n\t},\n\n\n\tbuildInstances: function(unzonedRange) {\n\t\tvar calendar = this.source.calendar;\n\t\tvar unzonedDate = unzonedRange.getStart();\n\t\tvar unzonedEnd = unzonedRange.getEnd();\n\t\tvar zonedDayStart;\n\t\tvar instanceStart, instanceEnd;\n\t\tvar instances = [];\n\n\t\twhile (unzonedDate.isBefore(unzonedEnd)) {\n\n\t\t\t// if everyday, or this particular day-of-week\n\t\t\tif (!this.dowHash || this.dowHash[unzonedDate.day()]) {\n\n\t\t\t\tzonedDayStart = calendar.applyTimezone(unzonedDate);\n\t\t\t\tinstanceStart = zonedDayStart.clone();\n\t\t\t\tinstanceEnd = null;\n\n\t\t\t\tif (this.startTime) {\n\t\t\t\t\tinstanceStart.time(this.startTime);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tinstanceStart.stripTime();\n\t\t\t\t}\n\n\t\t\t\tif (this.endTime) {\n\t\t\t\t\tinstanceEnd = zonedDayStart.clone().time(this.endTime);\n\t\t\t\t}\n\n\t\t\t\tinstances.push(\n\t\t\t\t\tnew EventInstance(\n\t\t\t\t\t\tthis, // definition\n\t\t\t\t\t\tnew EventDateProfile(instanceStart, instanceEnd, calendar)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tunzonedDate.add(1, 'days');\n\t\t}\n\n\t\treturn instances;\n\t},\n\n\n\tsetDow: function(dowNumbers) {\n\n\t\tif (!this.dowHash) {\n\t\t\tthis.dowHash = {};\n\t\t}\n\n\t\tfor (var i = 0; i < dowNumbers.length; i++) {\n\t\t\tthis.dowHash[dowNumbers[i]] = true;\n\t\t}\n\t},\n\n\n\tclone: function() {\n\t\tvar def = EventDef.prototype.clone.call(this);\n\n\t\tif (def.startTime) {\n\t\t\tdef.startTime = moment.duration(this.startTime);\n\t\t}\n\n\t\tif (def.endTime) {\n\t\t\tdef.endTime = moment.duration(this.endTime);\n\t\t}\n\n\t\tif (this.dowHash) {\n\t\t\tdef.dowHash = $.extend({}, this.dowHash);\n\t\t}\n\n\t\treturn def;\n\t},\n\n\n\t/*\n\tNOTE: if super-method fails, should still attempt to apply\n\t*/\n\tapplyRawProps: function(rawProps) {\n\t\tvar superSuccess = EventDef.prototype.applyRawProps.apply(this, arguments);\n\n\t\tif (rawProps.start) {\n\t\t\tthis.startTime = moment.duration(rawProps.start);\n\t\t}\n\n\t\tif (rawProps.end) {\n\t\t\tthis.endTime = moment.duration(rawProps.end);\n\t\t}\n\n\t\tif (rawProps.dow) {\n\t\t\tthis.setDow(rawProps.dow);\n\t\t}\n\n\t\treturn superSuccess;\n\t}\n\n});\n\n\n// Parsing\n// ---------------------------------------------------------------------------------------------------------------------\n\n\nRecurringEventDef.allowRawProps({ // false = manually process\n\tstart: false,\n\tend: false,\n\tdow: false\n});\n\n;;\n\nvar EventInstance = Class.extend({\n\n\tdef: null, // EventDef\n\tdateProfile: null, // EventDateProfile\n\n\n\tconstructor: function(def, dateProfile) {\n\t\tthis.def = def;\n\t\tthis.dateProfile = dateProfile;\n\t},\n\n\n\ttoLegacy: function() {\n\t\tvar dateProfile = this.dateProfile;\n\t\tvar obj = this.def.toLegacy();\n\n\t\tobj.start = dateProfile.start.clone();\n\t\tobj.end = dateProfile.end ? dateProfile.end.clone() : null;\n\n\t\treturn obj;\n\t}\n\n});\n\n;;\n\n/*\nIt's expected that there will be at least one EventInstance,\nOR that an explicitEventDef is assigned.\n*/\nvar EventInstanceGroup = Class.extend({\n\n\teventInstances: null,\n\texplicitEventDef: null, // optional\n\n\n\tconstructor: function(eventInstances) {\n\t\tthis.eventInstances = eventInstances || [];\n\t},\n\n\n\tgetAllEventRanges: function() {\n\t\treturn eventInstancesToEventRanges(this.eventInstances);\n\t},\n\n\n\tsliceRenderRanges: function(constraintRange) {\n\t\tif (this.isInverse()) {\n\t\t\treturn this.sliceInverseRenderRanges(constraintRange);\n\t\t}\n\t\telse {\n\t\t\treturn this.sliceNormalRenderRanges(constraintRange);\n\t\t}\n\t},\n\n\n\tsliceNormalRenderRanges: function(constraintRange) {\n\t\tvar eventInstances = this.eventInstances;\n\t\tvar i, eventInstance;\n\t\tvar slicedRange;\n\t\tvar slicedEventRanges = [];\n\n\t\tfor (i = 0; i < eventInstances.length; i++) {\n\t\t\teventInstance = eventInstances[i];\n\n\t\t\tslicedRange = eventInstance.dateProfile.unzonedRange.intersect(constraintRange);\n\n\t\t\tif (slicedRange) {\n\t\t\t\tslicedEventRanges.push(\n\t\t\t\t\tnew EventRange(\n\t\t\t\t\t\tslicedRange,\n\t\t\t\t\t\teventInstance.def,\n\t\t\t\t\t\teventInstance\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn slicedEventRanges;\n\t},\n\n\n\tsliceInverseRenderRanges: function(constraintRange) {\n\t\tvar unzonedRanges = eventInstancesToUnzonedRanges(this.eventInstances);\n\t\tvar ownerDef = this.getEventDef();\n\n\t\tunzonedRanges = invertUnzonedRanges(unzonedRanges, constraintRange);\n\n\t\treturn unzonedRanges.map(function(unzonedRange) {\n\t\t\treturn new EventRange(unzonedRange, ownerDef); // don't give an EventDef\n\t\t});\n\t},\n\n\n\tisInverse: function() {\n\t\treturn this.getEventDef().hasInverseRendering();\n\t},\n\n\n\tgetEventDef: function() {\n\t\treturn this.explicitEventDef || this.eventInstances[0].def;\n\t}\n\n});\n\n;;\n\n/*\nMeant to be immutable\n*/\nvar EventDateProfile = Class.extend({\n\n\tstart: null,\n\tend: null,\n\tunzonedRange: null,\n\n\n\tconstructor: function(start, end, calendar) {\n\t\tthis.start = start;\n\t\tthis.end = end || null;\n\t\tthis.unzonedRange = this.buildUnzonedRange(calendar);\n\t},\n\n\n\tisAllDay: function() {\n\t\treturn !(this.start.hasTime() || (this.end && this.end.hasTime()));\n\t},\n\n\n\t/*\n\tNeeds a Calendar object\n\t*/\n\tbuildUnzonedRange: function(calendar) {\n\t\tvar startMs = this.start.clone().stripZone().valueOf();\n\t\tvar endMs = this.getEnd(calendar).stripZone().valueOf();\n\n\t\treturn new UnzonedRange(startMs, endMs);\n\t},\n\n\n\t/*\n\tNeeds a Calendar object\n\t*/\n\tgetEnd: function(calendar) {\n\t\treturn this.end ?\n\t\t\tthis.end.clone() :\n\t\t\t// derive the end from the start and allDay. compute allDay if necessary\n\t\t\tcalendar.getDefaultEventEnd(\n\t\t\t\tthis.isAllDay(),\n\t\t\t\tthis.start\n\t\t\t);\n\t}\n\n});\n\n\n/*\nNeeds an EventSource object\n*/\nEventDateProfile.parse = function(rawProps, source) {\n\tvar startInput = rawProps.start || rawProps.date;\n\tvar endInput = rawProps.end;\n\n\tif (!startInput) {\n\t\treturn false;\n\t}\n\n\tvar calendar = source.calendar;\n\tvar start = calendar.moment(startInput);\n\tvar end = endInput ? calendar.moment(endInput) : null;\n\tvar forcedAllDay = rawProps.allDay;\n\tvar forceEventDuration = calendar.opt('forceEventDuration');\n\n\tif (!start.isValid()) {\n\t\treturn false;\n\t}\n\n\tif (end && (!end.isValid() || !end.isAfter(start))) {\n\t\tend = null;\n\t}\n\n\tif (forcedAllDay == null) {\n\t\tforcedAllDay = source.allDayDefault;\n\t\tif (forcedAllDay == null) {\n\t\t\tforcedAllDay = calendar.opt('allDayDefault');\n\t\t}\n\t}\n\n\tif (forcedAllDay === true) {\n\t\tstart.stripTime();\n\t\tif (end) {\n\t\t\tend.stripTime();\n\t\t}\n\t}\n\telse if (forcedAllDay === false) {\n\t\tif (!start.hasTime()) {\n\t\t\tstart.time(0);\n\t\t}\n\t\tif (end && !end.hasTime()) {\n\t\t\tend.time(0);\n\t\t}\n\t}\n\n\tif (!end && forceEventDuration) {\n\t\tend = calendar.getDefaultEventEnd(!start.hasTime(), start);\n\t}\n\n\treturn new EventDateProfile(start, end, calendar);\n};\n\n;;\n\nvar EventRange = Class.extend({\n\n\tunzonedRange: null,\n\teventDef: null,\n\teventInstance: null, // optional\n\n\n\tconstructor: function(unzonedRange, eventDef, eventInstance) {\n\t\tthis.unzonedRange = unzonedRange;\n\t\tthis.eventDef = eventDef;\n\n\t\tif (eventInstance) {\n\t\t\tthis.eventInstance = eventInstance;\n\t\t}\n\t}\n\n});\n\n;;\n\nvar EventFootprint = FC.EventFootprint = Class.extend({\n\n\tcomponentFootprint: null,\n\teventDef: null,\n\teventInstance: null, // optional\n\n\n\tconstructor: function(componentFootprint, eventDef, eventInstance) {\n\t\tthis.componentFootprint = componentFootprint;\n\t\tthis.eventDef = eventDef;\n\n\t\tif (eventInstance) {\n\t\t\tthis.eventInstance = eventInstance;\n\t\t}\n\t},\n\n\n\tgetEventLegacy: function() {\n\t\treturn (this.eventInstance || this.eventDef).toLegacy();\n\t}\n\n});\n\n;;\n\nvar EventDefMutation = FC.EventDefMutation = Class.extend({\n\n\t// won't ever be empty. will be null instead.\n\t// callers should use setDateMutation for setting.\n\tdateMutation: null,\n\n\t// hack to get updateEvent/createFromRawProps to work.\n\t// not undo-able and not considered in isEmpty.\n\trawProps: null, // raw (pre-parse-like)\n\n\n\t/*\n\teventDef assumed to be a SingleEventDef.\n\treturns an undo function.\n\t*/\n\tmutateSingle: function(eventDef) {\n\t\tvar origDateProfile;\n\n\t\tif (this.dateMutation) {\n\t\t\torigDateProfile = eventDef.dateProfile;\n\n\t\t\teventDef.dateProfile = this.dateMutation.buildNewDateProfile(\n\t\t\t\torigDateProfile,\n\t\t\t\teventDef.source.calendar\n\t\t\t);\n\t\t}\n\n\t\t// can't undo\n\t\tif (this.rawProps) {\n\t\t\teventDef.applyRawProps(this.rawProps);\n\t\t}\n\n\t\tif (origDateProfile) {\n\t\t\treturn function() {\n\t\t\t\teventDef.dateProfile = origDateProfile;\n\t\t\t};\n\t\t}\n\t\telse {\n\t\t\treturn function() { };\n\t\t}\n\t},\n\n\n\tsetDateMutation: function(dateMutation) {\n\t\tif (dateMutation && !dateMutation.isEmpty()) {\n\t\t\tthis.dateMutation = dateMutation;\n\t\t}\n\t\telse {\n\t\t\tthis.dateMutation = null;\n\t\t}\n\t},\n\n\n\tisEmpty: function() {\n\t\treturn !this.dateMutation;\n\t}\n\n});\n\n\nEventDefMutation.createFromRawProps = function(eventInstance, newRawProps, largeUnit) {\n\tvar eventDef = eventInstance.def;\n\tvar applicableRawProps = {};\n\tvar propName;\n\tvar newDateProfile;\n\tvar dateMutation;\n\tvar defMutation;\n\n\tfor (propName in newRawProps) {\n\t\tif (\n\t\t\t// ignore object-type custom properties and any date-related properties,\n\t\t\t// as well as any other internal property\n\t\t\ttypeof newRawProps[propName] !== 'object' &&\n\t\t\tpropName !== 'start' && propName !== 'end' && propName !== 'allDay' &&\n\t\t\tpropName !== 'source' && propName !== '_id'\n\t\t) {\n\t\t\tapplicableRawProps[propName] = newRawProps[propName];\n\t\t}\n\t}\n\n\tnewDateProfile = EventDateProfile.parse(newRawProps, eventDef.source);\n\n\tif (newDateProfile) { // no failure?\n\t\tdateMutation = EventDefDateMutation.createFromDiff(\n\t\t\teventInstance.dateProfile,\n\t\t\tnewDateProfile,\n\t\t\tlargeUnit\n\t\t);\n\t}\n\n\tdefMutation = new EventDefMutation();\n\tdefMutation.rawProps = applicableRawProps;\n\n\tif (dateMutation) {\n\t\tdefMutation.dateMutation = dateMutation;\n\t}\n\n\treturn defMutation;\n};\n\n;;\n\nvar EventDefDateMutation = Class.extend({\n\n\tclearEnd: false,\n\tforceTimed: false,\n\tforceAllDay: false,\n\n\t// Durations. if 0-ms duration, will be null instead.\n\t// Callers should not set this directly.\n\tdateDelta: null,\n\tstartDelta: null,\n\tendDelta: null,\n\n\n\t/*\n\treturns an undo function.\n\t*/\n\tbuildNewDateProfile: function(eventDateProfile, calendar) {\n\t\tvar start = eventDateProfile.start.clone();\n\t\tvar end = null;\n\t\tvar shouldRezone = false;\n\n\t\tif (!this.clearEnd && eventDateProfile.end) {\n\t\t\tend = eventDateProfile.end.clone();\n\t\t}\n\n\t\tif (this.forceTimed) {\n\t\t\tshouldRezone = true;\n\n\t\t\tif (!start.hasTime()) {\n\t\t\t\tstart.time(0);\n\t\t\t}\n\n\t\t\tif (end && !end.hasTime()) {\n\t\t\t\tend.time(0);\n\t\t\t}\n\t\t}\n\t\telse if (this.forceAllDay) {\n\n\t\t\tif (start.hasTime()) {\n\t\t\t\tstart.stripTime();\n\t\t\t}\n\n\t\t\tif (end && end.hasTime()) {\n\t\t\t\tend.stripTime();\n\t\t\t}\n\t\t}\n\n\t\tif (this.dateDelta) {\n\t\t\tshouldRezone = true;\n\n\t\t\tstart.add(this.dateDelta);\n\n\t\t\tif (end) {\n\t\t\t\tend.add(this.dateDelta);\n\t\t\t}\n\t\t}\n\n\t\t// do this before adding startDelta to start, so we can work off of start\n\t\tif (this.endDelta) {\n\t\t\tshouldRezone = true;\n\n\t\t\tif (!end) {\n\t\t\t\tend = calendar.getDefaultEventEnd(eventDateProfile.isAllDay(), start);\n\t\t\t}\n\n\t\t\tend.add(this.endDelta);\n\t\t}\n\n\t\tif (this.startDelta) {\n\t\t\tshouldRezone = true;\n\n\t\t\tstart.add(this.startDelta);\n\t\t}\n\n\t\tif (shouldRezone) {\n\t\t\tstart = calendar.applyTimezone(start);\n\n\t\t\tif (end) {\n\t\t\t\tend = calendar.applyTimezone(end);\n\t\t\t}\n\t\t}\n\n\t\t// TODO: okay to access calendar option?\n\t\tif (!end && calendar.opt('forceEventDuration')) {\n\t\t\tend = calendar.getDefaultEventEnd(eventDateProfile.isAllDay(), start);\n\t\t}\n\n\t\treturn new EventDateProfile(start, end, calendar);\n\t},\n\n\n\tsetDateDelta: function(dateDelta) {\n\t\tif (dateDelta && dateDelta.valueOf()) {\n\t\t\tthis.dateDelta = dateDelta;\n\t\t}\n\t\telse {\n\t\t\tthis.dateDelta = null;\n\t\t}\n\t},\n\n\n\tsetStartDelta: function(startDelta) {\n\t\tif (startDelta && startDelta.valueOf()) {\n\t\t\tthis.startDelta = startDelta;\n\t\t}\n\t\telse {\n\t\t\tthis.startDelta = null;\n\t\t}\n\t},\n\n\n\tsetEndDelta: function(endDelta) {\n\t\tif (endDelta && endDelta.valueOf()) {\n\t\t\tthis.endDelta = endDelta;\n\t\t}\n\t\telse {\n\t\t\tthis.endDelta = null;\n\t\t}\n\t},\n\n\n\tisEmpty: function() {\n\t\treturn !this.clearEnd && !this.forceTimed && !this.forceAllDay &&\n\t\t\t!this.dateDelta && !this.startDelta && !this.endDelta;\n\t}\n\n});\n\n\nEventDefDateMutation.createFromDiff = function(dateProfile0, dateProfile1, largeUnit) {\n\tvar clearEnd = dateProfile0.end && !dateProfile1.end;\n\tvar forceTimed = dateProfile0.isAllDay() && !dateProfile1.isAllDay();\n\tvar forceAllDay = !dateProfile0.isAllDay() && dateProfile1.isAllDay();\n\tvar dateDelta;\n\tvar endDiff;\n\tvar endDelta;\n\tvar mutation;\n\n\t// subtracts the dates in the appropriate way, returning a duration\n\tfunction subtractDates(date1, date0) { // date1 - date0\n\t\tif (largeUnit) {\n\t\t\treturn diffByUnit(date1, date0, largeUnit); // poorly named\n\t\t}\n\t\telse if (dateProfile1.isAllDay()) {\n\t\t\treturn diffDay(date1, date0); // poorly named\n\t\t}\n\t\telse {\n\t\t\treturn diffDayTime(date1, date0); // poorly named\n\t\t}\n\t}\n\n\tdateDelta = subtractDates(dateProfile1.start, dateProfile0.start);\n\n\tif (dateProfile1.end) {\n\t\t// use unzonedRanges because dateProfile0.end might be null\n\t\tendDiff = subtractDates(\n\t\t\tdateProfile1.unzonedRange.getEnd(),\n\t\t\tdateProfile0.unzonedRange.getEnd()\n\t\t);\n\t\tendDelta = endDiff.subtract(dateDelta);\n\t}\n\n\tmutation = new EventDefDateMutation();\n\tmutation.clearEnd = clearEnd;\n\tmutation.forceTimed = forceTimed;\n\tmutation.forceAllDay = forceAllDay;\n\tmutation.setDateDelta(dateDelta);\n\tmutation.setEndDelta(endDelta);\n\n\treturn mutation;\n};\n\n;;\n\nfunction eventDefsToEventInstances(eventDefs, unzonedRange) {\n\tvar eventInstances = [];\n\tvar i;\n\n\tfor (i = 0; i < eventDefs.length; i++) {\n\t\teventInstances.push.apply(eventInstances, // append\n\t\t\teventDefs[i].buildInstances(unzonedRange)\n\t\t);\n\t}\n\n\treturn eventInstances;\n}\n\n\nfunction eventInstancesToEventRanges(eventInstances) {\n\treturn eventInstances.map(function(eventInstance) {\n\t\treturn new EventRange(\n\t\t\teventInstance.dateProfile.unzonedRange,\n\t\t\teventInstance.def,\n\t\t\teventInstance\n\t\t);\n\t});\n}\n\n\nfunction eventInstancesToUnzonedRanges(eventInstances) {\n\treturn eventInstances.map(function(eventInstance) {\n\t\treturn eventInstance.dateProfile.unzonedRange;\n\t});\n}\n\n\nfunction eventFootprintsToComponentFootprints(eventFootprints) {\n\treturn eventFootprints.map(function(eventFootprint) {\n\t\treturn eventFootprint.componentFootprint;\n\t});\n}\n\n;;\n\nvar EventSource = Class.extend(ParsableModelMixin, {\n\n\tcalendar: null,\n\n\tid: null, // can stay null\n\tuid: null,\n\tcolor: null,\n\tbackgroundColor: null,\n\tborderColor: null,\n\ttextColor: null,\n\tclassName: null, // array\n\teditable: null,\n\tstartEditable: null,\n\tdurationEditable: null,\n\trendering: null,\n\toverlap: null,\n\tconstraint: null,\n\tallDayDefault: null,\n\teventDataTransform: null, // optional function\n\n\n\tconstructor: function(calendar) {\n\t\tthis.calendar = calendar;\n\t\tthis.className = [];\n\t\tthis.uid = String(EventSource.uuid++);\n\t},\n\n\n\tfetch: function(start, end, timezone) {\n\t\t// subclasses must implement. must return a promise.\n\t},\n\n\n\tremoveEventDefsById: function(eventDefId) {\n\t\t// optional for subclasses to implement\n\t},\n\n\n\tremoveAllEventDefs: function() {\n\t\t// optional for subclasses to implement\n\t},\n\n\n\t/*\n\tFor compairing/matching\n\t*/\n\tgetPrimitive: function(otherSource) {\n\t\t// subclasses must implement\n\t},\n\n\n\tparseEventDefs: function(rawEventDefs) {\n\t\tvar i;\n\t\tvar eventDef;\n\t\tvar eventDefs = [];\n\n\t\tfor (i = 0; i < rawEventDefs.length; i++) {\n\t\t\teventDef = EventDefParser.parse(\n\t\t\t\trawEventDefs[i],\n\t\t\t\tthis // source\n\t\t\t);\n\n\t\t\tif (eventDef) {\n\t\t\t\teventDefs.push(eventDef);\n\t\t\t}\n\t\t}\n\n\t\treturn eventDefs;\n\t},\n\n\n\tapplyManualRawProps: function(rawProps) {\n\n\t\tif (rawProps.id != null) {\n\t\t\tthis.id = EventSource.normalizeId(rawProps.id);\n\t\t}\n\n\t\t// TODO: converge with EventDef\n\t\tif ($.isArray(rawProps.className)) {\n\t\t\tthis.className = rawProps.className;\n\t\t}\n\t\telse if (typeof rawProps.className === 'string') {\n\t\t\tthis.className = rawProps.className.split(/\\s+/);\n\t\t}\n\n\t\treturn true;\n\t}\n\n});\n\n\n// finish initializing the mixin\nEventSource.allowRawProps = ParsableModelMixin_allowRawProps;\n\n\n// IDs\n// ---------------------------------------------------------------------------------------------------------------------\n// TODO: converge with EventDef\n\n\nEventSource.uuid = 0;\n\n\nEventSource.normalizeId = function(id) {\n\tif (id) {\n\t\treturn String(id);\n\t}\n\n\treturn null;\n};\n\n\n// Parsing\n// ---------------------------------------------------------------------------------------------------------------------\n\n\nEventSource.allowRawProps({\n\t// manually process...\n\tid: false,\n\tclassName: false,\n\n\t// automatically transfer...\n\tcolor: true,\n\tbackgroundColor: true,\n\tborderColor: true,\n\ttextColor: true,\n\teditable: true,\n\tstartEditable: true,\n\tdurationEditable: true,\n\trendering: true,\n\toverlap: true,\n\tconstraint: true,\n\tallDayDefault: true,\n\teventDataTransform: true\n});\n\n\n/*\nrawInput can be any data type!\n*/\nEventSource.parse = function(rawInput, calendar) {\n\tvar source = new this(calendar);\n\n\tif (typeof rawInput === 'object') {\n\t\tif (source.applyRawProps(rawInput)) {\n\t\t\treturn source;\n\t\t}\n\t}\n\n\treturn false;\n};\n\n\nFC.EventSource = EventSource;\n\n;;\n\nvar EventSourceParser = {\n\n\tsourceClasses: [],\n\n\n\tregisterClass: function(EventSourceClass) {\n\t\tthis.sourceClasses.unshift(EventSourceClass); // give highest priority\n\t},\n\n\n\tparse: function(rawInput, calendar) {\n\t\tvar sourceClasses = this.sourceClasses;\n\t\tvar i;\n\t\tvar eventSource;\n\n\t\tfor (i = 0; i < sourceClasses.length; i++) {\n\t\t\teventSource = sourceClasses[i].parse(rawInput, calendar);\n\n\t\t\tif (eventSource) {\n\t\t\t\treturn eventSource;\n\t\t\t}\n\t\t}\n\t}\n\n};\n\n\nFC.EventSourceParser = EventSourceParser;\n\n;;\n\nvar ArrayEventSource = EventSource.extend({\n\n\trawEventDefs: null, // unparsed\n\teventDefs: null,\n\tcurrentTimezone: null,\n\n\n\tconstructor: function(calendar) {\n\t\tEventSource.apply(this, arguments); // super-constructor\n\t\tthis.eventDefs = []; // for if setRawEventDefs is never called\n\t},\n\n\n\tsetRawEventDefs: function(rawEventDefs) {\n\t\tthis.rawEventDefs = rawEventDefs;\n\t\tthis.eventDefs = this.parseEventDefs(rawEventDefs);\n\t},\n\n\n\tfetch: function(start, end, timezone) {\n\t\tvar eventDefs = this.eventDefs;\n\t\tvar i;\n\n\t\tif (\n\t\t\tthis.currentTimezone !== null &&\n\t\t\tthis.currentTimezone !== timezone\n\t\t) {\n\t\t\tfor (i = 0; i < eventDefs.length; i++) {\n\t\t\t\tif (eventDefs[i] instanceof SingleEventDef) {\n\t\t\t\t\teventDefs[i].rezone();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.currentTimezone = timezone;\n\n\t\treturn Promise.resolve(eventDefs);\n\t},\n\n\n\taddEventDef: function(eventDef) {\n\t\tthis.eventDefs.push(eventDef);\n\t},\n\n\n\t/*\n\teventDefId already normalized to a string\n\t*/\n\tremoveEventDefsById: function(eventDefId) {\n\t\treturn removeMatching(this.eventDefs, function(eventDef) {\n\t\t\treturn eventDef.id === eventDefId;\n\t\t});\n\t},\n\n\n\tremoveAllEventDefs: function() {\n\t\tthis.eventDefs = [];\n\t},\n\n\n\tgetPrimitive: function() {\n\t\treturn this.rawEventDefs;\n\t},\n\n\n\tapplyManualRawProps: function(rawProps) {\n\t\tvar superSuccess = EventSource.prototype.applyManualRawProps.apply(this, arguments);\n\n\t\tthis.setRawEventDefs(rawProps.events);\n\n\t\treturn superSuccess;\n\t}\n\n});\n\n\nArrayEventSource.allowRawProps({\n\tevents: false // don't automatically transfer\n});\n\n\nArrayEventSource.parse = function(rawInput, calendar) {\n\tvar rawProps;\n\n\t// normalize raw input\n\tif ($.isArray(rawInput.events)) { // extended form\n\t\trawProps = rawInput;\n\t}\n\telse if ($.isArray(rawInput)) { // short form\n\t\trawProps = { events: rawInput };\n\t}\n\n\tif (rawProps) {\n\t\treturn EventSource.parse.call(this, rawProps, calendar);\n\t}\n\n\treturn false;\n};\n\n\nEventSourceParser.registerClass(ArrayEventSource);\n\nFC.ArrayEventSource = ArrayEventSource;\n\n;;\n\nvar FuncEventSource = EventSource.extend({\n\n\tfunc: null,\n\n\n\tfetch: function(start, end, timezone) {\n\t\tvar _this = this;\n\n\t\tthis.calendar.pushLoading();\n\n\t\treturn Promise.construct(function(onResolve) {\n\t\t\t_this.func.call(\n\t\t\t\tthis.calendar,\n\t\t\t\tstart.clone(),\n\t\t\t\tend.clone(),\n\t\t\t\ttimezone,\n\t\t\t\tfunction(rawEventDefs) {\n\t\t\t\t\t_this.calendar.popLoading();\n\n\t\t\t\t\tonResolve(_this.parseEventDefs(rawEventDefs));\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\t},\n\n\n\tgetPrimitive: function() {\n\t\treturn this.func;\n\t},\n\n\n\tapplyManualRawProps: function(rawProps) {\n\t\tvar superSuccess = EventSource.prototype.applyManualRawProps.apply(this, arguments);\n\n\t\tthis.func = rawProps.events;\n\n\t\treturn superSuccess;\n\t}\n\n});\n\n\nFuncEventSource.allowRawProps({\n\tevents: false // don't automatically transfer\n});\n\n\nFuncEventSource.parse = function(rawInput, calendar) {\n\tvar rawProps;\n\n\t// normalize raw input\n\tif ($.isFunction(rawInput.events)) { // extended form\n\t\trawProps = rawInput;\n\t}\n\telse if ($.isFunction(rawInput)) { // short form\n\t\trawProps = { events: rawInput };\n\t}\n\n\tif (rawProps) {\n\t\treturn EventSource.parse.call(this, rawProps, calendar);\n\t}\n\n\treturn false;\n};\n\n\nEventSourceParser.registerClass(FuncEventSource);\n\nFC.FuncEventSource = FuncEventSource;\n\n;;\n\nvar JsonFeedEventSource = EventSource.extend({\n\n\t// these props must all be manually set before calling fetch\n\tstartParam: null,\n\tendParam: null,\n\ttimezoneParam: null,\n\tajaxSettings: null,\n\n\n\tfetch: function(start, end, timezone) {\n\t\tvar _this = this;\n\t\tvar ajaxSettings = this.ajaxSettings;\n\t\tvar onSuccess = ajaxSettings.success;\n\t\tvar onError = ajaxSettings.error;\n\t\tvar requestParams = this.buildRequestParams(start, end, timezone);\n\n\t\t// todo: eventually handle the promise's then,\n\t\t// don't intercept success/error\n\t\t// tho will be a breaking API change\n\n\t\tthis.calendar.pushLoading();\n\n\t\treturn Promise.construct(function(onResolve, onReject) {\n\t\t\t$.ajax($.extend(\n\t\t\t\t{}, // avoid mutation\n\t\t\t\tJsonFeedEventSource.AJAX_DEFAULTS,\n\t\t\t\tajaxSettings, // should have a `url`\n\t\t\t\t{\n\t\t\t\t\tdata: requestParams,\n\t\t\t\t\tsuccess: function(rawEventDefs) {\n\t\t\t\t\t\tvar callbackRes;\n\n\t\t\t\t\t\t_this.calendar.popLoading();\n\n\t\t\t\t\t\tif (rawEventDefs) {\n\t\t\t\t\t\t\tcallbackRes = applyAll(onSuccess, this, arguments); // redirect `this`\n\n\t\t\t\t\t\t\tif ($.isArray(callbackRes)) {\n\t\t\t\t\t\t\t\trawEventDefs = callbackRes;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tonResolve(_this.parseEventDefs(rawEventDefs));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tonReject();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\t_this.calendar.popLoading();\n\n\t\t\t\t\t\tapplyAll(onError, this, arguments); // redirect `this`\n\t\t\t\t\t\tonReject();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t));\n\t\t});\n\t},\n\n\n\tbuildRequestParams: function(start, end, timezone) {\n\t\tvar calendar = this.calendar;\n\t\tvar ajaxSettings = this.ajaxSettings;\n\t\tvar startParam, endParam, timezoneParam;\n\t\tvar customRequestParams;\n\t\tvar params = {};\n\n\t\tstartParam = this.startParam;\n\t\tif (startParam == null) {\n\t\t\tstartParam = calendar.opt('startParam');\n\t\t}\n\n\t\tendParam = this.endParam;\n\t\tif (endParam == null) {\n\t\t\tendParam = calendar.opt('endParam');\n\t\t}\n\n\t\ttimezoneParam = this.timezoneParam;\n\t\tif (timezoneParam == null) {\n\t\t\ttimezoneParam = calendar.opt('timezoneParam');\n\t\t}\n\n\t\t// retrieve any outbound GET/POST $.ajax data from the options\n\t\tif ($.isFunction(ajaxSettings.data)) {\n\t\t\t// supplied as a function that returns a key/value object\n\t\t\tcustomRequestParams = ajaxSettings.data();\n\t\t}\n\t\telse {\n\t\t\t// probably supplied as a straight key/value object\n\t\t\tcustomRequestParams = ajaxSettings.data || {};\n\t\t}\n\n\t\t$.extend(params, customRequestParams);\n\n\t\tparams[startParam] = start.format();\n\t\tparams[endParam] = end.format();\n\n\t\tif (timezone && timezone !== 'local') {\n\t\t\tparams[timezoneParam] = timezone;\n\t\t}\n\n\t\treturn params;\n\t},\n\n\n\tgetPrimitive: function() {\n\t\treturn this.ajaxSettings.url;\n\t},\n\n\n\tapplyOtherRawProps: function(rawProps) {\n\t\tEventSource.prototype.applyOtherRawProps.apply(this, arguments);\n\n\t\tthis.ajaxSettings = rawProps;\n\t}\n\n});\n\n\nJsonFeedEventSource.AJAX_DEFAULTS = {\n\tdataType: 'json',\n\tcache: false\n};\n\n\nJsonFeedEventSource.allowRawProps({\n\t// automatically transfer (true)...\n\tstartParam: true,\n\tendParam: true,\n\ttimezoneParam: true\n});\n\n\nJsonFeedEventSource.parse = function(rawInput, calendar) {\n\tvar rawProps;\n\n\t// normalize raw input\n\tif (typeof rawInput.url === 'string') { // extended form\n\t\trawProps = rawInput;\n\t}\n\telse if (typeof rawInput === 'string') { // short form\n\t\trawProps = { url: rawInput }; // will end up in ajaxSettings\n\t}\n\n\tif (rawProps) {\n\t\treturn EventSource.parse.call(this, rawProps, calendar);\n\t}\n\n\treturn false;\n};\n\n\nEventSourceParser.registerClass(JsonFeedEventSource);\n\nFC.JsonFeedEventSource = JsonFeedEventSource;\n\n;;\n\nvar ThemeRegistry = FC.ThemeRegistry = {\n\n\tthemeClassHash: {},\n\n\n\tregister: function(themeName, themeClass) {\n\t\tthis.themeClassHash[themeName] = themeClass;\n\t},\n\n\n\tgetThemeClass: function(themeSetting) {\n\t\tif (!themeSetting) {\n\t\t\treturn StandardTheme;\n\t\t}\n\t\telse if (themeSetting === true) {\n\t\t\treturn JqueryUiTheme;\n\t\t}\n\t\telse {\n\t\t\treturn this.themeClassHash[themeSetting];\n\t\t}\n\t}\n\n};\n\n;;\n\nvar Theme = FC.Theme = Class.extend({\n\n\tclasses: {},\n\ticonClasses: {},\n\tbaseIconClass: '',\n\ticonOverrideOption: null,\n\ticonOverrideCustomButtonOption: null,\n\ticonOverridePrefix: '',\n\n\n\tconstructor: function(optionsModel) {\n\t\tthis.optionsModel = optionsModel;\n\t\tthis.processIconOverride();\n\t},\n\n\n\tprocessIconOverride: function() {\n\t\tif (this.iconOverrideOption) {\n\t\t\tthis.setIconOverride(\n\t\t\t\tthis.optionsModel.get(this.iconOverrideOption)\n\t\t\t);\n\t\t}\n\t},\n\n\n\tsetIconOverride: function(iconOverrideHash) {\n\t\tvar iconClassesCopy;\n\t\tvar buttonName;\n\n\t\tif ($.isPlainObject(iconOverrideHash)) {\n\t\t\ticonClassesCopy = $.extend({}, this.iconClasses);\n\n\t\t\tfor (buttonName in iconOverrideHash) {\n\t\t\t\ticonClassesCopy[buttonName] = this.applyIconOverridePrefix(\n\t\t\t\t\ticonOverrideHash[buttonName]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.iconClasses = iconClassesCopy;\n\t\t}\n\t\telse if (iconOverrideHash === false) {\n\t\t\tthis.iconClasses = {};\n\t\t}\n\t},\n\n\n\tapplyIconOverridePrefix: function(className) {\n\t\tvar prefix = this.iconOverridePrefix;\n\n\t\tif (prefix && className.indexOf(prefix) !== 0) { // if not already present\n\t\t\tclassName = prefix + className;\n\t\t}\n\n\t\treturn className;\n\t},\n\n\n\tgetClass: function(key) {\n\t\treturn this.classes[key] || '';\n\t},\n\n\n\tgetIconClass: function(buttonName) {\n\t\tvar className = this.iconClasses[buttonName];\n\n\t\tif (className) {\n\t\t\treturn this.baseIconClass + ' ' + className;\n\t\t}\n\n\t\treturn '';\n\t},\n\n\n\tgetCustomButtonIconClass: function(customButtonProps) {\n\t\tvar className;\n\n\t\tif (this.iconOverrideCustomButtonOption) {\n\t\t\tclassName = customButtonProps[this.iconOverrideCustomButtonOption];\n\n\t\t\tif (className) {\n\t\t\t\treturn this.baseIconClass + ' ' + this.applyIconOverridePrefix(className);\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t}\n\n});\n\n;;\n\nvar StandardTheme = Theme.extend({\n\n\tclasses: {\n\t\twidget: 'fc-unthemed',\n\t\twidgetHeader: 'fc-widget-header',\n\t\twidgetContent: 'fc-widget-content',\n\n\t\tbuttonGroup: 'fc-button-group',\n\t\tbutton: 'fc-button',\n\t\tcornerLeft: 'fc-corner-left',\n\t\tcornerRight: 'fc-corner-right',\n\t\tstateDefault: 'fc-state-default',\n\t\tstateActive: 'fc-state-active',\n\t\tstateDisabled: 'fc-state-disabled',\n\t\tstateHover: 'fc-state-hover',\n\t\tstateDown: 'fc-state-down',\n\n\t\tpopoverHeader: 'fc-widget-header',\n\t\tpopoverContent: 'fc-widget-content',\n\n\t\t// day grid\n\t\theaderRow: 'fc-widget-header',\n\t\tdayRow: 'fc-widget-content',\n\n\t\t// list view\n\t\tlistView: 'fc-widget-content'\n\t},\n\n\tbaseIconClass: 'fc-icon',\n\ticonClasses: {\n\t\tclose: 'fc-icon-x',\n\t\tprev: 'fc-icon-left-single-arrow',\n\t\tnext: 'fc-icon-right-single-arrow',\n\t\tprevYear: 'fc-icon-left-double-arrow',\n\t\tnextYear: 'fc-icon-right-double-arrow'\n\t},\n\n\ticonOverrideOption: 'buttonIcons',\n\ticonOverrideCustomButtonOption: 'icon',\n\ticonOverridePrefix: 'fc-icon-'\n\n});\n\nThemeRegistry.register('standard', StandardTheme);\n\n;;\n\nvar JqueryUiTheme = Theme.extend({\n\n\tclasses: {\n\t\twidget: 'ui-widget',\n\t\twidgetHeader: 'ui-widget-header',\n\t\twidgetContent: 'ui-widget-content',\n\n\t\tbuttonGroup: 'fc-button-group',\n\t\tbutton: 'ui-button',\n\t\tcornerLeft: 'ui-corner-left',\n\t\tcornerRight: 'ui-corner-right',\n\t\tstateDefault: 'ui-state-default',\n\t\tstateActive: 'ui-state-active',\n\t\tstateDisabled: 'ui-state-disabled',\n\t\tstateHover: 'ui-state-hover',\n\t\tstateDown: 'ui-state-down',\n\n\t\ttoday: 'ui-state-highlight',\n\n\t\tpopoverHeader: 'ui-widget-header',\n\t\tpopoverContent: 'ui-widget-content',\n\n\t\t// day grid\n\t\theaderRow: 'ui-widget-header',\n\t\tdayRow: 'ui-widget-content',\n\n\t\t// list view\n\t\tlistView: 'ui-widget-content'\n\t},\n\n\tbaseIconClass: 'ui-icon',\n\ticonClasses: {\n\t\tclose: 'ui-icon-closethick',\n\t\tprev: 'ui-icon-circle-triangle-w',\n\t\tnext: 'ui-icon-circle-triangle-e',\n\t\tprevYear: 'ui-icon-seek-prev',\n\t\tnextYear: 'ui-icon-seek-next'\n\t},\n\n\ticonOverrideOption: 'themeButtonIcons',\n\ticonOverrideCustomButtonOption: 'themeIcon',\n\ticonOverridePrefix: 'ui-icon-'\n\n});\n\nThemeRegistry.register('jquery-ui', JqueryUiTheme);\n\n;;\n\nvar BootstrapTheme = Theme.extend({\n\n\tclasses: {\n\t\twidget: 'fc-bootstrap3',\n\n\t\ttableGrid: 'table-bordered', // avoid `table` class b/c don't want margins. only border color\n\t\ttableList: 'table table-striped', // `table` class creates bottom margin but who cares\n\n\t\tbuttonGroup: 'btn-group',\n\t\tbutton: 'btn btn-default',\n\t\tstateActive: 'active',\n\t\tstateDisabled: 'disabled',\n\n\t\ttoday: 'alert alert-info', // the plain `info` class requires `.table`, too much to ask\n\n\t\tpopover: 'panel panel-default',\n\t\tpopoverHeader: 'panel-heading',\n\t\tpopoverContent: 'panel-body',\n\n\t\t// day grid\n\t\theaderRow: 'panel-default', // avoid `panel` class b/c don't want margins/radius. only border color\n\t\tdayRow: 'panel-default', // \"\n\n\t\t// list view\n\t\tlistView: 'panel panel-default'\n\t},\n\n\tbaseIconClass: 'glyphicon',\n\ticonClasses: {\n\t\tclose: 'glyphicon-remove',\n\t\tprev: 'glyphicon-chevron-left',\n\t\tnext: 'glyphicon-chevron-right',\n\t\tprevYear: 'glyphicon-backward',\n\t\tnextYear: 'glyphicon-forward'\n\t},\n\n\ticonOverrideOption: 'bootstrapGlyphicons',\n\ticonOverrideCustomButtonOption: 'bootstrapGlyphicon',\n\ticonOverridePrefix: 'glyphicon-'\n\n});\n\nThemeRegistry.register('bootstrap3', BootstrapTheme);\n\n;;\n\n/* An abstract class for the \"basic\" views, as well as month view. Renders one or more rows of day cells.\n----------------------------------------------------------------------------------------------------------------------*/\n// It is a manager for a DayGrid subcomponent, which does most of the heavy lifting.\n// It is responsible for managing width/height.\n\nvar BasicView = FC.BasicView = View.extend({\n\n\tscroller: null,\n\n\tdayGridClass: DayGrid, // class the dayGrid will be instantiated from (overridable by subclasses)\n\tdayGrid: null, // the main subcomponent that does most of the heavy lifting\n\n\tdayNumbersVisible: false, // display day numbers on each day cell?\n\tcolWeekNumbersVisible: false, // display week numbers along the side?\n\tcellWeekNumbersVisible: false, // display week numbers in day cell?\n\n\tweekNumberWidth: null, // width of all the week-number cells running down the side\n\n\theadContainerEl: null, // div that hold's the dayGrid's rendered date header\n\theadRowEl: null, // the fake row element of the day-of-week header\n\n\n\tinitialize: function() {\n\t\tthis.dayGrid = this.instantiateDayGrid();\n\t\tthis.addChild(this.dayGrid);\n\n\t\tthis.scroller = new Scroller({\n\t\t\toverflowX: 'hidden',\n\t\t\toverflowY: 'auto'\n\t\t});\n\t},\n\n\n\t// Generates the DayGrid object this view needs. Draws from this.dayGridClass\n\tinstantiateDayGrid: function() {\n\t\t// generate a subclass on the fly with BasicView-specific behavior\n\t\t// TODO: cache this subclass\n\t\tvar subclass = this.dayGridClass.extend(basicDayGridMethods);\n\n\t\treturn new subclass(this);\n\t},\n\n\n\t// Computes the date range that will be rendered.\n\tbuildRenderRange: function(currentUnzonedRange, currentRangeUnit) {\n\t\tvar renderUnzonedRange = View.prototype.buildRenderRange.apply(this, arguments); // an UnzonedRange\n\t\tvar start = this.calendar.msToUtcMoment(renderUnzonedRange.startMs, this.isRangeAllDay);\n\t\tvar end = this.calendar.msToUtcMoment(renderUnzonedRange.endMs, this.isRangeAllDay);\n\n\t\t// year and month views should be aligned with weeks. this is already done for week\n\t\tif (/^(year|month)$/.test(currentRangeUnit)) {\n\t\t\tstart.startOf('week');\n\n\t\t\t// make end-of-week if not already\n\t\t\tif (end.weekday()) {\n\t\t\t\tend.add(1, 'week').startOf('week'); // exclusively move backwards\n\t\t\t}\n\t\t}\n\n\t\treturn this.trimHiddenDays(new UnzonedRange(start, end));\n\t},\n\n\n\t// Renders the view into `this.el`, which should already be assigned\n\trenderDates: function() {\n\n\t\tthis.dayGrid.breakOnWeeks = /year|month|week/.test(this.currentRangeUnit); // do before Grid::setRange\n\t\tthis.dayGrid.setRange(this.renderUnzonedRange);\n\n\t\tthis.dayNumbersVisible = this.dayGrid.rowCnt > 1; // TODO: make grid responsible\n\t\tif (this.opt('weekNumbers')) {\n\t\t\tif (this.opt('weekNumbersWithinDays')) {\n\t\t\t\tthis.cellWeekNumbersVisible = true;\n\t\t\t\tthis.colWeekNumbersVisible = false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.cellWeekNumbersVisible = false;\n\t\t\t\tthis.colWeekNumbersVisible = true;\n\t\t\t};\n\t\t}\n\t\tthis.dayGrid.numbersVisible = this.dayNumbersVisible ||\n\t\t\tthis.cellWeekNumbersVisible || this.colWeekNumbersVisible;\n\n\t\tthis.el.addClass('fc-basic-view').html(this.renderSkeletonHtml());\n\t\tthis.renderHead();\n\n\t\tthis.scroller.render();\n\t\tvar dayGridContainerEl = this.scroller.el.addClass('fc-day-grid-container');\n\t\tvar dayGridEl = $('
').appendTo(dayGridContainerEl);\n\t\tthis.el.find('.fc-body > tr > td').append(dayGridContainerEl);\n\n\t\tthis.dayGrid.setElement(dayGridEl);\n\t\tthis.dayGrid.renderDates(this.hasRigidRows());\n\t},\n\n\n\t// render the day-of-week headers\n\trenderHead: function() {\n\t\tthis.headContainerEl =\n\t\t\tthis.el.find('.fc-head-container')\n\t\t\t\t.html(this.dayGrid.renderHeadHtml());\n\t\tthis.headRowEl = this.headContainerEl.find('.fc-row');\n\t},\n\n\n\t// Unrenders the content of the view. Since we haven't separated skeleton rendering from date rendering,\n\t// always completely kill the dayGrid's rendering.\n\tunrenderDates: function() {\n\t\tthis.dayGrid.unrenderDates();\n\t\tthis.dayGrid.removeElement();\n\t\tthis.scroller.destroy();\n\t},\n\n\n\t// Builds the HTML skeleton for the view.\n\t// The day-grid component will render inside of a container defined by this HTML.\n\trenderSkeletonHtml: function() {\n\t\tvar theme = this.calendar.theme;\n\n\t\treturn '' +\n\t\t\t'' +\n\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t'' +\n\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t'' +\n\t\t\t'
';\n\t},\n\n\n\t// Generates an HTML attribute string for setting the width of the week number column, if it is known\n\tweekNumberStyleAttr: function() {\n\t\tif (this.weekNumberWidth !== null) {\n\t\t\treturn 'style=\"width:' + this.weekNumberWidth + 'px\"';\n\t\t}\n\t\treturn '';\n\t},\n\n\n\t// Determines whether each row should have a constant height\n\thasRigidRows: function() {\n\t\tvar eventLimit = this.opt('eventLimit');\n\t\treturn eventLimit && typeof eventLimit !== 'number';\n\t},\n\n\n\t/* Dimensions\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Refreshes the horizontal dimensions of the view\n\tupdateWidth: function() {\n\t\tif (this.colWeekNumbersVisible) {\n\t\t\t// Make sure all week number cells running down the side have the same width.\n\t\t\t// Record the width for cells created later.\n\t\t\tthis.weekNumberWidth = matchCellWidths(\n\t\t\t\tthis.el.find('.fc-week-number')\n\t\t\t);\n\t\t}\n\t},\n\n\n\t// Adjusts the vertical dimensions of the view to the specified values\n\tsetHeight: function(totalHeight, isAuto) {\n\t\tvar eventLimit = this.opt('eventLimit');\n\t\tvar scrollerHeight;\n\t\tvar scrollbarWidths;\n\n\t\t// reset all heights to be natural\n\t\tthis.scroller.clear();\n\t\tuncompensateScroll(this.headRowEl);\n\n\t\tthis.dayGrid.removeSegPopover(); // kill the \"more\" popover if displayed\n\n\t\t// is the event limit a constant level number?\n\t\tif (eventLimit && typeof eventLimit === 'number') {\n\t\t\tthis.dayGrid.limitRows(eventLimit); // limit the levels first so the height can redistribute after\n\t\t}\n\n\t\t// distribute the height to the rows\n\t\t// (totalHeight is a \"recommended\" value if isAuto)\n\t\tscrollerHeight = this.computeScrollerHeight(totalHeight);\n\t\tthis.setGridHeight(scrollerHeight, isAuto);\n\n\t\t// is the event limit dynamically calculated?\n\t\tif (eventLimit && typeof eventLimit !== 'number') {\n\t\t\tthis.dayGrid.limitRows(eventLimit); // limit the levels after the grid's row heights have been set\n\t\t}\n\n\t\tif (!isAuto) { // should we force dimensions of the scroll container?\n\n\t\t\tthis.scroller.setHeight(scrollerHeight);\n\t\t\tscrollbarWidths = this.scroller.getScrollbarWidths();\n\n\t\t\tif (scrollbarWidths.left || scrollbarWidths.right) { // using scrollbars?\n\n\t\t\t\tcompensateScroll(this.headRowEl, scrollbarWidths);\n\n\t\t\t\t// doing the scrollbar compensation might have created text overflow which created more height. redo\n\t\t\t\tscrollerHeight = this.computeScrollerHeight(totalHeight);\n\t\t\t\tthis.scroller.setHeight(scrollerHeight);\n\t\t\t}\n\n\t\t\t// guarantees the same scrollbar widths\n\t\t\tthis.scroller.lockOverflow(scrollbarWidths);\n\t\t}\n\t},\n\n\n\t// given a desired total height of the view, returns what the height of the scroller should be\n\tcomputeScrollerHeight: function(totalHeight) {\n\t\treturn totalHeight -\n\t\t\tsubtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller\n\t},\n\n\n\t// Sets the height of just the DayGrid component in this view\n\tsetGridHeight: function(height, isAuto) {\n\t\tif (isAuto) {\n\t\t\tundistributeHeight(this.dayGrid.rowEls); // let the rows be their natural height with no expanding\n\t\t}\n\t\telse {\n\t\t\tdistributeHeight(this.dayGrid.rowEls, height, true); // true = compensate for height-hogging rows\n\t\t}\n\t},\n\n\n\t/* Scroll\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tcomputeInitialDateScroll: function() {\n\t\treturn { top: 0 };\n\t},\n\n\n\tqueryDateScroll: function() {\n\t\treturn { top: this.scroller.getScrollTop() };\n\t},\n\n\n\tapplyDateScroll: function(scroll) {\n\t\tif (scroll.top !== undefined) {\n\t\t\tthis.scroller.setScrollTop(scroll.top);\n\t\t}\n\t},\n\n\n\t/* Events\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders the given events onto the view and populates the segments array\n\trenderEventsPayload: function(eventsPayload) {\n\t\tthis.dayGrid.renderEventsPayload(eventsPayload);\n\n\t\t// must compensate for events that overflow the row\n\t\t// TODO: how will ChronoComponent handle this?\n\t\tthis.updateHeight();\n\t}\n\n});\n\n\n// Methods that will customize the rendering behavior of the BasicView's dayGrid\nvar basicDayGridMethods = {\n\n\n\t// Generates the HTML that will go before the day-of week header cells\n\trenderHeadIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\tif (view.colWeekNumbersVisible) {\n\t\t\treturn '' +\n\t\t\t\t'' +\n\t\t\t\t\t'' + // needed for matchCellWidths\n\t\t\t\t\t\thtmlEscape(this.opt('weekNumberTitle')) +\n\t\t\t\t\t'' +\n\t\t\t\t'';\n\t\t}\n\n\t\treturn '';\n\t},\n\n\n\t// Generates the HTML that will go before content-skeleton cells that display the day/week numbers\n\trenderNumberIntroHtml: function(row) {\n\t\tvar view = this.view;\n\t\tvar weekStart = this.getCellDate(row, 0);\n\n\t\tif (view.colWeekNumbersVisible) {\n\t\t\treturn '' +\n\t\t\t\t'' +\n\t\t\t\t\tview.buildGotoAnchorHtml( // aside from link, important for matchCellWidths\n\t\t\t\t\t\t{ date: weekStart, type: 'week', forceOff: this.colCnt === 1 },\n\t\t\t\t\t\tweekStart.format('w') // inner HTML\n\t\t\t\t\t) +\n\t\t\t\t'';\n\t\t}\n\n\t\treturn '';\n\t},\n\n\n\t// Generates the HTML that goes before the day bg cells for each day-row\n\trenderBgIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\tif (view.colWeekNumbersVisible) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn '';\n\t},\n\n\n\t// Generates the HTML that goes before every other type of row generated by DayGrid.\n\t// Affects helper-skeleton and highlight-skeleton rows.\n\trenderIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\tif (view.colWeekNumbersVisible) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn '';\n\t}\n\n};\n\n;;\n\n/* A month view with day cells running in rows (one-per-week) and columns\n----------------------------------------------------------------------------------------------------------------------*/\n\nvar MonthView = FC.MonthView = BasicView.extend({\n\n\n\t// Computes the date range that will be rendered.\n\tbuildRenderRange: function() {\n\t\tvar renderUnzonedRange = BasicView.prototype.buildRenderRange.apply(this, arguments);\n\t\tvar start = this.calendar.msToUtcMoment(renderUnzonedRange.startMs, this.isRangeAllDay);\n\t\tvar end = this.calendar.msToUtcMoment(renderUnzonedRange.endMs, this.isRangeAllDay);\n\t\tvar rowCnt;\n\n\t\t// ensure 6 weeks\n\t\tif (this.isFixedWeeks()) {\n\t\t\trowCnt = Math.ceil( // could be partial weeks due to hiddenDays\n\t\t\t\tend.diff(start, 'weeks', true) // dontRound=true\n\t\t\t);\n\t\t\tend.add(6 - rowCnt, 'weeks');\n\t\t}\n\n\t\treturn new UnzonedRange(start, end);\n\t},\n\n\n\t// Overrides the default BasicView behavior to have special multi-week auto-height logic\n\tsetGridHeight: function(height, isAuto) {\n\n\t\t// if auto, make the height of each row the height that it would be if there were 6 weeks\n\t\tif (isAuto) {\n\t\t\theight *= this.rowCnt / 6;\n\t\t}\n\n\t\tdistributeHeight(this.dayGrid.rowEls, height, !isAuto); // if auto, don't compensate for height-hogging rows\n\t},\n\n\n\tisFixedWeeks: function() {\n\t\treturn this.opt('fixedWeekCount');\n\t},\n\n\n\tisDateInOtherMonth: function(date) {\n\t\treturn date.month() !== moment.utc(this.currentUnzonedRange.startMs).month(); // TODO: optimize\n\t}\n\n});\n\n;;\n\nfcViews.basic = {\n\t'class': BasicView\n};\n\nfcViews.basicDay = {\n\ttype: 'basic',\n\tduration: { days: 1 }\n};\n\nfcViews.basicWeek = {\n\ttype: 'basic',\n\tduration: { weeks: 1 }\n};\n\nfcViews.month = {\n\t'class': MonthView,\n\tduration: { months: 1 }, // important for prev/next\n\tdefaults: {\n\t\tfixedWeekCount: true\n\t}\n};\n;;\n\n/* An abstract class for all agenda-related views. Displays one more columns with time slots running vertically.\n----------------------------------------------------------------------------------------------------------------------*/\n// Is a manager for the TimeGrid subcomponent and possibly the DayGrid subcomponent (if allDaySlot is on).\n// Responsible for managing width/height.\n\nvar AgendaView = FC.AgendaView = View.extend({\n\n\tscroller: null,\n\n\ttimeGridClass: TimeGrid, // class used to instantiate the timeGrid. subclasses can override\n\ttimeGrid: null, // the main time-grid subcomponent of this view\n\n\tdayGridClass: DayGrid, // class used to instantiate the dayGrid. subclasses can override\n\tdayGrid: null, // the \"all-day\" subcomponent. if all-day is turned off, this will be null\n\n\taxisWidth: null, // the width of the time axis running down the side\n\n\theadContainerEl: null, // div that hold's the timeGrid's rendered date header\n\tnoScrollRowEls: null, // set of fake row elements that must compensate when scroller has scrollbars\n\n\t// when the time-grid isn't tall enough to occupy the given height, we render an
underneath\n\tbottomRuleEl: null,\n\n\t// indicates that minTime/maxTime affects rendering\n\tusesMinMaxTime: true,\n\n\n\tinitialize: function() {\n\t\tthis.timeGrid = this.instantiateTimeGrid();\n\t\tthis.addChild(this.timeGrid);\n\n\t\tif (this.opt('allDaySlot')) { // should we display the \"all-day\" area?\n\t\t\tthis.dayGrid = this.instantiateDayGrid(); // the all-day subcomponent of this view\n\t\t\tthis.addChild(this.dayGrid);\n\t\t}\n\n\t\tthis.scroller = new Scroller({\n\t\t\toverflowX: 'hidden',\n\t\t\toverflowY: 'auto'\n\t\t});\n\t},\n\n\n\t// Instantiates the TimeGrid object this view needs. Draws from this.timeGridClass\n\tinstantiateTimeGrid: function() {\n\t\tvar subclass = this.timeGridClass.extend(agendaTimeGridMethods);\n\n\t\treturn new subclass(this);\n\t},\n\n\n\t// Instantiates the DayGrid object this view might need. Draws from this.dayGridClass\n\tinstantiateDayGrid: function() {\n\t\tvar subclass = this.dayGridClass.extend(agendaDayGridMethods);\n\n\t\treturn new subclass(this);\n\t},\n\n\n\t/* Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders the view into `this.el`, which has already been assigned\n\trenderDates: function() {\n\n\t\tthis.timeGrid.setRange(this.renderUnzonedRange);\n\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.setRange(this.renderUnzonedRange);\n\t\t}\n\n\t\tthis.el.addClass('fc-agenda-view').html(this.renderSkeletonHtml());\n\t\tthis.renderHead();\n\n\t\tthis.scroller.render();\n\t\tvar timeGridWrapEl = this.scroller.el.addClass('fc-time-grid-container');\n\t\tvar timeGridEl = $('
').appendTo(timeGridWrapEl);\n\t\tthis.el.find('.fc-body > tr > td').append(timeGridWrapEl);\n\n\t\tthis.timeGrid.setElement(timeGridEl);\n\t\tthis.timeGrid.renderDates();\n\n\t\t// the
that sometimes displays under the time-grid\n\t\tthis.bottomRuleEl = $('
')\n\t\t\t.appendTo(this.timeGrid.el); // inject it into the time-grid\n\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.setElement(this.el.find('.fc-day-grid'));\n\t\t\tthis.dayGrid.renderDates();\n\n\t\t\t// have the day-grid extend it's coordinate area over the
dividing the two grids\n\t\t\tthis.dayGrid.bottomCoordPadding = this.dayGrid.el.next('hr').outerHeight();\n\t\t}\n\n\t\tthis.noScrollRowEls = this.el.find('.fc-row:not(.fc-scroller *)'); // fake rows not within the scroller\n\t},\n\n\n\t// render the day-of-week headers\n\trenderHead: function() {\n\t\tthis.headContainerEl =\n\t\t\tthis.el.find('.fc-head-container')\n\t\t\t\t.html(this.timeGrid.renderHeadHtml());\n\t},\n\n\n\t// Unrenders the content of the view. Since we haven't separated skeleton rendering from date rendering,\n\t// always completely kill each grid's rendering.\n\t// TODO: move this over to ChronoComponent\n\tunrenderDates: function() {\n\t\tthis.timeGrid.unrenderDates();\n\t\tthis.timeGrid.removeElement();\n\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.unrenderDates();\n\t\t\tthis.dayGrid.removeElement();\n\t\t}\n\n\t\tthis.scroller.destroy();\n\t},\n\n\n\t// Builds the HTML skeleton for the view.\n\t// The day-grid and time-grid components will render inside containers defined by this HTML.\n\trenderSkeletonHtml: function() {\n\t\tvar theme = this.calendar.theme;\n\n\t\treturn '' +\n\t\t\t'' +\n\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t'' +\n\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t'' +\n\t\t\t'
' +\n\t\t\t\t\t\t\t(this.dayGrid ?\n\t\t\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\t\t'
' :\n\t\t\t\t\t\t\t\t''\n\t\t\t\t\t\t\t\t) +\n\t\t\t\t\t\t'
';\n\t},\n\n\n\t// Generates an HTML attribute string for setting the width of the axis, if it is known\n\taxisStyleAttr: function() {\n\t\tif (this.axisWidth !== null) {\n\t\t\t return 'style=\"width:' + this.axisWidth + 'px\"';\n\t\t}\n\t\treturn '';\n\t},\n\n\n\t/* Now Indicator\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tgetNowIndicatorUnit: function() {\n\t\treturn this.timeGrid.getNowIndicatorUnit();\n\t},\n\n\n\t/* Dimensions\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tupdateSize: function(isResize) {\n\t\tthis.timeGrid.updateSize(isResize);\n\n\t\tView.prototype.updateSize.call(this, isResize); // call the super-method\n\t},\n\n\n\t// Refreshes the horizontal dimensions of the view\n\tupdateWidth: function() {\n\t\t// make all axis cells line up, and record the width so newly created axis cells will have it\n\t\tthis.axisWidth = matchCellWidths(this.el.find('.fc-axis'));\n\t},\n\n\n\t// Adjusts the vertical dimensions of the view to the specified values\n\tsetHeight: function(totalHeight, isAuto) {\n\t\tvar eventLimit;\n\t\tvar scrollerHeight;\n\t\tvar scrollbarWidths;\n\n\t\t// reset all dimensions back to the original state\n\t\tthis.bottomRuleEl.hide(); // .show() will be called later if this
is necessary\n\t\tthis.scroller.clear(); // sets height to 'auto' and clears overflow\n\t\tuncompensateScroll(this.noScrollRowEls);\n\n\t\t// limit number of events in the all-day area\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.removeSegPopover(); // kill the \"more\" popover if displayed\n\n\t\t\teventLimit = this.opt('eventLimit');\n\t\t\tif (eventLimit && typeof eventLimit !== 'number') {\n\t\t\t\teventLimit = AGENDA_ALL_DAY_EVENT_LIMIT; // make sure \"auto\" goes to a real number\n\t\t\t}\n\t\t\tif (eventLimit) {\n\t\t\t\tthis.dayGrid.limitRows(eventLimit);\n\t\t\t}\n\t\t}\n\n\t\tif (!isAuto) { // should we force dimensions of the scroll container?\n\n\t\t\tscrollerHeight = this.computeScrollerHeight(totalHeight);\n\t\t\tthis.scroller.setHeight(scrollerHeight);\n\t\t\tscrollbarWidths = this.scroller.getScrollbarWidths();\n\n\t\t\tif (scrollbarWidths.left || scrollbarWidths.right) { // using scrollbars?\n\n\t\t\t\t// make the all-day and header rows lines up\n\t\t\t\tcompensateScroll(this.noScrollRowEls, scrollbarWidths);\n\n\t\t\t\t// the scrollbar compensation might have changed text flow, which might affect height, so recalculate\n\t\t\t\t// and reapply the desired height to the scroller.\n\t\t\t\tscrollerHeight = this.computeScrollerHeight(totalHeight);\n\t\t\t\tthis.scroller.setHeight(scrollerHeight);\n\t\t\t}\n\n\t\t\t// guarantees the same scrollbar widths\n\t\t\tthis.scroller.lockOverflow(scrollbarWidths);\n\n\t\t\t// if there's any space below the slats, show the horizontal rule.\n\t\t\t// this won't cause any new overflow, because lockOverflow already called.\n\t\t\tif (this.timeGrid.getTotalSlatHeight() < scrollerHeight) {\n\t\t\t\tthis.bottomRuleEl.show();\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// given a desired total height of the view, returns what the height of the scroller should be\n\tcomputeScrollerHeight: function(totalHeight) {\n\t\treturn totalHeight -\n\t\t\tsubtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller\n\t},\n\n\n\t/* Scroll\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Computes the initial pre-configured scroll state prior to allowing the user to change it\n\tcomputeInitialDateScroll: function() {\n\t\tvar scrollTime = moment.duration(this.opt('scrollTime'));\n\t\tvar top = this.timeGrid.computeTimeTop(scrollTime);\n\n\t\t// zoom can give weird floating-point values. rather scroll a little bit further\n\t\ttop = Math.ceil(top);\n\n\t\tif (top) {\n\t\t\ttop++; // to overcome top border that slots beyond the first have. looks better\n\t\t}\n\n\t\treturn { top: top };\n\t},\n\n\n\tqueryDateScroll: function() {\n\t\treturn { top: this.scroller.getScrollTop() };\n\t},\n\n\n\tapplyDateScroll: function(scroll) {\n\t\tif (scroll.top !== undefined) {\n\t\t\tthis.scroller.setScrollTop(scroll.top);\n\t\t}\n\t},\n\n\n\t/* Hit Areas\n\t------------------------------------------------------------------------------------------------------------------*/\n\t// forward all hit-related method calls to the grids (dayGrid might not be defined)\n\n\n\tgetHitFootprint: function(hit) {\n\t\t// TODO: hit.component is set as a hack to identify where the hit came from\n\t\treturn hit.component.getHitFootprint(hit);\n\t},\n\n\n\tgetHitEl: function(hit) {\n\t\t// TODO: hit.component is set as a hack to identify where the hit came from\n\t\treturn hit.component.getHitEl(hit);\n\t},\n\n\n\t/* Events\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders events onto the view and populates the View's segment array\n\trenderEventsPayload: function(eventsPayload) {\n\t\tvar dayEventsPayload = {};\n\t\tvar timedEventsPayload = {};\n\t\tvar daySegs = [];\n\t\tvar timedSegs;\n\t\tvar id, eventInstanceGroup;\n\n\t\t// separate the events into all-day and timed\n\t\tfor (id in eventsPayload) {\n\t\t\teventInstanceGroup = eventsPayload[id];\n\n\t\t\tif (eventInstanceGroup.getEventDef().isAllDay()) {\n\t\t\t\tdayEventsPayload[id] = eventInstanceGroup;\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttimedEventsPayload[id] = eventInstanceGroup;\n\t\t\t}\n\t\t}\n\n\t\t// render the events in the subcomponents\n\t\ttimedSegs = this.timeGrid.renderEventsPayload(timedEventsPayload);\n\t\tif (this.dayGrid) {\n\t\t\tdaySegs = this.dayGrid.renderEventsPayload(dayEventsPayload);\n\t\t}\n\n\t\t// the all-day area is flexible and might have a lot of events, so shift the height\n\t\t// TODO: how will ChronoComponent handle this?\n\t\tthis.updateHeight();\n\t},\n\n\n\t/* Dragging (for events and external elements)\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// A returned value of `true` signals that a mock \"helper\" event has been rendered.\n\trenderDrag: function(eventFootprints, seg) {\n\t\tif (eventFootprints.length) {\n\t\t\tif (!eventFootprints[0].componentFootprint.isAllDay) {\n\t\t\t\treturn this.timeGrid.renderDrag(eventFootprints, seg);\n\t\t\t}\n\t\t\telse if (this.dayGrid) {\n\t\t\t\treturn this.dayGrid.renderDrag(eventFootprints, seg);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t/* Selection\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of a selection\n\trenderSelectionFootprint: function(componentFootprint) {\n\t\tif (!componentFootprint.isAllDay) {\n\t\t\tthis.timeGrid.renderSelectionFootprint(componentFootprint);\n\t\t}\n\t\telse if (this.dayGrid) {\n\t\t\tthis.dayGrid.renderSelectionFootprint(componentFootprint);\n\t\t}\n\t}\n\n});\n\n\n// Methods that will customize the rendering behavior of the AgendaView's timeGrid\n// TODO: move into TimeGrid\nvar agendaTimeGridMethods = {\n\n\n\t// Generates the HTML that will go before the day-of week header cells\n\trenderHeadIntroHtml: function() {\n\t\tvar view = this.view;\n\t\tvar weekStart = view.calendar.msToUtcMoment(this.unzonedRange.startMs, true);\n\t\tvar weekText;\n\n\t\tif (this.opt('weekNumbers')) {\n\t\t\tweekText = weekStart.format(this.opt('smallWeekFormat'));\n\n\t\t\treturn '' +\n\t\t\t\t'' +\n\t\t\t\t\tview.buildGotoAnchorHtml( // aside from link, important for matchCellWidths\n\t\t\t\t\t\t{ date: weekStart, type: 'week', forceOff: this.colCnt > 1 },\n\t\t\t\t\t\thtmlEscape(weekText) // inner HTML\n\t\t\t\t\t) +\n\t\t\t\t'';\n\t\t}\n\t\telse {\n\t\t\treturn '';\n\t\t}\n\t},\n\n\n\t// Generates the HTML that goes before the bg of the TimeGrid slot area. Long vertical column.\n\trenderBgIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\treturn '';\n\t},\n\n\n\t// Generates the HTML that goes before all other types of cells.\n\t// Affects content-skeleton, helper-skeleton, highlight-skeleton for both the time-grid and day-grid.\n\trenderIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\treturn '';\n\t}\n\n};\n\n\n// Methods that will customize the rendering behavior of the AgendaView's dayGrid\nvar agendaDayGridMethods = {\n\n\n\t// Generates the HTML that goes before the all-day cells\n\trenderBgIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\treturn '' +\n\t\t\t'' +\n\t\t\t\t'' + // needed for matchCellWidths\n\t\t\t\t\tview.getAllDayHtml() +\n\t\t\t\t'' +\n\t\t\t'';\n\t},\n\n\n\t// Generates the HTML that goes before all other types of cells.\n\t// Affects content-skeleton, helper-skeleton, highlight-skeleton for both the time-grid and day-grid.\n\trenderIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\treturn '';\n\t}\n\n};\n\n;;\n\nvar AGENDA_ALL_DAY_EVENT_LIMIT = 5;\n\n// potential nice values for the slot-duration and interval-duration\n// from largest to smallest\nvar AGENDA_STOCK_SUB_DURATIONS = [\n\t{ hours: 1 },\n\t{ minutes: 30 },\n\t{ minutes: 15 },\n\t{ seconds: 30 },\n\t{ seconds: 15 }\n];\n\nfcViews.agenda = {\n\t'class': AgendaView,\n\tdefaults: {\n\t\tallDaySlot: true,\n\t\tslotDuration: '00:30:00',\n\t\tslotEventOverlap: true // a bad name. confused with overlap/constraint system\n\t}\n};\n\nfcViews.agendaDay = {\n\ttype: 'agenda',\n\tduration: { days: 1 }\n};\n\nfcViews.agendaWeek = {\n\ttype: 'agenda',\n\tduration: { weeks: 1 }\n};\n;;\n\n/*\nResponsible for the scroller, and forwarding event-related actions into the \"grid\"\n*/\nvar ListView = View.extend({\n\n\tgrid: null,\n\tscroller: null,\n\n\tinitialize: function() {\n\t\tthis.grid = new ListViewGrid(this);\n\t\tthis.addChild(this.grid);\n\n\t\tthis.scroller = new Scroller({\n\t\t\toverflowX: 'hidden',\n\t\t\toverflowY: 'auto'\n\t\t});\n\t},\n\n\trenderSkeleton: function() {\n\t\tthis.el.addClass(\n\t\t\t'fc-list-view ' +\n\t\t\tthis.calendar.theme.getClass('listView')\n\t\t);\n\n\t\tthis.scroller.render();\n\t\tthis.scroller.el.appendTo(this.el);\n\n\t\tthis.grid.setElement(this.scroller.scrollEl);\n\t},\n\n\tunrenderSkeleton: function() {\n\t\tthis.scroller.destroy(); // will remove the Grid too\n\t},\n\n\tsetHeight: function(totalHeight, isAuto) {\n\t\tthis.scroller.setHeight(this.computeScrollerHeight(totalHeight));\n\t},\n\n\tcomputeScrollerHeight: function(totalHeight) {\n\t\treturn totalHeight -\n\t\t\tsubtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller\n\t},\n\n\trenderDates: function() {\n\t\tthis.grid.setRange(this.renderUnzonedRange); // needs to process range-related options\n\t},\n\n\tisEventDefResizable: function(eventDef) {\n\t\treturn false;\n\t},\n\n\tisEventDefDraggable: function(eventDef) {\n\t\treturn false;\n\t}\n\n});\n\n/*\nResponsible for event rendering and user-interaction.\nIts \"el\" is the inner-content of the above view's scroller.\n*/\nvar ListViewGrid = Grid.extend({\n\n\tdayDates: null, // localized ambig-time moment array\n\tdayRanges: null, // UnzonedRange[], of start-end of each day\n\tsegSelector: '.fc-list-item', // which elements accept event actions\n\thasDayInteractions: false, // no day selection or day clicking\n\n\trangeUpdated: function() {\n\t\tvar calendar = this.view.calendar;\n\t\tvar dayStart = calendar.msToUtcMoment(this.unzonedRange.startMs, true);\n\t\tvar viewEnd = calendar.msToUtcMoment(this.unzonedRange.endMs, true);\n\t\tvar dayDates = [];\n\t\tvar dayRanges = [];\n\n\t\twhile (dayStart < viewEnd) {\n\n\t\t\tdayDates.push(dayStart.clone());\n\n\t\t\tdayRanges.push(new UnzonedRange(\n\t\t\t\tdayStart,\n\t\t\t\tdayStart.clone().add(1, 'day')\n\t\t\t));\n\n\t\t\tdayStart.add(1, 'day');\n\t\t}\n\n\t\tthis.dayDates = dayDates;\n\t\tthis.dayRanges = dayRanges;\n\t},\n\n\t// slices by day\n\tcomponentFootprintToSegs: function(footprint) {\n\t\tvar view = this.view;\n\t\tvar dayRanges = this.dayRanges;\n\t\tvar dayIndex;\n\t\tvar segRange;\n\t\tvar seg;\n\t\tvar segs = [];\n\n\t\tfor (dayIndex = 0; dayIndex < dayRanges.length; dayIndex++) {\n\t\t\tsegRange = footprint.unzonedRange.intersect(dayRanges[dayIndex]);\n\n\t\t\tif (segRange) {\n\t\t\t\tseg = {\n\t\t\t\t\tstartMs: segRange.startMs,\n\t\t\t\t\tendMs: segRange.endMs,\n\t\t\t\t\tisStart: segRange.isStart,\n\t\t\t\t\tisEnd: segRange.isEnd,\n\t\t\t\t\tdayIndex: dayIndex\n\t\t\t\t};\n\n\t\t\t\tsegs.push(seg);\n\n\t\t\t\t// detect when footprint won't go fully into the next day,\n\t\t\t\t// and mutate the latest seg to the be the end.\n\t\t\t\tif (\n\t\t\t\t\t!seg.isEnd && !footprint.isAllDay &&\n\t\t\t\t\tfootprint.unzonedRange.endMs < dayRanges[dayIndex + 1].startMs + view.nextDayThreshold\n\t\t\t\t) {\n\t\t\t\t\tseg.endMs = footprint.unzonedRange.endMs;\n\t\t\t\t\tseg.isEnd = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\t// like \"4:00am\"\n\tcomputeEventTimeFormat: function() {\n\t\treturn this.opt('mediumTimeFormat');\n\t},\n\n\t// for events with a url, the whole should be clickable,\n\t// but it's impossible to wrap with an tag. simulate this.\n\thandleSegClick: function(seg, ev) {\n\t\tvar url;\n\n\t\tGrid.prototype.handleSegClick.apply(this, arguments); // super. might prevent the default action\n\n\t\t// not clicking on or within an with an href\n\t\tif (!$(ev.target).closest('a[href]').length) {\n\t\t\turl = seg.footprint.eventDef.url;\n\n\t\t\tif (url && !ev.isDefaultPrevented()) { // jsEvent not cancelled in handler\n\t\t\t\twindow.location.href = url; // simulate link click\n\t\t\t}\n\t\t}\n\t},\n\n\t// returns list of foreground segs that were actually rendered\n\trenderFgSegs: function(segs) {\n\t\tsegs = this.renderFgSegEls(segs); // might filter away hidden events\n\n\t\tif (!segs.length) {\n\t\t\tthis.renderEmptyMessage();\n\t\t}\n\t\telse {\n\t\t\tthis.renderSegList(segs);\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\trenderEmptyMessage: function() {\n\t\tthis.el.html(\n\t\t\t'
' + // TODO: try less wraps\n\t\t\t'
' +\n\t\t\t'
' +\n\t\t\t\thtmlEscape(this.opt('noEventsMessage')) +\n\t\t\t'
' +\n\t\t\t'
' +\n\t\t\t'
'\n\t\t);\n\t},\n\n\t// render the event segments in the view\n\trenderSegList: function(allSegs) {\n\t\tvar segsByDay = this.groupSegsByDay(allSegs); // sparse array\n\t\tvar dayIndex;\n\t\tvar daySegs;\n\t\tvar i;\n\t\tvar tableEl = $('
');\n\t\tvar tbodyEl = tableEl.find('tbody');\n\n\t\tfor (dayIndex = 0; dayIndex < segsByDay.length; dayIndex++) {\n\t\t\tdaySegs = segsByDay[dayIndex];\n\n\t\t\tif (daySegs) { // sparse array, so might be undefined\n\n\t\t\t\t// append a day header\n\t\t\t\ttbodyEl.append(this.dayHeaderHtml(this.dayDates[dayIndex]));\n\n\t\t\t\tthis.sortEventSegs(daySegs);\n\n\t\t\t\tfor (i = 0; i < daySegs.length; i++) {\n\t\t\t\t\ttbodyEl.append(daySegs[i].el); // append event row\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.el.empty().append(tableEl);\n\t},\n\n\t// Returns a sparse array of arrays, segs grouped by their dayIndex\n\tgroupSegsByDay: function(segs) {\n\t\tvar segsByDay = []; // sparse array\n\t\tvar i, seg;\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\t\t\t(segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))\n\t\t\t\t.push(seg);\n\t\t}\n\n\t\treturn segsByDay;\n\t},\n\n\t// generates the HTML for the day headers that live amongst the event rows\n\tdayHeaderHtml: function(dayDate) {\n\t\tvar view = this.view;\n\t\tvar mainFormat = this.opt('listDayFormat');\n\t\tvar altFormat = this.opt('listDayAltFormat');\n\n\t\treturn '' +\n\t\t\t'' +\n\t\t\t\t(mainFormat ?\n\t\t\t\t\tview.buildGotoAnchorHtml(\n\t\t\t\t\t\tdayDate,\n\t\t\t\t\t\t{ 'class': 'fc-list-heading-main' },\n\t\t\t\t\t\thtmlEscape(dayDate.format(mainFormat)) // inner HTML\n\t\t\t\t\t) :\n\t\t\t\t\t'') +\n\t\t\t\t(altFormat ?\n\t\t\t\t\tview.buildGotoAnchorHtml(\n\t\t\t\t\t\tdayDate,\n\t\t\t\t\t\t{ 'class': 'fc-list-heading-alt' },\n\t\t\t\t\t\thtmlEscape(dayDate.format(altFormat)) // inner HTML\n\t\t\t\t\t) :\n\t\t\t\t\t'') +\n\t\t\t'' +\n\t\t'';\n\t},\n\n\t// generates the HTML for a single event row\n\tfgSegHtml: function(seg) {\n\t\tvar view = this.view;\n\t\tvar calendar = view.calendar;\n\t\tvar theme = calendar.theme;\n\t\tvar classes = [ 'fc-list-item' ].concat(this.getSegCustomClasses(seg));\n\t\tvar bgColor = this.getSegBackgroundColor(seg);\n\t\tvar eventFootprint = seg.footprint;\n\t\tvar eventDef = eventFootprint.eventDef;\n\t\tvar componentFootprint = eventFootprint.componentFootprint;\n\t\tvar url = eventDef.url;\n\t\tvar timeHtml;\n\n\t\tif (componentFootprint.isAllDay) {\n\t\t\ttimeHtml = view.getAllDayHtml();\n\t\t}\n\t\t// if the event appears to span more than one day\n\t\telse if (view.isMultiDayRange(componentFootprint.unzonedRange)) {\n\t\t\tif (seg.isStart || seg.isEnd) { // outer segment that probably lasts part of the day\n\t\t\t\ttimeHtml = htmlEscape(this._getEventTimeText(\n\t\t\t\t\tcalendar.msToMoment(seg.startMs),\n\t\t\t\t\tcalendar.msToMoment(seg.endMs),\n\t\t\t\t\tcomponentFootprint.isAllDay\n\t\t\t\t));\n\t\t\t}\n\t\t\telse { // inner segment that lasts the whole day\n\t\t\t\ttimeHtml = view.getAllDayHtml();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Display the normal time text for the *event's* times\n\t\t\ttimeHtml = htmlEscape(this.getEventTimeText(eventFootprint));\n\t\t}\n\n\t\tif (url) {\n\t\t\tclasses.push('fc-has-url');\n\t\t}\n\n\t\treturn '' +\n\t\t\t(this.displayEventTime ?\n\t\t\t\t'' +\n\t\t\t\t\t(timeHtml || '') +\n\t\t\t\t'' :\n\t\t\t\t'') +\n\t\t\t'' +\n\t\t\t\t'' +\n\t\t\t'' +\n\t\t\t'' +\n\t\t\t\t'' +\n\t\t\t\t\thtmlEscape(eventDef.title || '') +\n\t\t\t\t'
' +\n\t\t\t'' +\n\t\t'';\n\t}\n\n});\n\n;;\n\nfcViews.list = {\n\t'class': ListView,\n\tbuttonTextKey: 'list', // what to lookup in locale files\n\tdefaults: {\n\t\tbuttonText: 'list', // text to display for English\n\t\tlistDayFormat: 'LL', // like \"January 1, 2016\"\n\t\tnoEventsMessage: 'No events to display'\n\t}\n};\n\nfcViews.listDay = {\n\ttype: 'list',\n\tduration: { days: 1 },\n\tdefaults: {\n\t\tlistDayFormat: 'dddd' // day-of-week is all we need. full date is probably in header\n\t}\n};\n\nfcViews.listWeek = {\n\ttype: 'list',\n\tduration: { weeks: 1 },\n\tdefaults: {\n\t\tlistDayFormat: 'dddd', // day-of-week is more important\n\t\tlistDayAltFormat: 'LL'\n\t}\n};\n\nfcViews.listMonth = {\n\ttype: 'list',\n\tduration: { month: 1 },\n\tdefaults: {\n\t\tlistDayAltFormat: 'dddd' // day-of-week is nice-to-have\n\t}\n};\n\nfcViews.listYear = {\n\ttype: 'list',\n\tduration: { year: 1 },\n\tdefaults: {\n\t\tlistDayAltFormat: 'dddd' // day-of-week is nice-to-have\n\t}\n};\n\n;;\n\r\nreturn FC; // export for Node/CommonJS\r\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fullcalendar/dist/fullcalendar.js\n// module id = 32\n// module chunks = 0","//! moment.js\n//! version : 2.18.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\nvar hookCallback;\n\nfunction hooks () {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback (callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n}\n\nfunction isObjectEmpty(obj) {\n var k;\n for (k in obj) {\n // even if its not own property I'd still call it non-empty\n return false;\n }\n return true;\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n}\n\nfunction isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n}\n\nfunction map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false,\n parsedDateParts : [],\n meridiem : null,\n rfc2822 : false,\n weekdayMismatch : false\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nvar some$1 = some;\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some$1.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid = isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n }\n else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid (flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n }\n else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = hooks.momentProperties = [];\n\nfunction copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i = 0; i < momentProperties.length; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\nvar updateInProgress = false;\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment (obj) {\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n}\n\nfunction absFloor (number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\nfunction warn(msg) {\n if (hooks.suppressDeprecationWarnings === false &&\n (typeof console !== 'undefined') && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [];\n var arg;\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n}\n\nfunction set (config) {\n var prop, i;\n for (i in config) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' + (/\\d{1,2}/).source);\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig), prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i, res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar keys$1 = keys;\n\nvar defaultCalendar = {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n};\n\nfunction calendar (key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nvar defaultLongDateFormat = {\n LTS : 'h:mm:ss A',\n LT : 'h:mm A',\n L : 'MM/DD/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY h:mm A',\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\n};\n\nfunction longDateFormat (key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate () {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d';\nvar defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal (number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n ss : '%d seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n};\n\nfunction relativeTime (number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return (isFunction(output)) ?\n output(number, withoutSuffix, string, isFuture) :\n output.replace(/%d/i, number);\n}\n\nfunction pastFuture (diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias (unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [];\n for (var u in unitsObj) {\n units.push({unit: u, priority: priorities[u]});\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction makeGetSet (unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get (mom, unit) {\n return mom.isValid() ?\n mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n}\n\nfunction set$1 (mom, unit, value) {\n if (mom.isValid()) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n}\n\n// MOMENTS\n\nfunction stringGet (units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\n\nfunction stringSet (units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n}\n\nvar 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;\n\nvar localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\nvar formatFunctions = {};\n\nvar formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken (token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens), i, length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '', i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar match1 = /\\d/; // 0 - 9\nvar match2 = /\\d\\d/; // 00 - 99\nvar match3 = /\\d{3}/; // 000 - 999\nvar match4 = /\\d{4}/; // 0000 - 9999\nvar match6 = /[+-]?\\d{6}/; // -999999 - 999999\nvar match1to2 = /\\d\\d?/; // 0 - 99\nvar match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\nvar match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\nvar match1to3 = /\\d{1,3}/; // 0 - 999\nvar match1to4 = /\\d{1,4}/; // 0 - 9999\nvar match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\nvar matchUnsigned = /\\d+/; // 0 - inf\nvar matchSigned = /[+-]?\\d+/; // -inf - inf\n\nvar matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\nvar matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\nvar matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n// any word (or two) characters or numbers including two/three word month in arabic.\n// includes scottish gaelic two word and hyphenated months\nvar matchWord = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\n\n\nvar regexes = {};\n\nfunction addRegexToken (token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return (isStrict && strictRegex) ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken (token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken (token, callback) {\n var i, func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken (token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0;\nvar MONTH = 1;\nvar DATE = 2;\nvar HOUR = 3;\nvar MINUTE = 4;\nvar SECOND = 5;\nvar MILLISECOND = 6;\nvar WEEK = 7;\nvar WEEKDAY = 8;\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nvar indexOf$1 = indexOf;\n\nfunction daysInMonth(year, month) {\n return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\nvar defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\nfunction localeMonths (m, format) {\n if (!m) {\n return isArray(this._months) ? this._months :\n this._months['standalone'];\n }\n return isArray(this._months) ? this._months[m.month()] :\n this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n}\n\nvar defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\nfunction localeMonthsShort (m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort :\n this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\n this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i, ii, mom, llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse (monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth (mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth (value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth () {\n return daysInMonth(this.year(), this.month());\n}\n\nvar defaultMonthsShortRegex = matchWord;\nfunction monthsShortRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict ?\n this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n}\n\nvar defaultMonthsRegex = matchWord;\nfunction monthsRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict ?\n this._monthsStrictRegex : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear () {\n return isLeapYear(this.year());\n}\n\nfunction createDate (y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date = new Date(y, m, d, h, M, s, ms);\n\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n return date;\n}\n\nfunction createUTCDate (y) {\n var date = new Date(Date.UTC.apply(null, arguments));\n\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear, resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek, resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n});\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek (mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek () {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear () {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek (input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek (input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\n\nvar defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\nfunction localeWeekdays (m, format) {\n if (!m) {\n return isArray(this._weekdays) ? this._weekdays :\n this._weekdays['standalone'];\n }\n return isArray(this._weekdays) ? this._weekdays[m.day()] :\n this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];\n}\n\nvar defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\nfunction localeWeekdaysShort (m) {\n return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n}\n\nvar defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\nfunction localeWeekdaysMin (m) {\n return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf$1.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf$1.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse (weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');\n }\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nvar defaultWeekdaysRegex = matchWord;\nfunction weekdaysRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict ?\n this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n}\n\nvar defaultWeekdaysShortRegex = matchWord;\nfunction weekdaysShortRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict ?\n this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n}\n\nvar defaultWeekdaysMinRegex = matchWord;\nfunction weekdaysMinRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict ?\n this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n}\n\n\nfunction computeWeekdaysParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom, minp, shortp, longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n});\n\nfunction meridiem (token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem (isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM (input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return ((input + '').toLowerCase().charAt(0) === 'p');\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\nfunction localeMeridiem (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\n\n// MOMENTS\n\n// Setting the hour should keep the time, because the user explicitly\n// specified which hour he wants. So trying to maintain the same hour (in\n// a new timezone) makes sense. Adding/subtracting hours does not follow\n// this rule.\nvar getSetHour = makeGetSet('Hours', true);\n\n// months\n// week\n// weekdays\n// meridiem\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse\n};\n\n// internal storage for locale config files\nvar locales = {};\nvar localeFamilies = {};\nvar globalLocale;\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null;\n // TODO: Find a better way to register and load all the locales in Node\n if (!locales[name] && (typeof module !== 'undefined') &&\n module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n require('./locale/' + name);\n // because defineLocale currently also sets the global locale, we\n // want to undo that for lazy loaded locales\n getSetGlobalLocale(oldLocale);\n } catch (e) { }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale (name, config) {\n if (config !== null) {\n var parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale, parentConfig = baseConfig;\n // MERGE\n if (locales[name] != null) {\n parentConfig = locales[name]._config;\n }\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale (key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys$1(locales);\n}\n\nfunction checkOverflow (m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar 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)?)?$/;\nvar 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)?)?$/;\n\nvar tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\nvar isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/]\n];\n\n// iso time formats and regexes\nvar isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/]\n];\n\nvar aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n// date from iso format\nfunction configFromISO(config) {\n var i, l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime, dateFormat, timeFormat, tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\n// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\nvar basicRfcRegex = /^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d?\\d\\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(?:\\d\\d)?\\d\\d\\s)(\\d\\d:\\d\\d)(\\:\\d\\d)?(\\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\\d{4}))$/;\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var string, match, dayFormat,\n dateFormat, timeFormat, tzFormat;\n var timezones = {\n ' GMT': ' +0000',\n ' EDT': ' -0400',\n ' EST': ' -0500',\n ' CDT': ' -0500',\n ' CST': ' -0600',\n ' MDT': ' -0600',\n ' MST': ' -0700',\n ' PDT': ' -0700',\n ' PST': ' -0800'\n };\n var military = 'YXWVUTSRQPONZABCDEFGHIKLM';\n var timezone, timezoneIndex;\n\n string = config._i\n .replace(/\\([^\\)]*\\)|[\\n\\t]/g, ' ') // Remove comments and folding whitespace\n .replace(/(\\s\\s+)/g, ' ') // Replace multiple-spaces with a single space\n .replace(/^\\s|\\s$/g, ''); // Remove leading and trailing spaces\n match = basicRfcRegex.exec(string);\n\n if (match) {\n dayFormat = match[1] ? 'ddd' + ((match[1].length === 5) ? ', ' : ' ') : '';\n dateFormat = 'D MMM ' + ((match[2].length > 10) ? 'YYYY ' : 'YY ');\n timeFormat = 'HH:mm' + (match[4] ? ':ss' : '');\n\n // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.\n if (match[1]) { // day of week given\n var momentDate = new Date(match[2]);\n var momentDay = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'][momentDate.getDay()];\n\n if (match[1].substr(0,3) !== momentDay) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return;\n }\n }\n\n switch (match[5].length) {\n case 2: // military\n if (timezoneIndex === 0) {\n timezone = ' +0000';\n } else {\n timezoneIndex = military.indexOf(match[5][1].toUpperCase()) - 12;\n timezone = ((timezoneIndex < 0) ? ' -' : ' +') +\n (('' + timezoneIndex).replace(/^-?/, '0')).match(/..$/)[0] + '00';\n }\n break;\n case 4: // Zone\n timezone = timezones[match[5]];\n break;\n default: // UT or +/-9999\n timezone = timezones[' GMT'];\n }\n match[5] = timezone;\n config._i = match.splice(1).join('');\n tzFormat = ' ZZ';\n config._f = dayFormat + dateFormat + timeFormat + tzFormat;\n configFromStringAndFormat(config);\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from iso format or fallback\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged and will be removed in an upcoming major release. Please refer to ' +\n 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n var curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from begining of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to begining of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n }\n else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n configFromArray(config);\n checkOverflow(config);\n}\n\n\nfunction meridiemFixWrap (locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n\n configFromArray(config);\n}\n\nfunction createFromConfig (config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig (config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({nullInput: true});\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC (input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if ((isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n);\n\nvar prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n);\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +(new Date());\n};\n\nvar ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\nfunction isDurationValid(m) {\n for (var key in m) {\n if (!(ordering.indexOf(key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n var unitHasDecimal = false;\n for (var i = 0; i < ordering.length; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration (duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds = +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days +\n weeks * 7;\n // It is impossible translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months +\n quarters * 3 +\n years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration (obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound (number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// FORMATTING\n\nfunction offset (token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ?\n 0 :\n parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset (m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset (input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone (input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC (keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal (keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset () {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n }\n else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset (input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime () {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted () {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() &&\n compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal () {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset () {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc () {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(\\-)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n// and further modified to allow for strings containing both week and day\nvar isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;\n\nfunction createDuration (input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms : input._milliseconds,\n d : input._days,\n M : input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : 0,\n d : toInt(match[DATE]) * sign,\n h : toInt(match[HOUR]) * sign,\n m : toInt(match[MINUTE]) * sign,\n s : toInt(match[SECOND]) * sign,\n ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : parseIso(match[2], sign),\n M : parseIso(match[3], sign),\n w : parseIso(match[4], sign),\n d : parseIso(match[5], sign),\n h : parseIso(match[6], sign),\n m : parseIso(match[7], sign),\n s : parseIso(match[8], sign)\n };\n } else if (duration == null) {// checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso (inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {milliseconds: 0, months: 0};\n\n res.months = other.month() - base.month() +\n (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return {milliseconds: 0, months: 0};\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract (mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add');\nvar subtract = createAdder(-1, 'subtract');\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' :\n diff < -1 ? 'lastWeek' :\n diff < 0 ? 'lastDay' :\n diff < 1 ? 'sameDay' :\n diff < 2 ? 'nextDay' :\n diff < 7 ? 'nextWeek' : 'sameElse';\n}\n\nfunction calendar$1 (time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n}\n\nfunction clone () {\n return new Moment(this);\n}\n\nfunction isAfter (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween (from, to, units, inclusivity) {\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&\n (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));\n}\n\nfunction isSame (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units || 'millisecond');\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n}\n\nfunction isSameOrAfter (input, units) {\n return this.isSame(input, units) || this.isAfter(input,units);\n}\n\nfunction isSameOrBefore (input, units) {\n return this.isSame(input, units) || this.isBefore(input,units);\n}\n\nfunction diff (input, units, asFloat) {\n var that,\n zoneDelta,\n delta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n if (units === 'year' || units === 'month' || units === 'quarter') {\n output = monthDiff(this, that);\n if (units === 'quarter') {\n output = output / 3;\n } else if (units === 'year') {\n output = output / 12;\n }\n } else {\n delta = this - that;\n output = units === 'second' ? delta / 1e3 : // 1000\n units === 'minute' ? delta / 6e4 : // 1000 * 60\n units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60\n units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\n units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\n delta;\n }\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff (a, b) {\n // difference in months\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2, adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString () {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString() {\n if (!this.isValid()) {\n return null;\n }\n var m = this.clone().utc();\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n return this.toDate().toISOString();\n }\n return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format (inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow (withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow (withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData () {\n return this._locale;\n}\n\nfunction startOf (units) {\n units = normalizeUnits(units);\n // the following switch intentionally omits break keywords\n // to utilize falling through the cases.\n switch (units) {\n case 'year':\n this.month(0);\n /* falls through */\n case 'quarter':\n case 'month':\n this.date(1);\n /* falls through */\n case 'week':\n case 'isoWeek':\n case 'day':\n case 'date':\n this.hours(0);\n /* falls through */\n case 'hour':\n this.minutes(0);\n /* falls through */\n case 'minute':\n this.seconds(0);\n /* falls through */\n case 'second':\n this.milliseconds(0);\n }\n\n // weeks are a special case\n if (units === 'week') {\n this.weekday(0);\n }\n if (units === 'isoWeek') {\n this.isoWeekday(1);\n }\n\n // quarters are also special\n if (units === 'quarter') {\n this.month(Math.floor(this.month() / 3) * 3);\n }\n\n return this;\n}\n\nfunction endOf (units) {\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond') {\n return this;\n }\n\n // 'date' is an alias for 'day', so it should be considered as such.\n if (units === 'date') {\n units = 'day';\n }\n\n return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\n}\n\nfunction valueOf () {\n return this._d.valueOf() - ((this._offset || 0) * 60000);\n}\n\nfunction unix () {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate () {\n return new Date(this.valueOf());\n}\n\nfunction toArray () {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n}\n\nfunction toObject () {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n}\n\nfunction toJSON () {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2 () {\n return isValid(this);\n}\n\nfunction parsingFlags () {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt () {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken (token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n});\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy);\n}\n\nfunction getSetISOWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input, this.isoWeek(), this.isoWeekday(), 1, 4);\n}\n\nfunction getISOWeeksInYear () {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getWeeksInYear () {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter (input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIOROITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ?\n (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :\n locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0], 10);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear (input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n// MOMENTS\n\nvar getSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr () {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName () {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\n\n// Year\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\n\n// Week Year\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\n\n// Quarter\nproto.quarter = proto.quarters = getSetQuarter;\n\n// Month\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\n\n// Week\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\n\n// Day\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\n\n// Hour\nproto.hour = proto.hours = getSetHour;\n\n// Minute\nproto.minute = proto.minutes = getSetMinute;\n\n// Second\nproto.second = proto.seconds = getSetSecond;\n\n// Millisecond\nproto.millisecond = proto.milliseconds = getSetMillisecond;\n\n// Offset\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\n\n// Timezone\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\n\n// Deprecations\nproto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\nproto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\nproto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\nproto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\nproto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\nfunction createUnix (input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone () {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat (string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\n\n// Month\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\n\n// Week\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n// Day of Week\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n// Hours\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1 (format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl (format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl (localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths (format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort (format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n});\n\n// Side effect imports\nhooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\nhooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n\nvar mathAbs = Math.abs;\n\nfunction abs () {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1 (duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1 (input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1 (input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil (number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble () {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0))) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths (days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n}\n\nfunction monthsToDays (months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n}\n\nfunction as (units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days;\n var months;\n var milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n return units === 'month' ? months : months / 12;\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week' : return days / 7 + milliseconds / 6048e5;\n case 'day' : return days + milliseconds / 864e5;\n case 'hour' : return days * 24 + milliseconds / 36e5;\n case 'minute' : return days * 1440 + milliseconds / 6e4;\n case 'second' : return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n default: throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1 () {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs (alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms');\nvar asSeconds = makeAs('s');\nvar asMinutes = makeAs('m');\nvar asHours = makeAs('h');\nvar asDays = makeAs('d');\nvar asWeeks = makeAs('w');\nvar asMonths = makeAs('M');\nvar asYears = makeAs('y');\n\nfunction get$2 (units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds');\nvar seconds = makeGetter('seconds');\nvar minutes = makeGetter('minutes');\nvar hours = makeGetter('hours');\nvar days = makeGetter('days');\nvar months = makeGetter('months');\nvar years = makeGetter('years');\n\nfunction weeks () {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round;\nvar thresholds = {\n ss: 44, // a few seconds to seconds\n s : 45, // seconds to minute\n m : 45, // minutes to hour\n h : 22, // hours to day\n d : 26, // days to month\n M : 11 // months to year\n};\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1 (posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n\n var a = seconds <= thresholds.ss && ['s', seconds] ||\n seconds < thresholds.s && ['ss', seconds] ||\n minutes <= 1 && ['m'] ||\n minutes < thresholds.m && ['mm', minutes] ||\n hours <= 1 && ['h'] ||\n hours < thresholds.h && ['hh', hours] ||\n days <= 1 && ['d'] ||\n days < thresholds.d && ['dd', days] ||\n months <= 1 && ['M'] ||\n months < thresholds.M && ['MM', months] ||\n years <= 1 && ['y'] || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize (withSuffix) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years;\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds;\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n return (total < 0 ? '-' : '') +\n 'P' +\n (Y ? Y + 'Y' : '') +\n (M ? M + 'M' : '') +\n (D ? D + 'D' : '') +\n ((h || m || s) ? 'T' : '') +\n (h ? h + 'H' : '') +\n (m ? m + 'M' : '') +\n (s ? s + 'S' : '');\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\n// Deprecations\nproto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\nproto$2.lang = lang;\n\n// Side effect imports\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n// Side effect imports\n\n\nhooks.version = '2.18.1';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\nreturn hooks;\n\n})));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/moment.js\n// module id = 33\n// module chunks = 0","var map = {\n\t\"./en-gb\": 35,\n\t\"./en-gb.js\": 35\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\treturn map[req] || (function() { throw new Error(\"Cannot find module '\" + req + \"'.\") }());\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 34;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale en-gb\n// module id = 34\n// module chunks = 0","//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n\nvar enGb = moment.defineLocale('en-gb', {\n months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat : {\n LT : 'HH:mm',\n LTS : 'HH:mm:ss',\n L : 'DD/MM/YYYY',\n LL : 'D MMMM YYYY',\n LLL : 'D MMMM YYYY HH:mm',\n LLLL : 'dddd, D MMMM YYYY HH:mm'\n },\n calendar : {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n },\n relativeTime : {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (~~(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n },\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n});\n\nreturn enGb;\n\n})));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment/locale/en-gb.js\n// module id = 35\n// module chunks = 0","//! moment-timezone.js\r\n//! version : 0.5.13\r\n//! Copyright (c) JS Foundation and other contributors\r\n//! license : MIT\r\n//! github.com/moment/moment-timezone\r\n\r\n(function (root, factory) {\r\n\t\"use strict\";\r\n\r\n\t/*global define*/\r\n\tif (typeof define === 'function' && define.amd) {\r\n\t\tdefine(['moment'], factory); // AMD\r\n\t} else if (typeof module === 'object' && module.exports) {\r\n\t\tmodule.exports = factory(require('moment')); // Node\r\n\t} else {\r\n\t\tfactory(root.moment); // Browser\r\n\t}\r\n}(this, function (moment) {\r\n\t\"use strict\";\r\n\r\n\t// Do not load moment-timezone a second time.\r\n\t// if (moment.tz !== undefined) {\r\n\t// \tlogError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);\r\n\t// \treturn moment;\r\n\t// }\r\n\r\n\tvar VERSION = \"0.5.13\",\r\n\t\tzones = {},\r\n\t\tlinks = {},\r\n\t\tnames = {},\r\n\t\tguesses = {},\r\n\t\tcachedGuess,\r\n\r\n\t\tmomentVersion = moment.version.split('.'),\r\n\t\tmajor = +momentVersion[0],\r\n\t\tminor = +momentVersion[1];\r\n\r\n\t// Moment.js version check\r\n\tif (major < 2 || (major === 2 && minor < 6)) {\r\n\t\tlogError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');\r\n\t}\r\n\r\n\t/************************************\r\n\t\tUnpacking\r\n\t************************************/\r\n\r\n\tfunction charCodeToInt(charCode) {\r\n\t\tif (charCode > 96) {\r\n\t\t\treturn charCode - 87;\r\n\t\t} else if (charCode > 64) {\r\n\t\t\treturn charCode - 29;\r\n\t\t}\r\n\t\treturn charCode - 48;\r\n\t}\r\n\r\n\tfunction unpackBase60(string) {\r\n\t\tvar i = 0,\r\n\t\t\tparts = string.split('.'),\r\n\t\t\twhole = parts[0],\r\n\t\t\tfractional = parts[1] || '',\r\n\t\t\tmultiplier = 1,\r\n\t\t\tnum,\r\n\t\t\tout = 0,\r\n\t\t\tsign = 1;\r\n\r\n\t\t// handle negative numbers\r\n\t\tif (string.charCodeAt(0) === 45) {\r\n\t\t\ti = 1;\r\n\t\t\tsign = -1;\r\n\t\t}\r\n\r\n\t\t// handle digits before the decimal\r\n\t\tfor (i; i < whole.length; i++) {\r\n\t\t\tnum = charCodeToInt(whole.charCodeAt(i));\r\n\t\t\tout = 60 * out + num;\r\n\t\t}\r\n\r\n\t\t// handle digits after the decimal\r\n\t\tfor (i = 0; i < fractional.length; i++) {\r\n\t\t\tmultiplier = multiplier / 60;\r\n\t\t\tnum = charCodeToInt(fractional.charCodeAt(i));\r\n\t\t\tout += num * multiplier;\r\n\t\t}\r\n\r\n\t\treturn out * sign;\r\n\t}\r\n\r\n\tfunction arrayToInt (array) {\r\n\t\tfor (var i = 0; i < array.length; i++) {\r\n\t\t\tarray[i] = unpackBase60(array[i]);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction intToUntil (array, length) {\r\n\t\tfor (var i = 0; i < length; i++) {\r\n\t\t\tarray[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds\r\n\t\t}\r\n\r\n\t\tarray[length - 1] = Infinity;\r\n\t}\r\n\r\n\tfunction mapIndices (source, indices) {\r\n\t\tvar out = [], i;\r\n\r\n\t\tfor (i = 0; i < indices.length; i++) {\r\n\t\t\tout[i] = source[indices[i]];\r\n\t\t}\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\tfunction unpack (string) {\r\n\t\tvar data = string.split('|'),\r\n\t\t\toffsets = data[2].split(' '),\r\n\t\t\tindices = data[3].split(''),\r\n\t\t\tuntils = data[4].split(' ');\r\n\r\n\t\tarrayToInt(offsets);\r\n\t\tarrayToInt(indices);\r\n\t\tarrayToInt(untils);\r\n\r\n\t\tintToUntil(untils, indices.length);\r\n\r\n\t\treturn {\r\n\t\t\tname : data[0],\r\n\t\t\tabbrs : mapIndices(data[1].split(' '), indices),\r\n\t\t\toffsets : mapIndices(offsets, indices),\r\n\t\t\tuntils : untils,\r\n\t\t\tpopulation : data[5] | 0\r\n\t\t};\r\n\t}\r\n\r\n\t/************************************\r\n\t\tZone object\r\n\t************************************/\r\n\r\n\tfunction Zone (packedString) {\r\n\t\tif (packedString) {\r\n\t\t\tthis._set(unpack(packedString));\r\n\t\t}\r\n\t}\r\n\r\n\tZone.prototype = {\r\n\t\t_set : function (unpacked) {\r\n\t\t\tthis.name = unpacked.name;\r\n\t\t\tthis.abbrs = unpacked.abbrs;\r\n\t\t\tthis.untils = unpacked.untils;\r\n\t\t\tthis.offsets = unpacked.offsets;\r\n\t\t\tthis.population = unpacked.population;\r\n\t\t},\r\n\r\n\t\t_index : function (timestamp) {\r\n\t\t\tvar target = +timestamp,\r\n\t\t\t\tuntils = this.untils,\r\n\t\t\t\ti;\r\n\r\n\t\t\tfor (i = 0; i < untils.length; i++) {\r\n\t\t\t\tif (target < untils[i]) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tparse : function (timestamp) {\r\n\t\t\tvar target = +timestamp,\r\n\t\t\t\toffsets = this.offsets,\r\n\t\t\t\tuntils = this.untils,\r\n\t\t\t\tmax = untils.length - 1,\r\n\t\t\t\toffset, offsetNext, offsetPrev, i;\r\n\r\n\t\t\tfor (i = 0; i < max; i++) {\r\n\t\t\t\toffset = offsets[i];\r\n\t\t\t\toffsetNext = offsets[i + 1];\r\n\t\t\t\toffsetPrev = offsets[i ? i - 1 : i];\r\n\r\n\t\t\t\tif (offset < offsetNext && tz.moveAmbiguousForward) {\r\n\t\t\t\t\toffset = offsetNext;\r\n\t\t\t\t} else if (offset > offsetPrev && tz.moveInvalidForward) {\r\n\t\t\t\t\toffset = offsetPrev;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (target < untils[i] - (offset * 60000)) {\r\n\t\t\t\t\treturn offsets[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn offsets[max];\r\n\t\t},\r\n\r\n\t\tabbr : function (mom) {\r\n\t\t\treturn this.abbrs[this._index(mom)];\r\n\t\t},\r\n\r\n\t\toffset : function (mom) {\r\n\t\t\treturn this.offsets[this._index(mom)];\r\n\t\t}\r\n\t};\r\n\r\n\t/************************************\r\n\t\tCurrent Timezone\r\n\t************************************/\r\n\r\n\tfunction OffsetAt(at) {\r\n\t\tvar timeString = at.toTimeString();\r\n\t\tvar abbr = timeString.match(/\\([a-z ]+\\)/i);\r\n\t\tif (abbr && abbr[0]) {\r\n\t\t\t// 17:56:31 GMT-0600 (CST)\r\n\t\t\t// 17:56:31 GMT-0600 (Central Standard Time)\r\n\t\t\tabbr = abbr[0].match(/[A-Z]/g);\r\n\t\t\tabbr = abbr ? abbr.join('') : undefined;\r\n\t\t} else {\r\n\t\t\t// 17:56:31 CST\r\n\t\t\t// 17:56:31 GMT+0800 (台北標準時間)\r\n\t\t\tabbr = timeString.match(/[A-Z]{3,5}/g);\r\n\t\t\tabbr = abbr ? abbr[0] : undefined;\r\n\t\t}\r\n\r\n\t\tif (abbr === 'GMT') {\r\n\t\t\tabbr = undefined;\r\n\t\t}\r\n\r\n\t\tthis.at = +at;\r\n\t\tthis.abbr = abbr;\r\n\t\tthis.offset = at.getTimezoneOffset();\r\n\t}\r\n\r\n\tfunction ZoneScore(zone) {\r\n\t\tthis.zone = zone;\r\n\t\tthis.offsetScore = 0;\r\n\t\tthis.abbrScore = 0;\r\n\t}\r\n\r\n\tZoneScore.prototype.scoreOffsetAt = function (offsetAt) {\r\n\t\tthis.offsetScore += Math.abs(this.zone.offset(offsetAt.at) - offsetAt.offset);\r\n\t\tif (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) {\r\n\t\t\tthis.abbrScore++;\r\n\t\t}\r\n\t};\r\n\r\n\tfunction findChange(low, high) {\r\n\t\tvar mid, diff;\r\n\r\n\t\twhile ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {\r\n\t\t\tmid = new OffsetAt(new Date(low.at + diff));\r\n\t\t\tif (mid.offset === low.offset) {\r\n\t\t\t\tlow = mid;\r\n\t\t\t} else {\r\n\t\t\t\thigh = mid;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn low;\r\n\t}\r\n\r\n\tfunction userOffsets() {\r\n\t\tvar startYear = new Date().getFullYear() - 2,\r\n\t\t\tlast = new OffsetAt(new Date(startYear, 0, 1)),\r\n\t\t\toffsets = [last],\r\n\t\t\tchange, next, i;\r\n\r\n\t\tfor (i = 1; i < 48; i++) {\r\n\t\t\tnext = new OffsetAt(new Date(startYear, i, 1));\r\n\t\t\tif (next.offset !== last.offset) {\r\n\t\t\t\tchange = findChange(last, next);\r\n\t\t\t\toffsets.push(change);\r\n\t\t\t\toffsets.push(new OffsetAt(new Date(change.at + 6e4)));\r\n\t\t\t}\r\n\t\t\tlast = next;\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < 4; i++) {\r\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));\r\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));\r\n\t\t}\r\n\r\n\t\treturn offsets;\r\n\t}\r\n\r\n\tfunction sortZoneScores (a, b) {\r\n\t\tif (a.offsetScore !== b.offsetScore) {\r\n\t\t\treturn a.offsetScore - b.offsetScore;\r\n\t\t}\r\n\t\tif (a.abbrScore !== b.abbrScore) {\r\n\t\t\treturn a.abbrScore - b.abbrScore;\r\n\t\t}\r\n\t\treturn b.zone.population - a.zone.population;\r\n\t}\r\n\r\n\tfunction addToGuesses (name, offsets) {\r\n\t\tvar i, offset;\r\n\t\tarrayToInt(offsets);\r\n\t\tfor (i = 0; i < offsets.length; i++) {\r\n\t\t\toffset = offsets[i];\r\n\t\t\tguesses[offset] = guesses[offset] || {};\r\n\t\t\tguesses[offset][name] = true;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction guessesForUserOffsets (offsets) {\r\n\t\tvar offsetsLength = offsets.length,\r\n\t\t\tfilteredGuesses = {},\r\n\t\t\tout = [],\r\n\t\t\ti, j, guessesOffset;\r\n\r\n\t\tfor (i = 0; i < offsetsLength; i++) {\r\n\t\t\tguessesOffset = guesses[offsets[i].offset] || {};\r\n\t\t\tfor (j in guessesOffset) {\r\n\t\t\t\tif (guessesOffset.hasOwnProperty(j)) {\r\n\t\t\t\t\tfilteredGuesses[j] = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (i in filteredGuesses) {\r\n\t\t\tif (filteredGuesses.hasOwnProperty(i)) {\r\n\t\t\t\tout.push(names[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\tfunction rebuildGuess () {\r\n\r\n\t\t// use Intl API when available and returning valid time zone\r\n\t\ttry {\r\n\t\t\tvar intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;\r\n\t\t\tif (intlName){\r\n\t\t\t\tvar name = names[normalizeName(intlName)];\r\n\t\t\t\tif (name) {\r\n\t\t\t\t\treturn name;\r\n\t\t\t\t}\r\n\t\t\t\tlogError(\"Moment Timezone found \" + intlName + \" from the Intl api, but did not have that data loaded.\");\r\n\t\t\t}\r\n\t\t} catch (e) {\r\n\t\t\t// Intl unavailable, fall back to manual guessing.\r\n\t\t}\r\n\r\n\t\tvar offsets = userOffsets(),\r\n\t\t\toffsetsLength = offsets.length,\r\n\t\t\tguesses = guessesForUserOffsets(offsets),\r\n\t\t\tzoneScores = [],\r\n\t\t\tzoneScore, i, j;\r\n\r\n\t\tfor (i = 0; i < guesses.length; i++) {\r\n\t\t\tzoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);\r\n\t\t\tfor (j = 0; j < offsetsLength; j++) {\r\n\t\t\t\tzoneScore.scoreOffsetAt(offsets[j]);\r\n\t\t\t}\r\n\t\t\tzoneScores.push(zoneScore);\r\n\t\t}\r\n\r\n\t\tzoneScores.sort(sortZoneScores);\r\n\r\n\t\treturn zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;\r\n\t}\r\n\r\n\tfunction guess (ignoreCache) {\r\n\t\tif (!cachedGuess || ignoreCache) {\r\n\t\t\tcachedGuess = rebuildGuess();\r\n\t\t}\r\n\t\treturn cachedGuess;\r\n\t}\r\n\r\n\t/************************************\r\n\t\tGlobal Methods\r\n\t************************************/\r\n\r\n\tfunction normalizeName (name) {\r\n\t\treturn (name || '').toLowerCase().replace(/\\//g, '_');\r\n\t}\r\n\r\n\tfunction addZone (packed) {\r\n\t\tvar i, name, split, normalized;\r\n\r\n\t\tif (typeof packed === \"string\") {\r\n\t\t\tpacked = [packed];\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < packed.length; i++) {\r\n\t\t\tsplit = packed[i].split('|');\r\n\t\t\tname = split[0];\r\n\t\t\tnormalized = normalizeName(name);\r\n\t\t\tzones[normalized] = packed[i];\r\n\t\t\tnames[normalized] = name;\r\n\t\t\tif (split[5]) {\r\n\t\t\t\taddToGuesses(normalized, split[2].split(' '));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getZone (name, caller) {\r\n\t\tname = normalizeName(name);\r\n\r\n\t\tvar zone = zones[name];\r\n\t\tvar link;\r\n\r\n\t\tif (zone instanceof Zone) {\r\n\t\t\treturn zone;\r\n\t\t}\r\n\r\n\t\tif (typeof zone === 'string') {\r\n\t\t\tzone = new Zone(zone);\r\n\t\t\tzones[name] = zone;\r\n\t\t\treturn zone;\r\n\t\t}\r\n\r\n\t\t// Pass getZone to prevent recursion more than 1 level deep\r\n\t\tif (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {\r\n\t\t\tzone = zones[name] = new Zone();\r\n\t\t\tzone._set(link);\r\n\t\t\tzone.name = names[name];\r\n\t\t\treturn zone;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getNames () {\r\n\t\tvar i, out = [];\r\n\r\n\t\tfor (i in names) {\r\n\t\t\tif (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {\r\n\t\t\t\tout.push(names[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn out.sort();\r\n\t}\r\n\r\n\tfunction addLink (aliases) {\r\n\t\tvar i, alias, normal0, normal1;\r\n\r\n\t\tif (typeof aliases === \"string\") {\r\n\t\t\taliases = [aliases];\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < aliases.length; i++) {\r\n\t\t\talias = aliases[i].split('|');\r\n\r\n\t\t\tnormal0 = normalizeName(alias[0]);\r\n\t\t\tnormal1 = normalizeName(alias[1]);\r\n\r\n\t\t\tlinks[normal0] = normal1;\r\n\t\t\tnames[normal0] = alias[0];\r\n\r\n\t\t\tlinks[normal1] = normal0;\r\n\t\t\tnames[normal1] = alias[1];\r\n\t\t}\r\n\t}\r\n\r\n\tfunction loadData (data) {\r\n\t\taddZone(data.zones);\r\n\t\taddLink(data.links);\r\n\t\ttz.dataVersion = data.version;\r\n\t}\r\n\r\n\tfunction zoneExists (name) {\r\n\t\tif (!zoneExists.didShowError) {\r\n\t\t\tzoneExists.didShowError = true;\r\n\t\t\t\tlogError(\"moment.tz.zoneExists('\" + name + \"') has been deprecated in favor of !moment.tz.zone('\" + name + \"')\");\r\n\t\t}\r\n\t\treturn !!getZone(name);\r\n\t}\r\n\r\n\tfunction needsOffset (m) {\r\n\t\treturn !!(m._a && (m._tzm === undefined));\r\n\t}\r\n\r\n\tfunction logError (message) {\r\n\t\tif (typeof console !== 'undefined' && typeof console.error === 'function') {\r\n\t\t\tconsole.error(message);\r\n\t\t}\r\n\t}\r\n\r\n\t/************************************\r\n\t\tmoment.tz namespace\r\n\t************************************/\r\n\r\n\tfunction tz (input) {\r\n\t\tvar args = Array.prototype.slice.call(arguments, 0, -1),\r\n\t\t\tname = arguments[arguments.length - 1],\r\n\t\t\tzone = getZone(name),\r\n\t\t\tout = moment.utc.apply(null, args);\r\n\r\n\t\tif (zone && !moment.isMoment(input) && needsOffset(out)) {\r\n\t\t\tout.add(zone.parse(out), 'minutes');\r\n\t\t}\r\n\r\n\t\tout.tz(name);\r\n\r\n\t\treturn out;\r\n\t}\r\n\r\n\ttz.version = VERSION;\r\n\ttz.dataVersion = '';\r\n\ttz._zones = zones;\r\n\ttz._links = links;\r\n\ttz._names = names;\r\n\ttz.add = addZone;\r\n\ttz.link = addLink;\r\n\ttz.load = loadData;\r\n\ttz.zone = getZone;\r\n\ttz.zoneExists = zoneExists; // deprecated in 0.1.0\r\n\ttz.guess = guess;\r\n\ttz.names = getNames;\r\n\ttz.Zone = Zone;\r\n\ttz.unpack = unpack;\r\n\ttz.unpackBase60 = unpackBase60;\r\n\ttz.needsOffset = needsOffset;\r\n\ttz.moveInvalidForward = true;\r\n\ttz.moveAmbiguousForward = false;\r\n\r\n\t/************************************\r\n\t\tInterface with Moment.js\r\n\t************************************/\r\n\r\n\tvar fn = moment.fn;\r\n\r\n\tmoment.tz = tz;\r\n\r\n\tmoment.defaultZone = null;\r\n\r\n\tmoment.updateOffset = function (mom, keepTime) {\r\n\t\tvar zone = moment.defaultZone,\r\n\t\t\toffset;\r\n\r\n\t\tif (mom._z === undefined) {\r\n\t\t\tif (zone && needsOffset(mom) && !mom._isUTC) {\r\n\t\t\t\tmom._d = moment.utc(mom._a)._d;\r\n\t\t\t\tmom.utc().add(zone.parse(mom), 'minutes');\r\n\t\t\t}\r\n\t\t\tmom._z = zone;\r\n\t\t}\r\n\t\tif (mom._z) {\r\n\t\t\toffset = mom._z.offset(mom);\r\n\t\t\tif (Math.abs(offset) < 16) {\r\n\t\t\t\toffset = offset / 60;\r\n\t\t\t}\r\n\t\t\tif (mom.utcOffset !== undefined) {\r\n\t\t\t\tmom.utcOffset(-offset, keepTime);\r\n\t\t\t} else {\r\n\t\t\t\tmom.zone(offset, keepTime);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tfn.tz = function (name) {\r\n\t\tif (name) {\r\n\t\t\tthis._z = getZone(name);\r\n\t\t\tif (this._z) {\r\n\t\t\t\tmoment.updateOffset(this);\r\n\t\t\t} else {\r\n\t\t\t\tlogError(\"Moment Timezone has no data for \" + name + \". See http://momentjs.com/timezone/docs/#/data-loading/.\");\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif (this._z) { return this._z.name; }\r\n\t};\r\n\r\n\tfunction abbrWrap (old) {\r\n\t\treturn function () {\r\n\t\t\tif (this._z) { return this._z.abbr(this); }\r\n\t\t\treturn old.call(this);\r\n\t\t};\r\n\t}\r\n\r\n\tfunction resetZoneWrap (old) {\r\n\t\treturn function () {\r\n\t\t\tthis._z = null;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\t}\r\n\r\n\tfn.zoneName = abbrWrap(fn.zoneName);\r\n\tfn.zoneAbbr = abbrWrap(fn.zoneAbbr);\r\n\tfn.utc = resetZoneWrap(fn.utc);\r\n\r\n\tmoment.tz.setDefault = function(name) {\r\n\t\tif (major < 2 || (major === 2 && minor < 9)) {\r\n\t\t\tlogError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');\r\n\t\t}\r\n\t\tmoment.defaultZone = name ? getZone(name) : null;\r\n\t\treturn moment;\r\n\t};\r\n\r\n\t// Cloning a moment should include the _z property.\r\n\tvar momentProperties = moment.momentProperties;\r\n\tif (Object.prototype.toString.call(momentProperties) === '[object Array]') {\r\n\t\t// moment 2.8.1+\r\n\t\tmomentProperties.push('_z');\r\n\t\tmomentProperties.push('_a');\r\n\t} else if (momentProperties) {\r\n\t\t// moment 2.7.0\r\n\t\tmomentProperties._z = null;\r\n\t}\r\n\r\n\tloadData({\r\n\t\t\"version\": \"2017b\",\r\n\t\t\"zones\": [\r\n\t\t\t\"Africa/Abidjan|GMT|0|0||48e5\",\r\n\t\t\t\"Africa/Khartoum|EAT|-30|0||51e5\",\r\n\t\t\t\"Africa/Algiers|CET|-10|0||26e5\",\r\n\t\t\t\"Africa/Lagos|WAT|-10|0||17e6\",\r\n\t\t\t\"Africa/Maputo|CAT|-20|0||26e5\",\r\n\t\t\t\"Africa/Cairo|EET EEST|-20 -30|01010|1M2m0 gL0 e10 mn0|15e6\",\r\n\t\t\t\"Africa/Casablanca|WET WEST|0 -10|0101010101010101010101010101010101010101010|1H3C0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 Rc0 11A0 e00 e00 U00 11A0 8o0 e00 11A0 11A0 5A0 e00 17c0 1fA0 1a00|32e5\",\r\n\t\t\t\"Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|11e6\",\r\n\t\t\t\"Africa/Johannesburg|SAST|-20|0||84e5\",\r\n\t\t\t\"Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 1o00|11e5\",\r\n\t\t\t\"Africa/Windhoek|WAST WAT|-20 -10|01010101010101010101010|1GQo0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0|32e4\",\r\n\t\t\t\"America/Adak|HST HDT|a0 90|01010101010101010101010|1GIc0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|326\",\r\n\t\t\t\"America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1GIb0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|30e4\",\r\n\t\t\t\"America/Santo_Domingo|AST|40|0||29e5\",\r\n\t\t\t\"America/Araguaina|-03 -02|30 20|010|1IdD0 Lz0|14e4\",\r\n\t\t\t\"America/Fortaleza|-03|30|0||34e5\",\r\n\t\t\t\"America/Asuncion|-03 -04|30 40|01010101010101010101010|1GTf0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0|28e5\",\r\n\t\t\t\"America/Panama|EST|50|0||15e5\",\r\n\t\t\t\"America/Bahia|-02 -03|20 30|01|1GCq0|27e5\",\r\n\t\t\t\"America/Mexico_City|CST CDT|60 50|01010101010101010101010|1GQw0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|20e6\",\r\n\t\t\t\"America/Managua|CST|60|0||22e5\",\r\n\t\t\t\"America/La_Paz|-04|40|0||19e5\",\r\n\t\t\t\"America/Lima|-05|50|0||11e6\",\r\n\t\t\t\"America/Denver|MST MDT|70 60|01010101010101010101010|1GI90 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|26e5\",\r\n\t\t\t\"America/Campo_Grande|-03 -04|30 40|01010101010101010101010|1GCr0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0|77e4\",\r\n\t\t\t\"America/Cancun|CST CDT EST|60 50 50|01010102|1GQw0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4\",\r\n\t\t\t\"America/Caracas|-0430 -04|4u 40|01|1QMT0|29e5\",\r\n\t\t\t\"America/Chicago|CST CDT|60 50|01010101010101010101010|1GI80 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|92e5\",\r\n\t\t\t\"America/Chihuahua|MST MDT|70 60|01010101010101010101010|1GQx0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4\",\r\n\t\t\t\"America/Phoenix|MST|70|0||42e5\",\r\n\t\t\t\"America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1GIa0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|15e6\",\r\n\t\t\t\"America/New_York|EST EDT|50 40|01010101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|21e6\",\r\n\t\t\t\"America/Rio_Branco|-04 -05|40 50|01|1KLE0|31e4\",\r\n\t\t\t\"America/Fort_Nelson|PST PDT MST|80 70 70|01010102|1GIa0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2\",\r\n\t\t\t\"America/Halifax|AST ADT|40 30|01010101010101010101010|1GI60 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|39e4\",\r\n\t\t\t\"America/Godthab|-03 -02|30 20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|17e3\",\r\n\t\t\t\"America/Grand_Turk|EST EDT AST|50 40 40|010101012|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2\",\r\n\t\t\t\"America/Havana|CST CDT|50 40|01010101010101010101010|1GQt0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0|21e5\",\r\n\t\t\t\"America/Metlakatla|PST AKST AKDT|80 90 80|0121212121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|14e2\",\r\n\t\t\t\"America/Miquelon|-03 -02|30 20|01010101010101010101010|1GI50 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|61e2\",\r\n\t\t\t\"America/Montevideo|-02 -03|20 30|01010101|1GI40 1o10 11z0 1o10 11z0 1o10 11z0|17e5\",\r\n\t\t\t\"America/Noronha|-02|20|0||30e2\",\r\n\t\t\t\"America/Port-au-Prince|EST EDT|50 40|010101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|23e5\",\r\n\t\t\t\"Antarctica/Palmer|-03 -04|30 40|010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40\",\r\n\t\t\t\"America/Santiago|-03 -04|30 40|010101010101010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Dd0 1Nb0 Ap0|62e5\",\r\n\t\t\t\"America/Sao_Paulo|-02 -03|20 30|01010101010101010101010|1GCq0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0|20e6\",\r\n\t\t\t\"Atlantic/Azores|-01 +00|10 0|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e4\",\r\n\t\t\t\"America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1GI5u 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|11e4\",\r\n\t\t\t\"Antarctica/Casey|+11 +08|-b0 -80|010|1GAF0 blz0|10\",\r\n\t\t\t\"Antarctica/Davis|+05 +07|-50 -70|01|1GAI0|70\",\r\n\t\t\t\"Pacific/Port_Moresby|+10|-a0|0||25e4\",\r\n\t\t\t\"Pacific/Guadalcanal|+11|-b0|0||11e4\",\r\n\t\t\t\"Asia/Tashkent|+05|-50|0||23e5\",\r\n\t\t\t\"Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|14e5\",\r\n\t\t\t\"Asia/Baghdad|+03|-30|0||66e5\",\r\n\t\t\t\"Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|40\",\r\n\t\t\t\"Asia/Dhaka|+06|-60|0||16e6\",\r\n\t\t\t\"Asia/Amman|EET EEST|-20 -30|010101010101010101010|1GPy0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00|25e5\",\r\n\t\t\t\"Asia/Kamchatka|+12|-c0|0||18e4\",\r\n\t\t\t\"Asia/Baku|+04 +05|-40 -50|010101010|1GNA0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5\",\r\n\t\t\t\"Asia/Bangkok|+07|-70|0||15e6\",\r\n\t\t\t\"Asia/Barnaul|+07 +06|-70 -60|010|1N7v0 3rd0\",\r\n\t\t\t\"Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1GNy0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|22e5\",\r\n\t\t\t\"Asia/Manila|+08|-80|0||24e6\",\r\n\t\t\t\"Asia/Kolkata|IST|-5u|0||15e6\",\r\n\t\t\t\"Asia/Chita|+10 +08 +09|-a0 -80 -90|012|1N7s0 3re0|33e4\",\r\n\t\t\t\"Asia/Ulaanbaatar|+08 +09|-80 -90|01010|1O8G0 1cJ0 1cP0 1cJ0|12e5\",\r\n\t\t\t\"Asia/Shanghai|CST|-80|0||23e6\",\r\n\t\t\t\"Asia/Colombo|+0530|-5u|0||22e5\",\r\n\t\t\t\"Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1GPy0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|26e5\",\r\n\t\t\t\"Asia/Dili|+09|-90|0||19e4\",\r\n\t\t\t\"Asia/Dubai|+04|-40|0||39e5\",\r\n\t\t\t\"Asia/Famagusta|EET EEST +03|-20 -30 -30|01010101012|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0\",\r\n\t\t\t\"Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1GPy0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|18e5\",\r\n\t\t\t\"Asia/Hong_Kong|HKT|-80|0||73e5\",\r\n\t\t\t\"Asia/Hovd|+07 +08|-70 -80|01010|1O8H0 1cJ0 1cP0 1cJ0|81e3\",\r\n\t\t\t\"Asia/Irkutsk|+09 +08|-90 -80|01|1N7t0|60e4\",\r\n\t\t\t\"Europe/Istanbul|EET EEST +03|-20 -30 -30|01010101012|1GNB0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6\",\r\n\t\t\t\"Asia/Jakarta|WIB|-70|0||31e6\",\r\n\t\t\t\"Asia/Jayapura|WIT|-90|0||26e4\",\r\n\t\t\t\"Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1GPA0 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0|81e4\",\r\n\t\t\t\"Asia/Kabul|+0430|-4u|0||46e5\",\r\n\t\t\t\"Asia/Karachi|PKT|-50|0||24e6\",\r\n\t\t\t\"Asia/Kathmandu|+0545|-5J|0||12e5\",\r\n\t\t\t\"Asia/Yakutsk|+10 +09|-a0 -90|01|1N7s0|28e4\",\r\n\t\t\t\"Asia/Krasnoyarsk|+08 +07|-80 -70|01|1N7u0|10e5\",\r\n\t\t\t\"Asia/Magadan|+12 +10 +11|-c0 -a0 -b0|012|1N7q0 3Cq0|95e3\",\r\n\t\t\t\"Asia/Makassar|WITA|-80|0||15e5\",\r\n\t\t\t\"Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|35e5\",\r\n\t\t\t\"Asia/Novosibirsk|+07 +06|-70 -60|010|1N7v0 4eN0|15e5\",\r\n\t\t\t\"Asia/Omsk|+07 +06|-70 -60|01|1N7v0|12e5\",\r\n\t\t\t\"Asia/Pyongyang|KST KST|-90 -8u|01|1P4D0|29e5\",\r\n\t\t\t\"Asia/Rangoon|+0630|-6u|0||48e5\",\r\n\t\t\t\"Asia/Sakhalin|+11 +10|-b0 -a0|010|1N7r0 3rd0|58e4\",\r\n\t\t\t\"Asia/Seoul|KST|-90|0||23e6\",\r\n\t\t\t\"Asia/Srednekolymsk|+12 +11|-c0 -b0|01|1N7q0|35e2\",\r\n\t\t\t\"Asia/Tehran|+0330 +0430|-3u -4u|01010101010101010101010|1GLUu 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6\",\r\n\t\t\t\"Asia/Tokyo|JST|-90|0||38e6\",\r\n\t\t\t\"Asia/Tomsk|+07 +06|-70 -60|010|1N7v0 3Qp0|10e5\",\r\n\t\t\t\"Asia/Vladivostok|+11 +10|-b0 -a0|01|1N7r0|60e4\",\r\n\t\t\t\"Asia/Yekaterinburg|+06 +05|-60 -50|01|1N7w0|14e5\",\r\n\t\t\t\"Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|27e5\",\r\n\t\t\t\"Atlantic/Cape_Verde|-01|10|0||50e4\",\r\n\t\t\t\"Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1GQg0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|40e5\",\r\n\t\t\t\"Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1GQgu 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|11e5\",\r\n\t\t\t\"Australia/Brisbane|AEST|-a0|0||20e5\",\r\n\t\t\t\"Australia/Darwin|ACST|-9u|0||12e4\",\r\n\t\t\t\"Australia/Eucla|+0845|-8J|0||368\",\r\n\t\t\t\"Australia/Lord_Howe|+11 +1030|-b0 -au|01010101010101010101010|1GQf0 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu|347\",\r\n\t\t\t\"Australia/Perth|AWST|-80|0||18e5\",\r\n\t\t\t\"Pacific/Easter|-05 -06|50 60|010101010101010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Dd0 1Nb0 Ap0|30e2\",\r\n\t\t\t\"Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|12e5\",\r\n\t\t\t\"Pacific/Tahiti|-10|a0|0||18e4\",\r\n\t\t\t\"Pacific/Niue|-11|b0|0||12e2\",\r\n\t\t\t\"Etc/GMT+12|-12|c0|0|\",\r\n\t\t\t\"Pacific/Galapagos|-06|60|0||25e3\",\r\n\t\t\t\"Etc/GMT+7|-07|70|0|\",\r\n\t\t\t\"Pacific/Pitcairn|-08|80|0||56\",\r\n\t\t\t\"Pacific/Gambier|-09|90|0||125\",\r\n\t\t\t\"Etc/GMT-1|+01|-10|0|\",\r\n\t\t\t\"Pacific/Fakaofo|+13|-d0|0||483\",\r\n\t\t\t\"Pacific/Kiritimati|+14|-e0|0||51e2\",\r\n\t\t\t\"Etc/GMT-2|+02|-20|0|\",\r\n\t\t\t\"Etc/UCT|UCT|0|0|\",\r\n\t\t\t\"Etc/UTC|UTC|0|0|\",\r\n\t\t\t\"Europe/Astrakhan|+04 +03|-40 -30|010|1N7y0 3rd0\",\r\n\t\t\t\"Europe/London|GMT BST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|10e6\",\r\n\t\t\t\"Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1GNA0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|67e4\",\r\n\t\t\t\"Europe/Kaliningrad|+03 EET|-30 -20|01|1N7z0|44e4\",\r\n\t\t\t\"Europe/Volgograd|+04 +03|-40 -30|01|1N7y0|10e5\",\r\n\t\t\t\"Europe/Moscow|MSK MSK|-40 -30|01|1N7y0|16e6\",\r\n\t\t\t\"Europe/Saratov|+04 +03|-40 -30|010|1N7y0 5810\",\r\n\t\t\t\"Europe/Simferopol|EET EEST MSK MSK|-20 -30 -40 -30|0101023|1GNB0 1qM0 11A0 1o00 11z0 1nW0|33e4\",\r\n\t\t\t\"Pacific/Honolulu|HST|a0|0||37e4\",\r\n\t\t\t\"MET|MET MEST|-10 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0\",\r\n\t\t\t\"Pacific/Chatham|+1345 +1245|-dJ -cJ|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|600\",\r\n\t\t\t\"Pacific/Apia|+14 +13|-e0 -d0|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|37e3\",\r\n\t\t\t\"Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4\",\r\n\t\t\t\"Pacific/Fiji|+13 +12|-d0 -c0|01010101010101010101010|1Goe0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0|88e4\",\r\n\t\t\t\"Pacific/Guam|ChST|-a0|0||17e4\",\r\n\t\t\t\"Pacific/Marquesas|-0930|9u|0||86e2\",\r\n\t\t\t\"Pacific/Pago_Pago|SST|b0|0||37e2\",\r\n\t\t\t\"Pacific/Norfolk|+1130 +11|-bu -b0|01|1PoCu|25e4\",\r\n\t\t\t\"Pacific/Tongatapu|+13 +14|-d0 -e0|01010101010101|1S4d0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0|75e3\"\r\n\t\t],\r\n\t\t\"links\": [\r\n\t\t\t\"Africa/Abidjan|Africa/Accra\",\r\n\t\t\t\"Africa/Abidjan|Africa/Bamako\",\r\n\t\t\t\"Africa/Abidjan|Africa/Banjul\",\r\n\t\t\t\"Africa/Abidjan|Africa/Bissau\",\r\n\t\t\t\"Africa/Abidjan|Africa/Conakry\",\r\n\t\t\t\"Africa/Abidjan|Africa/Dakar\",\r\n\t\t\t\"Africa/Abidjan|Africa/Freetown\",\r\n\t\t\t\"Africa/Abidjan|Africa/Lome\",\r\n\t\t\t\"Africa/Abidjan|Africa/Monrovia\",\r\n\t\t\t\"Africa/Abidjan|Africa/Nouakchott\",\r\n\t\t\t\"Africa/Abidjan|Africa/Ouagadougou\",\r\n\t\t\t\"Africa/Abidjan|Africa/Sao_Tome\",\r\n\t\t\t\"Africa/Abidjan|Africa/Timbuktu\",\r\n\t\t\t\"Africa/Abidjan|America/Danmarkshavn\",\r\n\t\t\t\"Africa/Abidjan|Atlantic/Reykjavik\",\r\n\t\t\t\"Africa/Abidjan|Atlantic/St_Helena\",\r\n\t\t\t\"Africa/Abidjan|Etc/GMT\",\r\n\t\t\t\"Africa/Abidjan|Etc/GMT+0\",\r\n\t\t\t\"Africa/Abidjan|Etc/GMT-0\",\r\n\t\t\t\"Africa/Abidjan|Etc/GMT0\",\r\n\t\t\t\"Africa/Abidjan|Etc/Greenwich\",\r\n\t\t\t\"Africa/Abidjan|GMT\",\r\n\t\t\t\"Africa/Abidjan|GMT+0\",\r\n\t\t\t\"Africa/Abidjan|GMT-0\",\r\n\t\t\t\"Africa/Abidjan|GMT0\",\r\n\t\t\t\"Africa/Abidjan|Greenwich\",\r\n\t\t\t\"Africa/Abidjan|Iceland\",\r\n\t\t\t\"Africa/Algiers|Africa/Tunis\",\r\n\t\t\t\"Africa/Cairo|Egypt\",\r\n\t\t\t\"Africa/Casablanca|Africa/El_Aaiun\",\r\n\t\t\t\"Africa/Johannesburg|Africa/Maseru\",\r\n\t\t\t\"Africa/Johannesburg|Africa/Mbabane\",\r\n\t\t\t\"Africa/Khartoum|Africa/Addis_Ababa\",\r\n\t\t\t\"Africa/Khartoum|Africa/Asmara\",\r\n\t\t\t\"Africa/Khartoum|Africa/Asmera\",\r\n\t\t\t\"Africa/Khartoum|Africa/Dar_es_Salaam\",\r\n\t\t\t\"Africa/Khartoum|Africa/Djibouti\",\r\n\t\t\t\"Africa/Khartoum|Africa/Juba\",\r\n\t\t\t\"Africa/Khartoum|Africa/Kampala\",\r\n\t\t\t\"Africa/Khartoum|Africa/Mogadishu\",\r\n\t\t\t\"Africa/Khartoum|Africa/Nairobi\",\r\n\t\t\t\"Africa/Khartoum|Indian/Antananarivo\",\r\n\t\t\t\"Africa/Khartoum|Indian/Comoro\",\r\n\t\t\t\"Africa/Khartoum|Indian/Mayotte\",\r\n\t\t\t\"Africa/Lagos|Africa/Bangui\",\r\n\t\t\t\"Africa/Lagos|Africa/Brazzaville\",\r\n\t\t\t\"Africa/Lagos|Africa/Douala\",\r\n\t\t\t\"Africa/Lagos|Africa/Kinshasa\",\r\n\t\t\t\"Africa/Lagos|Africa/Libreville\",\r\n\t\t\t\"Africa/Lagos|Africa/Luanda\",\r\n\t\t\t\"Africa/Lagos|Africa/Malabo\",\r\n\t\t\t\"Africa/Lagos|Africa/Ndjamena\",\r\n\t\t\t\"Africa/Lagos|Africa/Niamey\",\r\n\t\t\t\"Africa/Lagos|Africa/Porto-Novo\",\r\n\t\t\t\"Africa/Maputo|Africa/Blantyre\",\r\n\t\t\t\"Africa/Maputo|Africa/Bujumbura\",\r\n\t\t\t\"Africa/Maputo|Africa/Gaborone\",\r\n\t\t\t\"Africa/Maputo|Africa/Harare\",\r\n\t\t\t\"Africa/Maputo|Africa/Kigali\",\r\n\t\t\t\"Africa/Maputo|Africa/Lubumbashi\",\r\n\t\t\t\"Africa/Maputo|Africa/Lusaka\",\r\n\t\t\t\"Africa/Tripoli|Libya\",\r\n\t\t\t\"America/Adak|America/Atka\",\r\n\t\t\t\"America/Adak|US/Aleutian\",\r\n\t\t\t\"America/Anchorage|America/Juneau\",\r\n\t\t\t\"America/Anchorage|America/Nome\",\r\n\t\t\t\"America/Anchorage|America/Sitka\",\r\n\t\t\t\"America/Anchorage|America/Yakutat\",\r\n\t\t\t\"America/Anchorage|US/Alaska\",\r\n\t\t\t\"America/Campo_Grande|America/Cuiaba\",\r\n\t\t\t\"America/Chicago|America/Indiana/Knox\",\r\n\t\t\t\"America/Chicago|America/Indiana/Tell_City\",\r\n\t\t\t\"America/Chicago|America/Knox_IN\",\r\n\t\t\t\"America/Chicago|America/Matamoros\",\r\n\t\t\t\"America/Chicago|America/Menominee\",\r\n\t\t\t\"America/Chicago|America/North_Dakota/Beulah\",\r\n\t\t\t\"America/Chicago|America/North_Dakota/Center\",\r\n\t\t\t\"America/Chicago|America/North_Dakota/New_Salem\",\r\n\t\t\t\"America/Chicago|America/Rainy_River\",\r\n\t\t\t\"America/Chicago|America/Rankin_Inlet\",\r\n\t\t\t\"America/Chicago|America/Resolute\",\r\n\t\t\t\"America/Chicago|America/Winnipeg\",\r\n\t\t\t\"America/Chicago|CST6CDT\",\r\n\t\t\t\"America/Chicago|Canada/Central\",\r\n\t\t\t\"America/Chicago|US/Central\",\r\n\t\t\t\"America/Chicago|US/Indiana-Starke\",\r\n\t\t\t\"America/Chihuahua|America/Mazatlan\",\r\n\t\t\t\"America/Chihuahua|Mexico/BajaSur\",\r\n\t\t\t\"America/Denver|America/Boise\",\r\n\t\t\t\"America/Denver|America/Cambridge_Bay\",\r\n\t\t\t\"America/Denver|America/Edmonton\",\r\n\t\t\t\"America/Denver|America/Inuvik\",\r\n\t\t\t\"America/Denver|America/Ojinaga\",\r\n\t\t\t\"America/Denver|America/Shiprock\",\r\n\t\t\t\"America/Denver|America/Yellowknife\",\r\n\t\t\t\"America/Denver|Canada/Mountain\",\r\n\t\t\t\"America/Denver|MST7MDT\",\r\n\t\t\t\"America/Denver|Navajo\",\r\n\t\t\t\"America/Denver|US/Mountain\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/Buenos_Aires\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/Catamarca\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/ComodRivadavia\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/Cordoba\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/Jujuy\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/La_Rioja\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/Mendoza\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/Rio_Gallegos\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/Salta\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/San_Juan\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/San_Luis\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/Tucuman\",\r\n\t\t\t\"America/Fortaleza|America/Argentina/Ushuaia\",\r\n\t\t\t\"America/Fortaleza|America/Belem\",\r\n\t\t\t\"America/Fortaleza|America/Buenos_Aires\",\r\n\t\t\t\"America/Fortaleza|America/Catamarca\",\r\n\t\t\t\"America/Fortaleza|America/Cayenne\",\r\n\t\t\t\"America/Fortaleza|America/Cordoba\",\r\n\t\t\t\"America/Fortaleza|America/Jujuy\",\r\n\t\t\t\"America/Fortaleza|America/Maceio\",\r\n\t\t\t\"America/Fortaleza|America/Mendoza\",\r\n\t\t\t\"America/Fortaleza|America/Paramaribo\",\r\n\t\t\t\"America/Fortaleza|America/Recife\",\r\n\t\t\t\"America/Fortaleza|America/Rosario\",\r\n\t\t\t\"America/Fortaleza|America/Santarem\",\r\n\t\t\t\"America/Fortaleza|Antarctica/Rothera\",\r\n\t\t\t\"America/Fortaleza|Atlantic/Stanley\",\r\n\t\t\t\"America/Fortaleza|Etc/GMT+3\",\r\n\t\t\t\"America/Halifax|America/Glace_Bay\",\r\n\t\t\t\"America/Halifax|America/Goose_Bay\",\r\n\t\t\t\"America/Halifax|America/Moncton\",\r\n\t\t\t\"America/Halifax|America/Thule\",\r\n\t\t\t\"America/Halifax|Atlantic/Bermuda\",\r\n\t\t\t\"America/Halifax|Canada/Atlantic\",\r\n\t\t\t\"America/Havana|Cuba\",\r\n\t\t\t\"America/La_Paz|America/Boa_Vista\",\r\n\t\t\t\"America/La_Paz|America/Guyana\",\r\n\t\t\t\"America/La_Paz|America/Manaus\",\r\n\t\t\t\"America/La_Paz|America/Porto_Velho\",\r\n\t\t\t\"America/La_Paz|Brazil/West\",\r\n\t\t\t\"America/La_Paz|Etc/GMT+4\",\r\n\t\t\t\"America/Lima|America/Bogota\",\r\n\t\t\t\"America/Lima|America/Guayaquil\",\r\n\t\t\t\"America/Lima|Etc/GMT+5\",\r\n\t\t\t\"America/Los_Angeles|America/Dawson\",\r\n\t\t\t\"America/Los_Angeles|America/Ensenada\",\r\n\t\t\t\"America/Los_Angeles|America/Santa_Isabel\",\r\n\t\t\t\"America/Los_Angeles|America/Tijuana\",\r\n\t\t\t\"America/Los_Angeles|America/Vancouver\",\r\n\t\t\t\"America/Los_Angeles|America/Whitehorse\",\r\n\t\t\t\"America/Los_Angeles|Canada/Pacific\",\r\n\t\t\t\"America/Los_Angeles|Canada/Yukon\",\r\n\t\t\t\"America/Los_Angeles|Mexico/BajaNorte\",\r\n\t\t\t\"America/Los_Angeles|PST8PDT\",\r\n\t\t\t\"America/Los_Angeles|US/Pacific\",\r\n\t\t\t\"America/Los_Angeles|US/Pacific-New\",\r\n\t\t\t\"America/Managua|America/Belize\",\r\n\t\t\t\"America/Managua|America/Costa_Rica\",\r\n\t\t\t\"America/Managua|America/El_Salvador\",\r\n\t\t\t\"America/Managua|America/Guatemala\",\r\n\t\t\t\"America/Managua|America/Regina\",\r\n\t\t\t\"America/Managua|America/Swift_Current\",\r\n\t\t\t\"America/Managua|America/Tegucigalpa\",\r\n\t\t\t\"America/Managua|Canada/East-Saskatchewan\",\r\n\t\t\t\"America/Managua|Canada/Saskatchewan\",\r\n\t\t\t\"America/Mexico_City|America/Bahia_Banderas\",\r\n\t\t\t\"America/Mexico_City|America/Merida\",\r\n\t\t\t\"America/Mexico_City|America/Monterrey\",\r\n\t\t\t\"America/Mexico_City|Mexico/General\",\r\n\t\t\t\"America/New_York|America/Detroit\",\r\n\t\t\t\"America/New_York|America/Fort_Wayne\",\r\n\t\t\t\"America/New_York|America/Indiana/Indianapolis\",\r\n\t\t\t\"America/New_York|America/Indiana/Marengo\",\r\n\t\t\t\"America/New_York|America/Indiana/Petersburg\",\r\n\t\t\t\"America/New_York|America/Indiana/Vevay\",\r\n\t\t\t\"America/New_York|America/Indiana/Vincennes\",\r\n\t\t\t\"America/New_York|America/Indiana/Winamac\",\r\n\t\t\t\"America/New_York|America/Indianapolis\",\r\n\t\t\t\"America/New_York|America/Iqaluit\",\r\n\t\t\t\"America/New_York|America/Kentucky/Louisville\",\r\n\t\t\t\"America/New_York|America/Kentucky/Monticello\",\r\n\t\t\t\"America/New_York|America/Louisville\",\r\n\t\t\t\"America/New_York|America/Montreal\",\r\n\t\t\t\"America/New_York|America/Nassau\",\r\n\t\t\t\"America/New_York|America/Nipigon\",\r\n\t\t\t\"America/New_York|America/Pangnirtung\",\r\n\t\t\t\"America/New_York|America/Thunder_Bay\",\r\n\t\t\t\"America/New_York|America/Toronto\",\r\n\t\t\t\"America/New_York|Canada/Eastern\",\r\n\t\t\t\"America/New_York|EST5EDT\",\r\n\t\t\t\"America/New_York|US/East-Indiana\",\r\n\t\t\t\"America/New_York|US/Eastern\",\r\n\t\t\t\"America/New_York|US/Michigan\",\r\n\t\t\t\"America/Noronha|Atlantic/South_Georgia\",\r\n\t\t\t\"America/Noronha|Brazil/DeNoronha\",\r\n\t\t\t\"America/Noronha|Etc/GMT+2\",\r\n\t\t\t\"America/Panama|America/Atikokan\",\r\n\t\t\t\"America/Panama|America/Cayman\",\r\n\t\t\t\"America/Panama|America/Coral_Harbour\",\r\n\t\t\t\"America/Panama|America/Jamaica\",\r\n\t\t\t\"America/Panama|EST\",\r\n\t\t\t\"America/Panama|Jamaica\",\r\n\t\t\t\"America/Phoenix|America/Creston\",\r\n\t\t\t\"America/Phoenix|America/Dawson_Creek\",\r\n\t\t\t\"America/Phoenix|America/Hermosillo\",\r\n\t\t\t\"America/Phoenix|MST\",\r\n\t\t\t\"America/Phoenix|US/Arizona\",\r\n\t\t\t\"America/Rio_Branco|America/Eirunepe\",\r\n\t\t\t\"America/Rio_Branco|America/Porto_Acre\",\r\n\t\t\t\"America/Rio_Branco|Brazil/Acre\",\r\n\t\t\t\"America/Santiago|Chile/Continental\",\r\n\t\t\t\"America/Santo_Domingo|America/Anguilla\",\r\n\t\t\t\"America/Santo_Domingo|America/Antigua\",\r\n\t\t\t\"America/Santo_Domingo|America/Aruba\",\r\n\t\t\t\"America/Santo_Domingo|America/Barbados\",\r\n\t\t\t\"America/Santo_Domingo|America/Blanc-Sablon\",\r\n\t\t\t\"America/Santo_Domingo|America/Curacao\",\r\n\t\t\t\"America/Santo_Domingo|America/Dominica\",\r\n\t\t\t\"America/Santo_Domingo|America/Grenada\",\r\n\t\t\t\"America/Santo_Domingo|America/Guadeloupe\",\r\n\t\t\t\"America/Santo_Domingo|America/Kralendijk\",\r\n\t\t\t\"America/Santo_Domingo|America/Lower_Princes\",\r\n\t\t\t\"America/Santo_Domingo|America/Marigot\",\r\n\t\t\t\"America/Santo_Domingo|America/Martinique\",\r\n\t\t\t\"America/Santo_Domingo|America/Montserrat\",\r\n\t\t\t\"America/Santo_Domingo|America/Port_of_Spain\",\r\n\t\t\t\"America/Santo_Domingo|America/Puerto_Rico\",\r\n\t\t\t\"America/Santo_Domingo|America/St_Barthelemy\",\r\n\t\t\t\"America/Santo_Domingo|America/St_Kitts\",\r\n\t\t\t\"America/Santo_Domingo|America/St_Lucia\",\r\n\t\t\t\"America/Santo_Domingo|America/St_Thomas\",\r\n\t\t\t\"America/Santo_Domingo|America/St_Vincent\",\r\n\t\t\t\"America/Santo_Domingo|America/Tortola\",\r\n\t\t\t\"America/Santo_Domingo|America/Virgin\",\r\n\t\t\t\"America/Sao_Paulo|Brazil/East\",\r\n\t\t\t\"America/St_Johns|Canada/Newfoundland\",\r\n\t\t\t\"Antarctica/Palmer|America/Punta_Arenas\",\r\n\t\t\t\"Asia/Baghdad|Antarctica/Syowa\",\r\n\t\t\t\"Asia/Baghdad|Asia/Aden\",\r\n\t\t\t\"Asia/Baghdad|Asia/Bahrain\",\r\n\t\t\t\"Asia/Baghdad|Asia/Kuwait\",\r\n\t\t\t\"Asia/Baghdad|Asia/Qatar\",\r\n\t\t\t\"Asia/Baghdad|Asia/Riyadh\",\r\n\t\t\t\"Asia/Baghdad|Etc/GMT-3\",\r\n\t\t\t\"Asia/Baghdad|Europe/Minsk\",\r\n\t\t\t\"Asia/Bangkok|Asia/Ho_Chi_Minh\",\r\n\t\t\t\"Asia/Bangkok|Asia/Novokuznetsk\",\r\n\t\t\t\"Asia/Bangkok|Asia/Phnom_Penh\",\r\n\t\t\t\"Asia/Bangkok|Asia/Saigon\",\r\n\t\t\t\"Asia/Bangkok|Asia/Vientiane\",\r\n\t\t\t\"Asia/Bangkok|Etc/GMT-7\",\r\n\t\t\t\"Asia/Bangkok|Indian/Christmas\",\r\n\t\t\t\"Asia/Dhaka|Antarctica/Vostok\",\r\n\t\t\t\"Asia/Dhaka|Asia/Almaty\",\r\n\t\t\t\"Asia/Dhaka|Asia/Bishkek\",\r\n\t\t\t\"Asia/Dhaka|Asia/Dacca\",\r\n\t\t\t\"Asia/Dhaka|Asia/Kashgar\",\r\n\t\t\t\"Asia/Dhaka|Asia/Qyzylorda\",\r\n\t\t\t\"Asia/Dhaka|Asia/Thimbu\",\r\n\t\t\t\"Asia/Dhaka|Asia/Thimphu\",\r\n\t\t\t\"Asia/Dhaka|Asia/Urumqi\",\r\n\t\t\t\"Asia/Dhaka|Etc/GMT-6\",\r\n\t\t\t\"Asia/Dhaka|Indian/Chagos\",\r\n\t\t\t\"Asia/Dili|Etc/GMT-9\",\r\n\t\t\t\"Asia/Dili|Pacific/Palau\",\r\n\t\t\t\"Asia/Dubai|Asia/Muscat\",\r\n\t\t\t\"Asia/Dubai|Asia/Tbilisi\",\r\n\t\t\t\"Asia/Dubai|Asia/Yerevan\",\r\n\t\t\t\"Asia/Dubai|Etc/GMT-4\",\r\n\t\t\t\"Asia/Dubai|Europe/Samara\",\r\n\t\t\t\"Asia/Dubai|Indian/Mahe\",\r\n\t\t\t\"Asia/Dubai|Indian/Mauritius\",\r\n\t\t\t\"Asia/Dubai|Indian/Reunion\",\r\n\t\t\t\"Asia/Gaza|Asia/Hebron\",\r\n\t\t\t\"Asia/Hong_Kong|Hongkong\",\r\n\t\t\t\"Asia/Jakarta|Asia/Pontianak\",\r\n\t\t\t\"Asia/Jerusalem|Asia/Tel_Aviv\",\r\n\t\t\t\"Asia/Jerusalem|Israel\",\r\n\t\t\t\"Asia/Kamchatka|Asia/Anadyr\",\r\n\t\t\t\"Asia/Kamchatka|Etc/GMT-12\",\r\n\t\t\t\"Asia/Kamchatka|Kwajalein\",\r\n\t\t\t\"Asia/Kamchatka|Pacific/Funafuti\",\r\n\t\t\t\"Asia/Kamchatka|Pacific/Kwajalein\",\r\n\t\t\t\"Asia/Kamchatka|Pacific/Majuro\",\r\n\t\t\t\"Asia/Kamchatka|Pacific/Nauru\",\r\n\t\t\t\"Asia/Kamchatka|Pacific/Tarawa\",\r\n\t\t\t\"Asia/Kamchatka|Pacific/Wake\",\r\n\t\t\t\"Asia/Kamchatka|Pacific/Wallis\",\r\n\t\t\t\"Asia/Kathmandu|Asia/Katmandu\",\r\n\t\t\t\"Asia/Kolkata|Asia/Calcutta\",\r\n\t\t\t\"Asia/Makassar|Asia/Ujung_Pandang\",\r\n\t\t\t\"Asia/Manila|Asia/Brunei\",\r\n\t\t\t\"Asia/Manila|Asia/Kuala_Lumpur\",\r\n\t\t\t\"Asia/Manila|Asia/Kuching\",\r\n\t\t\t\"Asia/Manila|Asia/Singapore\",\r\n\t\t\t\"Asia/Manila|Etc/GMT-8\",\r\n\t\t\t\"Asia/Manila|Singapore\",\r\n\t\t\t\"Asia/Rangoon|Asia/Yangon\",\r\n\t\t\t\"Asia/Rangoon|Indian/Cocos\",\r\n\t\t\t\"Asia/Seoul|ROK\",\r\n\t\t\t\"Asia/Shanghai|Asia/Chongqing\",\r\n\t\t\t\"Asia/Shanghai|Asia/Chungking\",\r\n\t\t\t\"Asia/Shanghai|Asia/Harbin\",\r\n\t\t\t\"Asia/Shanghai|Asia/Macao\",\r\n\t\t\t\"Asia/Shanghai|Asia/Macau\",\r\n\t\t\t\"Asia/Shanghai|Asia/Taipei\",\r\n\t\t\t\"Asia/Shanghai|PRC\",\r\n\t\t\t\"Asia/Shanghai|ROC\",\r\n\t\t\t\"Asia/Tashkent|Antarctica/Mawson\",\r\n\t\t\t\"Asia/Tashkent|Asia/Aqtau\",\r\n\t\t\t\"Asia/Tashkent|Asia/Aqtobe\",\r\n\t\t\t\"Asia/Tashkent|Asia/Ashgabat\",\r\n\t\t\t\"Asia/Tashkent|Asia/Ashkhabad\",\r\n\t\t\t\"Asia/Tashkent|Asia/Atyrau\",\r\n\t\t\t\"Asia/Tashkent|Asia/Dushanbe\",\r\n\t\t\t\"Asia/Tashkent|Asia/Oral\",\r\n\t\t\t\"Asia/Tashkent|Asia/Samarkand\",\r\n\t\t\t\"Asia/Tashkent|Etc/GMT-5\",\r\n\t\t\t\"Asia/Tashkent|Indian/Kerguelen\",\r\n\t\t\t\"Asia/Tashkent|Indian/Maldives\",\r\n\t\t\t\"Asia/Tehran|Iran\",\r\n\t\t\t\"Asia/Tokyo|Japan\",\r\n\t\t\t\"Asia/Ulaanbaatar|Asia/Choibalsan\",\r\n\t\t\t\"Asia/Ulaanbaatar|Asia/Ulan_Bator\",\r\n\t\t\t\"Asia/Vladivostok|Asia/Ust-Nera\",\r\n\t\t\t\"Asia/Yakutsk|Asia/Khandyga\",\r\n\t\t\t\"Atlantic/Azores|America/Scoresbysund\",\r\n\t\t\t\"Atlantic/Cape_Verde|Etc/GMT+1\",\r\n\t\t\t\"Australia/Adelaide|Australia/Broken_Hill\",\r\n\t\t\t\"Australia/Adelaide|Australia/South\",\r\n\t\t\t\"Australia/Adelaide|Australia/Yancowinna\",\r\n\t\t\t\"Australia/Brisbane|Australia/Lindeman\",\r\n\t\t\t\"Australia/Brisbane|Australia/Queensland\",\r\n\t\t\t\"Australia/Darwin|Australia/North\",\r\n\t\t\t\"Australia/Lord_Howe|Australia/LHI\",\r\n\t\t\t\"Australia/Perth|Australia/West\",\r\n\t\t\t\"Australia/Sydney|Australia/ACT\",\r\n\t\t\t\"Australia/Sydney|Australia/Canberra\",\r\n\t\t\t\"Australia/Sydney|Australia/Currie\",\r\n\t\t\t\"Australia/Sydney|Australia/Hobart\",\r\n\t\t\t\"Australia/Sydney|Australia/Melbourne\",\r\n\t\t\t\"Australia/Sydney|Australia/NSW\",\r\n\t\t\t\"Australia/Sydney|Australia/Tasmania\",\r\n\t\t\t\"Australia/Sydney|Australia/Victoria\",\r\n\t\t\t\"Etc/UCT|UCT\",\r\n\t\t\t\"Etc/UTC|Etc/Universal\",\r\n\t\t\t\"Etc/UTC|Etc/Zulu\",\r\n\t\t\t\"Etc/UTC|UTC\",\r\n\t\t\t\"Etc/UTC|Universal\",\r\n\t\t\t\"Etc/UTC|Zulu\",\r\n\t\t\t\"Europe/Astrakhan|Europe/Ulyanovsk\",\r\n\t\t\t\"Europe/Athens|Asia/Nicosia\",\r\n\t\t\t\"Europe/Athens|EET\",\r\n\t\t\t\"Europe/Athens|Europe/Bucharest\",\r\n\t\t\t\"Europe/Athens|Europe/Helsinki\",\r\n\t\t\t\"Europe/Athens|Europe/Kiev\",\r\n\t\t\t\"Europe/Athens|Europe/Mariehamn\",\r\n\t\t\t\"Europe/Athens|Europe/Nicosia\",\r\n\t\t\t\"Europe/Athens|Europe/Riga\",\r\n\t\t\t\"Europe/Athens|Europe/Sofia\",\r\n\t\t\t\"Europe/Athens|Europe/Tallinn\",\r\n\t\t\t\"Europe/Athens|Europe/Uzhgorod\",\r\n\t\t\t\"Europe/Athens|Europe/Vilnius\",\r\n\t\t\t\"Europe/Athens|Europe/Zaporozhye\",\r\n\t\t\t\"Europe/Chisinau|Europe/Tiraspol\",\r\n\t\t\t\"Europe/Dublin|Eire\",\r\n\t\t\t\"Europe/Istanbul|Asia/Istanbul\",\r\n\t\t\t\"Europe/Istanbul|Turkey\",\r\n\t\t\t\"Europe/Lisbon|Atlantic/Canary\",\r\n\t\t\t\"Europe/Lisbon|Atlantic/Faeroe\",\r\n\t\t\t\"Europe/Lisbon|Atlantic/Faroe\",\r\n\t\t\t\"Europe/Lisbon|Atlantic/Madeira\",\r\n\t\t\t\"Europe/Lisbon|Portugal\",\r\n\t\t\t\"Europe/Lisbon|WET\",\r\n\t\t\t\"Europe/London|Europe/Belfast\",\r\n\t\t\t\"Europe/London|Europe/Guernsey\",\r\n\t\t\t\"Europe/London|Europe/Isle_of_Man\",\r\n\t\t\t\"Europe/London|Europe/Jersey\",\r\n\t\t\t\"Europe/London|GB\",\r\n\t\t\t\"Europe/London|GB-Eire\",\r\n\t\t\t\"Europe/Moscow|W-SU\",\r\n\t\t\t\"Europe/Paris|Africa/Ceuta\",\r\n\t\t\t\"Europe/Paris|Arctic/Longyearbyen\",\r\n\t\t\t\"Europe/Paris|Atlantic/Jan_Mayen\",\r\n\t\t\t\"Europe/Paris|CET\",\r\n\t\t\t\"Europe/Paris|Europe/Amsterdam\",\r\n\t\t\t\"Europe/Paris|Europe/Andorra\",\r\n\t\t\t\"Europe/Paris|Europe/Belgrade\",\r\n\t\t\t\"Europe/Paris|Europe/Berlin\",\r\n\t\t\t\"Europe/Paris|Europe/Bratislava\",\r\n\t\t\t\"Europe/Paris|Europe/Brussels\",\r\n\t\t\t\"Europe/Paris|Europe/Budapest\",\r\n\t\t\t\"Europe/Paris|Europe/Busingen\",\r\n\t\t\t\"Europe/Paris|Europe/Copenhagen\",\r\n\t\t\t\"Europe/Paris|Europe/Gibraltar\",\r\n\t\t\t\"Europe/Paris|Europe/Ljubljana\",\r\n\t\t\t\"Europe/Paris|Europe/Luxembourg\",\r\n\t\t\t\"Europe/Paris|Europe/Madrid\",\r\n\t\t\t\"Europe/Paris|Europe/Malta\",\r\n\t\t\t\"Europe/Paris|Europe/Monaco\",\r\n\t\t\t\"Europe/Paris|Europe/Oslo\",\r\n\t\t\t\"Europe/Paris|Europe/Podgorica\",\r\n\t\t\t\"Europe/Paris|Europe/Prague\",\r\n\t\t\t\"Europe/Paris|Europe/Rome\",\r\n\t\t\t\"Europe/Paris|Europe/San_Marino\",\r\n\t\t\t\"Europe/Paris|Europe/Sarajevo\",\r\n\t\t\t\"Europe/Paris|Europe/Skopje\",\r\n\t\t\t\"Europe/Paris|Europe/Stockholm\",\r\n\t\t\t\"Europe/Paris|Europe/Tirane\",\r\n\t\t\t\"Europe/Paris|Europe/Vaduz\",\r\n\t\t\t\"Europe/Paris|Europe/Vatican\",\r\n\t\t\t\"Europe/Paris|Europe/Vienna\",\r\n\t\t\t\"Europe/Paris|Europe/Warsaw\",\r\n\t\t\t\"Europe/Paris|Europe/Zagreb\",\r\n\t\t\t\"Europe/Paris|Europe/Zurich\",\r\n\t\t\t\"Europe/Paris|Poland\",\r\n\t\t\t\"Europe/Volgograd|Europe/Kirov\",\r\n\t\t\t\"Pacific/Auckland|Antarctica/McMurdo\",\r\n\t\t\t\"Pacific/Auckland|Antarctica/South_Pole\",\r\n\t\t\t\"Pacific/Auckland|NZ\",\r\n\t\t\t\"Pacific/Chatham|NZ-CHAT\",\r\n\t\t\t\"Pacific/Easter|Chile/EasterIsland\",\r\n\t\t\t\"Pacific/Fakaofo|Etc/GMT-13\",\r\n\t\t\t\"Pacific/Fakaofo|Pacific/Enderbury\",\r\n\t\t\t\"Pacific/Galapagos|Etc/GMT+6\",\r\n\t\t\t\"Pacific/Gambier|Etc/GMT+9\",\r\n\t\t\t\"Pacific/Guadalcanal|Antarctica/Macquarie\",\r\n\t\t\t\"Pacific/Guadalcanal|Etc/GMT-11\",\r\n\t\t\t\"Pacific/Guadalcanal|Pacific/Efate\",\r\n\t\t\t\"Pacific/Guadalcanal|Pacific/Kosrae\",\r\n\t\t\t\"Pacific/Guadalcanal|Pacific/Noumea\",\r\n\t\t\t\"Pacific/Guadalcanal|Pacific/Pohnpei\",\r\n\t\t\t\"Pacific/Guadalcanal|Pacific/Ponape\",\r\n\t\t\t\"Pacific/Guam|Pacific/Saipan\",\r\n\t\t\t\"Pacific/Honolulu|HST\",\r\n\t\t\t\"Pacific/Honolulu|Pacific/Johnston\",\r\n\t\t\t\"Pacific/Honolulu|US/Hawaii\",\r\n\t\t\t\"Pacific/Kiritimati|Etc/GMT-14\",\r\n\t\t\t\"Pacific/Niue|Etc/GMT+11\",\r\n\t\t\t\"Pacific/Pago_Pago|Pacific/Midway\",\r\n\t\t\t\"Pacific/Pago_Pago|Pacific/Samoa\",\r\n\t\t\t\"Pacific/Pago_Pago|US/Samoa\",\r\n\t\t\t\"Pacific/Pitcairn|Etc/GMT+8\",\r\n\t\t\t\"Pacific/Port_Moresby|Antarctica/DumontDUrville\",\r\n\t\t\t\"Pacific/Port_Moresby|Etc/GMT-10\",\r\n\t\t\t\"Pacific/Port_Moresby|Pacific/Chuuk\",\r\n\t\t\t\"Pacific/Port_Moresby|Pacific/Truk\",\r\n\t\t\t\"Pacific/Port_Moresby|Pacific/Yap\",\r\n\t\t\t\"Pacific/Tahiti|Etc/GMT+10\",\r\n\t\t\t\"Pacific/Tahiti|Pacific/Rarotonga\"\r\n\t\t]\r\n\t});\r\n\r\n\r\n\treturn moment;\r\n}));\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/moment-timezone/builds/moment-timezone-with-data-2012-2022.js\n// module id = 36\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a