(function(c){"object"===typeof exports&&"undefined"!==typeof module?module.exports=c():"function"===typeof define&&define.amd?define([],c):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).OmniFaces=c()})(function(){return function(){function c(m,a,h){function f(b,e){if(!a[b]){if(!m[b]){var k="function"==typeof require&&require;if(!e&&k)return k(b,!0);if(n)return n(b,!0);e=Error("Cannot find module '"+b+"'");throw e.code="MODULE_NOT_FOUND", e;}e=a[b]={exports:{}};m[b][0].call(e.exports,function(d){return f(m[b][1][d]||d)},e,e.exports,c,m,a,h)}return a[b].exports}for(var n="function"==typeof require&&require,p=0;pa||a>=f.length)){var b=f[a];h.Util.loadScript(b.url,b.crossorigin,b.integrity,b.begin,b.success,b.error,function(){c(a+1)})}}var f=[],b=function(){return function(a, b,d,g,l,f){this.url=a;this.crossorigin=b;this.integrity=d;this.begin=g;this.success=l;this.error=f}}();a.add=function(a,k,d,g,l,q){f.push(new b(a,k,d,g,l,q));1==f.length&&h.Util.addOnloadListener(function(){c(0)})}})(a.DeferredScript||(a.DeferredScript={}))},{"./Util":12}],2:[function(c,m,a){Object.defineProperty(a,"__esModule",{value:!0});a.Form=void 0;var h=c("./OmniFaces"),f=c("./OmniFaces"),n=c("./Util");(function(a){n.Util.addOnloadListener(function(){var a=window.faces||window.jsf;if(a){var e= a.ajax.request;a.ajax.request=function(b,d,g){var l=a.getViewState;a.getViewState=function(a){var d=l(a);if("true"!=a.dataset.partialsubmit)return d;a=g?g.execute:null;if(!a||-1!=a.indexOf("@form")||-1!=a.indexOf("@all"))return d;var e=[],c=[];-1==a.indexOf("@none")&&(e=a.replace("@this",b.id).split(" "),c=e.map(encodeURIComponent));c.push(h.VIEW_STATE_PARAM);c.push(f.CLIENT_WINDOW_PARAM);var k=[];d.replace(/([^=&]+)=([^&]*)/g,function(a,d,g){if(!(a=-1e)return b=f.name,e=void 0, window.mojarra&&(e=c.form.enctype,c.form.enctype="application/x-www-form-urlencoded"),c.type="text",c.type="file",b={fileName:b},b[h.EVENT]="validationFailed",(window.faces||window.jsf).ajax.request(c.id,a,b),e&&(c.form.enctype=e),!1}return!0}})(a.InputFile||(a.InputFile={}))},{"./OmniFaces":7}],7:[function(c,m,a){Object.defineProperty(a,"__esModule",{value:!0});a.GraphicImage=a.ServiceWorker=a.ScriptParam=a.HashParam=a.Form=a.InputFile=a.Push=a.Unload=a.DeferredScript=a.Highlight=a.Util=a.CLIENT_WINDOW_PARAM= a.VIEW_STATE_PARAM=a.EVENT=void 0;a.EVENT="omnifaces.event";a.VIEW_STATE_PARAM="jakarta.faces.ViewState";a.CLIENT_WINDOW_PARAM="jakarta.faces.ClientWindow";var h=c("./Util");Object.defineProperty(a,"Util",{enumerable:!0,get:function(){return h.Util}});var f=c("./Highlight");Object.defineProperty(a,"Highlight",{enumerable:!0,get:function(){return f.Highlight}});var n=c("./DeferredScript");Object.defineProperty(a,"DeferredScript",{enumerable:!0,get:function(){return n.DeferredScript}});var p=c("./Unload"); Object.defineProperty(a,"Unload",{enumerable:!0,get:function(){return p.Unload}});var b=c("./Push");Object.defineProperty(a,"Push",{enumerable:!0,get:function(){return b.Push}});var e=c("./InputFile");Object.defineProperty(a,"InputFile",{enumerable:!0,get:function(){return e.InputFile}});var k=c("./Form");Object.defineProperty(a,"Form",{enumerable:!0,get:function(){return k.Form}});var d=c("./HashParam");Object.defineProperty(a,"HashParam",{enumerable:!0,get:function(){return d.HashParam}});var g= c("./ScriptParam");Object.defineProperty(a,"ScriptParam",{enumerable:!0,get:function(){return g.ScriptParam}});var l=c("./ServiceWorker");Object.defineProperty(a,"ServiceWorker",{enumerable:!0,get:function(){return l.ServiceWorker}});var q=c("./GraphicImage");Object.defineProperty(a,"GraphicImage",{enumerable:!0,get:function(){return q.GraphicImage}})},{"./DeferredScript":1,"./Form":2,"./GraphicImage":3,"./HashParam":4,"./Highlight":5,"./InputFile":6,"./Push":8,"./ScriptParam":9,"./ServiceWorker":10, "./Unload":11,"./Util":12}],8:[function(c,m,a){Object.defineProperty(a,"__esModule",{value:!0});a.Push=void 0;var h=c("./Util");(function(a){function c(a){f(a).open()}function f(a){var d=e[a];if(d)return d;throw Error("Unknown channel: "+a);}var b=window.location.protocol.replace("http","ws")+"//",e={},k=function(){function a(a,d,b,c,e,f,h){this.url=a;this.channel=d;this.onopen=b;this.onmessage=c;this.onerror=e;this.onclose=f;this.behaviors=h}a.prototype.open=function(){var a=this;this.socket&&1== this.socket.readyState||(this.socket=new WebSocket(this.url),this.socket.onopen=function(){if(null==a.reconnectAttempts)a.onopen(a.channel);a.reconnectAttempts=0},this.socket.onmessage=function(d){var b=JSON.parse(d.data);a.onmessage(b,a.channel,d);if((d=a.behaviors[b])&&d.length)for(b=0;b