@syncfy/authentication-widget 2.1.1 → 2.2.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.
@@ -2466,6 +2466,7 @@ const configValidator = yup.object().noUnknown().shape({
2466
2466
  displayBusinessSites: yup.boolean(),
2467
2467
  displayCredentialInModal: yup.boolean(),
2468
2468
  displayErrorsInToast: yup.boolean(),
2469
+ displayFullSiteList: yup.boolean(),
2469
2470
  displayLogoImages: yup.boolean(),
2470
2471
  displayLongDescription: yup.boolean(),
2471
2472
  displayPersonalSites: yup.boolean(),
@@ -2586,9 +2587,9 @@ const paramsValidator = yup.object().shape({
2586
2587
  }).strict().noUnknown();
2587
2588
  let __VERSION__ = {
2588
2589
  "git": {
2589
- "hash": "gf071d3a",
2590
+ "hash": "g94d4e81",
2590
2591
  "distance": 0,
2591
- "tag": "v2.1.1"
2592
+ "tag": "v2.2.0"
2592
2593
  }
2593
2594
  };
2594
2595
  function getVersion() {
@@ -3680,21 +3681,21 @@ function getSantanderWebSocketScript() {
3680
3681
  };
3681
3682
  });
3682
3683
  }
3683
- const _hoisted_1$c = {
3684
+ const _hoisted_1$d = {
3684
3685
  key: 0,
3685
3686
  width: "30",
3686
3687
  height: "28",
3687
3688
  fill: "none",
3688
3689
  xmlns: "http://www.w3.org/2000/svg"
3689
3690
  };
3690
- const _hoisted_2$a = {
3691
+ const _hoisted_2$b = {
3691
3692
  key: 1,
3692
3693
  xmlns: "http://www.w3.org/2000/svg",
3693
3694
  width: "23",
3694
3695
  height: "23",
3695
3696
  fill: "none"
3696
3697
  };
3697
- const _hoisted_3$7 = {
3698
+ const _hoisted_3$8 = {
3698
3699
  key: 2,
3699
3700
  xmlns: "http://www.w3.org/2000/svg",
3700
3701
  viewBox: "0 0 50 50"
@@ -3772,7 +3773,7 @@ const _hoisted_11 = {
3772
3773
  "stroke-width": "1.5",
3773
3774
  "xmlns:v": "https://vecta.io/nano"
3774
3775
  };
3775
- const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
3776
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
3776
3777
  __name: "CustomIcon",
3777
3778
  props: {
3778
3779
  icon: {}
@@ -3780,7 +3781,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
3780
3781
  setup(__props) {
3781
3782
  const props = __props;
3782
3783
  return (_ctx, _cache) => {
3783
- return props.icon === "back" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$c, _cache[0] || (_cache[0] = [
3784
+ return props.icon === "back" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$d, _cache[0] || (_cache[0] = [
3784
3785
  vue.createElementVNode("path", {
3785
3786
  d: "M2 14.219h26.5M2 13.781 13.781 2M2 14.219 13.781 26",
3786
3787
  stroke: "#000",
@@ -3788,7 +3789,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
3788
3789
  "stroke-linecap": "round",
3789
3790
  "stroke-linejoin": "round"
3790
3791
  }, null, -1)
3791
- ]))) : props.icon === "close" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$a, _cache[1] || (_cache[1] = [
3792
+ ]))) : props.icon === "close" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$b, _cache[1] || (_cache[1] = [
3792
3793
  vue.createElementVNode("path", {
3793
3794
  d: "m2 2 18.738 18.738M2.12 21.107 20.857 2.37",
3794
3795
  stroke: "#000",
@@ -3796,7 +3797,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
3796
3797
  "stroke-linecap": "round",
3797
3798
  "stroke-linejoin": "round"
3798
3799
  }, null, -1)
3799
- ]))) : props.icon === "error" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_3$7, _cache[2] || (_cache[2] = [
3800
+ ]))) : props.icon === "error" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_3$8, _cache[2] || (_cache[2] = [
3800
3801
  vue.createElementVNode("circle", {
3801
3802
  cx: "25",
3802
3803
  cy: "25",
@@ -3867,8 +3868,8 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
3867
3868
  };
3868
3869
  }
3869
3870
  });
3870
- const _hoisted_1$b = ["src"];
3871
- const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
3871
+ const _hoisted_1$c = ["src"];
3872
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
3872
3873
  __name: "AppLoader",
3873
3874
  props: {
3874
3875
  avatar: { default: void 0 },
@@ -3915,8 +3916,8 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
3915
3916
  width: "1",
3916
3917
  height: "1",
3917
3918
  onLoad: _cache[0] || (_cache[0] = () => emit("imagesLoaded"))
3918
- }, null, 40, _hoisted_1$b)) : vue.createCommentVNode("", true),
3919
- _ctx.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$i, {
3919
+ }, null, 40, _hoisted_1$c)) : vue.createCommentVNode("", true),
3920
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$j, {
3920
3921
  key: 1,
3921
3922
  icon: _ctx.icon
3922
3923
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true)
@@ -3941,7 +3942,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
3941
3942
  }
3942
3943
  });
3943
3944
  const loader = "pb-w-sync_loader";
3944
- const style0$g = {
3945
+ const style0$h = {
3945
3946
  loader,
3946
3947
  "loader-container-animation": "pb-w-sync_loader-container-animation",
3947
3948
  "loader-clip-animation": "pb-w-sync_loader-clip-animation",
@@ -3966,12 +3967,12 @@ const _export_sfc = (sfc, props) => {
3966
3967
  }
3967
3968
  return target;
3968
3969
  };
3969
- const cssModules$g = {
3970
- "$style": style0$g
3970
+ const cssModules$h = {
3971
+ "$style": style0$h
3971
3972
  };
3972
- const AppLoader = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__cssModules", cssModules$g]]);
3973
- const _hoisted_1$a = ["disabled"];
3974
- const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
3973
+ const AppLoader = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__cssModules", cssModules$h]]);
3974
+ const _hoisted_1$b = ["disabled"];
3975
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
3975
3976
  __name: "AccountsSelection",
3976
3977
  props: {
3977
3978
  avatar: { default: void 0 },
@@ -4165,7 +4166,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
4165
4166
  "data-testid": "accounts-button",
4166
4167
  disabled: _ctx.buttonDisabledStyle && isInvalid.value,
4167
4168
  type: "submit"
4168
- }, vue.toDisplayString(vue.unref(t)("accounts_selection.done")), 9, _hoisted_1$a)
4169
+ }, vue.toDisplayString(vue.unref(t)("accounts_selection.done")), 9, _hoisted_1$b)
4169
4170
  ]),
4170
4171
  _: 1
4171
4172
  }, 8, ["class", "autocomplete", "disabled", "model", "rules"])),
@@ -4184,7 +4185,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
4184
4185
  };
4185
4186
  }
4186
4187
  });
4187
- const style0$f = {
4188
+ const style0$g = {
4188
4189
  "accounts-balance": "pb-w-sync_accounts-balance",
4189
4190
  "accounts-checkbox": "pb-w-sync_accounts-checkbox",
4190
4191
  "accounts-checkbox-content": "pb-w-sync_accounts-checkbox-content",
@@ -4195,11 +4196,11 @@ const style0$f = {
4195
4196
  "accounts-selection": "pb-w-sync_accounts-selection",
4196
4197
  "accounts-api-error": "pb-w-sync_accounts-api-error"
4197
4198
  };
4198
- const cssModules$f = {
4199
- "$style": style0$f
4199
+ const cssModules$g = {
4200
+ "$style": style0$g
4200
4201
  };
4201
- const AccountsSelection = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__cssModules", cssModules$f]]);
4202
- const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
4202
+ const AccountsSelection = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__cssModules", cssModules$g]]);
4203
+ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
4203
4204
  __name: "FinalResponse",
4204
4205
  props: {
4205
4206
  avatar: {},
@@ -4245,127 +4246,21 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
4245
4246
  };
4246
4247
  }
4247
4248
  });
