"use strict";function extend(o,i){var t=Object.prototype.toString,e=t.call({});for(var n in i)i[n]&&e==t.call(i[n])?(o[n]=o[n]||{},extend(o[n],i[n])):o[n]=i[n];return o}var MeteoFR=MeteoFR||{};extend(MeteoFR,{atmogramme:{commun:{trim:function(o){return o.replace(/^\s+|\s+$/g,"")},ltrim:function(o){return o.replace(/^\s+/,"")},rtrim:function(o){return o.replace(/\s+$/,"")},indexOf:function(o){function i(i){return o.apply(this,arguments)}return i.toString=function(){return o.toString()},i}(function(o){return"function"==typeof Array.prototype.indexOf?indexOf=Array.prototype.indexOf:indexOf=function(o){var i=-1,t=-1;for(i=0;is||t.hasClass("resizedH"))&&(t.dialog("option","height",c).parent().css("max-height",c),t.addClass("resizedH")),(n+100>l||t.hasClass("resizedW"))&&(t.dialog("option","width",r).parent().css("max-width",r),t.addClass("resizedW")),(t.hasClass("resizedH")||t.hasClass("resizedW"))&&(t.dialog("option","position","center"),t.css("overflow","auto")),a&&t.css("-webkit-overflow-scrolling","touch")}};s(),o(window).on("resize",function(){s()}),window.addEventListener&&window.addEventListener("orientationchange",function(){s()}),i.options.showTitleBar||(i.uiDialogTitlebar.css({height:0,padding:0,background:"none",border:0}),i.uiDialogTitlebar.find(".ui-dialog-title").css("display","none")),i.options.showCloseButton||i.uiDialogTitlebar.find(".ui-dialog-titlebar-close").css("display","none"),i.options.clickOut&&!i.options.modal?(o('
').insertBefore(i.element.parent()),o("#dialog-overlay").css({position:"fixed",top:0,right:0,bottom:0,left:0,"background-color":"transparent"}),o("#dialog-overlay").click(function(o){o.preventDefault(),o.stopPropagation(),i.close()})):i.options.clickOut&&i.options.modal&&o(".ui-widget-overlay").click(function(o){i.close()}),i.options.dialogClass&&o(".ui-widget-overlay").addClass(i.options.dialogClass)};var e=o.ui.dialog.prototype.close;o.ui.dialog.prototype.close=function(){var i=this;e.apply(this,arguments),i.options.dialogClass&&o(".ui-widget-overlay").removeClass(i.options.dialogClass),o("#dialog-overlay").length&&o("#dialog-overlay").remove()}}(jQuery),function(o,i){function t(i,t){"undefined"!=typeof o("#"+i+":checked").val()?o("#"+i+t).check("on"):o("#"+i+t).check("off")}function e(i){o("#"+i).parent().parent().toggleClass("selectedligne",0)}function n(i){o("."+i).each(function(){o(this).check("on"),o(this).parent().parent().addClass("selectedligne",0)})}function a(i){o("."+i).each(function(){o(this).check("off"),o(this).parent().parent().removeClass("selectedligne",0)})}function s(i,t,e){o("#"+i).dialog({bgiframe:!0,autoOpen:!1,modal:!0,buttons:{Modifier:function(){t(e),o(this).dialog("close")},Fermer:function(){o(this).dialog("close")},Effacer:function(){o(this).find("input").val(""),o(this).find("input:checkbox").check("off")}}})}function l(i,t,e){o("#"+i).dialog({bgiframe:!0,autoOpen:!1,modal:!0,buttons:{Ok:function(){t(e),o(this).dialog("close")},Fermer:function(){o(this).dialog("close")}}})}function c(i,t,e){o("#"+i).dialog({bgiframe:!0,autoOpen:!1,modal:!0,width:700,buttons:{Modifier:function(){t(e),o(this).dialog("close")},Fermer:function(){o(this).dialog("close")},Effacer:function(){o(this).find("input").val(""),o(this).find("input:checkbox").check("off")}}})}function r(i,t,e){o("#"+i).dialog({bgiframe:!0,autoOpen:!1,modal:!0,buttons:{Ajouter:function(){t(e),o(this).dialog("close")},Fermer:function(){o(this).dialog("close")},Effacer:function(){o(this).find("input").val(""),o(this).find("input:checkbox").check("off")}}})}function d(i,t,e){o("#"+i).dialog({bgiframe:!0,autoOpen:!1,modal:!1,width:t,height:e,responsive:!0,buttons:{Fermer:function(){o(this).dialog("close")}}})}function u(i,t){o("#"+i).click(function(){o("#"+t).dialog("open"),o("#"+t+" input:first").focus()}).hover(function(){o(this).addClass("ui-state-hover")},function(){o(this).removeClass("ui-state-hover")}).mousedown(function(){o(this).addClass("ui-state-active")}).mouseup(function(){o(this).removeClass("ui-state-active")})}function f(i,t){o("#"+i).click(function(){o("#"+t).dialog("open"),o("#"+t+" input:first").focus()})}function p(o){var i=o.split("check"),t=i[1];return t}function h(i){o(".ligneselect:checked").each(function(t,e){var n=o(e).attr("id"),a=p(n),s=o("#"+i).val();o("#"+i+a).val(s)})}function g(){o(".ligneselect:checked").each(function(i,t){var e=o(t).attr("id"),n=p(e),a=o("#module").val();0!=a&&o("#module"+n).val(a)})}function v(i,t,e){o("#"+i).dialog({bgiframe:!0,autoOpen:!1,modal:!0,buttons:{Non:function(){o(this).dialog("close")},Oui:function(){t(e),o("#divConfirm").html(""),o(this).dialog("close")}}})}o.fn.check=function(o){var o=o||"on";return this.each(function(){switch(o){case"on":this.checked=!0;break;case"off":this.checked=!1;break;case"toggle":this.checked=!this.checked}})},o.widget("ui.dialog",o.extend({},o.ui.dialog.prototype,{_title:function(o){this.options.title?o.html(this.options.title):o.html(" ")}})),o.extend(i,{addDialogModifOuiNonPrevilo:v,updateModule:g,updateListe:h,getId:p,addOptionsLink:f,addOptionsButton:u,addDialog:d,addDialogAjout:r,addDialogAction:l,addSuperDialogModif:c,addDialogModif:s,unselectAll:a,selectAll:n,selectLigne:e,checkOption:t})}(jQuery,window);