jsf.js_next_gen 1.0.0-beta-11 → 1.0.0-beta-13

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.
Files changed (39) hide show
  1. package/dist/window/jsf-development.js +95 -36
  2. package/dist/window/jsf-development.js.map +1 -1
  3. package/dist/window/jsf.js +1 -1
  4. package/dist/window/jsf.js.br +0 -0
  5. package/dist/window/jsf.js.gz +0 -0
  6. package/dist/window/jsf.js.map +1 -1
  7. package/package.json +10 -8
  8. package/src/main/typescript/impl/AjaxImpl.ts +3 -3
  9. package/src/main/typescript/impl/util/AsyncQueue.ts +1 -1
  10. package/src/main/typescript/impl/util/ExtDomQuery.ts +70 -12
  11. package/src/main/typescript/impl/xhrCore/ErrorData.ts +2 -2
  12. package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +3 -2
  13. package/src/main/typescript/impl/xhrCore/XhrFormData.ts +2 -1
  14. package/src/main/typescript/impl/xhrCore/XhrRequest.ts +6 -5
  15. package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +2 -1
  16. package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +3 -3
  17. package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +0 -1
  18. package/src/test/resources/jsf-development.js +2 -2
  19. package/target/impl/AjaxImpl.js +1 -1
  20. package/target/impl/AjaxImpl.js.map +1 -1
  21. package/target/impl/util/AsyncQueue.js +13 -13
  22. package/target/impl/util/AsyncQueue.js.map +1 -1
  23. package/target/impl/util/ExtDomQuery.js +65 -11
  24. package/target/impl/util/ExtDomQuery.js.map +1 -1
  25. package/target/impl/xhrCore/ErrorData.js +3 -2
  26. package/target/impl/xhrCore/ErrorData.js.map +1 -1
  27. package/target/impl/xhrCore/ResponseProcessor.js +3 -2
  28. package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
  29. package/target/impl/xhrCore/XhrFormData.js +2 -1
  30. package/target/impl/xhrCore/XhrFormData.js.map +1 -1
  31. package/target/impl/xhrCore/XhrRequest.js +7 -5
  32. package/target/impl/xhrCore/XhrRequest.js.map +1 -1
  33. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +2 -1
  34. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -1
  35. package/target/test/queue/AsynchronousQueueTest.spec.js +2 -2
  36. package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
  37. package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
  38. package/dist/docs/assets/widgets.png +0 -0
  39. package/dist/docs/assets/widgets@2x.png +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"jsf-development.js","mappings":";;;;;;;;;AAAA,YAAY,aAAa,OAAO,oBAAoB,+CAA+C,iCAAiC,aAAa,gCAAgC,cAAc,gBAAgB,sEAAsE,QAAQ,eAAe,wHAAwH,aAAa,mBAAmB,6EAA6E,oCAAoC,oCAAoC,iCAAiC,IAAI,uFAAuF,SAAS,yBAAyB,2CAA2C,0CAA0C,cAAc,IAAI,aAAa,SAAS,MAAM,cAAc,IAAI,cAAc,SAAS,MAAM,cAAc,MAAM,iEAAiE,KAAK,cAAc,+BAA+B,GAAG,yCAAyC,eAAe,wBAAwB,qBAAqB,YAAY,iBAAiB,UAAU,iCAAiC,2DAA2D,YAAY,IAAI,cAAc,mBAAmB,mBAAmB,4DAA4D,KAAK,EAAE,KAAK,kHAAkH,yCAAyC,kBAAkB,MAAM,yBAAyB,oBAAoB,8BAA8B,SAAS,kCAAkC,SAAS,0EAA0E,IAAI,SAAS,yCAAyC,aAAa,MAAM,2BAA2B,iBAAiB,MAAM,oBAAoB,2BAA2B,MAAM,+BAA+B,SAAS,cAAc,SAAS,YAAY,QAAQ,MAAM,qBAAqB,OAAO,gCAAgC,UAAU,oCAAoC,oDAAoD,eAAe,yBAAyB,IAAI,KAAK,yCAAyC,iBAAiB,SAAS,GAAG,SAAS,QAAQ,IAAI,oCAAoC,QAAQ,oBAAoB,SAAS,6CAA6C,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U;;;;;;;UC5DvB;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://jsf.js_next_gen/./node_modules/mona-dish/dist/js/commonjs/index_core.js","webpack://jsf.js_next_gen/./src/main/typescript/api/Jsf.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/AjaxImpl.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/PushImpl.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/core/Const.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/core/ImplTypes.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/i18n/Messages.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/Assertions.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/AsyncQueue.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/ExtDomQuery.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/Lang.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/ErrorData.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/EventData.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/RequestDataResolver.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/ResonseDataResolver.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/Response.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/ResponseProcessor.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/XhrFormData.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/XhrRequest.ts","webpack://jsf.js_next_gen/webpack/bootstrap","webpack://jsf.js_next_gen/webpack/before-startup","webpack://jsf.js_next_gen/webpack/startup","webpack://jsf.js_next_gen/webpack/after-startup"],"sourcesContent":["!function(){\"use strict\";var t={585:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function l(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,l)}u((n=n.apply(t,e||[])).next())}))},l=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},\"function\"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(r)throw new TypeError(\"Generator is already executing.\");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},u=this&&this.__read||function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},c=this&&this.__values||function(t){var e=\"function\"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")};Object.defineProperty(e,\"__esModule\",{value:!0}),e.DQ=e.DomQueryCollector=e.DomQuery=e.ElementAttribute=void 0;var f,p=r(152),h=r(551),y=r(255),d=r(805),v=d.Lang.trim,m=d.Lang.objToArray,b=d.Lang.isString,g=d.Lang.equalsIgnoreCase;function S(t,e,r){return void 0===r&&(r={attributes:!0,childList:!0,subtree:!0,timeout:500,interval:100}),new Promise((function(n,o){var a=new Error(\"Mutation observer timeout\");if(void 0!==window.MutationObserver){var l=setTimeout((function(){return o(a)}),r.timeout),u=new window.MutationObserver((function(t,r){var o=new x(t.map((function(t){return t.target}))).first(e);o.isPresent()&&(clearTimeout(l),n(o))})),s=i({},r);delete s.timeout,t.eachElem((function(t){u.observe(t,s)}))}else var c=setInterval((function(){var o=null;(o=r.childList?e(t)?t:t.childNodes.first(e):r.subtree?e(t)?t:t.querySelectorAll(\" * \").first(e):e(t)?t:x.absent).isPresent()&&f&&(clearTimeout(f),clearInterval(c),c=null,n(o))}),r.interval),f=setTimeout((function(){c&&(clearInterval(c),o(a))}),r.timeout)}))}!function(t){t.SELECT=\"select\",t.BUTTON=\"button\",t.SUBMIT=\"submit\",t.RESET=\"reset\",t.IMAGE=\"image\",t.RADIO=\"radio\",t.CHECKBOX=\"checkbox\"}(f||(f={}));var A=function(t){function e(e,r,n){void 0===n&&(n=null);var o=t.call(this,e,r)||this;return o.element=e,o.name=r,o.defaultVal=n,o}return o(e,t),Object.defineProperty(e.prototype,\"value\",{get:function(){var t,e=(t=this.element.get(0)).orElse.apply(t,[]).values;return e.length?e[0].getAttribute(this.name):this.defaultVal},set:function(t){for(var e,r=(e=this.element.get(0)).orElse.apply(e,[]).values,n=0;n<r.length;n++)r[n].setAttribute(this.name,t);r[0].setAttribute(this.name,t)},enumerable:!1,configurable:!0}),e.prototype.getClass=function(){return e},e.fromNullable=function(t,r){return void 0===r&&(r=\"value\"),new e(t,r)},e}(p.ValueEmbedder);e.ElementAttribute=A;var w=function(t){return-1==t.indexOf(\"ln=scripts\")&&-1==t.indexOf(\"ln=javax.faces\")||-1==t.indexOf(\"/jsf.js\")&&-1==t.indexOf(\"/jsf-uncompressed.js\")},x=function(){function t(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];if(this.rootNode=[],this.pos=-1,this._limits=-1,!p.Optional.fromNullable(r).isAbsent()&&r.length)for(var o=0;o<r.length;o++)if(b(r[o])){var i=t.querySelectorAll(r[o]);i.isAbsent()||r.push.apply(r,s([],u(i.values),!1))}else r[o]instanceof t?(e=this.rootNode).push.apply(e,s([],u(r[o].values),!1)):this.rootNode.push(r[o])}return Object.defineProperty(t.prototype,\"value\",{get:function(){return this.getAsElem(0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"values\",{get:function(){return this.allElems()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"id\",{get:function(){return new A(this.get(0),\"id\")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"length\",{get:function(){return this.rootNode.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"tagName\",{get:function(){return this.getAsElem(0).getIf(\"tagName\")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"nodeName\",{get:function(){return this.getAsElem(0).getIf(\"nodeName\")},enumerable:!1,configurable:!0}),t.prototype.isTag=function(t){return!this.isAbsent()&&(this.nodeName.orElse(\"__none___\").value.toLowerCase()==t.toLowerCase()||this.tagName.orElse(\"__none___\").value.toLowerCase()==t.toLowerCase())},Object.defineProperty(t.prototype,\"type\",{get:function(){return this.getAsElem(0).getIf(\"type\")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"name\",{get:function(){return new p.ValueEmbedder(this.getAsElem(0).value,\"name\")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"inputValue\",{get:function(){return this.getAsElem(0).getIf(\"value\").isPresent()?new p.ValueEmbedder(this.getAsElem(0).value):p.ValueEmbedder.absent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"checked\",{get:function(){return h.Stream.of.apply(h.Stream,s([],u(this.values),!1)).allMatch((function(t){return!!t.checked}))},set:function(t){this.eachElem((function(e){return e.checked=t}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"elements\",{get:function(){return this.querySelectorAll(\"input, checkbox, select, textarea, fieldset\")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"deepElements\",{get:function(){return this.querySelectorAllDeep(\"input, select, textarea, checkbox, fieldset\")},enumerable:!1,configurable:!0}),t.prototype.querySelectorAllDeep=function(e){var r=[],n=this.querySelectorAll(e);n.length&&r.push(n);var o=this.querySelectorAll(\"*\").shadowRoot;if(o.length){var i=o.querySelectorAllDeep(e);i.length&&r.push(i)}return new(t.bind.apply(t,s([void 0],u(r),!1)))},Object.defineProperty(t.prototype,\"disabled\",{get:function(){return this.attr(\"disabled\").isPresent()},set:function(t){t?this.attr(\"disabled\").value=\"disabled\":this.removeAttribute(\"disabled\")},enumerable:!1,configurable:!0}),t.prototype.removeAttribute=function(t){this.eachElem((function(e){return e.removeAttribute(t)}))},Object.defineProperty(t.prototype,\"childNodes\",{get:function(){var e=[];return this.eachElem((function(t){e=e.concat(m(t.childNodes))})),new(t.bind.apply(t,s([void 0],u(e),!1)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"stream\",{get:function(){return new(h.Stream.bind.apply(h.Stream,s([void 0],u(this.asArray),!1)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"lazyStream\",{get:function(){return h.LazyStream.of.apply(h.LazyStream,s([],u(this.asArray),!1))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"asArray\",{get:function(){return[].concat(h.LazyStream.of.apply(h.LazyStream,s([],u(this.rootNode),!1)).filter((function(t){return null!=t})).map((function(e){return t.byId(e)})).collect(new y.ArrayCollector))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"asNodeArray\",{get:function(){return[].concat(h.Stream.of(this.rootNode).filter((function(t){return null!=t})).collect(new y.ArrayCollector))},enumerable:!1,configurable:!0}),t.querySelectorAllDeep=function(e){return new t(document).querySelectorAllDeep(e)},t.querySelectorAll=function(e){return-1!=e.indexOf(\"/shadow/\")?new t(document)._querySelectorAllDeep(e):new t(document)._querySelectorAll(e)},t.byId=function(e,r){return void 0===r&&(r=!1),b(e)?r?new t(document).byIdDeep(e):new t(document).byId(e):new t(e)},t.byTagName=function(e){return b(e)?new t(document).byTagName(e):new t(e)},t.globalEval=function(e,r){return new t(document).globalEval(e,r)},t.fromMarkup=function(e){var r=document.implementation.createHTMLDocument(\"\"),n=(e=v(e)).toLowerCase();if(-1!=n.indexOf(\"<!doctype\")||-1!=n.indexOf(\"<html\")||-1!=n.indexOf(\"<head\")||-1!=n.indexOf(\"<body\"))return r.documentElement.innerHTML=e,new t(r.documentElement);var o=function(t,e){var r=[\"<\",e,\">\"].join(\"\"),n=[\"<\",e,\" \"].join(\"\");return 0==t.indexOf(r)||0==t.indexOf(n)},i=new t(document.createElement(\"div\"));return o(n,\"thead\")||o(n,\"tbody\")?(i.html(\"<table>\".concat(e,\"</table>\")),i.querySelectorAll(\"table\").get(0).childNodes.detach()):o(n,\"tfoot\")?(i.html(\"<table><thead></thead><tbody><tbody\".concat(e,\"</table>\")),i.querySelectorAll(\"table\").get(2).childNodes.detach()):o(n,\"tr\")?(i.html(\"<table><tbody>\".concat(e,\"</tbody></table>\")),i.querySelectorAll(\"tbody\").get(0).childNodes.detach()):o(n,\"td\")?(i.html(\"<table><tbody><tr>\".concat(e,\"</tr></tbody></table>\")),i.querySelectorAll(\"tr\").get(0).childNodes.detach()):(i.html(e),i.childNodes.detach())},t.prototype.get=function(e){return e<this.rootNode.length?new t(this.rootNode[e]):t.absent},t.prototype.getAsElem=function(t,e){return void 0===e&&(e=p.Optional.absent),t<this.rootNode.length?p.Optional.fromNullable(this.rootNode[t]):e},t.prototype.filesFromElem=function(t){var e;return t<this.rootNode.length&&(null===(e=this.rootNode[t])||void 0===e?void 0:e.files)?this.rootNode[t].files:[]},t.prototype.allElems=function(){return this.rootNode},t.prototype.isAbsent=function(){return 0==this.length},t.prototype.isPresent=function(t){var e=this.isAbsent();return!e&&t&&t.call(this,this),!e},t.prototype.ifPresentLazy=function(t){return void 0===t&&(t=function(){}),this.isPresent.call(this,t),this},t.prototype.delete=function(){this.eachElem((function(t){t.parentNode&&t.parentNode.removeChild(t)}))},t.prototype.querySelectorAll=function(t){return-1!=t.indexOf(\"/shadow/\")?this._querySelectorAllDeep(t):this._querySelectorAll(t)},t.prototype._querySelectorAll=function(e){var r,n;if(!(null===(r=null==this?void 0:this.rootNode)||void 0===r?void 0:r.length))return this;for(var o=[],i=0;i<this.rootNode.length;i++)if(null===(n=this.rootNode[i])||void 0===n?void 0:n.querySelectorAll){var a=this.rootNode[i].querySelectorAll(e);o=o.concat(m(a))}return new(t.bind.apply(t,s([void 0],u(o),!1)))},t.prototype._querySelectorAllDeep=function(e){var r;if(!(null===(r=null==this?void 0:this.rootNode)||void 0===r?void 0:r.length))return this;for(var n=new(t.bind.apply(t,s([void 0],u(this.rootNode),!1))),o=e.split(/\\/shadow\\//),i=0;i<o.length;i++)if(\"\"!=o[i]){var a=o[i];n=n.querySelectorAll(a),i<o.length-1&&(n=n.shadowRoot)}return n},t.prototype.byId=function(e,r){var n=[];return r&&(n=n.concat(h.LazyStream.of.apply(h.LazyStream,s([],u((null==this?void 0:this.rootNode)||[]),!1)).filter((function(t){return e==t.id})).map((function(e){return new t(e)})).collect(new y.ArrayCollector))),n=n.concat(this.querySelectorAll('[id=\"'.concat(e,'\"]'))),new(t.bind.apply(t,s([void 0],u(n),!1)))},t.prototype.byIdDeep=function(e,r){var n=[];r&&(n=n.concat(h.LazyStream.of.apply(h.LazyStream,s([],u((null==this?void 0:this.rootNode)||[]),!1)).filter((function(t){return e==t.id})).map((function(e){return new t(e)})).collect(new y.ArrayCollector)));var o=this.querySelectorAllDeep('[id=\"'.concat(e,'\"]'));return o.length&&n.push(o),new(t.bind.apply(t,s([void 0],u(n),!1)))},t.prototype.byTagName=function(e,r,n){var o,i=[];return r&&(i=h.LazyStream.of.apply(h.LazyStream,s([],u(null!==(o=null==this?void 0:this.rootNode)&&void 0!==o?o:[]),!1)).filter((function(t){return(null==t?void 0:t.tagName)==e})).reduce((function(t,e){return t.concat([e])}),i).orElse(i).value),n?i.push(this.querySelectorAllDeep(e)):i.push(this.querySelectorAll(e)),new(t.bind.apply(t,s([void 0],u(i),!1)))},t.prototype.attr=function(t,e){return void 0===e&&(e=null),new A(this,t,e)},t.prototype.hasClass=function(t){var e=!1;return this.eachElem((function(r){if(e=r.classList.contains(t))return!1})),e},t.prototype.addClass=function(t){return this.eachElem((function(e){return e.classList.add(t)})),this},t.prototype.removeClass=function(t){return this.eachElem((function(e){return e.classList.remove(t)})),this},t.prototype.isMultipartCandidate=function(t){var e=this;void 0===t&&(t=!1);return this.stream.filter((function(r){return function(r){var n;return 0!=r.length&&(1==r.length?\"input\"==r.tagName.get(\"booga\").value.toLowerCase()&&\"file\"==((null===(n=r.attr(\"type\"))||void 0===n?void 0:n.value)||\"\").toLowerCase()||(t?e.querySelectorAllDeep(\"input[type='file']\").firstElem().isPresent():e.querySelectorAll(\"input[type='file']\").firstElem().isPresent()):r.isMultipartCandidate(t))}(r)})).first().isPresent()},t.prototype.html=function(t){return p.Optional.fromNullable(t).isAbsent()?this.isPresent()?p.Optional.fromNullable(this.innerHtml):p.Optional.absent:(this.innerHtml=t,this)},t.prototype.dispatchEvent=function(t){return this.eachElem((function(e){return e.dispatchEvent(t)})),this},Object.defineProperty(t.prototype,\"innerHtml\",{get:function(){var t=[];return this.eachElem((function(e){return t.push(e.innerHTML)})),t.join(\"\")},set:function(t){this.eachElem((function(e){return e.innerHTML=t}))},enumerable:!1,configurable:!0}),t.prototype._mozMatchesSelector=function(t,e){var r=t,n=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector||function(e){for(var r=(document||window.ownerDocument).querySelectorAll(e),n=r.length;--n>=0&&r.item(n)!==t;);return n>-1};return n.call(t,e)},t.prototype.filterSelector=function(e){var r=this,n=[];return this.eachElem((function(t){r._mozMatchesSelector(t,e)&&n.push(t)})),new(t.bind.apply(t,s([void 0],u(n),!1)))},t.prototype.matchesSelector=function(t){var e=this;return this.eachElem((function(r){if(!e._mozMatchesSelector(r,t))return!1})),!0},t.prototype.getIf=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=this.childNodes,n=0;n<t.length;n++)if((r=r.filterSelector(t[n])).isAbsent())return r;return r},t.prototype.eachElem=function(t){for(var e=0,r=this.rootNode.length;e<r&&!1!==t(this.rootNode[e],e);e++);return this},t.prototype.firstElem=function(t){return void 0===t&&(t=function(t){return t}),this.rootNode.length>1&&t(this.rootNode[0],0),this},t.prototype.each=function(e){return h.Stream.of.apply(h.Stream,s([],u(this.rootNode),!1)).each((function(r,n){if(null!=r)return e(t.byId(r),n)})),this},t.prototype.first=function(t){return void 0===t&&(t=function(t){return t}),this.rootNode.length>=1?(t(this.get(0),0),this.get(0)):this},t.prototype.filter=function(e){var r=[];return this.each((function(t){e(t)&&r.push(t)})),new(t.bind.apply(t,s([void 0],u(r),!1)))},t.prototype.globalEval=function(t,e){var r=document.getElementsByTagName(\"head\")[0]||document.documentElement,n=document.createElement(\"script\");e&&n.setAttribute(\"nonce\",e),n.type=\"text/javascript\",n.innerHTML=t;var o=r.appendChild(n);return r.removeChild(o),this},t.prototype.detach=function(){return this.eachElem((function(t){t.parentNode.removeChild(t)})),this},t.prototype.appendTo=function(t){this.eachElem((function(e){t.getAsElem(0).orElseLazy((function(){return{appendChild:function(t){}}})).value.appendChild(e)}))},t.prototype.loadScriptEval=function(t,e,r){var n=this;void 0===e&&(e=0),void 0===r&&(r=\"utf-8\");var o=new XMLHttpRequest;return o.open(\"GET\",t,!1),r&&o.setRequestHeader(\"Content-Type\",\"application/x-javascript; charset:\"+r),o.send(null),o.onload=function(r){e?setTimeout((function(){n.globalEval(o.responseText+\"\\r\\n//@ sourceURL=\"+t)}),e):n.globalEval(o.responseText.replace(/\\n/g,\"\\r\\n\")+\"\\r\\n//@ sourceURL=\"+t)},o.onerror=function(t){throw Error(t)},this},t.prototype.insertAfter=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.each((function(t){for(var r=t.getAsElem(0).value,n=r.parentNode,o=function(t){var o=r.nextSibling;e[t].eachElem((function(t){o?(n.insertBefore(t,o),r=o):n.appendChild(t)}))},i=0;i<e.length;i++)o(i)}));var n=[];return n.push(this),n=n.concat(e),new(t.bind.apply(t,s([void 0],u(n),!1)))},t.prototype.insertBefore=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.each((function(t){for(var r=t.getAsElem(0).value,n=r.parentNode,o=0;o<e.length;o++)e[o].eachElem((function(t){n.insertBefore(t,r)}))}));var n=[];return n.push(this),n=n.concat(e),new(t.bind.apply(t,s([void 0],u(n),!1)))},t.prototype.orElse=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this.isPresent()?this:new(t.bind.apply(t,s([void 0],u(e),!1)))},t.prototype.orElseLazy=function(e){return this.isPresent()?this:new t(e())},t.prototype.parents=function(e){var r=new Set,n=[],o=e.toLowerCase(),i=function(t){(t.tagName||\"\").toLowerCase()!=o||r.has(t)||(r.add(t),n.push(t))};return this.eachElem((function(t){for(var r;t.parentNode||t.host;)if(t=null!==(r=null==t?void 0:t.parentNode)&&void 0!==r?r:null==t?void 0:t.host,i(t),\"form\"==e&&n.length)return!1})),new(t.bind.apply(t,s([void 0],u(n),!1)))},t.prototype.copyAttrs=function(t){var e=this;return t.eachElem((function(t){var r,n,o=m(t.attributes);try{for(var i=c(o),a=i.next();!a.done;a=i.next()){var l=a.value,u=l.value,s=l.name;switch(s){case\"id\":e.id.value=u;break;case\"disabled\":e.resolveAttributeHolder(\"disabled\").disabled=u;break;case\"checked\":e.resolveAttributeHolder(\"checked\").checked=u;break;default:e.attr(s).value=u}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}})),this},t.prototype.resolveAttributeHolder=function(t){void 0===t&&(t=\"value\");var e=[];return e[t]=null,t in this.getAsElem(0).value?this.getAsElem(0).value:e},t.prototype.outerHTML=function(e,r,n,o){var i;if(void 0===o&&(o=!1),!this.isAbsent()){var a=null===(i=null===document||void 0===document?void 0:document.activeElement)||void 0===i?void 0:i.id,l=a?t.getCaretPosition(document.activeElement):null,c=t.fromMarkup(e),f=[],p=this.getAsElem(0).value,h=c.get(0),y=p.parentNode,d=h.getAsElem(0).value;if(y.replaceChild(d,p),f.push(new t(d)),this.isAbsent())return this;var v=[];c.length>1&&(v=v.concat.apply(v,s([],u(c.values.slice(1)),!1)),f.push(t.byId(d).insertAfter(new(t.bind.apply(t,s([void 0],u(v),!1)))))),r&&this.runScripts(),n&&this.runCss();var m=t.byId(a);return a&&m.isPresent()&&null!=l&&void 0!==l&&m.eachElem((function(e){return t.setCaretPosition(e,l)})),c}},t.prototype.runScripts=function(e){var r=this;void 0===e&&(e=w);var n=[],o=g,i=function(t){var i=t.tagName,a=t.type||\"\";if(i&&o(i,\"script\")&&(\"\"===a||o(a,\"text/javascript\")||o(a,\"javascript\")||o(a,\"text/ecmascript\")||o(a,\"ecmascript\"))){var l=t.getAttribute(\"src\");if(void 0!==l&&null!=l&&l.length>0)e(l)&&(n.length&&(r.globalEval(n.join(\"\\n\")),n=[]),r.loadScriptEval(l,0,\"UTF-8\"));else{for(var u=v(t.text||t.innerText||t.innerHTML),s=!0;s;)s=!1,\"\\x3c!--\"==u.substring(0,4)&&(u=u.substring(4),s=!0),\"//\\x3c!--\"==u.substring(0,4)&&(u=u.substring(6),s=!0),\"//<![CDATA[\"==u.substring(0,11)&&(u=u.substring(11),s=!0);n.push(u)}}};try{new t(this.filterSelector(\"script\"),this.querySelectorAll(\"script\")).stream.flatMap((function(t){return h.Stream.of(t.values)})).sort((function(t,e){return t.compareDocumentPosition(e)-3})).each((function(t){return i(t)})),n.length&&this.globalEval(n.join(\"\\n\"))}catch(t){window.console&&window.console.error&&console.error(t.message||t.description)}finally{i=null}return this},t.prototype.runCss=function(){var e=function(t,e){var r,n,o,i,a=document.createElement(\"style\");document.getElementsByTagName(\"head\")[0].appendChild(a);var l=null!==(r=a.sheet)&&void 0!==r?r:a.styleSheet;a.setAttribute(\"rel\",null!==(n=t.getAttribute(\"rel\"))&&void 0!==n?n:\"stylesheet\"),a.setAttribute(\"type\",null!==(o=t.getAttribute(\"type\"))&&void 0!==o?o:\"text/css\"),null!==(i=null==l?void 0:l.cssText)&&void 0!==i&&i?l.cssText=e:a.appendChild(document.createTextNode(e))};return new t(this.filterSelector(\"link, style\"),this.querySelectorAll(\"link, style\")).stream.flatMap((function(t){return h.Stream.of(t.values)})).sort((function(t,e){return t.compareDocumentPosition(e)-3})).each((function(t){return function(t){var r=t.tagName;if(r&&g(r,\"link\")&&g(t.getAttribute(\"type\"),\"text/css\"))e(t,\"@import url('\"+t.getAttribute(\"href\")+\"');\");else if(r&&g(r,\"style\")&&g(t.getAttribute(\"type\"),\"text/css\")){var n=[],o=Array.prototype.slice.call(t.childNodes);o?o.forEach((function(t){return n.push(t.innerHTML||t.data)})):t.innerHTML&&n.push(t.innerHTML),e(t,n.join(\"\"))}}(t)})),this},t.prototype.click=function(){return this.fireEvent(\"click\"),this},t.prototype.addEventListener=function(t,e,r){return this.eachElem((function(n){return n.addEventListener(t,e,r)})),this},t.prototype.removeEventListener=function(t,e,r){return this.eachElem((function(n){return n.removeEventListener(t,e,r)})),this},t.prototype.fireEvent=function(t){this.eachElem((function(e){var r;if(e.ownerDocument)r=e.ownerDocument;else{if(9!=e.nodeType)throw new Error(\"Invalid node passed to fireEvent: \"+e.id);r=e}if(e.dispatchEvent){var n=\"\";switch(t){case\"click\":case\"mousedown\":case\"mouseup\":n=\"MouseEvents\";break;case\"focus\":case\"change\":case\"blur\":case\"select\":n=\"HTMLEvents\";break;default:throw\"fireEvent: Couldn't find an event class for event '\"+t+\"'.\"}var o=r.createEvent(n);o.initEvent(t,!0,!0),o.synthetic=!0,e.dispatchEvent(o)}else if(e.fireEvent){var i=r.createEventObject();i.synthetic=!0,e.fireEvent(\"on\"+t,i)}}))},t.prototype.textContent=function(t){return void 0===t&&(t=\"\"),this.stream.map((function(t){return t.getAsElem(0).orElseLazy((function(){return{textContent:\"\"}})).value.textContent||\"\"})).reduce((function(e,r){return e+t+r}),\"\").value},t.prototype.innerText=function(t){return void 0===t&&(t=\"\"),this.stream.map((function(t){return t.getAsElem(0).orElseLazy((function(){return{innerText:\"\"}})).value.innerText||\"\"})).reduce((function(e,r){return[e,r].join(t)}),\"\").value},t.prototype.encodeFormElement=function(t){if(void 0===t&&(t=new p.Config({})),!this.name.isAbsent()){var e=t.shallowCopy;return this.each((function(t){var r,n;if(!t.name.isAbsent()){var o=t.name.value,i=t.tagName.orElse(\"__none__\").value.toLowerCase(),a=t.type.orElse(\"__none__\").value.toLowerCase();if(a=a.toLowerCase(),(\"input\"==i||\"textarea\"==i||\"select\"==i)&&null!=o&&\"\"!=o&&!t.disabled){if(\"select\"==i){var l=t.getAsElem(0).value;if(l.selectedIndex>=0)for(var u=l.options.length,s=0;s<u;s++)if(l.options[s].selected){var c=l.options[s];e.append(o).value=null!=c.getAttribute(\"value\")?c.value:c.text}}if(i!=f.SELECT&&a!=f.BUTTON&&a!=f.RESET&&a!=f.SUBMIT&&a!=f.IMAGE&&(a!=f.CHECKBOX&&a!=f.RADIO||t.checked)){var p=null!==(n=null===(r=t.value.value)||void 0===r?void 0:r.files)&&void 0!==n?n:[];(null==p?void 0:p.length)?e.append(o).value=p[0]:e.append(o).value=t.inputValue.value}}}})),e}},Object.defineProperty(t.prototype,\"cDATAAsString\",{get:function(){return this.lazyStream.flatMap((function(t){return t.childNodes.stream})).filter((function(t){var e,r;return 4==(null===(r=null===(e=null==t?void 0:t.value)||void 0===e?void 0:e.value)||void 0===r?void 0:r.nodeType)})).reduce((function(t,e){var r,n,o;return t.push(null!==(o=null===(n=null===(r=null==e?void 0:e.value)||void 0===r?void 0:r.value)||void 0===n?void 0:n.data)&&void 0!==o?o:\"\"),t}),[]).value.join(\"\")},enumerable:!1,configurable:!0}),t.prototype.subNodes=function(e,r){return p.Optional.fromNullable(r).isAbsent()&&(r=this.length),new(t.bind.apply(t,s([void 0],u(this.rootNode.slice(e,Math.min(r,this.length))),!1)))},t.prototype.limits=function(t){return this._limits=t,this},t.prototype.hasNext=function(){var t=-1!=this._limits&&this.pos>=this._limits-1,e=this.pos>=this.values.length-1;return!(t||e)},t.prototype.next=function(){return this.hasNext()?(this.pos++,new t(this.values[this.pos])):null},t.prototype.reset=function(){this.pos=-1},t.prototype.attachShadow=function(e){void 0===e&&(e={mode:\"open\"});var r=[];return this.eachElem((function(n){var o;if(!(null==n?void 0:n.attachShadow))throw new Error(\"Shadow dom creation not supported by the browser, please use a shim, to gain this functionality\");o=t.byId(n.attachShadow(e)),r.push(o)})),new(t.bind.apply(t,s([void 0],u(r),!1)))},t.prototype.waitUntilDom=function(t,e){return void 0===e&&(e={attributes:!0,childList:!0,subtree:!0,timeout:500,interval:100}),a(this,void 0,void 0,(function(){return l(this,(function(r){return[2,S(this,t,e)]}))}))},Object.defineProperty(t.prototype,\"shadowElements\",{get:function(){var e=(this.querySelectorAll(\"*\").filter((function(t){return t.hasShadow})).allElems()||[]).map((function(t){return t.shadowRoot}));return new(t.bind.apply(t,s([void 0],u(e),!1)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"shadowRoot\",{get:function(){for(var e=[],r=0;r<this.rootNode.length;r++)this.rootNode[r].shadowRoot&&e.push(this.rootNode[r].shadowRoot);return new(t.bind.apply(t,s([void 0],u(e),!1)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"hasShadow\",{get:function(){for(var t=0;t<this.rootNode.length;t++)if(this.rootNode[t].shadowRoot)return!0;return!1},enumerable:!1,configurable:!0}),t.getCaretPosition=function(t){var e=0;try{if(null===document||void 0===document?void 0:document.selection){t.focus();var r=document.selection.createRange();r.moveStart(\"character\",-t.value.length),e=r.text.length}}catch(t){}return e},t.setCaretPosition=function(t,e){(null==t?void 0:t.focus)&&(null==t||t.focus()),(null==t?void 0:t.setSelectiongRange)&&(null==t||t.setSelectiongRange(e,e))},t.prototype[Symbol.iterator]=function(){var t=this;return{next:function(){return{done:!t.hasNext(),value:t.next()}}}},t.absent=new t,t}();e.DomQuery=x;var E=function(){function t(){this.data=[]}return t.prototype.collect=function(t){this.data.push(t)},Object.defineProperty(t.prototype,\"finalValue\",{get:function(){return new(x.bind.apply(x,s([void 0],u(this.data),!1)))},enumerable:!1,configurable:!0}),t}();e.DomQueryCollector=E,e.DQ=x},805:function(t,e,r){Object.defineProperty(e,\"__esModule\",{value:!0}),e.Lang=void 0;var n=r(152);!function(t){function e(t){for(var e=/\\s/,r=(t=t.replace(/^\\s\\s*/,\"\")).length;e.test(t.charAt(--r)););return t.slice(0,r+1)}function r(t){return!!arguments.length&&null!=t&&(\"string\"==typeof t||t instanceof String)}t.saveResolve=function(t,e){void 0===e&&(e=null);try{var r=t();return n.Optional.fromNullable(null!=r?r:e)}catch(t){return n.Optional.absent}},t.saveResolveLazy=function(t,e){void 0===e&&(e=null);try{var r=t();return n.Optional.fromNullable(null!=r?r:e())}catch(t){return n.Optional.absent}},t.strToArray=function(t,r){void 0===r&&(r=/\\./gi);var n=[];return t.split(r).forEach((function(t){n.push(e(t))})),n},t.trim=e,t.objToArray=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=[]),\"__undefined__\"==(null!=t?t:\"__undefined__\")?null!=r?r:null:t instanceof Array&&!e&&!r?t:r.concat(Array.prototype.slice.call(t,e))},t.equalsIgnoreCase=function(t,e){var r=null!=e?e:\"___no_value__\";return(null!=t?t:\"___no_value__\").toLowerCase()===r.toLowerCase()},t.assertType=function(t,e){return r(e)?typeof t==e:t instanceof e},t.isString=r,t.isFunc=function(t){return t instanceof Function||\"function\"==typeof t},t.objAssign=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(null==t)throw new TypeError(\"Cannot convert undefined or null to object\");var n=Object(t);return Object.assign?(e.forEach((function(t){return Object.assign(n,t)})),n):(e.filter((function(t){return null!=t})).forEach((function(t){var e=t;Object.keys(e).filter((function(t){return Object.prototype.hasOwnProperty.call(e,t)})).forEach((function(t){return n[t]=e[t]}))})),n)}}(e.Lang||(e.Lang={}))},152:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Config=e.ValueEmbedder=e.Optional=e.Monad=void 0;var l=r(805),u=r(255),s=r(551),c=l.Lang.objAssign,f=function(){function t(t){this._value=t}return Object.defineProperty(t.prototype,\"value\",{get:function(){return this._value},enumerable:!1,configurable:!0}),t.prototype.map=function(e){return e||(e=function(t){return t}),new t(e(this.value))},t.prototype.flatMap=function(e){for(var r=this.map(e);(null==r?void 0:r.value)instanceof t;)r=r.value;return r},t}();e.Monad=f;var p=function(t){function e(e){return t.call(this,e)||this}return o(e,t),Object.defineProperty(e.prototype,\"value\",{get:function(){return this._value instanceof f?this._value.flatMap().value:this._value},enumerable:!1,configurable:!0}),e.fromNullable=function(t){return new e(t)},e.prototype.isAbsent=function(){return void 0===this.value||null==this.value},e.prototype.isPresent=function(t){var e=this.isAbsent();return!e&&t&&t.call(this,this),!e},e.prototype.ifPresentLazy=function(t){return void 0===t&&(t=function(){}),this.isPresent.call(this,t),this},e.prototype.orElse=function(t){return this.isPresent()?this:null==t?e.absent:this.flatMap((function(){return t}))},e.prototype.orElseLazy=function(t){return this.isPresent()?this:this.flatMap(t)},e.prototype.flatMap=function(r){var n=t.prototype.flatMap.call(this,r);return n instanceof e?n.flatMap():e.fromNullable(n.value)},e.prototype.getIf=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=this,n=0;n<t.length;n++){var o=this.keyVal(t[n]),i=this.arrayIndex(t[n]);if(\"\"===o&&i>=0){if((r=this.getClass().fromNullable(r.value instanceof Array?r.value.length<i?null:r.value[i]:null)).isAbsent())return r}else if(o&&i>=0){if(r.getIfPresent(o).isAbsent())return r;if((r=r.getIfPresent(o).value instanceof Array?this.getClass().fromNullable(r.getIfPresent(o).value[i]):this.getClass().absent).isAbsent())return r}else{if((r=r.getIfPresent(o)).isAbsent())return r;i>-1&&(r=this.getClass().fromNullable(r.value[i]))}}return r},e.prototype.match=function(t){return!this.isAbsent()&&t(this.value)},e.prototype.get=function(t){return void 0===t&&(t=e.absent),this.isAbsent()?this.getClass().fromNullable(t).flatMap():this.getClass().fromNullable(this.value).flatMap()},e.prototype.toJson=function(){return JSON.stringify(this.value)},e.prototype.getClass=function(){return e},e.prototype.arrayIndex=function(t){var e=t.indexOf(\"[\"),r=t.indexOf(\"]\");return e>=0&&r>0&&e<r?parseInt(t.substring(e+1,r)):-1},e.prototype.keyVal=function(t){var e=t.indexOf(\"[\");return e>=0?t.substring(0,e):t},e.prototype.getIfPresent=function(t){return this.isAbsent()?this.getClass().absent:this.getClass().fromNullable(this.value[t]).flatMap()},e.prototype.resolve=function(t){if(this.isAbsent())return e.absent;try{return e.fromNullable(t(this.value))}catch(t){return e.absent}},e.absent=e.fromNullable(null),e}(f);e.Optional=p;var h=function(t){function e(e,r){void 0===r&&(r=\"value\");var n=t.call(this,e)||this;return n.key=r,n}return o(e,t),Object.defineProperty(e.prototype,\"value\",{get:function(){return this._value?this._value[this.key]:null},set:function(t){this._value&&(this._value[this.key]=t)},enumerable:!1,configurable:!0}),e.prototype.orElse=function(t){var r={};return r[this.key]=t,this.isPresent()?this:new e(r,this.key)},e.prototype.orElseLazy=function(t){if(this.isPresent())return this;var r={};return r[this.key]=t(),new e(r,this.key)},e.prototype.getClass=function(){return e},e.fromNullable=function(t,r){return void 0===r&&(r=\"value\"),new e(t,r)},e.absent=e.fromNullable(null),e}(p);e.ValueEmbedder=h;var y=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.arrPos=null!=n?n:-1,o}return o(e,t),Object.defineProperty(e.prototype,\"value\",{get:function(){return\"\"==this.key&&this.arrPos>=0?this._value[this.arrPos]:this.key&&this.arrPos>=0?this._value[this.key][this.arrPos]:this._value[this.key]},set:function(t){\"\"==this.key&&this.arrPos>=0?this._value[this.arrPos]=t:this.key&&this.arrPos>=0?this._value[this.key][this.arrPos]=t:this._value[this.key]=t},enumerable:!1,configurable:!0}),e.absent=e.fromNullable(null),e}(h),d=function(t){function e(e){return t.call(this,e)||this}return o(e,t),Object.defineProperty(e.prototype,\"shallowCopy\",{get:function(){return new e(s.Stream.ofAssoc(this.value).collect(new u.AssocArrayCollector))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"deepCopy\",{get:function(){return new e(c({},this.value))},enumerable:!1,configurable:!0}),e.fromNullable=function(t){return new e(t)},e.prototype.shallowMerge=function(t,e,r){var n=this;void 0===e&&(e=!0),void 0===r&&(r=!1);var o=function(o){!e&&o in l.value||(r?Array.isArray(t.getIf(o).value)?s.Stream.of.apply(s.Stream,a([],i(t.getIf(o).value),!1)).each((function(t){return n.append(o).value=t})):l.append(o).value=t.getIf(o).value:l.assign(o).value=t.getIf(o).value)},l=this;for(var u in t.value)o(u)},e.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.length<1;if(!r){var n=t[t.length-1],o=(this.keyVal(n),this.getIf.apply(this,a([],i(t),!1)).isPresent());this.buildPath(t);var l=this.arrayIndex(n);if(l>-1)throw Error(\"Append only possible on non array properties, use assign on indexed data\");var u=this.getIf.apply(this,a([],i(t),!1)).value;Array.isArray(u)||(u=this.assign.apply(this,a([],i(t),!1)).value=[u]),o&&u.push({}),l=u.length-1;var s=new y(1==t.length?this.value:this.getIf.apply(this,t.slice(0,t.length-1)).value,n,l);return s}},e.prototype.appendIf=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return t?this.append.apply(this,a([],i(e),!1)):{value:null}},e.prototype.assign=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!(t.length<1)){this.buildPath(t);var r=this.keyVal(t[t.length-1]),n=this.arrayIndex(t[t.length-1]),o=new y(1==t.length?this.value:this.getIf.apply(this,t.slice(0,t.length-1)).value,r,n);return o}},e.prototype.assignIf=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return t?this.assign.apply(this,a([],i(e),!1)):{value:null}},e.prototype.getIf=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this.getClass().fromNullable(t.prototype.getIf.apply(this,e).value)},e.prototype.get=function(e){return this.getClass().fromNullable(t.prototype.get.call(this,e).value)},e.prototype.delete=function(t){return t in this.value&&delete this.value[t],this},e.prototype.toJson=function(){return JSON.stringify(this.value)},e.prototype.getClass=function(){return e},e.prototype.setVal=function(t){this._value=t},e.prototype.buildPath=function(t){for(var e=this,r=this.getClass().fromNullable(null),n=-1,o=function(t,e){for(var r=t.length,n=r+e,o=r;o<n;o++)t.push({})},i=0;i<t.length;i++){var a=this.keyVal(t[i]),l=this.arrayIndex(t[i]);if(\"\"===a&&l>=0)e.setVal(e.value instanceof Array?e.value:[]),o(e.value,l+1),n>=0&&(r.value[n]=e.value),r=e,n=l,e=this.getClass().fromNullable(e.value[l]);else{var u=e.getIf(a);if(-1==l)u.isAbsent()?u=this.getClass().fromNullable(e.value[a]={}):e=u;else{var s=u.value instanceof Array?u.value:[];o(s,l+1),e.value[a]=s,u=this.getClass().fromNullable(s[l])}r=e,n=l,e=u}}return this},e}(p);e.Config=d},255:function(t,e,r){var n=this&&this.__read||function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,\"__esModule\",{value:!0}),e.QueryFormStringCollector=e.QueryFormDataCollector=e.FormDataCollector=e.AssocArrayCollector=e.Run=e.ArrayAssocArrayCollector=e.ArrayCollector=e.FlatMapStreamDataSource=e.MappedStreamDataSource=e.FilteredStreamDatasource=e.ArrayStreamDataSource=e.SequenceDataSource=void 0;var i=r(551),a=function(){function t(t,e){this.total=e,this.start=t,this.value=t}return t.prototype.hasNext=function(){return this.value<this.total},t.prototype.next=function(){return Math.min(this.value++,this.total-1)},t.prototype.reset=function(){this.value=0},t}();e.SequenceDataSource=a;var l=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.dataPos=-1,this.value=t}return t.prototype.hasNext=function(){return this.value.length-1>this.dataPos},t.prototype.next=function(){return this.dataPos++,this.value[this.dataPos]},t.prototype.reset=function(){this.dataPos=-1},t}();e.ArrayStreamDataSource=l;var u=function(){function t(t,e){this.filteredNext=null,this.filterFunc=t,this.inputDataSource=e}return t.prototype.hasNext=function(){for(;null==this.filteredNext&&this.inputDataSource.hasNext();){var t=this.inputDataSource.next();if(this.filterFunc(t))return this.filteredNext=t,!0;this.filteredNext=null}return null!=this.filteredNext},t.prototype.next=function(){var t=this.filteredNext;return this.filteredNext=null,this.hasNext(),t},t.prototype.reset=function(){this.filteredNext=null,this.inputDataSource.reset()},t}();e.FilteredStreamDatasource=u;var s=function(){function t(t,e){this.mapFunc=t,this.inputDataSource=e}return t.prototype.hasNext=function(){return this.inputDataSource.hasNext()},t.prototype.next=function(){return this.mapFunc(this.inputDataSource.next())},t.prototype.reset=function(){this.inputDataSource.reset()},t}();e.MappedStreamDataSource=s;var c=function(){function t(t,e){this.mapFunc=t,this.inputDataSource=e}return t.prototype.hasNext=function(){return this.resolveCurrentNext()||this.resolveNextNext()},t.prototype.resolveCurrentNext=function(){var t=!1;return this.activeDataSource&&(t=this.activeDataSource.hasNext()),t},t.prototype.resolveNextNext=function(){for(var t=!1;!t&&this.inputDataSource.hasNext();){var e=this.mapFunc(this.inputDataSource.next());Array.isArray(e)?this.activeDataSource=new(l.bind.apply(l,o([void 0],n(e),!1))):this.activeDataSource=e,t=this.activeDataSource.hasNext()}return t},t.prototype.next=function(){return this.activeDataSource.next()},t.prototype.reset=function(){this.inputDataSource.reset()},t}();e.FlatMapStreamDataSource=c;var f=function(){function t(){this.data=[]}return t.prototype.collect=function(t){this.data.push(t)},Object.defineProperty(t.prototype,\"finalValue\",{get:function(){return this.data},enumerable:!1,configurable:!0}),t}();e.ArrayCollector=f;var p=function(){function t(){this.finalValue={}}return t.prototype.collect=function(t){var e,r,n,o,i=null!==(e=null==t?void 0:t[0])&&void 0!==e?e:t;this.finalValue[i]=null!==(n=null===(r=this.finalValue)||void 0===r?void 0:r[i])&&void 0!==n?n:[],this.finalValue[i].push(null===(o=null==t?void 0:t[1])||void 0===o||o)},t}();e.ArrayAssocArrayCollector=p;var h=function(){function t(){}return t.prototype.collect=function(t){},Object.defineProperty(t.prototype,\"finalValue\",{get:function(){return null},enumerable:!1,configurable:!0}),t}();e.Run=h;var y=function(){function t(){this.finalValue={}}return t.prototype.collect=function(t){var e,r;this.finalValue[null!==(e=t[0])&&void 0!==e?e:t]=null===(r=t[1])||void 0===r||r},t}();e.AssocArrayCollector=y;var d=function(){function t(){this.finalValue=new FormData}return t.prototype.collect=function(t){this.finalValue.append(t.key,t.value)},t}();e.FormDataCollector=d;var v=function(){function t(){this.finalValue=new FormData}return t.prototype.collect=function(t){var e=t.encodeFormElement();e.isPresent()&&this.finalValue.append(t.name.value,e.get(t.name).value)},t}();e.QueryFormDataCollector=v;var m=function(){function t(){this.formData=[]}return t.prototype.collect=function(t){var e=t.encodeFormElement();e.isPresent()&&this.formData.push([t.name.value,e.get(t.name).value])},Object.defineProperty(t.prototype,\"finalValue\",{get:function(){return i.Stream.of.apply(i.Stream,o([],n(this.formData),!1)).map((function(t){return t.join(\"=\")})).reduce((function(t,e){return[t,e].join(\"&\")})).orElse(\"\").value},enumerable:!1,configurable:!0}),t}();e.QueryFormStringCollector=m},551:function(t,e,r){var n=this&&this.__read||function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,\"__esModule\",{value:!0}),e.LazyStream=e.Stream=void 0;var i=r(152),a=r(255),l=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._limits=-1,this.pos=-1,this.value=t}return t.of=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new(t.bind.apply(t,o([void 0],n(e),!1)))},t.ofAssoc=function(t){return this.of.apply(this,o([],n(Object.keys(t)),!1)).map((function(e){return[e,t[e]]}))},t.ofDataSource=function(e){for(var r=[];e.hasNext();)r.push(e.next());return new(t.bind.apply(t,o([void 0],n(r),!1)))},t.prototype.limits=function(t){return this._limits=t,this},t.prototype.concat=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.of.apply(t,o([this],n(e),!1)).flatMap((function(t){return t}))},t.prototype.onElem=function(t){for(var e=0;e<this.value.length&&(-1==this._limits||e<this._limits)&&!1!==t(this.value[e],e);e++);return this},t.prototype.each=function(t){this.onElem(t)},t.prototype.map=function(e){e||(e=function(t){return t});var r=[];return this.each((function(t,n){r.push(e(t))})),new(t.bind.apply(t,o([void 0],n(r),!1)))},t.prototype.flatMap=function(e){var r=[];return this.each((function(t){var i=e(t);r=Array.isArray(i)?r.concat(i):r.concat.apply(r,o([],n(i.value),!1))})),t.of.apply(t,o([],n(r),!1))},t.prototype.filter=function(e){var r=[];return this.each((function(t){e(t)&&r.push(t)})),new(t.bind.apply(t,o([void 0],n(r),!1)))},t.prototype.reduce=function(t,e){void 0===e&&(e=null);for(var r=null!=e?0:1,n=null!=e?e:this.value.length?this.value[0]:null,o=r;o<this.value.length&&(-1==this._limits||o<this._limits);o++)n=t(n,this.value[o]);return i.Optional.fromNullable(n)},t.prototype.first=function(){return this.value&&this.value.length?i.Optional.fromNullable(this.value[0]):i.Optional.absent},t.prototype.last=function(){var t=this._limits>0?Math.min(this._limits,this.value.length):this.value.length;return i.Optional.fromNullable(t?this.value[t-1]:null)},t.prototype.anyMatch=function(t){for(var e=0;e<this.value.length&&(-1==this._limits||e<this._limits);e++)if(t(this.value[e]))return!0;return!1},t.prototype.allMatch=function(t){if(!this.value.length)return!1;for(var e=0,r=0;r<this.value.length;r++)t(this.value[r])&&e++;return e==this.value.length},t.prototype.noneMatch=function(t){for(var e=0,r=0;r<this.value.length;r++)t(this.value[r])||e++;return e==this.value.length},t.prototype.sort=function(e){var r=this.value.slice().sort(e);return t.of.apply(t,o([],n(r),!1))},t.prototype.collect=function(t){return this.each((function(e){return t.collect(e)})),t.finalValue},t.prototype.hasNext=function(){var t=-1!=this._limits&&this.pos>=this._limits-1,e=this.pos>=this.value.length-1;return!(t||e)},t.prototype.next=function(){return this.hasNext()?(this.pos++,this.value[this.pos]):null},t.prototype[Symbol.iterator]=function(){var t=this;return{next:function(){return{done:!t.hasNext(),value:t.next()}}}},t.prototype.reset=function(){this.pos=-1},t}();e.Stream=l;var u=function(){function t(t){this._limits=-1,this.pos=-1,this.dataSource=t}return t.of=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new t(new(a.ArrayStreamDataSource.bind.apply(a.ArrayStreamDataSource,o([void 0],n(e),!1))))},t.ofAssoc=function(t){return this.of.apply(this,o([],n(Object.keys(t)),!1)).map((function(e){return[e,t[e]]}))},t.ofStreamDataSource=function(e){return new t(e)},t.prototype.hasNext=function(){return!this.isOverLimits()&&this.dataSource.hasNext()},t.prototype.next=function(){var t=this.dataSource.next();return this.pos++,t},t.prototype.reset=function(){this.dataSource.reset(),this.pos=0,this._limits=-1},t.prototype.concat=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.of.apply(t,o([this],n(e),!1)).flatMap((function(t){return t}))},t.prototype.nextFilter=function(t){if(this.hasNext()){var e=this.next();return t(e)?e:this.nextFilter(t)}return null},t.prototype.limits=function(t){return this._limits=t,this},t.prototype.collect=function(t){for(;this.hasNext();){var e=this.next();t.collect(e)}return t.finalValue},t.prototype.onElem=function(e){var r=this;return new t(new a.MappedStreamDataSource((function(t){return!1===e(t,r.pos)&&r.stop(),t}),this))},t.prototype.filter=function(e){return new t(new a.FilteredStreamDatasource(e,this))},t.prototype.map=function(e){return new t(new a.MappedStreamDataSource(e,this))},t.prototype.flatMap=function(e){return new t(new a.FlatMapStreamDataSource(e,this))},t.prototype.each=function(t){for(;this.hasNext();)!1===t(this.next())&&this.stop()},t.prototype.reduce=function(t,e){if(void 0===e&&(e=null),!this.hasNext())return i.Optional.absent;var r=null,n=null;if(null!=e)r=e,n=this.next();else{if(r=this.next(),!this.hasNext())return i.Optional.fromNullable(r);n=this.next()}for(r=t(r,n);this.hasNext();)r=t(r,n=this.next());return i.Optional.fromNullable(r)},t.prototype.last=function(){return this.hasNext()?this.reduce((function(t,e){return e})):i.Optional.absent},t.prototype.first=function(){return this.reset(),this.hasNext()?i.Optional.fromNullable(this.next()):i.Optional.absent},t.prototype.anyMatch=function(t){for(;this.hasNext();)if(t(this.next()))return!0;return!1},t.prototype.allMatch=function(t){for(;this.hasNext();)if(!t(this.next()))return!1;return!0},t.prototype.noneMatch=function(t){for(;this.hasNext();)if(t(this.next()))return!1;return!0},t.prototype.sort=function(e){var r=this.collect(new a.ArrayCollector);return r=r.sort(e),t.of.apply(t,o([],n(r),!1))},Object.defineProperty(t.prototype,\"value\",{get:function(){return this.collect(new a.ArrayCollector)},enumerable:!1,configurable:!0}),t.prototype[Symbol.iterator]=function(){var t=this;return{next:function(){return{done:!t.hasNext(),value:t.next()}}}},t.prototype.stop=function(){this.pos=this._limits+1e9},t.prototype.isOverLimits=function(){return-1!=this._limits&&this.pos>=this._limits-1},t}();e.LazyStream=u},121:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,\"__esModule\",{value:!0}),e.XQ=e.XMLQuery=void 0;var i=r(805),a=r(585),l=i.Lang.isString,u=function(t){function e(e,r){void 0===r&&(r=\"text/xml\");var n;return l(e)?t.call(this,null==(n=e)?null:i.Lang.saveResolveLazy((function(){return new window.DOMParser}),(function(){return(t=new ActiveXObject(\"Microsoft.XMLDOM\")).async=!1,{parseFromString:function(e,r){return t.loadXML(e)}};var t})).value.parseFromString(n,r))||this:t.call(this,e)||this}return o(e,t),e.prototype.isXMLParserError=function(){return this.querySelectorAll(\"parsererror\").isPresent()},e.prototype.toString=function(){var t=[];return this.eachElem((function(e){var r,n,o,i=null!==(o=null===(n=null===(r=null===window||void 0===window?void 0:window.XMLSerializer)||void 0===r?void 0:r.constructor())||void 0===n?void 0:n.serializeToString(e))&&void 0!==o?o:null==e?void 0:e.xml;i&&t.push(i)})),t.join(\"\")},e.prototype.parserErrorText=function(t){return this.querySelectorAll(\"parsererror\").textContent(t)},e.parseXML=function(t){return new e(t)},e.parseHTML=function(t){return new e(t,\"text/html\")},e.fromString=function(t,r){return void 0===r&&(r=\"text/xml\"),new e(t,r)},e}(a.DomQuery);e.XMLQuery=u,e.XQ=u}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}var n={};!function(){var t=n;Object.defineProperty(t,\"__esModule\",{value:!0}),t.QueryFormDataCollector=t.FormDataCollector=t.AssocArrayCollector=t.ArrayCollector=t.QueryFormStringCollector=t.SequenceDataSource=t.FlatMapStreamDataSource=t.FilteredStreamDatasource=t.MappedStreamDataSource=t.ArrayStreamDataSource=t.LazyStream=t.Stream=t.XQ=t.XMLQuery=t.ValueEmbedder=t.Optional=t.Monad=t.Config=t.Lang=t.DQ=t.DomQueryCollector=t.ElementAttribute=t.DomQuery=void 0;var e=r(585);Object.defineProperty(t,\"DomQuery\",{enumerable:!0,get:function(){return e.DomQuery}}),Object.defineProperty(t,\"ElementAttribute\",{enumerable:!0,get:function(){return e.ElementAttribute}}),Object.defineProperty(t,\"DomQueryCollector\",{enumerable:!0,get:function(){return e.DomQueryCollector}}),Object.defineProperty(t,\"DQ\",{enumerable:!0,get:function(){return e.DQ}});var o=r(805);Object.defineProperty(t,\"Lang\",{enumerable:!0,get:function(){return o.Lang}});var i=r(152);Object.defineProperty(t,\"Config\",{enumerable:!0,get:function(){return i.Config}}),Object.defineProperty(t,\"Monad\",{enumerable:!0,get:function(){return i.Monad}}),Object.defineProperty(t,\"Optional\",{enumerable:!0,get:function(){return i.Optional}}),Object.defineProperty(t,\"ValueEmbedder\",{enumerable:!0,get:function(){return i.ValueEmbedder}});var a=r(121);Object.defineProperty(t,\"XMLQuery\",{enumerable:!0,get:function(){return a.XMLQuery}}),Object.defineProperty(t,\"XQ\",{enumerable:!0,get:function(){return a.XQ}});var l=r(551);Object.defineProperty(t,\"Stream\",{enumerable:!0,get:function(){return l.Stream}}),Object.defineProperty(t,\"LazyStream\",{enumerable:!0,get:function(){return l.LazyStream}});var u=r(255);Object.defineProperty(t,\"ArrayStreamDataSource\",{enumerable:!0,get:function(){return u.ArrayStreamDataSource}}),Object.defineProperty(t,\"MappedStreamDataSource\",{enumerable:!0,get:function(){return u.MappedStreamDataSource}}),Object.defineProperty(t,\"FilteredStreamDatasource\",{enumerable:!0,get:function(){return u.FilteredStreamDatasource}}),Object.defineProperty(t,\"FlatMapStreamDataSource\",{enumerable:!0,get:function(){return u.FlatMapStreamDataSource}}),Object.defineProperty(t,\"SequenceDataSource\",{enumerable:!0,get:function(){return u.SequenceDataSource}}),Object.defineProperty(t,\"QueryFormStringCollector\",{enumerable:!0,get:function(){return u.QueryFormStringCollector}}),Object.defineProperty(t,\"ArrayCollector\",{enumerable:!0,get:function(){return u.ArrayCollector}}),Object.defineProperty(t,\"AssocArrayCollector\",{enumerable:!0,get:function(){return u.AssocArrayCollector}}),Object.defineProperty(t,\"FormDataCollector\",{enumerable:!0,get:function(){return u.FormDataCollector}}),Object.defineProperty(t,\"QueryFormDataCollector\",{enumerable:!0,get:function(){return u.QueryFormDataCollector}})}();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,\"__esModule\",{value:!0})}();\n//# sourceMappingURL=index_core.js.map","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n///<reference types='../../types/typedefs'/>\n\nimport {Implementation} from \"../impl/AjaxImpl\";\nimport {PushImpl} from \"../impl/PushImpl\";\n\nexport module jsf {\n \"use strict\";\n\n /*\n * Version of the implementation for the jsf.js.\n * <p />\n * as specified within the jsf specifications jsf.html:\n * <ul>\n * <li>left two digits major release number</li>\n * <li>middle two digits minor spec release number</li>\n * <li>right two digits bug release number</li>\n * </ul>\n * @constant\n */\n export var specversion = 220000;\n /**\n * Implementation version as specified within the jsf specification.\n * <p />\n * A number increased with every implementation version\n * and reset by moving to a new spec release number\n *\n * @constant\n */\n export var implversion = 0;\n\n /**\n * SeparatorChar as defined by UINamingContainer.getNamingContainerSeparatorChar()\n * @type {Char}\n */\n export var separatorchar = getSeparatorChar();\n\n /**\n * This method is responsible for the return of a given project stage as defined\n * by the jsf specification.\n * <p/>\n * Valid return values are:\n * <ul>\n * <li>&quot;Production&quot;</li>\n * <li>&quot;Development&quot;</li>\n * <li>&quot;SystemTest&quot;</li>\n * <li>&quot;UnitTest&quot;</li>\n * </li>\n *\n * @return {String} the current project state emitted by the server side method:\n * <i>javax.faces.application.Application.getProjectStage()</i>\n */\n export function getProjectStage(): string {\n return Implementation.getProjectStage();\n }\n\n /**\n * collect and encode data for a given form element (must be of type form)\n * find the javax.faces.ViewState element and encode its value as well!\n * return a concatenated string of the encoded values!\n *\n * @throws an exception in case of the given element not being of type form!\n * https://issues.apache.org/jira/browse/MYFACES-2110\n */\n export function getViewState(formElement: Element | string): string {\n return Implementation.getViewState(formElement);\n }\n\n /**\n * returns the window identifier for the given node / window\n * @return the window identifier or null if none is found\n * @param rootNode\n */\n export function getClientWindow(rootNode?: Element | string): string {\n return Implementation.getClientWindow(rootNode);\n }\n\n //private helper functions\n function getSeparatorChar() {\n return Implementation.getSeparatorChar();\n }\n\n\n export module ajax {\n \"use strict\";\n\n /**\n * this function has to send the ajax requests\n *\n * following requestInternal conditions must be met:\n * <ul>\n * <li> the requestInternal must be sent asynchronously! </li>\n * <li> the requestInternal must be a POST!!! requestInternal </li>\n * <li> the requestInternal url must be the form action attribute </li>\n * <li> all requests must be queued with a client side requestInternal queue to ensure the requestInternal ordering!</li>\n * </ul>\n *\n * @param {String|Node} element: any dom element no matter being it html or jsf, from which the event is emitted\n * @param {EVENT} event: any javascript event supported by that object\n * @param {Map} options : map of options being pushed into the ajax cycle\n */\n export function request(element: Element, event?: Event, options?: Context) {\n Implementation.request(element, event, options)\n //Implementation.getInstance().requestInternal(element, event, options);\n }\n\n /**\n * response handler\n * @param request the request object having triggered this response\n * @param context the request context\n *\n * TODO add info on what can be in the context\n */\n export function response(request: XMLHttpRequest, context?: Context) {\n Implementation.response(request, context);\n }\n\n /**\n * Adds an error handler to our global error queue.\n * the error handler must be of the format <i>function errorListener(&lt;errorData&gt;)</i>\n * with errorData being of following format:\n * <ul>\n * <li> errorData.type : &quot;error&quot;</li>\n * <li> errorData.status : the error status message</li>\n * <li> errorData.serverErrorName : the server error name in case of a server error</li>\n * <li> errorData.serverErrorMessage : the server error message in case of a server error</li>\n * <li> errorData.source : the issuing source element which triggered the requestInternal </li>\n * <li> eventData.responseCode: the response code (aka http requestInternal response code, 401 etc...) </li>\n * <li> eventData.responseText: the requestInternal response text </li>\n * <li> eventData.responseXML: the requestInternal response xml </li>\n * </ul>\n *\n * @param {function} errorListener error handler must be of the format <i>function errorListener(&lt;errorData&gt;)</i>\n */\n export function addOnError(errorFunc: (data: ErrorData) => void) {\n Implementation.addOnError(<any>errorFunc);\n }\n\n /**\n * Adds a global event listener to the ajax event queue. The event listener must be a function\n * of following format: <i>function eventListener(&lt;eventData&gt;)</i>\n *\n * @param {function} eventListener event must be of the format <i>function eventListener(&lt;eventData&gt;)</i>\n */\n export function addOnEvent(eventFunc: (data: EventData) => void) {\n Implementation.addOnEvent(<any>eventFunc);\n }\n }\n\n export module util {\n\n /**\n * varargs function which executes a chain of code (functions or any other code)\n *\n * if any of the code returns false, the execution\n * is terminated prematurely skipping the rest of the code!\n *\n * @param {DomNode} source, the callee object\n * @param {Event} event, the event object of the callee event triggering this function\n * @param funcs ... arbitrary array of functions or strings\n * @returns true if the chain has succeeded false otherwise\n */\n export function chain(source, event, ...funcs: Array<Function | string>): boolean {\n return Implementation.chain(source, event, ...(funcs as EvalFuncs));\n }\n }\n\n export module push {\n /**\n * @param {function} onopen The function to be invoked when the web socket is opened.\n * @param {function} onmessage The function to be invoked when a message is received.\n * @param {function} onclose The function to be invoked when the web socket is closed.\n * @param {boolean} autoconnect Whether or not to immediately open the socket. Defaults to <code>false</code>.\n */\n export function init(socketClientId: string,\n uri: string,\n channel: string,\n onopen: Function,\n onmessage: Function,\n onclose: Function,\n behaviorScripts: any,\n autoconnect: boolean) {\n PushImpl.init(socketClientId, uri, channel, onopen, onmessage, onclose, behaviorScripts, autoconnect);\n }\n\n /**\n * Open the web socket on the given channel.\n * @param {string} channel The name of the web socket channel.\n * @throws {Error} When channel is unknown.\n */\n export function open(socketClientId: string) {\n PushImpl.open(socketClientId);\n }\n\n /**\n * Close the web socket on the given channel.\n * @param {string} channel The name of the web socket channel.\n * @throws {Error} When channel is unknown.\n */\n export function close(socketClientId: string) {\n PushImpl.close(socketClientId);\n }\n\n }\n\n //We hook the old namespace system into our npm system\n //if (\"undefined\" == window.jsf) {\n // window.jsf = jsf;\n //}\n\n\n}\n\n\n\n//fullfill the window contract\nexport module myfaces {\n\n /**\n * AB function similar to mojarra and Primefaces\n * not part of the spec but a convenience accessor method\n * Code provided by Thomas Andraschko\n *\n * @param source the event source\n * @param event the event\n * @param eventName event name for java.javax.faces.behavior.evemnt\n * @param execute execute list as passed down in jsf.ajax.request\n * @param render\n * @param options\n */\n export function ab(source: Element, event: Event, eventName: string, execute: string, render: string, options: Context = {}) {\n if (eventName) {\n options[\"javax.faces.behavior.event\"] = eventName;\n }\n if (execute) {\n options[\"execute\"] = execute;\n }\n if (render) {\n options[\"render\"] = render;\n }\n\n jsf.ajax.request(source, event, options);\n }\n}\n\n\n","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {IListener} from \"./util/ListenerQueue\";\nimport {Response} from \"./xhrCore/Response\";\nimport {XhrRequest} from \"./xhrCore/XhrRequest\";\nimport {AsynchronouseQueue} from \"./util/AsyncQueue\";\nimport {AssocArrayCollector, Config, DQ, Lang, Optional, Stream} from \"mona-dish\";\nimport {Assertions} from \"./util/Assertions\";\nimport {XhrFormData} from \"./xhrCore/XhrFormData\";\nimport {ExtDomquery} from \"./util/ExtDomQuery\";\nimport {ErrorData} from \"./xhrCore/ErrorData\";\nimport {EventData} from \"./xhrCore/EventData\";\nimport {ExtLang} from \"./util/Lang\";\nimport {\n CTX_PARAM_EXECUTE,\n CTX_PARAM_PASS_THR,\n CTX_PARAM_SRC_CTL_ID,\n CTX_PARAM_SRC_FRM_ID,\n CTX_PARAM_TR_TYPE,\n IDENT_ALL,\n IDENT_FORM,\n IDENT_NONE,\n IDENT_THIS,\n MYFACES,\n ON_ERROR,\n ON_EVENT,\n P_AJAX,\n P_CLIENT_WINDOW,\n P_EVT,\n P_EXECUTE,\n P_PARTIAL_SOURCE,\n P_RENDER,\n P_RESET_VALUES,\n P_WINDOW_ID,\n RENDER,\n REQ_TYPE_POST,\n SOURCE,\n TAG_FORM\n} from \"./core/Const\";\nimport {\n resolveDefaults,\n resolveDelay,\n resolveForm,\n resolveTimeout\n} from \"./xhrCore/RequestDataResolver\";\n\n\ndeclare var jsf: any;\n\n/*\n * allowed project stages\n */\nenum ProjectStages {\n Production = \"Production\",\n Development = \"Development\",\n SystemTest = \"SystemTest\",\n UnitTest = \"UnitTest\"\n}\n\n/*\n * blockfilter for the passthrough filtering; the attributes given here\n * will not be transmitted from the options into the passthrough\n */\nenum BlockFilter {\n onerror = \"onerror\",\n onevent = \"onevent\",\n render = \"render\",\n execute = \"execute\",\n myfaces = \"myfaces\",\n delay = \"delay\",\n timeout = \"timeout\",\n windowId = \"windowId\"\n}\n\n/**\n * Core Implementation\n * to distinct between api and impl\n *\n * The original idea was to make the implementation pluggable\n * but this is pointless, you always can overwrite the thin api layer\n * however a dedicated api makes sense for readability reasons\n */\nexport module Implementation {\n\n import trim = Lang.trim;\n import getMessage = ExtLang.getMessage;\n import getGlobalConfig = ExtLang.getGlobalConfig;\n import assert = Assertions.assert;\n\n\n\n let projectStage: string = null;\n let separator: string = null;\n let eventQueue = [];\n let errorQueue = [];\n export let requestQueue: AsynchronouseQueue<XhrRequest> = null;\n /*error reporting threshold*/\n let threshold = \"ERROR\";\n\n /**\n * fetches the separator char from the given script tags\n *\n * @return {char} the separator char for the given script tags\n */\n export function getSeparatorChar(): string {\n return resolveGlobalConfig()?.separator ??\n this?.separator ??\n (separator = ExtDomquery.searchJsfJsFor(/separator=([^&;]*)/).orElse(\":\").value);\n }\n\n /**\n * this is for testing purposes only, since AjaxImpl is a module\n * we need to reset for every unit test its internal states\n */\n export function reset() {\n projectStage = null;\n separator = null;\n eventQueue = [];\n errorQueue = [];\n requestQueue = null;\n }\n\n /**\n * @return the project stage also emitted by the server:\n * it cannot be cached and must be delivered over the server\n * The value for it comes from the requestInternal parameter of the jsf.js script called \"stage\".\n */\n export function getProjectStage(): string | null {\n return resolveGlobalConfig()?.projectStage ??\n this?.projectStage ??\n (projectStage = resolveProjectStateFromURL());\n }\n\n /**\n * resolves the project stage as url parameter\n * @return the project stage or null\n */\n export function resolveProjectStateFromURL(): string | null {\n\n /* run through all script tags and try to find the one that includes jsf.js */\n let foundStage = <string>ExtDomquery.searchJsfJsFor(/stage=([^&;]*)/).value;\n return (foundStage in ProjectStages) ? foundStage : null;\n }\n\n /**\n * implementation of the jsf.util.chain functionality\n *\n * @param source\n * @param event\n * @param funcs\n */\n export function chain(source: any, event: Event, ...funcs: EvalFuncs): boolean {\n\n let ret = true;\n let resolveAndExecute = function (func: Function | string) {\n if (\"string\" != typeof func) {\n //function is passed down as chain parameter, can be executed as is\n return (ret = ret && ((<Function>func).call(source, event) !== false));\n } else {\n //either a function or a string can be passed in case of a string we have to wrap it into another function\n //it it is not a plain executable code but a definition\n let sourceCode = trim(<string>func);\n if (sourceCode.indexOf(\"function \") == 0) {\n sourceCode = `return ${sourceCode} (event)`;\n }\n return (ret = ret && (new Function(\"event\", sourceCode).call(source, event) !== false));\n }\n };\n\n //we can use our stream each functionality to run our chain here..\n //the no return value == false stop stream functionality is handled by our resolveAndExecute\n <any>Stream.of(...funcs).each(func => resolveAndExecute(func));\n return ret;\n }\n\n /**\n * this function has to send the ajax requests\n *\n * following request conditions must be met:\n * <ul>\n * <li> the request must be sent asynchronously! </li>\n * <li> the request must be a POST!!! request </li>\n * <li> the request url must be the form action attribute </li>\n * <li> all requests must be queued with a client side request queue to ensure the request ordering!</li>\n * </ul>\n *\n * @param el any dom element no matter being it html or jsf, from which the event is emitted\n * @param event any javascript event supported by that object\n * @param opts map of options being pushed into the ajax cycle\n *\n * a) transformArguments out of the function\n * b) passThrough handling with a map copy with a filter map block map\n */\n export function request(el: ElemDef, event?: Event, opts ?: Options) {\n\n const {\n resolvedEvent,\n options,\n elem,\n elementId,\n requestCtx,\n internalCtx,\n windowId,\n isResetValues\n } = resolveDefaults(event, opts, el);\n\n Assertions.assertRequestIntegrity(options, elem);\n\n requestCtx.assignIf(!!windowId, P_WINDOW_ID).value = windowId;\n\n requestCtx.assign(CTX_PARAM_PASS_THR).value = filterPassthroughValues(options.value);\n\n requestCtx.assignIf(!!resolvedEvent, CTX_PARAM_PASS_THR, P_EVT).value = resolvedEvent?.type;\n\n /**\n * ajax pass through context with the source\n * onresolvedEvent and onerror\n */\n requestCtx.assign(SOURCE).value = elementId.value;\n\n /**\n * on resolvedEvent and onError...\n * those values will be traversed later on\n * also into the response context\n */\n requestCtx.assign(ON_EVENT).value = options.value?.onevent;\n requestCtx.assign(ON_ERROR).value = options.value?.onerror;\n\n /**\n * lets drag the myfaces config params also in\n */\n requestCtx.assign(MYFACES).value = options.value?.myfaces;\n /**\n * fetch the parent form\n *\n * note we also add an override possibility here\n * so that people can use dummy forms and work\n * with detached objects\n */\n let form: DQ = resolveForm(requestCtx, elem, resolvedEvent);\n\n /**\n * binding contract the javax.faces.source must be set\n */\n requestCtx.assign(CTX_PARAM_PASS_THR, P_PARTIAL_SOURCE).value = elementId.value;\n\n /**\n * javax.faces.partial.ajax must be set to true\n */\n requestCtx.assign(CTX_PARAM_PASS_THR, P_AJAX).value = true;\n\n /**\n * binding contract the javax.faces.source must be set\n */\n requestCtx.assign(CTX_PARAM_PASS_THR, P_PARTIAL_SOURCE).value = elementId.value;\n\n /**\n * if resetValues is set to true\n * then we have to set javax.faces.resetValues as well\n * as pass through parameter\n * the value has to be explicitly true, according to\n * the specs jsdoc\n */\n requestCtx.assignIf(isResetValues, CTX_PARAM_PASS_THR, P_RESET_VALUES).value = true;\n\n //additional meta information to speed things up, note internal non jsf\n //pass through options are stored under _mfInternal in the context\n internalCtx.assign(CTX_PARAM_SRC_FRM_ID).value = form.id.value;\n internalCtx.assign(CTX_PARAM_SRC_CTL_ID).value = elementId.value;\n internalCtx.assign(CTX_PARAM_TR_TYPE).value = REQ_TYPE_POST;\n\n //mojarra compatibility, mojarra is sending the form id as well\n //this is not documented behavior but can be determined by running\n //mojarra under blackbox conditions\n //i assume it does the same as our formId_submit=1 so leaving it out\n //wont hurt but for the sake of compatibility we are going to add it\n\n requestCtx.assign(CTX_PARAM_PASS_THR, form.id.value).value = form.id.value;\n\n assignClientWindowId(form, requestCtx);\n\n assignExecute(options, requestCtx, form, elementId.value);\n assignRender(options, requestCtx, form, elementId.value);\n\n let delay: number = resolveDelay(options);\n let timeout: number = resolveTimeout(options);\n\n //now we enqueue the request as asynchronous runnable into our request\n //queue and let the queue take over the rest\n queueHandler.addRequestToQueue(elem, form, requestCtx, internalCtx, delay, timeout);\n }\n\n /**\n * Spec. 13.3.3\n * Examining the response markup and updating the DOM tree\n * @param {XMLHttpRequest} request - the ajax request\n * @param {Object} context - the ajax context\n */\n export function response(request: XMLHttpRequest, context: Context) {\n Response.processResponse(request, context);\n }\n\n /**\n * adds an error handler to the error queue\n *\n * @param errorListener the error listener handler\n */\n export function addOnError(errorListener: IListener<ErrorData>) {\n /*error handling already done in the assert of the queue*/\n errorQueue.push(errorListener);\n }\n\n /**\n * adds an event handler to the event queue\n *\n * @param eventListener the event listener handler\n */\n export function addOnEvent(eventListener: IListener<EventData>) {\n /*error handling already done in the assert of the queue*/\n eventQueue.push(eventListener);\n }\n\n // noinspection JSUnusedLocalSymbols\n /**\n * sends an event to the event handlers\n *\n * @param data the event data object hosting the event data according to the spec @see EventData for what is reachable\n * @param localHandler an optional event handler, which is processed before the event handler chain\n */\n export function sendEvent(data: EventData, localHandler = function (data: EventData) {\n }) {\n /*now we serve the queue as well*/\n localHandler(data);\n eventQueue.forEach(fn => fn(data));\n }\n\n /**\n * error handler behavior called internally\n * and only into the impl it takes care of the\n * internal message transformation to a myfaces internal error\n * and then uses the standard send error mechanisms\n * also a double error logging prevention is done as well\n *\n * @param request the request currently being processed\n * @param context the context affected by this error\n * @param exception the exception being thrown\n * @param clearRequestQueue if set to true, clears the request queue of all pending requests\n */\n export function stdErrorHandler(request: XMLHttpRequest,\n context: Config,\n exception: any,\n clearRequestQueue = false) {\n //newer browsers do not allow to hold additional values on native objects like exceptions\n //we hence capsule it into the request, which is gced automatically\n //on ie as well, since the stdErrorHandler usually is called between requests\n //this is a valid approach\n try {\n if (threshold == \"ERROR\") {\n let errorData = ErrorData.fromClient(exception);\n sendError(errorData);\n }\n } finally {\n if (clearRequestQueue) {\n requestQueue.cleanup();\n }\n }\n }\n\n // noinspection JSUnusedLocalSymbols\n /**\n * implementation triggering the error chain\n *\n *\n *\n * handles the errors, in case of an onError exists within the context the onError is called as local error handler\n * the registered error handlers in the queue received an error message to be dealt with\n * and if the projectStage is at development an alert box is displayed\n *\n * note: we have additional functionality here, via the global config myfaces.config.defaultErrorOutput a function can be provided\n * which changes the default output behavior from alert to something else\n *\n * @param errorData the error data to be displayed\n * @param localHandler an optional local error handler which has to be processed before the error handler queue\n */\n export function sendError(errorData: ErrorData, localHandler = function (data: any) {\n }) {\n\n localHandler(errorData);\n errorQueue.forEach((errorCallback: Function) => {\n errorCallback(errorData);\n });\n let displayError: (string) => void = getGlobalConfig(\"defaultErrorOutput\", (console ? console.error : alert));\n displayError(errorData);\n }\n\n /**\n * @node optional element or id defining a rootnode where an element with the id \"javax.faces.windowId\" is hosted\n * @return the client window id of the current window, if one is given if none is found, null is returned\n */\n export function getClientWindow(node ?: Element | string): string | null {\n const ALTERED = \"___mf_id_altered__\";\n const INIT = \"___init____\";\n\n /**\n * the search root for the dom element search\n */\n let searchRoot = new DQ(node || document.body).querySelectorAll(`form input [name='${P_CLIENT_WINDOW}']`);\n\n /**\n * lazy helper to fetch the window id from the window url\n */\n let fetchWindowIdFromUrl = () => ExtDomquery.searchJsfJsFor(/jfwid=([^&;]*)/).orElse(null).value;\n\n /**\n * functional double check based on stream reduction\n * the values should be identical or on INIT value which is a premise to\n * skip the first check\n *\n * @param value1\n * @param value2\n */\n let differenceCheck = (value1: string, value2: string) => {\n if(value1 == INIT) {\n return value2;\n } else if (value1 == ALTERED || value1 != value2) {\n return ALTERED;\n }\n return value2;\n };\n\n /**\n * helper for cleaner code, maps the value from an item\n *\n * @param item\n */\n let getValue = (item: DQ) => item.attr(\"value\").value;\n /**\n * fetch the window id from the forms\n * window ids must be present in all forms\n * or non existent. If they exist all of them must be the same\n */\n\n let formWindowId: Optional<string> = searchRoot.stream.map<string>(getValue).reduce(differenceCheck, INIT);\n\n\n //if the resulting window id is set on altered then we have an unresolvable problem\n assert(ALTERED != formWindowId.value, \"Multiple different windowIds found in document\");\n\n /**\n * return the window id or null\n * prio, forms under node/document and if not given then from the url\n */\n return formWindowId.value != INIT ? formWindowId.value : fetchWindowIdFromUrl();\n }\n\n /**\n * collect and encode data for a given form element (must be of type form)\n * find the javax.faces.ViewState element and encode its value as well!\n * @return a concatenated string of the encoded values!\n *\n * @throws Error in case of the given element not being of type form!\n * https://issues.apache.org/jira/browse/MYFACES-2110\n */\n export function getViewState(form: Element | string): string {\n /**\n * typecheck assert!, we opt for strong typing here\n * because it makes it easier to detect bugs\n */\n\n let element: DQ = DQ.byId(form, true);\n if (!element.isTag(TAG_FORM)) {\n throw new Error(getMessage(\"ERR_VIEWSTATE\"));\n }\n\n let formData = new XhrFormData(element);\n return formData.toString();\n }\n\n /**\n * this at the first sight looks like a weird construct, but we need to do it this way\n * for testing, we cannot proxy addRequestToQueue from the testing frameworks directly\n * but we need to keep it under unit tests.\n */\n export let queueHandler = {\n /**\n * public to make it shimmable for tests\n *\n * adds a new request to our queue for further processing\n */\n addRequestToQueue: function (elem: DQ, form: DQ, reqCtx: Config, respPassThr: Config, delay = 0, timeout = 0) {\n requestQueue = requestQueue ?? new AsynchronouseQueue<XhrRequest>();\n requestQueue.enqueue(new XhrRequest(elem, form, reqCtx, respPassThr, [], timeout), delay);\n }\n };\n\n //----------------------------------------------- Methods ---------------------------------------------------------------------\n\n /**\n * the idea is to replace some placeholder parameters with their respective values\n * placeholder params like @all, @none, @form, @this need to be replaced by\n * the values defined by the specification\n *\n * This function does it for the render parameters\n *\n * @param requestOptions the source options coming in as options object from jsf.ajax.request (options parameter)\n * @param targetContext the receiving target context\n * @param issuingForm the issuing form\n * @param sourceElementId the executing element triggering the jsf.ajax.request (id of it)\n */\n function assignRender(requestOptions: Config, targetContext: Config, issuingForm: DQ, sourceElementId: string) {\n if (requestOptions.getIf(RENDER).isPresent()) {\n remapDefaultConstants(targetContext.getIf(CTX_PARAM_PASS_THR).get({}), P_RENDER, <string>requestOptions.getIf(RENDER).value, issuingForm, <any>sourceElementId);\n }\n }\n\n /**\n * the idea is to replace some placeholder parameters with their respective values\n * placeholder params like @all, @none, @form, @this need to be replaced by\n * the values defined by the specification\n *\n * This function does it for the execute parameters\n *\n * @param requestOptions the source options coming in as options object from jsf.ajax.request (options parameter)\n * @param targetContext the receiving target context\n * @param issuingForm the issuing form\n * @param sourceElementId the executing element triggering the jsf.ajax.request (id of it)\n */\n function assignExecute(requestOptions: Config, targetContext: Config, issuingForm: DQ, sourceElementId: string) {\n\n if (requestOptions.getIf(CTX_PARAM_EXECUTE).isPresent()) {\n /*the options must be a blank delimited list of strings*/\n /*compliance with Mojarra which automatically adds @this to an execute\n * the spec rev 2.0a however states, if none is issued nothing at all should be sent down\n */\n requestOptions.assign(CTX_PARAM_EXECUTE).value = [requestOptions.getIf(CTX_PARAM_EXECUTE).value, IDENT_THIS].join(\" \");\n remapDefaultConstants(targetContext.getIf(CTX_PARAM_PASS_THR).get({}), P_EXECUTE, <string>requestOptions.getIf(CTX_PARAM_EXECUTE).value, issuingForm, <any>sourceElementId);\n } else {\n targetContext.assign(CTX_PARAM_PASS_THR, P_EXECUTE).value = sourceElementId;\n }\n }\n\n /**\n * apply the browser tab where the request was originating from\n *\n * @param form the form hosting the client window id\n * @param targetContext the target context receiving the value\n */\n function assignClientWindowId(form: DQ, targetContext: Config) {\n let clientWindow = jsf.getClientWindow(form.getAsElem(0).value);\n if (clientWindow) {\n targetContext.assign(CTX_PARAM_PASS_THR, P_CLIENT_WINDOW).value = clientWindow;\n }\n }\n\n /**\n * transforms the user values to the expected one\n * with the proper none all form and this handling\n * (note we also could use a simple string replace but then\n * we would have had double entries under some circumstances)\n *\n * there are several standardized constants which need a special treatment\n * like @all, @none, @form, @this\n *\n * @param targetConfig the target configuration receiving the final values\n * @param targetKey the target key\n * @param userValues the passed user values (aka input string which needs to be transformed)\n * @param issuingForm the form where the issuing element originates\n * @param issuingElementId the issuing element\n */\n function remapDefaultConstants(targetConfig: Config, targetKey: string, userValues: string, issuingForm: DQ, issuingElementId: string): Config {\n //a cleaner implementation of the transform list method\n\n let iterValues = (userValues) ? trim(userValues).split(/\\s+/gi) : [];\n let ret = [];\n let processed = {};\n\n //the idea is simply to loop over all values and then replace\n //their generic values and filter out doubles\n //this is more readable than the old indexed based solution\n //and not really slower because we had to build up the index in our old solution\n //anyway\n for (let cnt = 0; cnt < iterValues.length; cnt++) {\n //avoid doubles\n if (iterValues[cnt] in processed) {\n continue;\n }\n switch (iterValues[cnt]) {\n //@none no values should be sent\n case IDENT_NONE:\n return targetConfig.delete(targetKey);\n //@all is a pass through case according to the spec\n case IDENT_ALL:\n targetConfig.assign(targetKey).value = IDENT_ALL;\n return targetConfig;\n //@form pushes the issuing form id into our list\n case IDENT_FORM:\n ret.push(issuingForm.id.value);\n processed[issuingForm.id.value] = true;\n break;\n //@this is replaced with the current issuing element id\n case IDENT_THIS:\n if (!(issuingElementId in processed)) {\n ret.push(issuingElementId);\n processed[issuingElementId] = true;\n }\n break;\n default:\n ret.push(iterValues[cnt]);\n processed[iterValues[cnt]] = true;\n }\n }\n //We now add the target as joined list\n targetConfig.assign(targetKey).value = ret.join(\" \");\n return targetConfig;\n }\n\n /**\n * filter the options given with a blacklist so that only\n * the values required for passthough land in the ajax request\n *\n * @param {Context} mappedOpts the options to be filtered\n */\n function filterPassthroughValues(mappedOpts: Context): Context {\n //we now can use the full code reduction given by our stream api\n //to filter\n return Stream.ofAssoc(mappedOpts)\n .filter(item => !(item[0] in BlockFilter))\n .collect(new AssocArrayCollector());\n }\n\n function resolveGlobalConfig(): any {\n return window?.[MYFACES]?.config ?? {};\n }\n\n}\n","/**\n * Typescript port of the jsf.push part in the myfaces implementation\n */\n\n//TODO still work in progress\n//this is a 1:1 port for the time being\nimport {jsf} from \"../api/Jsf\";\nimport {MAX_RECONNECT_ATTEMPTS, REASON_EXPIRED, RECONNECT_INTERVAL} from \"./core/Const\";\n\n\n/**\n * Implementation class for the push functionality\n */\nexport module PushImpl {\n\n\n\n const URL_PROTOCOL = window.location.protocol.replace(\"http\", \"ws\") + \"//\";\n\n\n //we expose the member variables for testing purposes\n //they are not directly touched outside of tests\n\n /* socket map by token */\n export let sockets = {};\n /* component attributes by clientId */\n export let components = {};\n /* client ids by token (share websocket connection) */\n export let clientIdsByTokens = {};\n\n\n //needed for testing\n export function reset() {\n sockets = {};\n components = {}\n clientIdsByTokens = {}\n }\n\n /*\n * Api implementations, exposed functions\n */\n\n /**\n *\n * @param {function} onopen The function to be invoked when the web socket is opened.\n * @param {function} onmessage The function to be invoked when a message is received.\n * @param {function} onclose The function to be invoked when the web socket is closed.\n * @param {boolean} autoconnect Whether or not to immediately open the socket. Defaults to <code>false</code>.\n */\n export function init(socketClientId: string,\n uri: string,\n channel: string,\n onopen: Function,\n onmessage: Function,\n onclose: Function,\n behaviorScripts: any,\n autoconnect: boolean) {\n onclose = resolveFunction(onclose);\n\n if (!window.WebSocket) { // IE6-9.\n onclose(-1, channel);\n return;\n }\n\n let channelToken = uri.substr(uri.indexOf('?') + 1);\n\n if (!components[socketClientId]) {\n components[socketClientId] = {\n 'channelToken': channelToken,\n 'onopen': resolveFunction(onopen),\n 'onmessage' : resolveFunction(onmessage),\n 'onclose': onclose,\n 'behaviors': behaviorScripts,\n 'autoconnect': autoconnect};\n if (!clientIdsByTokens[channelToken]) {\n clientIdsByTokens[channelToken] = [];\n }\n clientIdsByTokens[channelToken].push(socketClientId);\n if (!sockets[channelToken]){\n sockets[channelToken] = new Socket(channelToken,\n getBaseURL(uri), channel);\n }\n }\n\n if (autoconnect) {\n jsf.push.open(socketClientId);\n }\n }\n\n export function open(socketClientId: string) {\n getSocket(components?.[socketClientId]?.channelToken).open();\n }\n\n export function close(socketClientId: string) {\n getSocket(components?.[socketClientId].channelToken).close();\n }\n\n // Private helper classes\n // Private classes functions ----------------------------------------------------------------------------------\n /**\n * Creates a reconnecting web socket. When the web socket successfully connects on first attempt, then it will\n * automatically reconnect on timeout with cumulative intervals of 500ms with a maximum of 25 attempts (~3 minutes).\n * The <code>onclose</code> function will be called with the error code of the last attempt.\n * @constructor\n * @param {string} channelToken the channel token associated with this websocket connection\n * @param {string} url The URL of the web socket\n * @param {string} channel The name of the web socket channel.\n */\n\n class Socket {\n\n socket: WebSocket;\n reconnectAttempts = 0;\n\n constructor(private channelToken: string, private url: string, private channel: string) {\n }\n\n open() {\n if (this.socket && this.socket.readyState == 1) {\n return;\n }\n this.socket = new WebSocket(this.url);\n\n this.bindCallbacks();\n }\n\n onopen(event: any) {\n if (!this.reconnectAttempts) {\n let clientIds = clientIdsByTokens[this.channelToken];\n for (let i = clientIds.length - 1; i >= 0; i--) {\n let socketClientId = clientIds[i];\n components[socketClientId]['onopen'](this.channel);\n }\n }\n this.reconnectAttempts = 0;\n }\n\n onmmessage(event: any) {\n let message = JSON.parse(event.data);\n for (let i = clientIdsByTokens[this.channelToken].length - 1; i >= 0; i--) {\n let socketClientId = clientIdsByTokens[this.channelToken][i];\n if (document.getElementById(socketClientId)) {\n try {\n components[socketClientId]['onmessage'](message, this.channel, event);\n } catch (e) {\n //Ignore\n }\n let behaviors = components[socketClientId]['behaviors'];\n let functions = behaviors[message];\n if (functions && functions.length) {\n for (let j = 0; j < functions.length; j++) {\n try {\n functions[j](null);\n } catch (e) {\n //Ignore\n }\n }\n }\n } else {\n clientIdsByTokens[this.channelToken].splice(i, 1);\n }\n }\n if (clientIdsByTokens[this.channelToken].length == 0) {\n //tag dissapeared\n this.close();\n }\n }\n\n onclose(event: any) {\n if (!this.socket\n || (event.code == 1000 && event.reason == REASON_EXPIRED)\n || (event.code == 1008)\n || (!this.reconnectAttempts)\n || (this.reconnectAttempts >= MAX_RECONNECT_ATTEMPTS)) {\n let clientIds = clientIdsByTokens[this.channelToken];\n for (let i = clientIds.length - 1; i >= 0; i--) {\n let socketClientId = clientIds[i];\n components[socketClientId]['onclose'](event?.code, this?.channel, event);\n }\n } else {\n setTimeout(this.open, RECONNECT_INTERVAL * this.reconnectAttempts++);\n }\n };\n\n close() {\n if (this.socket) {\n let s = this.socket;\n this.socket = null;\n s.close();\n }\n }\n\n /**\n * bind the callbacks to the socket callbacks\n */\n private bindCallbacks() {\n this.socket.onopen = (event: Event) => this.onopen(event);\n this.socket.onmessage = (event: Event) => this.onmmessage(event);\n this.socket.onclose = (event: Event) => this.onclose(event);\n }\n }\n\n // Private static functions ---------------------------------------------------------------------------------------\n\n function getBaseURL(url: string) {\n if (url.indexOf(\"://\") < 0) {\n let base = window.location.hostname + \":\" + window.location.port;\n return URL_PROTOCOL + base + url;\n } else {\n return url;\n }\n }\n\n /**\n * Get socket associated with given channelToken.\n * @param {string} channelToken The name of the web socket channelToken.\n * @return {Socket} Socket associated with given channelToken.\n * @throws {Error} When channelToken is unknown, you may need to initialize\n * it first via <code>init()</code> function.\n */\n function getSocket(channelToken: string): Socket {\n let socket = sockets[channelToken];\n if (socket) {\n return socket;\n } else {\n throw new Error(\"Unknown channelToken: \" + channelToken);\n }\n }\n\n function resolveFunction(fn: Function | string = () => {\n }): Function {\n return <Function>((typeof fn !== \"function\") && (fn = window[fn]), fn);\n }\n\n}","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * [export const] constants\n */\n\nexport const P_PARTIAL_SOURCE = \"javax.faces.source\";\nexport const PARTIAL_ID = \"partialId\";\nexport const P_VIEWSTATE = \"javax.faces.ViewState\";\nexport const P_VIEWROOT = \"javax.faces.ViewRoot\";\nexport const P_VIEWHEAD = \"javax.faces.ViewHead\";\nexport const P_VIEWBODY = \"javax.faces.ViewBody\";\n\n/*some useful definitions*/\n\nexport const EMPTY_FUNC = Object.freeze(() => {\n});\nexport const EMPTY_STR = \"\";\nexport const EMPTY_MAP = Object.freeze({});\n\nexport const HTML_VIEWSTATE = [\"<input type='hidden'\", \"id='\", P_VIEWSTATE, \"' name='\", P_VIEWSTATE, \"' value='' />\"].join(EMPTY_STR);\n\n\n/*internal identifiers for options*/\nexport const IDENT_ALL = \"@all\";\nexport const IDENT_NONE = \"@none\";\nexport const IDENT_THIS = \"@this\";\nexport const IDENT_FORM = \"@form\";\n\n\nexport const P_AJAX = \"javax.faces.partial.ajax\";\nexport const P_EXECUTE = \"javax.faces.partial.execute\";\nexport const P_RENDER = \"javax.faces.partial.render\";\nexport const P_EVT = \"javax.faces.partial.event\";\nexport const P_CLIENT_WINDOW = \"javax.faces.ClientWindow\";\nexport const P_RESET_VALUES = \"javax.faces.partial.resetValues\";\n\nexport const P_WINDOW_ID = \"javax.faces.windowId\";\n\nexport const RENDER = \"render\";\nexport const WINDOW_ID = \"windowId\";\n\n/* message types */\nexport const ERROR = \"error\";\nexport const EVENT = \"event\";\n\nexport const ON_ERROR = \"onerror\";\nexport const ON_EVENT = \"onevent\";\n\n/* event emitting stages */\nexport const BEGIN = \"begin\";\nexport const COMPLETE = \"complete\";\nexport const SUCCESS = \"success\";\n\nexport const SOURCE = \"source\";\nexport const STATUS = \"status\";\n\n\nexport const ERROR_NAME = \"error-name\";\nexport const ERROR_MESSAGE = \"error-message\";\n\n\nexport const RESPONSE_TEXT = \"responseText\";\nexport const RESPONSE_XML = \"responseXML\";\n\n/*ajax errors spec 14.4.2*/\nexport const HTTPERROR = \"httpError\";\nexport const EMPTY_RESPONSE = \"emptyResponse\";\nexport const MALFORMEDXML = \"malformedXML\";\nexport const SERVER_ERROR = \"serverError\";\nexport const CLIENT_ERROR = \"clientError\";\nexport const TIMEOUT_EVENT = \"timeout\";\n\nexport const CTX_PARAM_MF_INTERNAL = \"_mfInternal\";\n\nexport const CTX_PARAM_SRC_FRM_ID = \"_mfSourceFormId\";\nexport const CTX_PARAM_SRC_CTL_ID = \"_mfSourceControlId\";\nexport const CTX_PARAM_TR_TYPE = \"_mfTransportType\";\nexport const CTX_PARAM_PASS_THR = \"passThrgh\";\nexport const CTX_PARAM_DELAY = \"delay\";\nexport const CTX_PARAM_TIMEOUT = \"timeout\";\nexport const CTX_PARAM_RST = \"resetValues\";\nexport const CTX_PARAM_EXECUTE = \"execute\";\n\nexport const STAGE_DEVELOPMENT = \"Development\";\n\n\nexport const CONTENT_TYPE = \"Content-Type\";\nexport const HEAD_FACES_REQ = \"Faces-Request\";\nexport const REQ_ACCEPT = \"Accept\";\nexport const VAL_AJAX = \"partial/ajax\";\nexport const ENCODED_URL = \"javax.faces.encodedURL\";\nexport const REQ_TYPE_GET = \"GET\";\nexport const REQ_TYPE_POST = \"POST\";\nexport const STATE_EVT_BEGIN = \"begin\"; //TODO remove this\nexport const STATE_EVT_TIMEOUT = \"TIMEOUT_EVENT\";\nexport const STATE_EVT_COMPLETE = \"complete\"; //TODO remove this\nexport const URL_ENCODED = \"application/x-www-form-urlencoded\";\nexport const MULTIPART = \"multipart/form-data\";\nexport const NO_TIMEOUT = 0;\nexport const STD_ACCEPT = \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\";\n\nexport const TAG_HEAD = \"head\";\nexport const TAG_FORM = \"form\";\nexport const TAG_BODY = \"body\";\nexport const TAG_BEFORE = \"before\";\nexport const TAG_AFTER = \"after\";\n\nexport const TAG_ATTR = \"attribute\";\n\n\nexport const SEL_VIEWSTATE_ELEM = \"[name='\" + P_VIEWSTATE + \"']\";\nexport const SEL_CLIENT_WINDOW_ELEM = \"[name='\" + P_CLIENT_WINDOW + \"']\";\nexport const SEL_RESPONSE_XML = \"responseXML\";\n\nexport const PHASE_PROCESS_RESPONSE = \"processResponse\";\n\n\nexport const ERR_NO_PARTIAL_RESPONSE = \"Partial response not set\";\n\nexport const ATTR_URL = \"url\";\nexport const ATTR_NAME = \"name\";\nexport const ATTR_VALUE = \"value\";\nexport const ATTR_ID = \"id\";\n\n/*partial response types*/\nexport const RESP_PARTIAL = \"partial-response\";\n\n/*partial commands*/\nexport const CMD_CHANGES = \"changes\";\nexport const CMD_UPDATE = \"update\";\nexport const CMD_DELETE = \"delete\";\nexport const CMD_INSERT = \"insert\";\nexport const CMD_EVAL = \"eval\";\nexport const CMD_ERROR = \"error\";\nexport const CMD_ATTRIBUTES = \"attributes\";\nexport const CMD_EXTENSION = \"extension\";\nexport const CMD_REDIRECT = \"redirect\";\n\n/*other constants*/\n\nexport const UPDATE_FORMS = \"_updateForms\";\nexport const UPDATE_ELEMS = \"_updateElems\";\n\nexport const MYFACES = \"myfaces\";\n\nexport const SEL_SCRIPTS_STYLES = \"script, style, link\";\n\nexport const MF_NONE = \"__mf_none__\";\n\nexport const REASON_EXPIRED = \"Expired\";\n\nexport const APPLIED_VST = \"appliedViewState\";\nexport const APPLIED_CLIENT_WINDOW = \"appliedClientWindow\";\n\nexport const RECONNECT_INTERVAL = 500;\nexport const MAX_RECONNECT_ATTEMPTS = 25;\n\nexport const UNKNOWN = \"UNKNOWN\";\n","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {EMPTY_STR, P_VIEWSTATE} from \"./Const\";\n\nexport interface IdValueHolder {\n\n readonly id: string;\n readonly value: string;\n\n}\n\n/**\n * a helper class to isolate the\n * view state and client window and other\n * future states which follow a similar pattern\n */\nexport class StateHolder implements IdValueHolder {\n\n nameSpace: string;\n\n constructor(public id: string, public value: string) {\n let viewStatePos = id.indexOf(P_VIEWSTATE);\n this.nameSpace = viewStatePos > 0 ? id.substr(0, viewStatePos - 1) : EMPTY_STR;\n }\n\n get hasNameSpace(): boolean {\n return !!(this?.nameSpace ?? EMPTY_STR).length;\n }\n}\n","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class Messages {\n MSG_TEST = \"Testmessage\";\n\n /*Messages*/\n /** @constant */\n MSG_DEV_MODE = \"Note, this message is only sent, because project stage is development and no \" +\n \"other error listeners are registered.\";\n /** @constant */\n MSG_AFFECTED_CLASS = \"Affected Class=\";\n /** @constant */\n MSG_AFFECTED_METHOD = \"Affected Method=\";\n /** @constant */\n MSG_ERROR_NAME = \"Error Name=\";\n /** @constant */\n MSG_ERROR_MESSAGE = \"Error Message=\";\n /** @constant */\n MSG_SERVER_ERROR_NAME = \"Server Error Name=\";\n\n /** @constant */\n MSG_ERROR_DESC = \"Error Description=\";\n /** @constant */\n MSG_ERROR_NO = \"Error Number=\";\n /** @constant */\n MSG_ERROR_LINENO = \"Error Line Number=\";\n\n /*Errors and messages*/\n /** @constant */\n ERR_FORM = \"Sourceform could not be determined, either because element is not attached to a form or we have multiple forms with named elements of the same identifier or name, stopping the ajax processing\";\n /** @constant */\n ERR_VIEWSTATE = \"jsf.viewState= param value not of type form!\";\n /** @constant */\n ERR_TRANSPORT = \"Transport type {0} does not exist\";\n /** @constant */\n ERR_EVT_PASS = \"an event must be passed down (either a an event object null or undefined) \";\n /** @constant */\n ERR_CONSTRUCT = \"Parts of the response couldn't be retrieved when constructing the event data= {0} \";\n /** @constant */\n ERR_MALFORMEDXML = \"The server response could not be parsed, the server has returned with a response which is not xml !\";\n /** @constant */\n ERR_SOURCE_FUNC = \"source cannot be a function (probably source and event were not defined or set to null\";\n /** @constant */\n ERR_EV_OR_UNKNOWN = \"An event object or unknown must be passed as second parameter\";\n /** @constant */\n ERR_SOURCE_NOSTR = \"source cannot be a string\";\n /** @constant */\n ERR_SOURCE_DEF_NULL = \"source must be defined or null\";\n\n //_Lang.js\n /** @constant */\n ERR_MUST_STRING = \"{0}: {1} namespace must be of type String\";\n /** @constant */\n ERR_REF_OR_ID = \"{0}: {1} a reference node or identifier must be provided\";\n /** @constant */\n ERR_PARAM_GENERIC = \"{0}: parameter {1} must be of type {2}\";\n /** @constant */\n ERR_PARAM_STR = \"{0}: {1} param must be of type string\";\n /** @constant */\n ERR_PARAM_STR_RE = \"{0}: {1} param must be of type string or a regular expression\";\n /** @constant */\n ERR_PARAM_MIXMAPS = \"{0}: both a source as well as a destination map must be provided\";\n /** @constant */\n ERR_MUST_BE_PROVIDED = \"{0}: an {1} and a {2} must be provided\";\n /** @constant */\n ERR_MUST_BE_PROVIDED1 = \"{0}: {1} must be set\";\n\n /** @constant */\n ERR_REPLACE_EL = \"replaceElements called while evalNodes is not an array\";\n\n /** @constant */\n ERR_EMPTY_RESPONSE = \"{0}: The response cannot be null or empty!\";\n /** @constant */\n ERR_ITEM_ID_NOTFOUND = \"{0}: item with identifier {1} could not be found\";\n /** @constant */\n ERR_PPR_IDREQ = \"{0}: Error in PPR Insert, id must be present\";\n /** @constant */\n ERR_PPR_INSERTBEFID = \"{0}: Error in PPR Insert, before id or after id must be present\";\n /** @constant */\n ERR_PPR_INSERTBEFID_1 = \"{0}: Error in PPR Insert, before node of id {1} does not exist in document\";\n /** @constant */\n ERR_PPR_INSERTBEFID_2 = \"{0}: Error in PPR Insert, after node of id {1} does not exist in document\";\n\n /** @constant */\n ERR_PPR_DELID = \"{0}: Error in delete, id not in xml markup\";\n /** @constant */\n ERR_PPR_UNKNOWNCID = \"{0}: Unknown Html-Component-ID= {1}\";\n\n /** @constant */\n ERR_NO_VIEWROOTATTR = \"{0}: Changing of ViewRoot attributes is not supported\";\n /** @constant */\n ERR_NO_HEADATTR = \"{0}: Changing of Head attributes is not supported\";\n /** @constant */\n ERR_RED_URL = \"{0}: Redirect without url\";\n\n /** @constant */\n ERR_REQ_FAILED_UNKNOWN = \"Request failed with unknown status\";\n\n /** @constant */\n ERR_REQU_FAILED = \"Request failed with status {0} and reason {1}\";\n\n /** @constant */\n UNKNOWN = \"UNKNOWN\";\n}","import {Config, Lang, XMLQuery} from \"mona-dish\";\n\nimport {DQ} from \"mona-dish\";\nimport {ExtLang} from \"./Lang\";\nimport getMessage = ExtLang.getMessage;\nimport makeException = ExtLang.makeException;\nimport {\n ATTR_URL,\n EMPTY_RESPONSE,\n EMPTY_STR, ERR_NO_PARTIAL_RESPONSE, MALFORMEDXML,\n ON_ERROR,\n ON_EVENT,\n PHASE_PROCESS_RESPONSE,\n RESP_PARTIAL\n} from \"../core/Const\";\n\n/**\n * a set of internal code assertions\n * which raise an error\n *\n */\nexport module Assertions {\n\n export function assertRequestIntegrity(options: Config, elem: DQ): void | never {\n /*assert if the onerror is set and once if it is set it must be of type function*/\n assertFunction(options.getIf(ON_ERROR).value);\n /*assert if the onevent is set and once if it is set it must be of type function*/\n assertFunction(options.getIf(ON_EVENT).value);\n //improve the error messages if an empty elem is passed\n //Assertions.assertElementExists(elem);\n assert(elem.isPresent(), getMessage(\"ERR_MUST_BE_PROVIDED1\", \"{0}: source must be provided or exist\", \"source element id\"), \"jsf.ajax.request\", \"ArgNotSet\", )\n }\n\n export function assertUrlExists(node: XMLQuery): void | never {\n if (node.attr(ATTR_URL).isAbsent()) {\n throw Assertions.raiseError(new Error(), getMessage(\"ERR_RED_URL\", null, \"_Ajaxthis.processRedirect\"), \"processRedirect\");\n }\n }\n\n /**\n * checks the xml for various issues which can occur\n * and prevent a proper processing\n */\n export function assertValidXMLResponse(responseXML: XMLQuery) : void | never {\n assert(!responseXML.isAbsent(), EMPTY_RESPONSE, PHASE_PROCESS_RESPONSE);\n assert(!responseXML.isXMLParserError(), responseXML.parserErrorText(EMPTY_STR), PHASE_PROCESS_RESPONSE);\n assert(responseXML.querySelectorAll(RESP_PARTIAL).isPresent(), ERR_NO_PARTIAL_RESPONSE, PHASE_PROCESS_RESPONSE);\n }\n\n /**\n * internal helper which raises an error in the\n * format we need for further processing\n *\n * @param error\n * @param message the message\n * @param caller\n * @param title the title of the error (optional)\n * @param name the name of the error (optional)\n */\n export function raiseError(error: any, message: string, caller ?: string, title ?: string, name ?: string): Error {\n\n let finalTitle = title ?? MALFORMEDXML;\n let finalName = name ?? MALFORMEDXML;\n let finalMessage = message ?? EMPTY_STR;\n\n //TODO clean up the messy makeException, this is a perfect case for encapsulation and sane defaults\n return makeException(error, finalTitle, finalName, \"Response\", caller || (((<any>arguments).caller) ? (<any>arguments).caller.toString() : \"_raiseError\"), finalMessage);\n }\n\n /*\n * using the new typescript 3.7 compiler assertion functionality to improve compiler hinting\n * we are not fully there yet, but soon\n */\n\n export function assert(value: any, msg = EMPTY_STR, caller=EMPTY_STR, title=\"Assertion Error\"): asserts value {\n if(!value) {\n throw Assertions.raiseError(new Error(), msg ,caller, title);\n }\n }\n\n\n export function assertType(value: any, theType: any, msg = EMPTY_STR, caller=EMPTY_STR, title=\"Type Assertion Error\"): asserts value {\n if((!!value) && !Lang.assertType(value,theType)) {\n throw Assertions.raiseError(new Error(), msg ,caller, title);\n }\n }\n\n export function assertFunction(value: any, msg = EMPTY_STR, caller=EMPTY_STR, title=\"Assertion Error\"): asserts value is Function {\n assertType(value, \"function\", msg, caller, title);\n }\n}\n\n\n","import {AsyncRunnable} from \"./AsyncRunnable\";\n\n/**\n * Asynchronous queue which starts to work\n * through the callbacks until the queue is empty\n *\n * Every callback must be of async runnable\n * which is sort of an extended promise which has\n * added a decicated cancel and start point\n *\n * This interface can be used as wrapper contract\n * for normal promises if needed.\n */\nexport class AsynchronouseQueue<T extends AsyncRunnable<any>> {\n\n private runnableQueue = [];\n private delayTimeout: null | ReturnType<typeof setTimeout>;\n\n currentlyRunning: AsyncRunnable<any>;\n\n constructor() {\n }\n\n get isEmpty(): boolean {\n return !this.runnableQueue.length;\n }\n\n /**\n * enequeues an element and starts the\n * asynchronous work loop if not already running\n *\n * @param element the element to be queued and processed\n * @param delay possible delay after our usual process or drop if something newer is incoming algorithm\n */\n enqueue(element: T, delay = 0) {\n if (this.delayTimeout) {\n clearTimeout(this.delayTimeout);\n this.delayTimeout = null;\n }\n if (delay) {\n this.delayTimeout = setTimeout(() => {\n this.appendElement(element);\n });\n } else {\n this.appendElement(element);\n }\n }\n\n dequeue(): T {\n return this.runnableQueue.shift();\n }\n\n cleanup() {\n this.currentlyRunning = null;\n this.runnableQueue.length = 0;\n }\n\n private appendElement(element: T) {\n //only if the first element is added we start with a trigger\n //otherwise a process already is running and not finished yet at that\n //time\n this.runnableQueue.push(element);\n if (!this.currentlyRunning) {\n this.runEntry();\n }\n }\n\n private runEntry() {\n if (this.isEmpty) {\n this.currentlyRunning = null;\n return;\n }\n this.currentlyRunning = this.dequeue();\n this.currentlyRunning\n .catch((e) => {\n //in case of an error we always clean up the remaining calls\n //to allow a clean recovery of the application\n this.cleanup();\n throw e;\n })\n .then(\n //the idea is to trigger the next over an event to reduce\n //the number of recursive calls (stacks might be limited\n //compared to ram)\n //naturally give we have a DOM, the DOM is the natural event dispatch system\n //which we can use, to decouple the calls from a recursive stack call\n //(the browser engine will take care of that)\n () => this.callForNextElementToProcess()\n ).start();\n }\n\n cancel() {\n try {\n if (this.currentlyRunning) {\n this.currentlyRunning.cancel();\n }\n } finally {\n this.cleanup();\n }\n }\n\n private callForNextElementToProcess() {\n this.runEntry();\n }\n}","import {Config, IValueHolder, Optional, DomQuery, DQ} from \"mona-dish\";\nimport {EMPTY_STR, P_WINDOW_ID} from \"../core/Const\";\n\ndeclare let window: any;\n\n/**\n * Extension which adds implementation specific\n * meta data to our dom qury\n *\n * Usage\n * el = new ExtDQ(oldReference)\n * nonce = el.nonce\n * windowId = el.getWindowId\n */\nexport class ExtDomquery extends DQ {\n\n static get windowId() {\n return new ExtDomquery(document.body).windowId;\n }\n\n static get nonce(): string {\n return new ExtDomquery(document.body).nonce;\n }\n\n get windowId(): string | null {\n\n const fetchWindowIdFromURL = function (): string | null {\n let href = window.location.href;\n let windowId = \"windowId\";\n let regex = new RegExp(\"[\\\\?&]\" + windowId + \"=([^&#\\\\;]*)\");\n let results = regex.exec(href);\n //initial trial over the url and a regexp\n if (results != null) return results[1];\n return null;\n };\n\n //byId ($)\n if (this.value.isPresent()) {\n let result = this.querySelectorAll(\"form input[name='\" + P_WINDOW_ID + \"']\");\n if (result.length > 0) {\n throw Error(\"Multiple different windowIds found in document\");\n }\n\n return (result.isPresent()) ? (<HTMLInputElement>result.getAsElem(0).value).value : fetchWindowIdFromURL();\n } else {\n return fetchWindowIdFromURL();\n }\n }\n\n /*\n determines the jsfjs nonce and adds them to the namespace\n * this is done once and only lazily\n */\n get nonce(): string {\n //already processed\n let myfacesConfig = new Config(window.myfaces);\n let nonce: IValueHolder<string> = myfacesConfig.assign(\"config\", \"cspMeta\", \"nonce\");\n if (nonce.value) {\n return <string>nonce.value;\n }\n\n let curScript = new DQ(document.currentScript);\n //since our baseline atm is ie11 we cannot use document.currentScript globally\n if (curScript.attr(\"nonce\").value != null) {\n //fastpath for modern browsers\n return curScript.attr(\"nonce\").value;\n }\n\n let nonceScript = DQ\n .querySelectorAll(\"script[src], link[src]\")\n .lazyStream\n .filter((item) => item.attr(\"nonce\").value != null && item.attr(\"src\") != null)\n .map((item => !item.attr(\"src\").value.match(/jsf\\.js\\?ln=javax\\.faces/gi)))\n .first();\n\n if (nonceScript.isPresent()) {\n nonce.value = DomQuery.byId(nonceScript.value, true).attr(\"nonce\").value;\n }\n return <string>nonce.value;\n }\n\n static searchJsfJsFor(item: RegExp): Optional<String> {\n return new ExtDomquery(document).searchJsfJsFor(item);\n }\n\n searchJsfJsFor(rexp: RegExp): Optional<string> {\n //perfect application for lazy stream\n return DQ.querySelectorAll(\"script\").lazyStream\n .filter(item => {\n return (item.attr(\"src\").value ?? EMPTY_STR).search(/\\/javax\\.faces\\.resource.*\\/jsf\\.js.*separator/) != -1;\n }).map((item: DQ) => {\n let result = item.attr(\"src\").value.match(rexp);\n return decodeURIComponent(result[1]);\n }).first();\n }\n\n globalEval(code: string, nonce ?: string): DQ {\n return super.globalEval(code, nonce ?? this.nonce);\n }\n}\n\nexport const ExtDQ = DQ;","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * todo replace singleton with module definition\n *\n */\n\nimport {Lang as LangBase, Config, Optional, DomQuery, DQ, Stream} from \"mona-dish\";\nimport {Messages} from \"../i18n/Messages\";\nimport {EMPTY_STR, TAG_FORM} from \"../core/Const\";\nimport {getEventTarget} from \"../xhrCore/RequestDataResolver\";\n\nexport module ExtLang {\n\n let installedLocale: Messages;\n let nameSpace = \"impl/util/Lang/\";\n\n export function getLanguage(): string {\n //TODO global config override\n\n let language: string = (<any>navigator).languages?.[0] ?? navigator?.language;\n language = language.split(\"-\")[0];\n return language;\n }\n\n //should be in lang, but for now here to avoid recursive imports, not sure if typescript still has a problem with those\n /**\n * helper function to savely resolve anything\n * this is not an elvis operator, it resolves\n * a value without exception in a tree and if\n * it is not resolvable then an optional of\n * a default value is restored or Optional.empty\n * if none is given\n *\n * usage\n * <code>\n * let var: Optional<string> = saveResolve(() => a.b.c.d.e, \"foobaz\")\n * </code>\n *\n * @param resolverProducer a lambda which can produce the value\n * @param defaultValue an optional default value if the producer failes to produce anything\n * @returns an Optional of the produced value\n */\n export function failSaveResolve<T>(resolverProducer: () => T, defaultValue: T = null): Optional<T> {\n return LangBase.saveResolve(resolverProducer, defaultValue);\n }\n\n /**\n * under some conditions it makes sense to swallow errors and return a default value in the error case\n * classical example the optional resolution of values in a chain (thankfully now covered by Typescript itself)\n * another example which we have in our system is that some operations fail only under test due to test framework\n * limitations while they cannot fail in the real world.\n *\n * @param resolverProducer a producer function which produces a value in the non error case\n * @param defaultValue the default value in case of a fail of the function\n */\n export function failSaveExecute<T>(resolverProducer: () => any, defaultValue: T = null): void {\n LangBase.saveResolve(resolverProducer, defaultValue);\n }\n\n /**\n * returns a given localized message upon a given key\n * basic java log like templating functionality is included\n *\n * @param {String} key the key for the message\n * @param {String} defaultMessage optional default message if none was found\n *\n * Additionally you can pass additional arguments, which are used\n * in the same way java log templates use the params\n *\n * @param templateParams the param list to be filled in\n */\n export function getMessage(key: string, defaultMessage?: string, ...templateParams: Array<string>): string {\n installedLocale = installedLocale ?? new Messages();\n\n let msg = installedLocale[key] ?? defaultMessage ?? key;\n\n Stream.of(...templateParams).each((param, cnt) => {\n msg = msg.replace(new RegExp([\"\\\\{\", cnt, \"\\\\}\"].join(EMPTY_STR), \"g\"), param);\n });\n\n return msg;\n }\n\n /**\n * transforms a key value pair into a string\n * @param key the key\n * @param val the value\n * @param delimiter the delimiter\n */\n export function keyValToStr(key: string, val: string, delimiter: string = \"\\n\") {\n return [key, val].join(delimiter);\n }\n\n /**\n * creates an exeption with additional internal parameters\n * for extra information\n *\n * @param error\n * @param {String} title the exception title\n * @param {String} name the exception name\n * @param {String} callerCls the caller class\n * @param {String} callFunc the caller function\n * @param {String} message the message for the exception\n */\n export function makeException(error: Error, title: string, name: string, callerCls: string, callFunc: string, message: string): Error {\n\n return new Error(message + (callerCls ?? nameSpace) + callFunc ?? (EMPTY_STR + (<any>arguments).caller.toString()));\n\n }\n\n /**\n * fetches a global config entry\n * @param {String} configName the name of the configuration entry\n * @param {Object} defaultValue\n *\n * @return either the config entry or if none is given the default value\n */\n export function getGlobalConfig(configName: string, defaultValue: any): any {\n /**\n * note we could use exists but this is an heavy operation, since the config name usually\n * given this function here is called very often\n * is a single entry without . in between we can do the lighter shortcut\n */\n return (<any>window)?.myfaces?.config?.[configName] ?? defaultValue;\n }\n\n /**\n * fetches the form in an fuzzy manner depending\n * on an element or event target.\n *\n * The idea is that according to the jsf spec\n * the enclosing form of the issuing element needs to be fetched.\n *\n * This is fine, but since then html5 came into the picture with the form attribute the element\n * can be anywhere referencing its parent form.\n *\n * Also theoretically you can have the case of an issuing element enclosing a set of forms\n * (not really often used, but theoretically it could be input button allows to embed html for instance)\n *\n * So the idea is not to limit the issuing form determination to the spec case\n * but also cover the theoretical and html5 corner case.\n *\n * @param elem\n * @param event\n */\n export function getForm(elem: Element, event ?: Event): DQ | never {\n\n let queryElem = new DQ(elem);\n let eventTarget = new DQ(getEventTarget(event));\n\n if (queryElem.isTag(TAG_FORM)) {\n return queryElem;\n }\n\n //html 5 for handling\n if (queryElem.attr(TAG_FORM).isPresent()) {\n let formId = queryElem.attr(TAG_FORM).value;\n let foundForm = DQ.byId(formId, true);\n if (foundForm.isPresent()) {\n return foundForm;\n }\n }\n\n let form = queryElem.parents(TAG_FORM)\n .orElseLazy(() => queryElem.byTagName(TAG_FORM, true))\n .orElseLazy(() => eventTarget.parents(TAG_FORM))\n .orElseLazy(() => eventTarget.byTagName(TAG_FORM))\n .first();\n\n assertFormExists(form);\n\n return form;\n }\n\n /**\n * gets the local or global options with local ones having higher priority\n * if no local or global one was found then the default value is given back\n *\n * @param {String} configName the name of the configuration entry\n * @param {String} localOptions the local options root for the configuration myfaces as default marker is added implicitely\n *\n * @param {Object} defaultValue\n *\n * @return either the config entry or if none is given the default value\n */\n export function getLocalOrGlobalConfig(localOptions: Config, configName: string, defaultValue: any): any {\n return localOptions.value?.myfaces?.config?.[configName] ??\n (<any>window)?.myfaces?.config?.[configName] ??\n defaultValue;\n }\n\n /**\n * assert that the form exists and throw an exception in the case it does not\n * (TODO move this into the assertions)\n *\n * @param form the form to check for\n */\n function assertFormExists(form: DomQuery): void | never {\n if (form.isAbsent()) {\n throw makeException(new Error(), null, null, \"Impl\", \"getForm\", getMessage(\"ERR_FORM\"));\n }\n }\n\n}","import {\n EMPTY_STR,\n ERROR_MESSAGE,\n ERROR_NAME,\n RESPONSE_TEXT,\n RESPONSE_XML,\n SOURCE,\n STATUS,\n UNKNOWN\n} from \"../core/Const\";\nimport {Config} from \"mona-dish\";\n\nimport {EventData} from \"./EventData\";\nimport {ExtLang} from \"../util/Lang\";\nimport getMessage = ExtLang.getMessage;\n\n\nexport enum ErrorType {\n SERVER_ERROR = \"serverError\",\n HTTP_ERROR = \"httpError\",\n CLIENT_ERROR = \"clientErrror\",\n TIMEOUT = \"timeout\"\n}\n\n/**\n * the spec has a problem of having the error\n * object somewhat underspecified, there is no clear\n * description of the required contents.\n * I want to streamline it with mojarra here\n * hence we are going to move\n * everything into the same attributes,\n * I will add deprecated myfaces backwards compatibility attributes as well\n */\nexport class ErrorData extends EventData {\n\n type: string = \"error\";\n source: string;\n errorName: string;\n errorMessage: string;\n\n responseText: string;\n responseXML: any;\n\n status: string;\n typeDetails: ErrorType;\n\n //TODO backwards compatible attributes\n serverErrorName: string;\n serverErrorMessage: string;\n message: string;\n\n constructor(source: string, errorName: string, errorMessage: string, responseText: string = null, responseXML: any = null, responseCode: string = \"200\", status: string = \"UNKNOWN\", type = ErrorType.CLIENT_ERROR) {\n super();\n this.source = source;\n this.type = \"error\";\n this.errorName = errorName;\n this.message = this.errorMessage = errorMessage;\n this.responseCode = responseCode;\n this.responseText = responseText;\n this.status = status;\n this.typeDetails = type;\n\n if (type == ErrorType.SERVER_ERROR) {\n this.serverErrorName = this.errorName;\n this.serverErrorMessage = this.errorMessage;\n }\n }\n\n static fromClient(e: Error): ErrorData {\n return new ErrorData(\"client\", e?.name ?? '', e?.message ?? '', e?.stack ?? '');\n }\n\n static fromHttpConnection(source: string, name: string, message: string, responseText, responseCode: number): ErrorData {\n return new ErrorData(source, name, message, responseText, responseCode, null, \"UNKNOWN\", ErrorType.HTTP_ERROR);\n }\n\n static fromGeneric(context: Config, errorCode: number, errorType: ErrorType = ErrorType.SERVER_ERROR): ErrorData {\n\n let getMsg = this.getMsg;\n\n let source = getMsg(context, SOURCE);\n let errorName = getMsg(context, ERROR_NAME);\n let errorMessage = getMsg(context, ERROR_MESSAGE);\n let status = getMsg(context, STATUS);\n let responseText = getMsg(context, RESPONSE_TEXT);\n let responseXML = getMsg(context, RESPONSE_XML);\n return new ErrorData(source, errorName, errorMessage, responseText, responseXML, errorCode + EMPTY_STR, status, errorType);\n }\n\n private static getMsg(context, param) {\n return getMessage(context.getIf(param).orElse(UNKNOWN).value);\n }\n\n static fromServerError(context: Config): ErrorData {\n return this.fromGeneric(context, -1);\n }\n\n}","import {Config, DQ} from \"mona-dish\";\nimport {BEGIN, CTX_PARAM_PASS_THR, EVENT, P_PARTIAL_SOURCE, SOURCE} from \"../core/Const\";\n\nexport class EventData {\n type: string;\n status: string;\n source: any;\n responseCode: string;\n responseText: string;\n responseXML: Document;\n\n static createFromRequest(request: XMLHttpRequest, context: Config, /*event name*/ name: string): EventData {\n\n let eventData = new EventData();\n\n eventData.type = EVENT;\n eventData.status = name;\n\n let sourceId: string = context.getIf(SOURCE)\n .orElse(context.getIf(P_PARTIAL_SOURCE).value)\n .orElse(context.getIf(CTX_PARAM_PASS_THR, P_PARTIAL_SOURCE).value).value;\n if (sourceId) {\n eventData.source = DQ.byId(sourceId, true).first().value.value;\n }\n\n if (name !== BEGIN) {\n eventData.responseCode = request?.status?.toString();\n eventData.responseText = request?.responseText;\n eventData.responseXML = request?.responseXML;\n }\n return eventData;\n }\n}\n","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, DomQuery, DQ} from \"mona-dish\";\nimport {\n CTX_PARAM_DELAY,\n CTX_PARAM_TIMEOUT,\n EMPTY_FUNC,\n EMPTY_STR,\n ENCODED_URL,\n MF_NONE,\n REQ_TYPE_GET,\n REQ_TYPE_POST\n} from \"../core/Const\";\nimport {XhrFormData} from \"./XhrFormData\";\nimport {ExtLang} from \"../util/Lang\";\nimport {ExtDomquery} from \"../util/ExtDomQuery\";\n\n/**\n * Resolver functions for various aspects of the request data\n *\n * stateless because it might be called from various\n * parts of the response classes\n */\n\n/**\n * resolves the event handlers lazly\n * so that if some decoration happens in between we can deal with it\n *\n * @param requestContext\n * @param responseContext\n * @param funcName\n */\nexport function resolveHandlerFunc(requestContext: Config, responseContext: Config, funcName: string) {\n return responseContext.getIf(funcName)\n .orElse(requestContext.getIf(funcName).value)\n .orElse(EMPTY_FUNC).value;\n}\n\nexport function resolveTargetUrl(srcFormElement: HTMLFormElement) {\n return (typeof srcFormElement.elements[ENCODED_URL] == 'undefined') ?\n srcFormElement.action :\n srcFormElement.elements[ENCODED_URL].value;\n}\n\nexport function resolveFinalUrl(sourceForm: DomQuery, formData: XhrFormData, ajaxType = REQ_TYPE_POST) {\n let targetUrl = resolveTargetUrl(<HTMLFormElement>sourceForm.getAsElem(0).value);\n\n return targetUrl + (ajaxType == REQ_TYPE_GET ? \"?\" + formData.toString() : EMPTY_STR);\n}\n\n/**\n * form resolution the same way our old implementation did\n * it is either the id or the parent form of the element or an embedded form\n * of the element\n *\n * @param requestCtx\n * @param elem\n * @param event\n */\nexport function resolveForm(requestCtx: Config, elem: DQ, event: Event): DQ {\n const configId = requestCtx.value?.myfaces?.form ?? MF_NONE; //requestCtx.getIf(MYFACES, \"form\").orElse(MF_NONE).value;\n return DQ\n .byId(configId, true)\n .orElseLazy(() => ExtLang.getForm(elem.getAsElem(0).value, event));\n}\n\nexport function resolveTimeout(options: Config): number {\n let getCfg = ExtLang.getLocalOrGlobalConfig;\n return options.getIf(CTX_PARAM_TIMEOUT).value ?? getCfg(options.value, CTX_PARAM_TIMEOUT, 0);\n}\n\n/**\n * resolve the delay from the options and/or the request context and or the configuration\n *\n * @param options ... the options object, in most cases it will host the delay value\n */\nexport function resolveDelay(options: Config): number {\n let getCfg = ExtLang.getLocalOrGlobalConfig;\n\n return options.getIf(CTX_PARAM_DELAY).value ?? getCfg(options.value, CTX_PARAM_DELAY, 0);\n}\n\n/**\n * resolves the window Id from various sources\n *\n * @param options\n */\nexport function resolveWindowId(options: Config) {\n return options?.value?.windowId ?? ExtDomquery.windowId;\n}\n\n/**\n * cross port from the dojo lib\n * browser save event resolution\n * @param evt the event object\n * (with a fallback for ie events if none is present)\n */\nexport function getEventTarget(evt: Event): Element {\n //ie6 and 7 fallback\n let finalEvent = evt;\n /**\n * evt source is defined in the jsf events\n * seems like some component authors use our code\n * so we add it here see also\n * https://issues.apache.org/jira/browse/MYFACES-2458\n * not entirely a bug but makes sense to add this\n * behavior. I dont use it that way but nevertheless it\n * does not break anything so why not\n * */\n let t = finalEvent?.srcElement ?? finalEvent?.target ?? (<any>finalEvent)?.source;\n while ((t) && (t.nodeType != 1)) {\n t = t.parentNode;\n }\n return t;\n}\n\n/**\n * resolves a bunch of default values\n * which can be further processed from the given\n * call parameters of jsf.ajax.request\n *\n * @param event\n * @param opts\n * @param el\n */\nexport function resolveDefaults(event: Event, opts: any = {}, el: Element | string = null) {\n //deep copy the options, so that further transformations to not backfire into the callers\n const resolvedEvent = event,\n options = new Config(opts).deepCopy,\n elem = DQ.byId(el || <Element>resolvedEvent.target, true),\n elementId = elem.id, requestCtx = new Config({}),\n internalCtx = new Config({}), windowId = resolveWindowId(options),\n isResetValues = true === options.value?.resetValues;\n\n return {resolvedEvent, options, elem, elementId, requestCtx, internalCtx, windowId, isResetValues};\n}","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, Optional, XMLQuery} from \"mona-dish\";\n\nimport {Assertions} from \"../util/Assertions\";\nimport {DQ} from \"mona-dish\";\nimport {\n CTX_PARAM_MF_INTERNAL,\n CTX_PARAM_SRC_CTL_ID,\n CTX_PARAM_SRC_FRM_ID,\n SEL_RESPONSE_XML,\n SOURCE,\n TAG_FORM,\n UPDATE_ELEMS,\n UPDATE_FORMS\n} from \"../core/Const\";\n\n/**\n * Resolver functions for various aspects of the response data\n *\n * stateless because it might be called from various\n * parts of the response classes\n */\n\n/**\n * fetches the response XML\n * as XML Query object\n *\n * @param request the request hosting the responseXML\n *\n * Throws an error in case of non existent or wrong xml data\n *\n */\nexport function resolveResponseXML(request: Config): XMLQuery {\n let ret = new XMLQuery(request.getIf(SEL_RESPONSE_XML).value);\n Assertions.assertValidXMLResponse(ret);\n\n return ret;\n}\n\n/**\n * Splits the incoming passthrough context apart\n * in an internal and an external nomalized context\n * the internal one is just for our internal processing\n *\n * @param context the root context as associative array\n */\nexport function resolveContexts(context: { [p: string]: any }): any {\n /**\n * we split the context apart into the external one and\n * some internal values\n */\n let externalContext = Config.fromNullable(context);\n let internalContext = externalContext.getIf(CTX_PARAM_MF_INTERNAL);\n if (!internalContext.isPresent()) {\n internalContext = Config.fromNullable({});\n }\n\n /**\n * prepare storage for some deferred operations\n */\n internalContext.assign(UPDATE_FORMS).value = [];\n internalContext.assign(UPDATE_ELEMS).value = [];\n return {externalContext, internalContext};\n}\n\n/**\n * fetches the source element out of our conexts\n *\n * @param context the external context which shpuld host the source id\n * @param internalContext internal passthrough fall back\n *\n */\nexport function resolveSourceElement(context: Config, internalContext: Config): DQ {\n let elemId = resolveSourceElementId(context, internalContext);\n return DQ.byId(elemId.value, true);\n}\n\n/**\n * fetches the source form if it still exists\n * also embedded forms and parent forms are taken into consideration\n * as fallbacks\n *\n * @param internalContext\n * @param elem\n */\nexport function resolveSourceForm(internalContext: Config, elem: DQ): DQ {\n let sourceFormId = internalContext.getIf(CTX_PARAM_SRC_FRM_ID);\n let sourceForm = new DQ(sourceFormId.isPresent() ? document.forms[sourceFormId.value] : null);\n\n sourceForm = sourceForm.orElse(elem.parents(TAG_FORM))\n .orElse(elem.querySelectorAll(TAG_FORM))\n .orElse(DQ.querySelectorAll(TAG_FORM));\n\n return sourceForm;\n}\n\nfunction resolveSourceElementId(context: Config, internalContext: Config): Optional<string> {\n //?internal context?? used to be external one\n return internalContext.getIf(CTX_PARAM_SRC_CTL_ID)\n .orElseLazy(() => context.getIf(SOURCE, \"id\").value);\n}\n\n","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, DQ, XMLQuery} from \"mona-dish\";\nimport {ResponseProcessor} from \"./ResponseProcessor\";\n\nimport {IResponseProcessor} from \"./IResponseProcessor\";\nimport {\n CMD_ATTRIBUTES,\n CMD_CHANGES,\n CMD_DELETE,\n CMD_ERROR,\n CMD_EVAL,\n CMD_EXTENSION,\n CMD_INSERT,\n CMD_REDIRECT,\n CMD_UPDATE,\n P_VIEWBODY,\n P_VIEWHEAD,\n P_VIEWROOT,\n PARTIAL_ID,\n RESP_PARTIAL,\n RESPONSE_XML,\n TAG_AFTER,\n TAG_BEFORE\n} from \"../core/Const\";\nimport {resolveContexts, resolveResponseXML} from \"./ResonseDataResolver\";\n\n\n\nexport module Response {\n\n\n /**\n * Standardized jsf.js response\n * this one is called straight from jsf.js.response\n *\n * The processing follows the spec by going for the responseXML\n * and processing its tags\n *\n * @param {XMLHttpRequest} request (xhrRequest) - xhr request object\n * @param ASSOC_ARR<any> context (Map) - AJAX context\n *\n */\n export function processResponse(request: XMLHttpRequest, context: Context) {\n\n let req = Config.fromNullable(request);\n let {externalContext, internalContext} = resolveContexts(context);\n let responseXML: XMLQuery = resolveResponseXML(req);\n let responseProcessor = new ResponseProcessor(req, externalContext, internalContext);\n\n internalContext.assign(RESPONSE_XML).value = responseXML;\n\n //we now process the partial tags, or in none given raise an error\n responseXML.querySelectorAll(RESP_PARTIAL)\n .each(item => processPartialTag(<XMLQuery>item, responseProcessor, internalContext));\n\n //we now process the viewstates, client windows and the evals deferred\n //the reason for this is that often it is better\n //to wait until the document has caught up before\n //doing any evals even on embedded scripts\n //usually this does not matter, the client window comes in almost last always anyway\n //we maybe drop this deferred assignment in the future, but myfaces did it until now\n responseProcessor.fixViewStates();\n responseProcessor.fixClientWindow();\n responseProcessor.globalEval();\n\n responseProcessor.done();\n }\n\n /**\n * highest node partial-response from there the main operations are triggered\n */\n function processPartialTag(node: XMLQuery, responseProcessor: IResponseProcessor, internalContext) {\n\n internalContext.assign(PARTIAL_ID).value = node.id;\n const SEL_SUB_TAGS = [CMD_ERROR, CMD_REDIRECT, CMD_CHANGES].join(\",\");\n\n //now we can process the main operations\n node.getIf(SEL_SUB_TAGS).each((node: XMLQuery) => {\n switch (node.tagName.value) {\n case CMD_ERROR:\n responseProcessor.error(node);\n break;\n case CMD_REDIRECT:\n responseProcessor.redirect(node);\n break;\n case CMD_CHANGES:\n processChangesTag(node, responseProcessor);\n break;\n }\n });\n\n }\n\n let processInsert = function (responseProcessor: IResponseProcessor, node: XMLQuery) {\n //path1 insert after as child tags\n if(node.querySelectorAll([TAG_BEFORE, TAG_AFTER].join(\",\")).length) {\n responseProcessor.insertWithSubtags(node);\n } else { //insert before after with id\n responseProcessor.insert(node);\n }\n\n };\n\n /**\n * next level changes tag\n *\n * @param node\n * @param responseProcessor\n */\n function processChangesTag(node: XMLQuery, responseProcessor: IResponseProcessor): boolean {\n const ALLOWED_TAGS = [CMD_UPDATE, CMD_EVAL, CMD_INSERT, CMD_DELETE, CMD_ATTRIBUTES, CMD_EXTENSION].join(\",\");\n node.getIf(ALLOWED_TAGS).each(\n (node: XMLQuery) => {\n switch (node.tagName.value) {\n case CMD_UPDATE:\n processUpdateTag(node, responseProcessor);\n break;\n\n case CMD_EVAL:\n responseProcessor.eval(node);\n break;\n\n case CMD_INSERT:\n processInsert(responseProcessor, node);\n break;\n\n case CMD_DELETE:\n responseProcessor.delete(node);\n break;\n\n case CMD_ATTRIBUTES:\n responseProcessor.attributes(node);\n break;\n\n case CMD_EXTENSION:\n break;\n }\n }\n );\n return true;\n }\n\n /**\n * checks and stores a state update for delayed processing\n *\n * @param responseProcessor the response processor to perform the store operation\n * @param node the xml node to check for the state\n *\n * @private\n */\n function storeState(responseProcessor: IResponseProcessor, node: XMLQuery) {\n return responseProcessor.processViewState(node) || responseProcessor.processClientWindow(node);\n }\n\n /**\n * branch tag update.. drill further down into the updates\n * special case viewstate in that case it is a leaf\n * and the viewstate must be processed\n *\n * @param node\n * @param responseProcessor\n */\n function processUpdateTag(node: XMLQuery, responseProcessor: IResponseProcessor) {\n //early state storing, if no state we perform a normal update cycle\n if (!storeState(responseProcessor, node)) {\n handleElementUpdate(node, responseProcessor);\n }\n }\n\n /**\n * element update\n *\n * @param node\n * @param responseProcessor\n */\n function handleElementUpdate(node: XMLQuery, responseProcessor: IResponseProcessor) {\n let cdataBlock = node.cDATAAsString;\n switch (node.id.value) {\n case P_VIEWROOT :\n responseProcessor.replaceViewRoot(DQ.fromMarkup(cdataBlock.substring(cdataBlock.indexOf(\"<html\"))));\n break;\n\n case P_VIEWHEAD:\n responseProcessor.replaceHead(DQ.fromMarkup(cdataBlock));\n break;\n\n case P_VIEWBODY:\n responseProcessor.replaceBody(DQ.fromMarkup(cdataBlock));\n break;\n\n default://htmlItem replacement\n responseProcessor.update(node, cdataBlock);\n break;\n\n }\n }\n}","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, DomQuery, DQ, Lang, Stream, XMLQuery} from \"mona-dish\";\nimport {Implementation} from \"../AjaxImpl\";\nimport {Assertions} from \"../util/Assertions\";\nimport {IResponseProcessor} from \"./IResponseProcessor\";\nimport {ErrorData} from \"./ErrorData\";\nimport {StateHolder} from \"../core/ImplTypes\";\nimport {EventData} from \"./EventData\";\n\nimport {\n APPLIED_CLIENT_WINDOW,\n APPLIED_VST,\n ATTR_ID,\n ATTR_NAME,\n ATTR_URL,\n ATTR_VALUE,\n EMPTY_FUNC,\n EMPTY_STR,\n ERROR_MESSAGE,\n ERROR_NAME,\n HTML_VIEWSTATE,\n ON_ERROR,\n ON_EVENT, P_CLIENT_WINDOW,\n P_PARTIAL_SOURCE,\n P_VIEWSTATE,\n RESPONSE_XML, SEL_CLIENT_WINDOW_ELEM,\n SEL_SCRIPTS_STYLES,\n SEL_VIEWSTATE_ELEM,\n SOURCE,\n SUCCESS,\n TAG_AFTER,\n TAG_ATTR,\n TAG_BEFORE,\n TAG_BODY,\n TAG_FORM,\n TAG_HEAD,\n UPDATE_ELEMS,\n UPDATE_FORMS\n} from \"../core/Const\";\nimport trim = Lang.trim;\n\n/**\n * Response processor\n *\n * Each XML tag is either a node or a leaf\n * or both\n *\n * the processor provides a set of operations\n * which are executed on a single leaf node per operation\n * and present the core functionality of our response\n *\n * Note the response processor is stateful hence we bundle it in a class\n * to reduce code we keep references tot contexts in place\n */\nexport class ResponseProcessor implements IResponseProcessor {\n\n constructor(private request: Config, private externalContext: Config, private internalContext: Config) {\n\n }\n\n replaceHead(shadowDocument: XMLQuery | DQ) {\n let shadowHead = shadowDocument.querySelectorAll(TAG_HEAD);\n if (!shadowHead.isPresent()) {\n return;\n }\n\n let oldHead = DQ.querySelectorAll(TAG_HEAD);\n\n //delete all to avoid script and style overlays\n oldHead.querySelectorAll(SEL_SCRIPTS_STYLES).delete();\n\n this.storeForEval(shadowHead);\n }\n\n /**\n * replaces the body in the expected manner\n * which means the entire body content is refreshed\n * however also the body attributes must be transferred\n * keeping event handlers etc... in place\n *\n * @param shadowDocument .. an incoming shadow document hosting the new nodes\n */\n replaceBody(shadowDocument: XMLQuery | DQ) {\n\n let shadowBody = shadowDocument.querySelectorAll(TAG_BODY);\n if (!shadowBody.isPresent()) {\n return;\n }\n\n let shadowInnerHTML: string = <string>shadowBody.html().value;\n\n let resultingBody = <DQ>DQ.querySelectorAll(TAG_BODY).html(shadowInnerHTML);\n let updateForms = resultingBody.querySelectorAll(TAG_FORM);\n\n resultingBody.copyAttrs(shadowBody);\n\n this.storeForPostProcessing(updateForms, resultingBody);\n }\n\n /**\n * Leaf Tag eval... process whatever is in the evals cdata block\n *\n * @param node the node to eval\n */\n eval(node: XMLQuery) {\n DQ.globalEval(node.cDATAAsString);\n }\n\n /**\n * processes an incoming error from the response\n * which is hosted under the &lt;error&gt; tag\n * @param node the node hosting the error in our response xml\n * @param node the node in the xml hosting the error message\n */\n error(node: XMLQuery) {\n /**\n * <error>\n * <error-name>String</error-name>\n * <error-message><![CDATA[message]]></error-message>\n * <error>\n */\n\n let mergedErrorData = new Config({});\n mergedErrorData.assign(SOURCE).value = this.externalContext.getIf(P_PARTIAL_SOURCE).get(0).value;\n mergedErrorData.assign(ERROR_NAME).value = node.querySelectorAll(ERROR_NAME).textContent(EMPTY_STR);\n mergedErrorData.assign(ERROR_MESSAGE).value = node.querySelectorAll(ERROR_MESSAGE).cDATAAsString;\n\n let hasResponseXML = this.internalContext.get(RESPONSE_XML).isPresent();\n\n //we now store the response xml also in the error data for further details\n mergedErrorData.assignIf(hasResponseXML, RESPONSE_XML).value = this.internalContext.getIf(RESPONSE_XML).value.get(0).value;\n\n // error post processing and enrichment (standard messages from keys)\n let errorData = ErrorData.fromServerError(mergedErrorData);\n\n // we now trigger an internally stored onError function which might be a attached to the context\n // either we haven an internal on error, or an on error has been bassed via params from the outside\n // in both cases they are attached to our contexts\n\n this.triggerOnError(errorData);\n Implementation.sendError(errorData);\n }\n\n private triggerOnError(errorData: ErrorData) {\n this.externalContext.getIf(ON_ERROR).orElse(this.internalContext.getIf(ON_ERROR).value).orElse(EMPTY_FUNC).value(errorData);\n }\n\n /**\n * process the redirect operation\n *\n * @param node\n */\n redirect(node: XMLQuery) {\n Assertions.assertUrlExists(node);\n\n let redirectUrl = trim(node.attr(ATTR_URL).value);\n if (redirectUrl != EMPTY_STR) {\n (<any>window).location.href = redirectUrl;\n }\n }\n\n /**\n * processes the update operation and updates the node with the cdata block\n * @param node the xml response node hosting the update info\n * @param cdataBlock the cdata block with the new html code\n */\n update(node: XMLQuery, cdataBlock: string) {\n let result = DQ.byId(node.id.value, true).outerHTML(cdataBlock, false, false);\n let sourceForm = result?.parents(TAG_FORM).orElse(result.byTagName(TAG_FORM, true));\n if (sourceForm) {\n this.storeForPostProcessing(sourceForm, result);\n }\n }\n\n delete(node: XMLQuery) {\n DQ.byId(node.id.value, true).delete();\n }\n\n /**\n * attributes leaf tag... process the attributes\n *\n * @param node\n */\n attributes(node: XMLQuery) {\n let elem = DQ.byId(node.id.value, true);\n\n node.byTagName(TAG_ATTR).each((item: XMLQuery) => {\n elem.attr(item.attr(ATTR_NAME).value).value = item.attr(ATTR_VALUE).value;\n });\n }\n\n /**\n * @param shadowDocument a shadow document which is needed for further processing\n */\n replaceViewRoot(shadowDocument: XMLQuery) {\n this.replaceHead(shadowDocument);\n this.replaceBody(shadowDocument);\n }\n\n /**\n * insert handling, either before or after\n *\n * @param node\n */\n insert(node: XMLQuery) {\n //let insertId = node.id; //not used atm\n\n let before = node.attr(TAG_BEFORE);\n let after = node.attr(TAG_AFTER);\n\n let insertNodes = DQ.fromMarkup(<any>node.cDATAAsString);\n\n if (before.isPresent()) {\n DQ.byId(before.value, true).insertBefore(insertNodes);\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n if (after.isPresent()) {\n let domQuery = DQ.byId(after.value, true);\n domQuery.insertAfter(insertNodes);\n\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n }\n\n /**\n * handler for the case &lt;insert <&lt; before id=\"...\n *\n * @param node the node hosting the insert data\n */\n insertWithSubtags(node: XMLQuery) {\n let before = node.querySelectorAll(TAG_BEFORE);\n let after = node.querySelectorAll(TAG_AFTER);\n\n before.each(item => {\n let insertId = item.attr(ATTR_ID);\n let insertNodes = DQ.fromMarkup(<any>item.cDATAAsString);\n if (insertId.isPresent()) {\n DQ.byId(insertId.value, true).insertBefore(insertNodes);\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n });\n\n after.each(item => {\n let insertId = item.attr(ATTR_ID);\n let insertNodes = DQ.fromMarkup(<any>item.cDATAAsString);\n if (insertId.isPresent()) {\n DQ.byId(insertId.value, true).insertAfter(insertNodes);\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n });\n }\n\n /**\n * process the viewState update, update the affected\n * forms with their respective new viewstate values\n *\n */\n processViewState(node: XMLQuery): boolean {\n if (ResponseProcessor.isViewStateNode(node)) {\n let state = node.cDATAAsString;\n this.internalContext.assign(APPLIED_VST, node.id.value).value = new StateHolder(node.id.value, state);\n return true;\n }\n return false;\n }\n\n processClientWindow(node: XMLQuery): boolean {\n if (ResponseProcessor.isClientWindowNode(node)) {\n let state = node.cDATAAsString;\n this.internalContext.assign(APPLIED_CLIENT_WINDOW, node.id.value).value = new StateHolder(node.id.value, state);\n return true;\n }\n }\n\n /**\n * generic global eval which runs the embedded css and scripts\n */\n globalEval() {\n let updateElems = new DQ(...this.internalContext.getIf(UPDATE_ELEMS).value);\n updateElems.runCss();\n updateElems.runScripts();\n }\n\n /**\n * post processing viewstate fixing\n */\n fixViewStates() {\n Stream.ofAssoc<StateHolder>(this.internalContext.getIf(APPLIED_VST).orElse({}).value)\n .each((item: Array<any>) => {\n let value: StateHolder = item[1];\n let nameSpace = DQ.byId(value.nameSpace, true).orElse(document.body);\n let affectedForms = nameSpace.byTagName(TAG_FORM);\n let affectedForms2 = nameSpace.filter(item => item.tagName.orElse(EMPTY_STR).value.toLowerCase() == TAG_FORM);\n\n this.appendViewStateToForms(new DomQuery(affectedForms, affectedForms2), value.value);\n });\n }\n\n fixClientWindow() {\n Stream.ofAssoc<StateHolder>(this.internalContext.getIf(APPLIED_CLIENT_WINDOW).orElse({}).value)\n .each((item: Array<any>) => {\n let value: StateHolder = item[1];\n let nameSpace = DQ.byId(value.nameSpace, true).orElse(document.body);\n let affectedForms = nameSpace.byTagName(TAG_FORM);\n let affectedForms2 = nameSpace.filter(item => item.tagName.orElse(EMPTY_STR).value.toLowerCase() == TAG_FORM);\n\n this.appendClientWindowToForms(new DomQuery(affectedForms, affectedForms2), value.value);\n });\n }\n\n /**\n * all processing done we can close the request and send the appropriate events\n */\n done() {\n let eventData = EventData.createFromRequest(this.request.value, this.externalContext, SUCCESS);\n\n //because some frameworks might decorate them over the context in the response\n let eventHandler = this.externalContext.getIf(ON_EVENT).orElse(this.internalContext.getIf(ON_EVENT).value).orElse(EMPTY_FUNC).value;\n Implementation.sendEvent(eventData, eventHandler);\n }\n\n /**\n * proper viewstate -> form assignment\n *\n * @param forms the forms to append the viewstate to\n * @param viewState the final viewstate\n */\n private appendViewStateToForms(forms: DQ, viewState: string) {\n this.assignState(forms, SEL_VIEWSTATE_ELEM, viewState);\n }\n\n\n /**\n * proper clientwindow -> form assignment\n *\n * @param forms the forms to append the viewstate to\n * @param clientWindow the final viewstate\n */\n private appendClientWindowToForms(forms: DQ, clientWindow: string) {\n this.assignState(forms, SEL_CLIENT_WINDOW_ELEM, clientWindow);\n }\n\n /**\n * generic append state which appends a certain state as hidden element to an existing set of forms\n *\n * @param forms the forms to append or change to\n * @param selector the selector for the state\n * @param state the state itself which needs to be assigned\n *\n * @private\n */\n private assignState(forms: DQ, selector: string, state: string) {\n forms.each((form: DQ) => {\n let stateHolders = form.querySelectorAll(selector)\n .orElseLazy(() => ResponseProcessor.newViewStateElement(form));\n\n stateHolders.attr(\"value\").value = state;\n });\n }\n\n /**\n * Helper to Create a new JSF ViewState Element\n *\n * @param parent, the parent node to attach the viewstate element to\n * (usually a form node)\n */\n private static newViewStateElement(parent: DQ): DQ {\n let newViewState = DQ.fromMarkup(HTML_VIEWSTATE);\n newViewState.appendTo(parent);\n return newViewState;\n }\n\n /**\n * Stores certain aspects of the dom for later post processing\n *\n * @param updateForms the update forms which should receive standardized internal jsf data\n * @param toBeEvaled the resulting elements which should be evaled\n */\n private storeForPostProcessing(updateForms: DQ, toBeEvaled: DQ) {\n this.storeForUpdate(updateForms);\n this.storeForEval(toBeEvaled);\n }\n\n /**\n * helper to store a given form for the update post processing (viewstate)\n *\n * @param updateForms the dom query object pointing to the forms which need to be updated\n */\n private storeForUpdate(updateForms: DQ) {\n this.internalContext.assign(UPDATE_FORMS).value.push(updateForms);\n }\n\n /**\n * same for eval (js and css)\n *\n * @param toBeEvaled\n */\n private storeForEval(toBeEvaled: DQ) {\n this.internalContext.assign(UPDATE_ELEMS).value.push(toBeEvaled);\n }\n\n /**\n * check whether a given XMLQuery node is an explicit viewstate node\n *\n * @param node the node to check\n * @returns true of it ii\n */\n private static isViewStateNode(node: XMLQuery): boolean {\n let separatorChar = (<any>window).jsf.separatorchar;\n return \"undefined\" != typeof node?.id?.value && (node?.id?.value == P_VIEWSTATE ||\n node?.id?.value?.indexOf([separatorChar, P_VIEWSTATE].join(EMPTY_STR)) != -1 ||\n node?.id?.value?.indexOf([P_VIEWSTATE, separatorChar].join(EMPTY_STR)) != -1);\n }\n\n /**\n * incoming client window node also needs special processing\n *\n * @param node the node to check\n * @returns true of it ii\n */\n private static isClientWindowNode(node: XMLQuery): boolean {\n let separatorChar = (<any>window).jsf.separatorchar;\n return \"undefined\" != typeof node?.id?.value && (node?.id?.value == P_CLIENT_WINDOW ||\n node?.id?.value?.indexOf([separatorChar, P_CLIENT_WINDOW].join(EMPTY_STR)) != -1 ||\n node?.id?.value?.indexOf([P_CLIENT_WINDOW, separatorChar].join(EMPTY_STR)) != -1);\n }\n\n}","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {ArrayCollector, Config, DomQuery, DomQueryCollector, Lang, LazyStream} from \"mona-dish\";\n\nimport {Stream, DQ} from \"mona-dish\";\nimport isString = Lang.isString;\nimport {EMPTY_STR, P_VIEWSTATE} from \"../core/Const\";\n\n\n/**\n * A unified form data class\n * which builds upon our configuration.\n *\n * We cannot use standard html5 forms everywhere\n * due to api constraints on the HTML Form object in IE11\n * and due to the url encoding constraint given by the jsf.js spec\n *\n * TODO not ideal. too many encoding calls\n * probably only one needed and one overlay!\n * the entire fileinput storing probably is redundant now\n * that domquery has been fixed\n */\nexport class XhrFormData extends Config {\n\n private fileInputs = {};\n\n /**\n * data collector from a given form\n *\n * @param dataSource either a form as DomQuery object or an encoded url string\n * @param partialIdsArray partial ids to collect, to reduce the data sent down\n */\n constructor(private dataSource: DQ | string, private partialIdsArray?: string[], private encode = true) {\n super({});\n //a call to getViewState before must pass the encoded line\n //a call from getViewState passes the form element as datasource\n //so we have two call points\n if (isString(dataSource)) {\n this.assignEncodedString(<string>this.dataSource);\n } else {\n this.handleFormSource();\n }\n }\n\n /**\n * generic application of ids\n * @param executes\n */\n applyFileInputs(...executes: Array<string>) {\n\n let fetchInput = (id: string): DQ => {\n if (id == \"@all\") {\n return DQ.querySelectorAllDeep(\"input[type='file']\");\n } else if (id == \"@form\") {\n return (<DQ>this.dataSource).querySelectorAllDeep(\"input[type='file']\");\n } else {\n let element = DQ.byId(id, true);\n return this.getFileInputs(element);\n }\n };\n\n let inputExists = (item: DQ) => {\n return !!item.length;\n };\n\n let applyInput = (item: DQ) => {\n this.fileInputs[this.resolveSubmitIdentifier(<HTMLInputElement>item.getAsElem(0).value)] = true;\n };\n\n LazyStream.of(...executes)\n .map(fetchInput)\n .filter(inputExists)\n .each(applyInput);\n }\n\n private getFileInputs(rootElment: DQ): DQ {\n\n let resolveFileInputs = item => {\n\n if (item.length == 1) {\n if ((<string>item.tagName.get(\"booga\").value).toLowerCase() == \"input\" &&\n (<string>item.attr(\"type\")?.value || '').toLowerCase() == \"file\") {\n return item;\n }\n\n return rootElment.querySelectorAllDeep(\"input[type='file']\");\n }\n return this.getFileInputs(item);\n };\n\n let itemExists = (item: DQ) => {\n return !!item?.length;\n }\n\n let ret = rootElment.lazyStream\n .map(resolveFileInputs)\n .filter(itemExists)\n .collect(new DomQueryCollector());\n\n return ret;\n }\n\n\n private handleFormSource() {\n //encode and append the issuing item if not a partial ids array of ids is passed\n /*\n * Spec. 13.3.1\n * Collect and encode input elements.\n * Additionally the hidden element javax.faces.ViewState\n * Enhancement partial page submit\n *\n */\n this.encodeSubmittableFields(this, <DQ>this.dataSource, this.partialIdsArray);\n\n if (this.getIf(P_VIEWSTATE).isPresent()) {\n return;\n }\n\n this.applyViewState(<DQ>this.dataSource);\n }\n\n /**\n * special case viewstate handling\n *\n * @param form the form holding the viewstate value\n */\n private applyViewState(form: DQ) {\n let viewState = form.byId(P_VIEWSTATE, true).inputValue;\n this.appendIf(viewState.isPresent(), P_VIEWSTATE).value = viewState.value;\n }\n\n /**\n * assignes a url encoded string to this xhrFormData object\n * as key value entry\n * @param encoded\n */\n assignEncodedString(encoded: string) {\n let keyValueEntries = decodeURIComponent(encoded).split(/&/gi);\n this.assignString(keyValueEntries);\n }\n\n assignString(keyValueEntries: string[]) {\n let toMerge = new Config({});\n\n Stream.of(...keyValueEntries)\n //split only the first =\n .map(line => line.split(/=(.*)/gi))\n //special case of having keys without values\n .map(keyVal => keyVal.length < 3 ? [keyVal?.[0] ?? [], keyVal?.[1] ?? []] : keyVal)\n .each(keyVal => {\n toMerge.append(keyVal[0]).value = keyVal?.splice(1)?.join(\"\") ?? \"\";\n });\n //merge with overwrite but no append! (aka no double entries are allowed)\n this.shallowMerge(toMerge);\n }\n\n// noinspection JSUnusedGlobalSymbols\n /**\n * @returns a Form data representation\n */\n toFormData(): FormData {\n let ret: any = new FormData();\n\n LazyStream.of(...Object.keys(this.value))\n .filter(key => !(key in this.fileInputs))\n .each(key => {\n Stream.of(...this.value[key]).each(item => ret.append(key, item));\n });\n Stream.of<string>(...Object.keys(this.fileInputs)).each((key: string) => {\n DQ.querySelectorAllDeep(`[name='${key}'], [id=\"${key}\"]`).eachElem((elem: HTMLInputElement) => {\n let identifier = this.resolveSubmitIdentifier(elem);\n if (!elem?.files?.length) {\n ret.append(identifier, elem.value);\n return;\n }\n\n ret.append(identifier, elem.files[0]);\n })\n });\n return ret;\n }\n\n resolveSubmitIdentifier(elem: HTMLInputElement) {\n let identifier = elem.name;\n identifier = ((elem?.name ?? \"\").replace(/s+/gi, \"\") == \"\") ? elem.id : identifier;\n return identifier;\n }\n\n /**\n * returns an encoded string representation of our xhr form data\n *\n * @param defaultStr optional default value if nothing is there to encode\n */\n toString(defaultStr = EMPTY_STR): string {\n if (this.isAbsent()) {\n return defaultStr;\n }\n let entries = LazyStream.of(...Object.keys(this.value))\n .filter(key => this.value.hasOwnProperty(key))\n .flatMap(key => Stream.of(...this.value[key]).map(val => [key, val]).collect(new ArrayCollector()))\n .map(keyVal => {\n return `${encodeURIComponent(keyVal[0])}=${encodeURIComponent(keyVal[1])}`;\n })\n .collect(new ArrayCollector());\n\n return entries.join(\"&\")\n }\n\n /**\n * determines fields to submit\n * @param {Object} targetBuf - the target form buffer receiving the data\n * @param {Node} parentItem - form element item is nested in\n * @param {Array} partialIds - ids fo PPS\n */\n private encodeSubmittableFields(targetBuf: Config,\n parentItem: DQ, partialIds ?: string[]) {\n let toEncode = null;\n if (this.partialIdsArray && this.partialIdsArray.length) {\n //in case of our myfaces reduced ppr we only\n //only submit the partials\n this._value = {};\n toEncode = new DQ(...this.partialIdsArray);\n\n } else {\n if (parentItem.isAbsent()) throw \"NO_PARITEM\";\n toEncode = parentItem;\n }\n\n //lets encode the form elements\n\n this.shallowMerge(toEncode.deepElements.encodeFormElement());\n }\n\n /**\n * checks if the given datasource is a multipart request source\n * multipart is only needed if one of the executes is a file input\n * since file inputs are stateless, they fall out of the viewstate\n * and need special handling\n */\n get isMultipartRequest(): boolean {\n return !!Object.keys(this.fileInputs).length;\n }\n\n}","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AsyncRunnable} from \"../util/AsyncRunnable\";\nimport {Config, DQ, Stream} from \"mona-dish\";\nimport {Implementation} from \"../AjaxImpl\";\n\nimport {XhrFormData} from \"./XhrFormData\";\nimport {ErrorData} from \"./ErrorData\";\nimport {EventData} from \"./EventData\";\nimport {ExtLang} from \"../util/Lang\";\nimport {\n BEGIN,\n COMPLETE,\n CONTENT_TYPE,\n CTX_PARAM_MF_INTERNAL,\n CTX_PARAM_PASS_THR,\n ERROR,\n HEAD_FACES_REQ,\n MALFORMEDXML,\n MULTIPART,\n NO_TIMEOUT,\n ON_ERROR,\n ON_EVENT, P_EXECUTE,\n REQ_ACCEPT,\n REQ_TYPE_GET,\n REQ_TYPE_POST,\n STATE_EVT_TIMEOUT,\n STD_ACCEPT,\n URL_ENCODED,\n VAL_AJAX\n} from \"../core/Const\";\nimport {resolveFinalUrl, resolveHandlerFunc} from \"./RequestDataResolver\";\nimport failSaveExecute = ExtLang.failSaveExecute;\n\n/**\n * JSFed XHR Request Wrapper\n * as Asyncrunnable for our Asynchronous queue\n *\n * The idea is that we basically just enqueue\n * a single ajax request into our queue\n * and let the queue do the processing.\n *\n */\n\ndeclare let jsf: any;\n\nexport class XhrRequest implements AsyncRunnable<XMLHttpRequest> {\n\n private responseContext: Config;\n\n private stopProgress = false;\n\n /**\n * helper support so that we do not have to drag in Promise shims\n */\n private catchFuncs: Array<Function> = [];\n private thenFunc: Array<Function> = [];\n\n /**\n * Reqired Parameters\n *\n * @param source the issuing element\n * @param sourceForm the form which is related to the issuing element\n * @param requestContext the request context with allö pass through values\n *\n * Optional Parameters\n *\n * @param partialIdsArray an optional restricting partial ids array for encoding\n * @param timeout optional xhr timeout\n * @param ajaxType optional request type, default \"POST\"\n * @param contentType optional content type, default \"application/x-www-form-urlencoded\"\n * @param xhrObject optional xhr object which must fullfill the XMLHTTPRequest api, default XMLHttpRequest\n */\n constructor(\n private source: DQ,\n private sourceForm: DQ,\n private requestContext: Config,\n private internalContext: Config,\n private partialIdsArray = [],\n private timeout = NO_TIMEOUT,\n private ajaxType = REQ_TYPE_POST,\n private contentType = URL_ENCODED,\n private xhrObject = new XMLHttpRequest()\n ) {\n /*\n * we omit promises here\n * some browsers do not support it and we do not need shim code\n */\n this.registerXhrCallbacks((data: any) => {\n this.resolve(data)\n }, (data: any) => {\n this.reject(data)\n });\n }\n\n start(): AsyncRunnable<XMLHttpRequest> {\n\n let ignoreErr = failSaveExecute;\n let xhrObject = this.xhrObject;\n\n let executesArr = () => {\n return this.requestContext.getIf(CTX_PARAM_PASS_THR, P_EXECUTE).get(\"none\").value.split(/\\s+/gi);\n };\n try {\n\n let formElement = this.sourceForm.getAsElem(0).value;\n let viewState = jsf.getViewState(formElement);\n //encoded we need to decode\n //We generated a base representation of the current form\n let formData: XhrFormData = new XhrFormData(this.sourceForm);\n //in case someone has overloaded the viewstate with addtional decorators we merge\n //that in, there is no way around it, the spec allows it and getViewState\n //must be called, so whatever getViewState delivers has higher priority then\n //whatever the formData object delivers\n formData.assignEncodedString(viewState);\n formData.applyFileInputs(...executesArr());\n\n this.contentType = formData.isMultipartRequest ? \"undefined\" : this.contentType;\n\n //next step the pass through parameters are merged in for post params\n let requestContext = this.requestContext;\n let passThroughParams = requestContext.getIf(CTX_PARAM_PASS_THR);\n formData.shallowMerge(passThroughParams, true, true);\n\n this.responseContext = passThroughParams.deepCopy;\n\n //we have to shift the internal passthroughs around to build up our response context\n let responseContext = this.responseContext;\n\n responseContext.assign(CTX_PARAM_MF_INTERNAL).value = this.internalContext.value;\n\n //per spec the onevent and onerrors must be passed through to the response\n responseContext.assign(ON_EVENT).value = requestContext.getIf(ON_EVENT).value;\n responseContext.assign(ON_ERROR).value = requestContext.getIf(ON_ERROR).value;\n\n xhrObject.open(this.ajaxType, resolveFinalUrl(this.sourceForm, formData, this.ajaxType), true);\n\n //adding timeout\n this.timeout ? xhrObject.timeout = this.timeout : null;\n\n //a bug in the xhr stub library prevents the setRequestHeader to be properly executed on fake xhr objects\n //normal browsers should resolve this\n //tests can quietly fail on this one\n if(this.contentType != \"undefined\") {\n ignoreErr(() => xhrObject.setRequestHeader(CONTENT_TYPE, `${this.contentType}; charset=utf-8`));\n }\n\n ignoreErr(() => xhrObject.setRequestHeader(HEAD_FACES_REQ, VAL_AJAX));\n\n //probably not needed anymore, will test this\n //some webkit based mobile browsers do not follow the w3c spec of\n // setting the accept headers automatically\n ignoreErr(() => xhrObject.setRequestHeader(REQ_ACCEPT, STD_ACCEPT));\n\n this.sendEvent(BEGIN);\n\n this.sendRequest(formData);\n\n } catch (e) {\n //_onError//_onError\n this.handleError(e);\n }\n return this;\n }\n\n cancel() {\n try {\n this.xhrObject.abort();\n } catch (e) {\n this.handleError(e);\n }\n }\n\n resolve(data: any) {\n Stream.of(...this.thenFunc).reduce((inputVal: any, thenFunc: any) => {\n return thenFunc(inputVal);\n }, data);\n }\n\n reject(data: any) {\n Stream.of(...this.catchFuncs).reduce((inputVal: any, catchFunc: any) => {\n return catchFunc(inputVal);\n }, data);\n }\n\n catch(func: (data: any) => any): AsyncRunnable<XMLHttpRequest> {\n //this.$promise.catch(func);\n this.catchFuncs.push(func);\n return this;\n }\n\n finally(func: () => void): AsyncRunnable<XMLHttpRequest> {\n //no ie11 support we probably are going to revert to shims for that one\n //(<any>this.$promise).then(func).catch(func);\n this.catchFuncs.push(func);\n this.thenFunc.push(func);\n return this;\n }\n\n then(func: (data: any) => any): AsyncRunnable<XMLHttpRequest> {\n //this.$promise.then(func);\n this.thenFunc.push(func);\n return this;\n }\n\n /**\n * attaches the internal event and processing\n * callback within the promise to our xhr object\n *\n * @param resolve\n * @param reject\n */\n protected registerXhrCallbacks(resolve: Consumer<any>, reject: Consumer<any>) {\n let xhrObject = this.xhrObject;\n\n xhrObject.onabort = () => {\n this.onAbort(resolve, reject);\n };\n xhrObject.ontimeout = () => {\n this.onTimeout(resolve, reject);\n };\n xhrObject.onload = () => {\n this.onSuccess(this.xhrObject, resolve, reject)\n };\n xhrObject.onloadend = () => {\n this.onDone(this.xhrObject, resolve, reject);\n };\n xhrObject.onerror = (errorData: any) => {\n this.onError(errorData, resolve, reject);\n };\n }\n\n /*\n * xhr processing callbacks\n *\n * Those methods are the callbacks called by\n * the xhr object depending on its own state\n */\n\n protected onAbort(resolve: Consumer<any>, reject: Consumer<any>) {\n reject();\n }\n\n protected onTimeout(resolve: Consumer<any>, reject: Consumer<any>) {\n this.sendEvent(STATE_EVT_TIMEOUT);\n reject();\n }\n\n protected onSuccess(data: any, resolve: Consumer<any>, reject: Consumer<any>) {\n\n this.sendEvent(COMPLETE);\n\n //malforms always result in empty response xml\n if (!this?.xhrObject?.responseXML) {\n this.handleMalFormedXML(resolve);\n return;\n }\n\n jsf.ajax.response(this.xhrObject, this.responseContext.value ?? {});\n }\n\n private handleMalFormedXML(resolve: Function) {\n this.stopProgress = true;\n let errorData = {\n type: ERROR,\n status: MALFORMEDXML,\n responseCode: 200,\n responseText: this.xhrObject?.responseText,\n source: {\n id: this.source.id.value\n }\n };\n try {\n this.handleError(errorData, true);\n } finally {\n resolve(errorData);\n }\n //non blocking non clearing\n }\n\n protected onDone(data: any, resolve: Consumer<any>, reject: Consumer<any>) {\n if (this.stopProgress) {\n return;\n }\n resolve(data);\n }\n\n protected onError(errorData: any, resolve: Consumer<any>, reject: Consumer<any>) {\n this.handleError(errorData);\n reject();\n }\n\n /*\n * other helpers\n */\n private sendEvent(evtType: string) {\n let eventData = EventData.createFromRequest(this.xhrObject, this.requestContext, evtType);\n try {\n //user code error, we might cover\n //this in onError but also we cannot swallow it\n //we need to resolve the local handlers lazyly,\n //because some frameworks might decorate them over the context in the response\n let eventHandler = resolveHandlerFunc(this.requestContext, this.responseContext, ON_EVENT);\n\n Implementation.sendEvent(eventData, eventHandler);\n } catch (e) {\n this.handleError(e);\n throw e;\n }\n }\n\n private handleError(exception, httpError: boolean = false) {\n let errorData = (httpError) ? ErrorData.fromServerError(exception) : ErrorData.fromClient(exception);\n\n let eventHandler = resolveHandlerFunc(this.requestContext, this.responseContext, ON_ERROR);\n Implementation.sendError(errorData, eventHandler);\n }\n\n protected sendRequest(formData: XhrFormData) {\n let isPost = this.ajaxType != REQ_TYPE_GET;\n if (formData.isMultipartRequest) {\n //in case of a multipart request we send in a formData object as body\n this.xhrObject.send((isPost) ? formData.toFormData() : null);\n } else {\n //in case of a normal request we send it normally\n this.xhrObject.send((isPost) ? formData.toString() : null);\n }\n }\n\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/main/typescript/api/Jsf.ts\");\n",""],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"jsf-development.js","mappings":";;;;;;;;;AAAA,YAAY,aAAa,OAAO,oBAAoB,+CAA+C,iCAAiC,aAAa,gCAAgC,cAAc,gBAAgB,sEAAsE,QAAQ,eAAe,wHAAwH,aAAa,mBAAmB,6EAA6E,oCAAoC,oCAAoC,iCAAiC,IAAI,uFAAuF,SAAS,yBAAyB,2CAA2C,0CAA0C,cAA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webpack://jsf.js_next_gen/./src/main/typescript/impl/AjaxImpl.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/PushImpl.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/core/Const.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/core/ImplTypes.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/i18n/Messages.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/Assertions.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/AsyncQueue.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/ExtDomQuery.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/Lang.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/ErrorData.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/EventData.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/RequestDataResolver.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/ResonseDataResolver.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/Response.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/ResponseProcessor.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/XhrFormData.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/XhrRequest.ts","webpack://jsf.js_next_gen/webpack/bootstrap","webpack://jsf.js_next_gen/webpack/before-startup","webpack://jsf.js_next_gen/webpack/startup","webpack://jsf.js_next_gen/webpack/after-startup"],"sourcesContent":["!function(){\"use strict\";var t={585:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function l(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,l)}u((n=n.apply(t,e||[])).next())}))},l=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},\"function\"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(r)throw new TypeError(\"Generator is already executing.\");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},u=this&&this.__read||function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},c=this&&this.__values||function(t){var e=\"function\"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")};Object.defineProperty(e,\"__esModule\",{value:!0}),e.DQ=e.DomQueryCollector=e.DomQuery=e.ElementAttribute=void 0;var f,p=r(152),h=r(551),y=r(255),v=r(805),d=v.Lang.trim,m=v.Lang.objToArray,b=v.Lang.isString,g=v.Lang.equalsIgnoreCase;function S(t,e,r){return void 0===r&&(r={attributes:!0,childList:!0,subtree:!0,timeout:500,interval:100}),new Promise((function(n,o){var a=new Error(\"Mutation observer timeout\");if(void 0!==window.MutationObserver){var l=setTimeout((function(){return o(a)}),r.timeout),u=new window.MutationObserver((function(t,r){var o=new x(t.map((function(t){return t.target}))).first(e);o.isPresent()&&(clearTimeout(l),n(o))})),s=i({},r);delete s.timeout,t.eachElem((function(t){u.observe(t,s)}))}else var c=setInterval((function(){var o=null;(o=r.childList?e(t)?t:t.childNodes.first(e):r.subtree?e(t)?t:t.querySelectorAll(\" * \").first(e):e(t)?t:x.absent).isPresent()&&f&&(clearTimeout(f),clearInterval(c),c=null,n(o))}),r.interval),f=setTimeout((function(){c&&(clearInterval(c),o(a))}),r.timeout)}))}!function(t){t.SELECT=\"select\",t.BUTTON=\"button\",t.SUBMIT=\"submit\",t.RESET=\"reset\",t.IMAGE=\"image\",t.RADIO=\"radio\",t.CHECKBOX=\"checkbox\"}(f||(f={}));var A=function(t){function e(e,r,n){void 0===n&&(n=null);var o=t.call(this,e,r)||this;return o.element=e,o.name=r,o.defaultVal=n,o}return o(e,t),Object.defineProperty(e.prototype,\"value\",{get:function(){var t,e=(t=this.element.get(0)).orElse.apply(t,[]).values;return e.length?e[0].getAttribute(this.name):this.defaultVal},set:function(t){for(var e,r=(e=this.element.get(0)).orElse.apply(e,[]).values,n=0;n<r.length;n++)r[n].setAttribute(this.name,t);r[0].setAttribute(this.name,t)},enumerable:!1,configurable:!0}),e.prototype.getClass=function(){return e},e.fromNullable=function(t,r){return void 0===r&&(r=\"value\"),new e(t,r)},e}(p.ValueEmbedder);e.ElementAttribute=A;var w=function(t){return!0},x=function(){function t(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];if(this.rootNode=[],this.pos=-1,this._limits=-1,!p.Optional.fromNullable(r).isAbsent()&&r.length)for(var o=0;o<r.length;o++)if(r[o])if(b(r[o])){var i=t.querySelectorAll(r[o]);i.isAbsent()||r.push.apply(r,s([],u(i.values),!1))}else r[o]instanceof t?(e=this.rootNode).push.apply(e,s([],u(r[o].values),!1)):this.rootNode.push(r[o])}return Object.defineProperty(t.prototype,\"value\",{get:function(){return this.getAsElem(0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"values\",{get:function(){return this.allElems()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"id\",{get:function(){return new A(this.get(0),\"id\")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"length\",{get:function(){return this.rootNode.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"tagName\",{get:function(){return this.getAsElem(0).getIf(\"tagName\")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"nodeName\",{get:function(){return this.getAsElem(0).getIf(\"nodeName\")},enumerable:!1,configurable:!0}),t.prototype.isTag=function(t){return!this.isAbsent()&&(this.nodeName.orElse(\"__none___\").value.toLowerCase()==t.toLowerCase()||this.tagName.orElse(\"__none___\").value.toLowerCase()==t.toLowerCase())},Object.defineProperty(t.prototype,\"type\",{get:function(){return this.getAsElem(0).getIf(\"type\")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"name\",{get:function(){return new p.ValueEmbedder(this.getAsElem(0).value,\"name\")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"inputValue\",{get:function(){return this.getAsElem(0).getIf(\"value\").isPresent()?new p.ValueEmbedder(this.getAsElem(0).value):p.ValueEmbedder.absent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"checked\",{get:function(){return h.Stream.of.apply(h.Stream,s([],u(this.values),!1)).allMatch((function(t){return!!t.checked}))},set:function(t){this.eachElem((function(e){return e.checked=t}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"elements\",{get:function(){return this.querySelectorAll(\"input, checkbox, select, textarea, fieldset\")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"deepElements\",{get:function(){return this.querySelectorAllDeep(\"input, select, textarea, checkbox, fieldset\")},enumerable:!1,configurable:!0}),t.prototype.querySelectorAllDeep=function(e){var r=[],n=this.querySelectorAll(e);n.length&&r.push(n);var o=this.querySelectorAll(\"*\").shadowRoot;if(o.length){var i=o.querySelectorAllDeep(e);i.length&&r.push(i)}return new(t.bind.apply(t,s([void 0],u(r),!1)))},Object.defineProperty(t.prototype,\"disabled\",{get:function(){return this.attr(\"disabled\").isPresent()},set:function(t){t?this.attr(\"disabled\").value=\"disabled\":this.removeAttribute(\"disabled\")},enumerable:!1,configurable:!0}),t.prototype.removeAttribute=function(t){this.eachElem((function(e){return e.removeAttribute(t)}))},Object.defineProperty(t.prototype,\"childNodes\",{get:function(){var e=[];return this.eachElem((function(t){e=e.concat(m(t.childNodes))})),new(t.bind.apply(t,s([void 0],u(e),!1)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"stream\",{get:function(){return new(h.Stream.bind.apply(h.Stream,s([void 0],u(this.asArray),!1)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"lazyStream\",{get:function(){return h.LazyStream.of.apply(h.LazyStream,s([],u(this.asArray),!1))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"asArray\",{get:function(){return[].concat(h.LazyStream.of.apply(h.LazyStream,s([],u(this.rootNode),!1)).filter((function(t){return null!=t})).map((function(e){return t.byId(e)})).collect(new y.ArrayCollector))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"asNodeArray\",{get:function(){return[].concat(h.Stream.of(this.rootNode).filter((function(t){return null!=t})).collect(new y.ArrayCollector))},enumerable:!1,configurable:!0}),t.querySelectorAllDeep=function(e){return new t(document).querySelectorAllDeep(e)},t.querySelectorAll=function(e){return-1!=e.indexOf(\"/shadow/\")?new t(document)._querySelectorAllDeep(e):new t(document)._querySelectorAll(e)},t.byId=function(e,r){return void 0===r&&(r=!1),b(e)?r?new t(document).byIdDeep(e):new t(document).byId(e):new t(e)},t.byTagName=function(e){return b(e)?new t(document).byTagName(e):new t(e)},t.globalEval=function(e,r){return new t(document).globalEval(e,r)},t.fromMarkup=function(e){var r=document.implementation.createHTMLDocument(\"\"),n=(e=d(e)).toLowerCase();if(-1!=n.indexOf(\"<!doctype\")||-1!=n.indexOf(\"<html\")||-1!=n.indexOf(\"<head\")||-1!=n.indexOf(\"<body\"))return r.documentElement.innerHTML=e,new t(r.documentElement);var o=function(t,e){var r=[\"<\",e,\">\"].join(\"\"),n=[\"<\",e,\" \"].join(\"\");return 0==t.indexOf(r)||0==t.indexOf(n)},i=new t(document.createElement(\"div\"));return o(n,\"thead\")||o(n,\"tbody\")?(i.html(\"<table>\".concat(e,\"</table>\")),i.querySelectorAll(\"table\").get(0).childNodes.detach()):o(n,\"tfoot\")?(i.html(\"<table><thead></thead><tbody><tbody\".concat(e,\"</table>\")),i.querySelectorAll(\"table\").get(2).childNodes.detach()):o(n,\"tr\")?(i.html(\"<table><tbody>\".concat(e,\"</tbody></table>\")),i.querySelectorAll(\"tbody\").get(0).childNodes.detach()):o(n,\"td\")?(i.html(\"<table><tbody><tr>\".concat(e,\"</tr></tbody></table>\")),i.querySelectorAll(\"tr\").get(0).childNodes.detach()):(i.html(e),i.childNodes.detach())},t.prototype.get=function(e){return e<this.rootNode.length?new t(this.rootNode[e]):t.absent},t.prototype.getAsElem=function(t,e){return void 0===e&&(e=p.Optional.absent),t<this.rootNode.length?p.Optional.fromNullable(this.rootNode[t]):e},t.prototype.filesFromElem=function(t){var e;return t<this.rootNode.length&&(null===(e=this.rootNode[t])||void 0===e?void 0:e.files)?this.rootNode[t].files:[]},t.prototype.allElems=function(){return this.rootNode},t.prototype.isAbsent=function(){return 0==this.length},t.prototype.isPresent=function(t){var e=this.isAbsent();return!e&&t&&t.call(this,this),!e},t.prototype.ifPresentLazy=function(t){return void 0===t&&(t=function(){}),this.isPresent.call(this,t),this},t.prototype.delete=function(){this.eachElem((function(t){t.parentNode&&t.parentNode.removeChild(t)}))},t.prototype.querySelectorAll=function(t){return-1!=t.indexOf(\"/shadow/\")?this._querySelectorAllDeep(t):this._querySelectorAll(t)},t.prototype._querySelectorAll=function(e){var r,n;if(!(null===(r=null==this?void 0:this.rootNode)||void 0===r?void 0:r.length))return this;for(var o=[],i=0;i<this.rootNode.length;i++)if(null===(n=this.rootNode[i])||void 0===n?void 0:n.querySelectorAll){var a=this.rootNode[i].querySelectorAll(e);o=o.concat(m(a))}return new(t.bind.apply(t,s([void 0],u(o),!1)))},t.prototype._querySelectorAllDeep=function(e){var r;if(!(null===(r=null==this?void 0:this.rootNode)||void 0===r?void 0:r.length))return this;for(var n=new(t.bind.apply(t,s([void 0],u(this.rootNode),!1))),o=e.split(/\\/shadow\\//),i=0;i<o.length;i++)if(\"\"!=o[i]){var a=o[i];n=n.querySelectorAll(a),i<o.length-1&&(n=n.shadowRoot)}return n},t.prototype.byId=function(e,r){var n=[];return r&&(n=n.concat(h.LazyStream.of.apply(h.LazyStream,s([],u((null==this?void 0:this.rootNode)||[]),!1)).filter((function(t){return e==t.id})).map((function(e){return new t(e)})).collect(new y.ArrayCollector))),n=n.concat(this.querySelectorAll('[id=\"'.concat(e,'\"]'))),new(t.bind.apply(t,s([void 0],u(n),!1)))},t.prototype.byIdDeep=function(e,r){var n=[];r&&(n=n.concat(h.LazyStream.of.apply(h.LazyStream,s([],u((null==this?void 0:this.rootNode)||[]),!1)).filter((function(t){return e==t.id})).map((function(e){return new t(e)})).collect(new y.ArrayCollector)));var o=this.querySelectorAllDeep('[id=\"'.concat(e,'\"]'));return o.length&&n.push(o),new(t.bind.apply(t,s([void 0],u(n),!1)))},t.prototype.byTagName=function(e,r,n){var o,i=[];return r&&(i=h.LazyStream.of.apply(h.LazyStream,s([],u(null!==(o=null==this?void 0:this.rootNode)&&void 0!==o?o:[]),!1)).filter((function(t){return(null==t?void 0:t.tagName)==e})).reduce((function(t,e){return t.concat([e])}),i).orElse(i).value),n?i.push(this.querySelectorAllDeep(e)):i.push(this.querySelectorAll(e)),new(t.bind.apply(t,s([void 0],u(i),!1)))},t.prototype.attr=function(t,e){return void 0===e&&(e=null),new A(this,t,e)},t.prototype.hasClass=function(t){var e=!1;return this.eachElem((function(r){if(e=r.classList.contains(t))return!1})),e},t.prototype.addClass=function(t){return this.eachElem((function(e){return e.classList.add(t)})),this},t.prototype.removeClass=function(t){return this.eachElem((function(e){return e.classList.remove(t)})),this},t.prototype.isMultipartCandidate=function(t){var e=this;void 0===t&&(t=!1);return this.stream.filter((function(r){return function(r){var n;return 0!=r.length&&(1==r.length?\"input\"==r.tagName.get(\"booga\").value.toLowerCase()&&\"file\"==((null===(n=r.attr(\"type\"))||void 0===n?void 0:n.value)||\"\").toLowerCase()||(t?e.querySelectorAllDeep(\"input[type='file']\").firstElem().isPresent():e.querySelectorAll(\"input[type='file']\").firstElem().isPresent()):r.isMultipartCandidate(t))}(r)})).first().isPresent()},t.prototype.html=function(t){return p.Optional.fromNullable(t).isAbsent()?this.isPresent()?p.Optional.fromNullable(this.innerHtml):p.Optional.absent:(this.innerHtml=t,this)},t.prototype.dispatchEvent=function(t){return this.eachElem((function(e){return e.dispatchEvent(t)})),this},Object.defineProperty(t.prototype,\"innerHtml\",{get:function(){var t=[];return this.eachElem((function(e){return t.push(e.innerHTML)})),t.join(\"\")},set:function(t){this.eachElem((function(e){return e.innerHTML=t}))},enumerable:!1,configurable:!0}),t.prototype._mozMatchesSelector=function(t,e){var r=t,n=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector||function(e){for(var r=(document||window.ownerDocument).querySelectorAll(e),n=r.length;--n>=0&&r.item(n)!==t;);return n>-1};return n.call(t,e)},t.prototype.filterSelector=function(e){var r=this,n=[];return this.eachElem((function(t){r._mozMatchesSelector(t,e)&&n.push(t)})),new(t.bind.apply(t,s([void 0],u(n),!1)))},t.prototype.matchesSelector=function(t){var e=this;return this.eachElem((function(r){if(!e._mozMatchesSelector(r,t))return!1})),!0},t.prototype.getIf=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=this.childNodes,n=0;n<t.length;n++)if((r=r.filterSelector(t[n])).isAbsent())return r;return r},t.prototype.eachElem=function(t){for(var e=0,r=this.rootNode.length;e<r&&!1!==t(this.rootNode[e],e);e++);return this},t.prototype.firstElem=function(t){return void 0===t&&(t=function(t){return t}),this.rootNode.length>1&&t(this.rootNode[0],0),this},t.prototype.each=function(e){return h.Stream.of.apply(h.Stream,s([],u(this.rootNode),!1)).each((function(r,n){if(null!=r)return e(t.byId(r),n)})),this},t.prototype.first=function(t){return void 0===t&&(t=function(t){return t}),this.rootNode.length>=1?(t(this.get(0),0),this.get(0)):this},t.prototype.filter=function(e){var r=[];return this.each((function(t){e(t)&&r.push(t)})),new(t.bind.apply(t,s([void 0],u(r),!1)))},t.prototype.globalEval=function(t,e){var r=document.getElementsByTagName(\"head\")[0]||document.documentElement,n=document.createElement(\"script\");e&&n.setAttribute(\"nonce\",e),n.type=\"text/javascript\",n.innerHTML=t;var o=r.appendChild(n);return r.removeChild(o),this},t.prototype.detach=function(){return this.eachElem((function(t){t.parentNode.removeChild(t)})),this},t.prototype.appendTo=function(t){this.eachElem((function(e){t.getAsElem(0).orElseLazy((function(){return{appendChild:function(t){}}})).value.appendChild(e)}))},t.prototype.loadScriptEval=function(t,e,r){var n=this;void 0===e&&(e=0),void 0===r&&(r=\"utf-8\");var o=new XMLHttpRequest;return o.open(\"GET\",t,!1),r&&o.setRequestHeader(\"Content-Type\",\"application/x-javascript; charset:\"+r),o.send(null),o.onload=function(r){e?setTimeout((function(){n.globalEval(o.responseText+\"\\r\\n//@ sourceURL=\"+t)}),e):n.globalEval(o.responseText.replace(/\\n/g,\"\\r\\n\")+\"\\r\\n//@ sourceURL=\"+t)},o.onerror=function(t){throw Error(t)},this},t.prototype.insertAfter=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.each((function(t){for(var r=t.getAsElem(0).value,n=r.parentNode,o=function(t){var o=r.nextSibling;e[t].eachElem((function(t){o?(n.insertBefore(t,o),r=o):n.appendChild(t)}))},i=0;i<e.length;i++)o(i)}));var n=[];return n.push(this),n=n.concat(e),new(t.bind.apply(t,s([void 0],u(n),!1)))},t.prototype.insertBefore=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.each((function(t){for(var r=t.getAsElem(0).value,n=r.parentNode,o=0;o<e.length;o++)e[o].eachElem((function(t){n.insertBefore(t,r)}))}));var n=[];return n.push(this),n=n.concat(e),new(t.bind.apply(t,s([void 0],u(n),!1)))},t.prototype.orElse=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this.isPresent()?this:new(t.bind.apply(t,s([void 0],u(e),!1)))},t.prototype.orElseLazy=function(e){return this.isPresent()?this:new t(e())},t.prototype.parents=function(e){var r=new Set,n=[],o=e.toLowerCase(),i=function(t){(t.tagName||\"\").toLowerCase()!=o||r.has(t)||(r.add(t),n.push(t))};return this.eachElem((function(t){for(var r;t.parentNode||t.host;)if(t=null!==(r=null==t?void 0:t.parentNode)&&void 0!==r?r:null==t?void 0:t.host,i(t),\"form\"==e&&n.length)return!1})),new(t.bind.apply(t,s([void 0],u(n),!1)))},t.prototype.copyAttrs=function(t){var e=this;return t.eachElem((function(t){var r,n,o=m(t.attributes);try{for(var i=c(o),a=i.next();!a.done;a=i.next()){var l=a.value,u=l.value,s=l.name;switch(s){case\"id\":e.id.value=u;break;case\"disabled\":e.resolveAttributeHolder(\"disabled\").disabled=u;break;case\"checked\":e.resolveAttributeHolder(\"checked\").checked=u;break;default:e.attr(s).value=u}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}})),this},t.prototype.resolveAttributeHolder=function(t){void 0===t&&(t=\"value\");var e=[];return e[t]=null,t in this.getAsElem(0).value?this.getAsElem(0).value:e},t.prototype.outerHTML=function(e,r,n,o){var i;if(void 0===o&&(o=!1),!this.isAbsent()){var a=null===(i=null===document||void 0===document?void 0:document.activeElement)||void 0===i?void 0:i.id,l=a?t.getCaretPosition(document.activeElement):null,c=t.fromMarkup(e),f=[],p=this.getAsElem(0).value,h=c.get(0),y=p.parentNode,v=h.getAsElem(0).value;if(y.replaceChild(v,p),f.push(new t(v)),this.isAbsent())return this;var d=[];c.length>1&&(d=d.concat.apply(d,s([],u(c.values.slice(1)),!1)),f.push(t.byId(v).insertAfter(new(t.bind.apply(t,s([void 0],u(d),!1)))))),r&&this.runScripts(),n&&this.runCss();var m=t.byId(a);return a&&m.isPresent()&&null!=l&&void 0!==l&&m.eachElem((function(e){return t.setCaretPosition(e,l)})),c}},t.prototype.runScripts=function(e){var r=this;void 0===e&&(e=w);var n=[],o=g,i=function(t){var i=t.tagName,a=t.type||\"\";if(i&&o(i,\"script\")&&(\"\"===a||o(a,\"text/javascript\")||o(a,\"javascript\")||o(a,\"text/ecmascript\")||o(a,\"ecmascript\"))){var l=t.getAttribute(\"src\");if(void 0!==l&&null!=l&&l.length>0)e(l)&&(n.length&&(r.globalEval(n.join(\"\\n\")),n=[]),r.loadScriptEval(l,0,\"UTF-8\"));else{for(var u=d(t.text||t.innerText||t.innerHTML),s=!0;s;)s=!1,\"\\x3c!--\"==u.substring(0,4)&&(u=u.substring(4),s=!0),\"//\\x3c!--\"==u.substring(0,4)&&(u=u.substring(6),s=!0),\"//<![CDATA[\"==u.substring(0,11)&&(u=u.substring(11),s=!0);n.push(u)}}};try{new t(this.filterSelector(\"script\"),this.querySelectorAll(\"script\")).stream.flatMap((function(t){return h.Stream.of(t.values)})).sort((function(t,e){return t.compareDocumentPosition(e)-3})).each((function(t){return i(t)})),n.length&&this.globalEval(n.join(\"\\n\"))}catch(t){window.console&&window.console.error&&console.error(t.message||t.description)}finally{i=null}return this},t.prototype.runCss=function(){var e=function(t,e){var r,n,o,i,a=document.createElement(\"style\");document.getElementsByTagName(\"head\")[0].appendChild(a);var l=null!==(r=a.sheet)&&void 0!==r?r:a.styleSheet;a.setAttribute(\"rel\",null!==(n=t.getAttribute(\"rel\"))&&void 0!==n?n:\"stylesheet\"),a.setAttribute(\"type\",null!==(o=t.getAttribute(\"type\"))&&void 0!==o?o:\"text/css\"),null!==(i=null==l?void 0:l.cssText)&&void 0!==i&&i?l.cssText=e:a.appendChild(document.createTextNode(e))};return new t(this.filterSelector(\"link, style\"),this.querySelectorAll(\"link, style\")).stream.flatMap((function(t){return h.Stream.of(t.values)})).sort((function(t,e){return t.compareDocumentPosition(e)-3})).each((function(t){return function(t){var r=t.tagName;if(r&&g(r,\"link\")&&g(t.getAttribute(\"type\"),\"text/css\"))e(t,\"@import url('\"+t.getAttribute(\"href\")+\"');\");else if(r&&g(r,\"style\")&&g(t.getAttribute(\"type\"),\"text/css\")){var n=[],o=Array.prototype.slice.call(t.childNodes);o?o.forEach((function(t){return n.push(t.innerHTML||t.data)})):t.innerHTML&&n.push(t.innerHTML),e(t,n.join(\"\"))}}(t)})),this},t.prototype.click=function(){return this.fireEvent(\"click\"),this},t.prototype.addEventListener=function(t,e,r){return this.eachElem((function(n){return n.addEventListener(t,e,r)})),this},t.prototype.removeEventListener=function(t,e,r){return this.eachElem((function(n){return n.removeEventListener(t,e,r)})),this},t.prototype.fireEvent=function(t){this.eachElem((function(e){var r;if(e.ownerDocument)r=e.ownerDocument;else{if(9!=e.nodeType)throw new Error(\"Invalid node passed to fireEvent: \"+e.id);r=e}if(e.dispatchEvent){var n=\"\";switch(t){case\"click\":case\"mousedown\":case\"mouseup\":n=\"MouseEvents\";break;case\"focus\":case\"change\":case\"blur\":case\"select\":n=\"HTMLEvents\";break;default:throw\"fireEvent: Couldn't find an event class for event '\"+t+\"'.\"}var o=r.createEvent(n);o.initEvent(t,!0,!0),o.synthetic=!0,e.dispatchEvent(o)}else if(e.fireEvent){var i=r.createEventObject();i.synthetic=!0,e.fireEvent(\"on\"+t,i)}}))},t.prototype.textContent=function(t){return void 0===t&&(t=\"\"),this.stream.map((function(t){return t.getAsElem(0).orElseLazy((function(){return{textContent:\"\"}})).value.textContent||\"\"})).reduce((function(e,r){return e+t+r}),\"\").value},t.prototype.innerText=function(t){return void 0===t&&(t=\"\"),this.stream.map((function(t){return t.getAsElem(0).orElseLazy((function(){return{innerText:\"\"}})).value.innerText||\"\"})).reduce((function(e,r){return[e,r].join(t)}),\"\").value},t.prototype.encodeFormElement=function(t){if(void 0===t&&(t=new p.Config({})),!this.name.isAbsent()){var e=t.shallowCopy;return this.each((function(t){var r,n;if(!t.name.isAbsent()){var o=t.name.value,i=t.tagName.orElse(\"__none__\").value.toLowerCase(),a=t.type.orElse(\"__none__\").value.toLowerCase();if(a=a.toLowerCase(),(\"input\"==i||\"textarea\"==i||\"select\"==i)&&null!=o&&\"\"!=o&&!t.disabled){if(\"select\"==i){var l=t.getAsElem(0).value;if(l.selectedIndex>=0)for(var u=l.options.length,s=0;s<u;s++)if(l.options[s].selected){var c=l.options[s];e.append(o).value=null!=c.getAttribute(\"value\")?c.value:c.text}}if(i!=f.SELECT&&a!=f.BUTTON&&a!=f.RESET&&a!=f.SUBMIT&&a!=f.IMAGE&&(a!=f.CHECKBOX&&a!=f.RADIO||t.checked)){var p=null!==(n=null===(r=t.value.value)||void 0===r?void 0:r.files)&&void 0!==n?n:[];(null==p?void 0:p.length)?e.append(o).value=p[0]:e.append(o).value=t.inputValue.value}}}})),e}},Object.defineProperty(t.prototype,\"cDATAAsString\",{get:function(){return this.lazyStream.flatMap((function(t){return t.childNodes.stream})).filter((function(t){var e,r;return 4==(null===(r=null===(e=null==t?void 0:t.value)||void 0===e?void 0:e.value)||void 0===r?void 0:r.nodeType)})).reduce((function(t,e){var r,n,o;return t.push(null!==(o=null===(n=null===(r=null==e?void 0:e.value)||void 0===r?void 0:r.value)||void 0===n?void 0:n.data)&&void 0!==o?o:\"\"),t}),[]).value.join(\"\")},enumerable:!1,configurable:!0}),t.prototype.subNodes=function(e,r){return p.Optional.fromNullable(r).isAbsent()&&(r=this.length),new(t.bind.apply(t,s([void 0],u(this.rootNode.slice(e,Math.min(r,this.length))),!1)))},t.prototype.limits=function(t){return this._limits=t,this},t.prototype.hasNext=function(){var t=-1!=this._limits&&this.pos>=this._limits-1,e=this.pos>=this.values.length-1;return!(t||e)},t.prototype.next=function(){return this.hasNext()?(this.pos++,new t(this.values[this.pos])):null},t.prototype.reset=function(){this.pos=-1},t.prototype.attachShadow=function(e){void 0===e&&(e={mode:\"open\"});var r=[];return this.eachElem((function(n){var o;if(!(null==n?void 0:n.attachShadow))throw new Error(\"Shadow dom creation not supported by the browser, please use a shim, to gain this functionality\");o=t.byId(n.attachShadow(e)),r.push(o)})),new(t.bind.apply(t,s([void 0],u(r),!1)))},t.prototype.waitUntilDom=function(t,e){return void 0===e&&(e={attributes:!0,childList:!0,subtree:!0,timeout:500,interval:100}),a(this,void 0,void 0,(function(){return l(this,(function(r){return[2,S(this,t,e)]}))}))},Object.defineProperty(t.prototype,\"shadowElements\",{get:function(){var e=(this.querySelectorAll(\"*\").filter((function(t){return t.hasShadow})).allElems()||[]).map((function(t){return t.shadowRoot}));return new(t.bind.apply(t,s([void 0],u(e),!1)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"shadowRoot\",{get:function(){for(var e=[],r=0;r<this.rootNode.length;r++)this.rootNode[r].shadowRoot&&e.push(this.rootNode[r].shadowRoot);return new(t.bind.apply(t,s([void 0],u(e),!1)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"hasShadow\",{get:function(){for(var t=0;t<this.rootNode.length;t++)if(this.rootNode[t].shadowRoot)return!0;return!1},enumerable:!1,configurable:!0}),t.getCaretPosition=function(t){var e=0;try{if(null===document||void 0===document?void 0:document.selection){t.focus();var r=document.selection.createRange();r.moveStart(\"character\",-t.value.length),e=r.text.length}}catch(t){}return e},t.setCaretPosition=function(t,e){(null==t?void 0:t.focus)&&(null==t||t.focus()),(null==t?void 0:t.setSelectiongRange)&&(null==t||t.setSelectiongRange(e,e))},t.prototype[Symbol.iterator]=function(){var t=this;return{next:function(){return{done:!t.hasNext(),value:t.next()}}}},t.absent=new t,t}();e.DomQuery=x;var E=function(){function t(){this.data=[]}return t.prototype.collect=function(t){this.data.push(t)},Object.defineProperty(t.prototype,\"finalValue\",{get:function(){return new(x.bind.apply(x,s([void 0],u(this.data),!1)))},enumerable:!1,configurable:!0}),t}();e.DomQueryCollector=E,e.DQ=x},805:function(t,e,r){Object.defineProperty(e,\"__esModule\",{value:!0}),e.Lang=void 0;var n=r(152);!function(t){function e(t){for(var e=/\\s/,r=(t=t.replace(/^\\s\\s*/,\"\")).length;e.test(t.charAt(--r)););return t.slice(0,r+1)}function r(t){return!!arguments.length&&null!=t&&(\"string\"==typeof t||t instanceof String)}t.saveResolve=function(t,e){void 0===e&&(e=null);try{var r=t();return n.Optional.fromNullable(null!=r?r:e)}catch(t){return n.Optional.absent}},t.saveResolveLazy=function(t,e){void 0===e&&(e=null);try{var r=t();return n.Optional.fromNullable(null!=r?r:e())}catch(t){return n.Optional.absent}},t.strToArray=function(t,r){void 0===r&&(r=/\\./gi);var n=[];return t.split(r).forEach((function(t){n.push(e(t))})),n},t.trim=e,t.objToArray=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=[]),\"__undefined__\"==(null!=t?t:\"__undefined__\")?null!=r?r:null:t instanceof Array&&!e&&!r?t:r.concat(Array.prototype.slice.call(t,e))},t.equalsIgnoreCase=function(t,e){var r=null!=e?e:\"___no_value__\";return(null!=t?t:\"___no_value__\").toLowerCase()===r.toLowerCase()},t.assertType=function(t,e){return r(e)?typeof t==e:t instanceof e},t.isString=r,t.isFunc=function(t){return t instanceof Function||\"function\"==typeof t},t.objAssign=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(null==t)throw new TypeError(\"Cannot convert undefined or null to object\");var n=Object(t);return Object.assign?(e.forEach((function(t){return Object.assign(n,t)})),n):(e.filter((function(t){return null!=t})).forEach((function(t){var e=t;Object.keys(e).filter((function(t){return Object.prototype.hasOwnProperty.call(e,t)})).forEach((function(t){return n[t]=e[t]}))})),n)}}(e.Lang||(e.Lang={}))},152:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Config=e.ValueEmbedder=e.Optional=e.Monad=void 0;var l=r(805),u=r(255),s=r(551),c=l.Lang.objAssign,f=function(){function t(t){this._value=t}return Object.defineProperty(t.prototype,\"value\",{get:function(){return this._value},enumerable:!1,configurable:!0}),t.prototype.map=function(e){return e||(e=function(t){return t}),new t(e(this.value))},t.prototype.flatMap=function(e){for(var r=this.map(e);(null==r?void 0:r.value)instanceof t;)r=r.value;return r},t}();e.Monad=f;var p=function(t){function e(e){return t.call(this,e)||this}return o(e,t),Object.defineProperty(e.prototype,\"value\",{get:function(){return this._value instanceof f?this._value.flatMap().value:this._value},enumerable:!1,configurable:!0}),e.fromNullable=function(t){return new e(t)},e.prototype.isAbsent=function(){return void 0===this.value||null==this.value},e.prototype.isPresent=function(t){var e=this.isAbsent();return!e&&t&&t.call(this,this),!e},e.prototype.ifPresentLazy=function(t){return void 0===t&&(t=function(){}),this.isPresent.call(this,t),this},e.prototype.orElse=function(t){return this.isPresent()?this:null==t?e.absent:this.flatMap((function(){return t}))},e.prototype.orElseLazy=function(t){return this.isPresent()?this:this.flatMap(t)},e.prototype.flatMap=function(r){var n=t.prototype.flatMap.call(this,r);return n instanceof e?n.flatMap():e.fromNullable(n.value)},e.prototype.getIf=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=this,n=0;n<t.length;n++){var o=this.keyVal(t[n]),i=this.arrayIndex(t[n]);if(\"\"===o&&i>=0){if((r=this.getClass().fromNullable(r.value instanceof Array?r.value.length<i?null:r.value[i]:null)).isAbsent())return r}else if(o&&i>=0){if(r.getIfPresent(o).isAbsent())return r;if((r=r.getIfPresent(o).value instanceof Array?this.getClass().fromNullable(r.getIfPresent(o).value[i]):this.getClass().absent).isAbsent())return r}else{if((r=r.getIfPresent(o)).isAbsent())return r;i>-1&&(r=this.getClass().fromNullable(r.value[i]))}}return r},e.prototype.match=function(t){return!this.isAbsent()&&t(this.value)},e.prototype.get=function(t){return void 0===t&&(t=e.absent),this.isAbsent()?this.getClass().fromNullable(t).flatMap():this.getClass().fromNullable(this.value).flatMap()},e.prototype.toJson=function(){return JSON.stringify(this.value)},e.prototype.getClass=function(){return e},e.prototype.arrayIndex=function(t){var e=t.indexOf(\"[\"),r=t.indexOf(\"]\");return e>=0&&r>0&&e<r?parseInt(t.substring(e+1,r)):-1},e.prototype.keyVal=function(t){var e=t.indexOf(\"[\");return e>=0?t.substring(0,e):t},e.prototype.getIfPresent=function(t){return this.isAbsent()?this.getClass().absent:this.getClass().fromNullable(this.value[t]).flatMap()},e.prototype.resolve=function(t){if(this.isAbsent())return e.absent;try{return e.fromNullable(t(this.value))}catch(t){return e.absent}},e.absent=e.fromNullable(null),e}(f);e.Optional=p;var h=function(t){function e(e,r){void 0===r&&(r=\"value\");var n=t.call(this,e)||this;return n.key=r,n}return o(e,t),Object.defineProperty(e.prototype,\"value\",{get:function(){return this._value?this._value[this.key]:null},set:function(t){this._value&&(this._value[this.key]=t)},enumerable:!1,configurable:!0}),e.prototype.orElse=function(t){var r={};return r[this.key]=t,this.isPresent()?this:new e(r,this.key)},e.prototype.orElseLazy=function(t){if(this.isPresent())return this;var r={};return r[this.key]=t(),new e(r,this.key)},e.prototype.getClass=function(){return e},e.fromNullable=function(t,r){return void 0===r&&(r=\"value\"),new e(t,r)},e.absent=e.fromNullable(null),e}(p);e.ValueEmbedder=h;var y=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.arrPos=null!=n?n:-1,o}return o(e,t),Object.defineProperty(e.prototype,\"value\",{get:function(){return\"\"==this.key&&this.arrPos>=0?this._value[this.arrPos]:this.key&&this.arrPos>=0?this._value[this.key][this.arrPos]:this._value[this.key]},set:function(t){\"\"==this.key&&this.arrPos>=0?this._value[this.arrPos]=t:this.key&&this.arrPos>=0?this._value[this.key][this.arrPos]=t:this._value[this.key]=t},enumerable:!1,configurable:!0}),e.absent=e.fromNullable(null),e}(h),v=function(t){function e(e){return t.call(this,e)||this}return o(e,t),Object.defineProperty(e.prototype,\"shallowCopy\",{get:function(){return new e(s.Stream.ofAssoc(this.value).collect(new u.AssocArrayCollector))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"deepCopy\",{get:function(){return new e(c({},this.value))},enumerable:!1,configurable:!0}),e.fromNullable=function(t){return new e(t)},e.prototype.shallowMerge=function(t,e,r){var n=this;void 0===e&&(e=!0),void 0===r&&(r=!1);var o=function(o){!e&&o in l.value||(r?Array.isArray(t.getIf(o).value)?s.Stream.of.apply(s.Stream,a([],i(t.getIf(o).value),!1)).each((function(t){return n.append(o).value=t})):l.append(o).value=t.getIf(o).value:l.assign(o).value=t.getIf(o).value)},l=this;for(var u in t.value)o(u)},e.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.length<1;if(!r){var n=t[t.length-1],o=(this.keyVal(n),this.getIf.apply(this,a([],i(t),!1)).isPresent());this.buildPath(t);var l=this.arrayIndex(n);if(l>-1)throw Error(\"Append only possible on non array properties, use assign on indexed data\");var u=this.getIf.apply(this,a([],i(t),!1)).value;Array.isArray(u)||(u=this.assign.apply(this,a([],i(t),!1)).value=[u]),o&&u.push({}),l=u.length-1;var s=new y(1==t.length?this.value:this.getIf.apply(this,t.slice(0,t.length-1)).value,n,l);return s}},e.prototype.appendIf=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return t?this.append.apply(this,a([],i(e),!1)):{value:null}},e.prototype.assign=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!(t.length<1)){this.buildPath(t);var r=this.keyVal(t[t.length-1]),n=this.arrayIndex(t[t.length-1]),o=new y(1==t.length?this.value:this.getIf.apply(this,t.slice(0,t.length-1)).value,r,n);return o}},e.prototype.assignIf=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return t?this.assign.apply(this,a([],i(e),!1)):{value:null}},e.prototype.getIf=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this.getClass().fromNullable(t.prototype.getIf.apply(this,e).value)},e.prototype.get=function(e){return this.getClass().fromNullable(t.prototype.get.call(this,e).value)},e.prototype.delete=function(t){return t in this.value&&delete this.value[t],this},e.prototype.toJson=function(){return JSON.stringify(this.value)},e.prototype.getClass=function(){return e},e.prototype.setVal=function(t){this._value=t},e.prototype.buildPath=function(t){for(var e=this,r=this.getClass().fromNullable(null),n=-1,o=function(t,e){for(var r=t.length,n=r+e,o=r;o<n;o++)t.push({})},i=0;i<t.length;i++){var a=this.keyVal(t[i]),l=this.arrayIndex(t[i]);if(\"\"===a&&l>=0)e.setVal(e.value instanceof Array?e.value:[]),o(e.value,l+1),n>=0&&(r.value[n]=e.value),r=e,n=l,e=this.getClass().fromNullable(e.value[l]);else{var u=e.getIf(a);if(-1==l)u.isAbsent()?u=this.getClass().fromNullable(e.value[a]={}):e=u;else{var s=u.value instanceof Array?u.value:[];o(s,l+1),e.value[a]=s,u=this.getClass().fromNullable(s[l])}r=e,n=l,e=u}}return this},e}(p);e.Config=v},255:function(t,e,r){var n=this&&this.__read||function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,\"__esModule\",{value:!0}),e.QueryFormStringCollector=e.QueryFormDataCollector=e.FormDataCollector=e.AssocArrayCollector=e.Run=e.ArrayAssocArrayCollector=e.ArrayCollector=e.FlatMapStreamDataSource=e.MappedStreamDataSource=e.FilteredStreamDatasource=e.ArrayStreamDataSource=e.SequenceDataSource=void 0;var i=r(551),a=function(){function t(t,e){this.total=e,this.start=t,this.value=t}return t.prototype.hasNext=function(){return this.value<this.total},t.prototype.next=function(){return Math.min(this.value++,this.total-1)},t.prototype.reset=function(){this.value=0},t}();e.SequenceDataSource=a;var l=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.dataPos=-1,this.value=t}return t.prototype.hasNext=function(){return this.value.length-1>this.dataPos},t.prototype.next=function(){return this.dataPos++,this.value[this.dataPos]},t.prototype.reset=function(){this.dataPos=-1},t}();e.ArrayStreamDataSource=l;var u=function(){function t(t,e){this.filteredNext=null,this.filterFunc=t,this.inputDataSource=e}return t.prototype.hasNext=function(){for(;null==this.filteredNext&&this.inputDataSource.hasNext();){var t=this.inputDataSource.next();if(this.filterFunc(t))return this.filteredNext=t,!0;this.filteredNext=null}return null!=this.filteredNext},t.prototype.next=function(){var t=this.filteredNext;return this.filteredNext=null,this.hasNext(),t},t.prototype.reset=function(){this.filteredNext=null,this.inputDataSource.reset()},t}();e.FilteredStreamDatasource=u;var s=function(){function t(t,e){this.mapFunc=t,this.inputDataSource=e}return t.prototype.hasNext=function(){return this.inputDataSource.hasNext()},t.prototype.next=function(){return this.mapFunc(this.inputDataSource.next())},t.prototype.reset=function(){this.inputDataSource.reset()},t}();e.MappedStreamDataSource=s;var c=function(){function t(t,e){this.mapFunc=t,this.inputDataSource=e}return t.prototype.hasNext=function(){return this.resolveCurrentNext()||this.resolveNextNext()},t.prototype.resolveCurrentNext=function(){var t=!1;return this.activeDataSource&&(t=this.activeDataSource.hasNext()),t},t.prototype.resolveNextNext=function(){for(var t=!1;!t&&this.inputDataSource.hasNext();){var e=this.mapFunc(this.inputDataSource.next());Array.isArray(e)?this.activeDataSource=new(l.bind.apply(l,o([void 0],n(e),!1))):this.activeDataSource=e,t=this.activeDataSource.hasNext()}return t},t.prototype.next=function(){return this.activeDataSource.next()},t.prototype.reset=function(){this.inputDataSource.reset()},t}();e.FlatMapStreamDataSource=c;var f=function(){function t(){this.data=[]}return t.prototype.collect=function(t){this.data.push(t)},Object.defineProperty(t.prototype,\"finalValue\",{get:function(){return this.data},enumerable:!1,configurable:!0}),t}();e.ArrayCollector=f;var p=function(){function t(){this.finalValue={}}return t.prototype.collect=function(t){var e,r,n,o,i=null!==(e=null==t?void 0:t[0])&&void 0!==e?e:t;this.finalValue[i]=null!==(n=null===(r=this.finalValue)||void 0===r?void 0:r[i])&&void 0!==n?n:[],this.finalValue[i].push(null===(o=null==t?void 0:t[1])||void 0===o||o)},t}();e.ArrayAssocArrayCollector=p;var h=function(){function t(){}return t.prototype.collect=function(t){},Object.defineProperty(t.prototype,\"finalValue\",{get:function(){return null},enumerable:!1,configurable:!0}),t}();e.Run=h;var y=function(){function t(){this.finalValue={}}return t.prototype.collect=function(t){var e,r;this.finalValue[null!==(e=t[0])&&void 0!==e?e:t]=null===(r=t[1])||void 0===r||r},t}();e.AssocArrayCollector=y;var v=function(){function t(){this.finalValue=new FormData}return t.prototype.collect=function(t){this.finalValue.append(t.key,t.value)},t}();e.FormDataCollector=v;var d=function(){function t(){this.finalValue=new FormData}return t.prototype.collect=function(t){var e=t.encodeFormElement();e.isPresent()&&this.finalValue.append(t.name.value,e.get(t.name).value)},t}();e.QueryFormDataCollector=d;var m=function(){function t(){this.formData=[]}return t.prototype.collect=function(t){var e=t.encodeFormElement();e.isPresent()&&this.formData.push([t.name.value,e.get(t.name).value])},Object.defineProperty(t.prototype,\"finalValue\",{get:function(){return i.Stream.of.apply(i.Stream,o([],n(this.formData),!1)).map((function(t){return t.join(\"=\")})).reduce((function(t,e){return[t,e].join(\"&\")})).orElse(\"\").value},enumerable:!1,configurable:!0}),t}();e.QueryFormStringCollector=m},551:function(t,e,r){var n=this&&this.__read||function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,\"__esModule\",{value:!0}),e.LazyStream=e.Stream=void 0;var i=r(152),a=r(255),l=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._limits=-1,this.pos=-1,this.value=t}return t.of=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new(t.bind.apply(t,o([void 0],n(e),!1)))},t.ofAssoc=function(t){return this.of.apply(this,o([],n(Object.keys(t)),!1)).map((function(e){return[e,t[e]]}))},t.ofDataSource=function(e){for(var r=[];e.hasNext();)r.push(e.next());return new(t.bind.apply(t,o([void 0],n(r),!1)))},t.prototype.limits=function(t){return this._limits=t,this},t.prototype.concat=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.of.apply(t,o([this],n(e),!1)).flatMap((function(t){return t}))},t.prototype.onElem=function(t){for(var e=0;e<this.value.length&&(-1==this._limits||e<this._limits)&&!1!==t(this.value[e],e);e++);return this},t.prototype.each=function(t){this.onElem(t)},t.prototype.map=function(e){e||(e=function(t){return t});var r=[];return this.each((function(t,n){r.push(e(t))})),new(t.bind.apply(t,o([void 0],n(r),!1)))},t.prototype.flatMap=function(e){var r=[];return this.each((function(t){var i=e(t);r=Array.isArray(i)?r.concat(i):r.concat.apply(r,o([],n(i.value),!1))})),t.of.apply(t,o([],n(r),!1))},t.prototype.filter=function(e){var r=[];return this.each((function(t){e(t)&&r.push(t)})),new(t.bind.apply(t,o([void 0],n(r),!1)))},t.prototype.reduce=function(t,e){void 0===e&&(e=null);for(var r=null!=e?0:1,n=null!=e?e:this.value.length?this.value[0]:null,o=r;o<this.value.length&&(-1==this._limits||o<this._limits);o++)n=t(n,this.value[o]);return i.Optional.fromNullable(n)},t.prototype.first=function(){return this.value&&this.value.length?i.Optional.fromNullable(this.value[0]):i.Optional.absent},t.prototype.last=function(){var t=this._limits>0?Math.min(this._limits,this.value.length):this.value.length;return i.Optional.fromNullable(t?this.value[t-1]:null)},t.prototype.anyMatch=function(t){for(var e=0;e<this.value.length&&(-1==this._limits||e<this._limits);e++)if(t(this.value[e]))return!0;return!1},t.prototype.allMatch=function(t){if(!this.value.length)return!1;for(var e=0,r=0;r<this.value.length;r++)t(this.value[r])&&e++;return e==this.value.length},t.prototype.noneMatch=function(t){for(var e=0,r=0;r<this.value.length;r++)t(this.value[r])||e++;return e==this.value.length},t.prototype.sort=function(e){var r=this.value.slice().sort(e);return t.of.apply(t,o([],n(r),!1))},t.prototype.collect=function(t){return this.each((function(e){return t.collect(e)})),t.finalValue},t.prototype.hasNext=function(){var t=-1!=this._limits&&this.pos>=this._limits-1,e=this.pos>=this.value.length-1;return!(t||e)},t.prototype.next=function(){return this.hasNext()?(this.pos++,this.value[this.pos]):null},t.prototype[Symbol.iterator]=function(){var t=this;return{next:function(){return{done:!t.hasNext(),value:t.next()}}}},t.prototype.reset=function(){this.pos=-1},t}();e.Stream=l;var u=function(){function t(t){this._limits=-1,this.pos=-1,this.dataSource=t}return t.of=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new t(new(a.ArrayStreamDataSource.bind.apply(a.ArrayStreamDataSource,o([void 0],n(e),!1))))},t.ofAssoc=function(t){return this.of.apply(this,o([],n(Object.keys(t)),!1)).map((function(e){return[e,t[e]]}))},t.ofStreamDataSource=function(e){return new t(e)},t.prototype.hasNext=function(){return!this.isOverLimits()&&this.dataSource.hasNext()},t.prototype.next=function(){var t=this.dataSource.next();return this.pos++,t},t.prototype.reset=function(){this.dataSource.reset(),this.pos=0,this._limits=-1},t.prototype.concat=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.of.apply(t,o([this],n(e),!1)).flatMap((function(t){return t}))},t.prototype.nextFilter=function(t){if(this.hasNext()){var e=this.next();return t(e)?e:this.nextFilter(t)}return null},t.prototype.limits=function(t){return this._limits=t,this},t.prototype.collect=function(t){for(;this.hasNext();){var e=this.next();t.collect(e)}return t.finalValue},t.prototype.onElem=function(e){var r=this;return new t(new a.MappedStreamDataSource((function(t){return!1===e(t,r.pos)&&r.stop(),t}),this))},t.prototype.filter=function(e){return new t(new a.FilteredStreamDatasource(e,this))},t.prototype.map=function(e){return new t(new a.MappedStreamDataSource(e,this))},t.prototype.flatMap=function(e){return new t(new a.FlatMapStreamDataSource(e,this))},t.prototype.each=function(t){for(;this.hasNext();)!1===t(this.next())&&this.stop()},t.prototype.reduce=function(t,e){if(void 0===e&&(e=null),!this.hasNext())return i.Optional.absent;var r=null,n=null;if(null!=e)r=e,n=this.next();else{if(r=this.next(),!this.hasNext())return i.Optional.fromNullable(r);n=this.next()}for(r=t(r,n);this.hasNext();)r=t(r,n=this.next());return i.Optional.fromNullable(r)},t.prototype.last=function(){return this.hasNext()?this.reduce((function(t,e){return e})):i.Optional.absent},t.prototype.first=function(){return this.reset(),this.hasNext()?i.Optional.fromNullable(this.next()):i.Optional.absent},t.prototype.anyMatch=function(t){for(;this.hasNext();)if(t(this.next()))return!0;return!1},t.prototype.allMatch=function(t){for(;this.hasNext();)if(!t(this.next()))return!1;return!0},t.prototype.noneMatch=function(t){for(;this.hasNext();)if(t(this.next()))return!1;return!0},t.prototype.sort=function(e){var r=this.collect(new a.ArrayCollector);return r=r.sort(e),t.of.apply(t,o([],n(r),!1))},Object.defineProperty(t.prototype,\"value\",{get:function(){return this.collect(new a.ArrayCollector)},enumerable:!1,configurable:!0}),t.prototype[Symbol.iterator]=function(){var t=this;return{next:function(){return{done:!t.hasNext(),value:t.next()}}}},t.prototype.stop=function(){this.pos=this._limits+1e9},t.prototype.isOverLimits=function(){return-1!=this._limits&&this.pos>=this._limits-1},t}();e.LazyStream=u},121:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,\"__esModule\",{value:!0}),e.XQ=e.XMLQuery=void 0;var i=r(805),a=r(585),l=i.Lang.isString,u=function(t){function e(e,r){void 0===r&&(r=\"text/xml\");var n;return l(e)?t.call(this,null==(n=e)?null:i.Lang.saveResolveLazy((function(){return new window.DOMParser}),(function(){return(t=new ActiveXObject(\"Microsoft.XMLDOM\")).async=!1,{parseFromString:function(e,r){return t.loadXML(e)}};var t})).value.parseFromString(n,r))||this:t.call(this,e)||this}return o(e,t),e.prototype.isXMLParserError=function(){return this.querySelectorAll(\"parsererror\").isPresent()},e.prototype.toString=function(){var t=[];return this.eachElem((function(e){var r,n,o,i=null!==(o=null===(n=null===(r=null===window||void 0===window?void 0:window.XMLSerializer)||void 0===r?void 0:r.constructor())||void 0===n?void 0:n.serializeToString(e))&&void 0!==o?o:null==e?void 0:e.xml;i&&t.push(i)})),t.join(\"\")},e.prototype.parserErrorText=function(t){return this.querySelectorAll(\"parsererror\").textContent(t)},e.parseXML=function(t){return new e(t)},e.parseHTML=function(t){return new e(t,\"text/html\")},e.fromString=function(t,r){return void 0===r&&(r=\"text/xml\"),new e(t,r)},e}(a.DomQuery);e.XMLQuery=u,e.XQ=u}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}var n={};!function(){var t=n;Object.defineProperty(t,\"__esModule\",{value:!0}),t.QueryFormDataCollector=t.FormDataCollector=t.AssocArrayCollector=t.ArrayCollector=t.QueryFormStringCollector=t.SequenceDataSource=t.FlatMapStreamDataSource=t.FilteredStreamDatasource=t.MappedStreamDataSource=t.ArrayStreamDataSource=t.LazyStream=t.Stream=t.XQ=t.XMLQuery=t.ValueEmbedder=t.Optional=t.Monad=t.Config=t.Lang=t.DQ=t.DomQueryCollector=t.ElementAttribute=t.DomQuery=void 0;var e=r(585);Object.defineProperty(t,\"DomQuery\",{enumerable:!0,get:function(){return e.DomQuery}}),Object.defineProperty(t,\"ElementAttribute\",{enumerable:!0,get:function(){return e.ElementAttribute}}),Object.defineProperty(t,\"DomQueryCollector\",{enumerable:!0,get:function(){return e.DomQueryCollector}}),Object.defineProperty(t,\"DQ\",{enumerable:!0,get:function(){return e.DQ}});var o=r(805);Object.defineProperty(t,\"Lang\",{enumerable:!0,get:function(){return o.Lang}});var i=r(152);Object.defineProperty(t,\"Config\",{enumerable:!0,get:function(){return i.Config}}),Object.defineProperty(t,\"Monad\",{enumerable:!0,get:function(){return i.Monad}}),Object.defineProperty(t,\"Optional\",{enumerable:!0,get:function(){return i.Optional}}),Object.defineProperty(t,\"ValueEmbedder\",{enumerable:!0,get:function(){return i.ValueEmbedder}});var a=r(121);Object.defineProperty(t,\"XMLQuery\",{enumerable:!0,get:function(){return a.XMLQuery}}),Object.defineProperty(t,\"XQ\",{enumerable:!0,get:function(){return a.XQ}});var l=r(551);Object.defineProperty(t,\"Stream\",{enumerable:!0,get:function(){return l.Stream}}),Object.defineProperty(t,\"LazyStream\",{enumerable:!0,get:function(){return l.LazyStream}});var u=r(255);Object.defineProperty(t,\"ArrayStreamDataSource\",{enumerable:!0,get:function(){return u.ArrayStreamDataSource}}),Object.defineProperty(t,\"MappedStreamDataSource\",{enumerable:!0,get:function(){return u.MappedStreamDataSource}}),Object.defineProperty(t,\"FilteredStreamDatasource\",{enumerable:!0,get:function(){return u.FilteredStreamDatasource}}),Object.defineProperty(t,\"FlatMapStreamDataSource\",{enumerable:!0,get:function(){return u.FlatMapStreamDataSource}}),Object.defineProperty(t,\"SequenceDataSource\",{enumerable:!0,get:function(){return u.SequenceDataSource}}),Object.defineProperty(t,\"QueryFormStringCollector\",{enumerable:!0,get:function(){return u.QueryFormStringCollector}}),Object.defineProperty(t,\"ArrayCollector\",{enumerable:!0,get:function(){return u.ArrayCollector}}),Object.defineProperty(t,\"AssocArrayCollector\",{enumerable:!0,get:function(){return u.AssocArrayCollector}}),Object.defineProperty(t,\"FormDataCollector\",{enumerable:!0,get:function(){return u.FormDataCollector}}),Object.defineProperty(t,\"QueryFormDataCollector\",{enumerable:!0,get:function(){return u.QueryFormDataCollector}})}();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,\"__esModule\",{value:!0})}();\n//# sourceMappingURL=index_core.js.map","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n///<reference types='../../types/typedefs'/>\n\nimport {Implementation} from \"../impl/AjaxImpl\";\nimport {PushImpl} from \"../impl/PushImpl\";\n\nexport module jsf {\n \"use strict\";\n\n /*\n * Version of the implementation for the jsf.js.\n * <p />\n * as specified within the jsf specifications jsf.html:\n * <ul>\n * <li>left two digits major release number</li>\n * <li>middle two digits minor spec release number</li>\n * <li>right two digits bug release number</li>\n * </ul>\n * @constant\n */\n export var specversion = 220000;\n /**\n * Implementation version as specified within the jsf specification.\n * <p />\n * A number increased with every implementation version\n * and reset by moving to a new spec release number\n *\n * @constant\n */\n export var implversion = 0;\n\n /**\n * SeparatorChar as defined by UINamingContainer.getNamingContainerSeparatorChar()\n * @type {Char}\n */\n export var separatorchar = getSeparatorChar();\n\n /**\n * This method is responsible for the return of a given project stage as defined\n * by the jsf specification.\n * <p/>\n * Valid return values are:\n * <ul>\n * <li>&quot;Production&quot;</li>\n * <li>&quot;Development&quot;</li>\n * <li>&quot;SystemTest&quot;</li>\n * <li>&quot;UnitTest&quot;</li>\n * </li>\n *\n * @return {String} the current project state emitted by the server side method:\n * <i>javax.faces.application.Application.getProjectStage()</i>\n */\n export function getProjectStage(): string {\n return Implementation.getProjectStage();\n }\n\n /**\n * collect and encode data for a given form element (must be of type form)\n * find the javax.faces.ViewState element and encode its value as well!\n * return a concatenated string of the encoded values!\n *\n * @throws an exception in case of the given element not being of type form!\n * https://issues.apache.org/jira/browse/MYFACES-2110\n */\n export function getViewState(formElement: Element | string): string {\n return Implementation.getViewState(formElement);\n }\n\n /**\n * returns the window identifier for the given node / window\n * @return the window identifier or null if none is found\n * @param rootNode\n */\n export function getClientWindow(rootNode?: Element | string): string {\n return Implementation.getClientWindow(rootNode);\n }\n\n //private helper functions\n function getSeparatorChar() {\n return Implementation.getSeparatorChar();\n }\n\n\n export module ajax {\n \"use strict\";\n\n /**\n * this function has to send the ajax requests\n *\n * following requestInternal conditions must be met:\n * <ul>\n * <li> the requestInternal must be sent asynchronously! </li>\n * <li> the requestInternal must be a POST!!! requestInternal </li>\n * <li> the requestInternal url must be the form action attribute </li>\n * <li> all requests must be queued with a client side requestInternal queue to ensure the requestInternal ordering!</li>\n * </ul>\n *\n * @param {String|Node} element: any dom element no matter being it html or jsf, from which the event is emitted\n * @param {EVENT} event: any javascript event supported by that object\n * @param {Map} options : map of options being pushed into the ajax cycle\n */\n export function request(element: Element, event?: Event, options?: Context) {\n Implementation.request(element, event, options)\n //Implementation.getInstance().requestInternal(element, event, options);\n }\n\n /**\n * response handler\n * @param request the request object having triggered this response\n * @param context the request context\n *\n * TODO add info on what can be in the context\n */\n export function response(request: XMLHttpRequest, context?: Context) {\n Implementation.response(request, context);\n }\n\n /**\n * Adds an error handler to our global error queue.\n * the error handler must be of the format <i>function errorListener(&lt;errorData&gt;)</i>\n * with errorData being of following format:\n * <ul>\n * <li> errorData.type : &quot;error&quot;</li>\n * <li> errorData.status : the error status message</li>\n * <li> errorData.serverErrorName : the server error name in case of a server error</li>\n * <li> errorData.serverErrorMessage : the server error message in case of a server error</li>\n * <li> errorData.source : the issuing source element which triggered the requestInternal </li>\n * <li> eventData.responseCode: the response code (aka http requestInternal response code, 401 etc...) </li>\n * <li> eventData.responseText: the requestInternal response text </li>\n * <li> eventData.responseXML: the requestInternal response xml </li>\n * </ul>\n *\n * @param {function} errorListener error handler must be of the format <i>function errorListener(&lt;errorData&gt;)</i>\n */\n export function addOnError(errorFunc: (data: ErrorData) => void) {\n Implementation.addOnError(<any>errorFunc);\n }\n\n /**\n * Adds a global event listener to the ajax event queue. The event listener must be a function\n * of following format: <i>function eventListener(&lt;eventData&gt;)</i>\n *\n * @param {function} eventListener event must be of the format <i>function eventListener(&lt;eventData&gt;)</i>\n */\n export function addOnEvent(eventFunc: (data: EventData) => void) {\n Implementation.addOnEvent(<any>eventFunc);\n }\n }\n\n export module util {\n\n /**\n * varargs function which executes a chain of code (functions or any other code)\n *\n * if any of the code returns false, the execution\n * is terminated prematurely skipping the rest of the code!\n *\n * @param {DomNode} source, the callee object\n * @param {Event} event, the event object of the callee event triggering this function\n * @param funcs ... arbitrary array of functions or strings\n * @returns true if the chain has succeeded false otherwise\n */\n export function chain(source, event, ...funcs: Array<Function | string>): boolean {\n return Implementation.chain(source, event, ...(funcs as EvalFuncs));\n }\n }\n\n export module push {\n /**\n * @param {function} onopen The function to be invoked when the web socket is opened.\n * @param {function} onmessage The function to be invoked when a message is received.\n * @param {function} onclose The function to be invoked when the web socket is closed.\n * @param {boolean} autoconnect Whether or not to immediately open the socket. Defaults to <code>false</code>.\n */\n export function init(socketClientId: string,\n uri: string,\n channel: string,\n onopen: Function,\n onmessage: Function,\n onclose: Function,\n behaviorScripts: any,\n autoconnect: boolean) {\n PushImpl.init(socketClientId, uri, channel, onopen, onmessage, onclose, behaviorScripts, autoconnect);\n }\n\n /**\n * Open the web socket on the given channel.\n * @param {string} channel The name of the web socket channel.\n * @throws {Error} When channel is unknown.\n */\n export function open(socketClientId: string) {\n PushImpl.open(socketClientId);\n }\n\n /**\n * Close the web socket on the given channel.\n * @param {string} channel The name of the web socket channel.\n * @throws {Error} When channel is unknown.\n */\n export function close(socketClientId: string) {\n PushImpl.close(socketClientId);\n }\n\n }\n\n //We hook the old namespace system into our npm system\n //if (\"undefined\" == window.jsf) {\n // window.jsf = jsf;\n //}\n\n\n}\n\n\n\n//fullfill the window contract\nexport module myfaces {\n\n /**\n * AB function similar to mojarra and Primefaces\n * not part of the spec but a convenience accessor method\n * Code provided by Thomas Andraschko\n *\n * @param source the event source\n * @param event the event\n * @param eventName event name for java.javax.faces.behavior.evemnt\n * @param execute execute list as passed down in jsf.ajax.request\n * @param render\n * @param options\n */\n export function ab(source: Element, event: Event, eventName: string, execute: string, render: string, options: Context = {}) {\n if (eventName) {\n options[\"javax.faces.behavior.event\"] = eventName;\n }\n if (execute) {\n options[\"execute\"] = execute;\n }\n if (render) {\n options[\"render\"] = render;\n }\n\n jsf.ajax.request(source, event, options);\n }\n}\n\n\n","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {IListener} from \"./util/ListenerQueue\";\nimport {Response} from \"./xhrCore/Response\";\nimport {XhrRequest} from \"./xhrCore/XhrRequest\";\nimport {AsynchronousQueue} from \"./util/AsyncQueue\";\nimport {AssocArrayCollector, Config, DQ, Lang, Optional, Stream} from \"mona-dish\";\nimport {Assertions} from \"./util/Assertions\";\nimport {XhrFormData} from \"./xhrCore/XhrFormData\";\nimport {ExtDomquery} from \"./util/ExtDomQuery\";\nimport {ErrorData} from \"./xhrCore/ErrorData\";\nimport {EventData} from \"./xhrCore/EventData\";\nimport {ExtLang} from \"./util/Lang\";\nimport {\n CTX_PARAM_EXECUTE,\n CTX_PARAM_PASS_THR,\n CTX_PARAM_SRC_CTL_ID,\n CTX_PARAM_SRC_FRM_ID,\n CTX_PARAM_TR_TYPE,\n IDENT_ALL,\n IDENT_FORM,\n IDENT_NONE,\n IDENT_THIS,\n MYFACES,\n ON_ERROR,\n ON_EVENT,\n P_AJAX,\n P_CLIENT_WINDOW,\n P_EVT,\n P_EXECUTE,\n P_PARTIAL_SOURCE,\n P_RENDER,\n P_RESET_VALUES,\n P_WINDOW_ID,\n RENDER,\n REQ_TYPE_POST,\n SOURCE,\n TAG_FORM\n} from \"./core/Const\";\nimport {\n resolveDefaults,\n resolveDelay,\n resolveForm,\n resolveTimeout\n} from \"./xhrCore/RequestDataResolver\";\n\n\ndeclare var jsf: any;\n\n/*\n * allowed project stages\n */\nenum ProjectStages {\n Production = \"Production\",\n Development = \"Development\",\n SystemTest = \"SystemTest\",\n UnitTest = \"UnitTest\"\n}\n\n/*\n * blockfilter for the passthrough filtering; the attributes given here\n * will not be transmitted from the options into the passthrough\n */\nenum BlockFilter {\n onerror = \"onerror\",\n onevent = \"onevent\",\n render = \"render\",\n execute = \"execute\",\n myfaces = \"myfaces\",\n delay = \"delay\",\n timeout = \"timeout\",\n windowId = \"windowId\"\n}\n\n/**\n * Core Implementation\n * to distinct between api and impl\n *\n * The original idea was to make the implementation pluggable\n * but this is pointless, you always can overwrite the thin api layer\n * however a dedicated api makes sense for readability reasons\n */\nexport module Implementation {\n\n import trim = Lang.trim;\n import getMessage = ExtLang.getMessage;\n import getGlobalConfig = ExtLang.getGlobalConfig;\n import assert = Assertions.assert;\n\n\n\n let projectStage: string = null;\n let separator: string = null;\n let eventQueue = [];\n let errorQueue = [];\n export let requestQueue: AsynchronousQueue<XhrRequest> = null;\n /*error reporting threshold*/\n let threshold = \"ERROR\";\n\n /**\n * fetches the separator char from the given script tags\n *\n * @return {char} the separator char for the given script tags\n */\n export function getSeparatorChar(): string {\n return resolveGlobalConfig()?.separator ??\n this?.separator ??\n (separator = ExtDomquery.searchJsfJsFor(/separator=([^&;]*)/).orElse(\":\").value);\n }\n\n /**\n * this is for testing purposes only, since AjaxImpl is a module\n * we need to reset for every unit test its internal states\n */\n export function reset() {\n projectStage = null;\n separator = null;\n eventQueue = [];\n errorQueue = [];\n requestQueue = null;\n }\n\n /**\n * @return the project stage also emitted by the server:\n * it cannot be cached and must be delivered over the server\n * The value for it comes from the requestInternal parameter of the jsf.js script called \"stage\".\n */\n export function getProjectStage(): string | null {\n return resolveGlobalConfig()?.projectStage ??\n this?.projectStage ??\n (projectStage = resolveProjectStateFromURL());\n }\n\n /**\n * resolves the project stage as url parameter\n * @return the project stage or null\n */\n export function resolveProjectStateFromURL(): string | null {\n\n /* run through all script tags and try to find the one that includes jsf.js */\n let foundStage = <string>ExtDomquery.searchJsfJsFor(/stage=([^&;]*)/).value;\n return (foundStage in ProjectStages) ? foundStage : null;\n }\n\n /**\n * implementation of the jsf.util.chain functionality\n *\n * @param source\n * @param event\n * @param funcs\n */\n export function chain(source: any, event: Event, ...funcs: EvalFuncs): boolean {\n\n let ret = true;\n let resolveAndExecute = function (func: Function | string) {\n if (\"string\" != typeof func) {\n //function is passed down as chain parameter, can be executed as is\n return (ret = ret && ((<Function>func).call(source, event) !== false));\n } else {\n //either a function or a string can be passed in case of a string we have to wrap it into another function\n //it it is not a plain executable code but a definition\n let sourceCode = trim(<string>func);\n if (sourceCode.indexOf(\"function \") == 0) {\n sourceCode = `return ${sourceCode} (event)`;\n }\n return (ret = ret && (new Function(\"event\", sourceCode).call(source, event) !== false));\n }\n };\n\n //we can use our stream each functionality to run our chain here..\n //the no return value == false stop stream functionality is handled by our resolveAndExecute\n <any>Stream.of(...funcs).each(func => resolveAndExecute(func));\n return ret;\n }\n\n /**\n * this function has to send the ajax requests\n *\n * following request conditions must be met:\n * <ul>\n * <li> the request must be sent asynchronously! </li>\n * <li> the request must be a POST!!! request </li>\n * <li> the request url must be the form action attribute </li>\n * <li> all requests must be queued with a client side request queue to ensure the request ordering!</li>\n * </ul>\n *\n * @param el any dom element no matter being it html or jsf, from which the event is emitted\n * @param event any javascript event supported by that object\n * @param opts map of options being pushed into the ajax cycle\n *\n * a) transformArguments out of the function\n * b) passThrough handling with a map copy with a filter map block map\n */\n export function request(el: ElemDef, event?: Event, opts ?: Options) {\n\n const {\n resolvedEvent,\n options,\n elem,\n elementId,\n requestCtx,\n internalCtx,\n windowId,\n isResetValues\n } = resolveDefaults(event, opts, el);\n\n Assertions.assertRequestIntegrity(options, elem);\n\n requestCtx.assignIf(!!windowId, P_WINDOW_ID).value = windowId;\n\n requestCtx.assign(CTX_PARAM_PASS_THR).value = filterPassthroughValues(options.value);\n\n requestCtx.assignIf(!!resolvedEvent, CTX_PARAM_PASS_THR, P_EVT).value = resolvedEvent?.type;\n\n /**\n * ajax pass through context with the source\n * onresolvedEvent and onerror\n */\n requestCtx.assign(SOURCE).value = elementId.value;\n\n /**\n * on resolvedEvent and onError...\n * those values will be traversed later on\n * also into the response context\n */\n requestCtx.assign(ON_EVENT).value = options.value?.onevent;\n requestCtx.assign(ON_ERROR).value = options.value?.onerror;\n\n /**\n * lets drag the myfaces config params also in\n */\n requestCtx.assign(MYFACES).value = options.value?.myfaces;\n /**\n * fetch the parent form\n *\n * note we also add an override possibility here\n * so that people can use dummy forms and work\n * with detached objects\n */\n let form: DQ = resolveForm(requestCtx, elem, resolvedEvent);\n\n /**\n * binding contract the javax.faces.source must be set\n */\n requestCtx.assign(CTX_PARAM_PASS_THR, P_PARTIAL_SOURCE).value = elementId.value;\n\n /**\n * javax.faces.partial.ajax must be set to true\n */\n requestCtx.assign(CTX_PARAM_PASS_THR, P_AJAX).value = true;\n\n /**\n * binding contract the javax.faces.source must be set\n */\n requestCtx.assign(CTX_PARAM_PASS_THR, P_PARTIAL_SOURCE).value = elementId.value;\n\n /**\n * if resetValues is set to true\n * then we have to set javax.faces.resetValues as well\n * as pass through parameter\n * the value has to be explicitly true, according to\n * the specs jsdoc\n */\n requestCtx.assignIf(isResetValues, CTX_PARAM_PASS_THR, P_RESET_VALUES).value = true;\n\n //additional meta information to speed things up, note internal non jsf\n //pass through options are stored under _mfInternal in the context\n internalCtx.assign(CTX_PARAM_SRC_FRM_ID).value = form.id.value;\n internalCtx.assign(CTX_PARAM_SRC_CTL_ID).value = elementId.value;\n internalCtx.assign(CTX_PARAM_TR_TYPE).value = REQ_TYPE_POST;\n\n //mojarra compatibility, mojarra is sending the form id as well\n //this is not documented behavior but can be determined by running\n //mojarra under blackbox conditions\n //i assume it does the same as our formId_submit=1 so leaving it out\n //wont hurt but for the sake of compatibility we are going to add it\n\n requestCtx.assign(CTX_PARAM_PASS_THR, form.id.value).value = form.id.value;\n\n assignClientWindowId(form, requestCtx);\n\n assignExecute(options, requestCtx, form, elementId.value);\n assignRender(options, requestCtx, form, elementId.value);\n\n let delay: number = resolveDelay(options);\n let timeout: number = resolveTimeout(options);\n\n //now we enqueue the request as asynchronous runnable into our request\n //queue and let the queue take over the rest\n queueHandler.addRequestToQueue(elem, form, requestCtx, internalCtx, delay, timeout);\n }\n\n /**\n * Spec. 13.3.3\n * Examining the response markup and updating the DOM tree\n * @param {XMLHttpRequest} request - the ajax request\n * @param {Object} context - the ajax context\n */\n export function response(request: XMLHttpRequest, context: Context) {\n Response.processResponse(request, context);\n }\n\n /**\n * adds an error handler to the error queue\n *\n * @param errorListener the error listener handler\n */\n export function addOnError(errorListener: IListener<ErrorData>) {\n /*error handling already done in the assert of the queue*/\n errorQueue.push(errorListener);\n }\n\n /**\n * adds an event handler to the event queue\n *\n * @param eventListener the event listener handler\n */\n export function addOnEvent(eventListener: IListener<EventData>) {\n /*error handling already done in the assert of the queue*/\n eventQueue.push(eventListener);\n }\n\n // noinspection JSUnusedLocalSymbols\n /**\n * sends an event to the event handlers\n *\n * @param data the event data object hosting the event data according to the spec @see EventData for what is reachable\n * @param localHandler an optional event handler, which is processed before the event handler chain\n */\n export function sendEvent(data: EventData, localHandler = function (data: EventData) {\n }) {\n /*now we serve the queue as well*/\n localHandler(data);\n eventQueue.forEach(fn => fn(data));\n }\n\n /**\n * error handler behavior called internally\n * and only into the impl it takes care of the\n * internal message transformation to a myfaces internal error\n * and then uses the standard send error mechanisms\n * also a double error logging prevention is done as well\n *\n * @param request the request currently being processed\n * @param context the context affected by this error\n * @param exception the exception being thrown\n * @param clearRequestQueue if set to true, clears the request queue of all pending requests\n */\n export function stdErrorHandler(request: XMLHttpRequest,\n context: Config,\n exception: any,\n clearRequestQueue = false) {\n //newer browsers do not allow to hold additional values on native objects like exceptions\n //we hence capsule it into the request, which is gced automatically\n //on ie as well, since the stdErrorHandler usually is called between requests\n //this is a valid approach\n try {\n if (threshold == \"ERROR\") {\n let errorData = ErrorData.fromClient(exception);\n sendError(errorData);\n }\n } finally {\n if (clearRequestQueue) {\n requestQueue.cleanup();\n }\n }\n }\n\n // noinspection JSUnusedLocalSymbols\n /**\n * implementation triggering the error chain\n *\n *\n *\n * handles the errors, in case of an onError exists within the context the onError is called as local error handler\n * the registered error handlers in the queue received an error message to be dealt with\n * and if the projectStage is at development an alert box is displayed\n *\n * note: we have additional functionality here, via the global config myfaces.config.defaultErrorOutput a function can be provided\n * which changes the default output behavior from alert to something else\n *\n * @param errorData the error data to be displayed\n * @param localHandler an optional local error handler which has to be processed before the error handler queue\n */\n export function sendError(errorData: ErrorData, localHandler = function (data: any) {\n }) {\n\n localHandler(errorData);\n errorQueue.forEach((errorCallback: Function) => {\n errorCallback(errorData);\n });\n let displayError: (string) => void = getGlobalConfig(\"defaultErrorOutput\", (console ? console.error : alert));\n displayError(errorData);\n }\n\n /**\n * @node optional element or id defining a rootnode where an element with the id \"javax.faces.windowId\" is hosted\n * @return the client window id of the current window, if one is given if none is found, null is returned\n */\n export function getClientWindow(node ?: Element | string): string | null {\n const ALTERED = \"___mf_id_altered__\";\n const INIT = \"___init____\";\n\n /**\n * the search root for the dom element search\n */\n let searchRoot = new DQ(node || document.body).querySelectorAll(`form input [name='${P_CLIENT_WINDOW}']`);\n\n /**\n * lazy helper to fetch the window id from the window url\n */\n let fetchWindowIdFromUrl = () => ExtDomquery.searchJsfJsFor(/jfwid=([^&;]*)/).orElse(null).value;\n\n /**\n * functional double check based on stream reduction\n * the values should be identical or on INIT value which is a premise to\n * skip the first check\n *\n * @param value1\n * @param value2\n */\n let differenceCheck = (value1: string, value2: string) => {\n if(value1 == INIT) {\n return value2;\n } else if (value1 == ALTERED || value1 != value2) {\n return ALTERED;\n }\n return value2;\n };\n\n /**\n * helper for cleaner code, maps the value from an item\n *\n * @param item\n */\n let getValue = (item: DQ) => item.attr(\"value\").value;\n /**\n * fetch the window id from the forms\n * window ids must be present in all forms\n * or non existent. If they exist all of them must be the same\n */\n\n let formWindowId: Optional<string> = searchRoot.stream.map<string>(getValue).reduce(differenceCheck, INIT);\n\n\n //if the resulting window id is set on altered then we have an unresolvable problem\n assert(ALTERED != formWindowId.value, \"Multiple different windowIds found in document\");\n\n /**\n * return the window id or null\n * prio, forms under node/document and if not given then from the url\n */\n return formWindowId.value != INIT ? formWindowId.value : fetchWindowIdFromUrl();\n }\n\n /**\n * collect and encode data for a given form element (must be of type form)\n * find the javax.faces.ViewState element and encode its value as well!\n * @return a concatenated string of the encoded values!\n *\n * @throws Error in case of the given element not being of type form!\n * https://issues.apache.org/jira/browse/MYFACES-2110\n */\n export function getViewState(form: Element | string): string {\n /**\n * typecheck assert!, we opt for strong typing here\n * because it makes it easier to detect bugs\n */\n\n let element: DQ = DQ.byId(form, true);\n if (!element.isTag(TAG_FORM)) {\n throw new Error(getMessage(\"ERR_VIEWSTATE\"));\n }\n\n let formData = new XhrFormData(element);\n return formData.toString();\n }\n\n /**\n * this at the first sight looks like a weird construct, but we need to do it this way\n * for testing, we cannot proxy addRequestToQueue from the testing frameworks directly\n * but we need to keep it under unit tests.\n */\n export let queueHandler = {\n /**\n * public to make it shimmable for tests\n *\n * adds a new request to our queue for further processing\n */\n addRequestToQueue: function (elem: DQ, form: DQ, reqCtx: Config, respPassThr: Config, delay = 0, timeout = 0) {\n requestQueue = requestQueue ?? new AsynchronousQueue<XhrRequest>();\n requestQueue.enqueue(new XhrRequest(elem, form, reqCtx, respPassThr, [], timeout), delay);\n }\n };\n\n //----------------------------------------------- Methods ---------------------------------------------------------------------\n\n /**\n * the idea is to replace some placeholder parameters with their respective values\n * placeholder params like @all, @none, @form, @this need to be replaced by\n * the values defined by the specification\n *\n * This function does it for the render parameters\n *\n * @param requestOptions the source options coming in as options object from jsf.ajax.request (options parameter)\n * @param targetContext the receiving target context\n * @param issuingForm the issuing form\n * @param sourceElementId the executing element triggering the jsf.ajax.request (id of it)\n */\n function assignRender(requestOptions: Config, targetContext: Config, issuingForm: DQ, sourceElementId: string) {\n if (requestOptions.getIf(RENDER).isPresent()) {\n remapDefaultConstants(targetContext.getIf(CTX_PARAM_PASS_THR).get({}), P_RENDER, <string>requestOptions.getIf(RENDER).value, issuingForm, <any>sourceElementId);\n }\n }\n\n /**\n * the idea is to replace some placeholder parameters with their respective values\n * placeholder params like @all, @none, @form, @this need to be replaced by\n * the values defined by the specification\n *\n * This function does it for the execute parameters\n *\n * @param requestOptions the source options coming in as options object from jsf.ajax.request (options parameter)\n * @param targetContext the receiving target context\n * @param issuingForm the issuing form\n * @param sourceElementId the executing element triggering the jsf.ajax.request (id of it)\n */\n function assignExecute(requestOptions: Config, targetContext: Config, issuingForm: DQ, sourceElementId: string) {\n\n if (requestOptions.getIf(CTX_PARAM_EXECUTE).isPresent()) {\n /*the options must be a blank delimited list of strings*/\n /*compliance with Mojarra which automatically adds @this to an execute\n * the spec rev 2.0a however states, if none is issued nothing at all should be sent down\n */\n requestOptions.assign(CTX_PARAM_EXECUTE).value = [requestOptions.getIf(CTX_PARAM_EXECUTE).value, IDENT_THIS].join(\" \");\n remapDefaultConstants(targetContext.getIf(CTX_PARAM_PASS_THR).get({}), P_EXECUTE, <string>requestOptions.getIf(CTX_PARAM_EXECUTE).value, issuingForm, <any>sourceElementId);\n } else {\n targetContext.assign(CTX_PARAM_PASS_THR, P_EXECUTE).value = sourceElementId;\n }\n }\n\n /**\n * apply the browser tab where the request was originating from\n *\n * @param form the form hosting the client window id\n * @param targetContext the target context receiving the value\n */\n function assignClientWindowId(form: DQ, targetContext: Config) {\n let clientWindow = jsf.getClientWindow(form.getAsElem(0).value);\n if (clientWindow) {\n targetContext.assign(CTX_PARAM_PASS_THR, P_CLIENT_WINDOW).value = clientWindow;\n }\n }\n\n /**\n * transforms the user values to the expected one\n * with the proper none all form and this handling\n * (note we also could use a simple string replace but then\n * we would have had double entries under some circumstances)\n *\n * there are several standardized constants which need a special treatment\n * like @all, @none, @form, @this\n *\n * @param targetConfig the target configuration receiving the final values\n * @param targetKey the target key\n * @param userValues the passed user values (aka input string which needs to be transformed)\n * @param issuingForm the form where the issuing element originates\n * @param issuingElementId the issuing element\n */\n function remapDefaultConstants(targetConfig: Config, targetKey: string, userValues: string, issuingForm: DQ, issuingElementId: string): Config {\n //a cleaner implementation of the transform list method\n\n let iterValues = (userValues) ? trim(userValues).split(/\\s+/gi) : [];\n let ret = [];\n let processed = {};\n\n //the idea is simply to loop over all values and then replace\n //their generic values and filter out doubles\n //this is more readable than the old indexed based solution\n //and not really slower because we had to build up the index in our old solution\n //anyway\n for (let cnt = 0; cnt < iterValues.length; cnt++) {\n //avoid doubles\n if (iterValues[cnt] in processed) {\n continue;\n }\n switch (iterValues[cnt]) {\n //@none no values should be sent\n case IDENT_NONE:\n return targetConfig.delete(targetKey);\n //@all is a pass through case according to the spec\n case IDENT_ALL:\n targetConfig.assign(targetKey).value = IDENT_ALL;\n return targetConfig;\n //@form pushes the issuing form id into our list\n case IDENT_FORM:\n ret.push(issuingForm.id.value);\n processed[issuingForm.id.value] = true;\n break;\n //@this is replaced with the current issuing element id\n case IDENT_THIS:\n if (!(issuingElementId in processed)) {\n ret.push(issuingElementId);\n processed[issuingElementId] = true;\n }\n break;\n default:\n ret.push(iterValues[cnt]);\n processed[iterValues[cnt]] = true;\n }\n }\n //We now add the target as joined list\n targetConfig.assign(targetKey).value = ret.join(\" \");\n return targetConfig;\n }\n\n /**\n * filter the options given with a blacklist so that only\n * the values required for passthough land in the ajax request\n *\n * @param {Context} mappedOpts the options to be filtered\n */\n function filterPassthroughValues(mappedOpts: Context): Context {\n //we now can use the full code reduction given by our stream api\n //to filter\n return Stream.ofAssoc(mappedOpts)\n .filter(item => !(item[0] in BlockFilter))\n .collect(new AssocArrayCollector());\n }\n\n function resolveGlobalConfig(): any {\n return window?.[MYFACES]?.config ?? {};\n }\n\n}\n","/**\n * Typescript port of the jsf.push part in the myfaces implementation\n */\n\n//TODO still work in progress\n//this is a 1:1 port for the time being\nimport {jsf} from \"../api/Jsf\";\nimport {MAX_RECONNECT_ATTEMPTS, REASON_EXPIRED, RECONNECT_INTERVAL} from \"./core/Const\";\n\n\n/**\n * Implementation class for the push functionality\n */\nexport module PushImpl {\n\n\n\n const URL_PROTOCOL = window.location.protocol.replace(\"http\", \"ws\") + \"//\";\n\n\n //we expose the member variables for testing purposes\n //they are not directly touched outside of tests\n\n /* socket map by token */\n export let sockets = {};\n /* component attributes by clientId */\n export let components = {};\n /* client ids by token (share websocket connection) */\n export let clientIdsByTokens = {};\n\n\n //needed for testing\n export function reset() {\n sockets = {};\n components = {}\n clientIdsByTokens = {}\n }\n\n /*\n * Api implementations, exposed functions\n */\n\n /**\n *\n * @param {function} onopen The function to be invoked when the web socket is opened.\n * @param {function} onmessage The function to be invoked when a message is received.\n * @param {function} onclose The function to be invoked when the web socket is closed.\n * @param {boolean} autoconnect Whether or not to immediately open the socket. Defaults to <code>false</code>.\n */\n export function init(socketClientId: string,\n uri: string,\n channel: string,\n onopen: Function,\n onmessage: Function,\n onclose: Function,\n behaviorScripts: any,\n autoconnect: boolean) {\n onclose = resolveFunction(onclose);\n\n if (!window.WebSocket) { // IE6-9.\n onclose(-1, channel);\n return;\n }\n\n let channelToken = uri.substr(uri.indexOf('?') + 1);\n\n if (!components[socketClientId]) {\n components[socketClientId] = {\n 'channelToken': channelToken,\n 'onopen': resolveFunction(onopen),\n 'onmessage' : resolveFunction(onmessage),\n 'onclose': onclose,\n 'behaviors': behaviorScripts,\n 'autoconnect': autoconnect};\n if (!clientIdsByTokens[channelToken]) {\n clientIdsByTokens[channelToken] = [];\n }\n clientIdsByTokens[channelToken].push(socketClientId);\n if (!sockets[channelToken]){\n sockets[channelToken] = new Socket(channelToken,\n getBaseURL(uri), channel);\n }\n }\n\n if (autoconnect) {\n jsf.push.open(socketClientId);\n }\n }\n\n export function open(socketClientId: string) {\n getSocket(components?.[socketClientId]?.channelToken).open();\n }\n\n export function close(socketClientId: string) {\n getSocket(components?.[socketClientId].channelToken).close();\n }\n\n // Private helper classes\n // Private classes functions ----------------------------------------------------------------------------------\n /**\n * Creates a reconnecting web socket. When the web socket successfully connects on first attempt, then it will\n * automatically reconnect on timeout with cumulative intervals of 500ms with a maximum of 25 attempts (~3 minutes).\n * The <code>onclose</code> function will be called with the error code of the last attempt.\n * @constructor\n * @param {string} channelToken the channel token associated with this websocket connection\n * @param {string} url The URL of the web socket\n * @param {string} channel The name of the web socket channel.\n */\n\n class Socket {\n\n socket: WebSocket;\n reconnectAttempts = 0;\n\n constructor(private channelToken: string, private url: string, private channel: string) {\n }\n\n open() {\n if (this.socket && this.socket.readyState == 1) {\n return;\n }\n this.socket = new WebSocket(this.url);\n\n this.bindCallbacks();\n }\n\n onopen(event: any) {\n if (!this.reconnectAttempts) {\n let clientIds = clientIdsByTokens[this.channelToken];\n for (let i = clientIds.length - 1; i >= 0; i--) {\n let socketClientId = clientIds[i];\n components[socketClientId]['onopen'](this.channel);\n }\n }\n this.reconnectAttempts = 0;\n }\n\n onmmessage(event: any) {\n let message = JSON.parse(event.data);\n for (let i = clientIdsByTokens[this.channelToken].length - 1; i >= 0; i--) {\n let socketClientId = clientIdsByTokens[this.channelToken][i];\n if (document.getElementById(socketClientId)) {\n try {\n components[socketClientId]['onmessage'](message, this.channel, event);\n } catch (e) {\n //Ignore\n }\n let behaviors = components[socketClientId]['behaviors'];\n let functions = behaviors[message];\n if (functions && functions.length) {\n for (let j = 0; j < functions.length; j++) {\n try {\n functions[j](null);\n } catch (e) {\n //Ignore\n }\n }\n }\n } else {\n clientIdsByTokens[this.channelToken].splice(i, 1);\n }\n }\n if (clientIdsByTokens[this.channelToken].length == 0) {\n //tag dissapeared\n this.close();\n }\n }\n\n onclose(event: any) {\n if (!this.socket\n || (event.code == 1000 && event.reason == REASON_EXPIRED)\n || (event.code == 1008)\n || (!this.reconnectAttempts)\n || (this.reconnectAttempts >= MAX_RECONNECT_ATTEMPTS)) {\n let clientIds = clientIdsByTokens[this.channelToken];\n for (let i = clientIds.length - 1; i >= 0; i--) {\n let socketClientId = clientIds[i];\n components[socketClientId]['onclose'](event?.code, this?.channel, event);\n }\n } else {\n setTimeout(this.open, RECONNECT_INTERVAL * this.reconnectAttempts++);\n }\n };\n\n close() {\n if (this.socket) {\n let s = this.socket;\n this.socket = null;\n s.close();\n }\n }\n\n /**\n * bind the callbacks to the socket callbacks\n */\n private bindCallbacks() {\n this.socket.onopen = (event: Event) => this.onopen(event);\n this.socket.onmessage = (event: Event) => this.onmmessage(event);\n this.socket.onclose = (event: Event) => this.onclose(event);\n }\n }\n\n // Private static functions ---------------------------------------------------------------------------------------\n\n function getBaseURL(url: string) {\n if (url.indexOf(\"://\") < 0) {\n let base = window.location.hostname + \":\" + window.location.port;\n return URL_PROTOCOL + base + url;\n } else {\n return url;\n }\n }\n\n /**\n * Get socket associated with given channelToken.\n * @param {string} channelToken The name of the web socket channelToken.\n * @return {Socket} Socket associated with given channelToken.\n * @throws {Error} When channelToken is unknown, you may need to initialize\n * it first via <code>init()</code> function.\n */\n function getSocket(channelToken: string): Socket {\n let socket = sockets[channelToken];\n if (socket) {\n return socket;\n } else {\n throw new Error(\"Unknown channelToken: \" + channelToken);\n }\n }\n\n function resolveFunction(fn: Function | string = () => {\n }): Function {\n return <Function>((typeof fn !== \"function\") && (fn = window[fn]), fn);\n }\n\n}","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * [export const] constants\n */\n\nexport const P_PARTIAL_SOURCE = \"javax.faces.source\";\nexport const PARTIAL_ID = \"partialId\";\nexport const P_VIEWSTATE = \"javax.faces.ViewState\";\nexport const P_VIEWROOT = \"javax.faces.ViewRoot\";\nexport const P_VIEWHEAD = \"javax.faces.ViewHead\";\nexport const P_VIEWBODY = \"javax.faces.ViewBody\";\n\n/*some useful definitions*/\n\nexport const EMPTY_FUNC = Object.freeze(() => {\n});\nexport const EMPTY_STR = \"\";\nexport const EMPTY_MAP = Object.freeze({});\n\nexport const HTML_VIEWSTATE = [\"<input type='hidden'\", \"id='\", P_VIEWSTATE, \"' name='\", P_VIEWSTATE, \"' value='' />\"].join(EMPTY_STR);\n\n\n/*internal identifiers for options*/\nexport const IDENT_ALL = \"@all\";\nexport const IDENT_NONE = \"@none\";\nexport const IDENT_THIS = \"@this\";\nexport const IDENT_FORM = \"@form\";\n\n\nexport const P_AJAX = \"javax.faces.partial.ajax\";\nexport const P_EXECUTE = \"javax.faces.partial.execute\";\nexport const P_RENDER = \"javax.faces.partial.render\";\nexport const P_EVT = \"javax.faces.partial.event\";\nexport const P_CLIENT_WINDOW = \"javax.faces.ClientWindow\";\nexport const P_RESET_VALUES = \"javax.faces.partial.resetValues\";\n\nexport const P_WINDOW_ID = \"javax.faces.windowId\";\n\nexport const RENDER = \"render\";\nexport const WINDOW_ID = \"windowId\";\n\n/* message types */\nexport const ERROR = \"error\";\nexport const EVENT = \"event\";\n\nexport const ON_ERROR = \"onerror\";\nexport const ON_EVENT = \"onevent\";\n\n/* event emitting stages */\nexport const BEGIN = \"begin\";\nexport const COMPLETE = \"complete\";\nexport const SUCCESS = \"success\";\n\nexport const SOURCE = \"source\";\nexport const STATUS = \"status\";\n\n\nexport const ERROR_NAME = \"error-name\";\nexport const ERROR_MESSAGE = \"error-message\";\n\n\nexport const RESPONSE_TEXT = \"responseText\";\nexport const RESPONSE_XML = \"responseXML\";\n\n/*ajax errors spec 14.4.2*/\nexport const HTTPERROR = \"httpError\";\nexport const EMPTY_RESPONSE = \"emptyResponse\";\nexport const MALFORMEDXML = \"malformedXML\";\nexport const SERVER_ERROR = \"serverError\";\nexport const CLIENT_ERROR = \"clientError\";\nexport const TIMEOUT_EVENT = \"timeout\";\n\nexport const CTX_PARAM_MF_INTERNAL = \"_mfInternal\";\n\nexport const CTX_PARAM_SRC_FRM_ID = \"_mfSourceFormId\";\nexport const CTX_PARAM_SRC_CTL_ID = \"_mfSourceControlId\";\nexport const CTX_PARAM_TR_TYPE = \"_mfTransportType\";\nexport const CTX_PARAM_PASS_THR = \"passThrgh\";\nexport const CTX_PARAM_DELAY = \"delay\";\nexport const CTX_PARAM_TIMEOUT = \"timeout\";\nexport const CTX_PARAM_RST = \"resetValues\";\nexport const CTX_PARAM_EXECUTE = \"execute\";\n\nexport const STAGE_DEVELOPMENT = \"Development\";\n\n\nexport const CONTENT_TYPE = \"Content-Type\";\nexport const HEAD_FACES_REQ = \"Faces-Request\";\nexport const REQ_ACCEPT = \"Accept\";\nexport const VAL_AJAX = \"partial/ajax\";\nexport const ENCODED_URL = \"javax.faces.encodedURL\";\nexport const REQ_TYPE_GET = \"GET\";\nexport const REQ_TYPE_POST = \"POST\";\nexport const STATE_EVT_BEGIN = \"begin\"; //TODO remove this\nexport const STATE_EVT_TIMEOUT = \"TIMEOUT_EVENT\";\nexport const STATE_EVT_COMPLETE = \"complete\"; //TODO remove this\nexport const URL_ENCODED = \"application/x-www-form-urlencoded\";\nexport const MULTIPART = \"multipart/form-data\";\nexport const NO_TIMEOUT = 0;\nexport const STD_ACCEPT = \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\";\n\nexport const TAG_HEAD = \"head\";\nexport const TAG_FORM = \"form\";\nexport const TAG_BODY = \"body\";\nexport const TAG_BEFORE = \"before\";\nexport const TAG_AFTER = \"after\";\n\nexport const TAG_ATTR = \"attribute\";\n\n\nexport const SEL_VIEWSTATE_ELEM = \"[name='\" + P_VIEWSTATE + \"']\";\nexport const SEL_CLIENT_WINDOW_ELEM = \"[name='\" + P_CLIENT_WINDOW + \"']\";\nexport const SEL_RESPONSE_XML = \"responseXML\";\n\nexport const PHASE_PROCESS_RESPONSE = \"processResponse\";\n\n\nexport const ERR_NO_PARTIAL_RESPONSE = \"Partial response not set\";\n\nexport const ATTR_URL = \"url\";\nexport const ATTR_NAME = \"name\";\nexport const ATTR_VALUE = \"value\";\nexport const ATTR_ID = \"id\";\n\n/*partial response types*/\nexport const RESP_PARTIAL = \"partial-response\";\n\n/*partial commands*/\nexport const CMD_CHANGES = \"changes\";\nexport const CMD_UPDATE = \"update\";\nexport const CMD_DELETE = \"delete\";\nexport const CMD_INSERT = \"insert\";\nexport const CMD_EVAL = \"eval\";\nexport const CMD_ERROR = \"error\";\nexport const CMD_ATTRIBUTES = \"attributes\";\nexport const CMD_EXTENSION = \"extension\";\nexport const CMD_REDIRECT = \"redirect\";\n\n/*other constants*/\n\nexport const UPDATE_FORMS = \"_updateForms\";\nexport const UPDATE_ELEMS = \"_updateElems\";\n\nexport const MYFACES = \"myfaces\";\n\nexport const SEL_SCRIPTS_STYLES = \"script, style, link\";\n\nexport const MF_NONE = \"__mf_none__\";\n\nexport const REASON_EXPIRED = \"Expired\";\n\nexport const APPLIED_VST = \"appliedViewState\";\nexport const APPLIED_CLIENT_WINDOW = \"appliedClientWindow\";\n\nexport const RECONNECT_INTERVAL = 500;\nexport const MAX_RECONNECT_ATTEMPTS = 25;\n\nexport const UNKNOWN = \"UNKNOWN\";\n","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {EMPTY_STR, P_VIEWSTATE} from \"./Const\";\n\nexport interface IdValueHolder {\n\n readonly id: string;\n readonly value: string;\n\n}\n\n/**\n * a helper class to isolate the\n * view state and client window and other\n * future states which follow a similar pattern\n */\nexport class StateHolder implements IdValueHolder {\n\n nameSpace: string;\n\n constructor(public id: string, public value: string) {\n let viewStatePos = id.indexOf(P_VIEWSTATE);\n this.nameSpace = viewStatePos > 0 ? id.substr(0, viewStatePos - 1) : EMPTY_STR;\n }\n\n get hasNameSpace(): boolean {\n return !!(this?.nameSpace ?? EMPTY_STR).length;\n }\n}\n","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class Messages {\n MSG_TEST = \"Testmessage\";\n\n /*Messages*/\n /** @constant */\n MSG_DEV_MODE = \"Note, this message is only sent, because project stage is development and no \" +\n \"other error listeners are registered.\";\n /** @constant */\n MSG_AFFECTED_CLASS = \"Affected Class=\";\n /** @constant */\n MSG_AFFECTED_METHOD = \"Affected Method=\";\n /** @constant */\n MSG_ERROR_NAME = \"Error Name=\";\n /** @constant */\n MSG_ERROR_MESSAGE = \"Error Message=\";\n /** @constant */\n MSG_SERVER_ERROR_NAME = \"Server Error Name=\";\n\n /** @constant */\n MSG_ERROR_DESC = \"Error Description=\";\n /** @constant */\n MSG_ERROR_NO = \"Error Number=\";\n /** @constant */\n MSG_ERROR_LINENO = \"Error Line Number=\";\n\n /*Errors and messages*/\n /** @constant */\n ERR_FORM = \"Sourceform could not be determined, either because element is not attached to a form or we have multiple forms with named elements of the same identifier or name, stopping the ajax processing\";\n /** @constant */\n ERR_VIEWSTATE = \"jsf.viewState= param value not of type form!\";\n /** @constant */\n ERR_TRANSPORT = \"Transport type {0} does not exist\";\n /** @constant */\n ERR_EVT_PASS = \"an event must be passed down (either a an event object null or undefined) \";\n /** @constant */\n ERR_CONSTRUCT = \"Parts of the response couldn't be retrieved when constructing the event data= {0} \";\n /** @constant */\n ERR_MALFORMEDXML = \"The server response could not be parsed, the server has returned with a response which is not xml !\";\n /** @constant */\n ERR_SOURCE_FUNC = \"source cannot be a function (probably source and event were not defined or set to null\";\n /** @constant */\n ERR_EV_OR_UNKNOWN = \"An event object or unknown must be passed as second parameter\";\n /** @constant */\n ERR_SOURCE_NOSTR = \"source cannot be a string\";\n /** @constant */\n ERR_SOURCE_DEF_NULL = \"source must be defined or null\";\n\n //_Lang.js\n /** @constant */\n ERR_MUST_STRING = \"{0}: {1} namespace must be of type String\";\n /** @constant */\n ERR_REF_OR_ID = \"{0}: {1} a reference node or identifier must be provided\";\n /** @constant */\n ERR_PARAM_GENERIC = \"{0}: parameter {1} must be of type {2}\";\n /** @constant */\n ERR_PARAM_STR = \"{0}: {1} param must be of type string\";\n /** @constant */\n ERR_PARAM_STR_RE = \"{0}: {1} param must be of type string or a regular expression\";\n /** @constant */\n ERR_PARAM_MIXMAPS = \"{0}: both a source as well as a destination map must be provided\";\n /** @constant */\n ERR_MUST_BE_PROVIDED = \"{0}: an {1} and a {2} must be provided\";\n /** @constant */\n ERR_MUST_BE_PROVIDED1 = \"{0}: {1} must be set\";\n\n /** @constant */\n ERR_REPLACE_EL = \"replaceElements called while evalNodes is not an array\";\n\n /** @constant */\n ERR_EMPTY_RESPONSE = \"{0}: The response cannot be null or empty!\";\n /** @constant */\n ERR_ITEM_ID_NOTFOUND = \"{0}: item with identifier {1} could not be found\";\n /** @constant */\n ERR_PPR_IDREQ = \"{0}: Error in PPR Insert, id must be present\";\n /** @constant */\n ERR_PPR_INSERTBEFID = \"{0}: Error in PPR Insert, before id or after id must be present\";\n /** @constant */\n ERR_PPR_INSERTBEFID_1 = \"{0}: Error in PPR Insert, before node of id {1} does not exist in document\";\n /** @constant */\n ERR_PPR_INSERTBEFID_2 = \"{0}: Error in PPR Insert, after node of id {1} does not exist in document\";\n\n /** @constant */\n ERR_PPR_DELID = \"{0}: Error in delete, id not in xml markup\";\n /** @constant */\n ERR_PPR_UNKNOWNCID = \"{0}: Unknown Html-Component-ID= {1}\";\n\n /** @constant */\n ERR_NO_VIEWROOTATTR = \"{0}: Changing of ViewRoot attributes is not supported\";\n /** @constant */\n ERR_NO_HEADATTR = \"{0}: Changing of Head attributes is not supported\";\n /** @constant */\n ERR_RED_URL = \"{0}: Redirect without url\";\n\n /** @constant */\n ERR_REQ_FAILED_UNKNOWN = \"Request failed with unknown status\";\n\n /** @constant */\n ERR_REQU_FAILED = \"Request failed with status {0} and reason {1}\";\n\n /** @constant */\n UNKNOWN = \"UNKNOWN\";\n}","import {Config, Lang, XMLQuery} from \"mona-dish\";\n\nimport {DQ} from \"mona-dish\";\nimport {ExtLang} from \"./Lang\";\nimport getMessage = ExtLang.getMessage;\nimport makeException = ExtLang.makeException;\nimport {\n ATTR_URL,\n EMPTY_RESPONSE,\n EMPTY_STR, ERR_NO_PARTIAL_RESPONSE, MALFORMEDXML,\n ON_ERROR,\n ON_EVENT,\n PHASE_PROCESS_RESPONSE,\n RESP_PARTIAL\n} from \"../core/Const\";\n\n/**\n * a set of internal code assertions\n * which raise an error\n *\n */\nexport module Assertions {\n\n export function assertRequestIntegrity(options: Config, elem: DQ): void | never {\n /*assert if the onerror is set and once if it is set it must be of type function*/\n assertFunction(options.getIf(ON_ERROR).value);\n /*assert if the onevent is set and once if it is set it must be of type function*/\n assertFunction(options.getIf(ON_EVENT).value);\n //improve the error messages if an empty elem is passed\n //Assertions.assertElementExists(elem);\n assert(elem.isPresent(), getMessage(\"ERR_MUST_BE_PROVIDED1\", \"{0}: source must be provided or exist\", \"source element id\"), \"jsf.ajax.request\", \"ArgNotSet\", )\n }\n\n export function assertUrlExists(node: XMLQuery): void | never {\n if (node.attr(ATTR_URL).isAbsent()) {\n throw Assertions.raiseError(new Error(), getMessage(\"ERR_RED_URL\", null, \"_Ajaxthis.processRedirect\"), \"processRedirect\");\n }\n }\n\n /**\n * checks the xml for various issues which can occur\n * and prevent a proper processing\n */\n export function assertValidXMLResponse(responseXML: XMLQuery) : void | never {\n assert(!responseXML.isAbsent(), EMPTY_RESPONSE, PHASE_PROCESS_RESPONSE);\n assert(!responseXML.isXMLParserError(), responseXML.parserErrorText(EMPTY_STR), PHASE_PROCESS_RESPONSE);\n assert(responseXML.querySelectorAll(RESP_PARTIAL).isPresent(), ERR_NO_PARTIAL_RESPONSE, PHASE_PROCESS_RESPONSE);\n }\n\n /**\n * internal helper which raises an error in the\n * format we need for further processing\n *\n * @param error\n * @param message the message\n * @param caller\n * @param title the title of the error (optional)\n * @param name the name of the error (optional)\n */\n export function raiseError(error: any, message: string, caller ?: string, title ?: string, name ?: string): Error {\n\n let finalTitle = title ?? MALFORMEDXML;\n let finalName = name ?? MALFORMEDXML;\n let finalMessage = message ?? EMPTY_STR;\n\n //TODO clean up the messy makeException, this is a perfect case for encapsulation and sane defaults\n return makeException(error, finalTitle, finalName, \"Response\", caller || (((<any>arguments).caller) ? (<any>arguments).caller.toString() : \"_raiseError\"), finalMessage);\n }\n\n /*\n * using the new typescript 3.7 compiler assertion functionality to improve compiler hinting\n * we are not fully there yet, but soon\n */\n\n export function assert(value: any, msg = EMPTY_STR, caller=EMPTY_STR, title=\"Assertion Error\"): asserts value {\n if(!value) {\n throw Assertions.raiseError(new Error(), msg ,caller, title);\n }\n }\n\n\n export function assertType(value: any, theType: any, msg = EMPTY_STR, caller=EMPTY_STR, title=\"Type Assertion Error\"): asserts value {\n if((!!value) && !Lang.assertType(value,theType)) {\n throw Assertions.raiseError(new Error(), msg ,caller, title);\n }\n }\n\n export function assertFunction(value: any, msg = EMPTY_STR, caller=EMPTY_STR, title=\"Assertion Error\"): asserts value is Function {\n assertType(value, \"function\", msg, caller, title);\n }\n}\n\n\n","import {AsyncRunnable} from \"./AsyncRunnable\";\n\n/**\n * Asynchronous queue which starts to work\n * through the callbacks until the queue is empty\n *\n * Every callback must be of async runnable\n * which is sort of an extended promise which has\n * added a decicated cancel and start point\n *\n * This interface can be used as wrapper contract\n * for normal promises if needed.\n */\nexport class AsynchronousQueue<T extends AsyncRunnable<any>> {\n\n private runnableQueue = [];\n private delayTimeout: null | ReturnType<typeof setTimeout>;\n\n currentlyRunning: AsyncRunnable<any>;\n\n constructor() {\n }\n\n get isEmpty(): boolean {\n return !this.runnableQueue.length;\n }\n\n /**\n * enequeues an element and starts the\n * asynchronous work loop if not already running\n *\n * @param element the element to be queued and processed\n * @param delay possible delay after our usual process or drop if something newer is incoming algorithm\n */\n enqueue(element: T, delay = 0) {\n if (this.delayTimeout) {\n clearTimeout(this.delayTimeout);\n this.delayTimeout = null;\n }\n if (delay) {\n this.delayTimeout = setTimeout(() => {\n this.appendElement(element);\n });\n } else {\n this.appendElement(element);\n }\n }\n\n dequeue(): T {\n return this.runnableQueue.shift();\n }\n\n cleanup() {\n this.currentlyRunning = null;\n this.runnableQueue.length = 0;\n }\n\n private appendElement(element: T) {\n //only if the first element is added we start with a trigger\n //otherwise a process already is running and not finished yet at that\n //time\n this.runnableQueue.push(element);\n if (!this.currentlyRunning) {\n this.runEntry();\n }\n }\n\n private runEntry() {\n if (this.isEmpty) {\n this.currentlyRunning = null;\n return;\n }\n this.currentlyRunning = this.dequeue();\n this.currentlyRunning\n .catch((e) => {\n //in case of an error we always clean up the remaining calls\n //to allow a clean recovery of the application\n this.cleanup();\n throw e;\n })\n .then(\n //the idea is to trigger the next over an event to reduce\n //the number of recursive calls (stacks might be limited\n //compared to ram)\n //naturally give we have a DOM, the DOM is the natural event dispatch system\n //which we can use, to decouple the calls from a recursive stack call\n //(the browser engine will take care of that)\n () => this.callForNextElementToProcess()\n ).start();\n }\n\n cancel() {\n try {\n if (this.currentlyRunning) {\n this.currentlyRunning.cancel();\n }\n } finally {\n this.cleanup();\n }\n }\n\n private callForNextElementToProcess() {\n this.runEntry();\n }\n}","import {Config, IValueHolder, Optional, DomQuery, DQ} from \"mona-dish\";\nimport {EMPTY_STR, P_WINDOW_ID} from \"../core/Const\";\n\ndeclare let window: any;\n\n\n/**\n * detects whether a source is a jsf.js request\n *\n * @param source the source string for the jsf.js request\n * @return true if a jsf.js loading pattern is detected\n * @constructor\n */\nconst IS_JSF_SOURCE = (source?: string): boolean => {\n return source && !!(source?.search(/\\/javax\\.faces\\.resource.*\\/jsf\\.js.*/) != -1 ||\n source?.search(/\\/jsf\\-development\\.js.*/) != -1 ||\n source?.search(/\\/jsf\\-uncompressed\\.js.*/) != -1 ||\n source?.search(/\\/jsf[^\\.]\\.js.*ln\\=javax.faces.*/gi) != -1);\n}\n\n/**\n * namespace myfaces.testscripts can be used as extension point for internal\n * tests, those will be handled similarly to jsf.js regarding\n * reload blocking on ajax requests\n *\n * @param source the source to check\n * @constructor\n */\nconst IS_INTERNAL_SOURCE = (source: string): boolean => {\n return source.search(/\\/jsf[^\\.]\\.js.*ln\\=myfaces.testscripts.*/gi) != -1;\n}\n\n\n/**\n * Extension which adds implementation specific\n * meta data to our dom query\n *\n * Usage\n * el = new ExtDQ(oldReference)\n * nonce = el.nonce\n * windowId = el.getWindowId\n */\nexport class ExtDomquery extends DQ {\n\n static get windowId() {\n return new ExtDomquery(document.body).windowId;\n }\n\n static get nonce(): string {\n return new ExtDomquery(document.body).nonce;\n }\n\n get windowId(): string | null {\n\n const fetchWindowIdFromURL = function (): string | null {\n let href = window.location.href;\n let windowId = \"windowId\";\n let regex = new RegExp(\"[\\\\?&]\" + windowId + \"=([^&#\\\\;]*)\");\n let results = regex.exec(href);\n //initial trial over the url and a regexp\n if (results != null) return results[1];\n return null;\n };\n\n //byId ($)\n if (this.value.isPresent()) {\n let result = this.querySelectorAll(\"form input[name='\" + P_WINDOW_ID + \"']\");\n if (result.length > 0) {\n throw Error(\"Multiple different windowIds found in document\");\n }\n\n return (result.isPresent()) ? (<HTMLInputElement>result.getAsElem(0).value).value : fetchWindowIdFromURL();\n } else {\n return fetchWindowIdFromURL();\n }\n }\n\n /*\n * determines the jsf.js nonce and adds them to the namespace\n * this is done once and only lazily\n */\n get nonce(): string | null {\n //already processed\n let myfacesConfig = new Config(window.myfaces);\n let nonce: IValueHolder<string> = myfacesConfig.getIf(\"config\", \"cspMeta\", \"nonce\");\n if (nonce.value) {\n return <string>nonce.value;\n }\n\n let curScript = new DQ(document.currentScript);\n //since our baseline atm is ie11 we cannot use document.currentScript globally\n if (curScript.attr(\"nonce\").value != null) {\n // fastpath for modern browsers\n return curScript.attr(\"nonce\").value;\n }\n // fallback if the currentScript method fails, we just search the jsf tags for nonce, this is\n // the last possibility\n let nonceScript = DQ\n .querySelectorAll(\"script[src], link[src]\")\n .lazyStream\n .filter((item) => item.attr(\"nonce\").value != null && item.attr(\"src\") != null)\n .map(item => IS_JSF_SOURCE(item.attr('src').value))\n .first();\n\n if (nonceScript.isPresent()) {\n nonce.value = DomQuery.byId(nonceScript.value, true).attr(\"nonce\").value;\n }\n return <string>nonce.value;\n }\n\n static searchJsfJsFor(item: RegExp): Optional<String> {\n return new ExtDomquery(document).searchJsfJsFor(item);\n }\n\n /**\n * searches the embedded jsf.js for items like separator char etc..\n * expects a match as variable under position 1 in the result match\n * @param rexp\n */\n searchJsfJsFor(rexp: RegExp): Optional<string> {\n //perfect application for lazy stream\n return DQ.querySelectorAll(\"script[src], link[src]\").lazyStream\n .filter(item => IS_JSF_SOURCE(item.attr('src').value))\n .map(item => item.attr(\"src\").value.match(rexp))\n .filter(item => item != null && item.length > 1)\n .map((result: string[]) => {\n return decodeURIComponent(result[1]);\n }).first();\n }\n\n globalEval(code: string, nonce ?: string): DQ {\n return super.globalEval(code, nonce ?? this.nonce);\n }\n\n /**\n * decorated run scripts which takes our jsf extensions into consideration\n * (standard DomQuery will let you pass anything)\n * @param whilteListed\n */\n runScripts(whilteListed?: (src: string) => boolean): DomQuery {\n const whitelistFunc = (src: string): boolean => {\n return (whilteListed?.(src) ?? true) && !IS_JSF_SOURCE(src) && !IS_INTERNAL_SOURCE(src);\n };\n return super.runScripts(whitelistFunc);\n }\n\n /**\n * byId producer\n *\n * @param selector id\n * @return a DomQuery containing the found elements\n */\n static byId(selector: string | DomQuery | Element, deep = false): DomQuery {\n const ret = DomQuery.byId(selector, deep);\n //return new ExtDomquery(ret);\n return ret;\n }\n}\n\nexport const ExtDQ = DQ;","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * todo replace singleton with module definition\n *\n */\n\nimport {Lang as LangBase, Config, Optional, DomQuery, DQ, Stream} from \"mona-dish\";\nimport {Messages} from \"../i18n/Messages\";\nimport {EMPTY_STR, TAG_FORM} from \"../core/Const\";\nimport {getEventTarget} from \"../xhrCore/RequestDataResolver\";\n\nexport module ExtLang {\n\n let installedLocale: Messages;\n let nameSpace = \"impl/util/Lang/\";\n\n export function getLanguage(): string {\n //TODO global config override\n\n let language: string = (<any>navigator).languages?.[0] ?? navigator?.language;\n language = language.split(\"-\")[0];\n return language;\n }\n\n //should be in lang, but for now here to avoid recursive imports, not sure if typescript still has a problem with those\n /**\n * helper function to savely resolve anything\n * this is not an elvis operator, it resolves\n * a value without exception in a tree and if\n * it is not resolvable then an optional of\n * a default value is restored or Optional.empty\n * if none is given\n *\n * usage\n * <code>\n * let var: Optional<string> = saveResolve(() => a.b.c.d.e, \"foobaz\")\n * </code>\n *\n * @param resolverProducer a lambda which can produce the value\n * @param defaultValue an optional default value if the producer failes to produce anything\n * @returns an Optional of the produced value\n */\n export function failSaveResolve<T>(resolverProducer: () => T, defaultValue: T = null): Optional<T> {\n return LangBase.saveResolve(resolverProducer, defaultValue);\n }\n\n /**\n * under some conditions it makes sense to swallow errors and return a default value in the error case\n * classical example the optional resolution of values in a chain (thankfully now covered by Typescript itself)\n * another example which we have in our system is that some operations fail only under test due to test framework\n * limitations while they cannot fail in the real world.\n *\n * @param resolverProducer a producer function which produces a value in the non error case\n * @param defaultValue the default value in case of a fail of the function\n */\n export function failSaveExecute<T>(resolverProducer: () => any, defaultValue: T = null): void {\n LangBase.saveResolve(resolverProducer, defaultValue);\n }\n\n /**\n * returns a given localized message upon a given key\n * basic java log like templating functionality is included\n *\n * @param {String} key the key for the message\n * @param {String} defaultMessage optional default message if none was found\n *\n * Additionally you can pass additional arguments, which are used\n * in the same way java log templates use the params\n *\n * @param templateParams the param list to be filled in\n */\n export function getMessage(key: string, defaultMessage?: string, ...templateParams: Array<string>): string {\n installedLocale = installedLocale ?? new Messages();\n\n let msg = installedLocale[key] ?? defaultMessage ?? key;\n\n Stream.of(...templateParams).each((param, cnt) => {\n msg = msg.replace(new RegExp([\"\\\\{\", cnt, \"\\\\}\"].join(EMPTY_STR), \"g\"), param);\n });\n\n return msg;\n }\n\n /**\n * transforms a key value pair into a string\n * @param key the key\n * @param val the value\n * @param delimiter the delimiter\n */\n export function keyValToStr(key: string, val: string, delimiter: string = \"\\n\") {\n return [key, val].join(delimiter);\n }\n\n /**\n * creates an exeption with additional internal parameters\n * for extra information\n *\n * @param error\n * @param {String} title the exception title\n * @param {String} name the exception name\n * @param {String} callerCls the caller class\n * @param {String} callFunc the caller function\n * @param {String} message the message for the exception\n */\n export function makeException(error: Error, title: string, name: string, callerCls: string, callFunc: string, message: string): Error {\n\n return new Error(message + (callerCls ?? nameSpace) + callFunc ?? (EMPTY_STR + (<any>arguments).caller.toString()));\n\n }\n\n /**\n * fetches a global config entry\n * @param {String} configName the name of the configuration entry\n * @param {Object} defaultValue\n *\n * @return either the config entry or if none is given the default value\n */\n export function getGlobalConfig(configName: string, defaultValue: any): any {\n /**\n * note we could use exists but this is an heavy operation, since the config name usually\n * given this function here is called very often\n * is a single entry without . in between we can do the lighter shortcut\n */\n return (<any>window)?.myfaces?.config?.[configName] ?? defaultValue;\n }\n\n /**\n * fetches the form in an fuzzy manner depending\n * on an element or event target.\n *\n * The idea is that according to the jsf spec\n * the enclosing form of the issuing element needs to be fetched.\n *\n * This is fine, but since then html5 came into the picture with the form attribute the element\n * can be anywhere referencing its parent form.\n *\n * Also theoretically you can have the case of an issuing element enclosing a set of forms\n * (not really often used, but theoretically it could be input button allows to embed html for instance)\n *\n * So the idea is not to limit the issuing form determination to the spec case\n * but also cover the theoretical and html5 corner case.\n *\n * @param elem\n * @param event\n */\n export function getForm(elem: Element, event ?: Event): DQ | never {\n\n let queryElem = new DQ(elem);\n let eventTarget = new DQ(getEventTarget(event));\n\n if (queryElem.isTag(TAG_FORM)) {\n return queryElem;\n }\n\n //html 5 for handling\n if (queryElem.attr(TAG_FORM).isPresent()) {\n let formId = queryElem.attr(TAG_FORM).value;\n let foundForm = DQ.byId(formId, true);\n if (foundForm.isPresent()) {\n return foundForm;\n }\n }\n\n let form = queryElem.parents(TAG_FORM)\n .orElseLazy(() => queryElem.byTagName(TAG_FORM, true))\n .orElseLazy(() => eventTarget.parents(TAG_FORM))\n .orElseLazy(() => eventTarget.byTagName(TAG_FORM))\n .first();\n\n assertFormExists(form);\n\n return form;\n }\n\n /**\n * gets the local or global options with local ones having higher priority\n * if no local or global one was found then the default value is given back\n *\n * @param {String} configName the name of the configuration entry\n * @param {String} localOptions the local options root for the configuration myfaces as default marker is added implicitely\n *\n * @param {Object} defaultValue\n *\n * @return either the config entry or if none is given the default value\n */\n export function getLocalOrGlobalConfig(localOptions: Config, configName: string, defaultValue: any): any {\n return localOptions.value?.myfaces?.config?.[configName] ??\n (<any>window)?.myfaces?.config?.[configName] ??\n defaultValue;\n }\n\n /**\n * assert that the form exists and throw an exception in the case it does not\n * (TODO move this into the assertions)\n *\n * @param form the form to check for\n */\n function assertFormExists(form: DomQuery): void | never {\n if (form.isAbsent()) {\n throw makeException(new Error(), null, null, \"Impl\", \"getForm\", getMessage(\"ERR_FORM\"));\n }\n }\n\n}","import {\n EMPTY_STR,\n ERROR_MESSAGE,\n ERROR_NAME,\n RESPONSE_TEXT,\n RESPONSE_XML,\n SOURCE,\n STATUS,\n UNKNOWN\n} from \"../core/Const\";\nimport {Config} from \"mona-dish\";\n\nimport {EventData} from \"./EventData\";\nimport {ExtLang} from \"../util/Lang\";\nimport getMessage = ExtLang.getMessage;\n\n\nexport enum ErrorType {\n SERVER_ERROR = \"serverError\",\n HTTP_ERROR = \"httpError\",\n CLIENT_ERROR = \"clientErrror\",\n TIMEOUT = \"timeout\"\n}\n\n/**\n * the spec has a problem of having the error\n * object somewhat underspecified, there is no clear\n * description of the required contents.\n * I want to streamline it with mojarra here\n * hence we are going to move\n * everything into the same attributes,\n * I will add deprecated myfaces backwards compatibility attributes as well\n */\nexport class ErrorData extends EventData {\n\n type: string = \"error\";\n source: string;\n errorName: string;\n errorMessage: string;\n\n responseText: string;\n responseXML: any;\n\n status: string;\n typeDetails: ErrorType;\n\n //TODO backwards compatible attributes\n serverErrorName: string;\n serverErrorMessage: string;\n message: string;\n\n constructor(source: string, errorName: string, errorMessage: string, responseText: string = null, responseXML: any = null, responseCode: string = \"200\", status: string = \"UNKNOWN\", type = ErrorType.CLIENT_ERROR) {\n super();\n this.source = source;\n this.type = \"error\";\n this.errorName = errorName;\n this.message = this.errorMessage = errorMessage;\n this.responseCode = responseCode;\n this.responseText = responseText;\n this.status = status;\n this.typeDetails = type;\n\n if (type == ErrorType.SERVER_ERROR) {\n this.serverErrorName = this.errorName;\n this.serverErrorMessage = this.errorMessage;\n }\n }\n\n static fromClient(e: Error): ErrorData {\n return new ErrorData(\"client\", e?.name ?? '', e?.message ?? '', e?.stack ?? '');\n }\n\n static fromHttpConnection(source: any, name: string, message: string, responseText, responseCode: number, status: string = 'UNKNOWN'): ErrorData {\n return new ErrorData(source, name, message, responseText, responseCode, `${responseCode}`, status, ErrorType.HTTP_ERROR);\n }\n\n static fromGeneric(context: Config, errorCode: number, errorType: ErrorType = ErrorType.SERVER_ERROR): ErrorData {\n\n let getMsg = this.getMsg;\n\n let source = getMsg(context, SOURCE);\n let errorName = getMsg(context, ERROR_NAME);\n let errorMessage = getMsg(context, ERROR_MESSAGE);\n let status = getMsg(context, STATUS);\n let responseText = getMsg(context, RESPONSE_TEXT);\n let responseXML = getMsg(context, RESPONSE_XML);\n return new ErrorData(source, errorName, errorMessage, responseText, responseXML, errorCode + EMPTY_STR, status, errorType);\n }\n\n private static getMsg(context, param) {\n return getMessage(context.getIf(param).orElse(UNKNOWN).value);\n }\n\n static fromServerError(context: Config): ErrorData {\n return this.fromGeneric(context, -1);\n }\n\n}","import {Config, DQ} from \"mona-dish\";\nimport {BEGIN, CTX_PARAM_PASS_THR, EVENT, P_PARTIAL_SOURCE, SOURCE} from \"../core/Const\";\n\nexport class EventData {\n type: string;\n status: string;\n source: any;\n responseCode: string;\n responseText: string;\n responseXML: Document;\n\n static createFromRequest(request: XMLHttpRequest, context: Config, /*event name*/ name: string): EventData {\n\n let eventData = new EventData();\n\n eventData.type = EVENT;\n eventData.status = name;\n\n let sourceId: string = context.getIf(SOURCE)\n .orElse(context.getIf(P_PARTIAL_SOURCE).value)\n .orElse(context.getIf(CTX_PARAM_PASS_THR, P_PARTIAL_SOURCE).value).value;\n if (sourceId) {\n eventData.source = DQ.byId(sourceId, true).first().value.value;\n }\n\n if (name !== BEGIN) {\n eventData.responseCode = request?.status?.toString();\n eventData.responseText = request?.responseText;\n eventData.responseXML = request?.responseXML;\n }\n return eventData;\n }\n}\n","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, DomQuery, DQ} from \"mona-dish\";\nimport {\n CTX_PARAM_DELAY,\n CTX_PARAM_TIMEOUT,\n EMPTY_FUNC,\n EMPTY_STR,\n ENCODED_URL,\n MF_NONE,\n REQ_TYPE_GET,\n REQ_TYPE_POST\n} from \"../core/Const\";\nimport {XhrFormData} from \"./XhrFormData\";\nimport {ExtLang} from \"../util/Lang\";\nimport {ExtDomquery} from \"../util/ExtDomQuery\";\n\n/**\n * Resolver functions for various aspects of the request data\n *\n * stateless because it might be called from various\n * parts of the response classes\n */\n\n/**\n * resolves the event handlers lazly\n * so that if some decoration happens in between we can deal with it\n *\n * @param requestContext\n * @param responseContext\n * @param funcName\n */\nexport function resolveHandlerFunc(requestContext: Config, responseContext: Config, funcName: string) {\n return responseContext.getIf(funcName)\n .orElse(requestContext.getIf(funcName).value)\n .orElse(EMPTY_FUNC).value;\n}\n\nexport function resolveTargetUrl(srcFormElement: HTMLFormElement) {\n return (typeof srcFormElement.elements[ENCODED_URL] == 'undefined') ?\n srcFormElement.action :\n srcFormElement.elements[ENCODED_URL].value;\n}\n\nexport function resolveFinalUrl(sourceForm: DomQuery, formData: XhrFormData, ajaxType = REQ_TYPE_POST) {\n let targetUrl = resolveTargetUrl(<HTMLFormElement>sourceForm.getAsElem(0).value);\n\n return targetUrl + (ajaxType == REQ_TYPE_GET ? \"?\" + formData.toString() : EMPTY_STR);\n}\n\n/**\n * form resolution the same way our old implementation did\n * it is either the id or the parent form of the element or an embedded form\n * of the element\n *\n * @param requestCtx\n * @param elem\n * @param event\n */\nexport function resolveForm(requestCtx: Config, elem: DQ, event: Event): DQ {\n const configId = requestCtx.value?.myfaces?.form ?? MF_NONE; //requestCtx.getIf(MYFACES, \"form\").orElse(MF_NONE).value;\n return DQ\n .byId(configId, true)\n .orElseLazy(() => ExtLang.getForm(elem.getAsElem(0).value, event));\n}\n\nexport function resolveTimeout(options: Config): number {\n let getCfg = ExtLang.getLocalOrGlobalConfig;\n return options.getIf(CTX_PARAM_TIMEOUT).value ?? getCfg(options.value, CTX_PARAM_TIMEOUT, 0);\n}\n\n/**\n * resolve the delay from the options and/or the request context and or the configuration\n *\n * @param options ... the options object, in most cases it will host the delay value\n */\nexport function resolveDelay(options: Config): number {\n let getCfg = ExtLang.getLocalOrGlobalConfig;\n\n return options.getIf(CTX_PARAM_DELAY).value ?? getCfg(options.value, CTX_PARAM_DELAY, 0);\n}\n\n/**\n * resolves the window Id from various sources\n *\n * @param options\n */\nexport function resolveWindowId(options: Config) {\n return options?.value?.windowId ?? ExtDomquery.windowId;\n}\n\n/**\n * cross port from the dojo lib\n * browser save event resolution\n * @param evt the event object\n * (with a fallback for ie events if none is present)\n */\nexport function getEventTarget(evt: Event): Element {\n //ie6 and 7 fallback\n let finalEvent = evt;\n /**\n * evt source is defined in the jsf events\n * seems like some component authors use our code\n * so we add it here see also\n * https://issues.apache.org/jira/browse/MYFACES-2458\n * not entirely a bug but makes sense to add this\n * behavior. I dont use it that way but nevertheless it\n * does not break anything so why not\n * */\n let t = finalEvent?.srcElement ?? finalEvent?.target ?? (<any>finalEvent)?.source;\n while ((t) && (t.nodeType != 1)) {\n t = t.parentNode;\n }\n return t;\n}\n\n/**\n * resolves a bunch of default values\n * which can be further processed from the given\n * call parameters of jsf.ajax.request\n *\n * @param event\n * @param opts\n * @param el\n */\nexport function resolveDefaults(event: Event, opts: any = {}, el: Element | string = null) {\n //deep copy the options, so that further transformations to not backfire into the callers\n const resolvedEvent = event,\n options = new Config(opts).deepCopy,\n elem = DQ.byId(el || <Element>resolvedEvent.target, true),\n elementId = elem.id, requestCtx = new Config({}),\n internalCtx = new Config({}), windowId = resolveWindowId(options),\n isResetValues = true === options.value?.resetValues;\n\n return {resolvedEvent, options, elem, elementId, requestCtx, internalCtx, windowId, isResetValues};\n}","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, Optional, XMLQuery} from \"mona-dish\";\n\nimport {Assertions} from \"../util/Assertions\";\nimport {DQ} from \"mona-dish\";\nimport {\n CTX_PARAM_MF_INTERNAL,\n CTX_PARAM_SRC_CTL_ID,\n CTX_PARAM_SRC_FRM_ID,\n SEL_RESPONSE_XML,\n SOURCE,\n TAG_FORM,\n UPDATE_ELEMS,\n UPDATE_FORMS\n} from \"../core/Const\";\n\n/**\n * Resolver functions for various aspects of the response data\n *\n * stateless because it might be called from various\n * parts of the response classes\n */\n\n/**\n * fetches the response XML\n * as XML Query object\n *\n * @param request the request hosting the responseXML\n *\n * Throws an error in case of non existent or wrong xml data\n *\n */\nexport function resolveResponseXML(request: Config): XMLQuery {\n let ret = new XMLQuery(request.getIf(SEL_RESPONSE_XML).value);\n Assertions.assertValidXMLResponse(ret);\n\n return ret;\n}\n\n/**\n * Splits the incoming passthrough context apart\n * in an internal and an external nomalized context\n * the internal one is just for our internal processing\n *\n * @param context the root context as associative array\n */\nexport function resolveContexts(context: { [p: string]: any }): any {\n /**\n * we split the context apart into the external one and\n * some internal values\n */\n let externalContext = Config.fromNullable(context);\n let internalContext = externalContext.getIf(CTX_PARAM_MF_INTERNAL);\n if (!internalContext.isPresent()) {\n internalContext = Config.fromNullable({});\n }\n\n /**\n * prepare storage for some deferred operations\n */\n internalContext.assign(UPDATE_FORMS).value = [];\n internalContext.assign(UPDATE_ELEMS).value = [];\n return {externalContext, internalContext};\n}\n\n/**\n * fetches the source element out of our conexts\n *\n * @param context the external context which shpuld host the source id\n * @param internalContext internal passthrough fall back\n *\n */\nexport function resolveSourceElement(context: Config, internalContext: Config): DQ {\n let elemId = resolveSourceElementId(context, internalContext);\n return DQ.byId(elemId.value, true);\n}\n\n/**\n * fetches the source form if it still exists\n * also embedded forms and parent forms are taken into consideration\n * as fallbacks\n *\n * @param internalContext\n * @param elem\n */\nexport function resolveSourceForm(internalContext: Config, elem: DQ): DQ {\n let sourceFormId = internalContext.getIf(CTX_PARAM_SRC_FRM_ID);\n let sourceForm = new DQ(sourceFormId.isPresent() ? document.forms[sourceFormId.value] : null);\n\n sourceForm = sourceForm.orElse(elem.parents(TAG_FORM))\n .orElse(elem.querySelectorAll(TAG_FORM))\n .orElse(DQ.querySelectorAll(TAG_FORM));\n\n return sourceForm;\n}\n\nfunction resolveSourceElementId(context: Config, internalContext: Config): Optional<string> {\n //?internal context?? used to be external one\n return internalContext.getIf(CTX_PARAM_SRC_CTL_ID)\n .orElseLazy(() => context.getIf(SOURCE, \"id\").value);\n}\n\n","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, DQ, XMLQuery} from \"mona-dish\";\nimport {ResponseProcessor} from \"./ResponseProcessor\";\n\nimport {IResponseProcessor} from \"./IResponseProcessor\";\nimport {\n CMD_ATTRIBUTES,\n CMD_CHANGES,\n CMD_DELETE,\n CMD_ERROR,\n CMD_EVAL,\n CMD_EXTENSION,\n CMD_INSERT,\n CMD_REDIRECT,\n CMD_UPDATE,\n P_VIEWBODY,\n P_VIEWHEAD,\n P_VIEWROOT,\n PARTIAL_ID,\n RESP_PARTIAL,\n RESPONSE_XML,\n TAG_AFTER,\n TAG_BEFORE\n} from \"../core/Const\";\nimport {resolveContexts, resolveResponseXML} from \"./ResonseDataResolver\";\n\n\n\nexport module Response {\n\n\n /**\n * Standardized jsf.js response\n * this one is called straight from jsf.js.response\n *\n * The processing follows the spec by going for the responseXML\n * and processing its tags\n *\n * @param {XMLHttpRequest} request (xhrRequest) - xhr request object\n * @param ASSOC_ARR<any> context (Map) - AJAX context\n *\n */\n export function processResponse(request: XMLHttpRequest, context: Context) {\n\n let req = Config.fromNullable(request);\n let {externalContext, internalContext} = resolveContexts(context);\n let responseXML: XMLQuery = resolveResponseXML(req);\n let responseProcessor = new ResponseProcessor(req, externalContext, internalContext);\n\n internalContext.assign(RESPONSE_XML).value = responseXML;\n\n //we now process the partial tags, or in none given raise an error\n responseXML.querySelectorAll(RESP_PARTIAL)\n .each(item => processPartialTag(<XMLQuery>item, responseProcessor, internalContext));\n\n //we now process the viewstates, client windows and the evals deferred\n //the reason for this is that often it is better\n //to wait until the document has caught up before\n //doing any evals even on embedded scripts\n //usually this does not matter, the client window comes in almost last always anyway\n //we maybe drop this deferred assignment in the future, but myfaces did it until now\n responseProcessor.fixViewStates();\n responseProcessor.fixClientWindow();\n responseProcessor.globalEval();\n\n responseProcessor.done();\n }\n\n /**\n * highest node partial-response from there the main operations are triggered\n */\n function processPartialTag(node: XMLQuery, responseProcessor: IResponseProcessor, internalContext) {\n\n internalContext.assign(PARTIAL_ID).value = node.id;\n const SEL_SUB_TAGS = [CMD_ERROR, CMD_REDIRECT, CMD_CHANGES].join(\",\");\n\n //now we can process the main operations\n node.getIf(SEL_SUB_TAGS).each((node: XMLQuery) => {\n switch (node.tagName.value) {\n case CMD_ERROR:\n responseProcessor.error(node);\n break;\n case CMD_REDIRECT:\n responseProcessor.redirect(node);\n break;\n case CMD_CHANGES:\n processChangesTag(node, responseProcessor);\n break;\n }\n });\n\n }\n\n let processInsert = function (responseProcessor: IResponseProcessor, node: XMLQuery) {\n //path1 insert after as child tags\n if(node.querySelectorAll([TAG_BEFORE, TAG_AFTER].join(\",\")).length) {\n responseProcessor.insertWithSubtags(node);\n } else { //insert before after with id\n responseProcessor.insert(node);\n }\n\n };\n\n /**\n * next level changes tag\n *\n * @param node\n * @param responseProcessor\n */\n function processChangesTag(node: XMLQuery, responseProcessor: IResponseProcessor): boolean {\n const ALLOWED_TAGS = [CMD_UPDATE, CMD_EVAL, CMD_INSERT, CMD_DELETE, CMD_ATTRIBUTES, CMD_EXTENSION].join(\",\");\n node.getIf(ALLOWED_TAGS).each(\n (node: XMLQuery) => {\n switch (node.tagName.value) {\n case CMD_UPDATE:\n processUpdateTag(node, responseProcessor);\n break;\n\n case CMD_EVAL:\n responseProcessor.eval(node);\n break;\n\n case CMD_INSERT:\n processInsert(responseProcessor, node);\n break;\n\n case CMD_DELETE:\n responseProcessor.delete(node);\n break;\n\n case CMD_ATTRIBUTES:\n responseProcessor.attributes(node);\n break;\n\n case CMD_EXTENSION:\n break;\n }\n }\n );\n return true;\n }\n\n /**\n * checks and stores a state update for delayed processing\n *\n * @param responseProcessor the response processor to perform the store operation\n * @param node the xml node to check for the state\n *\n * @private\n */\n function storeState(responseProcessor: IResponseProcessor, node: XMLQuery) {\n return responseProcessor.processViewState(node) || responseProcessor.processClientWindow(node);\n }\n\n /**\n * branch tag update.. drill further down into the updates\n * special case viewstate in that case it is a leaf\n * and the viewstate must be processed\n *\n * @param node\n * @param responseProcessor\n */\n function processUpdateTag(node: XMLQuery, responseProcessor: IResponseProcessor) {\n //early state storing, if no state we perform a normal update cycle\n if (!storeState(responseProcessor, node)) {\n handleElementUpdate(node, responseProcessor);\n }\n }\n\n /**\n * element update\n *\n * @param node\n * @param responseProcessor\n */\n function handleElementUpdate(node: XMLQuery, responseProcessor: IResponseProcessor) {\n let cdataBlock = node.cDATAAsString;\n switch (node.id.value) {\n case P_VIEWROOT :\n responseProcessor.replaceViewRoot(DQ.fromMarkup(cdataBlock.substring(cdataBlock.indexOf(\"<html\"))));\n break;\n\n case P_VIEWHEAD:\n responseProcessor.replaceHead(DQ.fromMarkup(cdataBlock));\n break;\n\n case P_VIEWBODY:\n responseProcessor.replaceBody(DQ.fromMarkup(cdataBlock));\n break;\n\n default://htmlItem replacement\n responseProcessor.update(node, cdataBlock);\n break;\n\n }\n }\n}","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, DomQuery, DQ, Lang, Stream, XMLQuery} from \"mona-dish\";\nimport {Implementation} from \"../AjaxImpl\";\nimport {Assertions} from \"../util/Assertions\";\nimport {IResponseProcessor} from \"./IResponseProcessor\";\nimport {ErrorData} from \"./ErrorData\";\nimport {StateHolder} from \"../core/ImplTypes\";\nimport {EventData} from \"./EventData\";\n\nimport {\n APPLIED_CLIENT_WINDOW,\n APPLIED_VST,\n ATTR_ID,\n ATTR_NAME,\n ATTR_URL,\n ATTR_VALUE,\n EMPTY_FUNC,\n EMPTY_STR,\n ERROR_MESSAGE,\n ERROR_NAME,\n HTML_VIEWSTATE,\n ON_ERROR,\n ON_EVENT, P_CLIENT_WINDOW,\n P_PARTIAL_SOURCE,\n P_VIEWSTATE,\n RESPONSE_XML, SEL_CLIENT_WINDOW_ELEM,\n SEL_SCRIPTS_STYLES,\n SEL_VIEWSTATE_ELEM,\n SOURCE,\n SUCCESS,\n TAG_AFTER,\n TAG_ATTR,\n TAG_BEFORE,\n TAG_BODY,\n TAG_FORM,\n TAG_HEAD,\n UPDATE_ELEMS,\n UPDATE_FORMS\n} from \"../core/Const\";\nimport trim = Lang.trim;\nimport {ExtDomquery} from \"../util/ExtDomQuery\";\n\n/**\n * Response processor\n *\n * Each XML tag is either a node or a leaf\n * or both\n *\n * the processor provides a set of operations\n * which are executed on a single leaf node per operation\n * and present the core functionality of our response\n *\n * Note the response processor is stateful hence we bundle it in a class\n * to reduce code we keep references tot contexts in place\n */\nexport class ResponseProcessor implements IResponseProcessor {\n\n constructor(private request: Config, private externalContext: Config, private internalContext: Config) {\n\n }\n\n replaceHead(shadowDocument: XMLQuery | DQ) {\n let shadowHead = shadowDocument.querySelectorAll(TAG_HEAD);\n if (!shadowHead.isPresent()) {\n return;\n }\n\n let oldHead = DQ.querySelectorAll(TAG_HEAD);\n\n //delete all to avoid script and style overlays\n oldHead.querySelectorAll(SEL_SCRIPTS_STYLES).delete();\n\n this.storeForEval(shadowHead);\n }\n\n /**\n * replaces the body in the expected manner\n * which means the entire body content is refreshed\n * however also the body attributes must be transferred\n * keeping event handlers etc... in place\n *\n * @param shadowDocument .. an incoming shadow document hosting the new nodes\n */\n replaceBody(shadowDocument: XMLQuery | DQ) {\n\n let shadowBody = shadowDocument.querySelectorAll(TAG_BODY);\n if (!shadowBody.isPresent()) {\n return;\n }\n\n let shadowInnerHTML: string = <string>shadowBody.html().value;\n\n let resultingBody = <DQ>DQ.querySelectorAll(TAG_BODY).html(shadowInnerHTML);\n let updateForms = resultingBody.querySelectorAll(TAG_FORM);\n\n resultingBody.copyAttrs(shadowBody);\n\n this.storeForPostProcessing(updateForms, resultingBody);\n }\n\n /**\n * Leaf Tag eval... process whatever is in the evals cdata block\n *\n * @param node the node to eval\n */\n eval(node: XMLQuery) {\n DQ.globalEval(node.cDATAAsString);\n }\n\n /**\n * processes an incoming error from the response\n * which is hosted under the &lt;error&gt; tag\n * @param node the node hosting the error in our response xml\n * @param node the node in the xml hosting the error message\n */\n error(node: XMLQuery) {\n /**\n * <error>\n * <error-name>String</error-name>\n * <error-message><![CDATA[message]]></error-message>\n * <error>\n */\n\n let mergedErrorData = new Config({});\n mergedErrorData.assign(SOURCE).value = this.externalContext.getIf(P_PARTIAL_SOURCE).get(0).value;\n mergedErrorData.assign(ERROR_NAME).value = node.querySelectorAll(ERROR_NAME).textContent(EMPTY_STR);\n mergedErrorData.assign(ERROR_MESSAGE).value = node.querySelectorAll(ERROR_MESSAGE).cDATAAsString;\n\n let hasResponseXML = this.internalContext.get(RESPONSE_XML).isPresent();\n\n //we now store the response xml also in the error data for further details\n mergedErrorData.assignIf(hasResponseXML, RESPONSE_XML).value = this.internalContext.getIf(RESPONSE_XML).value.get(0).value;\n\n // error post processing and enrichment (standard messages from keys)\n let errorData = ErrorData.fromServerError(mergedErrorData);\n\n // we now trigger an internally stored onError function which might be a attached to the context\n // either we haven an internal on error, or an on error has been bassed via params from the outside\n // in both cases they are attached to our contexts\n\n this.triggerOnError(errorData);\n Implementation.sendError(errorData);\n }\n\n private triggerOnError(errorData: ErrorData) {\n this.externalContext.getIf(ON_ERROR).orElse(this.internalContext.getIf(ON_ERROR).value).orElse(EMPTY_FUNC).value(errorData);\n }\n\n /**\n * process the redirect operation\n *\n * @param node\n */\n redirect(node: XMLQuery) {\n Assertions.assertUrlExists(node);\n\n let redirectUrl = trim(node.attr(ATTR_URL).value);\n if (redirectUrl != EMPTY_STR) {\n (<any>window).location.href = redirectUrl;\n }\n }\n\n /**\n * processes the update operation and updates the node with the cdata block\n * @param node the xml response node hosting the update info\n * @param cdataBlock the cdata block with the new html code\n */\n update(node: XMLQuery, cdataBlock: string) {\n let result = ExtDomquery.byId(node.id.value, true).outerHTML(cdataBlock, false, false);\n let sourceForm = result?.parents(TAG_FORM).orElse(result.byTagName(TAG_FORM, true));\n if (sourceForm) {\n this.storeForPostProcessing(sourceForm, result);\n }\n }\n\n delete(node: XMLQuery) {\n DQ.byId(node.id.value, true).delete();\n }\n\n /**\n * attributes leaf tag... process the attributes\n *\n * @param node\n */\n attributes(node: XMLQuery) {\n let elem = DQ.byId(node.id.value, true);\n\n node.byTagName(TAG_ATTR).each((item: XMLQuery) => {\n elem.attr(item.attr(ATTR_NAME).value).value = item.attr(ATTR_VALUE).value;\n });\n }\n\n /**\n * @param shadowDocument a shadow document which is needed for further processing\n */\n replaceViewRoot(shadowDocument: XMLQuery) {\n this.replaceHead(shadowDocument);\n this.replaceBody(shadowDocument);\n }\n\n /**\n * insert handling, either before or after\n *\n * @param node\n */\n insert(node: XMLQuery) {\n //let insertId = node.id; //not used atm\n\n let before = node.attr(TAG_BEFORE);\n let after = node.attr(TAG_AFTER);\n\n let insertNodes = DQ.fromMarkup(<any>node.cDATAAsString);\n\n if (before.isPresent()) {\n DQ.byId(before.value, true).insertBefore(insertNodes);\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n if (after.isPresent()) {\n let domQuery = DQ.byId(after.value, true);\n domQuery.insertAfter(insertNodes);\n\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n }\n\n /**\n * handler for the case &lt;insert <&lt; before id=\"...\n *\n * @param node the node hosting the insert data\n */\n insertWithSubtags(node: XMLQuery) {\n let before = node.querySelectorAll(TAG_BEFORE);\n let after = node.querySelectorAll(TAG_AFTER);\n\n before.each(item => {\n let insertId = item.attr(ATTR_ID);\n let insertNodes = DQ.fromMarkup(<any>item.cDATAAsString);\n if (insertId.isPresent()) {\n DQ.byId(insertId.value, true).insertBefore(insertNodes);\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n });\n\n after.each(item => {\n let insertId = item.attr(ATTR_ID);\n let insertNodes = DQ.fromMarkup(<any>item.cDATAAsString);\n if (insertId.isPresent()) {\n DQ.byId(insertId.value, true).insertAfter(insertNodes);\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n });\n }\n\n /**\n * process the viewState update, update the affected\n * forms with their respective new viewstate values\n *\n */\n processViewState(node: XMLQuery): boolean {\n if (ResponseProcessor.isViewStateNode(node)) {\n let state = node.cDATAAsString;\n this.internalContext.assign(APPLIED_VST, node.id.value).value = new StateHolder(node.id.value, state);\n return true;\n }\n return false;\n }\n\n processClientWindow(node: XMLQuery): boolean {\n if (ResponseProcessor.isClientWindowNode(node)) {\n let state = node.cDATAAsString;\n this.internalContext.assign(APPLIED_CLIENT_WINDOW, node.id.value).value = new StateHolder(node.id.value, state);\n return true;\n }\n }\n\n /**\n * generic global eval which runs the embedded css and scripts\n */\n globalEval() {\n let updateElems = new ExtDomquery(...this.internalContext.getIf(UPDATE_ELEMS).value);\n updateElems.runCss();\n updateElems.runScripts();\n }\n\n /**\n * post processing viewstate fixing\n */\n fixViewStates() {\n Stream.ofAssoc<StateHolder>(this.internalContext.getIf(APPLIED_VST).orElse({}).value)\n .each((item: Array<any>) => {\n let value: StateHolder = item[1];\n let nameSpace = DQ.byId(value.nameSpace, true).orElse(document.body);\n let affectedForms = nameSpace.byTagName(TAG_FORM);\n let affectedForms2 = nameSpace.filter(item => item.tagName.orElse(EMPTY_STR).value.toLowerCase() == TAG_FORM);\n\n this.appendViewStateToForms(new DomQuery(affectedForms, affectedForms2), value.value);\n });\n }\n\n fixClientWindow() {\n Stream.ofAssoc<StateHolder>(this.internalContext.getIf(APPLIED_CLIENT_WINDOW).orElse({}).value)\n .each((item: Array<any>) => {\n let value: StateHolder = item[1];\n let nameSpace = DQ.byId(value.nameSpace, true).orElse(document.body);\n let affectedForms = nameSpace.byTagName(TAG_FORM);\n let affectedForms2 = nameSpace.filter(item => item.tagName.orElse(EMPTY_STR).value.toLowerCase() == TAG_FORM);\n\n this.appendClientWindowToForms(new DomQuery(affectedForms, affectedForms2), value.value);\n });\n }\n\n /**\n * all processing done we can close the request and send the appropriate events\n */\n done() {\n let eventData = EventData.createFromRequest(this.request.value, this.externalContext, SUCCESS);\n\n //because some frameworks might decorate them over the context in the response\n let eventHandler = this.externalContext.getIf(ON_EVENT).orElse(this.internalContext.getIf(ON_EVENT).value).orElse(EMPTY_FUNC).value;\n Implementation.sendEvent(eventData, eventHandler);\n }\n\n /**\n * proper viewstate -> form assignment\n *\n * @param forms the forms to append the viewstate to\n * @param viewState the final viewstate\n */\n private appendViewStateToForms(forms: DQ, viewState: string) {\n this.assignState(forms, SEL_VIEWSTATE_ELEM, viewState);\n }\n\n\n /**\n * proper clientwindow -> form assignment\n *\n * @param forms the forms to append the viewstate to\n * @param clientWindow the final viewstate\n */\n private appendClientWindowToForms(forms: DQ, clientWindow: string) {\n this.assignState(forms, SEL_CLIENT_WINDOW_ELEM, clientWindow);\n }\n\n /**\n * generic append state which appends a certain state as hidden element to an existing set of forms\n *\n * @param forms the forms to append or change to\n * @param selector the selector for the state\n * @param state the state itself which needs to be assigned\n *\n * @private\n */\n private assignState(forms: DQ, selector: string, state: string) {\n forms.each((form: DQ) => {\n let stateHolders = form.querySelectorAll(selector)\n .orElseLazy(() => ResponseProcessor.newViewStateElement(form));\n\n stateHolders.attr(\"value\").value = state;\n });\n }\n\n /**\n * Helper to Create a new JSF ViewState Element\n *\n * @param parent, the parent node to attach the viewstate element to\n * (usually a form node)\n */\n private static newViewStateElement(parent: DQ): DQ {\n let newViewState = DQ.fromMarkup(HTML_VIEWSTATE);\n newViewState.appendTo(parent);\n return newViewState;\n }\n\n /**\n * Stores certain aspects of the dom for later post processing\n *\n * @param updateForms the update forms which should receive standardized internal jsf data\n * @param toBeEvaled the resulting elements which should be evaled\n */\n private storeForPostProcessing(updateForms: DQ, toBeEvaled: DQ) {\n this.storeForUpdate(updateForms);\n this.storeForEval(toBeEvaled);\n }\n\n /**\n * helper to store a given form for the update post processing (viewstate)\n *\n * @param updateForms the dom query object pointing to the forms which need to be updated\n */\n private storeForUpdate(updateForms: DQ) {\n this.internalContext.assign(UPDATE_FORMS).value.push(updateForms);\n }\n\n /**\n * same for eval (js and css)\n *\n * @param toBeEvaled\n */\n private storeForEval(toBeEvaled: DQ) {\n this.internalContext.assign(UPDATE_ELEMS).value.push(toBeEvaled);\n }\n\n /**\n * check whether a given XMLQuery node is an explicit viewstate node\n *\n * @param node the node to check\n * @returns true of it ii\n */\n private static isViewStateNode(node: XMLQuery): boolean {\n let separatorChar = (<any>window).jsf.separatorchar;\n return \"undefined\" != typeof node?.id?.value && (node?.id?.value == P_VIEWSTATE ||\n node?.id?.value?.indexOf([separatorChar, P_VIEWSTATE].join(EMPTY_STR)) != -1 ||\n node?.id?.value?.indexOf([P_VIEWSTATE, separatorChar].join(EMPTY_STR)) != -1);\n }\n\n /**\n * incoming client window node also needs special processing\n *\n * @param node the node to check\n * @returns true of it ii\n */\n private static isClientWindowNode(node: XMLQuery): boolean {\n let separatorChar = (<any>window).jsf.separatorchar;\n return \"undefined\" != typeof node?.id?.value && (node?.id?.value == P_CLIENT_WINDOW ||\n node?.id?.value?.indexOf([separatorChar, P_CLIENT_WINDOW].join(EMPTY_STR)) != -1 ||\n node?.id?.value?.indexOf([P_CLIENT_WINDOW, separatorChar].join(EMPTY_STR)) != -1);\n }\n\n}","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {ArrayCollector, Config, DomQuery, DomQueryCollector, Lang, LazyStream} from \"mona-dish\";\n\nimport {Stream, DQ} from \"mona-dish\";\nimport isString = Lang.isString;\nimport {EMPTY_STR, P_VIEWSTATE} from \"../core/Const\";\n\n\n/**\n * A unified form data class\n * which builds upon our configuration.\n *\n * We cannot use standard html5 forms everywhere\n * due to api constraints on the HTML Form object in IE11\n * and due to the url encoding constraint given by the jsf.js spec\n *\n * TODO not ideal. too many encoding calls\n * probably only one needed and one overlay!\n * the entire fileinput storing probably is redundant now\n * that domquery has been fixed\n */\nexport class XhrFormData extends Config {\n\n private fileInputs = {};\n\n /**\n * data collector from a given form\n *\n * @param dataSource either a form as DomQuery object or an encoded url string\n * @param partialIdsArray partial ids to collect, to reduce the data sent down\n */\n constructor(private dataSource: DQ | string, private partialIdsArray?: string[], private encode = true) {\n super({});\n //a call to getViewState before must pass the encoded line\n //a call from getViewState passes the form element as datasource\n //so we have two call points\n if (isString(dataSource)) {\n this.assignEncodedString(<string>this.dataSource);\n } else {\n this.handleFormSource();\n }\n }\n\n /**\n * generic application of ids\n * @param executes\n */\n applyFileInputs(...executes: Array<string>) {\n\n let fetchInput = (id: string): DQ => {\n if (id == \"@all\") {\n return DQ.querySelectorAllDeep(\"input[type='file']\");\n } else if (id == \"@form\") {\n return (<DQ>this.dataSource).querySelectorAllDeep(\"input[type='file']\");\n } else {\n let element = DQ.byId(id, true);\n return this.getFileInputs(element);\n }\n };\n\n let inputExists = (item: DQ) => {\n return !!item.length;\n };\n\n let applyInput = (item: DQ) => {\n this.fileInputs[this.resolveSubmitIdentifier(<HTMLInputElement>item.getAsElem(0).value)] = true;\n };\n\n LazyStream.of(...executes)\n .map(fetchInput)\n .filter(inputExists)\n .each(applyInput);\n }\n\n private getFileInputs(rootElment: DQ): DQ {\n\n let resolveFileInputs = item => {\n\n if (item.length == 1) {\n if ((<string>item.tagName.get(\"booga\").value).toLowerCase() == \"input\" &&\n (<string>item.attr(\"type\")?.value || '').toLowerCase() == \"file\") {\n return item;\n }\n\n return rootElment.querySelectorAllDeep(\"input[type='file']\");\n }\n return this.getFileInputs(item);\n };\n\n let itemExists = (item: DQ) => {\n return !!item?.length;\n }\n\n let ret = rootElment.lazyStream\n .map(resolveFileInputs)\n .filter(itemExists)\n .collect(new DomQueryCollector());\n\n return ret;\n }\n\n\n private handleFormSource() {\n //encode and append the issuing item if not a partial ids array of ids is passed\n /*\n * Spec. 13.3.1\n * Collect and encode input elements.\n * Additionally the hidden element javax.faces.ViewState\n * Enhancement partial page submit\n *\n */\n this.encodeSubmittableFields(this, <DQ>this.dataSource, this.partialIdsArray);\n\n if (this.getIf(P_VIEWSTATE).isPresent()) {\n return;\n }\n\n this.applyViewState(<DQ>this.dataSource);\n }\n\n /**\n * special case viewstate handling\n *\n * @param form the form holding the viewstate value\n */\n private applyViewState(form: DQ) {\n let viewState = form.byId(P_VIEWSTATE, true).inputValue;\n this.appendIf(viewState.isPresent(), P_VIEWSTATE).value = viewState.value;\n }\n\n /**\n * assignes a url encoded string to this xhrFormData object\n * as key value entry\n * @param encoded\n */\n assignEncodedString(encoded: string) {\n //this code filters out empty strings as key value pairs\n let keyValueEntries = decodeURIComponent(encoded).split(/&/gi).filter(item => !!(item || '').replace(/\\s+/g,''));\n this.assignString(keyValueEntries);\n }\n\n assignString(keyValueEntries: string[]) {\n let toMerge = new Config({});\n\n Stream.of(...keyValueEntries)\n //split only the first =\n .map(line => line.split(/=(.*)/gi))\n //special case of having keys without values\n .map(keyVal => keyVal.length < 3 ? [keyVal?.[0] ?? [], keyVal?.[1] ?? []] : keyVal)\n .each(keyVal => {\n toMerge.append(keyVal[0]).value = keyVal?.splice(1)?.join(\"\") ?? \"\";\n });\n //merge with overwrite but no append! (aka no double entries are allowed)\n this.shallowMerge(toMerge);\n }\n\n// noinspection JSUnusedGlobalSymbols\n /**\n * @returns a Form data representation\n */\n toFormData(): FormData {\n let ret: any = new FormData();\n\n LazyStream.of(...Object.keys(this.value))\n .filter(key => !(key in this.fileInputs))\n .each(key => {\n Stream.of(...this.value[key]).each(item => ret.append(key, item));\n });\n Stream.of<string>(...Object.keys(this.fileInputs)).each((key: string) => {\n DQ.querySelectorAllDeep(`[name='${key}'], [id=\"${key}\"]`).eachElem((elem: HTMLInputElement) => {\n let identifier = this.resolveSubmitIdentifier(elem);\n if (!elem?.files?.length) {\n ret.append(identifier, elem.value);\n return;\n }\n\n ret.append(identifier, elem.files[0]);\n })\n });\n return ret;\n }\n\n resolveSubmitIdentifier(elem: HTMLInputElement) {\n let identifier = elem.name;\n identifier = ((elem?.name ?? \"\").replace(/s+/gi, \"\") == \"\") ? elem.id : identifier;\n return identifier;\n }\n\n /**\n * returns an encoded string representation of our xhr form data\n *\n * @param defaultStr optional default value if nothing is there to encode\n */\n toString(defaultStr = EMPTY_STR): string {\n if (this.isAbsent()) {\n return defaultStr;\n }\n let entries = LazyStream.of(...Object.keys(this.value))\n .filter(key => this.value.hasOwnProperty(key))\n .flatMap(key => Stream.of(...this.value[key]).map(val => [key, val]).collect(new ArrayCollector()))\n .map(keyVal => {\n return `${encodeURIComponent(keyVal[0])}=${encodeURIComponent(keyVal[1])}`;\n })\n .collect(new ArrayCollector());\n\n return entries.join(\"&\")\n }\n\n /**\n * determines fields to submit\n * @param {Object} targetBuf - the target form buffer receiving the data\n * @param {Node} parentItem - form element item is nested in\n * @param {Array} partialIds - ids fo PPS\n */\n private encodeSubmittableFields(targetBuf: Config,\n parentItem: DQ, partialIds ?: string[]) {\n let toEncode = null;\n if (this.partialIdsArray && this.partialIdsArray.length) {\n //in case of our myfaces reduced ppr we only\n //only submit the partials\n this._value = {};\n toEncode = new DQ(...this.partialIdsArray);\n\n } else {\n if (parentItem.isAbsent()) throw \"NO_PARITEM\";\n toEncode = parentItem;\n }\n\n //lets encode the form elements\n\n this.shallowMerge(toEncode.deepElements.encodeFormElement());\n }\n\n /**\n * checks if the given datasource is a multipart request source\n * multipart is only needed if one of the executes is a file input\n * since file inputs are stateless, they fall out of the viewstate\n * and need special handling\n */\n get isMultipartRequest(): boolean {\n return !!Object.keys(this.fileInputs).length;\n }\n\n}","/* Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AsyncRunnable} from \"../util/AsyncRunnable\";\nimport {Config, DQ, Stream} from \"mona-dish\";\nimport {Implementation} from \"../AjaxImpl\";\n\nimport {XhrFormData} from \"./XhrFormData\";\nimport {ErrorData} from \"./ErrorData\";\nimport {EventData} from \"./EventData\";\nimport {ExtLang} from \"../util/Lang\";\nimport {\n BEGIN,\n COMPLETE,\n CONTENT_TYPE,\n CTX_PARAM_MF_INTERNAL,\n CTX_PARAM_PASS_THR,\n ERROR,\n HEAD_FACES_REQ,\n MALFORMEDXML,\n NO_TIMEOUT,\n ON_ERROR,\n ON_EVENT, P_EXECUTE,\n REQ_ACCEPT,\n REQ_TYPE_GET,\n REQ_TYPE_POST,\n STATE_EVT_TIMEOUT,\n STD_ACCEPT,\n URL_ENCODED,\n VAL_AJAX\n} from \"../core/Const\";\nimport {resolveFinalUrl, resolveHandlerFunc} from \"./RequestDataResolver\";\nimport failSaveExecute = ExtLang.failSaveExecute;\n\n/**\n * JSFed XHR Request Wrapper\n * as Asyncrunnable for our Asynchronous queue\n *\n * The idea is that we basically just enqueue\n * a single ajax request into our queue\n * and let the queue do the processing.\n *\n */\n\ndeclare let jsf: any;\n\nexport class XhrRequest implements AsyncRunnable<XMLHttpRequest> {\n\n private responseContext: Config;\n\n private stopProgress = false;\n\n /**\n * helper support so that we do not have to drag in Promise shims\n */\n private catchFuncs: Array<Function> = [];\n private thenFunc: Array<Function> = [];\n\n /**\n * Reqired Parameters\n *\n * @param source the issuing element\n * @param sourceForm the form which is related to the issuing element\n * @param requestContext the request context with allö pass through values\n *\n * Optional Parameters\n *\n * @param partialIdsArray an optional restricting partial ids array for encoding\n * @param timeout optional xhr timeout\n * @param ajaxType optional request type, default \"POST\"\n * @param contentType optional content type, default \"application/x-www-form-urlencoded\"\n * @param xhrObject optional xhr object which must fullfill the XMLHTTPRequest api, default XMLHttpRequest\n */\n constructor(\n private source: DQ,\n private sourceForm: DQ,\n private requestContext: Config,\n private internalContext: Config,\n private partialIdsArray = [],\n private timeout = NO_TIMEOUT,\n private ajaxType = REQ_TYPE_POST,\n private contentType = URL_ENCODED,\n private xhrObject = new XMLHttpRequest()\n ) {\n /*\n * we omit promises here\n * some browsers do not support it and we do not need shim code\n */\n this.registerXhrCallbacks((data: any) => {\n this.resolve(data)\n }, (data: any) => {\n this.reject(data)\n });\n }\n\n start(): AsyncRunnable<XMLHttpRequest> {\n\n let ignoreErr = failSaveExecute;\n let xhrObject = this.xhrObject;\n\n let executesArr = () => {\n return this.requestContext.getIf(CTX_PARAM_PASS_THR, P_EXECUTE).get(\"none\").value.split(/\\s+/gi);\n };\n try {\n\n let formElement = this.sourceForm.getAsElem(0).value;\n let viewState = jsf.getViewState(formElement);\n //encoded we need to decode\n //We generated a base representation of the current form\n let formData: XhrFormData = new XhrFormData(this.sourceForm);\n //in case someone has overloaded the viewstate with addtional decorators we merge\n //that in, there is no way around it, the spec allows it and getViewState\n //must be called, so whatever getViewState delivers has higher priority then\n //whatever the formData object delivers\n formData.assignEncodedString(viewState);\n formData.applyFileInputs(...executesArr());\n\n this.contentType = formData.isMultipartRequest ? \"undefined\" : this.contentType;\n\n //next step the pass through parameters are merged in for post params\n let requestContext = this.requestContext;\n let passThroughParams = requestContext.getIf(CTX_PARAM_PASS_THR);\n formData.shallowMerge(passThroughParams, true, true);\n\n this.responseContext = passThroughParams.deepCopy;\n\n //we have to shift the internal passthroughs around to build up our response context\n let responseContext = this.responseContext;\n\n responseContext.assign(CTX_PARAM_MF_INTERNAL).value = this.internalContext.value;\n\n //per spec the onevent and onerrors must be passed through to the response\n responseContext.assign(ON_EVENT).value = requestContext.getIf(ON_EVENT).value;\n responseContext.assign(ON_ERROR).value = requestContext.getIf(ON_ERROR).value;\n\n xhrObject.open(this.ajaxType, resolveFinalUrl(this.sourceForm, formData, this.ajaxType), true);\n\n //adding timeout\n this.timeout ? xhrObject.timeout = this.timeout : null;\n\n //a bug in the xhr stub library prevents the setRequestHeader to be properly executed on fake xhr objects\n //normal browsers should resolve this\n //tests can quietly fail on this one\n if(this.contentType != \"undefined\") {\n ignoreErr(() => xhrObject.setRequestHeader(CONTENT_TYPE, `${this.contentType}; charset=utf-8`));\n }\n\n ignoreErr(() => xhrObject.setRequestHeader(HEAD_FACES_REQ, VAL_AJAX));\n\n //probably not needed anymore, will test this\n //some webkit based mobile browsers do not follow the w3c spec of\n // setting the accept headers automatically\n ignoreErr(() => xhrObject.setRequestHeader(REQ_ACCEPT, STD_ACCEPT));\n\n this.sendEvent(BEGIN);\n\n this.sendRequest(formData);\n\n } catch (e) {\n //_onError//_onError\n this.handleError(e);\n }\n return this;\n }\n\n cancel() {\n try {\n this.xhrObject.abort();\n } catch (e) {\n this.handleError(e);\n }\n }\n\n resolve(data: any) {\n Stream.of(...this.thenFunc).reduce((inputVal: any, thenFunc: any) => {\n return thenFunc(inputVal);\n }, data);\n }\n\n reject(data: any) {\n Stream.of(...this.catchFuncs).reduce((inputVal: any, catchFunc: any) => {\n return catchFunc(inputVal);\n }, data);\n }\n\n catch(func: (data: any) => any): AsyncRunnable<XMLHttpRequest> {\n //this.$promise.catch(func);\n this.catchFuncs.push(func);\n return this;\n }\n\n finally(func: () => void): AsyncRunnable<XMLHttpRequest> {\n //no ie11 support we probably are going to revert to shims for that one\n //(<any>this.$promise).then(func).catch(func);\n this.catchFuncs.push(func);\n this.thenFunc.push(func);\n return this;\n }\n\n then(func: (data: any) => any): AsyncRunnable<XMLHttpRequest> {\n //this.$promise.then(func);\n this.thenFunc.push(func);\n return this;\n }\n\n /**\n * attaches the internal event and processing\n * callback within the promise to our xhr object\n *\n * @param resolve\n * @param reject\n */\n protected registerXhrCallbacks(resolve: Consumer<any>, reject: Consumer<any>) {\n let xhrObject = this.xhrObject;\n\n xhrObject.onabort = () => {\n this.onAbort(resolve, reject);\n };\n xhrObject.ontimeout = () => {\n this.onTimeout(resolve, reject);\n };\n xhrObject.onload = () => {\n this.onSuccess(this.xhrObject, resolve, reject)\n };\n xhrObject.onloadend = () => {\n this.onDone(this.xhrObject, resolve, reject);\n };\n xhrObject.onerror = (errorData: any) => {\n this.onError(errorData, resolve, reject);\n };\n }\n\n /*\n * xhr processing callbacks\n *\n * Those methods are the callbacks called by\n * the xhr object depending on its own state\n */\n\n protected onAbort(resolve: Consumer<any>, reject: Consumer<any>) {\n reject();\n }\n\n protected onTimeout(resolve: Consumer<any>, reject: Consumer<any>) {\n this.sendEvent(STATE_EVT_TIMEOUT);\n reject();\n }\n\n protected onSuccess(data: any, resolve: Consumer<any>, reject: Consumer<any>) {\n\n this.sendEvent(COMPLETE);\n\n //malforms always result in empty response xml\n if (!this?.xhrObject?.responseXML) {\n this.handleMalFormedXML(resolve, reject);\n return;\n }\n\n jsf.ajax.response(this.xhrObject, this.responseContext.value ?? {});\n }\n\n private handleMalFormedXML(resolve: Function, reject: Function) {\n this.stopProgress = true;\n let errorData = {\n type: ERROR,\n status: MALFORMEDXML,\n responseCode: 200,\n responseText: this.xhrObject?.responseText,\n source: {\n id: this.source.id.value\n }\n };\n try {\n this.handleError(errorData, true);\n } finally {\n //we issue a resolve in this case to allow the system to recover\n resolve(errorData);\n //reject();\n }\n //non blocking non clearing\n }\n\n protected onDone(data: any, resolve: Consumer<any>, reject: Consumer<any>) {\n if (this.stopProgress) {\n return;\n }\n resolve(data);\n }\n\n protected onError(errorData: any, resolve: Consumer<any>, reject: Consumer<any>) {\n this.handleError(errorData);\n reject();\n }\n\n /*\n * other helpers\n */\n private sendEvent(evtType: string) {\n let eventData = EventData.createFromRequest(this.xhrObject, this.requestContext, evtType);\n try {\n //user code error, we might cover\n //this in onError but also we cannot swallow it\n //we need to resolve the local handlers lazyly,\n //because some frameworks might decorate them over the context in the response\n let eventHandler = resolveHandlerFunc(this.requestContext, this.responseContext, ON_EVENT);\n\n Implementation.sendEvent(eventData, eventHandler);\n } catch (e) {\n this.handleError(e);\n throw e;\n }\n }\n\n private handleError(exception, responseFormatError: boolean = false) {\n let errorData = (responseFormatError) ? ErrorData.fromHttpConnection(exception.source, exception.type, exception.status, exception.responseText, exception.responseCode, exception.status) : ErrorData.fromClient(exception);\n\n let eventHandler = resolveHandlerFunc(this.requestContext, this.responseContext, ON_ERROR);\n Implementation.sendError(errorData, eventHandler);\n }\n\n protected sendRequest(formData: XhrFormData) {\n let isPost = this.ajaxType != REQ_TYPE_GET;\n if (formData.isMultipartRequest) {\n //in case of a multipart request we send in a formData object as body\n this.xhrObject.send((isPost) ? formData.toFormData() : null);\n } else {\n //in case of a normal request we send it normally\n this.xhrObject.send((isPost) ? formData.toString() : null);\n }\n }\n\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/main/typescript/api/Jsf.ts\");\n",""],"names":[],"sourceRoot":""}