4248
- const style0$e = {
4249
+ const style0$f = {
4249
4250
  "final-response-container": "pb-w-sync_final-response-container"
4250
4251
  };
4251
- const cssModules$e = {
4252
- "$style": style0$e
4253
- };
4254
- const FinalResponse = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__cssModules", cssModules$e]]);
4255
- const _hoisted_1$9 = ["src"];
4256
- const _hoisted_2$9 = ["src"];
4257
- const _hoisted_3$6 = ["onClick"];
4258
- const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
4259
- __name: "InstitutionFilters",
4260
- props: {
4261
- countryId: {},
4262
- filteredCountries: {},
4263
- filteredOrganizationTypes: {},
4264
- showCountries: { type: Boolean },
4265
- organizationTypeId: {},
4266
- selectClass: {}
4267
- },
4268
- emits: ["update:countryId", "update:organizationTypeId"],
4269
- setup(__props, { emit: __emit }) {
4270
- const props = __props;
4271
- const emit = __emit;
4272
- const { t } = vueI18n.useI18n();
4273
- const selectedCountryFlag = vue.computed(
4274
- () => countryFlag(
4275
- props.filteredCountries.find(
4276
- (country) => country.id_country === props.countryId
4277
- )
4278
- )
4279
- );
4280
- function countryChanged(id_country) {
4281
- measureEvent("open_country", {
4282
- id_country
4283
- });
4284
- emit("update:countryId", id_country);
4285
- }
4286
- function countryFlag(country) {
4287
- return `https://hatscripts.github.io/circle-flags/flags/${country.code.toLocaleLowerCase()}.svg`;
4288
- }
4289
- function selectOrganizationType(id) {
4290
- measureEvent("open_site_organization_type", {
4291
- id_site_organization_type: id
4292
- });
4293
- emit("update:organizationTypeId", id);
4294
- }
4295
- return (_ctx, _cache) => {
4296
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
4297
- vue.createElementVNode("p", {
4298
- class: vue.normalizeClass(_ctx.$style["institution-filters-intro"])
4299
- }, vue.toDisplayString(vue.unref(t)("common.intro")), 3),
4300
- _ctx.showCountries ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElSelect), {
4301
- key: 0,
4302
- class: vue.normalizeClass(_ctx.$style["widget-country"]),
4303
- "model-value": props.countryId,
4304
- "popper-class": props.selectClass,
4305
- onChange: countryChanged
4306
- }, {
4307
- prefix: vue.withCtx(() => [
4308
- vue.createElementVNode("img", {
4309
- src: selectedCountryFlag.value,
4310
- width: "44",
4311
- height: "44",
4312
- alt: ""
4313
- }, null, 8, _hoisted_1$9)
4314
- ]),
4315
- default: vue.withCtx(() => [
4316
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filteredCountries, (country) => {
4317
- return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElOption), {
4318
- key: country.id_country,
4319
- class: vue.normalizeClass(_ctx.$style["widget-country-option"]),
4320
- value: country.id_country,
4321
- label: country.name
4322
- }, {
4323
- default: vue.withCtx(() => [
4324
- vue.createElementVNode("img", {
4325
- src: countryFlag(country),
4326
- width: "44",
4327
- height: "44",
4328
- alt: ""
4329
- }, null, 8, _hoisted_2$9),
4330
- vue.createElementVNode("span", null, vue.toDisplayString(country.name), 1)
4331
- ]),
4332
- _: 2
4333
- }, 1032, ["class", "value", "label"]);
4334
- }), 128))
4335
- ]),
4336
- _: 1
4337
- }, 8, ["class", "model-value", "popper-class"])) : vue.createCommentVNode("", true),
4338
- vue.createElementVNode("div", {
4339
- class: vue.normalizeClass(_ctx.$style["organization-types-list"])
4340
- }, [
4341
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filteredOrganizationTypes, (organizationType) => {
4342
- return vue.openBlock(), vue.createElementBlock("button", {
4343
- key: organizationType.id_site_organization_type,
4344
- onClick: () => selectOrganizationType(organizationType.id_site_organization_type)
4345
- }, vue.toDisplayString(vue.unref(t)(`common.${organizationType.label}`)), 9, _hoisted_3$6);
4346
- }), 128))
4347
- ], 2)
4348
- ], 64);
4349
- };
4350
- }
4351
- });
4352
- const style0$d = {
4353
- "institution-filters-intro": "pb-w-sync_institution-filters-intro",
4354
- "organization-types-list": "pb-w-sync_organization-types-list",
4355
- "widget-country": "pb-w-sync_widget-country",
4356
- "widget-country-option": "pb-w-sync_widget-country-option"
4357
- };
4358
- const cssModules$d = {
4359
- "$style": style0$d
4252
+ const cssModules$f = {
4253
+ "$style": style0$f
4360
4254
  };
4361
- const InstitutionFilters = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__cssModules", cssModules$d]]);
4362
- const _hoisted_1$8 = ["onClick"];
4363
- const _hoisted_2$8 = ["alt", "src"];
4364
- const _hoisted_3$5 = { key: 1 };
4365
- const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4255
+ const FinalResponse = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__cssModules", cssModules$f]]);
4256
+ const _hoisted_1$a = ["onClick"];
4257
+ const _hoisted_2$a = ["alt", "src"];
4258
+ const _hoisted_3$7 = { key: 1 };
4259
+ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
4366
4260
  __name: "OrganizationSitesList",
4367
4261
  props: {
4368
4262
  assetsPath: { default: "https://s.paybook.com" },
4263
+ embedded: { type: Boolean, default: false },
4369
4264
  items: { default: () => [] },
4370
4265
  showLogo: { type: Boolean, default: true },
4371
4266
  showPlaidSitesButton: { type: Boolean, default: false }
@@ -4388,7 +4283,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4388
4283
  });
4389
4284
  });
4390
4285
  vue.onMounted(() => {
4391
- if (props.items.length > 0 && props.showLogo) {
4286
+ if (!props.embedded && props.items.length > 0 && props.showLogo) {
4392
4287
  imagesLoaded = 0;
4393
4288
  rootEmit("images-loading");
4394
4289
  }
@@ -4396,7 +4291,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4396
4291
  vue.watch(
4397
4292
  () => props.items,
4398
4293
  (val) => {
4399
- if (val.length > 0 && props.showLogo) {
4294
+ if (!props.embedded && val.length > 0 && props.showLogo) {
4400
4295
  imagesLoaded = 0;
4401
4296
  rootEmit("images-loading");
4402
4297
  }
@@ -4404,7 +4299,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4404
4299
  );
4405
4300
  function imageLoaded() {
4406
4301
  imagesLoaded++;
4407
- if (imagesLoaded === props.items.length) {
4302
+ if (!props.embedded && imagesLoaded === props.items.length) {
4408
4303
  rootEmit("images-loaded");
4409
4304
  }
4410
4305
  }
@@ -4421,17 +4316,18 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4421
4316
  onClick: _cache[0] || (_cache[0] = () => vue.unref(rootEmit)("__internal__.plaid-sites-clicked"))
4422
4317
  }, vue.toDisplayString(vue.unref(t)("common.find_your_institution")), 1)
4423
4318
  ], 2)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
4424
- vue.createVNode(vue.unref(elementPlus.ElInput), {
4319
+ !_ctx.embedded ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElInput), {
4320
+ key: 0,
4425
4321
  modelValue: searchQuery.value,
4426
4322
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchQuery.value = $event),
4427
4323
  "data-testid": "search-organization",
4428
4324
  placeholder: vue.unref(t)("common.search")
4429
4325
  }, {
4430
4326
  prefix: vue.withCtx(() => [
4431
- vue.createVNode(_sfc_main$i, { icon: "search" })
4327
+ vue.createVNode(_sfc_main$j, { icon: "search" })
4432
4328
  ]),
4433
4329
  _: 1
4434
- }, 8, ["modelValue", "placeholder"]),
4330
+ }, 8, ["modelValue", "placeholder"])) : vue.createCommentVNode("", true),
4435
4331
  vue.createElementVNode("div", {
4436
4332
  class: vue.normalizeClass(_ctx.$style["organization-sites"])
4437
4333
  }, [
@@ -4450,8 +4346,8 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4450
4346
  height: "66",
4451
4347
  width: "220",
4452
4348
  onLoad: imageLoaded
4453
- }, null, 40, _hoisted_2$8)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$5, vue.toDisplayString(item.name), 1))
4454
- ], 10, _hoisted_1$8)), [
4349
+ }, null, 40, _hoisted_2$a)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$7, vue.toDisplayString(item.name), 1))
4350
+ ], 10, _hoisted_1$a)), [
4455
4351
  [vue.vShow, item.show]
4456
4352
  ]);
4457
4353
  }), 128))
@@ -4460,15 +4356,333 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4460
4356
  };
4461
4357
  }
4462
4358
  });
