iframe-coordinator-cli 6.3.0 → 6.3.1

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 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
16
16
  `+i(o));return s.name="Decoding error",s}).unwrap()}}var ae={},oe={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Err=e.Ok=e.default=void 0;function t(f,c){if(!(f instanceof c))throw new TypeError("Cannot call a class as a function")}function r(f,c){for(var l=0;l<c.length;l++){var v=c[l];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(f,v.key,v)}}function n(f,c,l){return r(f.prototype,c),r(f,l),f}var i="Ok",a="Err",o=function(){function f(c){t(this,f),this._r=c}return n(f,[{key:"toString",value:function(){var l=this._r;return l.type===i?"Ok(".concat(String(l.value),")"):"Err(".concat(String(l.error),")")}},{key:"isOk",value:function(){return this._r.type===i}},{key:"isErr",value:function(){return this._r.type===a}},{key:"withDefault",value:function(l){var v=this._r;return v.type===i?v.value:l}},{key:"value",value:function(){var l=this._r;return l.type===i?l.value:void 0}},{key:"errValue",value:function(){var l=this._r;return l.type===a?l.error:void 0}},{key:"unwrap",value:function(){var l=this._r;if(l.type===i)return l.value;throw l.error}},{key:"expect",value:function(l){var v=this._r;if(v.type===i)return v.value;throw l instanceof Error?l:new Error(l)}},{key:"dispatch",value:function(l,v){var p=this._r;return p.type===i?l(p.value):v(p.error)}},{key:"andThen",value:function(l){var v=this._r;return v.type===i?l(v.value):f.err(v.error)}},{key:"map",value:function(l){var v=this._r;return v.type===i?f.ok(l(v.value)):f.err(v.error)}},{key:"mapError",value:function(l){var v=this._r;return v.type===i?f.ok(v.value):f.err(l(v.error))}}],[{key:"ok",value:function(l){return new f({type:i,value:l})}},{key:"err",value:function(l){return new f({type:a,error:l})}}]),f}();e.default=o;var s=function(c){return o.ok(c)};e.Ok=s;var u=function(c){return o.err(c)};e.Err=u})(oe);Object.defineProperty(ae,"__esModule",{value:!0});ae.map=Nu;ae.compose=wo;ae.predicate=Lu;ae.isDate=void 0;var ju=re,Cn=oe,Iu=function(t){return t!=null&&Object.prototype.toString.call(t)==="[object Date]"&&!isNaN(t)};ae.isDate=Iu;function Nu(e,t){return wo(e,function(r){return(0,Cn.Ok)(t(r))})}function wo(e,t){return function(r){return e(r).andThen(t)}}function Lu(e,t){return function(r){return e(r)?(0,Cn.Ok)(r):(0,Cn.Err)((0,ju.annotate)(r,t))}}var St={};Object.defineProperty(St,"__esModule",{value:!0});St.array=Wu;St.poja=void 0;var En=re,xr=oe,Du=ae;function ku(e){return Uu(e)||Hu(e)||Fu()}function Fu(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Hu(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function Uu(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}var Oo=function(t){return Array.isArray(t)?(0,xr.Ok)(t.slice()):(0,xr.Err)((0,En.annotate)(t,"Must be an array"))};St.poja=Oo;function zu(e,t){var r=[],n=0,i=!0,a=!1,o=void 0;try{for(var s=e[Symbol.iterator](),u;!(i=(u=s.next()).done);i=!0){var f=u.value;try{var c=f.unwrap();r.push(c)}catch(v){var l=ku(t);return l.splice(n,1,(0,En.annotate)(v,v.annotation!==void 0?"".concat(v.annotation," (at index ").concat(n,")"):"index ".concat(n))),(0,xr.Err)((0,En.annotate)(l))}n++}}catch(v){a=!0,o=v}finally{try{!i&&s.return!=null&&s.return()}finally{if(a)throw o}}return(0,xr.Ok)(r)}function Bu(e){return function(t){var r=t.map(e),n=zu(r,t);return n}}function Wu(e){return(0,Du.compose)(Oo,Bu(e))}var Co={},ge={};Object.defineProperty(ge,"__esModule",{value:!0});ge.positiveInteger=ge.integer=ge.positiveNumber=ge.number=void 0;var Gu=re,Bi=oe,Fe=ae,Ku=function(t){return typeof t=="number"&&!Number.isNaN(t)?(0,Bi.Ok)(t):(0,Bi.Err)((0,Gu.annotate)(t,"Must be number"))},Xr=(0,Fe.compose)(Ku,(0,Fe.predicate)(Number.isFinite,"Number must be finite"));ge.number=Xr;var qu=(0,Fe.compose)(Xr,(0,Fe.predicate)(function(e){return e>=0},"Number must be positive"));ge.positiveNumber=qu;var Ju=(0,Fe.compose)(Xr,(0,Fe.predicate)(Number.isInteger,"Number must be an integer"));ge.integer=Ju;var Yu=(0,Fe.compose)(Xr,(0,Fe.predicate)(function(e){return e>=0&&Number.isInteger(e)},"Number must be an integer"));ge.positiveInteger=Yu;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.numericBoolean=e.truthy=e.boolean=void 0;var t=re,r=oe,n=ge,i=ae,a=function(f){return typeof f=="boolean"?(0,r.Ok)(f):(0,r.Err)((0,t.annotate)(f,"Must be boolean"))};e.boolean=a;var o=function(f){return(0,r.Ok)(!!f)};e.truthy=o;var s=(0,i.map)(n.number,function(u){return!!u});e.numericBoolean=s})(Co);var fe={};Object.defineProperty(fe,"__esModule",{value:!0});fe.constant=Qu;fe.hardcoded=Vu;fe.unknown=fe.mixed=fe.undefined_=fe.null_=void 0;var ni=re,He=oe,Zu=function(t){return t===null?(0,He.Ok)(t):(0,He.Err)((0,ni.annotate)(t,"Must be null"))};fe.null_=Zu;var Xu=function(t){return t===void 0?(0,He.Ok)(t):(0,He.Err)((0,ni.annotate)(t,"Must be undefined"))};fe.undefined_=Xu;function Qu(e){return function(t){return t===e?(0,He.Ok)(e):(0,He.Err)((0,ni.annotate)(t,"Must be constant ".concat(String(e))))}}function Vu(e){return function(t){return(0,He.Ok)(e)}}var Eo=function(t){return(0,He.Ok)(t)};fe.mixed=Eo;var ef=Eo;fe.unknown=ef;var Qr={};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.date=void 0;var tf=re,Wi=oe,rf=ae,nf=function(t){return(0,rf.isDate)(t)?(0,Wi.Ok)(t):(0,Wi.Err)((0,tf.annotate)(t,"Must be a Date"))};Qr.date=nf;var ii={},le={};Object.defineProperty(le,"__esModule",{value:!0});le.either=xe;le.either3=So;le.either4=$o;le.either5=Ao;le.either6=Po;le.either7=To;le.either8=xo;le.either9=af;le.oneOf=of;var kt=re,Ft=oe;function Gi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"-"+(0,kt.indent)(e).substring(1)}function xe(e,t){return function(r){return e(r).dispatch(function(n){return(0,Ft.Ok)(n)},function(n){return t(r).dispatch(function(i){return(0,Ft.Ok)(i)},function(i){return(0,Ft.Err)((0,kt.annotate)(r,["Either:",Gi((0,kt.summarize)(n).join(`
