@buildocsdev/sdk 1.1.42 → 1.1.44

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.
@@ -1 +1 @@
1
- .bforms-themed .label-widget:not([style*=color]),.bforms-themed .text-widget:not([style*=color]),.bforms-themed .heading-widget:not([style*=color]),.bforms-themed .form-header>div:not([style*=color]),.bforms-themed p:not([style*=color]),.bforms-themed h1:not([style*=color]),.bforms-themed h2:not([style*=color]),.bforms-themed h3:not([style*=color]),.bforms-themed h4:not([style*=color]),.bforms-themed h5:not([style*=color]),.bforms-themed h6:not([style*=color]),.bforms-themed span:not(.MuiInputBase-input):not(.MuiButton-label):not([style*=color]),.bforms-themed div.label:not(.MuiFormLabel-root):not(.MuiInputLabel-root):not([style*=color]),.bforms-themed .rowSegment>div>div:not([style*=color]),.bforms-themed .row-container div:not(.MuiInputBase-root):not(.MuiFormControl-root):not(.MuiButton-root):not([style*=color]),.bforms-themed .react-tabs__tab:not([style*=color]),.bforms-themed .react-tabs__tab-list li:not([style*=color]){color:var(--bforms-text-primary, #2c3e50) !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed .label-widget[style*="color: rgb(0, 0, 0)"],.bforms-themed .label-widget[style*="color:#000000"],.bforms-themed .label-widget[style*="color: #000000"],.bforms-themed .label-widget[style*="color: #000"],.bforms-themed .text-widget[style*="color: rgb(0, 0, 0)"],.bforms-themed .text-widget[style*="color:#000000"],.bforms-themed .text-widget[style*="color: #000000"],.bforms-themed .text-widget[style*="color: #000"],.bforms-themed .heading-widget[style*="color: rgb(0, 0, 0)"],.bforms-themed .heading-widget[style*="color:#000000"],.bforms-themed .heading-widget[style*="color: #000000"],.bforms-themed .heading-widget[style*="color: #000"],.bforms-themed .form-header>div[style*="color: rgb(0, 0, 0)"],.bforms-themed .form-header>div[style*="color:#000000"],.bforms-themed .form-header>div[style*="color: #000000"],.bforms-themed .form-header>div[style*="color: #000"],.bforms-themed .rowSegment>div>div[style*="color: rgb(0, 0, 0)"],.bforms-themed .rowSegment>div>div[style*="color:#000000"],.bforms-themed .rowSegment>div>div[style*="color: #000000"],.bforms-themed .rowSegment>div>div[style*="color: #000"],.bforms-themed .react-tabs__tab[style*="color: rgb(0, 0, 0)"],.bforms-themed .react-tabs__tab[style*="color:#000000"],.bforms-themed .react-tabs__tab[style*="color: #000000"],.bforms-themed .react-tabs__tab[style*="color: #000"],.bforms-themed .react-tabs__tab-list li[style*="color: rgb(0, 0, 0)"],.bforms-themed .react-tabs__tab-list li[style*="color:#000000"],.bforms-themed .react-tabs__tab-list li[style*="color: #000000"],.bforms-themed .react-tabs__tab-list li[style*="color: #000"]{color:var(--bforms-text-primary, #2c3e50) !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed input[type=text],.bforms-themed input[type=email],.bforms-themed input[type=password],.bforms-themed input[type=number],.bforms-themed input[type=tel],.bforms-themed input[type=url],.bforms-themed input[type=date],.bforms-themed input[type=time],.bforms-themed textarea,.bforms-themed select{background-color:var(--bforms-input-bg, #ffffff) !important;border-color:var(--bforms-input-border, #3498db) !important;color:var(--bforms-input-text, #2c3e50) !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed input[type=text]:focus,.bforms-themed input[type=email]:focus,.bforms-themed input[type=password]:focus,.bforms-themed input[type=number]:focus,.bforms-themed input[type=tel]:focus,.bforms-themed input[type=url]:focus,.bforms-themed input[type=date]:focus,.bforms-themed input[type=time]:focus,.bforms-themed textarea:focus,.bforms-themed select:focus{border-color:var(--bforms-primary-color, #2980b9) !important;outline-color:var(--bforms-primary-light, #3498db) !important}.bforms-themed input[type=text]:disabled,.bforms-themed input[type=email]:disabled,.bforms-themed input[type=password]:disabled,.bforms-themed input[type=number]:disabled,.bforms-themed input[type=tel]:disabled,.bforms-themed input[type=url]:disabled,.bforms-themed input[type=date]:disabled,.bforms-themed input[type=time]:disabled,.bforms-themed textarea:disabled,.bforms-themed select:disabled{background-color:var(--bforms-input-disabled-bg, #ffffff) !important;border-color:var(--bforms-input-disabled-border, #ecf0f1) !important;color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed button.MuiButton-contained,.bforms-themed .btn-primary,.bforms-themed .btn-contained,.bforms-themed input[type=submit],.bforms-themed input[type=button]{background:linear-gradient(135deg, var(--bforms-primary-light, #3498db) 0%, var(--bforms-primary-color, #2980b9) 100%) !important;color:#fff !important;border-color:var(--bforms-primary-color, #2980b9) !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed button.MuiButton-contained:hover,.bforms-themed .btn-primary:hover,.bforms-themed .btn-contained:hover,.bforms-themed input[type=submit]:hover,.bforms-themed input[type=button]:hover{background:linear-gradient(135deg, var(--bforms-primary-color, #2980b9) 0%, var(--bforms-primary-dark, #1f5f96) 100%) !important}.bforms-themed button.MuiButton-outlined,.bforms-themed .btn-outlined{background:transparent !important;color:var(--bforms-primary-color, #2980b9) !important;border-color:var(--bforms-primary-color, #2980b9) !important;border-width:1px !important;border-style:solid !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed button.MuiButton-outlined:hover,.bforms-themed .btn-outlined:hover{background:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.08)) !important;border-color:var(--bforms-primary-dark, #1f5f96) !important;color:var(--bforms-primary-dark, #1f5f96) !important}.bforms-themed .MuiButton-root,.bforms-themed button{font-family:var(--bforms-font-family, inherit) !important}.bforms-themed label.MuiInputLabel-root:not(.MuiInputLabel-shrink):not(.Mui-focused),.bforms-themed .MuiFormLabel-root:not(.MuiInputLabel-shrink),.bforms-themed .MuiInputLabel-root:not(.MuiInputLabel-shrink):not(.Mui-focused){color:var(--bforms-text-secondary, #7f8c8d) !important}.bforms-themed .MuiInputLabel-root.Mui-focused{color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiInputLabel-root.MuiInputLabel-shrink:not(.Mui-focused),.bforms-themed .MuiFormLabel-root.MuiInputLabel-shrink:not(.Mui-focused),.bforms-themed .MuiInputLabel-root.MuiFormLabel-filled:not(.Mui-focused){color:var(--bforms-input-border, #3498db) !important}.bforms-themed label.Mui-disabled,.bforms-themed .MuiFormLabel-root.Mui-disabled,.bforms-themed .MuiInputLabel-root.Mui-disabled{color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed input::placeholder,.bforms-themed textarea::placeholder,.bforms-themed .MuiInputBase-input::placeholder{color:var(--bforms-text-secondary, #7f8c8d) !important;opacity:.7 !important}.bforms-themed input[type=checkbox]:checked,.bforms-themed input[type=radio]:checked{accent-color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiTextField-root input,.bforms-themed .MuiInputBase-root input,.bforms-themed .MuiInputBase-input,.bforms-themed .MuiOutlinedInput-input,.bforms-themed .MuiFilledInput-input,.bforms-themed .MuiInput-input{background-color:var(--bforms-input-bg, #ffffff) !important;color:var(--bforms-input-text, #2c3e50) !important}.bforms-themed .MuiInputBase-input.Mui-disabled,.bforms-themed .MuiOutlinedInput-input.Mui-disabled{background-color:var(--bforms-input-disabled-bg, #ffffff) !important;color:var(--bforms-input-disabled-text, #bdc3c7) !important;-webkit-text-fill-color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed .MuiOutlinedInput-root fieldset,.bforms-themed .MuiOutlinedInput-notchedOutline,.bforms-themed .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline{border-color:var(--bforms-input-border, #3498db) !important}.bforms-themed .MuiOutlinedInput-root:hover fieldset,.bforms-themed .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline{border-color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiOutlinedInput-root.Mui-focused fieldset,.bforms-themed .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiOutlinedInput-root:not(.Mui-focused):not(.Mui-error) fieldset,.bforms-themed .MuiOutlinedInput-root:not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline{border-color:var(--bforms-input-border, #3498db) !important}.bforms-themed .MuiSelect-select{background-color:var(--bforms-input-bg, #ffffff) !important;color:var(--bforms-input-text, #2c3e50) !important}.bforms-themed .MuiSelect-select.Mui-disabled{background-color:var(--bforms-input-disabled-bg, #ffffff) !important;color:var(--bforms-input-disabled-text, #bdc3c7) !important;-webkit-text-fill-color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed .MuiSelect-icon{color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiSelect-icon.Mui-disabled{color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed .MuiIconButton-root,.bforms-themed .MuiPickersCalendarHeader-switchViewButton,.bforms-themed .MuiPickersArrowSwitcher-button{color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiIconButton-root.Mui-disabled{color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed .MuiAutocomplete-popupIndicator{color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiAutocomplete-popupIndicator.Mui-disabled{color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed .MuiAutocomplete-clearIndicator{color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiMenuItem-root{background-color:var(--bforms-input-bg, #ffffff) !important;color:var(--bforms-input-text, #2c3e50) !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed .MuiMenuItem-root:hover{background-color:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.08)) !important}.bforms-themed .MuiMenuItem-root.Mui-selected{background-color:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.12)) !important;color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiMenuItem-root.Mui-selected:hover{background-color:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.16)) !important}.bforms-themed .MuiMenu-paper,.bforms-themed .MuiPopover-paper{background-color:var(--bforms-input-bg, #ffffff) !important}.bforms-themed .MuiFormHelperText-root.Mui-error{color:#d32f2f !important}.bforms-themed .MuiInputLabel-root.Mui-error{color:#d32f2f !important}.bforms-themed .MuiOutlinedInput-root.Mui-error fieldset{border-color:#d32f2f !important}.bforms-themed .MuiOutlinedInput-root.Mui-error:hover fieldset{border-color:#d32f2f !important}.bforms-themed .MuiOutlinedInput-root.Mui-error.Mui-focused fieldset{border-color:#d32f2f !important}.bforms-themed .MuiTableCell-root,.bforms-themed .MuiTableCell-head,.bforms-themed .MuiTableCell-body,.bforms-themed .MuiTable-root th,.bforms-themed .MuiTable-root td{font-family:var(--bforms-font-family, inherit) !important}.bforms-themed .MuiTypography-root{font-family:var(--bforms-font-family, inherit) !important}.bforms-themed .tabulator,.bforms-themed .tabulator-col-title,.bforms-themed .tabulator-header,.bforms-themed .tabulator-headers,.bforms-themed .tabulator-col,.bforms-themed .tabulator-cell,.bforms-themed .tabulator-row,.bforms-themed .tabulator-table{font-family:var(--bforms-font-family, inherit) !important}.bforms-themed .tabulator-cell.tabulator-editing,.bforms-themed .tabulator-cell.tabulator-focused,.bforms-themed .tabulator-row.tabulator-selected,.bforms-themed .tabulator-row.tabulator-selectable:hover{background-color:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.08)) !important}.bforms-themed .tabulator-cell.tabulator-editing{border-color:var(--bforms-primary-color, #2980b9) !important;outline:1px solid var(--bforms-primary-color, #2980b9) !important}.bforms-themed .tabulator-row.tabulator-selected{background-color:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.12)) !important}.bforms-themed .pdf-viewer-isolate,.bforms-themed .pdf-viewer-isolate *{color:inherit !important;font-family:inherit !important;background-color:transparent !important;background:transparent !important}.bforms-themed .pdf-viewer-isolate{color:initial !important;font-family:initial !important}.bforms-themed .pdf-viewer-isolate .react-pdf__Page__textContent{color:transparent !important;font-family:sans-serif !important}.bforms-themed div[role=presentation][tabindex="0"]{border:2px dashed var(--bforms-input-border, #3498db) !important;border-radius:8px !important;background:var(--bforms-input-bg, #ffffff) !important;padding:1rem !important;transition:all .2s ease !important}.bforms-themed div[role=presentation][tabindex="0"]:hover{border-color:var(--bforms-primary-color, #2980b9) !important;background:rgba(52, 152, 219, 0.02) !important}.bforms-themed div[role=presentation]>div>div:last-child{border:2px dashed var(--bforms-input-border, #3498db) !important;border-radius:8px !important;padding:3rem 1rem !important;background:transparent !important;transition:all .2s ease !important;display:flex !important;flex-direction:column !important;align-items:center !important;justify-content:center !important}.bforms-themed div[role=presentation]:hover>div>div:last-child{border-color:var(--bforms-primary-color, #2980b9) !important;background:rgba(52, 152, 219, 0.03) !important}.bforms-themed div[role=presentation] svg[data-testid=CloudUploadIcon]{color:var(--bforms-primary-color, #2980b9) !important;width:56px !important;height:56px !important;display:block !important;margin:0 auto !important;transition:all .2s ease !important}.bforms-themed div[role=presentation]:hover svg[data-testid=CloudUploadIcon]{transform:scale(1.05) !important;color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed div[role=presentation]>div>div:last-child>div{width:100% !important;text-align:center !important}.bforms-themed div[role=presentation] p{color:var(--bforms-text-primary, #2c3e50) !important;font-family:var(--bforms-font-family, inherit) !important;font-size:.9375rem !important;font-weight:500 !important;margin:1rem 0 0 0 !important;text-align:center !important}.bforms-themed .thumbsContainer{display:grid !important;grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)) !important;gap:.75rem !important;margin-bottom:1rem !important}.bforms-themed .thumbContainer{position:relative !important;border-radius:8px !important;overflow:visible !important}.bforms-themed .thumbInner{position:relative !important;border:1px solid var(--bforms-input-border, #3498db) !important;border-radius:8px !important;background:var(--bforms-input-bg, #ffffff) !important;transition:all .2s ease !important;overflow:hidden !important;height:inherit}.bforms-themed .thumbInner:hover{border-color:var(--bforms-primary-color, #2980b9) !important;box-shadow:0 2px 8px rgba(41, 128, 185, 0.15) !important}.bforms-themed .thumbInner>div:first-child{background:rgba(0, 0, 0, 0.75) !important;padding:.75rem !important;border-radius:8px 8px 0 0 !important}.bforms-themed .ellipsis-container{color:#fff !important;font-family:var(--bforms-font-family, inherit) !important;font-size:.8125rem !important;font-weight:500 !important;line-height:1.3 !important}.bforms-themed .thumbInner p:not(.ellipsis-container){color:rgba(255, 255, 255, 0.85) !important;font-family:var(--bforms-font-family, inherit) !important;font-size:.6875rem !important;font-weight:400 !important}.bforms-themed .thumbInner button{min-width:32px !important;min-height:32px !important;padding:.375rem !important;margin:0 .25rem !important;border:1px solid rgba(255, 255, 255, 0.3) !important;border-radius:6px !important;background:rgba(255, 255, 255, 0.1) !important;transition:all .2s ease !important}.bforms-themed .thumbInner button:hover{background:rgba(255, 255, 255, 0.25) !important;border-color:rgba(255, 255, 255, 0.5) !important}.bforms-themed .thumbInner button svg{color:#fff !important}.bforms-themed .thumbInner button[title=Delete]:hover{background:rgba(211, 47, 47, 0.9) !important;border-color:#d32f2f !important}.bforms-themed .thumbInner button[title=Download]:hover{background:var(--bforms-primary-color, #2980b9) !important;border-color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .thumbInner svg[data-testid=PictureAsPdfSharpIcon],.bforms-themed .thumbInner>div:last-child svg{color:var(--bforms-primary-color, #2980b9) !important;width:64px !important;height:64px !important}.bforms-themed .rCorner,.bforms-themed .lCorner{display:none !important}.bforms-themed .upload-progress,.bforms-themed .file-progress{position:relative !important;height:6px !important;background-color:rgba(52, 152, 219, 0.15) !important;border-radius:10px !important;overflow:hidden !important;margin-top:.75rem !important}.bforms-themed .upload-progress-bar,.bforms-themed .file-progress-bar{height:100% !important;background:linear-gradient(90deg, var(--bforms-primary-light, #3498db) 0%, var(--bforms-primary-color, #2980b9) 100%) !important;border-radius:10px !important;transition:width .4s cubic-bezier(0.4, 0, 0.2, 1) !important;position:relative !important;overflow:hidden !important}.bforms-themed .upload-progress-bar::after,.bforms-themed .file-progress-bar::after{content:"" !important;position:absolute !important;top:0 !important;left:0 !important;bottom:0 !important;right:0 !important;background:linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;animation:progress-shimmer 1.5s infinite !important}@keyframes progress-shimmer{0%{transform:translateX(-100%) !important}100%{transform:translateX(100%) !important}}.bforms-themed .progress-text,.bforms-themed .file-progress-text{display:block !important;margin-top:.5rem !important;color:var(--bforms-text-secondary, #7f8c8d) !important;font-family:var(--bforms-font-family, inherit) !important;font-size:.75rem !important;font-weight:600 !important;text-align:center !important}.bforms-themed .dropzone.disabled,.bforms-themed .file-uploader-dropzone.disabled,.bforms-themed .dropzone[disabled],.bforms-themed .file-uploader-dropzone[disabled]{border-color:var(--bforms-input-disabled-border, #ecf0f1) !important;background-color:var(--bforms-input-disabled-bg, #ffffff) !important;cursor:not-allowed !important;opacity:.6 !important}.bforms-themed .attached-files-container,.bforms-themed [data-widget=attached_files],.bforms-themed .file-attachments{display:flex !important;flex-direction:column !important;gap:.75rem !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed .attached-files-list{display:flex !important;flex-direction:column !important;gap:.5rem !important;max-height:300px !important;overflow-y:auto !important}.bforms-themed .attached-file-item,.bforms-themed .file-attachment-item{display:flex !important;align-items:center !important;justify-content:space-between !important;padding:.75rem 1rem !important;border:1px solid var(--bforms-input-border, #3498db) !important;border-radius:8px !important;background:linear-gradient(135deg, var(--bforms-input-bg, #ffffff) 0%, rgba(52, 152, 219, 0.02) 100%) !important;transition:all .2s ease !important;cursor:pointer !important}.bforms-themed .attached-file-item:hover,.bforms-themed .file-attachment-item:hover{border-color:var(--bforms-primary-color, #2980b9) !important;background:linear-gradient(135deg, var(--bforms-input-bg, #ffffff) 0%, rgba(52, 152, 219, 0.05) 100%) !important;box-shadow:0 2px 8px rgba(41, 128, 185, 0.15) !important;transform:translateY(-1px) !important}.bforms-themed .attached-file-info{display:flex !important;align-items:center !important;gap:.75rem !important;flex:1 !important;min-width:0 !important}.bforms-themed .attached-file-icon{display:flex !important;align-items:center !important;justify-content:center !important;width:40px !important;height:40px !important;border-radius:6px !important;background:linear-gradient(135deg, var(--bforms-primary-color, #2980b9) 0%, var(--bforms-primary-light, #3498db) 100%) !important;color:#fff !important;font-size:1.25rem !important;flex-shrink:0 !important}.bforms-themed .attached-file-details{display:flex !important;flex-direction:column !important;gap:.25rem !important;overflow:hidden !important}.bforms-themed .attached-file-name{color:var(--bforms-text-primary, #2c3e50) !important;font-family:var(--bforms-font-family, inherit) !important;font-weight:500 !important;font-size:.875rem !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;line-height:1.4 !important}.bforms-themed .attached-file-meta{color:var(--bforms-text-secondary, #7f8c8d) !important;font-family:var(--bforms-font-family, inherit) !important;font-size:.75rem !important;line-height:1.2 !important}.bforms-themed .attached-file-actions{display:flex !important;align-items:center !important;gap:.5rem !important;flex-shrink:0 !important}.bforms-themed .attached-file-actions button,.bforms-themed .attached-file-action-btn{min-width:32px !important;height:32px !important;padding:.25rem !important;border:none !important;border-radius:6px !important;background:transparent !important;color:var(--bforms-primary-color, #2980b9) !important;cursor:pointer !important;transition:all .2s ease !important;display:flex !important;align-items:center !important;justify-content:center !important}.bforms-themed .attached-file-actions button:hover,.bforms-themed .attached-file-action-btn:hover{background:var(--bforms-primary-color, #2980b9) !important;color:#fff !important;transform:scale(1.1) !important}.bforms-themed .attached-file-download:hover{background:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .attached-file-delete,.bforms-themed .attached-file-actions button[aria-label*=delete],.bforms-themed .attached-file-actions button[data-action=delete]{color:#d32f2f !important}.bforms-themed .attached-file-delete:hover,.bforms-themed .attached-file-actions button[aria-label*=delete]:hover,.bforms-themed .attached-file-actions button[data-action=delete]:hover{background:#d32f2f !important;color:#fff !important}.bforms-themed .attached-files-upload-btn{display:flex !important;align-items:center !important;justify-content:center !important;gap:.5rem !important;padding:.75rem 1.5rem !important;border:2px dashed var(--bforms-input-border, #3498db) !important;border-radius:8px !important;background:var(--bforms-input-bg, #ffffff) !important;color:var(--bforms-primary-color, #2980b9) !important;font-family:var(--bforms-font-family, inherit) !important;font-weight:500 !important;font-size:.875rem !important;cursor:pointer !important;transition:all .2s ease !important}.bforms-themed .attached-files-upload-btn:hover{border-color:var(--bforms-primary-color, #2980b9) !important;background:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.05)) !important;transform:translateY(-1px) !important;box-shadow:0 2px 8px rgba(41, 128, 185, 0.15) !important}.bforms-themed .attached-files-upload-btn:active{transform:translateY(0) !important;box-shadow:0 1px 3px rgba(41, 128, 185, 0.1) !important}.bforms-themed .attached-files-empty{display:flex !important;flex-direction:column !important;align-items:center !important;justify-content:center !important;padding:2rem !important;border:2px dashed var(--bforms-input-border, #3498db) !important;border-radius:8px !important;background:var(--bforms-input-bg, #ffffff) !important;color:var(--bforms-text-secondary, #7f8c8d) !important;font-family:var(--bforms-font-family, inherit) !important;text-align:center !important}.bforms-themed .attached-files-empty-icon{font-size:3rem !important;color:var(--bforms-input-border, #3498db) !important;margin-bottom:.5rem !important;opacity:.5 !important}.bforms-themed .attached-files-empty-text{font-size:.875rem !important;line-height:1.5 !important}.bforms-themed .attached-files-count{display:inline-flex !important;align-items:center !important;justify-content:center !important;min-width:24px !important;height:24px !important;padding:0 .5rem !important;border-radius:12px !important;background:var(--bforms-primary-color, #2980b9) !important;color:#fff !important;font-family:var(--bforms-font-family, inherit) !important;font-size:.75rem !important;font-weight:600 !important;line-height:1 !important}.bforms-themed .attached-files-compact{padding:.25rem .5rem !important;font-size:.75rem !important}.bforms-themed .attached-files-compact .attached-file-item{padding:.5rem !important;border-radius:6px !important}.bforms-themed .attached-files-compact .attached-file-icon{width:32px !important;height:32px !important;font-size:1rem !important}.bforms-themed .attached-files-compact .attached-file-name{font-size:.75rem !important}.bforms-themed .attached-files-compact .attached-file-meta{font-size:.625rem !important}.bforms-themed .attached-file-loading{opacity:.6 !important;pointer-events:none !important}.bforms-themed .attached-file-loading::after{content:"" !important;position:absolute !important;top:50% !important;left:50% !important;width:20px !important;height:20px !important;margin:-10px 0 0 -10px !important;border:2px solid var(--bforms-primary-color, #2980b9) !important;border-right-color:transparent !important;border-radius:50% !important;animation:attached-file-spin .6s linear infinite !important}@keyframes attached-file-spin{to{transform:rotate(360deg) !important}}.bforms-themed div[role=presentation][tabindex="0"]{border:1px dashed var(--bforms-input-border, #3498db) !important}.bforms-themed div[role=presentation]>div>div:last-child{border:1px dashed var(--bforms-input-border, #3498db) !important}.bforms-themed .attached-files-upload-btn{border:1px dashed var(--bforms-input-border, #3498db) !important}.bforms-themed .attached-files-empty{border:1px dashed var(--bforms-input-border, #3498db) !important}.bforms-themed .thumbInner>div[style*="position: absolute"]{background:rgba(255, 255, 255, 0.95) !important}.bforms-themed .thumbInner .ellipsis-container{color:var(--bforms-text-primary, #2c3e50) !important}.bforms-themed .thumbInner>div[style*="position: absolute"] p{color:var(--bforms-text-secondary, #7f8c8d) !important}.bforms-themed .thumbInner button{background:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.1)) !important;border:1px solid var(--bforms-primary-light, rgba(52, 152, 219, 0.3)) !important;border-radius:4px !important;transition:all .2s ease !important;opacity:1 !important}.bforms-themed .thumbInner button svg{color:var(--bforms-primary-color, #2980b9) !important;transition:color .2s ease !important}.bforms-themed .thumbInner button:hover{background:var(--bforms-primary-color, #2980b9) !important;border-color:var(--bforms-primary-color, #2980b9) !important;transform:scale(1.1) !important}.bforms-themed .thumbInner button:hover svg{color:#fff !important}.bforms-themed .thumbInner button[title=Delete]:hover{background:#d32f2f !important;border-color:#d32f2f !important}.bforms-themed .thumbInner button{margin:0 .5rem 0 0 !important}.bforms-themed .thumbInner button:last-child{margin-right:0 !important}.bforms-themed .thumbInner svg path,.bforms-themed .thumbInner>div:last-child svg path{stroke-width:0 !important}.bforms-themed .thumbInner svg[data-testid=PictureAsPdfSharpIcon],.bforms-themed .thumbInner>div:last-child svg{width:48px !important;height:48px !important}
1
+ .bforms-themed .label-widget:not([style*=color]),.bforms-themed .text-widget:not([style*=color]),.bforms-themed .heading-widget:not([style*=color]),.bforms-themed .form-header>div:not([style*=color]),.bforms-themed p:not([style*=color]),.bforms-themed h1:not([style*=color]),.bforms-themed h2:not([style*=color]),.bforms-themed h3:not([style*=color]),.bforms-themed h4:not([style*=color]),.bforms-themed h5:not([style*=color]),.bforms-themed h6:not([style*=color]),.bforms-themed span:not(.MuiInputBase-input):not(.MuiButton-label):not([style*=color]),.bforms-themed div.label:not(.MuiFormLabel-root):not(.MuiInputLabel-root):not([style*=color]),.bforms-themed .rowSegment>div>div:not([style*=color]),.bforms-themed .row-container div:not(.MuiInputBase-root):not(.MuiFormControl-root):not(.MuiButton-root):not([style*=color]),.bforms-themed .react-tabs__tab:not([style*=color]),.bforms-themed .react-tabs__tab-list li:not([style*=color]){color:var(--bforms-text-primary, #2c3e50) !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed .label-widget[style*="color: rgb(0, 0, 0)"],.bforms-themed .label-widget[style*="color:#000000"],.bforms-themed .label-widget[style*="color: #000000"],.bforms-themed .label-widget[style*="color: #000"],.bforms-themed .text-widget[style*="color: rgb(0, 0, 0)"],.bforms-themed .text-widget[style*="color:#000000"],.bforms-themed .text-widget[style*="color: #000000"],.bforms-themed .text-widget[style*="color: #000"],.bforms-themed .heading-widget[style*="color: rgb(0, 0, 0)"],.bforms-themed .heading-widget[style*="color:#000000"],.bforms-themed .heading-widget[style*="color: #000000"],.bforms-themed .heading-widget[style*="color: #000"],.bforms-themed .form-header>div[style*="color: rgb(0, 0, 0)"],.bforms-themed .form-header>div[style*="color:#000000"],.bforms-themed .form-header>div[style*="color: #000000"],.bforms-themed .form-header>div[style*="color: #000"],.bforms-themed .rowSegment>div>div[style*="color: rgb(0, 0, 0)"],.bforms-themed .rowSegment>div>div[style*="color:#000000"],.bforms-themed .rowSegment>div>div[style*="color: #000000"],.bforms-themed .rowSegment>div>div[style*="color: #000"],.bforms-themed .react-tabs__tab[style*="color: rgb(0, 0, 0)"],.bforms-themed .react-tabs__tab[style*="color:#000000"],.bforms-themed .react-tabs__tab[style*="color: #000000"],.bforms-themed .react-tabs__tab[style*="color: #000"],.bforms-themed .react-tabs__tab-list li[style*="color: rgb(0, 0, 0)"],.bforms-themed .react-tabs__tab-list li[style*="color:#000000"],.bforms-themed .react-tabs__tab-list li[style*="color: #000000"],.bforms-themed .react-tabs__tab-list li[style*="color: #000"]{color:var(--bforms-text-primary, #2c3e50) !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed input[type=text],.bforms-themed input[type=email],.bforms-themed input[type=password],.bforms-themed input[type=number],.bforms-themed input[type=tel],.bforms-themed input[type=url],.bforms-themed input[type=date],.bforms-themed input[type=time],.bforms-themed textarea,.bforms-themed select{background-color:var(--bforms-input-bg, #ffffff) !important;border-color:var(--bforms-input-border, #3498db) !important;color:var(--bforms-input-text, #2c3e50) !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed input[type=text]:focus,.bforms-themed input[type=email]:focus,.bforms-themed input[type=password]:focus,.bforms-themed input[type=number]:focus,.bforms-themed input[type=tel]:focus,.bforms-themed input[type=url]:focus,.bforms-themed input[type=date]:focus,.bforms-themed input[type=time]:focus,.bforms-themed textarea:focus,.bforms-themed select:focus{border-color:var(--bforms-primary-color, #2980b9) !important;outline-color:var(--bforms-primary-light, #3498db) !important}.bforms-themed input[type=text]:disabled,.bforms-themed input[type=email]:disabled,.bforms-themed input[type=password]:disabled,.bforms-themed input[type=number]:disabled,.bforms-themed input[type=tel]:disabled,.bforms-themed input[type=url]:disabled,.bforms-themed input[type=date]:disabled,.bforms-themed input[type=time]:disabled,.bforms-themed textarea:disabled,.bforms-themed select:disabled{background-color:var(--bforms-input-disabled-bg, #ffffff) !important;border-color:var(--bforms-input-disabled-border, #ecf0f1) !important;color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed button.MuiButton-contained,.bforms-themed .btn-primary,.bforms-themed .btn-contained,.bforms-themed input[type=submit],.bforms-themed input[type=button]{background:linear-gradient(135deg, var(--bforms-primary-light, #3498db) 0%, var(--bforms-primary-color, #2980b9) 100%) !important;color:#fff !important;border-color:var(--bforms-primary-color, #2980b9) !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed button.MuiButton-contained:hover,.bforms-themed .btn-primary:hover,.bforms-themed .btn-contained:hover,.bforms-themed input[type=submit]:hover,.bforms-themed input[type=button]:hover{background:linear-gradient(135deg, var(--bforms-primary-color, #2980b9) 0%, var(--bforms-primary-dark, #1f5f96) 100%) !important}.bforms-themed button.MuiButton-outlined,.bforms-themed .btn-outlined{background:transparent !important;color:var(--bforms-primary-color, #2980b9) !important;border-color:var(--bforms-primary-color, #2980b9) !important;border-width:1px !important;border-style:solid !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed button.MuiButton-outlined:hover,.bforms-themed .btn-outlined:hover{background:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.08)) !important;border-color:var(--bforms-primary-dark, #1f5f96) !important;color:var(--bforms-primary-dark, #1f5f96) !important}.bforms-themed .MuiButton-root,.bforms-themed button{font-family:var(--bforms-font-family, inherit) !important}.bforms-themed label.MuiInputLabel-root:not(.MuiInputLabel-shrink):not(.Mui-focused),.bforms-themed .MuiFormLabel-root:not(.MuiInputLabel-shrink),.bforms-themed .MuiInputLabel-root:not(.MuiInputLabel-shrink):not(.Mui-focused){color:var(--bforms-text-secondary, #7f8c8d) !important}.bforms-themed .MuiInputLabel-root.Mui-focused{color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiInputLabel-root.MuiInputLabel-shrink:not(.Mui-focused),.bforms-themed .MuiFormLabel-root.MuiInputLabel-shrink:not(.Mui-focused),.bforms-themed .MuiInputLabel-root.MuiFormLabel-filled:not(.Mui-focused){color:var(--bforms-input-border, #3498db) !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed label.Mui-disabled,.bforms-themed .MuiFormLabel-root.Mui-disabled,.bforms-themed .MuiInputLabel-root.Mui-disabled{color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed input::placeholder,.bforms-themed textarea::placeholder,.bforms-themed .MuiInputBase-input::placeholder{color:var(--bforms-text-secondary, #7f8c8d) !important;opacity:.7 !important}.bforms-themed input[type=checkbox]:checked,.bforms-themed input[type=radio]:checked{accent-color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiTextField-root input,.bforms-themed .MuiInputBase-root input,.bforms-themed .MuiInputBase-input,.bforms-themed .MuiOutlinedInput-input,.bforms-themed .MuiFilledInput-input,.bforms-themed .MuiInput-input{background-color:var(--bforms-input-bg, #ffffff) !important;color:var(--bforms-input-text, #2c3e50) !important}.bforms-themed .MuiInputBase-input.Mui-disabled,.bforms-themed .MuiOutlinedInput-input.Mui-disabled{background-color:var(--bforms-input-disabled-bg, #ffffff) !important;color:var(--bforms-input-disabled-text, #bdc3c7) !important;-webkit-text-fill-color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed .MuiOutlinedInput-root fieldset,.bforms-themed .MuiOutlinedInput-notchedOutline,.bforms-themed .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline{border-color:var(--bforms-input-border, #3498db) !important}.bforms-themed .MuiOutlinedInput-root:hover fieldset,.bforms-themed .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline{border-color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiOutlinedInput-root.Mui-focused fieldset,.bforms-themed .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiOutlinedInput-root:not(.Mui-focused):not(.Mui-error) fieldset,.bforms-themed .MuiOutlinedInput-root:not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline{border-color:var(--bforms-input-border, #3498db) !important}.bforms-themed .MuiSelect-select{background-color:var(--bforms-input-bg, #ffffff) !important;color:var(--bforms-input-text, #2c3e50) !important}.bforms-themed .MuiSelect-select.Mui-disabled{background-color:var(--bforms-input-disabled-bg, #ffffff) !important;color:var(--bforms-input-disabled-text, #bdc3c7) !important;-webkit-text-fill-color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed .MuiSelect-icon{color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiSelect-icon.Mui-disabled{color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed .MuiIconButton-root,.bforms-themed .MuiPickersCalendarHeader-switchViewButton,.bforms-themed .MuiPickersArrowSwitcher-button{color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiIconButton-root.Mui-disabled{color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed .MuiAutocomplete-popupIndicator{color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiAutocomplete-popupIndicator.Mui-disabled{color:var(--bforms-input-disabled-text, #bdc3c7) !important}.bforms-themed .MuiAutocomplete-clearIndicator{color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiMenuItem-root{background-color:var(--bforms-input-bg, #ffffff) !important;color:var(--bforms-input-text, #2c3e50) !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed .MuiMenuItem-root:hover{background-color:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.08)) !important}.bforms-themed .MuiMenuItem-root.Mui-selected{background-color:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.12)) !important;color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .MuiMenuItem-root.Mui-selected:hover{background-color:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.16)) !important}.bforms-themed .MuiMenu-paper,.bforms-themed .MuiPopover-paper{background-color:var(--bforms-input-bg, #ffffff) !important}.bforms-themed .MuiFormHelperText-root.Mui-error{color:#d32f2f !important}.bforms-themed .MuiInputLabel-root.Mui-error{color:#d32f2f !important}.bforms-themed .MuiOutlinedInput-root.Mui-error fieldset{border-color:#d32f2f !important}.bforms-themed .MuiOutlinedInput-root.Mui-error:hover fieldset{border-color:#d32f2f !important}.bforms-themed .MuiOutlinedInput-root.Mui-error.Mui-focused fieldset{border-color:#d32f2f !important}.bforms-themed .MuiTableCell-root,.bforms-themed .MuiTableCell-head,.bforms-themed .MuiTableCell-body,.bforms-themed .MuiTable-root th,.bforms-themed .MuiTable-root td{font-family:var(--bforms-font-family, inherit) !important}.bforms-themed .MuiTypography-root{font-family:var(--bforms-font-family, inherit) !important}.bforms-themed .tabulator,.bforms-themed .tabulator-col-title,.bforms-themed .tabulator-header,.bforms-themed .tabulator-headers,.bforms-themed .tabulator-col,.bforms-themed .tabulator-cell,.bforms-themed .tabulator-row,.bforms-themed .tabulator-table{font-family:var(--bforms-font-family, inherit) !important}.bforms-themed .tabulator-cell.tabulator-editing,.bforms-themed .tabulator-cell.tabulator-focused,.bforms-themed .tabulator-row.tabulator-selected,.bforms-themed .tabulator-row.tabulator-selectable:hover{background-color:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.08)) !important}.bforms-themed .tabulator-cell.tabulator-editing{border-color:var(--bforms-primary-color, #2980b9) !important;outline:1px solid var(--bforms-primary-color, #2980b9) !important}.bforms-themed .tabulator-row.tabulator-selected{background-color:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.12)) !important}.bforms-themed .pdf-viewer-isolate,.bforms-themed .pdf-viewer-isolate *{color:inherit !important;font-family:inherit !important;background-color:transparent !important;background:transparent !important}.bforms-themed .pdf-viewer-isolate{color:initial !important;font-family:initial !important}.bforms-themed .pdf-viewer-isolate .react-pdf__Page__textContent{color:transparent !important;font-family:sans-serif !important}.bforms-themed div[role=presentation][tabindex="0"]{border:2px dashed var(--bforms-input-border, #3498db) !important;border-radius:8px !important;background:var(--bforms-input-bg, #ffffff) !important;padding:1rem !important;transition:all .2s ease !important}.bforms-themed div[role=presentation][tabindex="0"]:hover{border-color:var(--bforms-primary-color, #2980b9) !important;background:rgba(52, 152, 219, 0.02) !important}.bforms-themed div[role=presentation]>div>div:last-child{border:2px dashed var(--bforms-input-border, #3498db) !important;border-radius:8px !important;padding:3rem 1rem !important;background:transparent !important;transition:all .2s ease !important;display:flex !important;flex-direction:column !important;align-items:center !important;justify-content:center !important}.bforms-themed div[role=presentation]:hover>div>div:last-child{border-color:var(--bforms-primary-color, #2980b9) !important;background:rgba(52, 152, 219, 0.03) !important}.bforms-themed div[role=presentation] svg[data-testid=CloudUploadIcon]{color:var(--bforms-primary-color, #2980b9) !important;width:56px !important;height:56px !important;display:block !important;margin:0 auto !important;transition:all .2s ease !important}.bforms-themed div[role=presentation]:hover svg[data-testid=CloudUploadIcon]{transform:scale(1.05) !important;color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed div[role=presentation]>div>div:last-child>div{width:100% !important;text-align:center !important}.bforms-themed div[role=presentation] p{color:var(--bforms-text-primary, #2c3e50) !important;font-family:var(--bforms-font-family, inherit) !important;font-size:.9375rem !important;font-weight:500 !important;margin:1rem 0 0 0 !important;text-align:center !important}.bforms-themed .thumbsContainer{display:grid !important;grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)) !important;gap:.75rem !important;margin-bottom:1rem !important}.bforms-themed .thumbContainer{position:relative !important;border-radius:8px !important;overflow:visible !important}.bforms-themed .thumbInner{position:relative !important;border:1px solid var(--bforms-input-border, #3498db) !important;border-radius:8px !important;background:var(--bforms-input-bg, #ffffff) !important;transition:all .2s ease !important;overflow:hidden !important;height:inherit}.bforms-themed .thumbInner:hover{border-color:var(--bforms-primary-color, #2980b9) !important;box-shadow:0 2px 8px rgba(41, 128, 185, 0.15) !important}.bforms-themed .thumbInner>div:first-child{background:rgba(0, 0, 0, 0.75) !important;padding:.75rem !important;border-radius:8px 8px 0 0 !important}.bforms-themed .ellipsis-container{color:#fff !important;font-family:var(--bforms-font-family, inherit) !important;font-size:.8125rem !important;font-weight:500 !important;line-height:1.3 !important}.bforms-themed .thumbInner p:not(.ellipsis-container){color:rgba(255, 255, 255, 0.85) !important;font-family:var(--bforms-font-family, inherit) !important;font-size:.6875rem !important;font-weight:400 !important}.bforms-themed .thumbInner button{min-width:32px !important;min-height:32px !important;padding:.375rem !important;margin:0 .25rem !important;border:1px solid rgba(255, 255, 255, 0.3) !important;border-radius:6px !important;background:rgba(255, 255, 255, 0.1) !important;transition:all .2s ease !important}.bforms-themed .thumbInner button:hover{background:rgba(255, 255, 255, 0.25) !important;border-color:rgba(255, 255, 255, 0.5) !important}.bforms-themed .thumbInner button svg{color:#fff !important}.bforms-themed .thumbInner button[title=Delete]:hover{background:rgba(211, 47, 47, 0.9) !important;border-color:#d32f2f !important}.bforms-themed .thumbInner button[title=Download]:hover{background:var(--bforms-primary-color, #2980b9) !important;border-color:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .thumbInner svg[data-testid=PictureAsPdfSharpIcon],.bforms-themed .thumbInner>div:last-child svg{color:var(--bforms-primary-color, #2980b9) !important;width:64px !important;height:64px !important}.bforms-themed .rCorner,.bforms-themed .lCorner{display:none !important}.bforms-themed .upload-progress,.bforms-themed .file-progress{position:relative !important;height:6px !important;background-color:rgba(52, 152, 219, 0.15) !important;border-radius:10px !important;overflow:hidden !important;margin-top:.75rem !important}.bforms-themed .upload-progress-bar,.bforms-themed .file-progress-bar{height:100% !important;background:linear-gradient(90deg, var(--bforms-primary-light, #3498db) 0%, var(--bforms-primary-color, #2980b9) 100%) !important;border-radius:10px !important;transition:width .4s cubic-bezier(0.4, 0, 0.2, 1) !important;position:relative !important;overflow:hidden !important}.bforms-themed .upload-progress-bar::after,.bforms-themed .file-progress-bar::after{content:"" !important;position:absolute !important;top:0 !important;left:0 !important;bottom:0 !important;right:0 !important;background:linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;animation:progress-shimmer 1.5s infinite !important}@keyframes progress-shimmer{0%{transform:translateX(-100%) !important}100%{transform:translateX(100%) !important}}.bforms-themed .progress-text,.bforms-themed .file-progress-text{display:block !important;margin-top:.5rem !important;color:var(--bforms-text-secondary, #7f8c8d) !important;font-family:var(--bforms-font-family, inherit) !important;font-size:.75rem !important;font-weight:600 !important;text-align:center !important}.bforms-themed .dropzone.disabled,.bforms-themed .file-uploader-dropzone.disabled,.bforms-themed .dropzone[disabled],.bforms-themed .file-uploader-dropzone[disabled]{border-color:var(--bforms-input-disabled-border, #ecf0f1) !important;background-color:var(--bforms-input-disabled-bg, #ffffff) !important;cursor:not-allowed !important;opacity:.6 !important}.bforms-themed .attached-files-container,.bforms-themed [data-widget=attached_files],.bforms-themed .file-attachments{display:flex !important;flex-direction:column !important;gap:.75rem !important;font-family:var(--bforms-font-family, inherit) !important}.bforms-themed .attached-files-list{display:flex !important;flex-direction:column !important;gap:.5rem !important;max-height:300px !important;overflow-y:auto !important}.bforms-themed .attached-file-item,.bforms-themed .file-attachment-item{display:flex !important;align-items:center !important;justify-content:space-between !important;padding:.75rem 1rem !important;border:1px solid var(--bforms-input-border, #3498db) !important;border-radius:8px !important;background:linear-gradient(135deg, var(--bforms-input-bg, #ffffff) 0%, rgba(52, 152, 219, 0.02) 100%) !important;transition:all .2s ease !important;cursor:pointer !important}.bforms-themed .attached-file-item:hover,.bforms-themed .file-attachment-item:hover{border-color:var(--bforms-primary-color, #2980b9) !important;background:linear-gradient(135deg, var(--bforms-input-bg, #ffffff) 0%, rgba(52, 152, 219, 0.05) 100%) !important;box-shadow:0 2px 8px rgba(41, 128, 185, 0.15) !important;transform:translateY(-1px) !important}.bforms-themed .attached-file-info{display:flex !important;align-items:center !important;gap:.75rem !important;flex:1 !important;min-width:0 !important}.bforms-themed .attached-file-icon{display:flex !important;align-items:center !important;justify-content:center !important;width:40px !important;height:40px !important;border-radius:6px !important;background:linear-gradient(135deg, var(--bforms-primary-color, #2980b9) 0%, var(--bforms-primary-light, #3498db) 100%) !important;color:#fff !important;font-size:1.25rem !important;flex-shrink:0 !important}.bforms-themed .attached-file-details{display:flex !important;flex-direction:column !important;gap:.25rem !important;overflow:hidden !important}.bforms-themed .attached-file-name{color:var(--bforms-text-primary, #2c3e50) !important;font-family:var(--bforms-font-family, inherit) !important;font-weight:500 !important;font-size:.875rem !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;line-height:1.4 !important}.bforms-themed .attached-file-meta{color:var(--bforms-text-secondary, #7f8c8d) !important;font-family:var(--bforms-font-family, inherit) !important;font-size:.75rem !important;line-height:1.2 !important}.bforms-themed .attached-file-actions{display:flex !important;align-items:center !important;gap:.5rem !important;flex-shrink:0 !important}.bforms-themed .attached-file-actions button,.bforms-themed .attached-file-action-btn{min-width:32px !important;height:32px !important;padding:.25rem !important;border:none !important;border-radius:6px !important;background:transparent !important;color:var(--bforms-primary-color, #2980b9) !important;cursor:pointer !important;transition:all .2s ease !important;display:flex !important;align-items:center !important;justify-content:center !important}.bforms-themed .attached-file-actions button:hover,.bforms-themed .attached-file-action-btn:hover{background:var(--bforms-primary-color, #2980b9) !important;color:#fff !important;transform:scale(1.1) !important}.bforms-themed .attached-file-download:hover{background:var(--bforms-primary-color, #2980b9) !important}.bforms-themed .attached-file-delete,.bforms-themed .attached-file-actions button[aria-label*=delete],.bforms-themed .attached-file-actions button[data-action=delete]{color:#d32f2f !important}.bforms-themed .attached-file-delete:hover,.bforms-themed .attached-file-actions button[aria-label*=delete]:hover,.bforms-themed .attached-file-actions button[data-action=delete]:hover{background:#d32f2f !important;color:#fff !important}.bforms-themed .attached-files-upload-btn{display:flex !important;align-items:center !important;justify-content:center !important;gap:.5rem !important;padding:.75rem 1.5rem !important;border:2px dashed var(--bforms-input-border, #3498db) !important;border-radius:8px !important;background:var(--bforms-input-bg, #ffffff) !important;color:var(--bforms-primary-color, #2980b9) !important;font-family:var(--bforms-font-family, inherit) !important;font-weight:500 !important;font-size:.875rem !important;cursor:pointer !important;transition:all .2s ease !important}.bforms-themed .attached-files-upload-btn:hover{border-color:var(--bforms-primary-color, #2980b9) !important;background:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.05)) !important;transform:translateY(-1px) !important;box-shadow:0 2px 8px rgba(41, 128, 185, 0.15) !important}.bforms-themed .attached-files-upload-btn:active{transform:translateY(0) !important;box-shadow:0 1px 3px rgba(41, 128, 185, 0.1) !important}.bforms-themed .attached-files-empty{display:flex !important;flex-direction:column !important;align-items:center !important;justify-content:center !important;padding:2rem !important;border:2px dashed var(--bforms-input-border, #3498db) !important;border-radius:8px !important;background:var(--bforms-input-bg, #ffffff) !important;color:var(--bforms-text-secondary, #7f8c8d) !important;font-family:var(--bforms-font-family, inherit) !important;text-align:center !important}.bforms-themed .attached-files-empty-icon{font-size:3rem !important;color:var(--bforms-input-border, #3498db) !important;margin-bottom:.5rem !important;opacity:.5 !important}.bforms-themed .attached-files-empty-text{font-size:.875rem !important;line-height:1.5 !important}.bforms-themed .attached-files-count{display:inline-flex !important;align-items:center !important;justify-content:center !important;min-width:24px !important;height:24px !important;padding:0 .5rem !important;border-radius:12px !important;background:var(--bforms-primary-color, #2980b9) !important;color:#fff !important;font-family:var(--bforms-font-family, inherit) !important;font-size:.75rem !important;font-weight:600 !important;line-height:1 !important}.bforms-themed .attached-files-compact{padding:.25rem .5rem !important;font-size:.75rem !important}.bforms-themed .attached-files-compact .attached-file-item{padding:.5rem !important;border-radius:6px !important}.bforms-themed .attached-files-compact .attached-file-icon{width:32px !important;height:32px !important;font-size:1rem !important}.bforms-themed .attached-files-compact .attached-file-name{font-size:.75rem !important}.bforms-themed .attached-files-compact .attached-file-meta{font-size:.625rem !important}.bforms-themed .attached-file-loading{opacity:.6 !important;pointer-events:none !important}.bforms-themed .attached-file-loading::after{content:"" !important;position:absolute !important;top:50% !important;left:50% !important;width:20px !important;height:20px !important;margin:-10px 0 0 -10px !important;border:2px solid var(--bforms-primary-color, #2980b9) !important;border-right-color:transparent !important;border-radius:50% !important;animation:attached-file-spin .6s linear infinite !important}@keyframes attached-file-spin{to{transform:rotate(360deg) !important}}.bforms-themed div[role=presentation][tabindex="0"]{border:1px dashed var(--bforms-input-border, #3498db) !important}.bforms-themed div[role=presentation]>div>div:last-child{border:1px dashed var(--bforms-input-border, #3498db) !important}.bforms-themed .attached-files-upload-btn{border:1px dashed var(--bforms-input-border, #3498db) !important}.bforms-themed .attached-files-empty{border:1px dashed var(--bforms-input-border, #3498db) !important}.bforms-themed .thumbInner>div[style*="position: absolute"]{background:rgba(255, 255, 255, 0.95) !important}.bforms-themed .thumbInner .ellipsis-container{color:var(--bforms-text-primary, #2c3e50) !important}.bforms-themed .thumbInner>div[style*="position: absolute"] p{color:var(--bforms-text-secondary, #7f8c8d) !important}.bforms-themed .thumbInner button{background:var(--bforms-primary-hover-bg, rgba(41, 128, 185, 0.1)) !important;border:1px solid var(--bforms-primary-light, rgba(52, 152, 219, 0.3)) !important;border-radius:4px !important;transition:all .2s ease !important;opacity:1 !important}.bforms-themed .thumbInner button svg{color:var(--bforms-primary-color, #2980b9) !important;transition:color .2s ease !important}.bforms-themed .thumbInner button:hover{background:var(--bforms-primary-color, #2980b9) !important;border-color:var(--bforms-primary-color, #2980b9) !important;transform:scale(1.1) !important}.bforms-themed .thumbInner button:hover svg{color:#fff !important}.bforms-themed .thumbInner button[title=Delete]:hover{background:#d32f2f !important;border-color:#d32f2f !important}.bforms-themed .thumbInner button{margin:0 .5rem 0 0 !important}.bforms-themed .thumbInner button:last-child{margin-right:0 !important}.bforms-themed .thumbInner svg path,.bforms-themed .thumbInner>div:last-child svg path{stroke-width:0 !important}.bforms-themed .thumbInner svg[data-testid=PictureAsPdfSharpIcon],.bforms-themed .thumbInner>div:last-child svg{width:48px !important;height:48px !important}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildocsdev/sdk",
3
- "version": "1.1.42",
3
+ "version": "1.1.44",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
@@ -1 +0,0 @@
1
- import {createContext,useContext}from'react';import {jsxs,jsx}from'react/jsx-runtime';var d=({dialogTitle:r,dialogContent:s,buttonAgree:u,buttonDisagree:p,showDialog:l,handleDialogClose:i})=>l?jsxs("div",{role:"dialog",style:{padding:16,border:"1px solid #ddd"},children:[jsx("h3",{children:r}),jsx("p",{children:s}),jsx("button",{onClick:()=>i(false),children:p}),jsx("button",{onClick:()=>i(true),children:u})]}):null,a=createContext({UserDialog:d});function m({value:r,children:s}){return jsx(a.Provider,{value:r,children:s})}function U(){return useContext(a)}var n=()=>{},o=createContext({warn:n,success:n,info:n,error:n,dismissAll:void 0}),F=o.Provider;function P(){return useContext(o)}function M(){return useContext(o).warn}function h(){return useContext(o).success}function A(){return useContext(o).info}function w(){return useContext(o).error}export{m as a,U as b,F as c,P as d,M as e,h as f,A as g,w as h};
@@ -1 +0,0 @@
1
- import {e}from'./chunk-FRAOYRZD.js';import {b}from'./chunk-LBMVBVXW.js';import {q}from'./chunk-LUSAHRNJ.js';import {createContext,memo,useCallback,useEffect,useContext}from'react';import {jsx}from'react/jsx-runtime';import {nanoid}from'@reduxjs/toolkit';import {useNavigate}from'react-router-dom';var c=createContext({isBuildocsExtendedEditor:false}),I=({children:i,isBuildocsExtendedEditor:e=false})=>jsx(c.Provider,{value:{isBuildocsExtendedEditor:e},children:i}),M=()=>{let i=useContext(c);return i||{isBuildocsExtendedEditor:false}};var y=i=>new Promise(e=>setTimeout(e,i)),H=memo(function(e$1){let {viewPort:n}=b(),{ping:r,buildPlugin:a}=b(),f=e();n.isMobileDevice?(n.width,n.height):("translate(-50%, -50%)");let g=useNavigate(),m=()=>{if((e$1==null?void 0:e$1.modalCloseCallBack)!==void 0)e$1==null||e$1.modalCloseCallBack();else {let o=`/pluginmanager/${e$1.plugincode}/plugin/${e$1.guid}?ref=/pluginmanager`;return g(o)}},l=o=>{(async()=>r&&await r({cmd:"ping"}).then(async E=>{E.meta.requestStatus==="rejected"?(f({toastID:nanoid(11),msg:"Application is being restarted. Please wait until it finishes....",clearQueue:true,hideProgressBar:false}),await y(5e3),l(o)):o();}))();},x=useCallback(async()=>{a&&(await a({pluginCode:e$1.plugincode}),l(m));},[]);return useEffect(()=>{x();},[]),jsx(q,{text:"Re-building plugin. Please wait...",size:250,textVariant:"body2",variant:void 0})});export{I as a,M as b,H as c};
@@ -1,2 +0,0 @@
1
- import {b}from'./chunk-LBMVBVXW.js';import {a,c}from'./chunk-5TBO732O.js';import me,{createContext,memo,useContext,useMemo,useState,useEffect}from'react';import {jsx,Fragment}from'react/jsx-runtime';import {createTheme,ThemeProvider}from'@mui/material/styles';import le from'@emotion/cache';import {CacheProvider}from'@emotion/react';import xt from'@mui/material/Box';import ht from'@mui/material/Modal';var Ur=a((_r,Er)=>{var br;function hr(r,e){var o=[],n=0;function t(c){return o.push(c),e}function d(){return o[n++]}return {tokenize:function(c){return c.replace(r,t)},detokenize:function(c){return c.replace(new RegExp("("+e+")","g"),d)}}}function nt(){var r="`TMP`",e="`TMPLTR`",o="`TMPRTL`",n="`NOFLIP_SINGLE`",t="`NOFLIP_CLASS`",d="`COMMENT`",c="[^\\u0020-\\u007e]",u="(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)",y="(?:[0-9]*\\.[0-9]+|[0-9]+)",m="(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)",h="direction\\s*:\\s*",g="[!#$%&*-~]",C=`['"]?\\s*`,b="(^|[^a-zA-Z])",$="[^\\}]*?",T="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",_="\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/",P="(?:"+u+"|\\\\[^\\r\\n\\f0-9a-f])",R="(?:[_a-z]|"+c+"|"+P+")",O="(?:[_a-z0-9-]|"+c+"|"+P+")",j="-?"+R+O+"*",z=y+"(?:\\s*"+m+"|"+j+")?",l="((?:-?"+z+")|(?:inherit|auto))",p="(?:-?"+y+"(?:\\s*"+m+")?)",xe="(?:\\+|\\-|\\*|\\/)",he="(?:\\(|\\)|\\t| )",be="(?:"+he+"|"+p+"|"+xe+"){3,}",Ee="(?:calc\\((?:"+be+")\\))",or="((?:-?"+z+")|(?:inherit|auto)|"+Ee+")",ye="((?:margin|padding|border-width)\\s*:\\s*)",we="((?:-color|border-style)\\s*:\\s*)",G="(#?"+O+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",Cr="(?:"+g+"|"+c+"|"+P+")*?",Tr="(?![a-zA-Z])",dr="(?!("+O+`|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|"[^"]*"|`+d+")*?{)",kr="(?!"+Cr+C+"\\))",nr="(?="+Cr+C+"\\))",ur="(\\s*(?:!important\\s*)?[;}])",q=/`TMP`/g,Pe=/`TMPLTR`/g,Re=/`TMPRTL`/g,Ce=new RegExp(_,"gi"),Te=new RegExp("("+T+dr+"[^;}]+;?)","gi"),ke=new RegExp("("+T+$+"})","gi"),$e=new RegExp("("+h+")ltr","gi"),Ae=new RegExp("("+h+")rtl","gi"),Se=new RegExp(b+"(left)"+Tr+kr+dr,"gi"),Oe=new RegExp(b+"(right)"+Tr+kr+dr,"gi"),Ne=new RegExp(b+"(left)"+nr,"gi"),Me=new RegExp(b+"(right)"+nr,"gi"),Ie=/(:dir\( *)ltr( *\))/g,Le=/(:dir\( *)rtl( *\))/g,ze=new RegExp(b+"(ltr)"+nr,"gi"),Fe=new RegExp(b+"(rtl)"+nr,"gi"),De=new RegExp(b+"([ns]?)e-resize","gi"),_e=new RegExp(b+"([ns]?)w-resize","gi"),Ue=new RegExp(ye+or+"(\\s+)"+or+"(\\s+)"+or+"(\\s+)"+or+ur,"gi"),Be=new RegExp(we+G+"(\\s+)"+G+"(\\s+)"+G+"(\\s+)"+G+ur,"gi"),We=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+z+")","gi"),je=new RegExp("(background-position-x\\s*:\\s*)(-?"+y+"%)","gi"),Ge=new RegExp("(border-radius\\s*:\\s*)"+l+"(?:(?:\\s+"+l+")(?:\\s+"+l+")?(?:\\s+"+l+")?)?(?:(?:(?:\\s*\\/\\s*)"+l+")(?:\\s+"+l+")?(?:\\s+"+l+")?(?:\\s+"+l+")?)?"+ur,"gi"),Ve=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+l,"gi"),He=new RegExp("(text-shadow\\s*:\\s*)"+l+"(\\s*)"+G,"gi"),Ke=new RegExp("(text-shadow\\s*:\\s*)"+G+"(\\s*)"+l,"gi"),Xe=new RegExp("(text-shadow\\s*:\\s*)"+l,"gi"),Ye=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+l+"(\\s*\\))","gi"),Ze=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+l+"((?:\\s*,\\s*"+l+"){0,2}\\s*\\))","gi");function $r(a,N,x){var A,M;return x.slice(-1)==="%"&&(A=x.indexOf("."),A!==-1?(M=x.length-A-2,x=100-parseFloat(x),x=x.toFixed(M)+"%"):x=100-parseFloat(x)+"%"),N+x}function mr(a){switch(a.length){case 4:a=[a[1],a[0],a[3],a[2]];break;case 3:a=[a[1],a[0],a[1],a[2]];break;case 2:a=[a[1],a[0]];break;case 1:a=[a[0]];break}return a.join(" ")}function Qe(a,N){var x,A=[].slice.call(arguments),M=A.slice(2,6).filter(function(xr){return xr}),Nr=A.slice(6,10).filter(function(xr){return xr}),qe=A[10]||"";return Nr.length?x=mr(M)+" / "+mr(Nr):x=mr(M),N+x+qe}function gr(a){return parseFloat(a)===0?a:a[0]==="-"?a.slice(1):"-"+a}function Ar(a,N,x){return N+gr(x)}function Sr(a,N,x,A,M){return N+x+gr(A)+M}function Or(a,N,x,A,M){return N+x+A+gr(M)}return {transform:function(a,N){var x=new hr(Te,n),A=new hr(ke,t),M=new hr(Ce,d);return a=M.tokenize(A.tokenize(x.tokenize(a.replace("`","%60")))),N.transformDirInUrl&&(a=a.replace(Ie,"$1"+e+"$2").replace(Le,"$1"+o+"$2").replace(ze,"$1"+r).replace(Fe,"$1ltr").replace(q,"rtl").replace(Pe,"ltr").replace(Re,"rtl")),N.transformEdgeInUrl&&(a=a.replace(Ne,"$1"+r).replace(Me,"$1left").replace(q,"right")),a=a.replace($e,"$1"+r).replace(Ae,"$1ltr").replace(q,"rtl").replace(Se,"$1"+r).replace(Oe,"$1left").replace(q,"right").replace(De,"$1$2"+r).replace(_e,"$1$2e-resize").replace(q,"w-resize").replace(Ge,Qe).replace(Ve,Ar).replace(He,Or).replace(Ke,Or).replace(Xe,Ar).replace(Ye,Sr).replace(Ze,Sr).replace(Ue,"$1$2$3$8$5$6$7$4$9").replace(Be,"$1$2$3$8$5$6$7$4$9").replace(We,$r).replace(je,$r),a=x.detokenize(A.detokenize(M.detokenize(a))),a}}}br=new nt;typeof Er!="undefined"&&Er.exports?_r.transform=function(r,e,o){var n;return typeof e=="object"?n=e:(n={},typeof e=="boolean"&&(n.transformDirInUrl=e),typeof o=="boolean"&&(n.transformEdgeInUrl=o)),br.transform(r,n)}:typeof window!="undefined"&&(window.cssjanus=br);});var Ir=createContext(void 0);function Lr(){let r=useContext(Ir);if(!r)throw new Error("useApiConfig must be used within an ApiConfigProvider");return r}function Pt({token:r,eventToken:e,lang:o="en-US",baseURL:n="https://buildocs.com",iframeMode:t=false,children:d}){let c=useMemo(()=>({token:r,eventToken:e,lang:o,baseURL:n,iframeMode:t}),[r,e,o,n,t]);return jsx(Ir.Provider,{value:c,children:d})}var zr=async(r,e)=>{try{let o=await fetch(`${r}/api/v1/FormsPublic/theme`,{headers:{Authorization:`Bearer ${e}`}});if(!o.ok)throw new Error("Failed to fetch theme");let n=await o.json();return n.themeConfig?JSON.parse(n.themeConfig):null}catch(o){return null}},Fr=r=>{var o,n,t,d,c,u,y,m,h,g,C,b,$,T,_,P,R;if(!r)return;let e=document.documentElement;(n=(o=r.palette)==null?void 0:o.primary)!=null&&n.main&&e.style.setProperty("--bforms-primary-color",r.palette.primary.main),(d=(t=r.palette)==null?void 0:t.primary)!=null&&d.dark&&e.style.setProperty("--bforms-primary-dark",r.palette.primary.dark),(u=(c=r.palette)==null?void 0:c.primary)!=null&&u.light&&e.style.setProperty("--bforms-primary-light",r.palette.primary.light),(m=(y=r.palette)==null?void 0:y.text)!=null&&m.primary&&e.style.setProperty("--bforms-text-primary",r.palette.text.primary),(g=(h=r.palette)==null?void 0:h.text)!=null&&g.secondary&&e.style.setProperty("--bforms-text-secondary",r.palette.text.secondary),(C=r.customColors)!=null&&C.elBgClass&&e.style.setProperty("--bforms-input-bg",r.customColors.elBgClass),(b=r.customColors)!=null&&b.elBorderClass&&e.style.setProperty("--bforms-input-border",r.customColors.elBorderClass),($=r.customColors)!=null&&$.elTextClass&&e.style.setProperty("--bforms-input-text",r.customColors.elTextClass),(T=r.customColors)!=null&&T.disabledElBgClass&&e.style.setProperty("--bforms-input-disabled-bg",r.customColors.disabledElBgClass),(_=r.customColors)!=null&&_.disabledElBorderClass&&e.style.setProperty("--bforms-input-disabled-border",r.customColors.disabledElBorderClass),(P=r.customColors)!=null&&P.disabledElTextClass&&e.style.setProperty("--bforms-input-disabled-text",r.customColors.disabledElTextClass),(R=r.typography)!=null&&R.fontFamily&&e.style.setProperty("--bforms-font-family",r.typography.fontFamily);},Dr=()=>{let r=document.documentElement;r.style.removeProperty("--bforms-primary-color"),r.style.removeProperty("--bforms-primary-dark"),r.style.removeProperty("--bforms-primary-light"),r.style.removeProperty("--bforms-text-primary"),r.style.removeProperty("--bforms-text-secondary"),r.style.removeProperty("--bforms-input-bg"),r.style.removeProperty("--bforms-input-border"),r.style.removeProperty("--bforms-input-text"),r.style.removeProperty("--bforms-input-disabled-bg"),r.style.removeProperty("--bforms-input-disabled-border"),r.style.removeProperty("--bforms-input-disabled-text"),r.style.removeProperty("--bforms-font-family");};var ae=c(Ur());var f="-ms-",W="-moz-",i="-webkit-",J="comm",U="rule",V="decl";var Br="@media",Wr="@import";var jr="@supports";var sr="@keyframes";var Gr=Math.abs,v=String.fromCharCode,Vr=Object.assign;function Hr(r,e){return E(r,0)^45?(((e<<2^E(r,0))<<2^E(r,1))<<2^E(r,2))<<2^E(r,3):0}function ar(r){return r.trim()}function F(r,e){return (r=e.exec(r))?r[0]:r}function s(r,e,o){return r.replace(e,o)}function H(r,e){return r.indexOf(e)}function E(r,e){return r.charCodeAt(e)|0}function D(r,e,o){return r.slice(e,o)}function k(r){return r.length}function rr(r){return r.length}function K(r,e){return e.push(r),r}function Kr(r,e){return r.map(e).join("")}var ir=1,X=1,Xr=0,I=0,w=0,Y="";function er(r,e,o,n,t,d,c){return {value:r,root:e,parent:o,type:n,props:t,children:d,line:ir,column:X,length:c,return:""}}function Z(r,e){return Vr(er("",null,null,"",null,null,0),r,{length:-r.length},e)}function Yr(){return w}function Zr(){return w=I>0?E(Y,--I):0,X--,w===10&&(X=1,ir--),w}function L(){return w=I<Xr?E(Y,I++):0,X++,w===10&&(X=1,ir++),w}function B(){return E(Y,I)}function tr(){return I}function cr(r,e){return D(Y,r,e)}function yr(r){switch(r){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Qr(r){return ir=X=1,Xr=k(Y=r),I=0,[]}function qr(r){return Y="",r}function pr(r){return ar(cr(I-1,wr(r===91?r+2:r===40?r+1:r)))}function Jr(r){for(;(w=B())&&w<33;)L();return yr(r)>2||yr(w)>3?"":" "}function vr(r,e){for(;--e&&L()&&!(w<48||w>102||w>57&&w<65||w>70&&w<97););return cr(r,tr()+(e<6&&B()==32&&L()==32))}function wr(r){for(;L();)switch(w){case r:return I;case 34:case 39:r!==34&&r!==39&&wr(w);break;case 40:r===41&&wr(r);break;case 92:L();break}return I}function re(r,e){for(;L()&&r+w!==57;)if(r+w===84&&B()===47)break;return "/*"+cr(e,I-1)+"*"+v(r===47?r:L())}function ee(r){for(;!yr(B());)L();return cr(r,I)}function ne(r){return qr(fr("",null,null,null,[""],r=Qr(r),0,[0],r))}function fr(r,e,o,n,t,d,c,u,y){for(var m=0,h=0,g=c,C=0,b=0,$=0,T=1,_=1,P=1,R=0,O="",j=t,z=d,l=n,p=O;_;)switch($=R,R=L()){case 40:if($!=108&&E(p,g-1)==58){H(p+=s(pr(R),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:p+=pr(R);break;case 9:case 10:case 13:case 32:p+=Jr($);break;case 92:p+=vr(tr()-1,7);continue;case 47:switch(B()){case 42:case 47:K(st(re(L(),tr()),e,o),y);break;default:p+="/";}break;case 123*T:u[m++]=k(p)*P;case 125*T:case 59:case 0:switch(R){case 0:case 125:_=0;case 59+h:P==-1&&(p=s(p,/\f/g,"")),b>0&&k(p)-g&&K(b>32?oe(p+";",n,o,g-1):oe(s(p," ","")+";",n,o,g-2),y);break;case 59:p+=";";default:if(K(l=te(p,e,o,m,h,t,u,O,j=[],z=[],g),d),R===123)if(h===0)fr(p,e,l,l,j,d,g,u,z);else switch(C===99&&E(p,3)===110?100:C){case 100:case 108:case 109:case 115:fr(r,l,l,n&&K(te(r,l,l,0,0,t,u,O,t,j=[],g),z),t,z,g,u,n?j:z);break;default:fr(p,l,l,l,[""],z,0,u,z);}}m=h=b=0,T=P=1,O=p="",g=c;break;case 58:g=1+k(p),b=$;default:if(T<1){if(R==123)--T;else if(R==125&&T++==0&&Zr()==125)continue}switch(p+=v(R),R*T){case 38:P=h>0?1:(p+="\f",-1);break;case 44:u[m++]=(k(p)-1)*P,P=1;break;case 64:B()===45&&(p+=pr(L())),C=B(),h=g=k(O=p+=ee(tr())),R++;break;case 45:$===45&&k(p)==2&&(T=0);}}return d}function te(r,e,o,n,t,d,c,u,y,m,h){for(var g=t-1,C=t===0?d:[""],b=rr(C),$=0,T=0,_=0;$<n;++$)for(var P=0,R=D(r,g+1,g=Gr(T=c[$])),O=r;P<b;++P)(O=ar(T>0?C[P]+" "+R:s(R,/&\f/g,C[P])))&&(y[_++]=O);return er(r,e,o,t===0?U:u,y,m,h)}function st(r,e,o){return er(r,e,o,J,v(Yr()),D(r,2,-2),0)}function oe(r,e,o,n){return er(r,e,o,V,D(r,0,n),D(r,n+1,-1),n)}function Pr(r,e,o){switch(Hr(r,e)){case 5103:return i+"print-"+r+r;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return i+r+r;case 4789:return W+r+r;case 5349:case 4246:case 4810:case 6968:case 2756:return i+r+W+r+f+r+r;case 5936:switch(E(r,e+11)){case 114:return i+r+f+s(r,/[svh]\w+-[tblr]{2}/,"tb")+r;case 108:return i+r+f+s(r,/[svh]\w+-[tblr]{2}/,"tb-rl")+r;case 45:return i+r+f+s(r,/[svh]\w+-[tblr]{2}/,"lr")+r}case 6828:case 4268:case 2903:return i+r+f+r+r;case 6165:return i+r+f+"flex-"+r+r;case 5187:return i+r+s(r,/(\w+).+(:[^]+)/,i+"box-$1$2"+f+"flex-$1$2")+r;case 5443:return i+r+f+"flex-item-"+s(r,/flex-|-self/g,"")+(F(r,/flex-|baseline/)?"":f+"grid-row-"+s(r,/flex-|-self/g,""))+r;case 4675:return i+r+f+"flex-line-pack"+s(r,/align-content|flex-|-self/g,"")+r;case 5548:return i+r+f+s(r,"shrink","negative")+r;case 5292:return i+r+f+s(r,"basis","preferred-size")+r;case 6060:return i+"box-"+s(r,"-grow","")+i+r+f+s(r,"grow","positive")+r;case 4554:return i+s(r,/([^-])(transform)/g,"$1"+i+"$2")+r;case 6187:return s(s(s(r,/(zoom-|grab)/,i+"$1"),/(image-set)/,i+"$1"),r,"")+r;case 5495:case 3959:return s(r,/(image-set\([^]*)/,i+"$1$`$1");case 4968:return s(s(r,/(.+:)(flex-)?(.*)/,i+"box-pack:$3"+f+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+i+r+r;case 4200:if(!F(r,/flex-|baseline/))return f+"grid-column-align"+D(r,e)+r;break;case 2592:case 3360:return f+s(r,"template-","")+r;case 4384:case 3616:return o&&o.some(function(n,t){return e=t,F(n.props,/grid-\w+-end/)})?~H(r+(o=o[e].value),"span")?r:f+s(r,"-start","")+r+f+"grid-row-span:"+(~H(o,"span")?F(o,/\d+/):+F(o,/\d+/)-+F(r,/\d+/))+";":f+s(r,"-start","")+r;case 4896:case 4128:return o&&o.some(function(n){return F(n.props,/grid-\w+-start/)})?r:f+s(s(r,"-end","-span"),"span ","")+r;case 4095:case 3583:case 4068:case 2532:return s(r,/(.+)-inline(.+)/,i+"$1$2")+r;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(k(r)-1-e>6)switch(E(r,e+1)){case 109:if(E(r,e+4)!==45)break;case 102:return s(r,/(.+:)(.+)-([^]+)/,"$1"+i+"$2-$3$1"+W+(E(r,e+3)==108?"$3":"$2-$3"))+r;case 115:return ~H(r,"stretch")?Pr(s(r,"stretch","fill-available"),e,o)+r:r}break;case 5152:case 5920:return s(r,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,t,d,c,u,y,m){return f+t+":"+d+m+(c?f+t+"-span:"+(u?y:+y-+d)+m:"")+r});case 4949:if(E(r,e+6)===121)return s(r,":",":"+i)+r;break;case 6444:switch(E(r,E(r,14)===45?18:11)){case 120:return s(r,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+i+(E(r,14)===45?"inline-":"")+"box$3$1"+i+"$2$3$1"+f+"$2box$3")+r;case 100:return s(r,":",":"+f)+r}break;case 5719:case 2647:case 2135:case 3927:case 2391:return s(r,"scroll-","scroll-snap-")+r}return r}function Q(r,e){for(var o="",n=rr(r),t=0;t<n;t++)o+=e(r[t],t,r,e)||"";return o}function se(r,e,o,n){if(r.length>-1&&!r.return)switch(r.type){case V:r.return=Pr(r.value,r.length,o);return;case sr:return Q([Z(r,{value:s(r.value,"@","@"+i)})],n);case U:if(r.length)return Kr(r.props,function(t){switch(F(t,/(::plac\w+|:read-\w+)/)){case ":read-only":case ":read-write":return Q([Z(r,{props:[s(t,/:(read-\w+)/,":"+W+"$1")]})],n);case "::placeholder":return Q([Z(r,{props:[s(t,/:(plac\w+)/,":"+i+"input-$1")]}),Z(r,{props:[s(t,/:(plac\w+)/,":"+W+"$1")]}),Z(r,{props:[s(t,/:(plac\w+)/,f+"input-$1")]})],n)}return ""})}}function ie(r,e,o){switch(r.type){case Wr:case V:case J:return r.return=r.return||r.value;case U:r.value=Array.isArray(r.props)?r.props.join(","):r.props,Array.isArray(r.children)&&r.children.forEach(function(t){t.type===J&&(t.children=t.value);});}var n=Q(Array.prototype.concat(r.children),ie);return k(n)?r.return=r.value+"{"+n+"}":""}function ce(r,e,o,n){if(r.type===sr||r.type===jr||r.type===U&&(!r.parent||r.parent.type===Br||r.parent.type===U)){var t=ae.default.transform(ie(r));r.children=t?ne(t)[0].children:[],r.return="";}}Object.defineProperty(ce,"name",{value:"stylisRTLPlugin"});var pe=ce;var de=createContext(false);function ue(){return useContext(de)}var ut=["ar","he","fa","ur"],mt=le({key:"css"}),gt=le({key:"cssrtl",stylisPlugins:[se,pe]});function oo({children:r,enabled:e=false}){let{baseURL:o,token:n,lang:t}=Lr(),[,d]=useState(false),c=ut.some(m=>(t!=null?t:"").startsWith(m)),u=c?"rtl":"ltr";useEffect(()=>{document.documentElement.dir=u;},[u]);let y=useMemo(()=>createTheme({direction:u,customColors:{}}),[u]);return useEffect(()=>!e||!n?void 0:((async()=>{let h=await zr(o||"https://buildocs.com",n);h&&(Fr(h),d(true));})(),()=>{Dr();}),[o,n,e]),jsx(de.Provider,{value:e,children:jsx(CacheProvider,{value:c?gt:mt,children:jsx(ThemeProvider,{theme:y,children:jsx("div",{className:e?"bforms-themed":"",children:r})})})})}var lo=memo(function(e){let{viewPort:o}=b(),n=ue(),t={};t.position="absolute",t.bgcolor="background.paper",t.border="1px solid #fff",t.boxShadow=24,o.isMobileDevice?(t.width=o.width,t.height=o.height):(t.borderRadius="4px",e.windowMode==="fullWindow"?(t.top="0.3%",t.left="0.3%",t.right="0.3%",t.bottom="0.3%"):e.windowMode==="halfWindow"?(t.top="10%",t.left="10%",t.right="10%",t.bottom="10%"):(t.top="50%",t.left="50%",t.transform="translate(-50%, -50%)"));let[d,c]=me.useState(true),u=(m,h,g,C,b)=>{c(false),e.onCloseModal&&e.onCloseModal(m,g,C,b);},y=e.component;return e.component!==void 0&&(y=me.cloneElement(e.component,{modalCloseFn:(m,h,g,C,b)=>u(m,h,g,C,b)})),jsx(Fragment,{children:jsx(ht,{disableEnforceFocus:true,disableScrollLock:true,open:d,onClose:(m,h)=>{if(h!=="backdropClick")return u(null)},"aria-labelledby":"parent-modal-title","aria-describedby":"parent-modal-description",children:jsx(xt,{sx:{...t},className:n?"bforms-themed":"",children:y})})})});var S=class S{static get hostname(){return window.location.hostname}static getTenantId(){let e=this.hostname.split(".");return e.length>2?e.slice(0,-2).join("."):"root"}static getTenantForDevId(){let e=this.hostname.split(".");return e.length>1?e.slice(0,-1).join("."):"root"}static getValidTenantId(){let e=this.hostname.split(".");return e.length===1&&e[0]==="localhost"?"root":e[e.length-1]==="lc"&&e.length>=3?e.slice(0,-2).join("."):e[e.length-1]==="lc"&&e.length===2?"root":S.getTenantId()}static get AXIOS_API_ADDR(){return process.env.REACT_APP_NODE_ENV==="development"?`https://${window.location.hostname}:5001/api/`:`https://${window.location.hostname}/api/`}static get BASE_URL(){return process.env.REACT_APP_NODE_ENV==="development"?"https://bforms.lc:5001":"https://buildocs.com"}static get SKIP_ACCESS_VALIDATION_DOMAINS(){return ["buildocs.com","buildocs.ee","bforms.lc","buildocs.lc"]}};S.AXIOS_SEND_CREDENTIALS=true,S.SSO_SUBDOMAIN="app",S.ROUTE_LOGIN_PAGE="/login",S.ROUTE_REGISTRATION_PAGE="/registration",S.ROUTE_ACTIVATION_PAGE="/activate",S.SCREEN_WIDTH_TABLET=767,S.APP_VERSION="",S.API_VERSION="v1",S.TOASTER_AUTOCLOSE=5e3,S.MAX_DOWNLOAD_NOCHUNK_FILESIZE=10*1024*1024;var ge=S;
2
- export{Lr as a,Pt as b,zr as c,Fr as d,Dr as e,ue as f,oo as g,lo as h,ge as i};
@@ -1,2 +0,0 @@
1
- import {a as a$2}from'./chunk-POE6K4NQ.js';import {g as g$1,j,i as i$2,d}from'./chunk-ZCUM65IT.js';import {b as b$1,f,e as e$1,g as g$2}from'./chunk-FRAOYRZD.js';import {a as a$1,i as i$1,h as h$1}from'./chunk-OUDAQ5Y2.js';import {y,z,B,T,U,x,A,k as k$1}from'./chunk-TYVVEP34.js';import {b}from'./chunk-LBMVBVXW.js';import {n,e,k,l,p,o,f as f$1,g,h,m as m$1}from'./chunk-LUSAHRNJ.js';import {i,m,P,t,A as A$1,E,N,s}from'./chunk-AR42AC7J.js';import {a as a$3}from'./chunk-SDIZEEZP.js';import {a,c}from'./chunk-5TBO732O.js';import*as Pe from'react';import Pe__default,{memo,useRef,useState,useEffect,createElement,createContext,lazy,useCallback,startTransition,Suspense,useContext,useMemo}from'react';import {withTranslation,useTranslation}from'react-i18next';import {useLocation,useNavigate}from'react-router-dom';import {nanoid}from'@reduxjs/toolkit';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import Qa from'@mui/material/Box';import Xr from'@mui/material/Button';import Yr from'@mui/material/Tooltip';import Vi from'axios';import $i from'@mui/material/CircularProgress';import qi from'@mui/material/LinearProgress';import lr from'@mui/material/IconButton';import Ll from'@mui/material/InputAdornment';import Al from'@mui/icons-material/Visibility';import Vl from'@mui/icons-material/VisibilityOff';import {animated,useSpring}from'@react-spring/web';import {styled,alpha}from'@mui/material/styles';import Ul from'@mui/material/Collapse';import Gl from'@mui/material/Typography';import zl from'@mui/icons-material/FolderRounded';import {RichTreeView}from'@mui/x-tree-view/RichTreeView';import {treeItemClasses}from'@mui/x-tree-view/TreeItem';import {unstable_useTreeItem2}from'@mui/x-tree-view/useTreeItem2';import {TreeItem2Root,TreeItem2Content,TreeItem2IconContainer,TreeItem2Checkbox,TreeItem2Label}from'@mui/x-tree-view/TreeItem2';import {TreeItem2Icon}from'@mui/x-tree-view/TreeItem2Icon';import {TreeItem2DragAndDropOverlay}from'@mui/x-tree-view/TreeItem2DragAndDropOverlay';import yt from'@mui/material/ListItemIcon';import wt from'@mui/material/ListItemText';import Zl from'@mui/material/Menu';import xt from'@mui/material/MenuItem';import Fd from'i18next';import vd from'@mui/material/Backdrop';var Vn=a((Ue,An)=>{Object.defineProperty(Ue,"__esModule",{value:true});function Ae(t){return typeof t=="object"&&!("toString"in t)?Object.prototype.toString.call(t).slice(8,-1):t}var Cr=typeof process=="object"&&true;function _e(t,e){if(!t)throw Cr?new Error("Invariant failed"):new Error(e())}Ue.invariant=_e;var Bt=Object.prototype.hasOwnProperty,Ir=Array.prototype.splice,Fr=Object.prototype.toString;function Ze(t){return Fr.call(t).slice(8,-1)}var bt=Object.assign||(function(t,e){return Nt(e).forEach(function(o){Bt.call(e,o)&&(t[o]=e[o]);}),t}),Nt=typeof Object.getOwnPropertySymbols=="function"?function(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.keys(t)};function je(t){return Array.isArray(t)?bt(t.constructor(t.length),t):Ze(t)==="Map"?new Map(t):Ze(t)==="Set"?new Set(t):t&&typeof t=="object"?bt(Object.create(Object.getPrototypeOf(t)),t):t}var _n=(function(){function t(){this.commands=bt({},Tr),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(e,o){return e===o},this.update.newContext=function(){return new t().update};}return Object.defineProperty(t.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(e){this.update.isEquals=e;},enumerable:true,configurable:true}),t.prototype.extend=function(e,o){this.commands[e]=o;},t.prototype.update=function(e,o){var i=this,a=typeof o=="function"?{$apply:o}:o;Array.isArray(e)&&Array.isArray(a)||_e(!Array.isArray(a),function(){return "update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."}),_e(typeof a=="object"&&a!==null,function(){return "update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the "+("following commands: "+Object.keys(i.commands).join(", ")+".")});var d=e;return Nt(a).forEach(function(r){if(Bt.call(i.commands,r)){var m=e===d;d=i.commands[r](a[r],d,a,e),m&&i.isEquals(d,e)&&(d=e);}else {var s=Ze(e)==="Map"?i.update(e.get(r),a[r]):i.update(e[r],a[r]),c=Ze(d)==="Map"?d.get(r):d[r];(!i.isEquals(s,c)||typeof s=="undefined"&&!Bt.call(e,r))&&(d===e&&(d=je(e)),Ze(d)==="Map"?d.set(r,s):d[r]=s);}}),d},t})();Ue.Context=_n;var Tr={$push:function(t,e,o){return Bn(e,o,"$push"),t.length?e.concat(t):e},$unshift:function(t,e,o){return Bn(e,o,"$unshift"),t.length?t.concat(e):e},$splice:function(t,e,o,i){return Dr(e,o),t.forEach(function(a){Ln(a),e===i&&a.length&&(e=je(i)),Ir.apply(e,a);}),e},$set:function(t,e,o){return Rr(o),t},$toggle:function(t,e){dt(t,"$toggle");var o=t.length?je(e):e;return t.forEach(function(i){o[i]=!e[i];}),o},$unset:function(t,e,o,i){return dt(t,"$unset"),t.forEach(function(a){Object.hasOwnProperty.call(e,a)&&(e===i&&(e=je(i)),delete e[a]);}),e},$add:function(t,e,o,i){return Nn(e,"$add"),dt(t,"$add"),Ze(e)==="Map"?t.forEach(function(a){var d=a[0],r=a[1];e===i&&e.get(d)!==r&&(e=je(i)),e.set(d,r);}):t.forEach(function(a){e===i&&!e.has(a)&&(e=je(i)),e.add(a);}),e},$remove:function(t,e,o,i){return Nn(e,"$remove"),dt(t,"$remove"),t.forEach(function(a){e===i&&e.has(a)&&(e=je(i)),e.delete(a);}),e},$merge:function(t,e,o,i){return Sr(e,t),Nt(t).forEach(function(a){t[a]!==e[a]&&(e===i&&(e=je(i)),e[a]=t[a]);}),e},$apply:function(t,e){return Pr(t),t(e)}},_t=new _n;Ue.isEquals=_t.update.isEquals;Ue.extend=_t.extend;Ue.default=_t.update;Ue.default.default=An.exports=bt(Ue.default,Ue);function Bn(t,e,o){_e(Array.isArray(t),function(){return "update(): expected target of "+Ae(o)+" to be an array; got "+Ae(t)+"."}),dt(e[o],o);}function dt(t,e){_e(Array.isArray(t),function(){return "update(): expected spec of "+Ae(e)+" to be an array; got "+Ae(t)+". Did you forget to wrap your parameter in an array?"});}function Dr(t,e){_e(Array.isArray(t),function(){return "Expected $splice target to be an array; got "+Ae(t)}),Ln(e.$splice);}function Ln(t){_e(Array.isArray(t),function(){return "update(): expected spec of $splice to be an array of arrays; got "+Ae(t)+". Did you forget to wrap your parameters in an array?"});}function Pr(t){_e(typeof t=="function",function(){return "update(): expected spec of $apply to be a function; got "+Ae(t)+"."});}function Rr(t){_e(Object.keys(t).length===1,function(){return "Cannot have more than one key in an object with $set"});}function Sr(t,e){_e(e&&typeof e=="object",function(){return "update(): $merge expects a spec of type 'object'; got "+Ae(e)}),_e(t&&typeof t=="object",function(){return "update(): $merge expects a target of type 'object'; got "+Ae(t)});}function Nn(t,e){var o=Ze(t);_e(o==="Map"||o==="Set",function(){return "update(): "+Ae(e)+" expects a target of type Set or Map; got "+Ae(o)});}});var mr=c(Vn());var Wn=withTranslation()(memo(function(e){let{id:o,tabId:i,panelId:a,context:d,methodProvider:r,widgetsState:m}=e,s=r.findRowItem(i,a,o);return s?Pe__default.createElement("div",{className:"row-container"},(s.item._children||[]).map(({rowId:c,id:b,component:T,properties:p})=>Pe__default.createElement(Ve.getFormComponent(T,p),{key:"key_"+b,tabId:i,panelId:a,rowId:c,segmentId:b,properties:p,widgetsState:m,methodProvider:r,context:{...d},segmentsCount:s.item._children.length},null))):null}));Wn.displayName="_Rowcontainer";var Hn=Wn;var Gn=withTranslation()(memo(function(e){let{tabId:o,panelId:i,rowId:a,segmentId:d,segmentsCount:r,properties:m,methodProvider:s,context:c,widgetsState:b}=e,T=s.findSegmentItem(o,i,a,d),p={...m.style};return Pe__default.createElement("div",{className:"rowSegment",style:p},(T.item._children||[]).map(({id:f,component:u,properties:g})=>{let v=g.groupname?g.groupname:g.name;return Pe__default.createElement(Ve.getFormComponent(u,g),{key:"key_"+f,context:{params:c.params,displayButtonLoader:c.displayButtonLoader,doValidateForm:c.doValidateForm,redrawComponent:c.redrawComponent,formDimension:c.formDimension,segmentDimensions:{minWidth:parseInt(p.minWidth)},tabIndex:c.tabIndex,formData:u.displayName==="_Fileuploader"||u.displayName==="_Label"||u.displayName==="_View"||u.displayName==="_Textinput"&&g.inputtype==="currency"?c.formData:[]},id:f,methodProvider:s,panelId:i,properties:{...g,visible:b!==void 0&&b.visibility[v]!==void 0?b.visibility[v]:g.visible,readonly:b!==void 0&&b.readonly[v]!==void 0?b.readonly[v]:g.readonly},rowId:a,segmentId:d,segmentsCount:r,tabId:o,value:c.formData!==void 0?c.formData[v]:void 0,fieldAllowedValues:c!=null&&c.fieldAllowedValues?c.fieldAllowedValues[v]:void 0,validationMessage:c!=null&&c.formValidationData&&c.formValidationData[v]!==void 0?c.formValidationData[v]:null},null)}))}));Gn.displayName="_Rowsegment";var zn=Gn;function Hr(t,e){return {id:t,value:e}}var qn=withTranslation()(memo(function(e){var A;let o=useRef(null),{datalength:i,id:a,forcereadonly:d,ignorereadonly:r,label:m,name:s,onchangehandler:c,placeholder:b$1,readonly:T$1,regex:p,searchbar:f,size:u,style:g,tabIndex:v,uppercasemode:C,variant:S,visible:y}=e.properties,E=useLocation(),{viewPort:H}=b(),{tabId:_}=e,[F,w]=useState(String((A=e.value)!=null?A:"")),[h,O]=Pe__default.useState([]),ee=!!(F.trim()===""&&e.validationMessage!=null&&e.context.doValidateForm);useEffect(()=>{var P;w(String((P=e.value)!=null?P:""));},[e.value]),useEffect(()=>{let P=[];if(e.fieldAllowedValues){for(let U in e.fieldAllowedValues)P.push(Hr(U,e.fieldAllowedValues[U]));O(P);}},[e.fieldAllowedValues]);let ne=P=>{var U$1;e.methodProvider.eventDispatcher({widgetName:s,widgetValue:P,widgetEvent:c?U.onChange:null,widgetContext:JSON.stringify({referer:E.pathname,parentWidgetId:_,hasParentForm:T.hasParentForm(),originator:(U$1=e.context.params)==null?void 0:U$1.originator})});},D=P=>{w(P);};return jsx(n,{autoFocus:false,data:h,disabled:!!(T$1&&!r),error:ee,helperText:ee?e.validationMessage:"",id:a,inputProps:{id:a,tabIndex:v,style:{...g},autoComplete:nanoid(5)},InputProps:{},inputRef:o,label:m,maxCharCount:i,name:s,onBlur:P=>{ne(P.target.value);},onInput:P=>{D(P.target.value),H.isMobileDevice&&ne(P.currentTarget.value);},onChange:P=>{F.trim()===""&&ne(P.target.value);},placeholder:b$1,readOnly:!!(T$1&&!r),regEx:p,searchBar:f,size:u!=null?u:"small",type:"text",inputtype:e.properties.inputType,toUpperCase:C,value:F,variant:S,visible:y})}));qn.displayName="_Input";var Jn=qn;var Qn=withTranslation()(memo(function(e){var P;let o=useRef(null),{datalength:i$1,id:a,forcereadonly:d,ignorereadonly:r,label:m,name:s,onchangehandler:c,placeholder:b$1,readonly:T$1,regex:p,size:f,style:u,tabIndex:g,uppercasemode:v,variant:C,visible:S}=e.properties,y=useLocation(),{viewPort:E}=b(),{tabId:H}=e,[_,F]=useState(String((P=e.value)!=null?P:"")),w=!!(_.trim()===""&&e.validationMessage!=null&&e.context.doValidateForm),[h,O]=useState(false),{t:ee}=useTranslation(),ne=()=>{navigator.clipboard.writeText(_).then(()=>{O(true),setTimeout(()=>O(false),2e4);});};useEffect(()=>{var U;F(String((U=e.value)!=null?U:""));},[e.value]);let D=U$1=>{var K;e.methodProvider.eventDispatcher({widgetName:s,widgetValue:U$1,widgetEvent:c?U.onChange:null,widgetContext:JSON.stringify({referer:y.pathname,parentWidgetId:H,hasParentForm:T.hasParentForm(),originator:(K=e.context.params)==null?void 0:K.originator})});},A=U=>{F(U);};return jsxs(Qa,{display:"flex",alignItems:"flex-start",gap:0,children:[jsx(n,{autoFocus:false,disabled:!!(T$1&&!r),error:w,helperText:w?e.validationMessage:"",id:a,inputProps:{id:a,tabIndex:g,style:{...u},autoComplete:nanoid(5)},InputProps:{},inputRef:o,label:m,maxCharCount:i$1,name:s,onBlur:U=>{D(U.target.value);},onInput:U=>{A(U.target.value),E.isMobileDevice&&D(U.currentTarget.value);},onChange:U=>{_.trim()===""&&D(U.target.value);},placeholder:b$1,readOnly:!!(T$1&&!r),regEx:p,size:f,type:"text",inputtype:e.properties.inputType,toUpperCase:v,value:_,variant:C,visible:S}),S&&jsx(Yr,{title:ee(h?"copied!":"copy to clipboard"),children:jsx(Xr,{variant:"contained",style:{backgroundColor:"#C0C0C0",borderRadius:"0px 4px 4px 0px",boxShadow:"none",marginLeft:"-3px",border:"2px solid #C0C0C0",lineHeight:"24px",fontSize:"11px"},onClick:ne,startIcon:jsx(i,{}),children:ee("copy")})})]})}));Qn.displayName="_InputWCopy";var Kn=Qn;var Yn=withTranslation()(memo(function(e){useRef(null);let {tabId:i,id:a,context:d,widgetsState:r}=e,m=e.methodProvider.findWidgetItem(a),s=e.methodProvider.getActiveTabIndex(i,a),c=(p,f,u,g)=>{f||(p.target.style.background=g,p.target.style.color=u);},b=(p,f,u,g)=>{f||(p.target.style.background=g,p.target.style.color=u);},T=({children:p,...f})=>jsx(A,{onPointerUp:u=>u.stopPropagation(),onMouseOver:u=>c(u,f.selected,f.item_active_color,f.item_active_background_color),onMouseOut:u=>b(u,f.selected,f.item_default_color,f.item_default_background_color),style:{borderRadius:"5px 5px 0 0",marginRight:"1px",color:f.selected?f.item_active_color:f.item_default_color,background:f.selected?f.item_active_background_color:f.item_default_background_color,fontSize:f.item_fontsize,fontWeight:f.item_fontweight},selected:f.selected,children:p},f.id);return T.tabsRole="Tab",e.properties.visible?Pe__default.createElement("div",{className:"form-tab-widget"},jsxs(y,{selectedIndex:s,onSelect:p=>e.methodProvider.setActiveTabIndex(i,a,p),children:[jsx(z,{children:(m.item._children||[]).map(({properties:p},f)=>!p.item_visible||r&&r.visibility&&r.visibility[p.item_name]===false?null:createElement(T,{...m.item.properties.tabsetup,...p,key:"TabCaptionComponent_"+a+"_"+f},p.item_title))}),(m.item._children||[]).map(({_children:p},f)=>jsx(B,{children:(p||[]).map(({tabId:u,panelId:g,id:v,type:C,component:S,properties:y},E)=>Pe__default.createElement(Ve.getFormComponent(S,y),{key:"tabSubPanel_"+E,id:v,tabId:u,panelId:g,properties:{...y,visible:r!==void 0&&r.visibility[y.name]!==void 0?r.visibility[y.name]:y.visible,readonly:r!==void 0&&r.readonly[y.name]!==void 0?r.readonly[y.name]:y.readonly},className:C,widgetsState:r,methodProvider:e.methodProvider,context:{...d},segmentsCount:m.item._children.length,fieldAllowedValues:d!=null&&d.fieldAllowedValues?d.fieldAllowedValues[y.name]:void 0},null))},"TabPanel_"+a+"_"+f))]})):null}));Yn.displayName="_TabBox";var Zn=Yn;function li(t,e){if(!e||Array.isArray(e)&&e.length===0)return t;let o=e;return t.replace(/<b>@(\w+)<\/b>|@(\w+)/g,(i,a,d)=>{let r=(a||d).toLowerCase(),m=o[r];return typeof m=="string"?a?`<b>${m}</b>`:m:i})}var ta=withTranslation()(memo(function(e){let{title:o,style:i,verticalalign:a,visible:d}=e.properties,r={paddingTop:"0px"};if(a==="bottom"&&(r.paddingTop="10px"),!d)return null;let m=li(o,e.context.formData);return jsx("div",{style:{...i,...r},children:jsx("div",{style:{...i},dangerouslySetInnerHTML:{__html:m}})})}));ta.displayName="_Label";var oa=ta;var aa=withTranslation()(memo(function(e$1){let o=useRef(null),{defaultvalue:i,id:a,ignorereadonly:d,label:r,labelplacement:m,name:s,onchangehandler:c,readonly:b,style:T$1,tabIndex:p,visible:f}=e$1.properties,u=s,g=e$1.value||"",v=useLocation(),{tabId:C}=e$1,S=!!(!g&&e$1.validationMessage!=null&&e$1.context.doValidateForm);return useEffect(()=>{!e$1.value&&i&&e$1.methodProvider.eventDispatcher({widgetName:u,widgetValue:e$1.properties.value,widgetEvent:null,widgetContext:JSON.stringify({referer:v.pathname,parentWidgetId:C,hasParentForm:T.hasParentForm()})});},[]),jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:T$1.textAlign,height:"100%"},children:jsx(e,{checkedIcon:void 0,defaultChecked:!!(e$1.value===void 0&&i),disabled:!!(b&&!d),error:S,helperText:S?e$1.validationMessage:"",icon:void 0,inputProps:{id:a,tabIndex:p},inputRef:o,labelText:r,labelPlacement:m,name:u,onChange:y=>{e$1.methodProvider.eventDispatcher({widgetName:u,widgetValue:y.target.checked?e$1.properties.value:"",widgetEvent:c?U.onChange:null,widgetContext:JSON.stringify({referer:v.pathname,parentWidgetId:C,hasParentForm:T.hasParentForm()})});},selectedValue:g,value:e$1.properties.value,visible:f})})}));aa.displayName="_Checkbox";var ra=aa;var la=withTranslation()(memo(function(e){let o=useRef(null),{defaultvalue:i,groupname:a,id:d,ignorereadonly:r,label:m,labelplacement:s,name:c,onchangehandler:b,readonly:T$1,style:p,tabIndex:f,visible:u}=e.properties,g=useLocation(),{tabId:v}=e,C=a||c;let y=e.value||"",E=!!(e.validationMessage!=null&&e.context.doValidateForm),H=_=>{var F;e.methodProvider.eventDispatcher({widgetName:C,widgetValue:_,widgetEvent:b?U.onChange:null,widgetContext:JSON.stringify({referer:g.pathname,parentWidgetId:v,hasParentForm:T.hasParentForm(),originator:(F=e.context.params)==null?void 0:F.originator})});};return useEffect(()=>{!y&&i&&H(e.properties.value);},[]),jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:p.textAlign,height:"100%"},children:jsx(k,{defaultValue:i?e.properties.value:"",disabled:!!(T$1&&!r),inputProps:{id:d,tabIndex:f,style:{...p}},error:E,helperText:E?e.validationMessage:"",inputRef:o,labelText:m,labelPlacement:s,name:C,onChange:_=>{y!==_.target.value.trim()&&H(_.target.value);},selectedValue:y,value:e.properties.value,visible:u})})}));la.displayName="_Radio";var da=la;var sa=withTranslation()(memo(function(e){var ne;let o=useRef(null),{runFormEvent:i,viewPort:a}=b(),{id:d,autocompleteTextArea:r,ignorereadonly:m,label:s,name:c,onchangehandler:b$1,placeholder:T$1,required:p,requiredmessage:f,readonly:u,size:g,style:v,tabIndex:C,variant:S,visible:y}=e.properties,E=useLocation(),{tabId:H}=e,[_,F]=useState(String((ne=e.value)!=null?ne:""));useEffect(()=>{var D;F(String((D=e.value)!=null?D:""));},[e.value]);let w=!!(_.trim()===""&&e.validationMessage!=null&&e.context.doValidateForm),h=D=>{var A;e.methodProvider.eventDispatcher({widgetName:c,widgetValue:D,widgetEvent:b$1?U.onChange:null,widgetContext:JSON.stringify({referer:E.pathname,parentWidgetId:H,hasParentForm:T.hasParentForm(),originator:(A=e.context.params)==null?void 0:A.originator})});},O=async D=>{var A,P,U$1;try{let K=await i({pluginCode:e.context.params.pluginCode,formCode:e.context.params.formCode,guid:e.context.params.guid,projectGuid:e.context.params.pGuid,pGuid:e.context.params.pGuid,formData:(A=e.context.formData)!=null?A:{},widgetContext:JSON.stringify({}),widgetEvent:U.onGetCustomResponse,widgetName:c,widgetValue:JSON.stringify({methodName:"getAutoCompleteData",value:D})});if(((P=K.meta)==null?void 0:P.requestStatus)==="fulfilled"){let N=K.payload,k=(U$1=N==null?void 0:N.FECommand)==null?void 0:U$1.CustomResponse;if(Array.isArray(k))return k.filter(J=>typeof J=="string").map(J=>({label:J}))}}catch(K){}return []},ee=D=>{F(D);};return jsx(n,{autocompleteTextArea:r,autoFocus:false,disabled:!!(u&&!m),id:d,inputProps:{id:d,tabIndex:C,readOnly:!!(u&&!m),style:{...v}},error:w,helperText:w?e.validationMessage:"",InputProps:{},inputRef:o,label:s,multiline:true,name:c,onAutoCompleteChange:r?D=>O(D):void 0,onBlur:D=>{h(D.target.value);},onInput:D=>{ee(D.target.value),a.isMobileDevice&&h(D.currentTarget.value);},onChange:D=>{_.trim()===""&&h(D.target.value);},placeholder:T$1,readOnly:!!(u&&!m),size:g,type:"text",value:_,variant:S,visible:y})}));sa.displayName="_Textarea";var ma=sa;function ca(t,e){return {id:t,value:e}}var Ot="\xA4",ua=withTranslation()(memo(function(e){var P,U$1;let o=useRef(null),[i,a]=Pe__default.useState(null),[d,r]=Pe__default.useState([]),m=typeof e.value=="string"&&e.value!=null&&e.value.length>0?e.value.split(Ot):[],[s,c]=Pe__default.useState(m),{id:b,ignorereadonly:T$1,label:p,multiple:f,name:u,onchangehandler:g,placeholder:v,readonly:C,rendertype:S,searchbar:y,size:E,tabIndex:H,variant:_,visible:F,dropvalues:w}=e.properties,h=useLocation(),{tabId:O}=e,{t:ee}=useTranslation();useEffect(()=>{let K=typeof e.value=="string"&&e.value!=null&&e.value.length>0?e.value.split(Ot):[];c(K);},[e.value]),useEffect(()=>{let K=S==="none"?[{id:"",value:""}]:[];if(e.fieldAllowedValues&&Object.keys(e.fieldAllowedValues).length>0){for(let N in e.fieldAllowedValues)K.push(ca(N,e.fieldAllowedValues[N]));r(K);}else if(w&&Array.isArray(w)&&w.length>0){for(let N of w)typeof N=="object"&&N!==null&&K.push(ca(N.id||"",N.value||""));r(K);}},[e.fieldAllowedValues,w]),useEffect(()=>{var K;if(i===false){let N=typeof e.value!="string"?e.value:[];(JSON.stringify(N)!==JSON.stringify(s)||s.length===0)&&e.methodProvider.eventDispatcher({widgetName:u,widgetValue:s.length>0?s.join(Ot):[],widgetEvent:g?U.onChange:null,widgetContext:JSON.stringify({referer:h.pathname,parentWidgetId:O,hasParentForm:T.hasParentForm(),originator:(K=e.context.params)==null?void 0:K.originator,folderData:e.context.params.folderData})});}},[i]);let ne=K=>{let{target:{value:N}}=K,k;f?k=typeof N=="string"?N.split(","):N:k=typeof N=="string"?[N]:N,c(k);},D=e.context.formDimension.width/e.segmentsCount;D=D<e.context.segmentDimensions.minWidth?e.context.segmentDimensions.minWidth:D-60;let A=!!(s.length===0&&e.validationMessage!=null&&e.context.doValidateForm);return jsx(l,{darkMode:false,data:d,error:A,helperText:A?e.validationMessage:"",inputProps:{tabIndex:H,style:{maxWidth:`${D}px`}},inputRef:o,onOpen:()=>{a(true);},onClose:()=>{a(false);},onChange:ne,id:b,label:p,multiple:f,placeholder:v,readOnly:C&&!T$1,renderType:S,noOptionsText:(U$1=(P=e.properties)==null?void 0:P.noOptionsLabel)!=null?U$1:ee("No options"),searchBar:y,selectDisplayProps:{style:{maxWidth:"100%",whiteSpace:S==="chip"?"normal":"nowrap"}},selectedValue:s,size:E,variant:_,width:"auto",visible:F})}));ua.displayName="_SelectBox";var fa=ua;var pa=withTranslation()(memo(function(e){var m;let{style:o,visible:i}=(m=e.properties)!=null?m:{},[a,d]=useState(false);if(useEffect(()=>{d(true);},[]),!a)return null;let r="form-widget form-placeholder-widget";return i||(r+=" visibilityOff"),jsx("div",{className:r,style:{...o,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",textAlign:"center"}})}));pa.displayName="_Placeholder";var ga=pa;var ha=createContext({});function ba(){return useContext(ha)}var va=ha;var Ji=lazy(()=>import('./fileviewer-TOFTOS7U.js'));function ji(){let[,t]=useState(0);return ()=>t(e=>e+1)}var Ca=withTranslation()(memo(function(e){var Ce,ge;ji();let [i,a]=useState([]),[d,r]=useState(e.context.params),[m,s]=useState(false),[c,b$2]=useState(null),[T$1,p$1]=useState(false),[f$1,u]=useState(null),[g,v]=useState(0),{t:C}=useTranslation(),{iframeMode:S}=a$1(),y=ba(),E=Y=>{var z;return (z=y[Y])!=null?z:C(Y)},{UserDialog:H}=b$1(),_=f(),{style:F,readonly:w,visible:h}=e.properties,[O,ee]=useState({showDialog:false,dialogTitle:"",dialogContent:"",buttonAgree:"",buttonDisagree:"",callBackFunc:()=>{}}),{appSettings:ne,viewPort:D,runFormDeleteFileEvent:A,runFormDownloadFileEvent:P,runFormGetLinkedFileEvent:U$1,runFormGetLinkedFileMetaEvent:K,runFormUploadFiles:N}=b();useEffect(()=>{r(e.context.params);},[e.context.params]),useEffect(()=>{let Y=e.value?JSON.parse(e.value):[];return Y&&(a(k(Y,100)),s(true)),()=>{i&&(s(false),i.forEach(z=>{z.preview&&URL.revokeObjectURL(z.preview);}));}},[]);let k=(Y,z)=>{let M=[];return Y.forEach((te,W)=>{let n=new File([],te,{type:"image/jpeg"});Object.assign(n,{preview:null,uploadProgress:z}),M.push(n);}),M},J=useCallback(async Y=>{var G;let M=(await K({...d,projectGuid:e.context.params.pGuid,fieldName:e.properties.name,fileId:Y,context:{action:"Preview"}})).payload,{linkedFileSize:te,linkedFileName:W,mimeType:n}=M;if(!te)throw new Error("File data or metadata is missing");let oe=(G=ne==null?void 0:ne.MAX_DOWNLOAD_NOCHUNK_FILESIZE)!=null?G:i$1.MAX_DOWNLOAD_NOCHUNK_FILESIZE;return te>oe?{type:"formbuilder/getlinkedfile",payload:{linkedFile:null,linkedFileSize:te,linkedFileName:W},meta:{requestStatus:"fulfilled"}}:await U$1({...d,projectGuid:e.context.params.pGuid,fieldName:e.properties.name,fileId:Y,context:{action:"Load"}})},[d,e.context.params.pGuid,e.properties.name]),ie=Y=>{O.callBackFunc(Y);},pe=async(Y,z)=>{Y&&await A({...e.context.params,projectGuid:e.context.params.pGuid,fieldName:e.properties.name,fileId:z}).then(M=>{if(M.meta.requestStatus==="fulfilled"){let te={...M.payload};te.linkedFileDeleteSuccess&&(_({toastID:nanoid(11),msg:E("The file has been successfully deleted"),clearQueue:false,hideProgressBar:false}),a(W=>W.filter(n=>n.name!==z)),e.methodProvider.eventDispatcher({widgetName:e.properties.name,widgetValue:JSON.stringify(te.linkedFiles),widgetEvent:null,widgetContext:null}));}}),ee({...O,showDialog:false,callBackFunc:M=>{}});},xe=async Y=>{if(Y)try{let z=await P({...e.context.params,projectGuid:e.context.params.pGuid,fieldName:e.properties.name,fileId:Y}),M=new Blob([z]),te=window.URL.createObjectURL(M),W=document.createElement("a");W.href=te,W.setAttribute("download",Y.split("/").pop()||"downloadedFile"),document.body.appendChild(W),W.click(),document.body.removeChild(W),window.URL.revokeObjectURL(te);}catch(z){}},de=useCallback(async(Y,z)=>(z&&ee({showDialog:true,dialogTitle:E("Confirmation"),dialogContent:E("Are you sure you want to delete file?"),buttonAgree:E("Continue"),buttonDisagree:E("Close"),callBackFunc:M=>pe(M,z)}),null),[e.context.params,C,y]),V=useCallback(async(Y,z)=>(z&&xe(z),null),[e.context.params]),ce=useCallback((Y,z)=>{z&&startTransition(()=>{b$2(z);});},[]),X=()=>{b$2(null);},ue=useCallback(async(Y,z)=>{var M,te;if(Y){let W=new FormData;for(let G in e.context.params)e.context.params.hasOwnProperty(G)&&W.append(G,e.context.params[G]);W.append("fieldName",e.properties.name),Y.forEach(G=>{W.append("files",G);}),W.append("widgetContext",JSON.stringify({hasParentForm:T.hasParentForm(),originator:(M=e.context.params)==null?void 0:M.originator,folderData:(te=e.context.params)==null?void 0:te.folderData})),W.append("widgetEvent",U.onFileUploadEvent),W.append("widgetName",e.properties.name),W.append("formData",JSON.stringify({...e.context.formData}));let n=Vi.CancelToken.source(),oe=Y.map(G=>Object.assign(G,{preview:URL.createObjectURL(G),uploadProgress:0}));a(i.concat(oe)),u(0),await N({content:W,cancelTokenSource:n,onUploadProgress:G=>{let ke=G.total?Math.round(G.loaded*100/G.total):0;u(ke);}}).then(G=>{var ze,$e,Ke;let ke=[];if(G.meta.requestStatus==="fulfilled"){let ve={...G.payload};if((ze=ve.FECommand)!=null&&ze.FormValidationData&&Object.keys(ve.FECommand.FormValidationData).length>0){oe.forEach(Ie=>{Ie.preview&&URL.revokeObjectURL(Ie.preview);}),u(null),v(Ie=>Ie+1);let rt=i.filter(Ie=>Ie.uploadProgress===100);a(rt),e.methodProvider.eventDispatcher({widgetName:e.properties.name,widgetValue:JSON.stringify(i),widgetEvent:null,widgetContext:null,feCommand:ve.FECommand});}else if(ve.linkedFiles&&e.properties.name){ke=k(ve.linkedFiles,100);let rt=ke.map(Ie=>{let it=Ie;return it.uploadProgress=100,it.preview=null,it});oe.forEach(Ie=>{Ie.preview&&URL.revokeObjectURL(Ie.preview);}),u(null),v(Ie=>Ie+1),a(rt),r({...e.context.params,guid:(Ke=($e=ve.FECommand)==null?void 0:$e.ReplaceContextRecordGuid)==null?void 0:Ke.guid}),ve.FECommand={...ve.FECommand,UpdateFieldAllowedValues:ve.fieldAllowedValues,UpdateFormData:ve.data},e.methodProvider.execCommands(ve.FECommand);}}});}},[i,e.context.params,e.methodProvider,e.properties.name,e.value]);return !m||!h?null:jsxs("div",{style:{...F,lineHeight:"1.1em"},children:[jsx(H,{...O,handleDialogClose:ie}),jsxs("div",{style:{position:"relative",zIndex:1,isolation:"isolate"},children:[S&&jsx("div",{style:{position:"absolute",inset:0,zIndex:10,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255,255,255,0.85)",borderRadius:4,padding:"8px 16px",textAlign:"center",fontSize:"0.875rem",color:"#555"},children:C("File upload is available only when using the SDK")}),jsx(p,{defaultText:(ge=(Ce=e.properties)==null?void 0:Ce.dragDropLabel)!=null?ge:E("Drag and Drop..."),tryGetLinkedFile:J,onDeleteButtonPress:de,onDownloadButtonPress:V,onDownloadText:E("Download"),onDeleteText:E("Delete"),filesData:i,onDragText:"On drop text",onFilesDrop:ue,onPreviewButtonPress:ce,isMobileDevice:D.isMobileDevice,isReadonly:w},g),f$1!==null&&jsx(qi,{variant:"determinate",value:f$1,style:{marginTop:6,borderRadius:3,height:8}})]}),c!=null&&jsx(Suspense,{fallback:jsx($i,{}),children:jsx(Ji,{fileId:c,fileBase64:null,fieldName:e.properties.name,params:{...e.context.params,modalCloseFn:X}},nanoid(11))})]})}));Ca.displayName="_Fileuploader";var Ia=Ca;var Fa=(t,e)=>"#"+t.replace(/^#/,"").replace(/../g,o=>("0"+Math.min(255,Math.max(0,parseInt(o,16)+e)).toString(16)).substring(-2)),Da=withTranslation()(memo(function(e){var C,S;let{buttontype:o$1,colorSchema:i,fullWidth:a,name:d,style:r,tabIndex:m,title:s,variant:c,visible:b}=e.properties,T$1=useLocation(),{tabId:p}=e,f=(S=(C=e.context)==null?void 0:C.displayButtonLoader)!=null?S:false;if(!b)return null;let u=r.backgroundColor,g=u?Fa(u,-50):"";i&&(u=i+".main",g=i+".hover");let v={};return c==="outlined"?(Object.assign(v,{"&.MuiButtonBase-root":{fontSize:r.fontSize,fontWeight:r.fontWeight,border:"1px solid"+u,cursor:"pointer"}}),Object.assign(v,{"&.MuiButtonBase-root:hover":{border:g?"1px solid"+Fa(g,-50):""}})):(Object.assign(v,{"&.MuiButtonBase-root":{fontSize:r.fontSize,fontWeight:r.fontWeight,backgroundColor:u,cursor:"pointer"}}),Object.assign(v,{"&.MuiButtonBase-root:hover":{backgroundColor:g}})),jsx("div",{children:jsx(o,{variant:c,label:s,loading:f,onPointerUp:()=>{var y,E;e.methodProvider.eventDispatcher({widgetName:d,widgetValue:null,widgetEvent:U.getFormButtonEvent(o$1),widgetContext:JSON.stringify({referer:T$1.pathname,parentWidgetId:p,hasParentForm:T.hasParentForm(),originator:(y=e.context.params)==null?void 0:y.originator,parent:{widgetName:d,params:{pGuid:e.context.params.pGuid,pluginCode:e.context.params.pluginCode,formCode:e.context.params.formCode,guid:e.context.params.guid}},folderData:(E=e.context.params)==null?void 0:E.folderData})});},fullWidth:a,sx:v,tabIndex:m})})}));Da.displayName="_Button";var Pa=Da;var Ra=withTranslation()(memo(function(e){var E,H,_;let o=useRef(null),{id:i,ignorereadonly:a,defaultvalue:d,dateformat:r,label:m,name:s,onchangehandler:c,readonly:b,size:T$1,tabIndex:p,variant:f,visible:u}=e.properties,g=useLocation(),{tabId:v}=e,C=!!(!e.value&&e.validationMessage!=null&&e.context.doValidateForm),S=F=>{var w;return e.methodProvider.eventDispatcher({widgetName:s,widgetValue:F!=null?F:"",widgetEvent:c?U.onChange:null,widgetContext:JSON.stringify({referer:g.pathname,parentWidgetId:v,hasParentForm:T.hasParentForm(),originator:(w=e.context.params)==null?void 0:w.originator})})};useEffect(()=>{!e.value&&d==="today"&&S(a$2().utc().format());},[]);let y=(H=(E=e==null?void 0:e.i18n)==null?void 0:E.language)==null?void 0:H.substr(0,2);return jsx(f$1,{id:i,defaultvalue:d,disabled:!!(b&&!a),error:C,format:r!==void 0&&r!==""&&r!=null?r:void 0,helperText:C?e.validationMessage:"",inputRef:o,label:m,locale:y,name:s,onBlur:F=>{if(!F){S(null);return}let w=a$2(F);w.isValid()&&S(w.toISOString());},size:T$1,type:"datepicker",value:(_=e.value)!=null?_:"",variant:f,visible:u})}));Ra.displayName="_Textinput";var Sa=Ra;var ka=withTranslation()(memo(function(e){var _,F,w;let o=useRef(null),{id:i,ignorereadonly:a,defaultvalue:d,dateformat:r,label:m,name:s,onchangehandler:c,readonly:b,size:T$1,tabIndex:p,variant:f,visible:u}=e.properties,g$1=useLocation(),{tabId:v}=e,[C,S]=useState(String((_=e.value)!=null?_:"")),y=!!(!C&&e.validationMessage!=null&&e.context.doValidateForm);useEffect(()=>{var h;S(String((h=e.value)!=null?h:""));},[e.value]);let E=h=>{var O;return S(h),e.methodProvider.eventDispatcher({widgetName:s,widgetValue:h!=null?h:"",widgetEvent:c?U.onChange:null,widgetContext:JSON.stringify({referer:g$1.pathname,parentWidgetId:v,hasParentForm:T.hasParentForm(),originator:(O=e.context.params)==null?void 0:O.originator})})};useEffect(()=>{if(!e.value&&d){let h=d==="now"?a$2().utc().format():d==="start of day"?a$2().startOf("day").utc().format():null;h&&E(h);}},[]);let H=(w=(F=e==null?void 0:e.i18n)==null?void 0:F.language)==null?void 0:w.substr(0,2);return jsx(g,{autoFocus:false,defaultvalue:d,disabled:!!(b&&!a),error:y,format:r!==void 0&&r!==""&&r!=null?r:void 0,helperText:y?e.validationMessage:"",id:i,inputRef:o,label:m,locale:H,name:s,onChange:h=>{if(!h){E(null);return}let O=a$2(h);O.isValid()&&E(O.toISOString());},size:T$1,value:C,variant:f,visible:u})}));ka.displayName="_Textinput";var Ma=ka;var Ba=withTranslation()(memo(function(e){var E,H,_;let o=useRef(null),{id:i,ignorereadonly:a,defaultvalue:d,dateformat:r,label:m,name:s,onchangehandler:c,readonly:b,size:T$1,tabIndex:p,variant:f,visible:u}=e.properties,g=useLocation(),{tabId:v}=e,C=!!(!e.value&&e.validationMessage!=null&&e.context.doValidateForm),S=F=>{var w;return e.methodProvider.eventDispatcher({widgetName:s,widgetValue:F!=null?F:"",widgetEvent:c?U.onChange:null,widgetContext:JSON.stringify({referer:g.pathname,parentWidgetId:v,hasParentForm:T.hasParentForm(),originator:(w=e.context.params)==null?void 0:w.originator})})};useEffect(()=>{!e.value&&d==="now"&&S(a$2().utc().format());},[]);let y=(H=(E=e==null?void 0:e.i18n)==null?void 0:E.language)==null?void 0:H.substr(0,2);return jsx(h,{id:i,defaultvalue:d,disabled:!!(b&&!a),error:C,format:r!==void 0&&r!==""&&r!=null?r:void 0,helperText:C?e.validationMessage:"",inputRef:o,label:m,locale:y,name:s,onBlur:F=>{S(F?a$2(F).utc().format():null);},size:T$1,type:"datetimepicker",value:(_=e.value)!=null?_:"",variant:f,visible:u})}));Ba.displayName="_Textinput";var Na=Ba;var _a=withTranslation()(memo(function(e){var D;let o=useRef(null),{datalength:i,id:a,forcereadonly:d,ignorereadonly:r,label:m,name:s,onchangehandler:c,placeholder:b$1,phoneformat:T$1,readonly:p,regex:f,size:u,style:g,tabIndex:v,uppercasemode:C,variant:S,visible:y}=e.properties,E=useLocation(),{i18n:H}=useTranslation(),{viewPort:_}=b(),{tabId:F}=e,[w,h]=useState(String((D=e.value)!=null?D:"")),O=!!(e.validationMessage!=null&&e.context.doValidateForm);useEffect(()=>{e.value!==void 0&&e.value!==null&&h(String(e.value));},[e.value]);let ee=A=>{var P;e.methodProvider.eventDispatcher({widgetName:s,widgetValue:A,widgetEvent:c?U.onChange:null,widgetContext:JSON.stringify({referer:E.pathname,parentWidgetId:F,hasParentForm:T.hasParentForm(),originator:(P=e.context.params)==null?void 0:P.originator})});},ne=A=>{h(A);};return jsx(n,{autoFocus:false,disabled:!!(p&&!r),error:O,helperText:O?e.validationMessage:"",id:a,inputProps:{id:a,tabIndex:v,style:{...g}},InputProps:{},inputRef:o,label:m,maxCharCount:i,name:s,onBlur:A=>{ee(A.target.value);},onInput:A=>{ne(A.target.value),_.isMobileDevice&&ee(A.currentTarget.value);},placeholder:b$1,locale:H==null?void 0:H.language,phoneFormat:T$1||void 0,readOnly:!!(p&&!r),regEx:f,size:u!=null?u:"small",type:T$1?"phone":"text",toUpperCase:C,value:w,variant:S,visible:y})}));_a.displayName="_PhoneInput";var La=_a;var Oa=withTranslation()(memo(function(e){var ce;let o=useRef(null),{t:i,i18n:a}=useTranslation(),d=a==null?void 0:a.language,{currency_format:r,currency_assymbol:m,currency_currencydisplay:s,currency_fixedlocale:c,datalength:b$1,id:T$1,ignorereadonly:p,label:f,name:u,onchangehandler:g,placeholder:v,readonly:C,regex:S,size:y,style:E,tabIndex:H,uppercasemode:_,variant:F,visible:w}=e.properties,h=useLocation(),{viewPort:O}=b(),{tabId:ee}=e,[ne,D]=useState(String((ce=e.value)!=null?ce:"0")),[A,P]=useState(false),[U$1,K]=useState(0),N=useRef(0);useEffect(()=>{var X;D(String((X=e.value)!=null?X:"0"));},[e.value]),useEffect(()=>{e.validationMessage!=null&&(N.current+=1,P(false));},[e.context.formValidationData]);let k=!!(!A&&e.validationMessage!=null&&e.context.doValidateForm),J=X=>{var ue;e.methodProvider.eventDispatcher({widgetName:u,widgetValue:X,widgetEvent:g?U.onChange:null,widgetContext:JSON.stringify({referer:h.pathname,parentWidgetId:ee,hasParentForm:T.hasParentForm(),originator:(ue=e.context.params)==null?void 0:ue.originator})});},ie=X=>{D(X);},pe=r==="fixed-locale"&&c?c:d,xe=()=>{var Ce;if(s==="")return "";let X=e.context.formData,ue=e.properties.currency_inputfield;return ue&&(X!=null&&X[ue])?X[ue]:e.properties.currency_currency?e.properties.currency_currency:(r==="locale"||r==="fixed-locale")&&(Ce=k$1(pe!=null?pe:""))!=null?Ce:""},de=s==="symbol"?true:s==="code"?false:m!=null?m:false,V=r==="locale"||r==="fixed-locale"?"locale":r!=null?r:"";return jsx(n,{autoFocus:false,currency:xe(),disabled:!!(C&&!p),error:k,helperText:k?e.validationMessage:"",id:T$1,inputProps:{id:T$1,tabIndex:H,style:{...E,textAlign:"right"}},InputProps:{},inputRef:o,label:f,locale:pe,maxCharCount:b$1,name:u,onBlur:X=>{P(true);let ue=X.target.value;(ue==="0"||ue==="")&&K(Ce=>Ce+1),J(ue);},onInput:X=>{ie(X.target.value),O.isMobileDevice&&J(X.currentTarget.value);},onChange:X=>{ne.trim()===""&&J(X.target.value);},placeholder:v,readOnly:!!(C&&!p),regEx:S,size:y,type:"currency",toUpperCase:_,value:ne,variant:F,visible:w,format:V,assymbol:de},U$1)}));Oa.displayName="_CurrencyInput";var Wa=Oa;var Ua=withTranslation()(memo(function(e){var K,N;let o=useRef(null),{t:i,i18n:a}=useTranslation(),d=(K=a==null?void 0:a.language)==null?void 0:K.substring(0,2),{datalength:r,id:m,forcereadonly:s,ignorereadonly:c,label:b$1,name:T$1,onchangehandler:p,placeholder:f,readonly:u,regex:g,size:v,style:C,tabIndex:S,uppercasemode:y,variant:E,visible:H}=e.properties,[_,F]=useState(false),{viewPort:w}=b(),h=useLocation(),{tabId:O}=e,[ee,ne]=useState(String((N=e.value)!=null?N:"")),D=!!(ee.trim()===""&&e.validationMessage!=null&&e.context.doValidateForm);useEffect(()=>{var k;ne(String((k=e.value)!=null?k:""));},[e.value]);let A=()=>{F(k=>!k);},P=k=>{var J;e.methodProvider.eventDispatcher({widgetName:T$1,widgetValue:k,widgetEvent:p?U.onChange:null,widgetContext:JSON.stringify({referer:h.pathname,parentWidgetId:O,hasParentForm:T.hasParentForm(),originator:(J=e.context.params)==null?void 0:J.originator})});},U$1=k=>{ne(k);};return jsx(n,{autoFocus:false,disabled:!!(u&&!c),error:D,helperText:D?e.validationMessage:"",id:m,inputProps:{id:m,tabIndex:S,style:{...C,textAlign:"center"}},InputProps:{endAdornment:jsx(Ll,{position:"end",children:jsx(lr,{onClick:A,edge:"end",children:_?jsx(Al,{}):jsx(Vl,{})})})},inputRef:o,label:b$1,locale:d,maxCharCount:r,name:T$1,onBlur:k=>{P(k.target.value);},onInput:k=>{U$1(k.target.value),w.isMobileDevice&&P(k.currentTarget.value);},onChange:k=>{ee.trim()===""&&P(k.target.value);},placeholder:f,readOnly:!!(u&&!c),regEx:g,size:v,type:"text",toUpperCase:y,value:ee,variant:E,visible:H,inputtype:_?"text":"password"})}));Ua.displayName="_PasswordInput";var Ga=Ua;var qa=styled(TreeItem2Root)(({theme:t})=>({color:t.palette.mode==="light"?t.palette.grey[800]:t.palette.grey[400],position:"relative",[`& .${treeItemClasses.groupTransition}`]:{marginLeft:t.spacing(3.5)}})),nd=styled(TreeItem2Content)(({theme:t})=>({borderRadius:t.spacing(.3),marginBottom:t.spacing(.5),marginTop:t.spacing(.3),padding:t.spacing(.3),paddingRight:t.spacing(.1),fontWeight:500,"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:t.palette.mode==="light"?t.palette.primary.main:t.palette.primary.dark},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"34px",height:"calc(100% - 36px)",width:"1.5px",backgroundColor:t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[700]}},"&:hover":{backgroundColor:alpha(t.palette.primary.main,.1),color:t.palette.mode==="light"?t.palette.primary.main:"white"},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:t.palette.mode==="light"?t.palette.primary.main:t.palette.primary.dark,color:t.palette.primary.contrastText,fontWeight:700}})),ad=styled(TreeItem2Content)(({theme:t})=>({borderRadius:t.spacing(.3),marginBottom:t.spacing(.5),marginTop:t.spacing(.3),padding:t.spacing(.3),paddingRight:t.spacing(.1),fontWeight:500,"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"34px",height:"calc(100% - 36px)",width:"1.5px"}}})),rd=animated(Ul);function Ja(t){let e=useSpring({to:{opacity:t.in?1:0,transform:`translate3d(0,${t.in?0:20}px,0)`}});return jsx(rd,{style:e,...t})}var id=styled(Gl)({color:"inherit",fontWeight:500});function ja({icon:t,expandable:e,children:o,isFirstRootNode:i,...a}){return jsxs(TreeItem2Label,{...a,sx:{display:"flex",alignItems:"center",fontWeight:i?"700":"normal",backgroundColor:"transparent","&.Mui-focused, &.Mui-selected":{backgroundColor:"transparent"}},children:[t&&jsx(Qa,{component:t,className:"labelIcon",color:"inherit",sx:{mr:1,fontSize:"1.2rem"}}),jsx(id,{sx:{fontSize:i?"1rem":"0.9rem",fontWeight:i?"700":"normal"},children:o})]})}var Xa=t=>Array.isArray(t)?t.length>0&&t.some(Xa):!!t,Ct=t$1=>{let e=null,o=t$1.action,i=t$1.applyInternalStyle?{fontSize:"1em",marginRight:"0.5em"}:{};return o==="add"?e=jsx(t,{style:i}):o==="edit"?e=jsx(A$1,{style:i}):o==="share"?e=jsx(E,{style:i}):o==="trash"&&(e=jsx(N,{style:i})),e},ld=Pe.forwardRef(function(e,o){let{id:i,itemId:a,label:d,disabled:r,children:m$1,item:s,index:c,mode:b$1,setSelectedItem:T$1,treeCheckedItems:p,properties:f,disableRootItem:u,userData:g,formData:v,deletePrompt:C,selectedItem:S,execCommands:y,eventDispatcher:E,...H}=e,{getRootProps:_,getContentProps:F,getIconContainerProps:w,getCheckboxProps:h,getLabelProps:O,getGroupTransitionProps:ee,getDragAndDropOverlayProps:ne,status:D}=unstable_useTreeItem2({id:i,itemId:a,children:m$1,label:d,disabled:r,rootRef:o}),A=useLocation(),{t:P}=useTranslation(),[U$1,K]=Pe.useState(null),N=!!U$1,k=Xa(m$1),J=c===0?void 0:zl,[ie,pe]=Pe.useState(D.expanded),{runFormEvent:xe}=b(),de=useCallback(async(M,te,W,n,oe,G)=>{var ke,ze,$e;M&&await xe({pluginCode:W.params.pluginCode,formCode:"FOLDER",guid:(ke=W.params.folderData)==null?void 0:ke.id,projectGuid:W.params.pGuid,pGuid:W.params.pGuid,widgetContext:JSON.stringify({referer:oe.pathname,parentWidgetId:G,hasParentForm:T.hasParentForm(),originator:(ze=W.params)==null?void 0:ze.originator,parent:W.params,folderData:($e=W.params)==null?void 0:$e.folderData}),widgetEvent:U.onDelete,widgetName:"delete",formData:W.formData}).then(Ke=>{if(Ke.meta.requestStatus==="fulfilled"){let ve={...Ke.payload};W.execCommands(ve.FECommand);}}),W.deletePrompt({delete:{buttonAgree:"",buttonDisagree:"",dialogTitle:"",dialogContent:"",showDialog:false,callBackFunc:()=>{}}});},[e.params.pluginCode,e.params.folderData,e.params.pGuid,e.formData,e.deletePrompt,e.execCommands]),V=M=>{M.stopPropagation(),pe(te=>!te);},ce=M=>{M.stopPropagation(),K(M.currentTarget);},X=()=>{K(null);},ue=useCallback(()=>{X();let M="addbtn";return e.eventDispatcher({tabIndex:0,widgetName:M,widgetValue:null,widgetEvent:U.onFolderCreateRecordEvent,widgetContext:JSON.stringify({referer:A.pathname,parentWidgetId:"",hasParentForm:T.hasParentForm(),parentOriginator:{params:e.params.originator?e.params.originator.params:{}},originator:{params:e.params,widgetName:M},parent:{widgetName:M,params:e.params},isModal:true,folderData:e.params.folderData})})},[X,A.pathname,e.params,e.eventDispatcher,T.hasParentForm]),Ce=useCallback(()=>{X();let M="share";return e.eventDispatcher({tabIndex:0,widgetName:M,widgetValue:null,widgetEvent:U.onFolderShareRecordEvent,widgetContext:JSON.stringify({referer:A.pathname,parentWidgetId:"",hasParentForm:T.hasParentForm(),parentOriginator:{params:e.params.originator?e.params.originator.params:{}},originator:{params:{...e.params,guid:e.params.folderData.id},widgetName:M},parent:{widgetName:M,params:e.params},isModal:true,folderData:e.params.folderData})})},[e,A.pathname]),ge=useCallback(()=>{X();let M="edit";return e.eventDispatcher({tabIndex:0,widgetName:M,widgetValue:null,widgetEvent:U.onFolderEditRecordEvent,widgetContext:JSON.stringify({referer:A.pathname,parentWidgetId:"",hasParentForm:T.hasParentForm(),parentOriginator:{params:e.params.originator?e.params.originator.params:{}},originator:{params:e.params,widgetName:M},parent:{widgetName:M,params:e.params},isModal:true,folderData:e.params.folderData})})},[e,A.pathname]),Y=useCallback(async M=>{var te,W;await xe({pluginCode:e.params.pluginCode,formCode:e.params.formCode,guid:e.params.guid,projectGuid:e.params.pGuid,pGuid:e.params.pGuid,widgetContext:JSON.stringify({referer:A.pathname,parentWidgetId:null,hasParentForm:T.hasParentForm(),originator:(te=e.params)==null?void 0:te.originator,parent:e.params,folderData:(W=e.params)==null?void 0:W.folderData}),widgetEvent:U.onRefresh,widgetName:f==null?void 0:f.name,widgetValue:M,formData:v}).then(n=>{if(n.meta.requestStatus==="fulfilled"){let oe={...n.payload};oe.FECommand={...oe.FECommand,UpdateFormData:oe.data},e.execCommands(oe.FECommand);}});},[e,f==null?void 0:f.name,A.pathname]),z=useCallback(()=>{e.deletePrompt({delete:{showDialog:true,dialogTitle:P("Delete")+" ?",dialogContent:P("Are you certain that you wish to delete this folder?"),buttonAgree:P("Continue"),buttonDisagree:P("Close"),callBackFunc:M=>{M?de(M,"delete",e,{},A,""):de(false,"",e,{},A,"");}}});},[e,P,A,de]);if(b$1==="live"){let M=g.rightMode!=="Edit";return jsxs(qa,{..._(H),sx:{"& > ul":{paddingLeft:"0.2rem",paddingRight:"0.1rem"}},children:[jsxs(nd,{...F({className:x("content",{"Mui-expanded":ie,"Mui-selected":D.selected,"Mui-focused":D.focused,"Mui-disabled":D.disabled})}),children:[c!==0&&jsxs(Fragment,{children:[jsx(TreeItem2IconContainer,{...w({status:D,onPointerUp:V}),children:jsx(TreeItem2Icon,{status:D})}),jsx(TreeItem2Checkbox,{...h()})]}),jsx(ja,{...O({icon:J,expandable:k&&ie,isFirstRootNode:c===0,onClick:te=>{T$1&&T$1(te,a),te.stopPropagation();}}),children:d}),!M&&e.selectedItem===a&&c!==0&&jsx(lr,{size:"small",onClick:ce,"aria-controls":N?"menu":void 0,"aria-haspopup":"true","aria-expanded":N?"true":void 0,style:{marginLeft:"auto",color:"#FFF",fontSize:"14px"},children:jsx(m,{})}),jsxs(Zl,{anchorEl:U$1,open:N,onClose:X,onClick:te=>te.stopPropagation(),slotProps:{paper:{sx:{minWidth:"12em"}}},children:[jsxs(xt,{onClick:ue,children:[jsx(yt,{children:jsx(Ct,{action:"add",applyInternalStyle:true})}),jsx(wt,{primaryTypographyProps:{fontSize:"0.875rem"},children:P("New Folder")})]}),jsxs(xt,{onClick:ge,children:[jsx(yt,{children:jsx(Ct,{action:"edit",applyInternalStyle:true})}),jsx(wt,{children:P("Settings")})]}),jsxs(xt,{onClick:Ce,children:[jsx(yt,{children:jsx(Ct,{action:"share",applyInternalStyle:true})}),jsx(wt,{children:P("Share")})]}),jsxs(xt,{onClick:z,children:[jsx(yt,{children:jsx(Ct,{action:"trash",applyInternalStyle:true})}),jsx(wt,{children:P("Delete")})]})]}),jsx(TreeItem2DragAndDropOverlay,{...ne()})]}),m$1&&jsx(Ja,{...ee(),in:ie,children:m$1})]})}else {let M=false;return p&&p.length>0&&p.forEach((te,W)=>{if(te===a){M=true;return}}),jsxs(qa,{..._({...H,expandable:false}),sx:{"& > ul":{paddingLeft:"1rem",paddingRight:"0rem"}},children:[jsxs(ad,{...F({className:x("content",{"Mui-expanded":true,"Mui-selected":D.selected,"Mui-focused":D.focused,"Mui-disabled":D.disabled})}),children:[c!==0&&jsx(Fragment,{children:jsx(TreeItem2Checkbox,{id:a,visible:true,checked:M,onPointerUp:te=>Y(a),onResize:void 0,onResizeCapture:void 0,popover:void 0,popoverTargetAction:void 0,popoverTarget:void 0,inert:void 0,onToggle:void 0,onBeforeToggle:void 0,onTransitionCancel:void 0,onTransitionCancelCapture:void 0,onTransitionRun:void 0,onTransitionRunCapture:void 0,onTransitionStart:void 0,onTransitionStartCapture:void 0})}),jsx(ja,{...O({icon:J,expandable:k,isFirstRootNode:c===0}),children:d}),jsx(TreeItem2DragAndDropOverlay,{...ne()})]}),m$1&&jsx(Ja,{...ee(),in:true,children:m$1})]})}}),dd=t=>{let e=[],o=i=>{i.forEach(a=>{a.children&&a.children.length>0&&(e.push(a.id),o(a.children));});};return o(t),e},sd=(t,e)=>{let o=(i,a)=>{for(let d of i)if(d.id===a||d.children&&o(d.children,a))return d;return null};return o(t,e)},md=(t,e)=>{let o=[],i=(a,d,r=[])=>{for(let m of a){if(m.id===d)return o.push(...r),true;if(m.children&&i(m.children,d,[...r,m]))return true}return false};return i(t,e),o},Ht=(t,e)=>{for(let o of t){if(o.id===e)return o;if(o.children){let i=Ht(o.children,e);if(i)return i}}return null},It=(t,e)=>{for(let o of t){if(o.id===e)return [o.label];if(o.children){let i=It(o.children,e);if(i.length>0)return [o.label,...i]}}return []},cd=({eventDispatcher:t,execCommands:e,params:o,properties:i,redrawComponent:a,formlayout:d,onFolderSelected:r,onFolderAdded:m,formData:s,mode:c,checkedItems:b$2})=>{var U$1,K;let{runFormEvent:T$1}=b(),[p,f]=Pe.useState([]),[u,g]=Pe.useState(((U$1=o==null?void 0:o.folderData)==null?void 0:U$1.id)||null),[v,C]=Pe.useState([]),[S,y]=Pe.useState(b$2),[E,H]=Pe.useState(false),[_,F]=Pe.useState(),{UserDialog:w}=b$1();Pe.useEffect(()=>{y(b$2);},[b$2]);let h=useCallback(T.debounce(async()=>{var N,k,J,ie,pe,xe,de,V,ce,X,ue;try{let Ce=await T$1({pluginCode:((N=o.sourcePluginCode)==null?void 0:N.trim())!==""?o.sourcePluginCode:o.pluginCode,formCode:((k=o.sourceFormCode)==null?void 0:k.trim())!==""?o.sourceFormCode:o.formCode,guid:o.guid,projectGuid:o.pGuid,pGuid:o.pGuid,widgetEvent:U.onFoldersDataLoad,widgetContext:JSON.stringify({originator:(J=o.originator)!=null?J:null})});if(Ce.meta.requestStatus==="fulfilled"){let ge={...Ce.payload};ge!=null&&ge.userData&&F(ge==null?void 0:ge.userData),(ie=ge==null?void 0:ge.userData)!=null&&ie.isContributor&&H(!0);let Y=JSON.parse(ge.widgetData.treeData);if(f(Y),(pe=o==null?void 0:o.folderData)!=null&&pe.addedFolderId){let z=sd(Y,(xe=o==null?void 0:o.folderData)==null?void 0:xe.addedFolderId);if(z){let M=dd([z]);C(M),g((de=o==null?void 0:o.folderData)==null?void 0:de.addedFolderId);let te=It([z],(V=o==null?void 0:o.folderData)==null?void 0:V.addedFolderId);m(null,te);}}else if(v.length===0&&C([(ce=Y[0])==null?void 0:ce.id]),!u){let z=(X=Y[0])==null?void 0:X.id,M=(ue=Y[0])==null?void 0:ue.isroot;g(z||null),r(z||null,M);}}}catch(Ce){}},500),[o]);Pe.useEffect(()=>(h(),()=>{h.cancel();}),[h]),Pe.useEffect(()=>{var N,k,J,ie,pe,xe;if((N=o==null?void 0:o.folderData)!=null&&N.id){g(((k=o==null?void 0:o.folderData)==null?void 0:k.id)||null);let de=Ht(p,(J=o==null?void 0:o.folderData)==null?void 0:J.id),V=It(p,de==null?void 0:de.id),ce=[],X=md(p,(ie=o==null?void 0:o.folderData)==null?void 0:ie.id);X.length>0&&(X.forEach(ue=>{ce.push(ue.id);}),ce.push((pe=o==null?void 0:o.folderData)==null?void 0:pe.id),C(ce)),r((xe=o==null?void 0:o.folderData)==null?void 0:xe.id,de==null?void 0:de.isroot,V);}},[(K=o==null?void 0:o.folderData)==null?void 0:K.id]);let[O,ee]=useState({delete:{buttonAgree:"",buttonDisagree:"",dialogTitle:"",dialogContent:"",showDialog:false,callBackFunc:()=>{}}}),ne=N=>O.delete.callBackFunc(N),D=N=>{ee(N);},A=(N,k)=>{g(k);let J=Ht(p,k),ie=It(p,J==null?void 0:J.id);r(k,J==null?void 0:J.isroot,ie);};return jsxs(Fragment,{children:[jsx(Qa,{sx:{paddingTop:"5px"},children:jsx(RichTreeView,{items:p,selectedItems:u,expandedItems:v,sx:{height:"fit-content",flexGrow:1,maxWidth:250,overflowY:"auto"},slots:{item:N=>jsx(ld,{...N,mode:c,params:o,eventDispatcher:t,execCommands:e,deletePrompt:D,index:p.findIndex(k=>k.id===N.itemId),selectedItem:u,setSelectedItem:A,treeCheckedItems:S,disableRootItem:E,userData:_,formData:s,properties:i})},onSelectedItemsChange:A,onExpandedItemsChange:(N,k)=>{var ie;let J=(ie=p[0])==null?void 0:ie.id;J&&!k.includes(J)?C(pe=>pe.includes(J)?pe:[...pe,J]):C(k);}})}),jsx(w,{...O.delete,handleDialogClose:ne})]})},ct=cd;var Za=withTranslation()(memo(function(e){var c,b;let{style:o,verticalalign:i,plugincode:a,formcode:d,visible:r}=e.properties,m={paddingTop:"0px"};if(i==="bottom"&&(m.paddingTop="10px"),!r)return null;let s=(c=e.context.formData)!=null&&c[e.properties.name]?JSON.parse((b=e.context.formData)==null?void 0:b[e.properties.name]):{};return jsx("div",{style:{...o,...m,minHeight:"2rem"},children:jsx(ct,{params:{sourceFormCode:d,sourcePluginCode:a,pluginCode:e.context.params.pluginCode,formCode:e.context.params.formCode,guid:e.context.params.guid,pGuid:e.context.params.pGuid,originator:e.context.params.originator},properties:e.properties,checkedItems:s,redrawComponent:e.context.redrawComponent,eventDispatcher:e.methodProvider.eventDispatcher,execCommands:e.methodProvider.execCommands,formData:e.context.formData,formlayout:"folders",onFolderSelected:()=>{},onFolderAdded:()=>{},mode:"setup"})})}));Za.displayName="_View";var er=Za;var pd=lazy(()=>import('./tabulator-KJBTYWWN.js').then(t=>({default:t.TabulatorTable}))),gd=lazy(()=>import('./datatable-CHKHZBKE.js').then(t=>({default:t.Datatable}))),Ve=class{static getFormComponent(e,o){if(e.displayName==="_Rowcontainer")return Hn;if(e.displayName==="_Rowsegment")return zn;if(e.displayName==="_Textinput"){if(o.inputtype==="input")return Jn;if(o.inputtype==="inputwcopy")return Kn;if(o.inputtype==="currency")return Wa;if(o.inputtype==="password")return Ga;if(o.inputtype==="date")return Sa;if(o.inputtype==="time")return Ma;if(o.inputtype==="datetime")return Na;if(o.inputtype==="phone")return La}else {if(e.displayName==="_TabBox")return Zn;if(e.displayName==="_Button")return Pa;if(e.displayName==="_Label")return oa;if(e.displayName==="_CheckBox")return ra;if(e.displayName==="_Radio")return da;if(e.displayName==="_Textarea")return ma;if(e.displayName==="_SelectBox")return fa;if(e.displayName==="_Placeholder")return ga;if(e.displayName==="_Fileuploader")return Ia;if(e.displayName==="_Table")return o.alloweditrow||o.tablemode!==void 0&&o.tablemode==="tabulator"?pd:gd;if(e.displayName==="_View")return er}return e}};function nr(t,e,o){var i=this,a=useRef(null),d=useRef(0),r=useRef(null),m=useRef([]),s=useRef(),c=useRef(),b=useRef(t),T=useRef(true);useEffect(function(){b.current=t;},[t]);var p=!e&&e!==0&&typeof window!="undefined";if(typeof t!="function")throw new TypeError("Expected a function");e=+e||0;var f=!!(o=o||{}).leading,u=!("trailing"in o)||!!o.trailing,g="maxWait"in o,v=g?Math.max(+o.maxWait||0,e):null;useEffect(function(){return T.current=true,function(){T.current=false;}},[]);var C=useMemo(function(){var S=function(w){var h=m.current,O=s.current;return m.current=s.current=null,d.current=w,c.current=b.current.apply(O,h)},y=function(w,h){p&&cancelAnimationFrame(r.current),r.current=p?requestAnimationFrame(w):setTimeout(w,h);},E=function(w){if(!T.current)return false;var h=w-a.current;return !a.current||h>=e||h<0||g&&w-d.current>=v},H=function(w){return r.current=null,u&&m.current?S(w):(m.current=s.current=null,c.current)},_=function w(){var h=Date.now();if(E(h))return H(h);if(T.current){var O=e-(h-a.current),ee=g?Math.min(O,v-(h-d.current)):O;y(w,ee);}},F=function(){var w=Date.now(),h=E(w);if(m.current=[].slice.call(arguments),s.current=i,a.current=w,h){if(!r.current&&T.current)return d.current=a.current,y(_,e),f?S(a.current):c.current;if(g)return y(_,e),S(a.current)}return r.current||y(_,e),c.current};return F.cancel=function(){r.current&&(p?cancelAnimationFrame(r.current):clearTimeout(r.current)),d.current=0,m.current=a.current=s.current=r.current=null;},F.isPending=function(){return !!r.current},F.flush=function(){return r.current?H(Date.now()):c.current},F},[f,g,e,v,u,p]);return C}var xd=Pe__default.createContext(void 0),rr=({children:t,eventDispatcher:e,redrawComponent:o,formlayout:i,params:a,onFolderSelected:d,onFolderAdded:r,formData:m,execCommands:s$1})=>{let[c,b$1]=useState(i),{viewPort:T}=b(),[p,f]=useState(false),{t:u}=useTranslation(),g=()=>f(y=>!y),v=()=>f(false),C={viewHolder:{display:"flex",position:"relative"},toggleButton:{position:"absolute",top:"1em",right:"1em",zIndex:1e3,background:"#FFF",color:"#3f86cc ",border:"1px solid #3f86cc",borderRadius:"50%",width:"35px",height:"35px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"},toggleButtonMenuActive:{background:"#3f86cc",color:"#FFF "},btreeContainerMobile:{position:"fixed",top:0,left:p?0:"-16rem",height:"100%",width:"16rem",backgroundColor:"#F8F8F8",borderRight:"1px solid #C0C0C0",transition:"left 0.3s ease",zIndex:999,padding:"0.5rem"},btreeContainerDesktop:{borderRight:"1px solid #C0C0C0"},mainContent:{flex:1,margin:"1em"}},S=()=>jsx(Gl,{variant:"h6",sx:{padding:"0.5em",fontWeight:"bold",borderBottom:"1px dashed #C0C0C0"},children:u("My Folders")});return jsxs(xd.Provider,{value:{layout:c,setLayout:b$1},children:[(!i||i==="regular")&&t,i==="folders"&&jsxs("div",{className:"viewHolder",style:C.viewHolder,children:[T.isMobileDevice?jsxs(Fragment,{children:[!p&&jsx("button",{onClick:g,style:{...C.toggleButton,...C.toggleButtonMenuActive},children:s({size:"1.3rem"})}),jsx(vd,{open:p,onClick:v,sx:{zIndex:998,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),jsxs("div",{style:C.btreeContainerMobile,onClick:y=>y.stopPropagation(),children:[jsx("div",{style:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingLeft:"0.5rem"}}),jsx(S,{}),jsx(ct,{params:{...a,sourcePluginCode:a.pluginCode,sourceFormCode:a.formCode},redrawComponent:o,eventDispatcher:e,execCommands:s$1,formData:m,formlayout:i,onFolderSelected:d,onFolderAdded:r,mode:"live"})]})]}):jsxs("div",{className:"foldersHolder",style:C.btreeContainerDesktop,children:[jsx(S,{}),jsx(ct,{params:{...a,sourcePluginCode:a.pluginCode,sourceFormCode:a.formCode},redrawComponent:o,eventDispatcher:e,execCommands:s$1,formData:m,formlayout:i,onFolderSelected:d,onFolderAdded:r,mode:"live"})]}),jsx("div",{style:C.mainContent,children:t})]})]})};var Rd=lazy(()=>import('./fileviewer-TOFTOS7U.js')),Sd=lazy(()=>import('./formeditor-LXOMYM3K.js').then(t=>({default:t.Formeditor}))),Tt=t=>new Promise(e=>setTimeout(e,t));function dr(t,e={}){let o={},i=d=>{let r=d==null?void 0:d.properties;if(!(r!=null&&r.name)||!(r!=null&&r.defaultvalue)||d.stricttype!=="_Textinput")return;let{name:m,inputtype:s}=r,c=String(r.defaultvalue).toLowerCase().trim();e[m]!=null&&e[m]!==""||(s==="date"&&c==="today"?o[m]=a$2().utc().format():s==="datetime"&&c==="now"?o[m]=a$2().utc().format():s==="time"&&c==="now"?o[m]=a$2().utc().format():s==="time"&&c==="start of day"&&(o[m]=a$2().startOf("day").utc().format()));},a=d=>{if(d.type==="formrow"||d.stricttype==="_Rowcontainer")for(let r of d._children||[])for(let m of r._children||[])i(m);else if(d._children)for(let r of d._children)a(r);};for(let d of t||[])a(d);return o}var $t={command:{},params:{id:null,parentId:null,guid:"",pGuid:"",formCode:"",pluginCode:"",modal:false,modalCloseFn:()=>{},modalCloseAndOpenFn:()=>{},originator:{params:{pluginCode:"",formCode:"",guid:""}},parent:{widgetName:"",params:{pluginCode:"",formCode:"",guid:""}},hasParentForm:false,folderData:{id:"",label:"",isRoot:"",captions:[]}},doValidateForm:false,redrawComponent:false,redrawFoldersComponent:false,fieldAllowedValues:{},formData:{},widgetRelatedData:[],widgetsState:{visibility:{},readonly:{}},formDimension:{width:0,height:0},formValidationData:{},enableEventHandlers:false,isModal:false,hasParentForm:false,formLayout:"regular"},sr={containerSetup:{properties:{style:{minHeight:0}}},selectedWidgetProps:{title:"",subtitle:"",style:{},tabsetup:null,_path:{type:null,stricttype:null,component:null,tabId:null,panelId:null,rowId:null,segmentId:null,widgetId:null},lastActiveTabId:null}},Ed={id:"",parentId:"",pluginCode:"",formCode:"",guid:null,pGuid:void 0,isFormEditorMode:false,originator:{params:{pGuid:"",pluginCode:"",formCode:"",guid:""}},parent:{widgetName:"",params:{pGuid:"",pluginCode:"",formCode:"",guid:""}},folderData:{id:"",addedFolderId:"",isRoot:"",captions:[]},prefillData:void 0},kd=memo(function({previewMode:e,className:o,maxWidth:i,setup:a,params:d$1,enableEventHandlers:r,modalCloseFn:m}){var Xt,Yt;let s={...d$1,modalCloseFn:m||(d$1==null?void 0:d$1.modalCloseFn)},c=useRef(null),[b$1,T$1]=useState(0),{registerFormSubmitEvent:p,checkFormAccess:f$1}=g$1(),{apiConfig:u,appSettings:g,viewPort:v,runLoadFormEvent:C,runServerPingEvent:S,runFormEvent:y,fetchUserMenu:E,signInUser:H,signOut:_}=b(),[F,w]=useState(null),h=useNavigate(),[O,ee]=useState(false),ne=useRef({}),[D,A]=useState({}),[P$1,U]=useState(null),[K,N]=useState(null),k=useLocation(),[J]=useState(v.width),[ie]=useState(s.modal||false),[pe]=useState(T.hasParentForm()||!!(u!=null&&u.token)),[xe,de]=useState([]),V=xe.length>0?xe[xe.length-1]:Ed,[ce,X]=useState(),[ue,Ce]=useState(true),{t:ge,i18n:Y}=useTranslation(),z=e$1(),M=f(),te=g$2(),W={command:{},params:s,doValidateForm:false,redrawComponent:false,redrawFoldersComponent:false,fieldAllowedValues:{},formData:{},widgetRelatedData:[],widgetsState:{visibility:{},readonly:{}},formDimension:{width:b$1,height:0},formValidationData:{},enableEventHandlers:r,isModal:ie,hasParentForm:pe,formLayout:"regular"},[n,oe]=useState(W),[G,ke]=useState({...sr,containerSetup:a}),ze=nr(()=>{c&&c.current&&T$1(c.current.offsetWidth);},200),$e=async(l,R)=>{await C({pluginCode:l.pluginCode,formCode:l.formCode,guid:l.guid,projectGuid:l.pGuid,pGuid:l.pGuid,originator:l.originator,parent:l.parent,previewMode:e,widgetContext:JSON.stringify({folderData:l.folderData,prefillData:l.prefillData})}).then(async I=>{var L,q,Z,ye,he,be,Te,$;if(I.meta.requestStatus==="fulfilled"){let B={...I.payload};if(Object.keys(B).length===0)return;try{let se=window.location.hostname;if(!i$1.SKIP_ACCESS_VALIDATION_DOMAINS.some(He=>se===He||se.endsWith(`.${He}`))){let He=await f$1(l.formCode);(He==null?void 0:He.subscriptionPlan)!=null&&U(He.subscriptionPlan);}}catch(se){N({title:(q=(L=se==null?void 0:se.data)==null?void 0:L.error)!=null?q:"Form Unavailable",message:(ye=(Z=se==null?void 0:se.data)==null?void 0:Z.message)!=null?ye:"This form is temporarily unavailable."});return}if(B.uiTranslations&&Object.keys(B.uiTranslations).length>0){ne.current=B.uiTranslations,A(B.uiTranslations);let se=Fd;se.addResourceBundle(se.language,"default",B.uiTranslations,true,true);}let Me={},le={visibility:{...n==null?void 0:n.widgetsState.visibility,...(he=B==null?void 0:B.widgetsState)==null?void 0:he.visibility},readonly:{...n==null?void 0:n.widgetsState.readonly,...(be=B==null?void 0:B.widgetsState)==null?void 0:be.readOnly}};if(R){oe(se=>({...se,formData:B.data,fieldAllowedValues:B.fieldAllowedValues,widgetsState:le,formLayout:B.layout,requiredFields:B.requiredFields}));return}let Re={},Be=[],Oe={},We=JSON.parse(B.definition);if(We==null){oe({...W,redrawComponent:false,doValidateForm:false,command:{...B.FECommand},formData:{},widgetsState:le,formLayout:B.layout,requiredFields:B.requiredFields,params:{...W.params,folderData:B.folderData}});return}T.mapComponents(We._children);let Xe=We.properties;Be=We._children,Oe=We,ke({...G,containerProps:Xe,selectedWidgetProps:{...G.containerProps},containerData:Be,containerSetup:Oe}),Me=B.fieldAllowedValues,Re={...B.data,...dr(Be,B.data)},oe({...W,formData:Re,formLayout:B.layout,widgetsState:{visibility:{...n==null?void 0:n.widgetsState.visibility,...(Te=B==null?void 0:B.widgetsState)==null?void 0:Te.visibility},readonly:{...n==null?void 0:n.widgetsState.readonly,...($=B==null?void 0:B.widgetsState)==null?void 0:$.readOnly}},requiredFields:B.requiredFields,command:{...B.FECommand},fieldAllowedValues:Me,params:{...W.params,folderData:B.folderData}}),ee(true);}});};if(useEffect(()=>(ze(),$e(s,false),window.addEventListener("resize",ze),()=>{oe(()=>({...$t})),ke(sr),ee(false),window.removeEventListener("resize",ze);}),[s.pGuid,s.guid,s.pluginCode,s.formCode]),useEffect(()=>{var I;if(!O||!((I=G.containerSetup)!=null&&I._children))return;let l=G.containerSetup._children,R=setTimeout(()=>{oe(L=>{let q=dr(l,L.formData);return Object.keys(q).length===0?L:{...L,formData:{...L.formData,...q}}});},0);return ()=>clearTimeout(R)},[Y.language,O]),useEffect(()=>{var q,Z,ye,he,be,Te,$,B,Me,le,Re,Be,Oe,We,Xe,se,Rt,He,Zt,eo,to,oo,no,ao,ro,io,lo,so,mo,co,uo,fo,po,go,ho,bo,vo,yo,wo,xo,Co,Io,Fo,To,Do,Po,Ro,So,Eo,ko,Mo,Bo,No,_o,Lo,Ao,Vo,Oo,Wo,Ho,Uo,Go,zo,$o,qo,Jo,jo,Qo,Ko,Xo,Yo,Zo,en,tn,on;let l=n,R=null,I=true,L=false;if((q=n.command)!=null&&q.Messages&&((Z=n.command)==null||Z.Messages.forEach(me=>{var we,Ye;let re=(we=ne.current[me.text])!=null?we:ge(me.text),Ee=(Ye=me.code)==null?void 0:Ye.toUpperCase();Ee==="NOTICE"?(L=true,te({toastID:nanoid(11),msg:re,clearQueue:false,hideProgressBar:false})):Ee==="SUCCESS"?(L=true,M({toastID:nanoid(11),msg:re,clearQueue:false,hideProgressBar:false})):Ee==="WARNING"&&(I=false,z({toastID:nanoid(11),msg:re,clearQueue:false,hideProgressBar:false}));})),(ye=n.command)!=null&&ye.DisplayButtonLoader){oe({...n,displayButtonLoader:true});return}if((he=n.command)!=null&&he.DisplayErrorPage){h("/pagenotfound");return}if((be=n.command)!=null&&be.MoveToTab){let me=($=(Te=n.command)==null?void 0:Te.MoveToTab)==null?void 0:$.widgetName;if(me){let re=T.getTabWidgetByFieldName(me,G.containerSetup);re!==null&&(re==null?void 0:re.tabId)!=null&&ve(re);}}if((B=n.command)!=null&&B.FormValidationData&&Object.keys(n.command.FormValidationData).length>0){let me=Object.keys(n.command.FormValidationData)[0];if(me){let re=T.getTabWidgetByFieldName(me,G.containerSetup);re!==null&&(re==null?void 0:re.tabId)!=null&&ve(re),setTimeout(()=>{let Ee=[`[name="${me}"]`,`[data-field-name="${me}"]`,`#${me}`,`[id*="${me}"]`],we=null;for(let Ye of Ee)try{if(we=document.querySelector(Ye),we)break}catch(St){}we&&(we.scrollIntoView({behavior:"smooth",block:"center"}),(we.tagName==="INPUT"||we.tagName==="TEXTAREA"||we.tagName==="SELECT")&&we.focus());},100);}oe({...n,doValidateForm:true,formValidationData:(Me=n.command)==null?void 0:Me.FormValidationData});return}else l={...l,formValidationData:{}};if((le=n.command)!=null&&le.FetchUserMenu&&E&&E({ProjectGuid:(Be=(Re=n.command)==null?void 0:Re.FetchUserMenu)==null?void 0:Be.projectGuid,pGuid:(We=(Oe=n.command)==null?void 0:Oe.FetchUserMenu)==null?void 0:We.projectGuid}),(Xe=n.command)!=null&&Xe.Redirect){s.modalCloseFn&&s.modalCloseFn(),h(`${(se=n.command)==null?void 0:se.Redirect.url}?ref=${(Zt=(He=(Rt=n.command)==null?void 0:Rt.Redirect)==null?void 0:He.context)==null?void 0:Zt.referer}`,{state:{from:(oo=(to=(eo=n.command)==null?void 0:eo.Redirect)==null?void 0:to.context)==null?void 0:oo.referer}});return}if((no=n.command)!=null&&no.BuildPlugin){h(`${(ao=n.command)==null?void 0:ao.BuildPlugin.url}?ref=${(io=(ro=n.command)==null?void 0:ro.BuildPlugin)==null?void 0:io.referer}`);return}if((lo=n.command)!=null&&lo.DisplayComponent&&w((so=n.command)==null?void 0:so.DisplayComponent),(mo=n.command)!=null&&mo.CloseDisplayComponent&&w(null),(co=n.command)!=null&&co.Login&&(async()=>{var me,re,Ee,we,Ye,St,nn;H&&await H((me=n.command)==null?void 0:me.Login),E&&await E({ProjectGuid:T.extractProjectGuid((Ee=(re=n.command)==null?void 0:re.Login)==null?void 0:Ee.url),pGuid:T.extractProjectGuid((Ye=(we=n.command)==null?void 0:we.Login)==null?void 0:Ye.url)}),h(((nn=(St=n.command)==null?void 0:St.Login)==null?void 0:nn.url)||"/");})(),(uo=n.command)!=null&&uo.Logout&&(async()=>{var re;(re=n.command)!=null&&re.Logout&&(_&&await _(),h("/"));})(),((fo=n.command)!=null&&fo.Cancel||(po=n.command)!=null&&po.CloseForm)&&(n.isModal&&s.modalCloseFn!==void 0?s.modalCloseFn(null,null,false,(go=n.command)==null?void 0:go.RedrawFolders):(R=T.getUrlParameter("ref"),R!=null&&h(R))),(ho=n.command)!=null&&ho.AfterRecordSave){let me=(bo=g==null?void 0:g.TOASTER_AUTOCLOSE)!=null?bo:i$1.TOASTER_AUTOCLOSE;if(R=T.getUrlParameter("ref"),((vo=n.command)==null?void 0:vo.AfterRecordSave.guid)==null)!((yo=n.command)!=null&&yo.OpenModal)&&s.modalCloseFn?s.modalCloseFn(null,null,false,null,null):(wo=n.command)!=null&&wo.OpenModal||(async()=>(await Tt(L?me:0),R!=null&&h(R)))();else if(n.isModal){let re;(xo=n.command)!=null&&xo.HotReloadEnabled&&(re=(Co=n.command)==null?void 0:Co.HotReloadEnabled),(Io=n.command)!=null&&Io.OpenModal||(async()=>{var Ee,we;await Tt(L?me:0),s.modalCloseFn&&s.modalCloseFn(re,n.formData,(Ee=n.command)==null?void 0:Ee.RedrawScreen,(we=n.command)==null?void 0:we.RedrawFolders,null);})();}else {let re=R!=null;if(!((Fo=n.command)!=null&&Fo.OpenModal)&&re&&I)(async()=>(await Tt(L?me:0),R!=null&&h(R)))();else if(!((To=n.command)!=null&&To.OpenModal)){let Ee=k.pathname.replace(/\/new/gi,"/"+((Do=n.command)==null?void 0:Do.AfterRecordSave.guid.replace(/#/g,"%23")));h(Ee,{state:{from:k.pathname}}),l={...l,params:{...n.params,guid:(Po=n.command)==null?void 0:Po.AfterRecordSave.guid}};}}}if((Ro=n.command)!=null&&Ro.UpdateWidgetsState&&(l={...l,widgetsState:{visibility:{...l==null?void 0:l.widgetsState.visibility,...(Eo=(So=n.command)==null?void 0:So.UpdateWidgetsState)==null?void 0:Eo.visibility},readonly:{...l==null?void 0:l.widgetsState.readonly,...(Mo=(ko=n.command)==null?void 0:ko.UpdateWidgetsState)==null?void 0:Mo.readonly}}}),(Bo=n.command)!=null&&Bo.UpdateFieldAllowedValues&&(l={...l,fieldAllowedValues:{...(No=n.command)==null?void 0:No.UpdateFieldAllowedValues}}),(_o=n.command)!=null&&_o.UpdateFormData&&(l={...l,formData:{...(Lo=n.command)==null?void 0:Lo.UpdateFormData}}),(Ao=n.command)!=null&&Ao.UpdateFormDataItem&&(l={...l,formData:{...l.formData,[(Vo=n.command)==null?void 0:Vo.UpdateFormDataItem.name]:(Oo=n.command)==null?void 0:Oo.UpdateFormDataItem.value}}),((Ho=(Wo=n.command)==null?void 0:Wo.ReplaceContextRecordGuid)==null?void 0:Ho.guid)!=null&&(l={...l,displayButtonLoader:false,params:{...n.params,guid:(Uo=n.command)==null?void 0:Uo.ReplaceContextRecordGuid.guid}}),(Go=n.command)!=null&&Go.OpenModal){let me={...(zo=n.command)==null?void 0:zo.OpenModal,parentId:s.id};de(re=>[...re,me]),l={...l,command:{}};}($o=n.command)!=null&&$o.PreviewDocument&&X((qo=n.command)==null?void 0:qo.PreviewDocument),(Jo=n.command)!=null&&Jo.RedrawScreen&&(l={...l,redrawComponent:!n.redrawComponent,redrawFoldersComponent:!n.redrawFoldersComponent}),(jo=n.command)!=null&&jo.RedrawFolders&&(l={...l,params:{...n.params,folderData:{id:(Ko=(Qo=n.command)==null?void 0:Qo.RedrawFolders)==null?void 0:Ko.folderId,addedFolderId:(Yo=(Xo=n.command)==null?void 0:Xo.RedrawFolders)==null?void 0:Yo.folderId,isRoot:(en=(Zo=n.command)==null?void 0:Zo.RedrawFolders)==null?void 0:en.isRoot,captions:(on=(tn=n.command)==null?void 0:tn.RedrawFolders)==null?void 0:on.captions}}}),Object.keys(n.command).length>0&&(l={...l,command:{}},oe(l));},[n.command]),K)return jsx(j,{title:K.title,message:K.message});if(!O)return Pe__default.createElement("div",{},jsx(a$3,{message:ge("Please wait...")}));let Ke=(l,R)=>{let I={};return Object.entries(l).forEach(([L,q])=>{let Z=R[L];(Z==null||Z===""||Z==="0"||Z===0||Array.isArray(Z)&&Z.length===0)&&(I[L]=q);}),I},ve=(l,R=false,I={})=>{let L=ft(null,l.tabId,l.index,R,I.containerSetup);if(L===void 0)return;let q=T.GetParentTabId(L.containerSetup,l.tabId);(q==null?void 0:q.tabId)!=null?(L=ft(null,q.tabId,q.index,false,L.containerSetup),L!==void 0&&ve(q,true,L)):R===false&&ft(null,l.tabId,l.index,true);},rt=async l=>(oe({...n,displayButtonLoader:true}),await y({pluginCode:l.pluginCode,formCode:l.formCode,guid:l.guid,projectGuid:l.projectGuid,pGuid:l.projectGuid,formData:{...l.formData,[l.fieldName]:l.value},widgetContext:JSON.stringify({referer:k.pathname,parentWidgetId:l.tabId,hasParentForm:T.hasParentForm(),originator:{widgetName:l.fieldName.toLowerCase(),params:n.params},parent:{widgetName:l.fieldName.toLowerCase(),params:n.params},parentOriginator:{params:n.params.originator?n.params.originator.params:{}},folderData:n.params.folderData}),widgetEvent:l.widgetEvent,widgetName:l.fieldName.toLowerCase(),widgetValue:l.widgetValue}).then(async R=>{var I,L,q,Z,ye,he,be,Te;if(R.meta.requestStatus==="fulfilled"){let $={...R.payload};((I=$.FECommand)==null?void 0:I.ReplaceContextRecordGuid)!==void 0?($.FECommand={Messages:(q=(L=$.FECommand)==null?void 0:L.Messages)!=null?q:[],UpdateFormData:$.data,ReplaceContextRecordGuid:(Z=$.FECommand)==null?void 0:Z.ReplaceContextRecordGuid},ot($.FECommand)):(ye=$.FECommand)!=null&&ye.Messages?($.FECommand={UpdateFormData:$.data,Messages:(he=$.FECommand)==null?void 0:he.Messages},ot($.FECommand)):(be=$.FECommand)!=null&&be.FormValidationData&&($.FECommand={FormValidationData:(Te=$.FECommand)==null?void 0:Te.FormValidationData},ot($.FECommand));}else oe({...n,displayButtonLoader:false});})),Ie=l=>{let R=l.widgetContext,I=l.widgetEvent,L=l.widgetName.toLowerCase(),q=l.widgetValue,Z=l.feCommand||{},ye=l.skipFormDataItem||false;if(I!==null&&n.enableEventHandlers){if(l.autoSave){rt(l.autoSave);return}let he=q!=null&&ye===false?{...n.formData,[L]:q}:n.formData;if((I==null?void 0:I.toUpperCase())==="ONSAVE"&&n.requiredFields!=null){let be=Ke(n.requiredFields,he),Te=Object.keys(n.formValidationData||{}).length>0,$=Object.keys(be).length>0;if(($||Te)&&(oe({...n,command:{...n.command,FormValidationData:be}}),$))return}(async()=>{var be,Te;if((I==null?void 0:I.toUpperCase())==="ONSAVE")try{await p(n.params.formCode);}catch($){if(($==null?void 0:$.status)===429)return}Ce(false),await y({pluginCode:n.params.pluginCode,formCode:n.params.formCode,guid:n.params.guid,projectGuid:(be=n.params.pGuid)!=null?be:"",pGuid:(Te=n.params.pGuid)!=null?Te:"",widgetContext:R,widgetEvent:I,widgetName:L,widgetValue:typeof q=="string"?q:q!=null?JSON.stringify(q):null,formData:he,widgetsState:n.widgetsState}).then($=>{var B,Me;if($.meta.requestStatus==="fulfilled"){if($.payload instanceof Blob){oe({...n,redrawComponent:!n.redrawComponent});return}let le={...$.payload};if(Object.keys(le).length===0)return;let Re=JSON.parse(le.definition);if(Re!=null){let Be=[],Oe={};T.mapComponents(Re._children);let We=Re.properties;Be=Re._children,Oe=Re,ke({...G,containerProps:We,selectedWidgetProps:{...G.selectedWidgetProps},containerData:Be,containerSetup:Oe});let Xe=L;if(Xe){let se=T.getTabWidgetByFieldName(Xe,Oe);se!==null&&(se==null?void 0:se.tabId)!=null&&ve(se,true,{containerSetup:Oe});}}ye||(n.redrawComponent=false),oe({...n,fieldAllowedValues:le.fieldAllowedValues,doValidateForm:true,command:{...le.FECommand},formData:{...n.formData,...le.data},widgetRelatedData:le.widgetRelatedData,widgetsState:{visibility:{...n==null?void 0:n.widgetsState.visibility,...(B=le==null?void 0:le.widgetsState)==null?void 0:B.visibility},readonly:{...n==null?void 0:n.widgetsState.readonly,...(Me=le==null?void 0:le.widgetsState)==null?void 0:Me.readOnly}},tabIndex:l.tabIndex?Number(l.tabIndex+1):0});}}).finally(async()=>{var $;if(Ce(true),(I==null?void 0:I.toUpperCase())==="ONSAVE"&&u!=null&&u.iframeMode&&u!=null&&u.token){let B=($=G.containerProps)==null?void 0:$.webhooks;if(Array.isArray(B)&&B.length>0){let Me={formCode:n.params.formCode,submittedAt:new Date().toISOString(),data:he};B.forEach(le=>{var Re;le.enabled&&((Re=le.url)!=null&&Re.startsWith("http"))&&fetch(le.url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Me),mode:"cors"}).then(Be=>{Be.ok||z({toastID:nanoid(11),msg:`Webhook failed: ${le.url}`,clearQueue:false,hideProgressBar:false});}).catch(Be=>{z({toastID:nanoid(11),msg:`Webhook failed: ${le.url}`,clearQueue:false,hideProgressBar:false});});});}}});})();}if(q!=null){let he={...n.formData,[L]:q};oe({...n,command:Z,formData:he});}},it=(l,R,I)=>T.findRowItem(l,R,I,G.containerSetup._children),ur=(l,R,I,L)=>T.findSegmentItem(l,R,I,L,G.containerSetup._children),fr=l=>T.findWidgetByIdRecursive(G.containerSetup._children,l),pr=(l,R)=>T.getActiveTabIndex(G.containerSetup._children,R),ft=(l,R,I,L=true,q={})=>{let Z=Object.keys(q).length>0?q:G.containerSetup;if(!R)return;let ye=T.getTabContainer(Z._children,R),he=T.getTabContainerChildrens(Z._children,R);if(he===void 0)return;for(let B=0;B<he.data.length;B++)he.data[B].activeTab="0";let be=he.data.filter((B,Me)=>Me===I)[0];be.properties={...ye.item.properties.tabsetup,...be.properties};let Te=T.getNodeUpdatePath(he.path,{$splice:[[I,1,{...be,activeTab:"1"}]]});var $={containerSetup:{...Z,_children:(0, mr.default)(Z._children,Te)},selectedWidgetProps:{...G.selectedWidgetProps,tabsetup:{...be.properties},_path:{...G.selectedWidgetProps._path,panelId:be.id},lastActiveTabId:R}};return L&&ke($),$},gr=(l=true)=>{let R=$t;l&&(R={...n,redrawComponent:!n.redrawComponent,params:{...n.params,folderData:{id:"",isRoot:"",captions:[]}}}),oe(R);},ot=l=>{oe({...n,redrawComponent:!n.redrawComponent,command:{...l}});},qt=(l,R)=>{(async()=>{if(!S){l();return}await S({cmd:"ping"}).then(async I=>{(I==null?void 0:I.type)==="formbuilder/ping/rejected"?(z({toastID:nanoid(11),msg:"Application is being restarted. Please wait until it finishes....",clearQueue:false,hideProgressBar:false}),await Tt(1e3),qt(l)):l();});})();},Pt=(l,R=false,I,L=null)=>{qt(()=>{if(de(Z=>Z.slice(0,-1)),L!=null){let Z={...L,parentId:s.id};de(ye=>[...ye,Z]);}else if(l!=null){let Z={id:nanoid(5),pluginCode:l==null?void 0:l.pluginCode,formCode:l==null?void 0:l.formCode,guid:null,isFormEditorMode:true,parentId:s.id};de(ye=>[...ye,Z]);}if($e(n.params,true),I){let Z=I==null?void 0:I.folderId;Jt(Z,[]);}else oe({...n,redrawComponent:!n.redrawComponent});}),R&&n.isModal&&$e(s,true);},hr=(l,R="",I)=>{let L={...n,redrawFoldersComponent:!n.redrawFoldersComponent,redrawComponent:!n.redrawComponent,params:{...n.params,folderData:{...n.params.folderData,addedFolderId:"",captions:I,id:l!==null?l:"",isRoot:R}}};oe(L);},Jt=(l,R)=>{let I=$t;l==null?I={...n,redrawFoldersComponent:!n.redrawFoldersComponent,params:{...n.params,folderData:{...n.params.folderData,addedFolderId:l!==null?l:"",captions:R}}}:I={...n,params:{...n.params,folderData:{...n.params.folderData,id:l!==null?l:"",addedFolderId:l!==null?l:"",isRoot:"",captions:R}}},oe(I);},jt=l=>{l&&de(R=>[...R.slice(0,-1),{...l,id:nanoid(5)}]);},br=()=>{X(void 0);},vr=()=>w(null),yr=l=>{let{title:R,subtitle:I}=l,L=R;return I!==void 0&&String(I).trim()!==""&&(L=R+" - "+I),n.enableEventHandlers&&Object.keys((n==null?void 0:n.formData)||{}).length>0&&Object.entries(n.formData).forEach(([q,Z])=>{L=L.replace(`#${q}`,Z);}),L},{properties:Fe}=G.containerSetup||{},{minHeight:Qt}=(Fe==null?void 0:Fe.style)||{},pt={};Qt&&(pt.minHeight=Qt),ie&&(pt={...pt,width:"100%",minWidth:J-J*.3,maxHeight:"calc(100dvh - 4rem)",overflow:"auto"});let Kt={};return e&&(Kt={overflowY:"scroll",height:"100vh",padding:"0px 10px 10px 10px"}),jsx(i$2.Provider,{value:P$1,children:jsx(va.Provider,{value:D,children:jsxs(rr,{execCommands:ot,eventDispatcher:Ie,redrawComponent:n.redrawFoldersComponent,formlayout:n.formLayout,params:n.params,onFolderSelected:hr,onFolderAdded:Jt,formData:n.formData,children:[jsxs("div",{id:"main-content-wrapper",className:o,children:[jsx("div",{className:"content",children:jsx("div",{className:"main-content on-scrollbar",style:Kt,children:jsxs("div",{id:"formCanvas",ref:c,style:{maxWidth:i,border:(Fe==null?void 0:Fe.border)===false?"none":void 0},children:[jsxs("form",{onSubmit:l=>{l.preventDefault();},style:{position:"relative"},children:[Fe&&!Fe.hideheader&&jsxs("div",{className:"form-header top-border-radius",style:{backgroundColor:(Fe==null?void 0:Fe.headerbackground)===false?"transparent":void 0},children:[jsx("div",{style:{flex:1,marginLeft:"0.5rem"},children:Fe&&yr(Fe)}),ie&&s.modalCloseFn!==void 0&&jsx("div",{style:{width:"2.5em"},children:jsx(lr,{onClick:()=>s.modalCloseFn(null),children:Pe__default.createElement(P)})})]}),Fe&&Fe.hideheader&&ie&&s.modalCloseFn!==void 0&&jsx("div",{style:{position:"absolute",top:"0.5rem",right:"0.5rem",zIndex:9999},children:jsx(lr,{size:"medium",onClick:l=>{l.stopPropagation(),s.modalCloseFn(null);},sx:{backgroundColor:"rgba(255, 255, 255, 0.95)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"}},children:Pe__default.createElement(P)})}),jsx("div",{style:pt,className:"form-container bottom-border-radius",children:jsx("div",{className:"form-container",children:jsx(m$1,{darkMode:false,noPadding:true,children:jsx(Suspense,{fallback:jsx(a$3,{}),children:jsx(Md,{eventDispatcher:Ie,context:n,formWidth:b$1,findRowItem:it,findSegmentItem:ur,findWidgetItem:fr,modal:ie,getActiveTabIndex:pr,setActiveTabIndex:ft,setRedrawComponent:gr,execCommands:ot,widgets:G.containerSetup})})})})})]}),F!==null&&jsx(d,{componentName:F.componentName,options:F.options,params:{params:(Xt=F.options)!=null&&Xt.contextParams?(Yt=F.options)==null?void 0:Yt.contextParams:n.params,formData:n.formData,execCommands:l=>ot(l),modalCloseFn:()=>vr(),modalCloseAndOpenFn:l=>jt(l)}})]})})}),(P$1==null?void 0:P$1.toLowerCase())==="free"&&!ie&&jsxs("div",{style:{textAlign:"center",padding:"12px 16px",fontSize:"13px",color:"#aaa"},children:["Powered by"," ",jsx("a",{href:"https://buildocs.com",target:"_blank",rel:"noopener noreferrer",style:{color:"#3498db",textDecoration:"none",fontWeight:500},children:"Buildocs"})]})]}),!ue&&jsx(a$3,{message:ge("Please wait...")}),!V.isFormEditorMode&&ce&&ce.fileId&&jsx(Suspense,{fallback:jsx(a$3,{message:ge("Loading viewer...")}),children:jsx(Rd,{fileId:ce.fileId,fileBase64:ce.data,fieldName:ce.fieldName,params:{...ce.context?ce.context:n.params,modalCloseFn:br}},nanoid(11))}),!V.isFormEditorMode&&(V==null?void 0:V.pluginCode)&&(V==null?void 0:V.formCode)&&jsx(h$1,{component:jsx(kd,{params:{id:V.id,parentId:V.parentId,pluginCode:V.pluginCode,formCode:V.formCode,guid:V.guid==null?"new":V.guid,pGuid:V.pGuid,modal:true,modalCloseFn:(l,R,I,L,q=null)=>Pt(l,I,L,q),modalCloseAndOpenFn:l=>jt(l),originator:V.originator,parent:V.parent,folderData:V.folderData,prefillData:V.prefillData},enableEventHandlers:true}),id:V.id,onCloseModal:Pt,parentId:V.parentId},V.id),V.isFormEditorMode&&(V==null?void 0:V.pluginCode)&&(V==null?void 0:V.formCode)&&jsx(h$1,{component:jsx(Suspense,{fallback:jsx(a$3,{}),children:jsx(Sd,{inPreviewMode:false,pluginCode:V.pluginCode,formCode:V.formCode,modal:true},nanoid(11))}),id:V.id,onCloseModal:()=>Pt(null,false,null),parentId:V.parentId,windowMode:"fullWindow"},V.id)]})})})}),Md=t=>{let e=0,o=i=>{for(var a in i)typeof i[a]=="object"&&i[a]!==null?o(i[a]):a==="tabIndex"&&(t.modal?i[a]=0:i[a]=++e);};return o(t.widgets._children),(t.widgets._children||[]).map(({id:i,tabId:a,panelId:d,type:r,component:m,properties:s})=>Pe__default.createElement(Ve.getFormComponent(m,s),{key:"key_"+i,id:i,tabId:a,panelId:d,className:r,context:{...t.context,formDimension:{width:t.formWidth,height:0}},properties:s,widgetsState:t.context.widgetsState,methodProvider:{eventDispatcher:t.eventDispatcher,findRowItem:t.findRowItem,findSegmentItem:t.findSegmentItem,findWidgetItem:t.findWidgetItem,getActiveTabIndex:t.getActiveTabIndex,setActiveTabIndex:t.setActiveTabIndex,setRedrawComponent:t.setRedrawComponent,execCommands:t.execCommands}},i))};
2
- export{Vn as a,kd as b};
@@ -1 +0,0 @@
1
- import {d}from'./chunk-SYCZSSRF.js';import {a}from'./chunk-POE6K4NQ.js';import {e,b as b$1}from'./chunk-FRAOYRZD.js';import {U,T,k}from'./chunk-TYVVEP34.js';import'./chunk-U4T4ACDE.js';import {b}from'./chunk-LBMVBVXW.js';import {d as d$1,t,p,V,h,q,g,N,_,Y,W,X,Z,P,r,n,i,w,A,b as b$2,y,x,C,l,O,o}from'./chunk-AR42AC7J.js';import'./chunk-5TBO732O.js';import st,{lazy,memo,useRef,useState,useEffect,useCallback,useMemo,Suspense}from'react';import {withTranslation,useTranslation}from'react-i18next';import Yn from'@mui/material/CircularProgress';import Kt from'@mui/material/Box';import _e from'@mui/material/Button';import Jn from'@mui/material/Checkbox';import qn from'@mui/material/ClickAwayListener';import qt from'@mui/material/IconButton';import $e from'@mui/material/ListItemIcon';import Ke from'@mui/material/ListItemText';import Qe from'@mui/material/MenuItem';import $n from'@mui/material/MenuList';import re from'@mui/material/Tooltip';import {nanoid}from'@reduxjs/toolkit';import {useNavigate,useLocation}from'react-router-dom';import Xt from'@mui/material/Menu';import Qn from'axios';import Xn from'@mui/icons-material/MoreVert';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var Zn=lazy(()=>import('./buildocslib.esm-Q4VVN4RP.js').then(d=>({default:d.DatatableImb}))),ea="#1976d2";var dt=(r=>(r[r.SIGN=0]="SIGN",r[r.CONFIRM=1]="CONFIRM",r))(dt||{}),Zt=(l=>(l[l.SIGN=0]="SIGN",l[l.CONFIRM=1]="CONFIRM",l[l.EDIT=2]="EDIT",l))(Zt||{}),Xe=(d,e,r,l,f)=>{var le,V,se,E,b;return e.methodProvider.eventDispatcher({skipFormDataItem:true,widgetName:e.properties.name.toLowerCase(),widgetValue:JSON.stringify({action:d,rowData:{_id:(le=r._id)!=null?le:null,_sk:(V=r._sk)!=null?V:null,_code:(se=r._fcode)!=null?se:r._code,_origformcode:(E=r._origformcode)!=null?E:null,_plugincode:(b=r._plcode)!=null?b:r._plugincode}}),widgetEvent:U.onTableRunActionEvent,widgetContext:JSON.stringify({referer:l.pathname,parentWidgetId:f,hasParentForm:T.hasParentForm(),originator:{widgetName:e.properties.name.toLowerCase(),params:e.context.params},parent:{widgetName:e.properties.name.toLowerCase(),params:e.context.params},folderData:e.context.params.folderData})})},Se=(d,e)=>{var r,l;return !(d==="file"&&e.formLayout==="folders"&&((r=e.params.folderData)!=null&&r.isRoot||((l=e.params.folderData)==null?void 0:l.id)===null))},ta=({anchorEl:d,handleClose:e$1,setUploadMode:r,uploadMode:l,props:f,setLoaded:le})=>{let{runFormUploadFiles:V}=b(),se=e(),E=!!d,b$1=useRef(null),[ie,j]=useState([]),{t:ce}=useTranslation(),te=(de="file")=>{if(!Se(de,f.context)){se({toastID:nanoid(11),msg:ce("Please select a folder before uploading a file"),clearQueue:false,hideProgressBar:false});return}b$1.current&&b$1.current.click(),r(de),e$1();},Y=async de=>{var u,_;let me=de.target.files;if(me){le(false);let F=Array.from(me).map(S=>({...S,uploadProgress:0})),x=new FormData;if(f.context.params)for(let S in f.context.params)f.context.params.hasOwnProperty(S)&&x.append(S,f.context.params[S]);x.append("fieldName",f.properties.name),Array.from(me).forEach(S=>{x.append("files",S);}),x.append("widgetContext",JSON.stringify({hasParentForm:T.hasParentForm(),originator:(u=f.context.params)==null?void 0:u.originator,folderData:(_=f.context.params)==null?void 0:_.folderData})),x.append("widgetEvent",U.onFileUploadCreateDocumentEvent),x.append("widgetName","attached_files"),x.append("formData",JSON.stringify({...f.context.formData})),x.append("uploadMode",l);let B=Qn.CancelToken.source();try{let S=await V({content:x,cancelTokenSource:B,onUploadProgress:$=>{let xe=Math.round($.loaded/F.length),fe=F.map(we=>({...we,uploadProgress:$.loaded===$.total?100:Math.round(xe*100/we.size)}));j(we=>we.concat(fe));}});if(S.meta.requestStatus==="fulfilled"){let $={...S.payload};f.methodProvider.execCommands($.FECommand);}}catch(S){}b$1.current&&(b$1.current.value="");}},Fe=Se("file",f.context)?"inherit":"#C0C0C0";return jsxs(Fragment,{children:[jsx("input",{type:"file",name:"files",ref:b$1,style:{display:"none"},onChange:Y,multiple:true}),jsxs(Xt,{anchorEl:d,open:E,onClose:e$1,MenuListProps:{"aria-labelledby":"upload-button"},children:[jsxs(Qe,{onPointerUp:()=>te("file"),children:[jsx($e,{sx:{color:Fe},children:jsx(Ie,{action:"uploadfile",applyInternalStyle:true})}),jsx(Ke,{primary:ce("Upload File(s)"),primaryTypographyProps:{fontSize:"0.875rem",color:Fe}})]},"Upload File(s)"),jsxs(Qe,{onPointerUp:()=>te("container"),children:[jsx($e,{children:jsx(Ie,{action:"uploadzipfile",applyInternalStyle:true})}),jsx(Ke,{primary:ce("Upload .ZIP Archive"),primaryTypographyProps:{fontSize:"0.875rem"}})]},"Upload .ZIP Archive")]})]})},na=(d,e,r,l)=>(d._plugincode=e.context.params.pluginCode,d._origformcode=d._code=e.context.params.formCode,Xe("onrowcheckboxclicked",e,d,r,l)),aa=({value:d,style:e})=>{let[r,l]=st.useState(false),f=st.useRef(null);return jsx(re,{title:String(d!=null?d:"").trim()?d:"No data",open:r,arrow:true,children:jsx("div",{ref:f,style:e,onMouseEnter:()=>{f.current&&f.current.scrollWidth>f.current.clientWidth&&l(true);},onMouseLeave:()=>l(false),children:d||""})})},mt=d=>!!(d.readonly&&!d.ignorereadonly),rt=d=>{let e=d.replace(/\s/g,""),r=e.lastIndexOf(","),l=e.lastIndexOf("."),f;return r>l?f=e.replace(/\./g,"").replace(",","."):l>r?f=e.replace(/,/g,""):f=e,parseFloat(f)},$t=(d,e,r,l)=>d===0?"first":d<e?"previous":l>0&&(d+1)*r>=l?"last":"next",lt={rowsPerPage:0,pageIndex:0,serverPaginationEnabled:false,nextToken:"",paginationDirection:"first",previousToken:"",rowCount:0,qId:""},oa={string:"freetext",freetext:"freetext",currency:"price",price:"price",date:"date",datetime:"datetime",number:"number",checkbox:"checkbox"},en=withTranslation()(memo(function(e$1){var wt,ht,bt;let r$1=useRef(false),{runFormEvent:l,viewPort:f}=b(),le=e(),{UserDialog:V$1}=b$1(),se=e$1.properties.name,E=d(se,e$1.properties.pagesize||50),{pageIndex:b$2,pageSize:ie}=E,[j,ce]=useState(null),[te,Y$1]=useState(false),[Fe,de]=useState("single"),[me,u]=useState([]),[_$1,F]=useState(0),[x,B]=useState(),[S,$]=useState(),[xe,fe]=useState(false),[we,Be]=useState(false),[I,v]=useState({delete:{buttonAgree:"",buttonDisagree:"",dialogTitle:"",dialogContent:"",showDialog:false,callBackFunc:()=>{}}}),[P$1,O]=useState(true),[K,Oe]=useState({}),Q=useRef(e$1),Pe=useRef(e$1.context.formData);useEffect(()=>{Q.current=e$1;},[e$1]),useEffect(()=>{Pe.current=e$1.context.formData;},[e$1.context.formData]);let[ra,tn]=useState((wt=e$1.context)==null?void 0:wt.widgetRelatedData),ve=useCallback(async(a,t,i,m,o)=>{Y$1(false),await l({pluginCode:t.context.params.pluginCode,formCode:t.context.params.formCode,guid:t.context.params.guid,projectGuid:t.context.params.pGuid,pGuid:t.context.params.pGuid,formData:t.context.formData,widgetContext:JSON.stringify({referer:m.pathname,parentWidgetId:o,hasParentForm:T.hasParentForm(),originator:{widgetName:t.properties.name.toLowerCase(),params:t.context.params},parent:{widgetName:t.properties.name.toLowerCase(),params:t.context.params},parentOriginator:{params:t.context.params.originator?t.context.params.originator.params:{}},folderData:t.context.params.folderData}),widgetEvent:U.onTableEditRunActionEvent,widgetName:t.properties.name.toLowerCase(),widgetValue:JSON.stringify({action:a,data:i})}).then(g=>{var w;if(g.meta.requestStatus==="fulfilled"){let y={...g.payload};y.FECommand={...y.FECommand,UpdateFieldAllowedValues:y.fieldAllowedValues,UpdateFormData:y.data,UpdateFormDataItem:{name:t.properties.name,value:(w=y.data)==null?void 0:w[t.properties.name]}},t.methodProvider.execCommands(y.FECommand);}});},[]),Te=useCallback(async(a,t,i,m,o,g)=>{Y$1(false),g.toggleAllRowsSelected(false),await l({pluginCode:t.context.params.pluginCode,formCode:t.context.params.formCode,guid:t.context.params.guid,projectGuid:t.context.params.pGuid,pGuid:t.context.params.pGuid,widgetContext:JSON.stringify({referer:m.pathname,parentWidgetId:o,hasParentForm:T.hasParentForm(),originator:{widgetName:t.properties.name.toLowerCase(),params:t.context.params},parent:{widgetName:t.properties.name.toLowerCase(),params:t.context.params},parentOriginator:{params:t.context.params.originator?t.context.params.originator.params:{}},folderData:t.context.params.folderData}),widgetEvent:U.onTableRunBatchActionEvent,widgetName:t.properties.name.toLowerCase(),widgetValue:JSON.stringify({action:a,data:i})}).then(w=>{if(w.meta.requestStatus==="fulfilled"){let y={...w.payload};y.widgetData&&u(Object.values(y.widgetData)),O(true),Y$1(true),y.FECommand&&t.methodProvider.execCommands(y.FECommand);}});},[e$1.context.params.pluginCode,e$1.context.params.formCode,e$1.context.params.guid,e$1.context.params.pGuid,e$1.properties.name,e$1.context.formData]),nn=useCallback((a,t,i,m,o,g)=>{a&&(i.properties.alloweditrow?ve("delete",i,JSON.stringify(m),o,g):Xe(t,i,m,o,g)),v({delete:{buttonAgree:"",buttonDisagree:"",dialogTitle:"",dialogContent:"",showDialog:false,callBackFunc:()=>{}}});},[e$1.properties.alloweditrow]),gt=useCallback((a,t,i,m,o,g,w)=>{a&&Te(t,i,m,g,w,o),v({delete:{buttonAgree:"",buttonDisagree:"",dialogTitle:"",dialogContent:"",showDialog:false,callBackFunc:()=>{}}});},[Te,v]),an=a=>I.delete.callBackFunc(a),Ze=a=>{v(a);},{alloweditrow:he,backendpagination:ne,colactions:on,colgrouping:rn,colordering:ln,colresizing:sn,enableuploadfiles:cn,height:dn,hideaddbutton:mn,newrecordurl:ft,folders:ze,pagination:un,pagesize:Ue,rowactions:gn,rowactiontype:Ve,rowclickas:He,rowdensity:fn,rownumber:yn,rowselection:pn,rowvirtualization:xn,search:wn,searchtype:Ge,selectall:hn,stickyheader:bn,toolbarInternalActions:Cn,topToolbar:Dn,visible:Rn}=e$1.properties,et=un===true,_n=xn!==false&&!et,Fn=et,yt=Ve==="flat"||Ve==="menu"||Ve==="primary",pt=useNavigate(),T$1=useLocation(),{tabId:k$1}=e$1,{t:J,i18n:tt}=useTranslation(),H=(ht=tt==null?void 0:tt.language)==null?void 0:ht.substring(0,2),xt=useCallback((a,t)=>{E.setLastEvaluatedKey(Number(a),t||null);},[E]),We=useCallback(a=>E.getLastEvaluatedKey(Number(a)),[E]),ke=useCallback(async(a,t,i,m,o)=>{var L,N;Y$1(false),a&&(F(0),B(null),$(lt));let g=$t(i.pageIndex,b$2,i.pageSize,_$1),w=We(i.pageIndex-1),y=g==="last"?"":m;xe&&g!=="last"&&(g==="next"&&(y=We(i.pageIndex+1)),g==="previous"&&(w=We(i.pageIndex+1))),await l({DataTableMeta:{serverPaginationEnabled:ne,rowsPerPage:i.pageSize,pageIndex:i.pageIndex,nextToken:y,previousToken:w,paginationDirection:g==="last"?"last":t,rowCount:_$1,qId:o==null?void 0:o.qId,lastRequestLimit:o==null?void 0:o.lastRequestLimit,oppositeDirection:g==="last"||xe},pluginCode:e$1.context.params.pluginCode,formCode:e$1.context.params.formCode,guid:e$1.context.params.guid,projectGuid:e$1.context.params.pGuid,pGuid:e$1.context.params.pGuid,widgetContext:JSON.stringify({referer:T$1.pathname,parentWidgetId:k$1,hasParentForm:T.hasParentForm(),originator:(L=e$1.context.params)==null?void 0:L.originator,parent:e$1.context.params,folderData:(N=e$1.context.params)==null?void 0:N.folderData}),widgetEvent:he?U.onTableEditDataLoad:U.onTableDataLoad,widgetName:e$1.properties.name.toLowerCase(),formData:e$1.context.formData}).then(ae=>{var ue,A,C,be,Z,ye,Ne,Ae,ee;if(ae.meta.requestStatus==="fulfilled"){let s={...ae.payload},c=(ue=s.data)==null?void 0:ue[e$1.properties.name];if(Array.isArray(s.widgetData)&&s.widgetData.length===0&&typeof c=="string"&&c.trim()!==""&&c!=="null"&&c!=="undefined"){let M=JSON.parse(c);u(M!=null?M:{});}else u(Object.values((A=s.widgetData)!=null?A:{})),F((be=(C=s.tableMeta)==null?void 0:C.rowCount)!=null?be:0),B((ye=(Z=s.tableMeta)==null?void 0:Z.nextToken)!=null?ye:null),$((Ne=s.tableMeta)!=null?Ne:{}),(Ae=s.tableMeta)!=null&&Ae.nextToken&&xt(i.pageIndex,(ee=s.tableMeta)==null?void 0:ee.nextToken),Be(false),s.widgetRelatedData&&Object.keys(s.widgetRelatedData).length>0&&(Q.current.context.widgetRelatedData=s.widgetRelatedData);O(a),Y$1(true);}});},[ne,he,We,xe,T$1.pathname,b$2,e$1.context.formData,e$1.context.params,e$1.properties.name,_$1,O,Y$1,B,Be,F,u,$,xt,k$1]),Tn=useCallback(a=>{if(r$1.current&&!ne){r$1.current=false;return}let t;typeof a=="function"?t=a({pageIndex:b$2,pageSize:ie}):t=a;let i=$t(t.pageIndex,b$2,t.pageSize,_$1);if(te&&P$1&&b$2>0){O(false);return}t.pageIndex!==b$2&&E.setPageIndex(Number(t.pageIndex)),t.pageSize!==ie&&E.setPageSize(Number(t.pageSize)),(ne&&t.pageIndex!==b$2||t.pageSize!==ie)&&(Be(true),i==="last"&&fe(true),i==="first"&&fe(false),ke(false,i,t,x,S));},[ne,b$2,_$1,te,P$1,ie,ke,x,S]);useEffect(()=>{var a;tn((a=e$1.context)==null?void 0:a.widgetRelatedData);},[(bt=e$1.context)==null?void 0:bt.widgetRelatedData]),useEffect(()=>{r$1.current=true,E.reset(Number(Ue));},[e$1.properties.name,e$1.context.params]),useEffect(()=>{var a;if(he){let t=(a=e$1.context.formData)==null?void 0:a[e$1.properties.name];if(t){let i=typeof t=="string"?JSON.parse(t):t;u(i);}}},[e$1.context.formData]),useEffect(()=>{(async()=>{var a,t,i,m;if(e$1.context.enableEventHandlers){if(e$1.context.formLayout==="folders"&&!((t=(a=e$1.context.params)==null?void 0:a.folderData)!=null&&t.id)&&!((m=(i=e$1.context.params)==null?void 0:i.folderData)!=null&&m.isRoot))return;ne?b$2===0?ke(true,"first",{pageIndex:0,pageSize:Ue||100},"",lt):ke(false,"current",{pageIndex:b$2,pageSize:ie},x,S):ke(true,"first",{pageIndex:0,pageSize:Ue||100},"",lt);}else Y$1(true);})();},[e$1.properties.name,e$1.context.redrawComponent,he,ne]);let X$1=e$1.methodProvider.findWidgetItem(e$1.id),Le=[],je={};((X$1==null?void 0:X$1.item.properties.datasource.columns)||[]).forEach(a=>{var t;Le[a[1]]=a[0],a[2]&&(je[a[1]]=(t=oa[a[2]])!=null?t:"freetext");});let Mn=((X$1==null?void 0:X$1.item._children)||[]).some(({properties:a})=>{var i,m;if(!a.item_bottomcalc)return false;let t=(m=(i=je[a.item_name])!=null?i:a.item_columntype)!=null?m:a.item_isprice?"price":"freetext";return t==="price"||t==="number"}),Sn=useMemo(()=>{let a$1=[];return ((X$1==null?void 0:X$1.item._children)||[]).map(({properties:t})=>{var i,m,o,g,w,y,L,N,ae,ue,A;if(t.item_name.toString()!==""){let C=(i=je[t.item_name])!=null?i:"";C||(C=(m=t.item_columntype)!=null?m:"freetext",t.item_columntype||(t.item_isdate===true?C="date":t.item_isdatetime===true?C="datetime":t.item_ischeckbox===true?C="checkbox":t.item_isprice===true?C="price":C="freetext"));let be=C==="checkbox",Z=C==="price",ye=C==="number",Ne=C==="date",Ae=C==="datetime",ee={};be?ee={accessorKey:t.item_name,muiTableHeadCellProps:{align:(o=t.style.item_textalign)!=null?o:"left"},muiTableBodyCellProps:{align:(g=t.style.item_ctextalign)!=null?g:"left"},header:t.item_title||Le[t.item_name],Header:()=>{let s=t.item_title||Le[t.item_name];return t.item_displaytooltip?jsx(re,{title:s,arrow:true,children:jsx("span",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"},children:s})}):jsx("span",{children:s})},Cell:({row:s})=>{var c;return jsx("span",{style:{borderBottom:"none",padding:"0px",height:"36px"},children:jsx(Jn,{checked:Array.isArray((c=Q.current.context)==null?void 0:c.widgetRelatedData)&&Q.current.context.widgetRelatedData.includes(s.original._sk),onPointerUp:()=>na(s.original,Q.current,T$1,k$1),style:{margin:0}})})},size:parseInt(t.item_minsize,10)||void 0,enableSorting:(w=t.item_enablesorting)!=null?w:false,enableHiding:(y=t.item_visible)!=null?y:true,grow:true}:(ee={accessorKey:t.item_name.toString(),muiTableHeadCellProps:{align:(L=t.style.item_textalign)!=null?L:"left"},muiTableBodyCellProps:{align:(N=t.style.item_ctextalign)!=null?N:"left"},header:t.item_title.toString()||Le[t.item_name],Header:()=>{let s=t.item_title.toString()||Le[t.item_name];return t.item_displaytooltip?jsx(re,{title:s,arrow:true,children:jsx("span",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"},children:s})}):jsx("span",{children:s})},size:parseInt(t.item_minsize,10)||void 0,enableSorting:(ae=t.item_enablesorting)!=null?ae:false,enableHiding:t.item_visible===true,grow:true,muiEditTextFieldProps:{required:true,error:!!(K!=null&&K.firstName),helperText:K==null?void 0:K.firstName,onFocus:()=>Oe({...K,[t.item_name.toString()]:void 0})},Cell:({cell:s})=>{var M;let c=(M=s.getValue())!=null?M:"";if(Z&&c){let p=rt(c);if(!isNaN(p)){let h=t.item_fixedlocale||"",G=t.item_format==="fixed-locale"&&h?h:H||void 0,R=t.item_inputfield&&Pe.current&&Pe.current[t.item_inputfield]||""||t.item_currency||"",Ce=t.item_format==="locale"?k(H!=null?H:""):t.item_format==="fixed-locale"&&h?k(h):void 0,De=R||Ce||"";try{let pe=t.item_currencydisplay||"";De&&pe!==""?c=new Intl.NumberFormat(G,{style:"currency",currency:De,currencyDisplay:pe,minimumFractionDigits:2,maximumFractionDigits:2}).format(p):c=new Intl.NumberFormat(G,{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(p);}catch(pe){c=p.toFixed(2);}}}if(ye&&c){let p=rt(c);isNaN(p)||(c=p.toLocaleString());}if(Ne&&c){let p=(()=>{if(/^\d{4}-\d{2}-\d{2}/.test(c)){let h=a(c);if(h.isValid())return h}return a(c,"DD.MM.YYYY",true)})();if(p.isValid())try{c=new Intl.DateTimeFormat(H||void 0,{dateStyle:"short"}).format(p.toDate());}catch(h){}}if(Ae&&c){let p=(()=>{if(/^\d{4}-\d{2}-\d{2}/.test(c)){let h=a(c);if(h.isValid())return h}return a(c,"DD.MM.YYYY HH:mm",true)})();if(p.isValid())try{c=new Intl.DateTimeFormat(H||void 0,{dateStyle:"short",timeStyle:"short"}).format(p.toDate());}catch(h){}}return t.item_displaytooltip?jsx(aa,{value:c,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:`${parseInt(t.item_maxsize,10)||150}px`,minWidth:"50px",cursor:"default"}}):jsx(Fragment,{children:c})}},t.item_bottomcalc&&(Z||ye)&&(ee.muiTableFooterCellProps={align:(A=(ue=t.style)==null?void 0:ue.item_ctextalign)!=null?A:"left"},ee.Footer=({table:s})=>{var G,D;let c=(G=s.getState().creatingRow)==null?void 0:G.id,M=(D=s.getState().editingRow)==null?void 0:D.id,p=s.getFilteredRowModel().rows.reduce((R,Ce)=>{if(Ce.id===c||Ce.id===M)return R;let De=Ce.getValue(t.item_name.toString()),pe=rt(String(De!=null?De:""));return R+(isNaN(pe)?0:pe)},0),h=p.toLocaleString(H||void 0,{minimumFractionDigits:Z||ye?2:0,maximumFractionDigits:Z||ye?2:0});if(Z){let R=t.item_fixedlocale||"",Ce=t.item_format==="fixed-locale"&&R?R:H||void 0,pe=t.item_inputfield&&Pe.current&&Pe.current[t.item_inputfield]||""||t.item_currency||"",Un=t.item_format==="locale"?k(H!=null?H:""):t.item_format==="fixed-locale"&&R?k(R):void 0,Ct=pe||Un||"",Dt=t.item_currencydisplay||"";if(Ct&&Dt!=="")try{h=new Intl.NumberFormat(Ce,{style:"currency",currency:Ct,currencyDisplay:Dt,minimumFractionDigits:2,maximumFractionDigits:2}).format(p);}catch(ca){h=p.toFixed(2);}}return jsx("b",{children:h})})),Ne?ee.sortingFn=(s,c,M)=>{let p=s.getValue(M),h=c.getValue(M),G=D=>{if(!D)return a("1900-01-01");if(/^\d{4}-\d{2}-\d{2}/.test(D)){let R=a(D);if(R.isValid())return R}return a(D,"DD.MM.YYYY",true)};try{let D=G(p),R=G(h);return D.isBefore(R)?-1:D.isAfter(R)?1:0}catch(D){return 0}}:Ae?ee.sortingFn=(s,c,M)=>{let p=s.getValue(M),h=c.getValue(M),G=D=>{if(!D)return a("1900-01-01T00:00:00");if(/^\d{4}-\d{2}-\d{2}/.test(D)){let R=a(D);if(R.isValid())return R}return a(D,"DD.MM.YYYY HH:mm",true)};try{let D=G(p),R=G(h);return D.isBefore(R)?-1:D.isAfter(R)?1:0}catch(D){return 0}}:(Z||ye)&&(ee.sortingFn=(s,c,M)=>{let p=parseFloat(s.getValue(M))||0,h=parseFloat(c.getValue(M))||0;return p-h}),He&&He!=="none"&&(ee.Cell=({row:s})=>jsx("div",{style:{cursor:"pointer",width:"100%",padding:"0.7em"},onPointerUp:()=>{var M,p,h,G,D,R;let c={pluginCode:s.original._plugincode,formCode:s.original._origformcode,guid:null,originator:(M=Q.current.context.params)==null?void 0:M.originator,pGuid:(p=Q.current.context.params)==null?void 0:p.pGuid,folderData:Q.current.context.params.folderData};He==="new"&&(G=(h=Q.current.context)==null?void 0:h.params)!=null&&G.modalCloseFn&&((R=(D=Q.current.context)==null?void 0:D.params)==null||R.modalCloseAndOpenFn(c));},children:s.getValue(t.item_name.toString())})),a$1.push(ee);}}),a$1},[H,K,He,k$1]),In=a=>{ce(a.currentTarget);},Pn=()=>{ce(null);},vn=useCallback(()=>{var t,i;if(!ze)return null;var a=(i=(t=e$1.context.params)==null?void 0:t.folderData)==null?void 0:i.captions;return a==null||a.length===0?null:(a=a.slice(1),jsx("span",{style:{display:"flex",alignItems:"center"},children:a.map((m,o)=>jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[m,o<a.length-1&&jsx(d$1,{style:{margin:"0 8px",fontSize:"0.6rem",color:"#666"}},`chevron-${o}`)]},`caption-${o}`))}))},[ze,e$1.context.params.folderData]),kn={density:fn,expanded:true,grouping:[],isFullScreen:false,pagination:{pageIndex:b$2||0,pageSize:Number(ie)||Ue},columnVisibility:{id:false}},Ln=useCallback((a,t)=>{var i=[];a.forEach(m=>{var g,w,y,L,N,ae;let o=m.original;i.push({_sk:(g=o._sk)!=null?g:null,_code:(w=o._fcode)!=null?w:o._code,_origformcode:(L=(y=o._origformcode)!=null?y:o._fcode)!=null?L:o._code,_plugincode:(N=o._plcode)!=null?N:o._plugincode,_desc:(ae=o._desc)!=null?ae:null});}),i.length>0&&Te("createsigncontainer",e$1,i,T$1,k$1,t);},[Te,e$1,T$1,k$1]),Nn=useCallback((a,t)=>{var i=[];a.forEach(m=>{var g,w,y,L,N;let o=m.original;i.push({_sk:(g=o._sk)!=null?g:null,_code:(w=o._fcode)!=null?w:o._code,_origformcode:(L=(y=o._origformcode)!=null?y:o._fcode)!=null?L:o._code,_plugincode:(N=o._plcode)!=null?N:o._plugincode});}),i.length>0&&Te("download",e$1,i,T$1,k$1,t);},[Te,e$1,T$1,k$1]),An=useCallback((a,t)=>{var i=[];a.forEach(m=>{var g,w,y,L,N;let o=m.original;i.push({_sk:(g=o._sk)!=null?g:null,_code:(w=o._fcode)!=null?w:o._code,_origformcode:(L=(y=o._origformcode)!=null?y:o._fcode)!=null?L:o._code,_plugincode:(N=o._plcode)!=null?N:o._plugincode});}),Ze({delete:{showDialog:true,dialogTitle:J("Delete")+" ?",dialogContent:J("Are you certain that you wish to delete selected records?"),buttonAgree:J("Continue"),buttonDisagree:J("Close"),callBackFunc:m=>gt(m,"delete",e$1,i,t,T$1,k$1)}});},[Ze,gt,J,e$1,T$1,k$1]),En=useCallback(async({values:a,table:t})=>{ve("add",e$1,JSON.stringify(a),T$1,k$1),t.setCreatingRow(null);},[ve,e$1,T$1,k$1]),Bn=useCallback(async({values:a,table:t,row:i})=>{let m={...i.original,...a};ve("edit",e$1,JSON.stringify(m),T$1,k$1),t.setEditingRow(null);},[ve,e$1,T$1,k$1]),[la,On]=useState(null);if(!Rn)return null;let Ye=Se("file",e$1.context)?"primary":"#C0C0C0",zn=Se("file",e$1.context)?"contained":"outlined";return jsxs(Fragment,{children:[ze&&jsx("div",{style:{paddingBottom:"0.8rem",fontSize:"0.85rem",color:"#666",marginLeft:"0.2rem"},children:vn()}),jsx("div",{style:{maxWidth:e$1.context.isModal?f.width-30:void 0},children:jsx(Suspense,{fallback:jsx(Yn,{}),children:jsx(Zn,{locale:H,columns:Sn,enableBottomToolbar:Fn,enableTableFooter:Mn,createDisplayMode:"row",editDisplayMode:"row",enableEditing:false,enableColumnActions:on,enableColumnOrdering:ln,enableColumnResizing:sn,enableGlobalFilter:wn,enableGlobalFilterModes:true,globalFilterModeOptions:[Ge||"startsWith"],globalFilterFn:Ge||"startsWith",enableGrouping:rn,enablePagination:et,manualPagination:ne!=null?ne:false,enableRowActions:yt,enableRowNumbers:yn,enableRowSelection:pn,enableRowVirtualization:_n,enableSelectAll:hn,enableStickyHeader:bn,enableToolbarInternalActions:Cn,enableTopToolbar:Dn,onCreatingRowSave:En,onEditingRowSave:Bn,darkMode:false,data:me,icons:{SaveIcon:()=>jsx(r,{color:ea,style:{fontSize:"1.2rem"}}),CancelIcon:()=>jsx(P,{color:"gray",style:{fontSize:"1.2rem"}})},initialState:kn,isLoading:!te,muiTableContainerProps:{sx:{maxHeight:dn}},name:e$1.properties.name,pageIndex:b$2,pageSize:ie,muiPaginationProps:{rowsPerPageOptions:[50,100,300,500],disabled:we},onPaginationChange:Tn,positionActionsColumn:"last",displayColumnDefOptions:{"mrt-row-actions":yt?{header:"",minSize:f.isMobileDevice?75:270,enableHiding:false}:void 0},rowOnDoubleClick:a=>{!he&&!mt(e$1.properties)&&Xe("edit",e$1,a,T$1,k$1);},rowCount:ne?_$1:void 0,renderToolbarInternalActions:({table:a})=>jsx(Kt,{children:!f.isMobileDevice&&jsxs(Fragment,{children:[!he&&jsx(_,{table:a}),jsx(Y,{table:a}),jsx(W,{table:a}),jsx(X,{table:a}),!e$1.context.isModal&&jsx(Z,{table:a})]})}),renderTopToolbarCustomActions:({table:a})=>{var t$1,i,m,o,g$1,w,y,L,N$1,ae;return jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[a.getSelectedRowModel().rows.length===0&&ze&&e$1.context.formLayout==="folders"&&jsx(Fragment,{children:jsx(re,{title:(i=(t$1=e$1.properties)==null?void 0:t$1.newFolderLabel)!=null?i:J("New Folder"),children:jsx(_e,{style:{marginRight:"5px"},color:"primary",onPointerUp:()=>e$1.context.isModal||e$1.context.hasParentForm?e$1.methodProvider.eventDispatcher({widgetName:e$1.properties.name.toLowerCase(),widgetValue:null,widgetEvent:U.onFolderCreateRecordEvent,widgetContext:JSON.stringify({referer:T$1.pathname,parentWidgetId:k$1,hasParentForm:T.hasParentForm(),parentOriginator:{params:e$1.context.params.originator?e$1.context.params.originator.params:{}},originator:{params:e$1.context.params,widgetName:e$1.properties.name.toLowerCase()},parent:{widgetName:e$1.properties.name.toLowerCase(),params:e$1.context.params},isModal:e$1.context.isModal,folderData:e$1.context.params.folderData})}):pt(`${T$1.pathname}/new`,{state:{from:T$1.pathname}}),variant:"outlined",children:jsx(t,{})})})}),a.getSelectedRowModel().rows.length===0&&!mn&&jsx(Fragment,{children:jsx(re,{title:(o=(m=e$1.properties)==null?void 0:m.addrecordlabel)!=null?o:J("Add Record"),children:jsx(_e,{disabled:mt(e$1.properties),color:"primary",sx:{color:Ye,borderColor:Ye},style:{marginRight:"5px"},onPointerUp:()=>{if(!Se("file",e$1.context)){le({toastID:nanoid(11),msg:J("Please select a folder before adding a document"),clearQueue:false,hideProgressBar:false});return}if(he){let ue={};((X$1==null?void 0:X$1.item._children)||[]).forEach(({properties:A})=>{var be,Z;if(!A.item_increment||!A.item_name)return;let C=(be=je[A.item_name])!=null?be:"";C||(C=(Z=A.item_columntype)!=null?Z:"freetext",A.item_columntype||(A.item_isdate?C="date":A.item_isdatetime?C="datetime":A.item_ischeckbox?C="checkbox":A.item_isprice?C="price":C="freetext")),C==="number"&&(ue[A.item_name.toString()]=me.length+1);}),Object.keys(ue).length>0?a.setCreatingRow(V(a,ue)):a.setCreatingRow(true);}else return ft?pt(`${T$1.pathname}/${ft}`,{state:{from:T$1.pathname}}):e$1.methodProvider.eventDispatcher({widgetName:e$1.properties.name.toLowerCase(),widgetValue:null,widgetEvent:U.onTableCreateRecordEvent,widgetContext:JSON.stringify({referer:T$1.pathname,parentWidgetId:k$1,hasParentForm:true,parentOriginator:{params:e$1.context.params.originator?e$1.context.params.originator.params:{}},originator:{params:e$1.context.params,widgetName:e$1.properties.name.toLowerCase()},parent:{widgetName:e$1.properties.name.toLowerCase(),params:e$1.context.params},isModal:e$1.context.isModal,folderData:e$1.context.params.folderData})})},variant:"outlined",children:jsx(p,{})})})}),a.getSelectedRowModel().rows.length===0&&cn&&jsx(Fragment,{children:jsx(re,{title:(w=(g$1=e$1.properties)==null?void 0:g$1.uploadFilesLabel)!=null?w:J("Upload Files"),children:jsx(_e,{color:"primary",onPointerUp:In,variant:"outlined",children:jsx(h,{})})})}),a.getSelectedRowModel().rows.length>0&&jsxs(Fragment,{children:[e$1.context.formLayout==="folders"&&a.getSelectedRowModel().rows.length>1&&jsx(Fragment,{children:jsx(re,{title:J("Create Container"),children:jsx(_e,{style:{marginRight:"5px",color:Ye,borderColor:Ye},onPointerUp:()=>{if(!Se("file",e$1.context)){le({toastID:nanoid(11),msg:J("Please select a folder before creating a container"),clearQueue:false,hideProgressBar:false});return}Ln(a.getSelectedRowModel().rows,a);},variant:zn,children:jsx(q,{})})})}),jsxs(Fragment,{children:[jsx(re,{title:(L=(y=e$1.properties)==null?void 0:y.downloadLabel)!=null?L:J("Download"),children:jsx(_e,{style:{marginRight:"5px"},onPointerUp:()=>Nn(a.getSelectedRowModel().rows,a),variant:"contained",children:jsx(g,{})})}),jsx(re,{title:(ae=(N$1=e$1.properties)==null?void 0:N$1.deleteLabel)!=null?ae:J("Delete"),children:jsx(_e,{style:{marginRight:"5px"},onPointerUp:()=>An(a.getSelectedRowModel().rows,a),variant:"contained",children:jsx(N,{})})})]})]}),jsx(ta,{anchorEl:j,handleClose:Pn,setUploadMode:de,uploadMode:Fe,props:e$1,setLoaded:Y$1})]})},...ia(e$1,gn,Ve,f.isMobileDevice,Ze,nn)},H)})}),jsx(V$1,{...I.delete,handleDialogClose:an})]})})),Ie=d=>{let e=null,r=d.action,l$1=d.applyInternalStyle?{fontSize:"1em",marginRight:"0.5em"}:{};return r==="open"?e=jsx(n,{style:l$1}):r==="copy"?e=jsx(i,{style:l$1}):r==="confirm"?e=jsx(w,{style:{...l$1,fontSize:"1.6em"}}):r==="edit"?e=jsx(A,{style:l$1}):r==="editrow"?e=jsx(n,{style:l$1}):r==="amend"?e=jsx(b$2,{style:l$1}):r==="delete"?e=jsx(N,{style:l$1}):r==="lock"?e=jsx(y,{style:l$1}):r==="unlock"?e=jsx(x,{style:l$1}):r==="print"?e=jsx(C,{style:l$1}):r==="preview"?e=jsx(n,{style:l$1}):r==="sign"?e=jsx(q,{style:l$1}):r==="download"?e=jsx(l,{style:l$1}):r==="uploadfile"?e=jsx(O,{style:l$1}):r==="uploadzipfile"&&(e=jsx(o,{style:l$1})),e},ia=(d,e,r,l,f,le)=>{var de,me;let V=typeof e=="string"?JSON.parse(e):e!=null?e:[],se=useLocation(),{t:E}=useTranslation(),{tabId:b}=d,ie=(me=(de=d.properties)==null?void 0:de.rowactionlabels)!=null?me:{},j=(u,_)=>ie[u]||E(_),ce={color:"text.secondary","&:hover":{color:"primary.main"},"&:focus":{color:"primary.main"},fontSize:"1.1em",marginRight:"0.5em"},te=(u,_,F)=>u==="delete"?()=>{f({delete:{showDialog:true,dialogTitle:`${j("delete","Delete")} ?`,dialogContent:j("deleteConfirmContent","Are you certain that you wish to delete this record?"),buttonAgree:j("deleteConfirmAgree","Continue"),buttonDisagree:j("deleteConfirmDisagree","Close"),callBackFunc:x=>le(x,"delete",d,F,se,b)}});}:u==="editrow"?()=>{_.closeMenu(),_.table.setEditingRow(_.row);}:()=>{var x;(x=_.closeMenu)==null||x.call(_),Xe(u,d,F,se,b);},Y=({entryType:u,mode:_})=>{let F=u.row.original,[x,B]=st.useState(null),S=I=>{B(I.currentTarget);},$=()=>{B(null);},xe=()=>jsx(Fragment,{children:Object.entries(V).map(([I,v])=>{if(!v)return null;let P=I.replace("action_",""),O=te(P,u,F);return jsx("span",{children:jsx(re,{title:j(P,P.charAt(0).toUpperCase()+P.slice(1)),children:jsx(qt,{sx:ce,onPointerUp:O,children:jsx(Ie,{action:P})})})},I)})}),fe={};if(F._primAct){let I=F._primAct;if(Object.values(Zt).includes(I)){Object.values(dt).includes(I)&&(fe.edit=true,V.action_edit&&delete V.action_edit);let v="action_"+I.toLowerCase();fe[v]=true,V[v]&&delete V[v];}}return jsxs(Kt,{sx:{display:"flex",flexWrap:"nowrap",gap:"8px",justifyContent:"center",alignItems:"center"},children:[_===0&&jsx(xe,{}),_===1&&jsxs(Fragment,{children:[jsx(()=>jsx(Fragment,{children:Object.entries(fe).map(([I,v])=>{if(!v)return null;let P=I.replace("action_",""),O=te(P,u,F),K=Object.values(dt).includes(P.toUpperCase()),Oe=P.charAt(0).toUpperCase()+P.slice(1),Q=Oe==="Edit"?j("open","Open"):j(P,Oe);return jsx(_e,{onClick:O,startIcon:jsx(Ie,{action:P==="edit"?"open":P}),variant:"contained",size:"small",sx:{textTransform:"none",fontSize:"0.75rem",height:"28px",borderRadius:"4px",boxShadow:"none",backgroundColor:K?"actionbtnok.main":"regularbtn.main",color:"#fff","&:hover":{backgroundColor:K?"actionbtnok.hover":"regularbtn.hover",boxShadow:"none"},minInlineSize:"7.5em"},children:Q},I)})}),{}),jsx(()=>{let I=x?x.getBoundingClientRect():null;return jsxs("span",{style:{paddingLeft:"1.5em"},children:[jsx(qt,{sx:ce,onClick:S,id:"dropdown-button",children:jsx(Xn,{})}),jsx(Xt,{anchorEl:x,open:!!x,onClose:$,PaperProps:{sx:{borderRadius:2,minWidth:180,py:1,boxShadow:3,top:I?`${I.top+5}px !important`:"auto",left:I?`${I.left+15}px !important`:"auto",zIndex:v=>v.zIndex.modal+1}},children:Object.entries(V).map(([v,P])=>{if(!P)return null;let O=v.replace("action_","");return jsxs(Qe,{onClick:()=>{$(),te(O,u,F)();},sx:{px:2,py:1},children:[jsx($e,{sx:{minWidth:"unset",mr:1},children:jsx(Ie,{action:O==="print"?"preview":O,applyInternalStyle:true})}),jsx(Ke,{primaryTypographyProps:{fontSize:"0.875rem"},children:j(O,O.charAt(0).toUpperCase()+O.slice(1))})]},v)})})]})},{})]})]})},Fe=u=>{let _=u.row.original;return [jsx(qn,{onClickAway:()=>{var F;return (F=u.closeMenu)==null?void 0:F.call(u)},children:jsx($n,{sx:{minWidth:"12em",py:0,background:"none"},children:Object.entries(V).map(([F,x])=>{if(!x)return null;let B=F.replace("action_",""),S=te(B,u,_);return jsxs(Qe,{disabled:mt(d.properties),onPointerUp:S,children:[jsx($e,{children:jsx(Ie,{action:B==="print"?"preview":B,applyInternalStyle:true})}),jsx(Ke,{primaryTypographyProps:{fontSize:"0.875rem"},children:j(B,B.charAt(0).toUpperCase()+B.slice(1))})]},F)})})},"row-action-menu")]};return r==="flat"&&!l?{renderRowActions:u=>jsx(Y,{entryType:u,mode:0})}:r==="menu"||r!=="none"&&l?{renderRowActionMenuItems:u=>Fe(u)}:r==="primary"?{renderRowActions:u=>jsx(Y,{entryType:u,mode:1})}:{}};en.displayName="_Datatable";var Wa=en;export{Wa as Datatable};
@@ -1 +0,0 @@
1
- import {i,h}from'./chunk-OUDAQ5Y2.js';import'./chunk-U4T4ACDE.js';import {b}from'./chunk-LBMVBVXW.js';import {q}from'./chunk-LUSAHRNJ.js';import {P}from'./chunk-AR42AC7J.js';import'./chunk-5TBO732O.js';import {lazy,useState,useCallback,useEffect,Suspense}from'react';import {nanoid}from'@reduxjs/toolkit';import Y from'@mui/material/IconButton';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function U(e){var o;return (o=e==null?void 0:e.split(".").pop())==null?void 0:o.toLowerCase()}var ee=lazy(()=>import('./xlsxviewer-UIHZH2TH.js')),ne=lazy(()=>import('./pdfviewer-N2MFEAIK.js')),te=lazy(()=>import('./imageviewer-JP7IPEYU.js')),oe=lazy(()=>import('./videopreviewer-VSZT5ZED.js')),ie=lazy(()=>import('./mdaviewer-U6NPB3H5.js')),E=lazy(()=>import('./nopreviewer-PU2R7N7D.js')),re=({fileId:e,fileName:o,fileInBase64:n,enableChunkDownload:c,downloadByChunkAsync:g,preSignedUrl:i,mdaState:f})=>{if(n===null&&!c&&!i&&(!f||Object.keys(f).length===0))return null;let l=U(e);if(n!==null&&!c)switch(l){case "xls":case "xlsx":return jsx(ee,{fileInbase64:n});case "doc":case "docx":case "pdf":return jsx(ne,{fileName:o,fileInbase64:n});case "png":case "jpg":case "jpeg":case "gif":return jsx(te,{fileInbase64:n});default:return jsx(E,{fileName:o,enableChunkDownload:false,downloadByChunkAsync:g,fileInbase64:n})}else return ["mp4"].includes(l)?jsx(oe,{preSignedUrl:i,fileExtension:l}):["dwg"].includes(l)?jsx(ie,{mdaState:f}):jsx(E,{fileName:o,enableChunkDownload:c,downloadByChunkAsync:g,fileInbase64:n})},se=e=>e>100*1024*1024?10*1024*1024:e>10*1024*1024?5*1024*1024:256*1024,le=({params:e,fieldName:o,fileId:n,fileBase64:c})=>{let[g,i$1]=useState(false),[f,l]=useState(c),[V,z]=useState(false),[A,R]=useState(0),[j,O]=useState("application/octet-stream"),[B,_]=useState(),[T,W]=useState({urn:"",accessToken:""}),{appSettings:k,runFormGetLinkedFileByChunks:I,runFormGetPresignedUrl:N,runFormGetMdaUrn:G,runFormGetLinkedFileEvent:X,runFormGetLinkedFileMetaEvent:H}=b(),K=async()=>{let a=A,y=j,m=se(a),r=0,s=false,h=[];for(;!s&&r<a;){let p=(await I({...e,projectGuid:e.pGuid,pGuid:e.pGuid,fieldName:o,fileId:n,context:{action:"Preview"},range:`bytes=${r}-${Math.min(r+m-1,a-1)}`})).payload;p&&p.byteLength>0?(h.push(p),r+=p.byteLength):s=true;}let C=new Blob(h,{type:y}),d=document.createElement("a");d.href=URL.createObjectURL(C),d.download=b$1,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(d.href);},S=useCallback(async()=>{var y;if(!n)return;let a=U(n);if(["mp4"].includes(a)){let r=(await N({...e,projectGuid:e.pGuid,pGuid:e.pGuid,fieldName:o,fileId:n,context:{action:"Preview"}})).payload,{presignedUrl:s}=r;_(s),i$1(true);return}if(["dwg"].includes(a)&&G){let r=(await G({...e,projectGuid:e.pGuid,pGuid:e.pGuid,fieldName:o,fileId:n,context:{action:"Preview"}})).payload,{mdaState:s}=r;W(s),i$1(true);return}try{let r=(await H({...e,projectGuid:e.pGuid,pGuid:e.pGuid,fieldName:o,fileId:n,context:{action:"Preview"}})).payload,{linkedFileSize:s,linkedFileMimeType:h}=r;if(!s)throw new Error("File data or metadata is missing");let C=(y=k==null?void 0:k.MAX_DOWNLOAD_NOCHUNK_FILESIZE)!=null?y:i.MAX_DOWNLOAD_NOCHUNK_FILESIZE;if(s>C)z(!0),R(s),O(h),i$1(!0);else {let v=(await X({...e,projectGuid:e.pGuid,pGuid:e.pGuid,fieldName:o,fileId:n,context:{action:"Preview"}})).payload,{linkedFile:p}=v;l(p),i$1(!0);}}catch(m){}},[e,o,n,l,i$1]);if(useEffect(()=>(c?(l(c),i$1(true)):S(),()=>{l(null),i$1(false);}),[c,S]),!g)return jsx(q,{text:"",size:120,textVariant:"body2",variant:void 0});let b$1=(n==null?void 0:n.split("/").pop())||"",Z=nanoid(11);return jsx(h,{id:Z,component:jsxs(Fragment,{children:[jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[jsx("div",{style:{flex:1,marginLeft:"1.3em",fontSize:"1em",fontWeight:"bold"},children:b$1}),e.modalCloseFn&&jsx("div",{style:{width:"2.5em"},children:jsx(Y,{onClick:e.modalCloseFn,children:jsx(P,{})})})]}),jsx(Suspense,{fallback:jsx(q,{text:"",size:120,textVariant:"body2",variant:void 0}),children:jsx(re,{fileId:n,fileName:b$1,fileInBase64:f,enableChunkDownload:V,downloadByChunkAsync:K,preSignedUrl:B,mdaState:T})})]}),onCloseModal:e.modalCloseFn,parentId:null,windowMode:"fullWindow"})},he=le;export{he as default};
@@ -1 +0,0 @@
1
- export{a as Formeditor,b as widgetInitialStyle}from'./chunk-XYI7KD7R.js';import'./chunk-HPLI4IP5.js';import'./chunk-PID7YDC2.js';import'./chunk-POE6K4NQ.js';import'./chunk-ZCUM65IT.js';import'./chunk-FRAOYRZD.js';import'./chunk-OUDAQ5Y2.js';import'./chunk-TYVVEP34.js';import'./chunk-U4T4ACDE.js';import'./chunk-LBMVBVXW.js';import'./chunk-LUSAHRNJ.js';import'./chunk-AR42AC7J.js';import'./chunk-SDIZEEZP.js';import'./chunk-5TBO732O.js';