4463
- const style0$c = {
4359
+ const style0$e = {
4464
4360
  "widget-plaid-container": "pb-w-sync_widget-plaid-container",
4465
4361
  "organization-sites": "pb-w-sync_organization-sites",
4466
4362
  "organization-button": "pb-w-sync_organization-button"
4467
4363
  };
4364
+ const cssModules$e = {
4365
+ "$style": style0$e
4366
+ };
4367
+ const OrganizationSitesList = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__cssModules", cssModules$e]]);
4368
+ function countryFlagUrl(country2) {
4369
+ return `https://hatscripts.github.io/circle-flags/flags/${country2.code.toLocaleLowerCase()}.svg`;
4370
+ }
4371
+ function orderCountries(countries, requestedCountry) {
4372
+ const first = requestedCountry ? countries.find(
4373
+ (country2) => country2.code === requestedCountry || country2.id_country === requestedCountry
4374
+ ) : void 0;
4375
+ return first ? [first, ...countries.filter((country2) => country2 !== first)] : countries;
4376
+ }
4377
+ function buildSiteCatalog(countries, organizationTypesOf, organizationSitesOf, categoryLabel) {
4378
+ return countries.map((country2) => ({
4379
+ country: country2,
4380
+ categories: organizationTypesOf(country2.id_country).map((organizationType) => ({
4381
+ organizationType,
4382
+ organizationSites: organizationSitesOf(
4383
+ country2.id_country,
4384
+ organizationType.id_site_organization_type
4385
+ )
4386
+ })).filter((category) => category.organizationSites.length).sort(
4387
+ (a, b) => categoryLabel(a.organizationType).localeCompare(
4388
+ categoryLabel(b.organizationType)
4389
+ )
4390
+ )
4391
+ })).filter((entry) => entry.categories.length);
4392
+ }
4393
+ function searchSiteCatalog(catalog, search2) {
4394
+ const query = search2.toLocaleLowerCase();
4395
+ if (!query) {
4396
+ return catalog;
4397
+ }
4398
+ return catalog.map((entry) => ({
4399
+ ...entry,
4400
+ categories: entry.categories.map((category) => ({
4401
+ ...category,
4402
+ organizationSites: category.organizationSites.filter(
4403
+ (item) => item.name.toLocaleLowerCase().includes(query)
4404
+ )
4405
+ })).filter((category) => category.organizationSites.length)
4406
+ })).filter((entry) => entry.categories.length);
4407
+ }
4408
+ const _hoisted_1$9 = ["aria-expanded", "disabled", "onClick"];
4409
+ const _hoisted_2$9 = ["src"];
4410
+ const _hoisted_3$6 = ["aria-expanded", "disabled", "onClick"];
4411
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
4412
+ __name: "FullSiteList",
4413
+ props: {
4414
+ assetsPath: {},
4415
+ catalog: {},
4416
+ search: { default: "" },
4417
+ showLogo: { type: Boolean, default: true }
4418
+ },
4419
+ emits: ["select", "update:search"],
4420
+ setup(__props, { emit: __emit }) {
4421
+ const props = __props;
4422
+ const emit = __emit;
4423
+ const { t } = vueI18n.useI18n();
4424
+ const visibleCatalog = vue.computed(
4425
+ () => searchSiteCatalog(props.catalog, props.search)
4426
+ );
4427
+ const collapsed = vue.reactive(/* @__PURE__ */ new Set());
4428
+ const searching = vue.computed(() => !!props.search);
4429
+ function categoryKey(entry, category) {
4430
+ return `${entry.country.id_country}:${category.organizationType.id_site_organization_type}`;
4431
+ }
4432
+ function isOpen(key) {
4433
+ return searching.value || !collapsed.has(key);
4434
+ }
4435
+ function scrollParent(element) {
4436
+ let node = element.parentElement;
4437
+ while (node && !["auto", "scroll"].includes(getComputedStyle(node).overflowY)) {
4438
+ node = node.parentElement;
4439
+ }
4440
+ return node;
4441
+ }
4442
+ async function toggle2(key, event2) {
4443
+ if (!collapsed.has(key)) {
4444
+ const heading = event2.currentTarget.parentElement;
4445
+ const section = heading.parentElement;
4446
+ const scroller = scrollParent(section);
4447
+ const offset = heading.getBoundingClientRect().top - section.getBoundingClientRect().top;
4448
+ collapsed.add(key);
4449
+ if (scroller && offset > 0) {
4450
+ const scrollTop = scroller.scrollTop;
4451
+ await vue.nextTick();
4452
+ scroller.scrollTop = scrollTop - offset;
4453
+ }
4454
+ return;
4455
+ }
4456
+ collapsed.delete(key);
4457
+ }
4458
+ return (_ctx, _cache) => {
4459
+ return vue.openBlock(), vue.createElementBlock("div", null, [
4460
+ vue.createElementVNode("div", {
4461
+ class: vue.normalizeClass(_ctx.$style["search"])
4462
+ }, [
4463
+ vue.createVNode(vue.unref(elementPlus.ElInput), {
4464
+ "data-testid": "search-organization",
4465
+ "model-value": props.search,
4466
+ placeholder: vue.unref(t)("common.search"),
4467
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = (value) => emit("update:search", value))
4468
+ }, {
4469
+ prefix: vue.withCtx(() => [
4470
+ vue.createVNode(_sfc_main$j, { icon: "search" })
4471
+ ]),
4472
+ _: 1
4473
+ }, 8, ["model-value", "placeholder"])
4474
+ ], 2),
4475
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(visibleCatalog.value, (entry) => {
4476
+ return vue.openBlock(), vue.createElementBlock("section", {
4477
+ key: entry.country.id_country,
4478
+ "data-testid": "full-site-list-country"
4479
+ }, [
4480
+ vue.createElementVNode("h2", {
4481
+ class: vue.normalizeClass(_ctx.$style["country"])
4482
+ }, [
4483
+ vue.createElementVNode("button", {
4484
+ type: "button",
4485
+ class: vue.normalizeClass(_ctx.$style["toggle"]),
4486
+ "aria-expanded": isOpen(entry.country.id_country),
4487
+ disabled: searching.value,
4488
+ "data-testid": "full-site-list-toggle",
4489
+ onClick: (event2) => toggle2(entry.country.id_country, event2)
4490
+ }, [
4491
+ vue.createElementVNode("img", {
4492
+ class: vue.normalizeClass(_ctx.$style["flag"]),
4493
+ src: vue.unref(countryFlagUrl)(entry.country),
4494
+ width: "20",
4495
+ height: "20",
4496
+ alt: ""
4497
+ }, null, 10, _hoisted_2$9),
4498
+ vue.createElementVNode("span", null, vue.toDisplayString(entry.country.name), 1),
4499
+ !searching.value ? (vue.openBlock(), vue.createElementBlock("svg", {
4500
+ key: 0,
4501
+ class: vue.normalizeClass(_ctx.$style["caret"]),
4502
+ viewBox: "0 0 10 10",
4503
+ "aria-hidden": "true"
4504
+ }, _cache[2] || (_cache[2] = [
4505
+ vue.createElementVNode("path", { d: "M1 3h8L5 8z" }, null, -1)
4506
+ ]), 2)) : vue.createCommentVNode("", true)
4507
+ ], 10, _hoisted_1$9)
4508
+ ], 2),
4509
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(entry.categories, (category) => {
4510
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("section", {
4511
+ key: category.organizationType.id_site_organization_type,
4512
+ "data-testid": "full-site-list-category"
4513
+ }, [
4514
+ vue.createElementVNode("h3", {
4515
+ class: vue.normalizeClass(_ctx.$style["category-title"])
4516
+ }, [
4517
+ vue.createElementVNode("button", {
4518
+ type: "button",
4519
+ class: vue.normalizeClass(_ctx.$style["toggle"]),
4520
+ "aria-expanded": isOpen(categoryKey(entry, category)),
4521
+ disabled: searching.value,
4522
+ "data-testid": "full-site-list-toggle",
4523
+ onClick: (event2) => toggle2(categoryKey(entry, category), event2)
4524
+ }, [
4525
+ vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(t)(`common.${category.organizationType.label}`)), 1),
4526
+ !searching.value ? (vue.openBlock(), vue.createElementBlock("svg", {
4527
+ key: 0,
4528
+ class: vue.normalizeClass(_ctx.$style["caret"]),
4529
+ viewBox: "0 0 10 10",
4530
+ "aria-hidden": "true"
4531
+ }, _cache[3] || (_cache[3] = [
4532
+ vue.createElementVNode("path", { d: "M1 3h8L5 8z" }, null, -1)
4533
+ ]), 2)) : vue.createCommentVNode("", true)
4534
+ ], 10, _hoisted_3$6)
4535
+ ], 2),
4536
+ vue.withDirectives(vue.createElementVNode("div", {
4537
+ class: vue.normalizeClass(_ctx.$style["category-sites"])
4538
+ }, [
4539
+ vue.createVNode(OrganizationSitesList, {
4540
+ "assets-path": props.assetsPath,
4541
+ embedded: "",
4542
+ items: category.organizationSites,
4543
+ "show-logo": props.showLogo,
4544
+ onSelect: _cache[1] || (_cache[1] = (item) => emit("select", item))
4545
+ }, null, 8, ["assets-path", "items", "show-logo"])
4546
+ ], 2), [
4547
+ [vue.vShow, isOpen(categoryKey(entry, category))]
4548
+ ])
4549
+ ])), [
4550
+ [vue.vShow, isOpen(entry.country.id_country)]
4551
+ ]);
4552
+ }), 128))
4553
+ ]);
4554
+ }), 128)),
4555
+ !visibleCatalog.value.length ? (vue.openBlock(), vue.createElementBlock("p", {
4556
+ key: 0,
4557
+ class: vue.normalizeClass(_ctx.$style["no-results"])
4558
+ }, vue.toDisplayString(vue.unref(t)("common.no_filtered_data")), 3)) : vue.createCommentVNode("", true)
4559
+ ]);
4560
+ };
4561
+ }
4562
+ });
4563
+ const search = "pb-w-sync_search";
4564
+ const country = "pb-w-sync_country";
4565
+ const toggle = "pb-w-sync_toggle";
4566
+ const caret = "pb-w-sync_caret";
4567
+ const flag = "pb-w-sync_flag";
4568
+ const style0$d = {
4569
+ search,
4570
+ country,
4571
+ "category-title": "pb-w-sync_category-title",
4572
+ toggle,
4573
+ caret,
4574
+ flag,
4575
+ "category-sites": "pb-w-sync_category-sites",
4576
+ "no-results": "pb-w-sync_no-results"
4577
+ };
4578
+ const cssModules$d = {
4579
+ "$style": style0$d
4580
+ };
4581
+ const FullSiteList = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__cssModules", cssModules$d]]);
4582
+ const _hoisted_1$8 = ["src"];
4583
+ const _hoisted_2$8 = ["src"];
4584
+ const _hoisted_3$5 = ["onClick"];
4585
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4586
+ __name: "InstitutionFilters",
4587
+ props: {
4588
+ countryId: {},
4589
+ filteredCountries: {},
4590
+ filteredOrganizationTypes: {},
4591
+ showCountries: { type: Boolean },
4592
+ organizationTypeId: {},
4593
+ selectClass: {}
4594
+ },
4595
+ emits: ["update:countryId", "update:organizationTypeId"],
4596
+ setup(__props, { emit: __emit }) {
4597
+ const props = __props;
4598
+ const emit = __emit;
4599
+ const { t } = vueI18n.useI18n();
4600
+ const selectedCountryFlag = vue.computed(
4601
+ () => countryFlagUrl(
4602
+ props.filteredCountries.find(
4603
+ (country2) => country2.id_country === props.countryId
4604
+ )
4605
+ )
4606
+ );
4607
+ function countryChanged(id_country) {
4608
+ measureEvent("open_country", {
4609
+ id_country
4610
+ });
4611
+ emit("update:countryId", id_country);
4612
+ }
4613
+ function selectOrganizationType(id) {
4614
+ measureEvent("open_site_organization_type", {
4615
+ id_site_organization_type: id
4616
+ });
4617
+ emit("update:organizationTypeId", id);
4618
+ }
4619
+ return (_ctx, _cache) => {
4620
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
4621
+ vue.createElementVNode("p", {
4622
+ class: vue.normalizeClass(_ctx.$style["institution-filters-intro"])
4623
+ }, vue.toDisplayString(vue.unref(t)("common.intro")), 3),
4624
+ _ctx.showCountries ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElSelect), {
4625
+ key: 0,
4626
+ class: vue.normalizeClass(_ctx.$style["widget-country"]),
4627
+ "model-value": props.countryId,
4628
+ "popper-class": props.selectClass,
4629
+ onChange: countryChanged
4630
+ }, {
4631
+ prefix: vue.withCtx(() => [
4632
+ vue.createElementVNode("img", {
4633
+ src: selectedCountryFlag.value,
4634
+ width: "44",
4635
+ height: "44",
4636
+ alt: ""
4637
+ }, null, 8, _hoisted_1$8)
4638
+ ]),
4639
+ default: vue.withCtx(() => [
4640
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filteredCountries, (country2) => {
4641
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElOption), {
4642
+ key: country2.id_country,
4643
+ class: vue.normalizeClass(_ctx.$style["widget-country-option"]),
4644
+ value: country2.id_country,
4645
+ label: country2.name
4646
+ }, {
4647
+ default: vue.withCtx(() => [
4648
+ vue.createElementVNode("img", {
4649
+ src: vue.unref(countryFlagUrl)(country2),
4650
+ width: "44",
4651
+ height: "44",
4652
+ alt: ""
4653
+ }, null, 8, _hoisted_2$8),
4654
+ vue.createElementVNode("span", null, vue.toDisplayString(country2.name), 1)
4655
+ ]),
4656
+ _: 2
4657
+ }, 1032, ["class", "value", "label"]);
4658
+ }), 128))
4659
+ ]),
4660
+ _: 1
4661
+ }, 8, ["class", "model-value", "popper-class"])) : vue.createCommentVNode("", true),
4662
+ vue.createElementVNode("div", {
4663
+ class: vue.normalizeClass(_ctx.$style["organization-types-list"])
4664
+ }, [
4665
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filteredOrganizationTypes, (organizationType) => {
4666
+ return vue.openBlock(), vue.createElementBlock("button", {
4667
+ key: organizationType.id_site_organization_type,
4668
+ onClick: () => selectOrganizationType(organizationType.id_site_organization_type)
4669
+ }, vue.toDisplayString(vue.unref(t)(`common.${organizationType.label}`)), 9, _hoisted_3$5);
4670
+ }), 128))
4671
+ ], 2)
4672
+ ], 64);
4673
+ };
4674
+ }
4675
+ });
4676
+ const style0$c = {
4677
+ "institution-filters-intro": "pb-w-sync_institution-filters-intro",
4678
+ "organization-types-list": "pb-w-sync_organization-types-list",
4679
+ "widget-country": "pb-w-sync_widget-country",
4680
+ "widget-country-option": "pb-w-sync_widget-country-option"
4681
+ };
4468
4682
  const cssModules$c = {
4469
4683
  "$style": style0$c
4470
4684
  };
