New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More ā†’
Socket
Sign inDemoInstall
Socket

@prismatic-io/embedded

Package Overview
Dependencies
Maintainers
4
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prismatic-io/embedded - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

dist/index.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.prismatic=t():e.prismatic=t()}(this,(()=>(()=>{var e={378:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Function]",s="[object Object]",c=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[i]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l[a]=l["[object Map]"]=l["[object Number]"]=l[s]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;var f="object"==typeof global&&global&&global.Object===Object&&global,p="object"==typeof self&&self&&self.Object===Object&&self,d=f||p||Function("return this")(),_=t&&!t.nodeType&&t,E=_&&e&&!e.nodeType&&e,v=E&&E.exports===_,h=v&&f.process,g=function(){try{return E&&E.require&&E.require("util").types||h&&h.binding&&h.binding("util")}catch(e){}}(),y=g&&g.isTypedArray;function b(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var O,m,D,S=Array.prototype,I=Function.prototype,j=Object.prototype,A=d["__core-js_shared__"],C=I.toString,M=j.hasOwnProperty,w=(O=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",P=j.toString,R=C.call(Object),L=RegExp("^"+C.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=v?d.Buffer:void 0,T=d.Symbol,B=d.Uint8Array,V=(N&&N.allocUnsafe,m=Object.getPrototypeOf,D=Object,function(e){return m(D(e))}),$=Object.create,x=j.propertyIsEnumerable,k=S.splice,F=T?T.toStringTag:void 0,z=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),q=N?N.isBuffer:void 0,U=Math.max,Y=Date.now,G=ce(d,"Map"),W=ce(Object,"create"),H=function(){function e(){}return function(t){if(!be(t))return{};if($)return $(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function J(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function X(e){var t=this.__data__=new K(e);this.size=t.size}function Z(e,t,n){(void 0!==n&&!de(e[t],n)||void 0===n&&!(t in e))&&ne(e,t,n)}function ee(e,t,n){var r=e[t];M.call(e,t)&&de(r,n)&&(void 0!==n||t in e)||ne(e,t,n)}function te(e,t){for(var n=e.length;n--;)if(de(e[n][0],t))return n;return-1}function ne(e,t,n){"__proto__"==t&&z?z(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}J.prototype.clear=function(){this.__data__=W?W(null):{},this.size=0},J.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},J.prototype.get=function(e){var t=this.__data__;if(W){var n=t[e];return n===r?void 0:n}return M.call(t,e)?t[e]:void 0},J.prototype.has=function(e){var t=this.__data__;return W?void 0!==t[e]:M.call(t,e)},J.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=W&&void 0===t?r:t,this},K.prototype.clear=function(){this.__data__=[],this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=te(t,e);return!(n<0||(n==t.length-1?t.pop():k.call(t,n,1),--this.size,0))},K.prototype.get=function(e){var t=this.__data__,n=te(t,e);return n<0?void 0:t[n][1]},K.prototype.has=function(e){return te(this.__data__,e)>-1},K.prototype.set=function(e,t){var n=this.__data__,r=te(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Q.prototype.clear=function(){this.size=0,this.__data__={hash:new J,map:new(G||K),string:new J}},Q.prototype.delete=function(e){var t=se(this,e).delete(e);return this.size-=t?1:0,t},Q.prototype.get=function(e){return se(this,e).get(e)},Q.prototype.has=function(e){return se(this,e).has(e)},Q.prototype.set=function(e,t){var n=se(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},X.prototype.clear=function(){this.__data__=new K,this.size=0},X.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},X.prototype.get=function(e){return this.__data__.get(e)},X.prototype.has=function(e){return this.__data__.has(e)},X.prototype.set=function(e,t){var n=this.__data__;if(n instanceof K){var r=n.__data__;if(!G||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Q(r)}return n.set(e,t),this.size=n.size,this};function re(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":F&&F in Object(e)?function(e){var t=M.call(e,F),n=e[F];try{e[F]=void 0;var r=!0}catch(e){}var o=P.call(e);return r&&(t?e[F]=n:delete e[F]),o}(e):function(e){return P.call(e)}(e)}function oe(e){return Oe(e)&&re(e)==i}function ie(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}}(t,(function(i,a){if(o||(o=new X),be(i))!function(e,t,n,r,o,i,a){var c=fe(e,n),u=fe(t,n),l=a.get(u);if(l)Z(e,n,l);else{var f,p,d,_,E,v=i?i(c,u,n+"",e,t,a):void 0,h=void 0===v;if(h){var g=Ee(u),y=!g&&he(u),b=!g&&!y&&me(u);v=u,g||y||b?Ee(c)?v=c:Oe(E=c)&&ve(E)?v=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(c):y?(h=!1,v=function(e,t){return e.slice()}(u)):b?(h=!1,_=new(d=(f=u).buffer).constructor(d.byteLength),new B(_).set(new B(d)),p=_,v=new f.constructor(p,f.byteOffset,f.length)):v=[]:function(e){if(!Oe(e)||re(e)!=s)return!1;var t=V(e);if(null===t)return!0;var n=M.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&C.call(n)==R}(u)||_e(u)?(v=c,_e(c)?v=function(e){return function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],c=void 0;void 0===c&&(c=e[s]),o?ne(n,s,c):ee(n,s,c)}return n}(e,De(e))}(c):be(c)&&!ge(c)||(v=function(e){return"function"!=typeof e.constructor||le(e)?{}:H(V(e))}(u))):h=!1}h&&(a.set(u,v),o(v,u,r,i,a),a.delete(u)),Z(e,n,v)}}(e,t,a,n,ie,r,o);else{var c=r?r(fe(e,a),i,a+"",e,t,o):void 0;void 0===c&&(c=i),Z(e,a,c)}}),De)}var ae=z?function(e,t){return z(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:je;function se(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!be(e)||function(e){return!!w&&w in e}(e))&&(ge(e)?L:c).test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function ue(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&u.test(e))&&e>-1&&e%1==0&&e<t}function le(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||j)}function fe(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var pe=function(e){var t=0,n=0;return function(){var r=Y(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ae);function de(e,t){return e===t||e!=e&&t!=t}var _e=oe(function(){return arguments}())?oe:function(e){return Oe(e)&&M.call(e,"callee")&&!x.call(e,"callee")},Ee=Array.isArray;function ve(e){return null!=e&&ye(e.length)&&!ge(e)}var he=q||function(){return!1};function ge(e){if(!be(e))return!1;var t=re(e);return t==a||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ye(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function be(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Oe(e){return null!=e&&"object"==typeof e}var me=y?function(e){return function(t){return e(t)}}(y):function(e){return Oe(e)&&ye(e.length)&&!!l[re(e)]};function De(e){return ve(e)?function(e,t){var n=Ee(e),r=!n&&_e(e),o=!n&&!r&&he(e),i=!n&&!r&&!o&&me(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var u in e)!t&&!M.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ue(u,c))||s.push(u);return s}(e,!0):function(e){if(!be(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=le(e),n=[];for(var r in e)("constructor"!=r||!t&&M.call(e,r))&&n.push(r);return n}(e)}var Se,Ie=(Se=function(e,t,n){ie(e,t,n)},function(e,t){return pe(function(e,t,n){return t=U(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=U(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),b(e,this,s)}}(e,t,je),e+"")}((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Se.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!be(n))return!1;var r=typeof t;return!!("number"==r?ve(n)&&ue(t,n.length):"string"==r&&t in n)&&de(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=t[n];a&&Se(e,a,n)}return e})));function je(e){return e}e.exports=Ie},166:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.authenticate=void 0;const i=o(n(509)),a=n(880),s=n(367),c="The authenticate method expects an object containing a token and additional optional configuration.",u=["token"];t.authenticate=e=>r(void 0,void 0,void 0,(function*(){var t;if((0,a.assertInit)("authenticate"),!e)throw new Error(c);const n=new Set(Object.keys(e));if(!u.every((e=>n.has(e))))throw new Error(c);const{token:r}=e;s.state.jwt=r;const o=null!==(t=e.prismaticUrl)&&void 0!==t?t:s.state.prismaticUrl,l=yield fetch((0,i.default)(o,"embedded","authenticate"),{headers:{Authorization:`Bearer ${r}`},method:"post"});if(!l.ok){const e=yield l.text();throw e?new Error(`Authentication failed. Server sent back: ${e}`):new Error("Authentication failed. Please check that your customer and organization information are correct, and that the token you provided is not expired.")}}))},0:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.configureInstance=void 0;const o=n(880),i=n(829);t.configureInstance=e=>{var{integrationName:t,skipRedirectOnRemove:n}=e,a=r(e,["integrationName","skipRedirectOnRemove"]);(0,o.assertInit)("configureInstance"),(0,i.setIframe)("find-integration-marketplace",a,Object.assign({integrationName:t},n?{skipRedirectOnRemove:"true"}:{}))}},168:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.graphqlRequest=void 0;const i=o(n(509)),a=n(367),s=n(880);t.graphqlRequest=({query:e,variables:t})=>r(void 0,void 0,void 0,(function*(){(0,s.assertInit)("authenticate");const{jwt:n,prismaticUrl:r}=a.state,o=yield fetch((0,i.default)(r,"api"),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify({query:e,variables:t})});return yield o.json()}))},915:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showMarketplace=t.showIntegrations=t.showDesigner=t.showComponents=t.showComponent=t.setConfigVars=t.init=t.graphqlRequest=t.configureInstance=t.authenticate=void 0;var r=n(166);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return r.authenticate}});var o=n(0);Object.defineProperty(t,"configureInstance",{enumerable:!0,get:function(){return o.configureInstance}});var i=n(168);Object.defineProperty(t,"graphqlRequest",{enumerable:!0,get:function(){return i.graphqlRequest}});var a=n(723);Object.defineProperty(t,"init",{enumerable:!0,get:function(){return a.init}});var s=n(30);Object.defineProperty(t,"setConfigVars",{enumerable:!0,get:function(){return s.setConfigVars}});var c=n(145);Object.defineProperty(t,"showComponent",{enumerable:!0,get:function(){return c.showComponent}});var u=n(790);Object.defineProperty(t,"showComponents",{enumerable:!0,get:function(){return u.showComponents}});var l=n(139);Object.defineProperty(t,"showDesigner",{enumerable:!0,get:function(){return l.showDesigner}});var f=n(298);Object.defineProperty(t,"showIntegrations",{enumerable:!0,get:function(){return f.showIntegrations}});var p=n(800);Object.defineProperty(t,"showMarketplace",{enumerable:!0,get:function(){return p.showMarketplace}})},723:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0;const r=n(299),o=n(319),i=n(367),a=n(829);t.init=e=>{if(document.getElementById(a.EMBEDDED_ID))return;e&&Object.entries(e).forEach((([e,t])=>{e in i.state&&(i.state[e]=t)})),i.state.initComplete=!0,document.head.insertAdjacentHTML("beforeend",r.styles);const t=document.createElement("div");t.id=a.EMBEDDED_ID,t.innerHTML=`\n <div class="${a.EMBEDDED_OVERLAY_CLASS}">\n <div class="${a.EMBEDDED_POPOVER_CLASS}">\n <button class="${a.EMBEDDED_POPOVER_CLOSE_CLASS}" aria-label="close popover" data-close>āœ•</button>\n <div class="${a.EMBEDDED_IFRAME_CLASS}"></div>\n </div>\n </div>\n `,document.body.appendChild(t);const n=document.querySelector(`#${a.EMBEDDED_ID} .${a.EMBEDDED_POPOVER_CLOSE_CLASS}`),s=document.querySelector(a.EMBEDDED_OVERLAY_SELECTOR);null==s||s.addEventListener("click",(e=>{e.target===e.currentTarget&&(0,o.closePopover)()})),null==n||n.addEventListener("click",(()=>(0,o.closePopover)())),document.addEventListener("keyup",(e=>{"Escape"===e.key&&document.querySelector(`.${a.EMBEDDED_OVERLAY_VISIBLE_CLASS}`)&&(0,o.closePopover)()}))}},30:function(e,t){"use strict";var n=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.setConfigVars=void 0,t.setConfigVars=e=>{var{configVars:t}=e,r=n(e,["configVars"]);postMessage(Object.assign(Object.assign({},r),{event:{event:"SET_CONFIG_VAR",data:t}}))}},145:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.showComponent=void 0;const o=n(880),i=n(829);t.showComponent=e=>{var{componentId:t}=e,n=r(e,["componentId"]);(0,o.assertInit)("showComponent"),(0,i.setIframe)(`components/${t}`,n,{})}},790:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showComponents=void 0;const r=n(880),o=n(829);t.showComponents=e=>{(0,r.assertInit)("showComponents"),(0,o.setIframe)("components",e,{})}},139:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.showDesigner=void 0;const o=n(880),i=n(829);t.showDesigner=e=>{var{integrationId:t}=e,n=r(e,["integrationId"]);(0,o.assertInit)("showDesigner"),(0,i.setIframe)(`integrations/${t}`,n,{})}},298:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showIntegrations=void 0;const r=n(880),o=n(829);t.showIntegrations=e=>{(0,r.assertInit)("showIntegrations"),(0,o.setIframe)("integrations",e,{})}},800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showMarketplace=void 0;const r=n(880),o=n(829);t.showMarketplace=e=>{(0,r.assertInit)("showMarketplace"),(0,o.setIframe)("integration-marketplace",e,{})}},367:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.state=void 0,t.state={filters:{category:void 0,label:void 0},initComplete:!1,jwt:"",prismaticUrl:"https://app.prismatic.io",screenConfiguration:void 0,theme:void 0,translation:void 0}},299:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.styles=void 0;const r=n(829);t.styles=`<style>\n .${r.EMBEDDED_OVERLAY_CLASS} {\n backdrop-filter: blur(10px);\n background: rgb(119 119 119 / 29%);\n bottom: 0;\n display: block;\n left: 0;\n opacity: 0;\n position: fixed;\n right: 0;\n top: 0;\n transition: all 0.3s ease-in;\n visibility: hidden;\n z-index: 9999;\n }\n .${r.EMBEDDED_OVERLAY_CLASS}.${r.EMBEDDED_OVERLAY_VISIBLE_CLASS} {\n opacity: 1;\n visibility: visible;\n }\n .${r.EMBEDDED_POPOVER_CLASS} {\n background: #fff;\n border-radius: 4px;\n bottom: 0;\n height: 80vh;\n left: 0;\n margin: auto;\n overflow: hidden;\n position: absolute;\n right: 0;\n top: 0;\n width: 80vw;\n }\n .${r.EMBEDDED_POPOVER_CLOSE_CLASS} {\n all: unset;\n cursor: pointer;\n position: absolute;\n right: 1.5em;\n top: 1.3em;\n }\n .${r.EMBEDDED_IFRAME_CLASS} {\n height: 100%\n }\n</style>`},18:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPopover=void 0,t.isPopover=e=>!0===e.usePopover},880:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertInit=void 0;const r=n(367);t.assertInit=e=>{if(!r.state.initComplete)throw new Error(`Expected init to be called before calling ${e}`)}},829:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setIframe=t.isIframe=t.getIframeElement=t.getIframeContainerElement=t.EMBEDDED_POPOVER_CLOSE_CLASS=t.EMBEDDED_POPOVER_CLASS=t.EMBEDDED_OVERLAY_VISIBLE_CLASS=t.EMBEDDED_OVERLAY_SELECTOR=t.EMBEDDED_OVERLAY_CLASS=t.EMBEDDED_IFRAME_CONTAINER_SELECTOR=t.EMBEDDED_IFRAME_CLASS=t.EMBEDDED_ID=void 0;const o=r(n(378)),i=n(873),a=n(18),s=n(319),c=n(873),u=n(367);t.EMBEDDED_ID="pio__embedded",t.EMBEDDED_IFRAME_CLASS="pio__iframe",t.EMBEDDED_IFRAME_CONTAINER_SELECTOR=`#${t.EMBEDDED_ID} .${t.EMBEDDED_IFRAME_CLASS}`,t.EMBEDDED_OVERLAY_CLASS="pio__overlay",t.EMBEDDED_OVERLAY_SELECTOR=`#${t.EMBEDDED_ID} > .${t.EMBEDDED_OVERLAY_CLASS}`,t.EMBEDDED_OVERLAY_VISIBLE_CLASS=`${t.EMBEDDED_OVERLAY_CLASS}--is_visible`,t.EMBEDDED_POPOVER_CLASS="pio__popover",t.EMBEDDED_POPOVER_CLOSE_CLASS="pio__closeBtn",t.getIframeContainerElement=e=>document.querySelector(e),t.getIframeElement=e=>document.querySelector(`${e||t.EMBEDDED_IFRAME_CONTAINER_SELECTOR} > iframe`),t.isIframe=e=>Boolean(e&&"IFRAME"===e.tagName),t.setIframe=(e,n,r)=>{var l,f,p;(0,a.isPopover)(n)||n.selector||console.error("Could not find display selector.");const d=(0,t.getIframeContainerElement)((0,a.isPopover)(n)?t.EMBEDDED_IFRAME_CONTAINER_SELECTOR:n.selector);if(!d)return;n&&Object.entries(n).forEach((([e,t])=>{e in u.state&&(u.state[e]instanceof Object?u.state[e]=(0,o.default)(u.state[e],t):u.state[e]=t)}));const _=new URLSearchParams(Object.assign(Object.assign({},r),{embed:"true",jwt:u.state.jwt}));u.state.theme&&_.set("theme",u.state.theme),(null===(l=u.state.filters)||void 0===l?void 0:l.category)&&_.set("categorySearch",u.state.filters.category),(null===(f=u.state.filters)||void 0===f?void 0:f.label)&&_.set("labelSearch",u.state.filters.label),(null===(p=u.state.screenConfiguration)||void 0===p?void 0:p.initializing)&&_.set("initializing",JSON.stringify(u.state.screenConfiguration.initializing)),u.state.filters&&_.set("hiddenFilters",Object.entries(u.state.filters).reduce(((e,[t,n])=>n?e.concat(`${t}Search`):e),[]).join(",")),d.innerHTML=`\n <iframe \n src="${u.state.prismaticUrl}/${e}/?${_.toString()}" \n height="100%" \n width="100%" \n frameBorder="0"\n allow="clipboard-read; clipboard-write"\n ></iframe>\n `;const E=d.querySelector("iframe");E&&!1!==(null==n?void 0:n.autoFocusIframe)&&E.addEventListener("mouseenter",(()=>{E.focus()})),(0,a.isPopover)(n)&&(0,s.openPopover)(),E&&(E.onload=()=>{(0,c.postMessage)({iframe:E,event:{event:i.PrismaticMessageEvent.SET_VERSION,data:"1.0.0"}}),u.state.translation&&(0,c.postMessage)({iframe:E,event:{event:i.PrismaticMessageEvent.SET_TRANSLATION,data:u.state.translation}}),u.state.screenConfiguration&&(0,c.postMessage)({iframe:E,event:{event:i.PrismaticMessageEvent.SET_SCREEN_CONFIGURATION,data:u.state.screenConfiguration}})})}},319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closePopover=t.openPopover=t.getPopover=void 0;const r=n(829);t.getPopover=()=>document.querySelector(r.EMBEDDED_OVERLAY_SELECTOR),t.openPopover=()=>{var e;return null===(e=(0,t.getPopover)())||void 0===e?void 0:e.classList.add(r.EMBEDDED_OVERLAY_VISIBLE_CLASS)},t.closePopover=()=>{var e,n;const o=(0,r.getIframeContainerElement)(`${r.EMBEDDED_IFRAME_CONTAINER_SELECTOR} > iframe`);(0,r.isIframe)(o)&&(null===(e=o.contentWindow)||void 0===e||e.postMessage({event:"MARKETPLACE_CLOSED"},"*"),null===(n=(0,t.getPopover)())||void 0===n||n.classList.remove(r.EMBEDDED_OVERLAY_VISIBLE_CLASS))}},873:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postMessage=t.getMessageIframe=t.PrismaticMessageEvent=void 0;const r=n(829);var o;(o=t.PrismaticMessageEvent||(t.PrismaticMessageEvent={})).INSTANCE_CONFIGURATION_CLOSED="INSTANCE_CONFIGURATION_CLOSED",o.INSTANCE_CONFIGURATION_LOADED="INSTANCE_CONFIGURATION_LOADED",o.INSTANCE_CONFIGURATION_OPENED="INSTANCE_CONFIGURATION_OPENED",o.INSTANCE_CREATED="INSTANCE_CREATED",o.INSTANCE_DELETED="INSTANCE_DELETED",o.INSTANCE_DEPLOYED="INSTANCE_DEPLOYED",o.SET_CONFIG_VAR="SET_CONFIG_VAR",o.SET_SCREEN_CONFIGURATION="SET_SCREEN_CONFIGURATION",o.SET_TRANSLATION="SET_TRANSLATION",o.SET_VERSION="SET_VERSION",t.getMessageIframe=e=>Array.from(document.getElementsByTagName("iframe")).find((t=>t.contentWindow===e.source)),t.postMessage=e=>{var t;const n=(e=>"iframe"in e)(e)?e.iframe:(0,r.getIframeElement)(e.selector);(0,r.isIframe)(n)&&(null===(t=n.contentWindow)||void 0===t||t.postMessage(e.event,"*"))}},509:(e,t,n)=>{"use strict";function r(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var o=e[r];if("string"!=typeof o)throw new TypeError("Url must be a string. Received "+o);""!==o&&(r>0&&(o=o.replace(/^[\/]+/,"")),o=r<e.length-1?o.replace(/[\/]+$/,""):o.replace(/[\/]+$/,"/"),t.push(o))}var i=t.join("/"),a=(i=i.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}function o(){return r("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}n.r(t),n.d(t,{default:()=>o})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageIframe=e.PrismaticMessageEvent=void 0;const t=n(915);var o=n(873);Object.defineProperty(e,"PrismaticMessageEvent",{enumerable:!0,get:function(){return o.PrismaticMessageEvent}}),Object.defineProperty(e,"getMessageIframe",{enumerable:!0,get:function(){return o.getMessageIframe}}),e.default={authenticate:t.authenticate,configureInstance:t.configureInstance,configureIntegration:t.configureInstance,graphqlRequest:t.graphqlRequest,init:t.init,setConfigVars:t.setConfigVars,showComponent:t.showComponent,showComponents:t.showComponents,showDesigner:t.showDesigner,showIntegrations:t.showIntegrations,showMarketplace:t.showMarketplace}})(),r})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.prismatic=t():e.prismatic=t()}(this,(()=>(()=>{var e={378:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Function]",s="[object Object]",c=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[i]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l[a]=l["[object Map]"]=l["[object Number]"]=l[s]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;var f="object"==typeof global&&global&&global.Object===Object&&global,p="object"==typeof self&&self&&self.Object===Object&&self,d=f||p||Function("return this")(),_=t&&!t.nodeType&&t,E=_&&e&&!e.nodeType&&e,v=E&&E.exports===_,h=v&&f.process,g=function(){try{return E&&E.require&&E.require("util").types||h&&h.binding&&h.binding("util")}catch(e){}}(),y=g&&g.isTypedArray;function b(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var O,m,D,S=Array.prototype,I=Function.prototype,j=Object.prototype,A=d["__core-js_shared__"],C=I.toString,M=j.hasOwnProperty,w=(O=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",P=j.toString,R=C.call(Object),L=RegExp("^"+C.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=v?d.Buffer:void 0,T=d.Symbol,B=d.Uint8Array,V=(N&&N.allocUnsafe,m=Object.getPrototypeOf,D=Object,function(e){return m(D(e))}),$=Object.create,x=j.propertyIsEnumerable,k=S.splice,F=T?T.toStringTag:void 0,z=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),q=N?N.isBuffer:void 0,U=Math.max,Y=Date.now,G=ce(d,"Map"),W=ce(Object,"create"),H=function(){function e(){}return function(t){if(!be(t))return{};if($)return $(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function J(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function X(e){var t=this.__data__=new K(e);this.size=t.size}function Z(e,t,n){(void 0!==n&&!de(e[t],n)||void 0===n&&!(t in e))&&ne(e,t,n)}function ee(e,t,n){var r=e[t];M.call(e,t)&&de(r,n)&&(void 0!==n||t in e)||ne(e,t,n)}function te(e,t){for(var n=e.length;n--;)if(de(e[n][0],t))return n;return-1}function ne(e,t,n){"__proto__"==t&&z?z(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}J.prototype.clear=function(){this.__data__=W?W(null):{},this.size=0},J.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},J.prototype.get=function(e){var t=this.__data__;if(W){var n=t[e];return n===r?void 0:n}return M.call(t,e)?t[e]:void 0},J.prototype.has=function(e){var t=this.__data__;return W?void 0!==t[e]:M.call(t,e)},J.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=W&&void 0===t?r:t,this},K.prototype.clear=function(){this.__data__=[],this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=te(t,e);return!(n<0||(n==t.length-1?t.pop():k.call(t,n,1),--this.size,0))},K.prototype.get=function(e){var t=this.__data__,n=te(t,e);return n<0?void 0:t[n][1]},K.prototype.has=function(e){return te(this.__data__,e)>-1},K.prototype.set=function(e,t){var n=this.__data__,r=te(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Q.prototype.clear=function(){this.size=0,this.__data__={hash:new J,map:new(G||K),string:new J}},Q.prototype.delete=function(e){var t=se(this,e).delete(e);return this.size-=t?1:0,t},Q.prototype.get=function(e){return se(this,e).get(e)},Q.prototype.has=function(e){return se(this,e).has(e)},Q.prototype.set=function(e,t){var n=se(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},X.prototype.clear=function(){this.__data__=new K,this.size=0},X.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},X.prototype.get=function(e){return this.__data__.get(e)},X.prototype.has=function(e){return this.__data__.has(e)},X.prototype.set=function(e,t){var n=this.__data__;if(n instanceof K){var r=n.__data__;if(!G||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Q(r)}return n.set(e,t),this.size=n.size,this};function re(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":F&&F in Object(e)?function(e){var t=M.call(e,F),n=e[F];try{e[F]=void 0;var r=!0}catch(e){}var o=P.call(e);return r&&(t?e[F]=n:delete e[F]),o}(e):function(e){return P.call(e)}(e)}function oe(e){return Oe(e)&&re(e)==i}function ie(e,t,n,r,o){e!==t&&function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}}(t,(function(i,a){if(o||(o=new X),be(i))!function(e,t,n,r,o,i,a){var c=fe(e,n),u=fe(t,n),l=a.get(u);if(l)Z(e,n,l);else{var f,p,d,_,E,v=i?i(c,u,n+"",e,t,a):void 0,h=void 0===v;if(h){var g=Ee(u),y=!g&&he(u),b=!g&&!y&&me(u);v=u,g||y||b?Ee(c)?v=c:Oe(E=c)&&ve(E)?v=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(c):y?(h=!1,v=function(e,t){return e.slice()}(u)):b?(h=!1,_=new(d=(f=u).buffer).constructor(d.byteLength),new B(_).set(new B(d)),p=_,v=new f.constructor(p,f.byteOffset,f.length)):v=[]:function(e){if(!Oe(e)||re(e)!=s)return!1;var t=V(e);if(null===t)return!0;var n=M.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&C.call(n)==R}(u)||_e(u)?(v=c,_e(c)?v=function(e){return function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],c=void 0;void 0===c&&(c=e[s]),o?ne(n,s,c):ee(n,s,c)}return n}(e,De(e))}(c):be(c)&&!ge(c)||(v=function(e){return"function"!=typeof e.constructor||le(e)?{}:H(V(e))}(u))):h=!1}h&&(a.set(u,v),o(v,u,r,i,a),a.delete(u)),Z(e,n,v)}}(e,t,a,n,ie,r,o);else{var c=r?r(fe(e,a),i,a+"",e,t,o):void 0;void 0===c&&(c=i),Z(e,a,c)}}),De)}var ae=z?function(e,t){return z(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:je;function se(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!be(e)||function(e){return!!w&&w in e}(e))&&(ge(e)?L:c).test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function ue(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&u.test(e))&&e>-1&&e%1==0&&e<t}function le(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||j)}function fe(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var pe=function(e){var t=0,n=0;return function(){var r=Y(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ae);function de(e,t){return e===t||e!=e&&t!=t}var _e=oe(function(){return arguments}())?oe:function(e){return Oe(e)&&M.call(e,"callee")&&!x.call(e,"callee")},Ee=Array.isArray;function ve(e){return null!=e&&ye(e.length)&&!ge(e)}var he=q||function(){return!1};function ge(e){if(!be(e))return!1;var t=re(e);return t==a||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ye(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function be(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Oe(e){return null!=e&&"object"==typeof e}var me=y?function(e){return function(t){return e(t)}}(y):function(e){return Oe(e)&&ye(e.length)&&!!l[re(e)]};function De(e){return ve(e)?function(e,t){var n=Ee(e),r=!n&&_e(e),o=!n&&!r&&he(e),i=!n&&!r&&!o&&me(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var u in e)!t&&!M.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ue(u,c))||s.push(u);return s}(e,!0):function(e){if(!be(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=le(e),n=[];for(var r in e)("constructor"!=r||!t&&M.call(e,r))&&n.push(r);return n}(e)}var Se,Ie=(Se=function(e,t,n){ie(e,t,n)},function(e,t){return pe(function(e,t,n){return t=U(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=U(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),b(e,this,s)}}(e,t,je),e+"")}((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Se.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!be(n))return!1;var r=typeof t;return!!("number"==r?ve(n)&&ue(t,n.length):"string"==r&&t in n)&&de(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=t[n];a&&Se(e,a,n)}return e})));function je(e){return e}e.exports=Ie},166:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.authenticate=void 0;const i=o(n(509)),a=n(880),s=n(367),c="The authenticate method expects an object containing a token and additional optional configuration.",u=["token"];t.authenticate=e=>r(void 0,void 0,void 0,(function*(){var t;if((0,a.assertInit)("authenticate"),!e)throw new Error(c);const n=new Set(Object.keys(e));if(!u.every((e=>n.has(e))))throw new Error(c);const{token:r}=e;s.state.jwt=r;const o=null!==(t=e.prismaticUrl)&&void 0!==t?t:s.state.prismaticUrl,l=yield fetch((0,i.default)(o,"embedded","authenticate"),{headers:{Authorization:`Bearer ${r}`},method:"post"});if(!l.ok){const e=yield l.text();throw e?new Error(`Authentication failed. Server sent back: ${e}`):new Error("Authentication failed. Please check that your customer and organization information are correct, and that the token you provided is not expired.")}}))},0:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.configureInstance=void 0;const o=n(880),i=n(829);t.configureInstance=e=>{var{integrationName:t,skipRedirectOnRemove:n}=e,a=r(e,["integrationName","skipRedirectOnRemove"]);(0,o.assertInit)("configureInstance"),(0,i.setIframe)("find-integration-marketplace",a,Object.assign({integrationName:t},n?{skipRedirectOnRemove:"true"}:{}))}},168:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.graphqlRequest=void 0;const i=o(n(509)),a=n(367),s=n(880);t.graphqlRequest=({query:e,variables:t})=>r(void 0,void 0,void 0,(function*(){(0,s.assertInit)("authenticate");const{jwt:n,prismaticUrl:r}=a.state,o=yield fetch((0,i.default)(r,"api"),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify({query:e,variables:t})});return yield o.json()}))},915:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showMarketplace=t.showIntegrations=t.showDesigner=t.showComponents=t.showComponent=t.setConfigVars=t.init=t.graphqlRequest=t.configureInstance=t.authenticate=void 0;var r=n(166);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return r.authenticate}});var o=n(0);Object.defineProperty(t,"configureInstance",{enumerable:!0,get:function(){return o.configureInstance}});var i=n(168);Object.defineProperty(t,"graphqlRequest",{enumerable:!0,get:function(){return i.graphqlRequest}});var a=n(723);Object.defineProperty(t,"init",{enumerable:!0,get:function(){return a.init}});var s=n(30);Object.defineProperty(t,"setConfigVars",{enumerable:!0,get:function(){return s.setConfigVars}});var c=n(145);Object.defineProperty(t,"showComponent",{enumerable:!0,get:function(){return c.showComponent}});var u=n(790);Object.defineProperty(t,"showComponents",{enumerable:!0,get:function(){return u.showComponents}});var l=n(139);Object.defineProperty(t,"showDesigner",{enumerable:!0,get:function(){return l.showDesigner}});var f=n(298);Object.defineProperty(t,"showIntegrations",{enumerable:!0,get:function(){return f.showIntegrations}});var p=n(800);Object.defineProperty(t,"showMarketplace",{enumerable:!0,get:function(){return p.showMarketplace}})},723:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0;const r=n(299),o=n(319),i=n(367),a=n(829);t.init=e=>{if(document.getElementById(a.EMBEDDED_ID))return;e&&Object.entries(e).forEach((([e,t])=>{e in i.state&&(i.state[e]=t)})),i.state.initComplete=!0,document.head.insertAdjacentHTML("beforeend",r.styles);const t=document.createElement("div");t.id=a.EMBEDDED_ID,t.innerHTML=`\n <div class="${a.EMBEDDED_OVERLAY_CLASS}">\n <div class="${a.EMBEDDED_POPOVER_CLASS}">\n <button class="${a.EMBEDDED_POPOVER_CLOSE_CLASS}" aria-label="close popover" data-close>āœ•</button>\n <div class="${a.EMBEDDED_IFRAME_CLASS}"></div>\n </div>\n </div>\n `,document.body.appendChild(t);const n=document.querySelector(`#${a.EMBEDDED_ID} .${a.EMBEDDED_POPOVER_CLOSE_CLASS}`),s=document.querySelector(a.EMBEDDED_OVERLAY_SELECTOR);null==s||s.addEventListener("click",(e=>{e.target===e.currentTarget&&(0,o.closePopover)()})),null==n||n.addEventListener("click",(()=>(0,o.closePopover)())),document.addEventListener("keyup",(e=>{"Escape"===e.key&&document.querySelector(`.${a.EMBEDDED_OVERLAY_VISIBLE_CLASS}`)&&(0,o.closePopover)()}))}},30:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.setConfigVars=void 0;const o=n(873);t.setConfigVars=e=>{var{configVars:t}=e,n=r(e,["configVars"]);(0,o.postMessage)(Object.assign(Object.assign({},n),{event:{event:"SET_CONFIG_VAR",data:t}}))}},145:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.showComponent=void 0;const o=n(880),i=n(829);t.showComponent=e=>{var{componentId:t}=e,n=r(e,["componentId"]);(0,o.assertInit)("showComponent"),(0,i.setIframe)(`components/${t}`,n,{})}},790:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showComponents=void 0;const r=n(880),o=n(829);t.showComponents=e=>{(0,r.assertInit)("showComponents"),(0,o.setIframe)("components",e,{})}},139:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.showDesigner=void 0;const o=n(880),i=n(829);t.showDesigner=e=>{var{integrationId:t}=e,n=r(e,["integrationId"]);(0,o.assertInit)("showDesigner"),(0,i.setIframe)(`integrations/${t}`,n,{})}},298:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showIntegrations=void 0;const r=n(880),o=n(829);t.showIntegrations=e=>{(0,r.assertInit)("showIntegrations"),(0,o.setIframe)("integrations",e,{})}},800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showMarketplace=void 0;const r=n(880),o=n(829);t.showMarketplace=e=>{(0,r.assertInit)("showMarketplace"),(0,o.setIframe)("integration-marketplace",e,{})}},367:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.state=void 0,t.state={filters:{category:void 0,label:void 0},initComplete:!1,jwt:"",prismaticUrl:"https://app.prismatic.io",screenConfiguration:void 0,theme:void 0,translation:void 0}},299:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.styles=void 0;const r=n(829);t.styles=`<style>\n .${r.EMBEDDED_OVERLAY_CLASS} {\n backdrop-filter: blur(10px);\n background: rgb(119 119 119 / 29%);\n bottom: 0;\n display: block;\n left: 0;\n opacity: 0;\n position: fixed;\n right: 0;\n top: 0;\n transition: all 0.3s ease-in;\n visibility: hidden;\n z-index: 9999;\n }\n .${r.EMBEDDED_OVERLAY_CLASS}.${r.EMBEDDED_OVERLAY_VISIBLE_CLASS} {\n opacity: 1;\n visibility: visible;\n }\n .${r.EMBEDDED_POPOVER_CLASS} {\n background: #fff;\n border-radius: 4px;\n bottom: 0;\n height: 80vh;\n left: 0;\n margin: auto;\n overflow: hidden;\n position: absolute;\n right: 0;\n top: 0;\n width: 80vw;\n }\n .${r.EMBEDDED_POPOVER_CLOSE_CLASS} {\n all: unset;\n cursor: pointer;\n position: absolute;\n right: 1.5em;\n top: 1.3em;\n }\n .${r.EMBEDDED_IFRAME_CLASS} {\n height: 100%\n }\n</style>`},18:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPopover=void 0,t.isPopover=e=>!0===e.usePopover},880:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertInit=void 0;const r=n(367);t.assertInit=e=>{if(!r.state.initComplete)throw new Error(`Expected init to be called before calling ${e}`)}},829:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setIframe=t.isIframe=t.getIframeElement=t.getIframeContainerElement=t.EMBEDDED_POPOVER_CLOSE_CLASS=t.EMBEDDED_POPOVER_CLASS=t.EMBEDDED_OVERLAY_VISIBLE_CLASS=t.EMBEDDED_OVERLAY_SELECTOR=t.EMBEDDED_OVERLAY_CLASS=t.EMBEDDED_IFRAME_CONTAINER_SELECTOR=t.EMBEDDED_IFRAME_CLASS=t.EMBEDDED_ID=void 0;const o=r(n(378)),i=n(873),a=n(18),s=n(319),c=n(873),u=n(367);t.EMBEDDED_ID="pio__embedded",t.EMBEDDED_IFRAME_CLASS="pio__iframe",t.EMBEDDED_IFRAME_CONTAINER_SELECTOR=`#${t.EMBEDDED_ID} .${t.EMBEDDED_IFRAME_CLASS}`,t.EMBEDDED_OVERLAY_CLASS="pio__overlay",t.EMBEDDED_OVERLAY_SELECTOR=`#${t.EMBEDDED_ID} > .${t.EMBEDDED_OVERLAY_CLASS}`,t.EMBEDDED_OVERLAY_VISIBLE_CLASS=`${t.EMBEDDED_OVERLAY_CLASS}--is_visible`,t.EMBEDDED_POPOVER_CLASS="pio__popover",t.EMBEDDED_POPOVER_CLOSE_CLASS="pio__closeBtn",t.getIframeContainerElement=e=>document.querySelector(e),t.getIframeElement=e=>document.querySelector(`${e||t.EMBEDDED_IFRAME_CONTAINER_SELECTOR} > iframe`),t.isIframe=e=>Boolean(e&&"IFRAME"===e.tagName),t.setIframe=(e,n,r)=>{var l,f,p;(0,a.isPopover)(n)||n.selector||console.error("Could not find display selector.");const d=(0,t.getIframeContainerElement)((0,a.isPopover)(n)?t.EMBEDDED_IFRAME_CONTAINER_SELECTOR:n.selector);if(!d)return;n&&Object.entries(n).forEach((([e,t])=>{e in u.state&&(u.state[e]instanceof Object?u.state[e]=(0,o.default)(u.state[e],t):u.state[e]=t)}));const _=new URLSearchParams(Object.assign(Object.assign({},r),{embed:"true",jwt:u.state.jwt}));u.state.theme&&_.set("theme",u.state.theme),(null===(l=u.state.filters)||void 0===l?void 0:l.category)&&_.set("categorySearch",u.state.filters.category),(null===(f=u.state.filters)||void 0===f?void 0:f.label)&&_.set("labelSearch",u.state.filters.label),(null===(p=u.state.screenConfiguration)||void 0===p?void 0:p.initializing)&&_.set("initializing",JSON.stringify(u.state.screenConfiguration.initializing)),u.state.filters&&_.set("hiddenFilters",Object.entries(u.state.filters).reduce(((e,[t,n])=>n?e.concat(`${t}Search`):e),[]).join(",")),d.innerHTML=`\n <iframe \n src="${u.state.prismaticUrl}/${e}/?${_.toString()}" \n height="100%" \n width="100%" \n frameBorder="0"\n allow="clipboard-read; clipboard-write"\n ></iframe>\n `;const E=d.querySelector("iframe");E&&!1!==(null==n?void 0:n.autoFocusIframe)&&E.addEventListener("mouseenter",(()=>{E.focus()})),(0,a.isPopover)(n)&&(0,s.openPopover)(),E&&(E.onload=()=>{(0,c.postMessage)({iframe:E,event:{event:i.PrismaticMessageEvent.SET_VERSION,data:"1.0.1"}}),u.state.translation&&(0,c.postMessage)({iframe:E,event:{event:i.PrismaticMessageEvent.SET_TRANSLATION,data:u.state.translation}}),u.state.screenConfiguration&&(0,c.postMessage)({iframe:E,event:{event:i.PrismaticMessageEvent.SET_SCREEN_CONFIGURATION,data:u.state.screenConfiguration}})})}},319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closePopover=t.openPopover=t.getPopover=void 0;const r=n(829);t.getPopover=()=>document.querySelector(r.EMBEDDED_OVERLAY_SELECTOR),t.openPopover=()=>{var e;return null===(e=(0,t.getPopover)())||void 0===e?void 0:e.classList.add(r.EMBEDDED_OVERLAY_VISIBLE_CLASS)},t.closePopover=()=>{var e,n;const o=(0,r.getIframeContainerElement)(`${r.EMBEDDED_IFRAME_CONTAINER_SELECTOR} > iframe`);(0,r.isIframe)(o)&&(null===(e=o.contentWindow)||void 0===e||e.postMessage({event:"MARKETPLACE_CLOSED"},"*"),null===(n=(0,t.getPopover)())||void 0===n||n.classList.remove(r.EMBEDDED_OVERLAY_VISIBLE_CLASS))}},873:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postMessage=t.getMessageIframe=t.PrismaticMessageEvent=void 0;const r=n(829);var o;(o=t.PrismaticMessageEvent||(t.PrismaticMessageEvent={})).INSTANCE_CONFIGURATION_CLOSED="INSTANCE_CONFIGURATION_CLOSED",o.INSTANCE_CONFIGURATION_LOADED="INSTANCE_CONFIGURATION_LOADED",o.INSTANCE_CONFIGURATION_OPENED="INSTANCE_CONFIGURATION_OPENED",o.INSTANCE_CREATED="INSTANCE_CREATED",o.INSTANCE_DELETED="INSTANCE_DELETED",o.INSTANCE_DEPLOYED="INSTANCE_DEPLOYED",o.SET_CONFIG_VAR="SET_CONFIG_VAR",o.SET_SCREEN_CONFIGURATION="SET_SCREEN_CONFIGURATION",o.SET_TRANSLATION="SET_TRANSLATION",o.SET_VERSION="SET_VERSION",t.getMessageIframe=e=>Array.from(document.getElementsByTagName("iframe")).find((t=>t.contentWindow===e.source)),t.postMessage=e=>{var t;const n=(e=>"iframe"in e)(e)?e.iframe:(0,r.getIframeElement)(e.selector);(0,r.isIframe)(n)&&(null===(t=n.contentWindow)||void 0===t||t.postMessage(e.event,"*"))}},509:(e,t,n)=>{"use strict";function r(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var o=e[r];if("string"!=typeof o)throw new TypeError("Url must be a string. Received "+o);""!==o&&(r>0&&(o=o.replace(/^[\/]+/,"")),o=r<e.length-1?o.replace(/[\/]+$/,""):o.replace(/[\/]+$/,"/"),t.push(o))}var i=t.join("/"),a=(i=i.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}function o(){return r("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}n.r(t),n.d(t,{default:()=>o})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageIframe=e.PrismaticMessageEvent=void 0;const t=n(915);var o=n(873);Object.defineProperty(e,"PrismaticMessageEvent",{enumerable:!0,get:function(){return o.PrismaticMessageEvent}}),Object.defineProperty(e,"getMessageIframe",{enumerable:!0,get:function(){return o.getMessageIframe}}),e.default={authenticate:t.authenticate,configureInstance:t.configureInstance,configureIntegration:t.configureInstance,graphqlRequest:t.graphqlRequest,init:t.init,setConfigVars:t.setConfigVars,showComponent:t.showComponent,showComponents:t.showComponents,showDesigner:t.showDesigner,showIntegrations:t.showIntegrations,showMarketplace:t.showMarketplace}})(),r})()));

@@ -21,3 +21,3 @@ {

"license": "MIT",
"version": "1.0.0",
"version": "1.0.1",
"main": "dist/index.js",

@@ -24,0 +24,0 @@ "types": "dist/index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with āš”ļø by Socket Inc