automizy-js-api
Version:
JavaScript API library for Automizy Marketing Automation software
2 lines • 110 kB
JavaScript
(function(){return window.AutomizyJs=window.$A=new function(){var a=this;a.d={version:"0.5.3",settings:{logTranslateMissings:true},uniques:[],defines:{},dialogs:{},buttons:{},inputs:{},forms:{},validators:{},feedbacks:{},hashes:[]},a.m={},a.mt={},a["default"]={}},AutomizyJs})(),function(){var a=function(a){return"data:image/png;base64,"+a};$A.images={pageStepFirst:a("iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAYAAADtc08vAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAJDSURBVHjadNMxT9tAFAfw/53PLuasCiEkVLaCRGQImZBYGHHgG7QfgClbWTpW6kQXmGBh6tilHwCHMiRCIAWJCDsnMnWhC6pVybGRc4lfh2IaUvqkG+7u/U7vTu9ARHhu3N3dvW40Grf9fp+N711cXLQvLy+/EREYEWE84jh2fN+Ph8MhTNOE53lSSpkCQBAER0qpbQBYWFg45c/her0eDwYDMMYAAIyxfBw/rGsxinu9nnNychJrrcE5h+M4+dbWlgEAYRgejOJyubzvuu7OYwVJkkzW6/VYaw3G2BPc6XQOOp1ObRwDAC+w7/uJ1hoA4DgObWxsCABQSu2FYVgDACLC8vLyYYEBQERRNNdsNm8LPDMz01tfX38phKCHsmsAYBgGXNfdH8UAwFut1vcsy8AYA2MMq6urr0zTpCiK5pRStTzPAQBTU1PpOAYAvra2NmvbNorE8/Pzn1mWGdPT0z/K5fIu53+eKYqiyevr68/jBzAiwv39veX7fpZlGYgIUkp4nmdYlpV3u9337XZ7twClUulLpVJ5+1gBANi23a9Wq5ZlWeCcI0kS+L4/HAwGbHFx8VOlUvlQgJubmzdBEBw9OQAAJiYmtOd5tmma4JwjTVMcHx/nWmtWKpU+rqys7BIRGGNQSm2HYXjweIXReOiHRGuNPM8hhMDm5qaUUqZKqb0gCN4VufPz881/WllKmVar1RdCCDDGI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PfmXAIoAOv5v2YB79L+xxMLJvden90AfADWFYGTQDfwzRjXALuL6j+AsobkkxkXQFVylsE0sLex8ul8kLg7croL8IFKk1oFPAQOOHeGTm0HpqwzONaU6nnROVzbAtQBvU2pnpbO4dpy4K21tVKnY6jmGpCxCmeAL+aMgu6sADYDXy02GxOVnaKCFd2iMi4qcbPONKeeqagkQ9htrqrEl+iCAo2XD/bmbg+eTAA3Q5hlrojMLWEydqXqee6Wf3wtMAisDGF+u6oyBXgRJn+zL48eNtO7JoL55IpKHrgeASSBEjP+UcrHWtN9k4r4ihAS2dZ03z5FTkTUxxR5HzPDVq8q31UFK7bcGPA2qsqukNovVblwNd2vC3cnk0+XAgPAaut3/5gtFesnUN3mFcYBYkG2zStMqEq5qvjWF0us9Yiq7AkMFj0Fgdr7D5WZjmwFlgPzwGfAb69+9c7m/w0A36Atg3n1+QkAAAAASUVORK5CYII="),helpArrow:a("iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAC3SURBVHjanNRNCoMwEIbht5KFAbt00UN4CumpxVN4CIWsY10lXVVIY37GWQYeBiYz38N7T6nMOv0/+QZ5DUoppHAA5rbVIjgAc9c9e63rYYCAMjTrFKEiTKEszKEkLKFLWIMiWIsCKEEnlCKA5g76ddyAzTknWtqmf70NMO67Xay1oo7cwedUpTj4RwmONqcWX+5qDU5eRwln7zGHiwmQwrWZE2FJygVYmqsGGI/jw50kN845vgMAISKSwdQyAJUAAAAASUVORK5CYII=")}}(),function(){$.fn.removeAttributes=function(){return this.each(function(){var a=$.map(this.attributes,function(a){return a.name});var b=$(this);$.each(a,function(a,c){b.removeAttr(c)})})},$.fn.getAttributes=function(){var a={};return $.each(this[0].attributes,function(){if(this.specified)a[this.name]=this.value}),a},$.fn.removeClassPrefix=function(a){return this.each(function(b,c){var d=c.className.split(" ").filter(function(b){return 0!==b.lastIndexOf(a,0)});c.className=$.trim(d.join(" "))}),this},$.fn.ashow=function(){return this.removeClass("automizy-hide"),this},$.fn.ahide=function(){return this.addClass("automizy-hide"),this},$.fn.serializeObject=function(a){var b={};var a=a||false;var c=function(a,c){var d=b[c.name];if("undefined"!==typeof d&&null!==d)if($.isArray(d))d.push(c.value);else b[c.name]=[d,c.value];else b[c.name]=c.value};if(values=this.serializeArray(),a)values=values.concat(this.find("input[type=checkbox]:not(:checked)").map(function(){return{name:this.name,value:"off"}}).get());return $.each(values,c),b}}(),function(){$A.initBasicFunctions=function(a,b){var a=a||false;if(false===a)return false;var b=b||false;if(false===b)return false;var c=b.toLowerCase();var d=b.charAt(0).toLowerCase()+b.slice(1);var e=a.prototype;e.init=e.init||function(){var a=this;if("undefined"===typeof a.d.create)a.d.create=function(){};if("undefined"===typeof a.d.createFunctions)a.d.createFunctions=[];if("undefined"===typeof a.d.remove)a.d.remove=function(){};for(var b in a.d)if("undefined"!==typeof $A["default"][d][b]){if($A["default"][d][b]instanceof jQuery)$A["default"][d][b]=$A["default"][d][b].clone();a.d[b]=$A["default"][d][b]}},e.initParameter=e.initParameter||function(a){var b=this;if("string"===typeof a.id||"number"===typeof a.id)b.id(a.id);if("function"===typeof a.create)b.create(a.create);if("function"===typeof a.remove)b.remove(a.remove);if("array"===typeof a.buttons||"object"===typeof a.buttons)b.buttons(a.buttons);if("undefined"!==typeof a.target)b.drawTo(a.target);if("undefined"!==typeof a.data)b.data(a.data);if("undefined"!==typeof a.skin)b.skin(a.skin)},e.create=e.create||function(a){if("function"===typeof a)this.d.create=a;else return this.d.create.apply(this,[this,this.d.$widget]);return this},e.widget=e.widget||function(){return this.d.$widget},e.skin=e.skin||function(a){if("undefined"!==typeof a)return this.d.skin=a,this.d.$widget.removeClassPrefix("automizy-skin-"),this.d.$widget.addClass("automizy-skin-"+a),this;return this.d.skin},e.draw=e.drawTo=e.draw||function(a){var b=this;var a=a||$("body");return b.d.$widget.appendTo(a),b.d.hasObject=true,setTimeout(function(){for(var a=0;a<b.d.createFunctions.length;a++)b.d.createFunctions[a]();b.create()},50),this},e.show=e.show||function(){var a=this;if(!a.d.hasObject)a.draw();return this.d.$widget.ashow(),this},e.hide=e.hide||function(){var a=this;if($A.setWindowScroll(true,this.id()),"function"===typeof this.d.close)this.d.close(this,a.d.$widget);if("function"===typeof this.hash&&false!==this.hash())$A.hashChange(this.hash(),false);return this.d.$widget.ahide(),this},e.remove=e.remove||function(a){if("function"===typeof a)return this.d.remove=a,this;if(!this.d.hasObject)this.d.$widget.appendTo($("body:first"));if("function"===typeof this.d.removeAnimation)this.d.removeAnimation.apply(this,[this,this.d.$widget]);else{var b=this.d.$widget[0].parentElement;if("undefined"!==typeof b&&null!==b&&"function"===typeof b.removeChild)b.removeChild(this.d.$widget[0])}return $A.setWindowScroll(true,this.id()),delete $A.d[c+"s"][this.id()],this.d.remove.apply(this,[this,this.d.$widget]),true},e.id=e.id||function(a){if("number"===typeof a||"string"===typeof a){if($A.setWindowScroll(true,this.d.id))$A.setWindowScroll(false,a);return $A.d[c+"s"].renameProperty(this.d.id,a),this.d.$widget.attr("id",a),this.d.id=a,this}if("undefined"===typeof this.d.id)this.d.id=this.widget().attr("id")||"automizy-"+c+"-"+$A.getUniqueString(),this.id(this.d.id);return this.d.id},e.data=e.data||function(a,b){var c=this;if("undefined"===typeof c.d.data)c.d.data={};if(c.d.$widget[0].automizyData={},"undefined"===typeof a)return c.d.data;if("array"===typeof a||"object"===typeof a){for(var d in a)c.d.data[d]=a[d],c.d.$widget[0].automizyData[d]=a[d];return c}if("undefined"===typeof b)return c.d.data[a];return c.d.data[a]=b,c.d.$widget[0].automizyData[a]=b,c},e.addButton=e.addButton||function(a){var b=this;if("undefined"===typeof b.d.buttons)return b;if("undefined"!==typeof a){if(a instanceof $A.m.Button||a instanceof $A.m.Input)a.drawTo(b.d.$buttons||b.d.$widget);else{a.target=a.target||b.d.$buttons||b.d.$widget;var c=$A.newButton(a);b.d.buttons.push(c)}return b.d.$widget.addClass("has-button"),b}var c=$A.newButton();return b.d.buttons.push(c),c.drawTo(b.d.$buttons||b.d.$widget),c},e.removeButton=e.removeButton||function(a){var b=this;if("undefined"===typeof b.d.buttons)return b;if("string"===typeof a){for(var c=0;c<b.d.buttons.length;c++)if(b.d.buttons[c].id===a)b.d.buttons[c].remove()}else if("object"===typeof a)a.remove();return b},e.buttons=e.buttons||function(a){var b=this;if("undefined"===typeof b.d.buttons)b.d.buttons=[];if("undefined"!==typeof a){for(var c=0;c<b.d.buttons.length;c++)b.d.buttons[c].remove();for(var c in a)b.addButton(a[c]);return b}return b.d.buttons},$A.m[b]=a,$A.d[c+"s"]={},$A["default"][d]=$A["default"][d]||{},$A["new"+b]=function(b){var d=new a(b);return $A.d[c+"s"][d.id()]=d,d},$A["get"+b]=function(a){return $A.d[c+"s"][a]},$A["getAll"+b]=function(){return $A.d[c+"s"]},$A["remove"+b]=function(a){var c=$A["get"+b](a)||{};if("undefined"!==typeof c.remove)return c.remove();return true},$A["removeAll"+b]=function(){for(var a in $A["getAll"+b]())$A["remove"+b](a);return true},$A[d]=function(a){if("undefined"===typeof a)return $A["new"+b]();else if("string"===typeof a||"number"===typeof a)return $A["get"+b](a)||$A["new"+b]().id(a);else{if(a instanceof HTMLElement)a=$(a);if(a instanceof jQuery)return $A["get"+b](a.attr("id"))||$A["new"+b](a)}return $A["new"+b](a)}}}(),function(){var a=function(a){var b=this;if(b.d={$widget:$('<span class="automizy-button"></span>'),$widgetButton:$('<a href="javascript:;"></a>'),text:"My Button",skin:"simple-white","float":"none",width:"",hasObject:false,newRow:false,disabled:false,click:function(){},create:function(){},id:"automizy-button-"+$A.getUniqueString()},b.init(),b.d.$widgetButton.appendTo(b.d.$widget),b.d.$widgetButton.text(b.d.text),b.d.$widget.addClass("automizy-skin-"+b.d.skin).attr("id",b.id()),b.d.$widgetButton.click(function(){b.click()}),"undefined"!==typeof a){if("undefined"!==typeof a.disabled)b.disabled(a.disabled);if("undefined"!==typeof a.text)b.text(a.text);if("undefined"!==typeof a.html)b.html(a.html);if("undefined"!==typeof a["float"])b["float"](a["float"]);if("undefined"!==typeof a.width)b.width(a.width);if("undefined"!==typeof a.click)b.click(a.click);if("undefined"!==typeof a.newRow)b.newRow(a.newRow);b.initParameter(a)}};var b=a.prototype;b.text=b.val=b.value=function(a){var b=this;if("undefined"!==typeof a)return b.d.text=a,b.d.$widgetButton.text(a),b;return b.d.text},b.html=function(a){var b=this;if("undefined"!==typeof a)return b.d.html=a,b.d.$widgetButton.html(a),b;return b.d.html},b.width=function(a){var b=this;if("undefined"!==typeof a)return b.d.width=a,b.d.$widget.width(a),b.d.$widgetButton.width("100%"),b;return b.d.width},b.disabled=function(a){var b=this;if("undefined"!==typeof a)return b.d.disabled=$A.parseBoolean(a),b.d.$widgetButton.prop("disabled",b.d.disabled),b.d.$widget.toggleClass("disabled",b.d.disabled),b;return b.d.disabled},b.disable=function(){return this.disabled(true)},b.enable=function(){return this.disabled(false)},b["float"]=function(a){var b=this;if("undefined"!==typeof a)return b.d["float"]=a,b.d.$widget.css("float",a),b;return b.d["float"]},b.newRow=function(a){var b=this;if("undefined"!==typeof a){if(a=$A.parseBoolean(a),b.d.newRow=a,a)b.d.$widget.addClass("new-row");else b.d.$widget.removeClass("new-row");return b}return b.d.newRow},b.click=function(a){var b=this;if("function"===typeof a)b.d.click=a;else if(!b.disabled())b.d.click.apply(this,[this,this.d.$widget]);return b},b.button=function(){var a=this;return a.d.$widgetButton},$A.initBasicFunctions(a,"Button")}(),function(){$A.d.lastWindowScroll={top:0,left:0},$A.d.windowScrollIds=[],$A.d.hasScroll=[],$A.setWindowScroll=function(a,b){if("undefined"===typeof a)return $A.d.hasScroll;var b=b||false;var c=false;if(false!==b){var d=$A.d.windowScrollIds.indexOf(b);var e=d>-1;if(true===a){if(e)$A.d.windowScrollIds.splice(d,1),c=true}else if(!e)$A.d.windowScrollIds.push(b),c=true}else if(true===a)$A.d.windowScrollIds=[],c=true;if($A.d.windowScrollIds.length>0)return $A.d.hasScroll=false,$A.d.lastWindowScroll.top=$(window).scrollTop(),$A.d.lastWindowScroll.left=$(window).scrollLeft(),true;else if($A.d.hasScroll=a,!a)$A.d.lastWindowScroll.top=$(window).scrollTop(),$A.d.lastWindowScroll.left=$(window).scrollLeft();return c},$(window).scroll(function(){if(!$A.d.hasScroll)$(window).scrollTop($A.d.lastWindowScroll.top),$(window).scrollLeft($A.d.lastWindowScroll.left)})}(),function(){Object.defineProperty(Object.prototype,"renameProperty",{value:function(a,b){if(this.hasOwnProperty(a))this[b]=this[a],delete this[a];return this},enumerable:false}),Object.defineProperty(Array.prototype,"remove",{value:function(a){var b=0;for(var c=0;c<this.length;c++)if(this[c]===a)this.splice(c,1),b++,c--;return b},enumerable:false})}(),function(){$A.getUniqueString=function(){var a=(Math.random()+1).toString(36).substring(2);if($.inArray(a,$A.d.uniques)>=0)return $A.getUniqueString();return $A.d.uniques.push(a),a}}(),function(){var a=function(a){var b=this;b.d={$widget:$('<table cellpadding="0" cellspacing="0" border="0" class="automizy-dialog"></table>'),$cell:$('<td class="automizy-dialog-cell"></td>'),$box:$('<div class="automizy-dialog-box"></div>'),$head:$('<div class="automizy-dialog-head"></div>'),$buttons:$('<div class="automizy-dialog-buttons"></div>'),$content:$('<div class="automizy-dialog-content"></div>'),buttons:[],positionX:"center",positionY:"middle",title:"My Dialog",width:"60%",maxWidth:"100%",minWidth:"250px",minHeight:"0px",zIndex:2501,isClose:true,hasObject:false,hash:false,closable:true,id:"automizy-dialog-"+$A.getUniqueString(),create:function(){},open:function(){},close:function(){}},b.init();var c=$("<tr></tr>");if(b.d.$cell.appendTo(c),c.appendTo(b.d.$widget),b.d.$box.click(function(){b.d.isClose=false}).appendTo(b.d.$cell),b.d.$widget.attr("id",b.id()).click(function(){if(b.d.isClose)b.close();else b.d.isClose=true}),b.d.$head.appendTo(b.d.$box),b.d.$content.appendTo(b.d.$box),b.d.$buttons.appendTo(b.d.$box),"undefined"!==typeof a){if("undefined"!==typeof a.title)b.title(a.title);if("undefined"!==typeof a.positionX)b.positionX(a.positionX);if("undefined"!==typeof a.positionY)b.positionY(a.positionY);if("undefined"!==typeof a.position)b.position(a.position);if("undefined"!==typeof a.width)b.width(a.width);if("undefined"!==typeof a.maxWidth)b.maxWidth(a.maxWidth);if("undefined"!==typeof a.minWidth)b.minWidth(a.minWidth);if("undefined"!==typeof a.maxWidth)b.maxWidth(a.maxWidth);if("undefined"!==typeof a.minHeight)b.minHeight(a.minHeight);if("undefined"!==typeof a.zIndex)b.zIndex(a.zIndex);if("undefined"!==typeof a.closable)b.closable(a.closable);if("function"===typeof a.open)b.open(a.open);if("function"===typeof a.close)b.close(a.close);if("undefined"!==typeof a.content)b.content(a.content);if("undefined"!==typeof a.hash)b.hash(a.hash);b.initParameter(a)}};var b=a.prototype;b.title=function(a){var b=this;if("undefined"!==typeof a)return b.d.title=a,b.d.$head.html(a),b;return b.d.title},b.hash=function(a){var b=this;if("undefined"!==typeof a)return b.d.hash=a,b;return b.d.hash},b.content=function(a){var b=this;if("undefined"!==typeof a){if(b.d.$content.empty(),a instanceof jQuery)a.appendTo(b.d.$content);else if("object"===typeof a&&"function"===typeof a.draw)a.draw(b.d.$content);else b.d.$content.html(a);return b}return b.d.$content},b.positionX=function(a){var b=this;if("undefined"!==typeof a){if($cell=b.d.$cell,"left"===a)$cell.css({textAlign:"left",textIndent:0});else if("right"===a)$cell.css({textAlign:"right",textIndent:0});else if("center"===a||"middle"===a)a="center",$cell.css({textAlign:"center",textIndent:0});else $cell.css({textAlign:"left",textIndent:a});return b.d.positionX=a,b}return b.d.positionX},b.positionY=function(a){var b=this;if("undefined"!==typeof a){if($cell=b.d.$cell,"top"===a)$cell.css({verticalAlign:"top",paddingTop:0,paddingBottom:0});else if("bottom"===a)$cell.css({verticalAlign:"bottom",paddingTop:0,paddingBottom:0});else if("center"===a||"middle"===a)a="middle",$cell.css({verticalAlign:"middle",paddingTop:0,paddingBottom:0});else $cell.css({verticalAlign:"top",paddingTop:a,paddingBottom:a});return b.d.positionY=a,b.setMaxHeight(),b}return b.d.positionY},b.position=function(a){var b=this;if("string"===typeof a){var c=a.split(" ");return b.positionX(c[0]),b.positionY(c[1]),b.d.positionX=c[0],b.d.positionY=c[1],b.setMaxHeight(),b}else if("undefined"!==typeof a)console.warn("Bad parameter type.",a);return b.d.positionX+" "+b.d.positionY},b.width=function(a){var b=this;if("undefined"!==typeof a)return b.d.width=a,b.d.$box.width(a),b;return b.d.width},b.maxWidth=function(a){var b=this;if("undefined"!==typeof a)return b.d.maxWidth=a,b.d.$box.css("maxWidth",a),b;return b.d.maxWidth},b.minWidth=function(a){var b=this;if("undefined"!==typeof a)return b.d.minWidth=a,b.d.$box.css("minWidth",a),b;return b.d.minWidth},b.minHeight=function(a){var b=this;if("undefined"!==typeof a)return b.d.minHeight=a,b.d.$box.css("min-height",a),b.d.$content.css("min-height",parseInt(b.d.$box.css("min-height"))-108+"px"),b.setMaxHeight(),b;return b.d.minHeight},b.zIndex=function(a){var b=this;if("undefined"!==typeof a&&Number(a)===a&&a%1===0)return b.d.zIndex=a,b.d.$widget.css({zIndex:a}),b;else console.warn("Bad parameter type.",a);return b.d.zIndex},b.show=function(a){var b=this;if($A.setWindowScroll(false,this.d.id),!b.d.hasObject)b.draw();return this.d.$widget.ashow(),b.setMaxHeight(),this},b.open=function(a){var b=this;if("function"===typeof a)b.d.open=a;else{if(false!==b.hash())$A.hashChange(b.hash());b.d.open.apply(this,[this,this.d.$widget]),b.show()}return b.setMaxHeight(),b},b.closable=function(a){var b=this;if("undefined"!==typeof a)b.d.closable=a;else return b.d.closable;return b},b.close=function(a){var b=this;if("function"===typeof a)b.d.close=a;else if(b.d.closable)b.hide(),b.d.close.apply(this,[this,this.d.$widget]);return b},b.setMaxHeight=function(){var a=this;var b=$(window).height()-$(a.d.$buttons).outerHeight()-$(a.d.$head).outerHeight();if("NaN"!==parseInt(a.d.positionY))b-=parseInt(a.d.positionY);$(a.d.$content).css({"max-height":b})},$A.initBasicFunctions(a,"Dialog")}(),function(){$A.d.defines.input={},$A.d.defines.input.setupSelectObj={multiple:false,header:false,selectedList:1,create:function(a,b){var c=$(this);c.removeAttr("multiple");var d=c.multiselect("widget");var e=d.find(".ui-multiselect-checkboxes span");e.each(function(){$(this).html($(this).html().replace(/</g,"<").replace(/>/g,">"))});var f=c.parent().find(".ui-multiselect");f.find(".ui-icon").removeClass("ui-icon-triangle-2-n-s"),setTimeout(function(){f.css({maxWidth:c.width()})},1)},open:function(a,b){var c=$(this).multiselect("widget");if(c.width($(this).parent().find(".ui-multiselect").width()+8),c.find(".ui-corner-all").removeClass("ui-corner-all"),c.find(".ui-multiselect-checkboxes li:first").find("span").html().length<=0)c.find(".ui-multiselect-checkboxes li:first").css({height:"0",margin:"0",padding:"0",border:"none",opacity:"0","pointer-events":"none"})},close:function(a,b){},click:function(a,b){}},$A.d.defines.input.setupSelectListObj={multiple:false,height:150,header:false,selectedList:1,create:function(a,b){var c=$(this);c.attr("multiple","multiple");var d=c.multiselect("widget");var e=d.find(".ui-multiselect-checkboxes span");e.each(function(){$(this).html($(this).html().replace(/</g,"<").replace(/>/g,">"))});var f=c.parent().find(".ui-multiselect");f.find(".ui-icon").removeClass("ui-icon-triangle-2-n-s"),setTimeout(function(){f.css({maxWidth:c.width()})},1),c.multiselect("open")},open:function(a,b){var c=$(this).parent().find(".ui-multiselect");var d=$(this).multiselect("widget");if(d.width($(this).parent().find(".ui-multiselect").width()+8),d.find(".ui-corner-all").removeClass("ui-corner-all"),d.find(".ui-multiselect-checkboxes li:first").find("span").html().length<=0)d.find(".ui-multiselect-checkboxes li:first").css({height:"0",margin:"0",padding:"0",border:"none",opacity:"0","pointer-events":"none"});d.find(".ui-multiselect-checkboxes").css({backgroundColor:"#f7f8f0"}),c.css({display:"none"}),$(function(){d.css({position:"relative",top:0,left:0,zIndex:0}).appendTo(c.parent())})},beforeclose:function(a,b){return false},click:function(a,b){$(this).trigger("change")}},$A.d.defines.input.setupSelectSearchCheckObj={multiple:true,header:"",selectedList:1,noneSelectedText:"",selectedText:"# selected",create:function(a,b){var c=$(this);c.attr("multiple","multiple"),c.multiselect("uncheckAll").multiselectfilter({label:"Filter: "});var d=c.multiselect("widget");var e=d.find(".ui-multiselect-checkboxes span");var f=c.parent().find(".ui-multiselect");setTimeout(function(){f.css({maxWidth:c.width()})},1),e.each(function(){$(this).html($(this).html().replace(/</g,"<").replace(/>/g,">"))})},beforeopen:function(){var a=$(this).multiselect("widget");var b=a.find(".ui-widget-header");if(a.find(".ui-multiselect-filter").contents().filter(function(){return 1!=this.nodeType}).remove(),b.find("svg").length<1)$('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" style="float:right; margin:2px 4px 0 0"><g transform="scale(0.03)"><path fill="none" stroke="#999" stroke-width="36" stroke-linecap="round"d="m280,278a153,153 0 1,0-2,2l170,170m-91-117 110,110-26,26-110-110"/></g></svg>').appendTo(b);$A.setWindowScroll(false,"multiselect")},beforeclose:function(){$A.setWindowScroll(true,"multiselect")}},$A.d.defines.input.upAndDownControl={create:function(a,b,c,d,e,f,g){return $('<input class="ui-timepicker-input" value="'+d+'" maxlength="'+f.toString().length+'" style="width:50%">').appendTo(b).jStepper({minValue:e,maxValue:f,allowDecimals:false}).spinner({min:e,max:f,step:g,change:function(b,c){if(void 0!==b.originalEvent)a._onTimeChange();a._onSelectHandler()},spin:function(d,e){a.control.value(a,b,c,e.value),a._onTimeChange(),a._onSelectHandler()}}),b},options:function(a,b,c,d,e){if("string"==typeof d&&void 0!==e)return b.find(".ui-timepicker-input").spinner(d,e);return b.find(".ui-timepicker-input").spinner(d)},value:function(a,b,c,d){if(void 0!==d)return b.find(".ui-timepicker-input").spinner("value",d);return b.find(".ui-timepicker-input").spinner("value")},click:function(a,b){$(this).trigger("change")}}}(),function(){$A.parseBoolean=function(a,b){if("string"===typeof a)a=a.toLowerCase();switch(a){case true:case"true":case 1:case"1":case"on":case"yes":case"y":case"\u2713":case"\u2714":case"\u2611":case"\u2612":a=true;break;case false:case"false":case 0:case"0":case"off":case"no":case"n":case"x":case"\u2717":case"\u2718":case"\u2610":a=false;break;default:if(b)a=null;else a=false}return a}}(),function(){var a=function(a){var b=this;if(b.d={email:false,domain:false,url:false,domainOrUrl:false,"int":false,number:false,minLength:false,maxLength:false,min:false,max:false,file:false,sameas:false,isValid:true,notEmpty:false,validValues:[],errors:[],options:{},id:"automizy-validator-"+$A.getUniqueString(),regular:{email:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,domain:/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}: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EF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i},input:false,value:""},"object"===typeof a)b.set(a)};var b=a.prototype;b.set=function(a){var b=this;if("string"===typeof a){var c=a;a={},a[c]=true}if("undefined"!==typeof a.value)b.d.value=a.value;if("undefined"!==typeof a.email)b.d.options.email=$A.parseBoolean(a.email);if("undefined"!==typeof a.domain)b.d.options.domain=$A.parseBoolean(a.domain);if("undefined"!==typeof a.url)b.d.options.url=$A.parseBoolean(a.url);if("undefined"!==typeof a.domainOrUrl)b.d.options.domainOrUrl=$A.parseBoolean(a.domainOrUrl);if("undefined"!==typeof a["int"])b.d.options["int"]=$A.parseBoolean(a["int"]);if("undefined"!==typeof a.number)b.d.options.number=$A.parseBoolean(a.number);if("undefined"!==typeof a.minLength)b.d.options.minLength=parseInt(a.minLength);if("undefined"!==typeof a.maxLength)b.d.options.maxLength=parseInt(a.maxLength);if("undefined"!==typeof a.min)b.d.options.min=parseInt(a.min);if("undefined"!==typeof a.max)b.d.options.max=parseInt(a.max);if("undefined"!==typeof a.file)b.d.options.file=$A.parseBoolean(a.file);if("undefined"!==typeof a.sameas)b.d.options.sameas=a.sameas;if("undefined"!==typeof a.notEmpty)b.d.options.notEmpty=a.notEmpty;if("undefined"!==typeof a.invalidValue)b.d.options.invalidValue=a.invalidValue;return b},b.run=function(a){var b=this;if(("object"===typeof a||"array"===typeof a)&&!$.isArray(a))b.set(a);if("string"===typeof a||"number"===typeof a||$.isArray(a))b.value(a);b.d.errors=[],b.d.isValid=true;for(var c in b.d.options){var d=b.d.options[c];if("email"===c&&true===d)b.email(b.d.value);if("domain"===c&&true===d)b.domain(b.d.value);if("url"===c&&true===d)b.url(b.d.value);if("domainOrUrl"===c&&true===d)b.domainOrUrl(b.d.value);if("int"===c&&true===d)b["int"](b.d.value);if("num"===c&&true===d)b.num(b.d.value);if("minLength"===c&&!isNaN(d))b.minLength(b.d.value,d);if("maxLength"===c&&!isNaN(d))b.maxLength(b.d.value,d);if("min"===c&&!isNaN(d))b.min(b.d.value,d);if("max"===c&&!isNaN(d))b.max(b.d.value,d);if("file"===c&&true===d)b.file(b.d.value);if("sameas"===c&&"undefined"!==typeof d)b.sameas(b.d.value,d);if("notEmpty"===c&&true===d)b.notEmpty(b.d.value);if("invalidValue"===c)b.invalidValue(b.d.value,d)}return b},b.execute=function(a){var b=this;if("undefined"===typeof a)var a=false;if(null===a)a=[];return b.run(a),b.d.isValid},b.errors=function(){return this.d.errors},b.value=b.val=function(a){var b=this;if("undefined"!==typeof a)return b.d.value=a,b;return b.d.value},b.email=function(a){this.d.email=true;var b=this.d.regular.email.test(a);if(false===b)this.d.isValid=false,this.d.errors.push("Invalid email address");return b},b.domain=function(a){this.d.domain=true;var b=this.d.regular.domain.test(a);if(false===b)this.d.isValid=false,this.d.errors.push("Invalid domain");return b},b.url=function(a){this.d.url=true;var b=this.d.regular.url.test(a);if(false===b)this.d.isValid=false,this.d.errors.push("Invalid URL");return b},b.domainOrUrl=function(a){this.d.domainOrUrl=true;var b=this.d.regular.domain.test(a)||this.d.regular.url.test(a);if(false===b)this.d.isValid=false,this.d.errors.push("Invalid domain or URL");return b},b["int"]=b.integer=function(a){this.d["int"]=true;
var b=a==+a&&a==(0|a);if(false===b)this.d.isValid=false,this.d.errors.push("Not an integer");return b},b.num=b.number=function(a){this.d.number=true;var b=!isNaN(a);if(false===b)this.d.isValid=false,this.d.errors.push("Not a number");return b},b.minLength=b.minLen=function(a,b){b=parseInt(b),this.d.minLength=b;var c=a.length>=b;if(false===c)this.d.isValid=false,this.d.errors.push("Too short");return c},b.notEmpty=function(a){this.d.notEmpty=true;var b=""!=a;if(false===b)this.d.isValid=false,this.d.errors.push("No empty");return b},b.maxLength=function(a,b){b=parseInt(b),this.d.maxLength=b;var c=a.length<=b;if(false===c)this.d.isValid=false,this.d.errors.push("Too long");return c},b.min=function(a,b){b=parseInt(b),this.d.min=b;var c=a>=b;if(false===c)this.d.isValid=false,this.d.errors.push("Too little");return c},b.max=function(a,b){b=parseInt(b),this.d.max=b;var c=a<=b;if(false===c)this.d.isValid=false,this.d.errors.push("Too many");return c},b.file=function(){},b.sameas=function(a,b){if("function"===typeof b.val)b=b.val();var c=a===b;if(false===c)this.d.isValid=false,this.d.errors.push("The values are not equals");return c},b.invalidValue=function(a,b){this.d.invalidValue=b;var c=a!=b;if(false===c)this.d.isValid=false,this.d.errors.push("Invalid value");return c},b.errors=function(){return this.d.errors},b.id=function(a){if("number"===typeof a||"string"===typeof a)return $A.d.validator.renameProperty(this.d.id,a),this.d.id=a,this;return this.d.id},b.data=function(a,b){if("undefined"===typeof this.d.data)this.d.data={};if("string"!==typeof a)return this.d.data;if("undefined"===typeof b)return this.d.data[a];return this.d.data[a]=b,this},$A.m.Validator=a,$A.d.validator=new $A.m.Validator,$A.validate=function(){return $A.d.validator},$A.newValidator=$A.createValidator=function(b){var c=new a(b);return $A.d.validators[c.d.id]=c,c},$A.getValidator=function(a){return $A.d.validatorss[a]},$A.getAllValidator=function(){return $A.d.validators},$A.removeValidator=$A.deleteValidator=function(a){return $A.getValidator[a].remove()},$A.removeAllValidator=$A.deleteAllValidator=function(a){for(i in $A.getAllValidator())$A.getAllValidator()[i].remove()}}(),function(){var a=function(a){var b=this;if(b.d={$widget:$('<span class="automizy-input new-row"></span>'),$widgetInput:$('<input type="text" />'),$widgetInputBox:$('<span class="automizy-input-box"></span>'),$widgetInputBoxError:$('<span class="automizy-input-box-error"></span>'),$widgetLabel:$("<label></label>"),$widgetLabelAfter:$("<span></span>"),$widgetHelp:$('<img src="'+$A.images.helpIcon+'" class="automizy-input-help" />'),$widgetHelpContent:$('<div class="automizy-input-help-content"><img src="'+$A.images.helpArrow+'" class="automizy-input-help-content-arrow" /></div>'),$widgetHelpContentInner:$("<span></span>"),$input:$("<input />"),$textarea:$("<textarea></textarea>"),$select:$("<select></select>"),specialElements:[],type:"text",skin:"simple-automizy",multiple:false,multiselect:false,readonly:false,hasObject:false,isDatepicker:false,newRow:true,breakInput:false,needModify:false,labelPosition:"left",labelWidth:"",value:"",placeholder:"",name:"",width:"300px",height:"auto",label:"",labelAfter:"",accept:[],items:{},validator:$A.newValidator(),validate:function(){},createFunctions:[],id:"automizy-input-"+$A.getUniqueString(),click:function(){},change:function(){},enter:function(){},create:function(){}},b.init(),b.d.$input.addClass("automizy-input"),b.d.$textarea.addClass("automizy-input"),b.d.$select.addClass("automizy-input"),b.d.$widgetLabel.appendTo(b.d.$widget).attr("for",b.d.id+"-input").ahide(),b.d.$widgetInput.appendTo(b.d.$widgetInputBox).attr("id",b.d.id+"-input"),b.d.$widgetInput.click(function(){b.click()}),b.d.$widgetInputBox.appendTo(b.d.$widget),b.d.$widgetLabelAfter.appendTo(b.d.$widget).ahide(),b.d.$widgetInputBoxError.appendTo(b.d.$widget),b.d.$widgetHelpContentInner.appendTo(b.d.$widgetHelpContent),b.d.$widgetHelpContent.appendTo("body:first"),b.d.$widgetHelp.appendTo(b.d.$widget).on("mouseenter click",function(){b.d.$widgetHelp.stop().fadeTo(250,1);var a=b.d.$widgetHelp.offset().left+40;var c=b.d.$widgetHelp.offset().top-16;b.d.$widgetHelpContent.css({left:a+"px",top:c+"px"}).stop().fadeIn()}).mouseout(function(){b.d.$widgetHelpContent.stop().fadeOut(),b.d.$widgetHelp.stop().fadeTo(250,.5)}).ahide(),b.d.$widgetInputBoxError.appendTo(b.d.$widget),b.d.$widget.attr("type","text").attr("id",b.id()).addClass("automizy-skin-"+b.d.skin),b.d.$widgetInput.on("change keyup paste",function(){b.validate(),b.change()}).keypress(function(a){if(13==a.which)b.enter()}),"undefined"!==typeof a){if("undefined"!==typeof a.label)b.label(a.label);if("undefined"!==typeof a.labelAfter)b.labelAfter(a.labelAfter);if("undefined"!==typeof a.type)b.type(a.type);if("undefined"!==typeof a.disable)if(a.disable)b.disable();else b.enable();if("undefined"!==typeof a.enable)if(a.enable)b.enable();else b.disable();if("undefined"!==typeof a.checked)b.checked(a.checked);if("undefined"!==typeof a.click)b.click(a.click);if("undefined"!==typeof a.help)b.help(a.help);if("undefined"!==typeof a.height)b.height(a.height);if("undefined"!==typeof a.name)b.name(a.name);if("undefined"!==typeof a.multiple)b.multiple(a.multiple);if("undefined"!==typeof a.datepicker)b.datepicker(a.datepicker);if("undefined"!==typeof a.multiselect&&false!==a.multiselect)b.multiselect(a.multiselect);if("undefined"!==typeof a.options)b.options(a.options);if("undefined"!==typeof a.accept)b.accept(a.accept);if("undefined"!==typeof a.readonly)b.readonly(a.readonly);if("undefined"!==typeof a.newRow)b.newRow(a.newRow);if("undefined"!==typeof a.width)b.width(a.width);if("undefined"!==typeof a.placeholder)b.placeholder(a.placeholder);if("undefined"!==typeof a.breakInput)b.breakInput(a.breakInput);if("undefined"!==typeof a.labelPosition)b.labelPosition(a.labelPosition);if("undefined"!==typeof a.labelWidth)b.labelWidth(a.labelWidth);if("function"===typeof a.change)b.change(a.change);if("function"===typeof a.enter)b.enter(a.enter);if("undefined"!==typeof a.needModify)b.needModify(a.needModify);if("undefined"!==typeof a.val||"undefined"!==typeof a.value)b.val(a.val||a.value);if("undefined"!==typeof a.validator)b.validator(a.validator);if("undefined"!==typeof a.validate)b.validate(a.validate);if("undefined"!==typeof a.focus)b.focus(a.focus);b.initParameter(a)}};var b=a.prototype;b.change=function(a){var b=this;if("function"===typeof a)b.d.change=a;else b.d.change.apply(this,[this,this.d.$widget]);return b},b.enter=function(a){var b=this;if("function"===typeof a)b.d.enter=a;else b.d.enter.apply(this,[this,this.d.$widget]);return b},b.focus=function(){var a=this;return a.d.$widgetInput.focus(),a},b.disable=function(){var a=this;if(a.d.$widgetInput.prop("disabled",true),a.d.multiselect)a.multiselect("disable");return a},b.enable=function(){var a=this;if(a.d.$widgetInput.prop("disabled",false),a.d.multiselect)a.multiselect("enable");return a},b.checked=function(a){var b=this;if("undefined"!==typeof a){if(a=$A.parseBoolean(a),b.d.hasObject)b.d.$widgetInput.prop("checked",a);else b.d.createFunctions.push(function(){b.d.$widgetInput.prop("checked",a)});return b}return b.input().is(":checked")},b.check=function(){var a=this;return a.d.$widgetInput.prop("checked",true).trigger("change"),a},b.uncheck=function(){var a=this;return a.d.$widgetInput.prop("checked",false).trigger("change"),a},b.label=function(a){var b=this;if("undefined"!==typeof a)return b.d.label=a,b.d.$widgetLabel.html(a).ashow(),b;return b.d.label},b.labelAfter=function(a){var b=this;if("undefined"!==typeof a)return b.d.labelAfter=a,b.d.$widgetLabelAfter.html(a).ashow(),b;return b.d.labelAfter},b.needModify=function(a){var b=this;if("undefined"!==typeof a)return b.d.needModify=$A.parseBoolean(a),b;return b.d.needModify},b.labelPosition=function(a){var b=this;if("undefined"!==typeof a){if(b.d.labelPosition=a,"left"===b.d.labelPosition)b.d.$widgetLabel.insertBefore(b.d.$widgetInput);else b.d.$widgetLabel.insertAfter(b.d.$widgetInput);return b}return b.d.labelPosition},b.labelWidth=function(a){var b=this;if("undefined"!==typeof a)return b.d.labelWidth=a,b.d.$widgetLabel.css("width",a),b;return b.d.labelWidth},b.help=function(a){var b=this;if("undefined"!==typeof a)return b.d.help=a,b.d.$widgetHelpContentInner.html(a),b.d.$widgetHelp.ashow(),b.d.$widgetInputBox.addClass("automizy-input-has-help"),b;return b.d.help},b.val=b.value=function(a){var b=this;if("undefined"!==typeof a){if(b.d.value=a,"file"===b.d.type)b.input().data("value",a);else if("html"===b.d.type)b.input().html(a);else b.input().val(a);if(b.d.multiselect)b.input().multiselect("refresh");if(b.d.needModify)b.input().data("originalValue",a);return b}if("html"===b.d.type)return b.input().html();return b.input().val()},b.name=function(a){var b=this;if("undefined"!==typeof a)return b.d.name=a,b.d.$widgetInput.attr("name",a),b;return b.d.$widgetInput.attr("name")},b.placeholder=function(a){var b=this;if("undefined"!==typeof a)return b.d.placeholder=a,b.d.$widgetInput.attr("placeholder",a),b;return b.d.placeholder},b.width=function(a){var b=this;if("undefined"!==typeof a){if(b.d.width=a,"file"===b.type())b.widget().add(b.d.$widgetInputBox).width("100%"),b.input().data("table").width(a);else if(b.widget().width("auto"),b.input().add(b.d.$widgetInputBox).width(a),b.d.multiselect)b.input().next().css({maxWidth:a});return b}return b.d.width},b.height=function(a){var b=this;if("undefined"!==typeof a)return b.d.height=a,b.widget().height("auto"),b.input().add(b.d.$widgetInputBox).height(a),b;return b.d.height},b.type=function(a){var b=this;if("undefined"!==typeof a){a=a.toLowerCase(),b.d.type=a;var c=b.d.$widgetInput.getAttributes();if(delete c.type,delete c.checked,"select"===b.d.type)b.d.$widgetInput=$("<select></select>");else if("textarea"===b.d.type)b.d.$widgetInput=$("<textarea></textarea>");else if("html"===b.d.type)b.d.$widgetInput=$("<span></span>");else if("date"===b.d.type)b.datepicker();else if("datetime"===b.d.type)b.datetimepicker();else b.d.$widgetInput=$("<input/>").attr("type",b.d.type);if(b.d.$widgetInputBox.ashow().empty(),b.d.$widgetInput.attr(c).show(),b.d.$widgetInput.appendTo(b.d.$widgetInputBox),b.d.$widgetInput.on("change keyup paste",function(){}),setTimeout(function(){b.d.$widgetInput.on("change keyup paste",function(){b.validate(),b.change()}).keypress(function(a){if(13==a.which)b.enter()})},10),b.d.$widgetInput.click(function(){b.click()}),"hidden"===b.d.type&&b.d.label.length<1)b.d.createFunctions.push(function(){b.widget().ahide()});else if("file"===a)b.d.createFunctions.push(function(){$A.skin(b)});else if("slider"===a)b.d.createFunctions.push(function(){$A.skin(b)});return b}return b.d.type},b.datepicker=function(){var a=this;if(!require.defined("jqueryUI"))return console.warn("Missing plugin!"),a;a.d.isDatepicker=true;var b=a.d.$widgetInput;var c=b.datepicker.apply(b,arguments);return c!==b?c:a},b.datetimepicker=function(){var a=this;if(!require.defined("jqueryUI","timepicker"))return console.warn("Missing plugin!"),a;a.d.isDatetimepicker=true;var b=a.d.$widgetInput;var c=b.datetimepicker.apply(b,arguments);return c!==b?c:a},b.timepicker=function(){var a=this;if(!require.defined("jqueryUI","timepicker"))return console.warn("Missing plugin!"),a;a.d.isTimepicker=true;var b=a.d.$widgetInput;var c=b.timepicker.apply(b,arguments);return c!==b?c:a},b.multiple=function(a){var b=this;if("undefined"!==typeof a){if(a=$A.parseBoolean(a))b.d.$widgetInput.attr("multiple","multiple");else b.d.$widgetInput.removeAttr("multiple");return b.d.multiple=a,b}return b.d.$widgetInput.attr("multiple","multiple"),b.d.multiple=true,b.d.multiple},b.multiselect=function(){var a=this;var c=arguments;if("undefined"===typeof $().multiselect)return console.warn("Missing plugin!"),a;if(!a.d.hasObject)return a.d.createFunctions.push(function(){b.multiselect.apply(a,c),a.width(a.d.width)}),a;a.d.multiselect=true;var d=a.d.$widgetInput;if(setTimeout(function(){d.multiselect("refresh")},1),c.length<=0||true===c[0])if(a.d.multiple)c[0]=$A.d.defines.input.setupSelectSearchCheckObj;else c[0]=$A.d.defines.input.setupSelectObj;var e=d.multiselect.apply(d,c);return e!==d?e:a},b.options=b.items=function(a){var b=this;if("undefined"!==typeof a)return b.d.$widgetInput.find("option").remove(),b.addItems(a),b;return b.d.items},b.addOptions=b.addItems=function(a,b){var c=this;var d=c.val();var b=b||false;if("select"!==c.d.type)console.warn("Bad type!");else if("undefined"===typeof a)console.warn("Bad parameters!");else if("object"===typeof a||"array"===typeof a){if(!$.isArray(a)){var e=[];for(var f in a)e.push([f,a[f]]);a=e}if($.isArray(a)){var g=[];for(var f=0;f<a.length;f++){var h=$("<option></option>");var i=a[f];if("string"!==typeof i&&"number"!==typeof i)i=a[f][0];var j=a[f];if("string"!==typeof j&&"number"!==typeof j)j=a[f][1]||a[f][0];if(h.attr("value",i),h.html(j),"string"!==typeof a[f]&&"number"!==typeof a[f]&&"undefined"!==typeof a[f][2]&&$A.parseBoolean(a[f][2]))g.push(a[f][0]);if(b){var k=c.d.$widgetInput.find("option:first");if(0==k.val())h.insertAfter(k);else h.prependTo(c.d.$widgetInput)}else h.appendTo(c.d.$widgetInput);c.d.items[i]=j}}}if(c.d.multiselect)c.multiselect("refresh");return c.val(g||d),c},b.option=b.addOption=b.addItem=function(a,b){var c=this;return c.addOptions([[a,b||a]])},b.addOptionBefore=b.addItemBefore=function(a,b){var c=this;return c.addOptions([[a,b||a]],true)},b.accept=function(a){var b=this;if("undefined"!==typeof a){if("string"===typeof a)b.d.accept=a.split(","),b.d.$widgetInput.attr("accept",a);else b.d.accept=a,b.d.$widgetInput.attr("accept",a.join(","));return b}return b.d.accept},b.readonly=function(a){var b=this;if("undefined"!==typeof a)return a=$A.parseBoolean(a),b.d.readonly=a,b.d.$widgetInput.attr("readonly",a),b;return b.d.readonly},b.newRow=function(a){var b=this;if("undefined"!==typeof a){if(a=$A.parseBoolean(a),b.d.newRow=a,a)b.d.$widget.addClass("new-row");else b.d.$widget.removeClass("new-row");return b}return b.d.newRow},b.validator=function(a){var b=this;if("undefined"!==typeof a){if(a instanceof $A.m.Validator)b.d.validator=a;else b.d.validator.set(a);return b}return b.d.validator},b.validate=function(a){var b=this;if("function"===typeof a)b.d.validate=a;else{var c=b.validator().execute(b.val());if(!c)b.d.$widgetInputBoxError.html(b.validator().errors().join("<br/>")),b.d.$widget.addClass("error");else b.d.$widget.removeClass("error");return b.d.validate.apply(this,[c,this,this.d.$widget]),c}return b},b.breakInput=function(a){var b=this;if("undefined"!==typeof a){if(a=$A.parseBoolean(a),b.d.breakInput=a,a)b.d.$widgetInputBox.addClass("new-row");else b.d.$widgetInputBox.removeClass("new-row");return b}return b.d.breakInput},b.click=function(a){var b=this;if("function"===typeof a)b.d.click=a;else b.d.click.apply(this,[this,this.d.$widget]);return b},b.input=function(){var a=this;return a.d.$widgetInput},b.errorBox=function(){var a=this;return a.d.$widgetInputBoxError},$A.initBasicFunctions(a,"Input")}(),function(){var a=function(a){var b=this;if(b.d={$widget:$('<form class="automizy-form" onsubmit="return false;"></form>'),$inputs:$('<div class="automizy-form-inputs"></div>'),$buttons:$('<div class="automizy-form-buttons"></div>'),$tables:$('<div class="automizy-form-tables"></div>'),buttons:[],inputs:[],tables:[],subtitles:[],htmls:[],hasObject:false,id:"automizy-form-"+$A.getUniqueString(),create:function(){},submit:function(){},method:"POST",enctype:false,url:document.location.href},b.init(),b.d.$widget.attr("id",b.id()),b.d.$inputs.appendTo(b.d.$widget),b.d.$buttons.appendTo(b.d.$widget),b.d.$tables.appendTo(b.d.$widget),"undefined"!==typeof a){if("undefined"!==typeof a.subTitle)b.subTitle(a.subTitle);if("undefined"!==typeof a.htmls)b.htmls(a.htmls);if("undefined"!==typeof a.inputs)b.addInputs(a.inputs);if("undefined"!==typeof a.tables)b.addTables(a.tables);if("undefined"!==typeof a.buttons)b.addButtons(a.buttons);if("undefined"!==typeof a.groups)b.groups(a.groups);if("undefined"!==typeof a.method)b.method(a.method);if("undefined"!==typeof a.enctype)b.enctype(a.enctype);if("function"===typeof a.submit)b.submit(a.submit);if("undefined"!==typeof a.url||"undefined"!==typeof a.action)b.url(a.url||a.action);b.initParameter(a)}};var b=a.prototype;b.subTitle=b.addSubTitle=function(a){var b=this;var c="automizy-form-subtitle-"+$A.getUniqueString();if("string"===typeof a){var d=$('<div id="'+c+'" class="automizy-form-subtitle"></div>');b.d.subtitles.push({id:c,text:a,$widget:d}),d.html(a).appendTo(b.d.$inputs)}else console.warn("Bad parameter type.",a);return b},b.removeSubTitle=function(a){var b=this;if("string"===typeof a){for(var c=0;c<b.d.subtitles.length;c++)if(b.d.subtitles[c].id===a)b.d.subtitles[c].remove()}else if("object"===typeof a)a.remove()},b.button=b.addButton=function(a){var b=this;if("undefined"!==typeof a){if(a instanceof $A.m.Button)a.drawTo(b.d.$buttons),b.d.buttons.push(a);else{a.target=a.target||b.d.$buttons;var c=$A.newButton(a);b.d.buttons.push(c)}return b}var c=$A.newButton();return b.d.buttons.push(c),c.drawTo(b.d.$buttons),c},b.removeButton=function(a){var b=this;if("string"===typeof a){for(var c=0;c<b.d.buttons.length;c++)if(b.d.buttons[c].id()===a)b.d.buttons[c].remove()}else if("object"===typeof a)a.remove()},b.addButtons=function(a){var b=this;if("undefined"!==typeof a){for(var c=0;c<a.length;c++)b.addButton(a[c]);return b}return b.d.buttons},b.input=b.addInput=function(a){var b=this;if("undefined"!==typeof a){if(a instanceof $A.m.Input)a.drawTo(b.d.$inputs),b.d.inputs.push(a);else{a.target=a.target||b.d.$inputs;var c=$A.newInput(a);b.d.inputs.push(c)}return b}var c=$A.newInput();return b.d.inputs.push(c),c.drawTo(b.d.$inputs),c},b.removeInput=function(a){var b=this;if("string"===typeof a){for(var c=0;c<b.d.inputs.length;c++)if(b.d.inputs[c].id()===a)b.d.inputs[c].remove()}else if("object"===typeof a)a.remove()},b.addInputs=function(a){var b=this;if("undefined"!==typeof a){for(var c=