locastyle 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/locastyle/version.rb +1 -1
- data/vendor/assets/javascripts/locastyle.js +3 -3
- data/vendor/assets/stylesheets/locastyle.css +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a77d517ca105b0108f64e9b9bf18cf4abea7cc9
|
4
|
+
data.tar.gz: 2b2c4a8bb4ea586f85b19805555181cb57b74aa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23d92fbc13f1c7a8d3bc988147e2138183ef55cb11f30ed941fd93d7607b54d033193a8ee3976c5be00d959e8f5845e2ca11f7ff420434d01fedda753caf66d1
|
7
|
+
data.tar.gz: 5801403fd2b6b96f3626d6a597575618df9b485df901028d9a85496d15a5b498e3810118e96b77799266ddc362e517ce46d7707a855cfc51565c99cd7d1cd83d
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Locastyle
|
2
2
|
|
3
|
-
This gem provides the front-end framework [Locastyle](https://github.com/locaweb/locawebstyle), at version **3.8.
|
3
|
+
This gem provides the front-end framework [Locastyle](https://github.com/locaweb/locawebstyle), at version **3.8.3**, for your ruby application.
|
4
4
|
|
5
5
|
## Dependencies
|
6
6
|
|
data/lib/locastyle/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Locastyle version: 3.8.
|
1
|
+
/*! Locastyle version: 3.8.3*/ /**
|
2
2
|
*
|
3
3
|
* Copyright 2013 LinkedIn Corp. All rights reserved.
|
4
4
|
|
@@ -69,5 +69,5 @@ function(t,e){"use strict";var n;if("object"==typeof exports){try{n=require("mom
|
|
69
69
|
*
|
70
70
|
* Copyright © 2013 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
|
71
71
|
*/
|
72
|
-
function(t,e){"use strict";"object"==typeof exports?e(require("jquery"),require("../pikaday")):"function"==typeof define&&define.amd?define(["jquery","pikaday"],e):e(t.jQuery,t.Pikaday)}(this,function(t,e){"use strict";t.fn.pikaday=function(){var n=arguments;return n&&n.length||(n=[{}]),this.each(function(){var a=t(this),s=a.data("pikaday");if(s instanceof e)"string"==typeof n[0]&&"function"==typeof s[n[0]]&&s[n[0]].apply(s,Array.prototype.slice.call(n,1));else if("object"==typeof n[0]){var i=t.extend({},n[0]);i.field=a[0],a.data("pikaday",new e(i))}})}}),function(){this.JST||(this.JST={}),this.JST["locastyle/templates/_popover"]=function(t){t||(t={});var e,n=[],a=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?i(t):""},s=t.safe,i=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},i||(i=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){n.push('<div id="ls-popover-'),n.push(a(this.index)),n.push('" class="ls-popover ls-popover-'),n.push(a(this.placement||"top")),n.push(" "),n.push(a(this.customClasses)),n.push('">\n '),this.title&&(n.push('\n <div class="ls-popover-header">\n <h3 class="title-3"> '),n.push(a(this.title)),n.push(" </h3>\n </div>\n ")),n.push("\n "),this.content&&n.push("\n "),n.push('\n <div class="ls-popover-content"> '),n.push(this.content),n.push(" </div>\n</div>\n")}).call(this)}.call(t),t.safe=s,t.escape=i,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST["locastyle/templates/_modal"]=function(t){t||(t={});var e,n=[],a=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?i(t):""},s=t.safe,i=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},i||(i=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){n.push('<div class="ls-modal ls-modal-template '),n.push(a(this.lsModule)),n.push('" tabindex="-1" aria-labelledby="lsModal" role="dialog">\n '),"link"!==this.actionType?(n.push('\n <form action="'),n.push(a(this.action)),n.push('" class="ls-modal-box ls-form" method="post">\n ')):n.push('\n <div class="ls-modal-box">\n '),n.push('\n <div class="ls-modal-header">\n <button type="button" data-dismiss="modal" class="close">×</button>\n <h4 class="ls-modal-title" id="lsModal">'),n.push(a(this.title)),n.push('</h4>\n </div>\n <div class="ls-modal-body">\n <p>'),n.push(this.content),n.push('</p>\n </div>\n <div class="ls-modal-footer">\n <button type="button" class="ls-btn ls-float-right" data-dismiss="modal">\n '),n.push(a(this.close)),n.push("\n </button>\n "),"link"!==this.actionType?(n.push("\n <button "),n.push(a(this.customAttrs)),n.push(' type="submit" class=" ls-btn '),n.push(a(this["class"])),n.push('">'),n.push(a(this.save)),n.push("</button>\n ")):(n.push('\n <a href="'),n.push(a(this.action)),n.push('" '),n.push(a(this.customAttrs)),n.push(' class=" ls-btn '),n.push(a(this["class"])),n.push('">'),n.push(a(this.save)),n.push("</a>\n ")),n.push("\n </div>\n "),"link"!==this.actionType?n.push("\n </form>\n "):n.push("\n </div>\n "),n.push("\n</div>\n")}).call(this)}.call(t),t.safe=s,t.escape=i,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST["locastyle/templates/_dropdown"]=function(t){t||(t={});var e,n=[],a=t.safe,s=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},s||(s=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var t,e,a,s;for(n.push('<div data-ls-module="dropdown" class="ls-dropdown">\n <a href="#" class="ls-btn"></a>\n <ul class="ls-dropdown-nav">\n '),s=this.elements,e=0,a=s.length;a>e;e++)t=s[e],n.push("\n "),""!==t.text&&(n.push("\n <li>"),n.push(t.outerHTML),n.push("</li>\n ")),n.push("\n ");n.push("\n </ul>\n</div>\n")}).call(this)}.call(t),t.safe=a,t.escape=s,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST["locastyle/templates/_browser-unsupported-bar"]=function(t){t||(t={});var e,n=[],a=t.safe,s=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},s||(s=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){n.push('<div class="ls-unsupported-bar ls-alert-blocker ls-alert-warning ls-alert-fixed-top">\n <span class="ls-dismiss" data-ls-module="dismiss">×</span>\n <strong>Atualize seu navegador!</strong><br>Baixe a vers\xe3o mais recente:<br>\n <a href="//www.mozilla.org/en-US/firefox" target="_blank">Firefox</a>, <a href="//www.google.com/intl/en-BR/chrome/browser/" target="_blank">Chrome</a>,\n <a href="//windows.microsoft.com/en-us/internet-explorer/download-ie" class="hidden-sm hidden-xs" target="_blank">Internet Explorer</a> ou\n <a href="//www.apple.com/safari/" target="_blank">Safari</a>\n</div>\n')}).call(this)}.call(t),t.safe=a,t.escape=s,n.join("")}}.call(this);var locastyle=function(){"use strict";function t(){locastyle.sidebarToggle.init(),locastyle.sidebars.init()}function e(){locastyle.breakpoints.init(),n(),locastyle.general.init(),locastyle.btnGroup.init(),locastyle.alert.init(),locastyle.datepicker.init(),locastyle.form.togglePasswordField(),locastyle.form.triggerCalendar(),a(),locastyle.browserDetect.init()}function n(){var t=s();for(var e in t)t.hasOwnProperty(e)&&(locastyle[t[e]].init(),console.info("Locastyle: module ["+t[e]+"] successfully initialized."),$.event.trigger(t[e]+":ready"))}function a(){$("html").hasClass("ls-trackevent-on")&&locastyle.trackEvents.init()}function s(){var t=[];return $("[data-ls-module]").each(function(){var e=$(this).data("ls-module");-1===t.indexOf(e)&&t.push(e)}),t}return{init:e,fastInit:t}}(),ls=locastyle;$(window).load(function(){"use strict";ls.init()}),$(document).ready(function(){"use strict";ls.fastInit()});var locastyle=locastyle||{};locastyle.breakpoints=function(){"use strict";function t(t){s.html=$("html"),e(t),n(t),a()}function e(t){var e;e=t?t.documentWidth:$(document).width(),e<s.sm?(s.html.addClass("ls-window-xs"),locastyle.breakpointClass="ls-window-xs"):e>=s.sm&&e<s.md?(s.html.addClass("ls-window-sm").removeClass("ls-sidebar-visible ls-notifications-visible "),locastyle.breakpointClass="ls-window-sm"):e>=s.md&&e<s.lg?(s.html.addClass("ls-window-md").removeClass("ls-sidebar-visible ls-notifications-visible "),locastyle.breakpointClass="ls-window-md"):(s.html.addClass("ls-window-lg").removeClass("ls-sidebar-visible ls-notifications-visible "),locastyle.breakpointClass="ls-window-lg")}function n(t){var e;e=t?t.documentWidth:screen.width,e<s.sm?(s.html.addClass("ls-screen-xs"),locastyle.breakpointScreenClass="ls-screen-xs"):e>=s.sm&&e<s.md?(s.html.addClass("ls-screen-sm"),locastyle.breakpointScreenClass="ls-screen-sm"):e>=s.md&&e<s.lg?(s.html.addClass("ls-screen-md"),locastyle.breakpointScreenClass="ls-screen-md"):(s.html.addClass("ls-screen-lg"),locastyle.breakpointScreenClass="ls-screen-lg")}function a(){var t;$(window).resize(function(){clearTimeout(t),t=setTimeout(function(){var t=s.html.attr("class").replace(/(^|\s)(ls-window-\S+)|(ls-screen-\S+)/g,"");s.html.attr("class",$.trim(t)),e(),n(),$.event.trigger("breakpoint-updated")},300)})}var s={sm:"768",md:"992",lg:"1200",html:null};return{init:t}}();var locastyle=locastyle||{};locastyle.sidebars=function(){"use strict";function t(){m(),o(),e(),n(),i(),r(),l(),d(),h(),f(),p(),g()}function e(){$(".ls-show-sidebar").on("touchstart.ls click.ls",function(t){t.preventDefault(),a()})}function n(){$(".ls-show-notifications").on("touchstart.ls click.ls",function(t){t.preventDefault(),s()})}function a(){$("html").toggleClass("ls-sidebar-visible")}function s(){$("html").toggleClass("ls-notifications-visible")}function i(){1===$(".ls-sidebar .ls-area-account").length&&$(".ls-sidebar").addClass("ls-area-account-active")}function o(){1===$(".ls-notification").length&&0===$(".ls-show-notifications").length&&$(".ls-topbar").append('<span class="ls-show-notifications ls-ico-question"/>')}function r(){var t=$(".ls-menu").find("ul li ul");$(t).each(function(){$(this).addClass("ls-submenu"),$(this).parent("li").addClass("ls-submenu-parent"),$(this).find("a").addClass("ls-submenu-item")})}function l(){$(".ls-submenu-parent").on("click","> a",function(t){t.preventDefault(),$(this).parents(".ls-submenu-parent").hasClass("ls-active")?u($(this)):c($(this))})}function c(t){var e=$(t).parents(".ls-submenu-parent");$(".ls-submenu-parent").removeClass("ls-active"),e.addClass("ls-active"),g(e)}function u(t){var e=$(t).parents(".ls-submenu-parent");e.removeClass("ls-active"),g(e)}function d(){$(".ls-sidebar-toggled").length||$(".ls-submenu li.ls-active").each(function(){c($(this))})}function h(){$(window).on("sidebar-minimize",function(){$(".ls-submenu li").each(function(){u($(this))})}),$(window).on("sidebar-maximize",function(){$(".ls-submenu li.ls-active").each(function(){c($(this))})})}function f(){$(document).on("click",function(t){var e=$(t.target);$(".ls-sidebar-toggled").length&&$(".ls-submenu-parent.ls-active").length&&(e.is(".ls-submenu-parent.ls-active *")||u($(".ls-submenu-parent.ls-active > a")))})}function p(){var t=$(".ls-menu");t.attr({role:"navigation"}),t.find("ul").attr({role:"menu"}),t.find("a").attr({role:"menuitem"}),$(".ls-submenu-parent").each(function(t,e){g(e)})}function g(t){$(t).hasClass("ls-active")?$(t).attr({"aria-expanded":"true","aria-hidden":"false"}):$(t).attr({"aria-expanded":"false","aria-hidden":"true"})}function m(){$(".ls-show-sidebar").off("touchstart.ls click.ls"),$(".ls-show-notifications").off("touchstart.ls click.ls"),$(".ls-submenu-parent > a").off("click.ls")}return{init:t,unbind:m}}();var locastyle=locastyle||{};locastyle.sidebarToggle=function(){"use strict";function t(){r(),n(),e(),a(),n(),o()}function e(){$(".ls-sidebar").length&&$(".ls-sidebar").append('<span class="ls-sidebar-toggle ls-ico-shaft-left"></span>')}function n(){var t=localStorage.getItem("stateSidebar");t||$("html").hasClass("ls-sidebar-toggled")?s():i()}function a(){$(".ls-sidebar-toggle").on("click",function(){$("html").hasClass("ls-sidebar-toggled")?i():s()})}function s(){$("html").addClass("ls-sidebar-toggled"),$(".ls-sidebar-toggle").addClass("ls-active"),localStorage.setItem("stateSidebar","minimized"),$.event.trigger("sidebar-minimize")}function i(){$("html").removeClass("ls-sidebar-toggled"),$(".ls-sidebar-toggle").removeClass("ls-active"),localStorage.removeItem("stateSidebar"),$.event.trigger("sidebar-maximize")}function o(){$(window).on("breakpoint-updated",function(){$(".ls-window-xs").length&&i()})}function r(){$(".ls-sidebar-toggle").off("click")}return{init:t}}();var locastyle=locastyle||{};locastyle.collapse=function(){"use strict";function t(){$(i.classes.header).each(function(){s($(this))}),e()}function e(){$(i.trigger).each(function(t,e){$(e).hasClass(i.classes.alwaysOpened)||($(e).on("click.ls",function(){n($(this));var t=$(this).data("target");s($(this)),a($(this),t)}),$(i.classes.content).on("click.ls",function(t){t.stopPropagation()}))})}function n(t){var e=t.parents(i.classes.groupContainer);e[0]&&e.find(i.trigger).not(t).removeClass(i.classes.opened).find(i.classes.content).slideUp()}function a(t,e){$(e).parent().hasClass(i.classes.opened)?($(e).parent().removeClass(i.classes.opened),t.trigger("collapse:closed")):($(e).parent().addClass(i.classes.opened),t.trigger("collapse:opened"))}function s(t){$(t).hasClass(i.classes.open)?($(i.classes.header).attr({"aria-expanded":!0}),$(i.classes.content).attr({"aria-hidden":!1})):($(i.classes.header).attr({"aria-expanded":!1}),$(i.classes.content).attr({"aria-hidden":!0}))}var i={trigger:'[data-ls-module="collapse"]',classes:{header:".ls-collapse-header",content:".ls-collapse-body",groupContainer:".ls-collapse-group",open:"ls-collapse-open",close:"ls-collapse-close",opened:"ls-collapse-opened",alwaysOpened:"ls-collapse-opened-always"}};return{init:t}}();var locastyle=locastyle||{};locastyle.modal=function(){"use strict";function t(){n(),a()}function e(){$(document).off("keyup.ls-esc"),$(c.close.classes+", "+c.close.trigger).off("click.ls")}function n(){$(c.open.trigger).off("click.ls"),e()}function a(){$(c.open.trigger).on("click.ls",function(){locastyle.modal.open($(this))}),$(".ls-opened").length>0&&r("#"+$(".ls-opened").attr("id"))}function s(){$(document).one("keyup.ls-esc",function(t){27===t.keyCode&&$(".ls-opened")&&locastyle.modal.close()}),$(c.close.classes+", "+c.close.trigger).on("click.ls",function(t){return t.target!==t.currentTarget?!0:void locastyle.modal.close()})}function i(t){var e=null;$("body").addClass(c.classes.open),$(t).data("target")||"object"!=typeof t?e=$(t).data("target")?$(t.data("target")):$(t):(e=$(locastyle.templates.modal(t.data())),$("body").append(e),$(".ls-modal-template").focus(),s()),e.addClass("ls-opened"),e.trigger(c.open.triggerOpened,t),l(t),r(t)}function o(){var t=$(".ls-modal.ls-opened");$("body").removeClass(c.classes.open),t.attr("aria-hidden",!0),t.removeClass("ls-opened"),e(),t.trigger(c.close.triggerClosed),t.hasClass("ls-modal-template")&&t.remove()}function r(t){var e=$(t).data("target")?$(t.data("target")):$(t);e.each(function(t,e){void 0!==$(e).data("modal-blocked")?$('[data-dismiss="modal"]').remove():s()})}function l(t){var e=$(t).data("target")?$(t.data("target")):$(t),n=e.find(".ls-modal-title").attr("id")||"lsModal"+c.lsModal++;e.find(".ls-modal-title").attr("id",n),e.attr({role:"dialog","aria-hidden":!1,"aria-labelledby":n,tabindex:"-1"}).focus()}var c={open:{trigger:'[data-ls-module="modal"]',triggerOpened:"modal:opened"},close:{classes:".ls-modal",trigger:'[data-dismiss="modal"]',triggerClosed:"modal:closed"},classes:{open:"ls-overflow-hidden"},lsModal:0};return{init:t,open:i,close:o,unbind:n}}();var locastyle=locastyle||{};locastyle.alert=function(){"use strict";function t(){e()}function e(){$('[class*="ls-alert"]').attr({role:"alert"})}return{init:t}}();var locastyle=locastyle||{};locastyle.dismiss=function(){"use strict";function t(){e(),n()}function e(){$(i.trigger).off("click.ls")}function n(){$(i.trigger).on("click.ls",function(){a(this),locastyle.topbarCurtain.updateStatusCounter()})}function a(t){var e=$(t).parents(".ls-dismissable");$(t).data("target")&&(e=$(t).data("target")),s(e)}function s(t){$(t).addClass("ls-dismissed"),$(t).trigger(i.triggerClose)}var i={trigger:"[data-ls-module=dismiss]",triggerClose:"dismiss:close"};return{init:t,unbind:e}}();var locastyle=locastyle||{};locastyle.popover=function(){"use strict";function t(){r(),e(),l()}function e(){$(c.module).each(function(t,e){var o="hover"===$(e).attr("data-trigger")?"mouseover":c.trigger;$(e).attr("data-target",c.idPopover+t);var l=$(e).data("target");$(e).on(o,function(u){u.preventDefault(),u.stopPropagation(),$(l).hasClass("ls-active")?i(l):($(c.idPopover+t).length||n(t,e),s(l),r(l)),"mouseover"===o&&$(e).on("mouseout",function(){i(l)}),a(e)}),$(window).on("breakpoint-updated",function(){a(e)})})}function n(t,e){var n={index:t,title:$(e).data("title"),content:$(e).data("content"),placement:$(e).data("placement"),customClasses:$(e).data("custom-class")};$("body").append(locastyle.templates.popover(n))}function a(t){var e={target:$(t).data("target"),top:$(t).offset().top,left:$(t).offset().left,width:$(t).outerWidth(),height:$(t).outerHeight(),placement:$(t).data("placement")};switch(e.placement){case"right":$(e.target).css({top:e.top+=e.height/2-2,left:e.left+=e.width+12});break;case"bottom":$(e.target).css({top:e.top+=e.height+12,left:e.left+=e.width/2+4});break;case"left":$(e.target).css({top:e.top+=e.height/2-2,left:e.left-=12});break;default:case"top":$(e.target).css({top:e.top-=12,left:e.left+=e.width/2+4})}}function s(t){$(t).addClass("ls-active"),$(t).off(c.events.closed).trigger(c.events.opened)}function i(t){$(t||".ls-popover.ls-active").removeClass("ls-active"),$(t).trigger(c.events.closed).off(c.events.opened),$(".ls-popover.ls-active").length||$(document).off(c.events.clickAnywhere)}function o(){$(c.popoverClass).remove(),$.each(c.events,function(t,e){$(document).unbind(e)}),$(document).trigger(c.events.destroyed)}function r(t){$(document).on(c.events.clickAnywhere,function(e){$(e.target).parents(".ls-popover").length||i(t)})}function l(){$(c.module+'[data-ls-popover="open"]').each(function(){s($(this).data("target"))})}var c={module:'[data-ls-module="popover"]',idPopover:"#ls-popover-",popoverClass:".ls-popover",trigger:"click",events:{clickAnywhere:"click.clickanywhere",opened:"popover:opened",closed:"popover:closed",destroyed:"popover:destroyed"}};return{init:t,show:s,hide:i,destroy:o}}();var locastyle=locastyle||{};locastyle.dropdown=function(){"use strict";function t(){e(),n(),a(),l(c.dropdown)}function e(){$(c.firstLink).off("click.ls"),$(c.area).off("click.ls")}function n(){$(c.firstLink).on("click.ls",function(t){t.preventDefault();var e=$($(this).parents(c.module));locastyle.dropdown.toggleDropdown(e),r(e),t.stopPropagation()})}function a(){$(c.area).on("click.ls",function(){locastyle.dropdown.closeDropdown(),l(c.dropdown)})}function s(t){t.find(c.button).first().hasClass("ls-disabled")||(o(t),t.toggleClass("ls-active"),l(t),locastyle.topbarCurtain.hideCurtains(),i(t))}function i(t){$(t).hasClass("ls-active")?$(t).trigger("dropdown:opened"):$(t).trigger("dropdown:closed")}function o(t){$(c.module).not(t).removeClass("ls-active")}function r(t){var e=$(c.area);e.get(0).scrollWidth>e.width()&&$(t).addClass("ls-pos-right")}function l(t){$(c.button).attr({"aria-expanded":"false"}),$(c.nav).attr({"aria-hidden":"true"}),$(t).each(function(){$(c.nav).find("a").attr({role:"option"}),$(c.button,$(this)).attr({role:"combobox"}),$(this).hasClass("ls-active")?($(c.button,$(this)).attr({"aria-expanded":"true"}),$(c.nav,$(this)).attr({"aria-hidden":"false"})):($(c.button,$(this)).attr({"aria-expanded":"false"}),$(c.nav,$(this)).attr({"aria-hidden":"true"}))})}var c={area:"body",dropdown:".ls-dropdown",module:'[data-ls-module="dropdown"]',button:'[class*="ls-btn"]',firstLink:'[data-ls-module="dropdown"] > [class*="ls-btn"]:first-child, .ls-dropdown.ls-user-account > a:first-child',nav:".ls-dropdown-nav"};return{init:t,unbind:e,toggleDropdown:s,closeDropdown:o}}();var locastyle=locastyle||{};locastyle.tabs=function(){"use strict";function t(){c(),e(),n(),s(),u()}function e(){$('[data-ls-module="tabs"]').on("click.ls",function(t){t.preventDefault();var e=$($(this).attr("href")||$(this).data("target")),n=$(this).closest(".ls-tabs-nav");l(this,e),r(this,e),a(n)&&i(n)})}function n(){$(window).on("breakpoint-updated",function(){locastyle.tabs.checkBreakpoint()})}function a(t){return $(t).hasClass("in-dropdown")}function s(){("ls-window-sm"===locastyle.breakpointClass||"ls-window-xs"===locastyle.breakpointClass)&&$(".ls-tabs-nav").each(function(t,e){a(e)||o(e)})}function i(t){t.closest(".ls-dropdown-tabs").find("> a").text(t.find("li.ls-active > a").text())}function o(t){var e=$(t);e.addClass("in-dropdown ls-dropdown-nav").wrap('<div data-ls-module="dropdown" class="ls-dropdown-tabs">'),e.find(".ls-dropdown-nav").each(function(){e.append($(this).html()),$(this).closest("li").remove()}),e.parent(".ls-dropdown-tabs").prepend('<a data-ls-module="tabs" class="ls-btn">'+e.find("li.ls-active > a").text()+"</a>"),locastyle.tabs.init(),locastyle.dropdown.init()}function r(t,e){$(t).parents("li").addClass("ls-active"),$(t).trigger("tab:activated"),e.addClass("ls-active"),$(t).attr("aria-selected",!0)}function l(t,e){$(t).parents("li").siblings().removeClass("ls-active"),$(t).trigger("tab:deactivated"),e.siblings().removeClass("ls-active"),$(t).parents("li").siblings().find("a").attr("aria-selected",!1)}function c(){$("[data-ls-module=tabs]").off("click.ls")}function u(){$(d.tab).attr("role","tablist"),$(d.tabLink).attr("role","tab"),$(d.tabListActive).attr("aria-selected","true"),$(d.tabContent).attr("role","tabpanel")}var d={tab:".ls-tabs-nav",tabLink:".ls-tabs-nav a",tabListActive:".ls-tabs-nav li.ls-active a",tabContent:".ls-tab-content"};return{init:t,unbind:c,checkBreakpoint:s}}();var locastyle=locastyle||{};locastyle.templates=function(){"use strict";function t(){}function e(t){return JST[i+"popover"](t)}function n(t){return JST[i+"modal"](t)}function a(t){return JST[i+"dropdown"]({elements:t})}function s(){return JST[i+"browser-unsupported-bar"]()}var i="locastyle/templates/_";return{init:t,popover:e,modal:n,dropdown:a,browserUnsupportedBar:s}}();var locastyle=locastyle||{};locastyle.general=function(){"use strict";function t(){c(),n(),e(),o(),r(),l(),a()}function e(){$.each(u,function(t,e){var n=t.split("|");$(n[0]).off(n[1],n[2]),$(n[0]).on(n[1],n[2],function(t){var n=$(this);e(t,n)})})}function n(){var t=window.location.hash.replace("!/#","");""!==t&&$('[data-target="'+t+'"], a[href="'+t+'"]').trigger("click")}function a(){$("[data-ls-fields-enable]").on("click.ls",function(t){t.preventDefault();var e=$(this),n=$(e.data("ls-fields-enable")),a=n.data("form-text")?"ls-form-text":"";n.toggleClass("ls-form-disable ls-active "+a).find(":input").each(function(t,e){var n=$(e);n.toggleAttr("disabled").toggleClass(a).val(n.data("original-value"))})})}function s(t,e){var n=e.data("target")?$(e.data("target")):e,a=e.data("toggle-class");/(radio)|(checkbox)/.test(e.attr("type"))?(n.toggleClass(a,!e.prop("checked")),$('[name="'+e.attr("name")+'"]').not(e).each(function(){var t=$(this),n=t.data("target")?$(t.data("target")):t,a=t.data("toggle-class");n.toggleClass(a,e.prop("checked"))})):(t.preventDefault(),n.toggleClass(a))}function i(t,e){t.preventDefault();var n=$(e.attr("href"));n[0]&&$("html,body").animate({scrollTop:n.offset().top-70},1e3)}function o(){$(".ls-disabled, [disabled='disabled']").on("click",function(t){return $(this).hasClass("ls-disabled")||"disabled"===$(this).attr("disabled")?(t.stopImmediatePropagation(),t.preventDefault(),t.stopPropagation(),!1):void 0})}function r(t){$("a",t).on("click.lsPreventDefault",function(t){(""===$(this).attr("href")||"#"===$(this).attr("href"))&&t.preventDefault()})}function l(){$(".ls-group-active [class*='ls-btn']").on("click",function(){$(this).siblings().removeClass("ls-active"),$(this).addClass("ls-active")})}function c(){$("[data-ls-fields-enable]").off("click.ls"),$(".ls-disabled, [disabled='disabled']").off("click")}var u={"[data-toggle-class]|click":s,".ls-link-smooth|click":i};return jQuery.fn.toggleAttr=function(t){return this.each(function(){var e=$(this);return e.attr(t)?e.removeAttr(t):e.attr(t,t)})},{init:t}}();var locastyle=locastyle||{};locastyle.progressBar=function(){"use strict";function t(){e()}function e(){$("[data-ls-module='progressBar']").each(function(t,e){var a=$(e).attr("aria-valuenow");$(e).append("<span aria-valuenow='"+a+"%'>");var s=$(e).find("span");n(s,a)})}function n(t,e){$(t).css("width",e+"%")}return{init:t}}();var locastyle=locastyle||{};locastyle.form=function(){"use strict";function t(){i(),o(),s(),n(),e(),c(),a(),l()}function e(){"ls-window-xs"===locastyle.breakpointClass?($(".ls-label-text-sufix").parents(".ls-label").addClass("ls-label-text-has-sufix"),$(".ls-label-text-prefix").parents(".ls-label").addClass("ls-label-text-has-prefix")):$(".ls-label-text-sufix").prev('[class*="col-"]').addClass("ls-no-padding-right").find(":input").addClass("ls-no-right-radius ls-border")}function n(){$("textarea.ls-textarea-autoresize",".ls-label").each(function(t,e){var n=$(e);n.keyup(function(){if(!n.prop("scrollTop")){var t;do{t=n.prop("scrollHeight");var e=n.height();n.height(e-5)}while(t&&t!==n.prop("scrollHeight"))}n.height(n.prop("scrollHeight"))})})}function a(){$("textarea").each(function(t,e){var n=$(e).val(),a=n.split(/\r|\r\n|\n/),s=a.length,i=18*s;$(e).height(i+"px")})}function s(){$(".ls-mask-date").mask("00/00/0000"),$(".ls-mask-time").mask("00:00:00"),$(".ls-mask-date_time").mask("00/00/0000 00:00:00"),$(".ls-mask-cep").mask("00000-000"),$(".ls-mask-phone8").mask("0000-0000"),$(".ls-mask-phone9").mask("00009-0000"),$(".ls-mask-phone8_with_ddd").mask("(00) 0000-0000"),$(".ls-mask-phone9_with_ddd").mask("(00) 00009-0000"),$(".ls-mask-cpf").mask("000.000.000-00",{reverse:!0}),$(".ls-mask-cnpj").mask("00.000.000/0000-00",{reverse:!0}),$(".ls-mask-money").mask("#.##0,00",{reverse:!0,maxlength:!1}),$(".ls-mask-number").mask("#.##0",{reverse:!0,maxlength:!1}),$(".ls-mask-ip_address").mask("0ZZ.0ZZ.0ZZ.0ZZ",{translation:{Z:{pattern:/[0-9]/,optional:!0}}}),$(".ls-mask-percent").mask("##0,00%",{reverse:!0})}function i(){$(u.selectors.disable).each(function(t,e){var n=$(e);n.find(":input").each(function(t,e){var n=$(e);n.attr("disabled","disabled"),n.data("original-value",n.val())})})}function o(){$(u.selectors.text).each(function(t,e){$(e).find(":input").each(function(t,e){$(e).addClass("ls-form-text")}),$(e).data("form-text",!0)})}function r(t){if(void 0!==$(t).data("toggle-class")){var e=$(t).data("toggle-class").split(",");$(t).toggleClass(e[0]).toggleClass(e[1])}}function l(){$("[data-trigger-calendar]").on("click.ls",function(t){var e=$(this).data("trigger-calendar");$(e).trigger("click.ls")})}function c(){$(".ls-toggle-pass").on("click",function(t){t.preventDefault();var e=$(this).data("target");r($(this)),"password"===$(e).attr("type")?$(e).removeAttr("attr").prop("type","text"):$(e).removeAttr("attr").prop("type","password")})}var u={selectors:{disable:".ls-form-disable",text:".ls-form-text"}};return{init:t,togglePasswordField:c,triggerCalendar:l}}();var locastyle=locastyle||{};locastyle.guidedTour=function(){"use strict";function t(t){e(t)}function e(t){t&&t.selectors&&hopscotch&&($.each(l.selectors,function(e){t.selectors[e]=t.selectors[e]||l.selectors[e]}),n(t),o())}function n(t){r=t,$(l.selectors.init).on({click:s})}function a(t){return $(l.selectors.tour).trigger("click"),$(l.selectors.init).focus().attr("tabindex","-1"),t?t.preventDefault():null}function s(){locastyle.topbarCurtain.hideCurtains(),hopscotch.endTour(),hopscotch.startTour(r,0),i()}function i(){var t=39,e=37,n=27,a=hopscotch.getCurrTour().steps.length;$("body").off("keyup").on("keyup",function(s){var i=s.keyCode;hopscotch.getCurrStepNum()<a&&hopscotch.getState()&&(i===t&&hopscotch.nextStep(),i===e&&hopscotch.prevStep()),i===n&&hopscotch.endTour()})}function o(){"true"!==$.cookie("cookie_tour")&&($(l.selectors.tour).trigger("click"),$(l.selectors.init).focus().attr("tabindex","-1"),$.cookie("cookie_tour","true"))}var r,l={selectors:{init:".ls-btn-tour",tour:".ls-alerts-list .ls-ico-question"}};return{init:t,openWelcomeTour:a}}();var locastyle=locastyle||{};locastyle.topbarCurtain=function(){"use strict";function t(){e(),a(),i(),s(),c(),n(),u()}function e(){$(d.module).off("click.ls, ls.toggleTopCurtain"),$(".ls-notification-list").off("click.ls"),$("body").off("click.lsTopCurtain")}function n(){$(d.module).each(function(t,e){var n=$(e).data("target"),a=$(n+" .ls-dismissable:not(.ls-dismissed)").length;0!==a&&$('[data-target="'+n+'"]').attr("data-counter",a),0===a&&($('[data-target="'+n+'"]').removeAttr("data-counter"),$(n+" .ls-no-notification-message").addClass("active"))})}function a(){$(d.module).each(function(t,e){var n=$(e).position().left,a=11,s=$($(e).data("target")).width()/2,i=window.navigator.userAgent,r=i.indexOf("MSIE "),l=i.indexOf("Trident/");r>0||l>0?$($(e).data("target")).css({left:n+a-s+"px",top:"60px"}):$($(e).data("target")).css({left:n+a+s+"px"}),o(e)})}function s(){$(".ls-notification-list").on("click.ls",function(t){t.stopPropagation()})}function i(){$("body").on("click.lsTopCurtain",function(){l()})}function o(t){$(t).on("click.ls, ls.toggleTopCurtain",function(e){e.stopPropagation();var n=$($(t).data("target")).hasClass("ls-active");l(),n||($(t).addClass("ls-active"),r($(t).data("target")))})}function r(t){$(t).addClass("ls-active"),locastyle.dropdown.closeDropdown()}function l(){$("[data-ls-module='topbarCurtain']").removeClass("ls-active"),$(".ls-notification-list").removeClass("ls-active")}function c(){var t;$(window).resize(function(){clearTimeout(t),t=setTimeout(function(){e(),a(),i(),s()},300)})}function u(){var t=$(".ls-topbar .ls-user-account");$(".ls-sidebar .ls-user-account").length||t.clone().prependTo(".ls-sidebar")}var d={module:'[data-ls-module="topbarCurtain"]'};return{init:t,hideCurtains:l,unbind:e,updateStatusCounter:n}}();var locastyle=locastyle||{};locastyle.btnGroup=function(){"use strict";function t(){a(),n()}function e(){$(document).off("breakpoint-updated")}function n(){e(),$(document).on("breakpoint-updated",function(){a()})}function a(){("ls-window-sm"===locastyle.breakpointClass||"ls-window-xs"===locastyle.breakpointClass)&&($(".ls-regroup").each(function(t,e){s($(e).find("a, button"))}),locastyle.dropdown.init(),locastyle.modal.init(),locastyle.general.init())}function s(t){var e=$(t).wrap('<li class="hidden-xs hidden-sm">');t.parents(".ls-regroup").find('a[class*="ls-btn"]').removeClass(),t.parents(".ls-regroup").html(locastyle.templates.dropdown(e))}return{init:t}}();var locastyle=locastyle||{};locastyle.datepicker=function(){"use strict";function t(){$(s.selector).each(function(){$(this).hasClass("ls-daterange")||e($(this))}),$(s.rangeSelector).each(function(){n($(this))})}function e(t){t.pikaday(s.pikaday)}function n(t){var e=null,n=null,a={field:t[0],onSelect:function(){n.setMinDate(this.getDate())}},i={field:$(t.data("ls-daterange"))[0],onSelect:function(){e.setMaxDate(this.getDate())}};e=new Pikaday($.extend(a,s.pikaday)),n=new Pikaday($.extend(i,s.pikaday))}function a(t){e($(t))}var s={selector:".datepicker",rangeSelector:"[data-ls-daterange]",pikaday:{firstDay:1,minDate:new Date("2000-01-01"),maxDate:new Date("2020-12-31"),format:"DD/MM/YYYY",yearRange:[2e3,2020],i18n:{previousMonth:"Anterior",nextMonth:"Pr\xf3ximo",months:["Janeiro","Fevereiro","Mar\xe7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],weekdays:["Domingo","Segunda","Ter\xe7a","Quarta","Quinta","Sexta","S\xe1bado"],weekdaysShort:["Dom","Seg","Ter","Qua","Qui","Sex","S\xe1b"]}}};return{init:t,newDatepicker:a,createWithRange:n}}();var locastyle=locastyle||{};locastyle.charCounter=function(){"use strict";function t(){e()}function e(){$('[data-ls-module="charCounter"]').each(function(t,e){var a=$(e).attr("maxlength");$(e).removeAttr("maxlength").data().maxlength=a,$(e).after('<p class="ls-help-inline"><small><strong class="ls-char-count ls-number-counter-'+t+'">'+a+"</strong> caracteres restantes</small></p>"),$(e).keyup(function(){var e=$(this).val().length,a=$(this).data().maxlength;e>a?($(this).val($(this).val().substring(0,a)),n(t,0)):n(t,a-e)}),$(e).trigger("keyup")})}function n(t,e){$(".ls-number-counter-"+t).text(e)}return{init:t}}();var locastyle=locastyle||{};locastyle.browserDetect=function(){"use strict";function t(){a()}function e(){return s=i.match(/(firefox)/)?i.match(/(firefox)/)[1]:i.match(/(msie|phantomjs|chrome|version|rv)/)[1]}function n(){return parseInt((i.match(/.+(?:firefox|phantomjs|msie|chrome|version|rv)[\/: ]([\d.]+)/)||[0,0])[1].split(".")[0],10)}function a(){$("html").addClass("ls-browser-"+e())}var s,i=navigator.userAgent.toLowerCase();return{init:t,browserName:e,browserVersion:n}}();var locastyle=locastyle||{};locastyle.browserUnsupportedBar=function(){"use strict";function t(){e(),a()}function e(){var t=locastyle.browserDetect.browserVersion(),e=locastyle.browserDetect.browserName(),a={chrome:34,firefox:29,version:5,msie:8};$.cookie("hideBrowserUnsupportedAlert")||t<=a[e]&&n()}function n(){$("html").addClass("ls-browser-unsupported"),$("body").prepend(locastyle.templates.browserUnsupportedBar())}function a(){$(".ls-dismiss[data-ls-module=dismiss]").on("click",function(){$("html").removeClass("ls-browser-unsupported"),$("html .ls-unsupported-bar").remove(),$.cookie("hideBrowserUnsupportedAlert",!0,{expires:1})})}return{init:t}}();var locastyle=locastyle||{};locastyle.trackEvents=function(){"use strict";function t(){window.ga?(locastyle.trackEvents.gaPresent=!0,e(locastyle.trackEvents),n()):locastyle.trackEvents.gaPresent=!1}function e(t){t.eventCategory=$("body").attr("data-ls-te-category")||window.location.pathname}function n(){a(),s(),i(),o(),u()}function a(){var t=$("a");$(t).each(function(t,e){var n={};if(n.category=$(e).data("ls-te-category")?$(e).data("ls-te-category"):null,n.action=$(e).data("ls-te-action")?$(e).data("ls-te-action"):"open_link_#"+$(e).attr("href"),
|
73
|
-
n.label=$(e).data("ls-te-label")?$(e).data("ls-te-label"):$(e).text(),$(e).attr("href")&&0===$(e).attr("href").indexOf("#")&&(n.action=$(e).data("ls-te-action")?$(e).data("ls-te-action"):"on_page_link_"+$(e).attr("href")),"tabs"===$(e).attr("data-ls-module")&&(n.action="tab_navigation"),"dropdown"===$(e).parent().attr("data-ls-module")&&($(e).parents(".ls-topbar").length>0?(n.action="top_bar_action",n.label="Toggle user dropdown"):n.action="dropdown_toggle"),"modal"===$(e).attr("data-ls-module")){var a=$(e).data("target")?$(e).data("target"):$(e).attr("href");n.action="open_modal_"+a}"collapse"===$(e).parent().attr("data-ls-module")&&(n.type="collapse"),"topbarCurtain"===$(e).attr("data-ls-module")&&(n.action="top_bar_action"),r(e,n)})}function s(){var t=$("button");$(t).each(function(t,e){var n={};n.category=$(e).data("ls-te-category")?$(e).data("ls-te-category"):null,n.action=$(e).data("ls-te-action")?$(e).data("ls-te-action"):"on_page_button_#",n.label=$(e).data("ls-te-label")?$(e).data("ls-te-label"):$(e).text();var a;"modal"===$(e).attr("data-ls-module")&&(a=$(e).data("target")?$(e).data("target"):$(e).attr("href"),n.action="open_modal_"+a),"modal"===$(e).attr("data-dismiss")&&(a=$($(e).parents(".ls-modal")).attr("id"),n.action="close_modal_#"+a),r(e,n)})}function i(){var t=$("form");$(t).each(function(t,e){var n={};$(e).parents(".ls-modal").length?n.action="submit_form_#"+($(e).data("action")||$(e).attr("id")||$(e).attr("action"))+"#inside_modal#"+$(e).parents(".ls-modal").attr("id"):n.action="submit_form_#"+($(e).data("action")||$(e).attr("id")||$(e).attr("action")),n.label=$(e).find(":submit[type=submit]").val()||$(e).find(":submit[type=submit]").text(),l(e,n)})}function o(){var t=$("select");$(t).each(function(t,e){var n={};n.category=$(e).data("ls-te-category")?$(e).data("ls-te-category"):null,n.action="select_change_#"+($(e).attr("id")||$(e).attr("name")),n.label="option",c(e,n)})}function r(t,e){$(t).off("click.lsTrackEvent"),$(t).on("click.lsTrackEvent",function(){if("collapse"===e.type){var n=$(t).parent().attr("id");$("#"+n).hasClass("ls-collapse-open")?(e.action="close_collapse_#"+n,e.label="Close collapse"):(e.action="open_collapse_#"+n,e.label="Open collapse")}ga("send","event",e.category||locastyle.trackEvents.eventCategory,e.action,e.label)})}function l(t,e){$(t).find(":submit[type=submit]").off("click.lsTrackEvent"),$(t).off("submit.ls"),$(t).on("submit.ls",function(){ga("send","event",locastyle.trackEvents.eventCategory,e.action,e.label)})}function c(t,e){$(t).off("change.ls"),$(t).on("change.ls",function(){e.label=$(this).val(),ga("send","event",e.category||locastyle.trackEvents.eventCategory,e.action,e.label)})}function u(){$("body").off("click.lsTrackEvents"),$("body").on("click.lsTrackEvents",".hopscotch-bubble .hopscotch-nav-button",function(){var t=$(this).parents(".hopscotch-bubble").find(".hopscotch-bubble-number").text();ga("send","event",locastyle.trackEvents.eventCategory,"go_to_tour_step["+t+"]",$(this).text())})}return{init:t}}();var locastyle=locastyle||{};locastyle.steps=function(){"use strict";function t(){e(),n(),a(),o(),r(),s(),l(),i(),c(),u()}function e(){$(b.selectors.nav).off("click.steps"),$(b.actions.next).off("click.steps"),$(b.actions.prev).off("click.steps")}function n(){$(".ls-steps-nav li").prepend('<span class="ls-steps-arrow" />')}function a(){$(b.selectors.nav).attr("role","tablist"),$(b.selectors.nav).find(b.selectors.button).attr("aria-selected","false"),$(b.selectors.nav).find(".ls-active .ls-steps-btn").attr("aria-selected","true"),$(b.selectors.button).attr("role","tab"),$(b.selectors.container).attr({"aria-hidden":!0,role:"tabpanel"})}function s(){var t=$(b.selectors.nav).find("li");t.each(function(e){$(this).hasClass(b.status.active)&&$(b.selectors.mobile).attr({"data-index":e+1+" de "+t.length,"data-title":$(this).find(b.selectors.button).attr("title")})})}function i(){$(b.selectors.mobile).on("click.steps",function(){$(b.selectors.steps).toggleClass(b.status.active)})}function o(){for(var t=$(b.selectors.button),e=t.length,n=0;e>n;n++){var a=$(t[n]).attr("title");$(t[n]).attr({"aria-label":a})}}function r(){var t=$(b.selectors.nav).find(b.classes.active).index();-1===t?$(b.selectors.nav).each(function(){var t=$(this).find("li:first").find(b.selectors.button),e=t.data("target");m(t,$(e))}):(p(t),$(b.selectors.nav).find("li:lt("+t+")").addClass(b.status.actived));var e=$(b.selectors.moduleVisible).height();f(e)}function l(){$(b.selectors.nav).on("click.steps",b.selectors.moduleActive,function(t){t.preventDefault(),g($(this))})}function c(){$(b.actions.next).on("click.steps",function(t){t.preventDefault(),d()})}function u(){$(b.actions.prev).on("click.steps",function(t){t.preventDefault(),h()})}function d(){var t=jQuery.Event("NextStepEvent");$(document).trigger(t);var e=jQuery.Event("BeforeNextStep");if($(document).trigger(e),!t.isDefaultPrevented()&&!e.isDefaultPrevented()){var n=$(b.selectors.nav).find(b.classes.active).next("li").addClass(b.status.active).find(b.selectors.button);g(n),$(document).trigger(jQuery.Event("AfterNextStep"))}}function h(){var t=jQuery.Event("PrevStepEvent");$(document).trigger(t);var e=jQuery.Event("BeforePrevStep");if($(document).trigger(e),!t.isDefaultPrevented()&&!e.isDefaultPrevented()){var n=$(b.selectors.nav).find(b.classes.active).prev("li").find(b.selectors.button);g(n),$(document).trigger(jQuery.Event("AfterPrevStep"))}}function f(t){var e=$(b.selectors.nav),n=e.offset(),a=$(b.selectors.nav).height();$(window).scroll(function(){if(!($(window).width()<768))if($(window).scrollTop()>n.top){var s=parseInt($(window).scrollTop()-a,10);e.stop().animate({marginTop:$(window).scrollTop()-n.top+20}),s+a>=t&&e.stop().animate({marginTop:0})}else e.stop().animate({marginTop:0})})}function p(t){$(b.selectors.container).eq(t).addClass(b.status.active)}function g(t){var e=$(t.attr("href")||t.data("target"));m(t,e),v(t,e),y(),s(),$("html").hasClass("ls-screen-xs")&&$(b.selectors.nav).hasClass(b.status.active)&&$(b.selectors.mobile).trigger("click")}function m(t,e){$(t).parents("li").addClass(b.status.active),$(t).parents("li").prev("li").addClass(b.status.actived),e.addClass(b.status.active).attr({"aria-hidden":!1}),$(t).attr("aria-selected",!0)}function v(t,e){$(t).parents("li").siblings().removeClass(b.status.active),e.siblings().removeClass(b.status.active).attr({"aria-hidden":!0}),$(t).parents("li").siblings().find(b.selectors.button).attr("aria-selected",!1)}function y(){$("html, body").stop().animate({scrollTop:$(".ls-steps").offset().top-60},300);var t=$(b.selectors.moduleVisible).height();f(t)}var b={selectors:{moduleActive:'.ls-actived [data-ls-module="steps"]',nav:".ls-steps-nav",button:".ls-steps-btn",container:".ls-steps-content",steps:".ls-steps",moduleVisible:".ls-steps-content:visible",mobile:".ls-steps-mobile"},status:{active:"ls-active",actived:"ls-actived"},classes:{active:".ls-active"},actions:{next:'.ls-steps-content [data-action="next"]',prev:'.ls-steps-content [data-action="prev"]'}};return{init:t,unbind:e,nextStep:d,prevStep:h}}();var locastyle=locastyle||{};locastyle.button=function(){"use strict";function t(){e(),i(),n(),l()}function e(){$("[data-ls-module=button]").off("click.button")}function n(){$('[data-ls-module="button"]').on("click.button",function(t){t.preventDefault();var e=$($(this).attr("href")||$(this).data("target")),n="[data-ls-module=button]";r(this,e,n),o(this,e),a(),$(this).find("input").prop("checked",!0)})}function a(){$('[data-ls-module="button"] input[type="radio"]').each(function(t,e){$(e).removeAttr("checked")})}function s(t){$(t).each(function(t,e){$(e).attr("checked","checked")})}function i(){$(".ls-tabs-btn-nav li.ls-active").each(function(){if($(this).hasClass("ls-active")===!0){var t=$(this).find('[data-ls-module="button"]'),e=t.attr("href")||t.data("target"),n="[data-ls-module=button]";s($(this).find('[data-ls-module="button"] input[type="radio"]')),r(t,e,n),o(t,e)}})}function o(t,e){$(t).parents("li").addClass("ls-active"),$(e).addClass("ls-active"),$(t).attr("aria-selected",!0)}function r(t,e,n){$(t).parents("li").siblings().removeClass("ls-active"),$(e).siblings().removeClass("ls-active"),$(t).parents("li").siblings().find(n).attr("aria-selected",!1)}function l(){$(".ls-tabs-btn-nav").attr("role","tablist"),$(".ls-tabs-btn-nav .ls-btn").attr("role","tab"),$(".ls-tabs-btn-nav .ls-active .ls-btn").attr("aria-selected","true"),$(".ls-tabs-btn .ls-tab-content").attr("role","tabpanel")}return{init:t,unbind:e}}();var locastyle=locastyle||{};locastyle.switchButton=function(){"use strict";function t(){e(),s()}function e(){$(i.switchButton).on("click.ls",function(t){0===$(this).find("a").length&&(a($(this)),n($(this)),t.stopPropagation())})}function n(t){t.find("input[type=checkbox]").prop("checked")?t.trigger("switchButton:activated"):t.trigger("switchButton:deactivated")}function a(t){t.toggleClass(i.openedClass)}function s(){$(i.switchButton).find("input[type=checkbox]").each(function(){$(this).prop("checked")&&$(this).closest(i.switchButton).addClass(i.openedClass)})}var i={switchButton:"[data-ls-module=switchButton]",openedClass:"ls-switch-btn-active"};return{init:t}}();var locastyle=locastyle||{};locastyle.toggleText=function(){"use strict";function t(t,e,n){t.trigger(i.triggerChange,[e,n])}function e(e){var n=e.data("target-text")?$(e.data("target-text")):e,a=e.data("toggle-text"),s=n.text();e.data("toggle-text",s),n.text(a),t(e,n,a)}function n(){$(i.trigger).on("click.ls",function(t){t.preventDefault(),e($(this)),t.stopPropagation()})}function a(){$(i.trigger).off("click.ls")}function s(){a(),n()}var i={trigger:"[data-ls-module=toggleText]",triggerChange:"toggleText:change"};return{init:s}}();var locastyle=locastyle||{};locastyle.checkboxToggle=function(){"use strict";function t(t){t.prop("checked",!1).removeClass("ls-checked")}function e(t){t.prop("checked",!0).addClass("ls-checked")}function n(t){if(t.data("toggleText")){var e=t.data("toggleText"),n=t.text();t.data("toggleText",n).text(e)}}function a(t,e){for(var a=0;a<e.length;a++)if(!e[a].checked)return t.hasClass("ls-triggered")&&n(t),t.prop("checked",!1).removeClass("ls-triggered"),!1;t.prop("checked",!0).addClass("ls-triggered"),n(t)}function s(t){t.hasClass("ls-triggered")?t.trigger("checkboxToggle:activated"):t.trigger("checkboxToggle:deactivated")}function i(i,o){i.on("click.ls",function(){$(this).hasClass("ls-triggered")?t(o):e(o),$(this).toggleClass("ls-triggered"),s($(this)),n($(this))}),o.each(function(){$(this).on("click.ls",function(){$(this).toggleClass("ls-checked"),a(i,o)})})}function o(){$(r.selector.module).each(function(){var t=$(this),e=$('[data-checkbox-toggle="'+t.data("checkboxTarget")+'"]');t.off("click.ls"),e.off("click.ls"),i(t,e)})}var r={selector:{module:'[data-ls-module="checkboxToggle"]'}};return{init:o}}();
|
72
|
+
function(t,e){"use strict";"object"==typeof exports?e(require("jquery"),require("../pikaday")):"function"==typeof define&&define.amd?define(["jquery","pikaday"],e):e(t.jQuery,t.Pikaday)}(this,function(t,e){"use strict";t.fn.pikaday=function(){var n=arguments;return n&&n.length||(n=[{}]),this.each(function(){var a=t(this),s=a.data("pikaday");if(s instanceof e)"string"==typeof n[0]&&"function"==typeof s[n[0]]&&s[n[0]].apply(s,Array.prototype.slice.call(n,1));else if("object"==typeof n[0]){var i=t.extend({},n[0]);i.field=a[0],a.data("pikaday",new e(i))}})}}),function(){this.JST||(this.JST={}),this.JST["locastyle/templates/_popover"]=function(t){t||(t={});var e,n=[],a=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?i(t):""},s=t.safe,i=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},i||(i=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){n.push('<div id="ls-popover-'),n.push(a(this.index)),n.push('" class="ls-popover ls-popover-'),n.push(a(this.placement||"top")),n.push(" "),n.push(a(this.customClasses)),n.push('">\n '),this.title&&(n.push('\n <div class="ls-popover-header">\n <h3 class="title-3"> '),n.push(a(this.title)),n.push(" </h3>\n </div>\n ")),n.push("\n "),this.content&&n.push("\n "),n.push('\n <div class="ls-popover-content"> '),n.push(this.content),n.push(" </div>\n</div>\n")}).call(this)}.call(t),t.safe=s,t.escape=i,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST["locastyle/templates/_modal"]=function(t){t||(t={});var e,n=[],a=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?i(t):""},s=t.safe,i=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},i||(i=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){n.push('<div class="ls-modal ls-modal-template '),n.push(a(this.lsModule)),n.push('" tabindex="-1" aria-labelledby="lsModal" role="dialog">\n '),"link"!==this.actionType?(n.push('\n <form action="'),n.push(a(this.action)),n.push('" class="ls-modal-box ls-form" method="post">\n ')):n.push('\n <div class="ls-modal-box">\n '),n.push('\n <div class="ls-modal-header">\n <button type="button" data-dismiss="modal" class="close">×</button>\n <h4 class="ls-modal-title" id="lsModal">'),n.push(a(this.title)),n.push('</h4>\n </div>\n <div class="ls-modal-body">\n <p>'),n.push(this.content),n.push('</p>\n </div>\n <div class="ls-modal-footer">\n <button type="button" class="ls-btn ls-float-right" data-dismiss="modal">\n '),n.push(a(this.close)),n.push("\n </button>\n "),"link"!==this.actionType?(n.push("\n <button "),n.push(a(this.customAttrs)),n.push(' type="submit" class=" ls-btn '),n.push(a(this["class"])),n.push('">'),n.push(a(this.save)),n.push("</button>\n ")):(n.push('\n <a href="'),n.push(a(this.action)),n.push('" '),n.push(a(this.customAttrs)),n.push(' class=" ls-btn '),n.push(a(this["class"])),n.push('">'),n.push(a(this.save)),n.push("</a>\n ")),n.push("\n </div>\n "),"link"!==this.actionType?n.push("\n </form>\n "):n.push("\n </div>\n "),n.push("\n</div>\n")}).call(this)}.call(t),t.safe=s,t.escape=i,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST["locastyle/templates/_dropdown"]=function(t){t||(t={});var e,n=[],a=t.safe,s=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},s||(s=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var t,e,a,s;for(n.push('<div data-ls-module="dropdown" class="ls-dropdown">\n <a href="#" class="ls-btn"></a>\n <ul class="ls-dropdown-nav">\n '),s=this.elements,e=0,a=s.length;a>e;e++)t=s[e],n.push("\n "),""!==t.text&&(n.push("\n <li>"),n.push(t.outerHTML),n.push("</li>\n ")),n.push("\n ");n.push("\n </ul>\n</div>\n")}).call(this)}.call(t),t.safe=a,t.escape=s,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST["locastyle/templates/_browser-unsupported-bar"]=function(t){t||(t={});var e,n=[],a=t.safe,s=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},s||(s=t.escape=function(t){return(""+t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){n.push('<div class="ls-unsupported-bar ls-alert-blocker ls-alert-warning ls-alert-fixed-top">\n <span class="ls-dismiss" data-ls-module="dismiss">×</span>\n <strong>Atualize seu navegador!</strong><br>Baixe a vers\xe3o mais recente:<br>\n <a href="//www.mozilla.org/en-US/firefox" target="_blank">Firefox</a>, <a href="//www.google.com/intl/en-BR/chrome/browser/" target="_blank">Chrome</a>,\n <a href="//windows.microsoft.com/en-us/internet-explorer/download-ie" class="hidden-sm hidden-xs" target="_blank">Internet Explorer</a> ou\n <a href="//www.apple.com/safari/" target="_blank">Safari</a>\n</div>\n')}).call(this)}.call(t),t.safe=a,t.escape=s,n.join("")}}.call(this);var locastyle=function(){"use strict";function t(){locastyle.sidebarToggle.init(),locastyle.sidebars.init()}function e(){locastyle.breakpoints.init(),n(),locastyle.general.init(),locastyle.btnGroup.init(),locastyle.alert.init(),locastyle.datepicker.init(),locastyle.form.togglePasswordField(),locastyle.form.triggerCalendar(),a(),locastyle.browserDetect.init()}function n(){var t=s();for(var e in t)t.hasOwnProperty(e)&&(locastyle[t[e]].init(),console.info("Locastyle: module ["+t[e]+"] successfully initialized."),$.event.trigger(t[e]+":ready"))}function a(){$("html").hasClass("ls-trackevent-on")&&locastyle.trackEvents.init()}function s(){var t=[];return $("[data-ls-module]").each(function(){var e=$(this).data("ls-module");-1===t.indexOf(e)&&t.push(e)}),t}return{init:e,fastInit:t}}(),ls=locastyle;$(window).load(function(){"use strict";ls.init()}),$(document).ready(function(){"use strict";ls.fastInit()});var locastyle=locastyle||{};locastyle.breakpoints=function(){"use strict";function t(t){s.html=$("html"),e(t),n(t),a()}function e(t){var e;e=t?t.documentWidth:$(document).width(),e<s.sm?(s.html.addClass("ls-window-xs"),locastyle.breakpointClass="ls-window-xs"):e>=s.sm&&e<s.md?(s.html.addClass("ls-window-sm").removeClass("ls-sidebar-visible ls-notifications-visible "),locastyle.breakpointClass="ls-window-sm"):e>=s.md&&e<s.lg?(s.html.addClass("ls-window-md").removeClass("ls-sidebar-visible ls-notifications-visible "),locastyle.breakpointClass="ls-window-md"):(s.html.addClass("ls-window-lg").removeClass("ls-sidebar-visible ls-notifications-visible "),locastyle.breakpointClass="ls-window-lg")}function n(t){var e;e=t?t.documentWidth:screen.width,e<s.sm?(s.html.addClass("ls-screen-xs"),locastyle.breakpointScreenClass="ls-screen-xs"):e>=s.sm&&e<s.md?(s.html.addClass("ls-screen-sm"),locastyle.breakpointScreenClass="ls-screen-sm"):e>=s.md&&e<s.lg?(s.html.addClass("ls-screen-md"),locastyle.breakpointScreenClass="ls-screen-md"):(s.html.addClass("ls-screen-lg"),locastyle.breakpointScreenClass="ls-screen-lg")}function a(){var t;$(window).resize(function(){clearTimeout(t),t=setTimeout(function(){var a=s.html.attr("class").replace(/(^|\s)(ls-window-\S+)|(ls-screen-\S+)/g,"");s.html.attr("class",$.trim(a)),e(),n(),$.event.trigger("breakpoint-updated"),clearTimeout(t)},300)})}var s={sm:"768",md:"992",lg:"1200",html:null};return{init:t}}();var locastyle=locastyle||{};locastyle.sidebars=function(){"use strict";function t(){m(),o(),e(),n(),i(),r(),l(),d(),h(),f(),p(),g()}function e(){$(".ls-show-sidebar").on("touchstart.ls click.ls",function(t){t.preventDefault(),a()})}function n(){$(".ls-show-notifications").on("touchstart.ls click.ls",function(t){t.preventDefault(),s()})}function a(){$("html").toggleClass("ls-sidebar-visible")}function s(){$("html").toggleClass("ls-notifications-visible")}function i(){1===$(".ls-sidebar .ls-area-account").length&&$(".ls-sidebar").addClass("ls-area-account-active")}function o(){1===$(".ls-notification").length&&0===$(".ls-show-notifications").length&&$(".ls-topbar").append('<span class="ls-show-notifications ls-ico-question"/>')}function r(){var t=$(".ls-menu").find("ul li ul");$(t).each(function(){$(this).addClass("ls-submenu"),$(this).parent("li").addClass("ls-submenu-parent"),$(this).find("a").addClass("ls-submenu-item")})}function l(){$(".ls-submenu-parent").on("click","> a",function(t){t.preventDefault(),$(this).parents(".ls-submenu-parent").hasClass("ls-active")?u($(this)):c($(this))})}function c(t){var e=$(t).parents(".ls-submenu-parent");$(".ls-submenu-parent").removeClass("ls-active"),e.addClass("ls-active"),g(e)}function u(t){var e=$(t).parents(".ls-submenu-parent");e.removeClass("ls-active"),g(e)}function d(){$(".ls-sidebar-toggled").length||$(".ls-submenu li.ls-active").each(function(){c($(this))})}function h(){$(window).on("sidebar-minimize",function(){$(".ls-submenu li").each(function(){u($(this))})}),$(window).on("sidebar-maximize",function(){$(".ls-submenu li.ls-active").each(function(){c($(this))})})}function f(){$(document).on("click",function(t){var e=$(t.target);$(".ls-sidebar-toggled").length&&$(".ls-submenu-parent.ls-active").length&&(e.is(".ls-submenu-parent.ls-active *")||u($(".ls-submenu-parent.ls-active > a")))})}function p(){var t=$(".ls-menu");t.attr({role:"navigation"}),t.find("ul").attr({role:"menu"}),t.find("a").attr({role:"menuitem"}),$(".ls-submenu-parent").each(function(t,e){g(e)})}function g(t){$(t).hasClass("ls-active")?$(t).attr({"aria-expanded":"true","aria-hidden":"false"}):$(t).attr({"aria-expanded":"false","aria-hidden":"true"})}function m(){$(".ls-show-sidebar").off("touchstart.ls click.ls"),$(".ls-show-notifications").off("touchstart.ls click.ls"),$(".ls-submenu-parent > a").off("click.ls")}return{init:t,unbind:m}}();var locastyle=locastyle||{};locastyle.sidebarToggle=function(){"use strict";function t(){r(),n(),e(),a(),n(),o()}function e(){$(".ls-sidebar").length&&$(".ls-sidebar").append('<span class="ls-sidebar-toggle ls-ico-shaft-left"></span>')}function n(){var t=localStorage.getItem("stateSidebar");t||$("html").hasClass("ls-sidebar-toggled")?s():i()}function a(){$(".ls-sidebar-toggle").on("click",function(){$("html").hasClass("ls-sidebar-toggled")?i():s()})}function s(){$("html").addClass("ls-sidebar-toggled"),$(".ls-sidebar-toggle").addClass("ls-active"),localStorage.setItem("stateSidebar","minimized"),$.event.trigger("sidebar-minimize")}function i(){$("html").removeClass("ls-sidebar-toggled"),$(".ls-sidebar-toggle").removeClass("ls-active"),localStorage.removeItem("stateSidebar"),$.event.trigger("sidebar-maximize")}function o(){$(window).on("breakpoint-updated",function(){$(".ls-window-xs").length&&i()})}function r(){$(".ls-sidebar-toggle").off("click")}return{init:t}}();var locastyle=locastyle||{};locastyle.collapse=function(){"use strict";function t(){$(i.classes.header).each(function(){s($(this))}),e()}function e(){$(i.trigger).each(function(t,e){$(e).hasClass(i.classes.alwaysOpened)||($(e).on("click.ls",function(){n($(this));var t=$(this).data("target");s($(this)),a($(this),t)}),$(i.classes.content).on("click.ls",function(t){t.stopPropagation()}))})}function n(t){var e=t.parents(i.classes.groupContainer);e[0]&&e.find(i.trigger).not(t).removeClass(i.classes.opened).find(i.classes.content).slideUp()}function a(t,e){$(e).parent().hasClass(i.classes.opened)?($(e).parent().removeClass(i.classes.opened),t.trigger("collapse:closed")):($(e).parent().addClass(i.classes.opened),t.trigger("collapse:opened"))}function s(t){$(t).hasClass(i.classes.open)?($(i.classes.header).attr({"aria-expanded":!0}),$(i.classes.content).attr({"aria-hidden":!1})):($(i.classes.header).attr({"aria-expanded":!1}),$(i.classes.content).attr({"aria-hidden":!0}))}var i={trigger:'[data-ls-module="collapse"]',classes:{header:".ls-collapse-header",content:".ls-collapse-body",groupContainer:".ls-collapse-group",open:"ls-collapse-open",close:"ls-collapse-close",opened:"ls-collapse-opened",alwaysOpened:"ls-collapse-opened-always"}};return{init:t}}();var locastyle=locastyle||{};locastyle.modal=function(){"use strict";function t(){n(),a()}function e(){$(document).off("keyup.ls-esc"),$(c.close.classes+", "+c.close.trigger).off("click.ls")}function n(){$(c.open.trigger).off("click.ls"),e()}function a(){$(c.open.trigger).on("click.ls",function(){locastyle.modal.open($(this))}),$(".ls-opened").length>0&&r("#"+$(".ls-opened").attr("id"))}function s(){$(document).one("keyup.ls-esc",function(t){27===t.keyCode&&$(".ls-opened")&&locastyle.modal.close()}),$(c.close.classes+", "+c.close.trigger).on("click.ls",function(t){return t.target!==t.currentTarget?!0:void locastyle.modal.close()})}function i(t){var e=null;$("body").addClass(c.classes.open),$(t).data("target")||"object"!=typeof t?e=$(t).data("target")?$(t.data("target")):$(t):(e=$(locastyle.templates.modal(t.data())),$("body").append(e),$(".ls-modal-template").focus(),s()),e.addClass("ls-opened"),e.trigger(c.open.triggerOpened,t),l(t),r(t)}function o(){var t=$(".ls-modal.ls-opened");$("body").removeClass(c.classes.open),t.attr("aria-hidden",!0),t.removeClass("ls-opened"),e(),t.trigger(c.close.triggerClosed),t.hasClass("ls-modal-template")&&t.remove()}function r(t){var e=$(t).data("target")?$(t.data("target")):$(t);e.each(function(t,e){void 0!==$(e).data("modal-blocked")?$(e).find('[data-dismiss="modal"]').remove():s()})}function l(t){var e=$(t).data("target")?$(t.data("target")):$(t),n=e.find(".ls-modal-title").attr("id")||"lsModal"+c.lsModal++;e.find(".ls-modal-title").attr("id",n),e.attr({role:"dialog","aria-hidden":!1,"aria-labelledby":n,tabindex:"-1"}).focus()}var c={open:{trigger:'[data-ls-module="modal"]',triggerOpened:"modal:opened"},close:{classes:".ls-modal",trigger:'[data-dismiss="modal"]',triggerClosed:"modal:closed"},classes:{open:"ls-overflow-hidden"},lsModal:0};return{init:t,open:i,close:o,unbind:n}}();var locastyle=locastyle||{};locastyle.alert=function(){"use strict";function t(){e()}function e(){$('[class*="ls-alert"]').attr({role:"alert"})}return{init:t}}();var locastyle=locastyle||{};locastyle.dismiss=function(){"use strict";function t(){e(),n()}function e(){$(i.trigger).off("click.ls")}function n(){$(i.trigger).on("click.ls",function(){a(this),locastyle.topbarCurtain.updateStatusCounter()})}function a(t){var e=$(t).parents(".ls-dismissable");$(t).data("target")&&(e=$(t).data("target")),s(e)}function s(t){$(t).addClass("ls-dismissed"),$(t).trigger(i.triggerClose)}var i={trigger:"[data-ls-module=dismiss]",triggerClose:"dismiss:close"};return{init:t,unbind:e}}();var locastyle=locastyle||{};locastyle.popover=function(){"use strict";function t(){r(),e(),l()}function e(){$(c.module).each(function(t,e){var o="hover"===$(e).attr("data-trigger")?"mouseover":c.trigger;$(e).attr("data-target",c.idPopover+t);var l=$(e).data("target");$(e).on(o,function(u){u.preventDefault(),u.stopPropagation(),$(l).hasClass("ls-active")?i(l):($(c.idPopover+t).length||n(t,e),s(l),r(l)),"mouseover"===o&&$(e).on("mouseout",function(){i(l)}),a(e)}),$(window).on("breakpoint-updated",function(){a(e)})})}function n(t,e){var n={index:t,title:$(e).data("title"),content:$(e).data("content"),placement:$(e).data("placement"),customClasses:$(e).data("custom-class")};$("body").append(locastyle.templates.popover(n))}function a(t){var e={target:$(t).data("target"),top:$(t).offset().top,left:$(t).offset().left,width:$(t).outerWidth(),height:$(t).outerHeight(),placement:$(t).data("placement")};switch(e.placement){case"right":$(e.target).css({top:e.top+=e.height/2-2,left:e.left+=e.width+12});break;case"bottom":$(e.target).css({top:e.top+=e.height+12,left:e.left+=e.width/2});break;case"left":$(e.target).css({top:e.top+=e.height/2-2,left:e.left-=12});break;default:case"top":$(e.target).css({top:e.top-=12,left:e.left+=e.width/2})}}function s(t){$(t).addClass("ls-active"),$(t).off(c.events.closed).trigger(c.events.opened)}function i(t){$(t||".ls-popover.ls-active").removeClass("ls-active"),$(t).trigger(c.events.closed).off(c.events.opened),$(".ls-popover.ls-active").length||$(document).off(c.events.clickAnywhere)}function o(){$(c.popoverClass).remove(),$.each(c.events,function(t,e){$(document).unbind(e)}),$(document).trigger(c.events.destroyed)}function r(t){$(document).on(c.events.clickAnywhere,function(e){$(e.target).parents(".ls-popover").length||i(t)})}function l(){$(c.module+'[data-ls-popover="open"]').each(function(){s($(this).data("target"))})}var c={module:'[data-ls-module="popover"]',idPopover:"#ls-popover-",popoverClass:".ls-popover",trigger:"click",events:{clickAnywhere:"click.clickanywhere",opened:"popover:opened",closed:"popover:closed",destroyed:"popover:destroyed"}};return{init:t,show:s,hide:i,destroy:o}}();var locastyle=locastyle||{};locastyle.dropdown=function(){"use strict";function t(){e(),n(),a(),l(c.dropdown)}function e(){$(c.firstLink).off("click.ls"),$(c.area).off("click.ls")}function n(){$(c.firstLink).on("click.ls",function(t){t.preventDefault();var e=$($(this).parents(c.module));locastyle.dropdown.toggleDropdown(e),r(e),t.stopPropagation()})}function a(){$(c.area).on("click.ls",function(){locastyle.dropdown.closeDropdown(),l(c.dropdown)})}function s(t){t.find(c.button).first().hasClass("ls-disabled")||(o(t),t.toggleClass("ls-active"),l(t),locastyle.topbarCurtain.hideCurtains(),i(t))}function i(t){$(t).hasClass("ls-active")?$(t).trigger("dropdown:opened"):$(t).trigger("dropdown:closed")}function o(t){$(c.module).not(t).removeClass("ls-active")}function r(t){var e=$(c.area);e.get(0).scrollWidth>e.width()&&$(t).addClass("ls-pos-right")}function l(t){$(c.button).attr({"aria-expanded":"false"}),$(c.nav).attr({"aria-hidden":"true"}),$(t).each(function(){$(c.nav).find("a").attr({role:"option"}),$(c.button,$(this)).attr({role:"combobox"}),$(this).hasClass("ls-active")?($(c.button,$(this)).attr({"aria-expanded":"true"}),$(c.nav,$(this)).attr({"aria-hidden":"false"})):($(c.button,$(this)).attr({"aria-expanded":"false"}),$(c.nav,$(this)).attr({"aria-hidden":"true"}))})}var c={area:"body",dropdown:".ls-dropdown",module:'[data-ls-module="dropdown"]',button:'[class*="ls-btn"]',firstLink:'[data-ls-module="dropdown"] > [class*="ls-btn"]:first-child, .ls-dropdown.ls-user-account > a:first-child',nav:".ls-dropdown-nav"};return{init:t,unbind:e,toggleDropdown:s,closeDropdown:o}}();var locastyle=locastyle||{};locastyle.tabs=function(){"use strict";function t(){c(),e(),n(),s(),u()}function e(){$('[data-ls-module="tabs"]').on("click.ls",function(t){t.preventDefault();var e=$($(this).attr("href")||$(this).data("target")),n=$(this).closest(".ls-tabs-nav");l(this,e),r(this,e),a(n)&&i(n)})}function n(){$(window).on("breakpoint-updated",function(){locastyle.tabs.checkBreakpoint()})}function a(t){return $(t).hasClass("in-dropdown")}function s(){("ls-window-sm"===locastyle.breakpointClass||"ls-window-xs"===locastyle.breakpointClass)&&$(".ls-tabs-nav").each(function(t,e){a(e)||o(e)})}function i(t){t.closest(".ls-dropdown-tabs").find("> a").text(t.find("li.ls-active > a").text())}function o(t){var e=$(t);e.addClass("in-dropdown ls-dropdown-nav").wrap('<div data-ls-module="dropdown" class="ls-dropdown-tabs">'),e.find(".ls-dropdown-nav").each(function(){e.append($(this).html()),$(this).closest("li").remove()}),e.parent(".ls-dropdown-tabs").prepend('<a data-ls-module="tabs" class="ls-btn">'+e.find("li.ls-active > a").text()+"</a>"),locastyle.tabs.init(),locastyle.dropdown.init()}function r(t,e){$(t).parents("li").addClass("ls-active"),$(t).trigger("tab:activated"),e.addClass("ls-active"),$(t).attr("aria-selected",!0)}function l(t,e){$(t).parents("li").siblings().removeClass("ls-active"),$(t).trigger("tab:deactivated"),e.siblings().removeClass("ls-active"),$(t).parents("li").siblings().find("a").attr("aria-selected",!1)}function c(){$("[data-ls-module=tabs]").off("click.ls")}function u(){$(d.tab).attr("role","tablist"),$(d.tabLink).attr("role","tab"),$(d.tabListActive).attr("aria-selected","true"),$(d.tabContent).attr("role","tabpanel")}var d={tab:".ls-tabs-nav",tabLink:".ls-tabs-nav a",tabListActive:".ls-tabs-nav li.ls-active a",tabContent:".ls-tab-content"};return{init:t,unbind:c,checkBreakpoint:s}}();var locastyle=locastyle||{};locastyle.templates=function(){"use strict";function t(){}function e(t){return JST[i+"popover"](t)}function n(t){return JST[i+"modal"](t)}function a(t){return JST[i+"dropdown"]({elements:t})}function s(){return JST[i+"browser-unsupported-bar"]()}var i="locastyle/templates/_";return{init:t,popover:e,modal:n,dropdown:a,browserUnsupportedBar:s}}();var locastyle=locastyle||{};locastyle.general=function(){"use strict";function t(){c(),n(),e(),o(),r(),l(),a()}function e(){$.each(u,function(t,e){var n=t.split("|");$(n[0]).off(n[1],n[2]),$(n[0]).on(n[1],n[2],function(t){var n=$(this);e(t,n)})})}function n(){var t=window.location.hash.replace("!/#","");""!==t&&$('[data-target="'+t+'"], a[href="'+t+'"]').trigger("click")}function a(){$("[data-ls-fields-enable]").on("click.ls",function(t){t.preventDefault();var e=$(this),n=$(e.data("ls-fields-enable")),a=n.data("form-text")?"ls-form-text":"";n.toggleClass("ls-form-disable ls-active "+a).find(":input").each(function(t,e){var n=$(e);n.toggleAttr("disabled").toggleClass(a).val(n.data("original-value"))})})}function s(t,e){var n=e.data("target")?$(e.data("target")):e,a=e.data("toggle-class");/(radio)|(checkbox)/.test(e.attr("type"))?(n.toggleClass(a,!e.prop("checked")),$('[name="'+e.attr("name")+'"]').not(e).each(function(){var t=$(this),n=t.data("target")?$(t.data("target")):t,a=t.data("toggle-class");n.toggleClass(a,e.prop("checked"))})):(t.preventDefault(),n.toggleClass(a))}function i(t,e){t.preventDefault();var n=$(e.attr("href"));n[0]&&$("html,body").animate({scrollTop:n.offset().top-70},1e3)}function o(){$(".ls-disabled, [disabled='disabled']").on("click",function(t){return $(this).hasClass("ls-disabled")||"disabled"===$(this).attr("disabled")?(t.stopImmediatePropagation(),t.preventDefault(),t.stopPropagation(),!1):void 0})}function r(t){$("a",t).on("click.lsPreventDefault",function(t){(""===$(this).attr("href")||"#"===$(this).attr("href"))&&t.preventDefault()})}function l(){$(".ls-group-active [class*='ls-btn']").on("click",function(){$(this).siblings().removeClass("ls-active"),$(this).addClass("ls-active")})}function c(){$("[data-ls-fields-enable]").off("click.ls"),$(".ls-disabled, [disabled='disabled']").off("click")}var u={"[data-toggle-class]|click":s,".ls-link-smooth|click":i};return jQuery.fn.toggleAttr=function(t){return this.each(function(){var e=$(this);return e.attr(t)?e.removeAttr(t):e.attr(t,t)})},{init:t}}();var locastyle=locastyle||{};locastyle.progressBar=function(){"use strict";function t(){e()}function e(){$("[data-ls-module='progressBar']").each(function(t,e){var a=$(e).attr("aria-valuenow");$(e).append("<span aria-valuenow='"+a+"%'>");var s=$(e).find("span");n(s,a)})}function n(t,e){$(t).css("width",e+"%")}return{init:t}}();var locastyle=locastyle||{};locastyle.form=function(){"use strict";function t(){i(),o(),s(),n(),e(),c(),a(),l()}function e(){"ls-window-xs"===locastyle.breakpointClass?($(".ls-label-text-sufix").parents(".ls-label").addClass("ls-label-text-has-sufix"),$(".ls-label-text-prefix").parents(".ls-label").addClass("ls-label-text-has-prefix")):$(".ls-label-text-sufix").prev('[class*="col-"]').addClass("ls-no-padding-right").find(":input").addClass("ls-no-right-radius ls-border")}function n(){$("textarea.ls-textarea-autoresize",".ls-label").each(function(t,e){var n=$(e);n.keyup(function(){if(!n.prop("scrollTop")){var t;do{t=n.prop("scrollHeight");var e=n.height();n.height(e-5)}while(t&&t!==n.prop("scrollHeight"))}n.height(n.prop("scrollHeight"))})})}function a(){$("textarea").each(function(t,e){var n=$(e).val(),a=n.split(/\r|\r\n|\n/),s=a.length,i=18*s;$(e).height(i+"px")})}function s(){$(".ls-mask-date").mask("00/00/0000"),$(".ls-mask-time").mask("00:00:00"),$(".ls-mask-date_time").mask("00/00/0000 00:00:00"),$(".ls-mask-cep").mask("00000-000"),$(".ls-mask-phone8").mask("0000-0000"),$(".ls-mask-phone9").mask("00009-0000"),$(".ls-mask-phone8_with_ddd").mask("(00) 0000-0000"),$(".ls-mask-phone9_with_ddd").mask("(00) 00009-0000"),$(".ls-mask-cpf").mask("000.000.000-00",{reverse:!0}),$(".ls-mask-cnpj").mask("00.000.000/0000-00",{reverse:!0}),$(".ls-mask-money").mask("#.##0,00",{reverse:!0,maxlength:!1}),$(".ls-mask-number").mask("#.##0",{reverse:!0,maxlength:!1}),$(".ls-mask-ip_address").mask("0ZZ.0ZZ.0ZZ.0ZZ",{translation:{Z:{pattern:/[0-9]/,optional:!0}}}),$(".ls-mask-percent").mask("##0,00%",{reverse:!0})}function i(){$(u.selectors.disable).each(function(t,e){var n=$(e);n.find(":input").each(function(t,e){var n=$(e);n.attr("disabled","disabled"),n.data("original-value",n.val())})})}function o(){$(u.selectors.text).each(function(t,e){$(e).find(":input").each(function(t,e){$(e).addClass("ls-form-text")}),$(e).data("form-text",!0)})}function r(t){if(void 0!==$(t).data("toggle-class")){var e=$(t).data("toggle-class").split(",");$(t).toggleClass(e[0]).toggleClass(e[1])}}function l(){$("[data-trigger-calendar]").on("click.ls",function(t){var e=$(this).data("trigger-calendar");$(e).trigger("click.ls")})}function c(){$(".ls-toggle-pass").on("click",function(t){t.preventDefault();var e=$(this).data("target");r($(this)),"password"===$(e).attr("type")?$(e).removeAttr("attr").prop("type","text"):$(e).removeAttr("attr").prop("type","password")})}var u={selectors:{disable:".ls-form-disable",text:".ls-form-text"}};return{init:t,togglePasswordField:c,triggerCalendar:l}}();var locastyle=locastyle||{};locastyle.guidedTour=function(){"use strict";function t(t){e(t)}function e(t){t&&t.selectors&&hopscotch&&($.each(l.selectors,function(e){t.selectors[e]=t.selectors[e]||l.selectors[e]}),n(t),o())}function n(t){r=t,$(l.selectors.init).on({click:s})}function a(t){return $(l.selectors.tour).trigger("click"),$(l.selectors.init).focus().attr("tabindex","-1"),t?t.preventDefault():null}function s(){locastyle.topbarCurtain.hideCurtains(),hopscotch.endTour(),hopscotch.startTour(r,0),i()}function i(){var t=39,e=37,n=27,a=hopscotch.getCurrTour().steps.length;$("body").off("keyup").on("keyup",function(s){var i=s.keyCode;hopscotch.getCurrStepNum()<a&&hopscotch.getState()&&(i===t&&hopscotch.nextStep(),i===e&&hopscotch.prevStep()),i===n&&hopscotch.endTour()})}function o(){"true"!==$.cookie("cookie_tour")&&($(l.selectors.tour).trigger("click"),$(l.selectors.init).focus().attr("tabindex","-1"),$.cookie("cookie_tour","true"))}var r,l={selectors:{init:".ls-btn-tour",tour:".ls-alerts-list .ls-ico-question"}};return{init:t,openWelcomeTour:a}}();var locastyle=locastyle||{};locastyle.topbarCurtain=function(){"use strict";function t(){e(),a(),i(),s(),c(),n(),u()}function e(){$(d.module).off("click.ls, ls.toggleTopCurtain"),$(".ls-notification-list").off("click.ls"),$("body").off("click.lsTopCurtain")}function n(){$(d.module).each(function(t,e){var n=$(e).data("target"),a=$(n+" .ls-dismissable:not(.ls-dismissed)").length;0!==a&&$('[data-target="'+n+'"]').attr("data-counter",a),0===a&&($('[data-target="'+n+'"]').removeAttr("data-counter"),$(n+" .ls-no-notification-message").addClass("active"))})}function a(){$(d.module).each(function(t,e){var n=$(e).position().left,a=11,s=$($(e).data("target")).width()/2,i=window.navigator.userAgent,r=i.indexOf("MSIE "),l=i.indexOf("Trident/");r>0||l>0?$($(e).data("target")).css({left:n+a-s+"px",top:"60px"}):$($(e).data("target")).css({left:n+a+s+"px"}),o(e)})}function s(){$(".ls-notification-list").on("click.ls",function(t){t.stopPropagation()})}function i(){$("body").on("click.lsTopCurtain",function(){l()})}function o(t){$(t).on("click.ls, ls.toggleTopCurtain",function(e){e.stopPropagation();var n=$($(t).data("target")).hasClass("ls-active");l(),n||($(t).addClass("ls-active"),r($(t).data("target")))})}function r(t){$(t).addClass("ls-active"),locastyle.dropdown.closeDropdown()}function l(){$("[data-ls-module='topbarCurtain']").removeClass("ls-active"),$(".ls-notification-list").removeClass("ls-active")}function c(){var t;$(window).resize(function(){clearTimeout(t),t=setTimeout(function(){e(),a(),i(),s()},300)})}function u(){var t=$(".ls-topbar .ls-user-account");$(".ls-sidebar .ls-user-account").length||t.clone().prependTo(".ls-sidebar")}var d={module:'[data-ls-module="topbarCurtain"]'};return{init:t,hideCurtains:l,unbind:e,updateStatusCounter:n}}();var locastyle=locastyle||{};locastyle.btnGroup=function(){"use strict";function t(){a(),n()}function e(){$(document).off("breakpoint-updated")}function n(){e(),$(document).on("breakpoint-updated",function(){a()})}function a(){("ls-window-sm"===locastyle.breakpointClass||"ls-window-xs"===locastyle.breakpointClass)&&($(".ls-regroup").each(function(t,e){s($(e).find("a, button"))}),locastyle.dropdown.init(),locastyle.modal.init(),locastyle.general.init())}function s(t){var e=$(t).wrap('<li class="hidden-xs hidden-sm">');t.parents(".ls-regroup").find('a[class*="ls-btn"]').removeClass(),t.parents(".ls-regroup").html(locastyle.templates.dropdown(e))}return{init:t}}();var locastyle=locastyle||{};locastyle.datepicker=function(){"use strict";function t(){$(s.selector).each(function(){$(this).hasClass("ls-daterange")||e($(this))}),$(s.rangeSelector).each(function(){n($(this))})}function e(t){t.pikaday(s.pikaday)}function n(t){var e=null,n=null,a={field:t[0],onSelect:function(){n.setMinDate(this.getDate())}},i={field:$(t.data("ls-daterange"))[0],onSelect:function(){e.setMaxDate(this.getDate())}};e=new Pikaday($.extend(a,s.pikaday)),n=new Pikaday($.extend(i,s.pikaday))}function a(t){e($(t))}var s={selector:".datepicker",rangeSelector:"[data-ls-daterange]",pikaday:{firstDay:1,minDate:new Date("2000-01-01"),maxDate:new Date("2020-12-31"),format:"DD/MM/YYYY",yearRange:[2e3,2020],i18n:{previousMonth:"Anterior",nextMonth:"Pr\xf3ximo",months:["Janeiro","Fevereiro","Mar\xe7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],weekdays:["Domingo","Segunda","Ter\xe7a","Quarta","Quinta","Sexta","S\xe1bado"],weekdaysShort:["Dom","Seg","Ter","Qua","Qui","Sex","S\xe1b"]}}};return{init:t,newDatepicker:a,createWithRange:n}}();var locastyle=locastyle||{};locastyle.charCounter=function(){"use strict";function t(t,e){$(".ls-number-counter-"+t).text(e)}function e(){$('[data-ls-module="charCounter"]').each(function(e,n){var a=$(n).attr("maxlength"),s='<p class="ls-help-inline"><small><strong class="ls-char-count ls-number-counter-'+e+'">'+a+"</strong> caracteres restantes</small></p>",i=$(n).closest(".ls-prefix-group");$(n).removeAttr("maxlength").data().maxlength=a,i.length?i.after(s):$(n).after(s),$(n).keyup(function(){var n=$(this).val().length,a=$(this).data().maxlength;n>a?($(this).val($(this).val().substring(0,a)),t(e,0)):t(e,a-n)}),$(n).trigger("keyup")})}function n(){e()}return{init:n}}();var locastyle=locastyle||{};locastyle.browserDetect=function(){"use strict";function t(){a()}function e(){return s=i.match(/(firefox)/)?i.match(/(firefox)/)[1]:i.match(/(msie|phantomjs|chrome|version|rv)/)[1]}function n(){return parseInt((i.match(/.+(?:firefox|phantomjs|msie|chrome|version|rv)[\/: ]([\d.]+)/)||[0,0])[1].split(".")[0],10)}function a(){$("html").addClass("ls-browser-"+e())}var s,i=navigator.userAgent.toLowerCase();return{init:t,browserName:e,browserVersion:n}}();var locastyle=locastyle||{};locastyle.browserUnsupportedBar=function(){"use strict";function t(){e(),a()}function e(){var t=locastyle.browserDetect.browserVersion(),e=locastyle.browserDetect.browserName(),a={chrome:34,firefox:29,version:5,msie:8};$.cookie("hideBrowserUnsupportedAlert")||t<=a[e]&&n()}function n(){$("html").addClass("ls-browser-unsupported"),$("body").prepend(locastyle.templates.browserUnsupportedBar())}function a(){$(".ls-dismiss[data-ls-module=dismiss]").on("click",function(){$("html").removeClass("ls-browser-unsupported"),$("html .ls-unsupported-bar").remove(),$.cookie("hideBrowserUnsupportedAlert",!0,{expires:1})})}return{init:t}}();var locastyle=locastyle||{};locastyle.trackEvents=function(){"use strict";function t(){window.ga?(locastyle.trackEvents.gaPresent=!0,e(locastyle.trackEvents),n()):locastyle.trackEvents.gaPresent=!1}function e(t){t.eventCategory=$("body").attr("data-ls-te-category")||window.location.pathname}function n(){a(),s(),i(),o(),u()}function a(){var t=$("a");$(t).each(function(t,e){var n={};if(n.category=$(e).data("ls-te-category")?$(e).data("ls-te-category"):null,
|
73
|
+
n.action=$(e).data("ls-te-action")?$(e).data("ls-te-action"):"open_link_#"+$(e).attr("href"),n.label=$(e).data("ls-te-label")?$(e).data("ls-te-label"):$(e).text(),$(e).attr("href")&&0===$(e).attr("href").indexOf("#")&&(n.action=$(e).data("ls-te-action")?$(e).data("ls-te-action"):"on_page_link_"+$(e).attr("href")),"tabs"===$(e).attr("data-ls-module")&&(n.action="tab_navigation"),"dropdown"===$(e).parent().attr("data-ls-module")&&($(e).parents(".ls-topbar").length>0?(n.action="top_bar_action",n.label="Toggle user dropdown"):n.action="dropdown_toggle"),"modal"===$(e).attr("data-ls-module")){var a=$(e).data("target")?$(e).data("target"):$(e).attr("href");n.action="open_modal_"+a}"collapse"===$(e).parent().attr("data-ls-module")&&(n.type="collapse"),"topbarCurtain"===$(e).attr("data-ls-module")&&(n.action="top_bar_action"),r(e,n)})}function s(){var t=$("button");$(t).each(function(t,e){var n={};n.category=$(e).data("ls-te-category")?$(e).data("ls-te-category"):null,n.action=$(e).data("ls-te-action")?$(e).data("ls-te-action"):"on_page_button_#",n.label=$(e).data("ls-te-label")?$(e).data("ls-te-label"):$(e).text();var a;"modal"===$(e).attr("data-ls-module")&&(a=$(e).data("target")?$(e).data("target"):$(e).attr("href"),n.action="open_modal_"+a),"modal"===$(e).attr("data-dismiss")&&(a=$($(e).parents(".ls-modal")).attr("id"),n.action="close_modal_#"+a),r(e,n)})}function i(){var t=$("form");$(t).each(function(t,e){var n={};$(e).parents(".ls-modal").length?n.action="submit_form_#"+($(e).data("action")||$(e).attr("id")||$(e).attr("action"))+"#inside_modal#"+$(e).parents(".ls-modal").attr("id"):n.action="submit_form_#"+($(e).data("action")||$(e).attr("id")||$(e).attr("action")),n.label=$(e).find(":submit[type=submit]").val()||$(e).find(":submit[type=submit]").text(),l(e,n)})}function o(){var t=$("select");$(t).each(function(t,e){var n={};n.category=$(e).data("ls-te-category")?$(e).data("ls-te-category"):null,n.action="select_change_#"+($(e).attr("id")||$(e).attr("name")),n.label="option",c(e,n)})}function r(t,e){$(t).off("click.lsTrackEvent"),$(t).on("click.lsTrackEvent",function(){if("collapse"===e.type){var n=$(t).parent().attr("id");$("#"+n).hasClass("ls-collapse-open")?(e.action="close_collapse_#"+n,e.label="Close collapse"):(e.action="open_collapse_#"+n,e.label="Open collapse")}ga("send","event",e.category||locastyle.trackEvents.eventCategory,e.action,e.label)})}function l(t,e){$(t).find(":submit[type=submit]").off("click.lsTrackEvent"),$(t).off("submit.ls"),$(t).on("submit.ls",function(){ga("send","event",locastyle.trackEvents.eventCategory,e.action,e.label)})}function c(t,e){$(t).off("change.ls"),$(t).on("change.ls",function(){e.label=$(this).val(),ga("send","event",e.category||locastyle.trackEvents.eventCategory,e.action,e.label)})}function u(){$("body").off("click.lsTrackEvents"),$("body").on("click.lsTrackEvents",".hopscotch-bubble .hopscotch-nav-button",function(){var t=$(this).parents(".hopscotch-bubble").find(".hopscotch-bubble-number").text();ga("send","event",locastyle.trackEvents.eventCategory,"go_to_tour_step["+t+"]",$(this).text())})}return{init:t}}();var locastyle=locastyle||{};locastyle.steps=function(){"use strict";function t(){e(),n(),a(),o(),r(),s(),l(),i(),c(),u()}function e(){$(b.selectors.nav).off("click.steps"),$(b.actions.next).off("click.steps"),$(b.actions.prev).off("click.steps")}function n(){$(".ls-steps-nav li").prepend('<span class="ls-steps-arrow" />')}function a(){$(b.selectors.nav).attr("role","tablist"),$(b.selectors.nav).find(b.selectors.button).attr("aria-selected","false"),$(b.selectors.nav).find(".ls-active .ls-steps-btn").attr("aria-selected","true"),$(b.selectors.button).attr("role","tab"),$(b.selectors.container).attr({"aria-hidden":!0,role:"tabpanel"})}function s(){var t=$(b.selectors.nav).find("li");t.each(function(e){$(this).hasClass(b.status.active)&&$(b.selectors.mobile).attr({"data-index":e+1+" de "+t.length,"data-title":$(this).find(b.selectors.button).attr("title")})})}function i(){$(b.selectors.mobile).on("click.steps",function(){$(b.selectors.steps).toggleClass(b.status.active)})}function o(){for(var t=$(b.selectors.button),e=t.length,n=0;e>n;n++){var a=$(t[n]).attr("title");$(t[n]).attr({"aria-label":a})}}function r(){var t=$(b.selectors.nav).find(b.classes.active).index();-1===t?$(b.selectors.nav).each(function(){var t=$(this).find("li:first").find(b.selectors.button),e=t.data("target");m(t,$(e))}):(p(t),$(b.selectors.nav).find("li:lt("+t+")").addClass(b.status.actived));var e=$(b.selectors.moduleVisible).height();f(e)}function l(){$(b.selectors.nav).on("click.steps",b.selectors.moduleActive,function(t){t.preventDefault(),g($(this))})}function c(){$(b.actions.next).on("click.steps",function(t){t.preventDefault(),d()})}function u(){$(b.actions.prev).on("click.steps",function(t){t.preventDefault(),h()})}function d(){var t=jQuery.Event("NextStepEvent");$(document).trigger(t);var e=jQuery.Event("BeforeNextStep");if($(document).trigger(e),!t.isDefaultPrevented()&&!e.isDefaultPrevented()){var n=$(b.selectors.nav).find(b.classes.active).next("li").addClass(b.status.active).find(b.selectors.button);g(n),$(document).trigger(jQuery.Event("AfterNextStep"))}}function h(){var t=jQuery.Event("PrevStepEvent");$(document).trigger(t);var e=jQuery.Event("BeforePrevStep");if($(document).trigger(e),!t.isDefaultPrevented()&&!e.isDefaultPrevented()){var n=$(b.selectors.nav).find(b.classes.active).prev("li").find(b.selectors.button);g(n),$(document).trigger(jQuery.Event("AfterPrevStep"))}}function f(t){var e=$(b.selectors.nav),n=e.offset(),a=$(b.selectors.nav).height();$(window).scroll(function(){if(!($(window).width()<768))if($(window).scrollTop()>n.top){var s=parseInt($(window).scrollTop()-a,10);e.stop().animate({marginTop:$(window).scrollTop()-n.top+20}),s+a>=t&&e.stop().animate({marginTop:0})}else e.stop().animate({marginTop:0})})}function p(t){$(b.selectors.container).eq(t).addClass(b.status.active)}function g(t){var e=$(t.attr("href")||t.data("target"));m(t,e),v(t,e),y(),s(),$("html").hasClass("ls-screen-xs")&&$(b.selectors.nav).hasClass(b.status.active)&&$(b.selectors.mobile).trigger("click")}function m(t,e){$(t).parents("li").addClass(b.status.active),$(t).parents("li").prev("li").addClass(b.status.actived),e.addClass(b.status.active).attr({"aria-hidden":!1}),$(t).attr("aria-selected",!0)}function v(t,e){$(t).parents("li").siblings().removeClass(b.status.active),e.siblings().removeClass(b.status.active).attr({"aria-hidden":!0}),$(t).parents("li").siblings().find(b.selectors.button).attr("aria-selected",!1)}function y(){$("html, body").stop().animate({scrollTop:$(".ls-steps").offset().top-60},300);var t=$(b.selectors.moduleVisible).height();f(t)}var b={selectors:{moduleActive:'.ls-actived [data-ls-module="steps"]',nav:".ls-steps-nav",button:".ls-steps-btn",container:".ls-steps-content",steps:".ls-steps",moduleVisible:".ls-steps-content:visible",mobile:".ls-steps-mobile"},status:{active:"ls-active",actived:"ls-actived"},classes:{active:".ls-active"},actions:{next:'.ls-steps-content [data-action="next"]',prev:'.ls-steps-content [data-action="prev"]'}};return{init:t,unbind:e,nextStep:d,prevStep:h}}();var locastyle=locastyle||{};locastyle.button=function(){"use strict";function t(){e(),i(),n(),l()}function e(){$("[data-ls-module=button]").off("click.button")}function n(){$('[data-ls-module="button"]').on("click.button",function(t){t.preventDefault();var e=$($(this).attr("href")||$(this).data("target")),n="[data-ls-module=button]";r(this,e,n),o(this,e),a(),$(this).find("input").prop("checked",!0)})}function a(){$('[data-ls-module="button"] input[type="radio"]').each(function(t,e){$(e).removeAttr("checked")})}function s(t){$(t).each(function(t,e){$(e).attr("checked","checked")})}function i(){$(".ls-tabs-btn-nav li.ls-active").each(function(){if($(this).hasClass("ls-active")===!0){var t=$(this).find('[data-ls-module="button"]'),e=t.attr("href")||t.data("target"),n="[data-ls-module=button]";s($(this).find('[data-ls-module="button"] input[type="radio"]')),r(t,e,n),o(t,e)}})}function o(t,e){$(t).parents("li").addClass("ls-active"),$(e).addClass("ls-active"),$(t).attr("aria-selected",!0)}function r(t,e,n){$(t).parents("li").siblings().removeClass("ls-active"),$(e).siblings().removeClass("ls-active"),$(t).parents("li").siblings().find(n).attr("aria-selected",!1)}function l(){$(".ls-tabs-btn-nav").attr("role","tablist"),$(".ls-tabs-btn-nav .ls-btn").attr("role","tab"),$(".ls-tabs-btn-nav .ls-active .ls-btn").attr("aria-selected","true"),$(".ls-tabs-btn .ls-tab-content").attr("role","tabpanel")}return{init:t,unbind:e}}();var locastyle=locastyle||{};locastyle.switchButton=function(){"use strict";function t(){e(),s()}function e(){$(i.switchButton).on("click.ls",function(t){0===$(this).find("a").length&&(a($(this)),n($(this)),t.stopPropagation())})}function n(t){t.find("input[type=checkbox]").prop("checked")?t.trigger("switchButton:activated"):t.trigger("switchButton:deactivated")}function a(t){t.toggleClass(i.openedClass)}function s(){$(i.switchButton).find("input[type=checkbox]").each(function(){$(this).prop("checked")&&$(this).closest(i.switchButton).addClass(i.openedClass)})}var i={switchButton:"[data-ls-module=switchButton]",openedClass:"ls-switch-btn-active"};return{init:t}}();var locastyle=locastyle||{};locastyle.toggleText=function(){"use strict";function t(t,e,n){t.trigger(i.triggerChange,[e,n])}function e(e){var n=e.data("target-text")?$(e.data("target-text")):e,a=e.data("toggle-text"),s=n.text();e.data("toggle-text",s),n.text(a),t(e,n,a)}function n(){$(i.trigger).on("click.ls",function(t){t.preventDefault(),e($(this)),t.stopPropagation()})}function a(){$(i.trigger).off("click.ls")}function s(){a(),n()}var i={trigger:"[data-ls-module=toggleText]",triggerChange:"toggleText:change"};return{init:s}}();var locastyle=locastyle||{};locastyle.checkboxToggle=function(){"use strict";function t(t){t.prop("checked",!1).removeClass("ls-checked")}function e(t){t.prop("checked",!0).addClass("ls-checked")}function n(t){if(t.data("toggleText")){var e=t.data("toggleText"),n=t.text();t.data("toggleText",n).text(e)}}function a(t,e){for(var a=0;a<e.length;a++)if(!e[a].checked)return t.hasClass("ls-triggered")&&n(t),t.prop("checked",!1).removeClass("ls-triggered"),!1;t.prop("checked",!0).addClass("ls-triggered"),n(t)}function s(t){t.hasClass("ls-triggered")?t.trigger("checkboxToggle:activated"):t.trigger("checkboxToggle:deactivated")}function i(i,o){i.on("click.ls",function(){$(this).hasClass("ls-triggered")?t(o):e(o),$(this).toggleClass("ls-triggered"),s($(this)),n($(this))}),o.each(function(){$(this).on("click.ls",function(){$(this).toggleClass("ls-checked"),a(i,o)})})}function o(){$(r.selector.module).each(function(){var t=$(this),e=$('[data-checkbox-toggle="'+t.data("checkboxTarget")+'"]');t.off("click.ls"),e.off("click.ls"),i(t,e)})}var r={selector:{module:'[data-ls-module="checkboxToggle"]'}};return{init:o}}();
|