@unvired/turboforms-embed-sdk 2.0.82 → 2.0.84
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.
- package/dist/turboforms.esm.js +9 -9
- package/dist/turboforms.html +618 -56
- package/dist/turboforms.js +9 -9
- package/package.json +1 -1
package/dist/turboforms.html
CHANGED
|
@@ -30017,8 +30017,8 @@ span.flatpickr-weekday {
|
|
|
30017
30017
|
border-color: var(--tf-primary-color) !important;
|
|
30018
30018
|
box-shadow: 0 0 0 1px rgba(9, 95, 23, 0.1) !important;
|
|
30019
30019
|
}</style>
|
|
30020
|
-
<style>.tf-embed-sdk .btn:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn),
|
|
30021
|
-
.tf-embed-sdk button:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn) {
|
|
30020
|
+
<style>.tf-embed-sdk .btn:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn):not(.tf-tabs-toggle):not(.tf-vertical-tabs-toggle):not(.tf-tabs-scroll-btn),
|
|
30021
|
+
.tf-embed-sdk button:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn):not(.tf-tabs-toggle):not(.tf-vertical-tabs-toggle):not(.tf-tabs-scroll-btn) {
|
|
30022
30022
|
font-family: var(--tf-app-font-family) !important;
|
|
30023
30023
|
font-weight: 400 !important;
|
|
30024
30024
|
background-color: var(--tf-primary-color) !important;
|
|
@@ -30027,8 +30027,8 @@ span.flatpickr-weekday {
|
|
|
30027
30027
|
border-radius: 8px !important;
|
|
30028
30028
|
font-size: var(--tf-app-font-size-base);
|
|
30029
30029
|
}
|
|
30030
|
-
.tf-embed-sdk .btn:hover:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn),
|
|
30031
|
-
.tf-embed-sdk button:hover:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn) {
|
|
30030
|
+
.tf-embed-sdk .btn:hover:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn):not(.tf-tabs-toggle):not(.tf-vertical-tabs-toggle):not(.tf-tabs-scroll-btn),
|
|
30031
|
+
.tf-embed-sdk button:hover:not(.formio-button-remove-row):not(.choices__button):not(.footer-btn):not(.tf-tabs-toggle):not(.tf-vertical-tabs-toggle):not(.tf-tabs-scroll-btn) {
|
|
30032
30032
|
filter: brightness(1.1) !important;
|
|
30033
30033
|
}
|
|
30034
30034
|
.tf-embed-sdk .formio-button-remove-row {
|
|
@@ -30292,12 +30292,12 @@ span.flatpickr-weekday {
|
|
|
30292
30292
|
}
|
|
30293
30293
|
}
|
|
30294
30294
|
.tf-embed-sdk .formio-component-columns label:not(.custom-control-label):not(.table label) {
|
|
30295
|
-
display: inline-
|
|
30296
|
-
|
|
30297
|
-
|
|
30298
|
-
overflow: visible !important;
|
|
30295
|
+
display: inline-block !important;
|
|
30296
|
+
max-width: calc(100% - 16px) !important;
|
|
30297
|
+
overflow: hidden !important;
|
|
30299
30298
|
text-overflow: ellipsis !important;
|
|
30300
30299
|
white-space: nowrap !important;
|
|
30300
|
+
vertical-align: middle !important;
|
|
30301
30301
|
}
|
|
30302
30302
|
.tf-embed-sdk .formio-component-columns label [ref=tooltip] {
|
|
30303
30303
|
flex-shrink: 0 !important;
|
|
@@ -30686,10 +30686,17 @@ span.flatpickr-weekday {
|
|
|
30686
30686
|
background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
30687
30687
|
background: transparent !important;
|
|
30688
30688
|
color: #64748b !important;
|
|
30689
|
-
|
|
30690
|
-
|
|
30691
|
-
|
|
30689
|
+
font-size: var(--tf-app-font-size-base) !important;
|
|
30690
|
+
display: inline-block !important;
|
|
30691
|
+
max-width: calc(100% - 24px) !important;
|
|
30692
|
+
overflow: hidden !important;
|
|
30693
|
+
text-overflow: ellipsis !important;
|
|
30692
30694
|
white-space: nowrap !important;
|
|
30695
|
+
line-height: normal !important;
|
|
30696
|
+
}
|
|
30697
|
+
.tf-embed-sdk .formio-component-select > .col-form-label,
|
|
30698
|
+
.tf-embed-sdk .formio-component-barcodeselect > .col-form-label {
|
|
30699
|
+
max-width: calc(100% - 36px) !important;
|
|
30693
30700
|
}
|
|
30694
30701
|
.tf-embed-sdk .col-form-label [ref=tooltip],
|
|
30695
30702
|
.tf-embed-sdk .col-form-label .bi-question-circle,
|
|
@@ -30763,7 +30770,6 @@ span.flatpickr-weekday {
|
|
|
30763
30770
|
.tf-embed-sdk .formio-component-tags .form-control,
|
|
30764
30771
|
.tf-embed-sdk .formio-component-barcodeselect .form-control {
|
|
30765
30772
|
min-height: 2.6rem !important;
|
|
30766
|
-
padding-bottom: 0px !important;
|
|
30767
30773
|
}
|
|
30768
30774
|
.tf-embed-sdk .formio-component-textarea .form-control,
|
|
30769
30775
|
.tf-embed-sdk .formio-component-textArea .form-control {
|
|
@@ -30930,7 +30936,7 @@ span.flatpickr-weekday {
|
|
|
30930
30936
|
top: -8px !important;
|
|
30931
30937
|
left: 12px !important;
|
|
30932
30938
|
transform: translateY(0) !important;
|
|
30933
|
-
font-size:
|
|
30939
|
+
font-size: var(--tf-app-font-size-base) !important;
|
|
30934
30940
|
font-weight: 600 !important;
|
|
30935
30941
|
color: var(--tf-text-override, var(--tf-app-floating-label-color)) !important;
|
|
30936
30942
|
background: #ffffff !important;
|
|
@@ -30984,15 +30990,19 @@ span.flatpickr-weekday {
|
|
|
30984
30990
|
.tf-embed-sdk .formio-component-select label:has(~ div .choices__list--single .choices__item:not(.choices__placeholder):not(:empty)),
|
|
30985
30991
|
.tf-embed-sdk .formio-component-select:not(:has(.choices)):has(select option:checked:not([value=""]):not([value=" "])) > .col-form-label,
|
|
30986
30992
|
.tf-embed-sdk .formio-component-select:not(:has(.choices)):has(select option:checked:not([value=""]):not([value=" "])) label {
|
|
30987
|
-
top: -
|
|
30993
|
+
top: -8px !important;
|
|
30988
30994
|
left: 12px !important;
|
|
30989
30995
|
transform: translateY(0) !important;
|
|
30990
|
-
font-size:
|
|
30996
|
+
font-size: var(--tf-app-font-size-base) !important;
|
|
30991
30997
|
font-weight: 600 !important;
|
|
30992
30998
|
color: var(--tf-text-override, var(--tf-app-label-color)) !important;
|
|
30993
30999
|
background: #ffffff !important;
|
|
30994
31000
|
padding: 0 6px !important;
|
|
30995
31001
|
z-index: 20 !important;
|
|
31002
|
+
max-width: calc(100% - 24px) !important;
|
|
31003
|
+
overflow: hidden !important;
|
|
31004
|
+
text-overflow: ellipsis !important;
|
|
31005
|
+
white-space: nowrap !important;
|
|
30996
31006
|
}
|
|
30997
31007
|
.tf-embed-sdk .formio-component-textfield:focus-within > .col-form-label,
|
|
30998
31008
|
.tf-embed-sdk .formio-component-smartId:focus-within > .col-form-label,
|
|
@@ -31142,6 +31152,40 @@ span.flatpickr-weekday {
|
|
|
31142
31152
|
.tf-embed-sdk.formio-dialog.formio-dialog-closing .col-form-label {
|
|
31143
31153
|
opacity: 0 !important;
|
|
31144
31154
|
transition: none !important;
|
|
31155
|
+
}
|
|
31156
|
+
@media (max-width: 480px) {
|
|
31157
|
+
.tf-embed-sdk .col-form-label {
|
|
31158
|
+
max-width: calc(100% - 20px) !important;
|
|
31159
|
+
}
|
|
31160
|
+
}
|
|
31161
|
+
@media (max-width: 360px) {
|
|
31162
|
+
.tf-embed-sdk .col-form-label {
|
|
31163
|
+
left: 8px !important;
|
|
31164
|
+
max-width: calc(100% - 16px) !important;
|
|
31165
|
+
}
|
|
31166
|
+
.tf-embed-sdk .formio-component-textfield > .col-form-label,
|
|
31167
|
+
.tf-embed-sdk .formio-component-smartId > .col-form-label,
|
|
31168
|
+
.tf-embed-sdk .formio-component-email > .col-form-label,
|
|
31169
|
+
.tf-embed-sdk .formio-component-password > .col-form-label,
|
|
31170
|
+
.tf-embed-sdk .formio-component-number > .col-form-label,
|
|
31171
|
+
.tf-embed-sdk .formio-component-phoneNumber > .col-form-label,
|
|
31172
|
+
.tf-embed-sdk .formio-component-textarea > .col-form-label,
|
|
31173
|
+
.tf-embed-sdk .formio-component-datetime > .col-form-label,
|
|
31174
|
+
.tf-embed-sdk .formio-component-dateTime > .col-form-label,
|
|
31175
|
+
.tf-embed-sdk .formio-component-time > .col-form-label,
|
|
31176
|
+
.tf-embed-sdk .formio-component-day > .col-form-label,
|
|
31177
|
+
.tf-embed-sdk .formio-component-currency > .col-form-label,
|
|
31178
|
+
.tf-embed-sdk .formio-component-select > .col-form-label,
|
|
31179
|
+
.tf-embed-sdk .formio-component-tags > .col-form-label,
|
|
31180
|
+
.tf-embed-sdk .formio-component-barcodeselect > .col-form-label,
|
|
31181
|
+
.tf-embed-sdk .formio-component-address > .col-form-label,
|
|
31182
|
+
.tf-embed-sdk .formio-component-location > .col-form-label,
|
|
31183
|
+
.tf-embed-sdk .formio-component-barcode .col-form-label,
|
|
31184
|
+
.tf-embed-sdk .formio-component-barcodeselect .col-form-label,
|
|
31185
|
+
.tf-embed-sdk .formio-component-url .col-form-label,
|
|
31186
|
+
.tf-embed-sdk .formio-component-website .col-form-label {
|
|
31187
|
+
left: 8px !important;
|
|
31188
|
+
}
|
|
31145
31189
|
}</style>
|
|
31146
31190
|
<style>.tf-embed-sdk.formio-form,
|
|
31147
31191
|
.tf-embed-sdk .formio-form,
|
|
@@ -31944,7 +31988,7 @@ span.flatpickr-weekday {
|
|
|
31944
31988
|
padding: 0.8rem !important;
|
|
31945
31989
|
width: 100% !important;
|
|
31946
31990
|
}
|
|
31947
|
-
.tf-embed-sdk .formio-component-datagrid td[data-label]::before {
|
|
31991
|
+
.tf-embed-sdk .formio-component-datagrid td[data-label]:not([data-label=""]):not(:has(.tf-datagrid-mobile-label))::before {
|
|
31948
31992
|
content: attr(data-label);
|
|
31949
31993
|
display: block;
|
|
31950
31994
|
font-family: var(--tf-app-font-family) !important;
|
|
@@ -31954,6 +31998,34 @@ span.flatpickr-weekday {
|
|
|
31954
31998
|
color: var(--tf-app-font-color, #333);
|
|
31955
31999
|
text-align: left;
|
|
31956
32000
|
}
|
|
32001
|
+
.tf-embed-sdk .formio-component-datagrid td[data-label=""]::before,
|
|
32002
|
+
.tf-embed-sdk .formio-component-datagrid td:has([ref=removeRow])::before,
|
|
32003
|
+
.tf-embed-sdk .formio-component-datagrid td:has(.formio-button-remove-row)::before,
|
|
32004
|
+
.tf-embed-sdk .formio-component-datagrid td:has(.tf-datagrid-mobile-label)::before {
|
|
32005
|
+
display: none !important;
|
|
32006
|
+
content: none !important;
|
|
32007
|
+
}
|
|
32008
|
+
.tf-embed-sdk .formio-component-datagrid .tf-datagrid-mobile-label,
|
|
32009
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td .tf-datagrid-mobile-label,
|
|
32010
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > label:not(.form-check-label):not(.custom-control-label),
|
|
32011
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > .col-form-label:not(.form-check-label),
|
|
32012
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > [ref=label]:not(.form-check-label),
|
|
32013
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > label:not(.form-check-label):not(.custom-control-label),
|
|
32014
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > .col-form-label:not(.form-check-label),
|
|
32015
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > [ref=label]:not(.form-check-label) {
|
|
32016
|
+
display: block !important;
|
|
32017
|
+
visibility: visible !important;
|
|
32018
|
+
position: static !important;
|
|
32019
|
+
transform: none !important;
|
|
32020
|
+
font-family: var(--tf-app-font-family) !important;
|
|
32021
|
+
font-weight: 600 !important;
|
|
32022
|
+
font-size: var(--tf-app-font-size-base) !important;
|
|
32023
|
+
color: var(--tf-app-font-color, #333) !important;
|
|
32024
|
+
margin-bottom: 0.25rem !important;
|
|
32025
|
+
height: auto !important;
|
|
32026
|
+
min-height: auto !important;
|
|
32027
|
+
line-height: var(--tf-app-line-height, 1.4) !important;
|
|
32028
|
+
}
|
|
31957
32029
|
}
|
|
31958
32030
|
.tf-embed-sdk .formio-component-datagrid .row [class*=col-] {
|
|
31959
32031
|
min-width: 60px !important;
|
|
@@ -31963,23 +32035,31 @@ span.flatpickr-weekday {
|
|
|
31963
32035
|
.tf-embed-sdk .formio-component-datagrid .row [class*=col-]:has(.formio-component-select) {
|
|
31964
32036
|
min-width: 50px !important;
|
|
31965
32037
|
}
|
|
31966
|
-
|
|
31967
|
-
.tf-embed-sdk .formio-component-datagrid
|
|
31968
|
-
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td
|
|
31969
|
-
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > .control-label
|
|
31970
|
-
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-
|
|
31971
|
-
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-
|
|
31972
|
-
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-
|
|
31973
|
-
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > .control-label
|
|
31974
|
-
|
|
31975
|
-
|
|
31976
|
-
|
|
31977
|
-
|
|
31978
|
-
|
|
31979
|
-
|
|
31980
|
-
|
|
31981
|
-
|
|
31982
|
-
|
|
32038
|
+
@media (min-width: 769px) {
|
|
32039
|
+
.tf-embed-sdk .formio-component-datagrid .tf-datagrid-mobile-label,
|
|
32040
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td .tf-datagrid-mobile-label,
|
|
32041
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > label:not(.form-check-label):not(.custom-control-label),
|
|
32042
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > .col-form-label,
|
|
32043
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > [ref=label],
|
|
32044
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-component > .control-label--hidden,
|
|
32045
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > label:not(.form-check-label):not(.custom-control-label),
|
|
32046
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > .col-form-label,
|
|
32047
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > [ref=label],
|
|
32048
|
+
.tf-embed-sdk .formio-component-datagrid table.datagrid-table > tbody > tr > td > .formio-form-group > .control-label--hidden {
|
|
32049
|
+
display: none !important;
|
|
32050
|
+
margin: 0 !important;
|
|
32051
|
+
padding: 0 !important;
|
|
32052
|
+
height: 0 !important;
|
|
32053
|
+
min-height: 0 !important;
|
|
32054
|
+
line-height: 0 !important;
|
|
32055
|
+
font-size: 0 !important;
|
|
32056
|
+
border: none !important;
|
|
32057
|
+
visibility: hidden !important;
|
|
32058
|
+
}
|
|
32059
|
+
}
|
|
32060
|
+
.tf-embed-sdk .formio-component-datagrid td .choices__list--single .choices__item {
|
|
32061
|
+
display: block !important;
|
|
32062
|
+
color: var(--tf-app-font-color, #1e293b) !important;
|
|
31983
32063
|
}
|
|
31984
32064
|
.tf-embed-sdk .formio-component-label-hidden > label.control-label--hidden,
|
|
31985
32065
|
.tf-embed-sdk .formio-component-label-hidden > .control-label--hidden {
|
|
@@ -32008,14 +32088,113 @@ span.flatpickr-weekday {
|
|
|
32008
32088
|
border-radius: 8px !important;
|
|
32009
32089
|
overflow: hidden !important;
|
|
32010
32090
|
}
|
|
32011
|
-
.tf-embed-sdk .
|
|
32091
|
+
.tf-embed-sdk .tf-tabs-scroll-btn {
|
|
32092
|
+
display: flex !important;
|
|
32093
|
+
align-items: center !important;
|
|
32094
|
+
justify-content: center !important;
|
|
32095
|
+
width: 28px !important;
|
|
32096
|
+
height: 28px !important;
|
|
32097
|
+
min-width: 28px !important;
|
|
32098
|
+
max-width: 28px !important;
|
|
32099
|
+
border-radius: 50% !important;
|
|
32100
|
+
border: 1px solid var(--tf-border-color, #cbd5e1) !important;
|
|
32012
32101
|
background: #ffffff !important;
|
|
32013
|
-
|
|
32014
|
-
|
|
32102
|
+
background-color: #ffffff !important;
|
|
32103
|
+
color: var(--tf-app-font-color, #475569) !important;
|
|
32104
|
+
cursor: pointer !important;
|
|
32105
|
+
flex-shrink: 0 !important;
|
|
32106
|
+
padding: 0 !important;
|
|
32107
|
+
margin: 0 4px !important;
|
|
32108
|
+
transition: all 0.2s ease !important;
|
|
32109
|
+
z-index: 2 !important;
|
|
32110
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
|
|
32111
|
+
}
|
|
32112
|
+
.tf-embed-sdk .tf-tabs-scroll-btn:hover {
|
|
32113
|
+
background: #f1f5f9 !important;
|
|
32114
|
+
background-color: #f1f5f9 !important;
|
|
32115
|
+
color: var(--tf-primary-color, #2563eb) !important;
|
|
32116
|
+
border-color: var(--tf-primary-color, #2563eb) !important;
|
|
32117
|
+
transform: scale(1.08) !important;
|
|
32118
|
+
}
|
|
32119
|
+
.tf-embed-sdk .tf-tabs-scroll-btn:disabled,
|
|
32120
|
+
.tf-embed-sdk .tf-tabs-scroll-btn.tf-scroll-disabled {
|
|
32121
|
+
opacity: 0.25 !important;
|
|
32122
|
+
cursor: not-allowed !important;
|
|
32123
|
+
transform: none !important;
|
|
32124
|
+
pointer-events: none !important;
|
|
32015
32125
|
}
|
|
32016
|
-
.tf-embed-sdk .
|
|
32017
|
-
|
|
32018
|
-
|
|
32126
|
+
.tf-embed-sdk .tf-tabs-scroll-btn.tf-scroll-hidden {
|
|
32127
|
+
display: none !important;
|
|
32128
|
+
}
|
|
32129
|
+
@media (min-width: 769px) {
|
|
32130
|
+
.tf-embed-sdk .formio-component-tabs > .card:not(.card-vertical) > .card-header {
|
|
32131
|
+
background: #ffffff !important;
|
|
32132
|
+
border-bottom: 0 !important;
|
|
32133
|
+
padding: 0.4rem 0.5rem 0 !important;
|
|
32134
|
+
display: flex !important;
|
|
32135
|
+
align-items: center !important;
|
|
32136
|
+
position: relative !important;
|
|
32137
|
+
overflow: hidden !important;
|
|
32138
|
+
}
|
|
32139
|
+
.tf-embed-sdk .formio-component-tabs > .card:not(.card-vertical) > .card-header > .tab-component-tabs.nav {
|
|
32140
|
+
display: flex !important;
|
|
32141
|
+
flex-wrap: nowrap !important;
|
|
32142
|
+
overflow-x: auto !important;
|
|
32143
|
+
overflow-y: hidden !important;
|
|
32144
|
+
scrollbar-width: none !important;
|
|
32145
|
+
-ms-overflow-style: none !important;
|
|
32146
|
+
flex: 1 1 auto !important;
|
|
32147
|
+
margin-bottom: 0 !important;
|
|
32148
|
+
gap: 0.5rem !important;
|
|
32149
|
+
border-bottom: none !important;
|
|
32150
|
+
scroll-behavior: smooth !important;
|
|
32151
|
+
}
|
|
32152
|
+
.tf-embed-sdk .formio-component-tabs > .card:not(.card-vertical) > .card-header > .tab-component-tabs.nav::-webkit-scrollbar {
|
|
32153
|
+
display: none !important;
|
|
32154
|
+
width: 0 !important;
|
|
32155
|
+
height: 0 !important;
|
|
32156
|
+
}
|
|
32157
|
+
.tf-embed-sdk .formio-component-tabs > .card:not(.card-vertical) .tab-component-tabs .nav-item {
|
|
32158
|
+
flex-shrink: 0 !important;
|
|
32159
|
+
white-space: nowrap !important;
|
|
32160
|
+
}
|
|
32161
|
+
.tf-embed-sdk .formio-component-tabs > .card:not(.card-vertical) .tab-component-tabs .nav-link {
|
|
32162
|
+
white-space: nowrap !important;
|
|
32163
|
+
padding: 0.5rem 0.5rem !important;
|
|
32164
|
+
}
|
|
32165
|
+
.tf-embed-sdk .formio-component-tabs > .card.card-vertical {
|
|
32166
|
+
display: flex !important;
|
|
32167
|
+
flex-direction: row !important;
|
|
32168
|
+
overflow: hidden !important;
|
|
32169
|
+
align-items: stretch !important;
|
|
32170
|
+
}
|
|
32171
|
+
.tf-embed-sdk .formio-component-tabs > .card.card-vertical > .card-header {
|
|
32172
|
+
padding: 0.5rem 0 !important;
|
|
32173
|
+
border-right: 1px solid var(--tf-border-color) !important;
|
|
32174
|
+
flex: 0 0 200px !important;
|
|
32175
|
+
width: 200px !important;
|
|
32176
|
+
min-width: 200px !important;
|
|
32177
|
+
max-width: 200px !important;
|
|
32178
|
+
box-sizing: border-box !important;
|
|
32179
|
+
overflow-x: hidden !important;
|
|
32180
|
+
overflow-y: auto !important;
|
|
32181
|
+
max-height: 75vh !important;
|
|
32182
|
+
scrollbar-width: thin !important;
|
|
32183
|
+
scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
|
|
32184
|
+
}
|
|
32185
|
+
.tf-embed-sdk .formio-component-tabs > .card.card-vertical > .card-header::-webkit-scrollbar {
|
|
32186
|
+
width: 5px !important;
|
|
32187
|
+
}
|
|
32188
|
+
.tf-embed-sdk .formio-component-tabs > .card.card-vertical > .card-header::-webkit-scrollbar-track {
|
|
32189
|
+
background: transparent !important;
|
|
32190
|
+
}
|
|
32191
|
+
.tf-embed-sdk .formio-component-tabs > .card.card-vertical > .card-header::-webkit-scrollbar-thumb {
|
|
32192
|
+
background-color: rgba(0, 0, 0, 0.2) !important;
|
|
32193
|
+
border-radius: 4px !important;
|
|
32194
|
+
}
|
|
32195
|
+
.tf-embed-sdk .formio-component-tabs > .card.card-vertical > .card-header::-webkit-scrollbar-thumb:hover {
|
|
32196
|
+
background-color: rgba(0, 0, 0, 0.35) !important;
|
|
32197
|
+
}
|
|
32019
32198
|
}
|
|
32020
32199
|
.tf-embed-sdk .formio-component-tabs .card-header-tabs {
|
|
32021
32200
|
margin-bottom: 0 !important;
|
|
@@ -32024,6 +32203,20 @@ span.flatpickr-weekday {
|
|
|
32024
32203
|
border-bottom: none !important;
|
|
32025
32204
|
gap: 0.5rem !important;
|
|
32026
32205
|
}
|
|
32206
|
+
.tf-embed-sdk .formio-component-tabs .tab-component-tabs.nav-tabs-vertical,
|
|
32207
|
+
.tf-embed-sdk .nav-tabs-vertical {
|
|
32208
|
+
width: 100% !important;
|
|
32209
|
+
display: flex !important;
|
|
32210
|
+
flex-direction: column !important;
|
|
32211
|
+
border: none !important;
|
|
32212
|
+
border-right: 0 !important;
|
|
32213
|
+
border-bottom: 0 !important;
|
|
32214
|
+
}
|
|
32215
|
+
.tf-embed-sdk .formio-component-tabs .tab-component-tabs.nav-tabs-vertical .nav-item,
|
|
32216
|
+
.tf-embed-sdk .nav-tabs-vertical .nav-item {
|
|
32217
|
+
width: 100% !important;
|
|
32218
|
+
box-sizing: border-box !important;
|
|
32219
|
+
}
|
|
32027
32220
|
.tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-link {
|
|
32028
32221
|
color: var(--tf-app-font-color) !important;
|
|
32029
32222
|
font-weight: var(--tf-app-font-weight) !important;
|
|
@@ -32036,9 +32229,16 @@ span.flatpickr-weekday {
|
|
|
32036
32229
|
}
|
|
32037
32230
|
.tf-embed-sdk .formio-component-tabs .tab-component-tabs.nav-tabs-vertical .nav-link {
|
|
32038
32231
|
border-bottom: none !important;
|
|
32039
|
-
border-left:
|
|
32040
|
-
padding: 0.
|
|
32041
|
-
text-align: left;
|
|
32232
|
+
border-left: 3px solid transparent !important;
|
|
32233
|
+
padding: 0.6rem 0.75rem !important;
|
|
32234
|
+
text-align: left !important;
|
|
32235
|
+
white-space: normal !important;
|
|
32236
|
+
word-break: break-word !important;
|
|
32237
|
+
overflow-wrap: break-word !important;
|
|
32238
|
+
width: 100% !important;
|
|
32239
|
+
box-sizing: border-box !important;
|
|
32240
|
+
display: block !important;
|
|
32241
|
+
line-height: 1.35 !important;
|
|
32042
32242
|
}
|
|
32043
32243
|
.tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-link:hover {
|
|
32044
32244
|
color: var(--tf-primary-color) !important;
|
|
@@ -32068,6 +32268,228 @@ span.flatpickr-weekday {
|
|
|
32068
32268
|
}
|
|
32069
32269
|
.tf-embed-sdk .formio-component-tabs > .card.card-vertical > .tab-pane.card-body {
|
|
32070
32270
|
border-top: none !important;
|
|
32271
|
+
flex: 1 1 0% !important;
|
|
32272
|
+
min-width: 0 !important;
|
|
32273
|
+
overflow: visible !important;
|
|
32274
|
+
padding: 0.75rem !important;
|
|
32275
|
+
}
|
|
32276
|
+
.tf-embed-sdk .formio-component-tabs > .card.card-vertical .row {
|
|
32277
|
+
margin-left: 0 !important;
|
|
32278
|
+
margin-right: 0 !important;
|
|
32279
|
+
}
|
|
32280
|
+
.tf-embed-sdk .formio-component-tabs > .card.card-vertical .row > [class*=col-] {
|
|
32281
|
+
padding-left: 0.25rem !important;
|
|
32282
|
+
padding-right: 0.25rem !important;
|
|
32283
|
+
}
|
|
32284
|
+
.tf-embed-sdk .tf-tabs-mobile-bar,
|
|
32285
|
+
.tf-embed-sdk .tf-vertical-tabs-mobile-bar {
|
|
32286
|
+
display: none !important;
|
|
32287
|
+
}
|
|
32288
|
+
.tf-embed-sdk .tf-tabs-backdrop,
|
|
32289
|
+
.tf-embed-sdk .tf-vertical-tabs-backdrop {
|
|
32290
|
+
display: none !important;
|
|
32291
|
+
}
|
|
32292
|
+
@keyframes tf-tab-overlay-fade {
|
|
32293
|
+
from {
|
|
32294
|
+
opacity: 0;
|
|
32295
|
+
transform: translateY(-8px);
|
|
32296
|
+
}
|
|
32297
|
+
to {
|
|
32298
|
+
opacity: 1;
|
|
32299
|
+
transform: translateY(0);
|
|
32300
|
+
}
|
|
32301
|
+
}
|
|
32302
|
+
@media (max-width: 768px) {
|
|
32303
|
+
.tf-embed-sdk .formio-component-tabs > .card,
|
|
32304
|
+
.tf-embed-sdk .card:has(.tf-tabs-mobile-bar),
|
|
32305
|
+
.tf-embed-sdk .card:has(.tf-vertical-tabs-mobile-bar) {
|
|
32306
|
+
position: relative !important;
|
|
32307
|
+
overflow: visible !important;
|
|
32308
|
+
}
|
|
32309
|
+
.tf-embed-sdk .formio-component-tabs > .card.card-vertical,
|
|
32310
|
+
.tf-embed-sdk .card.card-vertical:has(.tf-tabs-mobile-bar) {
|
|
32311
|
+
flex-direction: column !important;
|
|
32312
|
+
}
|
|
32313
|
+
.tf-embed-sdk .tf-tabs-mobile-bar,
|
|
32314
|
+
.tf-embed-sdk .tf-vertical-tabs-mobile-bar {
|
|
32315
|
+
display: flex !important;
|
|
32316
|
+
align-items: center !important;
|
|
32317
|
+
width: 100% !important;
|
|
32318
|
+
background: #ffffff !important;
|
|
32319
|
+
border-bottom: 1px solid var(--tf-border-color, #e2e8f0) !important;
|
|
32320
|
+
padding: 0.5rem 0.75rem !important;
|
|
32321
|
+
box-sizing: border-box !important;
|
|
32322
|
+
z-index: 5 !important;
|
|
32323
|
+
}
|
|
32324
|
+
.tf-embed-sdk .tf-tabs-toggle,
|
|
32325
|
+
.tf-embed-sdk .tf-vertical-tabs-toggle {
|
|
32326
|
+
display: flex !important;
|
|
32327
|
+
align-items: center !important;
|
|
32328
|
+
justify-content: space-between !important;
|
|
32329
|
+
width: 100% !important;
|
|
32330
|
+
background: #f8fafc !important;
|
|
32331
|
+
border: 1px solid var(--tf-border-color, #cbd5e1) !important;
|
|
32332
|
+
border-radius: 6px !important;
|
|
32333
|
+
padding: 0.5rem 0.75rem !important;
|
|
32334
|
+
color: var(--tf-app-font-color, #1e293b) !important;
|
|
32335
|
+
font-size: 0.875rem !important;
|
|
32336
|
+
font-weight: 600 !important;
|
|
32337
|
+
cursor: pointer !important;
|
|
32338
|
+
box-sizing: border-box !important;
|
|
32339
|
+
transition: all 0.2s ease !important;
|
|
32340
|
+
}
|
|
32341
|
+
.tf-embed-sdk .tf-tabs-toggle:hover,
|
|
32342
|
+
.tf-embed-sdk .tf-tabs-toggle:focus,
|
|
32343
|
+
.tf-embed-sdk .tf-vertical-tabs-toggle:hover,
|
|
32344
|
+
.tf-embed-sdk .tf-vertical-tabs-toggle:focus {
|
|
32345
|
+
background: #f1f5f9 !important;
|
|
32346
|
+
border-color: var(--tf-primary-color, #2563eb) !important;
|
|
32347
|
+
outline: none !important;
|
|
32348
|
+
}
|
|
32349
|
+
.tf-embed-sdk .tf-tabs-current-title,
|
|
32350
|
+
.tf-embed-sdk .tf-vertical-tabs-current-title {
|
|
32351
|
+
flex: 1 1 auto !important;
|
|
32352
|
+
text-align: left !important;
|
|
32353
|
+
margin: 0 0.5rem !important;
|
|
32354
|
+
overflow: hidden !important;
|
|
32355
|
+
text-overflow: ellipsis !important;
|
|
32356
|
+
white-space: nowrap !important;
|
|
32357
|
+
}
|
|
32358
|
+
.tf-embed-sdk .tf-tabs-toggle-icon,
|
|
32359
|
+
.tf-embed-sdk .tf-vertical-tabs-toggle-icon {
|
|
32360
|
+
display: flex !important;
|
|
32361
|
+
align-items: center !important;
|
|
32362
|
+
color: var(--tf-primary-color, #2563eb) !important;
|
|
32363
|
+
flex-shrink: 0 !important;
|
|
32364
|
+
}
|
|
32365
|
+
.tf-embed-sdk .tf-tabs-toggle-arrow,
|
|
32366
|
+
.tf-embed-sdk .tf-vertical-tabs-toggle-arrow {
|
|
32367
|
+
display: flex !important;
|
|
32368
|
+
align-items: center !important;
|
|
32369
|
+
color: #64748b !important;
|
|
32370
|
+
flex-shrink: 0 !important;
|
|
32371
|
+
transition: transform 0.2s ease !important;
|
|
32372
|
+
}
|
|
32373
|
+
.tf-embed-sdk .tf-tabs-overlay-open .tf-tabs-toggle-arrow,
|
|
32374
|
+
.tf-embed-sdk .tf-tabs-overlay-open .tf-vertical-tabs-toggle-arrow {
|
|
32375
|
+
transform: rotate(180deg) !important;
|
|
32376
|
+
}
|
|
32377
|
+
.tf-embed-sdk .formio-component-tabs > .card > .card-header,
|
|
32378
|
+
.tf-embed-sdk .card:has(.tf-tabs-mobile-bar) > .card-header,
|
|
32379
|
+
.tf-embed-sdk .card:has(.tf-vertical-tabs-mobile-bar) > .card-header {
|
|
32380
|
+
position: absolute !important;
|
|
32381
|
+
top: 3.25rem !important;
|
|
32382
|
+
left: 0.5rem !important;
|
|
32383
|
+
right: 0.5rem !important;
|
|
32384
|
+
max-width: calc(100% - 1rem) !important;
|
|
32385
|
+
width: calc(100% - 1rem) !important;
|
|
32386
|
+
min-width: 0 !important;
|
|
32387
|
+
flex: none !important;
|
|
32388
|
+
max-height: 65vh !important;
|
|
32389
|
+
overflow-y: auto !important;
|
|
32390
|
+
overflow-x: hidden !important;
|
|
32391
|
+
background: #ffffff !important;
|
|
32392
|
+
border: 1px solid var(--tf-border-color, #cbd5e1) !important;
|
|
32393
|
+
border-radius: 8px !important;
|
|
32394
|
+
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
|
|
32395
|
+
z-index: 1050 !important;
|
|
32396
|
+
padding: 0.4rem 0 !important;
|
|
32397
|
+
display: none !important;
|
|
32398
|
+
scrollbar-width: thin !important;
|
|
32399
|
+
scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
|
|
32400
|
+
}
|
|
32401
|
+
.tf-embed-sdk .formio-component-tabs > .card.tf-tabs-overlay-open > .card-header,
|
|
32402
|
+
.tf-embed-sdk .card:has(.tf-tabs-mobile-bar).tf-tabs-overlay-open > .card-header,
|
|
32403
|
+
.tf-embed-sdk .card:has(.tf-vertical-tabs-mobile-bar).tf-tabs-overlay-open > .card-header {
|
|
32404
|
+
display: block !important;
|
|
32405
|
+
animation: tf-tab-overlay-fade 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
|
|
32406
|
+
}
|
|
32407
|
+
.tf-embed-sdk .formio-component-tabs .tf-tabs-backdrop,
|
|
32408
|
+
.tf-embed-sdk .formio-component-tabs .tf-vertical-tabs-backdrop {
|
|
32409
|
+
position: fixed !important;
|
|
32410
|
+
top: 0 !important;
|
|
32411
|
+
left: 0 !important;
|
|
32412
|
+
width: 100vw !important;
|
|
32413
|
+
height: 100vh !important;
|
|
32414
|
+
background: rgba(0, 0, 0, 0.35) !important;
|
|
32415
|
+
z-index: 1040 !important;
|
|
32416
|
+
display: none !important;
|
|
32417
|
+
}
|
|
32418
|
+
.tf-embed-sdk .formio-component-tabs > .card.tf-tabs-overlay-open .tf-tabs-backdrop,
|
|
32419
|
+
.tf-embed-sdk .formio-component-tabs > .card.tf-tabs-overlay-open .tf-vertical-tabs-backdrop {
|
|
32420
|
+
display: block !important;
|
|
32421
|
+
}
|
|
32422
|
+
.tf-embed-sdk .formio-component-tabs .tab-component-tabs.nav {
|
|
32423
|
+
display: flex !important;
|
|
32424
|
+
flex-direction: column !important;
|
|
32425
|
+
width: 100% !important;
|
|
32426
|
+
gap: 0 !important;
|
|
32427
|
+
border: none !important;
|
|
32428
|
+
margin: 0 !important;
|
|
32429
|
+
padding: 0 !important;
|
|
32430
|
+
}
|
|
32431
|
+
.tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-item {
|
|
32432
|
+
width: 100% !important;
|
|
32433
|
+
box-sizing: border-box !important;
|
|
32434
|
+
margin: 0 !important;
|
|
32435
|
+
padding: 0 !important;
|
|
32436
|
+
}
|
|
32437
|
+
.tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-link {
|
|
32438
|
+
padding: 0.65rem 1rem !important;
|
|
32439
|
+
font-size: 0.875rem !important;
|
|
32440
|
+
border: none !important;
|
|
32441
|
+
border-bottom: 1px solid #f1f5f9 !important;
|
|
32442
|
+
border-left: 3px solid transparent !important;
|
|
32443
|
+
border-radius: 0 !important;
|
|
32444
|
+
white-space: normal !important;
|
|
32445
|
+
word-break: break-word !important;
|
|
32446
|
+
text-align: left !important;
|
|
32447
|
+
width: 100% !important;
|
|
32448
|
+
box-sizing: border-box !important;
|
|
32449
|
+
display: block !important;
|
|
32450
|
+
line-height: 1.35 !important;
|
|
32451
|
+
color: var(--tf-app-font-color, #1e293b) !important;
|
|
32452
|
+
background: transparent !important;
|
|
32453
|
+
}
|
|
32454
|
+
.tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-link:hover {
|
|
32455
|
+
background-color: rgba(0, 0, 0, 0.05) !important;
|
|
32456
|
+
}
|
|
32457
|
+
.tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-link.active,
|
|
32458
|
+
.tf-embed-sdk .formio-component-tabs .tab-component-tabs .nav-item.active .nav-link {
|
|
32459
|
+
background-color: var(--tf-primary-color) !important;
|
|
32460
|
+
color: var(--tf-secondary-color, #ffffff) !important;
|
|
32461
|
+
border-left-color: var(--tf-primary-color) !important;
|
|
32462
|
+
border-bottom-color: transparent !important;
|
|
32463
|
+
}
|
|
32464
|
+
.tf-embed-sdk .formio-component-tabs > .card > .tab-pane.card-body {
|
|
32465
|
+
width: 100% !important;
|
|
32466
|
+
padding: 0.75rem !important;
|
|
32467
|
+
flex: 1 1 auto !important;
|
|
32468
|
+
box-sizing: border-box !important;
|
|
32469
|
+
border-top: none !important;
|
|
32470
|
+
}
|
|
32471
|
+
.tf-embed-sdk .formio-component-tabs > .card .row > [class*=col-] {
|
|
32472
|
+
flex: 0 0 100% !important;
|
|
32473
|
+
max-width: 100% !important;
|
|
32474
|
+
width: 100% !important;
|
|
32475
|
+
}
|
|
32476
|
+
.tf-embed-sdk .tf-tabs-scroll-btn {
|
|
32477
|
+
display: none !important;
|
|
32478
|
+
}
|
|
32479
|
+
}
|
|
32480
|
+
@media (max-width: 360px) {
|
|
32481
|
+
.tf-embed-sdk .formio-component-tabs .tf-tabs-mobile-bar,
|
|
32482
|
+
.tf-embed-sdk .formio-component-tabs .tf-vertical-tabs-mobile-bar {
|
|
32483
|
+
padding: 0.4rem 0.5rem !important;
|
|
32484
|
+
}
|
|
32485
|
+
.tf-embed-sdk .formio-component-tabs .tf-tabs-toggle,
|
|
32486
|
+
.tf-embed-sdk .formio-component-tabs .tf-vertical-tabs-toggle {
|
|
32487
|
+
font-size: 0.8rem !important;
|
|
32488
|
+
padding: 0.4rem 0.5rem !important;
|
|
32489
|
+
}
|
|
32490
|
+
.tf-embed-sdk .formio-component-tabs > .card > .tab-pane.card-body {
|
|
32491
|
+
padding: 0.4rem 0.25rem !important;
|
|
32492
|
+
}
|
|
32071
32493
|
}</style>
|
|
32072
32494
|
<style>.tf-embed-sdk [ref=tooltip] {
|
|
32073
32495
|
cursor: help !important;
|
|
@@ -32603,39 +33025,83 @@ span.flatpickr-weekday {
|
|
|
32603
33025
|
.tf-embed-sdk .formio-component-htmlelement li {
|
|
32604
33026
|
display: list-item !important;
|
|
32605
33027
|
}</style>
|
|
32606
|
-
<style>.tf-embed-sdk
|
|
33028
|
+
<style>.tf-embed-sdk nav[aria-label="Wizard navigation"],
|
|
33029
|
+
.tf-embed-sdk nav[ref*=wizard],
|
|
33030
|
+
.tf-embed-sdk nav[ref$=-header] {
|
|
33031
|
+
width: 100% !important;
|
|
33032
|
+
max-width: 100% !important;
|
|
33033
|
+
overflow-x: auto !important;
|
|
33034
|
+
overflow-y: hidden !important;
|
|
33035
|
+
-webkit-overflow-scrolling: touch;
|
|
33036
|
+
scrollbar-width: thin;
|
|
33037
|
+
scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
|
|
33038
|
+
}
|
|
33039
|
+
.tf-embed-sdk ul.breadcrumb,
|
|
32607
33040
|
.tf-embed-sdk ul.pagination {
|
|
32608
33041
|
display: flex !important;
|
|
33042
|
+
flex-wrap: nowrap !important;
|
|
32609
33043
|
justify-content: center !important;
|
|
33044
|
+
align-items: flex-start !important;
|
|
32610
33045
|
background-color: transparent !important;
|
|
32611
|
-
padding: 20px
|
|
33046
|
+
padding: 20px 24px !important;
|
|
32612
33047
|
margin-bottom: 2.5rem !important;
|
|
32613
33048
|
list-style: none !important;
|
|
32614
33049
|
position: relative !important;
|
|
32615
33050
|
border: none !important;
|
|
32616
33051
|
counter-reset: step-counter !important;
|
|
32617
33052
|
gap: 2rem !important;
|
|
33053
|
+
width: max-content !important;
|
|
33054
|
+
min-width: 100% !important;
|
|
33055
|
+
box-sizing: border-box !important;
|
|
33056
|
+
overflow-x: auto !important;
|
|
33057
|
+
overflow-y: hidden !important;
|
|
33058
|
+
-webkit-overflow-scrolling: touch;
|
|
33059
|
+
scrollbar-width: thin;
|
|
33060
|
+
scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
|
|
33061
|
+
}
|
|
33062
|
+
.tf-embed-sdk nav[aria-label="Wizard navigation"]::-webkit-scrollbar,
|
|
33063
|
+
.tf-embed-sdk nav[ref*=wizard]::-webkit-scrollbar,
|
|
33064
|
+
.tf-embed-sdk ul.breadcrumb::-webkit-scrollbar,
|
|
33065
|
+
.tf-embed-sdk ul.pagination::-webkit-scrollbar {
|
|
33066
|
+
height: 4px;
|
|
33067
|
+
}
|
|
33068
|
+
.tf-embed-sdk nav[aria-label="Wizard navigation"]::-webkit-scrollbar-track,
|
|
33069
|
+
.tf-embed-sdk nav[ref*=wizard]::-webkit-scrollbar-track,
|
|
33070
|
+
.tf-embed-sdk ul.breadcrumb::-webkit-scrollbar-track,
|
|
33071
|
+
.tf-embed-sdk ul.pagination::-webkit-scrollbar-track {
|
|
33072
|
+
background: transparent;
|
|
33073
|
+
}
|
|
33074
|
+
.tf-embed-sdk nav[aria-label="Wizard navigation"]::-webkit-scrollbar-thumb,
|
|
33075
|
+
.tf-embed-sdk nav[ref*=wizard]::-webkit-scrollbar-thumb,
|
|
33076
|
+
.tf-embed-sdk ul.breadcrumb::-webkit-scrollbar-thumb,
|
|
33077
|
+
.tf-embed-sdk ul.pagination::-webkit-scrollbar-thumb {
|
|
33078
|
+
background-color: rgba(148, 163, 184, 0.3);
|
|
33079
|
+
border-radius: 4px;
|
|
32618
33080
|
}
|
|
32619
33081
|
.tf-embed-sdk ul.breadcrumb::before,
|
|
32620
33082
|
.tf-embed-sdk ul.pagination::before {
|
|
32621
33083
|
content: "" !important;
|
|
32622
33084
|
position: absolute !important;
|
|
32623
33085
|
top: 36px !important;
|
|
32624
|
-
left:
|
|
32625
|
-
right:
|
|
33086
|
+
left: 40px !important;
|
|
33087
|
+
right: 40px !important;
|
|
32626
33088
|
height: 3px !important;
|
|
32627
33089
|
background: #e2e8f0 !important;
|
|
32628
33090
|
z-index: 1 !important;
|
|
33091
|
+
pointer-events: none !important;
|
|
32629
33092
|
}
|
|
32630
33093
|
.tf-embed-sdk ul.breadcrumb li.breadcrumb-item,
|
|
32631
33094
|
.tf-embed-sdk ul.pagination li.page-item {
|
|
32632
|
-
flex: 0
|
|
33095
|
+
flex: 0 0 auto !important;
|
|
32633
33096
|
text-align: center !important;
|
|
32634
33097
|
position: relative !important;
|
|
32635
33098
|
z-index: 2 !important;
|
|
32636
33099
|
padding: 0 !important;
|
|
32637
33100
|
background: transparent !important;
|
|
32638
|
-
min-width:
|
|
33101
|
+
min-width: 90px !important;
|
|
33102
|
+
max-width: 160px !important;
|
|
33103
|
+
word-break: break-word !important;
|
|
33104
|
+
scroll-snap-align: center;
|
|
32639
33105
|
}
|
|
32640
33106
|
.tf-embed-sdk ul.breadcrumb li.breadcrumb-item::before,
|
|
32641
33107
|
.tf-embed-sdk ul.pagination li.page-item button::before {
|
|
@@ -32784,6 +33250,78 @@ span.flatpickr-weekday {
|
|
|
32784
33250
|
padding: 0 !important;
|
|
32785
33251
|
margin: 0 !important;
|
|
32786
33252
|
overflow: hidden !important;
|
|
33253
|
+
}
|
|
33254
|
+
@media (max-width: 768px) {
|
|
33255
|
+
.tf-embed-sdk nav[aria-label="Wizard navigation"],
|
|
33256
|
+
.tf-embed-sdk nav[ref*=wizard],
|
|
33257
|
+
.tf-embed-sdk nav[ref$=-header] {
|
|
33258
|
+
padding: 0 4px !important;
|
|
33259
|
+
margin-bottom: 1.5rem !important;
|
|
33260
|
+
scroll-snap-type: x proximity;
|
|
33261
|
+
}
|
|
33262
|
+
.tf-embed-sdk ul.breadcrumb,
|
|
33263
|
+
.tf-embed-sdk ul.pagination {
|
|
33264
|
+
padding: 14px 16px !important;
|
|
33265
|
+
margin-bottom: 1.5rem !important;
|
|
33266
|
+
gap: 1.25rem !important;
|
|
33267
|
+
justify-content: center !important;
|
|
33268
|
+
justify-content: safe center !important;
|
|
33269
|
+
margin-left: auto !important;
|
|
33270
|
+
margin-right: auto !important;
|
|
33271
|
+
}
|
|
33272
|
+
.tf-embed-sdk ul.breadcrumb::before,
|
|
33273
|
+
.tf-embed-sdk ul.pagination::before {
|
|
33274
|
+
top: 28px !important;
|
|
33275
|
+
left: 24px !important;
|
|
33276
|
+
right: 24px !important;
|
|
33277
|
+
}
|
|
33278
|
+
.tf-embed-sdk ul.breadcrumb li.breadcrumb-item,
|
|
33279
|
+
.tf-embed-sdk ul.pagination li.page-item {
|
|
33280
|
+
min-width: 75px !important;
|
|
33281
|
+
max-width: 120px !important;
|
|
33282
|
+
}
|
|
33283
|
+
.tf-embed-sdk ul.breadcrumb li.breadcrumb-item::before,
|
|
33284
|
+
.tf-embed-sdk ul.pagination li.page-item button::before {
|
|
33285
|
+
width: 28px !important;
|
|
33286
|
+
height: 28px !important;
|
|
33287
|
+
font-size: 0.8rem !important;
|
|
33288
|
+
margin: 0 auto 8px !important;
|
|
33289
|
+
}
|
|
33290
|
+
.tf-embed-sdk ul.pagination li.page-item button.page-link,
|
|
33291
|
+
.tf-embed-sdk ul.breadcrumb li.breadcrumb-item a,
|
|
33292
|
+
.tf-embed-sdk ul.breadcrumb li.breadcrumb-item span,
|
|
33293
|
+
.tf-embed-sdk ul.pagination li.page-item button span {
|
|
33294
|
+
font-size: 0.8rem !important;
|
|
33295
|
+
line-height: 1.2 !important;
|
|
33296
|
+
}
|
|
33297
|
+
}
|
|
33298
|
+
@media (max-width: 480px) {
|
|
33299
|
+
.tf-embed-sdk ul.breadcrumb,
|
|
33300
|
+
.tf-embed-sdk ul.pagination {
|
|
33301
|
+
gap: 0.85rem !important;
|
|
33302
|
+
padding: 10px 12px !important;
|
|
33303
|
+
justify-content: center !important;
|
|
33304
|
+
justify-content: safe center !important;
|
|
33305
|
+
margin-left: auto !important;
|
|
33306
|
+
margin-right: auto !important;
|
|
33307
|
+
}
|
|
33308
|
+
.tf-embed-sdk ul.breadcrumb li.breadcrumb-item,
|
|
33309
|
+
.tf-embed-sdk ul.pagination li.page-item {
|
|
33310
|
+
min-width: 65px !important;
|
|
33311
|
+
max-width: 100px !important;
|
|
33312
|
+
}
|
|
33313
|
+
.tf-embed-sdk ul.breadcrumb li.breadcrumb-item::before,
|
|
33314
|
+
.tf-embed-sdk ul.pagination li.page-item button::before {
|
|
33315
|
+
width: 26px !important;
|
|
33316
|
+
height: 26px !important;
|
|
33317
|
+
font-size: 0.75rem !important;
|
|
33318
|
+
}
|
|
33319
|
+
.tf-embed-sdk ul.breadcrumb::before,
|
|
33320
|
+
.tf-embed-sdk ul.pagination::before {
|
|
33321
|
+
top: 23px !important;
|
|
33322
|
+
left: 20px !important;
|
|
33323
|
+
right: 20px !important;
|
|
33324
|
+
}
|
|
32787
33325
|
}</style>
|
|
32788
33326
|
<style>.tf-embed-sdk .component-modal-wrapper img,
|
|
32789
33327
|
.tf-embed-sdk [ref=modalContent] img,
|
|
@@ -36664,7 +37202,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
36664
37202
|
<script>(function(){window.openImagePreviewModal=function(W,$){let L="var(--tf-primary-color, #2586c7)",v="white",I="white";document.querySelector(".tf-embed-sdk")&&window.__unviredThemeData&&(window.__unviredThemeData.primaryColor&&(L=window.__unviredThemeData.primaryColor),window.__unviredThemeData.secondaryColor&&(v=window.__unviredThemeData.secondaryColor),window.__unviredThemeData.backgroundColor&&(I=window.__unviredThemeData.backgroundColor));const l=document.createElement("div");l.style.position="fixed",l.style.top="0",l.style.left="0",l.style.width="100vw",l.style.height="100vh",l.style.backgroundColor="rgba(0, 0, 0, 0.85)",l.style.display="flex",l.style.alignItems="center",l.style.justifyContent="center",l.style.zIndex="999999";const r=document.createElement("div");r.style.width="90vw",r.style.height="90vh",r.style.backgroundColor="#fff",r.style.borderRadius="8px",r.style.display="flex",r.style.flexDirection="column",r.style.overflow="hidden",r.style.boxShadow="0 4px 12px rgba(0,0,0,0.5)";const p=document.createElement("div");p.style.backgroundColor=L,p.style.color=v,p.style.padding="10px 15px",p.style.display="flex",p.style.justifyContent="space-between",p.style.alignItems="center",p.style.position="relative";const y=document.createElement("button");y.innerHTML="Reset",y.title="Reset Zoom",y.style.background="transparent",y.style.border=`1px solid ${v}`,y.style.borderRadius="4px",y.style.color=v,y.style.fontSize="12px",y.style.cursor="pointer",y.style.padding="4px 10px",p.appendChild(y);const d=document.createElement("span");d.textContent=$||"Preview",d.style.fontSize="16px",d.style.fontWeight="500",d.style.whiteSpace="nowrap",d.style.overflow="hidden",d.style.setProperty("color",v,"important"),d.style.textOverflow="ellipsis",d.style.position="absolute",d.style.left="50%",d.style.transform="translateX(-50%)",d.style.maxWidth="50%",p.appendChild(d);const h=document.createElement("button");h.innerHTML="\u2715",h.style.background="transparent",h.style.border="none",h.style.color=v,h.style.fontSize="20px",h.style.cursor="pointer",h.style.padding="0",h.style.lineHeight="1",h.addEventListener("click",t=>{t.stopPropagation(),document.body.removeChild(l)}),p.appendChild(h);const i=document.createElement("div");i.style.flex="1",i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.backgroundColor=I,i.style.overflow="hidden";const u=document.createElement("img");u.src=W,u.style.maxWidth="100%",u.style.maxHeight="100%",u.style.objectFit="contain",u.style.transition="transform 0.2s ease-in-out",i.appendChild(u);let a=1,m=0,f=0;function x(t=!1){const o=i.offsetWidth,e=i.offsetHeight,s=u.offsetWidth*a,g=u.offsetHeight*a,n=Math.abs(s-o)/2,C=Math.abs(g-e)/2;m=Math.max(-n,Math.min(m,n)),f=Math.max(-C,Math.min(f,C)),t?u.style.transition="transform 0.2s ease-in-out":u.style.transition="none",u.style.transform=`translate(${m}px, ${f}px) scale(${a})`}x(),i.addEventListener("wheel",t=>{t.preventDefault();const e=Math.exp((t.deltaY<0?1:-1)*.1);let s=a*e;s<.5&&(s=.5),s>50&&(s=50);const g=s/a,n=i.getBoundingClientRect(),C=n.width/2,D=n.height/2,T=t.clientX-n.left-C,k=t.clientY-n.top-D;m=T-(T-m)*g,f=k-(k-f)*g,a=s,x(!1)},{passive:!1});let b=null;i.addEventListener("touchstart",t=>{t.touches.length===2&&(t.preventDefault(),b=Math.hypot(t.touches[0].clientX-t.touches[1].clientX,t.touches[0].clientY-t.touches[1].clientY))},{passive:!1}),i.addEventListener("touchmove",t=>{if(t.touches.length===2&&b!==null){t.preventDefault();const o=Math.hypot(t.touches[0].clientX-t.touches[1].clientX,t.touches[0].clientY-t.touches[1].clientY),e=o/b;let s=a*e;s<.5&&(s=.5),s>50&&(s=50);const g=s/a,n=i.getBoundingClientRect(),C=n.width/2,D=n.height/2,T=(t.touches[0].clientX+t.touches[1].clientX)/2,k=(t.touches[0].clientY+t.touches[1].clientY)/2,H=T-n.left-C,j=k-n.top-D;m=H-(H-m)*g,f=j-(j-f)*g,a=s,b=o,x(!1)}},{passive:!1}),i.addEventListener("touchend",t=>{t.touches.length<2&&(b=null)});const c=document.createElement("div");c.style.backgroundColor=L,c.style.color=v,c.style.padding="10px 15px",c.style.display="flex",c.style.justifyContent="center",c.style.alignItems="center",c.style.gap="15px";const w=(t,o)=>{const e=document.createElement("button");return e.innerHTML=t,e.title=o,e.style.background="transparent",e.style.border=`1px solid ${v}`,e.style.borderRadius="4px",e.style.color=v,e.style.fontSize="18px",e.style.fontWeight="bold",e.style.cursor="pointer",e.style.width="35px",e.style.height="35px",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center",e},_=w("+","Zoom In"),P=w("\u2212","Zoom Out"),B=w("\u2190","Move Left"),S=w("\u2192","Move Right"),X=w("\u2191","Move Up"),Y=w("\u2193","Move Down");c.appendChild(_),c.appendChild(P),c.appendChild(B),c.appendChild(S),c.appendChild(X),c.appendChild(Y);const E=50;_.addEventListener("click",t=>{t.stopPropagation();let o=a+.5;o>50&&(o=50),a=o,x(!0)}),P.addEventListener("click",t=>{t.stopPropagation();let o=a-.5;o<.5&&(o=.5),a=o,x(!0)});let z=null,R=null;const M=(t,o,e)=>{const s=n=>{n.type==="touchstart"&&n.cancelable&&n.preventDefault(),n.stopPropagation(),m+=o,f+=e,x(!0),R=setTimeout(()=>{z=setInterval(()=>{m+=o*.4,f+=e*.4,x(!1)},20)},300)},g=()=>{clearTimeout(R),clearInterval(z)};t.addEventListener("mousedown",s),t.addEventListener("touchstart",s,{passive:!1}),["mouseup","mouseleave","touchend","touchcancel"].forEach(n=>{t.addEventListener(n,g)})};M(B,E,0),M(S,-E,0),M(X,0,E),M(Y,0,-E),y.addEventListener("click",t=>{t.stopPropagation(),a=1,m=0,f=0,x(!0)}),r.appendChild(p),r.appendChild(i),r.appendChild(c),l.addEventListener("click",t=>{t.target===l&&document.body.removeChild(l)}),l.appendChild(r),document.body.appendChild(l)}})();</script>
|
|
36665
37203
|
<script>(function(){const n=typeof Formio!="undefined"?Formio:typeof window!="undefined"?window.Formio:void 0,a=n&&n.Components&&n.Components.components?n.Components.components.textfield:class{static schema(){return{}}};class i extends a{constructor(o,e,r){super(o,e,r)}static schema(...o){return a.schema({type:"smartId",label:"Smart ID",input:!0,key:"smartId",inputType:"text",inputFormat:"plain",disabled:!0},...o)}static get builderInfo(){return{title:"Smart Id",group:"premium",icon:"id-card-o",weight:40,documentation:"http://help.form.io/userguide/#textfield",schema:i.schema()}}static addTemplate(o,e){Templates.templates[o]=e}get defaultSchema(){return i.schema()}render(){return super.render(this.renderTemplate("input",{input:this.inputInfo}))}attach(o){let e=new Date,r="",s="";if(Number(e.getDate())<=9&&this.component.addLeadingZeros?r="0"+e.getDate():r=e.getDate(),Number(e.getMonth())<=9&&this.component.addLeadingZeros?s="0"+Number(e.getMonth()+1):s=Number(e.getMonth()+1),this.component.addLeadingZeros&&this.component.startCounter!="undefined"&&((this.component.startCounter=="undefined"||this.component.startCounter==null)&&(this.component.startCounter=1),this.component.digitsInConter&&(this.component.startCounter=String(this.component.startCounter).padStart(this.component.digitsInConter,0))),this.component.pattern){let t=this.component.pattern;t.includes("${counter}")?(t=t.replace("${day}",r),t=t.replace("${month}",s),t=t.replace("${year}",e.getFullYear()),t=t.replace("${day}",r),t=t.replace("${counter}",this.component.startCounter),this.setValue(t)):this.resetValue()}return super.attach(o)}}n&&n.Components?n.Components.addComponent("smartId",i):typeof Formio!="undefined"&&Formio.Components&&Formio.Components.addComponent("smartId",i)})();</script>
|
|
36666
37204
|
<script>(function(){const m=Formio.Components.components.nested;class r extends m{static schema(...t){return m.schema({label:"Columns",key:"columns",type:"columns",columns:[{components:[],width:8,offset:0,push:0,pull:0,size:"md"},{components:[],width:8,offset:0,push:0,pull:0,size:"md"}],clearOnHide:!1,input:!1,tableView:!1,persistent:!1,autoAdjust:!1},...t)}static get builderInfo(){return{title:"Columns",icon:"columns",group:"layout",documentation:"/userguide/form-building/layout-components#columns",showPreview:!1,weight:10,schema:r.schema()}}constructor(t,e,o){super(t,e,o),this.rows=[]}get schema(){var e;const t=_.omit(super.schema,["components"]);return(e=t.columns)==null||e.map((o,s)=>{o.components.map((n,c)=>{const i=_.clone(n);i.internal=!0;const u=this.createComponent(i);delete u.component.internal,t.columns[s].components[c]=u.schema})}),t}get defaultSchema(){return r.schema()}get className(){return`row ${super.className}`}get columnKey(){return`column-${this.id}`}init(){super.init(),this.columns=[],_.each(this.component.columns,(t,e)=>{this.columns[e]=[],t.size||(t.size="md"),t.currentWidth=t.width||0,Array.isArray(t.components)||(t.components=[]),_.each(t.components,o=>{const s=this.createComponent(o);s.column=e,this.columns[e].push(s)})}),this.component.autoAdjust&&this.options.display!=="pdf"&&this.justify(),this.rows=this.groupByRow()}labelIsHidden(){return!0}render(){return super.render(this.renderTemplate("columns",{columnKey:this.columnKey,columnComponents:this.columns.map(t=>this.renderComponents(t))}))}justifyColumn(t,e){const o=_.every(t,i=>!i.visible),s=this.component.columns[e],n=o&&t.length?0:s.width,c=!_.isEqual(n,s.currentWidth);return s.currentWidth=n,c}justify(){return this.columns.reduce((t,e,o)=>this.justifyColumn(e,o)||t,!1)}attach(t){this.loadRefs(t,{[this.columnKey]:"multiple"});const e=super.attach(t);return this.refs[this.columnKey]&&this.refs[this.columnKey].forEach((o,s)=>this.attachComponents(o,this.columns[s],this.component.columns[s].components)),e}get gridSize(){return 12}groupByRow(){const t={stack:[],rows:[]},e=s=>s.component.width,o=_.reduce(this.components,(s,n)=>{const c=[...s.stack,n];return _.sumBy(c,e)<=this.gridSize?(s.stack=c,s):(s.rows=[...s.rows,s.stack],s.stack=[n],s)},t);return _.concat(o.rows,[o.stack])}checkData(t,e,o,s){const n=super.checkData(t,e,o,s);if(this.component.autoAdjust&&this.options.display!=="pdf"&&this.justify()){const i=document.activeElement;i&&(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.classList.contains("choices__input"))||this.redraw()}return n}detach(t){super.detach(t)}destroy(){super.destroy(),this.columns=[]}}Formio.Components.addComponent("columns",r)})();</script>
|
|
36667
|
-
<script>(function(){var
|
|
37205
|
+
<script>(function(){var u=Formio.Components;const m=u.components.htmlelement;class l extends m{constructor(e,t,i){super(e,t,i)}static schema(...e){return m.schema({label:"Smart Data Component",key:"sdc",type:"smartdata",tag:"h5",attrs:[{attr:"style",value:"padding: 15px;text-align: center;border: 2px dashed #ddd;"}],content:"Smart Data Component",input:!1,persistent:!1,hidden:!0},...e)}get key(){return _.get(this.component,"key","")}static get builderInfo(){return{title:"Smart Data",icon:"cloud",group:"premium",documentation:"http://help.form.io/userguide/#sdc",weight:30,schema:l.schema()}}get defaultSchema(){return l.schema()}get content(){if(this.builderMode)return this.component.content;const e=_.get(this.root,"submission",{});return this.component.content?this.interpolate(this.component.content,{metadata:e.metadata||{},submission:e,data:this.rootValue,row:this.data}):""}get singleTags(){return["br","img","hr"]}renderContent(){const e=_.get(this.root,"submission",{});return this.renderTemplate("html",{component:this.component,tag:this.component.tag,attrs:(this.component.attrs||[]).map(t=>({attr:t.attr,value:this.interpolate(t.value,{metadata:e.metadata||{},submission:e,data:this.rootValue,row:this.data})})),content:this.component.label,singleTags:this.singleTags})}render(){return this.component.hidden=!0,super.render(this.renderContent())}async attach(e){this.loadRefs(e,{html:"single"}),logger.info("[TF_SDK:195] \u2705 attach called");let t=this;switch(this.component.dataSrc){case"url":logger.info("[TF_SDK:196] \u2705 inside switch url"),(_.get(this.component,"trigger.prefetch.triggerSDC")==="onFormLoad"||_.get(this.component,"trigger.prefetch.init"))&&await this.executeJS()&&Formio.makeStaticRequest(this.interpolate(this.component.fetchapi.url),(this.component.fetchapi.method||"get").toUpperCase(),null,{headers:this.requestHeaders,noToken:!(this.component.fetchapi&&this.component.fetchapi.authenticate)}).then(function(c){t.assign(c)}),this.on(this.key,async a=>{t.component.trigger&&t.component.trigger.beforefetch&&(logger.info("[TF_SDK:198] \u2705 Executing beforefetch Javascript URL - Button Click"),this.evaluate(t.component.trigger.beforefetch.panel.javascript)),await this.executeJS()&&Formio.makeStaticRequest(this.interpolate(this.component.fetchapi.url),(this.component.fetchapi.method||"get").toUpperCase(),null,{headers:this.requestHeaders,noToken:!(this.component.fetchapi&&this.component.fetchapi.authenticate)}).then(function(h){t.assign(h)})},!0);break;case"workflow":logger.info("[TF_SDK:199] \u2705 inside switch workflow");const r=_.get(this.component,"trigger.prefetch.triggerSDC")==="onFormLoad"||_.get(this.component,"trigger.prefetch.init");r&&(t.component.trigger&&t.component.trigger.beforefetch&&(logger.info("[TF_SDK:200] \u2705 Executing beforefetch Javascript workflow - Init"),this.evaluate(t.component.trigger.beforefetch.panel.javascript)),this.builderMode||await this.executeJS()&&await this.executeworkflow(this.component,this.data,void 0)),(_.get(this.component,"trigger.prefetch.triggerSDC")==="onComponentAction"||_.get(this.component,"trigger.prefetch.triggerbycomponent")||!r)&&this.on(this.key,async a=>{t.component.trigger&&t.component.trigger.beforefetch?(logger.info("[TF_SDK:202] \u2705 Executing beforefetch Javascript workflow - Button Click"),this.builderMode||await this.executeJS()&&await this.executeworkflow(this.component,this.data,a?a.detail:void 0)):this.builderMode||await this.executeworkflow(this.component,this.data,a?a.detail:void 0)},!0);break}return super.attach(e)}assign(e){this.data=e;const t=_.get(this.component,"trigger.postfetch.event","SmartDataEvent");this.emitcustomformioevent(t,this.component,e)}async executeJS(){return this.component.trigger&&this.component.trigger.beforefetch&&(logger.info("[TF_SDK:203] \u2705 Executing beforefetch Javascript code"),await this.evaluate(this.component.trigger.beforefetch.panel.javascript)),!0}executeworkflow(e,t,i){let r=document.getElementsByClassName("sdc-spinner");r&&r.length>0&&(r[0].style.display="flex",r[0].style.justifyContent="center"),i||(i=t?t.equipNr:void 0);let s=this,a="",c="";if(window.formId)a=window.formId;else if(this.root&&this.root.form&&this.root.form.formId)a=this.root.form.formId;else if(this.root&&this.root._form&&this.root._form.formId)a=this.root._form.formId;else if(t&&t.formId)a=t.formId;else if(window.location&&window.location.pathname){const o=window.location.pathname.split("/");o.length>3&&o[3]&&(a=o[3].split(";")[0]||"")}e.fetchapi&&(c=e.fetchapi.workflowname||"");const h=localStorage.getItem("UMP_url")||"",p=localStorage.getItem("token")||"";console.log("[SDC] \u{1F680} Executing workflow:",{workflowName:c,componentKey:e.key,formId:a,eventData:i,formData:t,umpUrl:h||"(not configured in localStorage)"});let f=`formdata=${encodeURIComponent(JSON.stringify(t||{}))}`;if(i)if(typeof i=="object"){const o=encodeURIComponent(JSON.stringify(i));f=f+`&flowinput=${o}&eventdata=${o}`}else{const o=encodeURIComponent(i);f=f+`&flowinput=${o}&eventdata=${o}`}window.ump&&typeof window.ump.logInfo=="function"&&window.ump.logInfo("sdc","executeworkflow()","jwt token - "+p);const g=`${h}/UMP/API/v3/applications/DIGITAL_FORMS/workflow/${c}?${f}`;console.log("[SDC] \u{1F310} Request URL:",g),Formio.makeStaticRequest(g,"POST",null,{headers:{Authorization:"Bearer "+p,Accept:"application/json","Content-type":"application/json"}}).then(function(o){if(console.log("[SDC] \u2705 Workflow response received:",o),window.ump&&typeof window.ump.logInfo=="function"&&window.ump.logInfo("sdc","executeworkflow()","workflowdata - "+JSON.stringify(o)),r&&r.length>0&&(r[0].style.display="none",r[0].style.justifyContent=""),o){try{s.data.error=o.error,o.data!==""?s.data=Object.assign(s.data||{},typeof o.data=="string"?JSON.parse(o.data):o.data):s.data=Object.assign(s.data||{},o.data)}catch(w){o.data!==""&&(s.data=Object.assign(s.data||{},o.data))}s.emitcustomformioevent(s.component.trigger.postfetch.event,s.component,s.data)}}).catch(o=>{console.warn("[SDC] \u26A0\uFE0F Workflow fetch failed (expected in local testing without live UMP backend):",o),window.ump&&typeof window.ump.logInfo=="function"&&window.ump.logInfo("sdc","executeworkflow()","workflowdata error- "+JSON.stringify(o)),r&&r.length>0&&(r[0].style.display="none",r[0].style.justifyContent=""),logger.error("[TF_SDK:205] \u274C Error occured while fetching workflow data:",o),this.emitcustomformioevent("WorkflowExecuteError",this.component,o)})}emitcustomformioevent(e,t,i){if(console.log("[SDC] \u{1F4E2} Emitting custom SDC event:",e,{component:t,data:i}),window.eventtype=i,this.emit(e,{component:t,data:i}),this.component.trigger&&this.component.trigger.postfetch&&this.component.trigger.postfetch.panel&&this.component.trigger.postfetch.panel.javascript)try{this.evaluate(this.component.trigger.postfetch.panel.javascript)}catch(s){console.error("[SDC] Error evaluating postfetch JS:",s)}let r=new CustomEvent("sdcDoneEvent",{detail:{type:e,component:t,data:i}});document.dispatchEvent(r),typeof window.sendEventCallback=="function"&&window.sendEventCallback({type:e,message:e==="WorkflowExecuteError"?"SDC workflow execution failed.":"SDC workflow completed successfully.",errorMessage:e==="WorkflowExecuteError"?i&&i.message?i.message:"SDC workflow error":"",data:{component:t,sdcData:i,key:t?t.key:""}})}}l.requestHeaders={get:function(){let d=this,e=new Formio.Headers;if(this.component.fetchapi&&this.component.fetchapi.headers)try{this.component.fetchapi.headers.forEach(function(t){t.key&&e.set(n.key,d.interpolate(t.value))})}catch(t){logger.warn(t.message)}return e},enumerable:!0,configurable:!0},Formio.Components.addComponent("smartdata",l)})();</script>
|
|
36668
37206
|
<script>(function(){(function(y){typeof exports=="object"&&typeof module!="undefined"?module.exports=y():typeof define=="function"&&define.amd?define([],y):(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this).EventEmitter3=y()})(function(){return function y(p,x,w){function o(v,_){if(!x[v]){if(!p[v]){var i=typeof require=="function"&&require;if(!_&&i)return i(v,!0);if(h)return h(v,!0);var e=new Error("Cannot find module '"+v+"'");throw e.code="MODULE_NOT_FOUND",e}var t=x[v]={exports:{}};p[v][0].call(t.exports,function(n){return o(p[v][1][n]||n)},t,t.exports,y,p,x,w)}return x[v].exports}for(var h=typeof require=="function"&&require,m=0;m<w.length;m++)o(w[m]);return o}({1:[function(y,p,x){"use strict";var w=Object.prototype.hasOwnProperty,o="~";function h(){}function m(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function v(e,t,n,u,a){if(typeof n!="function")throw new TypeError("The listener must be a function");var f=new m(n,u||e,a),c=o?o+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],f]:e._events[c].push(f):(e._events[c]=f,e._eventsCount++),e}function _(e,t){--e._eventsCount==0?e._events=new h:delete e._events[t]}function i(){this._events=new h,this._eventsCount=0}Object.create&&(h.prototype=Object.create(null),new h().__proto__||(o=!1)),i.prototype.eventNames=function(){var e,t,n=[];if(this._eventsCount===0)return n;for(t in e=this._events)w.call(e,t)&&n.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},i.prototype.listeners=function(e){var t=o?o+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var u=0,a=n.length,f=new Array(a);u<a;u++)f[u]=n[u].fn;return f},i.prototype.listenerCount=function(e){var t=o?o+e:e,n=this._events[t];return n?n.fn?1:n.length:0},i.prototype.emit=function(e,t,n,u,a,f){var c=o?o+e:e;if(!this._events[c])return!1;var l,r=this._events[c],d=arguments.length;if(r.fn){switch(r.once&&this.removeListener(e,r.fn,void 0,!0),d){case 1:return r.fn.call(r.context),!0;case 2:return r.fn.call(r.context,t),!0;case 3:return r.fn.call(r.context,t,n),!0;case 4:return r.fn.call(r.context,t,n,u),!0;case 5:return r.fn.call(r.context,t,n,u,a),!0;case 6:return r.fn.call(r.context,t,n,u,a,f),!0}for(s=1,l=new Array(d-1);s<d;s++)l[s-1]=arguments[s];r.fn.apply(r.context,l)}else for(var b,g=r.length,s=0;s<g;s++)switch(r[s].once&&this.removeListener(e,r[s].fn,void 0,!0),d){case 1:r[s].fn.call(r[s].context);break;case 2:r[s].fn.call(r[s].context,t);break;case 3:r[s].fn.call(r[s].context,t,n);break;case 4:r[s].fn.call(r[s].context,t,n,u);break;default:if(!l)for(b=1,l=new Array(d-1);b<d;b++)l[b-1]=arguments[b];r[s].fn.apply(r[s].context,l)}return!0},i.prototype.on=function(e,t,n){return v(this,e,t,n,!1)},i.prototype.once=function(e,t,n){return v(this,e,t,n,!0)},i.prototype.removeListener=function(e,t,n,u){var a=o?o+e:e;if(!this._events[a])return this;if(!t)return _(this,a),this;var f=this._events[a];if(f.fn)f.fn!==t||u&&!f.once||n&&f.context!==n||_(this,a);else{for(var c=0,l=[],r=f.length;c<r;c++)(f[c].fn!==t||u&&!f[c].once||n&&f[c].context!==n)&&l.push(f[c]);l.length?this._events[a]=l.length===1?l[0]:l:_(this,a)}return this},i.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&_(this,t)):(this._events=new h,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=o,i.EventEmitter=i,p!==void 0&&(p.exports=i)},{}]},{},[1])(1)})})();</script>
|
|
36669
37207
|
|
|
36670
37208
|
<script>(function(Y,fe){typeof exports=="object"&&typeof module!="undefined"?module.exports=fe():typeof define=="function"&&define.amd?define(fe):(Y=typeof globalThis!="undefined"?globalThis:Y||self).bootstrap=fe()})(this,function(){"use strict";const Y=new Map,fe={set(i,e,t){Y.has(i)||Y.set(i,new Map);const n=Y.get(i);n.has(e)||n.size===0?n.set(e,t):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(i,e)=>Y.has(i)&&Y.get(i).get(e)||null,remove(i,e){if(!Y.has(i))return;const t=Y.get(i);t.delete(e),t.size===0&&Y.delete(i)}},Et="transitionend",hi=i=>(i&&window.CSS&&window.CSS.escape&&(i=i.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),i),ns=i=>i==null?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase(),di=i=>{i.dispatchEvent(new Event(Et))},ie=i=>!(!i||typeof i!="object")&&(i.jquery!==void 0&&(i=i[0]),i.nodeType!==void 0),ae=i=>ie(i)?i.jquery?i[0]:i:typeof i=="string"&&i.length>0?document.querySelector(hi(i)):null,Ce=i=>{if(!ie(i)||i.getClientRects().length===0)return!1;const e=getComputedStyle(i).getPropertyValue("visibility")==="visible",t=i.closest("details:not([open])");if(!t)return e;if(t!==i){const n=i.closest("summary");if(n&&n.parentNode!==t||n===null)return!1}return e},le=i=>!i||i.nodeType!==Node.ELEMENT_NODE||!!i.classList.contains("disabled")||(i.disabled!==void 0?i.disabled:i.hasAttribute("disabled")&&i.getAttribute("disabled")!=="false"),ui=i=>{if(!document.documentElement.attachShadow)return null;if(typeof i.getRootNode=="function"){const e=i.getRootNode();return e instanceof ShadowRoot?e:null}return i instanceof ShadowRoot?i:i.parentNode?ui(i.parentNode):null},et=()=>{},ze=i=>{i.offsetHeight},fi=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,At=[],B=()=>document.documentElement.dir==="rtl",z=i=>{var e;e=()=>{const t=fi();if(t){const n=i.NAME,s=t.fn[n];t.fn[n]=i.jQueryInterface,t.fn[n].Constructor=i,t.fn[n].noConflict=()=>(t.fn[n]=s,i.jQueryInterface)}},document.readyState==="loading"?(At.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of At)t()}),At.push(e)):e()},M=(i,e=[],t=i)=>typeof i=="function"?i.call(...e):t,pi=(i,e,t=!0)=>{if(!t)return void M(i);const n=(r=>{if(!r)return 0;let{transitionDuration:a,transitionDelay:c}=window.getComputedStyle(r);const d=Number.parseFloat(a),u=Number.parseFloat(c);return d||u?(a=a.split(",")[0],c=c.split(",")[0],1e3*(Number.parseFloat(a)+Number.parseFloat(c))):0})(e)+5;let s=!1;const o=({target:r})=>{r===e&&(s=!0,e.removeEventListener(Et,o),M(i))};e.addEventListener(Et,o),setTimeout(()=>{s||di(e)},n)},Tt=(i,e,t,n)=>{const s=i.length;let o=i.indexOf(e);return o===-1?!t&&n?i[s-1]:i[0]:(o+=t?1:-1,n&&(o=(o+s)%s),i[Math.max(0,Math.min(o,s-1))])},ss=/[^.]*(?=\..*)\.|.*/,os=/\..*/,rs=/::\d+$/,Ct={};let mi=1;const gi={mouseenter:"mouseover",mouseleave:"mouseout"},as=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function _i(i,e){return e&&`${e}::${mi++}`||i.uidEvent||mi++}function bi(i){const e=_i(i);return i.uidEvent=e,Ct[e]=Ct[e]||{},Ct[e]}function vi(i,e,t=null){return Object.values(i).find(n=>n.callable===e&&n.delegationSelector===t)}function yi(i,e,t){const n=typeof e=="string",s=n?t:e||t;let o=Ei(i);return as.has(o)||(o=i),[n,s,o]}function wi(i,e,t,n,s){if(typeof e!="string"||!i)return;let[o,r,a]=yi(e,t,n);e in gi&&(r=(g=>function(m){if(!m.relatedTarget||m.relatedTarget!==m.delegateTarget&&!m.delegateTarget.contains(m.relatedTarget))return g.call(this,m)})(r));const c=bi(i),d=c[a]||(c[a]={}),u=vi(d,r,o?t:null);if(u)return void(u.oneOff=u.oneOff&&s);const h=_i(r,e.replace(ss,"")),b=o?function(p,g,m){return function _(C){const k=p.querySelectorAll(g);for(let{target:y}=C;y&&y!==this;y=y.parentNode)for(const E of k)if(E===y)return xt(C,{delegateTarget:y}),_.oneOff&&l.off(p,C.type,g,m),m.apply(y,[C])}}(i,t,r):function(p,g){return function m(_){return xt(_,{delegateTarget:p}),m.oneOff&&l.off(p,_.type,g),g.apply(p,[_])}}(i,r);b.delegationSelector=o?t:null,b.callable=r,b.oneOff=s,b.uidEvent=h,d[h]=b,i.addEventListener(a,b,o)}function Ot(i,e,t,n,s){const o=vi(e[t],n,s);o&&(i.removeEventListener(t,o,!!s),delete e[t][o.uidEvent])}function ls(i,e,t,n){const s=e[t]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&Ot(i,e,t,r.callable,r.delegationSelector)}function Ei(i){return i=i.replace(os,""),gi[i]||i}const l={on(i,e,t,n){wi(i,e,t,n,!1)},one(i,e,t,n){wi(i,e,t,n,!0)},off(i,e,t,n){if(typeof e!="string"||!i)return;const[s,o,r]=yi(e,t,n),a=r!==e,c=bi(i),d=c[r]||{},u=e.startsWith(".");if(o===void 0){if(u)for(const h of Object.keys(c))ls(i,c,h,e.slice(1));for(const[h,b]of Object.entries(d)){const p=h.replace(rs,"");a&&!e.includes(p)||Ot(i,c,r,b.callable,b.delegationSelector)}}else{if(!Object.keys(d).length)return;Ot(i,c,r,o,s?t:null)}},trigger(i,e,t){if(typeof e!="string"||!i)return null;const n=fi();let s=null,o=!0,r=!0,a=!1;e!==Ei(e)&&n&&(s=n.Event(e,t),n(i).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const c=xt(new Event(e,{bubbles:o,cancelable:!0}),t);return a&&c.preventDefault(),r&&i.dispatchEvent(c),c.defaultPrevented&&s&&s.preventDefault(),c}};function xt(i,e={}){for(const[t,n]of Object.entries(e))try{i[t]=n}catch(s){Object.defineProperty(i,t,{configurable:!0,get:()=>n})}return i}function Ai(i){if(i==="true")return!0;if(i==="false")return!1;if(i===Number(i).toString())return Number(i);if(i===""||i==="null")return null;if(typeof i!="string")return i;try{return JSON.parse(decodeURIComponent(i))}catch(e){return i}}function kt(i){return i.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const ne={setDataAttribute(i,e,t){i.setAttribute(`data-bs-${kt(e)}`,t)},removeDataAttribute(i,e){i.removeAttribute(`data-bs-${kt(e)}`)},getDataAttributes(i){if(!i)return{};const e={},t=Object.keys(i.dataset).filter(n=>n.startsWith("bs")&&!n.startsWith("bsConfig"));for(const n of t){let s=n.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1),e[s]=Ai(i.dataset[n])}return e},getDataAttribute:(i,e)=>Ai(i.getAttribute(`data-bs-${kt(e)}`))};class Re{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=ie(t)?ne.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof n=="object"?n:{},...ie(t)?ne.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,s]of Object.entries(t)){const o=e[n],r=ie(o)?"element":ns(o);if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}}}class U extends Re{constructor(e,t){super(),(e=ae(e))&&(this._element=e,this._config=this._getConfig(t),fe.set(this._element,this.constructor.DATA_KEY,this))}dispose(){fe.remove(this._element,this.constructor.DATA_KEY),l.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){pi(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return fe.get(ae(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Lt=i=>{let e=i.getAttribute("data-bs-target");if(!e||e==="#"){let t=i.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),e=t&&t!=="#"?t.trim():null}return e?e.split(",").map(t=>hi(t)).join(","):null},f={find:(i,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,i)),findOne:(i,e=document.documentElement)=>Element.prototype.querySelector.call(e,i),children:(i,e)=>[].concat(...i.children).filter(t=>t.matches(e)),parents(i,e){const t=[];let n=i.parentNode.closest(e);for(;n;)t.push(n),n=n.parentNode.closest(e);return t},prev(i,e){let t=i.previousElementSibling;for(;t;){if(t.matches(e))return[t];t=t.previousElementSibling}return[]},next(i,e){let t=i.nextElementSibling;for(;t;){if(t.matches(e))return[t];t=t.nextElementSibling}return[]},focusableChildren(i){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,i).filter(t=>!le(t)&&Ce(t))},getSelectorFromElement(i){const e=Lt(i);return e&&f.findOne(e)?e:null},getElementFromSelector(i){const e=Lt(i);return e?f.findOne(e):null},getMultipleElementsFromSelector(i){const e=Lt(i);return e?f.find(e):[]}},tt=(i,e="hide")=>{const t=`click.dismiss${i.EVENT_KEY}`,n=i.NAME;l.on(document,t,`[data-bs-dismiss="${n}"]`,function(s){if(["A","AREA"].includes(this.tagName)&&s.preventDefault(),le(this))return;const o=f.getElementFromSelector(this)||this.closest(`.${n}`);i.getOrCreateInstance(o)[e]()})},Ti=".bs.alert",cs=`close${Ti}`,hs=`closed${Ti}`;class qe extends U{static get NAME(){return"alert"}close(){if(l.trigger(this._element,cs).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),l.trigger(this._element,hs),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=qe.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}tt(qe,"close"),z(qe);const Ci='[data-bs-toggle="button"]';class Ve extends U{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each(function(){const t=Ve.getOrCreateInstance(this);e==="toggle"&&t[e]()})}}l.on(document,"click.bs.button.data-api",Ci,i=>{i.preventDefault();const e=i.target.closest(Ci);Ve.getOrCreateInstance(e).toggle()}),z(Ve);const Oe=".bs.swipe",ds=`touchstart${Oe}`,us=`touchmove${Oe}`,fs=`touchend${Oe}`,ps=`pointerdown${Oe}`,ms=`pointerup${Oe}`,gs={endCallback:null,leftCallback:null,rightCallback:null},_s={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class it extends Re{constructor(e,t){super(),this._element=e,e&&it.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return gs}static get DefaultType(){return _s}static get NAME(){return"swipe"}dispose(){l.off(this._element,Oe)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),M(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&M(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(l.on(this._element,ps,e=>this._start(e)),l.on(this._element,ms,e=>this._end(e)),this._element.classList.add("pointer-event")):(l.on(this._element,ds,e=>this._start(e)),l.on(this._element,us,e=>this._move(e)),l.on(this._element,fs,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType==="pen"||e.pointerType==="touch")}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ce=".bs.carousel",Oi=".data-api",bs="ArrowLeft",vs="ArrowRight",Ke="next",xe="prev",ke="left",nt="right",ys=`slide${ce}`,St=`slid${ce}`,ws=`keydown${ce}`,Es=`mouseenter${ce}`,As=`mouseleave${ce}`,Ts=`dragstart${ce}`,Cs=`load${ce}${Oi}`,Os=`click${ce}${Oi}`,xi="carousel",st="active",ki=".active",Li=".carousel-item",xs=ki+Li,ks={[bs]:nt,[vs]:ke},Ls={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Ss={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Le extends U{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=f.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===xi&&this.cycle()}static get Default(){return Ls}static get DefaultType(){return Ss}static get NAME(){return"carousel"}next(){this._slide(Ke)}nextWhenVisible(){!document.hidden&&Ce(this._element)&&this.next()}prev(){this._slide(xe)}pause(){this._isSliding&&di(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?l.one(this._element,St,()=>this.cycle()):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void l.one(this._element,St,()=>this.to(e));const n=this._getItemIndex(this._getActive());if(n===e)return;const s=e>n?Ke:xe;this._slide(s,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&l.on(this._element,ws,e=>this._keydown(e)),this._config.pause==="hover"&&(l.on(this._element,Es,()=>this.pause()),l.on(this._element,As,()=>this._maybeEnableCycle())),this._config.touch&&it.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of f.find(".carousel-item img",this._element))l.on(t,Ts,n=>n.preventDefault());const e={leftCallback:()=>this._slide(this._directionToOrder(ke)),rightCallback:()=>this._slide(this._directionToOrder(nt)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new it(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=ks[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=f.findOne(ki,this._indicatorsElement);t.classList.remove(st),t.removeAttribute("aria-current");const n=f.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(st),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),s=e===Ke,o=t||Tt(this._getItems(),n,s,this._config.wrap);if(o===n)return;const r=this._getItemIndex(o),a=h=>l.trigger(this._element,h,{relatedTarget:o,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:r});if(a(ys).defaultPrevented||!n||!o)return;const c=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(r),this._activeElement=o;const d=s?"carousel-item-start":"carousel-item-end",u=s?"carousel-item-next":"carousel-item-prev";o.classList.add(u),ze(o),n.classList.add(d),o.classList.add(d),this._queueCallback(()=>{o.classList.remove(d,u),o.classList.add(st),n.classList.remove(st,u,d),this._isSliding=!1,a(St)},n,this._isAnimated()),c&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return f.findOne(xs,this._element)}_getItems(){return f.find(Li,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return B()?e===ke?xe:Ke:e===ke?Ke:xe}_orderToDirection(e){return B()?e===xe?ke:nt:e===xe?nt:ke}static jQueryInterface(e){return this.each(function(){const t=Le.getOrCreateInstance(this,e);if(typeof e!="number"){if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)})}}l.on(document,Os,"[data-bs-slide], [data-bs-slide-to]",function(i){const e=f.getElementFromSelector(this);if(!e||!e.classList.contains(xi))return;i.preventDefault();const t=Le.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(t.to(n),void t._maybeEnableCycle()):ne.getDataAttribute(this,"slide")==="next"?(t.next(),void t._maybeEnableCycle()):(t.prev(),void t._maybeEnableCycle())}),l.on(window,Cs,()=>{const i=f.find('[data-bs-ride="carousel"]');for(const e of i)Le.getOrCreateInstance(e)}),z(Le);const Xe=".bs.collapse",Ds=`show${Xe}`,$s=`shown${Xe}`,Is=`hide${Xe}`,Ns=`hidden${Xe}`,Ps=`click${Xe}.data-api`,Dt="show",Se="collapse",ot="collapsing",Ms=`:scope .${Se} .${Se}`,$t='[data-bs-toggle="collapse"]',js={parent:null,toggle:!0},Fs={parent:"(null|element)",toggle:"boolean"};class De extends U{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=f.find($t);for(const s of n){const o=f.getSelectorFromElement(s),r=f.find(o).filter(a=>a===this._element);o!==null&&r.length&&this._triggerArray.push(s)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return js}static get DefaultType(){return Fs}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(s=>s!==this._element).map(s=>De.getOrCreateInstance(s,{toggle:!1}))),e.length&&e[0]._isTransitioning||l.trigger(this._element,Ds).defaultPrevented)return;for(const s of e)s.hide();const t=this._getDimension();this._element.classList.remove(Se),this._element.classList.add(ot),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ot),this._element.classList.add(Se,Dt),this._element.style[t]="",l.trigger(this._element,$s)},this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown()||l.trigger(this._element,Is).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,ze(this._element),this._element.classList.add(ot),this._element.classList.remove(Se,Dt);for(const t of this._triggerArray){const n=f.getElementFromSelector(t);n&&!this._isShown(n)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[e]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ot),this._element.classList.add(Se),l.trigger(this._element,Ns)},this._element,!0)}_isShown(e=this._element){return e.classList.contains(Dt)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=ae(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren($t);for(const t of e){const n=f.getElementFromSelector(t);n&&this._addAriaAndCollapsedClass([t],this._isShown(n))}}_getFirstLevelChildren(e){const t=f.find(Ms,this._config.parent);return f.find(e,this._config.parent).filter(n=>!t.includes(n))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const n=De.getOrCreateInstance(this,t);if(typeof e=="string"){if(n[e]===void 0)throw new TypeError(`No method named "${e}"`);n[e]()}})}}l.on(document,Ps,$t,function(i){(i.target.tagName==="A"||i.delegateTarget&&i.delegateTarget.tagName==="A")&&i.preventDefault();for(const e of f.getMultipleElementsFromSelector(this))De.getOrCreateInstance(e,{toggle:!1}).toggle()}),z(De);var $="top",j="bottom",F="right",I="left",rt="auto",$e=[$,j,F,I],pe="start",Ie="end",Si="clippingParents",It="viewport",Ne="popper",Di="reference",Nt=$e.reduce(function(i,e){return i.concat([e+"-"+pe,e+"-"+Ie])},[]),Pt=[].concat($e,[rt]).reduce(function(i,e){return i.concat([e,e+"-"+pe,e+"-"+Ie])},[]),$i="beforeRead",Ii="read",Ni="afterRead",Pi="beforeMain",Mi="main",ji="afterMain",Fi="beforeWrite",Hi="write",Wi="afterWrite",Bi=[$i,Ii,Ni,Pi,Mi,ji,Fi,Hi,Wi];function J(i){return i?(i.nodeName||"").toLowerCase():null}function H(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var e=i.ownerDocument;return e&&e.defaultView||window}return i}function me(i){return i instanceof H(i).Element||i instanceof Element}function R(i){return i instanceof H(i).HTMLElement||i instanceof HTMLElement}function Mt(i){return typeof ShadowRoot!="undefined"&&(i instanceof H(i).ShadowRoot||i instanceof ShadowRoot)}const jt={name:"applyStyles",enabled:!0,phase:"write",fn:function(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},s=e.attributes[t]||{},o=e.elements[t];R(o)&&J(o)&&(Object.assign(o.style,n),Object.keys(s).forEach(function(r){var a=s[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})},effect:function(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var s=e.elements[n],o=e.attributes[n]||{},r=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]).reduce(function(a,c){return a[c]="",a},{});R(s)&&J(s)&&(Object.assign(s.style,r),Object.keys(o).forEach(function(a){s.removeAttribute(a)}))})}},requires:["computeStyles"]};function Z(i){return i.split("-")[0]}var ge=Math.max,at=Math.min,Pe=Math.round;function Ft(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function zi(){return!/^((?!chrome|android).)*safari/i.test(Ft())}function Me(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var n=i.getBoundingClientRect(),s=1,o=1;e&&R(i)&&(s=i.offsetWidth>0&&Pe(n.width)/i.offsetWidth||1,o=i.offsetHeight>0&&Pe(n.height)/i.offsetHeight||1);var r=(me(i)?H(i):window).visualViewport,a=!zi()&&t,c=(n.left+(a&&r?r.offsetLeft:0))/s,d=(n.top+(a&&r?r.offsetTop:0))/o,u=n.width/s,h=n.height/o;return{width:u,height:h,top:d,right:c+u,bottom:d+h,left:c,x:c,y:d}}function Ht(i){var e=Me(i),t=i.offsetWidth,n=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:n}}function Ri(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&Mt(t)){var n=e;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function se(i){return H(i).getComputedStyle(i)}function Hs(i){return["table","td","th"].indexOf(J(i))>=0}function he(i){return((me(i)?i.ownerDocument:i.document)||window.document).documentElement}function lt(i){return J(i)==="html"?i:i.assignedSlot||i.parentNode||(Mt(i)?i.host:null)||he(i)}function qi(i){return R(i)&&se(i).position!=="fixed"?i.offsetParent:null}function Ye(i){for(var e=H(i),t=qi(i);t&&Hs(t)&&se(t).position==="static";)t=qi(t);return t&&(J(t)==="html"||J(t)==="body"&&se(t).position==="static")?e:t||function(n){var s=/firefox/i.test(Ft());if(/Trident/i.test(Ft())&&R(n)&&se(n).position==="fixed")return null;var o=lt(n);for(Mt(o)&&(o=o.host);R(o)&&["html","body"].indexOf(J(o))<0;){var r=se(o);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||s&&r.willChange==="filter"||s&&r.filter&&r.filter!=="none")return o;o=o.parentNode}return null}(i)||e}function Wt(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function Ue(i,e,t){return ge(i,at(e,t))}function Vi(i){return Object.assign({},{top:0,right:0,bottom:0,left:0},i)}function Ki(i,e){return e.reduce(function(t,n){return t[n]=i,t},{})}const Xi={name:"arrow",enabled:!0,phase:"main",fn:function(i){var e,t=i.state,n=i.name,s=i.options,o=t.elements.arrow,r=t.modifiersData.popperOffsets,a=Z(t.placement),c=Wt(a),d=[I,F].indexOf(a)>=0?"height":"width";if(o&&r){var u=function(O,T){return Vi(typeof(O=typeof O=="function"?O(Object.assign({},T.rects,{placement:T.placement})):O)!="number"?O:Ki(O,$e))}(s.padding,t),h=Ht(o),b=c==="y"?$:I,p=c==="y"?j:F,g=t.rects.reference[d]+t.rects.reference[c]-r[c]-t.rects.popper[d],m=r[c]-t.rects.reference[c],_=Ye(o),C=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,k=g/2-m/2,y=u[b],E=C-h[d]-u[p],v=C/2-h[d]/2+k,w=Ue(y,v,E),A=c;t.modifiersData[n]=((e={})[A]=w,e.centerOffset=w-v,e)}},effect:function(i){var e=i.state,t=i.options.element,n=t===void 0?"[data-popper-arrow]":t;n!=null&&(typeof n!="string"||(n=e.elements.popper.querySelector(n)))&&Ri(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function je(i){return i.split("-")[1]}var Ws={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yi(i){var e,t=i.popper,n=i.popperRect,s=i.placement,o=i.variation,r=i.offsets,a=i.position,c=i.gpuAcceleration,d=i.adaptive,u=i.roundOffsets,h=i.isFixed,b=r.x,p=b===void 0?0:b,g=r.y,m=g===void 0?0:g,_=typeof u=="function"?u({x:p,y:m}):{x:p,y:m};p=_.x,m=_.y;var C=r.hasOwnProperty("x"),k=r.hasOwnProperty("y"),y=I,E=$,v=window;if(d){var w=Ye(t),A="clientHeight",O="clientWidth";w===H(t)&&se(w=he(t)).position!=="static"&&a==="absolute"&&(A="scrollHeight",O="scrollWidth"),(s===$||(s===I||s===F)&&o===Ie)&&(E=j,m-=(h&&w===v&&v.visualViewport?v.visualViewport.height:w[A])-n.height,m*=c?1:-1),s!==I&&(s!==$&&s!==j||o!==Ie)||(y=F,p-=(h&&w===v&&v.visualViewport?v.visualViewport.width:w[O])-n.width,p*=c?1:-1)}var T,S=Object.assign({position:a},d&&Ws),W=u===!0?function(G,N){var V=G.x,K=G.y,L=N.devicePixelRatio||1;return{x:Pe(V*L)/L||0,y:Pe(K*L)/L||0}}({x:p,y:m},H(t)):{x:p,y:m};return p=W.x,m=W.y,c?Object.assign({},S,((T={})[E]=k?"0":"",T[y]=C?"0":"",T.transform=(v.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",T)):Object.assign({},S,((e={})[E]=k?m+"px":"",e[y]=C?p+"px":"",e.transform="",e))}const Bt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(i){var e=i.state,t=i.options,n=t.gpuAcceleration,s=n===void 0||n,o=t.adaptive,r=o===void 0||o,a=t.roundOffsets,c=a===void 0||a,d={placement:Z(e.placement),variation:je(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Yi(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Yi(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ct={passive:!0};const zt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(i){var e=i.state,t=i.instance,n=i.options,s=n.scroll,o=s===void 0||s,r=n.resize,a=r===void 0||r,c=H(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&d.forEach(function(u){u.addEventListener("scroll",t.update,ct)}),a&&c.addEventListener("resize",t.update,ct),function(){o&&d.forEach(function(u){u.removeEventListener("scroll",t.update,ct)}),a&&c.removeEventListener("resize",t.update,ct)}},data:{}};var Bs={left:"right",right:"left",bottom:"top",top:"bottom"};function ht(i){return i.replace(/left|right|bottom|top/g,function(e){return Bs[e]})}var zs={start:"end",end:"start"};function Ui(i){return i.replace(/start|end/g,function(e){return zs[e]})}function Rt(i){var e=H(i);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function qt(i){return Me(he(i)).left+Rt(i).scrollLeft}function Vt(i){var e=se(i),t=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+n)}function Qi(i){return["html","body","#document"].indexOf(J(i))>=0?i.ownerDocument.body:R(i)&&Vt(i)?i:Qi(lt(i))}function Qe(i,e){var t;e===void 0&&(e=[]);var n=Qi(i),s=n===((t=i.ownerDocument)==null?void 0:t.body),o=H(n),r=s?[o].concat(o.visualViewport||[],Vt(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Qe(lt(r)))}function Kt(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Gi(i,e,t){return e===It?Kt(function(n,s){var o=H(n),r=he(n),a=o.visualViewport,c=r.clientWidth,d=r.clientHeight,u=0,h=0;if(a){c=a.width,d=a.height;var b=zi();(b||!b&&s==="fixed")&&(u=a.offsetLeft,h=a.offsetTop)}return{width:c,height:d,x:u+qt(n),y:h}}(i,t)):me(e)?function(n,s){var o=Me(n,!1,s==="fixed");return o.top=o.top+n.clientTop,o.left=o.left+n.clientLeft,o.bottom=o.top+n.clientHeight,o.right=o.left+n.clientWidth,o.width=n.clientWidth,o.height=n.clientHeight,o.x=o.left,o.y=o.top,o}(e,t):Kt(function(n){var s,o=he(n),r=Rt(n),a=(s=n.ownerDocument)==null?void 0:s.body,c=ge(o.scrollWidth,o.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),d=ge(o.scrollHeight,o.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),u=-r.scrollLeft+qt(n),h=-r.scrollTop;return se(a||o).direction==="rtl"&&(u+=ge(o.clientWidth,a?a.clientWidth:0)-c),{width:c,height:d,x:u,y:h}}(he(i)))}function Ji(i){var e,t=i.reference,n=i.element,s=i.placement,o=s?Z(s):null,r=s?je(s):null,a=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2;switch(o){case $:e={x:a,y:t.y-n.height};break;case j:e={x:a,y:t.y+t.height};break;case F:e={x:t.x+t.width,y:c};break;case I:e={x:t.x-n.width,y:c};break;default:e={x:t.x,y:t.y}}var d=o?Wt(o):null;if(d!=null){var u=d==="y"?"height":"width";switch(r){case pe:e[d]=e[d]-(t[u]/2-n[u]/2);break;case Ie:e[d]=e[d]+(t[u]/2-n[u]/2)}}return e}function Fe(i,e){e===void 0&&(e={});var t=e,n=t.placement,s=n===void 0?i.placement:n,o=t.strategy,r=o===void 0?i.strategy:o,a=t.boundary,c=a===void 0?Si:a,d=t.rootBoundary,u=d===void 0?It:d,h=t.elementContext,b=h===void 0?Ne:h,p=t.altBoundary,g=p!==void 0&&p,m=t.padding,_=m===void 0?0:m,C=Vi(typeof _!="number"?_:Ki(_,$e)),k=b===Ne?Di:Ne,y=i.rects.popper,E=i.elements[g?k:b],v=function(N,V,K,L){var ee=V==="clippingParents"?function(x){var P=Qe(lt(x)),X=["absolute","fixed"].indexOf(se(x).position)>=0&&R(x)?Ye(x):x;return me(X)?P.filter(function(ue){return me(ue)&&Ri(ue,X)&&J(ue)!=="body"}):[]}(N):[].concat(V),te=[].concat(ee,[K]),Be=te[0],D=te.reduce(function(x,P){var X=Gi(N,P,L);return x.top=ge(X.top,x.top),x.right=at(X.right,x.right),x.bottom=at(X.bottom,x.bottom),x.left=ge(X.left,x.left),x},Gi(N,Be,L));return D.width=D.right-D.left,D.height=D.bottom-D.top,D.x=D.left,D.y=D.top,D}(me(E)?E:E.contextElement||he(i.elements.popper),c,u,r),w=Me(i.elements.reference),A=Ji({reference:w,element:y,placement:s}),O=Kt(Object.assign({},y,A)),T=b===Ne?O:w,S={top:v.top-T.top+C.top,bottom:T.bottom-v.bottom+C.bottom,left:v.left-T.left+C.left,right:T.right-v.right+C.right},W=i.modifiersData.offset;if(b===Ne&&W){var G=W[s];Object.keys(S).forEach(function(N){var V=[F,j].indexOf(N)>=0?1:-1,K=[$,j].indexOf(N)>=0?"y":"x";S[N]+=G[K]*V})}return S}function Rs(i,e){e===void 0&&(e={});var t=e,n=t.placement,s=t.boundary,o=t.rootBoundary,r=t.padding,a=t.flipVariations,c=t.allowedAutoPlacements,d=c===void 0?Pt:c,u=je(n),h=u?a?Nt:Nt.filter(function(g){return je(g)===u}):$e,b=h.filter(function(g){return d.indexOf(g)>=0});b.length===0&&(b=h);var p=b.reduce(function(g,m){return g[m]=Fe(i,{placement:m,boundary:s,rootBoundary:o,padding:r})[Z(m)],g},{});return Object.keys(p).sort(function(g,m){return p[g]-p[m]})}const Zi={name:"flip",enabled:!0,phase:"main",fn:function(i){var e=i.state,t=i.options,n=i.name;if(!e.modifiersData[n]._skip){for(var s=t.mainAxis,o=s===void 0||s,r=t.altAxis,a=r===void 0||r,c=t.fallbackPlacements,d=t.padding,u=t.boundary,h=t.rootBoundary,b=t.altBoundary,p=t.flipVariations,g=p===void 0||p,m=t.allowedAutoPlacements,_=e.options.placement,C=Z(_),k=c||(C!==_&&g?function(x){if(Z(x)===rt)return[];var P=ht(x);return[Ui(x),P,Ui(P)]}(_):[ht(_)]),y=[_].concat(k).reduce(function(x,P){return x.concat(Z(P)===rt?Rs(e,{placement:P,boundary:u,rootBoundary:h,padding:d,flipVariations:g,allowedAutoPlacements:m}):P)},[]),E=e.rects.reference,v=e.rects.popper,w=new Map,A=!0,O=y[0],T=0;T<y.length;T++){var S=y[T],W=Z(S),G=je(S)===pe,N=[$,j].indexOf(W)>=0,V=N?"width":"height",K=Fe(e,{placement:S,boundary:u,rootBoundary:h,altBoundary:b,padding:d}),L=N?G?F:I:G?j:$;E[V]>v[V]&&(L=ht(L));var ee=ht(L),te=[];if(o&&te.push(K[W]<=0),a&&te.push(K[L]<=0,K[ee]<=0),te.every(function(x){return x})){O=S,A=!1;break}w.set(S,te)}if(A)for(var Be=function(x){var P=y.find(function(X){var ue=w.get(X);if(ue)return ue.slice(0,x).every(function(vt){return vt})});if(P)return O=P,"break"},D=g?3:1;D>0&&Be(D)!=="break";D--);e.placement!==O&&(e.modifiersData[n]._skip=!0,e.placement=O,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function en(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function tn(i){return[$,F,j,I].some(function(e){return i[e]>=0})}const nn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(i){var e=i.state,t=i.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=Fe(e,{elementContext:"reference"}),a=Fe(e,{altBoundary:!0}),c=en(r,n),d=en(a,s,o),u=tn(c),h=tn(d);e.modifiersData[t]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}},sn={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(i){var e=i.state,t=i.options,n=i.name,s=t.offset,o=s===void 0?[0,0]:s,r=Pt.reduce(function(u,h){return u[h]=function(b,p,g){var m=Z(b),_=[I,$].indexOf(m)>=0?-1:1,C=typeof g=="function"?g(Object.assign({},p,{placement:b})):g,k=C[0],y=C[1];return k=k||0,y=(y||0)*_,[I,F].indexOf(m)>=0?{x:y,y:k}:{x:k,y}}(h,e.rects,o),u},{}),a=r[e.placement],c=a.x,d=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=d),e.modifiersData[n]=r}},Xt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(i){var e=i.state,t=i.name;e.modifiersData[t]=Ji({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},on={name:"preventOverflow",enabled:!0,phase:"main",fn:function(i){var e=i.state,t=i.options,n=i.name,s=t.mainAxis,o=s===void 0||s,r=t.altAxis,a=r!==void 0&&r,c=t.boundary,d=t.rootBoundary,u=t.altBoundary,h=t.padding,b=t.tether,p=b===void 0||b,g=t.tetherOffset,m=g===void 0?0:g,_=Fe(e,{boundary:c,rootBoundary:d,padding:h,altBoundary:u}),C=Z(e.placement),k=je(e.placement),y=!k,E=Wt(C),v=E==="x"?"y":"x",w=e.modifiersData.popperOffsets,A=e.rects.reference,O=e.rects.popper,T=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,S=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),W=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,G={x:0,y:0};if(w){if(o){var N,V=E==="y"?$:I,K=E==="y"?j:F,L=E==="y"?"height":"width",ee=w[E],te=ee+_[V],Be=ee-_[K],D=p?-O[L]/2:0,x=k===pe?A[L]:O[L],P=k===pe?-O[L]:-A[L],X=e.elements.arrow,ue=p&&X?Ht(X):{width:0,height:0},vt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Vn=vt[V],Kn=vt[K],yt=Ue(0,A[L],ue[L]),Er=y?A[L]/2-D-yt-Vn-S.mainAxis:x-yt-Vn-S.mainAxis,Ar=y?-A[L]/2+D+yt+Kn+S.mainAxis:P+yt+Kn+S.mainAxis,ai=e.elements.arrow&&Ye(e.elements.arrow),Tr=ai?E==="y"?ai.clientTop||0:ai.clientLeft||0:0,Xn=(N=W==null?void 0:W[E])!=null?N:0,Cr=ee+Ar-Xn,Yn=Ue(p?at(te,ee+Er-Xn-Tr):te,ee,p?ge(Be,Cr):Be);w[E]=Yn,G[E]=Yn-ee}if(a){var Un,Or=E==="x"?$:I,xr=E==="x"?j:F,Te=w[v],wt=v==="y"?"height":"width",Qn=Te+_[Or],Gn=Te-_[xr],li=[$,I].indexOf(C)!==-1,Jn=(Un=W==null?void 0:W[v])!=null?Un:0,Zn=li?Qn:Te-A[wt]-O[wt]-Jn+S.altAxis,es=li?Te+A[wt]+O[wt]-Jn-S.altAxis:Gn,ts=p&&li?function(kr,Lr,ci){var is=Ue(kr,Lr,ci);return is>ci?ci:is}(Zn,Te,es):Ue(p?Zn:Qn,Te,p?es:Gn);w[v]=ts,G[v]=ts-Te}e.modifiersData[n]=G}},requiresIfExists:["offset"]};function qs(i,e,t){t===void 0&&(t=!1);var n,s,o=R(e),r=R(e)&&function(h){var b=h.getBoundingClientRect(),p=Pe(b.width)/h.offsetWidth||1,g=Pe(b.height)/h.offsetHeight||1;return p!==1||g!==1}(e),a=he(e),c=Me(i,r,t),d={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!t)&&((J(e)!=="body"||Vt(a))&&(d=(n=e)!==H(n)&&R(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:Rt(n)),R(e)?((u=Me(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=qt(a))),{x:c.left+d.scrollLeft-u.x,y:c.top+d.scrollTop-u.y,width:c.width,height:c.height}}function Vs(i){var e=new Map,t=new Set,n=[];function s(o){t.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(r){if(!t.has(r)){var a=e.get(r);a&&s(a)}}),n.push(o)}return i.forEach(function(o){e.set(o.name,o)}),i.forEach(function(o){t.has(o.name)||s(o)}),n}var rn={placement:"bottom",modifiers:[],strategy:"absolute"};function an(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function dt(i){i===void 0&&(i={});var e=i,t=e.defaultModifiers,n=t===void 0?[]:t,s=e.defaultOptions,o=s===void 0?rn:s;return function(r,a,c){c===void 0&&(c=o);var d,u,h={placement:"bottom",orderedModifiers:[],options:Object.assign({},rn,o),modifiersData:{},elements:{reference:r,popper:a},attributes:{},styles:{}},b=[],p=!1,g={state:h,setOptions:function(_){var C=typeof _=="function"?_(h.options):_;m(),h.options=Object.assign({},o,h.options,C),h.scrollParents={reference:me(r)?Qe(r):r.contextElement?Qe(r.contextElement):[],popper:Qe(a)};var k,y,E=function(v){var w=Vs(v);return Bi.reduce(function(A,O){return A.concat(w.filter(function(T){return T.phase===O}))},[])}((k=[].concat(n,h.options.modifiers),y=k.reduce(function(v,w){var A=v[w.name];return v[w.name]=A?Object.assign({},A,w,{options:Object.assign({},A.options,w.options),data:Object.assign({},A.data,w.data)}):w,v},{}),Object.keys(y).map(function(v){return y[v]})));return h.orderedModifiers=E.filter(function(v){return v.enabled}),h.orderedModifiers.forEach(function(v){var w=v.name,A=v.options,O=A===void 0?{}:A,T=v.effect;if(typeof T=="function"){var S=T({state:h,name:w,instance:g,options:O});b.push(S||function(){})}}),g.update()},forceUpdate:function(){if(!p){var _=h.elements,C=_.reference,k=_.popper;if(an(C,k)){h.rects={reference:qs(C,Ye(k),h.options.strategy==="fixed"),popper:Ht(k)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(T){return h.modifiersData[T.name]=Object.assign({},T.data)});for(var y=0;y<h.orderedModifiers.length;y++)if(h.reset!==!0){var E=h.orderedModifiers[y],v=E.fn,w=E.options,A=w===void 0?{}:w,O=E.name;typeof v=="function"&&(h=v({state:h,options:A,name:O,instance:g})||h)}else h.reset=!1,y=-1}}},update:(d=function(){return new Promise(function(_){g.forceUpdate(),_(h)})},function(){return u||(u=new Promise(function(_){Promise.resolve().then(function(){u=void 0,_(d())})})),u}),destroy:function(){m(),p=!0}};if(!an(r,a))return g;function m(){b.forEach(function(_){return _()}),b=[]}return g.setOptions(c).then(function(_){!p&&c.onFirstUpdate&&c.onFirstUpdate(_)}),g}}var Ks=dt(),Xs=dt({defaultModifiers:[zt,Xt,Bt,jt]}),Yt=dt({defaultModifiers:[zt,Xt,Bt,jt,sn,Zi,on,Xi,nn]});const ln=Object.freeze(Object.defineProperty({__proto__:null,afterMain:ji,afterRead:Ni,afterWrite:Wi,applyStyles:jt,arrow:Xi,auto:rt,basePlacements:$e,beforeMain:Pi,beforeRead:$i,beforeWrite:Fi,bottom:j,clippingParents:Si,computeStyles:Bt,createPopper:Yt,createPopperBase:Ks,createPopperLite:Xs,detectOverflow:Fe,end:Ie,eventListeners:zt,flip:Zi,hide:nn,left:I,main:Mi,modifierPhases:Bi,offset:sn,placements:Pt,popper:Ne,popperGenerator:dt,popperOffsets:Xt,preventOverflow:on,read:Ii,reference:Di,right:F,start:pe,top:$,variationPlacements:Nt,viewport:It,write:Hi},Symbol.toStringTag,{value:"Module"})),cn="dropdown",_e=".bs.dropdown",Ut=".data-api",Ys="ArrowUp",hn="ArrowDown",Us=`hide${_e}`,Qs=`hidden${_e}`,Gs=`show${_e}`,Js=`shown${_e}`,dn=`click${_e}${Ut}`,un=`keydown${_e}${Ut}`,Zs=`keyup${_e}${Ut}`,He="show",be='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',eo=`${be}.${He}`,ut=".dropdown-menu",to=B()?"top-end":"top-start",io=B()?"top-start":"top-end",no=B()?"bottom-end":"bottom-start",so=B()?"bottom-start":"bottom-end",oo=B()?"left-start":"right-start",ro=B()?"right-start":"left-start",ao={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},lo={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Q extends U{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=f.next(this._element,ut)[0]||f.prev(this._element,ut)[0]||f.findOne(ut,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return ao}static get DefaultType(){return lo}static get NAME(){return cn}toggle(){return this._isShown()?this.hide():this.show()}show(){if(le(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!l.trigger(this._element,Gs,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))l.on(t,"mouseover",et);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(He),this._element.classList.add(He),l.trigger(this._element,Js,e)}}hide(){if(le(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!l.trigger(this._element,Us,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))l.off(t,"mouseover",et);this._popper&&this._popper.destroy(),this._menu.classList.remove(He),this._element.classList.remove(He),this._element.setAttribute("aria-expanded","false"),ne.removeDataAttribute(this._menu,"popper"),l.trigger(this._element,Qs,e)}}_getConfig(e){if(typeof(e=super._getConfig(e)).reference=="object"&&!ie(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${cn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(ln===void 0)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let e=this._element;this._config.reference==="parent"?e=this._parent:ie(this._config.reference)?e=ae(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Yt(e,this._menu,t)}_isShown(){return this._menu.classList.contains(He)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return oo;if(e.classList.contains("dropstart"))return ro;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains("dropup")?t?io:to:t?so:no}_detectNavbar(){return this._element.closest(".navbar")!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(ne.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...M(this._config.popperConfig,[void 0,e])}}_selectMenuItem({key:e,target:t}){const n=f.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(s=>Ce(s));n.length&&Tt(n,t,e===hn,!n.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=Q.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0)throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(e.button===2||e.type==="keyup"&&e.key!=="Tab")return;const t=f.find(eo);for(const n of t){const s=Q.getInstance(n);if(!s||s._config.autoClose===!1)continue;const o=e.composedPath(),r=o.includes(s._menu);if(o.includes(s._element)||s._config.autoClose==="inside"&&!r||s._config.autoClose==="outside"&&r||s._menu.contains(e.target)&&(e.type==="keyup"&&e.key==="Tab"||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const a={relatedTarget:s._element};e.type==="click"&&(a.clickEvent=e),s._completeHide(a)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n=e.key==="Escape",s=[Ys,hn].includes(e.key);if(!s&&!n||t&&!n)return;e.preventDefault();const o=this.matches(be)?this:f.prev(this,be)[0]||f.next(this,be)[0]||f.findOne(be,e.delegateTarget.parentNode),r=Q.getOrCreateInstance(o);if(s)return e.stopPropagation(),r.show(),void r._selectMenuItem(e);r._isShown()&&(e.stopPropagation(),r.hide(),o.focus())}}l.on(document,un,be,Q.dataApiKeydownHandler),l.on(document,un,ut,Q.dataApiKeydownHandler),l.on(document,dn,Q.clearMenus),l.on(document,Zs,Q.clearMenus),l.on(document,dn,be,function(i){i.preventDefault(),Q.getOrCreateInstance(this).toggle()}),z(Q);const fn="backdrop",pn="show",mn=`mousedown.bs.${fn}`,co={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ho={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class gn extends Re{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return co}static get DefaultType(){return ho}static get NAME(){return fn}show(e){if(!this._config.isVisible)return void M(e);this._append();const t=this._getElement();this._config.isAnimated&&ze(t),t.classList.add(pn),this._emulateAnimation(()=>{M(e)})}hide(e){this._config.isVisible?(this._getElement().classList.remove(pn),this._emulateAnimation(()=>{this.dispose(),M(e)})):M(e)}dispose(){this._isAppended&&(l.off(this._element,mn),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=ae(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),l.on(e,mn,()=>{M(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){pi(e,this._getElement(),this._config.isAnimated)}}const ft=".bs.focustrap",uo=`focusin${ft}`,fo=`keydown.tab${ft}`,_n="backward",po={autofocus:!0,trapElement:null},mo={autofocus:"boolean",trapElement:"element"};class bn extends Re{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return po}static get DefaultType(){return mo}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),l.off(document,ft),l.on(document,uo,e=>this._handleFocusin(e)),l.on(document,fo,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,l.off(document,ft))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=f.focusableChildren(t);n.length===0?t.focus():this._lastTabNavDirection===_n?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){e.key==="Tab"&&(this._lastTabNavDirection=e.shiftKey?_n:"forward")}}const vn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",yn=".sticky-top",pt="padding-right",wn="margin-right";class Qt{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,pt,t=>t+e),this._setElementAttributes(vn,pt,t=>t+e),this._setElementAttributes(yn,wn,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,pt),this._resetElementAttributes(vn,pt),this._resetElementAttributes(yn,wn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const s=this.getWidth();this._applyManipulationCallback(e,o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+s)return;this._saveInitialAttribute(o,t);const r=window.getComputedStyle(o).getPropertyValue(t);o.style.setProperty(t,`${n(Number.parseFloat(r))}px`)})}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&ne.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,n=>{const s=ne.getDataAttribute(n,t);s!==null?(ne.removeDataAttribute(n,t),n.style.setProperty(t,s)):n.style.removeProperty(t)})}_applyManipulationCallback(e,t){if(ie(e))t(e);else for(const n of f.find(e,this._element))t(n)}}const q=".bs.modal",go=`hide${q}`,_o=`hidePrevented${q}`,En=`hidden${q}`,An=`show${q}`,bo=`shown${q}`,vo=`resize${q}`,yo=`click.dismiss${q}`,wo=`mousedown.dismiss${q}`,Eo=`keydown.dismiss${q}`,Ao=`click${q}.data-api`,Tn="modal-open",Cn="show",Gt="modal-static",To={backdrop:!0,focus:!0,keyboard:!0},Co={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class ve extends U{constructor(e,t){super(e,t),this._dialog=f.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Qt,this._addEventListeners()}static get Default(){return To}static get DefaultType(){return Co}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||l.trigger(this._element,An,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Tn),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){this._isShown&&!this._isTransitioning&&(l.trigger(this._element,go).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Cn),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){l.off(window,q),l.off(this._dialog,q),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new gn({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new bn({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=f.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),ze(this._element),this._element.classList.add(Cn),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,l.trigger(this._element,bo,{relatedTarget:e})},this._dialog,this._isAnimated())}_addEventListeners(){l.on(this._element,Eo,e=>{e.key==="Escape"&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),l.on(window,vo,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),l.on(this._element,wo,e=>{l.one(this._element,yo,t=>{this._element===e.target&&this._element===t.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Tn),this._resetAdjustments(),this._scrollBar.reset(),l.trigger(this._element,En)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(l.trigger(this._element,_o).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;t==="hidden"||this._element.classList.contains(Gt)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(Gt),this._queueCallback(()=>{this._element.classList.remove(Gt),this._queueCallback(()=>{this._element.style.overflowY=t},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const s=B()?"paddingLeft":"paddingRight";this._element.style[s]=`${t}px`}if(!n&&e){const s=B()?"paddingRight":"paddingLeft";this._element.style[s]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const n=ve.getOrCreateInstance(this,e);if(typeof e=="string"){if(n[e]===void 0)throw new TypeError(`No method named "${e}"`);n[e](t)}})}}l.on(document,Ao,'[data-bs-toggle="modal"]',function(i){const e=f.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&i.preventDefault(),l.one(e,An,n=>{n.defaultPrevented||l.one(e,En,()=>{Ce(this)&&this.focus()})});const t=f.findOne(".modal.show");t&&ve.getInstance(t).hide(),ve.getOrCreateInstance(e).toggle(this)}),tt(ve),z(ve);const oe=".bs.offcanvas",On=".data-api",Oo=`load${oe}${On}`,xn="show",kn="showing",Ln="hiding",Sn=".offcanvas.show",xo=`show${oe}`,ko=`shown${oe}`,Lo=`hide${oe}`,Dn=`hidePrevented${oe}`,$n=`hidden${oe}`,So=`resize${oe}`,Do=`click${oe}${On}`,$o=`keydown.dismiss${oe}`,Io={backdrop:!0,keyboard:!0,scroll:!1},No={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class re extends U{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Io}static get DefaultType(){return No}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||l.trigger(this._element,xo,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new Qt().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(kn),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(xn),this._element.classList.remove(kn),l.trigger(this._element,ko,{relatedTarget:e})},this._element,!0))}hide(){this._isShown&&(l.trigger(this._element,Lo).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Ln),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(xn,Ln),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Qt().reset(),l.trigger(this._element,$n)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=!!this._config.backdrop;return new gn({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{this._config.backdrop!=="static"?this.hide():l.trigger(this._element,Dn)}:null})}_initializeFocusTrap(){return new bn({trapElement:this._element})}_addEventListeners(){l.on(this._element,$o,e=>{e.key==="Escape"&&(this._config.keyboard?this.hide():l.trigger(this._element,Dn))})}static jQueryInterface(e){return this.each(function(){const t=re.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}l.on(document,Do,'[data-bs-toggle="offcanvas"]',function(i){const e=f.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),le(this))return;l.one(e,$n,()=>{Ce(this)&&this.focus()});const t=f.findOne(Sn);t&&t!==e&&re.getInstance(t).hide(),re.getOrCreateInstance(e).toggle(this)}),l.on(window,Oo,()=>{for(const i of f.find(Sn))re.getOrCreateInstance(i).show()}),l.on(window,So,()=>{for(const i of f.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(i).position!=="fixed"&&re.getOrCreateInstance(i).hide()}),tt(re),z(re);const In={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Po=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Mo=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,jo=(i,e)=>{const t=i.nodeName.toLowerCase();return e.includes(t)?!Po.has(t)||!!Mo.test(i.nodeValue):e.filter(n=>n instanceof RegExp).some(n=>n.test(t))},Fo={allowList:In,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Ho={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Wo={entry:"(string|element|function|null)",selector:"(string|element)"};class Bo extends Re{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Fo}static get DefaultType(){return Ho}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[s,o]of Object.entries(this._config.content))this._setContent(e,o,s);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},Wo)}_setContent(e,t,n){const s=f.findOne(n,e);s&&((t=this._resolvePossibleFunction(t))?ie(t)?this._putElementInTemplate(ae(t),s):this._config.html?s.innerHTML=this._maybeSanitize(t):s.textContent=t:s.remove())}_maybeSanitize(e){return this._config.sanitize?function(t,n,s){if(!t.length)return t;if(s&&typeof s=="function")return s(t);const o=new window.DOMParser().parseFromString(t,"text/html"),r=[].concat(...o.body.querySelectorAll("*"));for(const a of r){const c=a.nodeName.toLowerCase();if(!Object.keys(n).includes(c)){a.remove();continue}const d=[].concat(...a.attributes),u=[].concat(n["*"]||[],n[c]||[]);for(const h of d)jo(h,u)||a.removeAttribute(h.nodeName)}return o.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return M(e,[void 0,this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const zo=new Set(["sanitize","allowList","sanitizeFn"]),Jt="fade",mt="show",Ro=".tooltip-inner",Nn=".modal",Pn="hide.bs.modal",Ge="hover",Zt="focus",ei="click",qo={AUTO:"auto",TOP:"top",RIGHT:B()?"left":"right",BOTTOM:"bottom",LEFT:B()?"right":"left"},Vo={allowList:In,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Ko={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class ye extends U{constructor(e,t){if(ln===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Vo}static get DefaultType(){return Ko}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),l.off(this._element.closest(Nn),Pn,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=l.trigger(this._element,this.constructor.eventName("show")),t=(ui(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(n),l.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(mt),"ontouchstart"in document.documentElement)for(const o of[].concat(...document.body.children))l.on(o,"mouseover",et);this._queueCallback(()=>{l.trigger(this._element,this.constructor.eventName("shown")),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!l.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(mt),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))l.off(e,"mouseover",et);this._activeTrigger[ei]=!1,this._activeTrigger[Zt]=!1,this._activeTrigger[Ge]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),l.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(Jt,mt),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(s=>{do s+=Math.floor(1e6*Math.random());while(document.getElementById(s));return s})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(Jt),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new Bo({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Ro]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Jt)}_isShown(){return this.tip&&this.tip.classList.contains(mt)}_createPopper(e){const t=M(this._config.placement,[this,e,this._element]),n=qo[t.toUpperCase()];return Yt(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return M(e,[this._element,this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:n=>{this._getTipElement().setAttribute("data-popper-placement",n.state.placement)}}]};return{...t,...M(this._config.popperConfig,[void 0,t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if(t==="click")l.on(this._element,this.constructor.eventName("click"),this._config.selector,n=>{const s=this._initializeOnDelegatedTarget(n);s._activeTrigger[ei]=!(s._isShown()&&s._activeTrigger[ei]),s.toggle()});else if(t!=="manual"){const n=t===Ge?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),s=t===Ge?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");l.on(this._element,n,this._config.selector,o=>{const r=this._initializeOnDelegatedTarget(o);r._activeTrigger[o.type==="focusin"?Zt:Ge]=!0,r._enter()}),l.on(this._element,s,this._config.selector,o=>{const r=this._initializeOnDelegatedTarget(o);r._activeTrigger[o.type==="focusout"?Zt:Ge]=r._element.contains(o.relatedTarget),r._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},l.on(this._element.closest(Nn),Pn,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=ne.getDataAttributes(this._element);for(const n of Object.keys(t))zo.has(n)&&delete t[n];return e={...t,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:ae(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=ye.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0)throw new TypeError(`No method named "${e}"`);t[e]()}})}}z(ye);const Xo=".popover-header",Yo=".popover-body",Uo={...ye.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Qo={...ye.DefaultType,content:"(null|string|element|function)"};class gt extends ye{static get Default(){return Uo}static get DefaultType(){return Qo}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Xo]:this._getTitle(),[Yo]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=gt.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0)throw new TypeError(`No method named "${e}"`);t[e]()}})}}z(gt);const ti=".bs.scrollspy",Go=`activate${ti}`,Mn=`click${ti}`,Jo=`load${ti}.data-api`,We="active",ii="[href]",jn=".nav-link",Zo=`${jn}, .nav-item > ${jn}, .list-group-item`,er={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},tr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Je extends U{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return er}static get DefaultType(){return tr}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=ae(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(t=>Number.parseFloat(t))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(l.off(this._config.target,Mn),l.on(this._config.target,Mn,ii,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,s=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:s,behavior:"smooth"});n.scrollTop=s}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),e)}_observerCallback(e){const t=r=>this._targetLinks.get(`#${r.target.id}`),n=r=>{this._previousScrollData.visibleEntryTop=r.target.offsetTop,this._process(t(r))},s=(this._rootElement||document.documentElement).scrollTop,o=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const r of e){if(!r.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(r));continue}const a=r.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&a){if(n(r),!s)return}else o||a||n(r)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=f.find(ii,this._config.target);for(const t of e){if(!t.hash||le(t))continue;const n=f.findOne(decodeURI(t.hash),this._element);Ce(n)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,n))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(We),this._activateParents(e),l.trigger(this._element,Go,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))f.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(We);else for(const t of f.parents(e,".nav, .list-group"))for(const n of f.prev(t,Zo))n.classList.add(We)}_clearActiveClass(e){e.classList.remove(We);const t=f.find(`${ii}.${We}`,e);for(const n of t)n.classList.remove(We)}static jQueryInterface(e){return this.each(function(){const t=Je.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}l.on(window,Jo,()=>{for(const i of f.find('[data-bs-spy="scroll"]'))Je.getOrCreateInstance(i)}),z(Je);const we=".bs.tab",ir=`hide${we}`,nr=`hidden${we}`,sr=`show${we}`,or=`shown${we}`,rr=`click${we}`,ar=`keydown${we}`,lr=`load${we}`,cr="ArrowLeft",Fn="ArrowRight",hr="ArrowUp",Hn="ArrowDown",ni="Home",Wn="End",Ee="active",Bn="fade",si="show",zn=".dropdown-toggle",oi=`:not(${zn})`,Rn='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',ri=`.nav-link${oi}, .list-group-item${oi}, [role="tab"]${oi}, ${Rn}`,dr=`.${Ee}[data-bs-toggle="tab"], .${Ee}[data-bs-toggle="pill"], .${Ee}[data-bs-toggle="list"]`;class Ae extends U{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),l.on(this._element,ar,t=>this._keydown(t)))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?l.trigger(t,ir,{relatedTarget:e}):null;l.trigger(e,sr,{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){e&&(e.classList.add(Ee),this._activate(f.getElementFromSelector(e)),this._queueCallback(()=>{e.getAttribute("role")==="tab"?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),l.trigger(e,or,{relatedTarget:t})):e.classList.add(si)},e,e.classList.contains(Bn)))}_deactivate(e,t){e&&(e.classList.remove(Ee),e.blur(),this._deactivate(f.getElementFromSelector(e)),this._queueCallback(()=>{e.getAttribute("role")==="tab"?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),l.trigger(e,nr,{relatedTarget:t})):e.classList.remove(si)},e,e.classList.contains(Bn)))}_keydown(e){if(![cr,Fn,hr,Hn,ni,Wn].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter(s=>!le(s));let n;if([ni,Wn].includes(e.key))n=t[e.key===ni?0:t.length-1];else{const s=[Fn,Hn].includes(e.key);n=Tt(t,e.target,s,!0)}n&&(n.focus({preventScroll:!0}),Ae.getOrCreateInstance(n).show())}_getChildren(){return f.find(ri,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const n of t)this._setInitialAttributesOnChild(n)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=f.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const s=(o,r)=>{const a=f.findOne(o,n);a&&a.classList.toggle(r,t)};s(zn,Ee),s(".dropdown-menu",si),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(Ee)}_getInnerElement(e){return e.matches(ri)?e:f.findOne(ri,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each(function(){const t=Ae.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}l.on(document,rr,Rn,function(i){["A","AREA"].includes(this.tagName)&&i.preventDefault(),le(this)||Ae.getOrCreateInstance(this).show()}),l.on(window,lr,()=>{for(const i of f.find(dr))Ae.getOrCreateInstance(i)}),z(Ae);const de=".bs.toast",ur=`mouseover${de}`,fr=`mouseout${de}`,pr=`focusin${de}`,mr=`focusout${de}`,gr=`hide${de}`,_r=`hidden${de}`,br=`show${de}`,vr=`shown${de}`,qn="hide",_t="show",bt="showing",yr={animation:"boolean",autohide:"boolean",delay:"number"},wr={animation:!0,autohide:!0,delay:5e3};class Ze extends U{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return wr}static get DefaultType(){return yr}static get NAME(){return"toast"}show(){l.trigger(this._element,br).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(qn),ze(this._element),this._element.classList.add(_t,bt),this._queueCallback(()=>{this._element.classList.remove(bt),l.trigger(this._element,vr),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(l.trigger(this._element,gr).defaultPrevented||(this._element.classList.add(bt),this._queueCallback(()=>{this._element.classList.add(qn),this._element.classList.remove(bt,_t),l.trigger(this._element,_r)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(_t),super.dispose()}isShown(){return this._element.classList.contains(_t)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){l.on(this._element,ur,e=>this._onInteraction(e,!0)),l.on(this._element,fr,e=>this._onInteraction(e,!1)),l.on(this._element,pr,e=>this._onInteraction(e,!0)),l.on(this._element,mr,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=Ze.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}return tt(Ze),z(Ze),{Alert:qe,Button:Ve,Carousel:Le,Collapse:De,Dropdown:Q,Modal:ve,Offcanvas:re,Popover:gt,ScrollSpy:Je,Tab:Ae,Toast:Ze,Tooltip:ye}});</script>
|
|
@@ -38315,14 +38853,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
38315
38853
|
Expecting `+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":x="Parse error on line "+(o+1)+": Unexpected "+(y==1?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[y]||y,line:this.lexer.yylineno,loc:E,expected:b})}if(v==3){if(y==J)throw new Error(x||"Parsing halted.");T=this.lexer.yyleng,_=this.lexer.yytext,o=this.lexer.yylineno,E=this.lexer.yylloc,y=Y()}for(;!(N.toString()in r[g]);){if(g===0)throw new Error(x||"Parsing halted.");H(1),g=a[a.length-1]}O=y==2?null:y,y=N,g=a[a.length-1],m=r[g]&&r[g][N],v=3}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+y);switch(m[0]){case 1:a.push(y),f.push(this.lexer.yytext),l.push(this.lexer.yylloc),a.push(m[1]),y=null,O?(y=O,O=null):(T=this.lexer.yyleng,_=this.lexer.yytext,o=this.lexer.yylineno,E=this.lexer.yylloc,v>0&&v--);break;case 2:if(u=this.productions_[m[1]][1],k.$=f[f.length-u],k._$={first_line:l[l.length-(u||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(u||1)].first_column,last_column:l[l.length-1].last_column},W&&(k._$.range=[l[l.length-(u||1)].range[0],l[l.length-1].range[1]]),z=this.performAction.call(k,_,T,o,this.yy,m[1],f,l),typeof z!="undefined")return z;u&&(a=a.slice(0,-1*u*2),f=f.slice(0,-1*u),l=l.slice(0,-1*u)),a.push(this.productions_[m[1]][0]),f.push(k.$),l.push(k._$),h=r[a[a.length-2]][a[a.length-1]],a.push(h);break;case 3:return!0}}return!0}},e=function(){var i={EOF:1,parseError:function(s,a){if(this.yy.parser)this.yy.parser.parseError(s,a);else throw new Error(s)},setInput:function(s){return this._input=s,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var a=s.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var a=s.length,f=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===l.length?this.yylloc.first_column:0)+l[l.length-f.length].length-f[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-a]),this},more:function(){return this._more=!0,this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),a=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
38316
38854
|
`+a+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,a,f,l,r;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),o=0;o<_.length&&(f=this._input.match(this.rules[_[o]]),!(f&&(!a||f[0].length>a[0].length)&&(a=f,l=o,!this.options.flex)));o++);return a?(r=a[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],s=this.performAction.call(this,this.yy,this,_[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
38317
38855
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return typeof s!="undefined"?s:this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(s){this.begin(s)}};return i.options={},i.performAction=function(s,a,f,l){switch(f){case 0:return"*";case 1:return"/";case 2:return"-";case 3:return"+";case 4:return"^";case 5:return"(";case 6:return")";case 7:return",";case 8:return"==";case 9:return"!=";case 10:return"~=";case 11:return">=";case 12:return"<=";case 13:return"<";case 14:return">";case 15:return"notIn";case 16:return"and";case 17:return"or";case 18:return"not";case 19:return"in";case 20:return"of";case 21:return"if";case 22:return"then";case 23:return"else";case 24:return"mod";case 25:break;case 26:return"Number";case 27:return a.yytext=JSON.stringify({name:a.yytext,type:"unescaped"}),"Symbol";case 28:return a.yytext=JSON.stringify({name:s.buildString("'",a.yytext),type:"single-quoted"}),"Symbol";case 29:return a.yytext=JSON.stringify(s.buildString('"',a.yytext)),"String";case 30:return"%";case 31:return"?";case 32:return":";case 33:return"EndOfExpression"}},i.rules=[/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:\()/,/^(?:\))/,/^(?:\,)/,/^(?:==)/,/^(?:\!=)/,/^(?:\~=)/,/^(?:>=)/,/^(?:<=)/,/^(?:<)/,/^(?:>)/,/^(?:not\s+in[^\w])/,/^(?:and[^\w])/,/^(?:or[^\w])/,/^(?:not[^\w])/,/^(?:in[^\w])/,/^(?:of[^\w])/,/^(?:if[^\w])/,/^(?:then[^\w])/,/^(?:else[^\w])/,/^(?:mod[^\w])/,/^(?:\s+)/,/^(?:[0-9]+(?:\.[0-9]+)?(?![0-9\.]))/,/^(?:[a-zA-Z$_][\.a-zA-Z0-9$_]*)/,/^(?:'(?:\\'|\\\\|[^'\\])*')/,/^(?:"(?:\\"|\\\\|[^"\\])*")/,/^(?:\%)/,/^(?:\?)/,/^(?::)/,/^(?:$)/],i.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],inclusive:!0}},i}();t.lexer=e;function n(){this.yy={}}return n.prototype=t,t.Parser=n,new n}(),a1=s1;s1.Parser;var c1=function(t){function e(n){var i;return U(this,e),i=R(this,e,["Unknown function: ".concat(n,"()")]),C(i,"I18N_STRING","UNKNOWN_FUNCTION"),i.functionName=n,i}return B(e,t),M(e)}(S(ReferenceError)),V=function(t){function e(n){var i;return U(this,e),i=R(this,e,["Property \u201C".concat(n,"\u201D does not exist.")]),C(i,"I18N_STRING","UNKNOWN_PROPERTY"),i.propertyName=n,i}return B(e,t),M(e)}(S(ReferenceError)),w1=function(t){function e(n){var i;return U(this,e),i=R(this,e,["Unknown option: ".concat(n)]),C(i,"I18N_STRING","UNKNOWN_OPTION"),i.keyName=n,i}return B(e,t),M(e)}(S(TypeError)),D=function(t){function e(n,i){var c;return U(this,e),c=R(this,e,["Expected a ".concat(n,", but got a ").concat(i," instead.")]),C(c,"I18N_STRING","UNEXPECTED_TYPE"),c.expectedType=n,c.recievedType=i,c}return B(e,t),M(e)}(S(TypeError)),K=function(t){function e(n){var i;return U(this,e),i=R(this,e,[n]),C(i,"I18N_STRING","INTERNAL"),i}return B(e,t),M(e)}(S(Error));function I(t,e){return P(t)==="object"||typeof t=="function"?Object.prototype.hasOwnProperty.call(t,e):!1}function _1(t,e){return(t%e+e)%e}function v1(t){if(P(t)!=="object")return t;if(t instanceof Number||t instanceof String||t instanceof Boolean)return t.valueOf()}function G(t){return Array.isArray(t)&&t.length===1&&(t=t[0]),v1(t)}function L(t){return t=G(t),t===void 0?"undefined":t===null?"null":t===!0?"true":t===!1?"false":typeof t=="number"?"number":typeof t=="string"?"text":P(t)!=="object"&&typeof t!="function"?"unknown type":Array.isArray(t)?"list":"object"}function d(t){if(t=G(t),typeof t=="number")return t;throw new D("number",L(t))}function u1(t){if(t=G(t),typeof t=="string")return t;throw new D("text",L(t))}function $(t){if(t=G(t),typeof t=="string"||typeof t=="number")return t;throw new D("text or number",L(t))}function x1(t){if(t=G(t),typeof t=="boolean")return t;throw new D("logical value (\u201Ctrue\u201D or \u201Cfalse\u201D)",L(t))}function t1(t){if(t==null)throw new D("list",L(t));return Array.isArray(t)?t:[t]}function e1(t){for(var e=Q(t),n=[];e.length;){var i=e.pop();Array.isArray(i)?e.push.apply(e,Q(i)):n.push(i)}return n.reverse()}var l1={isfn:function(e,n){return I(e,n)&&typeof e[n]=="function"},unknown:function(e){throw new c1(e)},coerceArray:t1,coerceNumber:d,coerceNumberOrString:$,coerceBoolean:x1,isSubset:function(e,n){var i=t1(e),c=t1(n);return i.every(function(s){return c.includes(s)})},warnDeprecated:function(){var t=3,e={ternary:0,modulo:0};return function(n,i){switch(n){case"ternary":if(e.ternary++>=t)break;console.warn("The use of ? and : as conditional operators has been deprecated in Filtrex v3 in favor of the if..then..else ternary operator. See issue #34 for more information.");break;case"modulo":if(e.modulo++>=t)break;console.warn("The use of '%' as a modulo operator has been deprecated in Filtrex v3 in favor of the 'mod' operator. You can use it like this: '3 mod 2 == 1'. See issue #48 for more information.");break}return i}}(),buildString:function(e,n){e=String(e)[0],n=String(n);var i="";if(n[0]!==e||n[n.length-1]!==e)throw new K("Unexpected internal error: String literal doesn't begin/end with the right quotation mark.");for(var c=1;c<n.length-1;c++)if(n[c]==="\\"){if(c++,c>=n.length-1)throw new K("Unexpected internal error: Unescaped backslash at the end of string literal.");if(n[c]==="\\")i+="\\";else if(n[c]===e)i+=e;else throw new K("Unexpected internal error: Invalid escaped character in string literal: ".concat(n[c]))}else{if(n[c]===e)throw new K("Unexpected internal error: String literal contains unescaped quotation mark.");i+=n[c]}return i},reduceRelation:function(e){for(var n=[],i=[],c=e1([e[0]]).join(""),s=0,a=1;a<e.length-1;a+=2){var f=e1([e[a+1]]).join(""),l="tmp".concat(s++);i.push('ops["'.concat(e[a],'"](').concat(c,", ").concat(l," = ").concat(f,")")),c=l,n.push(l)}return"(function(){ var ".concat(n.join(", "),"; return ").concat(i.join(" && "),";})()")}};a1.yy=Object.create(l1);function k1(t,e,n,i){return n==null?n:e(t)}function S1(t,e,n,i){if(i==="single-quoted")return e(t);var c=t.split("."),s=r1(c),a;try{for(s.s();!(a=s.n()).done;){var f,l=a.value;if(I((f=n)!==null&&f!==void 0?f:{},l))n=n[l];else throw new V(l)}}catch(r){s.e(r)}finally{s.f()}return n}function E1(t,e,n,i){if(n==null)return n;if(i==="single-quoted")return e(t);var c=t.split("."),s=r1(c),a;try{for(s.s();!(a=s.n()).done;){var f=a.value;if(n==null)return n;n=n[f]}}catch(l){s.e(l)}finally{s.f()}return n}function O1(t,e){var n;if(arguments.length>2)throw new TypeError("Too many arguments.");e=P(e)==="object"?e:{};for(var i=["extraFunctions","constants","customProp","operators"],c=e,s=c.extraFunctions,a=c.constants,f=c.customProp,l=c.operators,r=0,_=Object.keys(e);r<_.length;r++){var o=_[r];if(!i.includes(o))throw new w1(o)}var T={abs:Math.abs,ceil:Math.ceil,floor:Math.floor,log:Math.log,log2:Math.log2,log10:Math.log10,max:Math.max,min:Math.min,round:Math.round,sqrt:Math.sqrt,exists:function(u){return u!=null},empty:function(u){return u==null||u===""||Array.isArray(u)&&u.length===0}};if(s)for(var v=0,N=Object.keys(s);v<N.length;v++){var J=N[v];T[J]=s[J]}var E={"+":function(u,h){return $(u)+$(h)},"-":function(u,h){return h===void 0?-d(u):d(u)-d(h)},"*":function(u,h){return d(u)*d(h)},"/":function(u,h){return d(u)/d(h)},"^":function(u,h){return Math.pow(d(u),d(h))},mod:function(u,h){return _1(d(u),d(h))},"==":function(u,h){return u===h},"!=":function(u,h){return u!==h},"<":function(u,h){return d(u)<d(h)},"<=":function(u,h){return d(u)<=d(h)},">=":function(u,h){return d(u)>=d(h)},">":function(u,h){return d(u)>d(h)},"~=":function(u,h){return RegExp(u1(h)).test(u1(u))}};if(l)for(var W=0,H=Object.keys(l);W<H.length;W++){var Y=H[W];E[Y]=l[Y]}l=E,a=(n=a)!==null&&n!==void 0?n:{};var y=e1(a1.parse(t));y.unshift("return "),y.push(";");function O(p,u,h){if(I(u!=null?u:{},p))return u[p];throw new V(p)}function g(p){return function(h){if(I(p!=null?p:{},h))return p[h];throw new V(h)}}typeof f=="function"&&(O=function(u,h,b){return f(u,g(h),h,b)});function m(p){return function(h){for(var b=h.name,x=arguments.length,w=new Array(x>1?x-1:0),Z=1;Z<x;Z++)w[Z-1]=arguments[Z];if(I(p,b)&&typeof p[b]=="function")return p[b].apply(p,w);throw new c1(b)}}function z(p,u){var h=p.name,b=p.type;return b==="unescaped"&&I(a,h)?a[h]:O(h,u,b)}var k=new Function("call","ops","std","prop","data",y.join(""));return function(p){try{return k(m(T),l,l1,z,p)}catch(u){return u}}}return A.compileExpression=O1,A.useDotAccessOperator=S1,A.useDotAccessOperatorAndOptionalChaining=E1,A.useOptionalChaining=k1,Object.defineProperty(A,"__esModule",{value:!0}),A}({})})();</script>
|
|
38318
|
-
<script>(function(){const b=typeof Formio!="undefined"?Formio:typeof window!="undefined"?window.Formio:void 0,
|
|
38856
|
+
<script>(function(){const b=typeof Formio!="undefined"?Formio:typeof window!="undefined"?window.Formio:void 0,v=typeof FormioUtils!="undefined"?FormioUtils:b?b.Utils:typeof window!="undefined"?window.FormioUtils:void 0,C=b&&b.Components&&b.Components.components?b.Components.components.list:class{static schema(){return{}}},D=v&&v.getRandomComponentId?v.getRandomComponentId:()=>Math.random().toString(36).substring(7),F=v&&v.boolValue?v.boolValue:V=>!!V,L=V=>!!V&&typeof V.then=="function";var E=window.platform==="web";class I extends C{static schema(...e){return C.schema({type:"select",label:"Select",key:"select",idPath:"id",data:{values:[{label:"",value:""}],json:"",url:"",resource:"",custom:""},clearOnRefresh:!1,limit:100,dataSrc:"values",valueProperty:"",lazyLoad:!0,filter:"",searchEnabled:!0,searchDebounce:.3,searchField:"",minSearch:0,readOnlyValue:!1,authenticate:!1,ignoreCache:!1,template:"<span>{{ item.label }}</span>",selectFields:"",searchThreshold:.3,uniqueOptions:!1,tableView:!0,fuseOptions:{include:"score",threshold:.3},indexeddb:{filter:{}},customOptions:{},useExactSearch:!1},...e)}static get builderInfo(){return{title:"Select",group:"basic",icon:"th-list",weight:70,documentation:"/userguide/#select",schema:I.schema()}}static get serverConditionSettings(){return SelectComponent.conditionOperatorsSettings}static get conditionOperatorsSettings(){return{...super.conditionOperatorsSettings,valueComponent(e){const t={...e,type:"select"};return isSelectResourceWithObjectValue(e)&&(t.reference=!1,t.onSetItems=`
|
|
38319
38857
|
var templateKeys = FormioUtils.getItemTemplateKeys(component.template) || [];
|
|
38320
38858
|
items = _.map(items || [], i => {
|
|
38321
38859
|
var item = {};
|
|
38322
38860
|
_.each(templateKeys, k => _.set(item, k, _.get(i, k)));
|
|
38323
38861
|
return item;
|
|
38324
38862
|
})
|
|
38325
|
-
`),t}}}static savedValueTypes(e){const{boolean:t,string:o,number:i,object:r,array:s}=componentValueTypes,{dataType:l,reference:a}=e,h=getComponentSavedTypes(e);return h||(a?[r]:l==="object"?[r,s]:componentValueTypes[l]?[componentValueTypes[l]]:[t,o,i,r,s])}init(){super.init(),this.templateData={},this.validators=(this.validators||[]).concat(["select","onlyAvailableItems"]);let e=[];const t=_.debounce((...o)=>(e=[],this.updateItems.apply(this,o)),100);this.triggerUpdate=(...o)=>(typeof this.itemsLoadedResolve=="function"&&this.itemsLoadedResolve(),this.itemsLoaded=new Promise(i=>{this.itemsLoadedResolve=i}),o.length&&(e=o),t(...e)),this.selectOptions=[],this.itemsFromUrl&&(this.isFromSearch=!1,this.searchServerCount=null,this.defaultServerCount=null,this.isScrollLoading=!1,this.searchDownloadedResources=[],this.defaultDownloadedResources=[]),this.activated=!1,this.itemsLoaded=new Promise(o=>{this.itemsLoadedResolve=o}),this.shouldPositionDropdown=this.hasDataGridAncestor(),this.isHtmlRenderMode()&&this.activate(),this.getTemplateKeys()}getTemplateKeys(){const e=this.component.template;this.templateKeys=this.options.readOnly&&e?FormioUtils.getItemTemplateKeys(e):[]}get dataReady(){return this.root&&this.root.submissionSet&&!this.attached?Promise.resolve():this.itemsLoaded}get defaultSchema(){return I.schema()}get emptyValue(){if(this.component.multiple)return[];if(this.component.dataSrc==="json"&&this.component.data.json){const e=this.component.data.json[0];let t;return this.valueProperty?t=_.get(e,this.valueProperty):t=e,t&&typeof t=="string"?"":{}}return this.valueProperty?"":{}}get valueProperty(){return this.component.valueProperty?this.component.valueProperty:this.component.dataSrc==="values"?"value":""}get inputInfo(){const e=super.elementInfo();return e.type="select",e.changeEvent="change",e}get isSelectResource(){return this.component.dataSrc==="resource"}get isSelectMaterdata(){return this.component.dataSrc==="masterdata"}get isSelectURL(){return this.component.dataSrc==="url"}get itemsFromUrl(){return this.isSelectResource||this.isSelectURL||this.isSelectMaterdata}get isInfiniteScrollProvided(){return this.itemsFromUrl}get shouldDisabled(){return super.shouldDisabled||this.parentDisabled}get shouldInitialLoad(){return this.component.widget==="html5"&&this.isEntireObjectDisplay()&&this.component.searchField&&this.dataValue?!1:super.shouldLoad}isEntireObjectDisplay(){return this.component.dataSrc==="resource"&&this.valueProperty==="data"}findMasterdataItem(e){if(!this.component.masterdata||e==null)return null;const t=String(e),o=this.component.valueProperty||this.valueProperty;return this.component.masterdata.find(i=>{if(!i||typeof i!="object")return!1;if(o){let s=_.get(i,o);if(s!=null&&String(s)===t||o.startsWith("data.")&&(s=_.get(i,o.replace(/^data\./,"")),s!=null&&String(s)===t)||i[o]!==void 0&&i[o]!==null&&String(i[o])===t)return!0}const r=i.data||i;for(const s of Object.keys(r))if((/id$/i.test(s)||s==="value"||s==="_id"||s==="id")&&r[s]!==void 0&&r[s]!==null&&String(r[s])===t)return!0;return!1})}selectValueAndLabel(e){if((typeof e=="string"||typeof e=="number")&&this.component.dataSrc==="masterdata"&&this.component.masterdata){const o=this.findMasterdataItem(e);o&&(e=o)}const t=this.getOptionValue(this.isEntireObjectDisplay()&&!this.itemValue(e)?e:this.itemValue(e));return{value:t,label:this.itemTemplate(this.isEntireObjectDisplay()&&!_.isObject(e.data)?{data:e}:e,t)}}itemTemplate(e,t){if(!_.isNumber(e)&&_.isEmpty(e))return"";if((typeof e=="string"||typeof e=="number")&&this.component.dataSrc==="masterdata"&&this.component.masterdata){const r=this.findMasterdataItem(e);r&&(e=r)}if(this.options.readOnly&&this.component.readOnlyValue&&!this.component.template&&!this.component.labelProperty)return this.itemValue(e);if(e&&!this.component.template){const r=e.label||e,s=typeof r=="string"?this.t(r,{_userInput:!0}):r;return this.sanitize(s,this.shouldSanitizeValue)}if(this.component.multiple&&_.isArray(this.dataValue)?this.dataValue.find(r=>t===r):this.dataValue===t){const r=this.selectData;if(r){const s=this.component.reference&&t&&(t._id?t._id.toString():t);(!this.templateData||!this.templateData[s])&&this.getOptionTemplate(e,t),this.component.multiple?r[s]&&(e=r[s]):e=r}}if(typeof e=="string"||typeof e=="number")return this.sanitize(this.t(e,{_userInput:!0}),this.shouldSanitizeValue);if(Array.isArray(e))return e.map(r=>typeof r=="string"||typeof r=="number"?this.sanitize(this.t(r,{_userInput:!0}),this.shouldSanitizeValue):r);if(e.data){const r=/item\.data\.\w*/g.test(this.component.template);e.data=this.isEntireObjectDisplay()&&_.isObject(e.data)&&!r?JSON.stringify(e.data):e.data}let o=e;typeof e=="object"&&e!==null&&!e.data&&(o=Object.assign({data:e},e));const i=this.sanitize(this.component.template?this.interpolate(this.component.template,{item:o}):e.label);if(i){const r=i.replace(/<\/?[^>]+(>|$)/g,"");let s;return this.i18next&&this.i18next.translator&&(s=this.i18next.translator),!r||s&&!this.t(r,{_userInput:!0})?void 0:s?i.replace(r,this.t(r,{_userInput:!0})):r}else return JSON.stringify(e)}addOption(e,t,o={},i=D()){if(_.isNil(t))return;const r=this.component.idPath?this.component.idPath.split(".").reduceRight((a,h)=>({[h]:a}),i):{},s=Object.assign({value:this.getOptionValue(e),label:t},r);if(!(this.component.uniqueOptions&&this.selectOptions.find(a=>_.isEqual(a.value,s.value)))&&(e&&this.selectOptions.push(s),this.refs.selectContainer&&this.component.widget==="html5")){s.value&&_.isObject(s.value)&&_.isEmpty(s.value)&&(s.value="");const a=document.createElement("div");a.innerHTML=this.sanitize(this.renderTemplate("selectOption",{selected:_.isEqual(this.getOptionValue(this.dataValue),s.value),option:s,attrs:o,id:i,useId:(this.valueProperty===""||this.isEntireObjectDisplay())&&_.isObject(e)&&i}),this.shouldSanitizeValue).trim(),s.element=a.firstChild,this.refs.selectContainer.appendChild(s.element)}}addValueOptions(e){e=e||[];let t=!1,o=this.dataValue;if(this.options.pdf&&!e.length&&this.component.dataSrc==="url"&&this.valueProperty&&(o=Array.isArray(o)?o.map(i=>_.set({},this.valueProperty,i)):_.set({},this.valueProperty,o)),!this.selectOptions.length){const i=Array.isArray(o)&&this.component.multiple?o:[o];t=this.addCurrentChoices(i,e),!t&&!this.component.multiple&&this.addPlaceholder()}return t}disableInfiniteScroll(){this.downloadedResources&&(this.downloadedResources.serverCount=this.downloadedResources.length,this.serverCount=this.downloadedResources.length)}setItems(e,t){if(logger.info(`[TF_SDK:171] \u2705 setItems() called for '${this.key}'. Items length:`,e?e.length:0,"fromSearch:",t),this.selectItems=e,typeof e=="string")try{e=JSON.parse(e)}catch(h){logger.warn(h.message),e=[]}if(this.component.onSetItems){const h=typeof this.component.onSetItems=="function"?this.component.onSetItems(this,e):this.evaluate(this.component.onSetItems,{items:e},"items");h&&(e=h)}!this.choices&&this.refs.selectContainer&&this.empty(this.refs.selectContainer),this.component.selectValues&&(e=_.get(e,this.component.selectValues,e)||[]);let o;if(this.itemsFromUrl){o=this.isSelectURL?_.isEqual(e,this.downloadedResources):!1;const h=this.component.limit>e.length,n=o&&this.downloadedResources&&this.downloadedResources.length===e.length;h?this.disableInfiniteScroll():n?this.selectOptions=[]:this.serverCount=e.serverCount}if(this.isScrollLoading&&e)o||(this.downloadedResources=this.downloadedResources?this.downloadedResources.concat(e):e),this.downloadedResources.serverCount=e.serverCount||this.downloadedResources.serverCount;else if(this.downloadedResources=e||[],this.selectOptions=[],!_.isEmpty(this.dataValue)&&this.component.idPath){const h=_.get(this.dataValue,this.component.idPath,null),n=!_.isNil(h)&&e.find(c=>_.get(c,this.component.idPath)===h);n&&this.setValue(n)}if(t||this.addValueOptions(e),this.component.widget==="html5"&&!this.component.placeholder&&this.addOption(null,""),_.each(e,(h,n)=>{if(this.root&&this.root.options.editForm&&this.root.options.editForm._id&&this.root.options.editForm._id===h._id)return;const c=this.selectValueAndLabel(h);this.addOption(c.value,c.label,{},_.get(h,this.component.idPath,String(n)))}),logger.info(`[TF_SDK:172] \u2705 selectOptions generated for '${this.key}', length:`,this.selectOptions.length),this.choices)if(logger.info(`[TF_SDK:173] \u2705 this.choices is true for '${this.key}', dataSrc:`,this.component.dataSrc),this.component.dataSrc==="masterdata"&&this.component.masterdata)if(logger.info(`[TF_SDK:174] \u2705 Handling masterdata for '${this.key}'.`),this.selectOptions.sort(function(h,n){return h.value>n.value?1:h.value<n.value?-1:0}),this.isScrollLoading){let h=[];for(let n=0;n<e.length;n++)for(let c=0;c<this.selectOptions.length;c++)this.selectOptions[c].value===e[n][this.component.valueProperty]&&h.push(this.selectOptions[c]);logger.info(`[TF_SDK:175] \u2705 setChoices called (scrollLoading) for '${this.key}' with array length:`,h.length),this.choices.setChoices(h,"value","label",!1)}else logger.info(`[TF_SDK:176] \u2705 setChoices called (normal masterdata) for '${this.key}' with array length:`,this.selectOptions.length),this.choices.setChoices(this.selectOptions,"value","label",!0);else logger.info(`[TF_SDK:177] \u2705 setChoices called (non-masterdata) for '${this.key}' with array length:`,this.selectOptions.length),this.choices.setChoices(this.selectOptions,"value","label",!0);else this.loading;this.isScrollLoading=!1,this.loading=!1;let i=!1;if(this.choices&&this.choices.input&&this.choices.input.isFocussed&&(i=this.choices.input.isFocussed),!(t&&i))if(this.isEmpty()){if(this.shouldAddDefaultValue&&!this.options.readOnly){const h=this.defaultValue;this.isEmpty(h)||this.setValue(h)}}else if(localStorage.getItem("renderMode")==="html"){var s=this.component.template,l=s.substring(s.lastIndexOf(".")+1,s.length),a=l.substring(0,l.indexOf("}"),l.length);if(a=a.trim(),e.length>0&&this.component.multiple){let h=[];for(let n=0;n<e.length;n++)h.push(e[n][a]);this.setValue(h,{noUpdateEvent:!1})}}else this.setValue(this.dataValue,{noUpdateEvent:!0});this.itemsLoadedResolve()}getSingleItemValueForHTMLMode(e){const t=this.selectOptions&&this.selectOptions.find(({value:o})=>_.isEqual(o,e));return t&&t.label||e}itemValueForHTMLMode(e){return this.isHtmlRenderMode()?Array.isArray(e)?e.map(o=>Array.isArray(o)?this.itemValueForHTMLMode(o):this.getSingleItemValueForHTMLMode(o)).join(", "):this.getSingleItemValueForHTMLMode(e):super.itemValueForHTMLMode(e)}get defaultValue(){let e=super.defaultValue;return!e&&(this.component.defaultValue===!1||this.component.defaultValue===0)&&(e=this.component.defaultValue),e}get loadingError(){return!this.component.refreshOn&&!this.component.refreshOnBlur&&this.networkError}loadItems(e,t,o,i,r,s){if(i=i||{},!this.shouldLoad||!this.itemsFromUrl&&this.options.readOnly){this.isScrollLoading=!1,this.loading=!1,this.itemsLoadedResolve();return}const l=parseInt(this.component.minSearch,10);if(this.component.searchField&&l>0&&(!t||t.length<l))return this.setItems([]);r=r||"GET",r.toUpperCase()==="GET"&&(s=null);const a=this.component.limit||100,h=this.isScrollLoading?this.selectOptions.length:0,n=this.component.disableLimit?{}:{limit:a,skip:h};if(e=this.interpolate(e,{formioBase:Formio.getBaseUrl(),search:t,limit:a,skip:h,page:Math.abs(Math.floor(h/a))}),this.component.searchField&&t){const c=Array.isArray(t)?t.join(","):typeof t=="object"?JSON.stringify(t):t;n[this.component.searchField]=this.component.searchField.endsWith("__regex")?_.escapeRegExp(c):c}this.component.selectFields&&(n.select=this.component.selectFields),this.component.sort&&(n.sort=this.component.sort),_.isEmpty(n)||(e+=(e.includes("?")?"&":"?")+Formio.serialize(n,c=>this.interpolate(c))),this.component.filter&&(e+=(e.includes("?")?"&":"?")+this.interpolate(this.component.filter)),i.ignoreCache=this.component.ignoreCache,i.header=o,this.loading=!0,Formio.makeRequest(this.options.formio,"select",e,r,s,i).then(c=>{this.loading=!1,this.error=null,this.setItems(c,!!t)}).catch(c=>{this.itemsFromUrl&&(this.setItems([]),this.disableInfiniteScroll()),this.isScrollLoading=!1,this.handleLoadingError(c)})}handleLoadingError(e){this.loading=!1,e.networkError&&(this.networkError=!0),this.itemsLoadedResolve(),this.emit("componentError",{component:this.component,message:e.toString()}),logger.warn(`[TF_SDK:178] \u26A0\uFE0F Unable to load resources for ${this.key}`)}get requestHeaders(){const e=new Formio.Headers;if(this.component.data&&this.component.data.headers)try{_.each(this.component.data.headers,t=>{t.key&&e.set(t.key,this.interpolate(t.value))})}catch(t){logger.warn(t.message)}return e}getCustomItems(){const e=this.evaluate(this.component.data.custom,{values:[]},"values");return this.asyncValues=L(e),e}asyncCustomValues(){return _.isBoolean(this.asyncValues)||this.getCustomItems(),this.asyncValues}updateCustomItems(e){if(this.asyncCustomValues()){if(!e&&!this.active){this.itemsLoadedResolve();return}this.loading=!0,this.getCustomItems().then(t=>{this.loading=!1,this.setItems(t||[])}).catch(t=>{this.handleLoadingError(t)})}else this.setItems(this.getCustomItems()||[])}isEmpty(e=this.dataValue){return super.isEmpty(e)||e===void 0}refresh(e,t){if(this.component.clearOnRefresh){const o=t?t.instance:null;o&&!o.pristine&&this.setValue(this.emptyValue)}this.updateItems(null,!0)}get additionalResourcesAvailable(){return _.isNil(this.serverCount)||this.serverCount>this.downloadedResources.length}get serverCount(){return this.isFromSearch?this.searchServerCount:this.defaultServerCount}set serverCount(e){this.isFromSearch?this.searchServerCount=e:this.defaultServerCount=e}get downloadedResources(){return this.isFromSearch?this.searchDownloadedResources:this.defaultDownloadedResources}set downloadedResources(e){this.isFromSearch?this.searchDownloadedResources=e:this.defaultDownloadedResources=e}get filteredMasterdata(){if(!this.component.masterdata)return[];let e=[...this.component.masterdata];if(this.component.filter)try{const t=this.component.filter.replace(/(~=\s*)(\{\{.*?\}\})/g,'$1"$2"'),o=this.interpolate(t,{data:this.data}),i=filtrex.compileExpression(o,{customProp:filtrex.useDotAccessOperatorAndOptionalChaining,extraFunctions:{equalsIgnoreCase:(r,s)=>String(r).toLowerCase()===String(s).toLowerCase(),matchIgnoreCase:(r,s)=>new RegExp(s,"i").test(String(r))}});e=e.filter(r=>i({data:r}))}catch(t){return console.warn("[TF_SDK:153] \u26A0\uFE0F Filter error:",t),[]}return e}updateItems(e,t){if(logger.info(`[TF_SDK:179] \u2705 updateItems() called for '${this.key}'. searchInput:`,e,"forceUpdate:",t,"dataSrc:",this.component.dataSrc),this.itemsLoaded=new Promise(o=>{this.itemsLoadedResolve=o}),!this.component.data){logger.warn(`[TF_SDK:180] \u26A0\uFE0F Select component ${this.key} does not have data configuration.`),this.itemsLoadedResolve();return}if(!this.visible){this.itemsLoadedResolve();return}switch(this.component.dataSrc){case"values":this.setItems(this.component.data.values);break;case"json":this.setItems(this.component.data.json);break;case"custom":this.updateCustomItems();break;case"masterdata":logger.info(`[TF_SDK:181] \u2705 masterdata case for '${this.key}'. masterdata length:`,this.filteredMasterdata?this.filteredMasterdata.length:0);let o=this.filteredMasterdata||[];if(o.length>0&&(o=o.map(i=>i&&typeof i=="object"&&!i.data?Object.assign({data:i},i):i)),!this.isFromSearch&&!this.isScrollLoading&&!this.component.dropdownOpened)if(logger.info(`[TF_SDK:182] \u2705 masterdata: Initial/Unopened State for '${this.key}'`),this.defaultDownloadedResources&&this.defaultDownloadedResources.length>0&&this.defaultDownloadedResources.length<o.length)logger.info(`[TF_SDK:183] \u2705 masterdata: defaultDownloadedResources > 0 for '${this.key}'`),this.setItems(this.defaultDownloadedResources);else if(!this.component.dropdownOpened&&this.data[this.key]&&String(this.data[this.key]).trim().length>0){logger.info(`[TF_SDK:184] \u2705 masterdata: Has pre-existing value for '${this.key}'`,this.data[this.key]);let i=[];this.component.multiple&&o.length>0?this.data[this.key].forEach(s=>o.filter(l=>{const a=_.get(l,this.component.valueProperty);(typeof a!="string"?String(a):a).includes(s)&&i.push(l)})):o.length>0&&(i=o.filter(s=>{const l=_.get(s,this.component.valueProperty),a=typeof l!="string"?String(l):l;return a==null?void 0:a.includes(this.data[this.key])}));const r=i.filter((s,l)=>l===i.findIndex(a=>_.get(s,this.component.valueProperty)===_.get(a,this.component.valueProperty)));this.setItems(r)}else logger.info(`[TF_SDK:185] \u2705 masterdata: No pre-existing value, loading full list for '${this.key}' (length: ${o.length})`),this.setItems(o);else logger.info(`[TF_SDK:186/187] \u2705 masterdata: Search/Scroll/Opened State for '${this.key}', loading list (length: ${o.length})`),this.setItems(o);break;case"resource":{if(!this.component.data.resource||!t&&!this.active){this.itemsLoadedResolve();return}let i=this.options.formio?this.options.formio.formsUrl:`${Formio.getProjectUrl()}/form`;if(i+=`/${this.component.data.resource}/submission`,t||this.additionalResourcesAvailable||!this.serverCount)try{this.loadItems(i,e,this.requestHeaders)}catch(r){logger.warn(`[TF_SDK:188] \u26A0\uFE0F Unable to load resources for ${this.key}`)}else this.setItems(this.downloadedResources);break}case"url":{if(!t&&!this.active&&!this.calculatedValue){this.itemsLoadedResolve();return}let{url:i}=this.component.data,r,s;i.startsWith("/")&&(i=(i.startsWith("/project")?Formio.getBaseUrl():Formio.getProjectUrl()||Formio.getBaseUrl())+i),this.component.data.method?(r=this.component.data.method,r.toUpperCase()==="POST"?s=this.component.data.body:s=null):r="GET";const l=this.component.authenticate?{}:{noToken:!0};this.loadItems(i,e,this.requestHeaders,l,r,s);break}case"indexeddb":{if(typeof window=="undefined")return;if(window.indexedDB||window.alert("Your browser doesn't support current version of indexedDB"),this.component.indexeddb&&this.component.indexeddb.database&&this.component.indexeddb.table){const i=window.indexedDB.open(this.component.indexeddb.database);i.onupgradeneeded=r=>{if(this.component.customOptions){const s=r.target.result,l=s.createObjectStore(this.component.indexeddb.table,{keyPath:"myKey",autoIncrement:!0});l.transaction.oncomplete=()=>{const a=s.transaction(this.component.indexeddb.table,"readwrite");this.component.customOptions.forEach(h=>{a.objectStore(this.component.indexeddb.table).put(h)})}}},i.onerror=()=>{window.alert(i.errorCode)},i.onsuccess=r=>{const a=r.target.result.transaction(this.component.indexeddb.table,"readwrite").objectStore(this.component.indexeddb.table);new Promise(h=>{const n=[];a.getAll().onsuccess=c=>{c.target.result.forEach(d=>{n.push(d)}),h(n)}}).then(h=>{_.isEmpty(this.component.indexeddb.filter)||(h=_.filter(h,this.component.indexeddb.filter)),this.setItems(h)})}}}}}addPlaceholder(){!this.component.placeholder||!this.component.placeholder.trim()||this.addOption("",this.component.placeholder,{placeholder:!0})}activate(){(this.loading||!this.active)&&this.setLoadingItem(),!this.active&&(this.activated=!0,this.triggerUpdate())}setLoadingItem(e=!1){this.choices?e?this.choices.setChoices([{value:`${this.id}-loading`,label:"Loading...",disabled:!0}],"value","label"):this.choices.setChoices([{value:"",label:`<i class="${this.iconClass("refresh")}" style="font-size:1.3em;"></i>`,disabled:!0}],"value","label",!0):(this.component.dataSrc==="url"||this.component.dataSrc==="resource")&&this.addOption("",this.t("loading..."))}get active(){return this.component.dataSrc==="masterdata"&&this.component.masterdata?!this.component.lazyLoad||this.activated:!this.component.lazyLoad||this.activated}render(){const e=this.inputInfo;return e.attr=e.attr||{},e.multiple=this.component.multiple,super.render(this.wrapElement(this.renderTemplate("select",{input:e,selectOptions:"",index:null})))}wrapElement(e){return this.component.addResource&&!this.options.readOnly?this.renderTemplate("resourceAdd",{element:e}):e}choicesOptions(){const e=this.component.hasOwnProperty("searchEnabled")?this.component.searchEnabled:!0,t=this.t(this.component.placeholder,{_userInput:!0});let o=this.component.customOptions||{};if(typeof o=="string")try{o=JSON.parse(o)}catch(a){logger.warn(a.message),o={}}const i={maxPatternLength:1e3,distance:1e3};let r={tokenize:!0,matchAllTokens:!0},s={include:"score",threshold:_.get(this,"component.searchThreshold",.3)},l={removeItemButton:this.component.disabled?!1:_.get(this.component,"removeItemButton",!0),itemSelectText:"",classNames:{containerOuter:"choices form-group formio-choices",containerInner:this.transform("class","form-control ui fluid selection dropdown")},addItemText:!1,allowHTML:!0,placeholder:!!this.component.placeholder,placeholderValue:t,noResultsText:this.t("No results found"),noChoicesText:this.t("No choices to choose from"),searchPlaceholderValue:this.t("Type to search"),shouldSort:!1,position:this.component.dropdown?this.component.dropdown:window.platform&&window.platform.iosPlatform?"bottom":"auto",searchEnabled:e,searchChoices:!this.component.searchField,searchFields:_.get(this,"component.searchFields",["label"]),searchResultLimit:_.get(this,"component.searchResultLimit",this.component.limit||100),fuseOptions:this.component.useExactSearch?Object.assign(r,i):Object.assign({},_.get(this,"component.fuseOptions",{}),Object.assign(s,i)),valueComparer:_.isEqual,resetScrollPosition:!1};return Object.assign(l,o)}attach(e){this.component.dropdownOpened=!1;const t=super.attach(e);this.loadRefs(e,{selectContainer:"single",addResource:"single",autocompleteInput:"single"});const o=this.refs.autocompleteInput;o&&this.addEventListener(o,"change",a=>{this.setValue(a.target.value)});const i=this.refs.selectContainer;if(!i)return;if(this.addEventListener(i,this.inputInfo.changeEvent,()=>{if(this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic change event on '${this.key}'`);return}this.updateValue(null,{modified:!0})}),this.attachRefreshOnBlur(),this.component.widget==="html5"){this.addFocusBlurEvents(i),this.triggerUpdate(null,!0),this.visible&&this.setItems(this.selectOptions||[]),this.focusableElement=i,this.addEventListener(i,"focus",()=>this.update()),this.addEventListener(i,"keydown",a=>{const{key:h}=a;["Backspace","Delete"].includes(h)&&this.setValue(this.emptyValue)});return}const r=i.tabIndex;this.addPlaceholder(),i.setAttribute("dir",this.i18next.dir()),this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&this.choices.containerOuter.element.parentNode&&this.choices.destroy();const s=this.choicesOptions();if(Choices&&(this.choices=new Choices(i,s),["setChoices","setValue","removeActiveItems","clearStore","removeItemsByValue","setChoiceByValue"].forEach(h=>{if(typeof this.choices[h]=="function"){const n=this.choices[h];this.choices[h]=(...c)=>{this.isUpdatingChoices=(this.isUpdatingChoices||0)+1;try{return n.apply(this.choices,c)}finally{this.isUpdatingChoices--}}}}),this.selectOptions&&this.selectOptions.length&&this.choices.setChoices(this.selectOptions,"value","label",!0),this.component.multiple?this.focusableElement=this.choices.input.element:(s.searchEnabled&&window.platform&&window.platform.iosPlatform?this.focusableElement=this.choices.input.element:this.focusableElement=this.choices.containerInner.element,this.choices.containerOuter.element.setAttribute("tabIndex","-1"),s.searchEnabled&&this.addEventListener(this.choices.containerOuter.element,"mousedown",()=>this.positionDropdown())),this.addFocusBlurEvents(this.focusableElement),this.itemsFromUrl&&!this.component.noRefreshOnScroll&&(this.scrollList=this.choices.choiceList.element,this.addEventListener(this.scrollList,"scroll",h=>{this.onScroll(h)})),s.removeItemButton&&this.addEventListener(i,"removeItem",()=>{if(this.isRemoveButtonPressed=!0,this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic removeItem event on '${this.key}' (standard list)`);return}this.isEmpty(this.dataValue)||this.updateValue(null,{modified:!0})})),window&&this.choices&&this.shouldPositionDropdown){const a=document.getElementById("formio-wrapper");a&&this.addEventListener(a,"scroll",()=>{this.positionDropdown(!0)},!1,!0),this.addEventListener(window.document,"scroll",()=>{this.positionDropdown(!0)},!1,!0)}if(this.focusableElement.setAttribute("tabIndex",r),this.component.searchField){if(this.choices&&this.choices.input&&this.choices.input.element){var l=(c,d)=>{let g;return function(){const u=this,p=arguments;clearTimeout(g),g=setTimeout(()=>c.apply(u,p),d)}};let n=this;this.addEventListener(this.choices.input.element,"input",l(function(c){if(logger.info(`[TF_SDK:INPUT] \u2328\uFE0F Choices input event triggered for '${n.key}'. Search input:`,c.target.value),n.isFromSearch=!!c.target.value,n.component.dataSrc==="masterdata"&&n.component.masterdata)if(c.target.value.length==0)logger.info(`[TF_SDK:INPUT] Search cleared for '${n.key}'`),n.triggerUpdate(),n.searchDownloadedResources=[],n.component.totalSearchResults=[],n.isFromSearch=!1,n.setItems(n.defaultDownloadedResources);else{let m=[];var d=n.component.template||"",g=d.lastIndexOf("."),u="label";if(g!==-1){var p=d.substring(g+1,d.length),y=p.indexOf("}");y!==-1&&(u=p.substring(0,y).trim())}if(logger.info(`[TF_SDK:INPUT] Parsed label key: '${u}', labelProperty: '${n.component.labelProperty}', limit: ${n.component.limit}, uniqueOptions: ${n.component.uniqueOptions}`),m=n.component.masterdata.filter(S=>{if(!S)return!1;let v;const f=[];n.component.labelProperty&&f.push(n.component.labelProperty),u&&!f.includes(u)&&f.push(u);const R=["Name","label","value","text","title"];for(const w of R)f.includes(w)||f.push(w);for(const w of f)if(S[w]!==void 0&&S[w]!==null){v=S[w];break}return v==null?Object.values(S).some(w=>w&&String(w).toLowerCase().includes(c.target.value.toLowerCase())):String(v).toLowerCase().includes(c.target.value.toLowerCase())}),logger.info(`[TF_SDK:INPUT] Found ${m.length} items matching '${c.target.value}' out of ${n.component.masterdata.length}`),m.length>n.component.limit){logger.info(`[TF_SDK:INPUT] Found items count ${m.length} exceeds limit ${n.component.limit}. Slicing.`),n.component.totalSearchResults=[],n.component.totalSearchResults=m;let S=n.component.totalSearchResults.slice(0,n.component.limit);n.setItems(S)}else logger.info(`[TF_SDK:INPUT] Setting items directly. Count: ${m.length}`),n.setItems(m)}else c.target.value?(n.serverCount=null,n.downloadedResources=[]):n.triggerUpdate()},1e3))}this.addEventListener(i,"choice",()=>{this.component.multiple&&this.component.dataSrc==="resource"&&this.isFromSearch&&this.triggerUpdate(),this.isFromSearch=!1});const a=this.component.searchField&&(this.isSelectResource||this.isSelectURL)?(this.component.searchDebounce===0?0:this.component.searchDebounce||this.defaultSchema.searchDebounce)*1e3:0,h=n=>{this.triggerUpdate(n.detail.value)};this.addEventListener(i,"search",_.debounce(n=>{h(n),this.positionDropdown()},a)),this.addEventListener(i,"stopSearch",()=>this.triggerUpdate()),this.addEventListener(i,"hideDropdown",()=>{if(this.component.dropdownOpened=!1,this.component.totalSearchResults=[],this.component.searchDownloadedResources=[],this.isFromSearch=!1,this.component.dataSrc==="masterdata"&&this.component.masterdata){let n,c={};c.limit=this.component.limit;const d=this.filteredMasterdata;this.data[this.key]&&String(this.data[this.key]).length>0&&(n=d.filter(u=>{const p=u[this.component.valueProperty],y=typeof p!="string"?String(p):p;return y==null?void 0:y.includes(this.data[this.key])})),this.defaultDownloadedResources.findIndex(u=>u[this.component.valueProperty]===String(this.data[this.key]))>-1||n&&n.length>0&&this.defaultDownloadedResources.push(n[0]),c=this.defaultDownloadedResources,c.serverCount=d.length,c.skip=this.defaultDownloadedResources.length+this.component.limit,this.setItems(this.defaultDownloadedResources)}}),this.addEventListener(i,"hideDropdown",()=>{const n=document.getElementById("form-container"),c=n?n.scrollTop:0;this.choices&&this.choices.input&&this.choices.input.element&&(this.choices.input.element.value=""),this.component.dataSrc==="masterdata"&&this.updateItems(null,!0),n&&c>0&&requestAnimationFrame(()=>{n.scrollTop===0&&!window._unv_selecting&&(n.scrollTop=c)})})}return this.addEventListener(i,"mousedown",()=>{window._unv_selecting=!0,window.platform&&window.platform.iosPlatform&&document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.classList.contains("choices__input"))&&document.activeElement.blur(),setTimeout(()=>{window._unv_selecting=!1},500),this.positionDropdown()}),this.addEventListener(i,"showDropdown",()=>{this.activated||this.update(),this.positionDropdown(),this.component.dataSrc==="masterdata"&&this.component.masterdata&&(this.component.dropdownOpened=!0,(!this.defaultDownloadedResources||this.defaultDownloadedResources.length<this.filteredMasterdata.length)&&this.updateItems(null,!0))}),this.shouldPositionDropdown&&this.addEventListener(i,"highlightChoice",()=>{this.positionDropdown()}),this.addEventListener(i,"hideDropdown",()=>{this.component.dataSrc==="masterdata"&&this.component.masterdata&&(this.component.dropdownOpened=!1)}),this.addEventListener(i,"search",a=>{if(logger.info(`[TF_SDK:SEARCH] \u{1F50D} Choices search event triggered for '${this.key}'. Search input:`,a.detail.value),this.component.dataSrc==="masterdata"&&this.component.masterdata){var h=this.component.template||"",n=h.lastIndexOf("."),c="label";if(n!==-1){var d=h.substring(n+1,h.length),g=d.indexOf("}");g!==-1&&(c=d.substring(0,g).trim())}const u=this.component.searchField?this.component.searchField.replace(/__regex$/,""):"";logger.info(`[TF_SDK:SEARCH] Configured searchField: '${this.component.searchField}', clean: '${u}', parsedLabel: '${c}', limit: ${this.component.limit}, uniqueOptions: ${this.component.uniqueOptions}`),this.searchDownloadedResources=this.filteredMasterdata.filter(p=>{if(!p)return!1;let y;const m=[];this.component.searchField&&m.push(this.component.searchField),u&&!m.includes(u)&&m.push(u),this.component.labelProperty&&!m.includes(this.component.labelProperty)&&m.push(this.component.labelProperty),c&&!m.includes(c)&&m.push(c);const S=["Name","label","value","text","title"];for(const f of S)m.includes(f)||m.push(f);for(const f of m)if(p[f]!==void 0&&p[f]!==null){y=p[f];break}let v=!1;return y==null?v=Object.values(p).some(f=>f&&String(f).toLowerCase().includes(a.detail.value.toLowerCase())):v=String(y).toLowerCase().includes(a.detail.value.toLowerCase()),v}),logger.info(`[TF_SDK:SEARCH] Found ${this.searchDownloadedResources.length} matching resources out of ${this.filteredMasterdata.length}`),this.isFromSearch=!0}}),this.choices&&s.placeholderValue&&this.choices._isSelectOneElement&&(this.addPlaceholderItem(s.placeholderValue),this.addEventListener(i,"removeItem",()=>{if(this.addPlaceholderItem(s.placeholderValue),this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic removeItem event on '${this.key}' (placeholder list)`);return}this.isEmpty(this.dataValue)||this.updateValue(null,{modified:!0})})),this.addValueOptions(),this.setChoicesValue(this.dataValue),this.isSelectResource&&this.refs.addResource&&this.addEventListener(this.refs.addResource,"click",a=>{a.preventDefault();const h=this.ce("div"),n=this.createModal(h),d=`${_.get(this.root,"formio.projectUrl",Formio.getProjectUrl())}/form/${this.component.data.resource}`;new Form(h,d,{}).ready.then(g=>{g.on("submit",u=>{let p=this.valueProperty?_.get(u,this.valueProperty):u;this.component.multiple&&(p=[...this.dataValue,p]),this.setValue(p),this.triggerUpdate(),n.close()})})}),this.disabled=this.shouldDisabled,this.updateItems(),this.triggerUpdate(),this.component.lazyLoad||(this.activated=!0),t}setDropdownPosition(){let e,t;if(this.choices&&this.choices.dropdown&&this.choices.dropdown.element&&(e=this.choices.dropdown.element),this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&(t=this.choices.containerOuter.element),!e||!t){console.warn("[TF_SELECT_LOG:ERR] \u26A0\uFE0F dropdown or container element not found in setDropdownPosition");return}const o=t.getBoundingClientRect(),i=window.visualViewport?window.visualViewport.height:window.innerHeight,r=i-(o.top+o.height),s=o.top;let l=t.classList.contains("is-flipped");!l&&r<180&&s>r?(l=!0,t.classList.add("is-flipped"),e.classList.add("is-flipped")):l&&r>=200&&(l=!1,t.classList.remove("is-flipped"),e.classList.remove("is-flipped"));const a=e.offsetHeight||220;let h,n;l?(n=Math.min(a,Math.max(120,s-20)),h=Math.max(10,o.top-n)):(h=o.top+o.height,n=Math.max(120,Math.min(a,i-h-15)));const c={left:`${o.left}px`,width:`${o.width}px`,position:"fixed",bottom:"unset",right:"unset",top:`${h}px`,maxHeight:`${n}px`};_.assign(e.style,c)}hasDataGridAncestor(e){return e=e||this,e.inDataGrid||e.type==="datagrid"?!0:e.parent?this.hasDataGridAncestor(e.parent):!1}positionDropdown(e){!this.shouldPositionDropdown||!this.choices||this.choices.dropdown&&!this.choices.dropdown.isActive&&e||(this.setDropdownPosition(),this.itemsLoaded.then(()=>{this.setDropdownPosition()}))}get isLoadingAvailable(){return!this.isScrollLoading&&this.additionalResourcesAvailable}onScroll(e){if(!this.isFromSearch)if(this.component.dataSrc==="masterdata"&&this.component.masterdata&&this.defaultDownloadedResources.length<this.filteredMasterdata.length){var t=e.target;E?t.scrollHeight-t.scrollTop===t.clientHeight&&(this.isScrollLoading=!0,this.triggerUpdate(this.choices.input.element.value),this.setMasterdata()):(this.isScrollLoading=!0,this.triggerUpdate(this.choices.input.element.value),this.setMasterdata())}else this.isLoadingAvailable&&(this.isScrollLoading=!0,this.setLoadingItem(!0),this.triggerUpdate(this.choices.input.element.value))}setMasterdata(){if(this.component.dataSrc==="masterdata"&&this.component.masterdata){let e={},t;e.limit=this.component.limit;let o;const i=this.filteredMasterdata;if(this.data[this.key]&&String(this.data[this.key]).trim().length>0&&(o=i.filter(r=>{const s=_.get(r,this.component.valueProperty),l=typeof s!="string"?String(s):s;return l==null?void 0:l.includes(this.data[this.key])})),this.isFromSearch&&this.searchDownloadedResources&&this.searchDownloadedResources.length>0){const r=this.component.totalSearchResults||this.searchDownloadedResources||[];t=r.slice(this.searchDownloadedResources.length,this.searchDownloadedResources.length+this.component.limit),e=t,e.serverCount=r.length,e.skip=this.searchDownloadedResources.length+this.component.limit}else{t=i.slice(this.defaultDownloadedResources.length,this.defaultDownloadedResources.length+this.component.limit);let r=this.defaultDownloadedResources.filter(a=>t.includes(a));if(r&&r.length>0){let a=t.findIndex(h=>_.get(h,this.component.valueProperty)===_.get(r[0],this.component.valueProperty));a>-1&&t.splice(a,1)}let s=t.findIndex(a=>_.get(a,this.component.valueProperty)===String(this.data[this.key]));s>-1&&t.splice(s,1),this.defaultDownloadedResources.findIndex(a=>_.get(a,this.component.valueProperty)===String(this.data[this.key]))>-1||o&&o.length>0&&t.push(o[0]),e=t,e.serverCount=i.length,e.skip=this.defaultDownloadedResources.length+this.component.limit}this.setItems(e)}}attachRefreshOnBlur(){this.component.refreshOnBlur&&this.on("blur",e=>{this.checkRefreshOn([{instance:e,value:e.dataValue}],{fromBlur:!0})})}addPlaceholderItem(e){this.choices._store.activeItems.length||this.choices._addItem({value:e,label:e,choiceId:0,groupId:-1,customProperties:null,placeholder:!0,keyCode:null})}update(){this.component.dataSrc==="custom"&&this.updateCustomItems(),this.activate()}set disabled(e){super.disabled=e,this.choices&&(e?(this.setDisabled(this.choices.containerInner.element,!0),this.focusableElement.removeAttribute("tabIndex"),this.choices.disable()):(this.setDisabled(this.choices.containerInner.element,!1),this.focusableElement.setAttribute("tabIndex",this.component.tabindex||0),this.choices.enable()))}get disabled(){return super.disabled}set visible(e){e&&!this._visible!=!e&&this.triggerUpdate(),super.visible=e}get visible(){return super.visible}addCurrentChoices(e,t,o){if(!e)return!1;const i=[],r=e.reduce((s,l)=>{if(!l||_.isEmpty(l))return s;let a=!1;const h=t===this.selectOptions;return t&&t.length&&_.each(t,n=>{if(n._id&&l._id&&n._id===l._id)return a=!0,!1;const c=o?n.value:this.itemValue(n,h);return a|=_.isEqual(c,l),!a}),a?a||s:(i.push(this.selectValueAndLabel(l)),!0)},!1);return this.component.dataSrc==="masterdata"&&this.component.masterdata?this.isFromSearch||i.length&&(this.choices&&this.choices.setChoices(i,"value","label"),i.map(s=>{this.addOption(s.value,s.label)})):i.length&&(this.choices&&this.choices.setChoices(i,"value","label"),i.map(s=>{this.addOption(s.value,s.label)})),r}getValueAsString(e,t){return this.component.multiple&&Array.isArray(e)?e.map(o=>this.asString(o,t)).join(", "):this.asString(e,t)}getValue(){if(this.viewOnly||this.loading||!this.component.lazyLoad&&!this.selectOptions.length||!this.element)return this.dataValue;let e=this.emptyValue;if(this.choices)e=this.choices.getValue(!0),!this.component.multiple&&this.component.placeholder&&e===this.t(this.component.placeholder,{_userInput:!0})&&(e=this.emptyValue);else if(this.refs.selectContainer){if(e=this.refs.selectContainer.value,this.valueProperty===""||this.isEntireObjectDisplay()){if(e==="")return{};const t=this.selectOptions[e]||this.selectOptions.find(o=>o.id===e);t&&_.isObject(t.value)&&(e=t.value)}}else e=this.dataValue;return e==null&&(e=""),e}redraw(){const e=super.redraw();return this.triggerUpdate(),e}normalizeSingleValue(e,t){if(_.isNil(e))return;const o=_.isObject(e);if(o&&Object.keys(e).length===0)return e;if(t){const s=this.component.reference&&e&&e._id?e._id.toString():e,l=!o||this.component.reference;if(s&&l&&this.templateData&&this.templateData[s]&&this.root&&this.root.submission){const a=this.root.submission;a.metadata||(a.metadata={}),a.metadata.selectData||(a.metadata.selectData={});let h=this.templateData[s];if(this.component.multiple){h={};const n=this.dataValue;n&&_.isArray(n)&&n.length&&n.forEach(c=>{const d=this.component.reference?c._id.toString():c;h[d]=this.templateData[d]}),h[e]=this.templateData[e]}_.set(a.metadata.selectData,this.path,h)}}const i=this.component.dataType||"auto",r={value:e,number(){const s=Number(this.value),l=e.toString()===s.toString();return!Number.isNaN(s)&&Number.isFinite(s)&&e!==""&&l&&(this.value=s),this},boolean(){return _.isString(this.value)&&(this.value.toLowerCase()==="true"||this.value.toLowerCase()==="false")&&(this.value=this.value.toLowerCase()==="true"),this},string(){return this.value=String(this.value),this},object(){return this},auto(){return _.isObject(this.value)?this.value=this.object().value:this.value=this.string().number().boolean().value,this}};try{return r[i]().value}catch(s){return logger.warn("[TF_SDK:189] \u26A0\uFE0F Failed to normalize value",s),e}}normalizeValue(e){return this.component.multiple&&Array.isArray(e)?e.map(t=>this.normalizeSingleValue(t,!0)):super.normalizeValue(this.normalizeSingleValue(e,!0))}updateValue(e,t){return this.isUpdatingChoices>0?(logger.debug(`[TF_SDK] \u2139\uFE0F Blocked updateValue call on '${this.key}' due to programmatic choices update.`),!1):super.updateValue(e,t)}setValue(e,t={}){if(e&&String(e).length>0&&$(".barcode-select-error").remove(),localStorage.getItem("renderMode")==="html"&&this.component.dataSrc==="values"&&this.component.data.values.filter(n=>{(e&&n.value===e||e&&n.value===String(e))&&(e=n.label)}),localStorage.getItem("renderMode")==="html"&&this.component.dataSrc==="masterdata"&&!this.component.multiple){var o=this.component.template,i=o.substring(o.lastIndexOf(".")+1,o.length),r=i.substring(0,i.indexOf("}"),i.length);r=r.trim(),this.component.masterdata.filter(n=>{(e&&n[this.component.valueProperty]===e||e&&n[this.component.valueProperty]===String(e))&&(e=n[r])})}const s=this.dataValue,l=this.updateValue(e,t);e=this.dataValue;const a=!this.isEmpty(s),h=!this.isEmpty(e);if(this.component.multiple&&Array.isArray(e)?e=e.map(n=>typeof n=="boolean"||typeof n=="number"?n.toString():n):(typeof e=="boolean"||typeof e=="number")&&(e=e.toString()),this.isHtmlRenderMode()&&t&&t.fromSubmission&&l)return this.itemsLoaded.then(()=>{this.redraw()}),l;if(this.loading)return l;if(this.isInitApiCallNeeded(h)){this.loading=!0,this.lazyLoadInit=!0;const n=this.component.searchField||this.component.valueProperty;return this.triggerUpdate(_.get(e.data||e,n,e),!0),l}return this.itemsLoaded.then(()=>{this.addValueOptions(),this.setChoicesValue(e,a,t)}),l}isInitApiCallNeeded(e){return this.component.lazyLoad&&!this.lazyLoadInit&&!this.active&&!this.selectOptions.length&&e&&this.shouldInitialLoad&&this.visible&&(this.component.searchField||this.component.valueProperty)}setChoicesValue(e,t,o={}){const i=!this.isEmpty(e)||o.fromSubmission;if(t=t===void 0?!0:t,this.choices)if(i)if(this.component.dataSrc==="masterdata"&&this.component.masterdata){if(!this.isFromSearch){this.choices.removeActiveItems();const r=Array.isArray(e)?e:[e];this.addCurrentChoices(r,this.selectOptions,!0)||this.choices.setChoices(this.selectOptions,"value","label",!0),this.choices.setChoiceByValue(e)}}else{this.choices.removeActiveItems();const r=Array.isArray(e)?e:[e];this.addCurrentChoices(r,this.selectOptions,!0)||this.choices.setChoices(this.selectOptions,"value","label",!0),this.choices.setChoiceByValue(e)}else(t||o.resetValue)&&this.choices.removeActiveItems();else if(i){const r=Array.isArray(e)?e:[e];if(!_.isEqual(this.dataValue,this.defaultValue)&&this.selectOptions.length<2||this.selectData&&o.fromSubmission){const{value:s,label:l}=this.selectValueAndLabel(this.dataValue);this.addOption(s,l)}_.each(this.selectOptions,s=>{_.each(r,l=>{if(s.value===""&&(s.value={}),_.isEqual(l,s.value)&&s.element)return s.element.selected=!0,s.element.setAttribute("selected","selected"),!1})})}else _.each(this.selectOptions,r=>{r.element&&(r.element.selected=!1,r.element.removeAttribute("selected"))})}get itemsLoaded(){return this._itemsLoaded||Promise.resolve()}set itemsLoaded(e){this._itemsLoaded=e}validateValueAvailability(e,t){if(!F(e)||!t)return!0;const o=this.getOptionsValues();if(o){if(_.isObject(t)){const i=r=>{const s=this.normalizeSingleValue(r,!0);if(!_.isObject(s))return!1;try{return JSON.stringify(s)===JSON.stringify(t)}catch(l){return logger.error("Error while comparing items",l),!1}};return o.findIndex(r=>i(r))!==-1}return o.findIndex(i=>this.normalizeSingleValue(i)===t)!==-1}return!1}getOptionValue(e){return _.isObject(e)&&this.isEntireObjectDisplay()?this.normalizeSingleValue(e):_.isObject(e)&&(this.valueProperty||this.component.key!=="resource")?e:_.isObject(e)&&!this.valueProperty?this.interpolate(this.component.template,{item:e}).replace(/<\/?[^>]+(>|$)/g,""):_.isNull(e)?this.emptyValue:String(this.normalizeSingleValue(e))}getOptionsValues(){let e=[];switch(this.component.dataSrc){case"values":e=this.component.data.values;break;case"json":e=this.component.data.json;break;case"custom":e=this.getCustomItems();break}if(typeof e=="string")try{e=JSON.parse(e)}catch(t){logger.warn(t.message),e=[]}if(Array.isArray(e))return e.map(t=>this.getOptionValue(this.itemValue(t)))}deleteValue(){this.setValue("",{noUpdateEvent:!0}),this.unset()}validateMultiple(){return!1}isBooleanOrNumber(e){return typeof e=="number"||typeof e=="boolean"}getNormalizedValues(){if(!(!this.component||!this.component.data||!this.component.data.values))return this.component.data.values.map(e=>({label:e.label,value:String(this.normalizeSingleValue(e.value))}))}asString(e,t={}){var r;e=e||this.getValue();const o=(s,l)=>l?(Array.isArray(s)?s.forEach(a=>a[l]=a[l].toString()):s[l]=s[l].toString(),s):(this.isBooleanOrNumber(s)&&(s=s.toString()),Array.isArray(s)&&s.some(a=>this.isBooleanOrNumber(a))&&(s=s.map(a=>{this.isBooleanOrNumber(a)&&(a=a.toString())})),s);if(e=o(e),this.component.dataSrc==="masterdata"&&this.component.masterdata){const s=l=>(typeof l=="string"||typeof l=="number")&&this.findMasterdataItem(l)||l;Array.isArray(e)?e=e.map(s):e!=null&&(e=s(e))}if(["values","custom"].includes(this.component.dataSrc)&&!this.asyncCustomValues()){const{items:s,valueProperty:l}=this.component.dataSrc==="values"?{items:o(this.getNormalizedValues(),"value"),valueProperty:"value"}:{items:o(this.getCustomItems(),this.valueProperty),valueProperty:this.valueProperty},a=()=>{const h=_.find(s,[l,e]),n=this.defaultSchema.data.values||[];return _.isEqual(h,n[0])?"-":h};e=this.component.multiple&&Array.isArray(e)?_.filter(s,h=>e.includes(h.value)):l?(r=a())!=null?r:{value:e,label:e}:e}if(_.isString(e)&&this.component.dataSrc!=="masterdata")return e;const i=s=>{const l=this.itemTemplate(s);return t.csv&&l?unescapeHTML(l):l};if(Array.isArray(e)){const s=[];return e.forEach(l=>s.push(i(l))),this.component.dataSrc==="resource"&&s.length>0?s.join(", "):s.length>0?s.join("<br />"):"-"}return this.isEntireObjectDisplay()&&_.isObject(e)?JSON.stringify(e):_.isNil(e)?"-":this.itemTemplate(e)}detach(){this.off("blur"),this.choices&&(this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&this.choices.containerOuter.element.parentNode&&this.choices.destroy(),this.choices=null),super.detach()}focus(){this.focusableElement&&(super.focus.call(this),this.focusableElement.focus())}setErrorClasses(e,t,o,i,r=this.element){super.setErrorClasses(e,t,o,i,r),this.choices?super.setErrorClasses([this.choices.containerInner.element],t,o,i,r):super.setErrorClasses([this.refs.selectContainer],t,o,i,r)}addFocusBlurEvents(e){this.addEventListener(e,"focus",()=>{this.root.focusedComponent!==this?(this.root.pendingBlur&&this.root.pendingBlur(),this.root.focusedComponent=this,this.emit("focus",this)):this.root.focusedComponent===this&&this.root.pendingBlur&&(this.root.pendingBlur.cancel(),this.root.pendingBlur=null)}),this.addEventListener(e,"blur",()=>{this.root.pendingBlur=FormioUtils.delay(()=>{this.emit("blur",this),this.component.validateOn==="blur"&&this.root.triggerChange({fromBlur:!0},{instance:this,component:this.component,value:this.dataValue,flags:{fromBlur:!0}}),this.root.focusedComponent=null,this.root.pendingBlur=null})})}}b&&b.Components?b.Components.addComponent("select",I):typeof Formio!="undefined"&&Formio.Components&&Formio.Components.addComponent("select",I)})();</script>
|
|
38863
|
+
`),t}}}static savedValueTypes(e){const{boolean:t,string:n,number:o,object:r,array:s}=componentValueTypes,{dataType:h,reference:a}=e,l=getComponentSavedTypes(e);return l||(a?[r]:h==="object"?[r,s]:componentValueTypes[h]?[componentValueTypes[h]]:[t,n,o,r,s])}init(){super.init(),this.templateData={},this.validators=(this.validators||[]).concat(["select","onlyAvailableItems"]);let e=[];const t=_.debounce((...n)=>(e=[],this.updateItems.apply(this,n)),100);this.triggerUpdate=(...n)=>(typeof this.itemsLoadedResolve=="function"&&this.itemsLoadedResolve(),this.itemsLoaded=new Promise(o=>{this.itemsLoadedResolve=o}),n.length&&(e=n),t(...e)),this.selectOptions=[],this.itemsFromUrl&&(this.isFromSearch=!1,this.searchServerCount=null,this.defaultServerCount=null,this.isScrollLoading=!1,this.searchDownloadedResources=[],this.defaultDownloadedResources=[]),this.activated=!1,this.itemsLoaded=new Promise(n=>{this.itemsLoadedResolve=n}),this.shouldPositionDropdown=this.hasDataGridAncestor(),this.isHtmlRenderMode()&&this.activate(),this.getTemplateKeys()}getTemplateKeys(){const e=this.component.template;this.templateKeys=this.options.readOnly&&e?FormioUtils.getItemTemplateKeys(e):[]}get dataReady(){return this.root&&this.root.submissionSet&&!this.attached?Promise.resolve():this.itemsLoaded}get defaultSchema(){return I.schema()}get emptyValue(){if(this.component.multiple)return[];if(this.component.dataSrc==="json"&&this.component.data.json){const e=this.component.data.json[0];let t;return this.valueProperty?t=_.get(e,this.valueProperty):t=e,t&&typeof t=="string"?"":{}}return this.valueProperty?"":{}}get valueProperty(){return this.component.valueProperty?this.component.valueProperty:this.component.dataSrc==="values"?"value":""}get inputInfo(){const e=super.elementInfo();return e.type="select",e.changeEvent="change",e}get isSelectResource(){return this.component.dataSrc==="resource"}get isSelectMaterdata(){return this.component.dataSrc==="masterdata"}get isSelectURL(){return this.component.dataSrc==="url"}get itemsFromUrl(){return this.isSelectResource||this.isSelectURL||this.isSelectMaterdata}get isInfiniteScrollProvided(){return this.itemsFromUrl}get shouldDisabled(){return super.shouldDisabled||this.parentDisabled}get shouldInitialLoad(){return this.component.widget==="html5"&&this.isEntireObjectDisplay()&&this.component.searchField&&this.dataValue?!1:super.shouldLoad}isEntireObjectDisplay(){return(this.component.dataSrc==="resource"||this.component.dataSrc==="masterdata")&&(this.valueProperty==="data"||this.component.valueProperty==="data")}findMasterdataItem(e){if(!this.component.masterdata||e==null)return null;const t=String(e),n=this.component.valueProperty||this.valueProperty;return this.component.masterdata.find(o=>{if(!o||typeof o!="object")return!1;if(n){let s=_.get(o,n);if(s!=null&&String(s)===t||n.startsWith("data.")&&(s=_.get(o,n.replace(/^data\./,"")),s!=null&&String(s)===t)||o[n]!==void 0&&o[n]!==null&&String(o[n])===t)return!0}const r=o.data||o;for(const s of Object.keys(r))if((/id$/i.test(s)||s==="value"||s==="_id"||s==="id")&&r[s]!==void 0&&r[s]!==null&&String(r[s])===t)return!0;return!1})}selectValueAndLabel(e){if((typeof e=="string"||typeof e=="number")&&this.component.dataSrc==="masterdata"&&this.component.masterdata){const n=this.findMasterdataItem(e);n&&(e=n)}const t=this.getOptionValue(this.isEntireObjectDisplay()&&!this.itemValue(e)?e:this.itemValue(e));return{value:t,label:this.itemTemplate(this.isEntireObjectDisplay()&&!_.isObject(e.data)?{data:e}:e,t)}}itemTemplate(e,t){if(!_.isNumber(e)&&_.isEmpty(e))return"";if((typeof e=="string"||typeof e=="number")&&this.component.dataSrc==="masterdata"&&this.component.masterdata){const r=this.findMasterdataItem(e);r&&(e=r)}if(this.options.readOnly&&this.component.readOnlyValue&&!this.component.template&&!this.component.labelProperty)return this.itemValue(e);if(e&&!this.component.template){const r=e.label||e,s=typeof r=="string"?this.t(r,{_userInput:!0}):r;return this.sanitize(s,this.shouldSanitizeValue)}if(this.component.multiple&&_.isArray(this.dataValue)?this.dataValue.find(r=>t===r):this.dataValue===t){const r=this.selectData;if(r){const s=this.component.reference&&t&&(t._id?t._id.toString():t);(!this.templateData||!this.templateData[s])&&this.getOptionTemplate(e,t),this.component.multiple?r[s]&&(e=r[s]):e=r}}if(typeof e=="string"||typeof e=="number")return this.sanitize(this.t(e,{_userInput:!0}),this.shouldSanitizeValue);if(Array.isArray(e))return e.map(r=>typeof r=="string"||typeof r=="number"?this.sanitize(this.t(r,{_userInput:!0}),this.shouldSanitizeValue):r);if(e.data){const r=/item\.data\.\w*/g.test(this.component.template);e.data=this.isEntireObjectDisplay()&&_.isObject(e.data)&&!r?JSON.stringify(e.data):e.data}let n=e;typeof e=="object"&&e!==null&&!e.data&&(n=Object.assign({data:e},e));const o=this.sanitize(this.component.template?this.interpolate(this.component.template,{item:n}):e.label);if(o){const r=o.replace(/<\/?[^>]+(>|$)/g,"");let s;return this.i18next&&this.i18next.translator&&(s=this.i18next.translator),!r||s&&!this.t(r,{_userInput:!0})?void 0:s?o.replace(r,this.t(r,{_userInput:!0})):r}else return JSON.stringify(e)}addOption(e,t,n={},o=D()){if(_.isNil(t))return;const r=this.component.idPath?this.component.idPath.split(".").reduceRight((a,l)=>({[l]:a}),o):{},s=Object.assign({value:this.getOptionValue(e),label:t},r);if(!(this.component.uniqueOptions&&this.selectOptions.find(a=>_.isEqual(a.value,s.value)))&&(e&&this.selectOptions.push(s),this.refs.selectContainer&&this.component.widget==="html5")){s.value&&_.isObject(s.value)&&_.isEmpty(s.value)&&(s.value="");const a=document.createElement("div");a.innerHTML=this.sanitize(this.renderTemplate("selectOption",{selected:_.isEqual(this.getOptionValue(this.dataValue),s.value),option:s,attrs:n,id:o,useId:(this.valueProperty===""||this.isEntireObjectDisplay())&&_.isObject(e)&&o}),this.shouldSanitizeValue).trim(),s.element=a.firstChild,this.refs.selectContainer.appendChild(s.element)}}addValueOptions(e){e=e||[];let t=!1,n=this.dataValue;if(this.options.pdf&&!e.length&&this.component.dataSrc==="url"&&this.valueProperty&&(n=Array.isArray(n)?n.map(o=>_.set({},this.valueProperty,o)):_.set({},this.valueProperty,n)),!this.selectOptions.length){const o=Array.isArray(n)&&this.component.multiple?n:[n];t=this.addCurrentChoices(o,e),!t&&!this.component.multiple&&this.addPlaceholder()}return t}disableInfiniteScroll(){this.downloadedResources&&(this.downloadedResources.serverCount=this.downloadedResources.length,this.serverCount=this.downloadedResources.length)}setItems(e,t){if(logger.info(`[TF_SDK:171] \u2705 setItems() called for '${this.key}'. Items length:`,e?e.length:0,"fromSearch:",t),this.selectItems=e,typeof e=="string")try{e=JSON.parse(e)}catch(l){logger.warn(l.message),e=[]}if(this.component.onSetItems){const l=typeof this.component.onSetItems=="function"?this.component.onSetItems(this,e):this.evaluate(this.component.onSetItems,{items:e},"items");l&&(e=l)}!this.choices&&this.refs.selectContainer&&this.empty(this.refs.selectContainer),this.component.selectValues&&(e=_.get(e,this.component.selectValues,e)||[]);let n;if(this.itemsFromUrl){n=this.isSelectURL?_.isEqual(e,this.downloadedResources):!1;const l=this.component.limit>e.length,i=n&&this.downloadedResources&&this.downloadedResources.length===e.length;l?this.disableInfiniteScroll():i?this.selectOptions=[]:this.serverCount=e.serverCount}if(this.isScrollLoading&&e)n||(this.downloadedResources=this.downloadedResources?this.downloadedResources.concat(e):e),this.downloadedResources.serverCount=e.serverCount||this.downloadedResources.serverCount;else if(this.downloadedResources=e||[],this.selectOptions=[],!_.isEmpty(this.dataValue)&&this.component.idPath){const l=_.get(this.dataValue,this.component.idPath,null),i=!_.isNil(l)&&e.find(c=>_.get(c,this.component.idPath)===l);i&&this.setValue(i)}if(t||this.addValueOptions(e),this.component.widget==="html5"&&!this.component.placeholder&&this.addOption(null,""),_.each(e,(l,i)=>{if(this.root&&this.root.options.editForm&&this.root.options.editForm._id&&this.root.options.editForm._id===l._id)return;const c=this.selectValueAndLabel(l);this.addOption(c.value,c.label,{},_.get(l,this.component.idPath,String(i)))}),logger.info(`[TF_SDK:172] \u2705 selectOptions generated for '${this.key}', length:`,this.selectOptions.length),this.choices)if(logger.info(`[TF_SDK:173] \u2705 this.choices is true for '${this.key}', dataSrc:`,this.component.dataSrc),this.component.dataSrc==="masterdata"&&this.component.masterdata)if(this.selectOptions.sort(function(l,i){const c=typeof l.label=="string"?l.label:typeof l.value=="string"?l.value:"",d=typeof i.label=="string"?i.label:typeof i.value=="string"?i.value:"";return c.localeCompare?c.localeCompare(d):c>d?1:c<d?-1:0}),this.isScrollLoading){let l=[];for(let i=0;i<e.length;i++)for(let c=0;c<this.selectOptions.length;c++)this.selectOptions[c].value===e[i][this.component.valueProperty]&&l.push(this.selectOptions[c]);logger.info(`[TF_SDK:175] \u2705 setChoices called (scrollLoading) for '${this.key}' with array length:`,l.length),this.choices.setChoices(l,"value","label",!1)}else logger.info(`[TF_SDK:176] \u2705 setChoices called (normal masterdata) for '${this.key}' with array length:`,this.selectOptions.length),this.choices.setChoices(this.selectOptions,"value","label",!0);else logger.info(`[TF_SDK:177] \u2705 setChoices called (non-masterdata) for '${this.key}' with array length:`,this.selectOptions.length),this.choices.setChoices(this.selectOptions,"value","label",!0);else this.loading;this.isScrollLoading=!1,this.loading=!1;let o=!1;if(this.choices&&this.choices.input&&this.choices.input.isFocussed&&(o=this.choices.input.isFocussed),!(t&&o))if(this.isEmpty()){if(this.shouldAddDefaultValue&&!this.options.readOnly){const l=this.defaultValue;this.isEmpty(l)||this.setValue(l)}}else if(localStorage.getItem("renderMode")==="html"){var s=this.component.template,h=s.substring(s.lastIndexOf(".")+1,s.length),a=h.substring(0,h.indexOf("}"),h.length);if(a=a.trim(),e.length>0&&this.component.multiple){let l=[];for(let i=0;i<e.length;i++)l.push(e[i][a]);this.setValue(l,{noUpdateEvent:!1})}}else this.setValue(this.dataValue,{noUpdateEvent:!0});this.itemsLoadedResolve()}getSingleItemValueForHTMLMode(e){const t=this.selectOptions&&this.selectOptions.find(({value:n})=>_.isEqual(n,e));return t&&t.label||e}itemValueForHTMLMode(e){return this.isHtmlRenderMode()?Array.isArray(e)?e.map(n=>Array.isArray(n)?this.itemValueForHTMLMode(n):this.getSingleItemValueForHTMLMode(n)).join(", "):this.getSingleItemValueForHTMLMode(e):super.itemValueForHTMLMode(e)}get defaultValue(){let e=super.defaultValue;return!e&&(this.component.defaultValue===!1||this.component.defaultValue===0)&&(e=this.component.defaultValue),e}get loadingError(){return!this.component.refreshOn&&!this.component.refreshOnBlur&&this.networkError}loadItems(e,t,n,o,r,s){if(o=o||{},!this.shouldLoad||!this.itemsFromUrl&&this.options.readOnly){this.isScrollLoading=!1,this.loading=!1,this.itemsLoadedResolve();return}const h=parseInt(this.component.minSearch,10);if(this.component.searchField&&h>0&&(!t||t.length<h))return this.setItems([]);r=r||"GET",r.toUpperCase()==="GET"&&(s=null);const a=this.component.limit||100,l=this.isScrollLoading?this.selectOptions.length:0,i=this.component.disableLimit?{}:{limit:a,skip:l};if(e=this.interpolate(e,{formioBase:Formio.getBaseUrl(),search:t,limit:a,skip:l,page:Math.abs(Math.floor(l/a))}),this.component.searchField&&t){const c=Array.isArray(t)?t.join(","):typeof t=="object"?JSON.stringify(t):t;i[this.component.searchField]=this.component.searchField.endsWith("__regex")?_.escapeRegExp(c):c}this.component.selectFields&&(i.select=this.component.selectFields),this.component.sort&&(i.sort=this.component.sort),_.isEmpty(i)||(e+=(e.includes("?")?"&":"?")+Formio.serialize(i,c=>this.interpolate(c))),this.component.filter&&(e+=(e.includes("?")?"&":"?")+this.interpolate(this.component.filter)),o.ignoreCache=this.component.ignoreCache,o.header=n,this.loading=!0,Formio.makeRequest(this.options.formio,"select",e,r,s,o).then(c=>{this.loading=!1,this.error=null,this.setItems(c,!!t)}).catch(c=>{this.itemsFromUrl&&(this.setItems([]),this.disableInfiniteScroll()),this.isScrollLoading=!1,this.handleLoadingError(c)})}handleLoadingError(e){this.loading=!1,e.networkError&&(this.networkError=!0),this.itemsLoadedResolve(),this.emit("componentError",{component:this.component,message:e.toString()}),logger.warn(`[TF_SDK:178] \u26A0\uFE0F Unable to load resources for ${this.key}`)}get requestHeaders(){const e=new Formio.Headers;if(this.component.data&&this.component.data.headers)try{_.each(this.component.data.headers,t=>{t.key&&e.set(t.key,this.interpolate(t.value))})}catch(t){logger.warn(t.message)}return e}getCustomItems(){const e=this.evaluate(this.component.data.custom,{values:[]},"values");return this.asyncValues=L(e),e}asyncCustomValues(){return _.isBoolean(this.asyncValues)||this.getCustomItems(),this.asyncValues}updateCustomItems(e){if(this.asyncCustomValues()){if(!e&&!this.active){this.itemsLoadedResolve();return}this.loading=!0,this.getCustomItems().then(t=>{this.loading=!1,this.setItems(t||[])}).catch(t=>{this.handleLoadingError(t)})}else this.setItems(this.getCustomItems()||[])}isEmpty(e=this.dataValue){return super.isEmpty(e)||e===void 0}refresh(e,t){if(this.component.clearOnRefresh){const n=t?t.instance:null;n&&!n.pristine&&this.setValue(this.emptyValue)}this.updateItems(null,!0)}get additionalResourcesAvailable(){return _.isNil(this.serverCount)||this.serverCount>this.downloadedResources.length}get serverCount(){return this.isFromSearch?this.searchServerCount:this.defaultServerCount}set serverCount(e){this.isFromSearch?this.searchServerCount=e:this.defaultServerCount=e}get downloadedResources(){return this.isFromSearch?this.searchDownloadedResources:this.defaultDownloadedResources}set downloadedResources(e){this.isFromSearch?this.searchDownloadedResources=e:this.defaultDownloadedResources=e}get filteredMasterdata(){if(!this.component.masterdata)return[];let e=[...this.component.masterdata];if(this.component.filter)try{const t=this.component.filter.replace(/(~=\s*)(\{\{.*?\}\})/g,'$1"$2"'),n=this.interpolate(t,{data:this.data}),o=filtrex.compileExpression(n,{customProp:filtrex.useDotAccessOperatorAndOptionalChaining,extraFunctions:{equalsIgnoreCase:(r,s)=>String(r).toLowerCase()===String(s).toLowerCase(),matchIgnoreCase:(r,s)=>new RegExp(s,"i").test(String(r))}});e=e.filter(r=>o({data:r}))}catch(t){return console.warn("[TF_SDK:153] \u26A0\uFE0F Filter error:",t),[]}return e}updateItems(e,t){if(logger.info(`[TF_SDK:179] \u2705 updateItems() called for '${this.key}'. searchInput:`,e,"forceUpdate:",t,"dataSrc:",this.component.dataSrc),this.itemsLoaded=new Promise(n=>{this.itemsLoadedResolve=n}),!this.component.data){logger.warn(`[TF_SDK:180] \u26A0\uFE0F Select component ${this.key} does not have data configuration.`),this.itemsLoadedResolve();return}if(!this.visible){this.itemsLoadedResolve();return}switch(this.component.dataSrc){case"values":this.setItems(this.component.data.values);break;case"json":this.setItems(this.component.data.json);break;case"custom":this.updateCustomItems();break;case"masterdata":logger.info(`[TF_SDK:181] \u2705 masterdata case for '${this.key}'. masterdata length:`,this.filteredMasterdata?this.filteredMasterdata.length:0);let n=this.filteredMasterdata||[];if(n.length>0&&(n=n.map(o=>o&&typeof o=="object"&&!o.data?Object.assign({data:o},o):o)),!this.isFromSearch&&!this.isScrollLoading&&!this.component.dropdownOpened)if(logger.info(`[TF_SDK:182] \u2705 masterdata: Initial/Unopened State for '${this.key}'`),this.defaultDownloadedResources&&this.defaultDownloadedResources.length>0&&this.defaultDownloadedResources.length<n.length)logger.info(`[TF_SDK:183] \u2705 masterdata: defaultDownloadedResources > 0 for '${this.key}'`),this.setItems(this.defaultDownloadedResources);else if(!this.component.dropdownOpened&&this.data[this.key]&&String(this.data[this.key]).trim().length>0){logger.info(`[TF_SDK:184] \u2705 masterdata: Has pre-existing value for '${this.key}'`,this.data[this.key]);let o=[];this.component.multiple&&n.length>0?this.data[this.key].forEach(s=>n.filter(h=>{const a=_.get(h,this.component.valueProperty);(typeof a!="string"?String(a):a).includes(s)&&o.push(h)})):n.length>0&&(o=n.filter(s=>{const h=_.get(s,this.component.valueProperty),a=typeof h!="string"?String(h):h;return a==null?void 0:a.includes(this.data[this.key])}));const r=o.filter((s,h)=>h===o.findIndex(a=>_.get(s,this.component.valueProperty)===_.get(a,this.component.valueProperty)));this.setItems(r)}else logger.info(`[TF_SDK:185] \u2705 masterdata: No pre-existing value, loading full list for '${this.key}' (length: ${n.length})`),this.setItems(n);else logger.info(`[TF_SDK:186/187] \u2705 masterdata: Search/Scroll/Opened State for '${this.key}', loading list (length: ${n.length})`),this.setItems(n);break;case"resource":{if(!this.component.data.resource||!t&&!this.active){this.itemsLoadedResolve();return}let o=this.options.formio?this.options.formio.formsUrl:`${Formio.getProjectUrl()}/form`;if(o+=`/${this.component.data.resource}/submission`,t||this.additionalResourcesAvailable||!this.serverCount)try{this.loadItems(o,e,this.requestHeaders)}catch(r){logger.warn(`[TF_SDK:188] \u26A0\uFE0F Unable to load resources for ${this.key}`)}else this.setItems(this.downloadedResources);break}case"url":{if(!t&&!this.active&&!this.calculatedValue){this.itemsLoadedResolve();return}let{url:o}=this.component.data,r,s;o.startsWith("/")&&(o=(o.startsWith("/project")?Formio.getBaseUrl():Formio.getProjectUrl()||Formio.getBaseUrl())+o),this.component.data.method?(r=this.component.data.method,r.toUpperCase()==="POST"?s=this.component.data.body:s=null):r="GET";const h=this.component.authenticate?{}:{noToken:!0};this.loadItems(o,e,this.requestHeaders,h,r,s);break}case"indexeddb":{if(typeof window=="undefined")return;if(window.indexedDB||window.alert("Your browser doesn't support current version of indexedDB"),this.component.indexeddb&&this.component.indexeddb.database&&this.component.indexeddb.table){const o=window.indexedDB.open(this.component.indexeddb.database);o.onupgradeneeded=r=>{if(this.component.customOptions){const s=r.target.result,h=s.createObjectStore(this.component.indexeddb.table,{keyPath:"myKey",autoIncrement:!0});h.transaction.oncomplete=()=>{const a=s.transaction(this.component.indexeddb.table,"readwrite");this.component.customOptions.forEach(l=>{a.objectStore(this.component.indexeddb.table).put(l)})}}},o.onerror=()=>{window.alert(o.errorCode)},o.onsuccess=r=>{const a=r.target.result.transaction(this.component.indexeddb.table,"readwrite").objectStore(this.component.indexeddb.table);new Promise(l=>{const i=[];a.getAll().onsuccess=c=>{c.target.result.forEach(d=>{i.push(d)}),l(i)}}).then(l=>{_.isEmpty(this.component.indexeddb.filter)||(l=_.filter(l,this.component.indexeddb.filter)),this.setItems(l)})}}}}}addPlaceholder(){!this.component.placeholder||!this.component.placeholder.trim()||this.addOption("",this.component.placeholder,{placeholder:!0})}activate(){(this.loading||!this.active)&&this.setLoadingItem(),!this.active&&(this.activated=!0,this.triggerUpdate())}setLoadingItem(e=!1){this.choices?e?this.choices.setChoices([{value:`${this.id}-loading`,label:"Loading...",disabled:!0}],"value","label"):this.choices.setChoices([{value:"",label:`<i class="${this.iconClass("refresh")}" style="font-size:1.3em;"></i>`,disabled:!0}],"value","label",!0):(this.component.dataSrc==="url"||this.component.dataSrc==="resource")&&this.addOption("",this.t("loading..."))}get active(){return this.component.dataSrc==="masterdata"&&this.component.masterdata?!this.component.lazyLoad||this.activated:!this.component.lazyLoad||this.activated}render(){const e=this.inputInfo;return e.attr=e.attr||{},e.multiple=this.component.multiple,super.render(this.wrapElement(this.renderTemplate("select",{input:e,selectOptions:"",index:null})))}wrapElement(e){return this.component.addResource&&!this.options.readOnly?this.renderTemplate("resourceAdd",{element:e}):e}choicesOptions(){const e=this.component.hasOwnProperty("searchEnabled")?this.component.searchEnabled:!0,t=this.t(this.component.placeholder,{_userInput:!0});let n=this.component.customOptions||{};if(typeof n=="string")try{n=JSON.parse(n)}catch(a){logger.warn(a.message),n={}}const o={maxPatternLength:1e3,distance:1e3};let r={tokenize:!0,matchAllTokens:!0},s={include:"score",threshold:_.get(this,"component.searchThreshold",.3)},h={removeItemButton:this.component.disabled?!1:_.get(this.component,"removeItemButton",!0),itemSelectText:"",classNames:{containerOuter:"choices form-group formio-choices",containerInner:this.transform("class","form-control ui fluid selection dropdown")},addItemText:!1,allowHTML:!0,placeholder:!!this.component.placeholder,placeholderValue:t,noResultsText:this.t("No results found"),noChoicesText:this.t("No choices to choose from"),searchPlaceholderValue:this.t("Type to search"),shouldSort:!1,position:this.component.dropdown?this.component.dropdown:window.platform&&window.platform.iosPlatform?"bottom":"auto",searchEnabled:e,searchChoices:!this.component.searchField,searchFields:_.get(this,"component.searchFields",["label"]),searchResultLimit:_.get(this,"component.searchResultLimit",this.component.limit||100),fuseOptions:this.component.useExactSearch?Object.assign(r,o):Object.assign({},_.get(this,"component.fuseOptions",{}),Object.assign(s,o)),valueComparer:(a,l)=>{if(_.isEqual(a,l))return!0;if(a==null||l==null)return!1;if((typeof a=="string"||typeof a=="number")&&typeof l=="object"){const i=l.data||l;return i.id===a||i._id===a||i.value===a||this.component.valueProperty&&_.get(i,this.component.valueProperty)===a?!0:Object.values(i).some(c=>c===a||String(c)===String(a))}if((typeof l=="string"||typeof l=="number")&&typeof a=="object"){const i=a.data||a;return i.id===l||i._id===l||i.value===l||this.component.valueProperty&&_.get(i,this.component.valueProperty)===l?!0:Object.values(i).some(c=>c===l||String(c)===String(l))}if(typeof a=="object"&&typeof l=="object"){const i=a.data||a,c=l.data||l;if(_.isEqual(i,c))return!0;if(this.component.idPath){const d=_.get(a,this.component.idPath)||_.get(i,this.component.idPath),g=_.get(l,this.component.idPath)||_.get(c,this.component.idPath);if(d&&g&&d===g)return!0}if(i.id&&c.id&&String(i.id)===String(c.id)||i._id&&c._id&&String(i._id)===String(c._id))return!0}return!1},resetScrollPosition:!1};return Object.assign(h,n)}attach(e){this.component.dropdownOpened=!1;const t=super.attach(e);this.loadRefs(e,{selectContainer:"single",addResource:"single",autocompleteInput:"single"});const n=this.refs.autocompleteInput;n&&this.addEventListener(n,"change",a=>{this.setValue(a.target.value)});const o=this.refs.selectContainer;if(!o)return;if(this.addEventListener(o,this.inputInfo.changeEvent,()=>{if(this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic change event on '${this.key}'`);return}this.updateValue(null,{modified:!0})}),this.attachRefreshOnBlur(),this.component.widget==="html5"){this.addFocusBlurEvents(o),this.triggerUpdate(null,!0),this.visible&&this.setItems(this.selectOptions||[]),this.focusableElement=o,this.addEventListener(o,"focus",()=>this.update()),this.addEventListener(o,"keydown",a=>{const{key:l}=a;["Backspace","Delete"].includes(l)&&this.setValue(this.emptyValue)});return}const r=o.tabIndex;this.addPlaceholder(),o.setAttribute("dir",this.i18next.dir()),this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&this.choices.containerOuter.element.parentNode&&this.choices.destroy();const s=this.choicesOptions();if(Choices&&(this.choices=new Choices(o,s),["setChoices","setValue","removeActiveItems","clearStore","removeItemsByValue","setChoiceByValue"].forEach(l=>{if(typeof this.choices[l]=="function"){const i=this.choices[l];this.choices[l]=(...c)=>{this.isUpdatingChoices=(this.isUpdatingChoices||0)+1;try{return i.apply(this.choices,c)}finally{this.isUpdatingChoices--}}}}),this.selectOptions&&this.selectOptions.length&&this.choices.setChoices(this.selectOptions,"value","label",!0),this.component.multiple?this.focusableElement=this.choices.input.element:(s.searchEnabled&&window.platform&&window.platform.iosPlatform?this.focusableElement=this.choices.input.element:this.focusableElement=this.choices.containerInner.element,this.choices.containerOuter.element.setAttribute("tabIndex","-1"),s.searchEnabled&&this.addEventListener(this.choices.containerOuter.element,"mousedown",()=>this.positionDropdown())),this.addFocusBlurEvents(this.focusableElement),this.itemsFromUrl&&!this.component.noRefreshOnScroll&&(this.scrollList=this.choices.choiceList.element,this.addEventListener(this.scrollList,"scroll",l=>{this.onScroll(l)})),s.removeItemButton&&this.addEventListener(o,"removeItem",()=>{if(this.isRemoveButtonPressed=!0,this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic removeItem event on '${this.key}' (standard list)`);return}this.isEmpty(this.dataValue)||this.updateValue(null,{modified:!0})})),window&&this.choices&&this.shouldPositionDropdown){const a=document.getElementById("formio-wrapper");a&&this.addEventListener(a,"scroll",()=>{this.positionDropdown(!0)},!1,!0),this.addEventListener(window.document,"scroll",()=>{this.positionDropdown(!0)},!1,!0)}if(this.focusableElement.setAttribute("tabIndex",r),this.component.searchField){if(this.choices&&this.choices.input&&this.choices.input.element){var h=(c,d)=>{let g;return function(){const u=this,p=arguments;clearTimeout(g),g=setTimeout(()=>c.apply(u,p),d)}};let i=this;this.addEventListener(this.choices.input.element,"input",h(function(c){if(logger.info(`[TF_SDK:INPUT] \u2328\uFE0F Choices input event triggered for '${i.key}'. Search input:`,c.target.value),i.isFromSearch=!!c.target.value,i.component.dataSrc==="masterdata"&&i.component.masterdata)if(c.target.value.length==0)logger.info(`[TF_SDK:INPUT] Search cleared for '${i.key}'`),i.triggerUpdate(),i.searchDownloadedResources=[],i.component.totalSearchResults=[],i.isFromSearch=!1,i.setItems(i.defaultDownloadedResources);else{let m=[];var d=i.component.template||"",g=d.lastIndexOf("."),u="label";if(g!==-1){var p=d.substring(g+1,d.length),y=p.indexOf("}");y!==-1&&(u=p.substring(0,y).trim())}if(logger.info(`[TF_SDK:INPUT] Parsed label key: '${u}', labelProperty: '${i.component.labelProperty}', limit: ${i.component.limit}, uniqueOptions: ${i.component.uniqueOptions}`),m=i.component.masterdata.filter(S=>{if(!S)return!1;let O;const f=[];i.component.labelProperty&&f.push(i.component.labelProperty),u&&!f.includes(u)&&f.push(u);const R=["Name","label","value","text","title"];for(const w of R)f.includes(w)||f.push(w);for(const w of f)if(S[w]!==void 0&&S[w]!==null){O=S[w];break}return O==null?Object.values(S).some(w=>w&&String(w).toLowerCase().includes(c.target.value.toLowerCase())):String(O).toLowerCase().includes(c.target.value.toLowerCase())}),logger.info(`[TF_SDK:INPUT] Found ${m.length} items matching '${c.target.value}' out of ${i.component.masterdata.length}`),m.length>i.component.limit){logger.info(`[TF_SDK:INPUT] Found items count ${m.length} exceeds limit ${i.component.limit}. Slicing.`),i.component.totalSearchResults=[],i.component.totalSearchResults=m;let S=i.component.totalSearchResults.slice(0,i.component.limit);i.setItems(S)}else logger.info(`[TF_SDK:INPUT] Setting items directly. Count: ${m.length}`),i.setItems(m)}else c.target.value?(i.serverCount=null,i.downloadedResources=[]):i.triggerUpdate()},1e3))}this.addEventListener(o,"choice",()=>{this.component.multiple&&this.component.dataSrc==="resource"&&this.isFromSearch&&this.triggerUpdate(),this.isFromSearch=!1});const a=this.component.searchField&&(this.isSelectResource||this.isSelectURL)?(this.component.searchDebounce===0?0:this.component.searchDebounce||this.defaultSchema.searchDebounce)*1e3:0,l=i=>{this.triggerUpdate(i.detail.value)};this.addEventListener(o,"search",_.debounce(i=>{l(i),this.positionDropdown()},a)),this.addEventListener(o,"stopSearch",()=>this.triggerUpdate()),this.addEventListener(o,"hideDropdown",()=>{if(this.component.dropdownOpened=!1,this.component.totalSearchResults=[],this.component.searchDownloadedResources=[],this.isFromSearch=!1,this.component.dataSrc==="masterdata"&&this.component.masterdata){let i,c={};c.limit=this.component.limit;const d=this.filteredMasterdata;this.data[this.key]&&String(this.data[this.key]).length>0&&(i=d.filter(u=>{const p=u[this.component.valueProperty],y=typeof p!="string"?String(p):p;return y==null?void 0:y.includes(this.data[this.key])})),this.defaultDownloadedResources.findIndex(u=>u[this.component.valueProperty]===String(this.data[this.key]))>-1||i&&i.length>0&&this.defaultDownloadedResources.push(i[0]),c=this.defaultDownloadedResources,c.serverCount=d.length,c.skip=this.defaultDownloadedResources.length+this.component.limit,this.setItems(this.defaultDownloadedResources)}}),this.addEventListener(o,"hideDropdown",()=>{const i=document.getElementById("form-container"),c=i?i.scrollTop:0;this.choices&&this.choices.input&&this.choices.input.element&&(this.choices.input.element.value=""),this.component.dataSrc==="masterdata"&&this.updateItems(null,!0),i&&c>0&&requestAnimationFrame(()=>{i.scrollTop===0&&!window._unv_selecting&&(i.scrollTop=c)})})}return this.addEventListener(o,"mousedown",()=>{window._unv_selecting=!0,window.platform&&window.platform.iosPlatform&&document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.classList.contains("choices__input"))&&document.activeElement.blur(),setTimeout(()=>{window._unv_selecting=!1},500),this.positionDropdown()}),this.addEventListener(o,"showDropdown",()=>{this.activated||this.update(),this.positionDropdown(),this.component.dataSrc==="masterdata"&&this.component.masterdata&&(this.component.dropdownOpened=!0,(!this.defaultDownloadedResources||this.defaultDownloadedResources.length<this.filteredMasterdata.length)&&this.updateItems(null,!0))}),this.shouldPositionDropdown&&this.addEventListener(o,"highlightChoice",()=>{this.positionDropdown()}),this.addEventListener(o,"hideDropdown",()=>{this.component.dataSrc==="masterdata"&&this.component.masterdata&&(this.component.dropdownOpened=!1)}),this.addEventListener(o,"search",a=>{if(logger.info(`[TF_SDK:SEARCH] \u{1F50D} Choices search event triggered for '${this.key}'. Search input:`,a.detail.value),this.component.dataSrc==="masterdata"&&this.component.masterdata){var l=this.component.template||"",i=l.lastIndexOf("."),c="label";if(i!==-1){var d=l.substring(i+1,l.length),g=d.indexOf("}");g!==-1&&(c=d.substring(0,g).trim())}const u=this.component.searchField?this.component.searchField.replace(/__regex$/,""):"";logger.info(`[TF_SDK:SEARCH] Configured searchField: '${this.component.searchField}', clean: '${u}', parsedLabel: '${c}', limit: ${this.component.limit}, uniqueOptions: ${this.component.uniqueOptions}`),this.searchDownloadedResources=this.filteredMasterdata.filter(p=>{if(!p)return!1;let y;const m=[];this.component.searchField&&m.push(this.component.searchField),u&&!m.includes(u)&&m.push(u),this.component.labelProperty&&!m.includes(this.component.labelProperty)&&m.push(this.component.labelProperty),c&&!m.includes(c)&&m.push(c);const S=["Name","label","value","text","title"];for(const f of S)m.includes(f)||m.push(f);for(const f of m)if(p[f]!==void 0&&p[f]!==null){y=p[f];break}let O=!1;return y==null?O=Object.values(p).some(f=>f&&String(f).toLowerCase().includes(a.detail.value.toLowerCase())):O=String(y).toLowerCase().includes(a.detail.value.toLowerCase()),O}),logger.info(`[TF_SDK:SEARCH] Found ${this.searchDownloadedResources.length} matching resources out of ${this.filteredMasterdata.length}`),this.isFromSearch=!0}}),this.choices&&s.placeholderValue&&this.choices._isSelectOneElement&&(this.addPlaceholderItem(s.placeholderValue),this.addEventListener(o,"removeItem",()=>{if(this.addPlaceholderItem(s.placeholderValue),this.isUpdatingChoices>0){logger.debug(`[TF_SDK] \u2139\uFE0F Ignored programmatic removeItem event on '${this.key}' (placeholder list)`);return}this.isEmpty(this.dataValue)||this.updateValue(null,{modified:!0})})),this.addValueOptions(),this.setChoicesValue(this.dataValue),this.isSelectResource&&this.refs.addResource&&this.addEventListener(this.refs.addResource,"click",a=>{a.preventDefault();const l=this.ce("div"),i=this.createModal(l),d=`${_.get(this.root,"formio.projectUrl",Formio.getProjectUrl())}/form/${this.component.data.resource}`;new Form(l,d,{}).ready.then(g=>{g.on("submit",u=>{let p=this.valueProperty?_.get(u,this.valueProperty):u;this.component.multiple&&(p=[...this.dataValue,p]),this.setValue(p),this.triggerUpdate(),i.close()})})}),this.disabled=this.shouldDisabled,this.updateItems(),this.triggerUpdate(),this.component.lazyLoad||(this.activated=!0),t}setDropdownPosition(){let e,t;if(this.choices&&this.choices.dropdown&&this.choices.dropdown.element&&(e=this.choices.dropdown.element),this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&(t=this.choices.containerOuter.element),!e||!t){console.warn("[TF_SELECT_LOG:ERR] \u26A0\uFE0F dropdown or container element not found in setDropdownPosition");return}const n=t.getBoundingClientRect(),o=window.visualViewport?window.visualViewport.height:window.innerHeight,r=o-(n.top+n.height),s=n.top;let h=t.classList.contains("is-flipped");!h&&r<180&&s>r?(h=!0,t.classList.add("is-flipped"),e.classList.add("is-flipped")):h&&r>=200&&(h=!1,t.classList.remove("is-flipped"),e.classList.remove("is-flipped"));const a=e.offsetHeight||220;let l,i;h?(i=Math.min(a,Math.max(120,s-20)),l=Math.max(10,n.top-i)):(l=n.top+n.height,i=Math.max(120,Math.min(a,o-l-15)));const c={left:`${n.left}px`,width:`${n.width}px`,position:"fixed",bottom:"unset",right:"unset",top:`${l}px`,maxHeight:`${i}px`};_.assign(e.style,c)}hasDataGridAncestor(e){return e=e||this,e.inDataGrid||e.type==="datagrid"?!0:e.parent?this.hasDataGridAncestor(e.parent):!1}positionDropdown(e){!this.shouldPositionDropdown||!this.choices||this.choices.dropdown&&!this.choices.dropdown.isActive&&e||(this.setDropdownPosition(),this.itemsLoaded.then(()=>{this.setDropdownPosition()}))}get isLoadingAvailable(){return!this.isScrollLoading&&this.additionalResourcesAvailable}onScroll(e){if(!this.isFromSearch)if(this.component.dataSrc==="masterdata"&&this.component.masterdata&&this.defaultDownloadedResources.length<this.filteredMasterdata.length){var t=e.target;E?t.scrollHeight-t.scrollTop===t.clientHeight&&(this.isScrollLoading=!0,this.triggerUpdate(this.choices.input.element.value),this.setMasterdata()):(this.isScrollLoading=!0,this.triggerUpdate(this.choices.input.element.value),this.setMasterdata())}else this.isLoadingAvailable&&(this.isScrollLoading=!0,this.setLoadingItem(!0),this.triggerUpdate(this.choices.input.element.value))}setMasterdata(){if(this.component.dataSrc==="masterdata"&&this.component.masterdata){let e={},t;e.limit=this.component.limit;let n;const o=this.filteredMasterdata;if(this.data[this.key]&&String(this.data[this.key]).trim().length>0&&(n=o.filter(r=>{const s=_.get(r,this.component.valueProperty),h=typeof s!="string"?String(s):s;return h==null?void 0:h.includes(this.data[this.key])})),this.isFromSearch&&this.searchDownloadedResources&&this.searchDownloadedResources.length>0){const r=this.component.totalSearchResults||this.searchDownloadedResources||[];t=r.slice(this.searchDownloadedResources.length,this.searchDownloadedResources.length+this.component.limit),e=t,e.serverCount=r.length,e.skip=this.searchDownloadedResources.length+this.component.limit}else{t=o.slice(this.defaultDownloadedResources.length,this.defaultDownloadedResources.length+this.component.limit);let r=this.defaultDownloadedResources.filter(a=>t.includes(a));if(r&&r.length>0){let a=t.findIndex(l=>_.get(l,this.component.valueProperty)===_.get(r[0],this.component.valueProperty));a>-1&&t.splice(a,1)}let s=t.findIndex(a=>_.get(a,this.component.valueProperty)===String(this.data[this.key]));s>-1&&t.splice(s,1),this.defaultDownloadedResources.findIndex(a=>_.get(a,this.component.valueProperty)===String(this.data[this.key]))>-1||n&&n.length>0&&t.push(n[0]),e=t,e.serverCount=o.length,e.skip=this.defaultDownloadedResources.length+this.component.limit}this.setItems(e)}}attachRefreshOnBlur(){this.component.refreshOnBlur&&this.on("blur",e=>{this.checkRefreshOn([{instance:e,value:e.dataValue}],{fromBlur:!0})})}addPlaceholderItem(e){this.choices._store.activeItems.length||this.choices._addItem({value:e,label:e,choiceId:0,groupId:-1,customProperties:null,placeholder:!0,keyCode:null})}update(){this.component.dataSrc==="custom"&&this.updateCustomItems(),this.activate()}set disabled(e){super.disabled=e,this.choices&&(e?(this.setDisabled(this.choices.containerInner.element,!0),this.focusableElement.removeAttribute("tabIndex"),this.choices.disable()):(this.setDisabled(this.choices.containerInner.element,!1),this.focusableElement.setAttribute("tabIndex",this.component.tabindex||0),this.choices.enable()))}get disabled(){return super.disabled}set visible(e){e&&!this._visible!=!e&&this.triggerUpdate(),super.visible=e}get visible(){return super.visible}addCurrentChoices(e,t,n){if(!e)return!1;const o=[],r=e.reduce((s,h)=>{if(!h||_.isEmpty(h))return s;let a=!1;const l=t===this.selectOptions;return t&&t.length&&_.each(t,i=>{if(i._id&&h._id&&i._id===h._id)return a=!0,!1;const c=n?i.value:this.itemValue(i,l);return a|=_.isEqual(c,h),!a}),a?a||s:(o.push(this.selectValueAndLabel(h)),!0)},!1);return this.component.dataSrc==="masterdata"&&this.component.masterdata?this.isFromSearch||o.length&&(this.choices&&this.choices.setChoices(o,"value","label"),o.map(s=>{this.addOption(s.value,s.label)})):o.length&&(this.choices&&this.choices.setChoices(o,"value","label"),o.map(s=>{this.addOption(s.value,s.label)})),r}getValueAsString(e,t){return this.component.multiple&&Array.isArray(e)?e.map(n=>this.asString(n,t)).join(", "):this.asString(e,t)}getValue(){if(this.viewOnly||this.loading||!this.component.lazyLoad&&!this.selectOptions.length||!this.element)return this.dataValue;let e=this.emptyValue;if(this.choices)e=this.choices.getValue(!0),!this.component.multiple&&this.component.placeholder&&e===this.t(this.component.placeholder,{_userInput:!0})&&(e=this.emptyValue);else if(this.refs.selectContainer){if(e=this.refs.selectContainer.value,this.valueProperty===""||this.isEntireObjectDisplay()){if(e==="")return{};const t=this.selectOptions[e]||this.selectOptions.find(n=>n.id===e);t&&_.isObject(t.value)&&(e=t.value)}}else e=this.dataValue;return e==null&&(e=""),e}redraw(){const e=super.redraw();return this.triggerUpdate(),e}normalizeSingleValue(e,t){if(_.isNil(e))return;const n=_.isObject(e);if(n&&Object.keys(e).length===0)return e;if(t){const s=this.component.reference&&e&&e._id?e._id.toString():e,h=!n||this.component.reference;if(s&&h&&this.templateData&&this.templateData[s]&&this.root&&this.root.submission){const a=this.root.submission;a.metadata||(a.metadata={}),a.metadata.selectData||(a.metadata.selectData={});let l=this.templateData[s];if(this.component.multiple){l={};const i=this.dataValue;i&&_.isArray(i)&&i.length&&i.forEach(c=>{const d=this.component.reference?c._id.toString():c;l[d]=this.templateData[d]}),l[e]=this.templateData[e]}_.set(a.metadata.selectData,this.path,l)}}const o=this.component.dataType||"auto",r={value:e,number(){const s=Number(this.value),h=e.toString()===s.toString();return!Number.isNaN(s)&&Number.isFinite(s)&&e!==""&&h&&(this.value=s),this},boolean(){return _.isString(this.value)&&(this.value.toLowerCase()==="true"||this.value.toLowerCase()==="false")&&(this.value=this.value.toLowerCase()==="true"),this},string(){return this.value=String(this.value),this},object(){return this},auto(){return _.isObject(this.value)?this.value=this.object().value:this.value=this.string().number().boolean().value,this}};try{return r[o]().value}catch(s){return logger.warn("[TF_SDK:189] \u26A0\uFE0F Failed to normalize value",s),e}}normalizeValue(e){return this.component.multiple&&Array.isArray(e)?e.map(t=>this.normalizeSingleValue(t,!0)):super.normalizeValue(this.normalizeSingleValue(e,!0))}updateValue(e,t){return this.isUpdatingChoices>0?(logger.debug(`[TF_SDK] \u2139\uFE0F Blocked updateValue call on '${this.key}' due to programmatic choices update.`),!1):super.updateValue(e,t)}setValue(e,t={}){if(e&&String(e).length>0&&$(".barcode-select-error").remove(),localStorage.getItem("renderMode")==="html"&&this.component.dataSrc==="values"&&this.component.data.values.filter(i=>{(e&&i.value===e||e&&i.value===String(e))&&(e=i.label)}),localStorage.getItem("renderMode")==="html"&&this.component.dataSrc==="masterdata"&&!this.component.multiple){var n=this.component.template,o=n.substring(n.lastIndexOf(".")+1,n.length),r=o.substring(0,o.indexOf("}"),o.length);r=r.trim(),this.component.masterdata.filter(i=>{(e&&i[this.component.valueProperty]===e||e&&i[this.component.valueProperty]===String(e))&&(e=i[r])})}const s=this.dataValue,h=this.updateValue(e,t);e=this.dataValue;const a=!this.isEmpty(s),l=!this.isEmpty(e);if(this.component.multiple&&Array.isArray(e)?e=e.map(i=>typeof i=="boolean"||typeof i=="number"?i.toString():i):(typeof e=="boolean"||typeof e=="number")&&(e=e.toString()),this.isHtmlRenderMode()&&t&&t.fromSubmission&&h)return this.itemsLoaded.then(()=>{this.redraw()}),h;if(this.loading)return h;if(this.isInitApiCallNeeded(l)){this.loading=!0,this.lazyLoadInit=!0;const i=this.component.searchField||this.component.valueProperty;return this.triggerUpdate(_.get(e.data||e,i,e),!0),h}return this.itemsLoaded.then(()=>{this.addValueOptions(),this.setChoicesValue(e,a,t)}),h}isInitApiCallNeeded(e){return this.component.lazyLoad&&!this.lazyLoadInit&&!this.active&&!this.selectOptions.length&&e&&this.shouldInitialLoad&&this.visible&&(this.component.searchField||this.component.valueProperty)}setChoicesValue(e,t,n={}){const o=!this.isEmpty(e)||n.fromSubmission;if(t=t===void 0?!0:t,this.choices)if(o)if(this.component.dataSrc==="masterdata"&&this.component.masterdata){if(!this.isFromSearch){this.choices.removeActiveItems();const r=Array.isArray(e)?e:[e];this.addCurrentChoices(r,this.selectOptions,!0)||this.choices.setChoices(this.selectOptions,"value","label",!0),this.choices.setChoiceByValue(e)}}else{this.choices.removeActiveItems();const r=Array.isArray(e)?e:[e];this.addCurrentChoices(r,this.selectOptions,!0)||this.choices.setChoices(this.selectOptions,"value","label",!0),this.choices.setChoiceByValue(e)}else(t||n.resetValue)&&this.choices.removeActiveItems();else if(o){const r=Array.isArray(e)?e:[e];if(!_.isEqual(this.dataValue,this.defaultValue)&&this.selectOptions.length<2||this.selectData&&n.fromSubmission){const{value:s,label:h}=this.selectValueAndLabel(this.dataValue);this.addOption(s,h)}_.each(this.selectOptions,s=>{_.each(r,h=>{if(s.value===""&&(s.value={}),_.isEqual(h,s.value)&&s.element)return s.element.selected=!0,s.element.setAttribute("selected","selected"),!1})})}else _.each(this.selectOptions,r=>{r.element&&(r.element.selected=!1,r.element.removeAttribute("selected"))})}get itemsLoaded(){return this._itemsLoaded||Promise.resolve()}set itemsLoaded(e){this._itemsLoaded=e}validateValueAvailability(e,t){if(!F(e)||!t)return!0;const n=this.getOptionsValues();if(n){if(_.isObject(t)){const o=r=>{const s=this.normalizeSingleValue(r,!0);if(!_.isObject(s))return!1;try{return JSON.stringify(s)===JSON.stringify(t)}catch(h){return logger.error("Error while comparing items",h),!1}};return n.findIndex(r=>o(r))!==-1}return n.findIndex(o=>this.normalizeSingleValue(o)===t)!==-1}return!1}getOptionValue(e){return _.isObject(e)&&this.isEntireObjectDisplay()?this.normalizeSingleValue(e):_.isObject(e)&&(this.valueProperty||this.component.key!=="resource")?e:_.isObject(e)&&!this.valueProperty?this.interpolate(this.component.template,{item:e}).replace(/<\/?[^>]+(>|$)/g,""):_.isNull(e)?this.emptyValue:String(this.normalizeSingleValue(e))}getOptionsValues(){let e=[];switch(this.component.dataSrc){case"values":e=this.component.data.values;break;case"json":e=this.component.data.json;break;case"custom":e=this.getCustomItems();break}if(typeof e=="string")try{e=JSON.parse(e)}catch(t){logger.warn(t.message),e=[]}if(Array.isArray(e))return e.map(t=>this.getOptionValue(this.itemValue(t)))}deleteValue(){this.setValue("",{noUpdateEvent:!0}),this.unset()}validateMultiple(){return!1}isBooleanOrNumber(e){return typeof e=="number"||typeof e=="boolean"}getNormalizedValues(){if(!(!this.component||!this.component.data||!this.component.data.values))return this.component.data.values.map(e=>({label:e.label,value:String(this.normalizeSingleValue(e.value))}))}asString(e,t={}){var r;e=e||this.getValue();const n=(s,h)=>h?(Array.isArray(s)?s.forEach(a=>a[h]=a[h].toString()):s[h]=s[h].toString(),s):(this.isBooleanOrNumber(s)&&(s=s.toString()),Array.isArray(s)&&s.some(a=>this.isBooleanOrNumber(a))&&(s=s.map(a=>{this.isBooleanOrNumber(a)&&(a=a.toString())})),s);if(e=n(e),this.component.dataSrc==="masterdata"&&this.component.masterdata){const s=h=>(typeof h=="string"||typeof h=="number")&&this.findMasterdataItem(h)||h;Array.isArray(e)?e=e.map(s):e!=null&&(e=s(e))}if(["values","custom"].includes(this.component.dataSrc)&&!this.asyncCustomValues()){const{items:s,valueProperty:h}=this.component.dataSrc==="values"?{items:n(this.getNormalizedValues(),"value"),valueProperty:"value"}:{items:n(this.getCustomItems(),this.valueProperty),valueProperty:this.valueProperty},a=()=>{const l=_.find(s,[h,e]),i=this.defaultSchema.data.values||[];return _.isEqual(l,i[0])?"-":l};e=this.component.multiple&&Array.isArray(e)?_.filter(s,l=>e.includes(l.value)):h?(r=a())!=null?r:{value:e,label:e}:e}if(_.isString(e)&&this.component.dataSrc!=="masterdata")return e;const o=s=>{const h=this.itemTemplate(s);return t.csv&&h?unescapeHTML(h):h};if(Array.isArray(e)){const s=[];return e.forEach(h=>s.push(o(h))),this.component.dataSrc==="resource"&&s.length>0?s.join(", "):s.length>0?s.join("<br />"):"-"}return this.isEntireObjectDisplay()&&_.isObject(e)?JSON.stringify(e):_.isNil(e)?"-":this.itemTemplate(e)}detach(){this.off("blur"),this.choices&&(this.choices&&this.choices.containerOuter&&this.choices.containerOuter.element&&this.choices.containerOuter.element.parentNode&&this.choices.destroy(),this.choices=null),super.detach()}focus(){this.focusableElement&&(super.focus.call(this),this.focusableElement.focus())}setErrorClasses(e,t,n,o,r=this.element){super.setErrorClasses(e,t,n,o,r),this.choices?super.setErrorClasses([this.choices.containerInner.element],t,n,o,r):super.setErrorClasses([this.refs.selectContainer],t,n,o,r)}addFocusBlurEvents(e){this.addEventListener(e,"focus",()=>{this.root.focusedComponent!==this?(this.root.pendingBlur&&this.root.pendingBlur(),this.root.focusedComponent=this,this.emit("focus",this)):this.root.focusedComponent===this&&this.root.pendingBlur&&(this.root.pendingBlur.cancel(),this.root.pendingBlur=null)}),this.addEventListener(e,"blur",()=>{this.root.pendingBlur=FormioUtils.delay(()=>{this.emit("blur",this),this.component.validateOn==="blur"&&this.root.triggerChange({fromBlur:!0},{instance:this,component:this.component,value:this.dataValue,flags:{fromBlur:!0}}),this.root.focusedComponent=null,this.root.pendingBlur=null})})}}b&&b.Components?b.Components.addComponent("select",I):typeof Formio!="undefined"&&Formio.Components&&Formio.Components.addComponent("select",I)})();</script>
|
|
38326
38864
|
<script>(function(){var n=window._;const E=Promise,u=window.Formio;var S=u.Components;const F=u.Components.components.base,v=u.Components.components.componentmodal,w=window.EventEmitter3?window.EventEmitter3.EventEmitter||window.EventEmitter3:window.EventEmitter,V=u.Form,g=u.Utils.isMongoId,C=u.Utils.eachComponent,R=u.Utils.getStringFromComponentPath,D=u.Utils.getArrayFromComponentPath,O=()=>({components:[]});class p extends F{static schema(...t){return F.schema({label:"Form",type:"form",key:"form",src:"",reference:!0,form:"",path:"",tableView:!0},...t)}static get builderInfo(){return{title:"Smart Nested Form",group:"premium",icon:"wpforms",documentation:"/userguide/#smartnestedform",weight:110,schema:p.schema()}}static savedValueTypes(){return[u.Utils.componentValueTypes.object]}init(){if(super.init(),window.formdesign=window.formdesign||[],this.component.form){this.component.formdesign&&window.formdesign&&!window.formdesign.some(o=>o.key===this.component.key)&&window.formdesign.push({key:this.component.key,formdesign:this.component.formdesign,data:!0});let t=[];t=window.formdesign.filter(o=>o.key===this.component.key);let e=this;const s=e.component.form;let i=e.component.selNestedFormVersion;if(t.length>0&&!t[0].data||t.length==0)u.makeStaticRequest(`${localStorage.getItem("UMP_url")}/UMP/API/v3/applications/DIGITAL_FORMS/execute/DIGITAL_FORMS_PA_GET_FORM_DATA?queuedExecute=false&messageFormat=custom&inputMessage=%7B%22formId%22%3A%22${s}%22%2C%22type%22%3A%22form%22%2C%22version%22%3A%22${i}%22%7D&sensitive=undefined&externalReference=undefined`,"POST",null,{headers:{Authorization:"Bearer "+localStorage.getItem("token"),Accept:"application/json","Content-type":"application/json"}}).then(function(o){if(o){typeof o!="object"&&(o=JSON.parse(o));let r=e.getMasterdDataresource(o.formData,"dataSrc","masterdata");const h={key:e.component.key,formdesign:r,category:o.category,data:!0};window.formdesign.push(h),e.createSubForm().then(()=>{e.element&&e.attach(e.element)})}}).catch(o=>{logger.error("[TF_SDK:55] \u274C Error getting form data",o)});else if(window.formdesign&&this.component.form){for(let o=0;o<window.formdesign.length;o++)if(window.formdesign[o].key==this.component.key){let r=this.getMasterdDataresource(window.formdesign[o].formdesign,"dataSrc","masterdata");window.formdesign[o].formdesign=r}}}if(this.formObj={display:this.component.display,settings:this.component.settings,components:this.component.components},this.valueChanged=!1,this.subForm=null,this.formSrc="",this.component.src&&(this.formSrc=this.component.src),!this.component.src&&!this.options.formio&&(this.component.form||this.component.path)&&(this.component.project?(this.formSrc=u.getBaseUrl(),g(this.component.project)&&(this.formSrc+="/project"),this.formSrc+=`/${this.component.project}`,this.options.project=this.formSrc):(this.formSrc=u.getProjectUrl(),this.options.project=this.formSrc),this.component.form?g(this.component.form)?this.formSrc+=`/form/${this.component.form}`:this.formSrc+=`/${this.component.form}`:this.component.path&&(this.formSrc+=`/${this.component.path}`)),!this.formSrc&&this.options.formio){const t=this.options.formio.formsUrl;if(this.component.form&&g(this.component.form))this.formSrc=`${t}/${this.component.form}`;else{const e=this.component.path||this.component.form;this.formSrc=`${t.replace(/\/form$/,"")}/${e}`}}return this.builderMode&&this.component.hasOwnProperty("formRevision")&&(this.component.revision=this.component.formRevision,delete this.component.formRevision),(this.component.revision||this.component.revision===0||this.component.formRevision||this.component.formRevision===0||this.component.revisionId)&&this.setFormRevision(this.component.revisionId||this.component.revision||this.component.formRevision),this.createSubForm()}get dataReady(){var t;return((t=this.subForm)==null?void 0:t.dataReady)||this.subFormReady||Promise.resolve()}get defaultValue(){return this.subForm?super.defaultValue:null}get defaultSchema(){return p.schema()}get emptyValue(){return{data:{}}}get hasDefaultValue(){return!0}get ready(){return this.subFormReady||Promise.resolve()}get useOriginalRevision(){var t,e;return((t=this.component)==null?void 0:t.useOriginalRevision)&&!!((e=this.formObj)!=null&&e.revisions)}setFormRevision(t){this.formSrc=this.formSrc.replace(/\/v\/[0-9a-z]+/,"");const e=Number.parseInt(t);isNaN(e)?this.subFormRevision=void 0:(this.subFormRevision=t,this.formSrc+=`/v/${t}`)}getComponent(t){return this.subForm?this.subForm.getComponent(t):null}getSubOptions(t={}){return t.events=this.createEmitter(),n.set(t,"buttonSettings.showSubmit",!1),t.parent=this,this.options&&(this.options.base&&(t.base=this.options.base),this.options.project&&(t.project=this.options.project),(this.options.readOnly||this.component.disabled)&&(t.readOnly=this.options.readOnly||this.component.disabled),this.options.breadcrumbSettings&&(t.breadcrumbSettings=this.options.breadcrumbSettings),this.options.buttonSettings&&(t.buttonSettings=n.clone(this.options.buttonSettings)),this.options.viewAsHtml&&(t.viewAsHtml=this.options.viewAsHtml),this.options.language&&(t.language=this.options.language),this.options.template&&(t.template=this.options.template),this.options.templates&&(t.templates=this.options.templates),this.options.renderMode&&(t.renderMode=this.options.renderMode),this.options.attachMode&&(t.attachMode=this.options.attachMode),this.options.iconset&&(t.iconset=this.options.iconset),this.options.fileService&&(t.fileService=this.options.fileService),this.options.onChange&&(t.onChange=this.options.onChange),this.options.preview&&(t.preview=this.options.preview),this.options.inEditGrid&&(t.inEditGrid=this.options.inEditGrid),this.options.saveDraft&&(t.saveDraft=this.options.saveDraft,t.formio=new u(this.formSrc)),this.options.saveDraftThrottle&&(t.saveDraftThrottle=this.options.saveDraftThrottle),this.options.skipDraftRestore&&(t.skipDraftRestore=this.options.skipDraftRestore),t.parent=this),t}render(){if(this.builderMode)return super.render(this.component.label||"Nested form");const t=this.subForm?this.subForm.render():this.renderTemplate("loading");return super.render(t)}getMasterdDataresource(t,e,s){let i=[];for(let o in t)if(typeof t[o]=="object")i=i.concat(this.getMasterdDataresource(t[o],e,s));else if(o===e&&t[e]===s){let r;t.data&&typeof t.data=="object"&&t.data!==void 0&&t.data.masterdata&&(r=t.data.masterdata);let h=[];const c=localStorage.getItem("resourceData");let a=[];try{a=c?JSON.parse(c):[]}catch(d){a=[]}if(Array.isArray(a)&&r!==void 0&&r!==""){for(let d=0;d<a.length;d++)if((a[d]?a[d].resourceName:null)===r&&a[d].data)try{h.push(JSON.parse(a[d].data).data)}catch(M){}}else h=[];const l=t.template;let m="";if(l!==""){const d=l.substring(l.lastIndexOf(".")+1,l.length);m=d.substring(0,d.indexOf("}"),d.length);const b="<span>{{item."+m.trim()+"}}</span>";t.template=b}const f=t.valueProperty;let y="";f!==""&&(y=f.substring(f.lastIndexOf(".")+1,f.length),t.valueProperty=y),m=m.trim(),h=h.sort(function(d,b){return d[m]>b[m]?1:d[m]<b[m]?-1:0}),t.masterdata=h}return t}asString(t){return this.getValueAsString(t)}getValueAsString(t,e){if(!t)return"No data provided";if(!t.data&&t._id)return t._id;if(this.component.modalEdit)return this.component.label;if(e!=null&&e.email){let s=`
|
|
38327
38865
|
<table border="1" style="width:100%">
|
|
38328
38866
|
<tbody>
|
|
@@ -38461,7 +38999,7 @@ Expecting `+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":x="Parse error on
|
|
|
38461
38999
|
</div>
|
|
38462
39000
|
`,p=document.createElement("div");p.innerHTML=d.trim();const a=p.firstChild;s.appendChild(a);const u=setTimeout(()=>{a.parentNode&&(a.classList.remove("show"),a.style.transition="opacity 0.5s ease",a.style.opacity="0",setTimeout(()=>{a.parentNode&&a.remove()},500))},g),m=a.querySelector(".btn-close");m&&(m.onclick=()=>{clearTimeout(u),a.remove()})}window.showDynamicModal=w,window.showToast=x})();</script>
|
|
38463
39001
|
<script>(function(){let v=!1,l=null;const g=window.innerHeight;function u(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1||!!(window.platform&&window.platform.iosPlatform)}logger.info("[TF_SDK:254] \u2705 Focus script initialized. Initial Height:",g,"isIOS:",u());function h(o){if(o&&o.target&&o.target.closest&&o.target.closest(".flatpickr-calendar"))return;document.querySelector(".flatpickr-calendar.open, .flatpickr-calendar.show")&&(document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),document.querySelectorAll("input").forEach(n=>{n._flatpickr&&typeof n._flatpickr.close=="function"&&n._flatpickr.close()}),document.body.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})))}window.addEventListener("scroll",h,!0),window.addEventListener("wheel",h,{capture:!0,passive:!0}),window.addEventListener("touchmove",h,{capture:!0,passive:!0});function w(o){if(!u())return;const e=document.getElementById("sticky-footer");e&&(o?e.style.display="none":e.style.display="flex")}function a(){if(!u()||!l)return;const o=l.closest(".formio-component")||l,e=window.visualViewport?window.visualViewport.height:window.innerHeight,n=o.getBoundingClientRect(),r=o.querySelector(".choices__list--dropdown.is-active, .choices__list--dropdown"),d=!!(r||o.querySelector(".choices")),s=d&&r?Math.max(140,r.offsetHeight||140):0,t=n.bottom+s>e-15,i=n.top<0;if(!t&&!i)return;if(typeof o.scrollIntoView=="function"){const m=d&&t?"center":"nearest";o.scrollIntoView({behavior:"smooth",block:m,inline:"nearest"})}const f=document.getElementById("formio-wrapper");if(f&&f.scrollHeight>f.clientHeight){let m=0,c=o;for(;c&&c!==f&&c!==null;)m+=c.offsetTop,c=c.offsetParent;if(t){const E=m-(e-o.offsetHeight-s-20);f.scrollTo({top:Math.max(0,E),behavior:"smooth"})}else i&&f.scrollTo({top:Math.max(0,m-20),behavior:"smooth"})}}document.addEventListener("focusin",o=>{if(!u())return;const e=o.target;if(!(!e||!["INPUT","TEXTAREA","SELECT"].includes(e.tagName))){if(w(!0),l=e,e.classList.contains("choices__input")||e.closest(".choices")){const n=e.closest(".choices")||e.closest(".formio-component-barcodeselect")||e.closest(".formio-component-select");n&&(l=n)}setTimeout(a,100),setTimeout(a,350)}}),document.addEventListener("focusout",o=>{u()&&setTimeout(()=>{const e=document.activeElement;!(e&&["INPUT","TEXTAREA","SELECT"].includes(e.tagName))&&!v&&w(!1)},250)}),window.visualViewport&&window.visualViewport.addEventListener("resize",()=>{if(!u())return;const e=window.visualViewport.height;e<g-60||e<screen.height-150?(v=!0,w(!0),l&&(setTimeout(a,150),setTimeout(a,350))):(v=!1,w(!1))}),document.addEventListener("showDropdown",o=>{if(!u())return;const e=o.target,n=e&&e.closest?e.closest(".formio-component-barcodeselect, .formio-component-select, .formio-component")||e:l;n&&(l=n,setTimeout(a,50),setTimeout(a,200),setTimeout(a,400))},!0),document.addEventListener("hideDropdown",()=>{u()&&setTimeout(a,80)},!0),document.addEventListener("FormRenderingComplete",()=>{const o=window.formObj;if(!o)return;let e=0;const n=setInterval(()=>{if(e++,e>8){clearInterval(n);return}let r=null;function d(s){if(!s)return null;for(let p=0;p<s.length;p++){const t=s[p];if(t){if(t.component&&t.component.autofocus){if(t.refs&&t.refs.input&&t.refs.input[0])return t.refs.input[0];if(t.element){const i=t.element.querySelector('input:not([type="hidden"]), textarea, select');if(i)return i}}if(t.components&&Array.isArray(t.components)){const i=d(t.components);if(i)return i}if(t.subForm&&t.subForm.components&&Array.isArray(t.subForm.components)){const i=d(t.subForm.components);if(i)return i}if(t.rows&&Array.isArray(t.rows))for(let i=0;i<t.rows.length;i++){const f=t.rows[i],m=Object.values(f||{}),c=d(m);if(c)return c}}}return null}if(r=d(o.components),r)if(document.activeElement!==r){if(logger.info(`[TF_SDK:262] \u2705 Forcing focus on schema-defined autofocus element (Attempt ${e})`),r.focus(),r.setSelectionRange&&r.value){const s=r.value.length;try{r.blur(),r.focus(),r.setSelectionRange(s,s)}catch(p){}}}else clearInterval(n)},500)})})();</script>
|
|
38464
|
-
<script>(function(){var d=null,k=null,ne;let v=[],T=0,_=!1;function L(){sendEventCallback({type:FORM_EVENTS.BACK_NAVIGATION,message:"Back navigation triggered.",data:{}})}function W(e,t){var c,f;const o=document.getElementById("saveBtn"),n=document.getElementById("submitBtn"),r=document.getElementById("prevBtn"),i=document.getElementById("nextBtn"),l=document.getElementById("completeOption"),m=document.getElementById("saveOption"),p=document.getElementById("completeDivider"),y=document.getElementById("saveDivider");if(!o||!n)return;const s=e===!0||e==="true",g=e===!1||e==="false",u=String(t||"").toLowerCase(),a=(h,w,E)=>{h&&(E?h.style.setProperty("display","flex","important"):h.style.setProperty("display","none","important")),w&&(E?w.style.setProperty("display","block","important"):w.style.setProperty("display","none","important"))};a(l,p,!1),a(m,y,!1),u==="read"?(o.style.display="none",n.style.display="none"):g&&u==="writemultiple"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',n.disabled=!0,a(l,p,!1),a(m,y,!1)):g&&u==="writesingle"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Submit',n.disabled=!0):s&&u==="writemultiple"?((c=window.__unviredFormsOptions)==null?void 0:c.showCompleteAlways)===!0||((f=window.__unviredFormsOptions)==null?void 0:f.showCompleteAlways)==="true"?(o.style.display="",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',o.disabled=!0,n.disabled=!0,a(l,p,!1),a(m,y,!1)):(o.style.display="",n.style.display="none",o.disabled=!0,a(l,p,!1)):s&&u==="writesingle"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',n.disabled=!0,a(m,y,!0)):(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Submit',n.disabled=!0),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}function U(e,t,o,n){var C,F,O,A;const r=document.getElementById("saveBtn"),i=document.getElementById("submitBtn"),l=document.getElementById("prevBtn"),m=document.getElementById("nextBtn");if(!r||!i)return;const p=o===!0||o==="true",y=o===!1||o==="false",s=String(n||"").toLowerCase(),g=document.getElementById("completeOption"),u=document.getElementById("saveOption"),a=document.getElementById("completeDivider"),c=document.getElementById("saveDivider"),f=(b,S,M)=>{b&&(M?b.style.setProperty("display","flex","important"):b.style.setProperty("display","none","important")),S&&(M?S.style.setProperty("display","block","important"):S.style.setProperty("display","none","important"))},h=Object.values(t||{}).some(b=>b!=null&&b!==""&&b!==!1&&!(Array.isArray(b)&&b.length===0)&&!(typeof b=="object"&&!Array.isArray(b)&&Object.keys(b).length===0)),w=e>=100,E=((C=window.__unviredFormsOptions)==null?void 0:C.requireCompleteForm)!==!1&&((F=window.__unviredFormsOptions)==null?void 0:F.requireCompleteForm)!=="false";if(s==="read"){r.style.display="none",i.style.display="none";return}if(p&&s==="writesingle"){r.style.display="none",i.style.display="",i.disabled=!1,f(u,c,!0),f(g,a,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(p&&s==="writemultiple"){((O=window.__unviredFormsOptions)==null?void 0:O.showCompleteAlways)===!0||((A=window.__unviredFormsOptions)==null?void 0:A.showCompleteAlways)==="true"?(r.style.display="",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',r.disabled=!h,i.disabled=!1,f(g,a,!1),f(u,c,!1)):w?(r.style.display="none",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',i.disabled=!1,f(u,c,!0),f(g,a,!1)):h?(r.style.display="",i.style.display="none",r.disabled=!1,f(g,a,!0),f(u,c,!1)):(r.style.display="",i.style.display="none",r.disabled=!0,f(g,a,!1),f(u,c,!1)),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(y&&s==="writemultiple"){r.style.display="none",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',i.disabled=!1,f(g,a,!1),f(u,c,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(y&&s==="writesingle"){r.style.display="none",i.style.display="",i.disabled=!1,f(g,a,!1),f(u,c,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}r.style.display="none",i.style.display="",i.disabled=!1,typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}async function z(e,t,o,n,r,i,l,m,p,y){if(window.CURRENT_VIEW!=="comments"){if(H(),logger.info("[TF_SDK:296] \u2705 loadTRform() entered",{mode:n,permission:p,privateExternal:m,language:r}),v=y,typeof Formio=="undefined"){logger.error("[TF_SDK:297] \u274C Formio library not loaded"),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 016, Formio library not loaded",data:{reason:"Formio library not loaded"}});return}try{if(logger.info("[TF_SDK:297] \u2705 Initializing loadTRform"),typeof Formio!="undefined"&&Formio.Components&&Formio.Components.components&&Formio.Components.components.component){const c=Formio.Components.components.component;if(!c._requiredFixApplied){c._requiredFixApplied=!0;const f=c.prototype.setCustomValidity;c.prototype.setCustomValidity=function(w,E,C){var F,O,A,b;if(typeof w=="string"&&(w.trim().toLowerCase()==="required"||w.includes("{{field}}"))){const S=(O=(F=this.component)==null?void 0:F.validate)==null?void 0:O.customMessage,M=((A=this.component)==null?void 0:A.errorLabel)||((b=this.component)==null?void 0:b.label)||this.key||"Field";w=S||`${M} is required`}if(f)return f.call(this,w,E,C)};const h=c.prototype.t;c.prototype.t=function(w,E){var C,F,O,A;if(typeof w=="string"&&w.trim().toLowerCase()==="required"){const b=(F=(C=this.component)==null?void 0:C.validate)==null?void 0:F.customMessage;return b||`${(E==null?void 0:E.field)||((O=this.component)==null?void 0:O.errorLabel)||((A=this.component)==null?void 0:A.label)||this.key||"Field"} is required`}return h?h.apply(this,arguments):w}}}let s={noAlerts:!0,scroll:!1,language:window.FORMIO_LANGUAGE||"en",i18n:window.FORMIO_I18N};if(W(m,p),n=="form")s.readOnly=!1,s.flatten=!1,s.viewHtml=!1;else if(n=="pdf"||n=="print"){s.readOnly=!0,s.flatten=!0,s.renderMode="flat",s.viewHtml=!0;const c=document.querySelector(".progress-container");c&&(c.style.display="none")}else if(n=="readOnly"||p=="read"){s.readOnly=!0,s.flatten=!1,s.viewHtml=!1;const c=document.querySelector(".progress-container");c&&(c.style.display="none");const f=document.getElementById("sticky-footer");f&&window.CURRENT_VIEW!=="comments"&&(f.style.display="none")}else s.readOnly=!1,s.flatten=!1,s.viewHtml=!1;const g=document.getElementById("formio");if(!g)throw new Error("DOM Element #formio not found");logger.info("[TF_SDK:298] \u2705 Creating Formio form...",e);try{d=await Formio.createForm(g,e,s)}catch(c){throw logger.error("[TF_SDK:298-ERR] \u274C Error in Formio.createForm:",c),c}let u=!1;if(d.on("change",()=>{if(!u){if(!k)try{k=JSON.parse(JSON.stringify(d.getValue().data))}catch(c){k=d.getValue().data}u=!0}}),document.dispatchEvent(new CustomEvent("LessRenderingComplete")),window.formObj=d,window.FORMIO_I18N&&Object.keys(window.FORMIO_I18N).length>0){const c=document.getElementById("languageSubMenu"),f=document.getElementById("languageMainOption"),h=document.getElementById("languageDivider");if(c&&f){c.innerHTML="";let w=Object.keys(window.FORMIO_I18N).filter(F=>typeof window.FORMIO_I18N[F]=="object"&&window.FORMIO_I18N[F]!==null);const E=window.FORMIO_LANGUAGE||"en";!w.includes(E)&&typeof window.FORMIO_I18N[E]=="object"&&w.unshift(E);let C=null;try{window.Intl&&typeof Intl.DisplayNames=="function"&&(C=new Intl.DisplayNames(["en"],{type:"language"}))}catch(F){logger.warn("Intl.DisplayNames not supported",F)}w.forEach(F=>{const O=document.createElement("div");O.className=f.className,O.style.cursor="pointer",O.style.padding="0.5rem 1rem",O.style.borderTop="none";let A=F.toUpperCase();try{A=C.of(F)||A}catch(S){}let b=F===E?'<i class="bi bi-check2 text-primary" style="margin-right: 8px;"></i>':'<i class="bi bi-check2" style="margin-right: 8px; visibility: hidden;"></i>';f.innerHTML.includes("icon chevron")&&(b=F===E?'<i class="icon check" style="margin-right: 8px;"></i>':'<i class="icon check" style="margin-right: 8px; visibility: hidden;"></i>'),O.innerHTML=`${b}${A}`,O.onclick=function(S){S.stopPropagation(),window.changeFormLanguage&&(window.changeFormLanguage(F),window.FORMIO_LANGUAGE=F);const M=c.children;for(let N=0;N<M.length;N++){const D=M[N].querySelector("i");D&&(w[N]===F?(D.style.visibility="visible",D.className.includes("bi")&&D.classList.add("text-primary")):(D.style.visibility="hidden",D.className.includes("bi")&&D.classList.remove("text-primary")))}window.toggleLanguageSubMenu&&window.toggleLanguageSubMenu(),window.showToast&&window.showToast(`Language set to ${A}`,"success")},c.appendChild(O)}),w.length>1?(f.style.display=f.className.includes("d-flex")?"flex":"block",h&&(h.style.display="block")):(f.style.display="none",h&&(h.style.display="none"))}}else{const c=document.getElementById("languageMainOption"),f=document.getElementById("languageDivider");c&&(c.style.display="none"),f&&(f.style.display="none")}if(!d){logger.error("[TF_SDK:299] \u274C Form not initialized.");return}const a=()=>{['button[type="submit"]',".formio-component-submit"].forEach(h=>{d.element.querySelectorAll(h).forEach(E=>{E.style.display="none"})}),d.element.querySelectorAll('input:not([type="file"]), textarea').forEach(h=>{h.getAttribute("autocomplete")!=="new-password"&&(h.setAttribute("autocomplete","new-password"),h.setAttribute("data-lpignore","true"),h.setAttribute("spellcheck","false"))})};a(),d.on("render",a),Q(m,p),d.formReady.then(()=>{if(logger.info("[TF_SDK:300] \u2705 formReady.then() triggered"),typeof window.initializeWizardLogic=="function"&&window.initializeWizardLogic(d,m,p),t?(logger.info("[TF_SDK:301] \u2705 Previous form data found:",t),d.submission={data:typeof t=="string"?JSON.parse(t):t},logger.info("[TF_SDK:302] \u2705 Previous submission data applied")):logger.info("[TF_SDK:303] \u2705 No previous form data found"),logger.info("[TF_SDK:304] \u2705 Calculating initial progress..."),executeProgressCalculation(m,p),logger.info("[TF_SDK:305] \u2705 Progress calculation completed"),n=="readOnly"){logger.info("[TF_SDK:306] \u2705 ReadOnly mode detected");const w=document.querySelectorAll(".formio-component-submit");logger.info(`[TF_SDK:307] \u2705 Found ${w.length} submit components`),w.forEach((E,C)=>{E.style.display="none",logger.info(`[TF_SDK:308] \u2705 Hidden submit component ${C+1}`)})}else logger.info("[TF_SDK:309] \u2705 Editable mode detected");logger.info("[TF_SDK:310] \u2705 Sending FORM_RENDER callback..."),sendEventCallback({type:FORM_EVENTS.FORM_RENDER,message:"Success: Form rendered successfully.",data:{submissionData:t,formTemplate:e}}),logger.info("[TF_SDK:311] \u2705 FORM_RENDER callback sent");const c=document.getElementById("sdk-form-loader");c?(logger.info("[TF_SDK:312] \u2705 Loader found, hiding..."),c.classList.add("hidden"),logger.info("[TF_SDK:313] \u2705 Loader hidden")):logger.warn("[TF_SDK:314] \u2705 Loader element not found"),document.querySelectorAll(".tf-form-loading").forEach(w=>w.classList.remove("tf-form-loading")),logger.info("[TF_SDK:315] \u2705 Dispatching FormRenderingComplete event...");let f=0;typeof window.getMaxTableWidth=="function"&&(f=window.getMaxTableWidth(document.getElementById("formio")||document.querySelector(".tf-embed-sdk")||document.body).maxWidth),sendEventCallback({type:FORM_EVENTS.FORM_LOADED,message:"Success: Form rendered complete.",data:{maxTableWidth:`${f}px`}}),document.dispatchEvent(new CustomEvent("FormRenderingComplete",{detail:{timestamp:new Date().toISOString(),status:"success",maxTableWidth:f}})),logger.info("[TF_SDK:316] \u2705 FormRenderingComplete event dispatched successfully");const h=document.querySelector('input[type="file"]');h?(h.setAttribute("accept","*/*"),logger.info("[TF_SDK:317] \u2705 File input found, accept=*/* applied")):logger.info("[TF_SDK:318] \u2705 No file input found"),logger.info("[TF_SDK:319] \u2705 Full formReady process completed")}).catch(c=>{logger.error("[TF_SDK:320] \u274C formReady.then() failed:",c)})}catch(s){logger.error("[TF_SDK:321] \u274C Error creating form (after retries):",s?s.message:"Unknown error",s?s.stack:"");const g=document.getElementById("sdk-form-loader");g&&g.classList.add("hidden"),document.querySelectorAll(".tf-form-loading").forEach(u=>u.classList.remove("tf-form-loading")),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 005, Formio not rendered the forms",data:{reason:"Failed to render form after retries",technicalError:s}})}}}let B=null,V=null,I=null;function G(){if(I)return I;if(!d)return[];const e=[];function t(o,n=""){Array.isArray(o)&&o.forEach(r=>{var y;if(!r)return;const i=r.component||r;let l=n;if(["columns","panel","fieldset","well","table","tabs","content","htmlelement"].includes(i.type)||(l=n?`${n}.${i.key}`:i.key),["textfield","textarea","number","checkbox","radio","select","selectboxes","email","url","day","datetime","file","datamap","tree","survey","signature","datagrid","editgrid","container"].includes(i.type)&&((y=i.validate)!=null&&y.required)&&e.push({key:i.key,type:i.type,path:l,comp:i,instance:r}),Array.isArray(r.components)&&t(r.components,l),i.type==="form"){let s=l?`${l}.data`:"data";r.subForm&&Array.isArray(r.subForm.components)?t(r.subForm.components,s):Array.isArray(r.components)&&t(r.components,s)}Array.isArray(r.columns)&&r.columns.forEach(s=>{Array.isArray(s.components)&&t(s.components,l)})})}return t(d.components),I=e,e}window.executeProgressCalculation=function(e,t){if(!d)return;const o=d.data||{},n=JSON.stringify(o);if(!(d&&!!d.wizard)&&n===V)return;V=n;const i=G();let l=i.length,m=0;function p(u,a){if(Array.isArray(a)){if(!(["file","datagrid","editgrid","datamap","selectboxes"].includes(u.type)||u.multiple))return a.length>0&&a.every(h=>p(u,h));if(u.type==="file"&&a.length>0&&Array.isArray(a[0]))return a.every(h=>p(u,h))}switch(u.type){case"selectboxes":return Object.values(a||{}).some(Boolean);case"datamap":case"tree":return a&&Object.keys(a).length>0;case"survey":return u.questions&&Array.isArray(u.questions)?a&&Object.keys(a).length>=u.questions.length:a&&Object.keys(a).length>0;case"file":return Array.isArray(a)&&a.length>0;case"checkbox":return a===!0;case"editgrid":case"datagrid":return Array.isArray(a)&&a.length>0;case"signature":return!!a;default:return u.multiple?Array.isArray(a)&&a.length>0&&a.some(c=>c!=null&&c!==""):a!=null&&a!==""}}const y=[];i.forEach(u=>{let a=!0;u.instance&&(u.instance.visible===!1&&(a=!1),a&&typeof u.instance.checkCondition=="function"&&(u.instance.checkCondition(null,o)||(a=!1))),a&&(u.instance&&u.instance.parent&&u.instance.parent.visible===!1||y.push(u))}),l=y.length,m=0,y.forEach(({key:u,type:a,path:c,comp:f})=>{let h=x(o,c);p(f,h)&&m++});const s=l===0?100:Math.round(m/l*100);logger.info("[TF_SDK:322] \u2705 Progress:",{mandatory:l,filledMandatory:m,completion:s+"%"}),T=s,_=s>=100,U(s,d.data,e,t),typeof window.updateWizardNav=="function"&&window.updateWizardNav(d);const g=document.getElementById("progress-bar");if(g){const u=g.querySelector(".progress"),a=g.querySelector(".badge");u.style.width=`${s}%`,a.textContent=`${s}%`;let c=s;s<=0?(c=.5,u.style.width=`${.5}%`,window.innerWidth>768||window.innerWidth>480?a.style.transform="translateX(2%)":a.style.transform="translateX(1%)"):s>=100?(g.classList.add("complete"),c=99.5,window.innerWidth>768||window.innerWidth>480,a.style.transform="translateX(-100%)"):(g.classList.remove("complete"),a.style.transform="translateX(-50%)"),a.style.left=`${c-.25}%`}};function x(e,t){if(e==null||!t)return;if(t.indexOf(".")===-1)return Array.isArray(e)?e.map(r=>r[t]):e[t];const o=t.split(".");let n=e;for(let r=0;r<o.length;r++){const i=o[r];if(n==null)return;if(Array.isArray(n)){const l=o.slice(r).join(".");return n.map(m=>x(m,l))}n=n[i]}return n}function q(e){if(!e)return!0;let t=e.getValue?e.getValue():e.dataValue;return t==null||t===""||Array.isArray(t)&&(t.length===0||!t.some(n=>!(n==null||n===""||typeof n=="object"&&Object.keys(n).length===0)))||typeof t=="object"&&!Array.isArray(t)&&(Object.keys(t).length===0||!Object.values(t).some(n=>n!=null&&n!==""&&n!==!1))?!0:e.isEmpty?e.isEmpty(t):!1}function J(e,t){var r,i,l,m,p,y;if(!e||!t)return null;if(t.component&&t.component.element)return t.component;const o=t.path||((r=t.context)==null?void 0:r.path)||((i=t.context)==null?void 0:i.hasPath);if(o){let s=typeof e.getComponent=="function"?e.getComponent(o):null;if(s&&s.element)return s;const g=String(o).replace(/\[(\d+)\]/g,".$1");if(s=typeof e.getComponent=="function"?e.getComponent(g):null,s&&s.element)return s;const u=String(o).replace(/\.(\d+)\./g,"[$1].");if(s=typeof e.getComponent=="function"?e.getComponent(u):null,s&&s.element)return s}const n=((m=(l=t.context)==null?void 0:l.component)==null?void 0:m.key)||((p=t.component)==null?void 0:p.key)||(typeof((y=t.context)==null?void 0:y.component)=="string"?t.context.component:null);if(n&&typeof e.getComponent=="function"){const s=e.getComponent(n);if(s&&s.element)return s}return null}function P(e){if(!e||!e.element)return;e.error=null,typeof e.setCustomValidity=="function"&&e.setCustomValidity(""),e.element.classList.remove("has-error","formio-error-wrapper","is-invalid"),e.element.querySelectorAll(".choices__inner, .ui.selection.dropdown, .is-invalid").forEach(n=>{n.closest(".formio-component")===e.element&&n.classList.remove("is-invalid")}),e.element.querySelectorAll(".formio-errors, .invalid-feedback, [ref='messageContainer']").forEach(n=>{n.closest(".formio-component")===e.element&&(n.innerHTML="",n.style.display="none")})}function X(e){!e||typeof e.everyComponent!="function"||e.everyComponent(t=>{var l;if(!t||!t.element)return;const o=((l=t.component)==null?void 0:l.type)||t.type;if(["datagrid","editgrid","container","panel","columns","fieldset","well","tabs","form"].includes(o))return;const r=t.element.classList.contains("has-error")||t.element.classList.contains("formio-error-wrapper"),i=Array.from(t.element.querySelectorAll(".formio-errors, .invalid-feedback")).some(m=>m.style.display!=="none"&&m.innerHTML.trim()!==""&&m.closest(".formio-component")===t.element);(r||i)&&!q(t)&&P(t)})}function Y(e,t){var m,p,y,s;if(!e||!e.element)return;e.element.classList.add("has-error","formio-error-wrapper");const o=e.element.querySelector(".choices__inner, .ui.selection.dropdown");o&&o.closest(".formio-component")===e.element&&o.classList.add("is-invalid");const n=t.message||((p=(m=t.context)==null?void 0:m.component)!=null&&p.label?`${t.context.component.label} is required`:`${((y=e.component)==null?void 0:y.label)||e.key} is required`),i=`e-${e.id||((s=e.component)==null?void 0:s.id)||e.key}-${e.key}`;let l=Array.from(e.element.querySelectorAll(".formio-errors, [ref='messageContainer']")).find(g=>g.closest(".formio-component")===e.element);l?(l.setAttribute("ref","messageContainer"),l.classList.contains("invalid-feedback")||l.classList.add("invalid-feedback")):(l=document.createElement("div"),l.setAttribute("ref","messageContainer"),l.className="formio-errors invalid-feedback",e.element.appendChild(l)),l.innerHTML=`<div id="${i}" class="form-text error">${n}</div>`,l.style.display="block"}function Q(e,t){d&&d.on("change",o=>{var n,r;((r=(n=o.changed)==null?void 0:n.component)==null?void 0:r.type)==="datetime"&&document.activeElement.blur(),X(d),B&&clearTimeout(B),I=null,B=setTimeout(()=>{executeProgressCalculation(e,t)},300)})}function K(e,t=[]){let o={};if(!t||t.length===0||!e)return o;let n=e;if(typeof e=="string")try{n=JSON.parse(e)}catch(i){}const r=i=>{if(!(!i||typeof i!="object"))if(Array.isArray(i))i.forEach(r);else for(const l in i)t.includes(l)?o[l]?Array.isArray(o[l])&&Array.isArray(i[l])&&(o[l]=o[l].concat(i[l])):o[l]=i[l]:typeof i[l]=="object"&&r(i[l])};return r(n),o}function R(e,t=[]){if(!e||typeof e!="object")return e;const o=Array.isArray(e)?[...e]:{...e};for(const n in o){const r=o[n];Array.isArray(r)?t.length>0&&t.includes(n)?o[n]=r.map(i=>i&&typeof i=="object"&&(i.uid||i.id)?i.uid||i.id:i):r.length>0&&r.every(i=>i&&typeof i=="object"&&i.storage==="SmartStorage")?o[n]=r.map(i=>i.id||i.uid||i):o[n]=r.map(i=>typeof i=="object"&&i!==null?R(i,t):i):r&&typeof r=="object"&&(o[n]=R(r,t))}return o}function j(){var r,i;if(!d)return;const e=d.getValue(),t=R(e,v),o=K(e.data,v);if(!(((r=window.__unviredFormsOptions)==null?void 0:r.requireCompleteForm)!==!1&&((i=window.__unviredFormsOptions)==null?void 0:i.requireCompleteForm)!=="false")){sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully (Validation Bypassed).",data:{formData:t,completeFlag:_,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:t,attachmentsData:o}});return}d.errors=[],d.submit().then(l=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully.",data:{formData:t,completeFlag:_,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:l,attachmentsData:o}})}).catch(l=>{let m=!1,p=[],y=[];if(d&&Array.isArray(d.errors)&&d.errors.length>0&&(y=y.concat(d.errors)),Array.isArray(l)?y=y.concat(l):l&&Array.isArray(l.errors)?y=y.concat(l.errors):l&&Array.isArray(l.details)?y=y.concat(l.details):l&&typeof l=="object"&&(l.message||l.context)&&y.push(l),y.length>0?y.forEach(g=>{const u=J(d,g);u&&u.element?q(u)?(m=!0,p.push(g),Y(u,g)):P(u):(m=!0,p.push(g))}):m=!0,!m){logger.warn("[TF_SDK:321a] \u26A0\uFE0F All reported errors were resolved/hallucinated. Forcing success submit."),sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully.",data:{formData:t,completeFlag:_,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:t,attachmentsData:o}});return}logger.error("Form submit errors:",p);let s="Please fill in all required fields.";p.length===1&&p[0].message&&(s=p[0].message),showDynamicModal("Error",[{label:"OK"}],s),sendEventCallback({type:FORM_EVENTS.SUBMIT_ERROR,errorMessage:"ErrorCode : 006, Formio not submit the form",data:{reason:"Form submission failed",formData:t,completeFlag:_,completionPercentage:T,technicalError:p.length>0?p:l}})})}function H(){B=null,V=null,I=null}async function Z(){if(!d){logger.error("[TF_SDK:323] \u274C Form object not initialized");return}let e=d.getValue();window.FORM_SUB_TEMP=e;const t=window.FORM_TEMPLATE||{display:"form",type:"form",components:[]};try{typeof window.loadCommentsform=="function"?(await window.loadCommentsform(t,window.FORM_USER_DATA,window.FORM_COMMENTS_DATA,window.FORM_VOB_ARR,window.FORM_USERS_LIST||[]),showCommentsView()):logger.error("[TF_SDK:324] \u274C loadCommentsform is not a function")}catch(o){logger.error("[TF_SDK:325] \u274C Error while loading comments:",o)}}function $(){if(!d)return;const e=d.getValue().data;if(!Object.values(e||{}).some(o=>o!=null&&o!==""&&o!==!1&&!(Array.isArray(o)&&o.length===0)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length===0))){showDynamicModal("Attention",[{label:"OK"}],"Please fill at least one field before saving.");return}showDynamicModal("Do you want to save the data?",[{label:"Yes",callback:()=>{const o=d.getValue(),n=R(o),r=K(o.data,v);sendEventCallback({type:FORM_EVENTS.SAVE,message:"Success: Data saved successfully.",data:{commentsData:FORM_COMMENTS_DATA,formData:n,completeFlag:_,completionPercentage:T,attachmentsData:r}})}},{label:"No",callback:()=>{}}])}function ee(){if(d&&d.options&&d.options.readOnly){L();return}let e;try{e=d?d.getValue().data:null}catch(o){e=null}JSON.stringify(e)===JSON.stringify(k)?L():showDynamicModal("Unsaved Form Data",[{label:"Discard",callback:L},{label:"Save",callback:$}],"Discard your changes or save them before leaving?")}function te(e,t,o){let n=new CustomEvent("capureImageData",{detail:{imageData:e,controlId:t,fileName:o}});document.dispatchEvent(n)}window.checkMoreButtonVisibility=function(){const e=document.getElementById("unvired-more-btn");if(!e)return;const t=window.__unviredFormsOptions||{};if(t.showMoreButton===!1){e.style.display="none";return}const o=document.getElementById("completeOption"),n=document.getElementById("saveOption"),r=document.getElementById("documentsOption"),i=document.getElementById("comments-item"),l=document.getElementById("help-item"),m=(y,s)=>y?s&&t[s]===!0?!0:y.style.display!=="none":!1;m(o)||m(n)||m(r)||t.showComments===!0||t.showHelp===!0?e.style.display="":e.style.display="none"},window.checkMoreButtonVisibility(),window.loadComments=Z,window.loadTRform=z,window.FormOnSave=$,window.FormOnBack=ee,window.setImageData=te,window.FormOnComplete=j,window.FormOnNext=function(){d&&typeof d.nextPage=="function"&&d.nextPage().then(()=>{typeof window.updateWizardNav=="function"&&window.updateWizardNav(d)})},window.FormOnPrevious=function(){d&&typeof d.prevPage=="function"&&d.prevPage().then(()=>{typeof window.updateWizardNav=="function"&&window.updateWizardNav(d)})},window.formOnCompleteFunction=j,window.resetFormCache=H,window.resetInitialFormData=function(){k=null},document.dispatchEvent(new CustomEvent("LoadRNformReady"))})();</script>
|
|
39002
|
+
<script>(function(){var d=null,_=null,ne;let v=[],T=0,k=!1;function L(){sendEventCallback({type:FORM_EVENTS.BACK_NAVIGATION,message:"Back navigation triggered.",data:{}})}function W(e,t){var c,f;const o=document.getElementById("saveBtn"),n=document.getElementById("submitBtn"),r=document.getElementById("prevBtn"),i=document.getElementById("nextBtn"),l=document.getElementById("completeOption"),m=document.getElementById("saveOption"),p=document.getElementById("completeDivider"),y=document.getElementById("saveDivider");if(!o||!n)return;const s=e===!0||e==="true",g=e===!1||e==="false",u=String(t||"").toLowerCase(),a=(h,w,E)=>{h&&(E?h.style.setProperty("display","flex","important"):h.style.setProperty("display","none","important")),w&&(E?w.style.setProperty("display","block","important"):w.style.setProperty("display","none","important"))};a(l,p,!1),a(m,y,!1),u==="read"?(o.style.display="none",n.style.display="none"):g&&u==="writemultiple"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',n.disabled=!0,a(l,p,!1),a(m,y,!1)):g&&u==="writesingle"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Submit',n.disabled=!0):s&&u==="writemultiple"?((c=window.__unviredFormsOptions)==null?void 0:c.showCompleteAlways)===!0||((f=window.__unviredFormsOptions)==null?void 0:f.showCompleteAlways)==="true"?(o.style.display="",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',o.disabled=!0,n.disabled=!0,a(l,p,!1),a(m,y,!1)):(o.style.display="",n.style.display="none",o.disabled=!0,a(l,p,!1)):s&&u==="writesingle"?(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Complete',n.disabled=!0,a(m,y,!0)):(o.style.display="none",n.style.display="",n.innerHTML='<i class="bi bi-check2-circle"></i> Submit',n.disabled=!0),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}function U(e,t,o,n){var C,F,O,A;const r=document.getElementById("saveBtn"),i=document.getElementById("submitBtn"),l=document.getElementById("prevBtn"),m=document.getElementById("nextBtn");if(!r||!i)return;const p=o===!0||o==="true",y=o===!1||o==="false",s=String(n||"").toLowerCase(),g=document.getElementById("completeOption"),u=document.getElementById("saveOption"),a=document.getElementById("completeDivider"),c=document.getElementById("saveDivider"),f=(b,M,D)=>{b&&(D?b.style.setProperty("display","flex","important"):b.style.setProperty("display","none","important")),M&&(D?M.style.setProperty("display","block","important"):M.style.setProperty("display","none","important"))},h=Object.values(t||{}).some(b=>b!=null&&b!==""&&b!==!1&&!(Array.isArray(b)&&b.length===0)&&!(typeof b=="object"&&!Array.isArray(b)&&Object.keys(b).length===0)),w=e>=100,E=((C=window.__unviredFormsOptions)==null?void 0:C.requireCompleteForm)!==!1&&((F=window.__unviredFormsOptions)==null?void 0:F.requireCompleteForm)!=="false";if(s==="read"){r.style.display="none",i.style.display="none";return}if(p&&s==="writesingle"){r.style.display="none",i.style.display="",i.disabled=!1,f(u,c,!0),f(g,a,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(p&&s==="writemultiple"){((O=window.__unviredFormsOptions)==null?void 0:O.showCompleteAlways)===!0||((A=window.__unviredFormsOptions)==null?void 0:A.showCompleteAlways)==="true"?(r.style.display="",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',r.disabled=!h,i.disabled=!1,f(g,a,!1),f(u,c,!1)):w?(r.style.display="none",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',i.disabled=!1,f(u,c,!0),f(g,a,!1)):h?(r.style.display="",i.style.display="none",r.disabled=!1,f(g,a,!0),f(u,c,!1)):(r.style.display="",i.style.display="none",r.disabled=!0,f(g,a,!1),f(u,c,!1)),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(y&&s==="writemultiple"){r.style.display="none",i.style.display="",i.innerHTML='<i class="bi bi-check2-circle"></i> Complete',i.disabled=!1,f(g,a,!1),f(u,c,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}if(y&&s==="writesingle"){r.style.display="none",i.style.display="",i.disabled=!1,f(g,a,!1),f(u,c,!1),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();return}r.style.display="none",i.style.display="",i.disabled=!1,typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}async function z(e,t,o,n,r,i,l,m,p,y){if(window.CURRENT_VIEW!=="comments"){if(H(),logger.info("[TF_SDK:296] \u2705 loadTRform() entered",{mode:n,permission:p,privateExternal:m,language:r}),v=y,typeof Formio=="undefined"){logger.error("[TF_SDK:297] \u274C Formio library not loaded"),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 016, Formio library not loaded",data:{reason:"Formio library not loaded"}});return}try{if(logger.info("[TF_SDK:297] \u2705 Initializing loadTRform"),typeof Formio!="undefined"&&Formio.Components&&Formio.Components.components&&Formio.Components.components.component){const c=Formio.Components.components.component;if(!c._requiredFixApplied){c._requiredFixApplied=!0;const f=c.prototype.setCustomValidity;c.prototype.setCustomValidity=function(w,E,C){var F,O,A,b;if(typeof w=="string"&&(w.trim().toLowerCase()==="required"||w.includes("{{field}}"))){const M=(O=(F=this.component)==null?void 0:F.validate)==null?void 0:O.customMessage,D=((A=this.component)==null?void 0:A.errorLabel)||((b=this.component)==null?void 0:b.label)||this.key||"Field";w=M||`${D} is required`}if(f)return f.call(this,w,E,C)};const h=c.prototype.t;c.prototype.t=function(w,E){var C,F,O,A;if(typeof w=="string"&&w.trim().toLowerCase()==="required"){const b=(F=(C=this.component)==null?void 0:C.validate)==null?void 0:F.customMessage;return b||`${(E==null?void 0:E.field)||((O=this.component)==null?void 0:O.errorLabel)||((A=this.component)==null?void 0:A.label)||this.key||"Field"} is required`}return h?h.apply(this,arguments):w}}}let s={noAlerts:!0,scroll:!1,language:window.FORMIO_LANGUAGE||"en",i18n:window.FORMIO_I18N};if(W(m,p),n=="form")s.readOnly=!1,s.flatten=!1,s.viewHtml=!1;else if(n=="pdf"||n=="print"){s.readOnly=!0,s.flatten=!0,s.renderMode="flat",s.viewHtml=!0;const c=document.querySelector(".progress-container");c&&(c.style.display="none")}else if(n=="readOnly"||p=="read"){s.readOnly=!0,s.flatten=!1,s.viewHtml=!1;const c=document.querySelector(".progress-container");c&&(c.style.display="none");const f=document.getElementById("sticky-footer");f&&window.CURRENT_VIEW!=="comments"&&(f.style.display="none")}else s.readOnly=!1,s.flatten=!1,s.viewHtml=!1;const g=document.getElementById("formio");if(!g)throw new Error("DOM Element #formio not found");logger.info("[TF_SDK:298] \u2705 Creating Formio form...",e);try{d=await Formio.createForm(g,e,s)}catch(c){throw logger.error("[TF_SDK:298-ERR] \u274C Error in Formio.createForm:",c),c}let u=!1;if(d.on("change",()=>{if(!u){if(!_)try{_=JSON.parse(JSON.stringify(d.getValue().data))}catch(c){_=d.getValue().data}u=!0}}),document.dispatchEvent(new CustomEvent("LessRenderingComplete")),window.formObj=d,window.FORMIO_I18N&&Object.keys(window.FORMIO_I18N).length>0){const c=document.getElementById("languageSubMenu"),f=document.getElementById("languageMainOption"),h=document.getElementById("languageDivider");if(c&&f){c.innerHTML="";let w=Object.keys(window.FORMIO_I18N).filter(F=>typeof window.FORMIO_I18N[F]=="object"&&window.FORMIO_I18N[F]!==null);const E=window.FORMIO_LANGUAGE||"en";!w.includes(E)&&typeof window.FORMIO_I18N[E]=="object"&&w.unshift(E);let C=null;try{window.Intl&&typeof Intl.DisplayNames=="function"&&(C=new Intl.DisplayNames(["en"],{type:"language"}))}catch(F){logger.warn("Intl.DisplayNames not supported",F)}w.forEach(F=>{const O=document.createElement("div");O.className=f.className,O.style.cursor="pointer",O.style.padding="0.5rem 1rem",O.style.borderTop="none";let A=F.toUpperCase();try{A=C.of(F)||A}catch(M){}let b=F===E?'<i class="bi bi-check2 text-primary" style="margin-right: 8px;"></i>':'<i class="bi bi-check2" style="margin-right: 8px; visibility: hidden;"></i>';f.innerHTML.includes("icon chevron")&&(b=F===E?'<i class="icon check" style="margin-right: 8px;"></i>':'<i class="icon check" style="margin-right: 8px; visibility: hidden;"></i>'),O.innerHTML=`${b}${A}`,O.onclick=function(M){M.stopPropagation(),window.changeFormLanguage&&(window.changeFormLanguage(F),window.FORMIO_LANGUAGE=F);const D=c.children;for(let N=0;N<D.length;N++){const S=D[N].querySelector("i");S&&(w[N]===F?(S.style.visibility="visible",S.className.includes("bi")&&S.classList.add("text-primary")):(S.style.visibility="hidden",S.className.includes("bi")&&S.classList.remove("text-primary")))}window.toggleLanguageSubMenu&&window.toggleLanguageSubMenu(),window.showToast&&window.showToast(`Language set to ${A}`,"success")},c.appendChild(O)}),w.length>1?(f.style.display=f.className.includes("d-flex")?"flex":"block",h&&(h.style.display="block")):(f.style.display="none",h&&(h.style.display="none"))}}else{const c=document.getElementById("languageMainOption"),f=document.getElementById("languageDivider");c&&(c.style.display="none"),f&&(f.style.display="none")}if(!d){logger.error("[TF_SDK:299] \u274C Form not initialized.");return}const a=()=>{['button[type="submit"]',".formio-component-submit"].forEach(h=>{d.element.querySelectorAll(h).forEach(E=>{E.style.display="none"})}),d.element.querySelectorAll('input:not([type="file"]), textarea').forEach(h=>{h.getAttribute("autocomplete")!=="new-password"&&(h.setAttribute("autocomplete","new-password"),h.setAttribute("data-lpignore","true"),h.setAttribute("spellcheck","false"))})};a(),d.on("render",a),Q(m,p),d.formReady.then(()=>{if(logger.info("[TF_SDK:300] \u2705 formReady.then() triggered"),typeof window.initializeWizardLogic=="function"&&window.initializeWizardLogic(d,m,p),t?(logger.info("[TF_SDK:301] \u2705 Previous form data found:",t),d.submission={data:typeof t=="string"?JSON.parse(t):t},logger.info("[TF_SDK:302] \u2705 Previous submission data applied")):logger.info("[TF_SDK:303] \u2705 No previous form data found"),logger.info("[TF_SDK:304] \u2705 Calculating initial progress..."),executeProgressCalculation(m,p),logger.info("[TF_SDK:305] \u2705 Progress calculation completed"),n=="readOnly"){logger.info("[TF_SDK:306] \u2705 ReadOnly mode detected");const w=document.querySelectorAll(".formio-component-submit");logger.info(`[TF_SDK:307] \u2705 Found ${w.length} submit components`),w.forEach((E,C)=>{E.style.display="none",logger.info(`[TF_SDK:308] \u2705 Hidden submit component ${C+1}`)})}else logger.info("[TF_SDK:309] \u2705 Editable mode detected");logger.info("[TF_SDK:310] \u2705 Sending FORM_RENDER callback..."),sendEventCallback({type:FORM_EVENTS.FORM_RENDER,message:"Success: Form rendered successfully.",data:{submissionData:t,formTemplate:e}}),logger.info("[TF_SDK:311] \u2705 FORM_RENDER callback sent");const c=document.getElementById("sdk-form-loader");c?(logger.info("[TF_SDK:312] \u2705 Loader found, hiding..."),c.classList.add("hidden"),logger.info("[TF_SDK:313] \u2705 Loader hidden")):logger.warn("[TF_SDK:314] \u2705 Loader element not found"),document.querySelectorAll(".tf-form-loading").forEach(w=>w.classList.remove("tf-form-loading")),logger.info("[TF_SDK:315] \u2705 Dispatching FormRenderingComplete event...");let f=0;typeof window.getMaxTableWidth=="function"&&(f=window.getMaxTableWidth(document.getElementById("formio")||document.querySelector(".tf-embed-sdk")||document.body).maxWidth),sendEventCallback({type:FORM_EVENTS.FORM_LOADED,message:"Success: Form rendered complete.",data:{maxTableWidth:`${f}px`}}),document.dispatchEvent(new CustomEvent("FormRenderingComplete",{detail:{timestamp:new Date().toISOString(),status:"success",maxTableWidth:f}})),logger.info("[TF_SDK:316] \u2705 FormRenderingComplete event dispatched successfully");const h=document.querySelector('input[type="file"]');h?(h.setAttribute("accept","*/*"),logger.info("[TF_SDK:317] \u2705 File input found, accept=*/* applied")):logger.info("[TF_SDK:318] \u2705 No file input found"),logger.info("[TF_SDK:319] \u2705 Full formReady process completed")}).catch(c=>{logger.error("[TF_SDK:320] \u274C formReady.then() failed:",c)})}catch(s){logger.error("[TF_SDK:321] \u274C Error creating form (after retries):",s?s.message:"Unknown error",s?s.stack:"");const g=document.getElementById("sdk-form-loader");g&&g.classList.add("hidden"),document.querySelectorAll(".tf-form-loading").forEach(u=>u.classList.remove("tf-form-loading")),sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 005, Formio not rendered the forms",data:{reason:"Failed to render form after retries",technicalError:s}})}}}let B=null,V=null,I=null;function G(){if(I)return I;if(!d)return[];const e=[];function t(o,n=""){Array.isArray(o)&&o.forEach(r=>{var y;if(!r)return;const i=r.component||r;let l=n;if(["columns","panel","fieldset","well","table","tabs","content","htmlelement"].includes(i.type)||(l=n?`${n}.${i.key}`:i.key),["textfield","textarea","number","checkbox","radio","select","selectboxes","email","url","day","datetime","file","datamap","tree","survey","signature","datagrid","editgrid","container"].includes(i.type)&&((y=i.validate)!=null&&y.required)&&e.push({key:i.key,type:i.type,path:l,comp:i,instance:r}),Array.isArray(r.components)&&t(r.components,l),i.type==="form"){let s=l?`${l}.data`:"data";r.subForm&&Array.isArray(r.subForm.components)?t(r.subForm.components,s):Array.isArray(r.components)&&t(r.components,s)}Array.isArray(r.columns)&&r.columns.forEach(s=>{Array.isArray(s.components)&&t(s.components,l)})})}return t(d.components),I=e,e}window.executeProgressCalculation=function(e,t){if(!d)return;const o=d.data||{},n=JSON.stringify(o);if(!(d&&!!d.wizard)&&n===V)return;V=n;const i=G();let l=i.length,m=0;function p(u,a){if(Array.isArray(a)){if(!(["file","datagrid","editgrid","datamap","selectboxes"].includes(u.type)||u.multiple))return a.length>0&&a.every(h=>p(u,h));if(u.type==="file"&&a.length>0&&Array.isArray(a[0]))return a.every(h=>p(u,h))}switch(u.type){case"selectboxes":return Object.values(a||{}).some(Boolean);case"datamap":case"tree":return a&&Object.keys(a).length>0;case"survey":return u.questions&&Array.isArray(u.questions)?a&&Object.keys(a).length>=u.questions.length:a&&Object.keys(a).length>0;case"file":return Array.isArray(a)&&a.length>0;case"checkbox":return a===!0;case"editgrid":case"datagrid":return Array.isArray(a)&&a.length>0;case"signature":return!!a;default:return u.multiple?Array.isArray(a)&&a.length>0&&a.some(c=>c!=null&&c!==""):a!=null&&a!==""}}const y=[];i.forEach(u=>{let a=!0;u.instance&&(u.instance.visible===!1&&(a=!1),a&&typeof u.instance.checkCondition=="function"&&(u.instance.checkCondition(null,o)||(a=!1))),a&&(u.instance&&u.instance.parent&&u.instance.parent.visible===!1||y.push(u))}),l=y.length,m=0,y.forEach(({key:u,type:a,path:c,comp:f})=>{let h=x(o,c);p(f,h)&&m++});const s=l===0?100:Math.round(m/l*100);logger.info("[TF_SDK:322] \u2705 Progress:",{mandatory:l,filledMandatory:m,completion:s+"%"}),T=s,k=s>=100,U(s,d.data,e,t),typeof window.updateWizardNav=="function"&&window.updateWizardNav(d);const g=document.getElementById("progress-bar");if(g){const u=g.querySelector(".progress"),a=g.querySelector(".badge");u.style.width=`${s}%`,a.textContent=`${s}%`;let c=s;s<=0?(c=.5,u.style.width=`${.5}%`,window.innerWidth>768||window.innerWidth>480?a.style.transform="translateX(2%)":a.style.transform="translateX(1%)"):s>=100?(g.classList.add("complete"),c=99.5,window.innerWidth>768||window.innerWidth>480,a.style.transform="translateX(-100%)"):(g.classList.remove("complete"),a.style.transform="translateX(-50%)"),a.style.left=`${c-.25}%`}};function x(e,t){if(e==null||!t)return;if(t.indexOf(".")===-1)return Array.isArray(e)?e.map(r=>r[t]):e[t];const o=t.split(".");let n=e;for(let r=0;r<o.length;r++){const i=o[r];if(n==null)return;if(Array.isArray(n)){const l=o.slice(r).join(".");return n.map(m=>x(m,l))}n=n[i]}return n}function q(e){if(!e)return!0;let t=e.getValue?e.getValue():e.dataValue;return t==null||t===""||Array.isArray(t)&&(t.length===0||!t.some(n=>!(n==null||n===""||typeof n=="object"&&Object.keys(n).length===0)))||typeof t=="object"&&!Array.isArray(t)&&(Object.keys(t).length===0||!Object.values(t).some(n=>n!=null&&n!==""&&n!==!1))?!0:e.isEmpty?e.isEmpty(t):!1}function J(e,t){var r,i,l,m,p,y;if(!e||!t)return null;if(t.component&&t.component.element)return t.component;const o=t.path||((r=t.context)==null?void 0:r.path)||((i=t.context)==null?void 0:i.hasPath);if(o){let s=typeof e.getComponent=="function"?e.getComponent(o):null;if(s&&s.element)return s;const g=String(o).replace(/\[(\d+)\]/g,".$1");if(s=typeof e.getComponent=="function"?e.getComponent(g):null,s&&s.element)return s;const u=String(o).replace(/\.(\d+)\./g,"[$1].");if(s=typeof e.getComponent=="function"?e.getComponent(u):null,s&&s.element)return s}const n=((m=(l=t.context)==null?void 0:l.component)==null?void 0:m.key)||((p=t.component)==null?void 0:p.key)||(typeof((y=t.context)==null?void 0:y.component)=="string"?t.context.component:null);if(n&&typeof e.getComponent=="function"){const s=e.getComponent(n);if(s&&s.element)return s}return null}function P(e){if(!e||!e.element)return;e.error=null,typeof e.setCustomValidity=="function"&&e.setCustomValidity(""),e.element.classList.remove("has-error","formio-error-wrapper","is-invalid"),e.element.querySelectorAll(".choices__inner, .ui.selection.dropdown, .is-invalid").forEach(n=>{n.closest(".formio-component")===e.element&&n.classList.remove("is-invalid")}),e.element.querySelectorAll(".formio-errors, .invalid-feedback, [ref='messageContainer']").forEach(n=>{n.closest(".formio-component")===e.element&&(n.innerHTML="",n.style.display="none")})}function X(e){!e||typeof e.everyComponent!="function"||e.everyComponent(t=>{var l;if(!t||!t.element)return;const o=((l=t.component)==null?void 0:l.type)||t.type;if(["datagrid","editgrid","container","panel","columns","fieldset","well","tabs","form"].includes(o))return;const r=t.element.classList.contains("has-error")||t.element.classList.contains("formio-error-wrapper"),i=Array.from(t.element.querySelectorAll(".formio-errors, .invalid-feedback")).some(m=>m.style.display!=="none"&&m.innerHTML.trim()!==""&&m.closest(".formio-component")===t.element);(r||i)&&!q(t)&&P(t)})}function Y(e,t){var m,p,y,s;if(!e||!e.element)return;e.element.classList.add("has-error","formio-error-wrapper");const o=e.element.querySelector(".choices__inner, .ui.selection.dropdown");o&&o.closest(".formio-component")===e.element&&o.classList.add("is-invalid");const n=t.message||((p=(m=t.context)==null?void 0:m.component)!=null&&p.label?`${t.context.component.label} is required`:`${((y=e.component)==null?void 0:y.label)||e.key} is required`),i=`e-${e.id||((s=e.component)==null?void 0:s.id)||e.key}-${e.key}`;let l=Array.from(e.element.querySelectorAll(".formio-errors, [ref='messageContainer']")).find(g=>g.closest(".formio-component")===e.element);l?(l.setAttribute("ref","messageContainer"),l.classList.contains("invalid-feedback")||l.classList.add("invalid-feedback")):(l=document.createElement("div"),l.setAttribute("ref","messageContainer"),l.className="formio-errors invalid-feedback",e.element.appendChild(l)),l.innerHTML=`<div id="${i}" class="form-text error">${n}</div>`,l.style.display="block"}function Q(e,t){d&&d.on("change",o=>{var n,r;((r=(n=o.changed)==null?void 0:n.component)==null?void 0:r.type)==="datetime"&&document.activeElement.blur(),X(d),B&&clearTimeout(B),I=null,B=setTimeout(()=>{executeProgressCalculation(e,t)},300)})}function K(e,t=[]){let o={};if(!t||t.length===0||!e)return o;let n=e;if(typeof e=="string")try{n=JSON.parse(e)}catch(i){}const r=i=>{if(!(!i||typeof i!="object"))if(Array.isArray(i))i.forEach(r);else for(const l in i)t.includes(l)?o[l]?Array.isArray(o[l])&&Array.isArray(i[l])&&(o[l]=o[l].concat(i[l])):o[l]=i[l]:typeof i[l]=="object"&&r(i[l])};return r(n),o}function R(e,t=[]){if(!e||typeof e!="object")return e;const o=Array.isArray(e)?[...e]:{...e};for(const n in o){const r=o[n];Array.isArray(r)?t.length>0&&t.includes(n)?o[n]=r.map(i=>i&&typeof i=="object"&&(i.uid||i.id)?i.uid||i.id:i):r.length>0&&r.every(i=>i&&typeof i=="object"&&i.storage==="SmartStorage")?o[n]=r.map(i=>i.id||i.uid||i):o[n]=r.map(i=>typeof i=="object"&&i!==null?R(i,t):i):r&&typeof r=="object"&&(o[n]=R(r,t))}return o}function j(){var r,i;if(!d)return;const e=d.getValue(),t=R(e,v),o=K(e.data,v);if(!(((r=window.__unviredFormsOptions)==null?void 0:r.requireCompleteForm)!==!1&&((i=window.__unviredFormsOptions)==null?void 0:i.requireCompleteForm)!=="false")){showDynamicModal("Are you sure you want to complete the form?",[{label:"Yes",callback:()=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully (Validation Bypassed).",data:{formData:t,completeFlag:k,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:t,attachmentsData:o}})}},{label:"No",callback:()=>{}}]);return}d.errors=[],d.submit().then(l=>{showDynamicModal("Are you sure you want to complete the form?",[{label:"Yes",callback:()=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully.",data:{formData:t,completeFlag:k,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:l,attachmentsData:o}})}},{label:"No",callback:()=>{}}])}).catch(l=>{let m=!1,p=[],y=[];if(d&&Array.isArray(d.errors)&&d.errors.length>0&&(y=y.concat(d.errors)),Array.isArray(l)?y=y.concat(l):l&&Array.isArray(l.errors)?y=y.concat(l.errors):l&&Array.isArray(l.details)?y=y.concat(l.details):l&&typeof l=="object"&&(l.message||l.context)&&y.push(l),y.length>0?y.forEach(g=>{const u=J(d,g);u&&u.element?q(u)?(m=!0,p.push(g),Y(u,g)):P(u):(m=!0,p.push(g))}):m=!0,!m){logger.warn("[TF_SDK:321a] \u26A0\uFE0F All reported errors were resolved/hallucinated. Forcing success submit."),showDynamicModal("Are you sure you want to complete the form?",[{label:"Yes",callback:()=>{sendEventCallback({type:FORM_EVENTS.SUBMIT,message:"Success: Form submitted successfully.",data:{formData:t,completeFlag:k,completionPercentage:T,commentsData:FORM_COMMENTS_DATA,result:t,attachmentsData:o}})}},{label:"No",callback:()=>{}}]);return}logger.error("Form submit errors:",p);let s="Please fill in all required fields.";p.length===1&&p[0].message&&(s=p[0].message),showDynamicModal("Error",[{label:"OK"}],s),sendEventCallback({type:FORM_EVENTS.SUBMIT_ERROR,errorMessage:"ErrorCode : 006, Formio not submit the form",data:{reason:"Form submission failed",formData:t,completeFlag:k,completionPercentage:T,technicalError:p.length>0?p:l}})})}function H(){B=null,V=null,I=null}async function Z(){if(!d){logger.error("[TF_SDK:323] \u274C Form object not initialized");return}let e=d.getValue();window.FORM_SUB_TEMP=e;const t=window.FORM_TEMPLATE||{display:"form",type:"form",components:[]};try{typeof window.loadCommentsform=="function"?(await window.loadCommentsform(t,window.FORM_USER_DATA,window.FORM_COMMENTS_DATA,window.FORM_VOB_ARR,window.FORM_USERS_LIST||[]),showCommentsView()):logger.error("[TF_SDK:324] \u274C loadCommentsform is not a function")}catch(o){logger.error("[TF_SDK:325] \u274C Error while loading comments:",o)}}function $(){if(!d)return;const e=d.getValue().data;if(!Object.values(e||{}).some(o=>o!=null&&o!==""&&o!==!1&&!(Array.isArray(o)&&o.length===0)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length===0))){showDynamicModal("Attention",[{label:"OK"}],"Please fill at least one field before saving.");return}showDynamicModal("Do you want to save the data?",[{label:"Yes",callback:()=>{const o=d.getValue(),n=R(o),r=K(o.data,v);sendEventCallback({type:FORM_EVENTS.SAVE,message:"Success: Data saved successfully.",data:{commentsData:FORM_COMMENTS_DATA,formData:n,completeFlag:k,completionPercentage:T,attachmentsData:r}})}},{label:"No",callback:()=>{}}])}function ee(){if(d&&d.options&&d.options.readOnly){L();return}let e;try{e=d?d.getValue().data:null}catch(o){e=null}JSON.stringify(e)===JSON.stringify(_)?L():showDynamicModal("Unsaved Form Data",[{label:"Discard",callback:L},{label:"Save",callback:$}],"Discard your changes or save them before leaving?")}function te(e,t,o){let n=new CustomEvent("capureImageData",{detail:{imageData:e,controlId:t,fileName:o}});document.dispatchEvent(n)}window.checkMoreButtonVisibility=function(){const e=document.getElementById("unvired-more-btn");if(!e)return;const t=window.__unviredFormsOptions||{};if(t.showMoreButton===!1){e.style.display="none";return}const o=document.getElementById("completeOption"),n=document.getElementById("saveOption"),r=document.getElementById("documentsOption"),i=document.getElementById("comments-item"),l=document.getElementById("help-item"),m=(y,s)=>y?s&&t[s]===!0?!0:y.style.display!=="none":!1;m(o)||m(n)||m(r)||t.showComments===!0||t.showHelp===!0?e.style.display="":e.style.display="none"},window.checkMoreButtonVisibility(),window.loadComments=Z,window.loadTRform=z,window.FormOnSave=$,window.FormOnBack=ee,window.setImageData=te,window.FormOnComplete=j,window.FormOnNext=function(){d&&typeof d.nextPage=="function"&&d.nextPage().then(()=>{typeof window.updateWizardNav=="function"&&window.updateWizardNav(d)})},window.FormOnPrevious=function(){d&&typeof d.prevPage=="function"&&d.prevPage().then(()=>{typeof window.updateWizardNav=="function"&&window.updateWizardNav(d)})},window.formOnCompleteFunction=j,window.resetFormCache=H,window.resetInitialFormData=function(){_=null},document.dispatchEvent(new CustomEvent("LoadRNformReady"))})();</script>
|
|
38465
39003
|
<script>(function(){function l(e){if(!e||([".formio-component-wizard_nav",".btn-wizard-nav-next",".btn-wizard-nav-previous",".btn-wizard-nav-cancel",".btn-wizard-nav-submit"].forEach(n=>{e.element.querySelectorAll(n).forEach(t=>{t.style.display="none"})}),typeof e.eachComponent=="function"&&e.eachComponent(n=>{if(n.type==="button"){const o=(n.component.action||"").toLowerCase(),t=(n.component.label||"").toLowerCase();(o==="next"||o==="previous"||o==="cancel"||t==="next"||t==="previous"||t==="cancel")&&(n.visible=!1,n.element&&(n.element.style.display="none"))}}),!e.wizard))return;const i=document.getElementById("prevBtn"),d=document.getElementById("nextBtn"),u=document.getElementById("submitBtn"),y=document.getElementById("saveBtn"),a=e.page||0,c=e.pages&&e.pages.length||0,g=a>=c-1;if(logger.info(`[TF_SDK:326] \u2705 Page: ${a+1}/${c}, isLastPage: ${g}`),i&&(i.style.display=a>0?"inline-block":"none"),d&&(d.style.display=a<c-1?"inline-block":"none"),g)logger.info("[TF_SDK:328] \u2705 Last page: Allowing normal button logic to take over"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility();else{logger.info("[TF_SDK:327] \u2705 Intermediate page: Hiding save/complete actions"),u&&(u.style.display="none"),y&&(y.style.display="none");const n=document.getElementById("completeOption"),o=document.getElementById("saveOption"),t=document.getElementById("completeDivider"),p=document.getElementById("saveDivider");n&&(n.style.display="none"),o&&(o.style.display="none"),t&&(t.style.display="none"),p&&(p.style.display="none");const r=document.getElementById("quickCompleteBtn"),w=document.getElementById("quickSaveBtn");r&&(r.style.display="none"),w&&(w.style.display="none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()}}function f(e,s,i){e&&(e.wizard&&(e.on("nextPage",()=>{l(e),typeof window.executeProgressCalculation=="function"&&window.executeProgressCalculation(s,i)}),e.on("prevPage",()=>{l(e),typeof window.executeProgressCalculation=="function"&&window.executeProgressCalculation(s,i)})),e.on("render",()=>{l(e)}))}window.updateWizardNav=l,window.initializeWizardLogic=function(e,s,i){logger.info("[TF_SDK:329] \u2705 Initializing wizard-specific logic..."),f(e,s,i),e.on("change",()=>{l(e)}),l(e)}})();</script>
|
|
38466
39004
|
<script>(function(){async function d(o,e,n,w,i=[]){var a,c;logger.info("[TF_SDK:279] \u2705 loadCommentsform() called",{users:i==null?void 0:i.length,commentsData:n==null?void 0:n.length});const r=document.getElementById("formio-cmt");if(!r)return logger.error("[TF_SDK:280] \u274C formio-cmt container not found");if(window.commentsResponse){try{(c=(a=window.commentsResponse).destroy)==null||c.call(a)}catch(t){logger.warn("[TF_SDK:281] \u26A0\uFE0F Could not destroy previous Recogito instance",t)}window.commentsResponse=null}if(window.commentsFormObj&&window.commentsFormObj.destroy)try{await window.commentsFormObj.destroy()}catch(t){logger.warn("[TF_SDK:282] \u26A0\uFE0F Could not destroy previous comments Formio form",t)}r.innerHTML="",logger.info("[TF_SDK:283] \u2705 Creating Formio form in read-only mode for comments..."),window.commentsFormObj=await Formio.createForm(r,o,{renderMode:"html",flatten:!0,readOnly:!0,language:localStorage.getItem("language")||"en"}),window.commentsFormObj.nosubmit=!0,window.commentsFormObj.on("change",()=>{}),logger.info("[TF_SDK:284] \u2705 Initializing Recogito annotation overlay..."),window.commentsResponse=Recogito.init({content:document.getElementById("formio-cmt"),locale:localStorage.getItem("language"),widgets:[{widget:recogito.CommentsMention,userSuggestions:i,editable:"MINE_ONLY"},{widget:"TAG",vocabulary:w}],mode:"html"}),window.commentsResponse.setAuthInfo({id:e.email,displayName:e.firstName||e.email}),window.commentsResponse.on("createAnnotation",function(t){}),window.commentsResponse.on("updateAnnotation",function(t){}),window.commentsResponse.on("selectAnnotation",function(t){const g=new CustomEvent("annotateCss",{detail:!0});document.dispatchEvent(g)}),window.commentsFormObj.formReady.then(()=>{setTimeout(()=>{logger.info("[TF_SDK:285] \u2705 Annotations loaded",{count:n==null?void 0:n.length}),window.commentsResponse.setAnnotations(n)},500);const t=new CustomEvent("loadAnnotationComplete",{});document.dispatchEvent(t),logger.info("[TF_SDK:286] \u2705 loadAnnotationComplete dispatched")})}async function m(){logger.info("[TF_SDK:287] \u2705 goToformRender() \u2014 returning to form view");const o=document.getElementById("formio-cmt");if(o&&(o.innerHTML=""),typeof window.resetFormCache=="function"&&window.resetFormCache(),typeof window.showFormView=="function")try{window.commentsResponse&&window.commentsResponse.destroy&&(window.commentsResponse.destroy(),logger.info("[TF_SDK:288] \u2705 Previous Recogito instance destroyed")),window.commentsFormObj&&window.commentsFormObj.destroy&&(await window.commentsFormObj.destroy(),window.commentsFormObj=null),logger.info("[TF_SDK:289] \u2705 Instantly switching back to form view..."),window.showFormView()}catch(e){logger.error("[TF_SDK:290] \u274C Error restoring form view:",e),typeof sendEventCallback=="function"&&sendEventCallback({type:"ERROR",errorMessage:"ErrorCode : 005, Formio not rendered the forms",data:{reason:"Failed to restore form view",technicalError:e}})}else logger.error("[TF_SDK:291] \u274C showFormView is not defined")}function l(){logger.info("[TF_SDK:292] \u2705 CommentOnBack() \u2014 checking for unsaved changes");let o=window.commentsResponse.getAnnotations(),e=window.FORM_COMMENTS_DATA;const n=JSON.stringify(o)===JSON.stringify(e);logger.info("[TF_SDK:293] \u2705 Annotations changed:",!n),n?m():showDynamicModal("Unsaved Comments",[{label:"Discard",callback:m},{label:"Save",callback:s}],"Discard your comments or save them before leaving?")}function s(){logger.info("[TF_SDK:294] \u2705 submitComments() \u2014 sending annotation data to app");let o=window.commentsResponse.getAnnotations();logger.info("[TF_SDK:295] \u2705 Annotations collected",{count:o==null?void 0:o.length}),sendEventCallback({type:"COMMENTS_DATA",message:"Success: getcomments data.",data:{commentsData:o}}),window.FORM_COMMENTS_DATA=o,m()}window.submitComments=s,window.loadCommentsform=d,window.CommentOnBack=l})();</script>
|
|
38467
39005
|
|
|
@@ -38472,13 +39010,37 @@ Expecting `+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":x="Parse error on
|
|
|
38472
39010
|
<script>(function(){window.applyLocationLayout=n=>{if(n&&n.Components&&n.Components.components){const o=n,{textfield:e}=o.Components.components;!o.Components.components.location&&e&&o.Components.addComponent("location",e);return}const i=n;if(!i||!i.querySelectorAll)return;i.querySelectorAll(".formio-component-location").forEach(o=>{const e=o.querySelector('[ref="element"]');if(e&&!e.querySelector(".location-custom-icon")){const t=document.createElement("span");t.className="location-custom-icon bi bi-geo-alt-fill",t.title="Fetch Location",t.setAttribute("role","button"),t.setAttribute("aria-label","Get current location"),t.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),t.style.opacity="0.5",setTimeout(()=>t.style.opacity="1",200),logger.info("[TF_SDK:36] \u2705 Location Icon Clicked!");const c=o.querySelector("input"),a=c?c.id:o.id;logger.info("[TF_SDK:37] \u2705 Dispatching getLocation for:",a);const r=new CustomEvent("getLocation",{detail:{compObj:o,controlId:a}});document.dispatchEvent(r),c&&c.focus()}),e.prepend(t)}})}})();</script>
|
|
38473
39011
|
<script>(function(){function h(){var d,r,i,o;const s=window.firstName||((d=window.form)==null?void 0:d.firstName)||((r=window.FORM_USER_DATA)==null?void 0:r.firstName)||"",u=window.lastName||((i=window.form)==null?void 0:i.lastName)||((o=window.FORM_USER_DATA)==null?void 0:o.lastName)||"";return`${s} ${u}`.trim()||"Signer"}const S="cursive";window.applySignatureLayout=function(s){if(!s||!s.components)return;const u=new WeakMap,f=t=>t.querySelector(".signature-click-hint"),d=t=>{const e=document.createElement("span");return e.className="signature-click-hint",e.style.pointerEvents="none",e.innerHTML='Sign Here<br>Or<br><span class="signature-click-action" role="button" tabindex="0">Click To Sign</span>',t.appendChild(e),e},r=t=>{let e=f(t);e||(e=d(t)),e.style.display="inline-flex",e.style.opacity="1",e.style.pointerEvents="none"},i=t=>{const e=f(t);!e||e.style.display==="none"||(e.style.opacity="0",setTimeout(()=>{e.style.opacity==="0"&&(e.style.display="none")},420))},o=t=>{const e=t.dataValue;return!!(e&&typeof e=="string"&&e.length>10)};s.everyComponent(t=>{if(t.type!=="signature")return;const e=t.element;if(!e)return;const n=e.querySelector(".signature-pad-body");if(!n||n.dataset.sigBound==="true")return;n.dataset.sigBound="true";const a=e.querySelector(".signature-pad-canvas"),l=n.querySelector(".signature-pad-refresh");l&&l.classList.remove("btn","btn-sm","btn-light");const g={hasDrawn:o(t)};u.set(n,g),t.options&&t.options.readOnly||g.hasDrawn?i(n):r(n);let y=0;const w=c=>{if(!(c.target&&c.target.closest?c.target.closest(".signature-click-action"):null)||t.options&&t.options.readOnly)return;const p=Date.now();p-y<300||(y=p,c.cancelable&&c.preventDefault(),typeof t.drawSignatureFromName=="function"?(t.drawSignatureFromName(),i(n)):t.refs&&t.refs.clicktoSign&&(t.refs.clicktoSign.click(),i(n)))};n.addEventListener("click",w),n.addEventListener("touchend",w,{passive:!1}),a&&(a.addEventListener("pointerdown",()=>{i(n)}),a.addEventListener("mousedown",()=>i(n)),a.addEventListener("touchstart",()=>i(n),{passive:!0})),l&&l.addEventListener("click",()=>{g.hasDrawn=!1,setTimeout(()=>r(n),50)})}),s._sigHintListenerBound||(s._sigHintListenerBound=!0,s.on("change",()=>{setTimeout(()=>{s.everyComponent(t=>{if(t.type!=="signature")return;const e=t.element;if(!e)return;const n=e.querySelector(".signature-pad-body");if(!n)return;const a=u.get(n);if(!a)return;o(t)?(a.hasDrawn=!0,i(n)):a.hasDrawn||r(n)})},100)}))}})();</script>
|
|
38474
39012
|
<script>(function(){window.applySurveyLayout=function(r){r.querySelectorAll(".formio-component-survey table").forEach(t=>{const i=Array.from(t.querySelectorAll("thead th")).map(l=>l.innerText.trim());t.querySelectorAll("tbody tr").forEach(l=>{l.querySelectorAll("td").forEach((n,o)=>{o>0&&i[o]&&n.setAttribute("data-label",i[o])})})})},window.prepareSurvey=function(r){!window.Formio||!window.Formio.Utils||window.Formio.Utils.eachComponent(r,function(e){if(e.type==="survey"&&e.validate&&e.validate.required){const t=e.label||"This field";e.validate.custom=`var keys = Object.keys(input || {}); valid = (keys.length === 0 || keys.length >= component.questions.length) ? true : '${t} requires you to fill all fields.';`}})}})();</script>
|
|
38475
|
-
<script>(function(){window.applyTabsLayout=function(
|
|
39013
|
+
<script>(function(){window.applyTabsLayout=function(B){if(!B)return;B.querySelectorAll(".formio-component-tabs").forEach(A=>{if(A.dataset.tabsPatched==="true")return;const s=A.querySelector(":scope > .card");if(!s)return;const a=s.querySelector(":scope > .card-header"),m=a?a.querySelectorAll(".nav-item"):[],y=a?a.querySelectorAll(".nav-link"):[],x=s.querySelectorAll(":scope > .tab-pane");if(!y.length||!x.length)return;const E=s.classList.contains("card-vertical")||a&&a.querySelector(".nav-tabs-vertical"),o=a?a.querySelector(".tab-component-tabs")||a.querySelector(".nav-tabs"):null;let d=s.querySelector(".tf-tabs-mobile-bar, .tf-vertical-tabs-mobile-bar");d||(d=document.createElement("div"),d.className="tf-tabs-mobile-bar tf-vertical-tabs-mobile-bar",d.innerHTML=`
|
|
39014
|
+
<button type="button" class="tf-tabs-toggle tf-vertical-tabs-toggle" aria-label="Select tab" aria-expanded="false">
|
|
39015
|
+
<span class="tf-tabs-toggle-icon tf-vertical-tabs-toggle-icon">
|
|
39016
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
39017
|
+
<line x1="3" y1="12" x2="21" y2="12"></line>
|
|
39018
|
+
<line x1="3" y1="6" x2="21" y2="6"></line>
|
|
39019
|
+
<line x1="3" y1="18" x2="21" y2="18"></line>
|
|
39020
|
+
</svg>
|
|
39021
|
+
</span>
|
|
39022
|
+
<span class="tf-tabs-current-title tf-vertical-tabs-current-title"></span>
|
|
39023
|
+
<span class="tf-tabs-toggle-arrow tf-vertical-tabs-toggle-arrow">
|
|
39024
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
39025
|
+
<polyline points="6 9 12 15 18 9"></polyline>
|
|
39026
|
+
</svg>
|
|
39027
|
+
</span>
|
|
39028
|
+
</button>
|
|
39029
|
+
`,a?s.insertBefore(d,a):s.insertBefore(d,s.firstChild));let u=s.querySelector(".tf-tabs-backdrop, .tf-vertical-tabs-backdrop");u||(u=document.createElement("div"),u.className="tf-tabs-backdrop tf-vertical-tabs-backdrop",s.appendChild(u));const q=d.querySelector(".tf-tabs-current-title, .tf-vertical-tabs-current-title"),f=d.querySelector(".tf-tabs-toggle, .tf-vertical-tabs-toggle"),w=()=>{s.classList.remove("tf-tabs-overlay-open"),f&&f.setAttribute("aria-expanded","false")},W=t=>{t.stopPropagation();const e=s.classList.toggle("tf-tabs-overlay-open");f&&f.setAttribute("aria-expanded",e?"true":"false")};f&&!f.dataset.bound&&(f.addEventListener("click",W),f.dataset.bound="true"),u&&!u.dataset.bound&&(u.addEventListener("click",t=>{t.stopPropagation(),w()}),u.dataset.bound="true"),s.dataset.overlayListenerBound||(document.addEventListener("click",t=>{s.classList.contains("tf-tabs-overlay-open")&&!s.contains(t.target)&&w()}),s.dataset.overlayListenerBound="true");let L=()=>{};if(!E&&a&&o){let t=a.querySelector(".tf-tabs-scroll-left"),e=a.querySelector(".tf-tabs-scroll-right");t||(t=document.createElement("button"),t.type="button",t.className="tf-tabs-scroll-btn tf-tabs-scroll-left",t.setAttribute("aria-label","Scroll tabs left"),t.innerHTML=`
|
|
39030
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
39031
|
+
<polyline points="15 18 9 12 15 6"></polyline>
|
|
39032
|
+
</svg>
|
|
39033
|
+
`,a.insertBefore(t,o)),e||(e=document.createElement("button"),e.type="button",e.className="tf-tabs-scroll-btn tf-tabs-scroll-right",e.setAttribute("aria-label","Scroll tabs right"),e.innerHTML=`
|
|
39034
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
39035
|
+
<polyline points="9 18 15 12 9 6"></polyline>
|
|
39036
|
+
</svg>
|
|
39037
|
+
`,a.appendChild(e));let i=null,h=null,l=null,n=null;L=()=>{if(window.innerWidth<=768){i!==!0&&(t.classList.add("tf-scroll-hidden"),e.classList.add("tf-scroll-hidden"),i=!0,h=!0);return}const c=o.scrollWidth-o.clientWidth,p=c<=2;if(i!==p&&(t.classList.toggle("tf-scroll-hidden",p),e.classList.toggle("tf-scroll-hidden",p),i=p,h=p),!p){const D=o.scrollLeft,k=D<=2,S=D>=c-2;l!==k&&(t.classList.toggle("tf-scroll-disabled",k),k?t.setAttribute("disabled","true"):t.removeAttribute("disabled"),l=k),n!==S&&(e.classList.toggle("tf-scroll-disabled",S),S?e.setAttribute("disabled","true"):e.removeAttribute("disabled"),n=S)}};let r=null;const b=()=>{r&&cancelAnimationFrame(r),r=requestAnimationFrame(L)};t.dataset.bound||(t.addEventListener("click",c=>{c.preventDefault(),o.scrollBy({left:-220,behavior:"smooth"})}),t.dataset.bound="true"),e.dataset.bound||(e.addEventListener("click",c=>{c.preventDefault(),o.scrollBy({left:220,behavior:"smooth"})}),e.dataset.bound="true"),o.dataset.scrollBound||(o.addEventListener("scroll",b,{passive:!0}),o.dataset.scrollBound="true"),s.dataset.resizeBound||(window.addEventListener("resize",b),s.dataset.resizeBound="true"),setTimeout(L,50)}let T=-1,v=null;const C=(t,e=!1)=>{if(t===T&&!e)return;let i="";m.forEach((l,n)=>{l.classList.toggle("active",n===t),l.setAttribute("role","tab")}),y.forEach((l,n)=>{const r=n===t;l.classList.toggle("active",r),l.setAttribute("aria-selected",r?"true":"false"),r?(l.setAttribute("tabindex","0"),i=l.textContent.trim()):l.setAttribute("tabindex","-1")}),q&&i&&(q.textContent=i),w();const h=()=>{if(T=t,x.forEach((l,n)=>{const r=n===t;l.classList.toggle("active",r),l.style.display=r?"block":"none"}),!E&&o&&m[t])try{const l=m[t],n=o.scrollLeft,r=o.clientWidth,b=l.offsetLeft,c=l.offsetWidth;b<n?o.scrollTo({left:Math.max(0,b-20),behavior:"auto"}):b+c>n+r&&o.scrollTo({left:b+c-r+20,behavior:"auto"})}catch(l){}L()};e?(v&&(clearTimeout(v),v=null),h()):(v&&clearTimeout(v),v=setTimeout(h,50))};y.forEach((t,e)=>{t.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation(),C(e)},!0)});let g=Array.from(y).findIndex(t=>t.classList.contains("active"));g<0&&(g=Array.from(m).findIndex(t=>t.classList.contains("active"))),g<0&&(g=0),C(g,!0),A.dataset.tabsPatched="true"})}})();</script>
|
|
38476
39038
|
|
|
38477
39039
|
<script>(function(){window.applyDayLayout=function(s){if(!s)return;s.querySelectorAll(".formio-component-day").forEach(l=>{l.querySelectorAll("input, select").forEach(e=>{if(e.classList.contains("formio-select-autocomplete-input"))return;if(e.tagName==="SELECT"){const t=e.options[0];t&&(t.value===""||!t.value)&&(t.textContent=" ")}(!e.getAttribute("placeholder")||e.getAttribute("placeholder")==="")&&e.setAttribute("placeholder"," ");const o=()=>{const t=e.closest('[class*="col-"]');if(!t)return;const a=e.value;a!=null&&a.toString().trim()!==""?t.classList.add("has-value"):t.classList.remove("has-value")};e.addEventListener("change",o),e.addEventListener("input",o),o()}),l.classList.add("day-layout-ready")})}})();</script>
|
|
38478
39040
|
<script>(function(){window.initializeTooltips=r=>{if(!window.tippy)return;if(!window.tippyDelegate){window.tippyDelegate=tippy.delegate(document.body,{target:'[data-tooltip], [data-content], [ref="tooltip"], [data-tippy-content]',trigger:"click",hideOnClick:!1,interactive:!0,touch:!0,appendTo:()=>document.body,boundary:"viewport",flipOnUpdate:!0,maxWidth:350,onShow(t){window.tippyDelegate&&window.tippyDelegate.instances&&window.tippyDelegate.instances.forEach(o=>{o!==t&&o.hide()}),t.reference.setAttribute("aria-expanded","true");const e=t.reference.getAttribute("data-tooltip")||t.reference.getAttribute("data-content")||t.reference.getAttribute("title");e&&t.setContent(e)},onHide(t){t.reference.setAttribute("aria-expanded","false")}}),document.body.addEventListener("click",t=>{!t.target.closest('[ref="tooltip"], .bi-question-circle')&&window.tippyDelegate&&window.tippyDelegate.instances&&window.tippyDelegate.instances.forEach(o=>o.hide())});const i=t=>{const e=t.target.closest('[ref="tooltip"], .bi-question-circle');e&&(t.stopPropagation(),(t.type==="touchstart"||t.type==="touchend"||e.closest("label"))&&t.cancelable&&t.preventDefault())};document.body.addEventListener("click",i,!0),document.body.addEventListener("touchstart",i,{capture:!0,passive:!1}),document.body.addEventListener("touchend",i,{capture:!0,passive:!1})}[].slice.call((r||document).querySelectorAll('[data-tooltip], [data-content], [ref="tooltip"]')).forEach(i=>i.removeAttribute("title"))}})();</script>
|
|
38479
39041
|
<script>(function(){const t=i=>{(i||document).querySelectorAll(".formio-component-bio").forEach(e=>{const o=e.querySelector(".ck-editor__editable");o&&(o.addEventListener("focus",()=>{e.classList.add("is-focused")}),o.addEventListener("blur",()=>{e.classList.remove("is-focused")}))})};typeof themeHook!="undefined"&&themeHook.register("bio",t)})();</script>
|
|
38480
|
-
<script>(function(){window.applyWizardLayout=r=>{if(!r)return;const t=r.querySelector(".breadcrumb")||r.querySelector(".pagination");if(!t)return;const
|
|
38481
|
-
<script>(function(){const c=t=>{if(typeof prepareFloating!="function"||!t)return;t.schema&&(t.schema.components||t.schema.pages)&&prepareFloating(t.schema.components||t.schema.pages||[]);const a=["textfield","email","number","password","phoneNumber","textarea","datetime","dateTime","day","currency","time","barcode","location","barcodeselect","url","website","smartId"];t.everyComponent(n=>{n.component&&a.includes(n.component.type)&&(n.component.placeholder||(n.component.placeholder=" "),n.input&&(Array.isArray(n.input)?n.input:[n.input]).forEach(e=>{e&&(e.placeholder===void 0||e.placeholder==="")&&(e.placeholder=" ")})),n.subForm&&c(n.subForm)})},y=t=>{if(!t||!t.element)return;const a=t.element;c(t),typeof applyCheckboxLayout=="function"&&applyCheckboxLayout(a),typeof applyTableLayout=="function"&&applyTableLayout(a),typeof applySurveyLayout=="function"&&applySurveyLayout(a),typeof applyLocationLayout=="function"&&applyLocationLayout(a),typeof applyTabsLayout=="function"&&applyTabsLayout(a),typeof applyColumnLayout=="function"&&applyColumnLayout(a),typeof applyFloatingLabelsLayout=="function"&&applyFloatingLabelsLayout(a),typeof applyBarcodeLayout=="function"&&applyBarcodeLayout(a),typeof applyFileLayout=="function"&&applyFileLayout(a),typeof applyDayLayout=="function"&&applyDayLayout(a),typeof applySignatureLayout=="function"&&applySignatureLayout(t),typeof applyWizardLayout=="function"&&applyWizardLayout(a),typeof initializeTooltips=="function"&&initializeTooltips(a)},f=()=>{const t=window.Formio;if(!t)return setTimeout(f,100);if(!t._themeIntegrated){if(t._themeIntegrated=!0,t.icons="bi",t.Templates.framework="bootstrap5",typeof applyBarcodeLayout=="function"&&applyBarcodeLayout(t),typeof applyLocationLayout=="function"&&applyLocationLayout(t),t.Components&&t.Components.components){const{select:i}=t.Components.components;if(!t.Components.components.barcodeselect&&i)try{t.Components.addComponent("barcodeselect",i)}catch(e){logger.warn("[TF_SDK:39] \u26A0\uFE0F Could not add barcodeselect component:",e)}}const a=i=>{!i||!Array.isArray(i)||i.forEach(e=>{(e.type==="datetime"||e.type==="day")&&(e.widget=e.widget||{type:"calendar"},e.widget.displayInModal=!1,e.widget.customOptions=e.widget.customOptions||{}),e.components&&Array.isArray(e.components)&&a(e.components),e.columns&&Array.isArray(e.columns)&&a(e.columns),e.rows&&Array.isArray(e.rows)&&e.rows.forEach(r=>{Array.isArray(r)&&r.forEach(o=>{o&&o.components&&a(o.components)})})})},n=t.createForm;t.createForm=async function(i,e,r={}){if(e&&(e.components||e.display)){const s=e.components||(e.display==="wizard"?e.components:[]);s.length>0&&typeof prepareFloating=="function"&&prepareFloating(s),s.length>0&&typeof prepareSurvey=="function"&&prepareSurvey(s),s.length>0&&a(s)}const o=await n.call(this,i,e,r);y(o);let l;const p=()=>{clearTimeout(l),l=setTimeout(()=>{y(o)},
|
|
39042
|
+
<script>(function(){window.applyWizardLayout=r=>{if(!r)return;const t=r.querySelector(".breadcrumb")||r.querySelector(".pagination");if(!t)return;const c=Array.from(t.querySelectorAll(".breadcrumb-item, .page-item"));let s=!1;c.forEach(e=>{if(e.classList.contains("active")){s=!0,e.classList.remove("completed");try{e.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})}catch(o){}}else s?e.classList.remove("completed"):e.classList.add("completed")})}})();</script>
|
|
39043
|
+
<script>(function(){const c=t=>{if(typeof prepareFloating!="function"||!t)return;t.schema&&(t.schema.components||t.schema.pages)&&prepareFloating(t.schema.components||t.schema.pages||[]);const a=["textfield","email","number","password","phoneNumber","textarea","datetime","dateTime","day","currency","time","barcode","location","barcodeselect","url","website","smartId"];t.everyComponent(n=>{n.component&&a.includes(n.component.type)&&(n.component.placeholder||(n.component.placeholder=" "),n.input&&(Array.isArray(n.input)?n.input:[n.input]).forEach(e=>{e&&(e.placeholder===void 0||e.placeholder==="")&&(e.placeholder=" ")})),n.subForm&&c(n.subForm)})},y=t=>{if(!t||!t.element)return;const a=t.element;c(t),typeof applyCheckboxLayout=="function"&&applyCheckboxLayout(a),typeof applyTableLayout=="function"&&applyTableLayout(a),typeof applySurveyLayout=="function"&&applySurveyLayout(a),typeof applyLocationLayout=="function"&&applyLocationLayout(a),typeof applyTabsLayout=="function"&&applyTabsLayout(a),typeof applyColumnLayout=="function"&&applyColumnLayout(a),typeof applyFloatingLabelsLayout=="function"&&applyFloatingLabelsLayout(a),typeof applyBarcodeLayout=="function"&&applyBarcodeLayout(a),typeof applyFileLayout=="function"&&applyFileLayout(a),typeof applyDayLayout=="function"&&applyDayLayout(a),typeof applySignatureLayout=="function"&&applySignatureLayout(t),typeof applyWizardLayout=="function"&&applyWizardLayout(a),typeof initializeTooltips=="function"&&initializeTooltips(a)},f=()=>{const t=window.Formio;if(!t)return setTimeout(f,100);if(!t._themeIntegrated){if(t._themeIntegrated=!0,t.icons="bi",t.Templates.framework="bootstrap5",typeof applyBarcodeLayout=="function"&&applyBarcodeLayout(t),typeof applyLocationLayout=="function"&&applyLocationLayout(t),t.Components&&t.Components.components){const{select:i}=t.Components.components;if(!t.Components.components.barcodeselect&&i)try{t.Components.addComponent("barcodeselect",i)}catch(e){logger.warn("[TF_SDK:39] \u26A0\uFE0F Could not add barcodeselect component:",e)}}const a=i=>{!i||!Array.isArray(i)||i.forEach(e=>{(e.type==="datetime"||e.type==="day")&&(e.widget=e.widget||{type:"calendar"},e.widget.displayInModal=!1,e.widget.customOptions=e.widget.customOptions||{}),e.components&&Array.isArray(e.components)&&a(e.components),e.columns&&Array.isArray(e.columns)&&a(e.columns),e.rows&&Array.isArray(e.rows)&&e.rows.forEach(r=>{Array.isArray(r)&&r.forEach(o=>{o&&o.components&&a(o.components)})})})},n=t.createForm;t.createForm=async function(i,e,r={}){if(e&&(e.components||e.display)){const s=e.components||(e.display==="wizard"?e.components:[]);s.length>0&&typeof prepareFloating=="function"&&prepareFloating(s),s.length>0&&typeof prepareSurvey=="function"&&prepareSurvey(s),s.length>0&&a(s)}const o=await n.call(this,i,e,r);y(o);let l;const p=()=>{clearTimeout(l),l=setTimeout(()=>{y(o)},100)};return o.on("change",p),o.on("redraw",p),o.on("render",p),window.addEventListener("resize",p),logger.info("[TF_SDK:40] \u2705 Unvired Theme: Applied premium UI to form."),o},window._tfDialogObserver||(window._tfDialogObserver=new MutationObserver(i=>{i.forEach(e=>{e.addedNodes.forEach(r=>{if(r.nodeType===1){let o=null;if(r.classList&&r.classList.contains("formio-dialog")?o=r:typeof r.querySelector=="function"&&(o=r.querySelector(".formio-dialog")),o&&!o.classList.contains("tf-embed-sdk")){const l=document.querySelector(".tf-embed-sdk:not(.formio-dialog)");l&&(o.classList.add("tf-embed-sdk"),l.style&&l.style.cssText&&(o.style.cssText+=l.style.cssText))}}})})}),window._tfDialogObserver.observe(document.body,{childList:!0,subtree:!0}),document.querySelectorAll(".formio-dialog").forEach(i=>{const e=document.querySelector(".tf-embed-sdk:not(.formio-dialog)");!i.classList.contains("tf-embed-sdk")&&e&&(i.classList.add("tf-embed-sdk"),e.style&&e.style.cssText&&(i.style.cssText+=e.style.cssText))})),window._tfFlatpickrScrollFix||(window._tfFlatpickrScrollFix=!0,window.addEventListener("scroll",function(i){if(i.target&&i.target.classList&&i.target.classList.contains("flatpickr-calendar"))return;document.querySelectorAll(".flatpickr-calendar.open").length>0&&document.querySelectorAll(".flatpickr-input").forEach(o=>{o._flatpickr&&o._flatpickr.isOpen&&typeof o._flatpickr.close=="function"&&(o._flatpickr.close(),(document.activeElement===o||document.activeElement===o.nextSibling)&&document.activeElement.blur())})},{capture:!0,passive:!0})),logger.info("[TF_SDK:41] \u2705 Unvired Theme: Global Hook Active.")}};f()})();</script>
|
|
38482
39044
|
|
|
38483
39045
|
</head>
|
|
38484
39046
|
|
|
@@ -38527,7 +39089,7 @@ Expecting `+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":x="Parse error on
|
|
|
38527
39089
|
|
|
38528
39090
|
|
|
38529
39091
|
<div id="sticky-footer" class="footer-hidden" style="display: none;">
|
|
38530
|
-
<div class="build-version">SDK v2.0.
|
|
39092
|
+
<div class="build-version">SDK v2.0.84</div>
|
|
38531
39093
|
|
|
38532
39094
|
<button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
|
|
38533
39095
|
<i class="bi bi-chevron-left"></i> Previous
|