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.
- package/htdocs/profoundui/proddata/css/designer.css +7 -3
- package/htdocs/profoundui/proddata/css/profoundai.css +75 -9
- package/htdocs/profoundui/proddata/css/profoundui.css +152 -4
- package/htdocs/profoundui/proddata/js/atrium.js +501 -509
- package/htdocs/profoundui/proddata/js/atrium_api.js +6 -6
- package/htdocs/profoundui/proddata/js/designer.js +4942 -5056
- package/htdocs/profoundui/proddata/js/genie.js +3155 -3225
- package/htdocs/profoundui/proddata/js/profoundai.js +36 -31
- package/htdocs/profoundui/proddata/js/runtime.js +1872 -1898
- package/htdocs/profoundui/proddata/js/signon.js +102 -107
- package/index.js +1 -0
- package/package.json +11 -10
- package/profound.jse +1 -1
- package/setup/call.js +2 -0
- package/setup/completeInstall.js +3 -1
- package/setup/convertStartJS.js +2 -2
- package/setup/install_info.json +1 -11
- package/setup/pjsdist.savf +0 -0
- package/setup/plugins/mathoperation.js +75 -79
- package/setup/start.js +3 -2
- package/setup/store_credentials.js +2 -0
- package/setup/store_options.js +2 -0
|
@@ -1,107 +1,102 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
if(
|
|
13
|
-
window.
|
|
14
|
-
|
|
15
|
-
"INPUT"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
pui.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
pui.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
pui.
|
|
33
|
-
|
|
34
|
-
pui.
|
|
35
|
-
pui.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
pui.
|
|
43
|
-
|
|
44
|
-
typeof
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if(
|
|
51
|
-
pui.
|
|
52
|
-
pui.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
pui.
|
|
65
|
-
pui.
|
|
66
|
-
pui.
|
|
67
|
-
|
|
68
|
-
pui.
|
|
69
|
-
pui.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
pui.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
pui.
|
|
97
|
-
"")
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
pui.
|
|
102
|
-
pui.
|
|
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(/ /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;
|