profoundjs 7.21.0 → 7.22.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.
@@ -16,7 +16,7 @@ window.ajaxSubmit=function(b,c){var a,d="",e=typeof pui!="undefined"&&typeof pui
16
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
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
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(/ /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.ta(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
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
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
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};
@@ -30,7 +30,7 @@ pui.saveRecording=function(b){for(var c=null,a=0;a<pui.b.payloads.length;a++){if
30
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
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
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.wa();var a={keepalive:"1"};if(pui.isCloud)a.workspace_id=
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
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
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
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)};
@@ -41,7 +41,7 @@ case "fly in up":h=d.offsetHeight;h+="px";j="0px";break;case "fly in down":h=-d.
41
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
42
  pui.gotoNextElement=function(b){O(b,true)};pui.gotoPreviousElement=function(b){O(b,false)};
43
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.va(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)}};
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
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
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
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",
@@ -70,7 +70,7 @@ pui.addUrlCacheBuster=function(b,c){var a=Date.now();if(typeof c==="string"&&c.t
70
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
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
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.ra(a);a.value=c;if(a.j!=null)a.j.value=c}if(context=="dspf"||pui.U&&a.l==null){a.modified=true;pui.za(a);var d=a.Aa;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.ua(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}};
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
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
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
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=
@@ -80,7 +80,7 @@ typeof k.error==="string"&&k.error.length>0)throw Error("PCCMD crypt error: "+St
80
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
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
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].sa+"\nId: "+errors[b].id+"\n\nMessage: "+errors[b].text+"\n"+errors[b].ya)}};
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
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
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
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===
@@ -95,13 +95,13 @@ pui.getRadioGroupValue=function(b){if(typeof b!=="string")return null;if(typeof
95
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
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
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.qa().then(function(h){g=authMessages["server unavailable"]||e["server unavailable"];d.innerHTML=g.replace(/{connectorURL}/,h.xa);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"]&&
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
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
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(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;
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
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(!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();return false}else if(I(e)==
104
- ""){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()!=200){f.innerHTML=
105
- "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);
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
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
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "profoundjs",
3
- "version": "7.21.0",
3
+ "version": "7.22.0",
4
4
  "min-profoundui-version": "6.20.0",
5
5
  "description": "Profound.js Framework and Server",
6
6
  "keywords": [