@gataca/qr 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/gat-icon-refresh-751505ff.js +14 -0
  3. package/dist/cjs/gataca-autoqr.cjs.entry.js +88 -0
  4. package/dist/cjs/gataca-qr.cjs.entry.js +175 -0
  5. package/dist/cjs/gataca-qrdisplay_2.cjs.entry.js +219 -0
  6. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +114 -0
  7. package/dist/cjs/gatacaqr.cjs.js +19 -0
  8. package/dist/cjs/index-0b7a1532.js +1410 -0
  9. package/dist/cjs/index.cjs.js +16 -0
  10. package/dist/cjs/loader.cjs.js +21 -0
  11. package/dist/cjs/qr-code-styling-412bbc7a.js +28 -0
  12. package/dist/cjs/utils-383ee834.js +26 -0
  13. package/dist/collection/assets/icons/gat-icon-alert.svg +5 -0
  14. package/dist/collection/assets/icons/gat-icon-check.svg +5 -0
  15. package/dist/collection/assets/icons/gat-icon-refresh.svg +4 -0
  16. package/dist/collection/assets/images/logo_gataca.svg +26 -0
  17. package/dist/collection/collection-manifest.json +17 -0
  18. package/dist/collection/components/gataca-autoqr/gataca-autoqr.css +116 -0
  19. package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +306 -0
  20. package/dist/collection/components/gataca-qr/gataca-qr.css +249 -0
  21. package/dist/collection/components/gataca-qr/gataca-qr.js +557 -0
  22. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +154 -0
  23. package/dist/collection/components/gataca-qrws/gataca-qrws.css +249 -0
  24. package/dist/collection/components/gataca-qrws/gataca-qrws.js +566 -0
  25. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.css +116 -0
  26. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +395 -0
  27. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.css +116 -0
  28. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +410 -0
  29. package/dist/collection/index.js +2 -0
  30. package/dist/collection/utils/index.js +1 -0
  31. package/dist/collection/utils/utils.js +21 -0
  32. package/dist/components/gat-icon-refresh.js +29 -0
  33. package/dist/components/gataca-autoqr.d.ts +11 -0
  34. package/dist/components/gataca-autoqr.js +144 -0
  35. package/dist/components/gataca-qr.d.ts +11 -0
  36. package/dist/components/gataca-qr.js +6 -0
  37. package/dist/components/gataca-qr2.js +211 -0
  38. package/dist/components/gataca-qrdisplay.d.ts +11 -0
  39. package/dist/components/gataca-qrdisplay.js +6 -0
  40. package/dist/components/gataca-qrdisplay2.js +93 -0
  41. package/dist/components/gataca-qrws.d.ts +11 -0
  42. package/dist/components/gataca-qrws.js +6 -0
  43. package/dist/components/gataca-qrws2.js +212 -0
  44. package/dist/components/gataca-ssibutton.d.ts +11 -0
  45. package/dist/components/gataca-ssibutton.js +6 -0
  46. package/dist/components/gataca-ssibutton2.js +100 -0
  47. package/dist/components/gataca-ssibuttonws.d.ts +11 -0
  48. package/dist/components/gataca-ssibuttonws.js +6 -0
  49. package/dist/components/gataca-ssibuttonws2.js +102 -0
  50. package/dist/components/index.d.ts +27 -0
  51. package/dist/components/index.js +8 -0
  52. package/dist/esm/gat-icon-refresh-179ea123.js +9 -0
  53. package/dist/esm/gataca-autoqr.entry.js +84 -0
  54. package/dist/esm/gataca-qr.entry.js +171 -0
  55. package/dist/esm/gataca-qrdisplay_2.entry.js +214 -0
  56. package/dist/esm/gataca-ssibutton_2.entry.js +109 -0
  57. package/dist/esm/gatacaqr.js +17 -0
  58. package/dist/esm/index-19eef502.js +1384 -0
  59. package/dist/esm/index.js +1 -0
  60. package/dist/esm/loader.js +17 -0
  61. package/dist/esm/polyfills/core-js.js +11 -0
  62. package/dist/esm/polyfills/css-shim.js +1 -0
  63. package/dist/esm/polyfills/dom.js +79 -0
  64. package/dist/esm/polyfills/es5-html-element.js +1 -0
  65. package/dist/esm/polyfills/index.js +34 -0
  66. package/dist/esm/polyfills/system.js +6 -0
  67. package/dist/esm/qr-code-styling-0eeb38d5.js +26 -0
  68. package/dist/esm/utils-05ba6c9f.js +23 -0
  69. package/dist/gatacaqr/gatacaqr.esm.js +1 -0
  70. package/dist/gatacaqr/index.esm.js +1 -0
  71. package/dist/gatacaqr/p-0905677f.entry.js +1 -0
  72. package/dist/gatacaqr/p-0be4566d.js +1 -0
  73. package/dist/gatacaqr/p-1d35273f.entry.js +1 -0
  74. package/dist/gatacaqr/p-2f22c7fc.js +1 -0
  75. package/dist/gatacaqr/p-4139a068.entry.js +1 -0
  76. package/dist/gatacaqr/p-a6f85341.js +2 -0
  77. package/dist/gatacaqr/p-b8ba109f.js +1 -0
  78. package/dist/gatacaqr/p-f85d7e76.entry.js +1 -0
  79. package/dist/index.cjs.js +1 -0
  80. package/dist/index.js +1 -0
  81. package/dist/types/components/gataca-autoqr/gataca-autoqr.d.ts +85 -0
  82. package/dist/types/components/gataca-qr/gataca-qr.d.ts +131 -0
  83. package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +35 -0
  84. package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +124 -0
  85. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +114 -0
  86. package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.d.ts +110 -0
  87. package/dist/types/components.d.ts +830 -0
  88. package/dist/types/index.d.ts +2 -0
  89. package/dist/types/stencil-public-runtime.d.ts +1581 -0
  90. package/dist/types/utils/index.d.ts +1 -0
  91. package/dist/types/utils/utils.d.ts +56 -0
  92. package/loader/cdn.js +3 -0
  93. package/loader/index.cjs.js +3 -0
  94. package/loader/index.d.ts +12 -0
  95. package/loader/index.es2017.js +3 -0
  96. package/loader/index.js +4 -0
  97. package/loader/package.json +11 -0
  98. package/package.json +40 -0
  99. package/readme.md +67 -0
