profoundjs 7.22.1 → 7.24.0

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.
@@ -1,107 +1,102 @@
1
- function w(b){this.onready=this.onfail=this.onsuccess=this.cacheBuster=this.suppressAlert=this.password=this.user=this.async=this.url=this.reqData=this.postData=this.method=null;this.headers={};this.params=null;this.sendAsBinary=true;var c=this.overrideMimeType=null,a=null,d=null,e=null,g=typeof pui!="undefined"&&typeof pui.alert!="undefined"?pui.alert:alert,f=this;if(w.defaultHeaders)this.headers=w.defaultHeaders;if(typeof b=="object")for(var i in b){if(typeof this[i]!="undefined")this[i]=b[i]}else this.url=
2
- b;if(window.XMLHttpRequest)c=new XMLHttpRequest;else if(window.ActiveXObject)c=new ActiveXObject("Microsoft.XMLHTTP");else{g("Ajax request error: Unsupported browser.");return}this.send=this.send=function(){function h(){if(c.readyState==4){a=c.status===0?x?"Request aborted.":"Request failed. Check the browser console for more details.":c.status+" - "+c.statusText;f.onready!=null&&f.onready(f);if(c.status==200){d=true;f.onsuccess!=null&&f.onsuccess(f)}else{d=false;f.suppressAlert!=true&&g(a);f.onfail!=
3
- null&&f.onfail(f)}e=false}}var j,l=null,m=null,q=null;if(f.method==null)l="GET";else if(typeof f.method!="string"&&(f.method.toUpperCase()!="GET"||f.method.toUpperCase()!="POST"||f.method.toUpperCase()!="PUT"||f.method.toUpperCase()!="DELETE")){g('Invalid value for property: "method".');return}else l=f.method.toUpperCase();if(l=="POST"||l=="PUT"||l=="DELETE"){if(f.reqData!=null)q=f.reqData;else if(f.postData!=null)q=f.postData;if(q!=null){if(typeof q!="string"){g('Invalid value for property: "postData".');
4
- return}}else q=""}if(f.async==null)m=true;else if(f.async!=true&&f.async!=false){g('Invalid value for property: "async".');return}else m=f.async;if(typeof f.url!="string")g('Invalid value for property: "url".');else{if(f.user!=null)if(typeof f.user!="string"){g('Invalid value for property: "user".');return}if(f.password!=null)if(typeof f.password!="string"){g('Invalid value for property: "password".');return}if(f.onsuccess!=null)if(typeof f.onsuccess!="function"){g('Invalid value for event: "onsuccess".');
5
- return}if(f.onfail!=null)if(typeof f.onfail!="function"){g('Invalid value for event: "onfail".');return}if(f.onready!=null)if(typeof f.onready!="function"){g('Invalid value for event: "onready".');return}var o=true;if(q!=null)for(j in f.headers)if(j.toUpperCase()=="CONTENT-TYPE")if(f.headers[j].toLowerCase().indexOf("www-form-urlencoded")==-1)o=false;var t=f.url,n=f.params;if(typeof n=="object"){var k="";for(j in n){var r=n[j],p=[];if(typeof r=="object"){if(r.length!=null&&r.length>0)p=r}else p.push(r);
6
- for(r=0;r<p.length;r++){if(k!="")k+="&";k+=encodeURIComponent(j)+"="+encodeURIComponent(p[r])}}if(k!="")if(o&&(l=="POST"||l=="PUT"||l=="DELETE")){if(q!=null&&q!="")q+="&";else q="";q+=k}else{o=t.split("?");if(o.length==2&&o[1]!="")t=o[0]+"?"+o[1]+"&"+k;else t+="?"+k}}if(l==="GET"&&(f.cacheBuster===null||f.cacheBuster===true))t=pui.addUrlCacheBuster(t);try{typeof f.user=="string"&&typeof f.password=="string"?c.open(l,t,m,f.user,f.password):c.open(l,t,m);t=false;var s=f.headers;for(j in s){c.setRequestHeader(j,
7
- s[j]);if(j.toUpperCase()=="CONTENT-TYPE")t=true}if(l=="POST"||l=="PUT"||l=="DELETE")t||c.setRequestHeader("Content-type","application/x-www-form-urlencoded");typeof f.overrideMimeType=="string"&&typeof c.overrideMimeType=="function"&&c.overrideMimeType(f.overrideMimeType)}catch(v){g(v);return}e=true;var x=false;if(m==true){c.onload=h;c.onerror=h;c.onabort=function(){x=true;h()}}if(f.sendAsBinary==true)try{c.sendAsBinary(q)}catch(E){c.send(q)}else c.send(q);m!=true&&h()}};this.ok=this.N=function(){return d!=
8
- null?d:false};this.getResponseText=this.d=function(){return c.responseText};this.getResponseXML=this.w=function(){return c.responseXML};this.getStatus=this.e=function(){return c.status};this.getStatusText=this.n=function(){return c.statusText};this.getStatusMessage=this.m=function(){return a};this.getAllResponseHeaders=this.getAllResponseHeaders=function(){if(d)try{return c.getAllResponseHeaders()}catch(h){g(h)}};this.getResponseHeader=this.getResponseHeader=function(h){if(d)try{return c.getResponseHeader(h)}catch(j){g(j)}};
9
- this.setRequestHeader=this.setRequestHeader=function(h,j){f.headers[h]=j};this.abort=this.abort=function(){if(e===true)try{c.abort()}catch(h){g(h)}}}
10
- function y(b,c){var a,d,e,g="";if(arguments.length==1&&typeof arguments[0]=="object"){a=arguments[0];a.async=null;a.onsuccess=null;if(typeof a.handler=="function"){d=true;e=a.handler}else d=false}else if(c!=null&&typeof c=="function"){d=true;e=c}else d=false;a=new w(arguments[0]);a.async=d;a.onsuccess=function(f){g+=f.d();d==true&&e(g)};a.send();if(d==false)return g}
11
- function B(b,c){var a,d,e,g=null,f=false;if(arguments.length==1&&typeof arguments[0]=="object"){a=arguments[0];a.async=null;a.onsuccess=null;if(a.saveResponse==true)f=true;if(typeof a.handler=="function"){d=true;e=a.handler}else d=false}else if(c!=null&&typeof c=="function"){d=true;e=c}else d=false;a=new w(arguments[0]);a.async=d;a.onsuccess=function(i){i=i.d();if(f&&typeof pui=="object")pui.savedJSON=i;try{g=eval("("+i+")")}catch(h){e(null,h);return}d==true&&e(g)};a.send();if(d==false)return g}
12
- if(typeof window.pui=="undefined")window.pui={};window.RPGspRequest=w;window.pui.Ajax=w;window.pui.AjaxRequest=w;window.ajax=y;
13
- window.ajaxXML=function(b,c){var a,d,e,g=null;if(arguments.length==1&&typeof arguments[0]=="object"){a=arguments[0];a.async=null;a.onsuccess=null;a.onfail=null;a.onsuccess=null;if(typeof a.handler=="function"){d=true;e=a.handler}else d=false}else if(c!=null&&typeof c=="function"){d=true;e=c}else d=false;a=new w(arguments[0]);a.async=d;a.onsuccess=function(f){g=f.w();d==true&&e(g)};a.send();if(d==false)return g};window.ajaxJSON=B;
14
- window.ajaxSubmit=function(b,c){var a,d="",e=typeof pui!="undefined"&&typeof pui.alert!="undefined"?pui.alert:alert;if(typeof b=="object")a=b;else{a=document.getElementById(b);if(a==null)a=document.forms[b]}var g;if(a!=null)g=a.tagName;if(a==null||g==null||g.toUpperCase()!="FORM"){e("Ajax request error: Invalid form object.");return""}if(b.action==""){e("Ajax request error: Invalid form action.");return""}for(e=0;e<a.elements.length;e++){g=a.elements[e];if(g.name!=null&&g.name!=""){var f=false;if(g.tagName==
15
- "INPUT"){var i=g.type;i=i.toLowerCase();if(i=="hidden")f=true;if(i=="password")f=true;if(i=="text")f=true;if(pui.oa(i))f=true;if(i=="")f=true;if(i=="checkbox"||i=="radio")if(g.checked)f=true}if(g.tagName=="TEXTAREA")f=true;if(g.tagName=="SELECT")f=true;if(f){if(d!="")d+="&";d+=g.name+"="+encodeURIComponent(g.value)}}}a=new w(a.action);a.method="POST";a.postData=d;var h="",j;if(c!=null&&typeof c=="function")j=true;else{j=false;a.async=false}a.onsuccess=function(l){h+=l.d();j==true&&c(h)};a.send();
16
- if(j==false)return h};function D(b,c){var a,d;a=b!=null&&typeof b=="object"?b:document.getElementById(b);if(a==null)return"";d="";if(a.tagName.toLowerCase()=="div"){d=a.firstChild;d=d!=null&&d.tagName!=null&&d.tagName=="A"?d.innerHTML:a.innerHTML}if(a.tagName=="INPUT"&&a.type=="checkbox"){if(a.indeterminate===true)return a.indeterminateValue;if(a.checked&&a.checkedValue!=null)return a.checkedValue;if(!a.checked&&a.uncheckedValue!=null)return a.uncheckedValue;return a.checked}if(a.tagName=="INPUT"&&a.type=="radio")return a.checked;
17
- if(a.tagName=="TEXTAREA")d=a.value;else if(a.tagName=="INPUT"){var e=a.j;if(c&&e!=null&&typeof e.value==="string")if(e.value.length>0)d=a.j.value;else{if(pui["force auto complete match"]==false)d=a.value}else d=a.value}else if(a.tagName=="SELECT"){d=a.selectedIndex;d=d>=0?a.options[d].value:a.pui&&a.pui.properties&&a.pui.properties.value?a.pui.properties.value:a.value}if(a.comboBoxWidget!=null)d=a.comboBoxWidget.getValue();if(a.h!=null)d=a.h.getValue();if(a.signaturePad!=null)d=a.signaturePad.getValue();
18
- if(a.A!=null)d=String(a.value);if(a.g!=null){d="";if(a.g.K&&a.g.O!=null)d=a.g.O;else if(!a.g.K&&a.g.M!=null)d=a.g.M}if(a.pui&&a.pui.widget&&typeof a.pui.widget.getPropertyValue==="function")d=a.pui.widget.getPropertyValue("value");for(d=d.replace(/&nbsp;/g," ");d.indexOf(String.fromCharCode(160))!=-1;)d=d.replace(String.fromCharCode(160)," ");if(d==a.ha)d="";return d}function G(b){if(typeof b!=="string")return b;for(;b.charAt(0)==" ";)b=b.replace(b.charAt(0),"");return b}
19
- function I(b){if(typeof b!=="string")return b;return b.replace(/^\s*|\s*$/g,"")}pui.detachCalendar=function(b){if(typeof b=="string")b=document.getElementById(b);b!=null&&pui.sa(b)};
20
- function J(b,c,a){var d=false,e=location.href;e=e.split("?")[0];e=e.split("/");if(e.length>2&&e[e.length-2].toLowerCase()=="auth")d=true;e="/profoundui/";var g=["PUI0009101.PGM","PUI0009102.PGM","PUI0009103.PGM","PUI0009104.PGM","PUI0009107.PGM","PUI0009109.PGM","PUI0009110.PGM","PUI0009119.PGM"];if(typeof pui.widgetURLPrefix==="string"&&g.indexOf(b.toUpperCase())!=-1){e=pui.widgetURLPrefix;if(e.substr(e.length-1)!="/")e+="/"}if(d==true||a==true)e+="auth/";e+=b;if(c!=null&&c==true)e+="/"+PSID;if(pui.serverURL!=
21
- null)e=pui.serverURL+e;return e}pui.getProgramURL=J;pui.ja=function(b){return pui.v(b).x};pui.ka=function(b){return pui.v(b).y};
22
- pui.v=function(b){b=b||window.event;var c={x:0,y:0};if(b!=null&&b.touches!=null&&b.touches.length==1){c.x=b.touches[0].pageX;c.y=b.touches[0].pageY}else if(b!=null){if(b.pageX)c.x=b.pageX;else if(b.clientX)c.x=b.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);if(b.pageY)c.y=b.pageY;else if(b.clientY)c.y=b.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)}return c};
23
- function K(){var b={},c="";c=location.search.substring(1,location.search.length);if(c.length==0)return b;c=c.replace(/\+/g," ");c=c.split("&");for(var a=0;a<c.length;a++){var d=c[a].split("="),e=decodeURIComponent(d[0]),g="";if(d.length==2)g=decodeURIComponent(d[1]);b[e]=g}return b}if(typeof applyDesignProperty!="undefined")window.aa=applyDesignProperty;
24
- pui.r={u:function(b){for(var c="",a=0;a<b.length;a++){var d=b.codePointAt(a);d>65535&&a++;if(d<128)c+=String.fromCharCode(d);else{if(d<2048)c+=String.fromCharCode(d>>6|192);else{if(d<65536)c+=String.fromCharCode(d>>12|224);else{c+=String.fromCharCode(d>>18|240);c+=String.fromCharCode(d>>12&63|128)}c+=String.fromCharCode(d>>6&63|128)}c+=String.fromCharCode(d&63|128)}}return c},t:function(b){for(var c="",a=0,d=0,e=0,g=0,f=0;a<b.length;){d=b.charCodeAt(a);if(d<128){c+=String.fromCharCode(d);a++}else if(d<
25
- 224){e=b.charCodeAt(a+1);c+=String.fromCharCode((d&31)<<6|e&63);a+=2}else if(d<240){e=b.charCodeAt(a+1);g=b.charCodeAt(a+2);c+=String.fromCharCode((d&15)<<12|(e&63)<<6|g&63);a+=3}else{e=b.charCodeAt(a+1);g=b.charCodeAt(a+2);f=b.charCodeAt(a+3);c+=String.fromCodePoint((d&7)<<18|(e&63)<<12|(g&63)<<6|f&63);a+=4}}return c}};
26
- pui.W={c:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u:function(b){var c="",a,d,e,g,f,i,h=0;for(b=pui.r.u(b);h<b.length;){a=b.charCodeAt(h++);d=b.charCodeAt(h++);e=b.charCodeAt(h++);g=a>>2;a=(a&3)<<4|d>>4;f=(d&15)<<2|e>>6;i=e&63;if(isNaN(d))f=i=64;else if(isNaN(e))i=64;c=c+this.c.charAt(g)+this.c.charAt(a)+this.c.charAt(f)+this.c.charAt(i)}return c},t:function(b){var c="",a,d,e,g,f,i=0;for(b=b.replace(/[^A-Za-z0-9+/=]/g,"");i<b.length;){a=this.c.indexOf(b.charAt(i++));d=this.c.indexOf(b.charAt(i++));
27
- g=this.c.indexOf(b.charAt(i++));f=this.c.indexOf(b.charAt(i++));a=a<<2|d>>4;d=(d&15)<<4|g>>2;e=(g&3)<<6|f;c+=String.fromCharCode(a);if(g!=64)c+=String.fromCharCode(d);if(f!=64)c+=String.fromCharCode(e)}return c=pui.r.t(c)}};
28
- pui.downloadJSON=function(){if(pui.recordTest)pui.saveRecording();else if(pui.savedJSON==null)pui.alert("JSON is not available.");else{var b=pui.savedJSON;if(typeof JSON==="object"&&typeof JSON.parse==="function"&&typeof JSON.stringify==="function")try{b=JSON.stringify(JSON.parse(pui.savedJSON),null," ")}catch(c){}pui.F("text/plain","json.txt",b)}};
29
- pui.saveRecording=function(b){for(var c=null,a=0;a<pui.b.payloads.length;a++){if(!c&&pui.b.responses[a].appJob)c=pui.b.responses[a].appJob.user;pui.b.payloads[a].response=pui.b.responses[a]}var d=K().testid;(a=d)||(a=prompt("Enter recording name"));if(a)if(pui.pjsServer)if(pui.b.payloads.length===0)pui.alert("No recording to save.");else{c={id:d,appuser:c,payloads:pui.b.payloads};a={"Content-Type":"application/json"};if(sessionStorage["atrium-token"])a.Authorization="Basic "+sessionStorage["atrium-token"];
30
- fetch("/auto-testing/save-recording",{method:"POST",headers:a,body:JSON.stringify(c)}).then(function(g){if(g.ok){window.parent&&window.parent.Atrium&&window.parent.Atrium.api&&typeof window.parent.Atrium.api.reloadNavParent==="function"&&window.parent.Atrium.api.reloadNavParent("test-"+d);pui.b={payloads:[],responses:[]};typeof b==="function"?b():pui.alert("Recording saved.")}else pui.alert("Failed to save recording.")})["catch"](function(g){pui.alert("Error: Unable to save recording.");console.error("Fetch error:",
31
- g)})}else{c=JSON.stringify({user:c,payloads:pui.b.payloads});var e=a;e.endsWith(".json")||(e+=".json");if(pui["recording path"]){a=[];a.push({name:"path",value:pui["recording path"]+e});a.push({name:"text",value:"1"});a.push({name:"replace",value:"Y"});a.push({name:"json",value:c,fileName:e});c=new pui.X;c.Y(a);a=J("PUI0001109.pgm");a=a.replace("/auth","");c.send(a,function(g){var f,i={};if(g.e()!=200)f=g.m();if(!f){i=eval("("+g.d()+")");i.success||(f=i.errorText)}if(f)pui.alert(f);else{pui.alert("Recording saved.");
32
- pui.b={payloads:[],responses:[]}}})}else pui.F("text/plain",e,c)}};
33
- pui.keepAlive=function(){var b;if(!(context=="genie"&&pui.f.i==true)){if(context=="dspf")b=pui.f==null?J("PUI0001200.pgm"):J("PUI0002110.pgm");else if(context=="genie")b=window.DOCUMENT_URI;else return false;if(pui.psid!=null&&pui.psid!="")b+="/"+pui.psid;if(pui.overrideSubmitUrl!=null&&typeof pui.overrideSubmitUrl=="function")try{b=pui.overrideSubmitUrl(b)}catch(c){}if(context=="genie")pui.B(pui.f.i=true);if(context=="dspf")pui.q=false;pui.va();var a={keepalive:"1"};if(pui.isCloud)a.workspace_id=
34
- pui.cloud.ws.id;y({url:pui.Z(b),method:"post",params:a,sendAsBinary:false,suppressAlert:true,handler:function(){pui.I();if(context=="genie")pui.B(pui.f.i=false);if(context=="dspf")pui.q=true;for(var d=0;d<pui.o.length;d++)pui.o[d].unMask()},onfail:function(d){pui.onoffline==null&&!pui["suppress comm errors"]&&pui.alert(pui.la(d));pui.I();if(context=="genie")pui.B(pui.f.i=false);if(context=="dspf")pui.q=true;for(d=0;d<pui.o.length;d++)pui.o[d].unMask();pui.onoffline!=null&&pui.onoffline()}});return true}};
35
- pui.getWindowSize=function(){var b,c;if(document.body&&document.body.offsetWidth){b=document.body.offsetWidth;c=document.body.offsetHeight}if(document.compatMode=="CSS1Compat"&&document.documentElement&&document.documentElement.offsetWidth){b=document.documentElement.offsetWidth;c=document.documentElement.offsetHeight}if(window.innerWidth&&window.innerHeight){b=window.innerWidth;c=window.innerHeight}if(window.visualViewport&&window.visualViewport.width&&window.visualViewport.height){b=window.visualViewport.width;
36
- c=window.visualViewport.height}if(document.documentElement&&document.documentElement.clientWidth){b=document.documentElement.clientWidth;c=document.documentElement.clientHeight}if(b==null&&screen!=null)b=screen.width;if(c==null&&screen!=null)c=screen.height;if(b==null)b=800;if(c==null)c=600;return{width:b,height:c}};pui.openURL=function(b){window.open(b)};
37
- pui.normalizeURL=function(b,c){if(b==null||typeof b!="string")return"";if(c==true&&window.puiMobileClient==null)return b;if(b.substr(0,5).toLowerCase()=="http:"||b.substr(0,6).toLowerCase()=="https:"||b.substr(0,5).toLowerCase()=="data:")return b;return pui.serverURL!=null?pui.serverURL+b:window.cordova&&b.substr(0,1)=="/"?b.substr(1):b};
38
- pui.animate=function(b){var c,a,d=b.element;if(typeof d=="string")d=document.getElementById(d);if(d!=null){var e;c=b.effect;if(c=="fly in left"||c=="fly in right"||c=="fly out left"||c=="fly out right")e="left";else if(c=="fly in up"||c=="fly in down"||c=="fly out up"||c=="fly out down")e="top";else if(c=="fade in"||c=="fade out")e="opacity";else{e=b.properties;if(e==null){e=b.property;if(e==null)return}}if(typeof e=="string")e=[e];var g=b.duration;if(g==null)g="500ms";if(g.substr(g.length-1,1)!=
39
- "s")g+="s";var f=parseInt(g)*1E3;if(g.length>2&&g.substr(g.length-2,2)=="ms")f=parseInt(g);var i=b.type;if(i==null)i="ease";var h=b.from,j=b.to;switch(c){case "fly in right":h=-d.offsetWidth;h+="px";j="0px";break;case "fly in left":h=d.offsetWidth;h+="px";j="0px";break;case "fly out left":j=-d.offsetWidth;j+="px";h="0px";break;case "fly out right":j=d.offsetWidth;j+="px";h="0px";break;case "fly out down":j=d.offsetHeight;j+="px";h="0px";break;case "fly out up":j=-d.offsetHeight;j+="px";h="0px";break;
40
- case "fly in up":h=d.offsetHeight;h+="px";j="0px";break;case "fly in down":h=-d.offsetHeight;h+="px";j="0px";break;case "fade in":h="0";j="100";break;case "fade out":h="100";j="0";break}if(j!=null){var l="";for(c=0;c<e.length;c++){a=e[c];if(l!="")l+=", ";l+=a+" "+g+" "+i}var m=["transition","MozTransition","WebkitTransition","msTransition","OTransition"];if(h!=null){if(typeof h=="string"||typeof h=="number")h=[h];for(c=0;c<e.length;c++){a=e[c];d.style[a]=h[c]}}setTimeout(function(){for(var q=0;q<
41
- m.length;q++)d.style[m[q]]=l;setTimeout(function(){if(typeof j=="string"||typeof j=="number")j=[j];for(var o=0;o<e.length;o++)d.style[e[o]]=j[o];setTimeout(function(){for(var t=0;t<m.length;t++)d.style[m[t]]="";b.oncomplete!=null&&b.oncomplete()},f)},1)},1)}}};pui.getActiveElement=function(){return context=="genie"?lastActiveElement:pui.activeElement};pui.fieldExit=function(b){var c=pui.getActiveElement();if(c!=null){var a=false;if(b!=null)a=true;context=="genie"?fieldExit(c,a):pui.fa(c)}};
42
- pui.gotoNextElement=function(b){O(b,true)};pui.gotoPreviousElement=function(b){O(b,false)};
43
- function O(b,c){var a=c?1:-1,d=document.querySelectorAll("INPUT,SELECT,TEXTAREA"),e=d.length;if(!(e<2))for(var g=Array.prototype.indexOf.call(d,b),f=g+a,i;;){if(f===g)break;if(f===e)f=0;else if(f===-1)f=e-1;else{var h=i=d[f];if(i!=null&&i.comboBoxWidget!=null)h=i.comboBoxWidget.G();if(i!=null&&i.h!=null)h=i.h.G();if(h.readOnly||h.disabled||h.style.visibility==="hidden"||h.tabIndex==="-1"||!h.clientHeight||!h.clientWidth)f+=a;else{try{h.focus();if(document.activeElement!=h){f+=a;continue}setTimeout(function(){pui["highlight on focus"]&&
44
- typeof h.select=="function"&&h.select();pui.ua(null,h)},0)}catch(j){}break}}}}pui.showCalendar=function(b){var c=b;if(typeof b=="string")c=document.getElementById(b);if(c!=null)if(typeof c=="object"){var a=c.calimg;if(a!=null)if(a.click!=null&&typeof a.click=="function")a.click();else a.onclick!=null&&typeof a.onclick=="function"&&setTimeout(function(){a.onclick()},250)}};
45
- pui.getComputedStyle=function(b){var c=null;if(window.getComputedStyle)c=window.getComputedStyle(b);else if(b.currentStyle)c=b.currentStyle;return c};
46
- pui.upload=function(b,c){var a,d,e=b.dir,g=b.overwrite===true,f;if(typeof b.slimit=="number")f=b.slimit;var i;if(typeof b.flimit=="number")i=b.flimit;var h="";if(typeof b.altname=="string")h=b.altname;var j;if(typeof b.allowedTypes&&b.allowedTypes instanceof Array)j=b.allowedTypes;if(i==null)i=b.files.length;if(f==null||j==null){var l,m=[];for(a=0;a<b.files.length;a++){d=b.files[a];var q=typeof d.type!="undefined"&&d.type!=""?d.type:"application/octet-stream";pui.ba(m,q)==-1&&m.push(q);d=d.data&&
47
- d.data instanceof ArrayBuffer?d.data.byteLength:d.size;d=Math.ceil(d/1048576);if(l==null||d>l)l=d}if(f==null)f=l;if(j==null)j=m}l=J("PUI0009109.PGM");l+="?AUTH="+encodeURIComponent(pui.p?pui.p:pui.appJob.auth);if(b.mode!=="widget")l+="&mode=ajax";if(b.id)l+="&id="+encodeURIComponent(b.id);l+="&r="+Math.floor(Math.random()*1E9);if(pui.isCloud)l+="&workspace_id="+pui.cloud.ws.id;m=new FormData;m.append("dir",e);m.append("overwrite",g?"1":"0");m.append("flimit",i);m.append("slimit",f);m.append("altname",
48
- h);typeof b.generateNames=="string"&&m.append("generateNames",b.generateNames);for(a=0;a<j.length;a++)m.append("type",j[a]);for(a=0;a<b.files.length;a++){d=b.files[a];if(d.data&&d.data instanceof ArrayBuffer){var o;try{o=new Blob([d.data])}catch(t){e=new window.WebKitBlobBuilder;e.append(d.data);o=e.getBlob()}m.append("file",o)}else m.append("file",d);m.append("filename",d.name)}var n=new XMLHttpRequest;n.open("POST",l,true);n.onreadystatechange=function(){if(n.readyState==4){var k=true,r;if(n.status==
49
- 200){var p;try{p=eval("("+n.responseText+")")}catch(s){k=false;r="Server response missing or invalid."}if(p){k=p.success;if(!k)if(p.key){r=pui.getLanguageText("runtimeMsg","upload "+p.key);if(p.key=="file limit")r=r.replace("&1",i);if(p.key=="size limit")r=r.replace("&1",f)}else r=p.error}}else{k=false;r=n.status+" - "+n.statusText+".";if(n.status==0&&n.statusText=="")r="The FILE could not be found in the system."}typeof c=="function"&&c(k,r)}};if(typeof b.onabort=="function")n.onabort=b.onabort;
50
- if(typeof b.onprogress=="function"&&"upload"in n)n.upload.onprogress=b.onprogress;if(typeof b.onload=="function")n.onload=b.onload;n.send(m);return n};pui.getCookie=function(b){var c=document.cookie.split(";"),a="",d="",e="",g="";for(g=0;g<c.length;g++){a=c[g].split("=");d=a[0].replace(/^\s+|\s+$/g,"");if(d==b){if(a.length>1)e=unescape(a[1].replace(/^\s+|\s+$/g,""));return e}}return null};
51
- pui.setCookie=function(b,c,a,d,e,g,f){var i=new Date;i.setTime(i.getTime());if(a)a=a*1E3*60*60*24;i=new Date(i.getTime()+a);document.cookie=b+"="+escape(c)+(a?";expires="+i.toGMTString():"")+(d?";path="+d:"")+(e?";domain="+e:"")+(g?";secure":"")+(f?";SameSite="+f:"")};pui.deleteCookie=function(b,c,a,d,e){if(pui.getCookie(b))document.cookie=b+"="+(c?";path="+c:"")+(a?";domain="+a:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"+(d?";Secure":"")+(e?";SameSite="+e:"")};
52
- pui.refresh=function(b){if(b==null)b={};var c=b.url;b=b.skin;pui.setCookie("puiRefreshId",pui.psid,null,"/",null,null,"Strict");pui.skipConfirm=true;pui.shutdownOnClose=false;pui.confirmOnClose=false;if(b!=null){b="skin="+encodeURIComponent(b);c=window.location.href;var a=c.split("?");c=a[0];a=a[1];if(a==null)a="";a=a.split("&");for(var d=false,e=0;e<a.length;e++)if(a[e].length>=5&&a[e].substr(0,5).toLowerCase()=="skin="){a[e]=b;d=true}if(!d)if(a.length==1&&a[0]=="")a[0]=b;else a.push(b);a=a.join("&");
53
- c=c+"?"+a}if(c!=null)window.location.href=c;else window.location.reload()};
54
- pui.downloadURL=function(b){if(pui==null||pui.appJob==null||pui.appJob.auth==null||pui.appJob.auth=="")return pui.is_ie?"":"data:text/html,<!DOCTYPE html><html><body><p>To download, please connect to a Profound UI session.</p></body></html>";var c=b.inline===true;if(b.id==null)return"";var a=J("PUI0009110.PGM");a+="?id="+encodeURIComponent(b.id);if(b.contentType!=null)a+="&type="+encodeURIComponent(b.contentType);if(c)a+="&inline=1";a+="&usehttprc=0";a+="&AUTH="+encodeURIComponent(pui.p?pui.p:pui.appJob.auth);
55
- a+="&r="+Math.floor(Math.random()*1E9);return a};pui.download=function(b){var c=pui.downloadURL(b);b=b.inline===true;if(pui==null||pui.appJob==null||pui.appJob.auth==null||pui.appJob.auth=="")b=true;b?pui.openURL(c):pui.link(c)};
56
- pui.downloadFile=function(b){if(typeof b==="undefined"||b==null||typeof b.id!=="string"||b.id.length<1)pui.alert("Error downloading file. \n\n No file path given",null,"Error","Close");else{var c=pui.downloadURL(b),a=b.id,d=new XMLHttpRequest;d.responseType="blob";d.open("GET",c,true);d.send();var e=null,g=null,f=null,i=null;d.onprogress=function(h){var j=pui.extractFileNameFromContentDisposition(d.getResponseHeader("Content-Disposition"));if(!(a.split("/").pop()!=j&&j=="error.txt")){if(typeof d.onprogress.diaglogShown===
57
- "undefined"){d.onprogress.diaglogShown=true;e=document.createElement("dialog");document.body.appendChild(e);g=document.createElement("p");e.appendChild(g);f=document.createElement("button");f.innerHTML="OK";f.onclick=function(){e.close();e.remove()};i=document.createElement("button");i.innerHTML="Cancel";i.id="cancelButton";i.onclick=function(){d.abort();e.close();e.remove()};e.appendChild(i);g.innerHTML="Downloading file: "+a+"<br> Starting download...";e.showModal();d.onprogress.lastTime=Date.now()}if(Date.now()>
58
- d.onprogress.lastTime+2E3){g.innerHTML="Downloading file: "+a+"<br>"+h.type+" "+(h.loaded/1048576).toFixed(4)+" mb loaded";d.onprogress.lastTime=Date.now()}}};d.onloadend=function(){if(e!=null){e.querySelector("button[id='cancelButton']").remove();e.appendChild(f);g.innerHTML="File "+a+" downloaded successfully."}};d.onreadystatechange=function(){if(d.readyState==4&&d.status==200){var h=pui.extractFileNameFromContentDisposition(d.getResponseHeader("Content-Disposition"));if(a.split("/").pop()!=h&&
59
- h=="error.txt"){var j=new FileReader;j.onload=function(){pui.alert("Error downloading file: "+a+"\n\n"+j.result,null,"Error","Close");console.log(j.result)};j.readAsText(d.response)}else{var l=null;if(typeof b.contentType==="string"&&b.contentType.length>0)l=b.contentType;else{l=d.getResponseHeader("Content-Type").split(";")[0];if(typeof l==="string"&&l=="application/octet-stream"){var m=h.split(".").pop();if(typeof m==="string")switch(m.toLowerCase()){case "pdf":l="application/pdf";break;case "txt":l=
60
- "text/plain";break;case "csv":l="text/csv";break;case "json":l="application/json";break;case "xml":l="application/xml";break;case "html":l="text/html";break;case "htm":l="text/html";break;case "jpg":l="image/jpeg";break;case "jpeg":l="image/jpeg";break;case "png":l="image/png";break;case "gif":l="image/gif";break}}}m=["application/pdf","text/plain","text/csv","application/json","application/xml","text/html","image/jpeg","image/png","image/gif"];var q=new File([d.response],h,{type:l});q=URL.createObjectURL(q);
61
- var o=document.createElement("a");if(typeof b.inline==="boolean"&&b.inline&&m.includes(l))o.target="_blank";else o.download=h;o.name=h;o.href=q;document.body.appendChild(o);o.dispatchEvent(new MouseEvent("click",{bubbles:true,cancelable:true,view:window}));document.body.removeChild(o)}}}}};pui.extractFileNameFromContentDisposition=function(b){b=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(b);if(b!=null&&b[1])return b[1].replace(/['"]/g,"");return null};
62
- pui.focusOnContainer=function(){window.parent!=window&&pui.V(window.parent)&&window.parent.noderun||setTimeout(function(){if(pui.a==null){pui.a=document.createElement("input");pui.a.type=pui.is_touch?"button":"text";pui.a.readOnly=true;pui.a.style.position="absolute";pui.a.style.left="-999px";pui.a.style.top="-999px";pui.a.style.width="10px";pui.a.style.borderStyle="none";pui.a.style.backgroundColor="transparent";pui.runtimeContainer&&pui.runtimeContainer.appendChild(pui.a)}pui.J=true;pui.a.focus();
63
- setTimeout(function(){pui.J=false},0)},1)};pui.addCSS=function(b){var c=document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css";if(pui.is_old_ie)a.styleSheet.cssText=b;else a.innerHTML=b;c.appendChild(a)};
64
- pui.loadCSS=function(b){if(pui.H(b)!=null)return false;var c=document.getElementsByTagName("head")[0],a=document.createElement("link");a.setAttribute("rel","stylesheet");a.setAttribute("type","text/css");a.setAttribute("media","screen");a.setAttribute("href",pui.normalizeURL(b));c.appendChild(a);return true};
65
- pui.removeCSS=function(b){var c=document.getElementsByTagName("head")[0],a=pui.H(b);if(a==null){a=c.getElementsByTagName("style");for(var d=0;d<a.length;d++){var e=a[d];if(e.innerHTML==b||e.styleSheet!=null&&e.styleSheet.cssText==b){c.removeChild(e);return true}}return false}else{c.removeChild(a);return true}};
66
- pui.loadJS=function(b){if(b==null)return null;var c,a,d,e;if(typeof b=="string")c=b;if(typeof b=="object"){c=b.path;a=b.callback;d=b.onerror;e=b.test;if(e!=null&&typeof e=="function"&&e()==true)return false}if(c==null)return null;if(pui.ma(pui.normalizeURL(c))!=null)return false;b=document.getElementsByTagName("head")[0];var g=false,f=document.createElement("script");f.type="text/javascript";f.onreadystatechange=function(){if(f.readyState=="complete"||f.readyState=="loaded")if(!(e!=null&&typeof e==
67
- "function"&&e()!=true)){!g&&a!=null&&a();g=true}};f.onload=function(){if(!(e!=null&&typeof e=="function"&&e()!=true)){!g&&a!=null&&a();g=true}};if(d)f.onerror=d;f.src=pui.normalizeURL(c);b.appendChild(f);return true};
68
- pui.endOfSession=function(b){pui.confirmOnClose=false;pui.shutdownOnClose=false;if(window.puiMobileClient!=null){window.location.href="index.html";b!=null&&pui.alert(b)}else{var c=K().gobackto;if(c!=null){document.body.innerHTML="";b!=null&&pui.alert(b);location.href=c}if(navigator.app!=null&&navigator.app.exitApp!=null){document.body.innerHTML="";b!=null?pui.alert(b,function(){navigator.app.exitApp()}):navigator.app.exitApp()}}};
69
- pui.addUrlCacheBuster=function(b,c){var a=Date.now();if(typeof c==="string"&&c.toLowerCase()!=="get")return b;return b=/[&?]r=[^&]+/.test(b)?b.replace(/([&?]r=)[^&]+/,function(d,e){return e+a}):b+(b.indexOf("?")==-1?"?":"&")+"r="+a};
70
- pui.alert=function(b,c,a,d){if(window.cordova&&window.device.platform=="iOS"&&c==null&&a==null&&d==null)window.alert(b);else if(window.navigator!=null&&window.navigator.notification!=null&&window.navigator.notification.alert!=null)if(c==null&&a==null&&d==null&&window.puiMobileClient!=null&&window.puiMobileClient.alert!=null)window.puiMobileClient.alert(b);else{if(c==null)c=function(){};if(a==null)a="Profound UI";if(d==null)d="OK";window.navigator.notification.alert(b,c,a,d)}else pui.pa&&window.parent&&
71
- window.parent!=window&&pui.V(window.parent)&&window.parent.noderun?console.log("Suppressed alert: "+b):alert(b)};pui.applyProperty=function(b,c,a){return window.applyProperty(b,c,a)};pui.get=function(b){return I(D(b,void 0))};
72
- pui.set=function(b,c){var a;a=typeof b=="object"?b:document.getElementById(b);if(a!=null){if(a.tagName=="DIV")if(a.A!=null)a.A.setValue(c);else if(a.comboBoxWidget!=null)a.comboBoxWidget.setValue(c);else if(a.h!=null)a.h.setValue(c);else if(a.button&&a.button.T)a.button.T.innerHTML=c;else if(a.pui&&a.pui.widget)applyProperty(a,"value",c);else a.innerHTML=c;else if(a.tagName=="INPUT"||a.tagName=="SELECT"||a.tagName=="TEXTAREA")if(a.tagName=="INPUT"&&a.type=="checkbox")a.checked=typeof c=="boolean"?
73
- c:a.checkedValue!=null&&c==a.checkedValue?true:false;else{context=="genie"&&c!=a.value&&pui.f.qa(a);a.value=c;if(a.j!=null)a.j.value=c}if(context=="dspf"||pui.U&&a.l==null){a.modified=true;pui.xa(a);var d=a.ya;if(a.id!=null&&a.id.indexOf(".")==-1&&a.D!=null)pui.ea[a.D]=true;if(d!=null){d.na();d.ga=true;pui.ta(a,d.ia())}}if(context=="genie"&&a.l!=null&&a.l.idx!=null)pui.response[a.l.idx]=a;pui.ca(a);if(a.pui&&a.pui.properties)a.pui.properties.value=c}};
74
- pui.getActiveContainer=function(){if(context=="genie"){for(var b=1,c=document.getElementById("window"+b);c;){var a=document.getElementById("window"+ ++b);if(a)c=a;else break}if(c)return c}else if(context=="dspf"&&pui.L)return pui.L;return pui.runtimeContainer};pui.getDisplayType=function(){return pui.U?"5250-handler":context=="dspf"?"rdf":"5250"};
75
- function P(b){function c(){if(!(l>=j.length)){o=j[l].command;t=j[l].wait;l+=1;if(typeof pui.onPCCommand=="function")try{var k=pui.onPCCommand(o,t);if(k==null||k==true){setTimeout(c,0);return}}catch(r){showFailureMessage(o)}q="?cmd="+encodeURIComponent(o)+"&wait="+(t?"1":"0");if(f==1||f==2)if(i){n.params.cmd=o;n.params.sign=1;n.params.hashalg=typeof pui["pccmd hash sign algorithm"]==="string"?pui["pccmd hash sign algorithm"].toUpperCase():"SHA-512";n.handler=e;B(n)}else a("");else if(f==3){n.params.cmd=
76
- o;n.handler=d;B(n)}else{if(l==0&&j.length>0){k=[];for(var p=0;p<j.length;p++)k.push("("+j[p].da+")");o=k.join(" && ")}try{h.runCommand(o)}catch(s){k='Unable to execute "'+o+'".\n\n';if(s!=null)k+=s.name+":\n\n"+s.message+".";alert(k)}}}}function a(k){if(f==2){var r=new Image;r.onload=c;r.onerror=function(){console.log("PC Command Listener image mode failure.");g(o)};r.src=m+q+"&type=image&rnd="+String(Math.random())+String((new Date).getTime())+k}else{k=new pui.Ajax(m+q+k);k.method="GET";k.async=
77
- t?false:true;k.suppressAlert=true;k.onfail=function(s){if(s.e()!=200){console.log("PC Command Listener comm. failure: "+s.m());g(o)}};k.onsuccess=function(s){try{var v=JSON.parse(s.d());if(!v.success&&typeof v.error==="string"){console.log("PC Command Listener failure.",v.error);g(o);return}}catch(x){}c()};try{k.send()}catch(p){console.log("PC Command Listener failure.",p);g(o)}}}function d(k,r){try{if(r)throw r;if(k==null)throw Error("Empty response from PCCMD crypt program.");if(k.error!=null||
78
- typeof k.error==="string"&&k.error.length>0)throw Error("PCCMD crypt error: "+String(k.error));if(typeof k.cmd!=="string"||k.cmd.length==0)throw Error("PCCMD crypt response was missing a command.");var p="puilaunch:"+encodeURIComponent(k.cmd),s=document.createElement("iframe");s.style.display="none";s.src=p;document.body.appendChild(s);setTimeout(function(){s!=null&&s.parentNode!=null&&document.body.removeChild(s);s=null;c()},5E3)}catch(v){console.log(v)}}function e(k,r){try{if(r)throw r;if(typeof k!==
79
- "object"||k===null)throw Error("Empty response");if(k.success!==true)throw typeof k.error==="string"&&k.error.length>0?k.error:"Unknown error";var p="";if(typeof k.sig==="string"&&k.sig.length>0)p="&sig="+encodeURIComponent(k.sig);a(p)}catch(s){console.log(s);g(o)}}function g(k){console.log("Command: "+k);k=pui.getLanguageText("runtimeMsg","pccommand error");pui["alert pccommand errors"]!==false?alert(k):console.log(k);console.log("Visit https://docs.profoundlogic.com/x/aQFK for more information on supporting STRPCCMD.")}
80
- var f=1,i=false;if(pui["use pc listener"])f=1;if(window.HTTPS!=null&&window.HTTPS=="ON"&&f==1)f=2;if(pui["pc listener mode"])f=parseInt(pui["pc listener mode"]);if(typeof pui["pc command mode"]=="string")switch(pui["pc command mode"]){case "applet":f=0;break;case "listener":case "listener_m1":f=1;break;case "listener_m1s":f=1;i=true;break;case "listener_m2":f=2;break;case "listener_m2s":f=2;i=true;break;case "launcher":f=3;break;default:f=1;console.log("Unsupported pc command mode:",pui["pc command mode"])}if(f==
81
- 0){var h=document.getElementById("PCCommandApplet");if(!h){pui.s=b;loadPCCommandApplet("runCommandCb");return}}var j=[],l=0;j=typeof b=="string"?[{command:b,wait:false}]:b;b=parseInt(pui["pc listener port"],10);if(isNaN(b))b="80";var m="http://localhost:"+b+"/",q="",o,t,n={url:J("PUI0009117.pgm"),method:"post",params:{auth:pui.appJob&&pui.appJob.auth?pui.appJob.auth:""},async:true};c()}window.runCommandCb=function(){P(pui.s);pui.s=null};pui.runPCCommand=P;
82
- pui.isServerBusy=function(){if(typeof context=="undefined")return false;if(context=="dspf"&&pui.q===false||context=="genie"&&pui.f.i===true)return true;for(var b=document.getElementsByTagName("iframe"),c=0;c<b.length;c++){var a=b[c].contentWindow;if(a!=null){var d=null;try{d=a.pui}catch(e){}if(d!=null)if(typeof d==="object")if(typeof d.isServerBusy==="function")if(d.isServerBusy())return true}}return false};
83
- pui.showLastError=function(){if(errors.length==0)alert("No errors have been reported.");else{var b=errors.length-1;alert("Operation: "+errors[b].ra+"\nId: "+errors[b].id+"\n\nMessage: "+errors[b].text+"\n"+errors[b].wa)}};
84
- pui.editCode=function(b,c){function a(u,z){var A=["","","","nn/n","nn/nn","nn/nn/n","nn/nn/nn","nnn/nn/nn","nn/nn/nnnn","nnn/nn/nnnn"];if(i.dateEdit==="*ymd"){A[8]="nnnn/nn/nn";A[9]="nnnnn/nn/nn"}A=A[v];u=String(u);u=u.replace(".","");u=u.replace(",","");u=u.replace("-","");u="0000000000"+u;u=u.substr(u.length-z);var L="/";if(i.dateEditSeparator!=null)L=i.dateEditSeparator;for(var H=false,M=0,N="",F=0;F<A.length;F++){var C=A.substr(F,1),Q=A.substr(F+1,1);if(C==="/"||Q==="/")H=true;if(C==="/")C=L;
85
- else{C=u.substr(M,1);M+=1;if(C==="0")H||(C=" ");else H=true}N+=C}return N}function d(u,z,A){for(u+="";u.length<z;)u+=A;return u}var e=null,g=0,f=null,i={},h=2;if(typeof arguments[h]==="number"){e=arguments[h];h++;if(typeof arguments[h]==="number"){g=arguments[h];h++}}if(typeof arguments[h]==="string"){f=arguments[h];h++}if(typeof arguments[h]==="object"){i=arguments[h];h++}var j=false;if(f==="*astfill"){j=true;f=null}var l=false,m=null,q=false,o=h=false;h=" ";if(pui.appJob&&typeof pui.appJob.decimalFormat===
86
- "string")h=pui.appJob.decimalFormat;var t=h==="I"||h==="J",n=h==="J";if(i.decimalEdit!=null){t=i.decimalEdit===","||i.decimalEdit==="0,";n=i.decimalEdit==="0."||i.decimalEdit==="0,"}if(c>="1"&&c<="4")m="999.00";if(c>="A"&&c<="D")m="999.00CR";if(c>="J"&&c<="M")m="999.00-";if(c>="N"&&c<="Q")m="-999.00";if(c=="1"||c=="A"||c=="J"||c=="N"||c=="2"||c=="B"||c=="K"||c=="O")q=true;h=c=="1"||c=="A"||c=="J"||c=="N"||c=="3"||c=="C"||c=="L"||c=="P"?true:false;if(c=="Z")m="999.00";if(c==="X"||c==="Z")o=true;if(c===
87
- "X")l=true;c>="5"&&c<="9"&&pui.alert("User-defined edit code not supported: "+c+".");c>="1"&&c<="9"||c>="A"&&c<="D"||c>="J"&&c<="Q"||c>="X"&&c<="Z"||pui.alert("Invalid edit code: "+c+".");var k=(b||0)+"",r=parseFloat(k,10)||0,p;p=k.replace(/\..*/,"");if(p==="-0")p="-";if((p==""||p=="-")&&n)p="0";var s;s=k;if(s.indexOf(".")==-1)s+=".";s=s.replace(/.*\./,"");var v=p.length;if(v<3)v=3;var x=s.length;if(typeof e==="number")v=e;if(typeof g==="number")x=g;if(c=="Y"){if(v<3||v>9)pui.alert("Length not valid for edit code Y.");
88
- return a(r,v)}e=".";if(t)e=",";if(o)e="";if(x>0){s=d(s,x,"0");if(p==="0"&&!n)p="";k=p+e+s}var E=" ";if(l)E="0";if(j)E="*";if(q){for(g=/(\d+)(\d{3})/;g.test(p);)p=p.replace(g,"$1"+(t?".":",")+"$2");k=p+(x>0?e+s:"")}t=r<0;k=k.replace(/-/g,"");if(m==="(999.00)"){if(t)k="("+k+")"}else if(m==="999.00-")k+=t?"-":" ";else if(m==="999.00CR")k+=t?"CR":" ";else if(m==="-999.00")if(t)k="-"+k;if(f)k=f=="EUR"?k+" EUR":f=="$"?k.substr(0,1)=="-"?"-"+f+k.substr(1):f+k:f+k;if(!h)if(r===0)k="";(function(){var u=v;
89
- u+=x&&!o?1:0;if(q)u+=parseInt((v-x-1)/3);if(m==="999.00CR")u+=2;if(m==="999.00-")u+=1;if(m==="-999.00")u+=1;if(typeof f==="string")u+=f.length;var z=k;for(z+="";z.length<u;)z=E+z;k=z})();return k};
90
- pui.editWord=function(b,c,a){function d(){if(n.length>0){var p=n.substr(n.length-1,1);n=n.substr(0,n.length-1);if(p=="0"&&n.length==0&&r)p=k?"*":" "}else{p="0";if(r)p=" ";if(k)p="*"}return p}var e,g;b=String(b);var f={};if(typeof a==="object")f=a;a="$";if(f.currencySymbol!=null)a=f.currencySymbol;var i=c.indexOf("0")+1,h=c.indexOf("*")+1;if(i==0||h!=0&&h<i)i=h;var j=-1;for(e=c.length-1;e>=0;e-=1)if(e+1==i||c.substr(e,1)==" "){j=e;break}h=c.substr(0,j+1);var l="",m="",q=false,o=false,t=c.substr(j+
91
- 1).indexOf("-")>=0||c.substr(j+1).indexOf("CR")>=0;for(e=j+1;e<c.length;e++){g=c.substr(e,1);if(c.substr(e,2)=="CR"){o=true;e++}else if(g=="-")o=true;else if(g!="&")if(!(g=="*"&&!o))if(g.toUpperCase()>="A"&&g.toUpperCase()<="Z"&&t&&!o)c=c.substr(0,e)+" "+c.substr(e+1);else{l=c.substring(j+1,e);m=c.substr(e);q=true;break}}q||(l=c.substr(j+1));g=".";e=" ";if(pui.appJob&&typeof pui.appJob.decimalFormat==="string")e=pui.appJob.decimalFormat;if(typeof f.decimalFormat==="string")e=f.decimalFormat;if(e===
92
- "I"||e==="J")g=",";e=0;g=h.split(g);if(g.length>1)e=g[1].replace(/[^ ]/g,"").length;var n;n=isNaN(Number(b))?"0":String(b);n=n.replace("-","");g=n.split(".");f=g[0];c="";j=null;if(g.length>1)c=g[1];if(j==null||isNaN(j))j=e;for(;c.length>j;)c=c.substr(0,c.length-1);for(;j>c.length;)c+="0";for(n=f+c;n.substr(0,1)=="0";)n=n.substr(1);f="";var k=j=false;var r=c=false;if(i==0)r=true;for(e=h.length-1;e>=0;e-=1){q=g=h.substr(e,1);if(g==" ")q=d();else if(g=="&")q=" ";else if(g=="0"&&e+1==i)q=d();else if(g==
93
- "*"){k=true;q=d()}else if(g==a){if(e+2==i){q=d();c=true}}else if(j){q=" ";if(k)q="*"}f=q+f;if(e<=i)r=true;if(r&&n.length==0)j=true}l=l.replace(/&/g," ");l=l.replace(/\*/g," ");if(b>=0){l=l.replace("CR"," ");l=l.replace("-"," ")}f=f+l+m;b=f.length-1;f=G(f);if(k&&f.substr(0,1)!="*")f="*"+f;if(c)f=a+f;a=0;if(f[f.length-1]==="-")a=1;for(;f.length<=b;)f=" "+f;return f};
94
- pui.getRadioGroupValue=function(b){if(typeof b!=="string")return null;if(typeof pui.z!=="object")return null;for(var c=null,a=pui.currentFormatNames,d=a.length-1;d>=0;d--){var e=a[d].toUpperCase()+"."+b.toUpperCase();if(typeof pui.z[e]!=="undefined"){c=pui.z[e];break}}if(c==null)return null;b=null;for(a=0;a<c.length;a++){d=c[a];if(d.checked&&d.radioValue!=null){b=d.radioValue;break}}return b};pui.S=function(){for(var b=document.getElementById("auth-form"),c=document.cookie.split("; "),a=false,d=0;d<c.length;d++){var e=c[d].split("=");if(unescape(e[0])=="pui-signon-"+b.action)if(unescape(e[1])=="1"){a=true;break}}if(typeof Storage!="undefined"){c=K();if(c.workstnid)sessionStorage["atrium-params-workstnid"]=c.workstnid;else try{delete sessionStorage["atrium-params-workstnid"]}catch(g){}if(c.suffixid)sessionStorage["atrium-params-suffixid"]=c.suffixid;else try{delete sessionStorage["atrium-params-suffixid"]}catch(f){}if(c.duplicateid)sessionStorage["atrium-params-duplicateid"]=
95
- c.duplicateid;else try{delete sessionStorage["atrium-params-duplicateid"]}catch(i){}}if(a)location.href=b.action;else{if(a=document.getElementById("auth-box"))a.style.display="";b.elements["auth-user"].focus()}};
96
- pui.R=function(){var b=document.getElementById("auth-form"),c=b.elements["auth-user"].value,a=b.elements["auth-password"].value,d=document.getElementById("auth-message"),e={"server unavailable":"The server could not be reached at {connectorURL}.<br>Please check your network connection and try again.","error authenticating":"An error occurred while authenticating the user."},g="";d.innerHTML="";if(I(c)==""){d.innerHTML=authMessages["user required"];b.elements["auth-user"].focus();return false}else if(I(a)==
97
- ""){d.innerHTML=authMessages["password required"];b.elements["auth-password"].focus();return false}if(pui.pjsServer){var f="Basic "+btoa(I(c)+":"+I(a));fetch("/profoundui/atrium/authenticate",{method:"POST",headers:{Authorization:f}}).then(function(i){if(i.ok){document.cookie=escape("pui-signon-"+b.action)+"=1; path=/";sessionStorage.setItem("atrium-token",btoa(I(c)+":"+I(a)));location.href=b.action}else if(i.status===401){d.innerHTML=authMessages["invalid credentials"];b.elements["auth-user"].focus()}else if(i.status===
98
- 503)i.json().then(function(h){g=authMessages["server unavailable"]||e["server unavailable"];d.innerHTML=g.replace(/{connectorURL}/,h.system);b.elements["auth-user"].focus()});else{g=authMessages["error authenticating"]||e["error authenticating"];d.innerHTML=g;b.elements["auth-user"].focus()}})["catch"](function(i){g=authMessages["error authenticating"]||e["error authenticating"];d.innerHTML=g;b.elements["auth-user"].focus();console.error("Error during Atrium authentication:",i)});return false}pui.k(function(){localStorage["pui-http-auth-invalid"]&&
99
- delete localStorage["pui-http-auth-invalid"];var i=new pui.Ajax("/profoundui/pui0005010.pgm");i.async=true;i.method="POST";pui.setReqAuth(i,c,a);i.suppressAlert=true;i.onready=function(h){if(h.e()==200){var j=eval("("+h.d()+")");h=j.days;var l=false;if(j.warn==true)if(h==0){j=authMessages["password expired"];pui.alert(j);l=true}else{j=authMessages["password pending expiration"];j=j.replace(/{DAYS}/g,h);l=confirm(j)}if(l){h="/profoundui/changepass";h+="?user="+encodeURIComponent(c);h+="&next="+encodeURIComponent(b.action);
100
- h+="&back="+encodeURIComponent(location.href);location.href=h}else{document.cookie=escape("pui-signon-"+b.action)+"=1; path=/";location.href=b.action}}else{d.innerHTML=authMessages["invalid credentials"];b.elements["auth-user"].focus()}};i.send()});return false};
101
- pui.k=function(b){if(typeof Atrium!=="undefined"&&Atrium.pjsServer){sessionStorage.removeItem("atrium-token");b()}else{var c=new pui.Ajax("/profoundui/pui0005010.pgm");c.async=typeof b==="function"?true:false;c.method="POST";pui.setReqAuth(c,"PUI_SIGNOFF_USER","PUI_SIGNOFF_USER");c.suppressAlert=true;if(typeof b==="function")c.onready=function(){typeof b=="function"&&b()};c.send()}};window.pui.signOn=pui.R;window.pui.clearCredentials=pui.k;window.pui.signOnInit=pui.S;
102
- pui.Q=function(){var b=K(),c=document.getElementById("change-user"),a=document.getElementById("change-current"),d=c,e=document.getElementById("change-cancel");if(typeof b.user!="undefined"){c.value=b.user.toUpperCase();c.readOnly=true;c.className+=" read-only";d=a}if(typeof b.back=="undefined")e.style.display="none";document.getElementById("change-box").style.display="block";d.focus()};pui.P=function(){var b=K();if(typeof b.back!="undefined")location.href=b.back};
103
- pui.C=function(){if(!(typeof Atrium!=="undefined"&&Atrium.pjsServer)){var b=K(),c=document.getElementById("change-form"),a=c.elements["change-user"].value,d=c.elements["change-current"].value,e=c.elements["change-new"].value,g=c.elements["change-confirm"].value,f=document.getElementById("change-message");f.innerHTML="";if(I(a)==""){f.innerHTML=passMessages["user required"];c.elements["change-user"].focus();return false}else if(I(d)==""){f.innerHTML=passMessages["current required"];c.elements["change-current"].focus();
104
- return false}else if(I(e)==""){f.innerHTML=passMessages["new required"];c.elements["change-new"].focus();return false}else if(I(g)==""){f.innerHTML=passMessages["confirm required"];c.elements["change-confirm"].focus();return false}else if(e!=g){f.innerHTML=passMessages["must match"];c.elements["change-new"].focus();return false}g=new pui.Ajax("/profoundui/pui0005011.pgm");g.async=true;g.method="POST";g.params={};g.params.user=a;g.params.current=d;g.params["new"]=e;g.suppressAlert=true;g.onready=function(i){if(i.e()!=
105
- 200){f.innerHTML="HTTP "+i.e()+" - "+i.n()+".";c.elements["change-user"].focus()}else{var h;try{h=eval("("+i.d()+")");if(typeof h.success!="boolean")throw Error("Invalid response format: 'success' is not a boolean.");if(!h.success&&typeof h.error!="string")throw Error("Invalid response format: 'error' is not a string.");}catch(j){h={};h.success=false;h.error="The server response is missing or invalid."}if(h.success==false){f.innerHTML=h.error;c.elements["change-user"].focus()}else{pui.alert(passMessages.success);
106
- pui.k(function(){var l=new pui.Ajax("/profoundui/pui0005010.pgm");l.async=true;l.method="POST";pui.setReqAuth(l,a,e);l.suppressAlert=true;l.onready=function(m){if(m.e()==200){if(typeof b.next!="undefined")location.href=b.next}else{pui.alert("HTTP "+m.e()+" - "+m.n()+".");c.elements["change-user"].focus()}};l.send()})}}};g.send();return false}};
107
- pui.setReqAuth=function(b,c,a){var d=navigator.userAgent.indexOf("Edge")!=-1,e=!d&&navigator.userAgent.indexOf("Chrome")!=-1;d=!d&&navigator.userAgent.indexOf("Safari")!=-1&&!e;var g=navigator.userAgent.indexOf("Firefox")!=-1;if(d||e||g){b.user=encodeURIComponent(c);b.password=encodeURIComponent(a)}else{b.user=c;b.password=a}};window.pui.passInit=pui.Q;window.pui.passCancel=pui.P;window.pui.changePass=pui.C;
1
+ function B(a){this.onready=this.onfail=this.onsuccess=this.cacheBuster=this.suppressAlert=this.password=this.user=this.async=this.url=this.reqData=this.postData=this.method=null;this.headers={};this.params=null;this.sendAsBinary=!0;var b=this.overrideMimeType=null,c=null,e=null,d=null,g="undefined"!=typeof pui&&"undefined"!=typeof pui.alert?pui.alert:alert,f=this;B.defaultHeaders&&(this.headers=B.defaultHeaders);if("object"==typeof a)for(var k in a)"undefined"!=typeof this[k]&&(this[k]=a[k]);else this.url=
2
+ a;if(window.XMLHttpRequest)b=new XMLHttpRequest;else if(window.ActiveXObject)b=new ActiveXObject("Microsoft.XMLHTTP");else{g("Ajax request error: Unsupported browser.");return}this.send=this.send=function(){function h(){if(4==b.readyState){c=0===b.status?z?"Request aborted.":"Request failed. Check the browser console for more details.":b.status+" - "+b.statusText;if(null!=f.onready)f.onready(f);if(200==b.status){if(e=!0,null!=f.onsuccess)f.onsuccess(f)}else if(e=!1,1!=f.suppressAlert&&g(c),null!=
3
+ f.onfail)f.onfail(f);d=!1}}var m,n=null,q=null,t=null;if(null==f.method)n="GET";else if("string"==typeof f.method||"GET"==f.method.toUpperCase()&&"POST"==f.method.toUpperCase()&&"PUT"==f.method.toUpperCase()&&"DELETE"==f.method.toUpperCase())n=f.method.toUpperCase();else{g('Invalid value for property: "method".');return}if("POST"==n||"PUT"==n||"DELETE"==n)if(null!=f.reqData?t=f.reqData:null!=f.postData&&(t=f.postData),null!=t){if("string"!=typeof t){g('Invalid value for property: "postData".');return}}else t=
4
+ "";if(null==f.async)q=!0;else{if(1!=f.async&&0!=f.async){g('Invalid value for property: "async".');return}q=f.async}if("string"!=typeof f.url)g('Invalid value for property: "url".');else if(null!=f.user&&"string"!=typeof f.user)g('Invalid value for property: "user".');else if(null!=f.password&&"string"!=typeof f.password)g('Invalid value for property: "password".');else if(null!=f.onsuccess&&"function"!=typeof f.onsuccess)g('Invalid value for event: "onsuccess".');else if(null!=f.onfail&&"function"!=
5
+ typeof f.onfail)g('Invalid value for event: "onfail".');else if(null!=f.onready&&"function"!=typeof f.onready)g('Invalid value for event: "onready".');else{var u=!0;if(null!=t)for(m in f.headers)"CONTENT-TYPE"==m.toUpperCase()&&-1==f.headers[m].toLowerCase().indexOf("www-form-urlencoded")&&(u=!1);var p=f.url,w=f.params;if("object"==typeof w){var l="";for(m in w){var r=w[m],v=[];"object"==typeof r?null!=r.length&&0<r.length&&(v=r):v.push(r);for(r=0;r<v.length;r++)""!=l&&(l+="&"),l+=encodeURIComponent(m)+
6
+ "="+encodeURIComponent(v[r])}""!=l&&(!u||"POST"!=n&&"PUT"!=n&&"DELETE"!=n?(u=p.split("?"),p=2==u.length&&""!=u[1]?u[0]+"?"+u[1]+"&"+l:p+("?"+l)):t=(null!=t&&""!=t?t+"&":"")+l)}"GET"!==n||null!==f.cacheBuster&&!0!==f.cacheBuster||(p=pui.addUrlCacheBuster(p));try{"string"==typeof f.user&&"string"==typeof f.password?b.open(n,p,q,f.user,f.password):b.open(n,p,q);p=!1;var y=f.headers;for(m in y)b.setRequestHeader(m,y[m]),"CONTENT-TYPE"==m.toUpperCase()&&(p=!0);if("POST"==n||"PUT"==n||"DELETE"==n)p||b.setRequestHeader("Content-type",
7
+ "application/x-www-form-urlencoded");"string"==typeof f.overrideMimeType&&"function"==typeof b.overrideMimeType&&b.overrideMimeType(f.overrideMimeType)}catch(D){g(D);return}d=!0;var z=!1;1==q&&(b.onload=h,b.onerror=h,b.onabort=function(){z=!0;h()});if(1==f.sendAsBinary)try{b.sendAsBinary(t)}catch(D){b.send(t)}else b.send(t);1!=q&&h()}};this.ok=this.ok=function(){return null!=e?e:!1};this.getResponseText=this.j=function(){return b.responseText};this.getResponseXML=this.K=function(){return b.responseXML};
8
+ this.getStatus=this.l=function(){return b.status};this.getStatusText=this.C=function(){return b.statusText};this.getStatusMessage=this.B=function(){return c};this.getAllResponseHeaders=this.getAllResponseHeaders=function(){if(e)try{return b.getAllResponseHeaders()}catch(h){g(h)}};this.getResponseHeader=this.getResponseHeader=function(h){if(e)try{return b.getResponseHeader(h)}catch(m){g(m)}};this.setRequestHeader=this.setRequestHeader=function(h,m){f.headers[h]=m};this.abort=this.abort=function(){if(!0===
9
+ d)try{b.abort()}catch(h){g(h)}}}function C(a,b){var c="";if(1==arguments.length&&"object"==typeof arguments[0]){var e=arguments[0];e.async=null;e.onsuccess=null;if("function"==typeof e.handler){var d=!0;var g=e.handler}else d=!1}else null!=b&&"function"==typeof b?(d=!0,g=b):d=!1;e=new B(arguments[0]);e.async=d;e.onsuccess=function(f){c+=f.j();1==d&&g(c)};e.send();if(0==d)return c}
10
+ function F(a,b){var c=null,e=!1;if(1==arguments.length&&"object"==typeof arguments[0]){var d=arguments[0];d.async=null;d.onsuccess=null;1==d.saveResponse&&(e=!0);if("function"==typeof d.handler){var g=!0;var f=d.handler}else g=!1}else null!=b&&"function"==typeof b?(g=!0,f=b):g=!1;d=new B(arguments[0]);d.async=g;d.onsuccess=function(k){k=k.j();e&&"object"==typeof pui&&(pui.savedJSON=k);try{c=eval("("+k+")")}catch(h){f(null,h);return}1==g&&f(c)};d.send();if(0==g)return c}
11
+ "undefined"==typeof window.pui&&(window.pui={});window.RPGspRequest=B;window.pui.Ajax=B;window.pui.AjaxRequest=B;window.ajax=C;
12
+ window.ajaxXML=function(a,b){var c=null;if(1==arguments.length&&"object"==typeof arguments[0]){var e=arguments[0];e.async=null;e.onsuccess=null;e.onfail=null;e.onsuccess=null;if("function"==typeof e.handler){var d=!0;var g=e.handler}else d=!1}else null!=b&&"function"==typeof b?(d=!0,g=b):d=!1;e=new B(arguments[0]);e.async=d;e.onsuccess=function(f){c=f.K();1==d&&g(c)};e.send();if(0==d)return c};window.ajaxJSON=F;
13
+ window.ajaxSubmit=function(a,b){var c="",e="undefined"!=typeof pui&&"undefined"!=typeof pui.alert?pui.alert:alert;if("object"==typeof a)var d=a;else d=document.getElementById(a),null==d&&(d=document.forms[a]);if(null!=d)var g=d.tagName;if(null==d||null==g||"FORM"!=g.toUpperCase())return e("Ajax request error: Invalid form object."),"";if(""==a.action)return e("Ajax request error: Invalid form action."),"";for(a=0;a<d.elements.length;a++)if(e=d.elements[a],null!=e.name&&""!=e.name){g=!1;if("INPUT"==
14
+ e.tagName){var f=e.type;f=f.toLowerCase();"hidden"==f&&(g=!0);"password"==f&&(g=!0);"text"==f&&(g=!0);pui.Aa(f)&&(g=!0);""==f&&(g=!0);("checkbox"==f||"radio"==f)&&e.checked&&(g=!0)}"TEXTAREA"==e.tagName&&(g=!0);"SELECT"==e.tagName&&(g=!0);g&&(""!=c&&(c+="&"),c+=e.name+"="+encodeURIComponent(e.value))}d=new B(d.action);d.method="POST";d.postData=c;var k="";if(null!=b&&"function"==typeof b)var h=!0;else h=!1,d.async=!1;d.onsuccess=function(m){k+=m.j();1==h&&b(k)};d.send();if(0==h)return k};function G(a){a=null!=a&&"object"==typeof a?a:document.getElementById(a);if(null==a)return"";var b="";"div"==a.tagName.toLowerCase()&&(b=a.firstChild,b=null!=b&&null!=b.tagName&&"A"==b.tagName?b.innerHTML:a.innerHTML);if("INPUT"==a.tagName&&"checkbox"==a.type)return!0===a.indeterminate?a.indeterminateValue:a.checked&&null!=a.checkedValue?a.checkedValue:a.checked||null==a.uncheckedValue?a.checked:a.uncheckedValue;if("INPUT"==a.tagName&&"radio"==a.type)return a.checked;"TEXTAREA"==a.tagName?b=a.value:
15
+ "INPUT"==a.tagName?b=a.value:"SELECT"==a.tagName&&(b=a.selectedIndex,b=0<=b?a.options[b].value:a.pui&&a.pui.properties&&a.pui.properties.value?a.pui.properties.value:a.value);null!=a.comboBoxWidget&&(b=a.comboBoxWidget.getValue());null!=a.s&&(b=a.s.getValue());null!=a.signaturePad&&(b=a.signaturePad.getValue());null!=a.M&&(b=String(a.value));null!=a.o&&(b="",a.o.X&&null!=a.o.aa?b=a.o.aa:a.o.X||null==a.o.Z||(b=a.o.Z));a.pui&&a.pui.widget&&"function"===typeof a.pui.widget.getPropertyValue&&(b=a.pui.widget.getPropertyValue("value"));
16
+ for(b=b.replace(/&nbsp;/g," ");-1!=b.indexOf(String.fromCharCode(160));)b=b.replace(String.fromCharCode(160)," ");b==a.ta&&(b="");return b}function J(a){if("string"!==typeof a)return a;for(;" "==a.charAt(0);)a=a.replace(a.charAt(0),"");return a}function M(a){return"string"!==typeof a?a:a.replace(/^\s*|\s*$/g,"")}pui.detachCalendar=function(a){"string"==typeof a&&(a=document.getElementById(a));null!=a&&pui.Ea(a)};
17
+ function N(a,b,c){var e=!1,d=location.href;d=d.split("?")[0];d=d.split("/");2<d.length&&"auth"==d[d.length-2].toLowerCase()&&(e=!0);d="/profoundui/";var g="PUI0009101.PGM PUI0009102.PGM PUI0009103.PGM PUI0009104.PGM PUI0009107.PGM PUI0009109.PGM PUI0009110.PGM PUI0009119.PGM".split(" ");"string"===typeof pui.widgetURLPrefix&&-1!=g.indexOf(a.toUpperCase())&&(d=pui.widgetURLPrefix,"/"!=d.substr(d.length-1)&&(d+="/"));if(1==e||1==c)d+="auth/";d+=a;null!=b&&1==b&&(d+="/"+PSID);null!=pui.serverURL&&(d=
18
+ pui.serverURL+d);return d}pui.getProgramURL=N;pui.va=function(a){return pui.J(a).x};pui.wa=function(a){return pui.J(a).y};
19
+ pui.J=function(a){a=a||window.event;var b={x:0,y:0};null!=a&&null!=a.touches&&1==a.touches.length?(b.x=a.touches[0].pageX,b.y=a.touches[0].pageY):null!=a&&(a.pageX?b.x=a.pageX:a.clientX&&(b.x=a.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft)),a.pageY?b.y=a.pageY:a.clientY&&(b.y=a.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)));return b};
20
+ function O(){var a={};var b=location.search.substring(1,location.search.length);if(0==b.length)return a;b=b.replace(/\+/g," ");b=b.split("&");for(var c=0;c<b.length;c++){var e=b[c].split("="),d=decodeURIComponent(e[0]),g="";2==e.length&&(g=decodeURIComponent(e[1]));a[d]=g}return a}"undefined"!=typeof applyDesignProperty&&(window.ma=applyDesignProperty);
21
+ pui.H={encode:function(a){for(var b="",c=0;c<a.length;c++){var e=a.codePointAt(c);65535<e&&c++;128>e?b+=String.fromCharCode(e):(2048>e?b+=String.fromCharCode(e>>6|192):(65536>e?b+=String.fromCharCode(e>>12|224):(b+=String.fromCharCode(e>>18|240),b+=String.fromCharCode(e>>12&63|128)),b+=String.fromCharCode(e>>6&63|128)),b+=String.fromCharCode(e&63|128))}return b},decode:function(a){for(var b="",c=0,e,d,g,f;c<a.length;)e=a.charCodeAt(c),128>e?(b+=String.fromCharCode(e),c++):224>e?(d=a.charCodeAt(c+
22
+ 1),b+=String.fromCharCode((e&31)<<6|d&63),c+=2):240>e?(d=a.charCodeAt(c+1),g=a.charCodeAt(c+2),b+=String.fromCharCode((e&15)<<12|(d&63)<<6|g&63),c+=3):(d=a.charCodeAt(c+1),g=a.charCodeAt(c+2),f=a.charCodeAt(c+3),b+=String.fromCodePoint((e&7)<<18|(d&63)<<12|(g&63)<<6|f&63),c+=4);return b}};
23
+ pui.ia={i:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){var b="",c=0;for(a=pui.H.encode(a);c<a.length;){var e=a.charCodeAt(c++);var d=a.charCodeAt(c++);var g=a.charCodeAt(c++);var f=e>>2;e=(e&3)<<4|d>>4;var k=(d&15)<<2|g>>6;var h=g&63;isNaN(d)?k=h=64:isNaN(g)&&(h=64);b=b+this.i.charAt(f)+this.i.charAt(e)+this.i.charAt(k)+this.i.charAt(h)}return b},decode:function(a){var b="",c=0;for(a=a.replace(/[^A-Za-z0-9+/=]/g,"");c<a.length;){var e=this.i.indexOf(a.charAt(c++));
24
+ var d=this.i.indexOf(a.charAt(c++));var g=this.i.indexOf(a.charAt(c++));var f=this.i.indexOf(a.charAt(c++));e=e<<2|d>>4;d=(d&15)<<4|g>>2;var k=(g&3)<<6|f;b+=String.fromCharCode(e);64!=g&&(b+=String.fromCharCode(d));64!=f&&(b+=String.fromCharCode(k))}return b=pui.H.decode(b)}};
25
+ pui.downloadJSON=function(){if(pui.recordTest)pui.saveRecording();else if(null==pui.savedJSON)pui.alert("JSON is not available.");else{var a=pui.savedJSON;if("object"===typeof JSON&&"function"===typeof JSON.parse&&"function"===typeof JSON.stringify)try{a=JSON.stringify(JSON.parse(pui.savedJSON),null," ")}catch(b){}pui.S("text/plain","json.txt",a)}};
26
+ pui.saveRecording=function(a){for(var b=null,c=0;c<pui.h.payloads.length;c++)!b&&pui.h.responses[c].appJob&&(b=pui.h.responses[c].appJob.user),pui.h.payloads[c].response=pui.h.responses[c];var e=O().testid;(c=e)||(c=prompt("Enter recording name"));if(c)if(pui.pjsServer)0===pui.h.payloads.length?pui.alert("No recording to save."):(b={id:e,appuser:b,payloads:pui.h.payloads},c={"Content-Type":"application/json"},sessionStorage["atrium-token"]&&(c.Authorization="Basic "+sessionStorage["atrium-token"]),
27
+ fetch("/auto-testing/save-recording",{method:"POST",headers:c,body:JSON.stringify(b)}).then(function(g){g.ok?(window.parent&&window.parent.Atrium&&window.parent.Atrium.api&&"function"===typeof window.parent.Atrium.api.reloadNavParent&&window.parent.Atrium.api.reloadNavParent("test-"+e),pui.h={payloads:[],responses:[]},"function"===typeof a?a():pui.alert("Recording saved.")):pui.alert("Failed to save recording.")})["catch"](function(g){pui.alert("Error: Unable to save recording.");console.error("Fetch error:",
28
+ g)}));else{b=JSON.stringify({user:b,payloads:pui.h.payloads});var d=c;d.endsWith(".json")||(d+=".json");pui["recording path"]?(c=[],c.push({name:"path",value:pui["recording path"]+d}),c.push({name:"text",value:"1"}),c.push({name:"replace",value:"Y"}),c.push({name:"json",value:b,fileName:d}),b=new pui.ja,b.ka(c),c=N("PUI0001109.pgm"),c=c.replace("/auth",""),b.send(c,function(g){var f;200!=g.l()&&(f=g.B());f||(g=eval("("+g.j()+")"),g.success||(f=g.errorText));f?pui.alert(f):(pui.alert("Recording saved."),
29
+ pui.h={payloads:[],responses:[]})})):pui.S("text/plain",d,b)}};pui.clearRecording=function(a){var b=O().testid;if(pui.pjsServer){b={id:b};var c={"Content-Type":"application/json"};sessionStorage["atrium-token"]&&(c.Authorization="Basic "+sessionStorage["atrium-token"]);fetch("/auto-testing/clear-recording",{method:"POST",headers:c,body:JSON.stringify(b)}).then(function(e){"function"===typeof a&&a(e)})["catch"](function(e){"function"===typeof a&&a(null,e)})}else"function"===typeof a&&a()};
30
+ pui.keepAlive=function(){if("genie"!=context||1!=pui.m.u){if("dspf"==context)var a=null==pui.m?N("PUI0001200.pgm"):N("PUI0002110.pgm");else if("genie"==context)a=window.DOCUMENT_URI;else return!1;null!=pui.psid&&""!=pui.psid&&(a+="/"+pui.psid);if(null!=pui.overrideSubmitUrl&&"function"==typeof pui.overrideSubmitUrl)try{a=pui.overrideSubmitUrl(a)}catch(c){}"genie"==context&&pui.N(pui.m.u=!0);"dspf"==context&&(pui.G=!1);pui.Ha();var b={keepalive:"1"};pui.isCloud&&(b.workspace_id=pui.cloud.ws.id);C({url:pui.la(a),
31
+ method:"post",params:b,sendAsBinary:!1,suppressAlert:!0,handler:function(){pui.V();"genie"==context&&pui.N(pui.m.u=!1);"dspf"==context&&(pui.G=!0);for(var c=0;c<pui.D.length;c++)pui.D[c].unMask()},onfail:function(c){null!=pui.onoffline||pui["suppress comm errors"]||pui.alert(pui.xa(c));pui.V();"genie"==context&&pui.N(pui.m.u=!1);"dspf"==context&&(pui.G=!0);for(c=0;c<pui.D.length;c++)pui.D[c].unMask();if(null!=pui.onoffline)pui.onoffline()}});return!0}};
32
+ pui.getWindowSize=function(){if(document.body&&document.body.offsetWidth){var a=document.body.offsetWidth;var b=document.body.offsetHeight}"CSS1Compat"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth&&(a=document.documentElement.offsetWidth,b=document.documentElement.offsetHeight);window.innerWidth&&window.innerHeight&&(a=window.innerWidth,b=window.innerHeight);window.visualViewport&&window.visualViewport.width&&window.visualViewport.height&&(a=window.visualViewport.width,
33
+ b=window.visualViewport.height);document.documentElement&&document.documentElement.clientWidth&&(a=document.documentElement.clientWidth,b=document.documentElement.clientHeight);null==a&&null!=screen&&(a=screen.width);null==b&&null!=screen&&(b=screen.height);null==a&&(a=800);null==b&&(b=600);return{width:a,height:b}};pui.openURL=function(a){window.open(a)};
34
+ pui.normalizeURL=function(a,b){return null==a||"string"!=typeof a?"":1==b&&null==window.puiMobileClient||"http:"==a.substr(0,5).toLowerCase()||"https:"==a.substr(0,6).toLowerCase()||"data:"==a.substr(0,5).toLowerCase()?a:null!=pui.serverURL?pui.serverURL+a:window.cordova&&"/"==a.substr(0,1)?a.substr(1):a};
35
+ pui.animate=function(a){var b=a.element;"string"==typeof b&&(b=document.getElementById(b));if(null!=b){var c=a.effect;if("fly in left"==c||"fly in right"==c||"fly out left"==c||"fly out right"==c)var e="left";else if("fly in up"==c||"fly in down"==c||"fly out up"==c||"fly out down"==c)e="top";else if("fade in"==c||"fade out"==c)e="opacity";else if(e=a.properties,null==e&&(e=a.property,null==e))return;"string"==typeof e&&(e=[e]);var d=a.duration;null==d&&(d="500ms");"s"!=d.substr(d.length-1,1)&&(d+=
36
+ "s");var g=1E3*parseInt(d);2<d.length&&"ms"==d.substr(d.length-2,2)&&(g=parseInt(d));var f=a.type;null==f&&(f="ease");var k=a.from,h=a.to;switch(c){case "fly in right":k=-b.offsetWidth;k+="px";h="0px";break;case "fly in left":k=b.offsetWidth;k+="px";h="0px";break;case "fly out left":h=-b.offsetWidth;h+="px";k="0px";break;case "fly out right":h=b.offsetWidth;h+="px";k="0px";break;case "fly out down":h=b.offsetHeight;h+="px";k="0px";break;case "fly out up":h=-b.offsetHeight;h+="px";k="0px";break;case "fly in up":k=
37
+ b.offsetHeight;k+="px";h="0px";break;case "fly in down":k=-b.offsetHeight;k+="px";h="0px";break;case "fade in":k="0";h="100";break;case "fade out":k="100",h="0"}if(null!=h){var m="";for(c=0;c<e.length;c++){var n=e[c];""!=m&&(m+=", ");m+=n+" "+d+" "+f}var q=["transition","MozTransition","WebkitTransition","msTransition","OTransition"];if(null!=k){if("string"==typeof k||"number"==typeof k)k=[k];for(c=0;c<e.length;c++)n=e[c],b.style[n]=k[c]}setTimeout(function(){for(var t=0;t<q.length;t++)b.style[q[t]]=
38
+ m;setTimeout(function(){if("string"==typeof h||"number"==typeof h)h=[h];for(var u=0;u<e.length;u++)b.style[e[u]]=h[u];setTimeout(function(){for(var p=0;p<q.length;p++)b.style[q[p]]="";if(null!=a.oncomplete)a.oncomplete()},g)},1)},1)}}};pui.getActiveElement=function(){return"genie"==context?lastActiveElement:pui.activeElement};pui.fieldExit=function(a){var b=pui.getActiveElement();if(null!=b){var c=!1;null!=a&&(c=!0);"genie"==context?fieldExit(b,c):pui.ra(b)}};pui.gotoNextElement=function(a){R(a,!0)};
39
+ pui.gotoPreviousElement=function(a){R(a,!1)};
40
+ function R(a,b){b=b?1:-1;var c=document.querySelectorAll("INPUT,SELECT,TEXTAREA"),e=c.length;if(!(2>e)){a=Array.prototype.indexOf.call(c,a);for(var d=a+b,g;d!==a;)if(d===e)d=0;else if(-1===d)d=e-1;else{var f=g=c[d];null!=g&&null!=g.comboBoxWidget&&(f=g.comboBoxWidget.T());null!=g&&null!=g.s&&(f=g.s.T());if(f.readOnly||f.disabled||"hidden"===f.style.visibility||"-1"===f.tabIndex||!f.clientHeight||!f.clientWidth)d+=b;else{try{f.focus();if(document.activeElement!=f){d+=b;continue}setTimeout(function(){pui["highlight on focus"]&&
41
+ "function"==typeof f.select&&f.select();pui.Ga(null,f)},0)}catch(k){}break}}}}pui.showCalendar=function(a){var b=a;"string"==typeof a&&(b=document.getElementById(a));if(null!=b&&"object"==typeof b){var c=b.calimg;null!=c&&(null!=c.click&&"function"==typeof c.click?c.click():null!=c.onclick&&"function"==typeof c.onclick&&setTimeout(function(){c.onclick()},250))}};pui.getComputedStyle=function(a){var b=null;window.getComputedStyle?b=window.getComputedStyle(a):a.currentStyle&&(b=a.currentStyle);return b};
42
+ pui.upload=function(a,b){var c,e=a.dir,d=!0===a.overwrite,g;"number"==typeof a.slimit&&(g=a.slimit);var f;"number"==typeof a.flimit&&(f=a.flimit);var k="";"string"==typeof a.altname&&(k=a.altname);var h;typeof a.allowedTypes&&a.allowedTypes instanceof Array&&(h=a.allowedTypes);null==f&&(f=a.files.length);if(null==g||null==h){var m=[];for(c=0;c<a.files.length;c++){var n=a.files[c];var q="undefined"!=typeof n.type&&""!=n.type?n.type:"application/octet-stream";-1==pui.na(m,q)&&m.push(q);n=n.data&&n.data instanceof
43
+ ArrayBuffer?n.data.byteLength:n.size;n=Math.ceil(n/1048576);if(null==t||n>t)var t=n}null==g&&(g=t);null==h&&(h=m)}t=N("PUI0009109.PGM");t+="?AUTH="+encodeURIComponent(pui.F?pui.F:pui.appJob.auth);"widget"!==a.mode&&(t+="&mode=ajax");a.id&&(t+="&id="+encodeURIComponent(a.id));t+="&r="+Math.floor(1E9*Math.random());pui.isCloud&&(t+="&workspace_id="+pui.cloud.ws.id);m=new FormData;m.append("dir",e);m.append("overwrite",d?"1":"0");m.append("flimit",f);m.append("slimit",g);m.append("altname",k);"string"==
44
+ typeof a.generateNames&&m.append("generateNames",a.generateNames);for(c=0;c<h.length;c++)m.append("type",h[c]);for(c=0;c<a.files.length;c++){n=a.files[c];if(n.data&&n.data instanceof ArrayBuffer){try{var u=new Blob([n.data])}catch(w){e=new window.WebKitBlobBuilder,e.append(n.data),u=e.getBlob()}m.append("file",u)}else m.append("file",n);m.append("filename",n.name)}var p=new XMLHttpRequest;p.open("POST",t,!0);p.onreadystatechange=function(){if(4==p.readyState){var w=!0;if(200==p.status){try{var l=
45
+ eval("("+p.responseText+")")}catch(v){w=!1;var r="Server response missing or invalid."}l&&(w=l.success,w||(l.key?(r=pui.getLanguageText("runtimeMsg","upload "+l.key),"file limit"==l.key&&(r=r.replace("&1",f)),"size limit"==l.key&&(r=r.replace("&1",g))):r=l.error))}else w=!1,r=p.status+" - "+p.statusText+".",0==p.status&&""==p.statusText&&(r="The FILE could not be found in the system.");"function"==typeof b&&b(w,r)}};"function"==typeof a.onabort&&(p.onabort=a.onabort);"function"==typeof a.onprogress&&
46
+ "upload"in p&&(p.upload.onprogress=a.onprogress);"function"==typeof a.onload&&(p.onload=a.onload);p.send(m);return p};pui.getCookie=function(a){var b=document.cookie.split(";"),c="",e;for(e=0;e<b.length;e++){var d=b[e].split("=");var g=d[0].replace(/^\s+|\s+$/g,"");if(g==a)return 1<d.length&&(c=unescape(d[1].replace(/^\s+|\s+$/g,""))),c}return null};
47
+ pui.setCookie=function(a,b,c,e,d,g,f){var k=new Date;k.setTime(k.getTime());c&&(c*=864E5);k=new Date(k.getTime()+c);document.cookie=a+"="+escape(b)+(c?";expires="+k.toGMTString():"")+(e?";path="+e:"")+(d?";domain="+d:"")+(g?";secure":"")+(f?";SameSite="+f:"")};pui.deleteCookie=function(a,b,c,e,d){pui.getCookie(a)&&(document.cookie=a+"="+(b?";path="+b:"")+(c?";domain="+c:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"+(e?";Secure":"")+(d?";SameSite="+d:""))};
48
+ pui.refresh=function(a){null==a&&(a={});var b=a.url;a=a.skin;pui.setCookie("puiRefreshId",pui.psid,null,"/",null,null,"Strict");pui.skipConfirm=!0;pui.shutdownOnClose=!1;pui.confirmOnClose=!1;if(null!=a){a="skin="+encodeURIComponent(a);b=window.location.href;var c=b.split("?");b=c[0];c=c[1];null==c&&(c="");c=c.split("&");for(var e=!1,d=0;d<c.length;d++)5<=c[d].length&&"skin="==c[d].substr(0,5).toLowerCase()&&(c[d]=a,e=!0);e||(1==c.length&&""==c[0]?c[0]=a:c.push(a));c=c.join("&");b=b+"?"+c}null!=b?
49
+ window.location.href=b:window.location.reload()};
50
+ pui.downloadURL=function(a){if(null==pui||null==pui.appJob||null==pui.appJob.auth||""==pui.appJob.auth)return pui.is_ie?"":"data:text/html,<!DOCTYPE html><html><body><p>To download, please connect to a Profound UI session.</p></body></html>";var b=!0===a.inline;if(null==a.id)return"";var c=N("PUI0009110.PGM");c+="?id="+encodeURIComponent(a.id);null!=a.contentType&&(c+="&type="+encodeURIComponent(a.contentType));b&&(c+="&inline=1");c=c+"&usehttprc=0&AUTH="+encodeURIComponent(pui.F?pui.F:pui.appJob.auth);
51
+ return c+="&r="+Math.floor(1E9*Math.random())};pui.download=function(a){var b=pui.downloadURL(a);a=!0===a.inline;if(null==pui||null==pui.appJob||null==pui.appJob.auth||""==pui.appJob.auth)a=!0;a?pui.openURL(b):pui.link(b)};
52
+ pui.downloadFile=function(a){if("undefined"===typeof a||null==a||"string"!==typeof a.id||1>a.id.length)pui.alert("Error downloading file. \n\n No file path given",null,"Error","Close");else{var b=pui.downloadURL(a),c=a.id,e=new XMLHttpRequest;e.responseType="blob";e.open("GET",b,!0);e.send();var d=null,g=null,f=null,k=null;e.onprogress=function(h){var m=pui.extractFileNameFromContentDisposition(e.getResponseHeader("Content-Disposition"));if(c.split("/").pop()==m||"error.txt"!=m)"undefined"===typeof e.onprogress.diaglogShown&&
53
+ (e.onprogress.diaglogShown=!0,d=document.createElement("dialog"),document.body.appendChild(d),g=document.createElement("p"),d.appendChild(g),f=document.createElement("button"),f.innerHTML="OK",f.onclick=function(){d.close();d.remove()},k=document.createElement("button"),k.innerHTML="Cancel",k.id="cancelButton",k.onclick=function(){e.abort();d.close();d.remove()},d.appendChild(k),g.innerHTML="Downloading file: "+c+"<br> Starting download...",d.showModal(),e.onprogress.lastTime=Date.now()),Date.now()>
54
+ e.onprogress.lastTime+2E3&&(g.innerHTML="Downloading file: "+c+"<br>"+h.type+" "+(h.loaded/1048576).toFixed(4)+" mb loaded",e.onprogress.lastTime=Date.now())};e.onloadend=function(){null!=d&&(d.querySelector("button[id='cancelButton']").remove(),d.appendChild(f),g.innerHTML="File "+c+" downloaded successfully.")};e.onreadystatechange=function(){if(4==e.readyState&&200==e.status){var h=pui.extractFileNameFromContentDisposition(e.getResponseHeader("Content-Disposition"));if(c.split("/").pop()!=h&&"error.txt"==
55
+ h){var m=new FileReader;m.onload=function(){pui.alert("Error downloading file: "+c+"\n\n"+m.result,null,"Error","Close");console.log(m.result)};m.readAsText(e.response)}else{var n=null;if("string"===typeof a.contentType&&0<a.contentType.length)n=a.contentType;else if(n=e.getResponseHeader("Content-Type").split(";")[0],"string"===typeof n&&"application/octet-stream"==n){var q=h.split(".").pop();if("string"===typeof q)switch(q.toLowerCase()){case "pdf":n="application/pdf";break;case "txt":n="text/plain";
56
+ break;case "csv":n="text/csv";break;case "json":n="application/json";break;case "xml":n="application/xml";break;case "html":n="text/html";break;case "htm":n="text/html";break;case "jpg":n="image/jpeg";break;case "jpeg":n="image/jpeg";break;case "png":n="image/png";break;case "gif":n="image/gif"}}q="application/pdf text/plain text/csv application/json application/xml text/html image/jpeg image/png image/gif".split(" ");var t=new File([e.response],h,{type:n});t=URL.createObjectURL(t);var u=document.createElement("a");
57
+ "boolean"===typeof a.inline&&a.inline&&q.includes(n)?u.target="_blank":u.download=h;u.name=h;u.href=t;document.body.appendChild(u);u.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}));document.body.removeChild(u)}}}}};pui.extractFileNameFromContentDisposition=function(a){a=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(a);return null!=a&&a[1]?a[1].replace(/['"]/g,""):null};
58
+ pui.focusOnContainer=function(){window.parent!=window&&pui.ha(window.parent)&&window.parent.noderun||setTimeout(function(){null==pui.g&&(pui.g=document.createElement("input"),pui.g.type=pui.is_touch?"button":"text",pui.g.readOnly=!0,pui.g.style.position="absolute",pui.g.style.left="-999px",pui.g.style.top="-999px",pui.g.style.width="10px",pui.g.style.borderStyle="none",pui.g.style.backgroundColor="transparent",pui.runtimeContainer&&pui.runtimeContainer.appendChild(pui.g));pui.W=!0;pui.g.focus();setTimeout(function(){pui.W=
59
+ !1},0)},1)};pui.addCSS=function(a){var b=document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css";pui.is_old_ie?c.styleSheet.cssText=a:c.innerHTML=a;b.appendChild(c)};pui.loadCSS=function(a){if(null!=pui.U(a))return!1;var b=document.getElementsByTagName("head")[0],c=document.createElement("link");c.setAttribute("rel","stylesheet");c.setAttribute("type","text/css");c.setAttribute("media","screen");c.setAttribute("href",pui.normalizeURL(a));b.appendChild(c);return!0};
60
+ pui.removeCSS=function(a){var b=document.getElementsByTagName("head")[0],c=pui.U(a);if(null==c){c=b.getElementsByTagName("style");for(var e=0;e<c.length;e++){var d=c[e];if(d.innerHTML==a||null!=d.styleSheet&&d.styleSheet.cssText==a)return b.removeChild(d),!0}return!1}b.removeChild(c);return!0};
61
+ pui.loadJS=function(a){if(null==a)return null;var b;"string"==typeof a&&(b=a);if("object"==typeof a){b=a.path;var c=a.callback;var e=a.onerror;var d=a.test;if(null!=d&&"function"==typeof d&&1==d())return!1}if(null==b)return null;if(null!=pui.ya(pui.normalizeURL(b)))return!1;a=document.getElementsByTagName("head")[0];var g=!1,f=document.createElement("script");f.type="text/javascript";f.onreadystatechange=function(){"complete"!=f.readyState&&"loaded"!=f.readyState||null!=d&&"function"==typeof d&&1!=
62
+ d()||(g||null==c||c(),g=!0)};f.onload=function(){if(null==d||"function"!=typeof d||1==d())g||null==c||c(),g=!0};e&&(f.onerror=e);f.src=pui.normalizeURL(b);a.appendChild(f);return!0};
63
+ pui.endOfSession=function(a){pui.confirmOnClose=!1;pui.shutdownOnClose=!1;if(null!=window.puiMobileClient)window.location.href="index.html",null!=a&&pui.alert(a);else{var b=O().gobackto;null!=b&&(document.body.innerHTML="",null!=a&&pui.alert(a),location.href=b);null!=navigator.app&&null!=navigator.app.exitApp&&(document.body.innerHTML="",null!=a?pui.alert(a,function(){navigator.app.exitApp()}):navigator.app.exitApp())}};
64
+ pui.addUrlCacheBuster=function(a,b){var c=Date.now();return"string"===typeof b&&"get"!==b.toLowerCase()?a:a=/[&?]r=[^&]+/.test(a)?a.replace(/([&?]r=)[^&]+/,function(e,d){return d+c}):a+(-1==a.indexOf("?")?"?":"&")+"r="+c};
65
+ pui.alert=function(a,b,c,e){window.cordova&&"iOS"==window.device.platform&&null==b&&null==c&&null==e?window.alert(a):null!=window.navigator&&null!=window.navigator.notification&&null!=window.navigator.notification.alert?null==b&&null==c&&null==e&&null!=window.puiMobileClient&&null!=window.puiMobileClient.alert?window.puiMobileClient.alert(a):(null==b&&(b=function(){}),null==c&&(c="Profound UI"),null==e&&(e="OK"),window.navigator.notification.alert(a,b,c,e)):pui.Ba&&window.parent&&window.parent!=window&&
66
+ pui.ha(window.parent)&&window.parent.noderun?console.log("Suppressed alert: "+a):alert(a)};pui.applyProperty=function(a,b,c){return window.applyProperty(a,b,c)};pui.get=function(a){return M(G(a))};
67
+ pui.set=function(a,b){a="object"==typeof a?a:document.getElementById(a);if(null!=a){if("DIV"==a.tagName)null!=a.M?a.M.setValue(b):null!=a.comboBoxWidget?a.comboBoxWidget.setValue(b):null!=a.s?a.s.setValue(b):a.button&&a.button.fa?a.button.fa.innerHTML=b:a.pui&&a.pui.widget?applyProperty(a,"value",b):a.innerHTML=b;else if("INPUT"==a.tagName||"SELECT"==a.tagName||"TEXTAREA"==a.tagName)"INPUT"==a.tagName&&"checkbox"==a.type?a.checked="boolean"==typeof b?b:null!=a.checkedValue&&b==a.checkedValue?!0:!1:
68
+ ("genie"==context&&b!=a.value&&pui.m.Ca(a),a.value=b,null!=a.O&&(a.O.value=b));if("dspf"==context||pui.ga&&null==a.A){a.modified=!0;pui.Ja(a);var c=a.Ka;null!=a.id&&-1==a.id.indexOf(".")&&null!=a.R&&(pui.qa[a.R]=!0);null!=c&&(c.za(),c.sa=!0,pui.Fa(a,c.ua()))}"genie"==context&&null!=a.A&&null!=a.A.idx&&(pui.response[a.A.idx]=a);pui.oa(a);a.pui&&a.pui.properties&&(a.pui.properties.value=b)}};
69
+ pui.getActiveContainer=function(){if("genie"==context){for(var a=1,b=document.getElementById("window"+a);b;){var c=document.getElementById("window"+ ++a);if(c)b=c;else break}if(b)return b}else if("dspf"==context&&pui.Y)return pui.Y;return pui.runtimeContainer};pui.getDisplayType=function(){return pui.ga?"5250-handler":"dspf"==context?"rdf":"5250"};
70
+ function S(a){function b(){if(!(n>=m.length)){u=m[n].command;p=m[n].wait;n+=1;if("function"==typeof pui.onPCCommand)try{var l=pui.onPCCommand(u,p);if(null==l||1==l){setTimeout(b,0);return}}catch(v){showFailureMessage(u)}t="?cmd="+encodeURIComponent(u)+"&wait="+(p?"1":"0");if(1==f||2==f)k?(w.params.cmd=u,w.params.sign=1,w.params.hashalg="string"===typeof pui["pccmd hash sign algorithm"]?pui["pccmd hash sign algorithm"].toUpperCase():"SHA-512",w.handler=d,F(w)):c("");else if(3==f)w.params.cmd=u,w.handler=
71
+ e,F(w);else{if(0==n&&0<m.length){l=[];for(var r=0;r<m.length;r++)l.push("("+m[r].pa+")");u=l.join(" && ")}try{h.runCommand(u)}catch(v){l='Unable to execute "'+u+'".\n\n',null!=v&&(l+=v.name+":\n\n"+v.message+"."),alert(l)}}}}function c(l){if(2==f){var r=new Image;r.onload=b;r.onerror=function(){console.log("PC Command Listener image mode failure.");g(u)};r.src=q+t+"&type=image&rnd="+String(Math.random())+String((new Date).getTime())+l}else{l=new pui.Ajax(q+t+l);l.method="GET";l.async=p?!1:!0;l.suppressAlert=
72
+ !0;l.onfail=function(v){200!=v.l()&&(console.log("PC Command Listener comm. failure: "+v.B()),g(u))};l.onsuccess=function(v){try{var y=JSON.parse(v.j());if(!y.success&&"string"===typeof y.error){console.log("PC Command Listener failure.",y.error);g(u);return}}catch(z){}b()};try{l.send()}catch(v){console.log("PC Command Listener failure.",v),g(u)}}}function e(l,r){try{if(r)throw r;if(null==l)throw Error("Empty response from PCCMD crypt program.");if(null!=l.error||"string"===typeof l.error&&0<l.error.length)throw Error("PCCMD crypt error: "+
73
+ String(l.error));if("string"!==typeof l.cmd||0==l.cmd.length)throw Error("PCCMD crypt response was missing a command.");var v="puilaunch:"+encodeURIComponent(l.cmd),y=document.createElement("iframe");y.style.display="none";y.src=v;document.body.appendChild(y);setTimeout(function(){null!=y&&null!=y.parentNode&&document.body.removeChild(y);y=null;b()},5E3)}catch(z){console.log(z)}}function d(l,r){try{if(r)throw r;if("object"!==typeof l||null===l)throw Error("Empty response");if(!0!==l.success)throw"string"===
74
+ typeof l.error&&0<l.error.length?l.error:"Unknown error";r="";"string"===typeof l.sig&&0<l.sig.length&&(r="&sig="+encodeURIComponent(l.sig));c(r)}catch(v){console.log(v),g(u)}}function g(l){console.log("Command: "+l);l=pui.getLanguageText("runtimeMsg","pccommand error");!1!==pui["alert pccommand errors"]?alert(l):console.log(l);console.log("Visit https://docs.profoundlogic.com/x/aQFK for more information on supporting STRPCCMD.")}var f=1,k=!1;pui["use pc listener"]&&(f=1);null!=window.HTTPS&&"ON"==
75
+ window.HTTPS&&1==f&&(f=2);pui["pc listener mode"]&&(f=parseInt(pui["pc listener mode"]));if("string"==typeof pui["pc command mode"])switch(pui["pc command mode"]){case "applet":f=0;break;case "listener":case "listener_m1":f=1;break;case "listener_m1s":f=1;k=!0;break;case "listener_m2":f=2;break;case "listener_m2s":f=2;k=!0;break;case "launcher":f=3;break;default:f=1,console.log("Unsupported pc command mode:",pui["pc command mode"])}if(0==f){var h=document.getElementById("PCCommandApplet");if(!h){pui.I=
76
+ a;loadPCCommandApplet("runCommandCb");return}}var m=[],n=0;m="string"==typeof a?[{command:a,wait:!1}]:a;a=parseInt(pui["pc listener port"],10);isNaN(a)&&(a="80");var q="http://localhost:"+a+"/",t="",u,p,w={url:N("PUI0009117.pgm"),method:"post",params:{auth:pui.appJob&&pui.appJob.auth?pui.appJob.auth:""},async:!0};b()}window.runCommandCb=function(){S(pui.I);pui.I=null};pui.runPCCommand=S;
77
+ pui.isServerBusy=function(){if("undefined"==typeof context)return!1;if("dspf"==context&&!1===pui.G||"genie"==context&&!0===pui.m.u)return!0;for(var a=document.getElementsByTagName("iframe"),b=0;b<a.length;b++){var c=a[b].contentWindow;if(null!=c){var e=null;try{e=c.pui}catch(d){}if(null!=e&&"object"===typeof e&&"function"===typeof e.isServerBusy&&e.isServerBusy())return!0}}return!1};
78
+ pui.showLastError=function(){if(0==errors.length)alert("No errors have been reported.");else{var a=errors.length-1;alert("Operation: "+errors[a].Da+"\nId: "+errors[a].id+"\n\nMessage: "+errors[a].text+"\n"+errors[a].Ia)}};
79
+ pui.editCode=function(a,b){function c(x,A){var E=" nn/n nn/nn nn/nn/n nn/nn/nn nnn/nn/nn nn/nn/nnnn nnn/nn/nnnn".split(" ");"*ymd"===k.dateEdit&&(E[8]="nnnn/nn/nn",E[9]="nnnnn/nn/nn");E=E[z];x=String(x);x=x.replace(".","");x=x.replace(",","");x=x.replace("-","");x="0000000000"+x;x=x.substr(x.length-A);A="/";null!=k.dateEditSeparator&&(A=k.dateEditSeparator);for(var K=!1,P=0,Q="",I=0;I<E.length;I++){var H=E.substr(I,1),T=E.substr(I+1,1);if("/"===H||"/"===T)K=!0;"/"===H?H=A:(H=x.substr(P,1),P+=1,
80
+ "0"===H?K||(H=" "):K=!0);Q+=H}return Q}function e(x,A,E){for(x+="";x.length<A;)x+=E;return x}var d=null,g=0,f=null,k={},h=2;"number"===typeof arguments[h]&&(d=arguments[h],h++,"number"===typeof arguments[h]&&(g=arguments[h],h++));"string"===typeof arguments[h]&&(f=arguments[h],h++);"object"===typeof arguments[h]&&(k=arguments[h],h++);var m=!1;"*astfill"===f&&(m=!0,f=null);var n=!1,q=null,t=!1,u=h=!1;h=" ";pui.appJob&&"string"===typeof pui.appJob.decimalFormat&&(h=pui.appJob.decimalFormat);var p="I"===
81
+ h||"J"===h,w="J"===h;null!=k.decimalEdit&&(p=","===k.decimalEdit||"0,"===k.decimalEdit,w="0."===k.decimalEdit||"0,"===k.decimalEdit);"1"<=b&&"4">=b&&(q="999.00");"A"<=b&&"D">=b&&(q="999.00CR");"J"<=b&&"M">=b&&(q="999.00-");"N"<=b&&"Q">=b&&(q="-999.00");if("1"==b||"A"==b||"J"==b||"N"==b||"2"==b||"B"==b||"K"==b||"O"==b)t=!0;h="1"==b||"A"==b||"J"==b||"N"==b||"3"==b||"C"==b||"L"==b||"P"==b?!0:!1;"Z"==b&&(q="999.00");if("X"===b||"Z"===b)u=!0;"X"===b&&(n=!0);"5"<=b&&"9">=b&&pui.alert("User-defined edit code not supported: "+
82
+ b+".");"1"<=b&&"9">=b||"A"<=b&&"D">=b||"J"<=b&&"Q">=b||"X"<=b&&"Z">=b||pui.alert("Invalid edit code: "+b+".");var l=(a||0)+"",r=parseFloat(l,10)||0;var v=l.replace(/\..*/,"");"-0"===v&&(v="-");""!=v&&"-"!=v||!w||(v="0");var y=l;-1==y.indexOf(".")&&(y+=".");y=y.replace(/.*\./,"");var z=v.length;3>z&&(z=3);var D=y.length;"number"===typeof d&&(z=d);"number"===typeof g&&(D=g);if("Y"==b)return(3>z||9<z)&&pui.alert("Length not valid for edit code Y."),c(r,z);d=".";p&&(d=",");u&&(d="");0<D&&(y=e(y,D,"0"),
83
+ "0"!==v||w||(v=""),l=v+d+y);var L=" ";n&&(L="0");m&&(L="*");if(t){for(g=/(\d+)(\d{3})/;g.test(v);)v=v.replace(g,"$1"+(p?".":",")+"$2");l=v+(0<D?d+y:"")}p=0>r;l=l.replace(/-/g,"");"(999.00)"===q?p&&(l="("+l+")"):"999.00-"===q?l=p?l+"-":l+" ":"999.00CR"===q?l=p?l+"CR":l+" ":"-999.00"===q&&p&&(l="-"+l);f&&(l="EUR"==f?l+" EUR":"$"==f?"-"==l.substr(0,1)?"-"+f+l.substr(1):f+l:f+l);h||0===r&&(l="");(function(){var x=z;x+=D&&!u?1:0;t&&(x+=parseInt((z-D-1)/3));"999.00CR"===q&&(x+=2);"999.00-"===q&&(x+=1);
84
+ "-999.00"===q&&(x+=1);"string"===typeof f&&(x+=f.length);var A=l;for(A+="";A.length<x;)A=L+A;l=A})();return l};
85
+ pui.editWord=function(a,b,c){function e(){if(0<w.length){var v=w.substr(w.length-1,1);w=w.substr(0,w.length-1);"0"==v&&0==w.length&&r&&(v=l?"*":" ")}else v="0",r&&(v=" "),l&&(v="*");return v}var d;a=String(a);var g={};"object"===typeof c&&(g=c);c="$";null!=g.currencySymbol&&(c=g.currencySymbol);var f=b.indexOf("0")+1,k=b.indexOf("*")+1;if(0==f||0!=k&&k<f)f=k;var h=-1;for(d=b.length-1;0<=d;--d)if(d+1==f||" "==b.substr(d,1)){h=d;break}k=b.substr(0,h+1);var m="",n="",q=!1,t=!1,u=0<=b.substr(h+1).indexOf("-")||
86
+ 0<=b.substr(h+1).indexOf("CR");for(d=h+1;d<b.length;d++){var p=b.substr(d,1);if("CR"==b.substr(d,2))t=!0,d++;else if("-"==p)t=!0;else if("&"!=p&&("*"!=p||t))if("A"<=p.toUpperCase()&&"Z">=p.toUpperCase()&&u&&!t)b=b.substr(0,d)+" "+b.substr(d+1);else{m=b.substring(h+1,d);n=b.substr(d);q=!0;break}}q||(m=b.substr(h+1));p=".";d=" ";pui.appJob&&"string"===typeof pui.appJob.decimalFormat&&(d=pui.appJob.decimalFormat);"string"===typeof g.decimalFormat&&(d=g.decimalFormat);if("I"===d||"J"===d)p=",";d=0;p=
87
+ k.split(p);1<p.length&&(d=p[1].replace(/[^ ]/g,"").length);var w=isNaN(Number(a))?"0":String(a);w=w.replace("-","");p=w.split(".");g=p[0];b="";h=null;1<p.length&&(b=p[1]);if(null==h||isNaN(h))h=d;for(;b.length>h;)b=b.substr(0,b.length-1);for(;h>b.length;)b+="0";for(w=g+b;"0"==w.substr(0,1);)w=w.substr(1);g="";var l=h=!1,r=b=!1;0==f&&(r=!0);for(d=k.length-1;0<=d;--d)q=p=k.substr(d,1)," "==p?q=e():"&"==p?q=" ":"0"==p&&d+1==f?q=e():"*"==p?(l=!0,q=e()):p==c?d+2==f&&(q=e(),b=!0):h&&(q=" ",l&&(q="*")),
88
+ g=q+g,d<=f&&(r=!0),r&&0==w.length&&(h=!0);m=m.replace(/&/g," ");m=m.replace(/\*/g," ");0<=a&&(m=m.replace("CR"," "),m=m.replace("-"," "));g=g+m+n;a=g.length-1;g=J(g);l&&"*"!=g.substr(0,1)&&(g="*"+g);for(b&&(g=c+g);g.length<=a;)g=" "+g;return g};
89
+ pui.getRadioGroupValue=function(a){if("string"!==typeof a||"object"!==typeof pui.L)return null;for(var b=null,c=pui.currentFormatNames,e=c.length-1;0<=e;e--){var d=c[e].toUpperCase()+"."+a.toUpperCase();if("undefined"!==typeof pui.L[d]){b=pui.L[d];break}}if(null==b)return null;a=null;for(c=0;c<b.length;c++)if(e=b[c],e.checked&&null!=e.radioValue){a=e.radioValue;break}return a};pui.ea=function(){for(var a=document.getElementById("auth-form"),b=document.cookie.split("; "),c=!1,e=0;e<b.length;e++){var d=b[e].split("=");if(unescape(d[0])=="pui-signon-"+a.action&&"1"==unescape(d[1])){c=!0;break}}if("undefined"!=typeof Storage){b=O();if(b.workstnid)sessionStorage["atrium-params-workstnid"]=b.workstnid;else try{delete sessionStorage["atrium-params-workstnid"]}catch(g){}if(b.suffixid)sessionStorage["atrium-params-suffixid"]=b.suffixid;else try{delete sessionStorage["atrium-params-suffixid"]}catch(g){}if(b.duplicateid)sessionStorage["atrium-params-duplicateid"]=
90
+ b.duplicateid;else try{delete sessionStorage["atrium-params-duplicateid"]}catch(g){}}if(c)location.href=a.action;else{if(c=document.getElementById("auth-box"))c.style.display="";a.elements["auth-user"].focus()}};
91
+ pui.da=function(){var a=document.getElementById("auth-form"),b=a.elements["auth-user"].value,c=a.elements["auth-password"].value,e=document.getElementById("auth-message"),d={"server unavailable":"The server could not be reached at {connectorURL}.<br>Please check your network connection and try again.","error authenticating":"An error occurred while authenticating the user."},g="";e.innerHTML="";if(""==M(b))return e.innerHTML=authMessages["user required"],a.elements["auth-user"].focus(),!1;if(""==
92
+ M(c))return e.innerHTML=authMessages["password required"],a.elements["auth-password"].focus(),!1;if(pui.pjsServer){var f="Basic "+btoa(M(b)+":"+M(c));fetch("/profoundui/atrium/authenticate",{method:"POST",headers:{Authorization:f}}).then(function(k){k.ok?(document.cookie=escape("pui-signon-"+a.action)+"=1; path=/",sessionStorage.setItem("atrium-token",btoa(M(b)+":"+M(c))),location.href=a.action):401===k.status?(e.innerHTML=authMessages["invalid credentials"],a.elements["auth-user"].focus()):503===
93
+ k.status?k.json().then(function(h){g=authMessages["server unavailable"]||d["server unavailable"];e.innerHTML=g.replace(/{connectorURL}/,h.system);a.elements["auth-user"].focus()}):(g=authMessages["error authenticating"]||d["error authenticating"],e.innerHTML=g,a.elements["auth-user"].focus())})["catch"](function(k){g=authMessages["error authenticating"]||d["error authenticating"];e.innerHTML=g;a.elements["auth-user"].focus();console.error("Error during Atrium authentication:",k)});return!1}pui.v(function(){localStorage["pui-http-auth-invalid"]&&
94
+ delete localStorage["pui-http-auth-invalid"];var k=new pui.Ajax("/profoundui/pui0005010.pgm");k.async=!0;k.method="POST";pui.setReqAuth(k,b,c);k.suppressAlert=!0;k.onready=function(h){if(200==h.l()){var m=eval("("+h.j()+")");h=m.days;var n=!1;1==m.warn&&(0==h?(m=authMessages["password expired"],pui.alert(m),n=!0):(m=authMessages["password pending expiration"],m=m.replace(/{DAYS}/g,h),n=confirm(m)));n?(h="/profoundui/changepass?user="+encodeURIComponent(b),h+="&next="+encodeURIComponent(a.action),
95
+ h+="&back="+encodeURIComponent(location.href),location.href=h):(document.cookie=escape("pui-signon-"+a.action)+"=1; path=/",location.href=a.action)}else e.innerHTML=authMessages["invalid credentials"],a.elements["auth-user"].focus()};k.send()});return!1};
96
+ pui.v=function(a){if("undefined"!==typeof Atrium&&Atrium.pjsServer)sessionStorage.removeItem("atrium-token"),a();else{var b=new pui.Ajax("/profoundui/pui0005010.pgm");b.async="function"===typeof a?!0:!1;b.method="POST";pui.setReqAuth(b,"PUI_SIGNOFF_USER","PUI_SIGNOFF_USER");b.suppressAlert=!0;"function"===typeof a&&(b.onready=function(){"function"==typeof a&&a()});b.send()}};window.pui.signOn=pui.da;window.pui.clearCredentials=pui.v;window.pui.signOnInit=pui.ea;
97
+ pui.ca=function(){var a=O(),b=document.getElementById("change-user"),c=document.getElementById("change-current"),e=b,d=document.getElementById("change-cancel");"undefined"!=typeof a.user&&(b.value=a.user.toUpperCase(),b.readOnly=!0,b.className+=" read-only",e=c);"undefined"==typeof a.back&&(d.style.display="none");document.getElementById("change-box").style.display="block";e.focus()};pui.ba=function(){var a=O();"undefined"!=typeof a.back&&(location.href=a.back)};
98
+ pui.P=function(){if("undefined"===typeof Atrium||!Atrium.pjsServer){var a=O(),b=document.getElementById("change-form"),c=b.elements["change-user"].value,e=b.elements["change-current"].value,d=b.elements["change-new"].value,g=b.elements["change-confirm"].value,f=document.getElementById("change-message");f.innerHTML="";if(""==M(c))return f.innerHTML=passMessages["user required"],b.elements["change-user"].focus(),!1;if(""==M(e))return f.innerHTML=passMessages["current required"],b.elements["change-current"].focus(),
99
+ !1;if(""==M(d))return f.innerHTML=passMessages["new required"],b.elements["change-new"].focus(),!1;if(""==M(g))return f.innerHTML=passMessages["confirm required"],b.elements["change-confirm"].focus(),!1;if(d!=g)return f.innerHTML=passMessages["must match"],b.elements["change-new"].focus(),!1;g=new pui.Ajax("/profoundui/pui0005011.pgm");g.async=!0;g.method="POST";g.params={};g.params.user=c;g.params.current=e;g.params["new"]=d;g.suppressAlert=!0;g.onready=function(k){if(200!=k.l())f.innerHTML="HTTP "+
100
+ k.l()+" - "+k.C()+".",b.elements["change-user"].focus();else{try{var h=eval("("+k.j()+")");if("boolean"!=typeof h.success)throw Error("Invalid response format: 'success' is not a boolean.");if(!h.success&&"string"!=typeof h.error)throw Error("Invalid response format: 'error' is not a string.");}catch(m){h={success:!1,error:"The server response is missing or invalid."}}0==h.success?(f.innerHTML=h.error,b.elements["change-user"].focus()):(pui.alert(passMessages.success),pui.v(function(){var m=new pui.Ajax("/profoundui/pui0005010.pgm");
101
+ m.async=!0;m.method="POST";pui.setReqAuth(m,c,d);m.suppressAlert=!0;m.onready=function(n){200==n.l()?"undefined"!=typeof a.next&&(location.href=a.next):(pui.alert("HTTP "+n.l()+" - "+n.C()+"."),b.elements["change-user"].focus())};m.send()}))}};g.send();return!1}};
102
+ pui.setReqAuth=function(a,b,c){var e=-1!=navigator.userAgent.indexOf("Edge"),d=!e&&-1!=navigator.userAgent.indexOf("Chrome"),g=-1!=navigator.userAgent.indexOf("Firefox");!e&&-1!=navigator.userAgent.indexOf("Safari")&&!d||d||g?(a.user=encodeURIComponent(b),a.password=encodeURIComponent(c)):(a.user=b,a.password=c)};window.pui.passInit=pui.ca;window.pui.passCancel=pui.ba;window.pui.changePass=pui.P;