4471
- const OrganizationSitesList = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__cssModules", cssModules$c]]);
4685
+ const InstitutionFilters = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__cssModules", cssModules$c]]);
4472
4686
  const _hoisted_1$7 = { key: 0 };
4473
4687
  const _hoisted_2$7 = ["src"];
4474
4688
  const _hoisted_3$4 = ["src"];
@@ -4533,15 +4747,15 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
4533
4747
  vue.createElementVNode("h1", null, vue.toDisplayString(props.client.name ? vue.unref(t)("privacy.title_client", { client: props.client.name }) : vue.unref(t)("privacy.title")), 1),
4534
4748
  vue.createElementVNode("ul", null, [
4535
4749
  vue.createElementVNode("li", null, [
4536
- vue.createVNode(_sfc_main$i, { icon: "files" }),
4750
+ vue.createVNode(_sfc_main$j, { icon: "files" }),
4537
4751
  vue.createTextVNode(" " + vue.toDisplayString(vue.unref(t)("privacy.list.first")), 1)
4538
4752
  ]),
4539
4753
  vue.createElementVNode("li", null, [
4540
- vue.createVNode(_sfc_main$i, { icon: "lock" }),
4754
+ vue.createVNode(_sfc_main$j, { icon: "lock" }),
4541
4755
  vue.createTextVNode(" " + vue.toDisplayString(vue.unref(t)("privacy.list.second")), 1)
4542
4756
  ]),
4543
4757
  vue.createElementVNode("li", null, [
4544
- vue.createVNode(_sfc_main$i, { icon: "users" }),
4758
+ vue.createVNode(_sfc_main$j, { icon: "users" }),
4545
4759
  vue.createTextVNode(" " + vue.toDisplayString(vue.unref(t)("privacy.list.third")), 1)
4546
4760
  ])
4547
4761
  ]),
@@ -4590,7 +4804,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
4590
4804
  const emit = __emit;
4591
4805
  const { t } = vueI18n.useI18n();
4592
4806
  const segments = vue.computed(() => parseConsentText(props.consent));
4593
- function toggle(event2) {
4807
+ function toggle2(event2) {
4594
4808
  emit("update:modelValue", event2.target.checked);
4595
4809
  }
4596
4810
  return (_ctx, _cache) => {
@@ -4606,7 +4820,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
4606
4820
  checked: props.modelValue,
4607
4821
  "data-testid": "consent-checkbox",
4608
4822
  type: "checkbox",
4609
- onChange: toggle
4823
+ onChange: toggle2
4610
4824
  }, null, 40, _hoisted_1$6),