@@ -0,0 +1,171 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index-19eef502.js';
2
+ import { g as gatIconCheckSvg, a as gatIconRefreshSvg, b as gatIconAlertSvg, l as logoGatacaSvg } from './gat-icon-refresh-179ea123.js';
3
+ import './qr-code-styling-0eeb38d5.js';
4
+ import { R as RESULT_STATUS, c as checkMobile, b as base64UrlEncode } from './utils-05ba6c9f.js';
5
+
6
+ const gatacaQrCss = "@import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .modal-window{position:relative;border-radius:6px;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;width:300px;min-height:408px;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window p{font-family:\"Work Sans\", \"Helvetica Neue\", sans-serif;font-weight:normal;font-size:12px;letter-spacing:1px;color:#181B5E}.popUpContainer .modal-window .qrTitleContainer{padding:24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-weight:400;font-size:14px;line-height:16.5px;padding-top:12px;padding-bottom:5px;color:#A1A1A1}.popUpContainer .modal-window .bold{font-weight:600}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .reload{height:252px;width:252px;border:1px dashed #A1A1A1;border-radius:12px;position:relative;margin:24px;display:flex;justify-content:center;align-items:center}.popUpContainer #qrwait{display:flex;justify-content:center}.popUpContainer #qrwait,.popUpContainer #notify{width:100%;height:100%;top:0;left:0;border-radius:20px}.popUpContainer #notify{z-index:10;background-color:gray;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;align-self:center;display:flex;flex-direction:column;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;background:rgba(255, 255, 255, 0.9);}.popUpContainer .notify-text{font-family:\"Work Sans\";font-style:normal;font-weight:400;font-size:14px;line-height:16px;text-align:center;font-feature-settings:\"salt\" on;color:#8B8B8B;flex:none;order:1;align-self:stretch;flex-grow:0}.popUpContainer .alert{display:flex;flex-direction:row;align-items:center;justify-content:start;width:252px;position:absolute;bottom:0;background:#FFE5E5;border-radius:12px}.popUpContainer .alert img{margin:12px}.popUpContainer .alert p{font-weight:400;font-size:14px;line-height:16px;color:black}.popUpContainer .success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.popUpContainer .success .successMsg{margin-top:20px;font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}";
7
+
8
+ const DEEP_LINK_PREFIX = "https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link=";
9
+ //Default values
10
+ const DEFAULT_SESSION_TIMEOUT = 300; //5mins as in connect
11
+ const DEFAULT_POLLING_FREQ = 3;
12
+ const QR_ROLE_CONNECT = "connect";
13
+ const FUNCTION_ROLES = {
14
+ connect: "scan",
15
+ certify: "credential",
16
+ };
17
+ const GatacaQR = class {
18
+ constructor(hostRef) { registerInstance(this, hostRef); this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7); this.checkStatus = undefined; this.createSession = undefined; this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.callbackServer = undefined; this.autostart = true; this.autorefresh = false; this.v2 = false; this.qrModalTitle = "Quick Access"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideBrandTitle = false; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.pollingFrequency = DEFAULT_POLLING_FREQ; this.dynamicLink = true; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = RESULT_STATUS.NOT_STARTED; }
19
+ disconnectedCallback() {
20
+ this.stop();
21
+ }
22
+ async componentDidLoad() {
23
+ if (this.autostart) {
24
+ await this.display();
25
+ }
26
+ }
27
+ /**
28
+ * Force manually the display of a QR
29
+ */
30
+ async display() {
31
+ await this.getSessionId();
32
+ this.result = RESULT_STATUS.ONGOING;
33
+ this.poll()
34
+ .then((data) => {
35
+ this.result = RESULT_STATUS.SUCCESS;
36
+ this.sessionData = data;
37
+ this.gatacaLoginCompleted.emit(data);
38
+ this.successCallback(data);
39
+ })
40
+ .catch((err) => {
41
+ this.clean();
42
+ let expired = err === RESULT_STATUS.EXPIRED;
43
+ if (expired && this.autorefresh) {
44
+ this.display();
45
+ }
46
+ else {
47
+ if (err !== RESULT_STATUS.NOT_STARTED) {
48
+ let error = expired
49
+ ? new Error("User did not scan the QR in the alloted time")
50
+ : new Error("Provided user credentials couldn't be validated");
51
+ this.result = err;
52
+ this.gatacaLoginFailed.emit(error);
53
+ this.errorCallback(error);
54
+ }
55
+ }
56
+ });
57
+ if (checkMobile() && this.dynamicLink) {
58
+ window.location.href = this.getLink();
59
+ }
60
+ }
61
+ /**
62
+ * Stop manually an ongoing session
63
+ */
64
+ async stop() {
65
+ this.clean();
66
+ if (this.result === RESULT_STATUS.ONGOING) {
67
+ this.result = RESULT_STATUS.NOT_STARTED;
68
+ }
69
+ }
70
+ clean() {
71
+ this.sessionData = undefined;
72
+ this.sessionId = undefined;
73
+ }
74
+ /**
75
+ * Retrieve manually the session data on a successful login
76
+ */
77
+ async getSessionData() {
78
+ return this.sessionData
79
+ ? Promise.resolve(this.sessionData)
80
+ : Promise.reject(new Error("No successful login"));
81
+ }
82
+ async getSessionId() {
83
+ if (this.sessionId) {
84
+ return this.sessionId;
85
+ }
86
+ let { sessionId, authenticationRequest } = await this.createSession();
87
+ this.sessionId = sessionId;
88
+ this.authenticationRequest = authenticationRequest;
89
+ return this.sessionId;
90
+ }
91
+ getLink() {
92
+ if (this.v2 && this.qrRole == QR_ROLE_CONNECT) {
93
+ return this.authenticationRequest;
94
+ }
95
+ let op = FUNCTION_ROLES[this.qrRole];
96
+ let link = "https://gataca.page.link/" + op + "?";
97
+ link +=
98
+ this.qrRole === QR_ROLE_CONNECT
99
+ ? "session=" + this.sessionId
100
+ : "process=" + this.sessionId;
101
+ link +=
102
+ "&callback=" + base64UrlEncode(encodeURIComponent(this.callbackServer));
103
+ link = encodeURIComponent(link);
104
+ return this.dynamicLink ? DEEP_LINK_PREFIX + link : link;
105
+ }
106
+ async poll() {
107
+ let endTime = new Date().getTime() +
108
+ (this.sessionTimeout || DEFAULT_SESSION_TIMEOUT) * 1000;
109
+ let interval = (this.pollingFrequency || DEFAULT_POLLING_FREQ) * 1000;
110
+ let checkFunc = async (component) => {
111
+ if (component.result === RESULT_STATUS.NOT_STARTED) {
112
+ return { result: RESULT_STATUS.NOT_STARTED };
113
+ }
114
+ let id = await component.getSessionId();
115
+ return component.checkStatus(id);
116
+ };
117
+ let component = this;
118
+ let checkCondition = async function (resolve, reject) {
119
+ // If the condition is met, we're done!
120
+ let { result, data } = await checkFunc(component);
121
+ switch (result) {
122
+ case RESULT_STATUS.SUCCESS:
123
+ resolve(data);
124
+ break;
125
+ case RESULT_STATUS.ONGOING:
126
+ if (component.sessionTimeout > 0 && new Date().getTime() < endTime) {
127
+ setTimeout(checkCondition, interval, resolve, reject);
128
+ }
129
+ else {
130
+ reject(RESULT_STATUS.EXPIRED);
131
+ }
132
+ break;
133
+ default:
134
+ reject(result);
135
+ break;
136
+ }
137
+ };
138
+ return new Promise(checkCondition);
139
+ }
140
+ renderQRSection() {
141
+ switch (this.result) {
142
+ case RESULT_STATUS.NOT_STARTED:
143
+ return this.renderRetryButton();
144
+ case RESULT_STATUS.ONGOING:
145
+ return this.renderQR(this.getLink(), 300, true);
146
+ case RESULT_STATUS.EXPIRED:
147
+ return this.renderRetryButton("QR Code expired");
148
+ case RESULT_STATUS.FAILED:
149
+ return this.renderRetryButton("User credentials not validated");
150
+ case RESULT_STATUS.SUCCESS:
151
+ return this.renderSuccess();
152
+ }
153
+ }
154
+ renderSuccess() {
155
+ return (h("div", { class: "success" }, h("img", { src: gatIconCheckSvg, height: 52, width: 52 }), h("p", { class: "successMsg" }, "Successful Connection!")));
156
+ }
157
+ renderRetryButton(errorMessage) {
158
+ return (h("div", { class: "reload" }, h("div", { id: "notify", onClick: () => this.display() }, h("img", { src: gatIconRefreshSvg, height: 24, width: 24 }), h("p", { class: "qrDescription" }, "Click inside the box to "), errorMessage ? (h("p", { class: "qrDescription bold" }, "Refresh QR Code")) : (h("p", { class: "qrDescription bold" }, "Scan QR Code")), errorMessage && (h("div", { class: "alert" }, h("img", { src: gatIconAlertSvg, height: 24, width: 24 }), h("p", null, errorMessage)))), h("div", { id: "qrwait" }, this.renderQR("waiting to start a session", 250))));
159
+ }
160
+ renderQR(value, size, useLogo) {
161
+ return (h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0 }));
162
+ }
163
+ render() {
164
+ return (h("div", { class: "popUpContainer" }, h("div", { class: "modal-window is-visible", onClick: (event) => {
165
+ event.stopPropagation();
166
+ } }, h("div", { class: "modal-window__content" }, h("div", { class: "qrTitleContainer" }, h("p", { class: "qrTitle" }, this.qrModalTitle), !this.hideBrandTitle && (h("p", { class: "qrBrand" }, "by Gataca", " ", h("span", null, h("img", { src: logoGatacaSvg })))), this.result !== RESULT_STATUS.SUCCESS && (h("p", { class: "qrDescription" }, this.qrModalDescription))), h("div", { class: "qrSection" }, this.renderQRSection())))));
167
+ }
168
+ };
169
+ GatacaQR.style = gatacaQrCss;
170
+
171
+ export { GatacaQR as gataca_qr };
@@ -0,0 +1,214 @@
1
+ import { r as registerInstance, h, c as createEvent } from './index-19eef502.js';
2
+ import { Q as QRCodeStyling } from './qr-code-styling-0eeb38d5.js';
3
+ import { l as logoGatacaSvg, g as gatIconCheckSvg, a as gatIconRefreshSvg, b as gatIconAlertSvg } from './gat-icon-refresh-179ea123.js';
4
+ import { R as RESULT_STATUS, c as checkMobile, b as base64UrlEncode } from './utils-05ba6c9f.js';
5
+
6
+ const GatacaQRDisplay = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.qrData = undefined;
10
+ this.size = 256;
11
+ this.logoSize = 0;
12
+ this.logoSrc = undefined;
13
+ this.qrColor = "#181B5E";
14
+ this.rounded = true;
15
+ }
16
+ componentDidLoad() {
17
+ const qrCode = new QRCodeStyling({
18
+ data: this.qrData,
19
+ width: this.size,
20
+ height: this.size,
21
+ image: this.logoSize > 0 ? this.logoSrc || logoGatacaSvg : undefined,
22
+ margin: 10,
23
+ type: "svg",
24
+ dotsOptions: {
25
+ color: this.qrColor,
26
+ type: this.rounded ? "dots" : "square",
27
+ },
28
+ cornersSquareOptions: {
29
+ type: this.rounded ? "extra-rounded" : "square",
30
+ },
31
+ cornersDotOptions: {
32
+ type: this.rounded ? "dot" : "square",
33
+ },
34
+ imageOptions: {
35
+ margin: 2,
36
+ imageSize: this.logoSize,
37
+ },
38
+ });
39
+ qrCode.append(this.qr);
40
+ }
41
+ render() {
42
+ return (h("div", { ref: (el) => {
43
+ this.qr = el;
44
+ } }));
45
+ }
46
+ };
47
+
48
+ const gatacaQrwsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .modal-window{position:relative;border-radius:6px;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;width:300px;min-height:408px;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window p{font-family:\"Work Sans\", \"Helvetica Neue\", sans-serif;font-weight:normal;font-size:12px;letter-spacing:1px;color:#181B5E}.popUpContainer .modal-window .qrTitleContainer{padding:24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-weight:400;font-size:14px;line-height:16.5px;padding-top:12px;padding-bottom:5px;color:#A1A1A1}.popUpContainer .modal-window .bold{font-weight:600}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .reload{height:252px;width:252px;border:1px dashed #A1A1A1;border-radius:12px;position:relative;margin:24px;display:flex;justify-content:center;align-items:center}.popUpContainer #qrwait{display:flex;justify-content:center}.popUpContainer #qrwait,.popUpContainer #notify{width:100%;height:100%;top:0;left:0;border-radius:20px}.popUpContainer #notify{z-index:10;background-color:gray;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;align-self:center;display:flex;flex-direction:column;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;background:rgba(255, 255, 255, 0.9);}.popUpContainer .notify-text{font-family:\"Work Sans\";font-style:normal;font-weight:400;font-size:14px;line-height:16px;text-align:center;font-feature-settings:\"salt\" on;color:#8B8B8B;flex:none;order:1;align-self:stretch;flex-grow:0}.popUpContainer .alert{display:flex;flex-direction:row;align-items:center;justify-content:start;width:252px;position:absolute;bottom:0;background:#FFE5E5;border-radius:12px}.popUpContainer .alert img{margin:12px}.popUpContainer .alert p{font-weight:400;font-size:14px;line-height:16px;color:black}.popUpContainer .success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.popUpContainer .success .successMsg{margin-top:20px;font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}";
49
+
50
+ const DEEP_LINK_PREFIX = "https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link=";
51
+ const DEFAULT_SESSION_TIMEOUT = 300;
52
+ const QR_ROLE_CONNECT = "connect";
53
+ const FUNCTION_ROLES = {
54
+ connect: "scan",
55
+ certify: "credential",
56
+ };
57
+ const GatacaQRWS = class {
58
+ constructor(hostRef) { registerInstance(this, hostRef); this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7); this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7); this.successCallback = undefined; this.errorCallback = undefined; this.qrRole = undefined; this.callbackServer = undefined; this.socketEndpoint = undefined; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT; this.wsOnOpen = undefined; this.wsOnMessage = undefined; this.autostart = true; this.autorefresh = false; this.v2 = false; this.qrModalTitle = "Quick Access"; this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet"; this.hideBrandTitle = false; this.dynamicLink = true; this.sessionId = undefined; this.authenticationRequest = undefined; this.sessionData = undefined; this.result = RESULT_STATUS.NOT_STARTED; }
59
+ disconnectedCallback() {
60
+ this.stop();
61
+ }
62
+ async componentDidLoad() {
63
+ if (this.autostart) {
64
+ await this.display();
65
+ }
66
+ }
67
+ /**
68
+ * Force manually the display of a QR
69
+ */
70
+ async display() {
71
+ let socket = new WebSocket(this.socketEndpoint);
72
+ setTimeout(() => {
73
+ this.socket.close(1000, "");
74
+ }, 1000 * this.sessionTimeout);
75
+ this.socket = socket;
76
+ socket.onopen = () => {
77
+ if (this.wsOnOpen)
78
+ this.wsOnOpen(this.socket);
79
+ };
80
+ socket.onmessage = (msg) => {
81
+ if (this.wsOnMessage) {
82
+ this.wsOnMessage(this.socket, msg);
83
+ }
84
+ else {
85
+ let wsresp = JSON.parse(msg.data);
86
+ if (!!wsresp.sessionId) {
87
+ this.handleWSResponse(wsresp);
88
+ }
89
+ }
90
+ };
91
+ socket.onerror = () => {
92
+ let error = new Error("Error connecting with server");
93
+ this.result = RESULT_STATUS.FAILED;
94
+ this.gatacaLoginFailed.emit(error);
95
+ this.errorCallback(error);
96
+ socket.close(1000, "");
97
+ };
98
+ socket.onclose = () => {
99
+ if (this.result === RESULT_STATUS.ONGOING) {
100
+ this.result = RESULT_STATUS.EXPIRED;
101
+ }
102
+ if (this.result === RESULT_STATUS.EXPIRED) {
103
+ if (this.autorefresh) {
104
+ this.display();
105
+ }
106
+ else {
107
+ let error = new Error("User did not scan the QR in the alloted time");
108
+ this.gatacaLoginFailed.emit(error);
109
+ this.errorCallback(error);
110
+ }
111
+ }
112
+ };
113
+ if (checkMobile() && this.dynamicLink) {
114
+ window.location.href = this.getLink();
115
+ }
116
+ }
117
+ sessionMsgReceived(event) {
118
+ let wsresp = event.detail;
119
+ this.handleWSResponse(wsresp);
120
+ }
121
+ handleWSResponse(wsresp) {
122
+ this.result = wsresp.result;
123
+ switch (wsresp.result) {
124
+ case RESULT_STATUS.ONGOING:
125
+ this.sessionId = wsresp.sessionId;
126
+ this.authenticationRequest = wsresp.authenticationRequest;
127
+ break;
128
+ case RESULT_STATUS.SUCCESS:
129
+ this.sessionData = wsresp.authenticatedUserData;
130
+ this.gatacaLoginCompleted.emit(wsresp.authenticatedUserData);
131
+ this.successCallback(wsresp.authenticatedUserData);
132
+ this.socket.close(1000, "");
133
+ break;
134
+ case RESULT_STATUS.FAILED:
135
+ this.socket.close();
136
+ let error = new Error("Provided user credentials couldn't be validated");
137
+ this.gatacaLoginFailed.emit(error);
138
+ this.errorCallback(error);
139
+ break;
140
+ case RESULT_STATUS.EXPIRED:
141
+ this.socket.close();
142
+ if (this.autorefresh) {
143
+ this.display();
144
+ }
145
+ else {
146
+ let error = new Error("User did not scan the QR in the alloted time");
147
+ this.gatacaLoginFailed.emit(error);
148
+ this.errorCallback(error);
149
+ }
150
+ }
151
+ }
152
+ /**
153
+ * Stop manually an ongoing session
154
+ */
155
+ async stop() {
156
+ this.sessionData = undefined;
157
+ this.sessionId = undefined;
158
+ this.socket.close(1000, "Client stopped the connection");
159
+ }
160
+ /**
161
+ * Retrieve manually the session data on a successful login
162
+ */
163
+ async getSessionData() {
164
+ return this.sessionData
165
+ ? Promise.resolve(this.sessionData)
166
+ : Promise.reject(new Error("No successful login"));
167
+ }
168
+ getLink() {
169
+ if (this.v2 && this.qrRole == QR_ROLE_CONNECT) {
170
+ return this.authenticationRequest;
171
+ }
172
+ let op = FUNCTION_ROLES[this.qrRole];
173
+ let link = "https://gataca.page.link/" + op + "?";
174
+ link +=
175
+ this.qrRole === QR_ROLE_CONNECT
176
+ ? "session=" + this.sessionId
177
+ : "process=" + this.sessionId;
178
+ link +=
179
+ "&callback=" + base64UrlEncode(encodeURIComponent(this.callbackServer));
180
+ link = encodeURIComponent(link);
181
+ return this.dynamicLink ? DEEP_LINK_PREFIX + link : link;
182
+ }
183
+ renderQRSection() {
184
+ switch (this.result) {
185
+ case RESULT_STATUS.NOT_STARTED:
186
+ return this.renderRetryButton();
187
+ case RESULT_STATUS.ONGOING:
188
+ return this.renderQR(this.getLink(), 300, true);
189
+ case RESULT_STATUS.EXPIRED:
190
+ return this.renderRetryButton("QR Code expired");
191
+ case RESULT_STATUS.FAILED:
192
+ return this.renderRetryButton("User credentials not validated");
193
+ case RESULT_STATUS.SUCCESS:
194
+ return this.renderSuccess();
195
+ }
196
+ }
197
+ renderSuccess() {
198
+ return (h("div", { class: "success" }, h("img", { src: gatIconCheckSvg, height: 52, width: 52 }), h("p", { class: "successMsg" }, "Successful Connection!")));
199
+ }
200
+ renderRetryButton(errorMessage) {
201
+ return (h("div", { class: "reload" }, h("div", { id: "notify", onClick: () => this.display() }, h("img", { src: gatIconRefreshSvg, height: 24, width: 24 }), h("p", { class: "qrDescription" }, "Click inside the box to "), errorMessage ? (h("p", { class: "qrDescription bold" }, "Refresh QR Code")) : (h("p", { class: "qrDescription bold" }, "Scan QR Code")), errorMessage && (h("div", { class: "alert" }, h("img", { src: gatIconAlertSvg, height: 24, width: 24 }), h("p", null, errorMessage)))), h("div", { id: "qrwait" }, this.renderQR("waiting to start a session", 250))));
202
+ }
203
+ renderQR(value, size, useLogo) {
204
+ return (h("gataca-qrdisplay", { qrData: value, rounded: true, size: size, "logo-size": useLogo ? 0.33 : 0 }));
205
+ }
206
+ render() {
207
+ return (h("div", { class: "popUpContainer" }, h("div", { class: "modal-window is-visible", onClick: (event) => {
208
+ event.stopPropagation();
209
+ } }, h("div", { class: "modal-window__content" }, h("div", { class: "qrTitleContainer" }, h("p", { class: "qrTitle" }, this.qrModalTitle), !this.hideBrandTitle && (h("p", { class: "qrBrand" }, "by Gataca", " ", h("span", null, h("img", { src: logoGatacaSvg })))), this.result !== RESULT_STATUS.SUCCESS && (h("p", { class: "qrDescription" }, this.qrModalDescription))), h("div", { class: "qrSection" }, this.renderQRSection())))));
210
+ }
211
+ };
212
+ GatacaQRWS.style = gatacaQrwsCss;
213
+
214
+ export { GatacaQRDisplay as gataca_qrdisplay, GatacaQRWS as gataca_qrws };
@@ -0,0 +1,109 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index-19eef502.js';
2
+ import './qr-code-styling-0eeb38d5.js';
3
+
4
+ const gatacaSsibuttonCss = "@import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:\"Work Sans\", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:\"Helvetica Neue\", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}";
5
+
6
+ const PHONE_ICON$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAYAAACN1PRVAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHvSURBVHgB3ZZPTttAFMbfe3YjL7qYLopcpZXSG7Q3CDfIsqrSJpyg5QQtJ2h7glgUdVs4AeEE5AYEQSDAgtnw357Hm0hAQDaeIRFCfFKyeKPxzzPzvc+DUKCZN80GEv1ABgWOQgSdGbOwv7u0nDueV4zjTzUIKhuAZna4vdQFR828azbI0K/TI/qodaLvjlP+tLDGDCs+IKv9Lbsi7kcv0w9541Q0EREPYcoieEQ9KiyECRXHzbpBUOcnYTfPFOOaaGVx9WsLiDrSIp0iU0wFNgIx/AQyc9I/OmOjy+Y8aBvHQcDUYebewc6/Xtk8J5htcg5efEPGhk0JtqkyBjo7DuZcnuO2sqCyKv8rUDmfTS9IBURqBAL+I6CkzBjOMOs22TLY21n8fl17KzXR3uDvb/CQk0GEdfvN07QvpnAOaGfYaRT25JzU6+rnG2tTpcWAy+Cp0m3U/URLms8HWfg/rn6RFaGSs9KQkZMpvGBWNs2Vandt46ac6YNBuc0fDLMaOU5DFybQ8039p/KJ4bq4rwPewtqoM/1gsCm/NfBXvWjgHhhuDAeLyd3qVSifHQULeZkou9EqemLhmUmav8qrZ4GEMGA7ivzjKvfeqGptFV2YdWPMPHHq0cCh3DdpVdLl/XCY9J1gVvbCiWa6N+JLocPFjCsx9cAAAAAASUVORK5CYII=";
7
+ const GatacaSSIButton = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7);
11
+ this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7);
12
+ this.buttonText = "Easy login";
13
+ this.checkStatus = undefined;
14
+ this.createSession = undefined;
15
+ this.successCallback = undefined;
16
+ this.errorCallback = undefined;
17
+ this.qrRole = undefined;
18
+ this.callbackServer = undefined;
19
+ this.sessionTimeout = undefined;
20
+ this.pollingFrequency = undefined;
21
+ this.autorefresh = false;
22
+ this.v2 = false;
23
+ this.qrModalTitle = "Quick Access";
24
+ this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
25
+ this.hideBrandTitle = false;
26
+ this.dynamicLink = true;
27
+ this.open = false;
28
+ this.qr = (h("gataca-qr", { checkStatus: this.checkStatus, createSession: this.createSession, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, pollingFrequency: this.pollingFrequency, autostart: true, autorefresh: this.autorefresh, v2: this.v2, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink }));
29
+ }
30
+ /**
31
+ * Retrieve manually the session data on a successful login
32
+ */
33
+ async getSessionData() {
34
+ return this.qr.getSessionData();
35
+ }
36
+ renderModal() {
37
+ return this.qr;
38
+ }
39
+ renderButton() {
40
+ return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
41
+ this.open = !this.open;
42
+ if (this.open) {
43
+ this.qr.display();
44
+ }
45
+ else {
46
+ this.qr.stop();
47
+ }
48
+ } }, h("img", { src: PHONE_ICON$1, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
49
+ }
50
+ render() {
51
+ return (h("div", { class: "buttonContainer" }, this.renderButton(), this.open && this.renderModal()));
52
+ }
53
+ };
54
+ GatacaSSIButton.style = gatacaSsibuttonCss;
55
+
56
+ const gatacaSsibuttonwsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:\"Work Sans\", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:\"Helvetica Neue\", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}";
57
+
58
+ const PHONE_ICON = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAYAAACN1PRVAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHvSURBVHgB3ZZPTttAFMbfe3YjL7qYLopcpZXSG7Q3CDfIsqrSJpyg5QQtJ2h7glgUdVs4AeEE5AYEQSDAgtnw357Hm0hAQDaeIRFCfFKyeKPxzzPzvc+DUKCZN80GEv1ABgWOQgSdGbOwv7u0nDueV4zjTzUIKhuAZna4vdQFR828azbI0K/TI/qodaLvjlP+tLDGDCs+IKv9Lbsi7kcv0w9541Q0EREPYcoieEQ9KiyECRXHzbpBUOcnYTfPFOOaaGVx9WsLiDrSIp0iU0wFNgIx/AQyc9I/OmOjy+Y8aBvHQcDUYebewc6/Xtk8J5htcg5efEPGhk0JtqkyBjo7DuZcnuO2sqCyKv8rUDmfTS9IBURqBAL+I6CkzBjOMOs22TLY21n8fl17KzXR3uDvb/CQk0GEdfvN07QvpnAOaGfYaRT25JzU6+rnG2tTpcWAy+Cp0m3U/URLms8HWfg/rn6RFaGSs9KQkZMpvGBWNs2Vandt46ac6YNBuc0fDLMaOU5DFybQ8039p/KJ4bq4rwPewtqoM/1gsCm/NfBXvWjgHhhuDAeLyd3qVSifHQULeZkou9EqemLhmUmav8qrZ4GEMGA7ivzjKvfeqGptFV2YdWPMPHHq0cCh3DdpVdLl/XCY9J1gVvbCiWa6N+JLocPFjCsx9cAAAAAASUVORK5CYII=";
59
+ const GatacaSSIButtonWS = class {
60
+ constructor(hostRef) {
61
+ registerInstance(this, hostRef);
62
+ this.gatacaLoginCompleted = createEvent(this, "gatacaLoginCompleted", 7);
63
+ this.gatacaLoginFailed = createEvent(this, "gatacaLoginFailed", 7);
64
+ this.buttonText = "Easy login";
65
+ this.successCallback = undefined;
66
+ this.errorCallback = undefined;
67
+ this.qrRole = undefined;
68
+ this.callbackServer = undefined;
69
+ this.socketEndpoint = undefined;
70
+ this.sessionTimeout = undefined;
71
+ this.wsOnOpen = undefined;
72
+ this.wsOnMessage = undefined;
73
+ this.autostart = true;
74
+ this.autorefresh = false;
75
+ this.v2 = false;
76
+ this.qrModalTitle = "Quick Access";
77
+ this.qrModalDescription = "Sign up or sign in by scanning the QR Code with the Gataca Wallet";
78
+ this.hideBrandTitle = false;
79
+ this.dynamicLink = true;
80
+ this.open = false;
81
+ this.qr = (h("gataca-qrws", { wsOnMessage: this.wsOnMessage, wsOnOpen: this.wsOnOpen, successCallback: this.successCallback, errorCallback: this.errorCallback, qrRole: this.qrRole, callbackServer: this.callbackServer, sessionTimeout: this.sessionTimeout, socketEndpoint: this.socketEndpoint, autostart: true, autorefresh: this.autorefresh, v2: this.v2, qrModalTitle: this.qrModalTitle, qrModalDescription: this.qrModalDescription, hideBrandTitle: this.hideBrandTitle, dynamicLink: this.dynamicLink }));
82
+ }
83
+ /**
84
+ * Retrieve manually the session data on a successful login
85
+ */
86
+ async getSessionData() {
87
+ return this.qr.getSessionData();
88
+ }
89
+ renderModal() {
90
+ return this.qr;
91
+ }
92
+ renderButton() {
93
+ return (h("div", { class: "gatacaButtonWrapper" }, h("button", { class: "gatacaButton", onClick: () => {
94
+ this.open = !this.open;
95
+ if (this.open) {
96
+ this.qr.display();
97
+ }
98
+ else {
99
+ this.qr.stop();
100
+ }
101
+ } }, h("img", { src: PHONE_ICON, class: "buttonImg", alt: this.buttonText }), h("span", null, this.buttonText))));
102
+ }
103
+ render() {
104
+ return (h("div", { class: "buttonContainer" }, this.renderButton(), this.open && this.renderModal()));
105
+ }
106
+ };
107
+ GatacaSSIButtonWS.style = gatacaSsibuttonwsCss;
108
+
109
+ export { GatacaSSIButton as gataca_ssibutton, GatacaSSIButtonWS as gataca_ssibuttonws };
@@ -0,0 +1,17 @@
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-19eef502.js';
2
+
3
+ /*
4
+ Stencil Client Patch Browser v2.19.3 | MIT Licensed | https://stenciljs.com
5
+ */
6
+ const patchBrowser = () => {
7
+ const importMeta = import.meta.url;
8
+ const opts = {};
9
+ if (importMeta !== '') {
10
+ opts.resourcesUrl = new URL('.', importMeta).href;
11
+ }
12
+ return promiseResolve(opts);
13
+ };
14
+
15
+ patchBrowser().then(options => {
16
+ return bootstrapLazy([["gataca-qrdisplay_2",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]],[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"rounded":[4]}]]],["gataca-qr",[[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]}]]],["gataca-ssibutton_2",[[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}],[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}]]],["gataca-autoqr",[[1,"gataca-autoqr",{"configId":[1,"config-id"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
17
+ });