17
17
  `)),Gi((0,kt.summarize)(i).join(`
18
18
  `))].join(`
19
- `)))})})}}function So(e,t,r){return xe(e,xe(t,r))}function $o(e,t,r,n){return xe(e,So(t,r,n))}function Ao(e,t,r,n,i){return xe(e,$o(t,r,n,i))}function Po(e,t,r,n,i,a){return xe(e,Ao(t,r,n,i,a))}function To(e,t,r,n,i,a,o){return xe(e,Po(t,r,n,i,a,o))}function xo(e,t,r,n,i,a,o,s){return xe(e,To(t,r,n,i,a,o,s))}function af(e,t,r,n,i,a,o,s,u){return xe(e,xo(t,r,n,i,a,o,s,u))}function of(e){return function(t){var r=!0,n=!1,i=void 0;try{for(var a=e[Symbol.iterator](),o;!(r=(o=a.next()).done);r=!0){var s=o.value;if(s===t)return(0,Ft.Ok)(s)}}catch(u){n=!0,i=u}finally{try{!r&&a.return!=null&&a.return()}finally{if(n)throw i}}return(0,Ft.Err)((0,kt.annotate)(t,"Must be one of ".concat(e.map(function(u){return JSON.stringify(u)}).join(", "))))}}var Ge={};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.object=jo;Ge.exact=df;Ge.pojo=void 0;var mt=re,Ot=oe,Sn=ae;function Ro(e){return ff(e)||uf(e)||sf()}function sf(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function uf(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function ff(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function cf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){lf(e,i,r[i])})}return e}function lf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gr=function(r){return typeof r}:gr=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gr(e)}function pf(e){return e!=null&&gr(e)==="object"&&Object.prototype.toString.call(e)==="[object Object]"}function Mo(e,t){var r=new Set,n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done);n=!0){var u=s.value;t.has(u)||r.add(u)}}catch(f){i=!0,a=f}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}var ai=function(t){return pf(t)?(0,Ot.Ok)(cf({},t)):(0,Ot.Err)((0,mt.annotate)(t,"Must be an object"))};Ge.pojo=ai;function jo(e){var t=new Set(Object.keys(e));return(0,Sn.compose)(ai,function(r){for(var n=new Set(Object.keys(r)),i=Mo(t,n),a={},o={},s=0,u=Object.keys(e);s<u.length;s++){var f=u[s],c=e[f],l=r[f],v=c(l);try{a[f]=v.unwrap(),i.delete(f)}catch(b){if(!(0,mt.isAnnotation)(b))throw b;l===void 0?i.add(f):o[f]=b}}var p=Object.keys(o);if(p.length>0||i.size>0){var m;if(p.length>0){var d=p.map(function(b){return[b,o[b]]});m=(0,mt.annotateFields)(r,d)}else m=(0,mt.annotate)(r);if(i.size>0){var y=Ro(i).map(function(b){return'"'.concat(b,'"')}).join(", "),h=i.size>1?"keys":"key";m=(0,mt.annotate)(m,"Missing ".concat(h,": ").concat(y))}return(0,Ot.Err)(m)}return(0,Ot.Ok)(a)})}function df(e){var t=new Set(Object.keys(e)),r=(0,Sn.compose)(ai,function(i){var a=new Set(Object.keys(i)),o=Mo(a,t);return o.size>0?(0,Ot.Err)((0,mt.annotate)(i,"Superfluous keys: ".concat(Ro(o).join(", ")))):(0,Ot.Ok)(i)}),n=jo(e);return(0,Sn.compose)(r,n)}Object.defineProperty(ii,"__esModule",{value:!0});ii.dispatch=mf;var vf=le,hf=Ge;function yf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mf(e,t){var r=(0,hf.object)(yf({},e,(0,vf.oneOf)(Object.keys(t))));return function(n){return r(n).andThen(function(i){var a=i[e],o=t[a];return o(n)})}}var oi={};Object.defineProperty(oi,"__esModule",{value:!0});oi.fail=bf;var gf=re,_f=oe;function bf(e){return function(t){return(0,_f.Err)((0,gf.annotate)(t,e))}}var si={};Object.defineProperty(si,"__esModule",{value:!0});si.instanceOf=Of;var wf=re,Ki=oe;function Of(e){return function(t){return t instanceof e?(0,Ki.Ok)(t):(0,Ki.Err)((0,wf.annotate)(t,"Must be ".concat(e.name," instance")))}}var Vr={};Object.defineProperty(Vr,"__esModule",{value:!0});Vr.mapping=No;Vr.dict=Tf;var qi=re,Ji=oe,Cf=Ge,Io=ae;function Ef(e,t){return Af(e)||$f(e,t)||Sf()}function Sf(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function $f(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}function Af(e){if(Array.isArray(e))return e}function No(e){return(0,Io.compose)(Cf.pojo,function(t){var r=[],n=[];return Object.keys(t).forEach(function(i){var a=t[i],o=e(a);try{var s=o.unwrap();n.length===0&&r.push([i,s])}catch(u){if((0,qi.isAnnotation)(u))r.length=0,n.push([i,u]);else throw u}}),n.length>0?(0,Ji.Err)((0,qi.annotateFields)(t,n)):(0,Ji.Ok)(new Map(r))})}function Pf(e){var t={},r=!0,n=!1,i=void 0;try{for(var a=e.entries()[Symbol.iterator](),o;!(r=(o=a.next()).done);r=!0){var s=Ef(o.value,2),u=s[0],f=s[1];t[u]=f}}catch(c){n=!0,i=c}finally{try{!r&&a.return!=null&&a.return()}finally{if(n)throw i}}return t}function Tf(e){return(0,Io.map)(No(e),Pf)}var Zt={};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.optional=Rf;Zt.nullable=Mf;Zt.maybe=If;var xf=re,Yi=oe,Lo=fe,ui=le;function Rf(e){return(0,ui.either)(Lo.undefined_,e)}function Mf(e){return(0,ui.either)(Lo.null_,e)}var jf=function(t){return t==null?(0,Yi.Ok)(t):(0,Yi.Err)((0,xf.annotate)(t,"Must be undefined or null"))};function If(e){return(0,ui.either)(jf,e)}var Te={};Object.defineProperty(Te,"__esModule",{value:!0});Te.regex=Do;Te.url=Te.email=Te.string=void 0;var $n=re,Ht=oe,An=ae,Nf=/^([A-Za-z]{3,9}(?:[+][A-Za-z]{3,9})?):\/\/(?:([-;:&=+$,\w]+)@)?(?:([A-Za-z0-9.-]+)(?::([0-9]{2,5}))?)(\/(?:[-+~%/.,\w]*)?(?:\?[-+=&;%@.,\w]*)?(?:#[.,!/\w]*)?)?$/,Lf=["https"],fi=function(t){return typeof t=="string"?(0,Ht.Ok)(t):(0,Ht.Err)((0,$n.annotate)(t,"Must be string"))};Te.string=fi;function Do(e,t){return(0,An.compose)(fi,(0,An.predicate)(function(r){return e.test(r)},t))}var Df=Do(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,"Must be email");Te.email=Df;var kf=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Lf;return(0,An.compose)(fi,function(r){var n=r.match(Nf);if(n){var i=n[1];return t.length===0||t.includes(i.toLowerCase())?(0,Ht.Ok)(r):(0,Ht.Err)((0,$n.annotate)(r,"URL scheme must be any of: ".concat(t.join(", "))))}else return(0,Ht.Err)((0,$n.annotate)(r,"Must be URL"))})};Te.url=kf;var ut={};Object.defineProperty(ut,"__esModule",{value:!0});ut.tuple2=zf;ut.tuple3=Bf;ut.tuple4=Wf;ut.tuple5=Gf;ut.tuple6=Kf;var Xt=re,Ee=oe,Ff=St,nt=ae;function Qt(e,t){return Uf(e)||Hf(e,t)}function Hf(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}function Uf(e){if(Array.isArray(e))return e}var Vt=function(t){return(0,nt.compose)(Ff.poja,(0,nt.predicate)(function(r){return r.length===t},"Must be a ".concat(t,"-tuple")))};function zf(e,t){return(0,nt.compose)(Vt(2),function(r){var n=Qt(r,2),i=n[0],a=n[1],o=e(i),s=t(a);try{return(0,Ee.Ok)([o.unwrap(),s.unwrap()])}catch{return(0,Ee.Err)((0,Xt.annotate)([o.isErr()?o.errValue():o.value(),s.isErr()?s.errValue():s.value()]))}})}function Bf(e,t,r){return(0,nt.compose)(Vt(3),function(n){var i=Qt(n,3),a=i[0],o=i[1],s=i[2],u=e(a),f=t(o),c=r(s);try{return(0,Ee.Ok)([u.unwrap(),f.unwrap(),c.unwrap()])}catch{return(0,Ee.Err)((0,Xt.annotate)([u.isErr()?u.errValue():u.value(),f.isErr()?f.errValue():f.value(),c.isErr()?c.errValue():c.value()]))}})}function Wf(e,t,r,n){return(0,nt.compose)(Vt(4),function(i){var a=Qt(i,4),o=a[0],s=a[1],u=a[2],f=a[3],c=e(o),l=t(s),v=r(u),p=n(f);try{return(0,Ee.Ok)([c.unwrap(),l.unwrap(),v.unwrap(),p.unwrap()])}catch{return(0,Ee.Err)((0,Xt.annotate)([c.isErr()?c.errValue():c.value(),l.isErr()?l.errValue():l.value(),v.isErr()?v.errValue():v.value(),p.isErr()?p.errValue():p.value()]))}})}function Gf(e,t,r,n,i){return(0,nt.compose)(Vt(5),function(a){var o=Qt(a,5),s=o[0],u=o[1],f=o[2],c=o[3],l=o[4],v=e(s),p=t(u),m=r(f),d=n(c),y=i(l);try{return(0,Ee.Ok)([v.unwrap(),p.unwrap(),m.unwrap(),d.unwrap(),y.unwrap()])}catch{return(0,Ee.Err)((0,Xt.annotate)([v.isErr()?v.errValue():v.value(),p.isErr()?p.errValue():p.value(),m.isErr()?m.errValue():m.value(),d.isErr()?d.errValue():d.value(),y.isErr()?y.errValue():y.value()]))}})}function Kf(e,t,r,n,i,a){return(0,nt.compose)(Vt(6),function(o){var s=Qt(o,6),u=s[0],f=s[1],c=s[2],l=s[3],v=s[4],p=s[5],m=e(u),d=t(f),y=r(c),h=n(l),b=i(v),O=a(p);try{return(0,Ee.Ok)([m.unwrap(),d.unwrap(),y.unwrap(),h.unwrap(),b.unwrap(),O.unwrap()])}catch{return(0,Ee.Err)((0,Xt.annotate)([m.isErr()?m.errValue():m.value(),d.isErr()?d.errValue():d.value(),y.isErr()?y.errValue():y.value(),h.isErr()?h.errValue():h.value(),b.isErr()?b.errValue():b.value(),O.isErr()?O.errValue():O.value()]))}})}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"guard",{enumerable:!0,get:function(){return t.guard}}),Object.defineProperty(e,"compose",{enumerable:!0,get:function(){return r.compose}}),Object.defineProperty(e,"map",{enumerable:!0,get:function(){return r.map}}),Object.defineProperty(e,"predicate",{enumerable:!0,get:function(){return r.predicate}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return n.array}}),Object.defineProperty(e,"poja",{enumerable:!0,get:function(){return n.poja}}),Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return i.boolean}}),Object.defineProperty(e,"numericBoolean",{enumerable:!0,get:function(){return i.numericBoolean}}),Object.defineProperty(e,"truthy",{enumerable:!0,get:function(){return i.truthy}}),Object.defineProperty(e,"constant",{enumerable:!0,get:function(){return a.constant}}),Object.defineProperty(e,"hardcoded",{enumerable:!0,get:function(){return a.hardcoded}}),Object.defineProperty(e,"mixed",{enumerable:!0,get:function(){return a.mixed}}),Object.defineProperty(e,"null_",{enumerable:!0,get:function(){return a.null_}}),Object.defineProperty(e,"undefined_",{enumerable:!0,get:function(){return a.undefined_}}),Object.defineProperty(e,"unknown",{enumerable:!0,get:function(){return a.unknown}}),Object.defineProperty(e,"date",{enumerable:!0,get:function(){return o.date}}),Object.defineProperty(e,"dispatch",{enumerable:!0,get:function(){return s.dispatch}}),Object.defineProperty(e,"either",{enumerable:!0,get:function(){return u.either}}),Object.defineProperty(e,"either3",{enumerable:!0,get:function(){return u.either3}}),Object.defineProperty(e,"either4",{enumerable:!0,get:function(){return u.either4}}),Object.defineProperty(e,"either5",{enumerable:!0,get:function(){return u.either5}}),Object.defineProperty(e,"either6",{enumerable:!0,get:function(){return u.either6}}),Object.defineProperty(e,"either7",{enumerable:!0,get:function(){return u.either7}}),Object.defineProperty(e,"either8",{enumerable:!0,get:function(){return u.either8}}),Object.defineProperty(e,"either9",{enumerable:!0,get:function(){return u.either9}}),Object.defineProperty(e,"oneOf",{enumerable:!0,get:function(){return u.oneOf}}),Object.defineProperty(e,"fail",{enumerable:!0,get:function(){return f.fail}}),Object.defineProperty(e,"instanceOf",{enumerable:!0,get:function(){return c.instanceOf}}),Object.defineProperty(e,"mapping",{enumerable:!0,get:function(){return l.mapping}}),Object.defineProperty(e,"dict",{enumerable:!0,get:function(){return l.dict}}),Object.defineProperty(e,"integer",{enumerable:!0,get:function(){return v.integer}}),Object.defineProperty(e,"number",{enumerable:!0,get:function(){return v.number}}),Object.defineProperty(e,"positiveInteger",{enumerable:!0,get:function(){return v.positiveInteger}}),Object.defineProperty(e,"positiveNumber",{enumerable:!0,get:function(){return v.positiveNumber}}),Object.defineProperty(e,"exact",{enumerable:!0,get:function(){return p.exact}}),Object.defineProperty(e,"object",{enumerable:!0,get:function(){return p.object}}),Object.defineProperty(e,"pojo",{enumerable:!0,get:function(){return p.pojo}}),Object.defineProperty(e,"maybe",{enumerable:!0,get:function(){return m.maybe}}),Object.defineProperty(e,"nullable",{enumerable:!0,get:function(){return m.nullable}}),Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return m.optional}}),Object.defineProperty(e,"email",{enumerable:!0,get:function(){return d.email}}),Object.defineProperty(e,"regex",{enumerable:!0,get:function(){return d.regex}}),Object.defineProperty(e,"string",{enumerable:!0,get:function(){return d.string}}),Object.defineProperty(e,"url",{enumerable:!0,get:function(){return d.url}}),Object.defineProperty(e,"tuple2",{enumerable:!0,get:function(){return y.tuple2}}),Object.defineProperty(e,"tuple3",{enumerable:!0,get:function(){return y.tuple3}}),Object.defineProperty(e,"tuple4",{enumerable:!0,get:function(){return y.tuple4}}),Object.defineProperty(e,"tuple5",{enumerable:!0,get:function(){return y.tuple5}}),Object.defineProperty(e,"tuple6",{enumerable:!0,get:function(){return y.tuple6}});var t=ri,r=ae,n=St,i=Co,a=fe,o=Qr,s=ii,u=le,f=oi,c=si,l=Vr,v=ge,p=Ge,m=Zt,d=Te,y=ut})(S);const qf="6.2.0",Rr="iframe-coordinator";function Jf(e){return Object.assign(Object.assign({direction:"HostToClient"},e),{protocol:Rr,version:qf})}function $e(e,t){return S.object({protocol:S.either(S.constant(Rr),S.hardcoded(Rr)),version:S.either(S.string,S.hardcoded("unknown")),msgType:e,msg:t,direction:S.optional(Yf)})}const Yf=S.either(S.constant("ClientToHost"),S.constant("HostToClient")),Zf=$e(S.constant("clickFired"),S.object({})),Xf=$e(S.constant("registeredKeyFired"),S.object({altKey:S.optional(S.boolean),charCode:S.optional(S.number),code:S.optional(S.string),ctrlKey:S.optional(S.boolean),key:S.string,keyCode:S.optional(S.number),metaKey:S.optional(S.boolean),shiftKey:S.optional(S.boolean)})),Qf=$e(S.constant("client_started"),S.mixed),Vf=$e(S.constant("env_init"),S.object({locale:S.string,hostRootUrl:S.string,assignedRoute:S.string,registeredKeys:S.optional(S.array(S.object({key:S.string,altKey:S.optional(S.boolean),ctrlKey:S.optional(S.boolean),metaKey:S.optional(S.boolean),shiftKey:S.optional(S.boolean)}))),custom:S.mixed})),ec=$e(S.constant("modalRequest"),S.object({modalId:S.string,modalData:S.mixed})),tc=$e(S.constant("navRequest"),S.object({url:S.string,history:S.optional(S.either(S.constant("push"),S.constant("replace")))}));function rc(e){return"notifyRequest"}const nc=S.map(S.constant("toastRequest"),rc),Zi=$e(S.either(S.constant("notifyRequest"),nc),S.object({title:S.optional(S.string),message:S.string,custom:S.mixed})),ic=$e(S.constant("pageMetadata"),S.object({title:S.string,breadcrumbs:S.array(S.object({text:S.string,href:S.string})),custom:S.optional(S.mixed)})),ac=$e(S.constant("promptOnLeave"),S.object({shouldPrompt:S.boolean,message:S.optional(S.string)})),ko=$e(S.constant("publish"),S.object({topic:S.string,payload:S.mixed,clientId:S.optional(S.string)}));function oc(e){return S.guard(S.dispatch("msgType",{publish:ko,registeredKeyFired:Xf,client_started:Qf,clickFired:Zf,navRequest:tc,notifyRequest:Zi,toastRequest:Zi,modalRequest:ec,pageMetadata:ic,promptOnLeave:ac}))(e)}function sc(e){return S.guard(S.dispatch("msgType",{publish:ko,env_init:Vf}))(e)}const uc="frame-router iframe { width: 100%; height: 100%; }",Xi=["allow-popups-to-escape-sandbox","allow-scripts","allow-same-origin","allow-modals","allow-forms","allow-popups","allow-downloads","allow-top-navigation-by-user-activation"];let or;class fc{constructor(t){this._window=t.mockWindow?t.mockWindow:window,this._postMessageHandler=r=>{this._handlePostMessage(t.onMessage,r)},this._frameLocation="about:blank",this._iframe=this._window.document.createElement("iframe"),this._iframe.setAttribute("frameborder","0"),or||(or=this._window.document.createElement("style"),or.innerText=uc,this._window.document.head.appendChild(or)),this._iframe.setAttribute("sandbox",Xi.join(" "))}setFrameAllow(t){typeof t!="string"&&(t=""),this._iframe.setAttribute("allow",t)}setFrameSandbox(t){typeof t!="string"&&(t="");const r=t.split(" ").concat(Xi),n=[...new Set(r)].join(" ");this._iframe.setAttribute("sandbox",n)}setFrameDefaultTitle(t){typeof t!="string"&&(t=""),this._iframe.setAttribute("title",t)}setFrameLocation(t){return this._frameLocation=t||"about:blank",this._iframe.contentWindow?this._navigateFrame():this._iframe.onload=r=>{this._navigateFrame(),this._iframe.onload=null},this._frameLocation}sendToClient(t){const r=this._expectedClientOrigin();if(this._iframe.contentWindow&&r){const n=Jf(t);let i;try{i=sc(n)}catch(a){throw new Error(`
19
+ `)))})})}}function So(e,t,r){return xe(e,xe(t,r))}function $o(e,t,r,n){return xe(e,So(t,r,n))}function Ao(e,t,r,n,i){return xe(e,$o(t,r,n,i))}function Po(e,t,r,n,i,a){return xe(e,Ao(t,r,n,i,a))}function To(e,t,r,n,i,a,o){return xe(e,Po(t,r,n,i,a,o))}function xo(e,t,r,n,i,a,o,s){return xe(e,To(t,r,n,i,a,o,s))}function af(e,t,r,n,i,a,o,s,u){return xe(e,xo(t,r,n,i,a,o,s,u))}function of(e){return function(t){var r=!0,n=!1,i=void 0;try{for(var a=e[Symbol.iterator](),o;!(r=(o=a.next()).done);r=!0){var s=o.value;if(s===t)return(0,Ft.Ok)(s)}}catch(u){n=!0,i=u}finally{try{!r&&a.return!=null&&a.return()}finally{if(n)throw i}}return(0,Ft.Err)((0,kt.annotate)(t,"Must be one of ".concat(e.map(function(u){return JSON.stringify(u)}).join(", "))))}}var Ge={};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.object=jo;Ge.exact=df;Ge.pojo=void 0;var mt=re,Ot=oe,Sn=ae;function Ro(e){return ff(e)||uf(e)||sf()}function sf(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function uf(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function ff(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function cf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){lf(e,i,r[i])})}return e}function lf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gr=function(r){return typeof r}:gr=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gr(e)}function pf(e){return e!=null&&gr(e)==="object"&&Object.prototype.toString.call(e)==="[object Object]"}function Mo(e,t){var r=new Set,n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done);n=!0){var u=s.value;t.has(u)||r.add(u)}}catch(f){i=!0,a=f}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}var ai=function(t){return pf(t)?(0,Ot.Ok)(cf({},t)):(0,Ot.Err)((0,mt.annotate)(t,"Must be an object"))};Ge.pojo=ai;function jo(e){var t=new Set(Object.keys(e));return(0,Sn.compose)(ai,function(r){for(var n=new Set(Object.keys(r)),i=Mo(t,n),a={},o={},s=0,u=Object.keys(e);s<u.length;s++){var f=u[s],c=e[f],l=r[f],v=c(l);try{a[f]=v.unwrap(),i.delete(f)}catch(b){if(!(0,mt.isAnnotation)(b))throw b;l===void 0?i.add(f):o[f]=b}}var p=Object.keys(o);if(p.length>0||i.size>0){var m;if(p.length>0){var d=p.map(function(b){return[b,o[b]]});m=(0,mt.annotateFields)(r,d)}else m=(0,mt.annotate)(r);if(i.size>0){var y=Ro(i).map(function(b){return'"'.concat(b,'"')}).join(", "),h=i.size>1?"keys":"key";m=(0,mt.annotate)(m,"Missing ".concat(h,": ").concat(y))}return(0,Ot.Err)(m)}return(0,Ot.Ok)(a)})}function df(e){var t=new Set(Object.keys(e)),r=(0,Sn.compose)(ai,function(i){var a=new Set(Object.keys(i)),o=Mo(a,t);return o.size>0?(0,Ot.Err)((0,mt.annotate)(i,"Superfluous keys: ".concat(Ro(o).join(", ")))):(0,Ot.Ok)(i)}),n=jo(e);return(0,Sn.compose)(r,n)}Object.defineProperty(ii,"__esModule",{value:!0});ii.dispatch=mf;var vf=le,hf=Ge;function yf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mf(e,t){var r=(0,hf.object)(yf({},e,(0,vf.oneOf)(Object.keys(t))));return function(n){return r(n).andThen(function(i){var a=i[e],o=t[a];return o(n)})}}var oi={};Object.defineProperty(oi,"__esModule",{value:!0});oi.fail=bf;var gf=re,_f=oe;function bf(e){return function(t){return(0,_f.Err)((0,gf.annotate)(t,e))}}var si={};Object.defineProperty(si,"__esModule",{value:!0});si.instanceOf=Of;var wf=re,Ki=oe;function Of(e){return function(t){return t instanceof e?(0,Ki.Ok)(t):(0,Ki.Err)((0,wf.annotate)(t,"Must be ".concat(e.name," instance")))}}var Vr={};Object.defineProperty(Vr,"__esModule",{value:!0});Vr.mapping=No;Vr.dict=Tf;var qi=re,Ji=oe,Cf=Ge,Io=ae;function Ef(e,t){return Af(e)||$f(e,t)||Sf()}function Sf(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function $f(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}function Af(e){if(Array.isArray(e))return e}function No(e){return(0,Io.compose)(Cf.pojo,function(t){var r=[],n=[];return Object.keys(t).forEach(function(i){var a=t[i],o=e(a);try{var s=o.unwrap();n.length===0&&r.push([i,s])}catch(u){if((0,qi.isAnnotation)(u))r.length=0,n.push([i,u]);else throw u}}),n.length>0?(0,Ji.Err)((0,qi.annotateFields)(t,n)):(0,Ji.Ok)(new Map(r))})}function Pf(e){var t={},r=!0,n=!1,i=void 0;try{for(var a=e.entries()[Symbol.iterator](),o;!(r=(o=a.next()).done);r=!0){var s=Ef(o.value,2),u=s[0],f=s[1];t[u]=f}}catch(c){n=!0,i=c}finally{try{!r&&a.return!=null&&a.return()}finally{if(n)throw i}}return t}function Tf(e){return(0,Io.map)(No(e),Pf)}var Zt={};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.optional=Rf;Zt.nullable=Mf;Zt.maybe=If;var xf=re,Yi=oe,Lo=fe,ui=le;function Rf(e){return(0,ui.either)(Lo.undefined_,e)}function Mf(e){return(0,ui.either)(Lo.null_,e)}var jf=function(t){return t==null?(0,Yi.Ok)(t):(0,Yi.Err)((0,xf.annotate)(t,"Must be undefined or null"))};function If(e){return(0,ui.either)(jf,e)}var Te={};Object.defineProperty(Te,"__esModule",{value:!0});Te.regex=Do;Te.url=Te.email=Te.string=void 0;var $n=re,Ht=oe,An=ae,Nf=/^([A-Za-z]{3,9}(?:[+][A-Za-z]{3,9})?):\/\/(?:([-;:&=+$,\w]+)@)?(?:([A-Za-z0-9.-]+)(?::([0-9]{2,5}))?)(\/(?:[-+~%/.,\w]*)?(?:\?[-+=&;%@.,\w]*)?(?:#[.,!/\w]*)?)?$/,Lf=["https"],fi=function(t){return typeof t=="string"?(0,Ht.Ok)(t):(0,Ht.Err)((0,$n.annotate)(t,"Must be string"))};Te.string=fi;function Do(e,t){return(0,An.compose)(fi,(0,An.predicate)(function(r){return e.test(r)},t))}var Df=Do(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,"Must be email");Te.email=Df;var kf=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Lf;return(0,An.compose)(fi,function(r){var n=r.match(Nf);if(n){var i=n[1];return t.length===0||t.includes(i.toLowerCase())?(0,Ht.Ok)(r):(0,Ht.Err)((0,$n.annotate)(r,"URL scheme must be any of: ".concat(t.join(", "))))}else return(0,Ht.Err)((0,$n.annotate)(r,"Must be URL"))})};Te.url=kf;var ut={};Object.defineProperty(ut,"__esModule",{value:!0});ut.tuple2=zf;ut.tuple3=Bf;ut.tuple4=Wf;ut.tuple5=Gf;ut.tuple6=Kf;var Xt=re,Ee=oe,Ff=St,nt=ae;function Qt(e,t){return Uf(e)||Hf(e,t)}function Hf(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}function Uf(e){if(Array.isArray(e))return e}var Vt=function(t){return(0,nt.compose)(Ff.poja,(0,nt.predicate)(function(r){return r.length===t},"Must be a ".concat(t,"-tuple")))};function zf(e,t){return(0,nt.compose)(Vt(2),function(r){var n=Qt(r,2),i=n[0],a=n[1],o=e(i),s=t(a);try{return(0,Ee.Ok)([o.unwrap(),s.unwrap()])}catch{return(0,Ee.Err)((0,Xt.annotate)([o.isErr()?o.errValue():o.value(),s.isErr()?s.errValue():s.value()]))}})}function Bf(e,t,r){return(0,nt.compose)(Vt(3),function(n){var i=Qt(n,3),a=i[0],o=i[1],s=i[2],u=e(a),f=t(o),c=r(s);try{return(0,Ee.Ok)([u.unwrap(),f.unwrap(),c.unwrap()])}catch{return(0,Ee.Err)((0,Xt.annotate)([u.isErr()?u.errValue():u.value(),f.isErr()?f.errValue():f.value(),c.isErr()?c.errValue():c.value()]))}})}function Wf(e,t,r,n){return(0,nt.compose)(Vt(4),function(i){var a=Qt(i,4),o=a[0],s=a[1],u=a[2],f=a[3],c=e(o),l=t(s),v=r(u),p=n(f);try{return(0,Ee.Ok)([c.unwrap(),l.unwrap(),v.unwrap(),p.unwrap()])}catch{return(0,Ee.Err)((0,Xt.annotate)([c.isErr()?c.errValue():c.value(),l.isErr()?l.errValue():l.value(),v.isErr()?v.errValue():v.value(),p.isErr()?p.errValue():p.value()]))}})}function Gf(e,t,r,n,i){return(0,nt.compose)(Vt(5),function(a){var o=Qt(a,5),s=o[0],u=o[1],f=o[2],c=o[3],l=o[4],v=e(s),p=t(u),m=r(f),d=n(c),y=i(l);try{return(0,Ee.Ok)([v.unwrap(),p.unwrap(),m.unwrap(),d.unwrap(),y.unwrap()])}catch{return(0,Ee.Err)((0,Xt.annotate)([v.isErr()?v.errValue():v.value(),p.isErr()?p.errValue():p.value(),m.isErr()?m.errValue():m.value(),d.isErr()?d.errValue():d.value(),y.isErr()?y.errValue():y.value()]))}})}function Kf(e,t,r,n,i,a){return(0,nt.compose)(Vt(6),function(o){var s=Qt(o,6),u=s[0],f=s[1],c=s[2],l=s[3],v=s[4],p=s[5],m=e(u),d=t(f),y=r(c),h=n(l),b=i(v),O=a(p);try{return(0,Ee.Ok)([m.unwrap(),d.unwrap(),y.unwrap(),h.unwrap(),b.unwrap(),O.unwrap()])}catch{return(0,Ee.Err)((0,Xt.annotate)([m.isErr()?m.errValue():m.value(),d.isErr()?d.errValue():d.value(),y.isErr()?y.errValue():y.value(),h.isErr()?h.errValue():h.value(),b.isErr()?b.errValue():b.value(),O.isErr()?O.errValue():O.value()]))}})}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"guard",{enumerable:!0,get:function(){return t.guard}}),Object.defineProperty(e,"compose",{enumerable:!0,get:function(){return r.compose}}),Object.defineProperty(e,"map",{enumerable:!0,get:function(){return r.map}}),Object.defineProperty(e,"predicate",{enumerable:!0,get:function(){return r.predicate}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return n.array}}),Object.defineProperty(e,"poja",{enumerable:!0,get:function(){return n.poja}}),Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return i.boolean}}),Object.defineProperty(e,"numericBoolean",{enumerable:!0,get:function(){return i.numericBoolean}}),Object.defineProperty(e,"truthy",{enumerable:!0,get:function(){return i.truthy}}),Object.defineProperty(e,"constant",{enumerable:!0,get:function(){return a.constant}}),Object.defineProperty(e,"hardcoded",{enumerable:!0,get:function(){return a.hardcoded}}),Object.defineProperty(e,"mixed",{enumerable:!0,get:function(){return a.mixed}}),Object.defineProperty(e,"null_",{enumerable:!0,get:function(){return a.null_}}),Object.defineProperty(e,"undefined_",{enumerable:!0,get:function(){return a.undefined_}}),Object.defineProperty(e,"unknown",{enumerable:!0,get:function(){return a.unknown}}),Object.defineProperty(e,"date",{enumerable:!0,get:function(){return o.date}}),Object.defineProperty(e,"dispatch",{enumerable:!0,get:function(){return s.dispatch}}),Object.defineProperty(e,"either",{enumerable:!0,get:function(){return u.either}}),Object.defineProperty(e,"either3",{enumerable:!0,get:function(){return u.either3}}),Object.defineProperty(e,"either4",{enumerable:!0,get:function(){return u.either4}}),Object.defineProperty(e,"either5",{enumerable:!0,get:function(){return u.either5}}),Object.defineProperty(e,"either6",{enumerable:!0,get:function(){return u.either6}}),Object.defineProperty(e,"either7",{enumerable:!0,get:function(){return u.either7}}),Object.defineProperty(e,"either8",{enumerable:!0,get:function(){return u.either8}}),Object.defineProperty(e,"either9",{enumerable:!0,get:function(){return u.either9}}),Object.defineProperty(e,"oneOf",{enumerable:!0,get:function(){return u.oneOf}}),Object.defineProperty(e,"fail",{enumerable:!0,get:function(){return f.fail}}),Object.defineProperty(e,"instanceOf",{enumerable:!0,get:function(){return c.instanceOf}}),Object.defineProperty(e,"mapping",{enumerable:!0,get:function(){return l.mapping}}),Object.defineProperty(e,"dict",{enumerable:!0,get:function(){return l.dict}}),Object.defineProperty(e,"integer",{enumerable:!0,get:function(){return v.integer}}),Object.defineProperty(e,"number",{enumerable:!0,get:function(){return v.number}}),Object.defineProperty(e,"positiveInteger",{enumerable:!0,get:function(){return v.positiveInteger}}),Object.defineProperty(e,"positiveNumber",{enumerable:!0,get:function(){return v.positiveNumber}}),Object.defineProperty(e,"exact",{enumerable:!0,get:function(){return p.exact}}),Object.defineProperty(e,"object",{enumerable:!0,get:function(){return p.object}}),Object.defineProperty(e,"pojo",{enumerable:!0,get:function(){return p.pojo}}),Object.defineProperty(e,"maybe",{enumerable:!0,get:function(){return m.maybe}}),Object.defineProperty(e,"nullable",{enumerable:!0,get:function(){return m.nullable}}),Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return m.optional}}),Object.defineProperty(e,"email",{enumerable:!0,get:function(){return d.email}}),Object.defineProperty(e,"regex",{enumerable:!0,get:function(){return d.regex}}),Object.defineProperty(e,"string",{enumerable:!0,get:function(){return d.string}}),Object.defineProperty(e,"url",{enumerable:!0,get:function(){return d.url}}),Object.defineProperty(e,"tuple2",{enumerable:!0,get:function(){return y.tuple2}}),Object.defineProperty(e,"tuple3",{enumerable:!0,get:function(){return y.tuple3}}),Object.defineProperty(e,"tuple4",{enumerable:!0,get:function(){return y.tuple4}}),Object.defineProperty(e,"tuple5",{enumerable:!0,get:function(){return y.tuple5}}),Object.defineProperty(e,"tuple6",{enumerable:!0,get:function(){return y.tuple6}});var t=ri,r=ae,n=St,i=Co,a=fe,o=Qr,s=ii,u=le,f=oi,c=si,l=Vr,v=ge,p=Ge,m=Zt,d=Te,y=ut})(S);const qf="6.3.1",Rr="iframe-coordinator";function Jf(e){return Object.assign(Object.assign({direction:"HostToClient"},e),{protocol:Rr,version:qf})}function $e(e,t){return S.object({protocol:S.either(S.constant(Rr),S.hardcoded(Rr)),version:S.either(S.string,S.hardcoded("unknown")),msgType:e,msg:t,direction:S.optional(Yf)})}const Yf=S.either(S.constant("ClientToHost"),S.constant("HostToClient")),Zf=$e(S.constant("clickFired"),S.object({})),Xf=$e(S.constant("registeredKeyFired"),S.object({altKey:S.optional(S.boolean),charCode:S.optional(S.number),code:S.optional(S.string),ctrlKey:S.optional(S.boolean),key:S.string,keyCode:S.optional(S.number),metaKey:S.optional(S.boolean),shiftKey:S.optional(S.boolean)})),Qf=$e(S.constant("client_started"),S.mixed),Vf=$e(S.constant("env_init"),S.object({locale:S.string,hostRootUrl:S.string,assignedRoute:S.string,registeredKeys:S.optional(S.array(S.object({key:S.string,altKey:S.optional(S.boolean),ctrlKey:S.optional(S.boolean),metaKey:S.optional(S.boolean),shiftKey:S.optional(S.boolean)}))),custom:S.mixed})),ec=$e(S.constant("modalRequest"),S.object({modalId:S.string,modalData:S.mixed})),tc=$e(S.constant("navRequest"),S.object({url:S.string,history:S.optional(S.either(S.constant("push"),S.constant("replace")))}));function rc(e){return"notifyRequest"}const nc=S.map(S.constant("toastRequest"),rc),Zi=$e(S.either(S.constant("notifyRequest"),nc),S.object({title:S.optional(S.string),message:S.string,custom:S.mixed})),ic=$e(S.constant("pageMetadata"),S.object({title:S.string,breadcrumbs:S.array(S.object({text:S.string,href:S.string})),custom:S.optional(S.mixed)})),ac=$e(S.constant("promptOnLeave"),S.object({shouldPrompt:S.boolean,message:S.optional(S.string)})),ko=$e(S.constant("publish"),S.object({topic:S.string,payload:S.mixed,clientId:S.optional(S.string)}));function oc(e){return S.guard(S.dispatch("msgType",{publish:ko,registeredKeyFired:Xf,client_started:Qf,clickFired:Zf,navRequest:tc,notifyRequest:Zi,toastRequest:Zi,modalRequest:ec,pageMetadata:ic,promptOnLeave:ac}))(e)}function sc(e){return S.guard(S.dispatch("msgType",{publish:ko,env_init:Vf}))(e)}const uc="frame-router iframe { width: 100%; height: 100%; border: 0px }",Xi=["allow-popups-to-escape-sandbox","allow-scripts","allow-same-origin","allow-modals","allow-forms","allow-popups","allow-downloads","allow-top-navigation-by-user-activation"];let or;class fc{constructor(t){this._window=t.mockWindow?t.mockWindow:window,this._postMessageHandler=r=>{this._handlePostMessage(t.onMessage,r)},this._frameLocation="about:blank",this._iframe=this._window.document.createElement("iframe"),or||(or=this._window.document.createElement("style"),or.innerText=uc,this._window.document.head.appendChild(or)),this._iframe.setAttribute("sandbox",Xi.join(" "))}setFrameAllow(t){typeof t!="string"&&(t=""),this._iframe.setAttribute("allow",t)}setFrameSandbox(t){typeof t!="string"&&(t="");const r=t.split(" ").concat(Xi),n=[...new Set(r)].join(" ");this._iframe.setAttribute("sandbox",n)}setFrameDefaultTitle(t){typeof t!="string"&&(t=""),this._iframe.setAttribute("title",t)}setFrameLocation(t){return this._frameLocation=t||"about:blank",this._iframe.contentWindow?this._navigateFrame():this._iframe.onload=r=>{this._navigateFrame(),this._iframe.onload=null},this._frameLocation}sendToClient(t){const r=this._expectedClientOrigin();if(this._iframe.contentWindow&&r){const n=Jf(t);let i;try{i=sc(n)}catch(a){throw new Error(`
20
20
  I received invalid data to send to a client application. This is probably due