4611
4825
  vue.createElementVNode("span", {
4612
4826
  class: vue.normalizeClass(_ctx.$style["consent-text"]),
@@ -4779,7 +4993,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
4779
4993
  class: vue.normalizeClass(_ctx.$style["widget-back-button"]),
4780
4994
  onClick: _cache[0] || (_cache[0] = ($event) => remove($event))
4781
4995
  }, [
4782
- vue.createVNode(_sfc_main$i, { icon: "x-circle" })
4996
+ vue.createVNode(_sfc_main$j, { icon: "x-circle" })
4783
4997
  ], 10, _hoisted_2$5)
4784
4998
  ], 2)) : (vue.openBlock(), vue.createElementBlock("button", {
4785
4999
  key: 1,
@@ -5213,10 +5427,10 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
5213
5427
  showPassword.value = !showPassword.value;
5214
5428
  })
5215
5429
  }, [
5216
- showPassword.value ? (vue.openBlock(), vue.createBlock(_sfc_main$i, {
5430
+ showPassword.value ? (vue.openBlock(), vue.createBlock(_sfc_main$j, {
5217
5431
  key: 0,
5218
5432
  icon: "eye-slash"
5219
- })) : (vue.openBlock(), vue.createBlock(_sfc_main$i, {
5433
+ })) : (vue.openBlock(), vue.createBlock(_sfc_main$j, {
5220
5434
  key: 1,
5221
5435
  icon: "eye"
5222
5436
  }))
@@ -5823,10 +6037,10 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
5823
6037
  vue.isRef(showPassword) ? showPassword.value = !vue.unref(showPassword) : showPassword = !vue.unref(showPassword);
5824
6038
  })
5825
6039
  }, [
5826
- !vue.unref(showPassword) ? (vue.openBlock(), vue.createBlock(_sfc_main$i, {
6040
+ !vue.unref(showPassword) ? (vue.openBlock(), vue.createBlock(_sfc_main$j, {
5827
6041
  key: 0,
5828
6042
  icon: "eye"
5829
- })) : (vue.openBlock(), vue.createBlock(_sfc_main$i, {
6043
+ })) : (vue.openBlock(), vue.createBlock(_sfc_main$j, {
5830
6044
  key: 1,
5831
6045
  icon: "eye-slash"
5832
6046
  }))
@@ -8256,6 +8470,7 @@ class SiteBase extends events.EventEmitter {
8256
8470
  __publicField(this, "socketOpened", false);
8257
8471
  __publicField(this, "socketTimeoutAfterError");
8258
8472
  __publicField(this, "timer", null);
8473
+ __publicField(this, "disposed", false);
8259
8474
  this.httpService = httpService;
8260
8475
  this.userConfig = userConfig;
8261
8476
  this.config = site;
@@ -8314,6 +8529,16 @@ class SiteBase extends events.EventEmitter {
8314
8529
  toggleTestMode() {
8315
8530
  this.testMode = !this.testMode;
8316
8531
  }
8532
+ // Called when the widget drops this connection, so a stale timer or socket cannot act on a later login.
8533
+ dispose() {
8534
+ this.disposed = true;
8535
+ this.clearTimer();
8536
+ this.removeAllListeners();
8537
+ if (this.socket) {
8538
+ this.socket.onclose = this.socket.onerror = this.socket.onmessage = null;
8539
+ this.socket.close();
8540
+ }
8541
+ }
8317
8542
  configuredMeasureEvent(eventAction, params) {
8318
8543
  if (!this.userConfig.isHeadless) {
8319
8544
  measureEvent(eventAction, params);
@@ -8375,6 +8600,9 @@ class SiteBase extends events.EventEmitter {
8375
8600
  return _rules;
8376
8601
  }
8377
8602
  setSocket(url) {
8603
+ if (this.disposed) {
8604
+ return;
8605
+ }
8378
8606
  this.socket = new WebSocket(url);
8379
8607
  this.socket.onclose = (event2) => this.reopenSocket(event2);
8380
8608
  this.socket.onerror = () => this.socketError();
@@ -8391,6 +8619,9 @@ class SiteBase extends events.EventEmitter {
8391
8619
  return Object.keys(cleanOptions).length ? { options: { ...cleanOptions } } : {};
8392
8620
  }
8393
8621
  startTimer() {
8622
+ if (this.disposed) {
8623
+ return;
8624
+ }
8394
8625
  this.timer = setTimeout(() => {
8395
8626
  this.socketTimeout();
8396
8627
  }, this.userConfig.socketTimeoutTime);
@@ -8408,7 +8639,9 @@ class SiteBase extends events.EventEmitter {
8408
8639
  this.socketTimeoutAfterError = (/* @__PURE__ */ new Date()).getTime() + 12e4;
8409
8640
  this.setSocket(this.response.ws);
8410
8641
  const intervalHandler = setInterval(() => {
8411
- if (!this.isSocketOpen) {
8642
+ if (this.disposed) {
8643
+ clearInterval(intervalHandler);
8644
+ } else if (!this.isSocketOpen) {
8412
8645
  if ((/* @__PURE__ */ new Date()).getTime() < this.socketTimeoutAfterError) {
8413
8646
  this.socket.close();
8414
8647
  this.setSocket(this.response.ws);
@@ -8727,6 +8960,7 @@ class Credential extends events.EventEmitter {
8727
8960
  __publicField(this, "socketOpened", false);
8728
8961
  __publicField(this, "socketTimeoutAfterError");
8729
8962
  __publicField(this, "timer", null);
8963
+ __publicField(this, "disposed", false);
8730
8964
  this.syncService = syncService;
8731
8965
  this.httpService = httpService;
8732
8966
  this.socketTimeoutTime = socketTimeoutTime;
@@ -8823,6 +9057,16 @@ class Credential extends events.EventEmitter {
8823
9057
  setOption(name, value) {
8824
9058
  this.options[name] = value;
8825
9059
  }
9060
+ // Called when the widget drops this credential, so a stale timer or socket cannot act on a later flow.
9061
+ dispose() {
9062
+ this.disposed = true;
9063
+ this.clearTimer();
9064
+ this.removeAllListeners();
9065
+ if (this.socket) {
9066
+ this.socket.onclose = this.socket.onerror = this.socket.onmessage = null;
9067
+ this.socket.close();
9068
+ }
9069
+ }
8826
9070
  sync() {
8827
9071
  this.configuredMeasureEvent("sync_credential", {
8828
9072
  id_credential: this.config.id_credential,
@@ -8940,7 +9184,9 @@ class Credential extends events.EventEmitter {
8940
9184
  this.socketTimeoutAfterError = (/* @__PURE__ */ new Date()).getTime() + 12e4;
8941
9185
  this.setSocket(this.response.ws);
8942
9186
  const intervalHandler = setInterval(() => {
8943
- if (!this.isSocketOpen) {
9187
+ if (this.disposed) {
9188
+ clearInterval(intervalHandler);
9189
+ } else if (!this.isSocketOpen) {
8944
9190
  if ((/* @__PURE__ */ new Date()).getTime() < this.socketTimeoutAfterError) {
8945
9191
  this.socket.close();
8946
9192
  this.setSocket(this.response.ws);
@@ -8957,6 +9203,9 @@ class Credential extends events.EventEmitter {
8957
9203
  }
8958
9204
  }
8959
9205
  setSocket(url) {
9206
+ if (this.disposed) {
9207
+ return;
9208
+ }
8960
9209
  this.socket = new WebSocket(url);
8961
9210
  this.socket.onclose = (event2) => this.reopenSocket(event2);
8962
9211
  this.socket.onerror = () => this.socketError();
@@ -9069,6 +9318,9 @@ class Credential extends events.EventEmitter {
9069
9318
  return Object.keys(cleanOptions).length ? { options: { ...cleanOptions } } : {};
9070
9319
  }
9071
9320
  startTimer() {
9321
+ if (this.disposed) {
9322
+ return;
9323
+ }
9072
9324
  this.timer = setTimeout(() => {
9073
9325
  this.socketTimeout();
9074
9326
  }, this.socketTimeoutTime);
@@ -9714,6 +9966,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
9714
9966
  locale: {},
9715
9967
  navigation: {},
9716
9968
  refreshTokenFunction: { type: Function },
9969
+ requestedCountry: {},
9717
9970
  strict: {},
9718
9971
  token: {}
9719
9972
  },
@@ -9724,9 +9977,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
9724
9977
  const rootEmit = vue.inject(rootEmitter);
9725
9978
  const { t, locale } = vueI18n.useI18n({ useScope: "global" });
9726
9979
  const { mobile } = useMobile();
9727
- const countries = vue.ref([]), countryId = vue.ref(null), credentialFlow = vue.ref(null), consent = vue.ref(null), consentLoading = vue.ref(false), dataError = vue.ref(false), displayBackUpConnection = vue.ref(false), finalLongMessage = vue.ref(null), finalMessage = vue.ref(null), fromBackUpConnection = vue.ref(null), infoLongMessage = vue.ref(""), infoMessage = vue.ref(""), inPrivacyPolicy = vue.ref(props.navigation.displayPrivacyScreen), loading = vue.ref(true), noFilteredData = vue.ref(false), organizationSiteId = vue.ref(null), organizationSites = vue.ref([]), organizationTypeId = vue.ref(null), selectingAccounts = vue.ref(false), siteStatus = vue.ref(null), siteFormError = vue.ref(null), updatingCredential = vue.ref(false), visible = vue.ref(false);
9980
+ const countries = vue.ref([]), countryId = vue.ref(null), credentialFlow = vue.ref(null), consent = vue.ref(null), consentLoading = vue.ref(false), dataError = vue.ref(false), displayBackUpConnection = vue.ref(false), finalLongMessage = vue.ref(null), finalMessage = vue.ref(null), fullSiteListSearch = vue.ref(""), fromBackUpConnection = vue.ref(null), infoLongMessage = vue.ref(""), infoMessage = vue.ref(""), inPrivacyPolicy = vue.ref(props.navigation.displayPrivacyScreen), loading = vue.ref(true), noFilteredData = vue.ref(false), organizationSiteId = vue.ref(null), organizationSites = vue.ref([]), organizationTypeId = vue.ref(null), selectingAccounts = vue.ref(false), siteStatus = vue.ref(null), siteFormError = vue.ref(null), updatingCredential = vue.ref(false), visible = vue.ref(false), widgetContent = vue.ref(null);
9728
9981
  const consentCache = /* @__PURE__ */ new Map();
9729
- let assetsPath = "https://s.paybook.com", credential = null, gitVersion = `${getVersion()}${props.strict ? "-strict" : ""}`, infoNotification = null, notificationUpdater, openCredentialToast = null, organizationTypes = [], site = null, siteRaw = null, sync = null;
9982
+ let assetsPath = "https://s.paybook.com", credential = null, fullSiteListScrollTop = 0, gitVersion = `${getVersion()}${props.strict ? "-strict" : ""}`, infoNotification = null, notificationUpdater, openCredentialToast = null, organizationTypes = [], site = null, siteRaw = null, sync = null;
9730
9983
  const backUpSite = vue.computed(() => {
9731
9984
  var _a;
9732
9985
  return ((_a = credentialFlow.value) == null ? void 0 : _a.displayBackUpConnection) || displayBackUpConnection.value ? site : null;
@@ -9751,8 +10004,8 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
9751
10004
  }
9752
10005
  return props.navigation.enableBackNavigation && siteStatus.value === "start";
9753
10006
  }), filteredCountries = vue.computed(() => {
9754
- return countries.value.filter((country) => {
9755
- return (country.id_country === "51ad44db3b8e77631200047d" || country.id_country === "51ad44793b8e77631200027a") && props.internal.plaidSites || filterOrganizationTypes(country.id_country).length;
10007
+ return countries.value.filter((country2) => {
10008
+ return (country2.id_country === "51ad44db3b8e77631200047d" || country2.id_country === "51ad44793b8e77631200027a") && props.internal.plaidSites || filterOrganizationTypes(country2.id_country).length;
9756
10009
  }).sort((a, b) => {
9757
10010
  return a.name.localeCompare(b.name);
9758
10011
  });
@@ -9766,6 +10019,20 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
9766
10019
  organizationTypeId.value,
9767
10020
  organizationSiteId.value
9768
10021
  );
10022
+ }), fullSiteCatalog = vue.computed(() => {
10023
+ if (!props.navigation.displayFullSiteList) {
10024
+ return [];
10025
+ }
10026
+ return buildSiteCatalog(
10027
+ props.navigation.hideSelectCountry ? filteredCountries.value.filter(
10028
+ (country2) => country2.id_country === countryId.value
10029
+ ) : orderCountries(filteredCountries.value, props.requestedCountry),
10030
+ filterOrganizationTypes,
10031
+ filterOrganizationSites,
10032
+ (organizationType) => t(`common.${organizationType.label}`)
10033
+ );
10034
+ }), fullSiteListOnScreen = vue.computed(() => {
10035
+ return visible.value && !inPrivacyPolicy.value && !loading.value && !credentialFlow.value && !siteStatus.value && !organizationSiteId.value && props.navigation.displayFullSiteList;
9769
10036
  }), loaderMessage = vue.computed(() => {
9770
10037
  return { short: infoMessage.value, long: infoLongMessage.value };
9771
10038
  }), sitesMap = vue.computed(() => {
@@ -9805,6 +10072,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
9805
10072
  }
9806
10073
  return "";
9807
10074
  } else {
10075
+ if (props.navigation.displayFullSiteList) {
10076
+ return t("common.header.select");
10077
+ }
9808
10078
  if (!organizationTypeId.value) {
9809
10079
  return t("common.header.link");
9810
10080
  }
@@ -9862,6 +10132,29 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
9862
10132
  loadData();
9863
10133
  }
9864
10134
  );
10135
+ vue.watch(
10136
+ () => props.navigation.displayFullSiteList,
10137
+ () => {
10138
+ if (!siteStatus.value) {
10139
+ organizationTypeId.value = organizationSiteId.value = null;
10140
+ }
10141
+ }
10142
+ );
10143
+ vue.watch(fullSiteListOnScreen, (onScreen) => {
10144
+ if (!onScreen && widgetContent.value) {
10145
+ fullSiteListScrollTop = widgetContent.value.scrollTop;
10146
+ }
10147
+ vue.nextTick(() => {
10148
+ if (widgetContent.value) {
10149
+ widgetContent.value.scrollTop = onScreen ? fullSiteListScrollTop : 0;
10150
+ }
10151
+ });
10152
+ });
10153
+ vue.watch(fullSiteListSearch, () => {
10154
+ if (widgetContent.value) {
10155
+ widgetContent.value.scrollTop = 0;
10156
+ }
10157
+ });
9865
10158
  vue.watch(infoMessage, (short) => {
9866
10159
  if (infoNotification) {
9867
10160
  notificationUpdater.updateMessages({ short });
@@ -9901,7 +10194,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
9901
10194
  onBack: () => {
9902
10195
  rootEmit("back");
9903
10196
  closeInfoNotification();
9904
- site = siteStatus.value = null;
10197
+ dropSite();
9905
10198
  selectSite(siteRaw, false);
9906
10199
  visible.value = true;
9907
10200
  },
@@ -9945,6 +10238,10 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
9945
10238
  rootEmit("dom-updated");
9946
10239
  });
9947
10240
  });
10241
+ vue.onBeforeUnmount(() => {
10242
+ dropSite();
10243
+ credential == null ? void 0 : credential.dispose();
10244
+ });
9948
10245
  vue.onUpdated(() => {
9949
10246
  vue.nextTick(() => {
9950
10247
  rootEmit("dom-updated");
@@ -9978,7 +10275,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
9978
10275
  measureEvent("close");
9979
10276
  visible.value = false;
9980
10277
  if (siteStatus.value === "start" || siteStatus.value === "finish") {
9981
- siteStatus.value = site = null;
10278
+ dropSite();
9982
10279
  }
9983
10280
  rootEmit("closed");
9984
10281
  }
@@ -10104,6 +10401,10 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
10104
10401
  });
10105
10402
  }
10106
10403
  });
10404
+ function dropSite() {
10405
+ site == null ? void 0 : site.dispose();
10406
+ siteStatus.value = site = null;
10407
+ }
10107
10408
  function emitApiError(error2, errorTranslationCore) {
10108
10409
  rootEmit("api-error", error2.response ? error2.response.status : 500, {
10109
10410
  longMessage: t(`${errorTranslationCore}real.long_description`),
@@ -10263,6 +10564,10 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
10263
10564
  rootEmit("back");
10264
10565
  }
10265
10566
  organizationSiteId.value = null;
10567
+ if (props.navigation.displayFullSiteList) {
10568
+ organizationTypeId.value = null;
10569
+ return;
10570
+ }
10266
10571
  if (filteredOrganizationSites.value.length === 1) {
10267
10572
  organizationTypeBack(false);
10268
10573
  }
@@ -10278,13 +10583,18 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
10278
10583
  }
10279
10584
  function privacyPolicyAccepted() {
10280
10585
  inPrivacyPolicy.value = false;
10281
- if ((filteredCountries.value.length === 1 || props.navigation.hideSelectCountry) && filteredOrganizationTypes.value.length === 1) {
10586
+ if (!props.navigation.displayFullSiteList && (filteredCountries.value.length === 1 || props.navigation.hideSelectCountry) && filteredOrganizationTypes.value.length === 1) {
10282
10587
  organizationTypeId.value = filteredOrganizationTypes.value[0].id_site_organization_type;
10283
10588
  }
10284
10589
  }
10285
10590
  function resetSites() {
10286
10591
  organizationTypeId.value = fromBackUpConnection.value = siteStatus.value = organizationSiteId.value = site = null;
10287
10592
  }
10593
+ function selectFullSiteListOrganization(item) {
10594
+ countryId.value = item.id_country;
10595
+ organizationTypeId.value = item.id_site_organization_type;
10596
+ selectOrganizationSite(item);
10597
+ }
10288
10598
  function selectOrganizationSite(item) {
10289
10599
  rootEmit("organization-selected", item);
10290
10600
  measureEvent("open_site_organization", {
@@ -10357,6 +10667,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
10357
10667
  });
10358
10668
  }
10359
10669
  if (!site || !site.loading) {
10670
+ site == null ? void 0 : site.dispose();
10360
10671
  siteRaw = item;
10361
10672
  thisSite = site = sync.siteConnection(item);
10362
10673
  siteStatus.value = "start";
@@ -10449,7 +10760,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
10449
10760
  } else if (props.navigation.returnToSiteFormOnUserError !== false && (props.navigation.returnToSiteFormOnUserError === true && [401, 403, 411].includes(data.code) || props.navigation.returnToSiteFormOnUserError !== true && props.navigation.returnToSiteFormOnUserError.includes(
10450
10761
  data.code
10451
10762
  ))) {
10452
- siteStatus.value = site = null;
10763
+ dropSite();
10453
10764
  selectSite(siteRaw, false);
10454
10765
  siteFormError.value = {
10455
10766
  short: shortMessage,
@@ -10669,6 +10980,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
10669
10980
  }
10670
10981
  openCredentialToast();
10671
10982
  }
10983
+ credential == null ? void 0 : credential.dispose();
10672
10984
  credential = sync.syncCredential(idCredential, update);
10673
10985
  credential.on("error", () => {
10674
10986
  const { code } = credential.error, messageCore = credential.error.response ? getApiErrorTranslationCore(credential.error) : `socket.message.${code ? code : 500}.`, shortMessage = t(`${messageCore}short_description`), longMessage = t(`${messageCore}long_description`);
@@ -11129,14 +11441,14 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11129
11441
  if (dataError.value) {
11130
11442
  return;
11131
11443
  }
11132
- let country;
11444
+ let country2;
11133
11445
  if (props.entrypoint.country) {
11134
- country = filteredCountries.value.find((country2) => {
11135
- return country2.code === props.entrypoint.country || country2.id_country === props.entrypoint.country;
11446
+ country2 = filteredCountries.value.find((country22) => {
11447
+ return country22.code === props.entrypoint.country || country22.id_country === props.entrypoint.country;
11136
11448
  });
11137
11449
  }
11138
11450
  if (filteredCountries.value.length) {
11139
- countryId.value = country ? country.id_country : filteredCountries.value[0].id_country;
11451
+ countryId.value = country2 ? country2.id_country : filteredCountries.value[0].id_country;
11140
11452
  measureEvent("open_country", {
11141
11453
  id_country: countryId.value
11142
11454
  });
@@ -11147,7 +11459,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11147
11459
  }
11148
11460
  }
11149
11461
  function setOrganizationTypeEntrypoint() {
11150
- if (props.entrypoint.siteOrganizationType) {
11462
+ if (props.entrypoint.siteOrganizationType && !props.navigation.displayFullSiteList) {
11151
11463
  const siteOrganizationType = filteredOrganizationTypes.value.find(
11152
11464
  (organizationType) => {
11153
11465
  return organizationType.id_site_organization_type === props.entrypoint.siteOrganizationType;
@@ -11266,7 +11578,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11266
11578
  measureEvent("close_site", {
11267
11579
  id_site: site.config.id_site
11268
11580
  });
11269
- siteStatus.value = site = null;
11581
+ dropSite();
11270
11582
  siteFormError.value = null;
11271
11583
  if (filteredSites.value.length === 1) {
11272
11584
  organizationSiteBack(false);
@@ -11297,7 +11609,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11297
11609
  if (emit2) {
11298
11610
  rootEmit("back");
11299
11611
  }
11300
- siteStatus.value = site = null;
11612
+ dropSite();
11301
11613
  selectSite(siteRaw, false);
11302
11614
  }
11303
11615
  function updateCredential2(idCredential, emitLoaded = false) {
@@ -11341,7 +11653,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11341
11653
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
11342
11654
  vue.createVNode(TheModal, {
11343
11655
  visible: visible.value,
11344
- "onUpdate:visible": _cache[5] || (_cache[5] = ($event) => visible.value = $event),
11656
+ "onUpdate:visible": _cache[6] || (_cache[6] = ($event) => visible.value = $event),
11345
11657
  mobile: vue.unref(mobile)
11346
11658
  }, {
11347
11659
  default: vue.withCtx(() => [
@@ -11368,7 +11680,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11368
11680
  class: vue.normalizeClass(_ctx.$style["widget-back-button"]),
11369
11681
  onClick: headerBack
11370
11682
  }, [
11371
- vue.createVNode(_sfc_main$i, { icon: "back" })
11683
+ vue.createVNode(_sfc_main$j, { icon: "back" })
11372
11684
  ], 10, _hoisted_1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_2)),
11373
11685
  vue.createElementVNode("h1", null, vue.toDisplayString(siteStatus.value && props.entrypoint.site ? vue.unref(t)("common.update_title") : title.value), 1),
11374
11686
  vue.createElementVNode("button", {
@@ -11376,10 +11688,12 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11376
11688
  "aria-label": vue.unref(t)("common.close"),
11377
11689
  onClick: close
11378
11690
  }, [
11379
- vue.createVNode(_sfc_main$i, { icon: "close" })
11691
+ vue.createVNode(_sfc_main$j, { icon: "close" })
11380
11692
  ], 10, _hoisted_3)
11381
11693
  ], 2),
11382
11694
  vue.createElementVNode("div", {
11695
+ ref_key: "widgetContent",
11696
+ ref: widgetContent,
11383
11697
  class: vue.normalizeClass(_ctx.$style["widget-content"])
11384
11698
  }, [
11385
11699
  credentialFlow.value ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -11458,19 +11772,28 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11458
11772
  loading.value ? (vue.openBlock(), vue.createBlock(AppLoader, { key: 0 })) : vue.createCommentVNode("", true),
11459
11773
  !loading.value && !dataError.value && !noFilteredData.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
11460
11774
  !siteStatus.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
11461
- countryId.value && !organizationTypeId.value ? (vue.openBlock(), vue.createBlock(InstitutionFilters, {
11775
+ props.navigation.displayFullSiteList && !organizationSiteId.value ? (vue.openBlock(), vue.createBlock(FullSiteList, {
11462
11776
  key: 0,
11777
+ search: fullSiteListSearch.value,
11778
+ "onUpdate:search": _cache[1] || (_cache[1] = ($event) => fullSiteListSearch.value = $event),
11779
+ "assets-path": vue.unref(assetsPath),
11780
+ catalog: fullSiteCatalog.value,
11781
+ "show-logo": props.navigation.displayLogoImages,
11782
+ onSelect: selectFullSiteListOrganization
11783
+ }, null, 8, ["search", "assets-path", "catalog", "show-logo"])) : vue.createCommentVNode("", true),
11784
+ !props.navigation.displayFullSiteList && countryId.value && !organizationTypeId.value ? (vue.openBlock(), vue.createBlock(InstitutionFilters, {
11785
+ key: 1,
11463
11786
  "country-id": countryId.value,
11464
- "onUpdate:countryId": _cache[1] || (_cache[1] = ($event) => countryId.value = $event),
11787
+ "onUpdate:countryId": _cache[2] || (_cache[2] = ($event) => countryId.value = $event),
11465
11788
  "organization-type-id": organizationTypeId.value,
11466
- "onUpdate:organizationTypeId": _cache[2] || (_cache[2] = ($event) => organizationTypeId.value = $event),
11789
+ "onUpdate:organizationTypeId": _cache[3] || (_cache[3] = ($event) => organizationTypeId.value = $event),
11467
11790
  "filtered-countries": filteredCountries.value,
11468
11791
  "filtered-organization-types": filteredOrganizationTypes.value,
11469
11792
  "select-class": props.navigation.selectClass,
11470
11793
  "show-countries": !props.navigation.hideSelectCountry
11471
11794
  }, null, 8, ["country-id", "organization-type-id", "filtered-countries", "filtered-organization-types", "select-class", "show-countries"])) : vue.createCommentVNode("", true),
11472
11795
  countryId.value && organizationTypeId.value && !organizationSiteId.value ? (vue.openBlock(), vue.createBlock(OrganizationSitesList, {
11473
- key: 1,
11796
+ key: 2,
11474
11797
  "assets-path": vue.unref(assetsPath),
11475
11798
  items: filteredOrganizationSites.value,
11476
11799
  "show-logo": props.navigation.displayLogoImages,
@@ -11478,7 +11801,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11478
11801
  onSelect: selectOrganizationSite
11479
11802
  }, null, 8, ["assets-path", "items", "show-logo", "show-plaid-sites-button"])) : vue.createCommentVNode("", true),
11480
11803
  countryId.value && organizationTypeId.value && organizationSiteId.value ? (vue.openBlock(), vue.createBlock(SitesList, {
11481
- key: 2,
11804
+ key: 3,
11482
11805
  "assets-path": vue.unref(assetsPath),
11483
11806
  items: filteredSites.value,
11484
11807
  organization: filteredOrganizationSites.value.find(
@@ -11509,7 +11832,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11509
11832
  onConsentRejected: consentRejected,
11510
11833
  onError: connectError,
11511
11834
  onSuccess: siteSucess,
11512
- onValid: _cache[3] || (_cache[3] = () => siteSubmitted(true))
11835
+ onValid: _cache[4] || (_cache[4] = () => siteSubmitted(true))
11513
11836
  }, null, 8, ["assets-path", "button-disabled-style", "consent", "consent-loading", "disable-form-autocomplete", "display-back-button", "error-message", "loader-message", "require-consent", "select-class", "show-logo", "show-password-style", "site", "test-mode"])) : siteStatus.value === "start" || siteStatus.value === "loading" ? (vue.openBlock(), vue.createBlock(SiteForm, {
11514
11837
  key: 1,
11515
11838
  "assets-path": vue.unref(assetsPath),
@@ -11569,7 +11892,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11569
11892
  "show-logo": props.navigation.displayLogoImages,
11570
11893
  type: vue.unref(site).finalResponse,
11571
11894
  onAddOther: resetSites,
11572
- onSelectAccounts: _cache[4] || (_cache[4] = () => {
11895
+ onSelectAccounts: _cache[5] || (_cache[5] = () => {
11573
11896
  selectingAccounts.value = true;
11574
11897
  })
11575
11898
  }, null, 8, ["avatar", "display-accounts-selection", "display-add-another-button", "long-message", "message", "show-logo", "type"]))
@@ -11580,7 +11903,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11580
11903
  key: 2,
11581
11904
  class: vue.normalizeClass(_ctx.$style["widget-data-error"])
11582
11905
  }, [
11583
- vue.createVNode(_sfc_main$i, { icon: "x-circle" }),
11906
+ vue.createVNode(_sfc_main$j, { icon: "x-circle" }),
11584
11907
  vue.createElementVNode("h2", null, vue.toDisplayString(vue.unref(t)(`${dataError.value}short_description`)), 1),
11585
11908
  vue.createElementVNode("p", null, vue.toDisplayString(vue.unref(t)(`${dataError.value}long_description`)), 1),
11586
11909
  vue.createElementVNode("button", {
@@ -11592,7 +11915,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
11592
11915
  key: 3,
11593
11916
  class: vue.normalizeClass(_ctx.$style["widget-data-error"])
11594
11917
  }, [
11595
- vue.createVNode(_sfc_main$i, { icon: "x-circle" }),
11918
+ vue.createVNode(_sfc_main$j, { icon: "x-circle" }),
11596
11919
  vue.createElementVNode("p", null, vue.toDisplayString(vue.unref(t)("common.no_filtered_data")), 1),
11597
11920
  vue.createElementVNode("button", {
11598
11921
  class: "pb-w-sync_primary-button",
@@ -11649,6 +11972,7 @@ const defaultConfig = {
11649
11972
  displayBusinessSites: true,
11650
11973
  displayCredentialInModal: false,
11651
11974
  displayErrorsInToast: true,
11975
+ displayFullSiteList: false,
11652
11976
  displayLogoImages: true,
11653
11977
  displayLongDescription: false,
11654
11978
  displayPersonalSites: true,
@@ -11696,6 +12020,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
11696
12020
  token: {}
11697
12021
  },
11698
12022
  setup(__props, { expose: __expose }) {
12023
+ var _a;
11699
12024
  const props = __props;
11700
12025
  const widgetComponent = vue.ref(null);
11701
12026
  const { t } = vueI18n.useI18n();
@@ -11720,6 +12045,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
11720
12045
  ...removeUndefineds(props.config.navigation)
11721
12046
  },
11722
12047
  refreshTokenFunction: props.refreshTokenFunction,
12048
+ requestedCountry: (_a = props.config.entrypoint) == null ? void 0 : _a.country,
11723
12049
  strict: props.strict,
11724
12050
  token: props.token,
11725
12051
  onTokenRefreshed: (newToken) => {
@@ -11738,6 +12064,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
11738
12064
  });
11739
12065
  }
11740
12066
  function setConfig(config = {}) {
12067
+ var _a2;
11741
12068
  try {
11742
12069
  configValidator.validateSync(config);
11743
12070
  } catch (error2) {
@@ -11753,6 +12080,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
11753
12080
  ...defaultConfig.entrypoint,
11754
12081
  ...removeUndefineds(config.entrypoint)
11755
12082
  };
12083
+ childProperties.requestedCountry = (_a2 = config.entrypoint) == null ? void 0 : _a2.country;
11756
12084
  childProperties.internal = {
11757
12085
  ...defaultConfig.__internal__,
11758
12086
  ...removeUndefineds(config.__internal__)
@@ -11777,6 +12105,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
11777
12105
  return widgetComponent.value.setToken(token, strict);
11778
12106
  }
11779
12107
  function upsertConfig(config = {}) {
12108
+ var _a2;
11780
12109
  try {
11781
12110
  configValidator.validateSync(config);
11782
12111
  } catch (error2) {
@@ -11792,6 +12121,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
11792
12121
  ...childProperties.entrypoint,
11793
12122
  ...removeUndefineds(config.entrypoint)
11794
12123
  };
12124
+ childProperties.requestedCountry = ((_a2 = config.entrypoint) == null ? void 0 : _a2.country) ?? childProperties.requestedCountry;
11795
12125
  childProperties.internal = {
11796
12126
  ...childProperties.internal,
11797
12127
  ...removeUndefineds(config.__internal__)
@@ -12016,6 +12346,7 @@ const staticMethods = {
12016
12346
  updateCredential
12017
12347
  };
12018
12348
  initFirebase();
12349
+ const mountedApps = /* @__PURE__ */ new WeakMap();
12019
12350
  class SyncfyWidget {
12020
12351
  /**
12021
12352
  *
@@ -12050,6 +12381,7 @@ class SyncfyWidget {
12050
12381
  * @param {Boolean} params.config.navigation.displayBusinessSites
12051
12382
  * @param {Boolean} params.config.navigation.displayCredentialInModal
12052
12383
  * @param {Boolean} params.config.navigation.displayErrorsInToast
12384
+ * @param {Boolean} params.config.navigation.displayFullSiteList Lists every site by country and category instead of asking for filters.
12053
12385
  * @param {Boolean} params.config.navigation.displayLogoImages Indicates if widget should show organizations logo.
12054
12386
  * @param {Boolean} params.config.navigation.displayLongDescription
12055
12387
  * @param {Boolean} params.config.navigation.displayPersonalSites
@@ -12087,6 +12419,7 @@ class SyncfyWidget {
12087
12419
  *
12088
12420
  */
12089
12421
  constructor(params) {
12422
+ var _a;
12090
12423
  const rollbar = new Rollbar({
12091
12424
  accessToken: "2d928ea9aa674c6ea84dbf6f3901a403",
12092
12425
  captureUncaught: false,
@@ -12147,7 +12480,13 @@ class SyncfyWidget {
12147
12480
  });
12148
12481
  }
12149
12482
  app2.provide(rootEmitter, emitter);
12150
- const rootComponent = app2.mount(_params.element || "#widget");
12483
+ const element = _params.element || "#widget";
12484
+ const container2 = typeof element === "string" ? document.querySelector(element) : element;
12485
+ if (container2) {
12486
+ (_a = mountedApps.get(container2)) == null ? void 0 : _a.unmount();
12487
+ mountedApps.set(container2, app2);
12488
+ }
12489
+ const rootComponent = app2.mount(element);
12151
12490
  return {
12152
12491
  on,
12153
12492
  close: rootComponent.close,