UNPKG

@peculiar/fortify-webcomponents

Version:

Web-components for creating CSR or Certificate and viewing certificates list using Fortify

47 lines 32.5 kB
var __awaiter=this&&this.__awaiter||function(t,e,r,i){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function s(t){try{c(i.next(t))}catch(t){a(t)}}function n(t){try{c(i["throw"](t))}catch(t){a(t)}}function c(t){t.done?r(t.value):o(t.value).then(s,n)}c((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(t){return function(e){return c([t,e])}}function c(n){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(r=0)),r)try{if(i=1,o&&(a=n[0]&2?o["return"]:n[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;if(o=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:r.label++;return{value:n[1],done:false};case 5:r.label++;o=n[1];n=[0];continue;case 7:n=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){r=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){r.label=n[1];break}if(n[0]===6&&r.label<a[1]){r.label=a[1];a=n;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(n);break}if(a[2])r.ops.pop();r.trys.pop();continue}n=e.call(t,r)}catch(t){n=[6,t];o=0}finally{i=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}}; /*! * © Peculiar Ventures https://peculiarventures.com/ - BSD 3-Clause License */System.register(["./p-0e5b5fce.system.js","./p-920e4680.system.js","./p-f40583a2.system.js","./p-9a94c69a.system.js","./p-2f264b96.system.js","./p-1567eb81.system.js"],(function(t){"use strict";var e,r,i,o,a,s,n,c,l,v,p,d,h,u,f,b,g,y,m,x;return{setters:[function(t){e=t.h;r=t.r;i=t.c;o=t.H},function(t){a=t.bi;s=t.C},function(t){n=t.T},function(t){c=t.F;l=t.a;v=t.b;p=t.c;d=t.d;h=t.e;u=t.f;f=t.g;b=t.h;g=t.i;y=t.j},function(t){m=t.g;x=t.l},function(){}],execute:function(){var w=function(t){return e("svg",Object.assign({},t,{viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),e("path",{d:"M20.346 20.576a6.23 6.23 0 100-12.46 6.23 6.23 0 000 12.46z",stroke:"currentColor","stroke-miterlimit":"10"}),e("path",{d:"M20.346 23.692a9.346 9.346 0 100-18.692 9.346 9.346 0 000 18.692z",stroke:"currentColor","stroke-miterlimit":"10"}),e("path",{d:"M19.91 23.91L15.88 35l-1.702-2.939L11 33.224l4.03-11.09M20.772 23.91L24.812 35l1.692-2.939 3.188 1.163-4.04-11.09",stroke:"currentColor","stroke-miterlimit":"10"}))};var _=function(t){return e("svg",Object.assign({},t,{viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),e("path",{d:"M23.684 20.438a5.347 5.347 0 01-4.12 1.944 5.355 5.355 0 01-5.346-5.346c0-2.945 2.4-5.345 5.345-5.345.69 0 1.342.126 1.944.37V11.03a6.124 6.124 0 00-1.944-.311c-3.479 0-6.317 2.838-6.317 6.317 0 3.48 2.838 6.318 6.317 6.318a6.329 6.329 0 005.317-2.916h-1.196z",fill:"currentColor"}),e("path",{d:"M25.084 24.423a9.303 9.303 0 003.052-3.985h-1.05a8.251 8.251 0 01-7.523 4.86c-4.558 0-8.26-3.704-8.26-8.262s3.702-8.26 8.26-8.26c.671 0 1.322.077 1.944.232v-1a9.095 9.095 0 00-1.944-.205c-5.092 0-9.233 4.14-9.233 9.233 0 3.023 1.468 5.695 3.713 7.387L10 35.512l3.577-1.302 1.905 3.304 4.081-11.216 4.082 11.216 1.905-3.304 3.577 1.302-4.043-11.09zM15.287 35.22l-1.273-2.196-2.381.865 3.246-8.912a9.144 9.144 0 003.683 1.234l-3.275 9.01zm9.826-2.196L23.84 35.22l-3.276-9.01a9.144 9.144 0 003.684-1.233l3.246 8.912-2.381-.865z",fill:"currentColor"}),e("path",{"clip-rule":"evenodd",d:"M30.546 5.767A3.769 3.769 0 0026.78 2a3.769 3.769 0 00-3.766 3.767 3.76 3.76 0 002.354 3.482v7.338L26.779 18l1.413-1.413-1.173-1.172 1.173-1.173-1.173-1.173 1.173-1.172V9.249a3.768 3.768 0 002.354-3.482z",stroke:"currentColor","stroke-miterlimit":"10"}),e("path",{d:"M26.78 5.287a1.173 1.173 0 100-2.345 1.173 1.173 0 000 2.345z",fill:"currentColor"}))}; /** * @license * Copyright (c) Peculiar Ventures, LLC. * * This source code is licensed under the BSD 3-Clause license found in the * LICENSE file in the root directory of this source tree. */var k=function(t){return e("svg",Object.assign({},t,{viewBox:"0 0 24 24",width:"24px",height:"24px",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),e("path",{stroke:"currentColor","stroke-width":"1.5",d:"m14 18-6-6 6-6"}))}; /** * @license * Copyright (c) Peculiar Ventures, LLC. * * This source code is licensed under the BSD 3-Clause license found in the * LICENSE file in the root directory of this source tree. */var z=function(t){return e("svg",Object.assign({},t,{viewBox:"0 0 20 21",width:"20",height:"21",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),e("path",{fill:"currentColor",d:"M14.9 5.6c-1.225-1.313-2.975-2.1-4.9-2.1-3.85 0-7 3.15-7 7s3.15 7 7 7c3.238 0 5.95-2.275 6.738-5.25H14.9c-.7 2.012-2.625 3.5-4.9 3.5-2.888 0-5.25-2.363-5.25-5.25 0-2.888 2.362-5.25 5.25-5.25 1.488 0 2.713.612 3.675 1.575l-2.8 2.8H17V3.5l-2.1 2.1Z"}))}; /** * @license * Copyright (c) Peculiar Ventures, LLC. * * This source code is licensed under the BSD 3-Clause license found in the * LICENSE file in the root directory of this source tree. */var j=function(t){var r=t.downloadAppLink;return e(l,{title:m("unsupportedVersion.title"),description:m("unsupportedVersion.description")},e(c,{variant:"primary",href:r},m("actions.update")))}; /** * @license * Copyright (c) Peculiar Ventures, LLC. * * This source code is licensed under the BSD 3-Clause license found in the * LICENSE file in the root directory of this source tree. */var C=function(t){var r=t.certificate,i=t.provider,o=t.isSelected,a=t.onClickDetails,s=t.onClick;var l=function(t){t.stopPropagation();a(r.index)};var v=function(){s(r.index)};var p=function(){var t=r.subject,e=t.G,i=t.CN,o=t.SN,a=t.E;if(i){return i}if(e&&o){return"".concat(e," ").concat(o)}if(a){return a}return r.subjectName};var d=p();var h=r.privateKeyId?_:w;return e("li",{role:"option",class:"certificates_list_item","aria-selected":String(o),onClick:v},e(h,{class:"certificates_list_item_icon"}),e("div",{class:"certificates_list_item_info"},e("div",null,e(n,{variant:"s2",color:"black"},d),e(n,{variant:"c1",color:"gray-9"},i===null||i===void 0?void 0:i.name)),e("table",{class:"certificates_list_item_table"},e("tbody",null,e("tr",null,e("td",null,e(n,{variant:"c2",color:"gray-9"},m("certificate.issuer"))),e("td",null,e(n,{variant:"c2",color:"gray-9"},r.issuer.CN))),e("tr",null,e("td",null,e(n,{variant:"c2",color:"gray-9"},m("certificate.valid"))),e("td",null,e(n,{variant:"c2",color:"gray-9"},new Date(r.notBefore).toLocaleDateString(),"  –  ",new Date(r.notAfter).toLocaleDateString()))),e("tr",null,e("td",null,e(n,{variant:"c2",color:"gray-9"},m("certificate.serial"))),e("td",null,e(n,{variant:"c2",color:"gray-9"},r.serialNumber)))))),e(c,{class:"certificates_list_item_button",onClick:l},m("actions.details")))}; /** * @license * Copyright (c) Peculiar Ventures, LLC. * * This source code is licensed under the BSD 3-Clause license found in the * LICENSE file in the root directory of this source tree. */var D=function(t){var r=t.onUpdate,i=t.onCancel,o=t.onContinue,a=t.onCertificate,s=t.onCertificateDetails,l=t.certificates,p=l===void 0?[]:l,d=t.providers,h=d===void 0?[]:d,u=t.helpPageLink,f=t.loading,b=t.allowContinue,g=t.certificateSelectedIndex;var y=function(){return[e(w,{class:"certificates_list_icon"}),e(n,{color:"gray-9",variant:"b3"},m("certificates.empty.title")),e(v,{href:u},m("actions.needHelp"))]};var x=function(){return e("peculiar-circular-progress",null)};var _=function(){return p.map((function(t){return e(C,{key:t.index,certificate:t,provider:h.find((function(e){return e.id===t.providerID})),isSelected:g===t.index,onClick:a,onClickDetails:s})}))};var k=null;switch(true){case f:k=e("div",{class:"certificates_list_content_center"},x());break;case p.length>0:k=e("ul",{role:"listbox"},_());break;default:k=e("div",{class:"certificates_list_content_center"},y())}return e("div",{class:"certificates_list"},e(n,{variant:"h5",color:"black"},m("certificates.title")),e("div",{class:"certificates_list_content"},k),e("div",{class:"certificates_list_actions container_actions"},e(c,{variant:"default",onClick:r,startIcon:e(z,null),disabled:f},m("actions.updateCertificates")),e("div",{class:"container_actions"},e(c,{onClick:i,disabled:f},m("actions.cancel")),e(c,{variant:"primary",disabled:f||!b,onClick:o},m("actions.continue")))))};var M="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:1px solid transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-7);min-width:var(--pv-size-base-7);padding:0 var(--pv-size-base-3);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base);font-size:0;-webkit-transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s, -webkit-box-shadow 200ms ease 0s;transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s, -webkit-box-shadow 200ms ease 0s;transition:background-color 200ms ease 0s, color 200ms ease 0s, box-shadow 200ms ease 0s, border-color 200ms ease 0s;transition:background-color 200ms ease 0s, color 200ms ease 0s, box-shadow 200ms ease 0s, border-color 200ms ease 0s, -webkit-box-shadow 200ms ease 0s}.button_child_text{color:inherit}.button:disabled{pointer-events:none;-webkit-box-shadow:none;box-shadow:none}.button_default{color:var(--pv-color-secondary)}.button_default:hover{background-color:var(--pv-color-secondary-tint-5)}.button_default:focus-visible{background-color:var(--pv-color-secondary-tint-4)}.button_default:active{background-color:var(--pv-color-secondary-tint-3)}.button_default:disabled{color:var(--pv-color-gray-7)}.button_secondary{border-color:var(--pv-color-gray-8);color:var(--pv-color-black)}.button_secondary:hover{background-color:var(--pv-color-gray-3)}.button_secondary:focus-visible{background-color:var(--pv-color-gray-4)}.button_secondary:active{background-color:var(--pv-color-gray-5)}.button_secondary:disabled{color:var(--pv-color-gray-7);border-color:var(--pv-color-gray-4)}.button_primary{background-color:var(--pv-color-primary);color:var(--pv-color-primary-contrast);-webkit-box-shadow:var(--pv-shadow-light-low);box-shadow:var(--pv-shadow-light-low)}.button_primary:hover{background-color:var(--pv-color-primary-tint-1)}.button_primary:focus-visible{background-color:var(--pv-color-primary-tint-2)}.button_primary:active{background-color:var(--pv-color-primary-tint-2);-webkit-box-shadow:var(--pv-shadow-light-medium);box-shadow:var(--pv-shadow-light-medium)}.button_primary:disabled{color:var(--pv-color-gray-8);background-color:var(--pv-color-gray-4)}.button_text{color:var(--pv-color-base);text-decoration:none;background:transparent;display:-ms-inline-flexbox;display:inline-flex;border:none;cursor:pointer;-webkit-transition:opacity 200ms ease 0s;transition:opacity 200ms ease 0s}.button_text:hover{opacity:0.7}.layout{height:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:var(--pv-color-white);border-radius:3px;overflow:hidden}.layout_main{-ms-flex:1 1 auto;flex:1 1 auto;overflow:auto;position:relative}.layout_footer{-ms-flex:0 0 auto;flex:0 0 auto;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;height:var(--pv-size-base-10);-ms-flex-align:center;align-items:center;padding:0px var(--pv-size-base-3);border-top:1px solid var(--pv-color-gray-5);gap:var(--pv-size-base-2);color:var(--pv-color-footer-text);background-color:var(--pv-color-footer)}.layout_footer_text{color:inherit}.mt_2{margin-top:var(--pv-size-base-2)}.mt_4{margin-top:var(--pv-size-base-4)}.mt_6{margin-top:var(--pv-size-base-6)}.container_status{height:100%;text-align:center;padding:var(--pv-size-base-12)}.container_status_logo{display:block;margin:0 auto var(--pv-size-base-6)}.container_status_illustration{margin-top:var(--pv-size-base-12);margin-bottom:var(--pv-size-base-10)}.container_status_actions{display:-ms-flexbox;display:flex;gap:var(--pv-size-base-2);-ms-flex-pack:center;justify-content:center}.container_status_authorization_number{height:var(--pv-size-base-8);width:var(--pv-size-base-6);border-radius:4px;border:1px solid var(--pv-color-gray-5);text-align:center;line-height:var(--pv-size-base-8)}.container_actions{display:-ms-flexbox;display:flex;gap:var(--pv-size-base-2)}[hidden]{display:none}:host{display:block;min-height:550px;height:550px}.certificates_list{padding:var(--pv-size-base-6);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pv-size-base-4);height:100%}.certificates_list_content{border:1px solid var(--pv-color-gray-7);border-radius:4px;min-height:300px;overflow:auto;-ms-flex:1 1 auto;flex:1 1 auto}.certificates_list_content_center{height:100%;width:100%;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;display:-ms-flexbox;display:flex;padding:var(--pv-size-base-6);gap:var(--pv-size-base-2)}.certificates_list_icon{width:40px;color:var(--pv-color-gray-8);margin-bottom:var(--pv-size-base-2)}.certificates_list_actions{padding-top:var(--pv-size-base-2);-ms-flex-pack:justify;justify-content:space-between}.certificates_list_item{display:-ms-flexbox;display:flex;padding:var(--pv-size-base-3) var(--pv-size-base-4);gap:var(--pv-size-base-4);cursor:pointer;border-bottom:1px solid var(--pv-color-gray-4);-ms-flex-align:start;align-items:start;-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s}.certificates_list_item_icon{width:40px;-ms-flex-negative:0;flex-shrink:0;color:var(--pv-color-gray-8);-webkit-transition:color 200ms ease 0s;transition:color 200ms ease 0s}.certificates_list_item_info{-ms-flex:1 1 auto;flex:1 1 auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pv-size-base-2)}.certificates_list_item_button{-ms-flex-item-align:center;align-self:center;-ms-flex-negative:0;flex-shrink:0;visibility:hidden}.certificates_list_item_table{width:100%}.certificates_list_item_table td{vertical-align:top}.certificates_list_item_table td:first-child{width:50px}.certificates_list_item_table td:last-child{padding-left:var(--pv-size-base-2)}.certificates_list_item:hover{background-color:var(--pv-color-gray-1)}.certificates_list_item:hover .certificates_list_item_button{visibility:visible}.certificates_list_item[aria-selected=true]{background-color:var(--pv-color-gray-3)}.certificates_list_item[aria-selected=true] .certificates_list_item_icon{color:var(--pv-color-gray-9)}.certificate_details{position:absolute;width:100%;height:100%;z-index:1;top:0;left:0;overflow:hidden;background-color:var(--pv-color-white);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.certificate_details_header{border-bottom:1px solid var(--pv-color-gray-5);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:var(--pv-size-base-2) var(--pv-size-base-4);gap:var(--pv-size-base-4)}.certificate_details_content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:auto}";var L=M; /** * @license * Copyright (c) Peculiar Ventures, LLC. * * This source code is licensed under the BSD 3-Clause license found in the * LICENSE file in the root directory of this source tree. */var S=undefined&&undefined.__classPrivateFieldGet||function(t,e,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(t):i?i.value:e.get(t)};var P=undefined&&undefined.__classPrivateFieldSet||function(t,e,r,i,o){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r};var A;var O=t("peculiar_fortify_certificates",function(){function t(t){var e=this;r(this,t);this.selectionCancel=i(this,"selectionCancel",7);this.selectionSuccess=i(this,"selectionSuccess",7);A.set(this,void 0);this.debugEvents=[];this.handleDocumentKeydown=function(t){if(t.shiftKey&&t.code==="KeyR"){S(e,A,"f").options.filters={};e.tryGetData()}if(t.shiftKey&&t.code==="KeyD"){a(s.FromString(JSON.stringify(e.debugEvents,undefined,2)),"debug-fortify-wc.".concat(Date.now()),"json","text/json")}};this.handleClickCancel=function(){e.selectionCancel.emit()};this.handleClickContinue=function(){var t=e.certificates.find((function(t){return t.index===e.certificateSelectedIndex}));if(t){e.selectionSuccess.emit({certificateId:t.index,providerId:t.providerID,privateKeyId:t.privateKeyId,socketProvider:S(e,A,"f").server})}};this.handleClickUpdateCertificates=function(){e.tryGetData()};this.handleClickTryAgain=function(){return __awaiter(e,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.tryLogin()];case 1:t=e.sent();if(!t){return[2]}return[4,this.tryGetData()];case 2:e.sent();return[2]}}))}))};this.handleClickCloseDetails=function(){e.certificateBase64ForDetails=null};this.handleClickCertificate=function(t){e.certificateSelectedIndex=t};this.handleClickCertificateDetails=function(t){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(r){e=this.certificates.find((function(e){return e.index===t}));if(e){this.certificateBase64ForDetails=s.ToBase64(e.raw)}return[2]}))}))};this.language=undefined;this.filters={};this.hideFooter=false;this.downloadAppLink="https://fortifyapp.com";this.helpPageLink="https://fortifyapp.com/help";this.certificateBase64ForDetails=undefined;this.providers=[];this.certificates=[];this.challenge=undefined;this.certificateSelectedIndex=undefined;this.isFetching={connectionDetect:"pending"}}t.prototype.componentWillLoad=function(){x.setLocale(this.language)};t.prototype.componentDidLoad=function(){var t=this;P(this,A,new p({onDebug:function(e){t.debugEvents.push(e)},onClose:this.handleCloseConnection.bind(this),onProvidersAdded:this.tryGetData.bind(this),onProvidersRemoved:this.tryGetData.bind(this),filters:this.filters}),"f");this.start();document.addEventListener("keydown",this.handleDocumentKeydown)};t.prototype.disconnectedCallback=function(){S(this,A,"f").finish();document.removeEventListener("keydown",this.handleDocumentKeydown)};t.prototype.handleCloseConnection=function(){this.providers=[];this.certificates=[];this.certificateSelectedIndex=undefined;this.certificateBase64ForDetails=undefined;this.setFetching("connectionDetect","rejected")};t.prototype.start=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(r){switch(r.label){case 0:this.setFetching("connectionDetect","pending");if(!S(this,A,"f").isConnectionSupported()){this.setFetching("connectionSupport","rejected");return[2]}return[4,S(this,A,"f").isConnectionDetected()];case 1:if(!r.sent()){this.setFetching("connectionDetect","rejected")}return[4,S(this,A,"f").isConnectionDetectedAuto()];case 2:r.sent();this.setFetching("connectionDetect","pending");r.label=3;case 3:r.trys.push([3,5,,6]);return[4,S(this,A,"f").connect()];case 4:r.sent();return[3,6];case 5:t=r.sent();console.error(t);if(t&&t.message){if(t.message.indexOf("update your client to the latest version")!==-1){this.setFetching("connectionClientUpdate","rejected")}}return[2];case 6:return[4,this.tryLogin()];case 7:e=r.sent();if(!e){return[2]}return[4,this.tryGetData()];case 8:r.sent();return[2]}}))}))};t.prototype.tryGetData=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,r,i;return __generator(this,(function(o){switch(o.label){case 0:this.setFetching("providers","pending");this.certificateSelectedIndex=undefined;this.providers=[];this.certificates=[];o.label=1;case 1:o.trys.push([1,3,,4]);t=this;return[4,S(this,A,"f").getProviders()];case 2:t.providers=o.sent();this.setFetching("providers","resolved");return[3,4];case 3:e=o.sent();this.setFetching("providers","rejected");return[2];case 4:this.setFetching("certificates","pending");o.label=5;case 5:o.trys.push([5,7,,8]);r=this;return[4,S(this,A,"f").getCertificatesByProviders(this.providers)];case 6:r.certificates=o.sent();this.setFetching("certificates","resolved");return[3,8];case 7:i=o.sent();this.setFetching("certificates","rejected");return[3,8];case 8:return[2]}}))}))};t.prototype.tryLogin=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(r){switch(r.label){case 0:this.challenge=undefined;this.setFetching("connectionApprove","pending");r.label=1;case 1:r.trys.push([1,5,,6]);return[4,S(this,A,"f").challenge()];case 2:t=r.sent();if(!t)return[3,4];this.challenge=t;return[4,S(this,A,"f").login()];case 3:r.sent();r.label=4;case 4:this.setFetching("connectionApprove","resolved");return[3,6];case 5:e=r.sent();this.setFetching("connectionApprove","rejected");return[2,undefined];case 6:return[2,true]}}))}))};t.prototype.setFetching=function(t,e){var r;this.isFetching=Object.assign(Object.assign({},this.isFetching),(r={},r[t]=e,r))};t.renderConnecting=function(){return e(h,null)};t.renderFortifyAuthorization=function(t){return e(u,{pin:t})};t.prototype.renderFortifyNotDetected=function(){return e(f,{downloadAppLink:this.downloadAppLink})};t.prototype.renderFortifyClientUpdate=function(){return e(j,{downloadAppLink:this.downloadAppLink})};t.prototype.renderFortifyNotSupported=function(){return e(b,{onCancel:this.handleClickCancel})};t.prototype.renderChallengeNotApproved=function(){return e(g,{onCancel:this.handleClickCancel,onTryAgain:this.handleClickTryAgain})};t.prototype.renderCertificates=function(){return e(D,{certificates:this.certificates,providers:this.providers,certificateSelectedIndex:this.certificateSelectedIndex,onCertificate:this.handleClickCertificate,onCertificateDetails:this.handleClickCertificateDetails,onUpdate:this.handleClickUpdateCertificates,onCancel:this.handleClickCancel,onContinue:this.handleClickContinue,loading:this.isFetching.certificates==="pending"||this.isFetching.providers==="pending",allowContinue:!!this.certificateSelectedIndex,helpPageLink:this.helpPageLink})};t.prototype.renderProvidersEmpty=function(){return e(y,{onCancel:this.handleClickCancel,helpPageLink:this.helpPageLink})};t.renderUnresolvedStatus=function(){return e(l,{title:"Someting went wrong for status",description:"ERROR"})};t.prototype.render=function(){var t=null;switch(true){case this.isFetching.connectionClientUpdate==="rejected":t=this.renderFortifyClientUpdate();break;case this.isFetching.connectionSupport==="rejected":t=this.renderFortifyNotSupported();break;case this.isFetching.connectionDetect==="rejected":t=this.renderFortifyNotDetected();break;case this.isFetching.connectionApprove==="rejected":t=this.renderChallengeNotApproved();break;case this.isFetching.connectionApprove==="pending"&&!!this.challenge:t=O.renderFortifyAuthorization(this.challenge);break;case this.isFetching.providers==="resolved"&&!this.providers.length:t=this.renderProvidersEmpty();break;case this.isFetching.providers==="pending"&&!!this.providers.length:t=this.renderCertificates();break;case!!this.isFetching.certificates:t=this.renderCertificates();break;case this.isFetching.connectionDetect==="pending":case this.isFetching.connectionSupport==="pending":case this.isFetching.connectionApprove==="pending":case this.isFetching.providers==="pending":t=O.renderConnecting();break;default:t=O.renderUnresolvedStatus()}return e(o,{key:"3562a8b6206f03166ac8a4b8f9b1f034b68f3863"},e(d,{key:"776e9f78f3861691119d8c3b71ef596812570858",hideFooter:this.hideFooter},this.certificateBase64ForDetails&&e("div",{key:"d9579600dbc7d634a0ed3b6043e76d5946186cea",class:"certificate_details",role:"presentation"},e("header",{key:"a431b3d5407e3dbbff8c96d2a5b2a1c71100da0f",class:"certificate_details_header"},e(c,{key:"864d6e0e26c5d85e6a9bd6d7220e4d65914f66ac",onClick:this.handleClickCloseDetails,startIcon:e(k,null)},m("actions.back")),e(n,{key:"96a161ca1a11ef5b31db2400c258f2f06c2ec634",variant:"h5",color:"black"},m("details.title"))),e("div",{key:"20d5b0b9ee8f9c5e77bfe74c076813bb1d955e08",class:"certificate_details_content"},e("peculiar-certificate-viewer",{key:"27f39275e41e94becdf8f4761c1e424219951061",certificate:this.certificateBase64ForDetails}))),t))};return t}());A=new WeakMap;O.style=L}}})); //# sourceMappingURL=p-d5b2c04b.system.entry.js.map