21
21
  to bad data passed to a frame-router method.
22
22
  `.trim()+`
@@ -24,7 +24,7 @@ to bad data passed to a frame-router method.
24
24
  I received an invalid message from the client application. This is probably due
25
25
  to a major version mismatch between client and host iframe-coordinator libraries.
26
26
  `.trim()+`
27
- `+a.message);return}const i=this._expectedClientOrigin();i&&r.origin===i&&r.source===this._iframe.contentWindow&&(n.msgType==="clickFired"&&this._iframe.click(),t(n))}_navigateFrame(){this._iframe.contentWindow&&this._iframe.contentWindow.location.replace(this._frameLocation)}_expectedClientOrigin(){try{const t=new URL(this._frameLocation,this._window.location.href);return t.protocol!=="http:"&&t.protocol!=="https:"?null:new URL(t.origin).origin}catch{return null}}}class Qi{constructor(t){this._clients=Object.entries(t).map(([r,n])=>lc(r,n)).sort(dc)}getClientTarget(t){let r=null;for(let n of this._clients){const i=cc(t,n.assignedRoute);if(i!==null){r={id:n.id,url:pc(n.url,i),assignedRoute:n.assignedRoute,allow:n.allow,sandbox:n.sandbox,defaultTitle:n.defaultTitle};break}}return r}}function cc(e,t){const r=On(e);if(r.startsWith(t)){const n=r.replace(t,"");return On(n)}else return null}function lc(e,t){return{id:e,url:t.url,assignedRoute:Eu(t.assignedRoute),allow:t.allow,sandbox:t.sandbox,defaultTitle:t.defaultTitle}}function pc(e,t){const r=new URL(e,window.location.href);if(r.hash){const n=Tr(r.hash);r.hash=`${n}/${t}`}else{const n=Tr(r.pathname);r.pathname=`${n}/${t}`}return r.toString()}function dc(e,t){return t.assignedRoute.split("/").length-e.assignedRoute.split("/").length}const Mt="route";class vc extends HTMLElement{constructor(){super(),this._publishEmitter=new $u,this._publishExposedEmitter=new Su(this._publishEmitter),this._queuedEvents=[],this._frameManager=new fc({onMessage:this._handleClientMessages.bind(this)})}static get observedAttributes(){return[Mt]}connectedCallback(){this._frameManager.embed(this),this._frameManager.startMessageHandler(),this._emitQueuedEvents()}disconnectedCallback(){this._frameManager.stopMessageHandler()}setupFrames(t,r){this._router=new Qi(t);const n=this._processHostUrl(r.hostRootUrl);this._envData=Object.assign(Object.assign({},r),{hostRootUrl:n}),this._clientConfig={clients:t,envData:r},this.changeRoute(this.getAttribute(Mt)||"about:blank")}get messaging(){return this._publishExposedEmitter}publish(t){this._frameManager.sendToClient({msg:t,msgType:"publish"})}changeRoute(t){if(this._router){const r=this._router.getClientTarget(t),n=r&&r.id||"";this._currentClientId!==n&&this._dispatchEventWhenConnected(new CustomEvent("clientChanged",{detail:n})),r===null&&this._currentPath!==t&&this._dispatchEventWhenConnected(new CustomEvent("clientNotFound")),this._currentPath=t,this._currentClientId=n;const i=this._frameManager.setFrameLocation(r&&r.url);this._frameManager.setFrameSandbox(r&&r.sandbox||void 0),this._frameManager.setFrameAllow(r&&r.allow||void 0),this._frameManager.setFrameDefaultTitle(r&&r.defaultTitle||void 0),this._dispatchEventWhenConnected(new CustomEvent("frameTransition",{detail:i}))}}attributeChangedCallback(t,r,n){t===Mt&&r!==n&&this.changeRoute(n||"")}get clientConfig(){return this._clientConfig}set clientConfig(t){this._clientConfig=t,this._configureClients(t.clients,t.envData)}_configureClients(t,r){this._router=new Qi(t);const n=this._processHostUrl(r.hostRootUrl);this._envData=Object.assign(Object.assign({},r),{hostRootUrl:n}),this.changeRoute(this.getAttribute(Mt)||"about:blank")}_handleClientMessages(t){switch(t.msgType){case"publish":const r=t.msg;r.clientId=this._currentClientId,this._publishEmitter.dispatch(t.msg.topic,r),this._dispatchClientMessage(t);break;case"client_started":this._handleLifecycleMessage(t);break;default:this._dispatchClientMessage(t)}}_handleLifecycleMessage(t){const r=this._getCurrentClientAssignedRoute(),n=Object.assign(Object.assign({},this._envData),{assignedRoute:r});this._frameManager.sendToClient({msgType:"env_init",msg:n})}_dispatchClientMessage(t){const r=t.msg;r.clientId=this._currentClientId,this.dispatchEvent(new CustomEvent(t.msgType,{detail:r}))}_dispatchEventWhenConnected(t){this.isConnected?this.dispatchEvent(t):this._queuedEvents.push(t)}_emitQueuedEvents(){this.isConnected&&(this._queuedEvents.forEach(t=>this.dispatchEvent(t)),this._queuedEvents=[])}_getCurrentClientAssignedRoute(){const t=this.getAttribute(Mt)||"",r=this._router.getClientTarget(t);return r&&r.assignedRoute||""}_processHostUrl(t){const r=new URL(t);if(r.hash)return r.href;const n=Tr(t);return window.location.hash?`${n}/#`:n}}function hc(){customElements.define("frame-router",vc)}var yc={};/*!
27
+ `+a.message);return}const i=this._expectedClientOrigin();i&&r.origin===i&&r.source===this._iframe.contentWindow&&(n.msgType==="clickFired"&&this._iframe.click(),t(n))}_navigateFrame(){this._iframe.contentWindow&&this._iframe.contentWindow.location.replace(this._frameLocation)}_expectedClientOrigin(){try{const t=new URL(this._frameLocation,this._window.location.href);return t.protocol!=="http:"&&t.protocol!=="https:"?null:new URL(t.origin).origin}catch{return null}}}class Qi{constructor(t){this._clients=Object.entries(t).map(([r,n])=>lc(r,n)).sort(dc)}getClientTarget(t){let r=null;for(let n of this._clients){const i=cc(t,n.assignedRoute);if(i!==null){r={id:n.id,url:pc(n.url,i),assignedRoute:n.assignedRoute,allow:n.allow,sandbox:n.sandbox,defaultTitle:n.defaultTitle};break}}return r}}function cc(e,t){const r=On(e);if(r.startsWith(t)){const n=r.replace(t,"");return On(n)}else return null}function lc(e,t){return{id:e,url:t.url,assignedRoute:Eu(t.assignedRoute),allow:t.allow,sandbox:t.sandbox,defaultTitle:t.defaultTitle}}function pc(e,t){const r=new URL(e,window.location.href);if(r.hash){const n=Tr(r.hash);r.hash=`${n}/${t}`}else{const n=Tr(r.pathname);r.pathname=`${n}/${t}`}return r.toString()}function dc(e,t){return t.assignedRoute.split("/").length-e.assignedRoute.split("/").length}const Mt="route";class vc extends HTMLElement{constructor(){super(),this._publishEmitter=new $u,this._publishExposedEmitter=new Su(this._publishEmitter),this._queuedEvents=[],this._frameManager=new fc({onMessage:this._handleClientMessages.bind(this)})}static get observedAttributes(){return[Mt]}connectedCallback(){this._frameManager.embed(this),this._frameManager.startMessageHandler(),this._emitQueuedEvents()}disconnectedCallback(){this._frameManager.stopMessageHandler()}setupFrames(t,r){this._router=new Qi(t);const n=this._processHostUrl(r.hostRootUrl);this._envData=Object.assign(Object.assign({},r),{hostRootUrl:n}),this._clientConfig={clients:t,envData:r},this.changeRoute(this.getAttribute(Mt)||"about:blank")}get messaging(){return this._publishExposedEmitter}publish(t){this._frameManager.sendToClient({msg:t,msgType:"publish"})}changeRoute(t){if(this._router){const r=this._router.getClientTarget(t),n=r&&r.id||"";this._currentClientId!==n&&this._dispatchEventWhenConnected(new CustomEvent("clientChanged",{detail:n})),r===null&&this._currentPath!==t&&this._dispatchEventWhenConnected(new CustomEvent("clientNotFound")),this._currentPath=t,this._currentClientId=n;const i=this._frameManager.setFrameLocation(r&&r.url);this._frameManager.setFrameSandbox(r&&r.sandbox||void 0),this._frameManager.setFrameAllow(r&&r.allow||void 0),this._frameManager.setFrameDefaultTitle(r&&r.defaultTitle||void 0),this._dispatchEventWhenConnected(new CustomEvent("frameTransition",{detail:i}))}}attributeChangedCallback(t,r,n){t===Mt&&r!==n&&this.changeRoute(n||"")}get clientConfig(){return this._clientConfig}set clientConfig(t){this._clientConfig=t,this._configureClients(t.clients,t.envData)}_configureClients(t,r){this._router=new Qi(t);const n=this._processHostUrl(r.hostRootUrl);this._envData=Object.assign(Object.assign({},r),{hostRootUrl:n}),this.changeRoute(this.getAttribute(Mt)||"about:blank")}_handleClientMessages(t){switch(t.msgType){case"publish":const r=t.msg;r.clientId=this._currentClientId,this._publishEmitter.dispatch(t.msg.topic,r),this._dispatchClientMessage(t);break;case"client_started":this._handleLifecycleMessage(t);break;default:this._dispatchClientMessage(t)}}_handleLifecycleMessage(t){const r=this._getCurrentClientAssignedRoute(),n=Object.assign(Object.assign({},this._envData),{assignedRoute:r});this._frameManager.sendToClient({msgType:"env_init",msg:n})}_dispatchClientMessage(t){const r=t.msg;r.clientId=this._currentClientId,this.dispatchEvent(new CustomEvent(t.msgType,{detail:r}))}_dispatchEventWhenConnected(t){this.isConnected?this.dispatchEvent(t):this._queuedEvents.push(t)}_emitQueuedEvents(){this.isConnected&&(this._queuedEvents.forEach(t=>this.dispatchEvent(t)),this._queuedEvents=[])}_getCurrentClientAssignedRoute(){const t=this.getAttribute(Mt)||"",r=this._router.getClientTarget(t);return r&&r.assignedRoute||""}_processHostUrl(t){const r=new URL(t);return r.hash||(r.pathname=Tr(r.pathname),window.location.hash&&(r.pathname+="/",r.hash="#")),r.href}}function hc(){customElements.define("frame-router",vc)}var yc={};/*!
28
28
  * Vue.js v2.7.16
29
29
  * (c) 2014-2023 Evan You
30
30
  * Released under the MIT License.
package/dist/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
7
7
  <link rel="icon" href="/favicon.ico" />
8
8
  <title>ifc-wrapper</title>
9
- <script type="module" crossorigin src="/assets/index-C9IbrwRK.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-CoRqrSHz.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-BACxQIa4.css">
11
11
  </head>
12
12
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iframe-coordinator-cli",
3
- "version": "6.3.0",
3
+ "version": "6.3.1",
4
4
  "description": "CLI for local iframe-coordinator development",
5
5
  "dependencies": {
6
6
  "cheerio": "1.0.0-rc.12",
@@ -10,7 +10,7 @@
10
10
  "express": "^4.21.1",
11
11
  "find-root": "^1.1.0",
12
12
  "http-proxy-middleware": "^3.0.3",
13
- "iframe-coordinator": "6.2.0",
13
+ "iframe-coordinator": "6.3.1",
14
14
  "vue": "^2.7.16",
15
15
  "vue-class-component": "^7.2.6",
16
16
  "vue-notification": "^1.3.20",