code.min.js

function tagLinker(t,e,n){t.placeholder=n.placeholder,t.addTag=function(){if(void 0===t.enteredtext||0!==t.enteredtext.length)return t.tags.push({text:t.enteredtext}),t.enteredtext="",t.enteredtext},t.deleteTag=function(e){return t.tags.length>0&&0===t.enteredtext.length&&void 0===e?t.tags.pop():void 0!==e&&t.tags.splice(e,1),t.tags},e.bind("keydown",function(e){var n=e.which;!e.shiftKey&&9===n||13===n||188===n?void 0!==t.enteredtext&&0===t.enteredtext.length||(e.preventDefault(),t.$apply("addTag()")):8===n&&t.$apply("deleteTag()")})}angular.module("homepage",["ngStorage","ui.router","trailicons","templates"]),angular.module("trailicons",[]),angular.module("templates",[]),angular.module("homepage").controller("DemoController",["$scope","AddTemplates","DataStoreSrvc","Server","TimelineService",function(t,e,n,i,a){function s(){a.setLoadingStatus(!0),i.getDemoData().success(function(t){console.log(t),e.addData(t.data.templates),a.setLoadingStatus(!1)})}var o=n.getPosts(),l=n.getSidebarData(),c=n.getWidgetsData(),r={timeline:o,sidebar:l,widgets:c};n.resetAll(),t.data=r,s()}]),angular.module("homepage").controller("HomeController",["$scope","DataStoreSrvc","TemplateService",function(t,e,n){var i=e.getPosts(),a=e.getSidebarData(),s=e.getWidgetsData(),o={timeline:i,sidebar:a,widgets:s};t.data=o,n.getTemplates()}]),angular.module("homepage").config(["$httpProvider",function(t){var e=function(t,e,n){function i(t){return t.headers=t.headers||{},n.token&&(t.headers.Authorization="Bearer "+n.token),t}function a(n){return 401!==n.status&&403!==n.status||e.path("/#/login"),t.reject(n)}return function(t){return t.then(i,a)}};e.$inject=["$q","$location","$localStorage"],t.interceptors.push(e)}]).run(["$http","$localStorage","$rootScope","Authentication","MobileType","Server",function(t,e,n,i,a,s){function o(){n.isMobile=a.any()}function l(){e.templates&&e.templates.length?s.ibsubmit({templates:e.templates}).success(function(t){console.log(t),t.success&&(e.templates=[])}):e.templates=[]}function c(){t.defaults.headers.common["X-Auth-Token"]=e.token}function r(){n.userDtls=i.getUser(),n.isAuthenticated=i.isAuthenticated()}function d(){o(),c(),l(),r()}d(),window.addEventListener("orientationchange",o,!1),window.addEventListener("resize",o,!1)}]),angular.module("templates").run(["$templateCache",function(t){t.put("components/common-components/autocomplete/autocomplete.html",'<div class="autocomplete">\n  <input class="inputtext" type="text" ng-model="enteredtext" ng-keyup="filterItems()"/>\n  <div class="choices" ng-show="isVisible.suggestions">\n    <div class="choice" ng-repeat="choice in filteredChoices"\n      ng-click="selectItem(choice.index)">{{choice.label}}</div>\n  </div>\n</div>'),t.put("components/common-components/buble/buble.html",'<div class="buble {{size}}x">\n    <span class="content">\n        <span class="title">{{title}}</span>\n        <span class="value">{{value}}</span>\n    </span>\n</div>'),t.put("components/common-components/calendar/calendar-dual.html",'<div class="input-value-wrapper">\n\t<div class="start">\n\t\t<div class="show-date">{{dates[\'START\'].date | date:\'d MMM yyyy\'}}</div>\n\t\t<calendar date="dates[\'START\']"></calendar>\n\t</div>\n\t<div class="end">\n\t\t<div class="show-date">{{dates[\'END\'].date | date:\'d MMM yyyy\'}}</div>\n\t\t<calendar date="dates[\'END\']"></calendar>\n\t</div>\n</div>'),t.put("components/common-components/calendar/calendar.html",'<div class="calendar">\n\t<div class="display-info" ng-click="toggleCalendar()">\n\t\t<span ng-show="options.isShowDate && options.isShowBefore"\n\t\t\tclass="show-date">{{chosendate.date | date:\'d MMM yyyy\'}}</span>\n\t\t<span class="calendar-icon">\n\t\t\t<span class="glyphicon glyphicon-calendar"></span>\n\t\t</span>\n\t\t<span ng-show="options.isShowDate && !options.isShowBefore"\n\t\t \tclass="show-date">{{chosendate.date | date:\'d MMM yyyy\'}}</span>\n\t</div>\n\t<div class="calendarwidget" ng-show="isCalendarVisible">\n\t\t<div class="calendar-head">\n\t\t\t<span class="btn back" ng-click="setDateMonth($event, -1)">&lt;&lt;</span>\n\t\t\t<span class="date">{{ tempDate | date:\'d MMM yyyy\'}}</span>\n\t\t\t<span class="btn frwd" ng-click="setDateMonth($event, 1)">&gt;&gt;</span>\n\t\t</div>\n\t\t<div class="week-title">\n\t\t\t<span class="day-title" ng-repeat="title in weekTitle">{{title}}</span>\n\t\t</div>\n\t\t<div class="week" ng-repeat="week in weeks">\n\t\t\t<span class="day {{selectionDay == day ? \'highlight\' : \'regular\'}}"\n\t\t\tng-repeat="day in week track by $index"\n\t\t\tng-click="dateClicked($event, day)">{{day}}</span>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/common-components/checkbox/checkbox.html",'<span class="checkbox">\n    <input type="checkbox" id="{{::name}}" name="cc" ng-model="isChecked"\n        ng-click="markCheckboxFn({\'name\':name, \'isChecked\': isChecked})"/>\n    <label for="{{::name}}">\n        <span class="icon"></span>\n        <span class="label-text">{{::label}}</span>\n    </label>\n</span>\n'),t.put("components/common-components/editor/editor.html",'<div>\n\t<div class="editorbox" contenteditable="{{isEditable}}" ng-model="note.editor"\n\tng-paste="handlePaste($event)"><br></div>\n</div>'),t.put("components/common-components/fullscreen-dialog/fullscreen-dialog.html",""),t.put("components/common-components/repetition/repetition.html",'<div class="repetition choose-one">\n\t<div class="selector">\n\t\t<div class="title">\n\t\t\tRepeat\n\t\t</div>\n\t\t<div class="choices interval">\n\t\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'ONCE\')"\n\t\t\t\tng-class="{\'chosen\' : defaults.repeat == \'ONCE\'}"\n\t\t\t\ton-action="\'CLICK, [days, select, count, months], [false, false, false, false]\'"\n\t\t\t\tscope-obj="isVisible" chooseone="interval">Once</button>\n\t\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'DALY\')"\n\t\t\t\tng-class="{\'chosen\' : defaults.repeat == \'DALY\'}"\n\t\t\t\ton-action="\'CLICK, [days, select, count, months], [false, false, false, false]\'"\n\t\t\t\tscope-obj="isVisible" chooseone="interval">Daily</button>\n\t\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'WEEK\')"\n\t\t\t\tng-class="{\'chosen\' : defaults.repeat == \'WEEK\'}"\n\t\t\t\ton-action="\'CLICK, [days, select, count, months], [false, false, false, false]\'"\n\t\t\t\tscope-obj="isVisible" chooseone="interval">Weekly</button>\n\t\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'MTLY\')"\n\t\t\t\tng-class="{\'chosen\' : defaults.repeat == \'MTLY\'}"\n\t\t\t\ton-action="\'CLICK, [days, select, count, months], [false, false, false, false]\'"\n\t\t\t\tscope-obj="isVisible" chooseone="interval">Monthly</button>\n\t\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'ANLY\')"\n\t\t\t\tng-class="{\'chosen\' : defaults.repeat == \'ANLY\'}"\n\t\t\t\ton-action="\'CLICK, [days, select, count, months], [false, false, false, false]\'"\n\t\t\t\tscope-obj="isVisible" chooseone="interval">Annually</button>\n\t\t</div>\n\t</div>\n\t<div class="selector" ng-show="isVisible.days">\n\t\t<div class="title aligntop">\n\t\t\tChoose Days\n\t\t</div>\n\t\t<div class="choices" on-action="\'CLICK, [count], true\'" scope-obj="isVisible">\n\t\t\t<div class="typeofday">\n\t\t\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'WKDY\')"\n\t\t\t\t\ton-action="\'CLICK, [count, countday, countchoosenday, countmonth, choosedays], [true, true, false, false, false]\'"\n\t\t\t\t\tscope-obj="isVisible" chooseone="typeofday">Weekday</button>\n\t\t\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'WKED\')"\n\t\t\t\t\ton-action="\'CLICK, [count, countday, countchoosenday, countmonth, choosedays], [true, true, false, false, false]\'"\n\t\t\t\t\tscope-obj="isVisible" chooseone="typeofday">Weekend</button>\n\t\t\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'HLDY\')"\n\t\t\t\t\ton-action="\'CLICK, [count, countday, countchoosenday, countmonth, choosedays], [true, true, false, false, false]\'"\n\t\t\t\t\tscope-obj="isVisible" chooseone="typeofday">Holiday</button>\n\t\t\t\t<button class="choice btn btn-choice"\n\t\t\t\t\ton-action="\'CLICK, [count, countday, countchoosenday, countmonth, choosedays], [false, false, false, false, true]\'"\n\t\t\t\t\tscope-obj="isVisible" chooseone="typeofday">Choose</button>\n\t\t\t</div>\n\t\t\t<div class="dayofweek" ng-show="isVisible.choosedays">\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'MON\')"\n\t\t\t\t\ton-action="\'CLICK, [count, countday, countchoosenday, countmonth], [true, false, true, false]\'"\n\t\t\t\t\tscope-obj="isVisible" choosemany="dayofweek">Mon</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'TUE\')"\n\t\t\t\t\ton-action="\'CLICK, [count, countday, countchoosenday, countmonth], [true, false, true, false]\'"\n\t\t\t\t\tscope-obj="isVisible" choosemany="dayofweek">Tue</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'WED\')"\n\t\t\t\t\ton-action="\'CLICK, [count, countday, countchoosenday, countmonth], [true, false, true, false]\'"\n\t\t\t\t\tscope-obj="isVisible" choosemany="dayofweek">Wed</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'THU\')"\n\t\t\t\t\ton-action="\'CLICK, [count, countday, countchoosenday, countmonth], [true, false, true, false]\'"\n\t\t\t\t\tscope-obj="isVisible" choosemany="dayofweek">Thu</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'FRI\')"\n\t\t\t\t\ton-action="\'CLICK, [count, countday, countchoosenday, countmonth], [true, false, true, false]\'"\n\t\t\t\t\tscope-obj="isVisible" choosemany="dayofweek">Fri</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'SAT\')"\n\t\t\t\t\ton-action="\'CLICK, [count, countday, countchoosenday, countmonth], [true, false, true, false]\'"\n\t\t\t\t\tscope-obj="isVisible" choosemany="dayofweek">Sat</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'SUN\')"\n\t\t\t\t\ton-action="\'CLICK, [count, countday, countchoosenday, countmonth], [true, false, true, false]\'"\n\t\t\t\t\tscope-obj="isVisible" choosemany="dayofweek">Sun</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="selector" ng-show="isVisible.select">\n\t\t<div class="title">\n\t\t\tSelect\n\t\t</div>\n\t\t<div class="choices choosemonthtype">\n\t\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'ALL\')"\n\t\t\t\ton-action="\'CLICK, [count, countmonth, months], [false, false, false]\'"\n\t\t\t\tscope-obj="isVisible" chooseone="choosemonthtype">All</button>\n\t\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'CHSE\')"\n\t\t\t\ton-action="\'CLICK, [count, countmonth, months], [false, true, true]\'"\n\t\t\t\tscope-obj="isVisible" chooseone="choosemonthtype">Choose</button>\n\t\t\t<!-- <button class="choice btn btn-choice" ng-click="selectOption(\'CONT\')"\n\t\t\t\ton-action="\'CLICK, [count, countmonth, months], [true, true, false]\'"\n\t\t\t\tscope-obj="isVisible" chooseone="choosemonthtype">Count</button> -->\n\t\t</div>\n\t</div>\n\t<div class="selector" ng-show="isVisible.months">\n\t\t<div class="title">\n\t\t\tChoose Months\n\t\t</div>\n\t\t<div class="choices choosemonth">\n\t\t\t<div class="typeofday">\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'JAN\')"\n\t\t\t\t choosemany="choosemonth">Jan</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'FEB\')"\n\t\t\t\t choosemany="choosemonth">Feb</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'MAR\')"\n\t\t\t\t choosemany="choosemonth">Mar</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'APR\')"\n\t\t\t\t choosemany="choosemonth">Apr</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'MAY\')"\n\t\t\t\t choosemany="choosemonth">May</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'JUN\')"\n\t\t\t\t choosemany="choosemonth">Jun</button>\n\t\t\t</div>\n\t\t\t<div class="typeofday">\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'JUL\')"\n\t\t\t\t choosemany="choosemonth">Jul</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'AUG\')"\n\t\t\t\t choosemany="choosemonth">Aug</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'SEP\')"\n\t\t\t\t choosemany="choosemonth">Sep</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'OCT\')"\n\t\t\t\t choosemany="choosemonth">Oct</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'NOV\')"\n\t\t\t\t choosemany="choosemonth">Nov</button>\n\t\t\t\t<button class="choice day btn btn-choice" ng-click="selectOption(\'DEC\')"\n\t\t\t\t choosemany="choosemonth">Dec</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<!-- <div class="selector" ng-show="isVisible.count">\n\t\t<div class="title aligntop">\n\t\t\tBy Count\n\t\t</div>\n\t\t<div class="choices">\n\t\t\t<div class="countmsg" ng-show="isVisible.countday">\n\t\t\t\t<button class="choice btn btn-choice">nth</button>\n\t\t\t\t<button class="choice text">weekday of the</button>\n\t\t\t\t<button class="choice btn btn-choice">month</button>\n\t\t\t\t<button class="choice btn btn-choice">year</button>\n\t\t\t</div>\n\t\t\t<div class="countmsg" ng-show="isVisible.countchoosenday">\n\t\t\t\t<button class="choice btn btn-choice">nth</button>\n\t\t\t\t<button class="choice text">tuesday of the</button>\n\t\t\t\t<button class="choice btn btn-choice">month</button>\n\t\t\t\t<button class="choice btn btn-choice">year</button>\n\t\t\t</div>\n\t\t\t<div class="countmsg" ng-show="isVisible.countmonth">\n\t\t\t\t<button class="choice btn btn-choice">nth</button>\n\t\t\t\t<button class="choice text">month of the year</button>\n\t\t\t</div>\n\t\t</div>\n\t</div> -->\n\t<!-- <pre>Message here</pre> -->\n</div>\n'),t.put("components/common-components/select-time/select-time.html",'<div class="select-time panel">\n    <div class="choose-year">\n        <!-- Single button -->\n        <div class="btn-group">\n            <button type="button" class="btn btn-default dropdown-toggle active" \n                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"\n                ng-click="isYearDdOpen = !isYearDdOpen">\n                <span class="year">{{choosen.year}}</span>\n                <span class="caret"></span>\n            </button>\n            <ul class="dropdown-menu" ng-class="{\'show\':isYearDdOpen}">\n                <li ng-repeat="year in years" class="dropdown-menu-item"\n                    ng-click="selectYear(year)">\n                    {{year}}\n                </li>\n            </ul>\n        </div>\n    </div>\n    <div class="choose-all">\n        <button type="button" class="btn btn-default" \n            ng-class="{\'active\': \'ALL\' === choosen.month}"\n            ng-click="selectMonth(\'ALL\')">\n            ALL\n        </button>\n    </div>\n    <div class="choose-month">\n        <div class="" role="group">\n            <button type="button" class="btn btn-default" \n                ng-class="{\'active\':$index === choosen.month}" ng-repeat="month in months"\n                ng-click="selectMonth($index)">\n                {{month}}\n            </button>\n        </div>\n    </div>\n</div>'),t.put("components/common-components/tags/tags-autocomplete.html",'<div class=\'tags tags-autocomplete\'>\n\t<div class=\'btn-success tag-pill\' data-ng-repeat="tag in tags track by $index">\n\t\t<span>{{tag.text}}</span>\n\t\t<div class=\'delete-tag\' data-ng-click=\'deleteTag($index)\'>&times;</div>\n\t</div>\n\t<autocomplete choices="choices" enteredtext="enteredtext" onselect="addTag()"\n            minlength="1" result="tagobj" type="type"></autocomplete>\n</div>\n'),t.put("components/common-components/tags/tags-list.html",'<div class="tags-list">\n    <span ng-hide="taglist.length > 0">none</span>\n    <span ng-show="taglist.length > 0">\n        <span ng-repeat="textitem in taglist">\n            <span>{{textitem.text}}{{ $index + 1 === taglist.length ? "" : ", "}}</span>\n        </span>\n    </span>\n</div>\n'),t.put("components/common-components/tags/tags.html","<div class='tags'>\n\t<div class='btn-success tag-pill' data-ng-repeat=\"tag in tags\">\n\t\t<span>{{tag.text}}</span>\n\t\t<div class='delete-tag' data-ng-click='deleteTag($index)'>&times;</div>\n\t</div>\n\t<input type='text' ng-model='enteredtext' placeholder='{{placeholder}}'/>\n</div>\n"),t.put("components/common-components/timepicker/timepicker.html",'<div class="timepickerwidget" ng-show="isTimePickerVisible" ng-click="$event.stopPropagation()">\n  <div class="input-wrapper one first">\n    <button class="button button-up" ng-click="setHour(1)">\n      <i class="glyphicon glyphicon-chevron-up"></i>\n    </button>\n    <label class="form-control field">{{selected.date | date:\'h\'}}</label>\n    <button class="button button-down" ng-click="setHour(-1)">\n      <i class="glyphicon glyphicon-chevron-down"></i>\n    </button>\n  </div>\n  <div class="input-wrapper one">\n    <button class="button button-up" ng-click="setMins(5)">\n      <i class="glyphicon glyphicon-chevron-up"></i>\n    </button>\n    <input type="number" class="input form-control field" maxlength="2" ng-model="selected.mins">\n    <button class="button button-down" ng-click="setMins(-5)">\n      <i class="glyphicon glyphicon-chevron-down"></i>\n    </button>\n  </div>\n  <div class="input-wrapper one last">\n    <button class="button button-up" ng-click="setAMPM()">\n      <i class="glyphicon glyphicon-chevron-up"></i>\n    </button>\n    <label class="form-control field">{{selected.date | date:\'a\'}}</label>\n    <button class="button button-down" ng-click="setAMPM()">\n      <i class="glyphicon glyphicon-chevron-down"></i>\n    </button>\n  </div>\n  <div class="buttons">\n     <button class="btn btn-xs btn-danger button" ng-click="setTimeAndHide()">Save</button>\n     <button class="btn btn-xs btn-danger button" ng-click="resetTimeAndHide()">Cancel</button>\n  </div>\n</div>\n'),t.put("components/common-components/timeselector/timeselector.html",'<div class="time-selector choose-one">\n\t<div class="choose-time">\n\t\t<button class="choice btn btn-danger" chooseone="choosetime">\n\t\t\t<timepicker time="time" ng-click="selectOption(\'TIME\')"></timepicker>\n\t\t</button>\n\t</div>\n\t<div class="choose-period">\n\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'MRNG\')" \n\t\t\tchooseone="choosetime">Morning</button>\n\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'AFTN\')" \n\t\t\tchooseone="choosetime">Afternoon</button>\n\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'EVNG\')" \n\t\t\tchooseone="choosetime">Evening</button>\n\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'NGHT\')" \n\t\t\tchooseone="choosetime">Night</button>\n\t\t<button class="choice btn btn-choice fullday" ng-click="selectOption(\'FLDY\')"\n\t\t\tchooseone="choosetime">Full Day</button>\n\t\t<button class="choice btn btn-choice fullday chosen" ng-click="selectOption(\'NONE\')"\n\t\t\tchooseone="choosetime">None</button>\n\t</div>\n\t<div class="choose-all">\n\t\t<button class="choice btn btn-choice" ng-click="selectOption(\'FLDY\')"\n\t\t\tchooseone="choosetime">Full Day</button>\n\t\t<button class="choice btn btn-choice chosen" ng-click="selectOption(\'NONE\')"\n\t\t\tchooseone="choosetime">None</button>\n\t</div>\n</div>'),t.put("components/common-components/title/title.html",'<div class="inputfield title">\n\t<input class="input-value" type="text" ng-model="note.title" placeholder="Title" \n\tonfocus="this.placeholder = \'\'" onblur="this.placeholder = \'Title\'">\n</div>'),t.put("components/common-components/totaltimeselector/totaltimeselector.html",'<div class="total-time-selector choose-one">\n\t<div class="choose-time">\n\t\t<label class="choice-label">Start Time</label>\n\t\t<button class="choice btn btn-danger" choosemany="choosetime">\n\t\t\t<timepicker time="times[\'START\']" ng-click="selectOption(\'TIME\')"></timepicker>\n\t\t</button>\n\t</div>\n\t<div class="choose-time end-time">\n\t\t<label class="choice-label">End Time</label>\n\t\t<button class="choice btn btn-danger" choosemany="choosetime">\n\t\t\t<timepicker time="times[\'END\']" ng-click="selectOption(\'TIME\')"></timepicker>\n\t\t</button>\n\t</div>\n</div>'),t.put("components/content-components/drawer/drawer-menu.html",'<div class="drawer-menu" ng-if="isMobile">\n\t<div class="drawer-icon">\n\t\t<i class="fa fa-bars menu-icon" aria-hidden="true" ng-click="toggleDrawer()"></i>\n\t</div>\n\t<div class="menu-sidebar" ng-show="isPanelVisible">\n\t\t<div class="menu-item">\n\t\t\t<a href="/#/home" ng-click="hideDrawer()">Home</a>\n\t\t</div>\n\t\t<div class="menu-item">\n\t\t\t<a href="/#/comment" ng-click="hideDrawer()">Feedback</a>\n\t\t</div>\n\t\t<!-- <div class="menu-item">\n\t\t\t<a href="/#/about" ng-click="hideDrawer()">About Us</a>\n\t\t</div> -->\n\t\t<div class="menu-item register">\n\t\t\t<a href="/#/signup" ng-click="hideDrawer()">Register</a>\n\t\t</div>\n\t</div>\n</div>'),t.put("components/content-components/footer/footer.html",'<div class="copyright-wrapper">\n  <div class="copyright text-center">\n      Copyright &copy; 2016 InputBox\n  </div>\n</div>\n'),t.put("components/content-components/header/header-menu.html",'<div class="header-menu">\n    <div class="item hidden-xs">\n        <a href="/#/comment">\n            <i class="fa fa-comment-o" aria-hidden="true"></i>\n        </a>\n    </div>\n    <div class="item" ng-hide="isAuthenticated">\n        <a class="clickable" href="/#/login">Login</a>\n    </div>\n    <div class="item hidden-very-xs" ng-hide="isAuthenticated">\n        <a class="btn clickable register" href="/#/register">Register</a>\n    </div>\n    <div class="item" ng-show="isAuthenticated">\n        <a class="btn clickable register" ng-click="logout()">Log Out</a>\n    </div>\n</div>\n'),t.put("components/content-components/header/header.html",'<div class="header-wrapper">\n    <div class="header container">\n        <div class="title">\n        \t<drawer-menu></drawer-menu>\n        \t<a class="inputbox-link" ng-click="loadDefaultPage()">INPUTBOX</a>\n        </div>\n        <header-menu></header-menu>\n    </div>\n</div>\n'),t.put("components/content-components/home/home.html",'<div class="container">\n    <div class="home col-xs-12 col-sm-12 col-md-12" ng-init="getUser()">\n        <ng-transclude></ng-transclude>\n    </div>\n</div>\n'),t.put("components/content-components/inputbox/inputbox.html",'<div class="inputbox">\n    <div class="input-box-wrapper">\n        <div class="box clearfix">\n            <div class="box-content" ng-if="currenttype == \'\'">\n                <div class="titlebar">ADD NEW</div>\n                <div class="flex-container items {{list.length}}">\n                    <div class="item" ng-repeat="item in list" sgl-click="select(item.type)" ng-dblclick="open(item.page)">\n                        <div class="icon icon-fa-{{::item.icon}}" ng-if="item.src != \'\'">\n                            <i class="fa fa-{{::item.icon}}" aria-hidden="true"></i>\n                        </div>\n                        <div class="title">\n                            {{::item.name}}\n                        </div>\n                    </div>\n                </div>\n            </div>\n\n            <div class="forms">\n                <div class="note-tmplt" ng-if="currenttype == \'NOTE\'">\n                    <div class="titlebar">NOTE</div>\n                    <form>\n                        <note-panel note="data.note"></note-panel>\n                    </form>\n                </div>\n                <div class="list-tmplt" ng-if="currenttype == \'LIST\'">\n                    <div class="titlebar">LIST</div>\n                    <form>\n                        <list-panel list="data.list"></list-panel>\n                    </form>\n                </div>\n                <div class="activity-tmplt" ng-if="currenttype == \'ACTY\'">\n                    <div class="titlebar">ACTIVITY</div>\n                    <form>\n                        <activity-panel activity="data.activity"></activity-panel>\n                    </form>\n                </div>\n                <div class="mood-tmplt" ng-if="currenttype == \'MOOD\'">\n                    <div class="titlebar">MOOD</div>\n                    <form>\n                        <div class="inputfield">\n                            <label class="input-title">Mark your mood level</label>\n                            <mood-panel mood="data.mood"></mood-panel>\n                        </div>\n                    </form>\n                </div>\n                <div class="habit-tmplt" ng-if="currenttype == \'HABT\'">\n                    <div class="titlebar">HABIT</div>\n                    <form>\n                        <habit-panel habit="data.habit"></habit-panel>\n                    </form>\n                </div>\n                <div class="fitness-tmplt" ng-if="currenttype == \'HLTH\'">\n                    <div class="titlebar">FITNESS</div>\n                    <form class="fitness-panel">\n                        <fitness-panel fitness="data.fitness"></fitness-panel>\n                        <!-- <div class="add-new">\n                            ADD ANOTHER WORKOUT\n                        </div> -->\n                    </form>\n                </div>\n                <div class="food-tmplt" ng-if="currenttype == \'FOOD\'">\n                    <div class="titlebar">FOOD</div>\n                    <form class="food-panel">\n                        <food-panel food="data.food"></food-panel>\n                        <!-- <div class="add-new">\n                            ADD ANOTHER ITEM\n                        </div> -->\n                    </form>\n                </div>\n                <div class="money-tmplt" ng-if="currenttype == \'MNEY\'">\n                    <div class="titlebar">MONEY</div>\n                    <form>\n                        <finance-panel finance="data.finance"></finance-panel>\n                        <!-- <div class="add-new">\n                            ADD ANOTHER EXPENSE\n                        </div> -->\n                    </form>\n                </div>\n                <div class="places-tmplt" ng-if="currenttype == \'PLCS\'">\n                    <div class="titlebar">PLACE</div>\n                    <form>\n                        <place-panel place="data.place"></place-panel>\n                    </form>\n                </div>\n                <div class="media-tmplt" ng-if="currenttype == \'MDIA\'">\n                    <div class="titlebar">MEDIA</div>\n                    <form>\n                        <media-panel media="data.media"></media-panel>\n                    </form>\n                </div>\n                <div class="people-tmplt" ng-if="currenttype == \'PEPL\'">\n                    <div class="titlebar">PEOPLE</div>\n                    <form>\n                        <people-panel people="data.people"></people-panel>\n                    </form>\n                </div>\n                <div class="calendar-tmplt" ng-if="currenttype == \'CLDR\'">\n                    <div class="titlebar">CALENDAR</div>\n                    <form>\n                        <calendar-panel calendar="data.calendar"></calendar-panel>\n                    </form>\n                </div>\n            </div>\n        </div>\n        <div class="snippet-options clearfix">\n            <div class="options calendar" ng-if="currenttype != \'\' && currenttype != \'HABT\' && currenttype != \'CLDR\'">\n                <calendar date="selected" options="{isShowDate: true, isShowBefore: false}"></calendar>\n                <span>-</span>\n                <timepicker time="selected"></timepicker>\n            </div>\n            <div class="options buttons" ng-show="currenttype != \'\'">\n                <button type="submit" class="btn btn-default" id="reset" ng-click="reset()">Reset</button>\n                <button type="submit" class="btn button-submit" id="submit" ng-click="submit()">Submit</button>\n            </div>\n        </div>\n    </div>\n</div>'),t.put("components/content-components/login/commentpanel.html",'<div class="row">\n    <style>\n        .addcomment {\n            font-weight: normal;\n            text-align: center;\n            text-transform: uppercase;\n        }\n    </style>\n    <div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-10 col-md-offset-1" ng-controller="commentPanelController">\n        <div class="signup-wall">\n            <form class="form-signin" name="registerationForm">\n                <label class="addcomment full-width" for="commentbox">feeback and suggestions here</label>\n                <textarea required class="full-width" name="commentbox" cols="30" rows="10"\n                    ng-model="comment"></textarea>\n                <button type="submit" class="btn btn-lg btn-block btn-register ib-blue-bg"\n                ng-click="registerationForm.$valid && addcomment()">Submit</button>\n                <span class="clearfix"></span>\n            </form>\n        </div>\n        <div class="alert alert-info text-center" role="alert" ng-show="isMessageVisible">{{::message}}</div>\n    </div>\n</div>\n'),t.put("components/content-components/login/loginpanel.html",'<div class="row">\n    <div class="col-xs-12 col-sm-6 col-sm-offset-3 col-md-10 col-md-offset-1">\n        <div class="account-wall">\n            <div class="user text-center">\n                <i class="fa fa-user" aria-hidden="true" style="font-size: 5em;"></i>\n            </div>\n            <form class="form-signin">\n                <div class="inputfield">\n                    <label class="input-title">User Name</label>\n                    <input type="text" ng-model="username" placeholder="" required autofocus="true">\n                </div>\n                <div class="inputfield">\n                    <label class="input-title">Password</label>\n                    <input type="password" ng-model="password" placeholder="" required>\n                </div>\n                <button type="submit" class="btn btn-lg btn-primary btn-block btn-register"\n                ng-click="authenticate()">Sign in</button>\n                <span class="clearfix"></span>\n            </form>\n            <div class="form-signin">\n                <div class="signup">\n                    <p class="text-center">New User</p>\n                    <a href="/#/signup" class="text-center new-account">\n                        <button type="submit" class="btn btn-lg btn-success btn-block">Sign Up</button>\n                    </a>\n                </div>\n            </div>\n            <div class="alert alert-info text-center" role="alert" ng-show="isMessageVisible">{{message}}</div>\n        </div>\n    </div>\n</div>\n'),t.put("components/content-components/login/registerpanel.html",'<div class="row">\n    <div class="col-xs-12 col-sm-6 col-sm-offset-3 col-md-10 col-md-offset-1">\n        <div class="signup-wall">\n            <div class="register" ng-hide="hasInvite">\n                <h3 class="message text-center">\n                    <span>Get a</span>\n                    <span class="empahsis ib-pink-txt" style="padding-left: 5px">\n                        <i class="fa fa-rocket" aria-hidden="true"></i>\n                        <span>beta</span>\n                    </span>\n                    <span>&nbsp;version invite</span>\n                </h3>\n                <form class="form-signin" name="registerationForm">\n                    <div class="inputfield">\n                        <label class="input-title">Full Name</label>\n                        <input required type="text" ng-model="data.fullname" placeholder="" autofocus="{{!hasInvite}}">\n                    </div>\n                    <div class="inputfield">\n                        <label class="input-title">Email</label>\n                        <input required type="email" ng-model="data.email" placeholder="">\n                    </div>\n                    <button type="submit" class="btn btn-lg btn-primary btn-block btn-register"\n                        ng-click="registerationForm.$valid && register() && fbq(\'track\', \'CompleteRegistration\');">Register</button>\n                    <span class="clearfix"></span>\n                </form>\n            </div>\n            <div class="alert alert-info text-center" role="alert" ng-show="isRegisterMessageVisible">{{message}}</div>\n            <div class="invite-code">\n                <h3 class="text-center">Got invite code?</h3>\n                <form class="form-signin" name="inviteForm">\n                    <div class="inputfield">\n                        <label class="input-title">Invite Code</label>\n                        <input required type="text" ng-model="invite.code" placeholder="" autofocus="{{hasInvite}}">\n                    </div>\n                    <button type="submit" class="btn btn-lg btn-success btn-block btn-register"\n                        ng-click="inviteForm.$valid && checkInviteCode() && fbq(\'track\', \'UsedInviteCode\');">Submit</button>\n                    <span class="clearfix"></span>\n                </form>\n            </div>\n            <div class="alert alert-info text-center" role="alert" ng-show="isInviteMessageVisible">{{message}}</div>\n        </div>\n    </div>\n</div>\n'),
t.put("components/content-components/login/signuppanel.html",'<div class="row">\n    <div class="col-md-10 col-md-offset-1">\n        <div class="signup-wall">\n            <form class="form-signin">\n                <div class="inputfield">\n            \t\t<label class="input-title">First Name</label>\n                    <input id="firstname" maxlength="15" required type="text" pattern="[A-Za-z]*"\n                        oninvalid="setCustomValidity(\'Please enter only Alphabets\')" oninput="try{setCustomValidity(\'\')}catch(e){}"\n                        ng-model="registrationInfo.firstName" placeholder="" autofocus="true">\n            \t</div>\n                <div class="inputfield">\n                    <label class="input-title">Last Name</label>\n                    <input id="lastname" maxlength="15" required type="text" pattern="[A-Za-z]*"\n                        oninvalid="setCustomValidity(\'Please enter only Alphabets\')" oninput="try{setCustomValidity(\'\')}catch(e){}"\n                        ng-model="registrationInfo.lastName" placeholder="">\n                </div>\n                <div class="inputfield">\n                    <label class="input-title">Username</label>\n                    <input id="username" maxlength="15" required type="text" pattern="[A-Za-z0-9]*"\n                        oninvalid="setCustomValidity(\'Special characters not allowed\')" oninput="try{setCustomValidity(\'\')}catch(e){}"\n                        ng-model="registrationInfo.username" placeholder="">\n                </div>\n                <div class="inputfield">\n                    <label class="input-title">Password</label>\n                    <input required type="text" ng-model="registrationInfo.password" placeholder="" class="nomargin">\n                </div>\n                <div class="inputfield">\n                    <label class="input-title">Email</label>\n                    <input required type="email" ng-model="registrationInfo.email" placeholder=""\n                        oninvalid="setCustomValidity(\'Please enter an email address\')" oninput="try{setCustomValidity(\'\')}catch(e){}">\n                </div>\n                <button type="submit" class="btn btn-lg btn-primary btn-block btn-register" ng-click="registerUser()">Submit</button>\n                <span class="clearfix"></span>\n            </form>\n            <div class="alert alert-info text-center" role="alert" ng-show="isMessageVisible">{{message}}</div>\n            <div class="form-signin">\n                <div class="login">\n                    <p class="text-center">Already have an account</p>\n                    <a href="/#/login" class="text-center new-account">\n                        <button type="submit" class="btn btn-lg btn-success btn-block">Sign In</button>\n                    </a>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n'),t.put("components/content-components/sidebar/sidebar-card.html",'<div class="sidebar-card">\n\t<!-- Habit with trail only -->\n\t<div class="details" ng-if="data.type == \'HBTR\'">\n\t\t<div class="row-one">\n\t\t\t<checkbox label="data.label" name="data.hashid"\n\t\t\t\tis-checked="data.isChecked" mark-checkbox-fn="markCheckbox(data.hashid, data.isChecked)"></checkbox>\n\t\t\t<div class="info">\n\t\t\t\t<trail binary="data.binaryTrail"></trail>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<!-- Habit with trail and time -->\n\t<div class="details" ng-if="data.type == \'HBTT\'">\n\t\t<div class="row-one">\n\t\t\t<checkbox label="data.label" name="data.hashid"\n\t\t\t\tis-checked="data.isChecked" mark-checkbox-fn="markCheckbox(data.hashid, data.isChecked)"></checkbox>\n\t\t\t<div class="info">\n\t\t\t\t<trail binary="data.binaryTrail"></trail>\n\t\t\t\t<div class="time">{{data.date | date:"h:mma"}}</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<!-- Calendar reminder without time -->\n\t<div class="details" ng-if="data.type == \'CMWT\'">\n\t\t<div class="row-one">\n\t\t\t<checkbox label="data.label ? data.label : \'Event\'" name="data.hashid"\n\t\t\t\t is-checked="data.isChecked" mark-checkbox-fn="markCheckbox(data.hashid, data.isChecked)"></checkbox>\n\t\t</div>\n\t</div>\n\t<!-- Calendar reminder based on time -->\n\t<div class="details" ng-if="data.type == \'CRBT\'">\n\t\t<div class="row-one">\n\t\t\t<checkbox label="data.label ? data.label : \'Event\'" name="data.hashid"\n\t\t\t\t is-checked="data.isChecked" mark-checkbox-fn="markCheckbox(data.hashid, data.isChecked)"></checkbox>\n\t\t\t<div class="info">\n\t\t\t\t<div class="time">{{data.times[\'START\'].date | date:"h:mma"}}</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<!-- Calendar meeting with time and location -->\n\t<div class="details" ng-if="data.type == \'CMTL\'">\n\t\t<div class="row-one">\n\t\t\t<checkbox label="data.label ? data.label : \'Event\'" name="data.hashid"\n\t\t\t\t is-checked="data.isChecked" mark-checkbox-fn="markCheckbox(data.hashid, data.isChecked)"></checkbox>\n\t\t\t<div class="info">\n\t\t\t\t<div class="time">\n\t\t\t\t\t{{ "" | datediff: data.times[\'START\'].date : data.times[\'END\'].date }}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row-two">\n\t\t\t<div class="location">\n\t\t\t\t<i class="fa fa-map-marker map-icon" aria-hidden="true"></i>\n\t\t\t\t<span class="text">{{data.locationText}}</span>\n\t\t\t</div>\n\t\t\t<div class="time-range">\n\t\t\t\t<div class="period">{{data.times[\'START\'].date | date:"h:mma"}} - {{data.times[\'END\'].date | date:"h:mma"}}</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/content-components/sidebar/sidebar-template.html",'<div class="action-bar">\n    <div class="section">\n        <div class="title">\n            <span ng-show="isTodaysDate.isTrue">Today</span>\n            <span ng-hide="isTodaysDate.isTrue">{{currentDate | date:"d MMM yyyy"}}</span>\n        </div>\n        <div class="content">\n            <div class="morning">\n                <div class="heading">Morning</div>\n                <div class="cards" ng-repeat="item in data.all.current.morning">\n                    <sidebar-card data="item"></sidebar-card>\n                </div>\n                <div class="message" ng-hide="data.all.current.morning.length > 0">\n                    Nothing planned\n                </div>\n            </div>\n            <div class="afternoon">\n                <div class="heading">Afternoon</div>\n                <div class="cards" ng-repeat="item in data.all.current.afternoon">\n                    <sidebar-card data="item"></sidebar-card>\n                </div>\n                <div class="message" ng-hide="data.all.current.afternoon.length > 0">\n                    Nothing planned\n                </div>\n            </div>\n            <div class="evening">\n                <div class="heading">Evening</div>\n                <div class="cards" ng-repeat="item in data.all.current.evening">\n                    <sidebar-card data="item"></sidebar-card>\n                </div>\n                <div class="message" ng-hide="data.all.current.evening.length > 0">\n                    Nothing planned\n                </div>\n            </div>\n            <div class="night">\n                <div class="heading">Night</div>\n                <div class="cards" ng-repeat="item in data.all.current.night">\n                    <sidebar-card data="item"></sidebar-card>\n                </div>\n                <div class="message" ng-hide="data.all.current.night.length > 0">\n                    Nothing planned\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n'),t.put("components/content-components/timeline/timeline-template.html",'<div class="timeline-template item {{itemType}}"\n\tsetequalheight=\'{"main": ".timeline-detail", "others": ["", ".location .line",".timeline-bar", ".details"], "offset":["0","{{iconOffset}}","0", "0"]}\'>\n\t<div class="location {{item.isLocationInfoAvailable ? \'\' : \'invisible\'}}">\n\t\t<div class="timeline-item {{item.isInSameLocation?\'no-icon\':\'icon\'}}">\n\t\t\t<i ng-hide="item.isInSameLocation" class="{{item.locntype == \'UNKN\' ?\'fa fa-globe\':\'fa fa-globe\'}} {{item.type}}" aria-hidden="true"></i>\n\t\t</div>\n\t\t<div class="timeline-item line"></div>\n\t</div>\n\t<div class="timeline-bar"></div>\n\t<div class="details">\n\t\t<div class="timeline-info col-xs-3">\n\t\t\t<type-and-time data="{\'type\': item.type, \'timestamp\': item.timestamp}"></type-and-time>\n\t\t</div>\n\t\t<div class="timeline-detail col-xs-9">\n\t\t\t<ng-include src="template"/>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/content-components/timeline/timeline.html",'<div class="timeline">\n    <h3 class="timeline-title hidden-xs">Day Progress</h3>\n    <!-- <pre ng-hide="isDemo">{{templates | json}}</pre> -->\n    <div class="timeline-item-pane">\n        <div class="date">\n            <div class="back" ng-click="changeDate(-1)">\n                <i class="fa fa-angle-left" aria-hidden="true"></i>\n            </div>\n            <div class="currentdate">\n                <div class="day">{{currentDate | date:"d MMM"}}</div>\n                <div class="dayofweek">{{currentDate | date:"EEEE"}}</div>\n            </div>\n            <div class="next" ng-click="changeDate(1)">\n                <i class="fa fa-angle-right" aria-hidden="true"></i>\n            </div>\n        </div>\n        <div class="column">\n            <div class="item first">\n                <div class="location" ng-click="reverseItems()">\n                    <i class="fa fa-exchange" aria-hidden="true"\n                        ng-show="timelineItems.length > 0"></i>\n                </div>\n                <div class="timeline-bar"></div>\n                <div class="details" ng-class="{\'hide\': timelineItems.length === 0}"></div>\n            </div>\n            <div ng-repeat="item in timelineItems">\n                <timeline-template item="item"></timeline-template>\n            </div>\n            <div class="item message" ng-hide="timelineItems.length > 0">\n                <div class="location none"></div>\n                <div class="timeline-bar"></div>\n                <div class="details">\n                    <div class="icon">\n                        <i ng-show="isLoading.value" class="fa fa-cog fa-spin fa-fw" aria-hidden="true"></i>\n                        <i ng-show="!isLoading.value" class="fa fa-anchor" aria-hidden="true"></i>\n                    </div>\n                    <div class="text">\n                        <span ng-show="isLoading.value">Loading snippets</span>\n                        <span ng-show="!isLoading.value">Nothing to show here</span>\n                    </div>\n                </div>\n            </div>\n            <div class="item last">\n                <div class="location">\n                    <div class="timeline-item {{::isLocationAvlbl ? \'line\' : \'none\'}}">\n                    </div>\n                </div>\n                <div class="timeline-bar"></div>\n                <div class="details"></div>\n            </div>\n        </div>\n    </div>\n    <div class="habit-item-pane visible-xs">\n        <div ng-repeat="item in habitItems">\n            <pre>{{item | json}}</pre><br>\n        </div>\n    </div>\n</div>\n'),t.put("components/content-components/timeline/type-and-time.html",'<div class="type-and-time {{::data.type | lowercase}}">\n\t<div class="type">\n\t\t<i class="fa fa-{{::data.type | typelabel}} icon" aria-hidden="true"></i>\n\t</div>\n\t<div class="timestamp">\n\t\t<div class="humantime">{{::data.timestamp | date:"h:mm a"}}</div>\n\t</div>\n</div>'),t.put("components/feature-components/activity/activity-card.html",'<div class="activity-card">\n\t<div class="summary">\n\t\t<div class="fields">\n\t\t\t<div class="title field">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-file-text-o" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t{{::(item.data.activitytype ? item.data.activitytype : \'No Activity Type\')}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="time field">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa" aria-hidden="true"\n\t\t\t\t\t\tng-class="\'fa-\' + (item.data.activitytype | activityicon)"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t{{::(item.data.details ? item.data.details : \'No Activity Type\')}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'),t.put("components/feature-components/activity/activity-panel.html",'<div class="activity-panel">\n\t<div class="activity-type">\n\t\t<div class="inputfield">\n\t\t\t<!-- Activity Panel: List activites and on selection of one, display note -->\n\t\t\t<label class="input-title">Choose type</label>\n\t\t\t<div class="menu clearfix">\n\t\t\t\t<div class="menuitem col-xs-4 col-sm-2" ng-repeat="activityObj in activities">\n\t\t\t\t\t<div class="icon"></div>\n\t\t\t\t\t<button class="choice btn btn-choice activity" chooseone="activity"\n\t\t\t\t\t\tng-click="setActivityType(activityObj.code)">{{activityObj.desc}}</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="activity-option" ng-show="activity._.isVisible.subtype == true">\n\t\t<!-- SLEEPING -->\n\t\t<div class="inputfield sleeping" ng-show="activity._.isVisible.sleeptype == true">\n\t\t\t<label class="input-title">Select detail</label>\n\t\t\t<div class="menu clearfix">\n\t\t\t\t<div class="menuitem col-xs-4 col-sm-2">\n\t\t\t\t\t<div class="icon"></div>\n\t\t\t\t\t<button class="choice btn btn-choice activity" chooseone="subactivity"\n\t\t\t\t\t\tng-click="setActivitySubType(\'SLEEP\')">Off to sleep</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="menuitem col-xs-4 col-sm-2">\n\t\t\t\t\t<div class="icon"></div>\n\t\t\t\t\t<button class="choice btn btn-choice activity" chooseone="subactivity"\n\t\t\t\t\t\tng-click="setActivitySubType(\'AWAKE\')">Woke up</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- MORE TEXT -->\n\t\t<div class="inputfield text" ng-show="activity._.isVisible.details == true">\n\t\t\t<label class="input-title">{{activity.subtypeTitle}}</label>\n\t\t\t<input type="text" name="" class="" ng-model="activity.details"\n\t\t\t\t on-action="\'KEYUP, [whom, note], true\'" scope-obj="activity._.isVisible">\n\t\t</div>\n\t\t<div class="inputfield text" ng-show="activity.activitytype == \'TRVLG\'">\n\t\t\t<label class="input-title">Via</label>\n\t\t\t<input type="text" name="" class="" ng-model="activity.travellingvia"\n\t\t\t\t on-action="\'KEYUP, [whom, note], true\'" scope-obj="activity._.isVisible">\n\t\t</div>\n\t</div>\n\t<div class="whom" ng-show="activity._.isVisible.whom == true">\n\t\t<div class="inputfield secondary-detail">\n\t        <label class="input-title">Who is with you</label>\n\t        <tags-autocomplete choices="activity._.names" enteredtext="activity.whom.text"\n\t            minlength="1" placeholder="" result="activity.whom.peopleobj" type="\'WHOM\'"\n\t            tags="activity.whom.taglist"></tags-autocomplete>\n\t    </div>\n\t</div>\n\t<div class="note" ng-show="activity._.isVisible.note == true">\n\t\t<div class="inputfield secondary-detail">\n\t\t\t<label class="input-title">More info</label>\n\t\t\t<editor scope-obj="activity.note" is-editable="true"></editor>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/feature-components/calendar/calendar-card.html",'<div class="calendar-card">\n\t<div class="summary">\n\t\t<div class="fields">\n\t\t\t<div class="title field">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-file-text-o" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t{{::(item.data.title ? item.data.title : \'Event\')}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="time field" ng-show="item.data.time.code">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-at" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\tTime:  {{::item.data.time.code}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="dates field" ng-show="item.data.dates.START.isDateSet || item.data.dates.END.isDateSet">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-calendar-minus-o" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t<div ng-show="item.data.dates.START.isDateSet">\n\t\t\t\t\t\tFrom:  {{::item.data.dates.START.date  | date:\'d MMM yyyy\'}}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div ng-show="item.data.dates.END.isDateSet">\n\t\t\t\t\t\tTill:  {{::item.data.dates.END.date  | date:\'d MMM yyyy\'}}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="repeats field" ng-show="item.data.repetition.repeats">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-refresh" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\tRepeats:  {{::item.data.repetition.repeats}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="where field" ng-show="item.data.placetext">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-map-marker" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\tWhere: {{::item.data.placetext}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="whom field" ng-show="item.data.calendarwhotext">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-user" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\tPeople: {{::(item.data.attendees.tagstext ? item.data.attendees.tagstext : \'None\')}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'),t.put("components/feature-components/calendar/calendar-panel.html",'<div class="calendar-panel">\n\t<div class="inputfield">\n\t\t<label class="input-title">Title</label>\n\t\t<input class="input-value" type="text" ng-model="calendar.title">\n\t</div>\n\t<div class="inputfield">\n\t\t<label class="input-title">Start & End Date</label>\n\t\t<calendar-dual dates="calendar.dates"></calendar-dual>\n\t</div>\n\t<div class="inputfield" on-action="\'CLICK, optional, true\'" scope-obj="calendar._.isVisible">\n\t\t<label class="input-title">Choose Time</label>\n\t\t<totaltimeselector times="calendar.times"></totaltimeselector>\n\t</div>\n\t<div class="inputfield" ng-show="calendar._.isVisible.optional == true">\n\t\t<label class="input-title">Repeatition</label>\n\t\t<repetition repetition="calendar.repetition" defaults="calendar.defaults"></repetition>\n\t</div>\n\t<div class="inputfield" ng-show="calendar._.isVisible.optional == true">\n\t\t<label class="input-title">Where</label>\n\t\t<autocomplete choices="calendar._.places" enteredtext="calendar.placetext" \n            minlength="1" result="calendar.placeobj" type="\'WHERE\'"></autocomplete>\n\t</div>\n\t<div class="inputfield" ng-show="calendar._.isVisible.optional == true">\n\t\t<label class="input-title">Attendees</label>\n\t\t<tags-autocomplete choices="calendar._.attendees" enteredtext="calendar.attendees.text"\n            minlength="1" placeholder="" result="calendar.attendees.attendeesobj" type="\'WHOM\'" \n            tags="calendar.attendees.taglist"></tags-autocomplete>\n\t</div>\n</div>'),t.put("components/feature-components/contact/contact.html",'<div>\n    <div class="content-wrapper">\n        <div class="quotation"><h1 class="quote">We know you are interested in many things. We let you know if any of your interest is losing your attention.</h1></div>\n    </div>\n    <div class="contact-wrapper content-wrapper">\n      <div class="contact">\n          <div class="contact-links">\n            <h1 class="contact-title">Stay Interested</h1>\n            <table class="contact-list">\n              <tbody>\n                <tr class="item"><td class="name">Twitter</td><td class="link"><a href="https://twitter.com/multiinterested">twitter.com/multiinterested</a></td></tr>\n                <tr class="item"><td class="name">Facebook</td><td class="link"><a href="https://www.facebook.com/multi.interested">facebook.com/multi.interested</a></td></tr>\n              </tbody>\n            </table>\n          </div>\n      </div>\n    </div>\n</div>\n'),t.put("components/feature-components/finance/finance-card.html",'<div class="finance-card">\n\t<div class="summary" ng-repeat="finance in item.data.list"\n\t\tng-hide="finance.amount === \'\' && item.data.list.length > 1">\n\t\t<div class="title field">\n\t\t\t<div class="icon">\n\t\t\t\t<i class="fa fa-file-text-o" aria-hidden="true"></i>\n\t\t\t</div>\n\t\t\t<div class="desc">\n\t\t\t\t{{::(finance.title ? finance.title : \'No Title\')}}\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="fields">\n\t\t\t<div class="amount field">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-money" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t<span>Amount:</span>\n\t\t\t\t\t<span>{{::(finance.amount ? finance.amount : 0)}}</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="paidby field" ng-show="finance.paidby.taglist.length > 0">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-user" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t<span>Paid by:</span>\n\t\t\t\t\t<tags-list taglist="finance.paidby.taglist"></tags-list>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="splitbtw field"\n\t\t\t\tng-show="finance.splitbtw.taglist.length > 0 && finance.splitbytype !== undefined">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-user" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t<span>Split btw:</span>\n\t\t\t\t\t<tags-list taglist="finance.splitbtw.taglist"></tags-list>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="splitbtw field" ng-show="finance.splitbytype !== undefined">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-user" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t<span>Split by:</span>\n\t\t\t\t\t<span>{{ finance.splitbytype | codeconvert }}</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/feature-components/finance/finance-member-info.html",'<div class="memberinfo">\n    <div class="transaction splitequally" ng-if="type === \'EQLY\'">\n        <div class="spent" ng-if="details.name === \'Myself\'">\n            <!-- You spent/owe Person 321 -->\n            <span class="desc">\n                <span class="text-capitalize">You</span>\n                <span ng-show="paidby[0].text === \'Myself\'">spent</span>\n                <span ng-show="paidby[0].text !== \'Myself\'">owe <span class="text-capitalize">{{paidby[0].text}}</span></span>\n            </span>\n            <span class="amount" ng-show="details.amount && details.amount > 0">{{details.amount / size}}</span>\n        </div>\n        <div class="owes" ng-if="details.name !== \'Myself\'">\n            <!-- Person owes You/Someone 123 -->\n            <span class="desc">\n                <span class="text-capitalize">{{details.name}}</span>\n                <span>owes</span>\n                <span class="text-capitalize" ng-show="paidby[0].text === \'Myself\'">You</span>\n                <span class="text-capitalize" ng-show="paidby[0].text !== \'Myself\'">{{paidby[0].text}}</span>\n            </span>\n            <span class="amount" ng-show="details.amount && details.amount > 0">{{details.amount / size}}</span>\n        </div>\n    </div>\n    <div class="transaction splitbypayment" ng-if="type === \'PMNT\'">\n        <div class="payment">\n            <span class="desc">\n                <span class="text-capitalize">{{ details.name === \'Myself\' ? \'You\' : details.name }}</span>\n                <span>paid</span>\n            </span>\n            <input class="amount-paid" type="text" ng-model="paidby[index].amount">\n            <span class="amount">\n                <span>of {{ details.amount }}</span>\n            </span>\n        </div>\n    </div>\n</div>\n'),t.put("components/feature-components/finance/finance-panel.html",'<div class="finance-panel">\n    <finance-summary data="finance"></finance-summary>\n    <div class="inputfield">\n        <label class="input-title">Expense Title</label>\n        <autocomplete choices="finance._.peoples" enteredtext="finance.list[0].title"\n            minlength="1" result="finance.list[0].expenseobj" type="\'WHOM\'"></autocomplete>\n    </div>\n    <div class="inputfield">\n        <label class="input-title">Amount</label>\n        <input class="input-value" type="number" ng-model="finance.list[0].amount">\n    </div>\n    <div class="inputfield" on-action="\'[CLICK, KEYUP], [splitbtw, splitby], [true, true]\'"\n        scope-obj="finance._.isVisible">\n        <label class="input-title">Paid By</label>\n        <tags-autocomplete choices="finance._.attendees" enteredtext="finance.list[0].paidby.text"\n            minlength="1" placeholder="" result="finance.list[0].paidby.whomobj" type="\'WHOM\'"\n            tags="finance.list[0].paidby.taglist"></tags-autocomplete>\n    </div>\n    <div class="inputfield" ng-show="finance._.isVisible.splitbtw === true">\n        <label class="input-title">Split Between</label>\n        <tags-autocomplete choices="finance._.attendees" enteredtext="finance.list[0].splitbtw.text"\n            minlength="1" placeholder="Me" result="finance.list[0].splitbtw.whomobj" type="\'WHOM\'"\n            tags="finance.list[0].splitbtw.taglist"></tags-autocomplete>\n    </div>\n    <div class="inputfield" ng-show="finance._.isVisible.splitby === true">\n        <label class="input-title">Split By</label>\n        <div class="payment-type">\n            <button class="choice btn btn-choice" chooseone="choosetime"\n                ng-click="finance.list[0].splitbytype = \'EQLY\'" ng-hide="finance.list[0].paidby.taglist.length > 1">Equally</button>\n            <!-- <button class="choice btn btn-choice" chooseone="choosetime"\n                ng-click="finance.list[0].splitbytype = \'PRTS\'" ng-hide="finance.list[0].paidby.taglist.length > 1">Part</button>\n            <button class="choice btn btn-choice" chooseone="choosetime"\n                ng-click="finance.list[0].splitbytype = \'PRCT\'" ng-hide="finance.list[0].paidby.taglist.length > 1">Percent</button> -->\n            <button class="choice btn btn-choice" chooseone="choosetime"\n                ng-click="finance.list[0].splitbytype = \'PMNT\'" ng-show="finance.list[0].paidby.taglist.length > 1">Payment</button>\n        </div>\n    </div>\n    <div class="sub-panel" ng-hide="finance.list[0].splitbytype === undefined">\n        <div class="more-details">\n            <div class="members paid-by-one" ng-if="finance.list[0].splitbytype !== \'PMNT\'">\n                <div class="member" ng-repeat="person in finance.list[0].splitbtw.taglist">\n                    <finance-member-info details="{\'name\': person.text, \'amount\': finance.list[0].amount}" paidby="finance.list[0].paidby.taglist"\n                        size="finance.list[0].splitbtw.taglist.length" type="finance.list[0].splitbytype"></finance-member-info>\n                </div>\n            </div>\n            <div class="members paid-by-many" ng-if="finance.list[0].splitbytype === \'PMNT\'">\n                <div class="member" ng-repeat="person in finance.list[0].paidby.taglist">\n                    <finance-member-info details="{\'name\': person.text, \'amount\': finance.list[0].amount}" paidby="finance.list[0].paidby.taglist"\n                        index="$index" size="finance.list[0].splitbtw.taglist.length" type="finance.list[0].splitbytype"></finance-member-info>\n                </div>\n                <div class="remaining" ng-show="finance.list[0].amount > 0">\n                    <span>REMAINING</span>\n                    <span ng-class="{\'text-danger\': remainingAmount < 0}"\n                        ng-bind="remainingAmount = (finance.list[0].amount - (finance.list[0].paidby.taglist | arraysum: {name: \'amount\'}) )">\n                        {{ remainingAmount }}\n                    </span>\n                    <span>of {{ finance.list[0].amount }}</span>\n                </div>\n            </div>\n        </div>\n    </div>\n    <div class="inputfield">\n\t\t<button class="btn btn-default full-width add-another" ng-click="addNewItem()">ADD NEW</button>\n\t</div>\n</div>\n'),t.put("components/feature-components/finance/finance-summary.html",'<div class="finance-summary" ng-show="financeList.length > 0">\n    <div class="heading">\n        Summary\n    </div>\n    <div class="all">\n        <div class="summary-item" ng-repeat="financeitem in financeList = (finance.list | filterByIndex: { exclude: true, index: 0 })">\n            <div class="each">\n                <div class="heading">\n                    <div class="title">{{financeitem.title.length > 0 ? financeitem.title : \'No title\'}}</div>\n                    <div class="amount">{{financeitem.amount ? financeitem.amount : \'No amount entered\'}}</div>\n                </div>\n                <div class="paidby">\n                    <span class="title">Paid by:</span>\n                    <tags-list taglist="financeitem.paidby.taglist"></tags-list>\n                </div>\n                <div class="splitbtw" ng-hide="financeitem.paidby.taglist.length === 1 && financeitem.paidby.taglist[0] === \'Myself\'\n                    && financeitem.splitbtw.taglist.length === 1 && financeitem.splitbtw.taglist[0] === \'Myself\'">\n                    <span class="title">Split between:</span>\n                    <tags-list taglist="financeitem.splitbtw.taglist"></tags-list>\n                </div>\n                <div class="splitby" ng-hide="financeitem.splitbytype === undefined">\n                    <span class="title">Split by:</span>\n                    <span class="type">\n                        <span>{{financeitem.splitbytype | codeconvert}}</span>\n                    </span>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n'),t.put("components/feature-components/finance/finance-widget.html",'<div class="widget finance">\n    <div class="title">Money</div>\n    <div class="content clearfix">\n        <div class="wd-row clearfix" ng-if="stats.count > 0">\n            <div class="wd-label left col-xs-6">\n                <div class="desc">Today</div>\n                <div class="value">{{stats.result.myself.amount_day}}</div>\n            </div>\n            <div class="wd-label right col-xs-6">\n                <div class="desc">Month</div>\n                <div class="value">{{stats.result.myself.amount_month}}</div>\n            </div>\n        </div>\n        <!-- <div class="wd-row clearfix">\n            <div class="wd-label right col-xs-6">\n                <div class="desc">Borrowed</div>\n                <div class="value">{{data.borrowed}}</div>\n            </div>\n            <div class="wd-label left col-xs-6">\n                <div class="desc">Lent</div>\n                <div class="value">{{data.lent}}</div>\n            </div>\n        </div>\n        <div class="wd-centered col-xs-12">\n        \t<div class="wd-label">\n               <div class="desc">Remaining</div>\n               <div class="value">{{data.remaining}}</div>\n           </div>\n       </div> -->\n       <div class="under-construction text-center" ng-if="stats.count === 0">\n           <div class="wait">\n               <i class="fa fa-plane" aria-hidden="true"></i>\n           </div>\n           <p class="message text-uppercase">Money isnt so worthless</p>\n       </div>\n   </div>\n</div>\n'),t.put("components/feature-components/finance/finance.html",'<div class="finance-list">\n    <select-time choosen="choosen" get-data="getMoneyData"></select-time>\n    \n    <h1 class="page-title">\n        <span class="title">Finances</span>\n    </h1>\n    Search: <input ng-model="query" />\n\n    <div class="finance" ng-repeat="expenses in finances track by $index"  ng-if="expenses">\n        <h3 class="month">\n            <span class="month-name">{{$index | monthbyindex}}</span>\n            <span class="month-expenses">{{expenses.total = getTotal(filteredExpenses,\'amount\')}}</span>\n        </h3>\n        <div class="list" ng-repeat="expense in filteredExpenses = (expenses | filter:query)">\n            <buble size="expense.size" title="expense.title" value="expense.amount"></buble>\n        </div>\n    </div>\n</div>'),
t.put("components/feature-components/fitness/fitness-card.html",'<div class="fitness-card">\n\t<div class="summary" ng-repeat="workout in (item.data.list |\n\t\tfilterByValue: {name: \'workouttitle\', type:\'EXCL\', value: \'\'})">\n\t\t<div class="title field">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-file-text-o" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t{{::(workout.workouttitle ? workout.workouttitle : \'No Title\')}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t<div class="sets">\n\t\t\t<div class="set title-icon" ng-show="workout.sets.length > 0">\n\t\t\t\t<div class="repetition field">\n\t\t\t\t\t<div class="icon">\n\t\t\t\t\t\t<i class="fa fa-repeat" aria-hidden="true"></i>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="weight field">\n\t\t\t\t\t<div class="icon">\n\t\t\t\t\t\t<i class="fa fa-balance-scale" aria-hidden="true"></i>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="time field">\n\t\t\t\t\t<div class="icon">\n\t\t\t\t\t\t<i class="fa fa-clock-o" aria-hidden="true"></i>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="time field">\n\t\t\t\t\t<div class="icon">\n\t\t\t\t\t\t<i class="fa fa-arrows-h" aria-hidden="true"></i>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="set" ng-repeat="set in workout.sets">\n\t\t\t\t<div>\n\t\t\t\t\t<div class="repetition field">\n\t\t\t\t\t\t<div class="desc">\n\t\t\t\t\t\t\t{{::(set.repetition != \'\' ? set.repetition : \'-\')}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="weight field">\n\t\t\t\t\t\t<div class="desc">\n\t\t\t\t\t\t\t{{::(set.weight != \'\' ? set.weight : \'-\')}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="time field">\n\t\t\t\t\t\t<div class="desc">\n\t\t\t\t\t\t\t{{::(set.time != \'\' ? set.time : \'-\')}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="distance field">\n\t\t\t\t\t\t<div class="desc">\n\t\t\t\t\t\t\t{{::(set.distance != \'\' ? set.distance : \'-\')}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/feature-components/fitness/fitness-panel.html",'<div>\n    <fitness-summary data="fitness"></fitness-summary>\n    <div class="inputfield">\n        <label class="input-title">Workout Title</label>\n        <autocomplete choices="fitness._.workouts" enteredtext="fitness.list[0].workouttitle" \n        minlength="1" result="fitness.workoutobj" type="\'WORKOUT\'"></autocomplete>\n    </div>\n    <div class="inputfield">\n        <label class="input-title">Sets</label>\n        <div class="items" ng-repeat="set in fitness.list[0].sets">\n          <add-new-set data="fitness.list[0].sets" index="$index"></add-new-set>\n        </div>\n    </div>\n    <div class="inputfield">\n        <button class="btn btn-default full-width add-another"\n        ng-click="addNewItem()">ADD NEW WORKOUT</button>\n    </div>\n</div>'),t.put("components/feature-components/fitness/fitness-set.html",'<div class="input-value-wrapper">\n\t<label class="input-value">Set {{index + 1}}</label>\n\t<input class="input-value" type="number" ng-model="sets[index].repetition" placeholder="Repetition">\n\t<input class="input-value" type="text" ng-model="sets[index].weight" placeholder="Weight">\n\t<input class="input-value" type="text" ng-model="sets[index].time" placeholder="Time">\n\t<input class="input-value" type="text" ng-model="sets[index].distance" placeholder="Distance">\n</div>\n'),t.put("components/feature-components/fitness/fitness-summary.html",'<div class="fitness-summary" ng-show="fitnessList.length > 0">\n\t<div class="heading">\n\t\tSummary\n\t</div>\n\t<div class="workout"\n\t\tng-repeat="workout in fitnessList = (fitness.list | filterByIndex: { exclude: true, index: 0 })">\n\t\t<div class="summary">\n\t\t\t<div class="title">{{ workout.workouttitle.length > 0 ? \'TITLE: \' : \'NO TITLE\'}}{{ workout.workouttitle }}</div>\n\t\t\t<div class="set" ng-repeat="set in workout.sets">\n\t\t\t\t<div class="set-details" ng-show="set.repetition != \'\' || set.weight != \'\' || set.distance != \'\' || set.time != \'\'">\n\t\t\t\t\t<div class="set-number">Set {{ $index + 1}}</div>\n\t\t\t\t\t<div class="repetition">{{set.repetition !== \'\' ? set.repetition : \'-\'}}</div>\n\t\t\t\t\t<div class="weight">{{set.weight !== \'\' ? set.weight : \'-\'}}</div>\n\t\t\t\t\t<div class="distance">{{set.distance !== \'\' ? set.distance : \'-\'}}</div>\n\t\t\t\t\t<div class="time">{{set.time !== \'\' ? set.time : \'-\'}}</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/feature-components/fitness/fitness-widget.html",'<div class="widget fitness">\n    <div class="title">Workout</div>\n    <div class="content clearfix">\n        <div class="info" ng-hide="data.workouts.length === 0">\n            <div class="wd-row">\n                <div class="wd-values clearfix" ng-repeat="workout in data.workouts">\n                    <div class="wd-label left col-xs-6">\n                        <div class="value">{{workout.workouttitle}}</div>\n                    </div>\n                    <div class="wd-label right col-xs-6">\n                        <div class="value">{{workout.sets.length}} Sets</div>\n                    </div>\n                    <div class="wd-moreinfo col-xs-12">\n                        {{ workout | workoutSummary }}\n                    </div>\n                </div>\n            </div>\n            <div class="wd-centered col-xs-12">\n                <div class="wd-label">\n                    <div class="value">\n                        {{data.message}}\n                    </div>\n                </div>\n            </div>\n        </div>\n        <div class="under-construction text-center" ng-show="data.workouts.length === 0">\n            <div class="wait">\n                <i class="fa fa-bed" aria-hidden="true"></i>\n            </div>\n            <p class="message text-uppercase">Why no training</p>\n        </div>\n    </div>\n</div>\n'),t.put("components/feature-components/food/food-card.html",'<div class="food-card">\n\t<div class="food-template">\n\t\t<div class="summary">\n\t\t\t<div class="quantity field">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-cutlery" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t<div class="" ng-repeat="fooditem in fooditems = (item.data.list |\n\t\t\t\t\t\tfilterByValue: {name: \'mealtype\', type:\'EXCL\', value: \'\'})">\n\t\t\t\t\t\t<span class="title">{{::(fooditem.foodtext ? fooditem.foodtext : \'No Title\')}}</span>\n\t\t\t\t\t\t<span class="qty" ng-show="fooditem.qtytype != \'\'">{{::fooditem.quantity}}</span>\n\t\t\t\t\t\t<span class="type">{{::fooditem.qtytype | quantityType}}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="calories field">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-bolt" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t{{ item.data.list | totalCaloriesCount }} calories\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/feature-components/food/food-panel.html",'<div>\n\t<food-summary data="food"></food-summary>\n\t<div class="inputfield first">\n\t\t<label class="input-title">Food Title</label>\n\t\t<autocomplete choices="food._.foodlist" enteredtext="food.list[0].foodtext"\n\t\tminlength="1" result="food.foodobj" type="\'FOOD\'"></autocomplete>\n\t</div>\n\t<div class="inputfield">\n\t\t<label class="input-title">Food Type</label>\n\t\t<div class="food-type choose-one">\n\t\t\t<button class="choice btn btn-choice" chooseone="foodtype"\n\t\t\ton-action="\'CLICK, [mealtype, solidfood, litrefood], [true, true, false]\'"\n\t\t\tscope-obj="isVisible" ng-click="setType(\'FOOD\')">Food</button>\n\t\t\t<button class="choice btn btn-choice" chooseone="foodtype"\n\t\t\ton-action="\'CLICK, [mealtype, solidfood, litrefood], [true, false, true]\'"\n\t\t\tscope-obj="isVisible" ng-click="setType(\'DRNK\')">Drink</button>\n\t\t</div>\n\t</div>\n\t<div class="inputfield" ng-show="isVisible.mealtype">\n\t\t<label class="input-title">Food Quantity</label>\n\t\t<div class="quantity-selector choose-one">\n\t\t\t<div class="choose-items">\n\t\t\t\t<input class="quantity" maxlength="5" ng-model="food.list[0].quantity" type="number"/>\n\t\t\t</div>\n\t\t\t<div class="choose-container">\n\t\t\t\t<button class="choice btn btn-choice" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.solidfood" ng-click="setQtyType(\'PCE\')">Piece</button>\n\t\t\t\t<button class="choice btn btn-choice" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.solidfood" ng-click="setQtyType(\'TSP\')">Tbsp</button>\n\t\t\t\t<button class="choice btn btn-choice" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.solidfood" ng-click="setQtyType(\'BWL\')">Bowl</button>\n\t\t\t\t<button class="choice btn btn-choice" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.litrefood" ng-click="setQtyType(\'CUP\')">Cup</button>\n\t\t\t\t<button class="choice btn btn-choice" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.litrefood" ng-click="setQtyType(\'GLS\')">Glass</button>\n\t\t\t\t<button class="choice btn btn-choice" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.litrefood" ng-click="setQtyType(\'BTL\')">Bottle</button>\n\t\t\t\t<button class="choice btn btn-choice" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.litrefood" ng-click="setQtyType(\'PTR\')">Pitcher</button>\n\t\t\t\t<button class="choice btn btn-choice" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.litrefood" ng-click="setQtyType(\'TWR\')">Tower</button>\n\t\t\t\t<button class="choice btn btn-choice weights" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.solidfood" ng-click="setQtyType(\'ONC\')">Ounce</button>\n\t\t\t\t<button class="choice btn btn-choice weights" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.solidfood" ng-click="setQtyType(\'GRM\')">Gram</button>\n\t\t\t\t<button class="choice btn btn-choice weights" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.litrefood" ng-click="setQtyType(\'LTR\')">Litre</button>\n\t\t\t</div>\n\t\t\t<div class="choose-weight">\n\t\t\t\t<button class="choice btn btn-choice" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.solidfood" ng-click="setQtyType(\'ONC\')">Ounce</button>\n\t\t\t\t<button class="choice btn btn-choice" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.solidfood" ng-click="setQtyType(\'GRM\')">Gram</button>\n\t\t\t\t<button class="choice btn btn-choice" chooseone="foodqty"\n\t\t\t\tng-show="isVisible.litrefood" ng-click="setQtyType(\'LTR\')">Litre</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="inputfield calorie-count" ng-show="isVisible.mealtype">\n\t\t<label class="input-title">Calorie Count</label>\n\t\t<input class="input-value" type="number" ng-model="food.list[0].count">\n\t\t<label class="suggested-value {{food.list[0].qtytype}} {{food.list[0].count}}"\n\t\t\tng-show="food.list[0].qtytype != \'\' && (food.list[0].count == undefined || food.list[0].count == \'\')">{{food.list[0].foodtext |\n\t\t\t\tcaloriesCount: {\'foodtype\': food.list[0].mealtype, \'quantity\': food.list[0].quantity, \'qtytype\': food.list[0].qtytype, \'calories\': food.list[0].count} }} Cal</label>\n\t</div>\n\t<div class="inputfield" ng-show="isVisible.mealtype">\n\t\t<button class="btn btn-default full-width add-another" ng-show="isVisible.mealtype"\n\t\tng-click="addNewItem()">ADD NEW</button>\n\t</div>\n</div>\n'),t.put("components/feature-components/food/food-summary.html",'<div class="food-summary" ng-show="filteredFoodList.length > 0 || filteredDrinksList.length > 0">\n\t<div class="food foods" ng-show="filteredFoodList.length > 0">\n\t\t<div class="type">\n\t\t\t<i class="fa fa-cutlery" aria-hidden="true"></i>\n\t\t</div>\n\t\t<div class="desc">FOOD Summary</div>\n\t\t<!-- Assign filtered food.list to filteredFoodList -->\n\t\t<div class="all">\n\t\t\t<div class="food-summary" ng-repeat="item in filteredFoodList = (food.list | filterMealType: \'FOOD\')">\n\t\t\t\t<div class="each">\n\t\t\t\t\t<div class="info">\n\t\t\t\t\t\t<div class="title">{{item.foodtext.length > 0 ? item.foodtext : \'No title\'}}</div>\n\t\t\t\t\t\t<div class="details">\n\t\t\t\t\t\t\t<span class="qty">\n\t\t\t\t\t\t\t\t{{item.quantity ? item.quantity : \'X\'}}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class="usage">\n\t\t\t\t\t\t\t\t{{item.qtytype ? item.qtytype : \'items\' | codeconvert}}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="amount">{{item.foodtext\n\t\t\t\t\t\t| caloriesCount: {\'foodtype\': item.mealtype, \'quantity\': item.quantity, \'qtytype\': item.qtytype, \'calories\': item.count} }} Cal</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="food drinks" ng-show="filteredDrinksList.length > 0">\n\t\t<div class="type">\n\t\t\t<i class="fa fa-glass" aria-hidden="true"></i>\n\t\t</div>\n\t\t<div class="desc">DRINK Summary</div>\n\t\t<!-- Assign filtered food.list to filteredFoodList -->\n\t\t<div class="all">\n\t\t\t<div class="food-summary" ng-repeat="item in filteredDrinksList = (food.list | filterMealType: \'DRNK\')">\n\t\t\t\t<div class="each">\n\t\t\t\t\t<div class="info">\n\t\t\t\t\t\t<div class="title">{{item.foodtext.length > 0 ? item.foodtext : \'No title\'}}</div>\n\t\t\t\t\t\t<div class="details">\n\t\t\t\t\t\t\t<span class="qty">\n\t\t\t\t\t\t\t\t{{item.quantity ? item.quantity : \'X\'}}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class="usage">\n\t\t\t\t\t\t\t\t{{item.qtytype ? item.qtytype : \'items\' | codeconvert}}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="amount">{{item.foodtext\n\t\t\t\t\t\t| caloriesCount: {\'foodtype\': item.mealtype, \'quantity\': item.quantity, \'qtytype\': item.qtytype, \'calories\': item.count} }} Cal</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/feature-components/food/food-widget.html",'<div class="widget food">\n    <div class="title">Food</div>\n    <div class="content clearfix">\n        <div class="info" ng-hide="data.calories.consumed === 0">\n            <div class="wd-row clearfix">\n                <div class="wd-label left col-xs-6">\n                    <div class="desc">Required</div>\n                    <div class="value">{{data.calories.required}}</div>\n                </div>\n                <div class="wd-label right col-xs-6">\n                    <div class="desc">Consumed</div>\n                    <div class="value">{{data.calories.consumed}}</div>\n                </div>\n            </div>\n            <div class="wd-centered col-xs-12">\n                <div class="wd-label">\n                    <div class="value">{{data.calories.message}}</div>\n                </div>\n            </div>\n        </div>\n        <div class="under-construction text-center" ng-show="data.calories.consumed === 0">\n            <div class="wait">\n                <i class="fa fa-hourglass-start" aria-hidden="true"></i>\n            </div>\n            <p class="message text-uppercase">No food info available</p>\n        </div>\n    </div>\n</div>\n'),t.put("components/feature-components/habit/habit-card-detail.html",'<div class="habit-card">\n\t<div class="summary">\n\t\t<div class="fields">\n\t\t\t<div class="title field">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-file-text-o" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t<span>{{::(item.data.title ? item.data.title : \'No Title\')}}</span>\n\t\t\t\t\t<span ng-if="isMobile">\n\t\t\t\t\t\t<checkbox label="item.data.label" name="item.data.hashid" is-checked="item.data.isChecked"\n\t\t\t\t\t\t\tmark-checkbox-fn="markCheckbox(item.data.hashid, item.data.isChecked)"></checkbox>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="repeats field" ng-show="item.data.repetition.repeats">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-refresh" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\tRepeats:  {{::item.data.repetition.repeats}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/feature-components/habit/habit-card.html",'<habit-card-detail item="item"></habit-card-detail>\n'),t.put("components/feature-components/habit/habit-panel.html",'<div class="habit-panel">\n\t<div class="inputfield">\n\t\t<label class="input-title">Name of the new habit</label>\n\t\t<input class="input-value" type="text" ng-model="habit.title">\n\t</div>\n\t<div class="inputfield">\n\t\t<label class="input-title">Choose Time</label>\n\t\t<timeselector scope-obj="habit.time"></timeselector>\n\t</div>\n\t<div class="inputfield">\n\t\t<label class="input-title">Repeatition</label>\n\t\t<repetition repetition="habit.repetition" defaults="habit.defaults"></repetition>\n\t</div>\n</div>'),t.put("components/feature-components/list/list-card.html",'<div class="list-card">\n\t<div class="summary">\n\t\t<div class="title field">\n\t\t\t<div class="icon">\n\t\t\t\t<i class="fa fa-file-text-o" aria-hidden="true"></i>\n\t\t\t</div>\n\t\t\t<div class="desc">\n\t\t\t\t{{::(item.data.title ? item.data.title : \'No Title\')}}\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="fields">\n\t\t\t<div class="total field">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-info" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t<list list="item.data.list" is-disabled="true"></list>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="field">\n\t\t\t<div class="icon">\n\t\t\t\t<i class="fa fa-tags" aria-hidden="true"></i>\n\t\t\t</div>\n\t\t\t<div class="desc">\n\t\t\t\t<tags-list taglist="item.data.tags.taglist"></tags-list>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/feature-components/list/list-panel.html",'<div class="list-panel">\n\t<title scope-obj="list"></title>\n\t<div class="inputfield" on-action="\'KEYUP, tags, true\'" scope-obj="list._.isVisible">\n\t\t<label class="input-title">Create list here</label>\n\t\t<list list="list.list" is-disabled="false"></list>\n\t</div>\n\t<div class="inputfield" ng-show="list._.isVisible.tags == true">\n        <label class="input-title">Tags</label>\n        <!-- <input class="input-value" type="text" ng-model="list.tags"> -->\n        <tags-autocomplete choices="list._.tags" enteredtext="list.tags.text"\n            minlength="1" placeholder="" result="list.tags.tagobj" type="\'WHOM\'"\n            tags="list.tags.taglist"></tags-autocomplete>\n    </div>\n</div>\n'),t.put("components/feature-components/list/list.html",'<div class="list">\n\t<!-- pass only object, not primitive while using isolated scope directives -->\n\t<div ng-repeat="item in list track by $index">\n\t\t<!-- need to pass parameters from scope into the directive methods, blank or non scope params are not passed to controller method -->\n\t\t<listitem list="list" is-disabled="isDisabled" itemindex="{index: $index}"\n\t\t\tset-list="setList($index)"></listitem>\n\t\t<list list="item.list" is-disabled="isDisabled" ng-if="item.list != undefined"><list>\n\t</div>\n</div>\n'),t.put("components/feature-components/media/media-panel.html",'<div class="media-panel">\n\t<div class="inputfield">\n\t\t<label class="input-title">Drag and Drop media file here</label>\n\t\t<input class="input-value" type="text" ng-model="media.upload">\n\t\t<div class="file-upload">\n\t\t\t<label for="inputId">\n\t\t\t\t<img class="icon attach" src="img/icons/common/attach.svg" alt="">\n\t\t\t</label>\n\t\t\t<input id="inputId" type="file" style="position: fixed; top: -100em">\n\t\t</div>\n\t\t<div class="upload-status">\n\t\t\t\n\t\t</div>\n\t\t<div class="upload-btn">\n\t\t\t\n\t\t</div>\n\t</div>\n</div>'),t.put("components/feature-components/mood/mood-bar.html",'<div class="{{data}}">\n\n    <div class="time" ng-class="{\'invisible\': data.level < 0}">{{data.timestamp | date: \'ha\'}}</div>\n    <div class="bar">\n        <ul class="slots">\n           <li class="{{slot.type}}" ng-repeat="slot in slots"></li>\n       </ul>\n    </div>\n    <div class="time" ng-class="{\'invisible\': data.level >= 0}">{{data.timestamp | date: \'ha\'}}</div>\n</div>'),t.put("components/feature-components/mood/mood-card.html",'<div class="mood-card">\n\t<div class="summary">\n\t\t<div class="fields">\n\t\t\t<div class="summary field"><div class="icon">\n\t\t\t\t<i class="fa fa-bar-chart" aria-hidden="true"></i>\n\t\t\t</div>\n\t\t\t<div class="desc">\n\t\t\t\tMood: {{::item.data.label}}\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="field">\n\t\t\t<div class="icon">\n\t\t\t\t<i class="fa fa-heart" aria-hidden="true"></i>\n\t\t\t</div>\n\t\t\t<div class="desc" ng-show="{{::item.data.selectedFeelingsName != undefined}}">\n\t\t\t\tFeeling: {{::item.data.selectedFeelingsName | arr2str}}\n\t\t\t</div>\n\t\t\t<div class="desc" ng-hide="{{::item.data.selectedFeelingsName != undefined}}">\n\t\t\t\tnone\n\t\t\t</div>\n\t\t</div>\n\n\t</div>\n</div>\n</div>\n'),t.put("components/feature-components/mood/mood-panel.html",'<div class="mood-panel">\n    <div class="item-btns" on-action="\'CLICK, feeling, true\'" scope-obj="mood._.isVisible">\n        <div class="item-btn" ng-repeat="mooditem in moods">\n            <button type="button" class="btn {{mooditem.btnClass}} {{mood.level == mooditem.level ? \'selected\' : \'\'}}"\n                ng-click="selectMood(mooditem.level)">{{mooditem.level}}</button>\n            <div class="label"></div>\n        </div>\n    </div>\n\n    <div class="feelings" ng-show="mood._.isVisible.feeling == true">\n        <div class="inputfield">\n            <label class="input-title">FEELING</label>\n            <div class="feeling-list" on-action="\'CLICK, note, true\'" scope-obj="mood._.isVisible">\n                <button type="button" ng-repeat="feeling in feelings"\n                    class="btn btn-xs {{labelType}} {{selectedFeelingsByIndex[$index] ? \'selected\': \'\'}}"\n                    ng-click="selectFeeling($index, feeling.code)">{{feeling.name}}</button>\n            </div>\n        </div>\n    </div>\n\n    <div class="note" ng-show="mood._.isVisible.note == true">\n        <div class="inputfield">\n            <label class="input-title">Details here</label>\n            <editor scope-obj="mood.note" is-editable="true"></editor>\n        </div>\n    </div>\n</div>\n'),t.put("components/feature-components/mood/mood-widget.html",'<div class="widget mood">\n    <div class="title">Mood</div>\n    <div class="content">\n    \t<div class="moods">\n\t\t\t<div class="mood-bar" ng-repeat="mood in data.list | orderBy:\'timestamp\' | limitTo:7">\n\t\t\t\t<mood-bar data="mood"></mood-bar>\n\t\t\t</div>\n    \t</div>\n\t\t<div class="baseline col-xs-12" ng-show="data.list.length > 0"></div>\n\t\t<div class="message" ng-show="data.list.length == 0">\n\t\t\tNo mood recorded yet\n\t\t</div>\n    </div>\n</div>\n'),t.put("components/feature-components/note/note-card.html",'<div class="note-card">\n\t<div class="summary">\n\t\t<div class="title field">\n\t\t\t<div class="icon">\n\t\t\t\t<i class="fa fa-file-text-o" aria-hidden="true"></i>\n\t\t\t</div>\n\t\t\t<div class="desc">\n\t\t\t\t{{::(item.data.title ? item.data.title : \'No Title\')}}\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="fields">\n\t\t\t<div class="summary field">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-pencil" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t<editor scope-obj="item.data" is-editable="false"></editor>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="field">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-tags" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t<tags-list taglist="item.data.tags.taglist"></tags-list>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/feature-components/note/note-panel.html",'<div class="note-panel">\n    <title scope-obj="note"></title>\n    <div class="inputfield" on-action="\'KEYUP, tags, true\'" scope-obj="note._.isVisible">\n        <label class="input-title">Add your notes here</label>\n        <editor scope-obj="note" is-editable="true"></editor>\n    </div>\n    <div class="inputfield" ng-show="note._.isVisible.tags == true">\n        <label class="input-title">Tags</label>\n        <!-- <input class="input-value" type="text" ng-model="note.tags"> -->\n        <tags-autocomplete choices="note._.tags" enteredtext="note.tags.text"\n            minlength="1" placeholder="" result="note.tags.tagobj" type="\'WHOM\'"\n            tags="note.tags.taglist"></tags-autocomplete>\n    </div>\n</div>\n'),t.put("components/feature-components/note/note.html",'<div class="note-page">\n    <select-time choosen="choosen" get-data="getNotesData"></select-time>\n    \n    <h1 class="page-title">Notes</h1>\n    <div class="search-panel panel">\n        Search: <input ng-model="query" />\n    </div>\n    <div class="notes">\n        <div class="note" ng-repeat="note in filteredNotes = (notes | filter:query)">\n            <div class="panel panel-default">\n                <div class="panel-heading">\n                    <h3 class="panel-title">{{note.data.title}}</h3>\n                </div>\n                <div class="panel-body">\n                    <editor scope-obj="note.data" is-editable="false"></editor>\n                    <div class="timestamp">\n                        <span class="label label-default">\n                            {{note.timestamp | date:"d MMM yyyy h:mm a"}}\n                        </span>\n                        <span class="label label-success" ng-repeat="tag in note.data.tags.taglist">\n                            {{tag.text}}\n                        </span>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>'),t.put("components/feature-components/people/people-panel.html",'<div class="people-panel">\n    Show people list and ask for last contact with the person\n    <!-- <div class="inputfield" on-action="\'KEYUP, details, true\'" scope-obj="people.isVisible">\n        <label class="input-title">Name</label>\n        <input class="input-value" type="text" ng-model="people.name">\n    </div>\n    <div class="inputfield">\n        <label class="input-title">Mobile</label>\n        <input class="input-value" type="text" ng-model="mobile">\n    </div>\n    <div class="inputfield">\n        <label class="input-title">Email</label>\n        <input class="input-value" type="text" ng-model="email">\n    </div> -->\n    <!-- <div class="inputfield">\n        <label class="input-title">Social Networks</label>\n        <input class="input-value" type="text" ng-model="">\n    </div>\n    <div class="inputfield">\n        <label class="input-title">Notes</label>\n        <input class="input-value" type="text" ng-model="notes">\n    </div> -->\n</div>'),t.put("components/feature-components/place/place-card.html",'<div class="place-card {{::item.type | lowercase}}">\n\t<div class="summary">\n\t\t<div class="fields">\n\t\t\t<div class="title field" ng-if="item.type == \'PLCS\'">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-file-text-o" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t{{::(item.data.title ? item.data.title : \'No Title\')}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="reason field" ng-if="item.type == \'PLCS\'" ng-show="item.data.reason">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-question" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t{{::item.data.reason}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="with-whom field" ng-if="item.type == \'PLCS\'">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-user" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\t<span ng-show="item.data.whom.taglist.length === 0">By Myself</span>\n\t\t\t\t\t<span ng-show="item.data.whom.taglist.length > 0">\n\t\t\t\t\t\t<tags-list taglist="item.data.whom.taglist"></tags-list>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="source field" ng-if="item.type == \'CKIN\'">\n\t\t\t\t<div class="icon">\n\t\t\t\t\t<i class="fa fa-exchange" aria-hidden="true"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class="desc">\n\t\t\t\t\tSource: {{::item.data.source}}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'),t.put("components/feature-components/place/place-panel.html",'<div class="place-panel">\n\t<div class="inputfield" on-action="\'KEYUP, optional, true\'" scope-obj="place._.isVisible">\n        <label class="input-title">Where are you</label>\n        <autocomplete choices="place._.places" enteredtext="place.title" \n            minlength="1" result="place.placeobj" type="\'WHERE\'"></autocomplete>\n    </div>\n    <div class="inputfield">\n        <label class="input-title">Why are you here</label>\n        <input class="input-value" type="text" ng-model="place.reason">\n    </div>\n    <div class="inputfield">\n        <label class="input-title">Who is with you</label>\n        <tags-autocomplete choices="place._.places" enteredtext="place.whom.text"\n            minlength="1" placeholder="" result="place.whom.placeobj" type="\'WHOM\'" \n            tags="place.whom.taglist"></tags-autocomplete>\n    </div>\n</div>')}]),angular.module("homepage").directive("choosemany",function(){function t(t,e,n){n.choosemany,n.namespace&&"string"==typeof n.namespace&&n.namespace.length>0?"."+n.namespace+" ":"";e.bind("click",function(){this.classList.contains("chosen")?this.classList.remove("chosen"):this.classList.add("chosen")})}return{link:t,restrict:"A",replace:!1}}),angular.module("homepage").directive("chooseone",function(){function t(t,e,n){var i=n.chooseone,a=n.namespace&&"string"==typeof n.namespace&&n.namespace.length>0?"."+n.namespace+" ":"",s=a+"[chooseone="+i+"]";e.bind("click",function(){for(var t=document.querySelectorAll(s),e=0;e<t.length;e++){var n=t[e];n.classList.remove("chosen")}this.classList.add("chosen")})}return{link:t,restrict:"A",replace:!1}}),angular.module("homepage").directive("choosetoggle",function(){function t(t,e,n){e.bind("click",function(){this.classList.toggle("chosen")})}return{link:t,restrict:"A",replace:!1}}),angular.module("homepage").directive("contenteditable",function(){return{restrict:"A",require:"ngModel",link:function(t,e,n,i){function a(){i.$setViewValue(e.html()||"<br>")}i.$render=function(){e.html(i.$viewValue||"<br>")},e.bind("blur keyup change",function(){t.$apply(a)})}}}),angular.module("homepage").directive("onAction",["StringUtility","$timeout",function(t,e){function n(e,n,o){var l=t.getPartsOfString(e.onAction);l=s(l),l=a(l);var c=l[0];for(var r in c){var d=c[r];d.toLowerCase()=="KEYUP".toLowerCase()&&n.bind("keyup",function(t){i(t,e,l)}),d.toLowerCase()=="CLICK".toLowerCase()&&n.bind("click",function(t){i(t,e,l)})}}function i(n,i,a){n.stopPropagation();var s=a[1],o=a[2];for(var l in s){var c=s[l].trim(),r=t.stringToBoolean(o[l].trim());i.isVisible[c]=r}e(function(){i.$apply()})}function a(t){var e=t[1],n=t[2];if(e.length!=n.length){var i=n[0],n=[];for(var a in e)n.push(i);t[2]=n}return t}function s(t){for(var e in t){var n=t[e];"string"==typeof n&&(t[e]=[n.trim()])}return t}return{restrict:"A",link:n,scope:{onAction:"=",isVisible:"=scopeObj"}}}]),angular.module("homepage").directive("onActionToggle",["StringUtility","$timeout",function(t,e){function n(e,n,l){var c=t.getPartsOfString(e.onActionToggle);c=o(c),c=s(c),i(e,c);var r=c[0];for(var d in r){var u=r[d];u.toLowerCase()=="KEYUP".toLowerCase()&&n.bind("keyup",function(t){a(t,e,c)}),u.toLowerCase()=="CLICK".toLowerCase()&&n.bind("click",function(t){a(t,e,c)})}}function i(n,i){var a=i[1],s=i[2];for(var o in a){var l=a[o].trim(),c=t.stringToBoolean(s[o].trim());n.isVisible[l]=c}e(function(){n.$apply()})}function a(t,n,i){t.stopPropagation();var a=i[1];i[2];for(var s in a){var o=a[s].trim();n.isVisible[o]=!n.isVisible[o];
}e(function(){n.$apply()})}function s(t){var e=t[1],n=t[2];if(e.length!=n.length){var i=n[0],n=[];for(var a in e)n.push(i);t[2]=n}return t}function o(t){for(var e in t){var n=t[e];"string"==typeof n&&(t[e]=[n.trim()])}return t}return{restrict:"A",link:n,scope:{onActionToggle:"=",isVisible:"=scopeObj"}}}]),angular.module("homepage").directive("setequalheight",["$timeout",function(t){function e(e,n,i){function a(){t(function(){e.$apply(function(){for(var t=JSON.parse(i.setequalheight),e=n[0].querySelector(t.main),a=e.offsetHeight,s=0;s<t.others.length;s++){var o,l;o=""==t.others[s]?n[0]:n[0].querySelector(t.others[s]),o&&null!=o&&(l=t.offset&&t.offset[s]?t.offset[s]:0,o.style.height=a-l+"px")}})})}window.addEventListener("orientationchange",a,!1),window.addEventListener("resize",a,!1),a()}return{link:e,restrict:"A",replace:!1}}]),angular.module("homepage").directive("sglClick",["$parse",function(t){return{restrict:"A",link:function(e,n,i){var a=t(i.sglClick),s=300,o=0,l=null;n.on("click",function(t){o++,1===o?l=setTimeout(function(){e.$apply(function(){a(e,{$event:t})}),o=0},s):(clearTimeout(l),o=0)})}}}]),angular.module("homepage").filter("reverse",function(){return function(t){return t.slice().reverse()}}).filter("arr2str",function(){return function(t){var e="";for(var n in t){var i=t[n];"0"!==n&&(e+=", "),void 0!==i&&0!==i.length&&""!==i&&(e+=i)}return e}}).filter("arraysum",function(){return function(t,e){var n=0;for(var i in t){var a=t[i];if(void 0!==a&&void 0!==a[e.name]){var s=parseInt(a[e.name]);"number"==typeof s&&(n+=s)}}return n}}).filter("filterByValue",function(){return function(t,e){var n=[];for(var i in t){var a=t[i];"INCL"==e.type||"INCLUDE"==e.type?a[e.name]===e.value&&n.push(t[i]):a[e.name]!==e.value&&n.push(t[i])}return n}}).filter("filterByIndex",function(){return function(t,e){var n=[];for(var i in t)e.exclude===!0?i!=e.index&&n.push(t[i]):i===e.index&&n.push(t[i]);return n}}),angular.module("homepage").filter("doubledigit",[function(){return function(t){return t<10?"0"+t:t}}]),angular.module("homepage").filter("codeconvert",["CodeConvertSrvc",function(t){return function(e){var n=t.getValue(e);return""===n?e:n}}]),angular.module("homepage").filter("datediff",function(){return function(t,e,n){var i="",a="",s=new Date(e).getTime(),o=new Date(n).getTime(),l=Math.abs(s-o)/1e3;return l<60?i=l+" sec":l<3600?(l=Math.floor(l/60),i=l+"min"):l<86400&&(l=Math.floor(l/3600),i=l+" hour"),a=1==l?"":"s",i+a}}).filter("monthbyindex",["DateUtility",function(t){var e=t.getMonthTitles();return function(t){return e[t]}}]),angular.module("custommodal",[]).controller("customModalController",["$scope",function(t){t.showModal=!1,t.toggleModal=function(){t.showModal=!t.showModal}}]).directive("customModal",function(){return{controller:"customModalController",restrict:"E",replace:!0,transclude:!0,template:"<div ng-transclude></div>"}}).directive("modal",function(){return{template:'<div class="modal fade"><div class="modal-dialog modal-sm"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title">{{ title }}</h4></div><div class="modal-body" ng-transclude></div></div></div></div>',restrict:"E",require:"^customModal",replace:!0,transclude:!0,link:function(t,e,n){t.title=n.title,t.$watch(n.visible,function(t){1==t?$(e).modal("show"):$(e).modal("hide")}),$(e).on("shown.bs.modal",function(){t.$apply(function(){t.$parent[n.visible]=!0})}),$(e).on("hidden.bs.modal",function(){t.$apply(function(){t.$parent[n.visible]=!1})})}}}),angular.module("homepage").run(["$rootScope","$state","$timeout","Authentication",function(t,e,n,i){t.isVisible={loading:!1},t.currentRoute={name:""},t.$on("$stateChangeStart",function(n,a,s,o,l){t.isVisible.loading=!0,"login"==a.name&&i.isAuthenticated()?(t.currentRoute.name="home",e.transitionTo("home"),n.preventDefault()):a.authenticate&&!i.isAuthenticated()?(t.currentRoute.name="login",e.transitionTo("login"),n.preventDefault()):a.authenticate||(t.currentRoute.name=a.name)}),t.$on("$viewContentLoaded",function(){n(function(){t.isVisible.loading=!1},1e3)})}]).config(["$stateProvider","$urlRouterProvider",function(t,e){e.otherwise("/start"),t.state("start",{url:"/start",templateUrl:"../../html/partials/partial-index.html",authenticate:!1}).state("login",{url:"/login",templateUrl:"../../html/partials/partial-login.html",authenticate:!1}).state("signup",{url:"/signup",templateUrl:"../../html/partials/partial-signup.html",authenticate:!1}).state("register",{url:"/register",templateUrl:"../../html/partials/partial-register.html",authenticate:!1}).state("comment",{url:"/comment",templateUrl:"../../html/partials/partial-comment.html",authenticate:!1}).state("home",{url:"/home",controller:"HomeController",templateUrl:"../../html/partials/partial-home.html",authenticate:!0}).state("demo",{url:"/demo",controller:"DemoController",templateUrl:"../../html/partials/partial-demo.html",authenticate:!1}).state("notes",{url:"/notes",templateUrl:"../../html/partials/partial-notes.html",authenticate:!1}).state("list",{url:"/list",templateUrl:"../../html/partials/partial-list.html",authenticate:!1}).state("calendar",{url:"/calendar",templateUrl:"../../html/partials/partial-calendar.html",authenticate:!1}).state("contacts",{url:"/contacts",templateUrl:"../../html/partials/partial-contacts.html",authenticate:!1}).state("habits",{url:"/habits",templateUrl:"../../html/partials/partial-habits.html",authenticate:!1}).state("fitness",{url:"/fitness",templateUrl:"../../html/partials/partial-fitness.html",authenticate:!1}).state("finance",{url:"/finance",templateUrl:"../../html/partials/partial-finance.html",authenticate:!0}).state("places",{url:"/places",templateUrl:"../../html/partials/partial-places.html",authenticate:!1}).state("activity",{url:"/activity",templateUrl:"../../html/partials/partial-activity.html",authenticate:!1})}]),angular.module("homepage").factory("Server",["$http",function(t){return{fblogin:function(){return t.get("/auth/user/facebook")},login:function(e){return t.post("/auth/user/login",e)},logout:function(){return t.get("/auth/user/logout")},register:function(e){return t.post("/auth/user/register",e)},signup:function(e){return t.post("/auth/user/signup",e)},checkInvite:function(e){return t.put("/auth/user/checkinvite",e)},addcomment:function(e){return t.post("/api/comment/add",e)},ibsubmit:function(e){return t.post("/api/inputbox/submit",e)},markTemplate:function(e){return t.post("/api/inputbox/habit/mark",e)},getTemplates:function(e){return t.post("/api/inputbox/gettemplates",e)},getDemoData:function(){return t.post("/api/inputbox/getdemodata",{})},getNotesData:function(e){return t.post("/api/inputbox/notes/getdata",e)},getMoneyData:function(e){return t.post("/api/inputbox/finance/getdata",e)},getMoneyWidgetData:function(e){return t.post("/api/inputbox/finance/widget/getdata",e)}}}]),angular.module("homepage").factory("CodeConvertSrvc",function(){function t(t){return e[t]?e[t]:""}var e={EQLY:"Equally",PMNT:"Payment",CUP:"Cup",GLS:"Glass",BTL:"Bottle",PTR:"Pitcher",TWR:"Tower",LTR:"Liter",PCE:"Pieces",TSP:"Tablespoon",BWL:"Bowl",ONC:"Ounce",GRM:"Gram"};return{getValue:t}}),angular.module("homepage").factory("DataStoreSrvc",["ArrayUtility","ProcessTimelineService","SidebarHelperSrvc","TemplatePreprocessor","TemplateTimelineService","WidgetHelperSrvc",function(t,e,n,i,a,s){var o={templates:[]},l={templates:[],habits:[],widgets:s.getWidgetsData(),sidebar:n.getSidebarData()};return{add:function(c){if(c){i.removeEmptyWorkoutAndSet(c),o.templates.push(c);var r=a.getItemsByDate(o.templates);r=a.excludeItemsByType(r,"HABT");var d=a.getItemsByDate(o.templates);d=a.filterItemsByType(d,"HABT"),l.templates=t.reassignArray(l.templates,r),e.processTimeline(l.templates),l.habits=t.reassignArray(l.habits,d),l.widgets=s.update(c),l.sidebar=n.update(c)}},getPosts:function(){var n=a.getItemsByDate(o.templates);return n=a.excludeItemsByType(n,"HABT"),l.templates=t.reassignArray(l.templates,n),e.processTimeline(l.templates),l.templates},getHabits:function(){var e=a.getItemsByDate(o.templates);return e=a.filterItemsByType(e,"HABT"),l.habits=t.reassignArray(l.habits,e),l.habits},getWidgetsData:function(){return l.widgets=s.getWidgetsByDate(),l.widgets},getSidebarData:function(){return l.sidebar=n.getSidebarByDate(),l.sidebar},updateAll:function(){this.getPosts(),this.getHabits(),this.getWidgetsData(),this.getSidebarData()},resetAll:function(){o.templates.length=0,s.resetAll(),n.resetAll()}}}]),angular.module("homepage").factory("FoodNutritionSrvc",["NutritionDataJSON",function(t){function e(t,e){var n=0,i={matchindex:0,titleindex:-1,lengthmatch:!1};for(var a in t){var s=t[a],o=s.split(" "),l=e.split(" ");for(var c in l){var r=l[c],d=o.some(function(t){return r.toLowerCase()===t.toLowerCase()});d&&n++}if(i.matchindex<n&&(i.matchindex=n,i.titleindex=parseInt(a)),n===l.length){i.lengthmatch=!0;break}}return i}function n(t,n){var i={matchindex:0,titleindex:-1,lengthmatch:!1};for(var a in t){var s=t[a].title,o=e(s,n);if(i.matchindex<o.matchindex&&(i.matchindex=o.matchindex,i.titleindex=o.titleindex,i.lengthmatch=o.lengthmatch,i.lengthmatch===!0)){i.details=t[a];break}}return i}function i(t,e){var i={matchindex:0,titleindex:-1};return"FOOD"===t?(i=n(l.foods,e),0===i.matchindex&&(i=n(l.drinks,e))):(i=n(l.drinks,e),0===i.matchindex&&(i=n(l.foods,e))),i}function a(t,e){var n={PCE:10,TSP:10,BWL:100,ONC:.035,GRM:1,CUP:100,GLS:200,BTL:500,PTR:1890,TWR:3e3,LTR:1e3},i=n[e]/n[t];return i}function s(t,e,n,s){var o=i(e,t);if(o.matchindex>0&&void 0!==o.details){var l=a(o.details.qty.type,s);o.calories=l*n*o.details.nutrition.calories}else o.calories=void 0===o.details?0:o.details.nutrition.calories;return o}function o(e,n,i,a){return 0!==l.foods.length&&0!==l.drinks.length||(l.foods=t.nutritionInfo.foods,l.drinks=t.nutritionInfo.drinks),void 0===e?{calories:0}:s(e,n,i,a)}var l={foods:[],drinks:[]};return{getNutritionInfo:o}}]).factory("NutritionDataJSON",function(){var t={foods:[{title:["Egg","Eggs","Egg boiled"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"80"}},{title:["Egg Poached","Eggs Poached"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"80"}},{title:["Egg Fried","Eggs Fried","Egg Fry"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"110"}},{title:["Egg Omelet","Omelet","Omlate","Omelette","Egg Omelette"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"120"}},{title:["Bread slice","Bread"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"45"}},{title:["Bread slice with butter"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"90"}},{title:["Chapati"],foodtype:{type:"FOOD",region:"INDN"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"60"}},{title:["Puri"],foodtype:{type:"FOOD",region:"INDN"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"75"}},{title:["Paratha"],foodtype:{type:"FOOD",region:"INDN"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"150"}},{title:["Veggie"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"BWL"},nutrition:{calories:"150"}},{title:["Idli"],foodtype:{type:"FOOD",region:"INDN"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"100"}},{title:["Dosa","Plain Dosa"],foodtype:{type:"FOOD",region:"INDN"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"120"}},{title:["Masala Dosa"],foodtype:{type:"FOOD",region:"INDN"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"250"}},{title:["Sambar","Sambhar","Dal"],foodtype:{type:"FOOD",region:"INDN"},qty:{amount:"1",type:"BWL"},nutrition:{calories:"150"}},{title:["Rajma Dal"],foodtype:{type:"FOOD",region:"INDN"},qty:{amount:"1",type:"BWL"},nutrition:{calories:"140"}},{title:["Rice","Plain Rice"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"BWL"},nutrition:{calories:"120"}},{title:["Fried Rice"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"BWL"},nutrition:{calories:"150"}},{title:["Nan"],foodtype:{type:"FOOD",region:"INDN"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"150"}},{title:["Curd"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"BWL"},nutrition:{calories:"100"}},{title:["Veg Curry","Vegetable Curry"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"BWL"},nutrition:{calories:""}},{title:["Salad"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"BWL"},nutrition:{calories:"100"}},{title:["Papad"],foodtype:{type:"FOOD",region:"INDN"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"45"}},{title:["Cutlet"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"BWL"},nutrition:{calories:"75"}},{title:["Pickle"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"15"}},{title:["Gobi Manchurian"],foodtype:{type:"FOOD",region:"INDN"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"60"}},{title:["Soup"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"BWL"},nutrition:{calories:"75"}},{title:["Fruit Bowl","Fruit Salad","Fruits"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"BWL"},nutrition:{calories:"150"}},{title:["Gulab Jamun"],foodtype:{type:"FOOD",region:"INDN"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"140"}},{title:["Cucumber","Kheera","Kakhadi"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"8"}},{title:["Carrot","Gajar"],foodtype:{type:"FOOD",region:"GLBL"},qty:{amount:"1",type:"PCE"},nutrition:{calories:"41"}}],drinks:[{title:["Tea"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"CUP"},nutrition:{calories:"45"}},{title:["Black Tea"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"CUP"},nutrition:{calories:"15"},description:"Without milk and sugar"},{title:["Coffee"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"CUP"},nutrition:{calories:"45"}},{title:["Black Coffee"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"CUP"},nutrition:{calories:"15"},description:"Without milk and sugar"},{title:["Milk"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"GLS"},nutrition:{calories:"65"}},{title:["Protein Milk","Protein Milk Shake"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"CUP"},nutrition:{calories:"125"}},{title:["Horlicks Milk"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"GLS"},nutrition:{calories:"120"}},{title:["Fruit Juice"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"GLS"},nutrition:{calories:"120"}},{title:["Soft Drink"],foodtype:{type:"DRNK",region:"INDN"},qty:{amount:"1",type:"GLS"},nutrition:{calories:"90"}},{title:["Diet Coke"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"GLS"},nutrition:{calories:"0"}},{title:["Maaza"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"CUP"},nutrition:{calories:"54"}},{title:["Beer"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"BTL"},nutrition:{calories:"200"}},{title:["Soda"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"BTL"},nutrition:{calories:"20"}},{title:["Milk Shake"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"GLS"},nutrition:{calories:"200"}},{title:["Mosambi Juice","Sweet Lime Juice"],foodtype:{type:"DRNK",region:"GLBL"},qty:{amount:"1",type:"GLS"},nutrition:{calories:"100"}}]};return{nutritionInfo:t}}),angular.module("homepage").factory("GlobalDataService",["DateUtility",function(t){function e(){return a}function n(t){a.setTime(t.getTime()),i(a)}function i(e){return void 0===e&&(e=a),s.isTrue=t.getDateOnly(e).getTime()===t.getDateOnly(new Date).getTime(),s}var a=new Date,s={isTrue:!0};return{getSelectedDate:e,setSelectedDate:n,isTodaysDateSelected:i}}]),angular.module("homepage").factory("ReadJsonSrvc",["$http",function(t){function e(e){return t.get("../../../json/"+e+".json")}return{readJson:e}}]),angular.module("homepage").factory("TemplateService",["AddTemplates","DateUtility","GlobalDataService","Server","Structs","TimelineService",function(t,e,n,i,a,s){function o(t){return null===c.start||null===c.end?(c.start=new Date(t),void(c.end=new Date(t))):void(t.getTime()<c.start.getTime()?c.start=new Date(t):t.getTime()>c.end.getTime()&&(c.end=new Date(t)))}function l(){var a=n.getSelectedDate(),l=null!==c.start&&null!==c.end&&e.isBetweenDates(a,c.start,c.end,!0,!0);l||(o(a),s.setLoadingStatus(!0),i.getTemplates({startTimestamp:e.getDateOnly(a).getTime(),endTimestamp:e.getDateEnd(a).getTime()}).success(function(e){console.log(e),t.addData(e.data.templates),s.setLoadingStatus(!1)}))}var c=new a.DateRange;return{getTemplates:l}}]).factory("AddTemplates",["DataStoreSrvc",function(t){return{addData:function(e){for(var n=0;n<e.length;n++){var i=e[n];t.add(i)}}}}]),angular.module("homepage").factory("Authentication",["$http","$localStorage","$rootScope",function(t,e,n){function i(t){var e=t.replace("-","+").replace("_","/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}return window.atob(e)}function a(){var t=e.token,n={};if("undefined"!=typeof t){var a=t.split(".")[1];n=JSON.parse(i(a))}return n}function s(){delete e.token}function o(){return u=a()}function l(t){t&&(e.token=t,n.userDtls=o(),n.isAuthenticated=!0)}function c(){s(),n.userDtls={},n.isAuthenticated=!1,u={}}function r(){return!(!n.userDtls||void 0===n.userDtls.username)}function d(){t.defaults.headers.common["X-Auth-Token"]=e.token}var u={};return{getUser:o,setUser:l,removeUser:c,isAuthenticated:r,setHeaders:d}}]),angular.module("homepage").factory("SidebarHelperSrvc",["DateUtility","TemplateTimelineService",function(t,e){function n(){return{pending:{},current:{morning:[],afternoon:[],evening:[],night:[]},future:{}}}function i(t){switch(t){case"CLDR":m.calendar=new n;break;case"HABT":m.habit=new n;break;default:m.habit=new n,m.calendar=new n}m.all=new n}function a(t){"HABT"==t.type&&p.habit.templates.push(t),"CLDR"==t.type&&p.calendar.templates.push(t)}function s(t){"HABT"==t.type&&o(t),"CLDR"==t.type&&l(t),c()}function o(t){u(t)}function l(e){var n=new Date,i=e.data.dates.START.date,a=e.data.dates.END.date;t.isBetweenDates(n,i,a,!0,!0)&&u(e)}function c(){var t=m.habit.current.morning.concat(m.calendar.current.morning),e=m.habit.current.afternoon.concat(m.calendar.current.afternoon),n=m.habit.current.evening.concat(m.calendar.current.evening),i=m.habit.current.night.concat(m.calendar.current.night);m.all.current.morning=t.slice(),m.all.current.afternoon=e.slice(),m.all.current.evening=n.slice(),m.all.current.night=i.slice()}function r(t){var e={};return e.hashid=t.data.hashid,e.isChecked=t.data.isChecked,"HABT"==t.type&&("TIME"==t.data.time.code?(e.type="HBTT",e.label=t.data.title,e.date=t.data.time.date):(e.type="HBTR",e.label=t.data.title)),"CLDR"==t.type&&(e.label=t.data.title?t.data.title:"Event",t.data.placetext&&t.data.times.START.isDateSet?(e.type="CMTL",e.times=t.data.times,e.locationText=t.data.placetext):t.data.times.START.isDateSet?(e.type="CRBT",e.times=t.data.times):t.data.times.START.isDateSet||(e.type="CMWT")),e}function d(t,e){var n,i=new Date;"HABT"==e?(type="habit",n=t.data.time.date,e=t.data.time.code||"TIME"):"CLDR"==e&&(type="calendar",n=t.data.times.START.date,e="TIME"),n=new Date(n),"MRNG"==e||"TIME"==e&&n.getHours()>=6&&n.getHours()<12?m[type].current.morning.push(r(t)):"AFTN"==e||"TIME"==e&&n.getHours()>=12&&n.getHours()<17?m[type].current.afternoon.push(r(t)):"EVNG"==e||"TIME"==e&&n.getHours()>=17&&n.getHours()<20?m[type].current.evening.push(r(t)):"NGHT"==e||"TIME"==e&&n.getHours()>=20&&n.getHours()<24?m[type].current.night.push(r(t)):("NONE"==e||"FLDY"==e||"TIME"==e&&i.getHours()>=0&&i.getHours()<6)&&(i.getHours()>=6&&i.getHours()<12?m[type].current.morning.push(r(t)):i.getHours()>=12&&i.getHours()<17?m[type].current.afternoon.push(r(t)):i.getHours()>=17&&i.getHours()<20?m[type].current.evening.push(r(t)):m[type].current.night.push(r(t)))}function u(e){var n=["SUN","MON","TUE","WED","THU","FRI","SAT"],i=e.data.repetition.repeats,a=new Date;if("ONCE"==i)0===t.compareDateOnly(e.timestamp,a)&&d(e,e.type);else if("DALY"==i)d(e,e.type);else if("WEEK"==i){var s=(e.data.repetition.chooseday.type,n[a.getDay()]),o=e.data.repetition.chooseday.days;for(var l in o){var c=o[l];s==c&&d(e,e.type)}}else"MTLY"==i?a.getDate()==new Date(e.timestamp)&&d(e,e.type):"ANLY"==i&&a.getDate()==new Date(e.timestamp).getDate()&a.getMonth()==new Date(e.timestamp).getMonth()&&d(e,e.type)}var p={habit:{templates:[]},calendar:{templates:[]}},m={habit:new n,calendar:new n,all:new n};return{initialize:function(t,n){t.length>0&&i(n),t=e.getItemsByDate(t);for(var a in t){var o=t[a];s(o)}return m},getSidebarByDate:function(t){return this.initialize(p.habit.templates,"HABT"),this.initialize(p.calendar.templates,"CLDR"),m},getSidebarData:function(){return m},update:function(t){return a(t),s(t),m},resetAll:function(){p.habit.templates.length=0,p.calendar.templates.length=0,i()}}}]),angular.module("homepage").factory("Structs",["$rootScope","DataStoreSrvc","GlobalDataService","Server",function(t,e,n,i){function a(){return{start:null,end:null}}return{DateRange:a}}]),angular.module("homepage").factory("TemplateTimelineService",["GlobalDataService","TimelineService",function(t,e){function n(n,i){return i?e.getItemsByDate(n,i):e.getItemsByDate(n,t.getSelectedDate())}function i(t,e){return t.filter(function(t){return t.type!==e})}function a(t,e){return t.filter(function(t){return t.type===e})}return{getItemsByDate:n,excludeItemsByType:i,filterItemsByType:a}}]),angular.module("homepage").factory("TimelineService",["ArrayUtility","DateUtility",function(t,e){function n(t,n){var i=[],a=e.getDateOnly(new Date(n));for(var s in t){var o=t[s],l=e.getDateOnly(new Date(o.timestamp));a.getTime()==l.getTime()&&i.push(o)}return i}function i(){return l}function a(){l="ASCDG"===l?"DSCDG":"ASCDG"}function s(){return c}function o(t){c.value=t}var l="ASCDG",c={value:!1};return{getSortOrder:i,setSortOrder:a,getLoadingStatus:s,setLoadingStatus:o,getItemsByDate:n}}]),angular.module("homepage").factory("ArrayUtility",function(){function t(t,e){t.length=0;for(var n in e){var i=e[n];t.push(i)}return t}return{reassignArray:t}}),angular.module("homepage").factory("DateUtility",function(){function t(t){var e=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return t?n:e}function e(t){t=new Date(t)||new Date;var e=t.getHours(),n=t.getMinutes(),i=t.getSeconds(),a=e>=12?"pm":"am";e%=12,e=e?e:12,n=n<10?"0"+n:n,i=i<10?"0"+i:i;var s=e+":"+n+":"+i+" "+a;return s}function n(e){e=new Date(e)||new Date;var n=t(!0);return e.getDate()+" "+n[e.getMonth()]+" "+e.getFullYear()}function i(t){return t=new Date(t),new Date(t.setHours(0,0,0,0))}function a(t){return t=new Date(t),new Date(t.setHours(23,59,59,999))}function s(t){return new Date(t.getFullYear(),t.getMonth(),1)}function o(t){return new Date(t.getFullYear(),t.getMonth()+1,0)}function l(t){t=new Date(t);var e=s(t),n=o(t);return{start:i(e),end:a(n)}}function c(t){return new Date(t.getFullYear(),0,1)}function r(t){return new Date(t.getFullYear(),11,31)}function d(t){t||(t=new Date);var e=new Date(t).getTime(),n=(new Date).getTimezoneOffset();return e+=60*n*1e3}function u(t){return t=new Date(t),t.setTime((new Date).getTime()),t}function p(t,e){t=i(t),e=i(e);var n=864e5,a=(t.getTime()-t.getTime())/n;return a}function m(t,e,n,s,o){var l=!1;return t=new Date(t),e=i(e),n=a(n),l=s&&o?t>=e&&t<=n:s?t>=e&&t<n:o?t>e&&t<=n:t>e&&t<n}return{getMonthTitles:t,getTimeStr:e,getDateStr:n,getDateOnly:i,getDateEnd:a,getMonthStart:s,getMonthEnd:o,getMonthDateRange:l,getYearStart:c,getYearEnd:r,getGmtTimestamp:d,newDateSameRef:u,compareDateOnly:p,isBetweenDates:m}}),angular.module("homepage").factory("StringUtility",function(){function t(t){var n=[];return t.indexOf("[")>-1?e(n,t):n=t.split(",")}function e(t,n){n=n.trim();var i=n.indexOf(","),a=n.indexOf("[");if(0!=n.length)if(n.indexOf("[")==-1){var s=i>-1?i:n.trim().length;t.push(n.substring(0,s)),e(t,n.substring(s+1))}else if(i>a){var o=n.indexOf("]"),l=n.substring(a+1,o),c=l.split(",");t.push(c),e(t,n.substring(o+2))}else i<a&&(t.push(n.substring(0,i)),e(t,n.substring(i+1)));return t}function n(t){switch(t.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1}return t}return{getPartsOfString:t,stringToBoolean:n}}),angular.module("homepage").service("BrowserType",["$window",function(t){return function(){var e=t.navigator.userAgent,n={chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet explorer/i};for(var i in n)if(n[i].test(e))return i;return"unknown"}}]).service("MobileType",function(){return{Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)||navigator.userAgent.match(/WPDesktop/i)},any:function(){var t=window.innerWidth<600;return this.Android()||this.BlackBerry()||this.iOS()||this.Opera()||this.Windows()||t}}}),angular.module("homepage").factory("WidgetHelperSrvc",["FoodNutritionSrvc","TemplateTimelineService",function(t,e){function n(){return{list:[]}}function i(){return{received:0,spent:0,lent:0,borrowed:0,remaining:0}}function a(){return{calories:{required:0,consumed:0,message:"No food info recorded"}}}function s(){return{workouts:[],message:""}}function o(t){switch(t=t?t:""){case"MOOD":v.mood=new n;break;case"MNEY":v.money=new i;break;case"FOOD":v.food=new a;break;case"HLTH":v.fitness=new s;break;default:v.mood=new n,v.money=new i,v.food=new a,v.fitness=new s}}function l(t){"FOOD"==t.type?m.food.templates.push(t):"MOOD"==t.type?m.mood.templates.push(t):"MNEY"==t.type?m.money.templates.push(t):"HLTH"==t.type&&m.fitness.templates.push(t)}function c(t){"FOOD"==t.type?r(t):"MOOD"==t.type?d(t):"MNEY"==t.type?u(t):"HLTH"==t.type&&p(t)}function r(n){o("FOOD");var i=!1,a=0,s=2500,l="",c=e.getItemsByDate(m.food.templates);for(var r in c){var d=c[r];for(var u in d.data.list){var p=d.data.list[u];if(p.count){var f=parseInt(p.count);"number"==typeof f&&(a+=f)}else if(p.foodtext){var g=t.getNutritionInfo(p.foodtext,p.mealtype,p.quantity,p.qtytype),h=parseInt(g.calories);h>0?a+=h:i=!0}}}var b=s-a;l=b>0?"Going good":Math.abs(b)<1e3?"Little overloaded":"Workout needed",v.food.calories.message=l,v.food.calories.consumed=i?a+" + X Cal":a,v.food.calories.required=s}function d(t){o("MOOD");var e=parseInt(t.data.level);e="number"==typeof e?e:0,v.mood.list.push({level:e,timestamp:t.timestamp})}function u(t){o("MNEY");for(var e in m.money.templates){var n=m.money.templates[e],i=parseInt(n.data.amount);i=i&&i>0?i:0,"PAID"==n.data.financetype&&(n.data.whomobj||n.data.whom?v.money.lent+=i:v.money.spent+=i),"RCVD"==n.data.financetype&&(n.data.whomobj||n.data.whom?v.money.borrowed+=i:v.money.received+=i)}var a=v.money.received+v.money.borrowed-(v.money.lent+v.money.spent);v.money.remaining=a}function p(t){for(var e in t.data.list){var n=t.data.list[e];v.fitness.workouts.push(n)}v.fitness.workouts.length>0&&(v.fitness.message="Keep burning calories")}var m={mood:{templates:[]},money:{templates:[]},food:{templates:[]},fitness:{templates:[]}},v={};return v.mood=new n,v.money=new i,v.food=new a,v.fitness=new s,{initialize:function(t,n){o(n),t=e.getItemsByDate(t);for(var i in t){var a=t[i];c(a)}},getWidgetsByDate:function(t){return this.initialize(m.mood.templates,"MOOD"),this.initialize(m.money.templates,"MNEY"),this.initialize(m.food.templates,"FOOD"),this.initialize(m.fitness.templates,"HLTH"),v},getWidgetsData:function(){return v},update:function(t){return l(t),c(t),v},resetAll:function(){m.mood.templates.length=0,m.money.templates.length=0,m.food.templates.length=0,m.fitness.templates.length=0}}}]),angular.module("homepage").factory("TemplatePreprocessor",function(){function t(t,e){for(var n in t.data.list){var i=t.data.list[n];for(var a in i.sets){var s=i.sets[a];""===s.distance&&""===s.repetition&&""===s.time&&""===s.weight&&delete e.data.list[n].sets.splice(a,1)}}}function e(t,e){for(var n in t.data.list){var i=t.data.list[n];0===i.sets.length&&delete e.data.list.splice(n,1)}}function n(n){if(n.data.list&&n.data.list.length>0){var i=angular.copy(n);t(i,n),e(i,n)}return n}function i(t){if("HLTH"===t.type)return n(t)}return{removeEmptyWorkoutAndSet:i}}),angular.module("homepage").directive("autocomplete",["$timeout",function(t){return{controller:"autocompleteController",restrict:"E",replace:!0,scope:{choices:"=",enteredtext:"=",minlength:"=",result:"=",type:"=",onselect:"&"},templateUrl:"components/common-components/autocomplete/autocomplete.html"}}]).controller("autocompleteController",["$scope","$timeout",function(t,e){function n(e){return t.choices&&e?t.choices.filter(i(e)):[]}function i(t){var e=angular.lowercase(t);return function(t){var n=angular.lowercase(t.label);return 0===n.indexOf(e)}}t.filteredChoices=[],t.isVisible={suggestions:!1},t.filterItems=function(){t.enteredtext&&t.minlength<=t.enteredtext.length?(t.filteredChoices=n(t.enteredtext),t.isVisible.suggestions=t.filteredChoices.length>0):t.isVisible.suggestions=!1},t.selectItem=function(n){t.result={chosen:t.choices[n-1],type:t.type},t.enteredtext=t.result.chosen.label,t.isVisible.suggestions=!1,e(function(){t.$apply(),t.onselect&&t.onselect()})}}]),angular.module("homepage").directive("buble",function(){return{restrict:"E",replace:!0,scope:{size:"=",title:"=",value:"="},transclude:!0,templateUrl:"components/common-components/buble/buble.html"}}),angular.module("homepage").directive("calendarDual",function(){return{restrict:"E",replace:!0,scope:{dates:"="},templateUrl:"components/common-components/calendar/calendar-dual.html"}}),angular.module("homepage").directive("calendar",function(){return{controller:"calendarController",restrict:"E",replace:!0,scope:{chosendate:"=date",options:"="},templateUrl:"components/common-components/calendar/calendar.html"}}).controller("calendarController",["$scope","$timeout",function(t,e){function n(t,e){return new Date(e,t+1,0).getDate()}function i(){return t.tempDate}function a(e){t.tempDate=e,t.selectionDay=t.tempDate.getDate()}function s(e){t.isCalendarVisible=!1,t.chosendate.date=e}function o(t){return t?["Mo","Tu","We","Th","Fr","Sa","Su"]:["Su","Mo","Tu","We","Th","Fr","Sa"]}function l(t){t||(t=new Date);var e=t.getFullYear(),i=t.getMonth(),a=new Date(e,i,1).getDay();a=c.isWeekStartOnMonday?0===a?7:a:0===a?a:a+1;for(var s=n(i,e),o=[],l=[],r=[],d=0,u="",p=0;p<a-1;p++)o.push(u),r.push(u);for(var m=1;m<=s;m++)r.push(m),o.push(m),o.length%7===0&&(l[d]=r,r=[],d++);var v=o.length;v=v>28?35-v:v;for(var f=0;f<v;f++)o.push(u),r.push(u);return l[d]=r,r=[],l}var c={isWeekStartOnMonday:!1};t.chosendate.date=t.chosendate.date instanceof Date?t.chosendate.date:new Date,t.tempDate=t.chosendate.date,t.selectionDay=t.tempDate.getDate(),t.isCalendarVisible=!1,t.toggleCalendar=function(){t.isCalendarVisible=!t.isCalendarVisible},t.setDateMonth=function(e,n){e.stopPropagation();var s=i();s.setMonth(s.getMonth()+n),a(s),t.weeks=l(s)},t.dateClicked=function(e,n){e.stopPropagation(),t.chosendate.isDateSet=!0;var a=i();a.setDate(n),s(a)},t.weekTitle=o(c.isWeekStartOnMonday),t.weeks=l()}]),angular.module("homepage").directive("checkbox",function(){return{controller:"checkboxController",restrict:"E",replace:!0,scope:{label:"=",name:"=",isChecked:"=",markCheckboxFn:"&"},transclude:!0,templateUrl:"components/common-components/checkbox/checkbox.html"}}).controller("checkboxController",["$scope",function(t){t.checked=!!t.checked&&t.checked}]),angular.module("homepage").directive("editor",function(){return{controller:"EditorController",
restrict:"E",replace:!0,scope:{note:"=scopeObj",isEditable:"="},transclude:!0,templateUrl:"components/common-components/editor/editor.html"}}).controller("EditorController",["$scope",function(t){t.handlePaste=function(t){}}]),angular.module("fullscreenDialogApp",[]).directive("fullscreenDialog",function(){function t(t,e,n){t.$on("$destroy",function(){var t=document.getElementsByTagName("body")[0];t.classList.remove("noscroll")})}return{controller:"fsDialogController",link:t,restrict:"E",replace:!0,transclude:!0,scope:{visible:"@"},template:'<div class="dialog-container"><ng-transclude></ng-transclude></div>'}}).controller("fsDialogController",["$scope",function(t){var e=document.getElementsByTagName("body")[0];console.log(e),"true"==t.visible?t.showDialog():t.hideDialog(),t.showDialog=function(){t.isPanelVisible=!0,e.classList.add("noscroll")},t.hideDialog=function(){t.isPanelVisible=!1,e.classList.remove("noscroll")}}]),angular.module("homepage").directive("repetition",function(){return{controller:"repetitionController",restrict:"E",replace:!0,scope:{repetition:"=",defaults:"="},transclude:!0,templateUrl:"components/common-components/repetition/repetition.html"}}).controller("repetitionController",["$scope",function(t){function e(){return{repeats:"",chooseday:{type:"",days:[]},choosemonth:{type:"",months:[]},count:{nth:"",isMonthly:!1}}}t.defaults=t.defaults||{},t.repetition=new e,t.repetition.repeats=t.defaults.repeat||"DALY",t.selectOption=function(n){var i=new e;switch(n){case"ONCE":case"DALY":case"WEEK":case"ANLY":i.repeats=n;break;case"MTLY":i.repeats=n,i.choosemonth.type="ALL";break;case"WKDY":case"WKED":case"HLDY":i.repeats="WEEK",i.chooseday.type=n;break;case"SUN":case"MON":case"TUE":case"WED":case"THU":case"FRI":case"SAT":i.repeats="WEEK",i.chooseday.type="CHSE",i.chooseday.days=t.repetition.chooseday.days;var a=t.repetition.chooseday.days.indexOf(n);a>-1?i.chooseday.days.splice(a,1):i.chooseday.days.push(n);break;case"ALL":case"CHSE":case"CONT":i.repeats="MTLY",i.choosemonth.type=n;break;case"JAN":case"FEB":case"MAR":case"APR":case"MAY":case"JUN":case"JUL":case"AUG":case"SEP":case"OCT":case"NOV":case"DEC":i.repeats="MTLY",i.choosemonth.type="CHSE",i.choosemonth.months=t.repetition.choosemonth.months;var a=t.repetition.choosemonth.days.indexOf(n);a>-1?i.choosemonth.days.splice(a,1):i.choosemonth.days.push(n)}t.repetition=i},t.isVisible={days:!1,select:!1,months:!1,count:!1}}]),angular.module("homepage").directive("selectTime",function(){return{controller:"notePanelController",restrict:"E",replace:!0,scope:{choosen:"=",getData:"="},transclude:!0,templateUrl:"components/common-components/select-time/select-time.html"}}).controller("notePanelController",["$scope","DateUtility",function(t,e){function n(n){var i,a={};return"ALL"===n?(a.start=e.getYearStart(new Date),a.end=e.getYearEnd(new Date)):(i=new Date(t.choosen.year,n,1),a=e.getMonthDateRange(i)),a}t.years=[2018,2017,2016],t.months=e.getMonthTitles(!0),t.isYearDdOpen=!1,t.selectMonth=function(e){var i=n(e);t.isYearDdOpen=!1,t.choosen.month=e,t.getData(i)},t.selectYear=function(e){var i=n(t.choosen.month);t.isYearDdOpen=!t.isYearDdOpen,t.choosen.year=e,t.getData(i)}}]),angular.module("homepage").directive("tagsList",function(){return{restrict:"E",replace:!0,scope:{taglist:"="},templateUrl:"components/common-components/tags/tags-list.html"}}),angular.module("homepage").directive("tags",function(){return{restrict:"E",replace:!0,scope:{tags:"="},link:tagLinker,templateUrl:"components/common-components/tags/tags.html"}}).directive("tagsAutocomplete",function(){return{restrict:"E",replace:!0,scope:{choices:"=",enteredtext:"=",minlength:"=",result:"=",type:"=",tags:"="},link:tagLinker,templateUrl:"components/common-components/tags/tags-autocomplete.html"}}),angular.module("homepage").directive("timepicker",["$compile",function(t){function e(e,n,i,a){n.append('<span class="date" ng-click="toggleTimeWidget($event)">{{time.date | date:"hh:mm a"}}</span>'),n.append("<timeselection></timeselection>"),t(n)(e)}return{controller:"timepickerController",link:e,scope:{time:"="},restrict:"E",replace:!0,template:'<span class="timepicker"></span>'}}]).controller("timepickerController",["$scope","$timeout",function(t,e){function n(){t.selected.date=new Date,t.time.date?t.selected.date.setTime(t.time.date.getTime()):t.time.date=new Date,i(t.selected)}function i(t){t.mins=t.date.getMinutes()}t.selected={};n(),t.setTimeObj=function(){t.time.date.setHours(t.selected.date.getHours()),t.time.date.setMinutes(t.selected.mins)},t.resetTimeObj=function(){t.selected.date.setTime(t.time.date.getTime()),i(t.selected)},t.isTimePickerVisible=!1,t.getTimePickerVisibility=function(){return t.isTimePickerVisible},t.setTimePickerVisibility=function(n){t.isTimePickerVisible=n,e(function(){})},t.toggleTimeWidget=function(e){var n=t.getTimePickerVisibility();t.setTimePickerVisibility(!n),t.time.isDateSet=!0}}]).directive("timeselection",function(){return{controller:"timepickerwidgetController",restrict:"E",require:"^timepicker",replace:!0,templateUrl:"components/common-components/timepicker/timepicker.html"}}).controller("timepickerwidgetController",["$scope",function(t){t.setHour=function(e){var n=t.selected.date.getHours();n+=e,n>23?n-=24:n<0&&(n+=24),t.selected.date.setHours(n)},t.setMins=function(e){t.selected.mins=parseInt(t.selected.mins);var n=t.selected.mins%5;5==e?t.selected.mins+e>=60?t.selected.mins=0:0!==n?t.selected.mins+=5-n:t.selected.mins+=e:e==-5&&(t.selected.mins<=0?t.selected.mins=55:0!==n?t.selected.mins-=n:t.selected.mins+=e)},t.setAMPM=function(){var e=t.selected.date.getHours();e>12?e-=12:e+=12,t.selected.date.setHours(e)},t.resetTimeAndHide=function(){t.resetTimeObj(),t.toggleTimeWidget()},t.setTimeAndHide=function(){t.setTimeObj(),t.toggleTimeWidget()}}]),angular.module("homepage").directive("timeselector",function(){return{controller:"timeSelectorController",restrict:"E",replace:!0,scope:{time:"=scopeObj"},transclude:!0,templateUrl:"components/common-components/timeselector/timeselector.html"}}).controller("timeSelectorController",["$scope",function(t){t.time.code="NONE",t.selectOption=function(e){t.time.code=e}}]),angular.module("homepage").directive("title",function(){return{restrict:"E",replace:!0,scope:{note:"=scopeObj"},templateUrl:"components/common-components/title/title.html"}}),angular.module("homepage").directive("totaltimeselector",function(){return{restrict:"E",replace:!0,scope:{times:"="},transclude:!0,templateUrl:"components/common-components/totaltimeselector/totaltimeselector.html"}}),angular.module("trailicons").directive("trail",function(){var t='<ul class="trail" ng-init="setTrailItems()"><li ng-repeat="item in items track by $index" class="{{item.class}}"></li></ul>';return{controller:"TrailController",restrict:"E",replace:!0,scope:{data:"=",binary:"="},template:t}}).controller("TrailController",["$scope",function(t){t.showModal=!1,t.toggleModal=function(){t.showModal=!t.showModal},t.setTrailItems=function(){if(t.items=[],void 0==t.binary||""==t.binary){var e=t.data;e&&e.length>=7&&(e=e.slice(Math.max(e.length-7,0))),t.items=e}else{var n=t.binary.split("");for(var i in n){var a=n[i],s="";switch(a){case"0":s="done";break;case"1":s="miss";break;default:s="none"}t.items.push({"class":s})}}}}]),angular.module("homepage").directive("drawerMenu",function(){function t(t,e,n){t.$on("$destroy",function(){document.querySelector("body").classList.add("noscroll")})}return{controller:"drawerMenuController",link:t,restrict:"E",templateUrl:"components/content-components/drawer/drawer-menu.html"}}).controller("drawerMenuController",["$scope",function(t){var e=document.querySelector("body");t.isPanelVisible=!1,t.showDrawer=function(){t.isPanelVisible=!0,e.classList.add("noscroll")},t.hideDrawer=function(){t.isPanelVisible=!1,e.classList.remove("noscroll")},t.toggleDrawer=function(){t.isPanelVisible=!t.isPanelVisible,e.classList.toggle("noscroll")}}]),angular.module("homepage").directive("footer",function(){return{restrict:"E",replace:!0,transclude:!0,templateUrl:"components/content-components/footer/footer.html"}}),angular.module("homepage").directive("headerMenu",function(){return{restrict:"E",replace:!0,transclude:!0,templateUrl:"components/content-components/header/header-menu.html",controller:"loginController"}}).controller("loginController",["$scope","$window","Authentication","Server",function(t,e,n,i){t.login=function(){i.fblogin().success(function(t){console.log(t)})},t.logout=function(){i.logout().success(function(t){n.removeUser(),e.location.href="/#/"})}}]),angular.module("homepage").directive("header",function(){return{controller:"HeaderController",restrict:"E",replace:!0,transclude:!0,templateUrl:"components/content-components/header/header.html"}}).controller("HeaderController",["$scope","$state","$rootScope","$window","Authentication",function(t,e,n,i,a){t.loadDefaultPage=function(){"demo"==n.currentRoute.name?e.go("start"):n.isAuthenticated?i.location.href="/#/home":e.go("start")}}]),angular.module("homepage").directive("home",function(){return{restrict:"E",replace:!0,transclude:!0,templateUrl:"components/content-components/home/home.html"}}),angular.module("homepage").directive("inputbox",function(){return{controller:"BoxController",restrict:"E",replace:!0,scope:{isDemo:"="},transclude:!0,templateUrl:"components/content-components/inputbox/inputbox.html"}}).controller("BoxController",["$localStorage","$scope","$state","$timeout","DataStoreSrvc","DateUtility","InputboxDataSrvc","GlobalDataService","MobileType","Server","TemplatePreprocessor","TemplateService",function(t,e,n,i,a,s,o,l,c,r,d,u){function p(){return o.moduleDefaultData()}function m(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e]._.isHavingData)return t[e]=v(t[e]),t[e];return{}}function v(t){for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];if(void 0!==n.taglist&&void 0!==n.text&&(""!==n.text&&n.taglist.push(n.text),n.taglist.length>0)){for(var i=n.taglist[0],a=1;a<n.taglist.length;a++)i+=", "+n.taglist[a];n.tagstext=i}}return t}function f(){e.data=new p,e.currenttype=""}function g(t){return"CLDR"!==t.type&&"HABT"!==t.type||(t.isLatest=!0),"HLTH"===t.type&&d.removeEmptyWorkoutAndSet(t),t}e.currenttype="",e.data=new p,e.list=o.templates,e.isMobile=c.any(),e.selected={},e.selected.date=new Date,e.select=function(t){if("CLDR"!==t){switch(t){case"NOTE":e.data.note._.isHavingData=!0;break;case"LIST":e.data.list._.isHavingData=!0;break;case"ACTY":e.data.activity._.isHavingData=!0;break;case"MOOD":e.data.mood._.isHavingData=!0;break;case"HABT":e.data.habit._.isHavingData=!0;break;case"HLTH":e.data.fitness._.isHavingData=!0;break;case"FOOD":e.data.food._.isHavingData=!0;break;case"MNEY":e.data.finance._.isHavingData=!0;break;case"PLCS":e.data.place._.isHavingData=!0;break;case"MDIA":e.data.media._.isHavingData=!0;break;case"PEPL":e.data.people._.isHavingData=!0;break;case"CLDR":e.data.calendar._.isHavingData=!0;break;default:e.currenttype=""}e.currenttype=t,e.selected.date=s.newDateSameRef(e.selected.date)}},e.open=function(t){n.transitionTo(t)},e.submit=function(){if(e.isDemo)f();else{var n=m(e.data);delete n._;var i={};i.type=n.type,i.timestamp=(new Date).getTime(),i.latertime=new Date(e.selected.date).getTime(),i.data=n,delete i.data.type,g(i),console.log(i),a.add(i),l.setSelectedDate(new Date),u.getTemplates(),a.updateAll(),f();var s={templates:[i]};r.ibsubmit(s).success(function(t){console.log(t)}).error(function(e,n){console.log(e),console.log(n),t.templates.push(i)})}},e.reset=function(){f()}}]).factory("InputboxDataSrvc",function(){function t(){return{activity:{type:"ACTY",_:{isHavingData:!1,isVisible:{},names:e},whom:{text:"",taglist:[]}},calendar:{type:"CLDR",_:{isHavingData:!1,isVisible:{},places:e,attendees:e},dates:{START:{date:new Date,isDateSet:!1},END:{date:new Date,isDateSet:!1}},times:{START:{date:new Date,isDateSet:!1},END:{date:new Date,isDateSet:!1}},attendees:{text:"",taglist:[]},isChecked:!1},finance:{type:"MNEY",_:{isHavingData:!1,isVisible:{},attendees:e}},fitness:{type:"HLTH",_:{isHavingData:!1,isVisible:{},workouts:e}},food:{type:"FOOD",_:{isHavingData:!1,isVisible:{},foodlist:e}},list:{type:"LIST",_:{list:[],isHavingData:!1,isVisible:{}},tags:{text:"",taglist:[]}},habit:{type:"HABT",_:{isHavingData:!1,isVisible:{}},isChecked:!1},mood:{type:"MOOD",level:999,_:{isHavingData:!1,isVisible:{}}},note:{type:"NOTE",_:{isHavingData:!1,isVisible:{},tags:e},tags:{text:"",taglist:[]}},place:{type:"PLCS",_:{isHavingData:!1,isVisible:{},places:e},whom:{text:"",taglist:[]}}}}var e=[{index:1,id:"ABC1",label:"One"},{index:2,id:"ABC2",label:"Two"},{index:3,id:"ABC3",label:"Three"},{index:4,id:"ABC4",label:"Four"},{index:5,id:"ABC5",label:"Five"},{index:6,id:"ABC6",label:"Six"},{index:7,id:"ABC7",label:"Seven"},{index:8,id:"ABC8",label:"Eight"},{index:9,id:"ABC9",label:"Nine"},{index:10,id:"ABC10",label:"Ten"}],n=[{name:"note",type:"NOTE",page:"notes",src:"img/icons/note.png",icon:"file-text-o"},{name:"food",type:"FOOD",page:"food",src:"img/icons/food.png",icon:"cutlery"},{name:"workout",type:"HLTH",page:"health",src:"img/icons/health.png",icon:"heartbeat"},{name:"money",type:"MNEY",page:"finance",src:"img/icons/finance.png",icon:"money"},{name:"place",type:"PLCS",page:"places",src:"img/icons/places.png",icon:"map-marker"}];return{moduleDefaultData:t,templates:n}}),angular.module("homepage").directive("commentpanel",function(){return{controller:"commentPanelController",restrict:"E",replace:!0,transclude:!0,templateUrl:"components/content-components/login/commentpanel.html"}}).controller("commentPanelController",["$scope","$timeout","Server",function(t,e,n){t.isMessageVisible=!1,t.message="Comment posted successfully",t.addcomment=function(){n.addcomment({comment:t.comment}).success(function(n){t.comment="",t.isMessageVisible=!0,e(function(){t.isMessageVisible=!1},3e3)})}}]),angular.module("homepage").directive("loginpanel",function(){return{controller:"loginPanelController",restrict:"E",replace:!0,transclude:!0,templateUrl:"components/content-components/login/loginpanel.html"}}).controller("loginPanelController",["$scope","$timeout","$window","Authentication","DataStoreSrvc","Server","TemplateService",function(t,e,n,i,a,s,o){t.authenticate=function(){var l={username:t.username,password:t.password};s.login(l).success(function(s){console.log(s),s.token&&s.success?(i.setUser(s.token),i.setHeaders(),a.resetAll(),n.location.href="/#/home",o.getTemplates()):(t.message=s.message,t.isMessageVisible=!0,e(function(){t.isMessageVisible=!1},3e3))})}}]),angular.module("homepage").directive("registerpanel",function(){return{controller:"registerPanelController",restrict:"E",replace:!0,transclude:!0,templateUrl:"components/content-components/login/registerpanel.html"}}).controller("registerPanelController",["$location","$scope","$timeout","Server",function(t,e,n,i){fbq("track","Lead");var a=t.search();console.log(a),e.data={},e.invite={code:""},e.isRegisterMessageVisible=!1,e.isInviteMessageVisible=!1,e.hasInvite=a.hasinvite,e.register=function(){console.log(e.data),i.register(e.data).success(function(t){console.log(t),t.success,e.data={},e.message=t.message,e.isRegisterMessageVisible=!0,n(function(){e.isRegisterMessageVisible=!1},3e3)})},e.checkInviteCode=function(){i.checkInvite(e.invite).success(function(i){console.log(i),e.invite.code="",i.success&&n(function(){t.path("/signup")},2e3),e.message=i.message,e.isInviteMessageVisible=!0,n(function(){e.isInviteMessageVisible=!1},3e3)})}}]),angular.module("homepage").directive("signuppanel",function(){return{restrict:"E",replace:!0,transclude:!0,templateUrl:"components/content-components/login/signuppanel.html",controller:"signupPanelController"}}).controller("signupPanelController",["$scope","$timeout","$window","Authentication","Server",function(t,e,n,i,a){function s(t){if(!t)return!1;var e=0;for(var n in t)t.hasOwnProperty(n)&&e++;return 5===e||void 0}t.isMessageVisible=!1,t.error={email:!1,username:!1},t.registerUser=function(){var o=t.registrationInfo;console.log(o),s(o)&&a.signup(o).success(function(a){console.log(a),t.message=a.message,a.success?(t.isMessageVisible=!0,t.registrationInfo={},e(function(){i.setUser(a.token),n.location.href="/#/home"},3e3)):(t.isMessageVisible=!0,e(function(){t.isMessageVisible=!1},3e3))})}}]),angular.module("homepage").directive("sidebarCard",function(){return{controller:"sidebarCardController",restrict:"E",replace:!0,scope:{data:"="},transclude:!0,templateUrl:"components/content-components/sidebar/sidebar-card.html"}}).controller("sidebarCardController",["$scope","Server",function(t,e){t.markCheckbox=function(t,n){var i={hashid:t,isChecked:n};e.markTemplate(i).success(function(t){console.log(t)})}}]),angular.module("homepage").directive("sidebarTemplate",function(){return{controller:"sidebarTemplateController",restrict:"E",replace:!0,scope:{data:"="},transclude:!0,templateUrl:"components/content-components/sidebar/sidebar-template.html"}}).controller("sidebarTemplateController",["$scope","DateUtility","GlobalDataService",function(t,e,n){t.currentDate=n.getSelectedDate(),t.isTodaysDate=n.isTodaysDateSelected()}]),angular.module("homepage").directive("timelineTemplate",function(){function t(t,n,i){var a=e(t.item.type);t.itemType=a,t.template="components/feature-components/"+a+"/"+a+"-card.html"}function e(t){var e="";switch(t){case"ACTY":e="activity";break;case"NOTE":e="note";break;case"LIST":e="list";break;case"FOOD":e="food";break;case"HLTH":e="fitness";break;case"PLCS":case"CKIN":e="place";break;case"MNEY":e="finance";break;case"HABT":e="habit";break;case"CLDR":e="calendar";break;case"MOOD":e="mood"}return e}return{controller:"TimelineTemplateController",link:t,restrict:"E",scope:{item:"="},replace:!0,transclude:!0,templateUrl:"components/content-components/timeline/timeline-template.html"}}).controller("TimelineTemplateController",["$scope","MobileType",function(t,e){t.iconOffset=e.any()?"32":"48"}]),angular.module("homepage").directive("timeline",function(){function t(t,e,n){}return{controller:"TimelineController",link:t,restrict:"E",replace:!0,scope:{data:"=",isDemo:"="},transclude:!0,templateUrl:"components/content-components/timeline/timeline.html"}}).controller("TimelineController",["$rootScope","$scope","$timeout","DataStoreSrvc","GlobalDataService","ProcessTimelineService","TemplateService","TimelineService",function(t,e,n,i,a,s,o,l){if(console.log("TimelineController called()"),e.timelineItems=i.getPosts(),e.habitItems=i.getHabits(),e.isLoading=l.getLoadingStatus(),e.isDemo){var c=new Date(1478525916e3);a.setSelectedDate(c)}e.currentDate=a.getSelectedDate(),e.changeDate=function(t){e.isDemo||(e.currentDate.setDate(e.currentDate.getDate()+t),a.setSelectedDate(e.currentDate),o.getTemplates(),i.updateAll())},e.reverseItems=function(){l.setSortOrder(),i.updateAll()}}]).factory("ProcessTimelineService",["DateUtility","TimelineService",function(t,e){function n(t){t&&t.length&&i(t),sortOrder=e.getSortOrder(),"ASCDG"===sortOrder?t.sort(function(t,e){return parseFloat(t.timestamp)-parseFloat(e.timestamp)}):"DSCDG"===sortOrder&&t.sort(function(t,e){return parseFloat(e.timestamp)-parseFloat(t.timestamp)})}function i(e){var n=!1;e.sort(function(t,e){return parseFloat(t.latertime)-parseFloat(e.latertime)});for(var i=0;i<e.length;i++){var s=e[i];"PLCS"===s.type?(n=!0,s.isInSameLocation=!1,s.isLocationInfoAvailable=n):(s.isInSameLocation=!0,s.isLocationInfoAvailable=n),s.timestamp=a(s.timestamp,s.latertime),s.humantime=t.getTimeStr(s.timestamp),s.humandate=t.getDateStr(s.timestamp)}return i}function a(t,e){var n=Math.abs(t-e)/1e3;return n>300?e:t}return{processTimeline:n}}]),angular.module("homepage").directive("typeAndTime",function(){return{restrict:"E",scope:{data:"="},replace:!0,transclude:!0,templateUrl:"components/content-components/timeline/type-and-time.html"}}).filter("typelabel",function(){return function(t){var e="";switch(t){case"ACTY":e="gamepad";break;case"NOTE":e="book";break;case"LIST":e="list-ul";break;case"FOOD":e="glass";break;case"MOOD":e="meh-o";break;case"HLTH":e="heartbeat";break;case"CKIN":e="map-marker";break;case"PLCS":e="location-arrow";break;case"MNEY":e="rupee";break;case"HABT":e="refresh";break;case"CLDR":e="calendar"}return e}}),angular.module("homepage").directive("activityCard",function(){return{restrict:"E",replace:!0,scope:{data:"="},transclude:!0,templateUrl:"components/feature-components/activity/activity-card.html"}}).filter("activityicon",function(){return function(t){var e="slack";switch(t){case"ATNDG":e="briefcase";break;case"CLBTG":e="birthday-cake";break;case"DRNKG":e="beer";break;case"DRVNG":e="automobile";break;case"EATNG":e="cutlery";break;case"LSTNG":e="music";break;case"METNG":e="calendar-check-o";break;case"PLYNG":e="futbol-o";break;case"REDNG":e="book";break;case"RSTNG":e="bed";break;case"RIDNG":e="motorcycle";break;case"SHPNG":e="shopping-bag";break;case"SNGNG":e="microphone";break;case"SLPNG":e="bed";break;case"THKNG":e="comment-o";break;case"TRVLG":e="plane";break;case"WTCNG":e="television";break;case"WRKNG":e="briefcase"}return e}}),angular.module("homepage").directive("activityPanel",function(){return{controller:"activityPanelController",restrict:"E",replace:!0,scope:{activity:"="},templateUrl:"components/feature-components/activity/activity-panel.html"}}).controller("activityPanelController",["$scope",function(t){function e(e){switch(e){case"ATNDG":t.activity.subtypeTitle="Event Name";break;case"CLBTG":t.activity.subtypeTitle="Event Name";break;case"COOKG":t.activity.subtypeTitle="Dishes Name";break;case"DANCE":t.activity.subtypeTitle="Dance Name";break;case"DRNKG":t.activity.subtypeTitle="Drink Name";break;case"DRVNG":t.activity.subtypeTitle="Vehicle Name";break;case"EATNG":t.activity.subtypeTitle="Food Name";break;case"LSTNG":t.activity.subtypeTitle="Listening To";break;case"METNG":t.activity.subtypeTitle="Meeting Title";break;case"PLYNG":t.activity.subtypeTitle="Sports Name";break;case"REDNG":case"THKNG":t.activity.subtypeTitle="About";break;case"SNGNG":t.activity.subtypeTitle="Singing";break;case"SHPNG":t.activity.subtypeTitle="Looking For";break;case"TRVLG":case"WLKNG":t.activity.subtypeTitle="To";break;case"WTCNG":t.activity.subtypeTitle="Watching";break;case"WRKNG":t.activity.subtypeTitle="On"}}t.activities=[{code:"ATNDG",desc:"Attending"},{code:"CLBTG",desc:"Celebrating"},{code:"COOKG",desc:"Cooking"},{code:"DANCE",desc:"Dancing"},{code:"DRNKG",desc:"Drinking"},{code:"DRVNG",desc:"Driving"},{code:"EATNG",desc:"Eating"},{code:"LSTNG",desc:"Listening"},{code:"METNG",desc:"Meeting"},{code:"PLYNG",desc:"Playing"},{code:"REDNG",desc:"Reading"},{code:"RSTNG",desc:"Resting"},{code:"RIDNG",desc:"Riding"},{code:"SNGNG",desc:"Driving"},{code:"SHPNG",desc:"Shopping"},{code:"SLPNG",desc:"Sleeping"},{code:"THKNG",desc:"Thinking"},{code:"TRVLG",desc:"Traveling"},{code:"WLKNG",desc:"Walking"},{code:"WTCNG",desc:"Watching"},{code:"WRKNG",desc:"Working"}],t.setActivityType=function(n){var i=["ATNDG","CLBTG","COOKG","DANCE","DRNKG","DRVNG","EATNG","LSTNG","METNG","PLYNG","REDNG","SHPNG","SLPNG","SNGNG","THKNG","TRVLG","WLKNG","WTCNG","WRKNG"],a=["ATNDG","CLBTG","COOKG","DANCE","DRNKG","DRVNG","EATNG","LSTNG","METNG","PLYNG","REDNG","SHPNG","SNGNG","THKNG","TRVLG","WLKNG","WTCNG","WRKNG"];t.activity.activitytype=n,e(n),i.indexOf(n)!=-1?(t.activity._.isVisible.subtype=!0,a.indexOf(n)!=-1?(t.activity._.isVisible.sleeptype=!1,t.activity._.isVisible.details=!0):"SLPNG"==t.activity.activitytype&&(t.activity._.isVisible.sleeptype=!0,t.activity._.isVisible.details=!1)):(t.activity._.isVisible.subtype=!1,t.activity._.isVisible.sleeptype=!1,t.activity._.isVisible.details=!0)},t.setActivitySubType=function(e){t.activity.activitysubtype=e,t.activity._.isVisible.whom=!0,t.activity._.isVisible.note=!0}}]),angular.module("homepage").directive("calendarCard",function(){return{restrict:"E",replace:!0,scope:{calendarData:"="},transclude:!0,templateUrl:"components/feature-components/calendar/calendar-card.html"}}),angular.module("homepage").directive("calendarPanel",function(){return{controller:"calendarPanelController",restrict:"E",replace:!0,scope:{calendar:"="},templateUrl:"components/feature-components/calendar/calendar-panel.html"}}).controller("calendarPanelController",["$scope","$timeout",function(t,e){t.calendar.defaults={repeat:"ONCE"}}]),angular.module("homepage").directive("contact",function(){return{restrict:"E",replace:!0,transclude:!0,templateUrl:"components/feature-components/contact/contact.html"}}),angular.module("homepage").directive("financeCard",function(){return{controller:"FinanceCardController",restrict:"E",replace:!0,scope:{financeData:"="},transclude:!0,templateUrl:"components/feature-components/finance/finance-card.html"}}).controller("FinanceCardController",["$scope",function(t){t.financeData.currency="8377;"}]),angular.module("homepage").directive("financeMemberInfo",function(){return{controller:"financeMemberInfoController",restrict:"E",replace:!0,scope:{details:"=",index:"=",paidby:"=",size:"=",type:"="},templateUrl:"components/feature-components/finance/finance-member-info.html"}}).controller("financeMemberInfoController",["$scope",function(t){}]),angular.module("homepage").directive("financePanel",function(){return{controller:"financePanelController",restrict:"E",replace:!0,scope:{finance:"="},templateUrl:"components/feature-components/finance/finance-panel.html"}}).controller("financePanelController",["$scope",function(t){function e(){return{title:"",amount:"",paidby:{text:"",taglist:[{text:"Myself"}]},splitbtw:{text:"",taglist:[{text:"Myself"}]}}}t.finance._.isVisible={},t.finance.list=[],t.finance.list[0]=e(),t.addNewItem=function(){var n=t.finance.list.length;t.finance.list[n]=t.finance.list[0],t.finance.list[0]=e(),t.finance._.isVisible={};for(var i=document.querySelectorAll(".input-box-wrapper .finance-panel .chosen"),a=0;a<i.length;a++)i[a].classList.remove("chosen")}}]),angular.module("homepage").directive("financeSummary",function(){return{restrict:"E",replace:!0,scope:{finance:"=data"},transclude:!0,templateUrl:"components/feature-components/finance/finance-summary.html"}}),angular.module("homepage").directive("financeWidget",function(){return{controller:"financeWidgetController",restrict:"E",replace:!0,scope:{data:"=",isDemo:"="},transclude:!0,templateUrl:"components/feature-components/finance/finance-widget.html"}}).controller("financeWidgetController",["$scope","DateUtility","Server",function(t,e,n){if(t.isDemo===!0)t.stats={count:1,result:{myself:{amount_day:2505,amount_month:33778}}};else{var i=e.getMonthDateRange(new Date),a={startTimestamp:new Date(i.start).getTime(),endTimestamp:new Date(i.end).getTime()};n.getMoneyWidgetData(a).success(function(e){console.log(e),t.stats=e})}}]),angular.module("homepage").directive("finance",function(){return{controller:"FinanceController",restrict:"E",replace:!0,transclude:!0,templateUrl:"components/feature-components/finance/finance.html"}}).controller("FinanceController",["$scope","ArrayUtility","DateUtility","Server",function(t,e,n,i){function a(){t.total=0,e.reassignArray(t.finances,[])}function s(e,n){var i={amount:e.amount,title:e.title,timestamp:n},a=new Date(n).getMonth();t.finances[a]||(t.finances[a]=[]),t.finances[a].push(i),t.total+=i.amount}function o(t,e){return t?t.reduce(function(t,n){return n[e]?t+n[e]:t},0):0}t.finances=new Array(12),a(),t.getTotal=o,t.getMoneyData=function(t){i.getMoneyData(t).success(function(t){a();var e=t.documents;e.forEach(function(t){t.data.list.forEach(function(e){e.amount&&s(e,t.timestamp)})})})};var l=(new Date).getMonth();t.choosen={year:2018,month:l},t.getMoneyData(n.getMonthDateRange(new Date(t.choosen.year,l,1)))}]),angular.module("homepage").directive("fitnessCard",function(){return{restrict:"E",replace:!0,scope:{fitnessData:"="},transclude:!0,templateUrl:"components/feature-components/fitness/fitness-card.html"}}),angular.module("homepage").directive("fitnessPanel",function(){return{controller:"fitnessPanelController",restrict:"E",replace:!0,scope:{fitness:"="},templateUrl:"components/feature-components/fitness/fitness-panel.html"}}).controller("fitnessPanelController",["$scope",function(t){function e(){return{repetition:"",weight:"",time:"",distance:""}}function n(){return{workouttitle:"",sets:[new e]}}t.fitness.list=[n()],t.addNewItem=function(){var e=t.fitness.list.length;t.fitness.list[e]=t.fitness.list[0],t.fitness.list[0]=n()}}]),angular.module("homepage").directive("addNewSet",["$timeout",function(t){function e(){return{repetition:"",weight:"",time:"",distance:""}}return{link:function(n,i,a){i.on("keyup",function(i){if(n.index+1==n.sets.length){var a=i.keyCode||i.which;9!=a&&16!=a&&27!=a&&(console.log("keyup happening"),t(function(){n.sets.push(new e),n.$apply()}))}})},restrict:"E",replace:!0,scope:{index:"=",sets:"=data"},templateUrl:"components/feature-components/fitness/fitness-set.html"}}]),angular.module("homepage").directive("fitnessSummary",function(){return{restrict:"E",replace:!0,scope:{fitness:"=data"},templateUrl:"components/feature-components/fitness/fitness-summary.html"}}),angular.module("homepage").directive("fitnessWidget",function(){return{restrict:"E",replace:!0,scope:{data:"="},transclude:!0,templateUrl:"components/feature-components/fitness/fitness-widget.html"}}).filter("workoutSummary",function(){function t(t){var e="";if(t.sets)for(var n in t.sets){var i=t.sets[n];""!==i.repetition?(e+=i.repetition,""!==i.weight?e+="("+i.weight+")":""!==i.distance?e+="("+i.distance+")":""!==i.time&&(e+="("+i.time+")")):""!==i.distance?(e+=i.distance,""!==i.time&&(e+="("+i.time+")")):""!==i.weight?(e+=i.weight,""!==i.time&&(e+="("+i.time+")")):""!==i.time&&(e+=i.time),n<t.sets.length-1&&(e+=", ")}return e}return t}),angular.module("homepage").directive("foodCard",function(){return{restrict:"E",replace:!0,scope:{foodData:"="},transclude:!0,templateUrl:"components/feature-components/food/food-card.html"}}),angular.module("homepage").directive("foodPanel",function(){return{controller:"foodPanelController",restrict:"E",replace:!0,scope:{food:"="},templateUrl:"components/feature-components/food/food-panel.html"}}).controller("foodPanelController",["$scope",function(t){function e(){return{mealtype:"",quantity:1,qtytype:""}}t.isVisible={},t.food.list=[],t.food.list[0]=e(),t.setType=function(e){t.food.list[0].mealtype=e},t.setQtyType=function(e){t.food.list[0].qtytype=e},t.addNewItem=function(){var n=t.food.list.length;t.food.list[n]=t.food.list[0],t.food.list[0]=e(),t.isVisible={};for(var i=document.querySelectorAll(".input-box-wrapper .food-panel .chosen"),a=0;a<i.length;a++)i[a].classList.remove("chosen")}}]).filter("filterMealType",function(){return function(t,e){var n=[];for(var i in t)t[i].mealtype===e&&0!=i&&n.push(t[i]);return n}}).filter("quantityType",function(){return function(t){var e="";switch(t){case"CUP":e="Cup";break;case"GLS":e="Glass";break;case"BTL":e="Bottle";break;case"PTR":e="Pitcher";break;case"TWR":e="Tower";break;case"LTR":e="Liter";break;case"PCE":e="Pieces";break;case"TSP":e="Table Spoon";break;case"BWL":e="Bowl";break;case"ONC":e="Ounce";break;case"GRM":e="Gram"}return e}}),angular.module("homepage").directive("foodSummary",function(){return{restrict:"E",replace:!0,scope:{food:"=data"},transclude:!0,templateUrl:"components/feature-components/food/food-summary.html"}}).filter("caloriesCount",["FoodNutritionSrvc",function(t){function e(e,n){var i="",a=n.foodtype,s=n.quantity,o=n.qtytype,l=n.calories,c=t.getNutritionInfo(e,a,s,o);return i=l>0?l:c.calories>0?c.calories:"X"}return e}]).filter("totalCaloriesCount",["FoodNutritionSrvc",function(t){function e(e){var n=null,i=0,a=!1;for(var s in e){var o=e[s],l=o.count;void 0!==o.foodtext&&""!==o.foodtext&&(n=t.getNutritionInfo(o.foodtext,o.mealtype,o.quantity,o.qtytype),l>0?i+=parseInt(l):n.calories>0?i+=parseInt(n.calories):a=!0)}return 0===i?"X":a===!0?i+" + X":i}return e}]),angular.module("homepage").directive("foodWidget",function(){return{restrict:"E",replace:!0,
scope:{data:"="},transclude:!0,templateUrl:"components/feature-components/food/food-widget.html"}}),angular.module("homepage").directive("habitCardDetail",function(){return{controller:"HabitCardController",restrict:"E",replace:!0,scope:{item:"="},transclude:!0,templateUrl:"components/feature-components/habit/habit-card-detail.html"}}).controller("HabitCardController",["$scope","MobileType","Server",function(t,e,n){t.isMobile=e.any(),t.markCheckbox=function(t,e){var i={hashid:t,isChecked:e};n.markTemplate(i).success(function(t){console.log(t)})}}]),angular.module("homepage").directive("habitPanel",function(){return{controller:"habitPanelController",restrict:"E",replace:!0,scope:{habit:"="},templateUrl:"components/feature-components/habit/habit-panel.html"}}).controller("habitPanelController",["$scope","$timeout",function(t,e){t.habit.defaults={repeat:"DALY"},t.habit.time={},t.habit.time.date=new Date,e(function(){t.$apply()})}]),angular.module("homepage").directive("listCard",function(){return{restrict:"E",replace:!0,scope:{listData:"="},transclude:!0,templateUrl:"components/feature-components/list/list-card.html"}}),angular.module("homepage").directive("listPanel",function(){return{restrict:"E",replace:!0,scope:{list:"="},templateUrl:"components/feature-components/list/list-panel.html"}}),angular.module("homepage").directive("list",["$compile","$timeout","RecursionHelper",function(t,e,n){function i(t,n,i){e(function(){})}function a(t){return n.compile(t)}return{compile:a,controller:"ListController",link:i,replace:!0,restrict:"E",scope:{list:"=",isDisabled:"="},templateUrl:"components/feature-components/list/list.html"}}]).directive("listitem",["$compile","$timeout",function(t,e){function n(t,n,i){n.on("keyup",function(n){n.stopPropagation();var i=n.keyCode||n.which;t.itemindex.index;13==i&&(t.setList(),e(function(){t.$apply()}))})}return{link:n,replace:!0,restrict:"E",scope:{list:"=",isDisabled:"=",itemindex:"=",setList:"&"},template:'<div class="listitem"><input class="input-field" type="text" ng-disabled="isDisabled" ng-model="list[itemindex.index].value"/></div>'}}]).controller("ListController",["$scope","ListHelper",function(t,e){var n=[{value:""}];void 0===t.list&&(t.list=angular.copy(n)),t.setList=function(i){var a=parseInt(i)+1,s=t.list[i].value;if(void 0!==s&&"number"==typeof a){var o=t.list.length,l={value:""},c=e.isCreatingList(s);c?(t.list.push(l),t.list[i].list=angular.copy(n)):a==o?t.list.push(l):t.list.splice(a,0,l)}}}]).factory("ListHelper",function(){return{isCreatingList:function(t){return t+="",t=t.trim(),":"==t.charAt(t.length-1)&&":"==t.charAt(t.length-2)}}}).factory("RecursionHelper",["$compile",function(t){return{compile:function(e,n){angular.isFunction(n)&&(n={post:n});var i,a=e.contents().remove();return{pre:n&&n.pre?n.pre:null,post:function(e,s){i||(i=t(a)),i(e,function(t){s.append(t)}),n&&n.post&&n.post.apply(null,arguments)}}}}}]),angular.module("homepage").directive("mediaPanel",function(){return{restrict:"E",replace:!0,scope:{media:"="},templateUrl:"components/feature-components/media/media-panel.html"}}),angular.module("homepage").directive("moodBar",function(){return{controller:"moodBarController",restrict:"E",replace:!0,scope:{data:"="},transclude:!0,templateUrl:"components/feature-components/mood/mood-bar.html"}}).controller("moodBarController",["$scope",function(t){function e(t){for(var e=[],n=3;n>=-3;n--)0==n?e.push({type:"neutral"}):t>0?t>=n&&n>0?e.push({type:"positive"}):e.push({type:"invisible"}):t<0&&t<=n&n<0?e.push({type:"negative"}):e.push({type:"invisible"});return e}t.slots=e(t.data.level)}]),angular.module("homepage").directive("moodCard",function(){return{restrict:"E",replace:!0,scope:{moodData:"="},transclude:!0,templateUrl:"components/feature-components/mood/mood-card.html"}}),angular.module("homepage").directive("moodPanel",function(){return{controller:"moodPanelController",restrict:"E",replace:!0,scope:{mood:"="},templateUrl:"components/feature-components/mood/mood-panel.html"}}).controller("moodPanelController",["$scope","$timeout",function(t,e){var n=[{level:-3,name:"very low",btnClass:"btn-danger"},{level:-2,name:"low",btnClass:"btn-warning"},{level:-1,name:"bad",btnClass:"btn-warn"},{level:0,name:"neutral",btnClass:"btn-grey"},{level:1,name:"good",btnClass:"btn-mild"},{level:2,name:"high",btnClass:"btn-info"},{level:3,name:"very high",btnClass:"btn-primary"}],i={veryhigh:[{name:"Determined",code:"DTRMD"},{name:"Ecstacy",code:"ECSTY"},{name:"Exicited",code:"EXCTD"},{name:"Focused",code:"FOCSD"},{name:"Inspired",code:"INPRD"},{name:"Motivated",code:"MTVTD"},{name:"Overjoyed",code:"OVRJD"},{name:"Pumped Up",code:"PMPDU"}],high:[{name:"Amazed",code:"AMAZD"},{name:"Anticipating",code:"ANCTG"},{name:"Appreciated",code:"APCTD"},{name:"Brave",code:"BRAVE"},{name:"Beautiful",code:"BETFL"},{name:"Creative",code:"CRETV"},{name:"Celebrated",code:"CLBTD"},{name:"Confident",code:"COFDT"},{name:"Certain",code:"CRTAN"},{name:"Encouraged",code:"ECRGD"},{name:"Healthy",code:"HLTHY"},{name:"In Awe",code:"INAWE"},{name:"Interested",code:"ITRSD"},{name:"Refreshed",code:"RFRSD"},{name:"Successful",code:"SCFUL"},{name:"Surprised",code:"SUPRD"},{name:"Great",code:"GREAT"}],good:[{name:"Admired",code:"ADMRD"},{name:"Affectionate",code:"AFNAT"},{name:"Attracted",code:"ATRTD"},{name:"Composed",code:"CMPSD"},{name:"Calm",code:"CALMX"},{name:"Joy",code:"JOYXX"},{name:"Loved",code:"LOVED"},{name:"Healthy",code:"HLTHY"},{name:"Hopeful",code:"HOFUL"},{name:"Prepared",code:"PRPRD"},{name:"Refreshed",code:"RFRSD"},{name:"Good",code:"GOODX"}],neutral:[{name:"Affectionate",code:"AFNAT"},{name:"Attracted",code:"ATRTD"},{name:"Composed",code:"CMPSD"},{name:"Calm",code:"CALMX"},{name:"Content",code:"CNTNT"},{name:"Peaceful",code:"PCFUL"},{name:"Relaxed",code:"RLAXD"},{name:"Serenity",code:"NETRL"},{name:"Secure",code:"SECUR"},{name:"At ease",code:"ATESE"},{name:"Okay",code:"OKAYX"}],bad:[{name:"Boredom",code:"BORDM"},{name:"Composed",code:"CMPSD"},{name:"Calm",code:"CALMX"},{name:"Depressed",code:"DPRSD"},{name:"Doubtful",code:"DBFUL"},{name:"Fatigued",code:"FATGD"},{name:"Fearful",code:"FRFUL"},{name:"Ignored",code:"IGNRD"},{name:"Judged",code:"JUDGD"},{name:"Mistreated",code:"MSTRD"},{name:"Nervous",code:"NRVOS"},{name:"Rejected",code:"RJCTD"},{name:"Sad",code:"SADXX"},{name:"Scared",code:"SCRED"},{name:"Weak",code:"WEAKX"},{name:"Low",code:"LOWXX"}],low:[{name:"Annoyed",code:"ANOED"},{name:"Anxious",code:"ANXIS"},{name:"Burned Out",code:"BRNOT"},{name:"Disgust",code:"DSGST"},{name:"Defeated",code:"DEFTD"},{name:"Depressed",code:"DPRSD"},{name:"Embarassed",code:"EMBSD"},{name:"Grief",code:"GRIEF"},{name:"Hated",code:"HATED"},{name:"Hopeless",code:"HPLSS"},{name:"Offended",code:"OFNDD"},{name:"Victimised",code:"VTMSD"},{name:"Worried",code:"WRRED"},{name:"Low",code:"LOWXX"}],verylow:[{name:"Anger",code:"ANGER"},{name:"Depressed",code:"DPRSD"},{name:"Guilty",code:"GULTY"},{name:"Rage",code:"RAGEX"},{name:"Stressed",code:"STRSD"},{name:"Terified",code:"TRFID"},{name:"Worthless",code:"WRTLS"},{name:"Very Low",code:"VYLOW"}]};t.moods=n,t.mood.selectedFeelingsCode=[],t.mood.selectedFeelingsName=[],t.selectedFeelingsByIndex=[],t.selectMood=function(n){switch(t.mood.level=n,t.mood.selectedFeelingsCode=[],t.mood.selectedFeelingsName=[],t.selectedFeelingsByIndex=[],n){case 3:t.feelings=i.veryhigh,t.labelType="btn-primary",t.mood.label="Very High";break;case 2:t.feelings=i.high,t.labelType="btn-info",t.mood.label="High";break;case 1:t.feelings=i.good,t.labelType="btn-mild",t.mood.label="Good";break;case 0:t.feelings=i.neutral,t.labelType="btn-grey",t.mood.label="Okay";break;case-1:t.feelings=i.bad,t.labelType="btn-warn",t.mood.label="Bad";break;case-2:t.feelings=i.low,t.labelType="btn-warning",t.mood.label="Low";break;case-3:t.feelings=i.verylow,t.labelType="btn-danger",t.mood.label="Very Low"}e(function(){t.$apply()})},t.selectFeeling=function(n,i){var a=t.mood.selectedFeelingsCode.indexOf(i),s=t.feelings[n].name;a===-1?(t.mood.selectedFeelingsCode.push(i),t.mood.selectedFeelingsName.push(s),t.selectedFeelingsByIndex[n]=i):(t.mood.selectedFeelingsCode.splice(a,1),t.mood.selectedFeelingsName.splice(a,1),t.selectedFeelingsByIndex.splice(n,1)),e(function(){t.$apply()})}}]),angular.module("homepage").directive("moodWidget",function(){return{controller:"moodWidgetController",restrict:"E",replace:!0,transclude:!0,scope:{data:"="},templateUrl:"components/feature-components/mood/mood-widget.html"}}).controller("moodWidgetController",["$scope",function(t){console.log(t.data)}]),angular.module("homepage").directive("noteCard",function(){return{restrict:"E",replace:!0,scope:{noteData:"="},transclude:!0,templateUrl:"components/feature-components/note/note-card.html"}}),angular.module("homepage").directive("notePanel",function(){return{restrict:"E",replace:!0,scope:{note:"="},templateUrl:"components/feature-components/note/note-panel.html"}}),angular.module("homepage").directive("note",function(){return{controller:"noteController",restrict:"E",replace:!0,templateUrl:"components/feature-components/note/note.html"}}).controller("noteController",["$scope","DateUtility","Server",function(t,e,n){t.getNotesData=function(e){n.getNotesData(e).success(function(e){console.log(e),t.notes=e.documents})};var i=(new Date).getMonth();t.choosen={year:2018,month:i},t.getNotesData(e.getMonthDateRange(new Date(t.choosen.year,i,1)))}]),angular.module("homepage").directive("peoplePanel",function(){return{restrict:"E",replace:!0,scope:{people:"="},templateUrl:"components/feature-components/people/people-panel.html"}}),angular.module("homepage").directive("placeCard",function(){return{restrict:"E",replace:!0,scope:{placeData:"="},transclude:!0,templateUrl:"components/feature-components/place/place-card.html"}}),angular.module("homepage").directive("placePanel",function(){return{restrict:"E",replace:!0,scope:{place:"="},templateUrl:"components/feature-components/place/place-panel.html"}});