@sencha/reext
Advanced tools
Comparing version 1.0.310 to 1.0.315
import { jsxs as $, jsx as p, Fragment as le } from "react/jsx-runtime"; | ||
import J, { useState as z, useRef as te, useEffect as L } from "react"; | ||
import { createPortal as ce } from "react-dom"; | ||
const Re = "1.0.310", Le = (e, t) => { | ||
const Re = "1.0.315", Le = (e, t) => { | ||
for (var r in e) typeof e[r] == "function" && function(i, n) { | ||
@@ -6,0 +6,0 @@ var s = r; |
@@ -1,2 +0,2 @@ | ||
(function(_,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],s):(_=typeof globalThis<"u"?globalThis:_||self,s(_.ReExt={},_.jsxRuntime,_.React,_.ReactDOM))})(this,function(_,s,m,ae){"use strict";const he="1.0.310",He=(e,t)=>{for(var r in e)typeof e[r]=="function"&&function(i,a){var l=r;e[r]=function(){t===!0&&console.log("---"),console.log("globalState."+l+" payload:",arguments[0]),t===!0&&console.log(new Error().stack),t===!0&&console.log("---");var n=a.apply(this,arguments);return n}}(r,e[r])},Je=async(e,t,r)=>{console.log("dispatch:",e.type,e.payload),r.dispatchStack&&console.log(new Error().stack)},Ne=(e,t,r)=>{const[i,a]=m.useReducer(e,t),l=m.useRef(null);var n=r.middleware;n===void 0&&(n=[]);var o=r.middlewareafter;return o===void 0&&(o=[]),m.useEffect(()=>{o.map(d=>d(l.current,i))},[o,i]),[i,d=>{n.map(y=>y(d,i,r)),l.current=d,a(d)}]},we=m.createContext(),ve=()=>m.useContext(we),Ke=(e,t)=>{var r={...e};return r[t.type.toLowerCase()]=t.payload,window.vscodeapi!==void 0&&vscodeapi.setState(r),r},ze=e=>{if(e===void 0)return;var t=e.types,r={};for(let o in t)t.hasOwnProperty(o)&&(r["set"+o]=d=>l({type:o,payload:d}));var i={};for(let o in t)t.hasOwnProperty(o)&&(i[o.toLowerCase()]=t[o].value);m.useEffect(()=>{e.dispatchTrace&&e.middleware.push(Je)},[e]),e.actionTrace&&He(r,e.actionStack);const[a,l]=Ne(Ke,i,e),n=(o,d)=>{var y={};for(const[f]of Object.entries(d))y[f]=o[f];return y};return m.createElement(we.Provider,{value:{...n(a,i),...r}},e.children)};function Y(e,t){try{if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);if(Array.isArray(e)){let r=[];for(let i=0;i<e.length;i++)r[i]=Y(e[i],"array");return r}if(e instanceof Object){delete e.$initParent;let r={};for(let i in e)e.hasOwnProperty(i)&&(r[i]=Y(e[i],"object"));return r}return e}catch{return console.error("error - cloneDeep node:",t),""}}function ne(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!ne(e[r],t[r]))return!1;return!0}if(e instanceof Object&&t instanceof Object){let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let a of r)if(!t.hasOwnProperty(a)||!ne(e[a],t[a]))return!1;return!0}return!1}function Le({reextplugin:e,rid:t,reactversion:r,extver:i,extlocation:a,exttoolkit:l,exttheme:n,type:o,packageversion:d,style:y,flexdirection:f,...g}){return s.jsxs("div",{name:"ReExtRootLogo","data-rid":g.rid,style:{display:"flex",flexDirection:f,alignItems:"center",color:"black",padding:5,...y},children:[s.jsx("img",{style:{height:40,width:80},src:"../ReExt/ReExt.png"}),s.jsxs("div",{style:{margin:"0 0 0 3px"},children:[s.jsx("div",{style:{margin:"0 0 0 1px",fontSize:12,color:"black"},children:s.jsx("a",{style:g.style,target:"_blank",rel:"noreferrer",href:"https://www.npmjs.com/package/@sencha/reext",children:s.jsxs("i",{children:["ReExt ",d]})})}),s.jsx("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:s.jsxs("span",{style:{margin:"0 0 0 0"},children:[o,", reextplugin: ",e.toString()]})}),s.jsx("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:s.jsxs("span",{style:{margin:"0 0 0 0"},children:["React: ",s.jsx("b",{children:r})]})}),s.jsx("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:s.jsxs("span",{style:{margin:"0 0 0 0"},children:["ExtJS: ",s.jsxs("b",{children:[i," (",a,")"]})]})}),s.jsxs("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:[s.jsxs("span",{style:{margin:"0 0 0 0"},children:["toolkit: ",s.jsx("b",{children:l})]}),s.jsxs("span",{style:{margin:"0 0 0 5px"},children:["theme: ",s.jsx("b",{children:n})]})]})]})]})}var Me=e=>{var t=null,r=e.slice(0,2);if(r==="on"){var i=e.charAt(2),a=e.charAt(2).toUpperCase();i===a&&(t=e.slice(2).toLowerCase())}return window.Ext.isClassic===!0&&t==="tap"&&(t="click"),t},Ue=(e,t,r,i)=>{if(!(typeof window===void 0||typeof window>"u")){var a={};if(a.xtype=e,t!==void 0)for(let[n,o]of Object.entries(t))a[n]=o;if(r.references===!0&&(a.controller=window.Ext.create("Ext.app.ViewController")),a.store!==void 0&&(a.store.listeners!==void 0?a.store.listeners.load===void 0&&(a.store.listeners.load=n=>{r.storeloaded!==void 0&&r.storeloaded(n,i())}):a.store.listeners={load:n=>{r.storeloaded!==void 0&&r.storeloaded(n,i())}}),a.listeners===void 0){a.listeners={};for(let[n,o]of Object.entries(r)){var l=Me(n);l!==null&&(a.listeners[l]=function(){o(...arguments)})}Object.keys(a.listeners).length===0&&delete a.listeners}return a}},Fe=e=>{var t=null,r=e.slice(0,2);if(r==="on"){var i=e.charAt(2),a=e.charAt(2).toUpperCase();i===a&&(t=e.slice(2).toLowerCase())}return window.Ext.isClassic===!0&&t==="tap"&&(t="click"),t},ge=(e,t,r)=>{var i=[];if(!(typeof window===void 0||typeof window>"u")){var a=[],l=[];if(e===void 0)return{childarray:[],cpArray:[]};e.length===void 0?l.push(e):l=e;try{l.map(o=>{var d,y;if(t.xtype=="tabpanel"){var f;window.Ext.ReExtTheme==="classic"?f="Ext.panel.Panel":f="Ext.Panel",d=window.Ext.create(f,{layout:"fit",title:o.props.title,cls:"ReExtTabChildRoot",items:[{xtype:"component",listeners:{activate:p=>{y=ae.createPortal(o,p.el.dom),a.push(y);var $=p.el.dom.parentNode;r.observe($)},render:p=>{y=ae.createPortal(o,p.el.dom),a.push(y);var $=p.el.dom.parentNode;r.observe($)}},style:{backgroundColor:"transparent",display:"flex",height:"100%",width:"100%"}}]}),i.push(d)}else{let{flex:p,region:$,split:j,width:W,height:H,minWidth:S,maxWidth:N,minHeight:J,maxHeight:u}=o.props.config||{},A={};p!==void 0&&(A.flex=p),$!==void 0&&(A.region=$),j!==void 0&&(A.split=j),W!==void 0&&(A.width=W),H!==void 0&&(A.height=H),S!==void 0&&(A.minWidth=S),N!==void 0&&(A.maxWidth=N),J!==void 0&&(A.minHeight=J),u!==void 0&&(A.maxHeight=u),console.log("filteredConfig:",A),console.log(o);var g={items:[{xtype:"component",listeners:{render:x=>{y=ae.createPortal(o,x.el.dom),a.push(y);var w=x.el.dom.parentNode;r.observe(w)}},style:{flex:1,backgroundColor:"transparent",display:"flex",height:"100%",width:"100%"}}],...A};d={xtype:"container",layout:"fit",...g},i.push(d)}});var n={childarray:i,cpArray:a};return n}catch(o){return console.error("iteratechldren:",o.toString()),[]}}},Be=(e,t,r)=>{if(!(typeof window===void 0||typeof window>"u")){var i=l=>{let n=l.charAt(0).toUpperCase(),o=l.slice(1);var d="set"+(n+o);return d},a;window.Ext.isClassic===!0?t==="items"?(e.removeAll(!0),e.add(r)):t!=="layout"&&(a=i(t),e[a]!==void 0?e[a](r):e[t]=r):(a=i(t),e[a]!==void 0&&e[a](r))}},Ve=()=>{var e;return typeof ResizeObserver<"u"?(e=new ResizeObserver(t=>{if(!(typeof window===void 0||typeof window>"u"))for(let o of t){var r=0,i=o.target.children.item(r);if(i!==null&&o.contentBoxSize){let d=o.contentBoxSize[0];var a=d.inlineSize,l=window.Ext.getCmp(i.id);if(l!==void 0)window.Ext.getCmp(i.id).setWidth(a),window.Ext.getCmp(i.id).setHeight(d.blockSize);else if(!i.classList.contains("wm")){console.log("child not found",i.id);var n=i.getAttribute("w");n!=="w"&&console.warn("child not resized",i)}}}}),e):null};async function qe(){return await new Promise(e=>{function t(){window.Ext!==void 0&&window.Ext.onReady(function(){return clearInterval(r),e(1)})}var r=setInterval(t,5)})}var Ge=(e,t,r)=>{if(typeof window>"u")return;let i=document.createElement("div");i.classList.add("wm"),i.style.zIndex=2e4,i.style.position="absolute",i.style.bottom="0px",i.style.right="0px",i.style.color="white",i.style.fontSize="10px",i.style.fontWeight="bold",i.style.fontStyle="italic",i.style.background="#B87333",i.style.padding="1px 3px 1px 1px",i.style.border="1px solid lightgray",i.style.borderRadius="3px 3px 3px 3px",i.innerText="ReExt "+t,r!==null?r.appendChild(i):e.el!==void 0&&e.el.dom.appendChild(i)};function Xe(e){const t=ve();if(typeof window===void 0||typeof window>"u")return;const[r,i]=m.useState(null),[a,l]=m.useState(null),n=m.useRef(null);n.current=a;const o=()=>n.current,[d,y]=m.useState(null),f=m.useRef(null);f.current=d;const g=()=>f.current,p=m.useRef(null);var $=Ve();const[j,W]=m.useState(!1);m.useEffect(()=>{try{var v=__IS_REEXT_RUNNING__;W(!0)}catch{W(!1)}},[]),m.useEffect(()=>{var v,E="false";if(!(typeof window===void 0||typeof window>"u"))return(async()=>{if(await qe(),e.children!==void 0&&e.config.items===void 0&&(e.config.items=[]),E==="false"&&e.xtype!=="logo"){var k;g()==null?k=e.config:k=g();try{var h=Ue(e.xtype,k,e,o),P=Ext.ClassManager.getByAlias("widget."+h.xtype);if(P===void 0){var C="ReExt "+h.xtype+" could not be created";h={xtype:"label",text:C,style:{color:"red",background:"lightgray"}}}if(h.height===void 0&&h.xtype!=="window"&&(window.Ext.isClassic===!0&&h.xtype==="grid"?h.height=0:h.height="100%"),h.width===void 0&&h.xtype!=="window"&&(window.Ext.isClassic===!0&&h.xtype==="grid"?h.width=0:h.width="100%"),window.Ext.isClassic===!0){const K=ye=>{var G=ye.el.dom.parentNode;$.observe(G)};h.listeners===void 0?h.listeners={boxready:K}:h.listeners.boxready=K}h.xtype!=="window"&&(h.renderTo=p.current),h.xtype==="tabpanel"&&(h.deferredRender=!1);var T=ge(e.children,h,$);i(T.cpArray),T.childarray.length>0&&(h.items=T.childarray),v=window.Ext.create(h),l(v),n.current=v,e.config!==void 0&&e.config.reference!==void 0&&e.ReExtParent!==void 0&&(e.ReExtParent.ReExtChildren===void 0&&(e.ReExtParent.ReExtChildren=[]),e.ReExtParent.ReExtChildren.push(v)),p.current===null?console.warn("ReExtRootRef.current,props",p.current,e):(p.current.style.background="transparent",p.current.firstChild.remove()),t.type!==null&&t.type!=="production"&&Ge(v,h.xtype,p.current),e.ready!==void 0&&e.ready(v)}catch(K){console.error("ReExt.jsx:",K)}}})(),()=>{E="true",!(typeof window===void 0||typeof window>"u")&&window.Ext!==void 0&&window.Ext.destroy!==void 0&&v!=null&&(l(null),window.Ext.destroy(v))}},[t.type]),m.useEffect(()=>{if(!(typeof window===void 0||typeof window>"u")&&e.config!==void 0){if(n.current!==null){e.children!==void 0&&e.config.items===void 0&&(e.config.items=[]);for(const[T]of Object.entries(f.current)){if(Fe(T)!=null||T==="xtype")return;var v=Y(f.current[T],"root"),E=Y(e.config[T],"root");v!=null&&delete v.listeners,E!==void 0&&v!==null&&delete E.listeners;const K=ye=>{let G=[],cr=JSON.stringify(ye,function(dr,X){if(typeof X=="object"&&X!==null){if(G.indexOf(X)!==-1)return;G.push(X)}return X});return G=null,cr};var k=K(v),h=K(E),P=ne(k,h);if(!P&&(Be(n.current,T,E),T==="items")){var C=ge(e.children,n.current,$);i(C.cpArray)}}}y(e.config),f.current=e.config}},[e.config]);var H="",S="",N="",J="";if(!(typeof window===void 0||typeof window>"u")){if(window.Ext!==void 0&&window.Ext.versions!==null&&window.Ext.versions!==void 0){S=window.Ext.versions.core.version,J=window.Ext.ReExtTheme,H=window.Ext.ReExtLocation;var u=window.Ext.isClassic;u===!0?N="classic":N="modern"}if(!(typeof window===void 0||typeof window>"u")){var A="";if(t.type==="production"||t.type===null?A="production":A=`${t.type} - ${t.daysleft} days left`,e.xtype==="logo")return s.jsx(Le,{reextplugin:j,rid:e.rid,reactversion:m.version,extver:S,extlocation:H,exttoolkit:N,exttheme:J,type:A,packageversion:he,flexdirection:e.flexdirection,style:e.style});var x;e.style===void 0||e.style.height===void 0?x=1:x="none";var w="";if(e.className!==void 0&&(w=e.className),e.xtype==="window")return null;var U,F,b={};return r==null?(U={...e.style,...b,flex:x,position:"relative",display:"flex",overflow:"hidden"},F=w+" fill"):r.length===0?(U={...e.style,...b,flex:x,position:"relative",display:"flex",overflow:"hidden"},F=w+" fill"):(U={...e.style,flex:x,position:"relative",display:"flex",overflow:"hidden"},F=w),s.jsx("div",{name:"ReExtRoot-"+e.xtype,"data-rid":e.rid,className:F,style:U,ref:p,children:s.jsx("div",{className:"portalroot",style:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:r!==null&&r.map(v=>v)})})}}}async function Ye(){if(typeof window===void 0||typeof window>"u")return;function e(t){t.style.width="100%",t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.padding="0",t.style.boxSizing="border-box",t.style.overflow="hidden"}document.documentElement&&e(document.documentElement),document.body&&e(document.body),document.getElementById("root")&&e(document.getElementById("root"))}function Qe(){if(!(typeof window===void 0||typeof window>"u"))return s.jsx("div",{className:"splash",style:{fontSize:"36px",border:"10px solid #0960a5",width:"100%",height:"100%",margin:0,padding:0,boxSizing:"border-box",overflow:"hidden",display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center"},children:s.jsx("img",{style:{height:500,width:1e3},src:"../ReExt/ReExt.png"})})}var Ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),et=Ze(()=>{}),oe=crypto,me=e=>e instanceof CryptoKey,Q=new TextEncoder,B=new TextDecoder;function tt(...e){let t=e.reduce((a,{length:l})=>a+l,0),r=new Uint8Array(t),i=0;for(let a of e)r.set(a,i),i+=a.length;return r}var rt=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r},V=e=>{let t=e;t instanceof Uint8Array&&(t=B.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return rt(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}},z=class extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,(t=Error.captureStackTrace)==null||t.call(Error,this,this.constructor)}},I=class extends z{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t,r="unspecified",i="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=r,this.reason=i,this.payload=t}},xe=class extends z{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t,r="unspecified",i="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=r,this.reason=i,this.payload=t}},L=class extends z{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}},R=class extends z{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}},D=class extends z{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}},it=class extends z{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}};function O(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function Z(e,t){return e.name===t}function se(e){return parseInt(e.name.slice(4),10)}function at(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function nt(e,t){if(t.length&&!t.some(r=>e.usages.includes(r))){let r="CryptoKey does not support this operation, its usages must include ";if(t.length>2){let i=t.pop();r+=`one of ${t.join(", ")}, or ${i}.`}else t.length===2?r+=`one of ${t[0]} or ${t[1]}.`:r+=`${t[0]}.`;throw new TypeError(r)}}function ot(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!Z(e.algorithm,"HMAC"))throw O("HMAC");let i=parseInt(t.slice(2),10);if(se(e.algorithm.hash)!==i)throw O(`SHA-${i}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Z(e.algorithm,"RSASSA-PKCS1-v1_5"))throw O("RSASSA-PKCS1-v1_5");let i=parseInt(t.slice(2),10);if(se(e.algorithm.hash)!==i)throw O(`SHA-${i}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Z(e.algorithm,"RSA-PSS"))throw O("RSA-PSS");let i=parseInt(t.slice(2),10);if(se(e.algorithm.hash)!==i)throw O(`SHA-${i}`,"algorithm.hash");break}case"EdDSA":{if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448")throw O("Ed25519 or Ed448");break}case"ES256":case"ES384":case"ES512":{if(!Z(e.algorithm,"ECDSA"))throw O("ECDSA");let i=at(t);if(e.algorithm.namedCurve!==i)throw O(i,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}nt(e,r)}function be(e,t,...r){var i;if(r.length>2){let a=r.pop();e+=`one of type ${r.join(", ")}, or ${a}.`}else r.length===2?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&((i=t.constructor)!=null&&i.name)&&(e+=` Received an instance of ${t.constructor.name}`),e}var Ee=(e,...t)=>be("Key must be ",e,...t);function Se(e,t,...r){return be(`Key for the ${e} algorithm must be `,t,...r)}var ke=e=>me(e)?!0:(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",ee=["CryptoKey"],st=(...e)=>{let t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let r;for(let i of t){let a=Object.keys(i);if(!r||r.size===0){r=new Set(a);continue}for(let l of a){if(r.has(l))return!1;r.add(l)}}return!0},lt=st;function ct(e){return typeof e=="object"&&e!==null}function te(e){if(!ct(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var dt=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){let{modulusLength:r}=t.algorithm;if(typeof r!="number"||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function ft(e){let t,r;switch(e.kty){case"RSA":{switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new L('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"EC":{switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new L('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"OKP":{switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new L('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}default:throw new L('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}var ut=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:t,keyUsages:r}=ft(e),i=[t,e.ext??!1,e.key_ops??r],a={...e};return delete a.alg,delete a.use,oe.subtle.importKey("jwk",a,...i)},pt=ut,$e=e=>V(e),le,ce,Ce=e=>(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",Ae=async(e,t,r,i)=>{let a=e.get(t);if(a!=null&&a[i])return a[i];let l=await pt({...r,alg:i});return a?a[i]=l:e.set(t,{[i]:l}),l},yt=(e,t)=>{if(Ce(e)){let r=e.export({format:"jwk"});return delete r.d,delete r.dp,delete r.dq,delete r.p,delete r.q,delete r.qi,r.k?$e(r.k):(ce||(ce=new WeakMap),Ae(ce,e,r,t))}return e},ht=(e,t)=>{if(Ce(e)){let r=e.export({format:"jwk"});return r.k?$e(r.k):(le||(le=new WeakMap),Ae(le,e,r,t))}return e},wt={normalizePublicKey:yt,normalizePrivateKey:ht},M=e=>e==null?void 0:e[Symbol.toStringTag],vt=(e,t)=>{if(!(t instanceof Uint8Array)){if(!ke(t))throw new TypeError(Se(e,t,...ee,"Uint8Array"));if(t.type!=="secret")throw new TypeError(`${M(t)} instances for symmetric algorithms must be of type "secret"`)}},gt=(e,t,r)=>{if(!ke(t))throw new TypeError(Se(e,t,...ee));if(t.type==="secret")throw new TypeError(`${M(t)} instances for asymmetric algorithms must not be of type "secret"`);if(r==="sign"&&t.type==="public")throw new TypeError(`${M(t)} instances for asymmetric algorithm signing must be of type "private"`);if(r==="decrypt"&&t.type==="public")throw new TypeError(`${M(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&r==="verify"&&t.type==="private")throw new TypeError(`${M(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&r==="encrypt"&&t.type==="private")throw new TypeError(`${M(t)} instances for asymmetric algorithm encryption must be of type "public"`)},mt=(e,t,r)=>{e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?vt(e,t):gt(e,t,r)},xt=mt;function bt(e,t,r,i,a){if(a.crit!==void 0&&(i==null?void 0:i.crit)===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!i||i.crit===void 0)return new Set;if(!Array.isArray(i.crit)||i.crit.length===0||i.crit.some(n=>typeof n!="string"||n.length===0))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let l;r!==void 0?l=new Map([...Object.entries(r),...t.entries()]):l=t;for(let n of i.crit){if(!l.has(n))throw new L(`Extension Header Parameter "${n}" is not recognized`);if(a[n]===void 0)throw new e(`Extension Header Parameter "${n}" is missing`);if(l.get(n)&&i[n]===void 0)throw new e(`Extension Header Parameter "${n}" MUST be integrity protected`)}return new Set(i.crit)}var Et=bt;function St(e,t){let r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new L(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function kt(e,t,r){if(t=await wt.normalizePublicKey(t,e),me(t))return ot(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(Ee(t,...ee));return oe.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(Ee(t,...ee,"Uint8Array"))}var $t=async(e,t,r,i)=>{let a=await kt(e,t,"verify");dt(e,a);let l=St(e,a.algorithm);try{return await oe.subtle.verify(l,a,r,i)}catch{return!1}},Ct=$t;async function At(e,t,r){if(!te(e))throw new R("Flattened JWS must be an object");if(e.protected===void 0&&e.header===void 0)throw new R('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new R("JWS Protected Header incorrect type");if(e.payload===void 0)throw new R("JWS Payload missing");if(typeof e.signature!="string")throw new R("JWS Signature missing or incorrect type");if(e.header!==void 0&&!te(e.header))throw new R("JWS Unprotected Header incorrect type");let i={};if(e.protected)try{let $=V(e.protected);i=JSON.parse(B.decode($))}catch{throw new R("JWS Protected Header is invalid")}if(!lt(i,e.header))throw new R("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let a={...i,...e.header},l=Et(R,new Map([["b64",!0]]),r==null?void 0:r.crit,i,a),n=!0;if(l.has("b64")&&(n=i.b64,typeof n!="boolean"))throw new R('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:o}=a;if(typeof o!="string"||!o)throw new R('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(n){if(typeof e.payload!="string")throw new R("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new R("JWS Payload must be a string or an Uint8Array instance");let d=!1;typeof t=="function"&&(t=await t(i,e),d=!0),xt(o,t,"verify");let y=tt(Q.encode(e.protected??""),Q.encode("."),typeof e.payload=="string"?Q.encode(e.payload):e.payload),f;try{f=V(e.signature)}catch{throw new R("Failed to base64url decode the signature")}if(!await Ct(o,t,f,y))throw new it;let g;if(n)try{g=V(e.payload)}catch{throw new R("Failed to base64url decode the payload")}else typeof e.payload=="string"?g=Q.encode(e.payload):g=e.payload;let p={payload:g};return e.protected!==void 0&&(p.protectedHeader=i),e.header!==void 0&&(p.unprotectedHeader=e.header),d?{...p,key:t}:p}async function Tt(e,t,r){if(e instanceof Uint8Array&&(e=B.decode(e)),typeof e!="string")throw new R("Compact JWS must be a string or Uint8Array");let{0:i,1:a,2:l,length:n}=e.split(".");if(n!==3)throw new R("Invalid Compact JWS");let o=await At({payload:a,protected:i,signature:l},t,r),d={payload:o.payload,protectedHeader:o.protectedHeader};return typeof t=="function"?{...d,key:o.key}:d}var Rt=e=>Math.floor(e.getTime()/1e3),Pt=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,Te=e=>{let t=Pt.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");let r=parseFloat(t[2]),i=t[3].toLowerCase(),a;switch(i){case"sec":case"secs":case"second":case"seconds":case"s":a=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":a=Math.round(r*60);break;case"hour":case"hours":case"hr":case"hrs":case"h":a=Math.round(r*3600);break;case"day":case"days":case"d":a=Math.round(r*86400);break;case"week":case"weeks":case"w":a=Math.round(r*604800);break;default:a=Math.round(r*31557600);break}return t[1]==="-"||t[4]==="ago"?-a:a},Re=e=>e.toLowerCase().replace(/^application\//,""),_t=(e,t)=>typeof e=="string"?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1,jt=(e,t,r={})=>{let i;try{i=JSON.parse(B.decode(t))}catch{}if(!te(i))throw new D("JWT Claims Set must be a top-level JSON object");let{typ:a}=r;if(a&&(typeof e.typ!="string"||Re(e.typ)!==Re(a)))throw new I('unexpected "typ" JWT header value',i,"typ","check_failed");let{requiredClaims:l=[],issuer:n,subject:o,audience:d,maxTokenAge:y}=r,f=[...l];y!==void 0&&f.push("iat"),d!==void 0&&f.push("aud"),o!==void 0&&f.push("sub"),n!==void 0&&f.push("iss");for(let j of new Set(f.reverse()))if(!(j in i))throw new I(`missing required "${j}" claim`,i,j,"missing");if(n&&!(Array.isArray(n)?n:[n]).includes(i.iss))throw new I('unexpected "iss" claim value',i,"iss","check_failed");if(o&&i.sub!==o)throw new I('unexpected "sub" claim value',i,"sub","check_failed");if(d&&!_t(i.aud,typeof d=="string"?[d]:d))throw new I('unexpected "aud" claim value',i,"aud","check_failed");let g;switch(typeof r.clockTolerance){case"string":g=Te(r.clockTolerance);break;case"number":g=r.clockTolerance;break;case"undefined":g=0;break;default:throw new TypeError("Invalid clockTolerance option type")}let{currentDate:p}=r,$=Rt(p||new Date);if((i.iat!==void 0||y)&&typeof i.iat!="number")throw new I('"iat" claim must be a number',i,"iat","invalid");if(i.nbf!==void 0){if(typeof i.nbf!="number")throw new I('"nbf" claim must be a number',i,"nbf","invalid");if(i.nbf>$+g)throw new I('"nbf" claim timestamp check failed',i,"nbf","check_failed")}if(i.exp!==void 0){if(typeof i.exp!="number")throw new I('"exp" claim must be a number',i,"exp","invalid");if(i.exp<=$-g)throw new xe('"exp" claim timestamp check failed',i,"exp","check_failed")}if(y){let j=$-i.iat,W=typeof y=="number"?y:Te(y);if(j-g>W)throw new xe('"iat" claim timestamp check failed (too far in the past)',i,"iat","check_failed");if(j<0-g)throw new I('"iat" claim timestamp check failed (it should be in the past)',i,"iat","check_failed")}return i};async function It(e,t,r){var l;let i=await Tt(e,t,r);if((l=i.protectedHeader.crit)!=null&&l.includes("b64")&&i.protectedHeader.b64===!1)throw new D("JWTs MUST NOT use unencoded payload");let a={payload:jt(i.protectedHeader,i.payload,r),protectedHeader:i.protectedHeader};return typeof t=="function"?{...a,key:i.key}:a}var Dt=V;function Ot(e){if(typeof e!="string")throw new D("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:r}=e.split(".");if(r===5)throw new D("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new D("Invalid JWT");if(!t)throw new D("JWTs must contain a payload");let i;try{i=Dt(t)}catch{throw new D("Failed to base64url decode the payload")}let a;try{a=JSON.parse(B.decode(i))}catch{throw new D("Failed to parse the decoded payload as JSON")}if(!te(a))throw new D("Invalid JWT Claims Set");return a}function re(e){var t=new Error(e);return t.source="ulid",t}var de="0123456789ABCDEFGHJKMNPQRSTVWXYZ",q=de.length,Pe=Math.pow(2,48)-1,Wt=10,Ht=16;function Jt(e){var t=Math.floor(e()*q);return t===q&&(t=q-1),de.charAt(t)}function Nt(e,t){if(isNaN(e))throw new Error(e+" must be a number");if(e>Pe)throw re("cannot encode time greater than "+Pe);if(e<0)throw re("time must be positive");if(Number.isInteger(e)===!1)throw re("time must be an integer");for(var r=void 0,i="";t>0;t--)r=e%q,i=de.charAt(r)+i,e=(e-r)/q;return i}function Kt(e,t){for(var r="";e>0;e--)r=Jt(t)+r;return r}function zt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=arguments[1];t||(t=typeof window<"u"?window:null);var r=t&&(t.crypto||t.msCrypto);if(r)return function(){var a=new Uint8Array(1);return r.getRandomValues(a),a[0]/255};try{var i=et();return function(){return i.randomBytes(1).readUInt8()/255}}catch{}if(e){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch{}return function(){return Math.random()}}throw re("secure crypto unusable, insecure Math.random not allowed")}function Lt(e){return e||(e=zt()),function(t){return isNaN(t)&&(t=Date.now()),Nt(t,Wt)+Kt(Ht,e)}}Lt();var fe;function Mt(e){return fe==null?void 0:fe.get(e)}var ue;function Ut(e){return ue==null?void 0:ue.get(e)}var pe;function Ft(e,t){var r;return(r=pe==null?void 0:pe.get(e))==null?void 0:r.get(t)}function Bt(e){var r,i;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function ie(e,t,r,i,a){let l=a&&"input"in a?a.input:r.value,n=(a==null?void 0:a.expected)??e.expects??null,o=(a==null?void 0:a.received)??Bt(l),d={kind:e.kind,type:e.type,input:l,expected:n,received:o,message:`Invalid ${t}: ${n?`Expected ${n} but r`:"R"}eceived ${o}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},y=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??Ft(e.reference,d.lang)??(y?Ut(d.lang):null)??i.message??Mt(d.lang);f&&(d.message=typeof f=="function"?f(d):f),y&&(r.typed=!1),r.issues?r.issues.push(d):r.issues=[d]}function _e(e){return{kind:"transformation",type:"brand",reference:_e,async:!1,name:e,_run(t){return t}}}function Vt(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function je(e){return{kind:"schema",type:"number",reference:je,expects:"number",async:!1,message:e,_run(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ie(this,"type",t,r),t}}}function Ie(e,...t){let r={kind:"schema",type:"optional",reference:Ie,expects:`${e.expects} | undefined`,async:!1,wrapped:e,_run(i,a){return i.value===void 0&&("default"in this&&(i.value=Vt(this,i,a)),i.value===void 0)?(i.typed=!0,i):this.wrapped._run(i,a)}};return 0 in t&&(r.default=t[0]),r}function De(e,t){return{kind:"schema",type:"strict_object",reference:De,expects:"Object",async:!1,entries:e,message:t,_run(r,i){var l;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let n in this.entries){let o=a[n],d=this.entries[n]._run({typed:!1,value:o},i);if(d.issues){let y={type:"object",origin:"value",input:a,key:n,value:o};for(let f of d.issues)f.path?f.path.unshift(y):f.path=[y],(l=r.issues)==null||l.push(f);if(r.issues||(r.issues=d.issues),i.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),(d.value!==void 0||n in a)&&(r.value[n]=d.value)}if(!r.issues||!i.abortEarly){for(let n in a)if(!(n in this.entries)){let o=a[n];ie(this,"type",r,i,{input:o,expected:"never",path:[{type:"object",origin:"value",input:a,key:n,value:o}]});break}}}else ie(this,"type",r,i);return r}}}function Oe(e){return{kind:"schema",type:"string",reference:Oe,expects:"string",async:!1,message:e,_run(t,r){return typeof t.value=="string"?t.typed=!0:ie(this,"type",t,r),t}}}function qt(...e){return{...e[0],pipe:e,_run(t,r){for(let i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i._run(t,r))}return t}}}var Gt=qt(Oe(),_e("lid"));De({id:Gt,ver:Ie(je())});var Xt=e=>()=>e*48271%2147483647/2147483647,Yt=e=>typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(typeof e=="string"?e:String.fromCharCode(...e)),Qt=e=>typeof Buffer<"u"?Buffer.from(e,"base64").toString():atob(e),Zt=(e,t)=>{let r=Xt(t),i=new TextEncoder().encode(e).map(a=>a^Math.floor(r()*256));return Yt(i)},er=e=>e.split("").reverse().join(""),tr=e=>typeof e=="object"&&!!e&&"sub"in e&&"exp"in e&&typeof e.sub=="string"&&typeof e.exp=="number",rr=async e=>{let t=er(Qt(e));return{decoded:Ot(t),jwt:t}},ir=async e=>{let{decoded:t,jwt:r}=await rr(e);if(!tr(t))throw new Error("Invalid license key");let{sub:i,exp:a}=t,l=new TextEncoder().encode(Zt(i,a));return await It(r,l),t};function ar({r:e,v:t,t:r}){const i=ve();if(m.useEffect(()=>{e!==void 0&&e.toLowerCase().includes("ehsug")?i.setType("production"):i.setType(r)},[]),m.useEffect(()=>{const a=async n=>{if(n===void 0)return{type:"nokey",daysleft:0};try{const o=await ir(n),f=new Date(o.exp*1e3)-new Date,g=Math.floor(f/(1e3*60*60*24));return g>0?{type:"trial",daysleft:g}:{type:"expired",daysleft:0}}catch(o){return o.message.includes("claim timestamp check failed")?{type:"expired",daysleft:0}:{type:"invalidkey",daysleft:0}}},l=async()=>{var n=await a(e);switch(i.setType(n.type),i.setDaysLeft(n.daysleft),n.type){case"production":case"trial":i.setTrialDialog(!1);break;case"nokey":case"expired":case"invalidkey":default:i.setTrialDialog(!0);break}};i.type!==null&&i.type!=="production"&&l()},[i.type]),i.type!=="production"&&i.trialdialog===!0)return s.jsx("div",{style:{zIndex:2e5,fontSize:"22px",background:"rgb(211,211,211,.4)",color:"black",display:"flex",flexDirection:"column",position:"absolute",left:"50%",width:"100%",height:"100%",transform:"translateX(-50%)",padding:"10px 10px 10px 10px",border:"1px solid black"},children:s.jsxs("div",{style:{height:"100%",display:"flex",padding:"10px 10px 10px 10px",flexDirection:"column",margin:"40px",borderRadius:"5px",border:"1px solid gray",background:"white"},children:[s.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[s.jsx("img",{style:{width:160},src:"../ReExt/ReExt.png"}),s.jsxs("div",{style:{margin:"0 0 0 20px"},children:["Welcome to the ReExt v",t," Trial"]})]}),i.type==="trial"||i.type==="nokey"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{margin:"10px 0 10px 0",fontSize:"18px"},children:["This is a 30 day trial version of ReExt.",s.jsx("br",{}),"Without a valid trial key, this dialog will appear.",s.jsx("br",{}),s.jsx("br",{}),"To have a trial key emailed to you, fill in this form and click 'Get Trial Key'."]}),s.jsx("div",{style:{xwidth:"100%",flex:1,display:"flex",border:"0px solid red"},children:s.jsx("iframe",{style:{width:"100%",margin:"0 0 10px 0",flex:1,border:"0px solid lightgray"},src:"https://www.sencha.com/forms/reext/trial-reext.php"})}),s.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-end"},children:[s.jsx("div",{style:{fontSize:"12px"},children:i.type}),s.jsx("button",{style:{fontSize:"18px",padding:"5px 5px 5px 5px"},onClick:()=>{i.setTrialDialog(!1)},children:"Close"})]})]}),i.type==="expired"&&s.jsx(s.Fragment,{children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",margin:"10px 0 10px 0",fontSize:"18px",height:"100%"},children:[s.jsx("div",{style:{margin:"0 0 20px 0",fontSize:"24px"},children:"Your ReExt trial key has expired"}),s.jsx("div",{children:"Contact Sencha Sales"}),s.jsx("div",{children:s.jsx("a",{href:"https://www.sencha.com/company/contact/",target:"_blank",rel:"noopener noreferrer",children:"https://www.sencha.com/company/contact/"})})]})}),i.type==="invalidkey"&&s.jsx(s.Fragment,{children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",margin:"10px 0 10px 0",fontSize:"18px",height:"100%"},children:[s.jsx("div",{style:{margin:"0 0 20px 0",fontSize:"24px"},children:"Your ReExt trial key is invalid"}),s.jsx("div",{children:"Contact Sencha Sales"}),s.jsx("div",{children:s.jsx("a",{href:"https://www.sencha.com/company/contact/",target:"_blank",rel:"noopener noreferrer",children:"https://www.sencha.com/company/contact/"})})]})})]})})}async function nr(e){try{let A=async(b,v,E)=>new Promise(k=>{window.Ext.onReady(function(){return window.Ext.ReExtLocation=E,window.Ext.ReExtTheme=b,window.Ext.ReExtLi=!0,k(1)})}),x=async b=>typeof window===void 0||typeof window>"u"?void 0:new Promise((v,E)=>{let k=document.getElementsByTagName("HEAD")[0];var h=!1;for(let P=0;P<k.childNodes.length;P++)k.childNodes[P].src===b&&(h=!0);if(h===!1){let P=document.createElement("script");P.src=b,k.appendChild(P),P.addEventListener("load",()=>{if(window.Ext===void 0)return v(1);window.Ext.onReady(function(){return v(1)})}),P.addEventListener("error",()=>{var C=`${b} (js) | ||
(function(_,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],s):(_=typeof globalThis<"u"?globalThis:_||self,s(_.ReExt={},_.jsxRuntime,_.React,_.ReactDOM))})(this,function(_,s,m,ae){"use strict";const he="1.0.315",He=(e,t)=>{for(var r in e)typeof e[r]=="function"&&function(i,a){var l=r;e[r]=function(){t===!0&&console.log("---"),console.log("globalState."+l+" payload:",arguments[0]),t===!0&&console.log(new Error().stack),t===!0&&console.log("---");var n=a.apply(this,arguments);return n}}(r,e[r])},Je=async(e,t,r)=>{console.log("dispatch:",e.type,e.payload),r.dispatchStack&&console.log(new Error().stack)},Ne=(e,t,r)=>{const[i,a]=m.useReducer(e,t),l=m.useRef(null);var n=r.middleware;n===void 0&&(n=[]);var o=r.middlewareafter;return o===void 0&&(o=[]),m.useEffect(()=>{o.map(d=>d(l.current,i))},[o,i]),[i,d=>{n.map(y=>y(d,i,r)),l.current=d,a(d)}]},we=m.createContext(),ve=()=>m.useContext(we),Ke=(e,t)=>{var r={...e};return r[t.type.toLowerCase()]=t.payload,window.vscodeapi!==void 0&&vscodeapi.setState(r),r},ze=e=>{if(e===void 0)return;var t=e.types,r={};for(let o in t)t.hasOwnProperty(o)&&(r["set"+o]=d=>l({type:o,payload:d}));var i={};for(let o in t)t.hasOwnProperty(o)&&(i[o.toLowerCase()]=t[o].value);m.useEffect(()=>{e.dispatchTrace&&e.middleware.push(Je)},[e]),e.actionTrace&&He(r,e.actionStack);const[a,l]=Ne(Ke,i,e),n=(o,d)=>{var y={};for(const[f]of Object.entries(d))y[f]=o[f];return y};return m.createElement(we.Provider,{value:{...n(a,i),...r}},e.children)};function Y(e,t){try{if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);if(Array.isArray(e)){let r=[];for(let i=0;i<e.length;i++)r[i]=Y(e[i],"array");return r}if(e instanceof Object){delete e.$initParent;let r={};for(let i in e)e.hasOwnProperty(i)&&(r[i]=Y(e[i],"object"));return r}return e}catch{return console.error("error - cloneDeep node:",t),""}}function ne(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!ne(e[r],t[r]))return!1;return!0}if(e instanceof Object&&t instanceof Object){let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let a of r)if(!t.hasOwnProperty(a)||!ne(e[a],t[a]))return!1;return!0}return!1}function Le({reextplugin:e,rid:t,reactversion:r,extver:i,extlocation:a,exttoolkit:l,exttheme:n,type:o,packageversion:d,style:y,flexdirection:f,...g}){return s.jsxs("div",{name:"ReExtRootLogo","data-rid":g.rid,style:{display:"flex",flexDirection:f,alignItems:"center",color:"black",padding:5,...y},children:[s.jsx("img",{style:{height:40,width:80},src:"../ReExt/ReExt.png"}),s.jsxs("div",{style:{margin:"0 0 0 3px"},children:[s.jsx("div",{style:{margin:"0 0 0 1px",fontSize:12,color:"black"},children:s.jsx("a",{style:g.style,target:"_blank",rel:"noreferrer",href:"https://www.npmjs.com/package/@sencha/reext",children:s.jsxs("i",{children:["ReExt ",d]})})}),s.jsx("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:s.jsxs("span",{style:{margin:"0 0 0 0"},children:[o,", reextplugin: ",e.toString()]})}),s.jsx("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:s.jsxs("span",{style:{margin:"0 0 0 0"},children:["React: ",s.jsx("b",{children:r})]})}),s.jsx("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:s.jsxs("span",{style:{margin:"0 0 0 0"},children:["ExtJS: ",s.jsxs("b",{children:[i," (",a,")"]})]})}),s.jsxs("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:[s.jsxs("span",{style:{margin:"0 0 0 0"},children:["toolkit: ",s.jsx("b",{children:l})]}),s.jsxs("span",{style:{margin:"0 0 0 5px"},children:["theme: ",s.jsx("b",{children:n})]})]})]})]})}var Me=e=>{var t=null,r=e.slice(0,2);if(r==="on"){var i=e.charAt(2),a=e.charAt(2).toUpperCase();i===a&&(t=e.slice(2).toLowerCase())}return window.Ext.isClassic===!0&&t==="tap"&&(t="click"),t},Ue=(e,t,r,i)=>{if(!(typeof window===void 0||typeof window>"u")){var a={};if(a.xtype=e,t!==void 0)for(let[n,o]of Object.entries(t))a[n]=o;if(r.references===!0&&(a.controller=window.Ext.create("Ext.app.ViewController")),a.store!==void 0&&(a.store.listeners!==void 0?a.store.listeners.load===void 0&&(a.store.listeners.load=n=>{r.storeloaded!==void 0&&r.storeloaded(n,i())}):a.store.listeners={load:n=>{r.storeloaded!==void 0&&r.storeloaded(n,i())}}),a.listeners===void 0){a.listeners={};for(let[n,o]of Object.entries(r)){var l=Me(n);l!==null&&(a.listeners[l]=function(){o(...arguments)})}Object.keys(a.listeners).length===0&&delete a.listeners}return a}},Fe=e=>{var t=null,r=e.slice(0,2);if(r==="on"){var i=e.charAt(2),a=e.charAt(2).toUpperCase();i===a&&(t=e.slice(2).toLowerCase())}return window.Ext.isClassic===!0&&t==="tap"&&(t="click"),t},ge=(e,t,r)=>{var i=[];if(!(typeof window===void 0||typeof window>"u")){var a=[],l=[];if(e===void 0)return{childarray:[],cpArray:[]};e.length===void 0?l.push(e):l=e;try{l.map(o=>{var d,y;if(t.xtype=="tabpanel"){var f;window.Ext.ReExtTheme==="classic"?f="Ext.panel.Panel":f="Ext.Panel",d=window.Ext.create(f,{layout:"fit",title:o.props.title,cls:"ReExtTabChildRoot",items:[{xtype:"component",listeners:{activate:p=>{y=ae.createPortal(o,p.el.dom),a.push(y);var $=p.el.dom.parentNode;r.observe($)},render:p=>{y=ae.createPortal(o,p.el.dom),a.push(y);var $=p.el.dom.parentNode;r.observe($)}},style:{backgroundColor:"transparent",display:"flex",height:"100%",width:"100%"}}]}),i.push(d)}else{let{flex:p,region:$,split:j,width:W,height:H,minWidth:S,maxWidth:N,minHeight:J,maxHeight:u}=o.props.config||{},A={};p!==void 0&&(A.flex=p),$!==void 0&&(A.region=$),j!==void 0&&(A.split=j),W!==void 0&&(A.width=W),H!==void 0&&(A.height=H),S!==void 0&&(A.minWidth=S),N!==void 0&&(A.maxWidth=N),J!==void 0&&(A.minHeight=J),u!==void 0&&(A.maxHeight=u),console.log("filteredConfig:",A),console.log(o);var g={items:[{xtype:"component",listeners:{render:x=>{y=ae.createPortal(o,x.el.dom),a.push(y);var w=x.el.dom.parentNode;r.observe(w)}},style:{flex:1,backgroundColor:"transparent",display:"flex",height:"100%",width:"100%"}}],...A};d={xtype:"container",layout:"fit",...g},i.push(d)}});var n={childarray:i,cpArray:a};return n}catch(o){return console.error("iteratechldren:",o.toString()),[]}}},Be=(e,t,r)=>{if(!(typeof window===void 0||typeof window>"u")){var i=l=>{let n=l.charAt(0).toUpperCase(),o=l.slice(1);var d="set"+(n+o);return d},a;window.Ext.isClassic===!0?t==="items"?(e.removeAll(!0),e.add(r)):t!=="layout"&&(a=i(t),e[a]!==void 0?e[a](r):e[t]=r):(a=i(t),e[a]!==void 0&&e[a](r))}},Ve=()=>{var e;return typeof ResizeObserver<"u"?(e=new ResizeObserver(t=>{if(!(typeof window===void 0||typeof window>"u"))for(let o of t){var r=0,i=o.target.children.item(r);if(i!==null&&o.contentBoxSize){let d=o.contentBoxSize[0];var a=d.inlineSize,l=window.Ext.getCmp(i.id);if(l!==void 0)window.Ext.getCmp(i.id).setWidth(a),window.Ext.getCmp(i.id).setHeight(d.blockSize);else if(!i.classList.contains("wm")){console.log("child not found",i.id);var n=i.getAttribute("w");n!=="w"&&console.warn("child not resized",i)}}}}),e):null};async function qe(){return await new Promise(e=>{function t(){window.Ext!==void 0&&window.Ext.onReady(function(){return clearInterval(r),e(1)})}var r=setInterval(t,5)})}var Ge=(e,t,r)=>{if(typeof window>"u")return;let i=document.createElement("div");i.classList.add("wm"),i.style.zIndex=2e4,i.style.position="absolute",i.style.bottom="0px",i.style.right="0px",i.style.color="white",i.style.fontSize="10px",i.style.fontWeight="bold",i.style.fontStyle="italic",i.style.background="#B87333",i.style.padding="1px 3px 1px 1px",i.style.border="1px solid lightgray",i.style.borderRadius="3px 3px 3px 3px",i.innerText="ReExt "+t,r!==null?r.appendChild(i):e.el!==void 0&&e.el.dom.appendChild(i)};function Xe(e){const t=ve();if(typeof window===void 0||typeof window>"u")return;const[r,i]=m.useState(null),[a,l]=m.useState(null),n=m.useRef(null);n.current=a;const o=()=>n.current,[d,y]=m.useState(null),f=m.useRef(null);f.current=d;const g=()=>f.current,p=m.useRef(null);var $=Ve();const[j,W]=m.useState(!1);m.useEffect(()=>{try{var v=__IS_REEXT_RUNNING__;W(!0)}catch{W(!1)}},[]),m.useEffect(()=>{var v,E="false";if(!(typeof window===void 0||typeof window>"u"))return(async()=>{if(await qe(),e.children!==void 0&&e.config.items===void 0&&(e.config.items=[]),E==="false"&&e.xtype!=="logo"){var k;g()==null?k=e.config:k=g();try{var h=Ue(e.xtype,k,e,o),P=Ext.ClassManager.getByAlias("widget."+h.xtype);if(P===void 0){var C="ReExt "+h.xtype+" could not be created";h={xtype:"label",text:C,style:{color:"red",background:"lightgray"}}}if(h.height===void 0&&h.xtype!=="window"&&(window.Ext.isClassic===!0&&h.xtype==="grid"?h.height=0:h.height="100%"),h.width===void 0&&h.xtype!=="window"&&(window.Ext.isClassic===!0&&h.xtype==="grid"?h.width=0:h.width="100%"),window.Ext.isClassic===!0){const K=ye=>{var G=ye.el.dom.parentNode;$.observe(G)};h.listeners===void 0?h.listeners={boxready:K}:h.listeners.boxready=K}h.xtype!=="window"&&(h.renderTo=p.current),h.xtype==="tabpanel"&&(h.deferredRender=!1);var T=ge(e.children,h,$);i(T.cpArray),T.childarray.length>0&&(h.items=T.childarray),v=window.Ext.create(h),l(v),n.current=v,e.config!==void 0&&e.config.reference!==void 0&&e.ReExtParent!==void 0&&(e.ReExtParent.ReExtChildren===void 0&&(e.ReExtParent.ReExtChildren=[]),e.ReExtParent.ReExtChildren.push(v)),p.current===null?console.warn("ReExtRootRef.current,props",p.current,e):(p.current.style.background="transparent",p.current.firstChild.remove()),t.type!==null&&t.type!=="production"&&Ge(v,h.xtype,p.current),e.ready!==void 0&&e.ready(v)}catch(K){console.error("ReExt.jsx:",K)}}})(),()=>{E="true",!(typeof window===void 0||typeof window>"u")&&window.Ext!==void 0&&window.Ext.destroy!==void 0&&v!=null&&(l(null),window.Ext.destroy(v))}},[t.type]),m.useEffect(()=>{if(!(typeof window===void 0||typeof window>"u")&&e.config!==void 0){if(n.current!==null){e.children!==void 0&&e.config.items===void 0&&(e.config.items=[]);for(const[T]of Object.entries(f.current)){if(Fe(T)!=null||T==="xtype")return;var v=Y(f.current[T],"root"),E=Y(e.config[T],"root");v!=null&&delete v.listeners,E!==void 0&&v!==null&&delete E.listeners;const K=ye=>{let G=[],cr=JSON.stringify(ye,function(dr,X){if(typeof X=="object"&&X!==null){if(G.indexOf(X)!==-1)return;G.push(X)}return X});return G=null,cr};var k=K(v),h=K(E),P=ne(k,h);if(!P&&(Be(n.current,T,E),T==="items")){var C=ge(e.children,n.current,$);i(C.cpArray)}}}y(e.config),f.current=e.config}},[e.config]);var H="",S="",N="",J="";if(!(typeof window===void 0||typeof window>"u")){if(window.Ext!==void 0&&window.Ext.versions!==null&&window.Ext.versions!==void 0){S=window.Ext.versions.core.version,J=window.Ext.ReExtTheme,H=window.Ext.ReExtLocation;var u=window.Ext.isClassic;u===!0?N="classic":N="modern"}if(!(typeof window===void 0||typeof window>"u")){var A="";if(t.type==="production"||t.type===null?A="production":A=`${t.type} - ${t.daysleft} days left`,e.xtype==="logo")return s.jsx(Le,{reextplugin:j,rid:e.rid,reactversion:m.version,extver:S,extlocation:H,exttoolkit:N,exttheme:J,type:A,packageversion:he,flexdirection:e.flexdirection,style:e.style});var x;e.style===void 0||e.style.height===void 0?x=1:x="none";var w="";if(e.className!==void 0&&(w=e.className),e.xtype==="window")return null;var U,F,b={};return r==null?(U={...e.style,...b,flex:x,position:"relative",display:"flex",overflow:"hidden"},F=w+" fill"):r.length===0?(U={...e.style,...b,flex:x,position:"relative",display:"flex",overflow:"hidden"},F=w+" fill"):(U={...e.style,flex:x,position:"relative",display:"flex",overflow:"hidden"},F=w),s.jsx("div",{name:"ReExtRoot-"+e.xtype,"data-rid":e.rid,className:F,style:U,ref:p,children:s.jsx("div",{className:"portalroot",style:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:r!==null&&r.map(v=>v)})})}}}async function Ye(){if(typeof window===void 0||typeof window>"u")return;function e(t){t.style.width="100%",t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.padding="0",t.style.boxSizing="border-box",t.style.overflow="hidden"}document.documentElement&&e(document.documentElement),document.body&&e(document.body),document.getElementById("root")&&e(document.getElementById("root"))}function Qe(){if(!(typeof window===void 0||typeof window>"u"))return s.jsx("div",{className:"splash",style:{fontSize:"36px",border:"10px solid #0960a5",width:"100%",height:"100%",margin:0,padding:0,boxSizing:"border-box",overflow:"hidden",display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center"},children:s.jsx("img",{style:{height:500,width:1e3},src:"../ReExt/ReExt.png"})})}var Ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),et=Ze(()=>{}),oe=crypto,me=e=>e instanceof CryptoKey,Q=new TextEncoder,B=new TextDecoder;function tt(...e){let t=e.reduce((a,{length:l})=>a+l,0),r=new Uint8Array(t),i=0;for(let a of e)r.set(a,i),i+=a.length;return r}var rt=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r},V=e=>{let t=e;t instanceof Uint8Array&&(t=B.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return rt(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}},z=class extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,(t=Error.captureStackTrace)==null||t.call(Error,this,this.constructor)}},I=class extends z{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t,r="unspecified",i="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=r,this.reason=i,this.payload=t}},xe=class extends z{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t,r="unspecified",i="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=r,this.reason=i,this.payload=t}},L=class extends z{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}},R=class extends z{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}},D=class extends z{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}},it=class extends z{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}};function O(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function Z(e,t){return e.name===t}function se(e){return parseInt(e.name.slice(4),10)}function at(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function nt(e,t){if(t.length&&!t.some(r=>e.usages.includes(r))){let r="CryptoKey does not support this operation, its usages must include ";if(t.length>2){let i=t.pop();r+=`one of ${t.join(", ")}, or ${i}.`}else t.length===2?r+=`one of ${t[0]} or ${t[1]}.`:r+=`${t[0]}.`;throw new TypeError(r)}}function ot(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!Z(e.algorithm,"HMAC"))throw O("HMAC");let i=parseInt(t.slice(2),10);if(se(e.algorithm.hash)!==i)throw O(`SHA-${i}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Z(e.algorithm,"RSASSA-PKCS1-v1_5"))throw O("RSASSA-PKCS1-v1_5");let i=parseInt(t.slice(2),10);if(se(e.algorithm.hash)!==i)throw O(`SHA-${i}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Z(e.algorithm,"RSA-PSS"))throw O("RSA-PSS");let i=parseInt(t.slice(2),10);if(se(e.algorithm.hash)!==i)throw O(`SHA-${i}`,"algorithm.hash");break}case"EdDSA":{if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448")throw O("Ed25519 or Ed448");break}case"ES256":case"ES384":case"ES512":{if(!Z(e.algorithm,"ECDSA"))throw O("ECDSA");let i=at(t);if(e.algorithm.namedCurve!==i)throw O(i,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}nt(e,r)}function be(e,t,...r){var i;if(r.length>2){let a=r.pop();e+=`one of type ${r.join(", ")}, or ${a}.`}else r.length===2?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&((i=t.constructor)!=null&&i.name)&&(e+=` Received an instance of ${t.constructor.name}`),e}var Ee=(e,...t)=>be("Key must be ",e,...t);function Se(e,t,...r){return be(`Key for the ${e} algorithm must be `,t,...r)}var ke=e=>me(e)?!0:(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",ee=["CryptoKey"],st=(...e)=>{let t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let r;for(let i of t){let a=Object.keys(i);if(!r||r.size===0){r=new Set(a);continue}for(let l of a){if(r.has(l))return!1;r.add(l)}}return!0},lt=st;function ct(e){return typeof e=="object"&&e!==null}function te(e){if(!ct(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var dt=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){let{modulusLength:r}=t.algorithm;if(typeof r!="number"||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function ft(e){let t,r;switch(e.kty){case"RSA":{switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new L('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"EC":{switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new L('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"OKP":{switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new L('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}default:throw new L('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}var ut=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:t,keyUsages:r}=ft(e),i=[t,e.ext??!1,e.key_ops??r],a={...e};return delete a.alg,delete a.use,oe.subtle.importKey("jwk",a,...i)},pt=ut,$e=e=>V(e),le,ce,Ce=e=>(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",Ae=async(e,t,r,i)=>{let a=e.get(t);if(a!=null&&a[i])return a[i];let l=await pt({...r,alg:i});return a?a[i]=l:e.set(t,{[i]:l}),l},yt=(e,t)=>{if(Ce(e)){let r=e.export({format:"jwk"});return delete r.d,delete r.dp,delete r.dq,delete r.p,delete r.q,delete r.qi,r.k?$e(r.k):(ce||(ce=new WeakMap),Ae(ce,e,r,t))}return e},ht=(e,t)=>{if(Ce(e)){let r=e.export({format:"jwk"});return r.k?$e(r.k):(le||(le=new WeakMap),Ae(le,e,r,t))}return e},wt={normalizePublicKey:yt,normalizePrivateKey:ht},M=e=>e==null?void 0:e[Symbol.toStringTag],vt=(e,t)=>{if(!(t instanceof Uint8Array)){if(!ke(t))throw new TypeError(Se(e,t,...ee,"Uint8Array"));if(t.type!=="secret")throw new TypeError(`${M(t)} instances for symmetric algorithms must be of type "secret"`)}},gt=(e,t,r)=>{if(!ke(t))throw new TypeError(Se(e,t,...ee));if(t.type==="secret")throw new TypeError(`${M(t)} instances for asymmetric algorithms must not be of type "secret"`);if(r==="sign"&&t.type==="public")throw new TypeError(`${M(t)} instances for asymmetric algorithm signing must be of type "private"`);if(r==="decrypt"&&t.type==="public")throw new TypeError(`${M(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&r==="verify"&&t.type==="private")throw new TypeError(`${M(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&r==="encrypt"&&t.type==="private")throw new TypeError(`${M(t)} instances for asymmetric algorithm encryption must be of type "public"`)},mt=(e,t,r)=>{e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?vt(e,t):gt(e,t,r)},xt=mt;function bt(e,t,r,i,a){if(a.crit!==void 0&&(i==null?void 0:i.crit)===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!i||i.crit===void 0)return new Set;if(!Array.isArray(i.crit)||i.crit.length===0||i.crit.some(n=>typeof n!="string"||n.length===0))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let l;r!==void 0?l=new Map([...Object.entries(r),...t.entries()]):l=t;for(let n of i.crit){if(!l.has(n))throw new L(`Extension Header Parameter "${n}" is not recognized`);if(a[n]===void 0)throw new e(`Extension Header Parameter "${n}" is missing`);if(l.get(n)&&i[n]===void 0)throw new e(`Extension Header Parameter "${n}" MUST be integrity protected`)}return new Set(i.crit)}var Et=bt;function St(e,t){let r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new L(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function kt(e,t,r){if(t=await wt.normalizePublicKey(t,e),me(t))return ot(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(Ee(t,...ee));return oe.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(Ee(t,...ee,"Uint8Array"))}var $t=async(e,t,r,i)=>{let a=await kt(e,t,"verify");dt(e,a);let l=St(e,a.algorithm);try{return await oe.subtle.verify(l,a,r,i)}catch{return!1}},Ct=$t;async function At(e,t,r){if(!te(e))throw new R("Flattened JWS must be an object");if(e.protected===void 0&&e.header===void 0)throw new R('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new R("JWS Protected Header incorrect type");if(e.payload===void 0)throw new R("JWS Payload missing");if(typeof e.signature!="string")throw new R("JWS Signature missing or incorrect type");if(e.header!==void 0&&!te(e.header))throw new R("JWS Unprotected Header incorrect type");let i={};if(e.protected)try{let $=V(e.protected);i=JSON.parse(B.decode($))}catch{throw new R("JWS Protected Header is invalid")}if(!lt(i,e.header))throw new R("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let a={...i,...e.header},l=Et(R,new Map([["b64",!0]]),r==null?void 0:r.crit,i,a),n=!0;if(l.has("b64")&&(n=i.b64,typeof n!="boolean"))throw new R('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:o}=a;if(typeof o!="string"||!o)throw new R('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(n){if(typeof e.payload!="string")throw new R("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new R("JWS Payload must be a string or an Uint8Array instance");let d=!1;typeof t=="function"&&(t=await t(i,e),d=!0),xt(o,t,"verify");let y=tt(Q.encode(e.protected??""),Q.encode("."),typeof e.payload=="string"?Q.encode(e.payload):e.payload),f;try{f=V(e.signature)}catch{throw new R("Failed to base64url decode the signature")}if(!await Ct(o,t,f,y))throw new it;let g;if(n)try{g=V(e.payload)}catch{throw new R("Failed to base64url decode the payload")}else typeof e.payload=="string"?g=Q.encode(e.payload):g=e.payload;let p={payload:g};return e.protected!==void 0&&(p.protectedHeader=i),e.header!==void 0&&(p.unprotectedHeader=e.header),d?{...p,key:t}:p}async function Tt(e,t,r){if(e instanceof Uint8Array&&(e=B.decode(e)),typeof e!="string")throw new R("Compact JWS must be a string or Uint8Array");let{0:i,1:a,2:l,length:n}=e.split(".");if(n!==3)throw new R("Invalid Compact JWS");let o=await At({payload:a,protected:i,signature:l},t,r),d={payload:o.payload,protectedHeader:o.protectedHeader};return typeof t=="function"?{...d,key:o.key}:d}var Rt=e=>Math.floor(e.getTime()/1e3),Pt=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,Te=e=>{let t=Pt.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");let r=parseFloat(t[2]),i=t[3].toLowerCase(),a;switch(i){case"sec":case"secs":case"second":case"seconds":case"s":a=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":a=Math.round(r*60);break;case"hour":case"hours":case"hr":case"hrs":case"h":a=Math.round(r*3600);break;case"day":case"days":case"d":a=Math.round(r*86400);break;case"week":case"weeks":case"w":a=Math.round(r*604800);break;default:a=Math.round(r*31557600);break}return t[1]==="-"||t[4]==="ago"?-a:a},Re=e=>e.toLowerCase().replace(/^application\//,""),_t=(e,t)=>typeof e=="string"?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1,jt=(e,t,r={})=>{let i;try{i=JSON.parse(B.decode(t))}catch{}if(!te(i))throw new D("JWT Claims Set must be a top-level JSON object");let{typ:a}=r;if(a&&(typeof e.typ!="string"||Re(e.typ)!==Re(a)))throw new I('unexpected "typ" JWT header value',i,"typ","check_failed");let{requiredClaims:l=[],issuer:n,subject:o,audience:d,maxTokenAge:y}=r,f=[...l];y!==void 0&&f.push("iat"),d!==void 0&&f.push("aud"),o!==void 0&&f.push("sub"),n!==void 0&&f.push("iss");for(let j of new Set(f.reverse()))if(!(j in i))throw new I(`missing required "${j}" claim`,i,j,"missing");if(n&&!(Array.isArray(n)?n:[n]).includes(i.iss))throw new I('unexpected "iss" claim value',i,"iss","check_failed");if(o&&i.sub!==o)throw new I('unexpected "sub" claim value',i,"sub","check_failed");if(d&&!_t(i.aud,typeof d=="string"?[d]:d))throw new I('unexpected "aud" claim value',i,"aud","check_failed");let g;switch(typeof r.clockTolerance){case"string":g=Te(r.clockTolerance);break;case"number":g=r.clockTolerance;break;case"undefined":g=0;break;default:throw new TypeError("Invalid clockTolerance option type")}let{currentDate:p}=r,$=Rt(p||new Date);if((i.iat!==void 0||y)&&typeof i.iat!="number")throw new I('"iat" claim must be a number',i,"iat","invalid");if(i.nbf!==void 0){if(typeof i.nbf!="number")throw new I('"nbf" claim must be a number',i,"nbf","invalid");if(i.nbf>$+g)throw new I('"nbf" claim timestamp check failed',i,"nbf","check_failed")}if(i.exp!==void 0){if(typeof i.exp!="number")throw new I('"exp" claim must be a number',i,"exp","invalid");if(i.exp<=$-g)throw new xe('"exp" claim timestamp check failed',i,"exp","check_failed")}if(y){let j=$-i.iat,W=typeof y=="number"?y:Te(y);if(j-g>W)throw new xe('"iat" claim timestamp check failed (too far in the past)',i,"iat","check_failed");if(j<0-g)throw new I('"iat" claim timestamp check failed (it should be in the past)',i,"iat","check_failed")}return i};async function It(e,t,r){var l;let i=await Tt(e,t,r);if((l=i.protectedHeader.crit)!=null&&l.includes("b64")&&i.protectedHeader.b64===!1)throw new D("JWTs MUST NOT use unencoded payload");let a={payload:jt(i.protectedHeader,i.payload,r),protectedHeader:i.protectedHeader};return typeof t=="function"?{...a,key:i.key}:a}var Dt=V;function Ot(e){if(typeof e!="string")throw new D("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:r}=e.split(".");if(r===5)throw new D("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new D("Invalid JWT");if(!t)throw new D("JWTs must contain a payload");let i;try{i=Dt(t)}catch{throw new D("Failed to base64url decode the payload")}let a;try{a=JSON.parse(B.decode(i))}catch{throw new D("Failed to parse the decoded payload as JSON")}if(!te(a))throw new D("Invalid JWT Claims Set");return a}function re(e){var t=new Error(e);return t.source="ulid",t}var de="0123456789ABCDEFGHJKMNPQRSTVWXYZ",q=de.length,Pe=Math.pow(2,48)-1,Wt=10,Ht=16;function Jt(e){var t=Math.floor(e()*q);return t===q&&(t=q-1),de.charAt(t)}function Nt(e,t){if(isNaN(e))throw new Error(e+" must be a number");if(e>Pe)throw re("cannot encode time greater than "+Pe);if(e<0)throw re("time must be positive");if(Number.isInteger(e)===!1)throw re("time must be an integer");for(var r=void 0,i="";t>0;t--)r=e%q,i=de.charAt(r)+i,e=(e-r)/q;return i}function Kt(e,t){for(var r="";e>0;e--)r=Jt(t)+r;return r}function zt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=arguments[1];t||(t=typeof window<"u"?window:null);var r=t&&(t.crypto||t.msCrypto);if(r)return function(){var a=new Uint8Array(1);return r.getRandomValues(a),a[0]/255};try{var i=et();return function(){return i.randomBytes(1).readUInt8()/255}}catch{}if(e){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch{}return function(){return Math.random()}}throw re("secure crypto unusable, insecure Math.random not allowed")}function Lt(e){return e||(e=zt()),function(t){return isNaN(t)&&(t=Date.now()),Nt(t,Wt)+Kt(Ht,e)}}Lt();var fe;function Mt(e){return fe==null?void 0:fe.get(e)}var ue;function Ut(e){return ue==null?void 0:ue.get(e)}var pe;function Ft(e,t){var r;return(r=pe==null?void 0:pe.get(e))==null?void 0:r.get(t)}function Bt(e){var r,i;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function ie(e,t,r,i,a){let l=a&&"input"in a?a.input:r.value,n=(a==null?void 0:a.expected)??e.expects??null,o=(a==null?void 0:a.received)??Bt(l),d={kind:e.kind,type:e.type,input:l,expected:n,received:o,message:`Invalid ${t}: ${n?`Expected ${n} but r`:"R"}eceived ${o}`,requirement:e.requirement,path:a==null?void 0:a.path,issues:a==null?void 0:a.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},y=e.kind==="schema",f=(a==null?void 0:a.message)??e.message??Ft(e.reference,d.lang)??(y?Ut(d.lang):null)??i.message??Mt(d.lang);f&&(d.message=typeof f=="function"?f(d):f),y&&(r.typed=!1),r.issues?r.issues.push(d):r.issues=[d]}function _e(e){return{kind:"transformation",type:"brand",reference:_e,async:!1,name:e,_run(t){return t}}}function Vt(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function je(e){return{kind:"schema",type:"number",reference:je,expects:"number",async:!1,message:e,_run(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ie(this,"type",t,r),t}}}function Ie(e,...t){let r={kind:"schema",type:"optional",reference:Ie,expects:`${e.expects} | undefined`,async:!1,wrapped:e,_run(i,a){return i.value===void 0&&("default"in this&&(i.value=Vt(this,i,a)),i.value===void 0)?(i.typed=!0,i):this.wrapped._run(i,a)}};return 0 in t&&(r.default=t[0]),r}function De(e,t){return{kind:"schema",type:"strict_object",reference:De,expects:"Object",async:!1,entries:e,message:t,_run(r,i){var l;let a=r.value;if(a&&typeof a=="object"){r.typed=!0,r.value={};for(let n in this.entries){let o=a[n],d=this.entries[n]._run({typed:!1,value:o},i);if(d.issues){let y={type:"object",origin:"value",input:a,key:n,value:o};for(let f of d.issues)f.path?f.path.unshift(y):f.path=[y],(l=r.issues)==null||l.push(f);if(r.issues||(r.issues=d.issues),i.abortEarly){r.typed=!1;break}}d.typed||(r.typed=!1),(d.value!==void 0||n in a)&&(r.value[n]=d.value)}if(!r.issues||!i.abortEarly){for(let n in a)if(!(n in this.entries)){let o=a[n];ie(this,"type",r,i,{input:o,expected:"never",path:[{type:"object",origin:"value",input:a,key:n,value:o}]});break}}}else ie(this,"type",r,i);return r}}}function Oe(e){return{kind:"schema",type:"string",reference:Oe,expects:"string",async:!1,message:e,_run(t,r){return typeof t.value=="string"?t.typed=!0:ie(this,"type",t,r),t}}}function qt(...e){return{...e[0],pipe:e,_run(t,r){for(let i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i._run(t,r))}return t}}}var Gt=qt(Oe(),_e("lid"));De({id:Gt,ver:Ie(je())});var Xt=e=>()=>e*48271%2147483647/2147483647,Yt=e=>typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(typeof e=="string"?e:String.fromCharCode(...e)),Qt=e=>typeof Buffer<"u"?Buffer.from(e,"base64").toString():atob(e),Zt=(e,t)=>{let r=Xt(t),i=new TextEncoder().encode(e).map(a=>a^Math.floor(r()*256));return Yt(i)},er=e=>e.split("").reverse().join(""),tr=e=>typeof e=="object"&&!!e&&"sub"in e&&"exp"in e&&typeof e.sub=="string"&&typeof e.exp=="number",rr=async e=>{let t=er(Qt(e));return{decoded:Ot(t),jwt:t}},ir=async e=>{let{decoded:t,jwt:r}=await rr(e);if(!tr(t))throw new Error("Invalid license key");let{sub:i,exp:a}=t,l=new TextEncoder().encode(Zt(i,a));return await It(r,l),t};function ar({r:e,v:t,t:r}){const i=ve();if(m.useEffect(()=>{e!==void 0&&e.toLowerCase().includes("ehsug")?i.setType("production"):i.setType(r)},[]),m.useEffect(()=>{const a=async n=>{if(n===void 0)return{type:"nokey",daysleft:0};try{const o=await ir(n),f=new Date(o.exp*1e3)-new Date,g=Math.floor(f/(1e3*60*60*24));return g>0?{type:"trial",daysleft:g}:{type:"expired",daysleft:0}}catch(o){return o.message.includes("claim timestamp check failed")?{type:"expired",daysleft:0}:{type:"invalidkey",daysleft:0}}},l=async()=>{var n=await a(e);switch(i.setType(n.type),i.setDaysLeft(n.daysleft),n.type){case"production":case"trial":i.setTrialDialog(!1);break;case"nokey":case"expired":case"invalidkey":default:i.setTrialDialog(!0);break}};i.type!==null&&i.type!=="production"&&l()},[i.type]),i.type!=="production"&&i.trialdialog===!0)return s.jsx("div",{style:{zIndex:2e5,fontSize:"22px",background:"rgb(211,211,211,.4)",color:"black",display:"flex",flexDirection:"column",position:"absolute",left:"50%",width:"100%",height:"100%",transform:"translateX(-50%)",padding:"10px 10px 10px 10px",border:"1px solid black"},children:s.jsxs("div",{style:{height:"100%",display:"flex",padding:"10px 10px 10px 10px",flexDirection:"column",margin:"40px",borderRadius:"5px",border:"1px solid gray",background:"white"},children:[s.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[s.jsx("img",{style:{width:160},src:"../ReExt/ReExt.png"}),s.jsxs("div",{style:{margin:"0 0 0 20px"},children:["Welcome to the ReExt v",t," Trial"]})]}),i.type==="trial"||i.type==="nokey"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{margin:"10px 0 10px 0",fontSize:"18px"},children:["This is a 30 day trial version of ReExt.",s.jsx("br",{}),"Without a valid trial key, this dialog will appear.",s.jsx("br",{}),s.jsx("br",{}),"To have a trial key emailed to you, fill in this form and click 'Get Trial Key'."]}),s.jsx("div",{style:{xwidth:"100%",flex:1,display:"flex",border:"0px solid red"},children:s.jsx("iframe",{style:{width:"100%",margin:"0 0 10px 0",flex:1,border:"0px solid lightgray"},src:"https://www.sencha.com/forms/reext/trial-reext.php"})}),s.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-end"},children:[s.jsx("div",{style:{fontSize:"12px"},children:i.type}),s.jsx("button",{style:{fontSize:"18px",padding:"5px 5px 5px 5px"},onClick:()=>{i.setTrialDialog(!1)},children:"Close"})]})]}),i.type==="expired"&&s.jsx(s.Fragment,{children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",margin:"10px 0 10px 0",fontSize:"18px",height:"100%"},children:[s.jsx("div",{style:{margin:"0 0 20px 0",fontSize:"24px"},children:"Your ReExt trial key has expired"}),s.jsx("div",{children:"Contact Sencha Sales"}),s.jsx("div",{children:s.jsx("a",{href:"https://www.sencha.com/company/contact/",target:"_blank",rel:"noopener noreferrer",children:"https://www.sencha.com/company/contact/"})})]})}),i.type==="invalidkey"&&s.jsx(s.Fragment,{children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",margin:"10px 0 10px 0",fontSize:"18px",height:"100%"},children:[s.jsx("div",{style:{margin:"0 0 20px 0",fontSize:"24px"},children:"Your ReExt trial key is invalid"}),s.jsx("div",{children:"Contact Sencha Sales"}),s.jsx("div",{children:s.jsx("a",{href:"https://www.sencha.com/company/contact/",target:"_blank",rel:"noopener noreferrer",children:"https://www.sencha.com/company/contact/"})})]})})]})})}async function nr(e){try{let A=async(b,v,E)=>new Promise(k=>{window.Ext.onReady(function(){return window.Ext.ReExtLocation=E,window.Ext.ReExtTheme=b,window.Ext.ReExtLi=!0,k(1)})}),x=async b=>typeof window===void 0||typeof window>"u"?void 0:new Promise((v,E)=>{let k=document.getElementsByTagName("HEAD")[0];var h=!1;for(let P=0;P<k.childNodes.length;P++)k.childNodes[P].src===b&&(h=!0);if(h===!1){let P=document.createElement("script");P.src=b,k.appendChild(P),P.addEventListener("load",()=>{if(window.Ext===void 0)return v(1);window.Ext.onReady(function(){return v(1)})}),P.addEventListener("error",()=>{var C=`${b} (js) | ||
@@ -3,0 +3,0 @@ - did you download the SDK from the support portal? |
{ | ||
"name": "@sencha/reext", | ||
"version": "1.0.310", | ||
"version": "1.0.315", | ||
"description": "ReExt - Sencha Ext JS components in React", | ||
@@ -5,0 +5,0 @@ "types": "./dist/ReExt/types.d.ts", |
@@ -23,4 +23,6 @@ # ReExt - ExtJS Components in React | ||
11. [Using Custom Ext JS Components](#using-custom-ext-js-components) | ||
12. [Version History](#version-history) | ||
## ReExt Examples | ||
@@ -577,4 +579,12 @@ | ||
## Version History | ||
1.0.315 - support for react 19 | ||
1.0.310 - fixed hot module loading issue | ||
1.0.300 - support for custom file loading via ReExtData | ||
# License | ||
[Trial](https://www.sencha.com/legal/#Sencha_Ext_JS) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2008444
589