Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@enplug/dashboard-sdk-utils

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@enplug/dashboard-sdk-utils - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

dist/i18n/translations.json

5

bower.json
{
"name": "enplug-dashboard-sdk-utils",
"version": "2.2.1",
"version": "2.2.2",
"homepage": "https://github.com/Enplug/dashboard-sdk-utils",

@@ -8,2 +8,5 @@ "authors": [

],
"devDependencies": {
"angular-gettext": "^2.3.8"
},
"description": "Helper classes for internal Enplug app development",

@@ -10,0 +13,0 @@ "main": [

4

dist/dashboard-sdk-utils.min.js

@@ -1,2 +0,2 @@

angular.module("enplug.sdk.utils",["enplug.sdk.utils.templates"]),angular.module("enplug.sdk.utils").run(["$templateCache",function($templateCache){$templateCache.put("template/smart-table/pagination.html",'<div ng-if="pages.length >= 2"><st-summary></st-summary><ul class="pagination plain"><li><a class="ion-chevron-left" ng-click="selectPage(currentPage - 1)" ng-class="{ disabled: currentPage == 1 }"></a></li><li><a class="ion-chevron-right" ng-click="selectPage(currentPage + 1)" ng-class="{ disabled: currentPage == numPages }"></a></li></ul></div>')}]),angular.module("enplug.sdk.utils").constant("countries",[{name:"United States",code:"US"},{name:"Afghanistan",code:"AF"},{name:"Åland Islands",code:"AX"},{name:"Albania",code:"AL"},{name:"Algeria",code:"DZ"},{name:"American Samoa",code:"AS"},{name:"Andorra",code:"AD"},{name:"Angola",code:"AO"},{name:"Anguilla",code:"AI"},{name:"Antarctica",code:"AQ"},{name:"Antigua and Barbuda",code:"AG"},{name:"Argentina",code:"AR"},{name:"Armenia",code:"AM"},{name:"Aruba",code:"AW"},{name:"Australia",code:"AU"},{name:"Austria",code:"AT"},{name:"Azerbaijan",code:"AZ"},{name:"Bahamas",code:"BS"},{name:"Bahrain",code:"BH"},{name:"Bangladesh",code:"BD"},{name:"Barbados",code:"BB"},{name:"Belarus",code:"BY"},{name:"Belgium",code:"BE"},{name:"Belize",code:"BZ"},{name:"Benin",code:"BJ"},{name:"Bermuda",code:"BM"},{name:"Bhutan",code:"BT"},{name:"Bolivia",code:"BO"},{name:"Bosnia and Herzegovina",code:"BA"},{name:"Botswana",code:"BW"},{name:"Bouvet Island",code:"BV"},{name:"Brazil",code:"BR"},{name:"British Indian Ocean Territory",code:"IO"},{name:"Brunei Darussalam",code:"BN"},{name:"Bulgaria",code:"BG"},{name:"Burkina Faso",code:"BF"},{name:"Burundi",code:"BI"},{name:"Cambodia",code:"KH"},{name:"Cameroon",code:"CM"},{name:"Canada",code:"CA"},{name:"Cape Verde",code:"CV"},{name:"Cayman Islands",code:"KY"},{name:"Central African Republic",code:"CF"},{name:"Chad",code:"TD"},{name:"Chile",code:"CL"},{name:"China",code:"CN"},{name:"Christmas Island",code:"CX"},{name:"Cocos (Keeling) Islands",code:"CC"},{name:"Colombia",code:"CO"},{name:"Comoros",code:"KM"},{name:"Congo",code:"CG"},{name:"Congo, The Democratic Republic of the",code:"CD"},{name:"Cook Islands",code:"CK"},{name:"Costa Rica",code:"CR"},{name:"Cote D'Ivoire",code:"CI"},{name:"Croatia",code:"HR"},{name:"Cuba",code:"CU"},{name:"Cyprus",code:"CY"},{name:"Czech Republic",code:"CZ"},{name:"Denmark",code:"DK"},{name:"Djibouti",code:"DJ"},{name:"Dominica",code:"DM"},{name:"Dominican Republic",code:"DO"},{name:"Ecuador",code:"EC"},{name:"Egypt",code:"EG"},{name:"El Salvador",code:"SV"},{name:"Equatorial Guinea",code:"GQ"},{name:"Eritrea",code:"ER"},{name:"Estonia",code:"EE"},{name:"Ethiopia",code:"ET"},{name:"Falkland Islands (Malvinas)",code:"FK"},{name:"Faroe Islands",code:"FO"},{name:"Fiji",code:"FJ"},{name:"Finland",code:"FI"},{name:"France",code:"FR"},{name:"French Guiana",code:"GF"},{name:"French Polynesia",code:"PF"},{name:"French Southern Territories",code:"TF"},{name:"Gabon",code:"GA"},{name:"Gambia",code:"GM"},{name:"Georgia",code:"GE"},{name:"Germany",code:"DE"},{name:"Ghana",code:"GH"},{name:"Gibraltar",code:"GI"},{name:"Greece",code:"GR"},{name:"Greenland",code:"GL"},{name:"Grenada",code:"GD"},{name:"Guadeloupe",code:"GP"},{name:"Guam",code:"GU"},{name:"Guatemala",code:"GT"},{name:"Guernsey",code:"GG"},{name:"Guinea",code:"GN"},{name:"Guinea-Bissau",code:"GW"},{name:"Guyana",code:"GY"},{name:"Haiti",code:"HT"},{name:"Heard Island and Mcdonald Islands",code:"HM"},{name:"Holy See (Vatican City State)",code:"VA"},{name:"Honduras",code:"HN"},{name:"Hong Kong",code:"HK"},{name:"Hungary",code:"HU"},{name:"Iceland",code:"IS"},{name:"India",code:"IN"},{name:"Indonesia",code:"ID"},{name:"Iran, Islamic Republic Of",code:"IR"},{name:"Iraq",code:"IQ"},{name:"Ireland",code:"IE"},{name:"Isle of Man",code:"IM"},{name:"Israel",code:"IL"},{name:"Italy",code:"IT"},{name:"Jamaica",code:"JM"},{name:"Japan",code:"JP"},{name:"Jersey",code:"JE"},{name:"Jordan",code:"JO"},{name:"Kazakhstan",code:"KZ"},{name:"Kenya",code:"KE"},{name:"Kiribati",code:"KI"},{name:"Democratic People's Republic of Korea",code:"KP"},{name:"Korea, Republic of",code:"KR"},{name:"Kosovo",code:"XK"},{name:"Kuwait",code:"KW"},{name:"Kyrgyzstan",code:"KG"},{name:"Lao People's Democratic Republic",code:"LA"},{name:"Latvia",code:"LV"},{name:"Lebanon",code:"LB"},{name:"Lesotho",code:"LS"},{name:"Liberia",code:"LR"},{name:"Libyan Arab Jamahiriya",code:"LY"},{name:"Liechtenstein",code:"LI"},{name:"Lithuania",code:"LT"},{name:"Luxembourg",code:"LU"},{name:"Macao",code:"MO"},{name:"Macedonia, The Former Yugoslav Republic of",code:"MK"},{name:"Madagascar",code:"MG"},{name:"Malawi",code:"MW"},{name:"Malaysia",code:"MY"},{name:"Maldives",code:"MV"},{name:"Mali",code:"ML"},{name:"Malta",code:"MT"},{name:"Marshall Islands",code:"MH"},{name:"Martinique",code:"MQ"},{name:"Mauritania",code:"MR"},{name:"Mauritius",code:"MU"},{name:"Mayotte",code:"YT"},{name:"Mexico",code:"MX"},{name:"Micronesia, Federated States of",code:"FM"},{name:"Moldova, Republic of",code:"MD"},{name:"Monaco",code:"MC"},{name:"Mongolia",code:"MN"},{name:"Montenegro",code:"ME"},{name:"Montserrat",code:"MS"},{name:"Morocco",code:"MA"},{name:"Mozambique",code:"MZ"},{name:"Myanmar",code:"MM"},{name:"Namibia",code:"NA"},{name:"Nauru",code:"NR"},{name:"Nepal",code:"NP"},{name:"Netherlands",code:"NL"},{name:"Netherlands Antilles",code:"AN"},{name:"New Caledonia",code:"NC"},{name:"New Zealand",code:"NZ"},{name:"Nicaragua",code:"NI"},{name:"Niger",code:"NE"},{name:"Nigeria",code:"NG"},{name:"Niue",code:"NU"},{name:"Norfolk Island",code:"NF"},{name:"Northern Mariana Islands",code:"MP"},{name:"Norway",code:"NO"},{name:"Oman",code:"OM"},{name:"Pakistan",code:"PK"},{name:"Palau",code:"PW"},{name:"Palestinian Territory, Occupied",code:"PS"},{name:"Panama",code:"PA"},{name:"Papua New Guinea",code:"PG"},{name:"Paraguay",code:"PY"},{name:"Peru",code:"PE"},{name:"Philippines",code:"PH"},{name:"Pitcairn",code:"PN"},{name:"Poland",code:"PL"},{name:"Portugal",code:"PT"},{name:"Puerto Rico",code:"PR"},{name:"Qatar",code:"QA"},{name:"Reunion",code:"RE"},{name:"Romania",code:"RO"},{name:"Russian Federation",code:"RU"},{name:"Rwanda",code:"RW"},{name:"Saint Helena",code:"SH"},{name:"Saint Kitts and Nevis",code:"KN"},{name:"Saint Lucia",code:"LC"},{name:"Saint Pierre and Miquelon",code:"PM"},{name:"Saint Vincent and the Grenadines",code:"VC"},{name:"Samoa",code:"WS"},{name:"San Marino",code:"SM"},{name:"Sao Tome and Principe",code:"ST"},{name:"Saudi Arabia",code:"SA"},{name:"Senegal",code:"SN"},{name:"Serbia",code:"RS"},{name:"Seychelles",code:"SC"},{name:"Sierra Leone",code:"SL"},{name:"Singapore",code:"SG"},{name:"Slovakia",code:"SK"},{name:"Slovenia",code:"SI"},{name:"Solomon Islands",code:"SB"},{name:"Somalia",code:"SO"},{name:"South Africa",code:"ZA"},{name:"South Georgia and the South Sandwich Islands",code:"GS"},{name:"Spain",code:"ES"},{name:"Sri Lanka",code:"LK"},{name:"Sudan",code:"SD"},{name:"Suriname",code:"SR"},{name:"Svalbard and Jan Mayen",code:"SJ"},{name:"Swaziland",code:"SZ"},{name:"Sweden",code:"SE"},{name:"Switzerland",code:"CH"},{name:"Syrian Arab Republic",code:"SY"},{name:"Taiwan",code:"TW"},{name:"Tajikistan",code:"TJ"},{name:"Tanzania, United Republic of",code:"TZ"},{name:"Thailand",code:"TH"},{name:"Timor-Leste",code:"TL"},{name:"Togo",code:"TG"},{name:"Tokelau",code:"TK"},{name:"Tonga",code:"TO"},{name:"Trinidad and Tobago",code:"TT"},{name:"Tunisia",code:"TN"},{name:"Turkey",code:"TR"},{name:"Turkmenistan",code:"TM"},{name:"Turks and Caicos Islands",code:"TC"},{name:"Tuvalu",code:"TV"},{name:"Uganda",code:"UG"},{name:"Ukraine",code:"UA"},{name:"United Arab Emirates",code:"AE"},{name:"United Kingdom",code:"GB"},{name:"United States Minor Outlying Islands",code:"UM"},{name:"Uruguay",code:"UY"},{name:"Uzbekistan",code:"UZ"},{name:"Vanuatu",code:"VU"},{name:"Venezuela",code:"VE"},{name:"Viet Nam",code:"VN"},{name:"Virgin Islands, British",code:"VG"},{name:"Virgin Islands, U.S.",code:"VI"},{name:"Wallis and Futuna",code:"WF"},{name:"Western Sahara",code:"EH"},{name:"Yemen",code:"YE"},{name:"Zambia",code:"ZM"},{name:"Zimbabwe",code:"ZW"}]),angular.module("enplug.sdk.utils").constant("months",[{name:"January",short:"Jan",code:"01"},{name:"February",short:"Feb",code:"02"},{name:"March",short:"Mar",code:"03"},{name:"April",short:"Apr",code:"04"},{name:"May",short:"May",code:"05"},{name:"June",short:"Jun",code:"06"},{name:"July",short:"Jul",code:"07"},{name:"August",short:"Aug",code:"08"},{name:"September",short:"Sep",code:"09"},{name:"October",short:"Oct",code:"10"},{name:"November",short:"Nov",code:"11"},{name:"December",short:"Dec",code:"12"}]),angular.module("enplug.sdk.utils").constant("quotes",{random:function(){var index=Math.floor(Math.random()*this.quotes.length);return this.quotes[index]},quotes:[{text:"All great achievements require time.",author:"Maya Angelou"},{text:"You can't wait for inspiration. You have to go after it with a club.",author:"Jack London"},{text:"The perfect is the enemy of the good.",author:"Voltaire"},{text:"I play to win, whether during practice or a real game.",author:"Michael Jordan"},{text:"Many of life's failures are people who did not realize how close they were to success when they gave up.",author:"Thomas Edison"},{text:"At the age of six I wanted to be a cook. At seven I wanted to be Napoleon. And my ambition has been growing steadily ever since.",author:"Salvador Dali"},{text:"Quality is more important than quantity. One home run is much better than two doubles.",author:"Steve Jobs"},{text:"That's one small step for man, one giant leap for mankind.",author:"Neil Armstrong"},{text:"Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.",author:"Scott Adams"},{text:"Nothing will work unless you do.",author:"Maya Angelou"},{text:"The best way out is always through.",author:"Robert Frost"},{text:"An ant on the move does more than a dozing ox.",author:"Lao Tzu"},{text:"Show me a thoroughly satisfied man and I will show you a failure.",author:"Thomas Edison"},{text:"Our greatest glory is not in never failing, but in rising up every time we fail.",author:"Ralph Waldo Emerson"},{text:"Every act of creation is first of all an act of destruction.",author:"Pablo Picasso"},{text:"Fun is good.",author:"Dr. Seuss"},{text:"I steal from every movie ever made.",author:"Quentin Tarantino"},{text:"It is the working man who is the happy man. It is the idle man who is the miserable man.",author:"Ben Franklin"},{text:"A person who never made a mistake never tried anything new.",author:"Albert Einstein"},{text:"To be idle is a short road to death and to be diligent is a way of life.",author:"Buddha"},{text:"The way to get started is to quit talking and begin doing.",author:"Walt Disney"},{text:"For every dark night, there's a brigher day.",author:"Tupac Shakur"},{text:"If you love life, don't waste time, for time is what life is made up of.",author:"Bruce Lee"},{text:"You can never quit. Winners never quit, and quitters never win.",author:"Ted Turner"},{text:"Work spares us from three evils: boredom, vice and need.",author:"Voltaire"},{text:"Focus is a matter of deciding what things you're not going to do.",author:"John Carmack"},{text:"I play to win, whether during practice or a real game.",author:"Michael Jordan"},{text:"HULK SMASH!",author:"The Incredible Hulk"},{text:"The harder the conflict, the more glorious the triumph.",author:"Thomas Paine"},{text:"Everything comes to him who hustles while he waits.",author:"Thomas Edison"},{text:"You've got to jump off cliffs and build your wings on the way down.",author:"Ray Bradbury"},{text:"Amateurs practice until they get it right. Professionals practice until they can't get it wrong.",author:"Unknown"},{text:"Genius is one percent inspiration and ninety-nine percent perspiration.",author:"Thomas Edison"},{text:"A lot of times, people don't know what they want until you show it to them.",author:"Steve Jobs"},{text:"I don't know where I'm going, but I'm on my way.",author:"Carl Sagan"},{text:"Lost time is never found again.",author:"Benjamin Franklin"},{text:"Without pain, without sacrifice, we would have nothing.",author:"Tyler Durden"},{text:"I pay no attention whatever to anybody's praise or blame. I simply follow my own feelings.",author:"Wolfgang Amadeus Mozart"},{text:"You miss 100% of the shots you don't take.",author:"Wayne Gretzky"},{text:"To have a great idea, have a lot of them.",author:"Thomas Edison"},{text:"The value of an idea lies in the using of it.",author:"Thomas Edison"},{text:"Simplify, simplify, simplify.",author:"Henry David Thoreau"},{text:"There's a way to do it better - find it.",author:"Thomas Edison"},{text:"When it is obvious that the goals cannot be reached, don't adjust the goals, adjust the steps.",author:"Confucius"},{text:"During your life, never stop dreaming. No one can take away your dreams.",author:"Tupac Shakur"},{text:"Things do not happen. Things are made to happen.",author:"John F. Kennedy"},{text:"Ambition should be made of sterner stuff.",author:"William Shakespeare"},{text:"If you spend too much time thinking about a thing, you'll never get it done.",author:"Bruce Lee"},{text:"Success breeds success.",author:"Proverb"},{text:"You are never too old to set another goal or to dream a new dream.",author:"C.S. Lewis"},{text:"When you stop doing things for fun, you might as well be dead.",author:"Ernest Hemingway"},{text:"There is no substitute for hard work.",author:"Thomas Edison"},{text:"Live long and prosper.",author:"Spock"},{text:"I have not failed. I've just found 10,000 ways that won't work.",author:"Thomas Edison"},{text:"It's lack of faith that makes people afraid of meeting challenges, and I believed in myself.",author:"Muhammad Ali"},{text:"All our dreams can come true, if we have the courage to pursue them.",author:"Walt Disney"},{text:"Make everything as simple as possible, but not simpler.",author:"Albert Einstein"},{text:"Some people want it to happen, some wish it would happen, others make it happen.",author:"Michael Jordan"},{text:"I've got a theory that if you give 100% all the time, somehow things will work out in the end.",author:"Larry Bird"},{text:"The problem with the future is that it keeps turning into the present.",author:"Bill Watterson"},{text:"May the Force be with you.",author:"Han Solo"},{text:"Victory belongs to the most persevering.",author:"Napoleon Bonaparte"},{text:"I hated every minute of training, but I said, 'Dont quit. Suffer now and live the rest of your life as a champion'.",author:"Muhammad Ali"},{text:"Do things that have never been done before.",author:"Russell Kirsch"},{text:"I've failed over and over and over again in my life and that is why I succeed.",author:"Michael Jordan"},{text:"A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty.",author:"Winston Churchill"},{text:"He who hesitates is lost.",author:"Proverb"},{text:"Carpe diem, seize the day boys, make your lives extraordinary.",author:"John Keating"},{text:"Doing the best at this moment puts you in the best place for the next moment.",author:"Oprah Winfrey"},{text:"Luck is preparation meeting opportunity.",author:"Oprah Winfrey"},{text:"I have no special talent. I am only passionately curious.",author:"Albert Einstein"}]}),angular.module("enplug.sdk.utils").constant("states",[{name:"Alabama",code:"AL"},{name:"Alaska",code:"AK"},{name:"Arizona",code:"AZ"},{name:"Arkansas",code:"AR"},{name:"California",code:"CA"},{name:"Colorado",code:"CO"},{name:"Connecticut",code:"CT"},{name:"Delaware",code:"DE"},{name:"District of Columbia",code:"DC"},{name:"Florida",code:"FL"},{name:"Georgia",code:"GA"},{name:"Hawaii",code:"HI"},{name:"Idaho",code:"ID"},{name:"Illinois",code:"IL"},{name:"Indiana",code:"IN"},{name:"Iowa",code:"IA"},{name:"Kansa",code:"KS"},{name:"Kentucky",code:"KY"},{name:"Lousiana",code:"LA"},{name:"Maine",code:"ME"},{name:"Maryland",code:"MD"},{name:"Massachusetts",code:"MA"},{name:"Michigan",code:"MI"},{name:"Minnesota",code:"MN"},{name:"Mississippi",code:"MS"},{name:"Missouri",code:"MO"},{name:"Montana",code:"MT"},{name:"Nebraska",code:"NE"},{name:"Nevada",code:"NV"},{name:"New Hampshire",code:"NH"},{name:"New Jersey",code:"NJ"},{name:"New Mexico",code:"NM"},{name:"New York",code:"NY"},{name:"North Carolina",code:"NC"},{name:"North Dakota",code:"ND"},{name:"Ohio",code:"OH"},{name:"Oklahoma",code:"OK"},{name:"Oregon",code:"OR"},{name:"Pennsylvania",code:"PA"},{name:"Rhode Island",code:"RI"},{name:"South Carolina",code:"SC"},{name:"South Dakota",code:"SD"},{name:"Tennessee",code:"TN"},{name:"Texas",code:"TX"},{name:"Utah",code:"UT"},{name:"Vermont",code:"VT"},{name:"Virginia",code:"VA"},{name:"Washington",code:"WA"},{name:"West Virginia",code:"WV"},{name:"Wisconsin",code:"WI"},{name:"Wyoming",code:"WY"}]),angular.module("enplug.sdk.utils").constant("years",function(){"use strict";for(var yearsToShow=20,thisYear=(new Date).getFullYear(),years=[],year=thisYear;year<thisYear+yearsToShow;year++)years.push({name:year.toString(),code:year.toString().slice(-2)});return years}()),angular.module("enplug.sdk.utils").directive("alert",function(){"use strict";return{restrict:"E",transclude:!0,scope:!0,replace:!0,templateUrl:"sdk-utils/alert.tpl"}}),angular.module("enplug.sdk.utils").directive("customDurationSlider",["$document",function($document){return{restrict:"E",scope:{ratio:"=ratio"},templateUrl:"sdk-utils/custom-duration-slider.tpl",link:function(scope,element,attrs,arg){function resolveUndefined(){scope.ratio||(scope.ratio=1,offset=compareOffsetValue(),$cursor.css("transition","margin-left 0.5s ease-in"),$cursor.css("margin-left",offset+"px"))}function preventFalseDuration(){return scope.ratio<=0&&(scope.ratio=void 0,scope.placeholder="-"),scope.ratio}function compareOffsetValue(){var difference=scope.ratio*scrollLength/60;return difference<padding?difference=padding:difference>scrollLength&&(difference=scrollLength),difference}function setDefaultValues(){scope.manualDuration=!1,$cursor.css("transition","none"),startX=event.pageX,scope.ratio=preventFalseDuration()}var startX=0,padding=2,$barWidth=angular.element(element[0].querySelector(".slider")),barWidth=$barWidth.prop("clientWidth"),$cursor=angular.element(element[0].querySelector(".slider-cursor")),cursorWidth=$cursor.prop("clientWidth"),scrollLength=barWidth-cursorWidth-padding,offset=0;return scope.manualDuration=!1,scope.ratio=preventFalseDuration(),scope.placeholder=scope.ratio||"-",scope.handleKeyDown=function(event){scope.manualDuration=!0},scope.checkRatioValue=function(){scope.ratio=preventFalseDuration()},scope.$watch("ratio",function(){scope.manualDuration&&(offset=compareOffsetValue(),$cursor.css("transition","margin-left 0.5s ease-in"),$cursor.css("margin-left",offset+"px"))}),scope.clearUndefined=function(){resolveUndefined()},function(){offset=compareOffsetValue(),$cursor.css("margin-left",offset+"px")}(),$cursor.on("mousedown",function(event){var mousemove,mouseup;return void 0==scope.ratio&&(scope.ratio=1,offset=compareOffsetValue(),$cursor.css("transition","margin-left 0.5s ease-in"),$cursor.css("margin-left",offset+"px")),mousemove=function(event){return scope.$apply(function(){offset+=event.pageX-startX,offset<padding?offset=padding:offset>scrollLength?offset=scrollLength:startX=event.pageX,scope.ratio=Math.round(offset/scrollLength*60),0!=scope.ratio&&"0"!=scope.ratio||(scope.ratio=1),$cursor.css("margin-left",offset+"px")})},mouseup=function(){return $document.unbind("mousemove",mousemove),$document.unbind("mouseup",mouseup)},event.preventDefault(),setDefaultValues(),$document.on("mousemove",mousemove),$document.on("mouseup",mouseup)})}}}]),angular.module("enplug.sdk.utils").directive("displayCounter",function(){return{restrict:"E",replace:!0,scope:{count:"=",showDanger:"=?",vertical:"=?",disabled:"=?"},templateUrl:"sdk-utils/display-counter.tpl",link:function(scope,element,attrs){scope.showDanger="showDanger"in attrs&&0==scope.showDanger,scope.checkDanger=function(){scope.showDanger&&scope.count<=0?element.addClass("danger"):element.removeClass("danger")},scope.checkDanger(),"vertical"in scope&&scope.vertical===!0&&element.addClass("vertical"),"disabled"in scope&&scope.disabled===!0&&element.addClass("disabled"),scope.$watch("count",function(){scope.checkDanger()})}}}),angular.module("enplug.sdk.utils").directive("downloadCsv",["$document","$log",function($document,$log){return{restrict:"A",scope:{epDownloadCsv:"="},link:function(scope,element){element.bind("click",function(){var fileName=scope.epDownloadCsv.fileName,downloadFunction=scope.epDownloadCsv.downloadFunction;$log.debug(fileName);var promise=downloadFunction();promise.then(function(data){var downloadLink=angular.element("<a></a>").attr("href","data:text/csv;charset=utf8,"+encodeURIComponent(data)).attr("download",fileName);downloadLink.insertAfter(element),downloadLink.ready(function(){downloadLink.get(0).click(),downloadLink.remove()})})})}}}]),angular.module("enplug.sdk.utils").directive("dropdownMenu",function(){"use strict";return{link:function(scope,element){element.addClass("dropdown-menu"),element.on("click",function(event){var target=angular.element(event.target);(target.attr("href")||target.parent().attr("href"))&&scope.$emit("dropdown:toggle"),scope.$apply(function(){scope.$emit("dropdown:click")})})}}}),angular.module("enplug.sdk.utils").directive("dropdownToggle",function(){"use strict";return{link:function(scope,element){element.addClass("dropdown-toggle"),element.on("click",function(){scope.$apply(function(){scope.$broadcast("dropdown:toggle")})})}}}),angular.module("enplug.sdk.utils").directive("dropdown",["$document","$timeout",function($document,$timeout){return{scope:!0,link:function(scope,element){function closeDropdown(){element.addClass("closing"),$timeout(function(){element.removeClass("open"),element.removeClass("closing"),$document.off("click",closeDropdown)},300)}function toggle(){element.hasClass("open")?closeDropdown():open()}function open(){element.addClass("open"),$document.on("click",function(event){element[0].contains(event.target)||closeDropdown()})}element.addClass("dropdown-wrap"),scope.$on("dropdown:toggle",toggle),scope.$on("dropdown:click",toggle),scope.$on("$destroy",function(){$document.off("click",closeDropdown)})}}}]),angular.module("enplug.sdk.utils").directive("durationSlider",["$document",function($document){return{restrict:"E",scope:{ratio:"=ratio"},templateUrl:"sdk-utils/duration-slider.tpl",link:function(scope,element,attrs,arg){function setPosition(){offset+=scope.ratio*scrollLength/60,$cursor.css("margin-left",offset+"px")}var startX=0,padding=3,$barWidth=angular.element(element[0].querySelector(".duration-slider")),barWidth=$barWidth.prop("clientWidth"),$cursor=angular.element(element[0].querySelector(".slider-cursor")),cursorWidth=$cursor.prop("clientWidth"),scrollLength=barWidth-cursorWidth-padding,offset=0;return setPosition(),scope.formatLabel=function(val){return val>-1?Math.round(val)+" secs":"-"},element.on("mousedown",function(event){var mousemove,mouseup;return mousemove=function(event){return scope.$apply(function(){offset+=event.pageX-startX,offset<padding?offset=padding:offset>scrollLength?offset=scrollLength:startX=event.pageX,scope.ratio=Math.round(offset/scrollLength*60),$cursor.css("margin-left",offset+"px")})},mouseup=function(){return $document.unbind("mousemove",mousemove),$document.unbind("mouseup",mouseup)},event.preventDefault(),startX=event.pageX,$document.on("mousemove",mousemove),$document.on("mouseup",mouseup)})}}}]),angular.module("enplug.sdk.utils").directive("colorPicker",["$document","$timeout","ColorTools","PositionTools",function($document,$timeout,ColorTools,PositionTools){"use strict";return{restrict:"E",transclude:!0,scope:{hex:"=?",rgb:"=?",alpha:"=?"},templateUrl:"sdk-utils/color-picker.tpl",link:function(scope,element,attrs){function setHEX(val){scope.hex=val,scope.hexInput=val}function setRGB(val){scope.rgb=val,setRed(val[0]),setGreen(val[1]),setBlue(val[2])}function setRed(val){scope.red=Math.round(val)}function setGreen(val){scope.green=Math.round(val)}function setBlue(val){scope.blue=Math.round(val)}function setHue(val){scope.hue=val,$hue[0].$cursor.css("left",(1-scope.hue)*$hue[0].clientWidth+"px")}function setSaturation(val){scope.saturation=val,$saturation[0].$cursor.css("left",scope.saturation*$saturation[0].clientWidth+"px")}function setBrightness(val){scope.brightness=val,$saturation[0].$cursor.css("top",(1-val)*$saturation[0].clientHeight+"px")}function setAlpha(val){scope.alpha=parseFloat(val.toFixed(2)),scope.alphaPercent=parseFloat((100*scope.alpha).toFixed(2)),scope.noAlpha||$alpha[0].$cursor.css("left",scope.alpha*$alpha[0].clientWidth+"px")}var labelAlpha=angular.element(element[0].querySelector(".channel-alpha")),labelHex=(angular.element(element[0].querySelector(".channel-red")),angular.element(element[0].querySelector(".channel-green")),angular.element(element[0].querySelector(".channel-blue")),angular.element(element[0].querySelector(".hex-input"))),$palette=angular.element(element[0].querySelector(".palette")),$swatch=angular.element(element[0].querySelector(".swatch"));scope.opened=!1;var $hue=angular.element(element[0].querySelector(".hue"));$hue[0].$cursor=angular.element($hue[0].querySelector(".cursor"));var $alpha=angular.element(element[0].querySelector(".alpha-slider"));$alpha[0].$cursor=angular.element($alpha[0].querySelector(".cursor"));var $saturation=angular.element(element[0].querySelector(".saturation"));if($saturation[0].$cursor=angular.element($saturation[0].querySelector(".cursor")),attrs.hasOwnProperty("showAsRgb")?scope.showAs="rgb":scope.showAs="hex",scope.toggleShowAs=function(){scope.showAs="hex"==scope.showAs?"rgb":"hex"},scope.noAlpha=attrs.hasOwnProperty("noAlpha"),scope.hasOwnProperty("hex")){setHEX(scope.hex.replace(/^#/,"")),setRGB(ColorTools.hex2rgb(parseInt(scope.hex,16)));var hsl=ColorTools.rgb2hsl(scope.rgb[0],scope.rgb[1],scope.rgb[2]);setHue(hsl[0]),setSaturation(hsl[1]),setBrightness(hsl[2])}else if(scope.hasOwnProperty("rgb")){setRGB(scope.rgb),setHEX(ColorTools.rgb2hex(scope.rgb[0],scope.rgb[1],scope.rgb[2]));var hsl=ColorTools.rgb2hsl(scope.rgb[0],scope.rgb[1],scope.rgb[2]);setHue(hsl[0]),setSaturation(hsl[1]),setBrightness(hsl[2])}else console.warn("[ColorPicker] Something insane just happened!");scope.hasOwnProperty("alpha")&&!isNaN(scope.alpha)||(scope.alpha=1),setAlpha(scope.alpha),$saturation.on("mousedown",function(event){var mousemove,mouseup;mousemove=function(event){return scope.$apply(function(){var top=Math.max(0,Math.min($saturation[0].clientHeight,event.pageY-PositionTools.getTop($saturation[0]))),left=Math.max(0,Math.min($saturation[0].clientWidth,event.pageX-PositionTools.getLeft($saturation[0])));setSaturation(left/$saturation[0].clientWidth),setBrightness(1-top/$saturation[0].clientHeight),setRGB(ColorTools.hsl2rgb(scope.hue,scope.saturation,scope.brightness)),setHEX(ColorTools.rgb2hex(scope.rgb[0],scope.rgb[1],scope.rgb[2]))})},mouseup=function(){$document.unbind("mousemove",mousemove),$document.unbind("mouseleave",mouseup),$document.unbind("mouseup",mouseup)},event.preventDefault(),mousemove(event),$document.on("mousemove",mousemove),$document.on("mouseleave",mouseup),$document.on("mouseup",mouseup)}),$hue.on("mousedown",function(event){var mousemove,mouseup;mousemove=function(event){return scope.$apply(function(){var left=Math.max(0,Math.min($hue[0].clientWidth,event.pageX-PositionTools.getLeft($hue[0])));setHue(1-left/$hue[0].clientWidth),setRGB(ColorTools.hsl2rgb(scope.hue,scope.saturation,scope.brightness)),setHEX(ColorTools.rgb2hex(scope.rgb[0],scope.rgb[1],scope.rgb[2]))})},mouseup=function(){$document.unbind("mousemove",mousemove),$document.unbind("mouseleave",mouseup),$document.unbind("mouseup",mouseup)},event.preventDefault(),mousemove(event),$document.on("mousemove",mousemove),$document.on("mouseleave",mouseup),$document.on("mouseup",mouseup)}),$alpha.on("mousedown",function(event){var mousemove,mouseup;mousemove=function(event){return scope.$apply(function(){var left=Math.max(0,Math.min($alpha[0].clientWidth,event.pageX-PositionTools.getLeft($alpha[0])));setAlpha(left/$alpha[0].clientWidth)})},mouseup=function(){$document.unbind("mousemove",mousemove),$document.unbind("mouseleave",mouseup),$document.unbind("mouseup",mouseup)},event.preventDefault(),mousemove(event),$document.on("mousemove",mousemove),$document.on("mouseleave",mouseup),$document.on("mouseup",mouseup)}),scope.$watch("alphaPercent",function(){setAlpha(labelAlpha[0].value/100)}),scope.getHueColor=function(){var rgb=ColorTools.hsl2rgb(scope.hue,1,1),hex=ColorTools.rgb2hex(rgb[0],rgb[1],rgb[2]);return hex},scope.watchRGBInputChange=function(){setRGB([scope.red,scope.green,scope.blue]);var hsl=ColorTools.rgb2hsl(scope.red,scope.green,scope.blue);setHEX(ColorTools.rgb2hex(scope.red,scope.green,scope.blue)),setHue(hsl[0]),setSaturation(hsl[1]),setBrightness(hsl[2])},scope.watchHEXInputChange=function(){labelHex[0].value.match(/[^0-9a-fA-F\.]/g)&&(labelHex[0].value=labelHex[0].value.replace(/[^0-9a-fA-F\.]/g,""));for(var fixed=labelHex[0].value.split(""),hex="",i=0,l=6;i<l;i++)hex+=i<fixed.length?fixed[i]:0;scope.hex=hex,setRGB(ColorTools.hex2rgb(parseInt(scope.hex,16)));var hsl=ColorTools.rgb2hsl(scope.red,scope.green,scope.blue);setHue(hsl[0]),setSaturation(hsl[1]),setBrightness(hsl[2])};var outterClickHandler=function(event){var isInside=event.pageY>PositionTools.getTop($palette[0])&&event.pageY<PositionTools.getTop($swatch[0])+$swatch[0].clientHeight+$palette[0].clientHeight&&event.pageX>PositionTools.getLeft($palette[0])&&event.pageX<PositionTools.getLeft($palette[0])+$palette[0].clientWidth;if(!isInside)return scope.$apply(function(){scope.opened=!1,$document.unbind("mousedown",outterClickHandler)})};scope.toggle=function(){scope.opened=!scope.opened,scope.opened?($timeout(function(){setAlpha(scope.alpha);var hsl=ColorTools.rgb2hsl(scope.rgb[0],scope.rgb[1],scope.rgb[2]);setHue(hsl[0]),setSaturation(hsl[1]),setBrightness(hsl[2])}),$document.bind("mousedown",outterClickHandler)):$document.unbind("mousedown",outterClickHandler)},element.on("$destroy",function(){$document.unbind("mousedown",outterClickHandler)})}}}]),angular.module("enplug.sdk.utils").directive("equals",function(){function getter(property,object){var splitModel=property.split(".");return splitModel.reduce(function(map,key){return map[key]},object)}return{restrict:"A",require:"?ngModel",link:function($scope,$element,$attrs,$ngModel){function validate(){var val1=$ngModel.$viewValue,val2=getter($attrs.equals,$scope);$ngModel.$setValidity("equals",!val1||!val2||val1===val2)}$scope.$watch($attrs.ngModel,function(){validate()}),$scope.$watch($attrs.equals,function(){validate()})}}}),angular.module("enplug.sdk.utils").directive("materialCheckbox",["$log","$compile","GUID",function($log,$compile,GUID){"use strict";var ignoreAttributes=["class","field","label","ng-if","ng-show","ng-hide","ng-repeat"];return{restrict:"E",scope:{model:"=field"},transclude:!0,templateUrl:"sdk-utils/material-checkbox.tpl",link:function($scope,$element,$attrs,$ctrl,$transclude){$element.addClass("material-checkbox"),$scope.id=GUID.new(),$scope.label=$attrs.label,$transclude(function(clone){if(clone){for(var hasInput=!1,i=0;i<clone.length;i++)"input"==clone[i].nodeName.toLowerCase()&&(hasInput=!0);hasInput?($element.find("input").remove(),$element.find("label").prepend(clone),$element.find("input").attr("id",$scope.id),$element.find("input").attr("type","checkbox")):angular.element($element[0].querySelector(".checkbox-label")).append(clone)}});var input=$element.find("input")[0];angular.forEach($attrs,function(value,_attr){var attr=_attr.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();attr.indexOf("$")===-1&&ignoreAttributes.indexOf(attr)===-1&&($element.removeAttr(attr),input.setAttribute(attr,value));
});var checkbox=$element.find("label")[0];$compile(checkbox)($scope)}}}]),angular.module("enplug.sdk.utils").directive("materialInput",["$log","$compile","$parse","$document","GUID",function($log,$compile,$parse,$document,GUID){"use strict";return{restrict:"E",require:"^form",scope:{model:"=field"},transclude:!0,templateUrl:"sdk-utils/material-input.tpl",link:function($scope,$element,$attrs,$form,$transclude){var ignoreAttributes=["class","label","directives","field","focus","ng-if","ng-show","ng-hide"],input=$document[0].createElement("input"),directives=$parse($attrs.directives)($scope),autofocus="undefined"!=typeof $attrs.autofocus,id=$attrs.field+"-"+GUID.new();$scope.id=id,$scope.label=$attrs.label,$element.removeAttr("label"),input.setAttribute("name",id),$element.parent().hasClass("form-group")||$element.addClass("form-group"),angular.forEach($attrs,function(value,_attr){var attr=_attr.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();attr.indexOf("$")===-1&&ignoreAttributes.indexOf(attr)===-1&&($element.removeAttr(attr),input.setAttribute(attr,value))}),input.getAttribute("type")||input.setAttribute("type","text"),input.setAttribute("class","form-control"),input.setAttribute("ng-model","model"),input.setAttribute("ng-class","{ active: model }"),input.setAttribute("ng-model-options","{ allowInvalid: true, debounce: 100 }"),input.setAttribute("id",$scope.id),angular.forEach(directives,function(value,directive){input.setAttribute(directive,value)}),$element.removeAttr("directives"),$transclude(function(clone){var hasInput=!1;if(clone){for(var newInput,i=0;i<clone.length;i++)"input"==clone[i].nodeName.toLowerCase()&&(hasInput=!0,newInput=clone[i]);hasInput?(newInput.setAttribute("class","form-control"),newInput.setAttribute("id",$scope.id),input.setAttribute("name",$scope.id),newInput.setAttribute("ng-class","{ active: model }"),newInput.setAttribute("ng-model","model"),$compile(clone)($scope),$element.prepend(clone)):$element.append(clone)}hasInput||($compile(input)($scope),$element.prepend(input))}),autofocus&&input.focus(),$scope.formField=$form[id],$scope.$watch("model",function(val){void 0!==val&&null!==val&&$scope.formField&&($scope.formField.$dirty=!0)})}}}]),angular.module("enplug.sdk.utils").directive("materialRadio",["$log","$compile",function($log,$compile){"use strict";var ignoreAttributes=["class","field","label","ng-if","ng-show","ng-hide","ng-repeat"];return{restrict:"E",scope:{model:"=field"},transclude:!0,replace:!0,templateUrl:"sdk-utils/material-radio.tpl",link:function(scope,element,attrs){element.addClass("material-radio");var input=element.find("input")[0];angular.forEach(attrs,function(value,_attr){var attr=_attr.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();attr.indexOf("$")===-1&&ignoreAttributes.indexOf(attr)===-1&&(element.removeAttr(attr),input.setAttribute(attr,value))}),$compile(input)(scope)}}}]),angular.module("enplug.sdk.utils").directive("materialSelect",["$timeout",function($timeout){"use strict";function findSelect(clone){for(var i=0;i<clone.length;i++)if("select"==clone[i].nodeName.toLowerCase())return angular.element(clone[i])}return{restrict:"E",scope:!0,transclude:!0,templateUrl:"sdk-utils/material-select.tpl",link:function(scope,element,attrs,ctrl,transclude){element.addClass("material-select"),scope.label=attrs.label,element.removeAttr("label"),transclude(function(clone){var select=findSelect(clone);select?scope.$watch("$parent."+select.attr("ng-model"),function(val){"undefined"!=typeof val&&null!==val&&(element.addClass("selected"),$timeout(function(){scope.label=select[0].options[select[0].selectedIndex].label}))}):console.warn("Warning: material-select requires a <select> element to be transcluded.")})}}}]),angular.module("enplug.sdk.utils").directive("materialSwitch",function(){"use strict";function findInput(clone){for(var i=0;i<clone.length;i++)if("input"==clone[i].nodeName.toLowerCase())return angular.element(clone[i])}return{restrict:"E",transclude:!0,replace:!0,templateUrl:"sdk-utils/material-switch.tpl",scope:{model:"="},link:function(scope,element,attrs,ctrl,transclude){scope.dirty=!1,transclude(function(clone){findInput(clone)&&angular.element(element[0].querySelector(".default-input")).remove()})}}}),angular.module("enplug.sdk.utils").directive("helpBlock",function(){"use strict";return{templateUrl:"sdk-utils/help-block.tpl",restrict:"E"}}),angular.module("enplug.sdk.utils").directive("layoutToggle",["$rootScope",function($rootScope){"use strict";return{restrict:"E",templateUrl:"sdk-utils/layout-toggle.tpl",replace:!0,link:function(scope){$rootScope.showGridLayout!==!1&&($rootScope.showGridLayout=!0),scope.toggleLayout=function(){$rootScope.showGridLayout=!$rootScope.showGridLayout}}}}]),angular.module("enplug.sdk.utils").directive("gridLayout",function(){"use strict";return{link:function(scope,element){scope.$watch("showGridLayout",function(bool){bool?element.removeClass("ng-hide"):element.addClass("ng-hide")})}}}),angular.module("enplug.sdk.utils").directive("tableLayout",function(){"use strict";return{link:function(scope,element){scope.$watch("showGridLayout",function(bool){bool?element.addClass("ng-hide"):element.removeClass("ng-hide")})}}}),angular.module("enplug.sdk.utils").directive("loading",[function(){"use strict";function isPromise(val){return"object"==typeof val&&"function"==typeof val.then}return{restrict:"E",templateUrl:"sdk-utils/loading.tpl",transclude:!0,replace:!1,scope:{isLoading:"=condition"},link:function(scope,element){element.addClass("loading-wrapper"),isPromise(scope.isLoading)?(scope.loading=!0,scope.isLoading.then(function(){scope.loading=!1},function(){scope.error=!0})):(scope.loading=scope.isLoading,scope.$watch("isLoading",function(val){scope.loading=val}))}}}]),angular.module("enplug.sdk.utils").directive("locationAware",["$location",function($location){"use strict";return{restrict:"A",replace:!1,link:function(scope,element,attrs){function getPath(){var path=attrs.href||attrs.ngHref||attrs.locationAware;if(!path){var anchor=element.find("a");anchor&&(path=anchor.attr("href")||anchor.attr("ngHref"))}return path}function checkActive(){var path=getPath();path===$location.path()?element.addClass("active"):element.removeClass("active")}checkActive(),scope.$on("$routeChangeSuccess",checkActive)}}}]),angular.module("enplug.sdk.utils").directive("notice",function(){"use strict";return{restrict:"E",transclude:!0,scope:!0,replace:!0,templateUrl:"sdk-utils/alert.tpl",link:function(scope){scope.notice=!0}}}),angular.module("enplug.sdk.utils").directive("proTip",["$log","ProTips",function($log,ProTips){return{restrict:"E",replace:!0,scope:!0,templateUrl:"sdk-utils/protip.tpl",link:function(scope,element,attrs){var path=attrs.tip,config=_.get(ProTips,path);_.isString(config)?scope.config={tip:config}:_.isObject(config)?scope.config=config:($log.error("Did not find pro tip config for path:",path),element.remove())}}}]),angular.module("enplug.sdk.utils").directive("statusButton",["$log","$timeout",function($log,$timeout){"use strict";function isPromise(val){return"object"==typeof val&&"function"==typeof val.then}var showStatusDelay=2e3;return{restrict:"E",replace:!0,scope:{condition:"=condition",action:"&"},transclude:!0,templateUrl:"sdk-utils/status-button.tpl",link:function(scope,element,attrs){function handlePromise(promise){scope.isLoading=!0,promise.then(function(){scope.success=!0},function(){scope.error=!0}).finally(function(){element[0].blur(),scope.isLoading=!1,$timeout(function(){scope.success=!1,scope.error=!1},showStatusDelay)})}element.hasClass("btn")||(element.addClass("btn"),element.addClass("btn-default")),scope.action&&element.bind("click",function(event,data){scope.$apply(function(){var promise=scope.action({data:data});isPromise(promise)?handlePromise(promise):$log.warn("Status button action must return a promise.")})}),"undefined"!=typeof attrs.condition&&(scope.isLoading=scope.condition,scope.$watch("condition",function(val){scope.isLoading=val}))}}}]),angular.module("enplug.sdk.utils").filter("stNestedSearch",[function(){function getter(model,item){var splitModel=model.split(".");return splitModel.reduce(function(map,key){return map[key]},item)}return function(items,filters){var itemsLeft=items.slice();return Object.keys(filters).forEach(function(model){var value=filters[model];itemsLeft=itemsLeft.filter(function(item){var compare=getter(model,item);if(null!==compare&&void 0!==compare)return String(compare).toLowerCase().indexOf(value.toLowerCase())>=0})}),itemsLeft}}]),angular.module("enplug.sdk.utils").filter("stNestedSort",[function(){function getter(property,item){var properties=property.split(".");return properties.reduce(function(map,key){return map[key]},item)}return function(input,property,descending){return Array.isArray(input)?input.concat().sort(function(a,b){var sortOrder=1;descending&&(sortOrder=-1);var aVal=getter(property,a),bVal=getter(property,b),result=aVal<bVal?-1:aVal>bVal?1:0;return result*sortOrder}):input}}]),angular.module("enplug.sdk.utils").directive("stSummary",[function(){return{restrict:"E",require:"^stTable",template:'<div class="summary">Showing {{ stRange.from }}-{{ stRange.to }} of {{ size }}</div>',link:function($scope,$element,$attrs,$stTable){$scope.$watch($stTable.getFilteredCollection,function(val){$scope.size=(val||[]).length}),$scope.$watch("currentPage",function(){$scope.stRange={from:null,to:null},$scope.stRange.from=$stTable.tableState().pagination.start+1,$scope.stRange.to=$scope.currentPage===$scope.numPages?$scope.size:$scope.stRange.from+$scope.stItemsByPage-1})}}}]),angular.module("enplug.sdk.utils").directive("tagInput",function(){return{restrict:"E",replace:!0,scope:{tags:"="},templateUrl:"sdk-utils/tag-input.tpl",link:function(scope,element,attrs){function processTags(offset){for(var words=scope.input.split(" "),i=offset;i<words.length;i++)scope.tags.indexOf(words[i])===-1&&scope.tags.push(words[i]),words.splice(i--,1);scope.input=words.join(" ")}scope.deleteTag=function(tag){for(var i=0,l=scope.tags.length;i<l;i++)scope.tags[i]===tag&&scope.tags.splice(i,1)},scope.handleTextChange=function(){null!=scope.input&&processTags(1)},scope.handleKeyPress=function(event){null!=scope.input&&(13!=event.charCode&&32!=event.charCode||" "!==scope.input&&0!==scope.input.length&&processTags(0))}}}}),angular.module("enplug.sdk.utils").directive("tagSelect",function(){return{restrict:"E",replace:!0,scope:{tags:"=",selectedTags:"="},templateUrl:"sdk-utils/tag-select.tpl",link:function(scope,element,attrs){scope.toggleSelection=function(tag){var index=scope.selectedTags.indexOf(tag);index>-1?scope.selectedTags.splice(index,1):scope.selectedTags.push(tag)},scope.isSelected=function(tag){return scope.selectedTags.indexOf(tag)>-1}}}}),angular.module("enplug.sdk.utils").directive("tooltip",["Tooltips",function(Tooltips){"use strict";return{restrict:"E",templateUrl:"sdk-utils/tooltip.tpl",replace:!0,scope:!0,link:function(scope,element,attrs){var tip=attrs.tip,config=_.get(Tooltips,tip)||{};"string"!=typeof config.position&&(config.position="top center"),config.text||(config.text=tip),config.link&&~config.link.location.indexOf("http")&&element.find("a").attr("target","_blank"),scope.config=config}}}]),angular.module("enplug.sdk.utils").factory("ColorTools",[function(){function rgb2hsl(r,g,b){var rr,gg,bb,h,s,r=arguments[0]/255,g=arguments[1]/255,b=arguments[2]/255,v=Math.max(r,g,b),diff=v-Math.min(r,g,b),diffc=function(c){return(v-c)/6/diff+.5};return 0==diff?h=s=0:(s=diff/v,rr=diffc(r),gg=diffc(g),bb=diffc(b),r===v?h=bb-gg:g===v?h=1/3+rr-bb:b===v&&(h=2/3+gg-rr),h<0?h+=1:h>1&&(h-=1)),[h,s,v]}function hsl2rgb(h,s,v){var r,g,b,i,f,p,q,t,hue;if(null!=h.h&&(v=h.b,s=h.s,h=h.h),h%=360,h<1&&(h*=360),s=s>1?1:s<0?0:s,v=v>1?1:v<0?0:v,hue=h,0==s)r=g=b=v;else switch(h/=60,f=h-(i=Math.floor(h)),p=v*(1-s),q=v*(1-s*f),t=v*(1-s*(1-f)),i){case 0:r=v,g=t,b=p;break;case 1:r=q,g=v,b=p;break;case 2:r=p,g=v,b=t;break;case 3:r=p,g=q,b=v;break;case 4:r=t,g=p,b=v;break;case 5:r=v,g=p,b=q}return[Math.floor(255*r),Math.floor(255*g),Math.floor(255*b)]}function hex2rgb(hex){return[hex>>16&255,hex>>8&255,255&hex]}function rgb2hex(r,g,b){for(var hex=(65536*r+256*g+b).toString(16,6);hex.length<6;)hex="0"+hex;return hex}return{rgb2hsl:rgb2hsl,hsl2rgb:hsl2rgb,hex2rgb:hex2rgb,rgb2hex:rgb2hex}}]),angular.module("enplug.sdk.utils").service("DetectChanges",["$log",function($log){"use strict";function log(field){$log.debug("Change detected:",field)}var fields=[];return{watch:function(watchForChanges,scope,verbose){return fields=[],_.isObject(scope)?(_.isArray(watchForChanges)||(watchForChanges=[watchForChanges]),watchForChanges.forEach(function(watcher){var field={property:watcher,changed:!1};field.original=_.cloneDeep(watcher.split(".").reduce(function(map,key){return map[key]},scope)),field.type=typeof field.original,fields.push(field),_.isArray(field.original)?scope.$watch(field.property,function(newValue,oldValue){field.changed=!_.isEqual(newValue,field.original),field.current=newValue,verbose&&newValue!==oldValue&&log(field)},!0):_.isDate(field.original)?(field.type="Date",scope.$watch(field.property,function(newValue){_.isDate(newValue)?field.changed=field.original.getTime()!==newValue.getTime():field.changed=!0,field.current=newValue,verbose&&log(field)})):scope.$watch(field.property,function(newValue,oldValue){field.changed=newValue!==field.original,field.current=newValue,verbose&&newValue!==oldValue&&log(field)})}),void(verbose&&$log.debug("[DetectChanges] Registered fields to watch:",fields))):void $log.error("Detect changes requires $scope.")},hasChanges:function(){var changed=_.filter(fields,{changed:!0});return changed.length>0},fieldsChanged:function(){return _.pluck(_.filter(fields,{changed:!0}),"property")},reset:function(){fields=[]}}}]),angular.module("enplug.sdk.utils").factory("GUID",[function(){function s4(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return{new:function(){return s4()+s4()+"-"+s4()+"-"+s4()+"-"+s4()+"-"+s4()+s4()+s4()}}}]),angular.module("enplug.sdk.utils").factory("PositionTools",["$window",function($window){function getOffset(element){var docElem,rect,doc;if(rect=element.getBoundingClientRect(),rect.width||rect.height||element.getClientRects().length)return doc=element.ownerDocument,docElem=doc.documentElement,{top:rect.top+$window.pageYOffset-docElem.clientTop,left:rect.left+$window.pageXOffset-docElem.clientLeft}}function getLeft(element){var docElem,rect,doc;if(rect=element.getBoundingClientRect(),rect.width||rect.height||element.getClientRects().length)return doc=element.ownerDocument,docElem=doc.documentElement,rect.left+$window.pageXOffset-docElem.clientLeft}function getTop(element){var docElem,rect,doc;if(rect=element.getBoundingClientRect(),rect.width||rect.height||element.getClientRects().length)return doc=element.ownerDocument,docElem=doc.documentElement,rect.top+$window.pageYOffset-docElem.clientTop}return{getOffset:getOffset,getLeft:getLeft,getTop:getTop}}]),angular.module("enplug.sdk.utils").factory("ScriptLoaderService",["$q","$document","$timeout",function($q,$document,$timeout){"use strict";return{loadScript:function(callback,src){var defer=$q.defer(),script=$document[0].createElement("script");return script.src=src,$document[0].body.appendChild(script),script.onload=script.onreadystatechange=function(){$timeout(function(){callback()?defer.resolve():defer.reject("Error occurred. Please try again.")})},script.onerror=function(){$timeout(function(){defer.reject("Error. Please try again.")})},defer.promise}}}]),angular.module("enplug.sdk.utils.templates",[]).run(["$templateCache",function($templateCache){"use strict";$templateCache.put("sdk-utils/alert.tpl",'<div class=alert><i ng-hide=notice class="ion-alert-circled alert-icon"></i> <i ng-show=notice class="ion-information-circled alert-icon"></i><ng-transclude class=alert-body></ng-transclude></div>'),$templateCache.put("sdk-utils/color-picker.tpl","<div class=color-picker ng-blur=close()><div class=swatch ng-style=\"{ 'background-color': '#' + hex }\" ng-click=toggle()></div><div class=transcluded ng-transclude ng-click=toggle()></div><div class=palette ng-class=\"{ 'opened': opened }\"><div class=saturation ng-class=\"{ 'no-alpha': noAlpha }\" ng-style=\"{ 'background-color': '#' + getHueColor() }\"><div class=cursor></div></div><div class=preview ng-style=\"{ 'background-color': '#' + hex }\"></div><div class=hue><div class=cursor></div></div><div class=numbers><ul class=clearfix ng-class=\"{ 'show-as-hex': showAs=='hex', 'show-as-rgb': showAs=='rgb' }\"><li class=\"\"><label>R:</label><input class=channel-red type=number name=channel-red min=0 max=255 ng-model=red ng-change=watchRGBInputChange()></li><li class=\"\"><label>G:</label><input class=channel-green type=number name=channel-green min=0 max=255 ng-model=green ng-change=watchRGBInputChange()></li><li class=\"\"><label>B:</label><input class=channel-blue type=number name=channel-blue min=0 max=255 ng-model=blue ng-change=watchRGBInputChange()></li><li class=iconic ng-click=toggleShowAs()><i class=\"icon ion-android-options\"></i></li><li class=hex-values><label>#</label><input class=hex-input name=hex-input maxlength=6 ng-model=hexInput ng-change=watchHEXInputChange()></li></ul></div><div class=alpha ng-hide=noAlpha><div class=field><label>A:</label><input class=channel-alpha type=number name=channel-alpha min=0 max=100 ng-model=alphaPercent></div><div class=alpha-slider ng-style=\"{ 'background-color': '#' + hex }\"><div class=cursor></div></div></div></div></div>"),$templateCache.put("sdk-utils/custom-duration-slider.tpl",'<div class=duration-slider-directive><div class="slider-container clearfix"><div class=slider><div class=slider-cursor><i ng-show=ratio class="icon on ion-record"><span>||</span></i> <i ng-hide=ratio class="icon on ion-record icon-undefined"><span>&mdash;</span></i></div></div></div><input maxlength=5 ng-model=ratio placeholder={{placeholder}} class=slider-duration-input ng-blur=checkRatioValue() ng-focus=clearUndefined() ng-keydown=handleKeyDown($event)></div>'),$templateCache.put("sdk-utils/display-counter.tpl","<div class=display-counter><span ng-bind=count class=binding></span></div>"),$templateCache.put("sdk-utils/duration-slider.tpl","<div class=duration-slider><div class=slider-cursor><span>{{formatLabel(ratio)}}</span></div></div>"),$templateCache.put("sdk-utils/help-block.tpl",'<footer class="footer-help block-center"><div class="info-message text-gray"><i class="ion-help-circled text-primary"></i> Need help? Go to the <a href=http://support.enplug.com/hc/en-us target=_blank>Enplug Help Center</a></div></footer>'),$templateCache.put("sdk-utils/layout-toggle.tpl",'<div class="btn-group layout-toggle"><button ng-click=toggleLayout() ng-disabled=showGridLayout class="btn btn-default btn-icon btn-sm ion-android-apps grid-toggle"></button> <button ng-click=toggleLayout() ng-disabled=!showGridLayout class="btn btn-default btn-icon btn-sm ion-navicon table-toggle"></button></div>'),$templateCache.put("sdk-utils/loading.tpl","<div class=loading-directive ng-show=loading><div class=loader ng-hide=error><svg class=circular><circle class=path cx=32 cy=32 r=30 fill=none stroke-width=2></circle></svg></div><div ng-show=error><p>There was an error.</p></div></div><ng-transclude class=loading-content ng-hide=loading></ng-transclude>"),$templateCache.put("sdk-utils/material-checkbox.tpl",'<div class=checkbox><label for="{{ id }}"><input id="{{ id }}" type=checkbox ng-model=model> <span class=checkbox-material><span class=check></span></span> <span class=checkbox-label><span ng-bind=label></span></span></label></div>'),$templateCache.put("sdk-utils/material-input.tpl",'<label for="{{ ::id }}" ng-bind=::label></label><div class=validation ng-messages=formField.$error ng-if=formField.$dirty><span class=text-danger ng-message=required>This is required.</span> <span class=text-danger ng-message=email>Please enter a valid email address.</span> <span class=text-danger ng-message=url>Please enter a valid URL starting with http:// or https://</span> <span class=text-danger ng-message=equals>Passwords must match.</span></div>'),$templateCache.put("sdk-utils/material-radio.tpl","<div class=radio><label><input type=radio ng-model=model> <span class=radio-on></span> <span class=radio-off></span><ng-transclude></ng-transclude></label></div>"),$templateCache.put("sdk-utils/material-select.tpl","<span class=form-label ng-bind=label></span><ng-transclude></ng-transclude>"),$templateCache.put("sdk-utils/material-switch.tpl","<label class=material-switch ng-class=\"{ 'switch-on': model, 'switch-off': !model, dirty: dirty }\" ng-click=\"dirty = true\"><input class=default-input type=checkbox ng-model=model><ng-transclude></ng-transclude></label>"),$templateCache.put("sdk-utils/protip.tpl",'<div class=pro-tip><i class="ion-flash text-primary"></i> <strong>ProTip:</strong> <span ng-bind=::config.tip></span> <a ng-if=::config.link dynamic-click=::config.link.action dynamic-href=::config.link.location ng-bind=::config.link.text></a></div>'),$templateCache.put("sdk-utils/status-button.tpl",'<button class=status-button><i class=ion-load-a ng-show=isLoading></i> <i class=ion-checkmark-circled ng-show="!isLoading && success"></i> <i class=ion-alert-circled ng-show="!isLoading && error"></i><ng-transclude></ng-transclude></button>'),$templateCache.put("sdk-utils/tag-input.tpl",'<div class="tag-input clearfix"><ul class="list clearfix"><li class=tag ng-repeat="tag in tags track by $index">{{tag}} <i ng-click=deleteTag(tag) class="icon ion-android-close"></i></li><li><input name=fname placeholder="Add tags" ng-model=input ng-change=handleTextChange() ng-keypress="handleKeyPress($event)"></li></ul></div>'),$templateCache.put("sdk-utils/tag-select.tpl",'<div class="tag-select clearfix"><ul class="list clearfix"><li class=tag ng-repeat="tag in tags track by $index" ng-click=toggleSelection(tag) ng-class="{ \'selected\': isSelected(tag) }">{{tag}}</li></ul></div>'),$templateCache.put("sdk-utils/tooltip.tpl",'<span class=glossaryTip><sup ng-hide=::config.tooltip class="icon ion-help-circled text-gray-light"></sup> <span class=tipText ng-show=::config.tooltip ng-bind=::config.tooltip></span> <span class=tip ng-class=::config.position><span class="tip-content radius shadow"><span ng-if=config.title class="tipTitle text-gd" ng-bind=::config.title></span> <span class="tipBody text-reset" ng-bind=::config.text ng-class="{ pt: !config.title, pb: !config.link }"></span> <a ng-if=::config.link class=link-reset ng-href="{{ ::config.link.location }}" ng-bind=::config.link.title></a> <span class=tipArrow></span></span></span></span>')}]);
angular.module("enplug.sdk.utils",["enplug.sdk.utils.templates","gettext"]),angular.module("enplug.sdk.utils").run(["$rootScope","$templateCache","gettextCatalog",function($rootScope,$templateCache,gettextCatalog){$templateCache.put("template/smart-table/pagination.html",'<div ng-if="pages.length >= 2"><st-summary></st-summary><ul class="pagination plain"><li><a class="ion-chevron-left" ng-click="selectPage(currentPage - 1)" ng-class="{ disabled: currentPage == 1 }"></a></li><li><a class="ion-chevron-right" ng-click="selectPage(currentPage + 1)" ng-class="{ disabled: currentPage == numPages }"></a></li></ul></div>')}]),angular.module("gettext").run(["gettextCatalog",function(gettextCatalog){gettextCatalog.setStrings("es",{"A:":"A:","Add tags":"Agregar etiquetas","B:":"B:",Contain:"Contiene","Enplug Help Center":"Centro apoyo de Enplug ","G:":"G:","Need help? Go to the":"¿Necesitas ayuda? Ir a la ","Passwords must match.":"No se encontraron coincidencias.","Please enter a valid URL starting with http:// or https://":"Ingresa una URL válida empezando por http: // o https: //","Please enter a valid email address.":"Ingresa una URL válida empezando.",Position:"Posición","ProTip:":"ProTip:","R:":"R:","Something went wrong, please try again.":"Algo salió mal. Por favor, vuelva a intentarlo.","There was an error.":"Hubo un error.","This is required.":"Esto es necesario.","Upload Image":"Cargar imagen"}),gettextCatalog.setStrings("pl",{"A lot of times, people don't know what they want until you show it to them.":"Wiele razy, ludzie nie wiedzą, co chcą dopóki nie pokażesz to do nich.","Enplug Help Center":"Centrum pomocy Enplug","Need help? Go to the":"Centrum pomocy Enplug"}),gettextCatalog.setStrings("es",{"A:":"A:","Add tags":"Agregar etiquetas","B:":"B:",Contain:"Contiene","Enplug Help Center":"Centro apoyo de Enplug ","G:":"G:","Need help? Go to the":"¿Necesitas ayuda? Ir a la ","Passwords must match.":"No se encontraron coincidencias.","Please enter a valid URL starting with http:// or https://":"Ingresa una URL válida empezando por http: // o https: //","Please enter a valid email address.":"Ingresa una URL válida empezando.",Position:"Posición","ProTip:":"ProTip:","R:":"R:","Something went wrong, please try again.":"Algo salió mal. Por favor, vuelva a intentarlo.","There was an error.":"Hubo un error.","This is required.":"Esto es necesario.","Upload Image":"Cargar imagen"})}]),angular.module("enplug.sdk.utils").constant("countries",[{name:"United States",code:"US"},{name:"Afghanistan",code:"AF"},{name:"Åland Islands",code:"AX"},{name:"Albania",code:"AL"},{name:"Algeria",code:"DZ"},{name:"American Samoa",code:"AS"},{name:"Andorra",code:"AD"},{name:"Angola",code:"AO"},{name:"Anguilla",code:"AI"},{name:"Antarctica",code:"AQ"},{name:"Antigua and Barbuda",code:"AG"},{name:"Argentina",code:"AR"},{name:"Armenia",code:"AM"},{name:"Aruba",code:"AW"},{name:"Australia",code:"AU"},{name:"Austria",code:"AT"},{name:"Azerbaijan",code:"AZ"},{name:"Bahamas",code:"BS"},{name:"Bahrain",code:"BH"},{name:"Bangladesh",code:"BD"},{name:"Barbados",code:"BB"},{name:"Belarus",code:"BY"},{name:"Belgium",code:"BE"},{name:"Belize",code:"BZ"},{name:"Benin",code:"BJ"},{name:"Bermuda",code:"BM"},{name:"Bhutan",code:"BT"},{name:"Bolivia",code:"BO"},{name:"Bosnia and Herzegovina",code:"BA"},{name:"Botswana",code:"BW"},{name:"Bouvet Island",code:"BV"},{name:"Brazil",code:"BR"},{name:"British Indian Ocean Territory",code:"IO"},{name:"Brunei Darussalam",code:"BN"},{name:"Bulgaria",code:"BG"},{name:"Burkina Faso",code:"BF"},{name:"Burundi",code:"BI"},{name:"Cambodia",code:"KH"},{name:"Cameroon",code:"CM"},{name:"Canada",code:"CA"},{name:"Cape Verde",code:"CV"},{name:"Cayman Islands",code:"KY"},{name:"Central African Republic",code:"CF"},{name:"Chad",code:"TD"},{name:"Chile",code:"CL"},{name:"China",code:"CN"},{name:"Christmas Island",code:"CX"},{name:"Cocos (Keeling) Islands",code:"CC"},{name:"Colombia",code:"CO"},{name:"Comoros",code:"KM"},{name:"Congo",code:"CG"},{name:"Congo, The Democratic Republic of the",code:"CD"},{name:"Cook Islands",code:"CK"},{name:"Costa Rica",code:"CR"},{name:"Cote D'Ivoire",code:"CI"},{name:"Croatia",code:"HR"},{name:"Cuba",code:"CU"},{name:"Cyprus",code:"CY"},{name:"Czech Republic",code:"CZ"},{name:"Denmark",code:"DK"},{name:"Djibouti",code:"DJ"},{name:"Dominica",code:"DM"},{name:"Dominican Republic",code:"DO"},{name:"Ecuador",code:"EC"},{name:"Egypt",code:"EG"},{name:"El Salvador",code:"SV"},{name:"Equatorial Guinea",code:"GQ"},{name:"Eritrea",code:"ER"},{name:"Estonia",code:"EE"},{name:"Ethiopia",code:"ET"},{name:"Falkland Islands (Malvinas)",code:"FK"},{name:"Faroe Islands",code:"FO"},{name:"Fiji",code:"FJ"},{name:"Finland",code:"FI"},{name:"France",code:"FR"},{name:"French Guiana",code:"GF"},{name:"French Polynesia",code:"PF"},{name:"French Southern Territories",code:"TF"},{name:"Gabon",code:"GA"},{name:"Gambia",code:"GM"},{name:"Georgia",code:"GE"},{name:"Germany",code:"DE"},{name:"Ghana",code:"GH"},{name:"Gibraltar",code:"GI"},{name:"Greece",code:"GR"},{name:"Greenland",code:"GL"},{name:"Grenada",code:"GD"},{name:"Guadeloupe",code:"GP"},{name:"Guam",code:"GU"},{name:"Guatemala",code:"GT"},{name:"Guernsey",code:"GG"},{name:"Guinea",code:"GN"},{name:"Guinea-Bissau",code:"GW"},{name:"Guyana",code:"GY"},{name:"Haiti",code:"HT"},{name:"Heard Island and Mcdonald Islands",code:"HM"},{name:"Holy See (Vatican City State)",code:"VA"},{name:"Honduras",code:"HN"},{name:"Hong Kong",code:"HK"},{name:"Hungary",code:"HU"},{name:"Iceland",code:"IS"},{name:"India",code:"IN"},{name:"Indonesia",code:"ID"},{name:"Iran, Islamic Republic Of",code:"IR"},{name:"Iraq",code:"IQ"},{name:"Ireland",code:"IE"},{name:"Isle of Man",code:"IM"},{name:"Israel",code:"IL"},{name:"Italy",code:"IT"},{name:"Jamaica",code:"JM"},{name:"Japan",code:"JP"},{name:"Jersey",code:"JE"},{name:"Jordan",code:"JO"},{name:"Kazakhstan",code:"KZ"},{name:"Kenya",code:"KE"},{name:"Kiribati",code:"KI"},{name:"Democratic People's Republic of Korea",code:"KP"},{name:"Korea, Republic of",code:"KR"},{name:"Kosovo",code:"XK"},{name:"Kuwait",code:"KW"},{name:"Kyrgyzstan",code:"KG"},{name:"Lao People's Democratic Republic",code:"LA"},{name:"Latvia",code:"LV"},{name:"Lebanon",code:"LB"},{name:"Lesotho",code:"LS"},{name:"Liberia",code:"LR"},{name:"Libyan Arab Jamahiriya",code:"LY"},{name:"Liechtenstein",code:"LI"},{name:"Lithuania",code:"LT"},{name:"Luxembourg",code:"LU"},{name:"Macao",code:"MO"},{name:"Macedonia, The Former Yugoslav Republic of",code:"MK"},{name:"Madagascar",code:"MG"},{name:"Malawi",code:"MW"},{name:"Malaysia",code:"MY"},{name:"Maldives",code:"MV"},{name:"Mali",code:"ML"},{name:"Malta",code:"MT"},{name:"Marshall Islands",code:"MH"},{name:"Martinique",code:"MQ"},{name:"Mauritania",code:"MR"},{name:"Mauritius",code:"MU"},{name:"Mayotte",code:"YT"},{name:"Mexico",code:"MX"},{name:"Micronesia, Federated States of",code:"FM"},{name:"Moldova, Republic of",code:"MD"},{name:"Monaco",code:"MC"},{name:"Mongolia",code:"MN"},{name:"Montenegro",code:"ME"},{name:"Montserrat",code:"MS"},{name:"Morocco",code:"MA"},{name:"Mozambique",code:"MZ"},{name:"Myanmar",code:"MM"},{name:"Namibia",code:"NA"},{name:"Nauru",code:"NR"},{name:"Nepal",code:"NP"},{name:"Netherlands",code:"NL"},{name:"Netherlands Antilles",code:"AN"},{name:"New Caledonia",code:"NC"},{name:"New Zealand",code:"NZ"},{name:"Nicaragua",code:"NI"},{name:"Niger",code:"NE"},{name:"Nigeria",code:"NG"},{name:"Niue",code:"NU"},{name:"Norfolk Island",code:"NF"},{name:"Northern Mariana Islands",code:"MP"},{name:"Norway",code:"NO"},{name:"Oman",code:"OM"},{name:"Pakistan",code:"PK"},{name:"Palau",code:"PW"},{name:"Palestinian Territory, Occupied",code:"PS"},{name:"Panama",code:"PA"},{name:"Papua New Guinea",code:"PG"},{name:"Paraguay",code:"PY"},{name:"Peru",code:"PE"},{name:"Philippines",code:"PH"},{name:"Pitcairn",code:"PN"},{name:"Poland",code:"PL"},{name:"Portugal",code:"PT"},{name:"Puerto Rico",code:"PR"},{name:"Qatar",code:"QA"},{name:"Reunion",code:"RE"},{name:"Romania",code:"RO"},{name:"Russian Federation",code:"RU"},{name:"Rwanda",code:"RW"},{name:"Saint Helena",code:"SH"},{name:"Saint Kitts and Nevis",code:"KN"},{name:"Saint Lucia",code:"LC"},{name:"Saint Pierre and Miquelon",code:"PM"},{name:"Saint Vincent and the Grenadines",code:"VC"},{name:"Samoa",code:"WS"},{name:"San Marino",code:"SM"},{name:"Sao Tome and Principe",code:"ST"},{name:"Saudi Arabia",code:"SA"},{name:"Senegal",code:"SN"},{name:"Serbia",code:"RS"},{name:"Seychelles",code:"SC"},{name:"Sierra Leone",code:"SL"},{name:"Singapore",code:"SG"},{name:"Slovakia",code:"SK"},{name:"Slovenia",code:"SI"},{name:"Solomon Islands",code:"SB"},{name:"Somalia",code:"SO"},{name:"South Africa",code:"ZA"},{name:"South Georgia and the South Sandwich Islands",code:"GS"},{name:"Spain",code:"ES"},{name:"Sri Lanka",code:"LK"},{name:"Sudan",code:"SD"},{name:"Suriname",code:"SR"},{name:"Svalbard and Jan Mayen",code:"SJ"},{name:"Swaziland",code:"SZ"},{name:"Sweden",code:"SE"},{name:"Switzerland",code:"CH"},{name:"Syrian Arab Republic",code:"SY"},{name:"Taiwan",code:"TW"},{name:"Tajikistan",code:"TJ"},{name:"Tanzania, United Republic of",code:"TZ"},{name:"Thailand",code:"TH"},{name:"Timor-Leste",code:"TL"},{name:"Togo",code:"TG"},{name:"Tokelau",code:"TK"},{name:"Tonga",code:"TO"},{name:"Trinidad and Tobago",code:"TT"},{name:"Tunisia",code:"TN"},{name:"Turkey",code:"TR"},{name:"Turkmenistan",code:"TM"},{name:"Turks and Caicos Islands",code:"TC"},{name:"Tuvalu",code:"TV"},{name:"Uganda",code:"UG"},{name:"Ukraine",code:"UA"},{name:"United Arab Emirates",code:"AE"},{name:"United Kingdom",code:"GB"},{name:"United States Minor Outlying Islands",code:"UM"},{name:"Uruguay",code:"UY"},{name:"Uzbekistan",code:"UZ"},{name:"Vanuatu",code:"VU"},{name:"Venezuela",code:"VE"},{name:"Viet Nam",code:"VN"},{name:"Virgin Islands, British",code:"VG"},{name:"Virgin Islands, U.S.",code:"VI"},{name:"Wallis and Futuna",code:"WF"},{name:"Western Sahara",code:"EH"},{name:"Yemen",code:"YE"},{name:"Zambia",code:"ZM"},{name:"Zimbabwe",code:"ZW"}]);var gettext=function(s){return s};angular.module("enplug.sdk.utils").constant("months",[{name:gettext("January"),short:gettext("Jan"),code:"01"},{name:gettext("February"),short:gettext("Feb"),code:"02"},{name:gettext("March"),short:gettext("Mar"),code:"03"},{name:gettext("April"),short:gettext("Apr"),code:"04"},{name:gettext("May"),short:gettext("May"),code:"05"},{name:gettext("June"),short:gettext("Jun"),code:"06"},{name:gettext("July"),short:gettext("Jul"),code:"07"},{name:gettext("August"),short:gettext("Aug"),code:"08"},{name:gettext("September"),short:gettext("Sep"),code:"09"},{name:gettext("October"),short:gettext("Oct"),code:"10"},{name:gettext("November"),short:gettext("Nov"),code:"11"},{name:gettext("December"),short:gettext("Dec"),code:"12"}]);var gettext=function(s){return s};angular.module("enplug.sdk.utils").constant("quotes",{random:function(){var index=Math.floor(Math.random()*this.quotes.length);return this.quotes[index]},quotes:[{text:gettext("All great achievements require time."),author:"Maya Angelou"},{text:gettext("You can't wait for inspiration. You have to go after it with a club."),author:"Jack London"},{text:gettext("The perfect is the enemy of the good."),author:"Voltaire"},{text:gettext("I play to win, whether during practice or a real game."),author:"Michael Jordan"},{text:gettext("Many of life's failures are people who did not realize how close they were to success when they gave up."),author:"Thomas Edison"},{text:gettext("At the age of six I wanted to be a cook. At seven I wanted to be Napoleon. And my ambition has been growing steadily ever since."),author:"Salvador Dali"},{text:gettext("Quality is more important than quantity. One home run is much better than two doubles."),author:"Steve Jobs"},{text:gettext("That's one small step for man, one giant leap for mankind."),author:"Neil Armstrong"},{text:gettext("Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep."),author:"Scott Adams"},{text:gettext("Nothing will work unless you do."),author:"Maya Angelou"},{text:gettext("The best way out is always through."),author:"Robert Frost"},{text:gettext("An ant on the move does more than a dozing ox."),author:"Lao Tzu"},{text:gettext("Show me a thoroughly satisfied man and I will show you a failure."),author:"Thomas Edison"},{text:gettext("Our greatest glory is not in never failing, but in rising up every time we fail."),author:"Ralph Waldo Emerson"},{text:gettext("Every act of creation is first of all an act of destruction."),author:"Pablo Picasso"},{text:gettext("Fun is good."),author:"Dr. Seuss"},{text:gettext("I steal from every movie ever made."),author:"Quentin Tarantino"},{text:gettext("It is the working man who is the happy man. It is the idle man who is the miserable man."),author:"Ben Franklin"},{text:gettext("A person who never made a mistake never tried anything new."),author:"Albert Einstein"},{text:gettext("To be idle is a short road to death and to be diligent is a way of life."),author:"Buddha"},{text:gettext("The way to get started is to quit talking and begin doing."),author:"Walt Disney"},{text:gettext("For every dark night, there's a brigher day."),author:"Tupac Shakur"},{text:gettext("If you love life, don't waste time, for time is what life is made up of."),author:"Bruce Lee"},{text:gettext("You can never quit. Winners never quit, and quitters never win."),author:"Ted Turner"},{text:gettext("Work spares us from three evils: boredom, vice and need."),author:"Voltaire"},{text:gettext("Focus is a matter of deciding what things you're not going to do."),author:"John Carmack"},{text:gettext("I play to win, whether during practice or a real game."),author:"Michael Jordan"},{text:gettext("HULK SMASH!"),author:"The Incredible Hulk"},{text:gettext("The harder the conflict, the more glorious the triumph."),author:"Thomas Paine"},{text:gettext("Everything comes to him who hustles while he waits."),author:"Thomas Edison"},{text:gettext("You've got to jump off cliffs and build your wings on the way down."),author:"Ray Bradbury"},{text:gettext("Amateurs practice until they get it right. Professionals practice until they can't get it wrong."),author:"Unknown"},{text:gettext("Genius is one percent inspiration and ninety-nine percent perspiration."),author:"Thomas Edison"},{text:gettext("A lot of times, people don't know what they want until you show it to them."),author:"Steve Jobs"},{text:gettext("I don't know where I'm going, but I'm on my way."),author:"Carl Sagan"},{text:gettext("Lost time is never found again."),author:"Benjamin Franklin"},{text:gettext("Without pain, without sacrifice, we would have nothing."),author:"Tyler Durden"},{text:gettext("I pay no attention whatever to anybody's praise or blame. I simply follow my own feelings."),author:"Wolfgang Amadeus Mozart"},{text:gettext("You miss 100% of the shots you don't take."),author:"Wayne Gretzky"},{text:gettext("To have a great idea, have a lot of them."),author:"Thomas Edison"},{text:gettext("The value of an idea lies in the using of it."),author:"Thomas Edison"},{text:gettext("Simplify, simplify, simplify."),author:"Henry David Thoreau"},{text:gettext("There's a way to do it better - find it."),author:"Thomas Edison"},{text:gettext("When it is obvious that the goals cannot be reached, don't adjust the goals, adjust the steps."),author:"Confucius"},{text:gettext("During your life, never stop dreaming. No one can take away your dreams."),author:"Tupac Shakur"},{text:gettext("Things do not happen. Things are made to happen."),author:"John F. Kennedy"},{text:gettext("Ambition should be made of sterner stuff."),author:"William Shakespeare"},{text:gettext("If you spend too much time thinking about a thing, you'll never get it done."),author:"Bruce Lee"},{text:gettext("Success breeds success."),author:"Proverb"},{text:gettext("You are never too old to set another goal or to dream a new dream."),author:"C.S. Lewis"},{text:gettext("When you stop doing things for fun, you might as well be dead."),author:"Ernest Hemingway"},{text:gettext("There is no substitute for hard work."),author:"Thomas Edison"},{text:gettext("Live long and prosper."),author:"Spock"},{text:gettext("I have not failed. I've just found 10,000 ways that won't work."),author:"Thomas Edison"},{text:gettext("It's lack of faith that makes people afraid of meeting challenges, and I believed in myself."),author:"Muhammad Ali"},{text:gettext("All our dreams can come true, if we have the courage to pursue them."),author:"Walt Disney"},{text:gettext("Make everything as simple as possible, but not simpler."),author:"Albert Einstein"},{text:gettext("Some people want it to happen, some wish it would happen, others make it happen."),author:"Michael Jordan"},{text:gettext("I've got a theory that if you give 100% all the time, somehow things will work out in the end."),author:"Larry Bird"},{text:gettext("The problem with the future is that it keeps turning into the present."),author:"Bill Watterson"},{text:gettext("May the Force be with you."),author:"Han Solo"},{text:gettext("Victory belongs to the most persevering."),author:"Napoleon Bonaparte"},{text:gettext("I hated every minute of training, but I said, 'Dont quit. Suffer now and live the rest of your life as a champion'."),author:"Muhammad Ali"},{text:gettext("Do things that have never been done before."),author:"Russell Kirsch"},{text:gettext("I've failed over and over and over again in my life and that is why I succeed."),author:"Michael Jordan"},{text:gettext("A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty."),author:"Winston Churchill"},{text:gettext("He who hesitates is lost."),author:"Proverb"},{text:gettext("Carpe diem, seize the day boys, make your lives extraordinary."),author:"John Keating"},{text:gettext("Doing the best at this moment puts you in the best place for the next moment."),author:"Oprah Winfrey"},{text:gettext("Luck is preparation meeting opportunity."),author:"Oprah Winfrey"},{text:gettext("I have no special talent. I am only passionately curious."),author:"Albert Einstein"}]});var gettext=function(s){return s};angular.module("enplug.sdk.utils").constant("states",[{name:gettext("Alabama"),code:"AL"},{name:gettext("Alaska"),code:"AK"},{name:gettext("Arizona"),code:"AZ"},{name:gettext("Arkansas"),code:"AR"},{name:gettext("California"),code:"CA"},{name:gettext("Colorado"),code:"CO"},{name:gettext("Connecticut"),code:"CT"},{name:gettext("Delaware"),code:"DE"},{name:gettext("District of Columbia"),code:"DC"},{name:gettext("Florida"),code:"FL"},{name:gettext("Georgia"),code:"GA"},{name:gettext("Hawaii"),code:"HI"},{name:gettext("Idaho"),code:"ID"},{name:gettext("Illinois"),code:"IL"},{name:gettext("Indiana"),code:"IN"},{name:gettext("Iowa"),code:"IA"},{name:gettext("Kansa"),code:"KS"},{name:gettext("Kentucky"),code:"KY"},{name:gettext("Lousiana"),code:"LA"},{name:gettext("Maine"),code:"ME"},{name:gettext("Maryland"),code:"MD"},{name:gettext("Massachusetts"),code:"MA"},{name:gettext("Michigan"),code:"MI"},{name:gettext("Minnesota"),code:"MN"},{name:gettext("Mississippi"),code:"MS"},{name:gettext("Missouri"),code:"MO"},{name:gettext("Montana"),code:"MT"},{name:gettext("Nebraska"),code:"NE"},{name:gettext("Nevada"),code:"NV"},{name:gettext("New Hampshire"),code:"NH"},{name:gettext("New Jersey"),code:"NJ"},{name:gettext("New Mexico"),code:"NM"},{name:gettext("New York"),code:"NY"},{name:gettext("North Carolina"),code:"NC"},{name:gettext("North Dakota"),code:"ND"},{name:gettext("Ohio"),code:"OH"},{name:gettext("Oklahoma"),code:"OK"},{name:gettext("Oregon"),code:"OR"},{name:gettext("Pennsylvania"),code:"PA"},{name:gettext("Rhode Island"),code:"RI"},{name:gettext("South Carolina"),code:"SC"},{name:gettext("South Dakota"),code:"SD"},{name:gettext("Tennessee"),code:"TN"},{name:gettext("Texas"),code:"TX"},{name:gettext("Utah"),code:"UT"},{name:gettext("Vermont"),code:"VT"},{name:gettext("Virginia"),code:"VA"},{name:gettext("Washington"),code:"WA"},{name:gettext("West Virginia"),code:"WV"},{name:gettext("Wisconsin"),code:"WI"},{name:gettext("Wyoming"),code:"WY"}]),angular.module("enplug.sdk.utils").constant("years",function(){"use strict";for(var yearsToShow=20,thisYear=(new Date).getFullYear(),years=[],year=thisYear;year<thisYear+yearsToShow;year++)years.push({name:year.toString(),code:year.toString().slice(-2)});return years}()),angular.module("enplug.sdk.utils").directive("alert",function(){"use strict";return{restrict:"E",transclude:!0,scope:!0,replace:!0,templateUrl:"sdk-utils/alert.tpl"}}),angular.module("enplug.sdk.utils").directive("backgroundPicker",["$enplugDashboard","gettext",function($enplugDashboard,gettext){return{restrict:"E",scope:{imageData:"=",screenWidth:"=",screenHeight:"="},templateUrl:"sdk-utils/background-picker.tpl",link:function(scope,element,attrs,arg){scope.isDisabled=function(position){var screenRes=scope.screenWidth/scope.screenHeight,imageRes=scope.imageData.BgWidth/scope.imageData.BgHeight;return!scope.imageData||!scope.imageData.BgUrl||"center"!=position&&("contain"==scope.imageData.BgSize?"top"==position||"bottom"==position?screenRes>imageRes:"left"!=position&&"right"!=position||screenRes<imageRes:"top"==position||"bottom"==position?screenRes<imageRes:"left"!=position&&"right"!=position||screenRes>imageRes)},scope.removeUploadedFile=function(){scope.imageData.BgUrl="",scope.imageData.BgFilename="",scope.imageData.BgWidth="",scope.imageData.BgHeight="",scope.imageData.BgResolution=""},scope.promptImageUpload=function(){$enplugDashboard.upload().then(function(uploads){if(uploads.length>0){var img=uploads[0];scope.imageData.BgUrl=img.url,scope.imageData.BgResolution=img.width/img.height,scope.imageData.BgWidth=img.width,scope.imageData.BgHeight=img.height,scope.imageData.BgFilename=img.filename}else $enplugDashboard.errorIndicator(gettext("Something went wrong, please try again."))})}}}}]),angular.module("enplug.sdk.utils").directive("customDurationSlider",["$document",function($document){return{restrict:"E",scope:{ratio:"=ratio"},templateUrl:"sdk-utils/custom-duration-slider.tpl",link:function(scope,element,attrs,arg){function resolveUndefined(){scope.ratio||(scope.ratio=1,offset=compareOffsetValue(),$cursor.css("transition","margin-left 0.5s ease-in"),$cursor.css("margin-left",offset+"px"))}function preventFalseDuration(){return scope.ratio<=0&&(scope.ratio=void 0,scope.placeholder="-"),scope.ratio}function compareOffsetValue(){var difference=scope.ratio*scrollLength/60;return difference<padding?difference=padding:difference>scrollLength&&(difference=scrollLength),difference}function setDefaultValues(){scope.manualDuration=!1,$cursor.css("transition","none"),startX=event.pageX,scope.ratio=preventFalseDuration()}var startX=0,padding=2,$barWidth=angular.element(element[0].querySelector(".slider")),barWidth=$barWidth.prop("clientWidth"),$cursor=angular.element(element[0].querySelector(".slider-cursor")),cursorWidth=$cursor.prop("clientWidth"),scrollLength=barWidth-cursorWidth-padding,offset=0;return scope.manualDuration=!1,scope.ratio=preventFalseDuration(),scope.placeholder=scope.ratio||"-",scope.handleKeyDown=function(event){scope.manualDuration=!0},scope.checkRatioValue=function(){scope.ratio=preventFalseDuration()},scope.$watch("ratio",function(){scope.manualDuration&&(offset=compareOffsetValue(),$cursor.css("transition","margin-left 0.5s ease-in"),$cursor.css("margin-left",offset+"px"))}),scope.clearUndefined=function(){resolveUndefined()},function(){offset=compareOffsetValue(),$cursor.css("margin-left",offset+"px")}(),$cursor.on("mousedown",function(event){var mousemove,mouseup;return void 0==scope.ratio&&(scope.ratio=1,offset=compareOffsetValue(),$cursor.css("transition","margin-left 0.5s ease-in"),$cursor.css("margin-left",offset+"px")),mousemove=function(event){return scope.$apply(function(){offset+=event.pageX-startX,offset<padding?offset=padding:offset>scrollLength?offset=scrollLength:startX=event.pageX,scope.ratio=Math.round(offset/scrollLength*60),0!=scope.ratio&&"0"!=scope.ratio||(scope.ratio=1),$cursor.css("margin-left",offset+"px")})},mouseup=function(){return $document.unbind("mousemove",mousemove),$document.unbind("mouseup",mouseup)},event.preventDefault(),setDefaultValues(),$document.on("mousemove",mousemove),$document.on("mouseup",mouseup)})}}}]),angular.module("enplug.sdk.utils").directive("displayCounter",function(){return{restrict:"E",replace:!0,scope:{count:"=",showDanger:"=?",vertical:"=?",disabled:"=?"},templateUrl:"sdk-utils/display-counter.tpl",link:function(scope,element,attrs){scope.showDanger="showDanger"in attrs&&0==scope.showDanger,scope.checkDanger=function(){scope.showDanger&&scope.count<=0?element.addClass("danger"):element.removeClass("danger")},scope.checkDanger(),"vertical"in scope&&scope.vertical===!0&&element.addClass("vertical"),"disabled"in scope&&scope.disabled===!0&&element.addClass("disabled"),scope.$watch("count",function(){scope.checkDanger()})}}}),angular.module("enplug.sdk.utils").directive("downloadCsv",["$document","$log",function($document,$log){return{restrict:"A",scope:{epDownloadCsv:"="},link:function(scope,element){element.bind("click",function(){var fileName=scope.epDownloadCsv.fileName,downloadFunction=scope.epDownloadCsv.downloadFunction;$log.debug(fileName);var promise=downloadFunction();promise.then(function(data){var downloadLink=angular.element("<a></a>").attr("href","data:text/csv;charset=utf8,"+encodeURIComponent(data)).attr("download",fileName);downloadLink.insertAfter(element),downloadLink.ready(function(){downloadLink.get(0).click(),downloadLink.remove()})})})}}}]),angular.module("enplug.sdk.utils").directive("dropdownMenu",function(){"use strict";return{link:function(scope,element){element.addClass("dropdown-menu"),element.on("click",function(event){var target=angular.element(event.target);(target.attr("href")||target.parent().attr("href"))&&scope.$emit("dropdown:toggle"),scope.$apply(function(){scope.$emit("dropdown:click")})})}}}),angular.module("enplug.sdk.utils").directive("dropdownToggle",function(){"use strict";return{link:function(scope,element){element.addClass("dropdown-toggle"),element.on("click",function(){scope.$apply(function(){scope.$broadcast("dropdown:toggle")})})}}}),angular.module("enplug.sdk.utils").directive("dropdown",["$document","$timeout",function($document,$timeout){return{scope:!0,link:function(scope,element){function closeDropdown(){element.addClass("closing"),$timeout(function(){element.removeClass("open"),element.removeClass("closing"),$document.off("click",closeDropdown)},300)}function toggle(){element.hasClass("open")?closeDropdown():open()}function open(){element.addClass("open"),$document.on("click",function(event){element[0].contains(event.target)||closeDropdown()})}element.addClass("dropdown-wrap"),scope.$on("dropdown:toggle",toggle),scope.$on("dropdown:click",toggle),scope.$on("$destroy",function(){$document.off("click",closeDropdown)})}}}]),angular.module("enplug.sdk.utils").directive("durationSlider",["$document",function($document){return{restrict:"E",scope:{ratio:"=ratio"},templateUrl:"sdk-utils/duration-slider.tpl",link:function(scope,element,attrs,arg){function setPosition(){offset+=scope.ratio*scrollLength/60,$cursor.css("margin-left",offset+"px")}var startX=0,padding=3,$barWidth=angular.element(element[0].querySelector(".duration-slider")),barWidth=$barWidth.prop("clientWidth"),$cursor=angular.element(element[0].querySelector(".slider-cursor")),cursorWidth=$cursor.prop("clientWidth"),scrollLength=barWidth-cursorWidth-padding,offset=0;return setPosition(),scope.formatLabel=function(val){return val>-1?Math.round(val)+" secs":"-"},element.on("mousedown",function(event){var mousemove,mouseup;return mousemove=function(event){return scope.$apply(function(){offset+=event.pageX-startX,offset<padding?offset=padding:offset>scrollLength?offset=scrollLength:startX=event.pageX,scope.ratio=Math.round(offset/scrollLength*60),$cursor.css("margin-left",offset+"px")})},mouseup=function(){return $document.unbind("mousemove",mousemove),$document.unbind("mouseup",mouseup)},event.preventDefault(),startX=event.pageX,$document.on("mousemove",mousemove),$document.on("mouseup",mouseup)})}}}]),angular.module("enplug.sdk.utils").directive("colorPicker",["$document","$timeout","ColorTools","PositionTools",function($document,$timeout,ColorTools,PositionTools){"use strict";return{restrict:"E",transclude:!0,scope:{hex:"=?",rgb:"=?",alpha:"=?"},templateUrl:"sdk-utils/color-picker.tpl",link:function(scope,element,attrs){function setHEX(val){scope.hex=val,scope.hexInput=val}function setRGB(val){scope.rgb=val,setRed(val[0]),setGreen(val[1]),setBlue(val[2])}function setRed(val){scope.red=Math.round(val)}function setGreen(val){scope.green=Math.round(val)}function setBlue(val){scope.blue=Math.round(val)}function setHue(val){scope.hue=val,$hue[0].$cursor.css("left",(1-scope.hue)*$hue[0].clientWidth+"px")}function setSaturation(val){scope.saturation=val,$saturation[0].$cursor.css("left",scope.saturation*$saturation[0].clientWidth+"px")}function setBrightness(val){scope.brightness=val,$saturation[0].$cursor.css("top",(1-val)*$saturation[0].clientHeight+"px")}function setAlpha(val){scope.alpha=parseFloat(val.toFixed(2)),scope.alphaPercent=parseFloat((100*scope.alpha).toFixed(2)),scope.noAlpha||$alpha[0].$cursor.css("left",scope.alpha*$alpha[0].clientWidth+"px")}var labelAlpha=angular.element(element[0].querySelector(".channel-alpha")),labelHex=(angular.element(element[0].querySelector(".channel-red")),angular.element(element[0].querySelector(".channel-green")),angular.element(element[0].querySelector(".channel-blue")),angular.element(element[0].querySelector(".hex-input"))),$palette=angular.element(element[0].querySelector(".palette")),$swatch=angular.element(element[0].querySelector(".swatch"));scope.opened=!1;var $hue=angular.element(element[0].querySelector(".hue"));$hue[0].$cursor=angular.element($hue[0].querySelector(".cursor"));var $alpha=angular.element(element[0].querySelector(".alpha-slider"));$alpha[0].$cursor=angular.element($alpha[0].querySelector(".cursor"));var $saturation=angular.element(element[0].querySelector(".saturation"));if($saturation[0].$cursor=angular.element($saturation[0].querySelector(".cursor")),attrs.hasOwnProperty("showAsRgb")?scope.showAs="rgb":scope.showAs="hex",scope.toggleShowAs=function(){scope.showAs="hex"==scope.showAs?"rgb":"hex"},scope.noAlpha=attrs.hasOwnProperty("noAlpha"),scope.hasOwnProperty("hex")){setHEX(scope.hex.replace(/^#/,"")),setRGB(ColorTools.hex2rgb(parseInt(scope.hex,16)));var hsl=ColorTools.rgb2hsl(scope.rgb[0],scope.rgb[1],scope.rgb[2]);setHue(hsl[0]),setSaturation(hsl[1]),setBrightness(hsl[2])}else if(scope.hasOwnProperty("rgb")){setRGB(scope.rgb),setHEX(ColorTools.rgb2hex(scope.rgb[0],scope.rgb[1],scope.rgb[2]));var hsl=ColorTools.rgb2hsl(scope.rgb[0],scope.rgb[1],scope.rgb[2]);setHue(hsl[0]),setSaturation(hsl[1]),setBrightness(hsl[2])}else console.warn("[ColorPicker] Something insane just happened!");scope.hasOwnProperty("alpha")&&!isNaN(scope.alpha)||(scope.alpha=1),setAlpha(scope.alpha),$saturation.on("mousedown",function(event){var mousemove,mouseup;mousemove=function(event){return scope.$apply(function(){var top=Math.max(0,Math.min($saturation[0].clientHeight,event.pageY-PositionTools.getTop($saturation[0]))),left=Math.max(0,Math.min($saturation[0].clientWidth,event.pageX-PositionTools.getLeft($saturation[0])));setSaturation(left/$saturation[0].clientWidth),setBrightness(1-top/$saturation[0].clientHeight),setRGB(ColorTools.hsl2rgb(scope.hue,scope.saturation,scope.brightness)),setHEX(ColorTools.rgb2hex(scope.rgb[0],scope.rgb[1],scope.rgb[2]))})},mouseup=function(){$document.unbind("mousemove",mousemove),$document.unbind("mouseleave",mouseup),$document.unbind("mouseup",mouseup)},event.preventDefault(),mousemove(event),$document.on("mousemove",mousemove),$document.on("mouseleave",mouseup),
$document.on("mouseup",mouseup)}),$hue.on("mousedown",function(event){var mousemove,mouseup;mousemove=function(event){return scope.$apply(function(){var left=Math.max(0,Math.min($hue[0].clientWidth,event.pageX-PositionTools.getLeft($hue[0])));setHue(1-left/$hue[0].clientWidth),setRGB(ColorTools.hsl2rgb(scope.hue,scope.saturation,scope.brightness)),setHEX(ColorTools.rgb2hex(scope.rgb[0],scope.rgb[1],scope.rgb[2]))})},mouseup=function(){$document.unbind("mousemove",mousemove),$document.unbind("mouseleave",mouseup),$document.unbind("mouseup",mouseup)},event.preventDefault(),mousemove(event),$document.on("mousemove",mousemove),$document.on("mouseleave",mouseup),$document.on("mouseup",mouseup)}),$alpha.on("mousedown",function(event){var mousemove,mouseup;mousemove=function(event){return scope.$apply(function(){var left=Math.max(0,Math.min($alpha[0].clientWidth,event.pageX-PositionTools.getLeft($alpha[0])));setAlpha(left/$alpha[0].clientWidth)})},mouseup=function(){$document.unbind("mousemove",mousemove),$document.unbind("mouseleave",mouseup),$document.unbind("mouseup",mouseup)},event.preventDefault(),mousemove(event),$document.on("mousemove",mousemove),$document.on("mouseleave",mouseup),$document.on("mouseup",mouseup)}),scope.$watch("alphaPercent",function(){setAlpha(labelAlpha[0].value/100)}),scope.getHueColor=function(){var rgb=ColorTools.hsl2rgb(scope.hue,1,1),hex=ColorTools.rgb2hex(rgb[0],rgb[1],rgb[2]);return hex},scope.watchRGBInputChange=function(){setRGB([scope.red,scope.green,scope.blue]);var hsl=ColorTools.rgb2hsl(scope.red,scope.green,scope.blue);setHEX(ColorTools.rgb2hex(scope.red,scope.green,scope.blue)),setHue(hsl[0]),setSaturation(hsl[1]),setBrightness(hsl[2])},scope.watchHEXInputChange=function(){labelHex[0].value.match(/[^0-9a-fA-F\.]/g)&&(labelHex[0].value=labelHex[0].value.replace(/[^0-9a-fA-F\.]/g,""));for(var fixed=labelHex[0].value.split(""),hex="",i=0,l=6;i<l;i++)hex+=i<fixed.length?fixed[i]:0;scope.hex=hex,setRGB(ColorTools.hex2rgb(parseInt(scope.hex,16)));var hsl=ColorTools.rgb2hsl(scope.red,scope.green,scope.blue);setHue(hsl[0]),setSaturation(hsl[1]),setBrightness(hsl[2])};var outterClickHandler=function(event){var isInside=event.pageY>PositionTools.getTop($palette[0])&&event.pageY<PositionTools.getTop($swatch[0])+$swatch[0].clientHeight+$palette[0].clientHeight&&event.pageX>PositionTools.getLeft($palette[0])&&event.pageX<PositionTools.getLeft($palette[0])+$palette[0].clientWidth;if(!isInside)return scope.$apply(function(){scope.opened=!1,$document.unbind("mousedown",outterClickHandler)})};scope.toggle=function(){scope.opened=!scope.opened,scope.opened?($timeout(function(){setAlpha(scope.alpha);var hsl=ColorTools.rgb2hsl(scope.rgb[0],scope.rgb[1],scope.rgb[2]);setHue(hsl[0]),setSaturation(hsl[1]),setBrightness(hsl[2])}),$document.bind("mousedown",outterClickHandler)):$document.unbind("mousedown",outterClickHandler)},element.on("$destroy",function(){$document.unbind("mousedown",outterClickHandler)})}}}]),angular.module("enplug.sdk.utils").directive("equals",function(){function getter(property,object){var splitModel=property.split(".");return splitModel.reduce(function(map,key){return map[key]},object)}return{restrict:"A",require:"?ngModel",link:function($scope,$element,$attrs,$ngModel){function validate(){var val1=$ngModel.$viewValue,val2=getter($attrs.equals,$scope);$ngModel.$setValidity("equals",!val1||!val2||val1===val2)}$scope.$watch($attrs.ngModel,function(){validate()}),$scope.$watch($attrs.equals,function(){validate()})}}}),angular.module("enplug.sdk.utils").directive("materialCheckbox",["$log","$compile","GUID",function($log,$compile,GUID){"use strict";var ignoreAttributes=["class","field","label","ng-if","ng-show","ng-hide","ng-repeat"];return{restrict:"E",scope:{model:"=field"},transclude:!0,templateUrl:"sdk-utils/material-checkbox.tpl",link:function($scope,$element,$attrs,$ctrl,$transclude){$element.addClass("material-checkbox"),$scope.id=GUID.new(),$scope.label=$attrs.label,$transclude(function(clone){if(clone){for(var hasInput=!1,i=0;i<clone.length;i++)"input"==clone[i].nodeName.toLowerCase()&&(hasInput=!0);hasInput?($element.find("input").remove(),$element.find("label").prepend(clone),$element.find("input").attr("id",$scope.id),$element.find("input").attr("type","checkbox")):angular.element($element[0].querySelector(".checkbox-label")).append(clone)}});var input=$element.find("input")[0];angular.forEach($attrs,function(value,_attr){var attr=_attr.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();attr.indexOf("$")===-1&&ignoreAttributes.indexOf(attr)===-1&&($element.removeAttr(attr),input.setAttribute(attr,value))});var checkbox=$element.find("label")[0];$compile(checkbox)($scope)}}}]),angular.module("enplug.sdk.utils").directive("materialInput",["$log","$compile","$parse","$document","GUID","gettext",function($log,$compile,$parse,$document,GUID,gettextCatalog){"use strict";return{restrict:"E",require:"^form",scope:{model:"=field"},transclude:!0,templateUrl:"sdk-utils/material-input.tpl",link:function($scope,$element,$attrs,$form,$transclude){var ignoreAttributes=["class","label","directives","field","focus","ng-if","ng-show","ng-hide"],input=$document[0].createElement("input"),directives=$parse($attrs.directives)($scope),autofocus="undefined"!=typeof $attrs.autofocus,id=$attrs.field+"-"+GUID.new();$scope.id=id,$scope.label=$attrs.label,$element.removeAttr("label"),$element.removeAttr("label"),input.setAttribute("name",id),$element.parent().hasClass("form-group")||$element.addClass("form-group"),angular.forEach($attrs,function(value,_attr){var attr=_attr.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();attr.indexOf("$")===-1&&ignoreAttributes.indexOf(attr)===-1&&($element.removeAttr(attr),input.setAttribute(attr,value))}),input.getAttribute("type")||input.setAttribute("type","text"),input.setAttribute("class","form-control"),input.setAttribute("ng-model","model"),input.setAttribute("ng-class","{ active: model }"),input.setAttribute("ng-model-options","{ allowInvalid: true, debounce: 100 }"),input.setAttribute("id",$scope.id),angular.forEach(directives,function(value,directive){input.setAttribute(directive,value)}),$element.removeAttr("directives"),$transclude(function(clone){var hasInput=!1;if(clone){for(var newInput,i=0;i<clone.length;i++)"input"==clone[i].nodeName.toLowerCase()&&(hasInput=!0,newInput=clone[i]);hasInput?(newInput.setAttribute("class","form-control"),newInput.setAttribute("id",$scope.id),input.setAttribute("name",$scope.id),newInput.setAttribute("ng-class","{ active: model }"),newInput.setAttribute("ng-model","model"),$compile(clone)($scope),$element.prepend(clone)):$element.append(clone)}hasInput||($compile(input)($scope),$element.prepend(input))}),autofocus&&input.focus(),$scope.formField=$form[id],$scope.$watch("model",function(val){void 0!==val&&null!==val&&$scope.formField&&($scope.formField.$dirty=!0)})}}}]),angular.module("enplug.sdk.utils").directive("materialRadio",["$log","$compile",function($log,$compile){"use strict";var ignoreAttributes=["class","field","label","ng-if","ng-show","ng-hide","ng-repeat"];return{restrict:"E",scope:{model:"=field"},transclude:!0,replace:!0,templateUrl:"sdk-utils/material-radio.tpl",link:function(scope,element,attrs){element.addClass("material-radio");var input=element.find("input")[0];angular.forEach(attrs,function(value,_attr){var attr=_attr.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();attr.indexOf("$")===-1&&ignoreAttributes.indexOf(attr)===-1&&(element.removeAttr(attr),input.setAttribute(attr,value))}),$compile(input)(scope)}}}]),angular.module("enplug.sdk.utils").directive("materialSelect",["$timeout",function($timeout){"use strict";function findSelect(clone){for(var i=0;i<clone.length;i++)if("select"==clone[i].nodeName.toLowerCase())return angular.element(clone[i])}return{restrict:"E",scope:!0,transclude:!0,templateUrl:"sdk-utils/material-select.tpl",link:function(scope,element,attrs,ctrl,transclude){element.addClass("material-select"),scope.label=attrs.label,element.removeAttr("label"),transclude(function(clone){var select=findSelect(clone);select?scope.$watch("$parent."+select.attr("ng-model"),function(val){"undefined"!=typeof val&&null!==val&&(element.addClass("selected"),$timeout(function(){scope.label=select[0].options[select[0].selectedIndex].label}))}):console.warn("Warning: material-select requires a <select> element to be transcluded.")})}}}]),angular.module("enplug.sdk.utils").directive("materialSwitch",function(){"use strict";function findInput(clone){for(var i=0;i<clone.length;i++)if("input"==clone[i].nodeName.toLowerCase())return angular.element(clone[i])}return{restrict:"E",transclude:!0,replace:!0,templateUrl:"sdk-utils/material-switch.tpl",scope:{model:"="},link:function(scope,element,attrs,ctrl,transclude){scope.dirty=!1,transclude(function(clone){findInput(clone)&&angular.element(element[0].querySelector(".default-input")).remove()})}}}),angular.module("enplug.sdk.utils").directive("helpBlock",function(){"use strict";return{templateUrl:"sdk-utils/help-block.tpl",restrict:"E"}}),angular.module("enplug.sdk.utils").directive("layoutToggle",["$rootScope",function($rootScope){"use strict";return{restrict:"E",templateUrl:"sdk-utils/layout-toggle.tpl",replace:!0,link:function(scope){$rootScope.showGridLayout!==!1&&($rootScope.showGridLayout=!0),scope.toggleLayout=function(){$rootScope.showGridLayout=!$rootScope.showGridLayout}}}}]),angular.module("enplug.sdk.utils").directive("gridLayout",function(){"use strict";return{link:function(scope,element){scope.$watch("showGridLayout",function(bool){bool?element.removeClass("ng-hide"):element.addClass("ng-hide")})}}}),angular.module("enplug.sdk.utils").directive("tableLayout",function(){"use strict";return{link:function(scope,element){scope.$watch("showGridLayout",function(bool){bool?element.addClass("ng-hide"):element.removeClass("ng-hide")})}}}),angular.module("enplug.sdk.utils").directive("loading",[function(){"use strict";function isPromise(val){return"object"==typeof val&&"function"==typeof val.then}return{restrict:"E",templateUrl:"sdk-utils/loading.tpl",transclude:!0,replace:!1,scope:{isLoading:"=condition"},link:function(scope,element){element.addClass("loading-wrapper"),isPromise(scope.isLoading)?(scope.loading=!0,scope.isLoading.then(function(){scope.loading=!1},function(){scope.error=!0})):(scope.loading=scope.isLoading,scope.$watch("isLoading",function(val){scope.loading=val}))}}}]),angular.module("enplug.sdk.utils").directive("locationAware",["$location",function($location){"use strict";return{restrict:"A",replace:!1,link:function(scope,element,attrs){function getPath(){var path=attrs.href||attrs.ngHref||attrs.locationAware;if(!path){var anchor=element.find("a");anchor&&(path=anchor.attr("href")||anchor.attr("ngHref"))}return path}function checkActive(){var path=getPath();path===$location.path()?element.addClass("active"):element.removeClass("active")}checkActive(),scope.$on("$routeChangeSuccess",checkActive)}}}]),angular.module("enplug.sdk.utils").directive("notice",function(){"use strict";return{restrict:"E",transclude:!0,scope:!0,replace:!0,templateUrl:"sdk-utils/alert.tpl",link:function(scope){scope.notice=!0}}}),angular.module("enplug.sdk.utils").directive("proTip",["$log","ProTips",function($log,ProTips){return{restrict:"E",replace:!0,scope:!0,templateUrl:"sdk-utils/protip.tpl",link:function(scope,element,attrs){var path=attrs.tip,config=_.get(ProTips,path);_.isString(config)?scope.config={tip:config}:_.isObject(config)?scope.config=config:($log.error("Did not find pro tip config for path:",path),element.remove())}}}]),angular.module("enplug.sdk.utils").directive("statusButton",["$log","$timeout",function($log,$timeout){"use strict";function isPromise(val){return"object"==typeof val&&"function"==typeof val.then}var showStatusDelay=2e3;return{restrict:"E",replace:!0,scope:{condition:"=condition",action:"&"},transclude:!0,templateUrl:"sdk-utils/status-button.tpl",link:function(scope,element,attrs){function handlePromise(promise){scope.isLoading=!0,promise.then(function(){scope.success=!0},function(){scope.error=!0}).finally(function(){element[0].blur(),scope.isLoading=!1,$timeout(function(){scope.success=!1,scope.error=!1},showStatusDelay)})}element.hasClass("btn")||(element.addClass("btn"),element.addClass("btn-default")),scope.action&&element.bind("click",function(event,data){scope.$apply(function(){var promise=scope.action({data:data});isPromise(promise)?handlePromise(promise):$log.warn("Status button action must return a promise.")})}),"undefined"!=typeof attrs.condition&&(scope.isLoading=scope.condition,scope.$watch("condition",function(val){scope.isLoading=val}))}}}]),angular.module("enplug.sdk.utils").filter("stNestedSearch",[function(){function getter(model,item){var splitModel=model.split(".");return splitModel.reduce(function(map,key){return map[key]},item)}return function(items,filters){var itemsLeft=items.slice();return Object.keys(filters).forEach(function(model){var value=filters[model];itemsLeft=itemsLeft.filter(function(item){var compare=getter(model,item);if(null!==compare&&void 0!==compare)return String(compare).toLowerCase().indexOf(value.toLowerCase())>=0})}),itemsLeft}}]),angular.module("enplug.sdk.utils").filter("stNestedSort",[function(){function getter(property,item){var properties=property.split(".");return properties.reduce(function(map,key){return map[key]},item)}return function(input,property,descending){return Array.isArray(input)?input.concat().sort(function(a,b){var sortOrder=1;descending&&(sortOrder=-1);var aVal=getter(property,a),bVal=getter(property,b),result=aVal<bVal?-1:aVal>bVal?1:0;return result*sortOrder}):input}}]),angular.module("enplug.sdk.utils").directive("stSummary",[function(){return{restrict:"E",require:"^stTable",template:'<div class="summary">Showing {{ stRange.from }}-{{ stRange.to }} of {{ size }}</div>',link:function($scope,$element,$attrs,$stTable){$scope.$watch($stTable.getFilteredCollection,function(val){$scope.size=(val||[]).length}),$scope.$watch("currentPage",function(){$scope.stRange={from:null,to:null},$scope.stRange.from=$stTable.tableState().pagination.start+1,$scope.stRange.to=$scope.currentPage===$scope.numPages?$scope.size:$scope.stRange.from+$scope.stItemsByPage-1})}}}]),angular.module("enplug.sdk.utils").directive("tagInput",function(){return{restrict:"E",replace:!0,scope:{tags:"="},templateUrl:"sdk-utils/tag-input.tpl",link:function(scope,element,attrs){function processTags(offset){for(var words=scope.input.split(" "),i=offset;i<words.length;i++)scope.tags.indexOf(words[i])===-1&&scope.tags.push(words[i]),words.splice(i--,1);scope.input=words.join(" ")}scope.deleteTag=function(tag){for(var i=0,l=scope.tags.length;i<l;i++)scope.tags[i]===tag&&scope.tags.splice(i,1)},scope.handleTextChange=function(){null!=scope.input&&processTags(1)},scope.handleKeyPress=function(event){null!=scope.input&&(13!=event.charCode&&32!=event.charCode||" "!==scope.input&&0!==scope.input.length&&processTags(0))}}}}),angular.module("enplug.sdk.utils").directive("tagSelect",function(){return{restrict:"E",replace:!0,scope:{tags:"=",selectedTags:"="},templateUrl:"sdk-utils/tag-select.tpl",link:function(scope,element,attrs){scope.toggleSelection=function(tag){var index=scope.selectedTags.indexOf(tag);index>-1?scope.selectedTags.splice(index,1):scope.selectedTags.push(tag)},scope.isSelected=function(tag){return scope.selectedTags.indexOf(tag)>-1}}}}),angular.module("enplug.sdk.utils").directive("tooltip",["Tooltips",function(Tooltips){"use strict";return{restrict:"E",templateUrl:"sdk-utils/tooltip.tpl",replace:!0,scope:!0,link:function(scope,element,attrs){var tip=attrs.tip,config=_.get(Tooltips,tip)||{};"string"!=typeof config.position&&(config.position="top center"),config.text||(config.text=tip),config.link&&~config.link.location.indexOf("http")&&element.find("a").attr("target","_blank"),scope.config=config}}}]),angular.module("enplug.sdk.utils").factory("ColorTools",[function(){function rgb2hsl(r,g,b){var rr,gg,bb,h,s,r=arguments[0]/255,g=arguments[1]/255,b=arguments[2]/255,v=Math.max(r,g,b),diff=v-Math.min(r,g,b),diffc=function(c){return(v-c)/6/diff+.5};return 0==diff?h=s=0:(s=diff/v,rr=diffc(r),gg=diffc(g),bb=diffc(b),r===v?h=bb-gg:g===v?h=1/3+rr-bb:b===v&&(h=2/3+gg-rr),h<0?h+=1:h>1&&(h-=1)),[h,s,v]}function hsl2rgb(h,s,v){var r,g,b,i,f,p,q,t,hue;if(null!=h.h&&(v=h.b,s=h.s,h=h.h),h%=360,h<1&&(h*=360),s=s>1?1:s<0?0:s,v=v>1?1:v<0?0:v,hue=h,0==s)r=g=b=v;else switch(h/=60,f=h-(i=Math.floor(h)),p=v*(1-s),q=v*(1-s*f),t=v*(1-s*(1-f)),i){case 0:r=v,g=t,b=p;break;case 1:r=q,g=v,b=p;break;case 2:r=p,g=v,b=t;break;case 3:r=p,g=q,b=v;break;case 4:r=t,g=p,b=v;break;case 5:r=v,g=p,b=q}return[Math.floor(255*r),Math.floor(255*g),Math.floor(255*b)]}function hex2rgb(hex){return[hex>>16&255,hex>>8&255,255&hex]}function rgb2hex(r,g,b){for(var hex=(65536*r+256*g+b).toString(16,6);hex.length<6;)hex="0"+hex;return hex}return{rgb2hsl:rgb2hsl,hsl2rgb:hsl2rgb,hex2rgb:hex2rgb,rgb2hex:rgb2hex}}]),angular.module("enplug.sdk.utils").service("DetectChanges",["$log",function($log){"use strict";function log(field){$log.debug("Change detected:",field)}var fields=[];return{watch:function(watchForChanges,scope,verbose){return fields=[],_.isObject(scope)?(_.isArray(watchForChanges)||(watchForChanges=[watchForChanges]),watchForChanges.forEach(function(watcher){var field={property:watcher,changed:!1};field.original=_.cloneDeep(watcher.split(".").reduce(function(map,key){return map[key]},scope)),field.type=typeof field.original,fields.push(field),_.isArray(field.original)?scope.$watch(field.property,function(newValue,oldValue){field.changed=!_.isEqual(newValue,field.original),field.current=newValue,verbose&&newValue!==oldValue&&log(field)},!0):_.isDate(field.original)?(field.type="Date",scope.$watch(field.property,function(newValue){_.isDate(newValue)?field.changed=field.original.getTime()!==newValue.getTime():field.changed=!0,field.current=newValue,verbose&&log(field)})):scope.$watch(field.property,function(newValue,oldValue){field.changed=newValue!==field.original,field.current=newValue,verbose&&newValue!==oldValue&&log(field)})}),void(verbose&&$log.debug("[DetectChanges] Registered fields to watch:",fields))):void $log.error("Detect changes requires $scope.")},hasChanges:function(){var changed=_.filter(fields,{changed:!0});return changed.length>0},fieldsChanged:function(){return _.pluck(_.filter(fields,{changed:!0}),"property")},reset:function(){fields=[]}}}]),angular.module("enplug.sdk.utils").factory("GUID",[function(){function s4(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return{new:function(){return s4()+s4()+"-"+s4()+"-"+s4()+"-"+s4()+"-"+s4()+s4()+s4()}}}]),angular.module("enplug.sdk.utils").factory("PositionTools",["$window",function($window){function getOffset(element){var docElem,rect,doc;if(rect=element.getBoundingClientRect(),rect.width||rect.height||element.getClientRects().length)return doc=element.ownerDocument,docElem=doc.documentElement,{top:rect.top+$window.pageYOffset-docElem.clientTop,left:rect.left+$window.pageXOffset-docElem.clientLeft}}function getLeft(element){var docElem,rect,doc;if(rect=element.getBoundingClientRect(),rect.width||rect.height||element.getClientRects().length)return doc=element.ownerDocument,docElem=doc.documentElement,rect.left+$window.pageXOffset-docElem.clientLeft}function getTop(element){var docElem,rect,doc;if(rect=element.getBoundingClientRect(),rect.width||rect.height||element.getClientRects().length)return doc=element.ownerDocument,docElem=doc.documentElement,rect.top+$window.pageYOffset-docElem.clientTop}return{getOffset:getOffset,getLeft:getLeft,getTop:getTop}}]),angular.module("enplug.sdk.utils").factory("ScriptLoaderService",["$q","$document","$timeout",function($q,$document,$timeout){"use strict";return{loadScript:function(callback,src){var defer=$q.defer(),script=$document[0].createElement("script");return script.src=src,$document[0].body.appendChild(script),script.onload=script.onreadystatechange=function(){$timeout(function(){callback()?defer.resolve():defer.reject("Error occurred. Please try again.")})},script.onerror=function(){$timeout(function(){defer.reject("Error. Please try again.")})},defer.promise}}}]),angular.module("enplug.sdk.utils.templates",[]).run(["$templateCache",function($templateCache){"use strict";$templateCache.put("sdk-utils/alert.tpl",'<div class=alert><i ng-hide=notice class="ion-alert-circled alert-icon"></i> <i ng-show=notice class="ion-information-circled alert-icon"></i><ng-transclude class=alert-body></ng-transclude></div>'),$templateCache.put("sdk-utils/background-picker.tpl","<div class=\"clearfix background-picker\"><div><button class=upload-image ng-hide=imageData.BgUrl ng-click=promptImageUpload() translate>Upload Image</button><div class=\"upload-image uploaded\" ng-show=imageData.BgUrl><span class=filename title={{imageData.BgFilename}}>{{imageData.BgFilename}}</span> <a class=remove ng-click=removeUploadedFile()>✕</a></div></div><div ng-show=imageData.BgUrl class=image-position><div class=\"one-third clearfix\"><ul class=\"alignement-widget clearfix\"><li class=top-left ng-click=\"imageData.BgPosition='top-left'\" ng-class=\"{ active: imageData.BgPosition=='top-left', disabled:isDisabled('top-left') }\"></li><li class=top ng-click=\"imageData.BgPosition='top'\" ng-class=\"{ active: imageData.BgPosition=='top', disabled:isDisabled('top') }\"></li><li class=top-right ng-click=\"imageData.BgPosition='top-right'\" ng-class=\"{ active: imageData.BgPosition=='top-right', disabled:isDisabled('top-right') }\"></li><li class=left ng-click=\"imageData.BgPosition='left'\" ng-class=\"{ active: imageData.BgPosition=='left', disabled:isDisabled('left') }\"></li><li class=center ng-click=\"imageData.BgPosition='center'\" ng-class=\"{ active: imageData.BgPosition=='center', disabled:isDisabled('center') }\"></li><li class=right ng-click=\"imageData.BgPosition='right'\" ng-class=\"{ active: imageData.BgPosition=='right', disabled:isDisabled('right') }\"></li><li class=bottom-left ng-click=\"imageData.BgPosition='bottom-left'\" ng-class=\"{ active: imageData.BgPosition=='bottom-left', disabled:isDisabled('bottom-left') }\"></li><li class=bottom ng-click=\"imageData.BgPosition='bottom'\" ng-class=\"{ active: imageData.BgPosition=='bottom', disabled:isDisabled('bottom') }\"></li><li class=bottom-right ng-click=\"imageData.BgPosition='bottom-right'\" ng-class=\"{ active: imageData.BgPosition=='bottom-right', disabled:isDisabled('bottom-right') }\"></li></ul><p translate>Position</p></div><div class=\"two-thirds clearfix\"><div class=\"full-width half-height\" ng-click=\"imageData.BgSize='contain'\" ng-class=\"{ active: imageData.BgSize=='contain' }\"><p class=\"icon icon-contain\" translate>Contain</p></div><div class=\"full-width half-height\" ng-click=\"imageData.BgSize='cover'\" ng-class=\"{ active: imageData.BgSize=='cover' }\"><p class=\"icon icon-cover\"><translate>Cover</translate><span class=sub-icon></span></p></div></div></div></div>"),$templateCache.put("sdk-utils/color-picker.tpl","<div class=color-picker ng-blur=close()><div class=swatch ng-style=\"{ 'background-color': '#' + hex }\" ng-click=toggle()></div><div class=transcluded ng-transclude ng-click=toggle()></div><div class=palette ng-class=\"{ 'opened': opened }\"><div class=saturation ng-class=\"{ 'no-alpha': noAlpha }\" ng-style=\"{ 'background-color': '#' + getHueColor() }\"><div class=cursor></div></div><div class=preview ng-style=\"{ 'background-color': '#' + hex }\"></div><div class=hue><div class=cursor></div></div><div class=numbers><ul class=clearfix ng-class=\"{ 'show-as-hex': showAs=='hex', 'show-as-rgb': showAs=='rgb' }\"><li class=\"\"><label translate translate-comment=\"R represents 'red' in rgb\">R:</label><input class=channel-red type=number name=channel-red min=0 max=255 ng-model=red ng-change=watchRGBInputChange()></li><li class=\"\"><label translate translate-comment=\"G represents 'green' in rgb\">G:</label><input class=channel-green type=number name=channel-green min=0 max=255 ng-model=green ng-change=watchRGBInputChange()></li><li class=\"\"><label translate translate-comment=\"B represents 'blue' in rgb\">B:</label><input class=channel-blue type=number name=channel-blue min=0 max=255 ng-model=blue ng-change=watchRGBInputChange()></li><li class=iconic ng-click=toggleShowAs()><i class=\"icon ion-android-options\"></i></li><li class=hex-values><label>#</label><input class=hex-input name=hex-input maxlength=6 ng-model=hexInput ng-change=watchHEXInputChange()></li></ul></div><div class=alpha ng-hide=noAlpha><div class=field><label translate translate-comment=\"A represents 'Alpha'\">A:</label><input class=channel-alpha type=number name=channel-alpha min=0 max=100 ng-model=alphaPercent></div><div class=alpha-slider ng-style=\"{ 'background-color': '#' + hex }\"><div class=cursor></div></div></div></div></div>"),$templateCache.put("sdk-utils/custom-duration-slider.tpl",'<div class=duration-slider-directive><div class="slider-container clearfix"><div class=slider><div class=slider-cursor><i ng-show=ratio class="icon on ion-record"><span>||</span></i> <i ng-hide=ratio class="icon on ion-record icon-undefined"><span>&mdash;</span></i></div></div></div><input maxlength=5 ng-model=ratio placeholder={{placeholder}} class=slider-duration-input ng-blur=checkRatioValue() ng-focus=clearUndefined() ng-keydown=handleKeyDown($event)></div>'),$templateCache.put("sdk-utils/display-counter.tpl",'<div class=display-counter><span ng-bind="count | translate" class=binding></span></div>'),$templateCache.put("sdk-utils/duration-slider.tpl","<div class=duration-slider><div class=slider-cursor><span>{{formatLabel(ratio)}}</span></div></div>"),$templateCache.put("sdk-utils/help-block.tpl",'<footer class="footer-help block-center"><div class="info-message text-gray"><i class="ion-help-circled text-primary"></i><translate translate-comment="The full paragraph for this string is the following: \'Need help? Go to the Enplug Help Center\'">Need help? Go to the</translate><a href=http://support.enplug.com/hc/en-us target=_blank>&nbsp;<translate>Enplug Help Center</translate></a></div></footer>'),$templateCache.put("sdk-utils/layout-toggle.tpl",'<div class="btn-group layout-toggle"><button ng-click=toggleLayout() ng-disabled=showGridLayout class="btn btn-default btn-icon btn-sm ion-android-apps grid-toggle"></button> <button ng-click=toggleLayout() ng-disabled=!showGridLayout class="btn btn-default btn-icon btn-sm ion-navicon table-toggle"></button></div>'),$templateCache.put("sdk-utils/loading.tpl","<div class=loading-directive ng-show=loading><div class=loader ng-hide=error><svg class=circular><circle class=path cx=32 cy=32 r=30 fill=none stroke-width=2></circle></svg></div><div ng-show=error><p translate>There was an error.</p></div></div><ng-transclude class=loading-content ng-hide=loading></ng-transclude>"),$templateCache.put("sdk-utils/material-checkbox.tpl",'<div class=checkbox><label for="{{ id }}"><input id="{{ id }}" type=checkbox ng-model=model> <span class=checkbox-material><span class=check></span></span> <span class=checkbox-label><span ng-bind="label | translate"></span></span></label></div>'),$templateCache.put("sdk-utils/material-input.tpl",'<label for="{{ ::id }}" ng-bind="label | translate"></label><div class=validation ng-messages=formField.$error ng-if=formField.$dirty><span class=text-danger ng-message=required translate>This is required.</span> <span class=text-danger ng-message=email translate>Please enter a valid email address.</span> <span class=text-danger ng-message=url translate>Please enter a valid URL starting with http:// or https://</span> <span class=text-danger ng-message=equals translate>Passwords must match.</span></div>'),$templateCache.put("sdk-utils/material-radio.tpl","<div class=radio><label><input type=radio ng-model=model> <span class=radio-on></span> <span class=radio-off></span><ng-transclude></ng-transclude></label></div>"),$templateCache.put("sdk-utils/material-select.tpl",'<span class=form-label ng-bind="label | translate"></span><ng-transclude></ng-transclude>'),$templateCache.put("sdk-utils/material-switch.tpl","<label class=material-switch ng-class=\"{ 'switch-on': model, 'switch-off': !model, dirty: dirty }\" ng-click=\"dirty = true\"><input class=default-input type=checkbox ng-model=model><ng-transclude></ng-transclude></label>"),$templateCache.put("sdk-utils/protip.tpl",'<div class=pro-tip><i class="ion-flash text-primary"></i> <strong translate>ProTip:</strong> <span ng-bind="config.tip | translate"></span> <a ng-if=::config.link dynamic-click=::config.link.action dynamic-href=::config.link.location ng-bind="config.link.text | translate"></a></div>'),$templateCache.put("sdk-utils/status-button.tpl",'<button class=status-button><i class=ion-load-a ng-show=isLoading></i> <i class=ion-checkmark-circled ng-show="!isLoading && success"></i> <i class=ion-alert-circled ng-show="!isLoading && error"></i><ng-transclude></ng-transclude></button>'),$templateCache.put("sdk-utils/tag-input.tpl",'<div class="tag-input clearfix"><ul class="list clearfix"><li class=tag ng-repeat="tag in tags track by $index">{{tag}} <i ng-click=deleteTag(tag) class="icon ion-android-close"></i></li><li><input name=fname placeholder="{{ \'Add tags\' | translate }}" ng-model=input ng-change=handleTextChange() ng-keypress="handleKeyPress($event)"></li></ul></div>'),$templateCache.put("sdk-utils/tag-select.tpl",'<div class="tag-select clearfix"><ul class="list clearfix"><li class=tag ng-repeat="tag in tags track by $index" ng-click=toggleSelection(tag) ng-class="{ \'selected\': isSelected(tag) }">{{tag}}</li></ul></div>'),$templateCache.put("sdk-utils/tooltip.tpl",'<span class=glossaryTip><sup ng-hide=::config.tooltip class="icon ion-help-circled text-gray-light"></sup> <span class=tipText ng-show=::config.tooltip ng-bind="config.tooltip | translate"></span> <span class=tip ng-class=::config.position><span class="tip-content radius shadow"><span ng-if=config.title class="tipTitle text-gd" ng-bind="config.title | translate"></span> <span class="tipBody text-reset" ng-bind="config.text | translate" ng-class="{ pt: !config.title, pb: !config.link }"></span> <a ng-if=::config.link class=link-reset ng-href="{{ ::config.link.location }}" ng-bind="config.link.title | translate"></a> <span class=tipArrow></span></span></span></span>')}]);
{
"name": "@enplug/dashboard-sdk-utils",
"version": "2.2.1",
"version": "2.2.2",
"license": "MIT",

@@ -12,2 +12,7 @@ "main": "dist/dashboard-sdk-utils.js",

},
"scripts": {
"i18n": "npm run i18n:extract && npm run i18n:compile",
"i18n:extract": "angular-gettext-cli --files \"./src/**/*.+(js|html)\" --dest ./src/i18n/extracted.pot",
"i18n:compile": "angular-gettext-cli --files \"./src/**/*.+(po)\" --dest ./src/i18n/translations.js --compile"
},
"dependencies": {

@@ -17,2 +22,4 @@ "lodash": "~3.10.0"

"devDependencies": {
"angular-gettext": "^2.3.8",
"angular-gettext-cli": "^1.0.7",
"autoprefixer-core": "^5.2.1",

@@ -27,8 +34,9 @@ "bower": "^1.3.12",

"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^0.13.0",
"grunt-contrib-uglify": "^0.9.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-ng-annotate": "^1.0.1",
"grunt-git": "^0.3.5",
"grunt-html2js": "^0.3.3",
"grunt-ng-annotate": "^1.0.1",
"grunt-postcss": "^0.5.5",

@@ -35,0 +43,0 @@ "grunt-prompt": "^1.3.0",

@@ -0,14 +1,19 @@

// Extracting Strings for Translating
var gettext = function(s) {
return s;
};
angular.module('enplug.sdk.utils').constant('months', [
{ name: 'January', short: 'Jan', code: '01' },
{ name: 'February', short: 'Feb', code: '02' },
{ name: 'March', short: 'Mar', code: '03' },
{ name: 'April', short: 'Apr', code: '04' },
{ name: 'May', short: 'May', code: '05' },
{ name: 'June', short: 'Jun', code: '06' },
{ name: 'July', short: 'Jul', code: '07' },
{ name: 'August', short: 'Aug', code: '08' },
{ name: 'September', short: 'Sep', code: '09' },
{ name: 'October', short: 'Oct', code: '10' },
{ name: 'November', short: 'Nov', code: '11' },
{ name: 'December', short: 'Dec', code: '12' }
{ name: gettext('January'), short: gettext('Jan'), code: '01' },
{ name: gettext('February'), short: gettext('Feb'), code: '02' },
{ name: gettext('March'), short: gettext('Mar'), code: '03' },
{ name: gettext('April'), short: gettext('Apr'), code: '04' },
{ name: gettext('May'), short: gettext('May'), code: '05' },
{ name: gettext('June'), short: gettext('Jun'), code: '06' },
{ name: gettext('July'), short: gettext('Jul'), code: '07' },
{ name: gettext('August'), short: gettext('Aug'), code: '08' },
{ name: gettext('September'), short: gettext('Sep'), code: '09' },
{ name: gettext('October'), short: gettext('Oct'), code: '10' },
{ name: gettext('November'), short: gettext('Nov'), code: '11' },
{ name: gettext('December'), short: gettext('Dec'), code: '12' }
]);

@@ -0,1 +1,6 @@

// Extracting Strings for Translating
var gettext = function(s) {
return s;
};
angular.module('enplug.sdk.utils').constant('quotes', {

@@ -8,285 +13,285 @@ random: function () {

{
text: "All great achievements require time.",
text: gettext("All great achievements require time."),
author: "Maya Angelou"
},
{
text: "You can't wait for inspiration. You have to go after it with a club.",
text: gettext("You can't wait for inspiration. You have to go after it with a club."),
author: "Jack London"
},
{
text: "The perfect is the enemy of the good.",
text: gettext("The perfect is the enemy of the good."),
author: "Voltaire"
},
{
text: "I play to win, whether during practice or a real game.",
text: gettext("I play to win, whether during practice or a real game."),
author: "Michael Jordan"
},
{
text: "Many of life's failures are people who did not realize how close they were to success when they gave up.",
text: gettext("Many of life's failures are people who did not realize how close they were to success when they gave up."),
author: "Thomas Edison"
},
{
text: "At the age of six I wanted to be a cook. At seven I wanted to be Napoleon. And my ambition has been growing steadily ever since.",
text: gettext("At the age of six I wanted to be a cook. At seven I wanted to be Napoleon. And my ambition has been growing steadily ever since."),
author: "Salvador Dali"
},
{
text: "Quality is more important than quantity. One home run is much better than two doubles.",
text: gettext("Quality is more important than quantity. One home run is much better than two doubles."),
author: "Steve Jobs"
},
{
text: "That's one small step for man, one giant leap for mankind.",
text: gettext("That's one small step for man, one giant leap for mankind."),
author: "Neil Armstrong"
},
{
text: "Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.",
text: gettext("Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep."),
author: "Scott Adams"
},
{
text: "Nothing will work unless you do.",
text: gettext("Nothing will work unless you do."),
author: "Maya Angelou"
},
{
text: "The best way out is always through.",
text: gettext("The best way out is always through."),
author: "Robert Frost"
},
{
text: "An ant on the move does more than a dozing ox.",
text: gettext("An ant on the move does more than a dozing ox."),
author: "Lao Tzu"
},
{
text: "Show me a thoroughly satisfied man and I will show you a failure.",
text: gettext("Show me a thoroughly satisfied man and I will show you a failure."),
author: "Thomas Edison"
},
{
text: "Our greatest glory is not in never failing, but in rising up every time we fail.",
text: gettext("Our greatest glory is not in never failing, but in rising up every time we fail."),
author: "Ralph Waldo Emerson"
},
{
text: "Every act of creation is first of all an act of destruction.",
text: gettext("Every act of creation is first of all an act of destruction."),
author: "Pablo Picasso"
},
{
text: "Fun is good.",
text: gettext("Fun is good."),
author: "Dr. Seuss"
},
{
text: "I steal from every movie ever made.",
text: gettext("I steal from every movie ever made."),
author: "Quentin Tarantino"
},
{
text: "It is the working man who is the happy man. It is the idle man who is the miserable man.",
text: gettext("It is the working man who is the happy man. It is the idle man who is the miserable man."),
author: "Ben Franklin"
},
{
text: "A person who never made a mistake never tried anything new.",
text: gettext("A person who never made a mistake never tried anything new."),
author: "Albert Einstein"
},
{
text: "To be idle is a short road to death and to be diligent is a way of life.",
text: gettext("To be idle is a short road to death and to be diligent is a way of life."),
author: "Buddha"
},
{
text: "The way to get started is to quit talking and begin doing.",
text: gettext("The way to get started is to quit talking and begin doing."),
author: "Walt Disney"
},
{
text: "For every dark night, there's a brigher day.",
text: gettext("For every dark night, there's a brigher day."),
author: "Tupac Shakur"
},
{
text: "If you love life, don't waste time, for time is what life is made up of.",
text: gettext("If you love life, don't waste time, for time is what life is made up of."),
author: "Bruce Lee"
},
{
text: "You can never quit. Winners never quit, and quitters never win.",
text: gettext("You can never quit. Winners never quit, and quitters never win."),
author: "Ted Turner"
},
{
text: "Work spares us from three evils: boredom, vice and need.",
text: gettext("Work spares us from three evils: boredom, vice and need."),
author: "Voltaire"
},
{
text: "Focus is a matter of deciding what things you're not going to do.",
text: gettext("Focus is a matter of deciding what things you're not going to do."),
author: "John Carmack"
},
{
text: "I play to win, whether during practice or a real game.",
text: gettext("I play to win, whether during practice or a real game."),
author: "Michael Jordan"
},
{
text: "HULK SMASH!",
text: gettext("HULK SMASH!"),
author: "The Incredible Hulk"
},
{
text: "The harder the conflict, the more glorious the triumph.",
text: gettext("The harder the conflict, the more glorious the triumph."),
author: "Thomas Paine"
},
{
text: "Everything comes to him who hustles while he waits.",
text: gettext("Everything comes to him who hustles while he waits."),
author: "Thomas Edison"
},
{
text: "You've got to jump off cliffs and build your wings on the way down.",
text: gettext("You've got to jump off cliffs and build your wings on the way down."),
author: "Ray Bradbury"
},
{
text: "Amateurs practice until they get it right. Professionals practice until they can't get it wrong.",
text: gettext("Amateurs practice until they get it right. Professionals practice until they can't get it wrong."),
author: "Unknown"
},
{
text: "Genius is one percent inspiration and ninety-nine percent perspiration.",
text: gettext("Genius is one percent inspiration and ninety-nine percent perspiration."),
author: "Thomas Edison"
},
{
text: "A lot of times, people don't know what they want until you show it to them.",
text: gettext("A lot of times, people don't know what they want until you show it to them."),
author: "Steve Jobs"
},
{
text: "I don't know where I'm going, but I'm on my way.",
text: gettext("I don't know where I'm going, but I'm on my way."),
author: "Carl Sagan"
},
{
text: "Lost time is never found again.",
text: gettext("Lost time is never found again."),
author: "Benjamin Franklin"
},
{
text: "Without pain, without sacrifice, we would have nothing.",
text: gettext("Without pain, without sacrifice, we would have nothing."),
author: "Tyler Durden"
},
{
text: "I pay no attention whatever to anybody's praise or blame. I simply follow my own feelings.",
text: gettext("I pay no attention whatever to anybody's praise or blame. I simply follow my own feelings."),
author: "Wolfgang Amadeus Mozart"
},
{
text: "You miss 100% of the shots you don't take.",
text: gettext("You miss 100% of the shots you don't take."),
author: "Wayne Gretzky"
},
{
text: "To have a great idea, have a lot of them.",
text: gettext("To have a great idea, have a lot of them."),
author: "Thomas Edison"
},
{
text: "The value of an idea lies in the using of it.",
text: gettext("The value of an idea lies in the using of it."),
author: "Thomas Edison"
},
{
text: "Simplify, simplify, simplify.",
text: gettext("Simplify, simplify, simplify."),
author: "Henry David Thoreau"
},
{
text: "There's a way to do it better - find it.",
text: gettext("There's a way to do it better - find it."),
author: "Thomas Edison"
},
{
text: "When it is obvious that the goals cannot be reached, don't adjust the goals, adjust the steps.",
text: gettext("When it is obvious that the goals cannot be reached, don't adjust the goals, adjust the steps."),
author: "Confucius"
},
{
text: "During your life, never stop dreaming. No one can take away your dreams.",
text: gettext("During your life, never stop dreaming. No one can take away your dreams."),
author: "Tupac Shakur"
},
{
text: "Things do not happen. Things are made to happen.",
text: gettext("Things do not happen. Things are made to happen."),
author: "John F. Kennedy"
},
{
text: "Ambition should be made of sterner stuff.",
text: gettext("Ambition should be made of sterner stuff."),
author: "William Shakespeare"
},
{
text: "If you spend too much time thinking about a thing, you'll never get it done.",
text: gettext("If you spend too much time thinking about a thing, you'll never get it done."),
author: "Bruce Lee"
},
{
text: "Success breeds success.",
text: gettext("Success breeds success."),
author: "Proverb"
},
{
text: "You are never too old to set another goal or to dream a new dream.",
text: gettext("You are never too old to set another goal or to dream a new dream."),
author: "C.S. Lewis"
},
{
text: "When you stop doing things for fun, you might as well be dead.",
text: gettext("When you stop doing things for fun, you might as well be dead."),
author: "Ernest Hemingway"
},
{
text: "There is no substitute for hard work.",
text: gettext("There is no substitute for hard work."),
author: "Thomas Edison"
},
{
text: "Live long and prosper.",
text: gettext("Live long and prosper."),
author: "Spock"
},
{
text: "I have not failed. I've just found 10,000 ways that won't work.",
text: gettext("I have not failed. I've just found 10,000 ways that won't work."),
author: "Thomas Edison"
},
{
text: "It's lack of faith that makes people afraid of meeting challenges, and I believed in myself.",
text: gettext("It's lack of faith that makes people afraid of meeting challenges, and I believed in myself."),
author: "Muhammad Ali"
},
{
text: "All our dreams can come true, if we have the courage to pursue them.",
text: gettext("All our dreams can come true, if we have the courage to pursue them."),
author: "Walt Disney"
},
{
text: "Make everything as simple as possible, but not simpler.",
text: gettext("Make everything as simple as possible, but not simpler."),
author: "Albert Einstein"
},
{
text: "Some people want it to happen, some wish it would happen, others make it happen.",
text: gettext("Some people want it to happen, some wish it would happen, others make it happen."),
author: "Michael Jordan"
},
{
text: "I've got a theory that if you give 100% all the time, somehow things will work out in the end.",
text: gettext("I've got a theory that if you give 100% all the time, somehow things will work out in the end."),
author: "Larry Bird"
},
{
text: "The problem with the future is that it keeps turning into the present.",
text: gettext("The problem with the future is that it keeps turning into the present."),
author: "Bill Watterson"
},
{
text: "May the Force be with you.",
text: gettext("May the Force be with you."),
author: "Han Solo"
},
{
text: "Victory belongs to the most persevering.",
text: gettext("Victory belongs to the most persevering."),
author: "Napoleon Bonaparte"
},
{
text: "I hated every minute of training, but I said, 'Dont quit. Suffer now and live the rest of your life as a champion'.",
text: gettext("I hated every minute of training, but I said, 'Dont quit. Suffer now and live the rest of your life as a champion'."),
author: "Muhammad Ali"
},
{
text: "Do things that have never been done before.",
text: gettext("Do things that have never been done before."),
author: "Russell Kirsch"
},
{
text: "I've failed over and over and over again in my life and that is why I succeed.",
text: gettext("I've failed over and over and over again in my life and that is why I succeed."),
author: "Michael Jordan"
},
{
text: "A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty.",
text: gettext("A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty."),
author: "Winston Churchill"
},
{
text: "He who hesitates is lost.",
text: gettext("He who hesitates is lost."),
author: "Proverb"
},
{
text: "Carpe diem, seize the day boys, make your lives extraordinary.",
text: gettext("Carpe diem, seize the day boys, make your lives extraordinary."),
author: "John Keating"
},
{
text: "Doing the best at this moment puts you in the best place for the next moment.",
text: gettext("Doing the best at this moment puts you in the best place for the next moment."),
author: "Oprah Winfrey"
},
{
text: "Luck is preparation meeting opportunity.",
text: gettext("Luck is preparation meeting opportunity."),
author: "Oprah Winfrey"
},
{
text: "I have no special talent. I am only passionately curious.",
text: gettext("I have no special talent. I am only passionately curious."),
author: "Albert Einstein"
}]
});

@@ -0,53 +1,58 @@

// Extracting Strings for Translating
var gettext = function(s) {
return s;
};
angular.module('enplug.sdk.utils').constant('states', [
{ name: 'Alabama', code: 'AL' },
{ name: 'Alaska', code: 'AK' },
{ name: 'Arizona', code: 'AZ' },
{ name: 'Arkansas', code: 'AR' },
{ name: 'California', code: 'CA' },
{ name: 'Colorado', code: 'CO' },
{ name: 'Connecticut', code: 'CT' },
{ name: 'Delaware', code: 'DE' },
{ name: 'District of Columbia', code: 'DC' },
{ name: 'Florida', code: 'FL' },
{ name: 'Georgia', code: 'GA' },
{ name: 'Hawaii', code: 'HI' },
{ name: 'Idaho', code: 'ID' },
{ name: 'Illinois', code: 'IL' },
{ name: 'Indiana', code: 'IN' },
{ name: 'Iowa', code: 'IA' },
{ name: 'Kansa', code: 'KS' },
{ name: 'Kentucky', code: 'KY' },
{ name: 'Lousiana', code: 'LA' },
{ name: 'Maine', code: 'ME' },
{ name: 'Maryland', code: 'MD' },
{ name: 'Massachusetts', code: 'MA' },
{ name: 'Michigan', code: 'MI' },
{ name: 'Minnesota', code: 'MN' },
{ name: 'Mississippi', code: 'MS' },
{ name: 'Missouri', code: 'MO' },
{ name: 'Montana', code: 'MT' },
{ name: 'Nebraska', code: 'NE' },
{ name: 'Nevada', code: 'NV' },
{ name: 'New Hampshire', code: 'NH' },
{ name: 'New Jersey', code: 'NJ' },
{ name: 'New Mexico', code: 'NM' },
{ name: 'New York', code: 'NY' },
{ name: 'North Carolina', code: 'NC' },
{ name: 'North Dakota', code: 'ND' },
{ name: 'Ohio', code: 'OH' },
{ name: 'Oklahoma', code: 'OK' },
{ name: 'Oregon', code: 'OR' },
{ name: 'Pennsylvania', code: 'PA' },
{ name: 'Rhode Island', code: 'RI' },
{ name: 'South Carolina', code: 'SC' },
{ name: 'South Dakota', code: 'SD' },
{ name: 'Tennessee', code: 'TN' },
{ name: 'Texas', code: 'TX' },
{ name: 'Utah', code: 'UT' },
{ name: 'Vermont', code: 'VT' },
{ name: 'Virginia', code: 'VA' },
{ name: 'Washington', code: 'WA' },
{ name: 'West Virginia', code: 'WV' },
{ name: 'Wisconsin', code: 'WI' },
{ name: 'Wyoming', code: 'WY' }
{ name: gettext('Alabama'), code: 'AL' },
{ name: gettext('Alaska'), code: 'AK' },
{ name: gettext('Arizona'), code: 'AZ' },
{ name: gettext('Arkansas'), code: 'AR' },
{ name: gettext('California'), code: 'CA' },
{ name: gettext('Colorado'), code: 'CO' },
{ name: gettext('Connecticut'), code: 'CT' },
{ name: gettext('Delaware'), code: 'DE' },
{ name: gettext('District of Columbia'), code: 'DC' },
{ name: gettext('Florida'), code: 'FL' },
{ name: gettext('Georgia'), code: 'GA' },
{ name: gettext('Hawaii'), code: 'HI' },
{ name: gettext('Idaho'), code: 'ID' },
{ name: gettext('Illinois'), code: 'IL' },
{ name: gettext('Indiana'), code: 'IN' },
{ name: gettext('Iowa'), code: 'IA' },
{ name: gettext('Kansa'), code: 'KS' },
{ name: gettext('Kentucky'), code: 'KY' },
{ name: gettext('Lousiana'), code: 'LA' },
{ name: gettext('Maine'), code: 'ME' },
{ name: gettext('Maryland'), code: 'MD' },
{ name: gettext('Massachusetts'), code: 'MA' },
{ name: gettext('Michigan'), code: 'MI' },
{ name: gettext('Minnesota'), code: 'MN' },
{ name: gettext('Mississippi'), code: 'MS' },
{ name: gettext('Missouri'), code: 'MO' },
{ name: gettext('Montana'), code: 'MT' },
{ name: gettext('Nebraska'), code: 'NE' },
{ name: gettext('Nevada'), code: 'NV' },
{ name: gettext('New Hampshire'), code: 'NH' },
{ name: gettext('New Jersey'), code: 'NJ' },
{ name: gettext('New Mexico'), code: 'NM' },
{ name: gettext('New York'), code: 'NY' },
{ name: gettext('North Carolina'), code: 'NC' },
{ name: gettext('North Dakota'), code: 'ND' },
{ name: gettext('Ohio'), code: 'OH' },
{ name: gettext('Oklahoma'), code: 'OK' },
{ name: gettext('Oregon'), code: 'OR' },
{ name: gettext('Pennsylvania'), code: 'PA' },
{ name: gettext('Rhode Island'), code: 'RI' },
{ name: gettext('South Carolina'), code: 'SC' },
{ name: gettext('South Dakota'), code: 'SD' },
{ name: gettext('Tennessee'), code: 'TN' },
{ name: gettext('Texas'), code: 'TX' },
{ name: gettext('Utah'), code: 'UT' },
{ name: gettext('Vermont'), code: 'VT' },
{ name: gettext('Virginia'), code: 'VA' },
{ name: gettext('Washington'), code: 'WA' },
{ name: gettext('West Virginia'), code: 'WV' },
{ name: gettext('Wisconsin'), code: 'WI' },
{ name: gettext('Wyoming'), code: 'WY' }
]);

@@ -10,7 +10,7 @@ /**

return {
restrict: 'E',
replace: true,
scope: {

@@ -22,3 +22,3 @@ count: '=',

},
templateUrl: 'sdk-utils/display-counter.tpl',

@@ -25,0 +25,0 @@

@@ -16,4 +16,4 @@ /**

*/
angular.module('enplug.sdk.utils').directive('materialInput', ['$log', '$compile', '$parse', '$document', 'GUID',
function ($log, $compile, $parse, $document, GUID) {
angular.module('enplug.sdk.utils').directive('materialInput', ['$log', '$compile', '$parse', '$document', 'GUID', 'gettext',
function ($log, $compile, $parse, $document, GUID, gettextCatalog) {
'use strict';

@@ -40,2 +40,3 @@

$element.removeAttr('label');
$element.removeAttr('label');
input.setAttribute('name', id);

@@ -42,0 +43,0 @@

@@ -1,5 +0,10 @@

angular.module('enplug.sdk.utils', ['enplug.sdk.utils.templates']);
angular.module('enplug.sdk.utils', ['enplug.sdk.utils.templates', 'gettext']);
angular.module('enplug.sdk.utils').run(function ($templateCache) {
angular.module('enplug.sdk.utils').run(function ($rootScope, $templateCache, gettextCatalog) {
// gettextCatalog.setCurrentLanguage(navigator.browserLanguage || navigator.language);
// gettextCatalog.debug = false;
// Ng class that fixes broken formatting on default text. If currentLanguage different than default, value is set to false.
// Update default pagination template for Smart Table to use our directive and icons

@@ -13,2 +18,3 @@ $templateCache.put('template/smart-table/pagination.html',

'</ul></div>');
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc