freemium-survey-components 1.0.375 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.js +1 -1
- package/package.json +12 -12
package/lib/index.cjs.js
CHANGED
|
@@ -32,4 +32,4 @@ const n4=({addFilter:e,utils:t})=>{const{Type:n,replaceInString:a,toNaturalFileS
|
|
|
32
32
|
* FilePondPluginFileValidateType 1.2.9
|
|
33
33
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
34
34
|
* Please visit https://pqina.nl/filepond/ for details.
|
|
35
|
-
*/;const a4=({addFilter:e,utils:t})=>{const{Type:n,isString:a,replaceInString:r,guesstimateMimeType:i,getExtensionFromFilename:o,getFilenameFromURL:s}=t,l=(e,t)=>e.some((e=>{return/\*$/.test(e)?(n=e,(/^[^/]+/.exec(t)||[]).pop()===n.slice(0,-2)):e===t;var n})),c=(e,t,n)=>{if(0===t.length)return!0;const r=(e=>{let t="";if(a(e)){const n=s(e),a=o(n);a&&(t=i(a))}else t=e.type;return t})(e);return n?new Promise(((a,i)=>{n(e,r).then((e=>{l(t,e)?a():i()})).catch(i)})):l(t,r)};return e("SET_ATTRIBUTE_TO_OPTION_MAP",(e=>Object.assign(e,{accept:"acceptedFileTypes"}))),e("ALLOW_HOPPER_ITEM",((e,{query:t})=>!t("GET_ALLOW_FILE_TYPE_VALIDATION")||c(e,t("GET_ACCEPTED_FILE_TYPES")))),e("LOAD_FILE",((e,{query:t})=>new Promise(((n,a)=>{if(!t("GET_ALLOW_FILE_TYPE_VALIDATION"))return void n(e);const i=t("GET_ACCEPTED_FILE_TYPES"),o=t("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),s=c(e,i,o),l=()=>{const e=i.map((e=>t=>null!==e[t]&&(e[t]||t))(t("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"))).filter((e=>!1!==e)),n=e.filter(((t,n)=>e.indexOf(t)===n));a({status:{main:t("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:r(t("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:n.join(", "),allButLastType:n.slice(0,-1).join(", "),lastType:n[n.length-1]})}})};if("boolean"==typeof s)return s?n(e):l();s.then((()=>{n(e)})).catch(l)})))),{options:{allowFileTypeValidation:[!0,n.BOOLEAN],acceptedFileTypes:[[],n.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",n.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",n.STRING],fileValidateTypeLabelExpectedTypesMap:[{},n.OBJECT],fileValidateTypeDetectType:[null,n.FUNCTION]}}};"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:a4}));Ml('/*!\n * FilePond 4.30.6\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n.filepond--assistant{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--browser.filepond--browser{position:absolute;margin:0;padding:0;left:1em;top:1.75em;width:calc(100% - 2em);opacity:0;font-size:0}.filepond--data{position:absolute;width:0;height:0;padding:0;margin:0;border:none;visibility:hidden;pointer-events:none;contain:strict}.filepond--drip{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;opacity:.1;pointer-events:none;border-radius:.5em;background:rgba(0,0,0,.01)}.filepond--drip-blob{-webkit-transform-origin:center center;transform-origin:center center;width:8em;height:8em;margin-left:-4em;margin-top:-4em;background:#292625;border-radius:50%}.filepond--drip-blob,.filepond--drop-label{position:absolute;top:0;left:0;will-change:transform,opacity}.filepond--drop-label{right:0;margin:0;color:#4f4f4f;display:flex;justify-content:center;align-items:center;height:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;text-align:center;line-height:1.5}.filepond--label-action{-webkit-text-decoration:underline;text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;-webkit-text-decoration-color:#a7a4a4;text-decoration-color:#a7a4a4;cursor:pointer}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{font-size:1em;width:1.625em;height:1.625em;font-family:inherit;line-height:inherit;margin:0;padding:0;border:none;outline:none;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file-action-button.filepond--file-action-button svg{width:100%;height:100%}.filepond--file-action-button.filepond--file-action-button:after{position:absolute;left:-.75em;right:-.75em;top:-.75em;bottom:-.75em;content:""}.filepond--file-action-button{cursor:auto;color:#fff;border-radius:50%;background-color:rgba(0,0,0,.5);background-image:none;box-shadow:0 0 0 0 hsla(0,0%,100%,0);transition:box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{box-shadow:0 0 0 .125em hsla(0,0%,100%,.9)}.filepond--file-action-button[disabled]{color:hsla(0,0%,100%,.5);background-color:rgba(0,0,0,.25)}.filepond--file-action-button[hidden]{display:none}.filepond--action-edit-item.filepond--action-edit-item{width:2em;height:2em;padding:.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=center]{margin-left:-.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=bottom]{margin-bottom:-.1875em}.filepond--action-edit-item-alt{border:none;line-height:inherit;background:transparent;font-family:inherit;color:inherit;outline:none;padding:0;margin:0 0 0 .25em;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{width:1.3125em;height:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--file-info{position:static;display:flex;flex-direction:column;align-items:flex-start;flex:1;margin:0 .5em 0 0;min-width:0;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{position:static;display:flex;flex-direction:column;align-items:flex-end;flex-grow:0;flex-shrink:0;margin:0;min-width:2.25em;text-align:right;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;margin:0;padding:0;min-width:0;height:100%}.filepond--file-wrapper.filepond--file-wrapper>legend{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file{position:static;display:flex;height:100%;align-items:flex-start;padding:.5625em;color:#fff;border-radius:.5em}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state~=processing] .filepond--file-status-sub{opacity:0}[data-filepond-item-state~=processing] .filepond--action-abort-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-error] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-error] .filepond--action-retry-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{-webkit-animation:fall .5s linear .125s both;animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--processing-complete-indicator:not([style*=hidden])~.filepond--file-status .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{-webkit-animation:shake .65s linear both;animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@-webkit-keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:"";position:absolute;left:0;top:0;right:0;bottom:0;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{position:absolute;top:0;left:0;right:0;z-index:1;padding:0;margin:.25em;will-change:transform,opacity}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{box-shadow:0 .0625em .125em -.0625em rgba(0,0,0,.25)}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:-webkit-grab;cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{transition:box-shadow .125s ease-in-out;box-shadow:0 0 0 transparent}.filepond--item[data-drag-state=drag]{cursor:-webkit-grabbing;cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{box-shadow:0 .125em .3125em rgba(0,0,0,.325)}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;transition:background-color .25s}.filepond--list-scroller{position:absolute;top:0;left:0;right:0;margin:0;will-change:transform}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller[data-state=overflow]{overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent)}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:99999px;border:.3125em solid transparent;background-clip:content-box}.filepond--list.filepond--list{position:absolute;top:0;margin:0;padding:0;list-style-type:none;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{width:100%;height:100%;max-width:none;margin:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{bottom:0;height:auto;display:flex;justify-content:center;align-items:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{overflow:hidden;height:100%;margin-top:0;margin-bottom:0}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{left:0;right:0;height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{z-index:7}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--action-edit-item{opacity:1!important;visibility:visible!important}@media not all and (-webkit-min-device-pixel-ratio:0), not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.filepond--root[data-style-panel-layout~=circle]{will-change:transform}}}.filepond--panel-root{border-radius:.5em;background-color:#f1f0ef}.filepond--panel{position:absolute;left:0;top:0;right:0;margin:0;height:100%!important;pointer-events:none}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{-webkit-transform-style:preserve-3d;transform-style:preserve-3d;background-color:transparent!important;border:none!important}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{position:absolute;left:0;top:0;right:0;margin:0;padding:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border-bottom:none!important}.filepond--panel-top:after{content:"";position:absolute;height:2px;left:0;right:0;bottom:-1px;background-color:inherit}.filepond--panel-bottom,.filepond--panel-center{will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:translate3d(0,.5em,0);transform:translate3d(0,.5em,0)}.filepond--panel-bottom{border-top-left-radius:0!important;border-top-right-radius:0!important;border-top:none!important}.filepond--panel-bottom:before{content:"";position:absolute;height:2px;left:0;right:0;top:-1px;background-color:inherit}.filepond--panel-center{height:100px!important;border-top:none!important;border-bottom:none!important;border-radius:0!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{position:static;width:1.25em;height:1.25em;color:#fff;margin:0;pointer-events:none;will-change:transform,opacity}.filepond--progress-indicator svg{width:100%;height:100%;vertical-align:top;transform-box:fill-box}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{box-sizing:border-box;position:relative;margin-bottom:1em;font-size:1rem;line-height:normal;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-weight:450;text-align:left;text-rendering:optimizeLegibility;direction:ltr;contain:layout style size}.filepond--root *{box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root[data-disabled] .filepond--list-scroller{pointer-events:all}.filepond--root[data-disabled] .filepond--list{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-top:1em;margin-bottom:1em}.filepond--root .filepond--credits{position:absolute;right:0;opacity:.175;line-height:.85;font-size:11px;color:inherit;-webkit-text-decoration:none;text-decoration:none;z-index:3;bottom:-14px}.filepond--root .filepond--credits[style]{top:0;bottom:auto;margin-top:14px}');Ml(".PinturaModal {\n z-index: 2147483648 !important;\n}\n\n.freemium-survey-components .file-upload-container {\n display: flex;\n position: relative;\n z-index: 4;\n flex-direction: column;\n align-items: center;\n padding: 20px;\n row-gap: 12px;\n border: 2px dashed var(--file-upload-border-color);\n border-radius: 5px;\n background-color: #fafafa;\n box-shadow: 0px 12px 15px 0px rgba(18, 52, 77, 0.0509803922);\n color: var(--question-secondary-color);\n outline: none;\n transition: border 0.24s ease-in-out;\n width: 100%;\n cursor: pointer;\n margin-bottom: 10px;\n}\n.freemium-survey-components .file-upload-container.push-backward {\n z-index: 0 !important;\n}\n.freemium-survey-components .file-upload-container .drop-your-file-container {\n color: #12344d;\n font-size: var(--fsc-font-size);\n margin: 0 0 8px 0 !important;\n font-size: var(--fsc-font-size);\n font-weight: 500;\n}\n.freemium-survey-components .file-upload-container .link {\n font-weight: 500;\n font-size: 0.9em;\n line-height: 20px;\n text-align: center;\n color: var(--input-highlight-color);\n -webkit-text-decoration: underline;\n text-decoration: underline;\n margin-left: 1px;\n}\n.freemium-survey-components .file-upload-container p.max-size {\n margin: 0 0 8px 0 !important;\n font-size: 0.8em;\n font-weight: 500;\n color: #92a2b1;\n}\n.freemium-survey-components .file-upload-container p.support.file-formats {\n margin: 0 !important;\n font-size: 0.8em;\n font-weight: 500;\n color: var(--question-secondary-color);\n max-width: 80%;\n color: #92a2b1;\n line-height: 1.5;\n}\n.freemium-survey-components .file-upload-container.errored {\n border: 2px dashed var(--file-upload-error-border-color);\n}\n.freemium-survey-components .filepond--item {\n height: 200px !important;\n}\n.freemium-survey-components .filepond--item[data-filepond-item-state=load-invalid] {\n display: none;\n}\n.freemium-survey-components .filepond--item.filepond--item-error .filepond--image-preview {\n display: block !important;\n}\n.freemium-survey-components .file-upload-container {\n visibility: visible;\n}\n.freemium-survey-components .file-error {\n color: var(--text-danger);\n font-size: 0.8em;\n font-weight: 600;\n text-align: left;\n display: flex;\n align-items: start;\n}\n.freemium-survey-components .file-error span {\n line-height: 1.5;\n display: inline-block;\n width: 100%;\n line-break: anywhere;\n margin-left: 5px;\n}\n.freemium-survey-components .filepond--panel-center.filepond--item-panel {\n height: 16px !important;\n}\n.freemium-survey-components .filepond--wrapper {\n margin-bottom: 5px;\n}\n.freemium-survey-components .filepond--file-poster-wrapper {\n height: 200px;\n}\n.freemium-survey-components .filepond--panel-bottom.filepond--item-panel {\n top: 18%;\n transform: none !important;\n}\n.freemium-survey-components .filepond--root.filepond--hopper {\n position: absolute !important;\n width: 100%;\n height: 100% !important;\n z-index: 2;\n}\n.freemium-survey-components .filepond--drop-label label {\n display: none !important;\n}\n.freemium-survey-components .filepond--panel.filepond--panel-root {\n display: none;\n}\n.freemium-survey-components [data-filepond-item-state*=error] .filepond--item-panel,\n.freemium-survey-components [data-filepond-item-state*=invalid] .filepond--item-panel {\n background-color: #c82124;\n}\n.freemium-survey-components .filepond--file-status {\n max-width: 522px;\n min-width: 202px;\n}\n.freemium-survey-components .filepond--file-status-sub {\n max-width: 95%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.freemium-survey-components .filepond--file-info {\n max-width: 50%;\n}\n.freemium-survey-components.standard-survey-style .filepond--root.filepond--hopper {\n width: 90%;\n height: 70% !important;\n}\n.freemium-survey-components.widget-survey-components .filepond--root.filepond--hopper {\n width: 90%;\n height: 54% !important;\n}\n.freemium-survey-components.widget-survey-components .filepond--file-status {\n max-width: 60%;\n}\n.freemium-survey-components.mobile-preview .filepond--file-status {\n max-width: 76%;\n min-width: 100px;\n}\n.freemium-survey-components.mobile-preview .filepond--item {\n height: 50px;\n}\n.freemium-survey-components.mobile-preview .filepond--file-status-sub {\n display: none;\n}"),d.registerPlugin(n4,a4,UD,t4),C5(P5,S5,z5,E5);const r4=t.forwardRef((({onClick:e,maxFileSize:a=16,visible:r=!0,supportedFileFormats:i,translationVariables:o,fileErrors:s},l)=>{const[c,u]=t.useState(!1),d=o?.drop_your_file?o?.drop_your_file:n.createElement(n.Fragment,null,"Drop your file here, or Browse");return n.createElement("div",{ref:l,className:"file-upload-container "+(s?.current?.main?"errored":""),onClick:e,style:{visibility:r?"visible":"hidden"},onDragOver:e=>{e.preventDefault(),e.target.classList.add("push-backward")}}," ",n.createElement(El,{name:"file-upload-icon"}),"string"!=typeof d?n.createElement("p",null,d):n.createElement("p",{className:"drop-your-file-container",dangerouslySetInnerHTML:{__html:d}}),n.createElement("p",{className:"max-size"},((e,t,n)=>{if(n&&e&&t)return e.replace(t,n)})(o?.max_file_size,"{{max_file_size}}",String(a))||`Maximum file size : ${a} MB`),n.createElement("p",{className:"support file-formats"},o?.supported_file_formats||"Supported file formats: "," ",(i=i.join(", ")).trim()?n.createElement(n.Fragment,null,c?i:i.slice(0,20)," ",n.createElement("span",{onClick:()=>u(!c),style:{color:"#2C5CC5",textDecoration:"underline",cursor:"pointer"}},c?o?.show_less||"Show less":o?.show_more||"Show more")):"No formats selected"),n.createElement("div",{className:"filepond--drip"}))})),i4=({question:e,onChangeHandler:a,onFileUpload:r,setErrors:i,errors:o,translationVariables:s,surveyServAssetUrl:l,value:c})=>{const[u,m]=t.useState([]),[h,p]=t.useState([]),f=t.useRef(),v=e.type_info?.file_field?.max_file_size||10,g=t.useRef(null),y=t.useRef(),[b,w]=t.useState(!1);let x=!1;n.useEffect((()=>{const t=sessionStorage.getItem(`uploadedFile-${e?.name}`),n=t?JSON.parse(t):"";n?.source&&(n.options={...n.options,file:{name:c,size:n.fileSize}},c&&m([n]))}),[]);const M=async(t,n)=>{try{if(x)return;if(y.current&&_(g.current)||t){const i=t??y.current.getFiles()?.[0]?.file;if(i&&r){x=!0;const t=await r(i.type,i.size,i.name,e);if(n&&n(!0,50,100),t.startsWith("http")&&l){const n=await fetch(t,{method:"PUT",headers:{"Content-Type":i.type,"Content-Disposition":"attachment"},body:i}),r=new URL(t),o=`${l}${r.pathname}`;if(!n.ok)throw console.error("Error uploading file"),new Error("Error uploading file");sessionStorage.setItem(`uploadedFile-${e?.name}`,JSON.stringify({source:o,options:{type:"local"},fileSize:y.current.getFiles()?.[0]?.fileSize})),a(i.name)}else a(null),console.error("Error fetching pre-signed url");x=!1}}}catch(e){throw console.error("error in uploading file",e,"stringified error",JSON.stringify(e)),new Error("Error uploading file")}};return n.useEffect((()=>{(()=>{const t=e.type_info?.file_field?.allowed_file_types,n=Object.keys(A).map((e=>{if((t||[]).includes(e))return A[e].concat(",")})).join(" ").trim().slice(0,-1);p(n.split(", "))})()}),[]),n.createElement(n.Fragment,null,n.createElement(d.FilePond,{ref:y,files:u,labelFileProcessing:s?.uploading_text??"Uploading..",labelFileProcessingComplete:s?.upload_complete??"Upload complete",labelMaxFileSizeExceeded:s?.file_too_large??"The file is too large and cannot be uploaded.",labelMaxFileSize:"",labelTapToCancel:"",labelTapToUndo:"",labelFileTypeNotAllowed:s?.invalid_type??"The file mismatch. Retry by uploading the supported file type.",fileValidateTypeLabelExpectedTypes:"",beforeAddFile:e=>(g.current?.main&&(g.current=null,i({}),m([e]),w(!0)),!0),onremovefile:()=>{b?w(!1):(m([]),i({}),g.current=null,a(null))},allowReplace:!0,server:{process:async(e,t,n,a,r,i)=>{i(!0,0,100);try{await M(t,i),i(!0,100,100),a(t.name)}catch(e){r("An error occurred during upload")}}},onpreparefile:(e,t)=>{const n=new FileReader;n.onloadend=()=>{const t=n.result??"",a=new Blob([t],{type:e.fileType}),r=new File([a],e.filename,{type:e.fileType});M(r)},n.readAsArrayBuffer(t)},onerror:t=>{g.current=t,i({[e.name]:t})},required:!0,credits:!1,allowFileTypeValidation:!0,acceptedFileTypes:h,fileValidateTypeDetectType:(e,t)=>new Promise(((t,n)=>{const a=e.name.split(".");t(`.${a[a.length-1].toLowerCase()}`)})),imageEditor:{legacyDataToImageState:oQ,createEditor:D5,imageReader:[x5,{}],imageWriter:[M5,{}],imageProcessor:Qq,imageEditorAfterWriteImage:({src:e,dest:t,imageState:n})=>new Promise(((a,r)=>{Qq(e,{imageReader:x5(),imageWriter:M5({targetSize:{width:128,height:15,fit:"cover"}}),imageState:n}).then((n=>{a([{name:"input_",file:e},{name:"output_",file:t},{name:"thumb_",file:n.dest}])})).catch(r)})),editorOptions:{utils:["crop","finetune","filter","annotate"],imageOrienter:{read:eV,apply:fV},shapePreprocessor:V5(),...T5,...$5,...k5,locale:{...A5,..._5,...R5,...H5,...I5,...L5}}},allowFileSizeValidation:!0,maxFileSize:`${v}MB`,onupdatefiles:e=>{f.current?.classList.remove("push-backward"),e.length&&m(e)},maxFiles:1,name:`${e.id}-files`}),n.createElement(r4,{ref:f,onClick:e=>{const t=e.target;"path"!==t?.tagName&&"P"!==t?.tagName&&(!t?.className||t?.className instanceof SVGAnimatedString||t.className.includes("format-type-toggler"))||y.current.browse()},fileErrors:g,visible:Boolean(!u.length||g.current?.main),maxFileSize:v,translationVariables:{...s,tTimeZones:[{id:"",offset:"",timeZone:""}]},supportedFileFormats:h}),g?.current?.main&&n.createElement("div",{className:"file-error"},n.createElement(El,{name:"info"}),n.createElement("span",null,`${g?.current?.main}\n ${g.current?.sub}`)))};Ml(".fsc-form-field-container {\n display: flex;\n gap: 16px;\n}\n.fsc-form-field-container.layout-horizontal {\n flex-direction: row;\n flex-wrap: wrap;\n}\n.fsc-form-field-container.layout-horizontal .fsc-form-field {\n flex: 1;\n align-self: end;\n}\n.fsc-form-field-container.layout-vertical {\n flex-direction: column;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .fsc-form-field-container {\n flex-direction: row;\n flex-wrap: wrap;\n }\n .freemium-survey-components .fsc-form-field-container .fsc-form-field {\n flex: 1;\n }\n}\n.freemium-survey-components.mobile-preview .fsc-form-field-container {\n flex-direction: row;\n flex-wrap: wrap;\n}\n.freemium-survey-components.mobile-preview .fsc-form-field-container .fsc-form-field {\n flex: 1;\n}");const o4=e=>{const{placeholder:t,name:a,isRequired:r,label:i,isErrored:o,errorText:s,id:l,disabled:c,language:u,allowOnlyFuture:d,displayFormat:m,type:h,onChange:p,value:f,translationVariables:v,...g}=e,y=m?kD[m]:kD["MMM dd, yyyy"];return n.createElement("div",{className:"fsc-picker fsc-date-picker",id:`date-picker-container-${l??""}`.trim(),"aria-invalid":o},i&&n.createElement("label",{htmlFor:e.id,className:"input-label"},i,i&&r&&n.createElement("span",null,"*")),n.createElement(lx,null,n.createElement(fE,{canClearSelection:!0,closeOnSelection:!0,locale:wD(u||"en"),disabled:c,minDate:d?new Date:cf(new Date).subtract(60,"years").toDate(),maxDate:cf(new Date).add(60,"years").toDate(),fill:!0,highlightCurrentDay:!0,inputProps:{placeholder:t??y,name:a,id:l,"aria-disabled":c},dayPickerProps:{disabled:c,components:{Dropdown:e=>n.createElement(yE,{translationVariables:v,...e,disabled:c})}},showActionsBar:!0,popoverProps:{minimal:!1,placement:"bottom-start",usePortal:!0},parseDate:e=>e?cf(e).toDate():new Date,value:f?MD({dateString:f,dateTimeFormat:y,translationVariables:v}):null,formatDate:e=>e?xD({date:e,dateTimeFormat:y,translationVariables:v}):"",onChange:(e,t)=>{p?.(e?xD({date:new Date(e),dateTimeFormat:y,translationVariables:v}):null,t)},...g})),o&&s&&n.createElement("span",{className:"input-helper"},s))};Ml('/* CSS variables. */\n:root {\n --PhoneInput-color--focus: #03b2cb;\n --PhoneInputInternationalIconPhone-opacity: 0.8;\n --PhoneInputInternationalIconGlobe-opacity: 0.65;\n --PhoneInputCountrySelect-marginRight: 0.5em;\n --PhoneInputCountrySelectArrow-width: 0.3em;\n --PhoneInputCountrySelectArrow-marginLeft: var(\n --PhoneInputCountrySelect-marginRight\n );\n --PhoneInputCountrySelectArrow-borderWidth: 1px;\n --PhoneInputCountrySelectArrow-opacity: 0.45;\n --PhoneInputCountrySelectArrow-color: currentColor;\n --PhoneInputCountrySelectArrow-color--focus: var(--PhoneInput-color--focus);\n --PhoneInputCountrySelectArrow-transform: rotate(45deg);\n --PhoneInputCountryFlag-aspectRatio: 1.5;\n --PhoneInputCountryFlag-height: 1em;\n --PhoneInputCountryFlag-borderWidth: 1px;\n --PhoneInputCountryFlag-borderColor: rgba(0, 0, 0, 0.5);\n --PhoneInputCountryFlag-borderColor--focus: var(--PhoneInput-color--focus);\n --PhoneInputCountryFlag-backgroundColor--loading: rgba(0, 0, 0, 0.1);\n}\n\n.PhoneInput {\n /* This is done to stretch the contents of this component. */\n display: flex;\n align-items: center;\n}\n\n.PhoneInputInput {\n /* The phone number input stretches to fill all empty space */\n flex: 1;\n /* The phone number input should shrink\n to make room for the extension input */\n min-width: 0;\n}\n\n.PhoneInputCountryIcon {\n width: calc(var(--PhoneInputCountryFlag-height) * var(--PhoneInputCountryFlag-aspectRatio));\n height: var(--PhoneInputCountryFlag-height);\n}\n\n.PhoneInputCountryIcon--square {\n width: var(--PhoneInputCountryFlag-height);\n}\n\n.PhoneInputCountryIcon--border {\n /* Removed `background-color` because when an `<img/>` was still loading\n it would show a dark gray rectangle. */\n /* For some reason the `<img/>` is not stretched to 100% width and height\n and sometime there can be seen white pixels of the background at top and bottom. */\n background-color: var(--PhoneInputCountryFlag-backgroundColor--loading);\n /* Border is added via `box-shadow` because `border` interferes with `width`/`height`. */\n /* For some reason the `<img/>` is not stretched to 100% width and height\n and sometime there can be seen white pixels of the background at top and bottom,\n so an additional "inset" border is added. */\n box-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor), inset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor);\n}\n\n.PhoneInputCountryIconImg {\n /* Fixes weird vertical space above the flag icon. */\n /* https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/7#note_348586559 */\n display: block;\n /* 3rd party <SVG/> flag icons won\'t stretch if they have `width` and `height`.\n Also, if an <SVG/> icon\'s aspect ratio was different, it wouldn\'t fit too. */\n width: 100%;\n height: 100%;\n}\n\n.PhoneInputInternationalIconPhone {\n opacity: var(--PhoneInputInternationalIconPhone-opacity);\n}\n\n.PhoneInputInternationalIconGlobe {\n opacity: var(--PhoneInputInternationalIconGlobe-opacity);\n}\n\n/* Styling native country `<select/>`. */\n.PhoneInputCountry {\n position: relative;\n align-self: stretch;\n display: flex;\n align-items: center;\n margin-right: var(--PhoneInputCountrySelect-marginRight);\n}\n\n.PhoneInputCountrySelect {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 1;\n border: 0;\n opacity: 0;\n cursor: pointer;\n}\n\n.PhoneInputCountrySelect[disabled],\n.PhoneInputCountrySelect[readonly] {\n cursor: default;\n}\n\n.PhoneInputCountrySelectArrow {\n display: block;\n content: "";\n width: var(--PhoneInputCountrySelectArrow-width);\n height: var(--PhoneInputCountrySelectArrow-width);\n margin-left: var(--PhoneInputCountrySelectArrow-marginLeft);\n border-style: solid;\n border-color: var(--PhoneInputCountrySelectArrow-color);\n border-top-width: 0;\n border-bottom-width: var(--PhoneInputCountrySelectArrow-borderWidth);\n border-left-width: 0;\n border-right-width: var(--PhoneInputCountrySelectArrow-borderWidth);\n transform: var(--PhoneInputCountrySelectArrow-transform);\n opacity: var(--PhoneInputCountrySelectArrow-opacity);\n}\n\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon + .PhoneInputCountrySelectArrow {\n opacity: 1;\n color: var(--PhoneInputCountrySelectArrow-color--focus);\n}\n\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon--border {\n box-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus), inset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus);\n}\n\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon .PhoneInputInternationalIconGlobe {\n opacity: 1;\n color: var(--PhoneInputCountrySelectArrow-color--focus);\n}');const s4=n.forwardRef((({label:e,inline:t,startLabel:a,startAdornment:r,endLabel:i,endAdornment:o,isRequired:s,isErrored:l,showCount:c,inputStyle:u,style:d,errorText:h,maxLength:p,labelProps:f,onChangeHandler:v,containerProps:g,setFocus:y,autoFocusDelay:b=10,...w},x)=>{const k=n.useRef(null);return n.useEffect((()=>{y&&document.activeElement!==k?.current&&setTimeout((()=>{k.current?.focus()}),M+(b??0))}),[]),n.createElement("div",{className:"fsc-input-base fsc-input fsc-phone-input",style:d},e&&n.createElement("label",{htmlFor:w.id,className:"input-label",...f},e,e&&s&&n.createElement("span",null,"*")),n.createElement("div",{className:"input-container",...g},n.createElement(m,{className:"input-basic".trim(),placeholder:w.placeholder,locales:["US"],onChange:e=>{v(e)}})),l&&h&&n.createElement("span",{className:"input-helper"},h))})),l4=e=>{switch(e){case"EMAIL":return"email";case"PHONE":return"tel";case"NUMBER":return"number";default:return"text"}},c4=({question:e,autoFocusDelay:t,onChangeHandler:a,surveyStyle:r,isRequired:i,formValues:o,fieldErrors:s,translationVariables:l,language:c})=>{const u=e.type_info?.form_fields?.layout,d=e.type_info?.form_fields?.fields;return n.createElement("div",{className:`fsc-form-field-container layout-${(u??"VERTICAL").toLowerCase()}`.trim()},d?.map(((i,u)=>n.createElement("div",{className:"fsc-form-field",key:i.id},"DATE"!==i?.type&&"DATE_TIME"!==i?.type?n.createElement(n.Fragment,null,"PHONE"===i.type?n.createElement(s4,{key:u,setFocus:0===u&&"standard"!==r,autoFocusDelay:t,label:i?.label||"",type:"tel",isRequired:!!i.required,value:i.id&&o[e.name]?.[i.id]||"",onChangeHandler:t=>{i.id&&a({...o[e.name]??{},[i.id]:t||null})},isErrored:!(!i.id||!o?.[e.name]?.[i.id])&&!!s?.[i?.id||""],errorText:i.id&&o[e.name]?.[i.id]?s?.[i?.id]:""}):n.createElement(Dl,{key:u,setFocus:0===u&&"standard"!==r,autoFocusDelay:t,onKeyDown:e=>{"PHONE"===i?.type&&N(e),"NUMBER"===i?.type&&O(e)},label:i?.label||"",type:l4(i?.type??"TEXT"),isRequired:!!i.required,value:i.id&&o[e.name]?.[i.id]||"",onChange:t=>{i.id&&a({...o[e.name]??{},[i.id]:t.target.value||null})},isErrored:!(!i.id||!o?.[e.name]?.[i.id])&&!!s?.[i?.id||""],errorText:i.id&&o[e.name]?.[i.id]?s?.[i?.id]:""})):n.createElement(n.Fragment,null,"DATE_TIME"===i?.type?n.createElement(CD,{id:i.id??"",name:e.name??"",label:i?.label??"",isRequired:!!i.required,allowOnlyFuture:!!e.type_info?.meta?.allow_future_date,language:c,useAmPm:!e.type_info?.meta?.time_format,showTimezoneSelect:!1,onChange:t=>{a({...o[e.name]??{},...i.id&&{[i.id]:t}})},value:i?.id&&o[e?.name]?.[i?.id],type:"FORM_FIELD",translationVariables:l}):n.createElement(o4,{id:i.id??"",name:e.name??"",label:i?.label??"",isRequired:!!i.required,allowOnlyFuture:!!e.type_info?.meta?.allow_future_date,language:c,onChange:t=>{a({...o[e.name]??{},...i.id&&{[i.id]:t}})},value:i?.id&&o[e?.name]?.[i?.id],type:"FORM_FIELD",translationVariables:l}))))))},u4="rovingFocusGroup.onEntryFocus",d4={bubbles:!1,cancelable:!0},m4="RovingFocusGroup",[h4,p4,f4]=Kl(m4),[v4,g4]=jl(m4,[f4]),[y4,b4]=v4(m4),w4=t.forwardRef(((e,n)=>t.createElement(h4.Provider,{scope:e.__scopeRovingFocusGroup},t.createElement(h4.Slot,{scope:e.__scopeRovingFocusGroup},t.createElement(x4,Ol({},e,{ref:n})))))),x4=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:a,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=e,m=t.useRef(null),h=ql(n,m),p=Ql(o),[f=null,v]=Bc({prop:s,defaultProp:l,onChange:c}),[g,y]=t.useState(!1),b=tc(u),w=p4(a),x=t.useRef(!1),[M,k]=t.useState(0);return t.useEffect((()=>{const e=m.current;if(e)return e.addEventListener(u4,b),()=>e.removeEventListener(u4,b)}),[b]),t.createElement(y4,{scope:a,orientation:r,dir:p,loop:i,currentTabStopId:f,onItemFocus:t.useCallback((e=>v(e)),[v]),onItemShiftTab:t.useCallback((()=>y(!0)),[]),onFocusableItemAdd:t.useCallback((()=>k((e=>e+1))),[]),onFocusableItemRemove:t.useCallback((()=>k((e=>e-1))),[])},t.createElement(ec.div,Ol({tabIndex:g||0===M?-1:0,"data-orientation":r},d,{ref:h,style:{outline:"none",...e.style},onMouseDown:Wl(e.onMouseDown,(()=>{x.current=!0})),onFocus:Wl(e.onFocus,(e=>{const t=!x.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(u4,d4);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));C4([e.find((e=>e.active)),e.find((e=>e.id===f)),...e].filter(Boolean).map((e=>e.ref.current)))}}x.current=!1})),onBlur:Wl(e.onBlur,(()=>y(!1)))})))})),M4=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:a,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,l=Pc(),c=o||l,u=b4("RovingFocusGroupItem",a),d=u.currentTabStopId===c,m=p4(a),{onFocusableItemAdd:h,onFocusableItemRemove:p}=u;return t.useEffect((()=>{if(r)return h(),()=>p()}),[r,h,p]),t.createElement(h4.ItemSlot,{scope:a,id:c,focusable:r,active:i},t.createElement(ec.span,Ol({tabIndex:d?0:-1,"data-orientation":u.orientation},s,{ref:n,onMouseDown:Wl(e.onMouseDown,(e=>{r?u.onItemFocus(c):e.preventDefault()})),onFocus:Wl(e.onFocus,(()=>u.onItemFocus(c))),onKeyDown:Wl(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const a=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(a)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)?void 0:k4[a]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let n=m().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const a=n.indexOf(e.currentTarget);n=u.loop?function(e,t){return e.map(((n,a)=>e[(t+a)%e.length]))}(n,a+1):n.slice(a+1)}setTimeout((()=>C4(n)))}}))})))})),k4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function C4(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const P4=w4,z4=M4,S4="Radio",[E4,T4]=jl(S4),[$4,A4]=E4(S4),L4=t.forwardRef(((e,n)=>{const{__scopeRadio:a,name:r,checked:i=!1,required:o,disabled:s,value:l="on",onCheck:c,...u}=e,[d,m]=t.useState(null),h=ql(n,(e=>m(e))),p=t.useRef(!1),f=!d||Boolean(d.closest("form"));return t.createElement($4,{scope:a,checked:i,disabled:s},t.createElement(ec.button,Ol({type:"button",role:"radio","aria-checked":i,"data-state":R4(i),"data-disabled":s?"":void 0,disabled:s,value:l},u,{ref:h,onClick:Wl(e.onClick,(e=>{i||null==c||c(),f&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),f&&t.createElement(H4,{control:d,bubbles:!p.current,name:r,value:l,checked:i,required:o,disabled:s,style:{transform:"translateX(-100%)"}}))})),_4=t.forwardRef(((e,n)=>{const{__scopeRadio:a,forceMount:r,...i}=e,o=A4("RadioIndicator",a);return t.createElement(Ku,{present:r||o.checked},t.createElement(ec.span,Ol({"data-state":R4(o.checked),"data-disabled":o.disabled?"":void 0},i,{ref:n})))})),H4=e=>{const{control:n,checked:a,bubbles:r=!0,...i}=e,o=t.useRef(null),s=qc(a),l=zc(n);return t.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==a&&n){const t=new Event("click",{bubbles:r});n.call(e,a),e.dispatchEvent(t)}}),[s,a,r]),t.createElement("input",Ol({type:"radio","aria-hidden":!0,defaultChecked:a},i,{tabIndex:-1,ref:o,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function R4(e){return e?"checked":"unchecked"}const I4=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],D4="RadioGroup",[V4,O4]=jl(D4,[g4,T4]),N4=g4(),W4=T4(),[j4,F4]=V4(D4),B4=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:a,name:r,defaultValue:i,value:o,required:s=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:m,...h}=e,p=N4(a),f=Ql(u),[v,g]=Bc({prop:o,defaultProp:i,onChange:m});return t.createElement(j4,{scope:a,name:r,required:s,disabled:l,value:v,onValueChange:g},t.createElement(P4,Ol({asChild:!0},p,{orientation:c,dir:f,loop:d}),t.createElement(ec.div,Ol({role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:f},h,{ref:n}))))})),q4=B4,U4=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:a,disabled:r,...i}=e,o=F4("RadioGroupItem",a),s=o.disabled||r,l=N4(a),c=W4(a),u=t.useRef(null),d=ql(n,u),m=o.value===i.value,h=t.useRef(!1);return t.useEffect((()=>{const e=e=>{I4.includes(e.key)&&(h.current=!0)},t=()=>h.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),t.createElement(z4,Ol({asChild:!0},l,{focusable:!s,active:m}),t.createElement(L4,Ol({disabled:s,required:o.required,checked:m},c,i,{name:o.name,ref:d,onCheck:()=>o.onValueChange(i.value),onKeyDown:Wl((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:Wl(i.onFocus,(()=>{var e;h.current&&(null===(e=u.current)||void 0===e||e.click())}))})))})),G4=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:a,...r}=e,i=W4(a);return t.createElement(_4,Ol({},i,r,{ref:n}))})),Z4=e=>{const{checked:t,className:a,disabled:r,id:i,isRequired:o,label:s,name:l,readOnly:c,onChange:u,...d}=e;return n.createElement(q4,{className:`fsc-radio ${a??""}`.trim(),name:l,"aria-label":s||"Radio button",value:t?"default":"",required:o,disabled:r,"aria-readonly":c,onValueChange:e=>{u?.(!t,e)},...d},n.createElement("div",{className:"fsc-radio-container"},n.createElement(U4,{checked:t,"aria-checked":t,className:"fsc-radio-item",disabled:r,"aria-readonly":c,value:"default",id:i},n.createElement(G4,{className:"fsc-radio-indicator"})),s&&n.createElement("label",{htmlFor:i,className:"fsc-radio-label"},s,s&&o&&n.createElement("span",null,"*"))))};Ml(".freemium-survey-components .matrix-container {\n width: 100%;\n overflow: auto;\n max-height: 300px;\n}\n.freemium-survey-components .matrix-container::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px;\n height: 6px;\n}\n.freemium-survey-components .matrix-container::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background: #ebeff3;\n}\n.freemium-survey-components .matrix-container .checkbox-label,\n.freemium-survey-components .matrix-container .radio-label {\n border: unset;\n min-width: unset;\n padding: unset;\n display: inline-flex;\n}\n.freemium-survey-components .matrix-container table.st-mt-table,\n.freemium-survey-components .matrix-container th.st-mt-th,\n.freemium-survey-components .matrix-container td.st-mt-td,\n.freemium-survey-components .matrix-container tr.st-mt-tr {\n padding: 0;\n margin: 0;\n}\n.freemium-survey-components .matrix-container table.st-mt-table {\n border-spacing: 0;\n border-radius: 4px;\n margin: 0;\n width: 100%;\n}\n.freemium-survey-components .matrix-container th.st-mt-th {\n color: var(--question-text-color, var(--default-question-text-color));\n text-align: center;\n font-size: 0.8em;\n font-weight: 500;\n padding: 12px 24px;\n background-color: var(--question-background-color, var(--default-question-background-color));\n}\n.freemium-survey-components .matrix-container th.m-s-b-s-q-m-s-th-empty {\n z-index: 2;\n position: sticky;\n top: 0;\n left: 0;\n background-color: var(--question-background-color, var(--default-question-background-color));\n border: 1px solid rgb(242, 242, 242);\n}\n.freemium-survey-components .matrix-container th.m-s-b-s-q-m-s-th {\n border-right: 1px solid rgb(242, 242, 242);\n border-top: 1px solid rgb(242, 242, 242);\n border-bottom: 1px solid rgb(242, 242, 242);\n z-index: 1;\n position: sticky;\n top: 0;\n}\n.freemium-survey-components .matrix-container th.m-s-b-s-q-m-s-input,\n.freemium-survey-components .matrix-container td.m-s-b-s-q-m-s-input {\n position: sticky;\n left: 0;\n z-index: 1;\n background-color: var(--question-background-color, var(--default-question-background-color));\n padding: 12px;\n}\n.freemium-survey-components .matrix-container td.m-s-b-s-q-m-s-input {\n border-right: 1px solid rgb(242, 242, 242);\n border-bottom: 1px solid rgb(242, 242, 242);\n border-left: 1px solid rgb(242, 242, 242);\n font-size: 0.8em;\n font-weight: 500;\n line-height: 20px;\n text-align: left;\n min-width: 240px;\n max-width: 300px;\n word-wrap: break-word;\n}\n.freemium-survey-components .matrix-container td.m-s-b-s-q-m-s-switch {\n text-align: center;\n padding: 12px 24px;\n min-width: 100px;\n border-bottom: 1px solid rgb(242, 242, 242);\n border-right: 1px solid rgb(242, 242, 242);\n}\n.freemium-survey-components .matrix-container td.m-s-b-s-q-m-s-switch .radio,\n.freemium-survey-components .matrix-container td.m-s-b-s-q-m-s-switch .checkbox {\n margin-right: unset;\n}\n.freemium-survey-components .matrix-container td.m-s-b-s-q-m-s-switch div:first-child {\n width: -moz-fit-content;\n width: fit-content;\n margin: 0 auto;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components.standard-survey-style .matrix-container th.m-s-b-s-q-m-s-input,\n .freemium-survey-components.standard-survey-style .matrix-container td.m-s-b-s-q-m-s-input {\n position: unset;\n }\n .freemium-survey-components.standard-survey-style .matrix-container th.m-s-b-s-q-m-s-th {\n position: unset;\n }\n}\n.freemium-survey-components.mobile-preview.standard-survey-style .matrix-container th.m-s-b-s-q-m-s-input,\n.freemium-survey-components.mobile-preview.standard-survey-style .matrix-container td.m-s-b-s-q-m-s-input {\n position: unset;\n}\n.freemium-survey-components.mobile-preview.standard-survey-style .matrix-container th.m-s-b-s-q-m-s-th {\n position: unset;\n}");const Y4=e=>{const{type_info:{matrix_properties:t},onChangeHandler:a,value:r}=e;return n.createElement("div",{className:"matrix-container","data-test-input":"matrix"},n.createElement("table",{className:"st-mt-table"},n.createElement("thead",{className:"st-mt-thead"},n.createElement("tr",{className:"st-mt-tr"},n.createElement("th",{className:"m-s-b-s-q-m-s-th-empty st-mt-th"}),t?.rating_labels?.map(((e,t)=>{if(e.is_active)return n.createElement("th",{key:e.id,className:"m-s-b-s-q-m-s-th st-mt-th"},e.text)})))),n.createElement("tbody",{className:"st-mt-tbody"},t?.statements?.map(((e,i)=>{if(e.is_active)return n.createElement("tr",{key:e.id,className:"m-s-b-s-q-m-s-tr-hover st-mt-tr"},n.createElement("td",{className:"m-s-b-s-q-m-s-input st-mt-td"},e.text),t?.rating_labels?.map(((o,s)=>{if(!o.is_active)return;const l=r?.find((t=>t?.statement_id===e?.id));return n.createElement("td",{key:o.id,className:"m-s-b-s-q-m-s-switch st-mt-td"},"SINGLE_ANSWER"===t?.type&&n.createElement(Z4,{key:o.id||`${i}-key-${s}`,name:`q-m-s-radio-${i}-key-${s}`,checked:!!l?.rating_labels?.find((e=>e?.id===o?.id)),id:o.id??"",onChange:()=>{e?.id&&o?.id&&a(l?.statement_id?[...r||[]].map((e=>e?.statement_id===l?.statement_id?{...l,rating_labels:[{id:o.id||"",text:o?.text||""}]}:e)):[...r||[],{statement_id:e.id,rating_labels:[{id:o.id,text:o?.text||""}]}])},label:""}),"MULTIPLE_ANSWERS"===t?.type&&n.createElement(ud,{key:o.id||`${i}-key-${s}`,name:`q-m-s-checkbox-${i}-key-${s}`,checked:!!l?.rating_labels?.find((e=>e?.id===o?.id)),id:o.id??"",onChange:t=>{e?.id&&o?.id&&a(l?.statement_id?[...r||[]].map((e=>e.statement_id===l.statement_id?{...l,rating_labels:t?[...l.rating_labels||[],{id:o.id||"",text:o?.text||""}]:(l.rating_labels||[]).filter((e=>e?.id!==o.id))}:e)):[...r||[],{statement_id:e.id,rating_labels:[{id:o.id,text:o?.text||""}]}])}}))})))})))))};Ml(".freemium-survey-components .matrix-wd-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n text-align: left;\n}\n.freemium-survey-components .matrix-wd-container .matrix-st-count {\n color: var(--question-text-color, #12344d);\n font-size: 0.8em;\n font-weight: 500;\n line-height: 22px;\n opacity: 0.3;\n margin-bottom: 4px;\n}\n.freemium-survey-components .matrix-wd-container .matrix-st-text {\n color: var(--question-text-color, #12344d);\n font-size: var(--fsc-font-size);\n font-weight: 500;\n line-height: 23px;\n margin-bottom: 12px;\n word-wrap: break-word;\n}\n.freemium-survey-components .matrix-wd-container .matrix-st-labels {\n display: flex;\n gap: 8px;\n flex: 1;\n overflow: auto;\n}\n.freemium-survey-components .matrix-wd-container .wd-style-default {\n flex-wrap: wrap;\n flex-direction: row;\n}\n.freemium-survey-components .matrix-wd-container .wd-style-cozy {\n flex-wrap: wrap;\n flex-direction: row;\n}\n.freemium-survey-components .matrix-wd-container .wd-style-compact,\n.freemium-survey-components .matrix-wd-container .mt-mobile {\n flex-wrap: nowrap;\n flex-direction: column;\n}\n.freemium-survey-components .matrix-wd-container .m-s-b-s-q-m-s-switch {\n color: #333;\n font-weight: 400;\n padding: 6px;\n}\n.freemium-survey-components .matrix-wd-container .checkbox-label,\n.freemium-survey-components .matrix-wd-container .radio-label {\n border: unset;\n min-width: unset;\n padding: unset;\n display: inline-flex;\n font-size: var(--fsc-font-size);\n}");const X4=e=>{const{type_info:{matrix_properties:t},onChangeHandler:a,isMobile:r,isReverseAnimation:i,statementIndex:o,value:s,widgetStyle:l}=e,c=n.useMemo((()=>(t?.statements||[]).find(((e,t)=>t===o))),[o]),u=n.useMemo((()=>s?.find((e=>e?.statement_id===c?.id))),[c,s]);return n.createElement("div",{className:"matrix-wd-container","data-test-input":"matrix"},n.createElement("div",{className:"matrix-st-count"},`${o+1}/${(t?.statements||[]).length}`),n.createElement(xl,null,n.createElement(vl.div,{key:`${c?.id??""}`,initial:{opacity:1,x:i?-96:96},animate:{opacity:1,x:0},exit:{opacity:0,x:i?96:-96},transition:{duration:.3,ease:"easeIn"},className:"matrix-st-text"},c?.text)),n.createElement("div",{className:`matrix-st-labels ${r?"mt-mobile":""} wd-style-${l}`.trim()},t?.rating_labels?.map(((e,r)=>{if(!e.is_active)return;const i=!!u?.rating_labels?.find((t=>t?.id===e?.id));return n.createElement(vl.div,{key:`${e.id}`,className:"m-s-b-s-q-m-s-switch",style:{animationDelay:u?.statement_id?"unset":(r+1)/25+"s"},initial:0===(u?.rating_labels??[]).length&&{opacity:0,x:k,scale:.5},animate:{opacity:1,x:0,scale:1},transition:{duration:.3,ease:"easeInOut",delay:0===(u?.rating_labels??[]).length?(r+1)/25:0}},"SINGLE_ANSWER"===t?.type&&n.createElement(Z4,{key:e.id||`key-${r}`,name:`q-m-s-radio-key-${r}`,checked:i,id:e.id??"",onChange:()=>{c?.id&&e?.id&&a(u?.statement_id?[...s||[]].map((t=>t?.statement_id===u?.statement_id?{...u,rating_labels:[{id:e.id||"",text:e?.text||""}]}:t)):[...s||[],{statement_id:c.id,rating_labels:[{id:e.id,text:e?.text||""}]}])},label:e.text||""}),"MULTIPLE_ANSWERS"===t?.type&&n.createElement(ud,{key:e.id||`key-${r}`,name:`q-m-s-checkbox-key-${r}`,checked:i,onChange:t=>{if(c?.id&&e?.id){const n=u?.statement_id?[...s||[]].map((n=>n.statement_id===u.statement_id?{...u,rating_labels:t?[...u.rating_labels||[],{id:e.id||"",text:e?.text||""}]:(u.rating_labels||[]).filter((t=>t?.id!==e.id))}:n)):[...s||[],{statement_id:c.id,rating_labels:[{id:e.id,text:e?.text||""}]}];a(n)}},id:e.id??"",label:e.text||""}))}))))},K4=({question:e,autoFocusDelay:t,setFocus:a,formValues:r,onChangeHandler:i})=>{const o=e?.type_info?.number_field?.decimal,s=e?.type_info?.number_field?.decimal_point,l=o?2===s?"0.01":"0.1":"1",[c,u]=n.useState(""),d=n.useMemo((()=>{const e=["+","-","e","E"];return o||e.push("."),e}),[o]);return n.createElement("div",{className:"responsive-input-field"},n.createElement(Dl,{autoFocusDelay:t,isRequired:!!e.required,value:r[e.name]||"",type:"number",step:l,placeholder:e?.type_info?.meta?.placeholder??"",onKeyDown:e=>d.includes(e.key)&&e.preventDefault(),onChange:e=>{const t=new RegExp(`^[0-9]*.[0-9]{${o?`0,${Number(s)}`:0}}$`);if(""===e.target.value)u("");else if(!t.test(e.target.value))return;(e=>{if(e.startsWith(".")&&o){const t=Number(e);i(`${t}`)}else i(e)})(e.target.value)},setFocus:a,maxLength:18}))},J4=e=>{switch(e){case"EMAIL":return"email";case"PHONE":return"tel";case"URL":return"url";default:return"text"}},Q4=e=>{switch(e){case"PHONE":return"phone";case"EMAIL":return"email";case"URL":return"url";default:return""}},e3=({question:e,autoFocusDelay:t,formValues:a,onChangeHandler:r,textboxErrors:i,setFocus:o})=>{const s=e?.type_info?.text_field?.text_type;return n.createElement("div",{className:"responsive-input-field"},"PHONE"===s?n.createElement(s4,{startAdornment:n.createElement(El,{name:Q4(s)}),type:J4(s),setFocus:o,autoFocusDelay:t,label:"",isRequired:!!e.required,value:a[e.name]||"",isErrored:!!i[e.name],errorText:i[e.name]||"",placeholder:e?.type_info?.meta?.placeholder??"",onChangeHandler:e=>r(e),maxLength:50}):n.createElement(Dl,{startAdornment:s&&"TEXT"!==s&&n.createElement(El,{name:Q4(s)}),type:J4(s),setFocus:o,autoFocusDelay:t,label:"",isRequired:!!e.required,value:a[e.name]||"",isErrored:!!i[e.name],errorText:i[e.name]||"",placeholder:e?.type_info?.meta?.placeholder??"",onChange:e=>r(e.target.value),maxLength:50}))},t3=({surveyLanguage:e,language:t,question:a,formValues:r,othersMeta:i,onChangeHandler:o,saveOthersValue:s,autoFocusDelay:l,isFinalQn:c,isWidget:u,isMobile:d,initialPivotAnswer:m,initialQuestionAnswer:h,isInitialTransition:p,formQuestionErrors:f,contactFormErrors:v,activeIndexOfRenderedStatement:g=0,textboxQuestionErrors:y,isReverseAnimation:b,fileUploadErrors:w,onFileUpload:x,widgetStyle:M="default",setErrors:k,translationVariables:C,surveyServAssetUrl:P,setFocus:z,block:S,surveyStyle:E})=>{const T=a?.type_info?.footer_text&&a.type_info.meta?.question_hint?n.createElement("div",{className:"footer",role:"note",dangerouslySetInnerHTML:{__html:a?.type_info?.footer_text}}):n.createElement(n.Fragment,null);if((u||d)&&"MATRIX_RATING_SCALE"===a?.type_info?.question_type)return n.createElement(n.Fragment,null,n.createElement(X4,{isReverseAnimation:b,type_info:a?.type_info||{},onChangeHandler:e=>{o(e?.filter((e=>(e.rating_labels||[]).length>0)))},isMobile:d,value:r[a.name]||[],statementIndex:g,widgetStyle:M}),T);switch(a?.type_info?.question_type){case"MATRIX_RATING_SCALE":return n.createElement(n.Fragment,null,n.createElement(Y4,{type_info:a?.type_info||{},onChangeHandler:e=>{o(e?.filter((e=>(e.rating_labels||[]).length>0)))},value:r[a.name]||[]}),T);case"RANGE":return n.createElement(n.Fragment,null,n.createElement(Il,{question:a,onChangeHandler:o,isWidget:u,isMobile:d,widgetStyle:M,value:r[a.name],initialPivotAnswer:m,isInitialTransition:p}),T);case"CHECKBOX":case"MULTI_SELECT":return n.createElement(n.Fragment,null,n.createElement(sf,{name:a.name,values:r[a.name],othersValue:i[a.name],options:a?.choices||[],onChangeHandler:o,saveOthersValue:s,isOthersOption:!!(a?.choices||[]).find((e=>e.meta?.is_others)),othersRequired:!!a?.type_info.meta?.othersRequired,autoFocusDelay:l,translationVariables:C}),T);case"RADIO":case"DROPDOWN":return n.createElement(n.Fragment,null,n.createElement(dd,{autoFocusDelay:l,name:a.name,onChangeHandler:o,initialQuestionAnswer:h,displayFormat:a?.type_info?.meta?.display_format||"LIST",saveOthersValue:s,options:a?.choices||[],value:r[a.name],othersValue:i[a.name],isOthersOption:!!(a?.choices||[]).find((e=>e.meta?.is_others)),othersRequired:!!a?.type_info.meta?.othersRequired,isFinalQn:c,translationVariables:C}),T);case"TEXT":return n.createElement(n.Fragment,null,n.createElement(e3,{question:a,autoFocusDelay:l,formValues:r,onChangeHandler:o,textboxErrors:y||"",setFocus:z}),T);case"NUMBER":return n.createElement(n.Fragment,null,n.createElement(K4,{question:a,autoFocusDelay:l,formValues:r,setFocus:z,onChangeHandler:o}),T);case"FORM_FIELD":return n.createElement(n.Fragment,null,n.createElement(c4,{question:a,surveyStyle:E,isRequired:!!a.required,autoFocusDelay:l,translationVariables:C,onChangeHandler:o,formValues:r,fieldErrors:f?.[a.name]||{},language:e||"en"}),T);case"CONTACT_FORM":return n.createElement(n.Fragment,null,n.createElement(PD,{question:a,setFocus:z,autoFocusDelay:l,onChangeHandler:o,translationVariables:C,formValues:r,fieldErrors:v?.[a.name]||{}}),T);case"PARAGRAPH":return n.createElement(n.Fragment,null,n.createElement(Vl,{autoFocusDelay:l,isRequired:!!a.required,placeholder:a?.type_info?.meta?.placeholder??"",value:r[a.name]||"",onChange:e=>o(e.target.value),setFocus:z}),T);case"BOOLEAN":return n.createElement(n.Fragment,null,n.createElement(Ll,{type_info:a?.type_info,onSelect:o,value:r[a.name],initialPivotAnswer:m,isInitialTransition:p}),T);case"MESSAGE":return T;case"CONSENT":return n.createElement(n.Fragment,null,n.createElement(lf,{question:a,onChange:o,value:r[a.name]}),T);case"SLIDER":const g=a?.type_info.meta?.slider;return n.createElement(n.Fragment,null,n.createElement(qp,{defaultValue:[r[a.name]??g?.opening_position],min:g?.min,max:g?.max,onValueChange:([e])=>o(e),isInput:g?.numerical_input_box,gridLines:g?.grid_lines,stopAtGrid:g?.stop_at_grid_lines,allowDecimals:g?.allow_decimal,decimalPoints:g?.decimal_points,isMobile:d||"compact"===M}),T);case"RANK_ORDER":const{others_meta:b,...$}=r;return n.createElement(n.Fragment,null,n.createElement(Yh,{valueItems:$[a.name],items:a?.choices||[],onReorder:o,isPrevQuesAnswered:"card"===E||Object.keys($).length===(S.order??0)-1}),T);case"DATE_TIME":return n.createElement(n.Fragment,null,"DATE_TIME"===a.type_info.meta?.question_format?n.createElement(CD,{id:a.id??"",name:a.name??"",type:"QUESTION",displayFormat:a.type_info.meta?.format??void 0,allowOnlyFuture:a.type_info.meta?.allow_future_date||!1,useAmPm:!a.type_info.meta?.time_format,showTimezoneSelect:!!a.type_info.meta?.time_zone,onChange:o,value:r[a.name]||"",translationVariables:C,language:t||"en"}):n.createElement(o4,{allowOnlyFuture:a.type_info.meta?.allow_future_date||!1,type:"QUESTION",displayFormat:a.type_info.meta?.format??void 0,onChange:o,value:r[a.name]||"",translationVariables:C,language:t||"en"}),T);case"FILE":return n.createElement(i4,{errors:w,setErrors:e=>{k({formQuestionErrors:f,textboxQuestionErrors:y,contactFormErrors:v,fileUploadErrors:e})},onChangeHandler:o,question:a,onFileUpload:x,value:r[a.name]||"",translationVariables:C,surveyServAssetUrl:P});default:return console.error(`Question type ${a?.type_info?.question_type} not found`),null}};Ml(".freemium-survey-components.card-survey-style {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: 100%;\n}\n.freemium-survey-components.card-survey-style .question-holder {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n flex: 1;\n overflow: auto;\n justify-content: center;\n padding: 1rem;\n align-items: center;\n}\n.freemium-survey-components.card-survey-style .questions {\n display: flex;\n flex-direction: column;\n overflow: auto;\n width: var(--fsc-question-width);\n background: transparent;\n box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px;\n border-radius: 6px;\n transition: all 0.2s ease, width 0s;\n padding: 32px;\n border: 0;\n background-color: var(--question-background-color, var(--default-question-background-color));\n}\n.freemium-survey-components.card-survey-style .questions .question-container {\n flex: 1;\n overflow: auto;\n padding: 4px;\n}\n.freemium-survey-components.card-survey-style .questions .question-container .question-text {\n margin-bottom: 24px;\n}\n.freemium-survey-components.card-survey-style .questions .question-consent-buttons {\n margin-top: 12px;\n display: flex;\n gap: 1rem;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components.card-survey-style {\n margin: 0 auto;\n }\n .freemium-survey-components.card-survey-style .questions {\n width: 100%;\n overflow: auto;\n display: flex;\n flex-direction: column;\n }\n}\n.freemium-survey-components.mobile-preview.card-survey-style {\n margin: 0 auto;\n}\n.freemium-survey-components.mobile-preview.card-survey-style .questions {\n width: 100%;\n overflow: auto;\n display: flex;\n flex-direction: column;\n}");const n3=({surveyServAssetUrl:e,thankYouQuestion:a,preview:r,placeholders:i,canResubmit:o,resetSurvey:s,navigateToStart:l,isMobile:c,allowMultipleSubmission:u,pivot:d,rangeToRender:m,translationVariables:h})=>{const{redirectUrl:p,redirectDelay:f,show_custom_button:v,show_review_links:g,show_social_links:y,image_url:b}=a?.type_info?.meta??{},[w,x]=t.useState(f??10);return t.useEffect((()=>{if(!r&&p){const e=setInterval((()=>x((e=>e>1?e-1:(window.location.href=p??"",0)))),1e3);return()=>clearInterval(e)}}),[]),n.createElement("div",{className:"question-container thankyou"},b&&n.createElement("img",{className:"thankyou-logo-img",src:b,alt:"thankyou_logo"}),n.createElement("div",{className:"heading"},a?.type_info?.header_text??(h?.thank_you||"Thank you!")),n.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:R({questionText:a.text,placeholders:i,npsRating:d?.answer,ratingLabel:L(d?.answer)?"":m?.find((e=>e?.value===String(d?.answer)))?.text??"",preference:d?.question.type_info?.scale_properties?.labels?.preference,isPreview:r})}}),(o||u)&&n.createElement("div",{className:("wrap-up-actions "+(c?"mobile":"")).trim()},o&&n.createElement("button",{className:"action-button",tabIndex:0,onClick:()=>l()},n.createElement(El,{name:"edit"}),h?.edit_response||"Edit your response"),u&&n.createElement("button",{className:"action-button",tabIndex:0,onClick:s},n.createElement(El,{name:"reload"}),h?.another_response||"Submit another response")),p&&n.createElement("div",{className:"redirection-container"},n.createElement("div",{className:"redirection-text"},V(w,h?.redirect_msg),n.createElement("br",null)),n.createElement("a",{className:"link",href:p},p)),(v||g||y)&&n.createElement(of,{show_custom_button:v,show_review_links:g,show_social_links:y,surveyServAssetUrl:e}))},a3=({activeIndexOfRenderedStatement:e,navigateToPreviousBlock:t,canDisplayDisableButtonParams:a,navigateToNextBlock:r,translationVariables:i})=>n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:oe("navigation-prev",a),className:"navigation-button",onClick:t,title:e>0?i?.prev_statement||"go to previous statement":i?.prev_question||"go to previous question"},n.createElement(El,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:oe("navigation-next",a),title:i?.next_question||"Go to next question",onClick:r},n.createElement(El,{name:"arrow-next"}))),r3=e=>{const{initialStatementHasAnswer:a,answers:r,renderedBlocks:i,blocks:o,activeIndexOfBlocks:s,activeIndexOfRenderedStatement:l=0,activeIndexOfRenderedBlocks:c,saveFormValues:u,onSubmitHandler:d,skipBlock:m,skipStatement:h,navigateToNextBlock:p,navigateToPreviousBlock:f,isInitialTransition:v,initialPivotAnswer:g,translationVariables:y,navigateToNextStatement:b,canDisplayDisableButtonParams:w,formQuestionErrors:x,textboxQuestionErrors:M,contactFormErrors:C,questions:P,pages:z,isReverseAnimation:S}=e,[E,T]=t.useState(!1),{question:A}=i[c],L={...w,isSubmitting:E},H=A?.type_info?.meta?.display_format,R=q({blocks:o,activeIndexOfBlocks:s,renderedBlocks:i,activeIndexOfRenderedBlocks:c,questions:P});return n.createElement(n.Fragment,null,(ae("message",L)||ae("consent",L))&&n.createElement(xl,null,n.createElement(vl.div,{key:A.name??"",id:`consent-buttons-${A.name??""}`,className:"question-consent-buttons",initial:{opacity:0,x:S?-48:k},animate:{opacity:1,x:0},exit:{opacity:0,x:S?k:-48},transition:{duration:.2}},ae("consent",L)&&"BUTTON"===H&&$.map((e=>n.createElement(Cl,{key:c+String(e.recordAs),onClick:()=>{u(i[c],e.recordAs,!0)},disabled:oe("consent",L),className:(e.recordAs?"next":"secondary")+"-button"},A?.type_info?.scale_properties?.labels?.values?.[e.id]||e.defaultValue))),ae("message",L)&&n.createElement(Cl,{onClick:()=>{R?(T(!0),d("COMPLETE")):m()},disabled:oe("message",L),className:"next-button"},A?.type_info?.scale_properties?.labels?.values?.[0]||"Begin"))),(ae("navigation",L)||ae("next",L)||ae("next-statement",L)||ae("submit",L)||ae("skip",L)||ae("skip-statement",L))&&n.createElement("div",{className:"question-footer"},ae("navigation",L)?n.createElement(a3,{answers:r,canDisplayDisableButtonParams:L,activeIndexOfBlocks:s,activeIndexOfRenderedBlocks:c,renderedBlocks:i,initialStatementHasAnswer:a,blocks:o,activeIndexOfRenderedStatement:l,navigateToNextBlock:p,navigateToPreviousBlock:f,translationVariables:y,pages:z}):n.createElement("div",null),n.createElement("div",{className:"action-buttons"},ae("skip",L)&&n.createElement(Cl,{className:"skip-button",onClick:m,variant:"secondary","aria-label":"skip question"},y?.skip||"Skip"),ae("skip-statement",L)&&n.createElement(Cl,{className:"skip-button",onClick:h,"aria-label":"skip statement",variant:"secondary"},y?.skip||"Skip"),ae("next",L)&&n.createElement(Cl,{onClick:()=>{0!==c||!v||"RANGE"!==A.type_info?.question_type&&"BOOLEAN"!==A.type_info?.question_type||void 0===g?u(i[c],"CHECKBOX"===A?.type_info?.meta?.display_format&&"CONSENT"===A?.type_info?.question_type?r.formValues[A.name]??!1:null,!0):u(i[c],g,!0)},disabled:oe("next",L),className:"next-button"},y?.next||"Next"),ae("next-statement",L)&&n.createElement(Cl,{onClick:()=>{b?.()},disabled:!!oe("next-statement",L),className:"next-button"},y?.next||"Next"),ae("submit",L)&&n.createElement("div",{className:"submit"},n.createElement(Cl,{disabled:oe("submit",L),onClick:()=>{_(x?.[A.name])&&_(M?.[A.name])&&_(C?.[A.name])&&(T(!0),d("COMPLETE"))}},E?y?.submitting||"Submitting":y?.submit_survey||"Submit")))))},i3=e=>{const{blocks:a,pages:r,activePage:i,renderedBlocks:o,activeBlock:s,activeIndexOfBlocks:l,activeIndexOfRenderedBlocks:c,isSurveyCompleted:u,isReverseAnimation:d,saveFormValues:m,saveOthersValue:h,skipBlock:p,skipStatement:f,onSubmitHandler:v,navigateToNextBlock:g,navigateToPreviousBlock:y,answers:b,questions:w,pivot:x,isInitialTransition:M,resetSurvey:C,activeIndexOfRenderedStatement:P,navigateToNextStatement:z,navigateToPreviousStatement:S,navigateToStart:E,translationVariables:T,initialStatementHasAnswer:$,formQuestionErrors:A,textboxQuestionErrors:V,contactFormErrors:O,fileUploadErrors:N,setErrors:W}=ye(e),j=_(b.formValues)&&e.survey.prompt_settings?.is_enabled&&e.preview,[F,B]=t.useState(j),G=n.useMemo((()=>H(x?.question)),[x?.question]);t.useEffect((()=>{s&&e.onBlockChange?.(s)}),[s,e]),t.useEffect((()=>{e.survey.ui_theme&&D(e.survey.ui_theme)}),[e.survey.ui_theme]),t.useEffect((()=>{e.getSurveyProgress?.({totalBlocks:a.length,isSurveyCompleted:u,activeIndexOfBlocks:l})}),[a.length,u,l]);const Z={answers:b,blocks:a,blockIndex:c,activeIndexOfBlocks:l,initialStatementHasAnswer:$,activeIndexOfRenderedBlocks:c,activeIndexOfRenderedStatement:P,renderedBlocks:o,isMobile:!!e.isMobile,surveyStyle:e.surveyStyle,isWidget:!!e.isWidget,initialPivotAnswer:e.initialPivotAnswer,isInitialTransition:M,questions:w,pages:r};return s&&s.question?n.createElement("div",{className:("freemium-survey-components card-survey-style "+(e.isMobile?"mobile-preview":"")).trim(),id:"freemium-survey",style:{...I(e.survey.ui_theme||{})}},n.createElement("div",{className:"question-holder"},n.createElement("div",{className:"questions"},u?n.createElement(n3,{surveyServAssetUrl:e.surveyServAssetUrl??"",thankYouQuestion:U({pivotQn:x?.question,pivotQnAnswer:x?.answer,block:Y({activeBlock:s,blocks:e.survey.blocks?.filter((e=>!e.is_deleted)),answers:b,questions:w,activeIndexOfBlocks:l,renderedBlocks:o,contactData:e.contactData}),questions:w}),canResubmit:e.canResubmit,allowMultipleSubmission:e.allowMultipleSubmission,navigateToStart:()=>{e.handleAction?e.handleAction("EDIT_RESPONSE",E):E()},resetSurvey:()=>{e.handleAction?e.handleAction("RE_SUBMIT",C):C()},preview:!!e.preview,placeholders:e.placeholders,isMobile:e.isMobile,pivot:x,rangeToRender:G,translationVariables:T}):n.createElement(n.Fragment,null,!F&&r.length>0&&i?.page_id&&n.createElement("div",{className:"page-container"},n.createElement("div",{className:"page-title",dangerouslySetInnerHTML:{__html:R({questionText:i?.title,placeholders:{},isPreview:!1})}}),n.createElement("div",{className:"page-description",dangerouslySetInnerHTML:{__html:R({questionText:i?.description,placeholders:{},isPreview:!1})}})),n.createElement(xl,null,n.createElement(vl.div,{id:`${s.question.name}`,className:"question-container","data-test-question-name":s.question.name,key:`${s.question.name}`,initial:{opacity:0,x:d?-48:k},animate:{opacity:1,x:0},exit:{opacity:0,x:d?k:-48},transition:{duration:.2}},F&&e.survey.prompt_settings?n.createElement(rf,{config:e.survey.prompt_settings,onSelect:t=>{e.onAnsweringPrompt?.(t),1===t&&B(!1)},placeholders:e.placeholders,isPreview:!!e.preview}):n.createElement(n.Fragment,null,n.createElement("div",{className:("question-text "+(s.required?"required":"")).trim(),dangerouslySetInnerHTML:{__html:R({questionText:s?.question.text,placeholders:e.placeholders,npsRating:x?.answer,ratingLabel:L(x?.answer)?"":G?.find((e=>e?.value===String(x?.answer)))?.text??"",preference:x?.question.type_info?.scale_properties?.labels?.preference,isPreview:!!e.preview})},"aria-label":`question-${c}`,role:"heading","aria-level":1}),n.createElement(t3,{setFocus:!0,isReverseAnimation:d,surveyServAssetUrl:e.surveyServAssetUrl,setErrors:W,onFileUpload:e.onFileUpload,language:e.language||"en",surveyStyle:e.surveyStyle,surveyLanguage:e.survey.language,block:s,question:s.question,isFinalQn:q({blocks:a,activeIndexOfBlocks:l,renderedBlocks:o,activeIndexOfRenderedBlocks:c,questions:w}),formValues:b.formValues,othersMeta:b.others,autoFocusDelay:"standard"===e.surveyStyle?350:0,activeIndexOfRenderedStatement:P,saveOthersValue:h,onChangeHandler:e=>{m(s,e)},isMobile:!!e.isMobile,initialPivotAnswer:e.initialPivotAnswer,initialQuestionAnswer:e.initialQuestionAnswer,isInitialTransition:M,formQuestionErrors:A,textboxQuestionErrors:V,fileUploadErrors:N,contactFormErrors:O,translationVariables:T})))),n.createElement(r3,{isWidget:!1,isReverseAnimation:d,surveyStyle:e.surveyStyle,canDisplayDisableButtonParams:Z,answers:b,renderedBlocks:o,blocks:a,pages:r,activeIndexOfRenderedStatement:P,initialStatementHasAnswer:$,navigateToNextStatement:z,navigateToPreviousStatement:S,activeIndexOfRenderedBlocks:c,activeIndexOfBlocks:l,saveFormValues:m,skipBlock:p,skipStatement:f,onSubmitHandler:v,navigateToPreviousBlock:y,navigateToNextBlock:g,isInitialTransition:M,initialPivotAnswer:e.initialPivotAnswer,isMobile:!!e.isMobile,translationVariables:T,formQuestionErrors:A,textboxQuestionErrors:V,fileUploadErrors:N,contactFormErrors:O,questions:w})))),n.createElement(Gp,{...e.footerProps})):null};Ml(".freemium-survey-components.standard-survey-style {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: 100%;\n align-items: center;\n width: 100%;\n max-width: 900px;\n margin: 0 auto;\n}\n.freemium-survey-components.standard-survey-style .page-container {\n padding: 0 1rem 1rem 1rem;\n margin-bottom: 0;\n}\n.freemium-survey-components.standard-survey-style .page-container .page-title {\n margin-top: 24px;\n color: #475867;\n}\n.freemium-survey-components.standard-survey-style .page-container .page-description {\n color: #475867;\n}\n.freemium-survey-components.standard-survey-style .questions {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n padding: 24px;\n flex: 1;\n overflow: auto;\n scroll-behavior: smooth;\n}\n.freemium-survey-components.standard-survey-style .thankyou-container {\n padding: 2rem;\n}\n.freemium-survey-components.standard-survey-style .question-container.thankyou {\n flex: 1;\n overflow: auto;\n}\n.freemium-survey-components.standard-survey-style .question-container.thankyou,\n.freemium-survey-components.standard-survey-style .question-container {\n width: 100%;\n background: transparent;\n border-radius: 6px;\n box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px;\n transition: all 0.2s ease, width 0s;\n padding: 32px;\n border: 0;\n background-color: var(--question-background-color, var(--default-question-background-color));\n}\n.freemium-survey-components.standard-survey-style .question-container.thankyou .question-text,\n.freemium-survey-components.standard-survey-style .question-container .question-text {\n margin-bottom: 24px;\n}\n.freemium-survey-components.standard-survey-style .question-container.thankyou .question-text p,\n.freemium-survey-components.standard-survey-style .question-container .question-text p {\n margin: 0;\n}\n.freemium-survey-components.standard-survey-style .survey-footer {\n padding: 1rem;\n width: calc(100vw - 2rem);\n}\n.freemium-survey-components.standard-survey-style .page-actions {\n padding: 1rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.freemium-survey-components.standard-survey-style .survey-footer {\n width: 100vw;\n}\n.freemium-survey-components.standard-survey-style .questions,\n.freemium-survey-components.standard-survey-style .page-container,\n.freemium-survey-components.standard-survey-style .page-actions {\n width: 100%;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components.standard-survey-style .page-actions,\n .freemium-survey-components.standard-survey-style .survey-footer {\n width: 100%;\n }\n .freemium-survey-components.standard-survey-style .questions {\n width: 100%;\n }\n .freemium-survey-components.standard-survey-style .page-container,\n .freemium-survey-components.standard-survey-style .question-container.thankyou,\n .freemium-survey-components.standard-survey-style .question-container {\n width: 100%;\n }\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .page-actions,\n.freemium-survey-components.standard-survey-style.mobile-preview .survey-footer {\n width: 100%;\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .questions {\n width: 100%;\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .page-container,\n.freemium-survey-components.standard-survey-style.mobile-preview .question-container.thankyou,\n.freemium-survey-components.standard-survey-style.mobile-preview .question-container {\n width: 100%;\n}");Ml(':root {\n --default-brand-color: #264966;\n --default-question-text-color: #3a4b67;\n --default-question-background-color: #fff;\n --default-background-color: #f8f8f8;\n --default-button-text-color: #fff;\n --default-secondary-button-text-color: #000;\n --fsc-z-index: 2147483647;\n --fsc-transition-duration: 0.3s;\n --fsc-question-width: 700px;\n --fsc-question-max-width: 700px;\n --fsc-widget-transition-duration: 0.6s;\n --fsc-border-color: #cfd7df;\n --fsc-font-size: 14px;\n --fsc-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,\n Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n}\n\nhtml {\n font-size: var(--fsc-font-size);\n}\n\n* {\n box-sizing: border-box;\n}\n\n[data-radix-popper-content-wrapper] {\n z-index: calc(var(--fsc-z-index) + 1) !important;\n}\n\n.surveyserv-widget-container,\n.freemium-survey-components {\n font-family: var(--fsc-font-family);\n color: var(--question-text-color, var(--default-question-text-color));\n font-size: var(--fsc-font-size);\n}\n.surveyserv-widget-container .questions .question-container.prompt-container,\n.freemium-survey-components .questions .question-container.prompt-container {\n padding-top: unset;\n}\n.surveyserv-widget-container .questions .question-container .question-text,\n.freemium-survey-components .questions .question-container .question-text {\n font-size: 1.2em;\n font-weight: 500;\n line-height: 1.4;\n letter-spacing: 0.3px;\n}\n.surveyserv-widget-container .questions .question-container .question-text p,\n.freemium-survey-components .questions .question-container .question-text p {\n margin: 0;\n}\n.surveyserv-widget-container .questions .question-container .question-text.required::after,\n.freemium-survey-components .questions .question-container .question-text.required::after {\n content: "*";\n color: #d72d30;\n margin-left: 4px;\n}\n.surveyserv-widget-container .questions .question-footer,\n.freemium-survey-components .questions .question-footer {\n display: flex;\n justify-content: space-between;\n margin-top: 24px;\n}\n.surveyserv-widget-container .freemium-survey-step-navigation,\n.freemium-survey-components .freemium-survey-step-navigation {\n border-radius: 3px;\n border: 1px solid #efefef;\n width: -moz-fit-content;\n width: fit-content;\n display: flex;\n}\n.surveyserv-widget-container .freemium-survey-step-navigation button.navigation-button,\n.freemium-survey-components .freemium-survey-step-navigation button.navigation-button {\n width: 38px;\n height: 38px;\n background-color: #fff;\n border: none;\n cursor: pointer;\n display: grid;\n place-content: center;\n border-radius: 0 3px 3px 0;\n}\n.surveyserv-widget-container .freemium-survey-step-navigation button.navigation-button:disabled,\n.freemium-survey-components .freemium-survey-step-navigation button.navigation-button:disabled {\n cursor: not-allowed;\n pointer-events: none;\n opacity: 0.5;\n}\n.surveyserv-widget-container .freemium-survey-step-navigation button.navigation-button:first-of-type,\n.freemium-survey-components .freemium-survey-step-navigation button.navigation-button:first-of-type {\n border-right: 1px solid #efefef;\n border-radius: 3px 0 0 3px;\n}\n.surveyserv-widget-container .action-buttons,\n.freemium-survey-components .action-buttons {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.surveyserv-widget-container .question-container.thankyou,\n.freemium-survey-components .question-container.thankyou {\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n overflow: unset !important;\n gap: 24px;\n}\n.surveyserv-widget-container .question-container.thankyou .heading,\n.freemium-survey-components .question-container.thankyou .heading {\n font-weight: 500;\n font-size: 1.4em;\n}\n.surveyserv-widget-container .question-container.thankyou .text,\n.freemium-survey-components .question-container.thankyou .text {\n text-align: center;\n white-space: pre-wrap;\n font-weight: 500;\n font-size: var(--fsc-font-size);\n line-height: 1.6;\n color: var(--question-text-color, #475867);\n width: 75%;\n}\n.surveyserv-widget-container .question-container.thankyou .wrap-up-actions,\n.freemium-survey-components .question-container.thankyou .wrap-up-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n align-items: center;\n justify-content: center;\n}\n.surveyserv-widget-container .question-container.thankyou .wrap-up-actions button.action-button,\n.freemium-survey-components .question-container.thankyou .wrap-up-actions button.action-button {\n letter-spacing: 0.05em;\n font-weight: 600;\n font-size: var(--fsc-font-size);\n line-height: 20px;\n color: #2c5cc5;\n border: 1px solid transparent;\n transform: translateY(0px);\n transition: transform ease 0.2s;\n background-color: #e5f2fd;\n padding: 8px 12px;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n white-space: nowrap;\n border-radius: 4px;\n}\n.surveyserv-widget-container .question-container.thankyou .wrap-up-actions button.action-button:hover,\n.freemium-survey-components .question-container.thankyou .wrap-up-actions button.action-button:hover {\n transform: translateY(-4px);\n}\n.surveyserv-widget-container .question-container.thankyou .redirection-container,\n.freemium-survey-components .question-container.thankyou .redirection-container {\n display: flex;\n align-items: center;\n flex-direction: column;\n width: 100%;\n}\n.surveyserv-widget-container .question-container.thankyou .redirection-container .redirection-text,\n.freemium-survey-components .question-container.thankyou .redirection-container .redirection-text {\n color: #929292;\n margin-bottom: 12px;\n text-align: center;\n font-weight: 300;\n}\n.surveyserv-widget-container .question-container.thankyou .redirection-container .link,\n.freemium-survey-components .question-container.thankyou .redirection-container .link {\n max-width: 100%;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #666;\n font-weight: 500;\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container,\n.freemium-survey-components .question-container.thankyou .show-link-container {\n display: flex;\n gap: 12px;\n flex-wrap: wrap;\n justify-content: center;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link {\n background: #f5f7f9;\n padding: 16px;\n border-radius: 12px;\n display: flex;\n gap: 12px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link.show-custom-button-container,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link.show-custom-button-container {\n background: unset;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link .link-image-url,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link .link-image-url {\n display: grid;\n place-content: center;\n height: 45px;\n width: 45px;\n background: #fff;\n border-radius: 8px;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link .title-text,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link .title-text {\n font-size: var(--fsc-font-size);\n font-weight: 500;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link .links,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link .links {\n display: flex;\n gap: 8px;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link a,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link a {\n text-decoration: unset;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link a .button_text,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link a .button_text {\n padding: 8px 12px;\n background: #4560f6;\n color: #fff;\n font-weight: 700;\n border-radius: 8px;\n}\n.surveyserv-widget-container div.page-container,\n.freemium-survey-components div.page-container {\n margin-bottom: 24px;\n}\n.surveyserv-widget-container div.page-container p,\n.freemium-survey-components div.page-container p {\n margin: unset;\n}\n.surveyserv-widget-container div.page-container .page-title,\n.freemium-survey-components div.page-container .page-title {\n font-size: 1.4em;\n font-weight: 500;\n margin-bottom: 12px;\n color: var(--question-text-color, #475867);\n}\n.surveyserv-widget-container div.page-container .page-description,\n.freemium-survey-components div.page-container .page-description {\n font-size: 1em;\n font-weight: 400;\n color: var(--question-text-color, #475867);\n}');const o3=["next","next-statement","next-page","skip","skip-statement","skip-page","submit","navigation","page-navigation","clear-selection","message","consent","navigation-prev","navigation-next","navigation-page-prev","navigation-page-next"],s3=({activeIndexOfBlocks:e,activeIndexOfRenderedBlocks:t,renderedBlocks:a,blocks:r,initialStatementHasAnswer:i,activeIndexOfRenderedStatement:o,answers:s,pages:l,navigateToNextPage:c,navigateToPreviousPage:u,translationVariables:d,canDisplayDisableButtonParams:m})=>n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:oe("navigation-page-prev",m),className:"navigation-button",onClick:u,title:d?.prev_question??"go to previous question"},n.createElement(El,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:oe("navigation-page-next",m),title:d?.next_question||"Go to next question",onClick:c},n.createElement(El,{name:"arrow-next"}))),l3=({surveyServAssetUrl:e,thankYouQuestion:a,preview:r,placeholders:i,canResubmit:o,allowMultipleSubmission:s,navigateToStart:l,resetSurvey:c,isMobile:u,pivot:d,rangeToRender:m,translationVariables:h})=>{const{redirectUrl:p,redirectDelay:f,image_url:v,show_custom_button:g,show_review_links:y,show_social_links:b}=a?.type_info?.meta??{},[w,x]=t.useState(f??10);return t.useEffect((()=>{if(!r&&p){const e=setInterval((()=>x((e=>e>1?e-1:(window.location.href=p??"",0)))),1e3);return()=>clearInterval(e)}}),[]),n.createElement("div",{className:"thankyou-container"},n.createElement("div",{className:"question-container thankyou"},v&&n.createElement("img",{className:"thankyou-logo-img",src:v,alt:"thankyou_logo"}),n.createElement("div",{className:"heading"},a?.type_info?.header_text??(h?.thank_you||"Thank you!")),n.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:R({questionText:a.text,placeholders:i,npsRating:d?.answer,ratingLabel:L(d?.answer)?"":m?.find((e=>e?.value===String(d?.answer)))?.text??"",preference:d?.question.type_info?.scale_properties?.labels?.preference,isPreview:r})}}),(o||s)&&n.createElement("div",{className:("wrap-up-actions "+(u?"mobile":"")).trim()},o&&n.createElement("button",{className:"action-button",tabIndex:0,onClick:()=>l()},n.createElement(El,{name:"edit"}),h?.edit_response||"Edit your response"),s&&n.createElement("button",{className:"action-button",tabIndex:0,onClick:c},n.createElement(El,{name:"reload"}),h?.another_response||"Submit another response")),p&&n.createElement(n.Fragment,null,n.createElement("div",{className:"redirection-text"},V(w,h?.redirect_msg),n.createElement("br",null)),n.createElement("a",{className:"link",href:p},p)),n.createElement(of,{show_custom_button:g,show_review_links:y,show_social_links:b,surveyServAssetUrl:e})))},c3=e=>{const{blockIndex:t,renderedBlocks:a,activeIndexOfRenderedBlocks:r,translationVariables:i,saveFormValues:o,answers:s,clearRadioSelection:l,canDisplayDisableButtonParams:c}=e,u={};o3.forEach((e=>{u[e]=!!ae(e,c)}));const d=a[t??r],{question:m}=d,h=m?.type_info?.meta?.display_format;return u?.consent||u?.["clear-selection"]||u?.message?n.createElement("div",{className:"question-footer"},n.createElement("div",null),n.createElement("div",{className:"action-buttons"},u?.["clear-selection"]&&n.createElement(Cl,{className:"sec-button",variant:"secondary",onClick:()=>l(t)},i?.clear_selection??"Clear selection"),u?.consent&&"BUTTON"===h&&$.map((e=>n.createElement(Cl,{key:r+String(e.recordAs),onClick:()=>{o(d,e.recordAs,!0,t)},disabled:oe("consent",c),variant:s.formValues?.[m.name]===e.recordAs?"primary":"secondary",className:("consent-button "+(s.formValues?.[m.name]===e.recordAs?"selected":"")).trim()},m?.type_info?.scale_properties?.labels?.values?.[e.id]??e.defaultValue))))):null},u3=e=>{const{pages:a,activePage:r,navigateToNextPage:i,navigateToPreviousPage:o,isInitialTransition:s,blocks:l,renderedBlocks:c,activeBlock:u,activeIndexOfBlocks:d,activeIndexOfRenderedBlocks:m,isSurveyCompleted:h,translationVariables:p,saveFormValues:f,saveOthersValue:v,skipBlock:g,skipStatement:y,clearRadioSelection:b,onSubmitHandler:w,answers:x,questions:M,resetSurvey:k,initialStatementHasAnswer:C,navigateToStart:P,activeIndexOfRenderedStatement:z,navigateToNextStatement:S,navigateToPreviousStatement:E,pivot:T,formQuestionErrors:$,textboxQuestionErrors:A,contactFormErrors:V,fileUploadErrors:O,setErrors:N,skipToNextPage:W}=(e=>{const a=e.survey.question_details?.questions||[],r=e.contactData||{},i=e.translationVariables||{},[o]=t.useState(e.survey?.blocks?.filter((e=>"TY"!==e.name&&!e.is_deleted))),[s,l]=t.useState({formQuestionErrors:{},textboxQuestionErrors:{},fileUploadErrors:{},contactFormErrors:{}}),[c]=t.useState(e.survey.pages??[]),[u,d]=t.useState(c?.[0]),m=t.useMemo((()=>de({pages:c,blocks:o,questions:a,initialPivotAnswer:e.initialPivotAnswer,responses:e.answers,answerStatus:e.answerStatus||"PARTIAL"})),[o,a,e.answers]),[h,p]=t.useState(m.renderedBlocks),[f,v]=t.useState(m.activeIndexOfRenderedBlocks),[g,y]=t.useState(m.activeIndexOfRenderedStatement),b=t.useRef(m.pivot),w=t.useRef(m.isInitialTransition),[x,M]=t.useState(m.answers),k=t.useRef(((m.isConsideredCompleted||"PARTIAL"===e.answerStatus)&&e.canResubmit)??!1),[C,P]=t.useState(!1),z=h[f],S=n.useMemo((()=>h.length>0?o?.findIndex((e=>e.name===h[f]?.name)):0),[f]);t.useEffect((()=>{if(0===c.length)return;const e=h?.[f]?.page_id,t=c.find((t=>t.page_id===e));e&&t?.page_id&&d(t)}),[d,h,c,f]),t.useEffect((()=>{if(m.isConsideredCompleted&&w.current&&e.canResubmit)return;const{others_meta:t,...n}=e.answers||{};b.current={...b.current,question:F({questions:a,blocks:o})};const i=a.find((e=>e.name===o?.[0]?.question_name||e.name===o?.[0]?.question_names?.[0]))??b.current.question;if(!o||!o.length||!_(n))return void(_(n)||void 0===e.initialPivotAnswer||n[i.name]===e.initialPivotAnswer||M({...x,formValues:{[i.name]:e.initialPivotAnswer}}));if(null!=e.initialPivotAnswer){const t=B(b.current.question,e.initialPivotAnswer);b.current={...b.current,answer:"BOOLEAN"===i?.type_info?.question_type?Boolean(t):t},M({...x,formValues:{...x.formValues,[i.name]:b.current.answer}})}else null!=e.initialQuestionAnswer&&M({...x,formValues:{...x.formValues,[i.name]:e.initialQuestionAnswer}});const s=U({pivotQn:b.current.question,pivotQnAnswer:b.current.answer,block:o[0],questions:a}),l=ce({activeBlock:{...o[0],question:s},blocks:o,questions:a,answers:x,pages:c,pivot:{question:b.current.question,answer:b.current.answer},renderedBlocks:h,contactData:r});p([{...o[0],question:s},...l])}),[o,e.initialPivotAnswer]),t.useEffect((()=>{if(!(m.isConsideredCompleted&&w.current&&e.canResubmit)&&!_(x.formValues)&&o&&E())if(ne({blocks:o,activeIndexOfBlocks:S,renderedBlocks:h,activeIndexOfRenderedBlocks:f,answers:x,questions:a,surveyLayout:"standard"})){const t=()=>{const e=J({renderedBlocks:h,activeBlock:z,blocks:o,activeIndexOfBlocks:S,answers:x,questions:a,contactData:r,pages:c});if(e===1/0)return void setTimeout((()=>{T("COMPLETE"),P(!0)}));setTimeout((()=>{T()}));const t=U({pivotQn:b.current?.question,pivotQnAnswer:b.current?.answer,block:o?.[e],questions:a}),n=le({renderedBlocks:h,activeIndexOfRenderedBlocks:f}),i=o?.[e],s=ce({activeBlock:{...i,question:t},answers:x,blocks:o,pivot:b.current,questions:a,pages:c,renderedBlocks:h,contactData:r}),l=[...n,...t?.name?[{...i,question:t}]:[],...s];p(l),v(n.length)};null!=e.initialPivotAnswer&&1==h.length&&w.current||t()}else"MATRIX_RATING_SCALE"===z?.question?.type_info?.question_type&&T()}),[x,o]);const E=()=>{if(z.question_name)switch(z.question?.type_info?.question_type){case"FORM_FIELD":return he({fields:z.question?.type_info?.form_fields?.fields,answers:x.formValues?.[z.question_name]||{},errorSetter:l,questionName:z.question_name,errors:s,translationVariables:i});case"TEXT":return pe({type:z.question?.type_info?.text_field?.text_type,answer:x.formValues?.[z.question_name]||"",errorSetter:l,questionName:z.question_name,errors:s,translationVariables:i});case"CONTACT_FORM":return fe({fields:z.question?.type_info?.contact_form?.fields,answers:x.formValues?.[z.question_name]||{},errorSetter:l,questionName:z.question_name,errors:s,translationVariables:i});case"FILE":return ve({errors:s.fileUploadErrors})||!z.required}return!0},T=(t="PARTIAL")=>{let n=()=>{};if(!E())return;let r={...x.formValues};"COMPLETE"===t&&(n=()=>{P(!0),k.current=!1},"CONSENT"===z.question?.type_info?.question_type&&"CHECKBOX"===z.question?.type_info?.meta?.display_format&&z.question_name&&_(x.formValues[z.question_name])&&!z.required&&(r[z.question_name]=!1,M((e=>({...e,formValues:{...e.formValues,[z.question?.name]:!1},commitDirtyValue:!1})))),r=ge({pages:c,answers:{...x,formValues:r},blocks:o,questions:a})),e.onSubmit({...r,others_meta:x.others},n,t,k.current?"EDIT":"CREATE")},$=()=>{const e=z.question;if(k.current||f===h.length-1)M({...x,formValues:{...x.formValues,[e.name]:null},commitDirtyValue:!0}),w.current&&(w.current=!1);else{const t=se({renderedBlocks:h,activeIndexOfRenderedBlocks:f,answers:x}),n=le({renderedBlocks:h,activeIndexOfRenderedBlocks:f});p(n),M({...t,formValues:{...t.formValues,[e.name]:null},commitDirtyValue:!0})}},A=()=>{y((e=>e+1))},L=(e,t,n=!1,a=f)=>{w.current=!1,e.question.name===b.current?.question.name&&(b.current={...b.current,answer:"BOOLEAN"===b.current?.question?.type_info?.question_type?Boolean(t):t});let r=x;k.current||!n&&!te({question:e.question,answers:x,isLastRenderedBlock:f===h.length-1})||(r=se({renderedBlocks:h,activeIndexOfRenderedBlocks:a,answers:x})),a!==f&&v(a),M({...r,formValues:{...r.formValues,...null!==t&&{[e.question.name]:"BOOLEAN"===e.question?.type_info?.question_type?Boolean(t):t}},commitDirtyValue:n}),"SINGLE_ANSWER"===z.question.type_info?.matrix_properties?.type&&g<(z.question?.type_info?.matrix_properties?.statements||[]).length-1&&setTimeout((()=>{A?.()}),0)},H=n.useMemo((()=>{if("MATRIX_RATING_SCALE"!==z?.question?.type_info?.question_type)return!1;const e=(z?.question?.type_info?.matrix_properties?.statements||[])[g],t=(x.formValues[z?.question.name]||[]).find((t=>t.statement_id===e?.id));return(t?.rating_labels||[]).length>0}),[g,f]);return{blocks:o,pages:c,navigateToPreviousPage:()=>{let e=u?.page_id,t=f-1;for(;e===u?.page_id&&!(t<0);)e=h[t].page_id,t--;v(t+1)},navigateToNextPage:()=>{let e=u?.page_id,t=f+1;for(;e===u?.page_id&&!(t>=h.length);)e=h[t].page_id,t++;v(t-1)},activePage:u,questions:a,renderedBlocks:h,initialStatementHasAnswer:H,activeBlock:z,activeIndexOfBlocks:S,activeIndexOfRenderedBlocks:f,activeIndexOfRenderedStatement:g,navigateToNextStatement:A,navigateToPreviousStatement:()=>{y((e=>e-1))},isInitialTransition:w.current,isSurveyCompleted:C,pivot:b.current,answers:x,translationVariables:i,...s,setErrors:l,saveFormValues:L,saveOthersValue:(e,t,n=f)=>{if(n!==f&&v(n),null===t){const t={...x.others};delete t[e],M({...x,commitDirtyValue:!1,others:t})}else M({...x,commitDirtyValue:!1,others:{...x.others,[e]:t}})},skipBlock:$,skipStatement:()=>{if(e.isMobile||e.isWidget){const e=z?.question?.type_info?.matrix_properties?.statements||[],t=e[g],n=x.formValues[z?.question.name]||[],a=g<e.length-1;L(z,n.filter((e=>e.statement_id!==t.id)),!a),a&&"MULTIPLE_ANSWERS"===z?.question?.type_info?.matrix_properties?.type&&setTimeout((()=>{A?.()}),0)}else $()},clearRadioSelection:e=>{e!==f&&v(e);const t=h[e].question;delete x.formValues[t.name],delete x.others[t.name];const n=se({renderedBlocks:h,activeIndexOfRenderedBlocks:e,answers:x}),i=ce({activeBlock:h[e],blocks:o,questions:a,answers:x,pages:c,pivot:b.current?.question?.name?{question:b.current.question,answer:b.current.answer}:null,renderedBlocks:h,contactData:r});p([...h.slice(0,e+1),...i]),M({...n,formValues:{[t.name]:null,...n.formValues},commitDirtyValue:!1})},onSubmitHandler:T,navigateToStart:()=>{k.current=!0,P(!1)},resetSurvey:()=>{P(!1);const e=U({pivotQn:b.current?.question,pivotQnAnswer:b.current?.answer,block:o[0],questions:a});p([{...o[0],question:e}]),v(0),M({formValues:{},others:{},commitDirtyValue:!1}),sessionStorage.clear()},skipToNextPage:e=>{const t={};e&&c.length>0&&h.forEach((e=>{u?.page_id===e.page_id&&"MESSAGE"!==e.question.type_info?.question_type&&(t[e.question.name]=null)}));const n=h.filter((e=>u?.page_id===e?.page_id)),a=n[n.length-1],r=h.findIndex((e=>e.name===a.name));v(r),M((e=>({...e,formValues:{...e.formValues,...t},commitDirtyValue:!0})))}}})(e),j=t.useRef(null),G=t.useRef(null),[Z,X]=t.useState(!1),K=n.useMemo((()=>H(T?.question)),[T?.question]),Q=_(x.formValues)&&e.survey.prompt_settings?.is_enabled&&e.preview,[ee,re]=t.useState(Q),ie=c.filter((e=>u?.page_id===e?.page_id));if(t.useEffect((()=>{e.getSurveyProgress?.({totalBlocks:l.length,isSurveyCompleted:h,activeIndexOfBlocks:d})}),[l.length,h,d]),t.useEffect((()=>{e.survey.ui_theme&&D(e.survey.ui_theme)}),[e.survey.ui_theme]),t.useEffect((()=>{setTimeout((()=>{G.current&&G.current.scroll(0,0)}),0)}),[r?.page_id]),!u||!u.question)return null;const{question:ue}=c[m],me={answers:x,blocks:l,blockIndex:0,activeIndexOfBlocks:d,initialStatementHasAnswer:C,activeIndexOfRenderedBlocks:m,activeIndexOfRenderedStatement:0,renderedBlocks:c,activePage:r,isMobile:!!e.isMobile,surveyStyle:e.surveyStyle,isWidget:!!e.isWidget,initialPivotAnswer:e.initialPivotAnswer,isInitialTransition:s,questions:M,pages:a},ye={};o3.forEach((e=>{ye[e]=!!ae(e,me)}));const be=c[c.length-1];return n.createElement("div",{className:`freemium-survey-components ${e.isMobile?"mobile-preview":""} standard-survey-style`,id:"freemium-survey",style:{...I(e.survey.ui_theme||{})}},ee&&e.survey.prompt_settings?n.createElement("div",{className:"questions"},n.createElement("div",{className:"question-container"},n.createElement(rf,{config:e.survey.prompt_settings,onSelect:t=>{e.onAnsweringPrompt?.(t),1===t&&re(!1)},placeholders:e.placeholders,isPreview:!!e.preview}))):n.createElement(n.Fragment,null,h?n.createElement(l3,{surveyServAssetUrl:e.surveyServAssetUrl??"",thankYouQuestion:U({pivotQn:T?.question,pivotQnAnswer:T?.answer,block:Y({activeBlock:be,blocks:e.survey.blocks?.filter((e=>!e.is_deleted)),answers:x,questions:M,activeIndexOfBlocks:l.findIndex((e=>e.name===be.name)),renderedBlocks:c,contactData:e.contactData}),questions:M}),preview:!!e.preview,placeholders:e.placeholders,pivot:{...T,question:T?.question||{name:""},answer:T?.answer},rangeToRender:K,canResubmit:e.canResubmit,isMobile:e.isMobile,allowMultipleSubmission:e.allowMultipleSubmission,translationVariables:p,navigateToStart:()=>{e.handleAction?e.handleAction("EDIT_RESPONSE",(()=>{X(!1),P()})):(X(!1),P())},resetSurvey:()=>{e.handleAction?e.handleAction("RE_SUBMIT",(()=>{X(!1),k()})):(X(!1),k())}}):n.createElement(n.Fragment,null,a.length>0&&r?.page_id&&n.createElement("div",{className:"page-container"},n.createElement("div",{className:"page-title",dangerouslySetInnerHTML:{__html:R({questionText:r?.title,placeholders:{},isPreview:!1})}}),n.createElement("div",{className:"page-description",dangerouslySetInnerHTML:{__html:R({questionText:r?.description,placeholders:{},isPreview:!1})}})),n.createElement("div",{ref:G,className:"questions"},c.map(((t,r)=>{if(a.length>0&&u?.page_id!==t?.page_id)return null;const i=ie.findIndex((e=>e.name===t.name));return n.createElement(vl.div,{id:`${u.question.name}`,key:t.question.name,ref:j,className:"question-container","data-test-question-name":u.question.name,initial:{opacity:0},animate:{opacity:1,x:0},exit:{opacity:0},transition:{duration:.2,delay:i?i/15:0}},n.createElement("div",{className:`question-text ${t.required?"required":""} ${0===r?"nps":""}`.trim(),dangerouslySetInnerHTML:{__html:R({questionText:t.question.text,placeholders:e.placeholders,npsRating:T?.answer,ratingLabel:L(T?.answer)?"":K?.find((e=>e?.value===String(T?.answer)))?.text??"",preference:T?.question.type_info?.scale_properties?.labels?.preference,isPreview:!!e.preview})},"aria-label":`question-${r}`,role:"heading","aria-level":1}),n.createElement(t3,{surveyServAssetUrl:e.surveyServAssetUrl,fileUploadErrors:O,setErrors:N,onFileUpload:e.onFileUpload,block:t,surveyLanguage:e.survey.language,language:e.language||"en",question:t.question,surveyStyle:e.surveyStyle,isFinalQn:q({blocks:l,activeIndexOfBlocks:d,renderedBlocks:c,activeIndexOfRenderedBlocks:m,questions:M}),formValues:x.formValues,othersMeta:x.others,isMobile:!!e.isMobile,autoFocusDelay:20,activeIndexOfRenderedStatement:z,saveOthersValue:(e,t)=>{v(e,t,r)},onChangeHandler:e=>{f(t,e,c.length>1&&("RANGE"===t.question.type_info?.question_type||"BOOLEAN"===t.question.type_info?.question_type),r)},initialPivotAnswer:e.initialPivotAnswer,initialQuestionAnswer:e.initialQuestionAnswer,formQuestionErrors:$,textboxQuestionErrors:A,contactFormErrors:V,translationVariables:p}),n.createElement(c3,{canDisplayDisableButtonParams:{...me,blockIndex:r},isWidget:!1,surveyStyle:e.surveyStyle,answers:x,renderedBlocks:c,blocks:l,pages:a,blockIndex:r,isInitialTransition:s,activeIndexOfRenderedBlocks:m,initialStatementHasAnswer:C,navigateToNextStatement:S,navigateToPreviousStatement:E,activeIndexOfBlocks:d,saveFormValues:f,isMobile:!!e.isMobile,skipBlock:g,skipStatement:y,clearRadioSelection:b,onSubmitHandler:w,initialPivotAnswer:e.initialPivotAnswer,translationVariables:p,formQuestionErrors:$,textboxQuestionErrors:A,contactFormErrors:V,fileUploadErrors:O,questions:M}))}))),n.createElement("div",{className:"page-actions"},n.createElement("div",null,ye["page-navigation"]&&n.createElement(s3,{answers:x,canDisplayDisableButtonParams:me,activeIndexOfBlocks:d,pages:a,activeIndexOfRenderedBlocks:m,renderedBlocks:c,initialStatementHasAnswer:C,blocks:l,activeIndexOfRenderedStatement:z,navigateToNextPage:i,navigateToPreviousPage:o,translationVariables:p})),n.createElement("div",{className:"action-buttons"},ye["skip-page"]&&n.createElement(Cl,{variant:"secondary",onClick:()=>{W(!0)},"aria-label":"skip page"},p?.skip||"Skip"),ye?.["next-page"]&&n.createElement(Cl,{onClick:()=>{W()},disabled:!!oe("next-page",me),className:"next-page"},p?.next||"Next"),ye.submit&&n.createElement(Cl,{disabled:!!oe("submit",me),onClick:()=>{_($?.[ue.name])&&_(A?.[ue.name])&&_(O?.[ue.name])&&_(V?.[ue.name])&&(X(!0),w("COMPLETE"))}},Z?p?.submitting||"Submitting":p?.submit_survey||"Submit"))))),n.createElement(Gp,{...e.footerProps}))};Ml("@keyframes mountWidget {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n.surveyserv-widget-container {\n overflow: hidden;\n position: fixed;\n bottom: 12px;\n border-radius: 6px;\n z-index: var(--fsc-z-index);\n display: flex;\n flex-direction: column;\n background-color: var(--question-background-color, #fff);\n transition: opacity var(--fsc-widget-transition-duration) ease, height var(--fsc-widget-transition-duration) ease;\n animation: mountWidget var(--fsc-widget-transition-duration) ease;\n transform: translate(-50%, 0);\n box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px;\n}\n.surveyserv-widget-container div.page-container {\n padding: 0 24px;\n margin-bottom: 0;\n}\n.surveyserv-widget-container.default-container-style {\n left: 50%;\n width: 660px;\n}\n.surveyserv-widget-container.default-container-style .question-container.thankyou {\n padding-bottom: 12px;\n}\n.surveyserv-widget-container.compact-container-style {\n width: 350px;\n max-width: calc(100vw - 64px);\n transform: unset;\n right: 32px;\n overflow: hidden;\n}\n.surveyserv-widget-container.compact-container-style .compact-footer-layout {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n width: 100%;\n}\n.surveyserv-widget-container.compact-container-style .compact-footer-container {\n flex: 1;\n display: flex;\n flex-wrap: wrap;\n gap: 24px;\n}\n.surveyserv-widget-container.compact-container-style .compact-footer-container button.consent-buttons, .surveyserv-widget-container.compact-container-style .compact-footer-container > :first-child {\n flex: 1;\n}\n.surveyserv-widget-container.compact-container-style .question-container.thankyou {\n padding: 12px;\n}\n.surveyserv-widget-container.cozy-container-style {\n left: 50%;\n width: 96%;\n}\n.surveyserv-widget-container.cozy-container-style .question-container.thankyou {\n padding-bottom: 12px;\n}\n.surveyserv-widget-container div.widget-progressbar {\n position: absolute;\n top: 10px;\n left: 12px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.surveyserv-widget-container div.widget-progressbar .progress-completion {\n font-size: 0.8rem;\n}\n.surveyserv-widget-container header.widget-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 8px 0 8px;\n}\n.surveyserv-widget-container header.widget-header.minimized {\n padding-bottom: 8px;\n}\n.surveyserv-widget-container header.widget-header span.header-content.minimized {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.surveyserv-widget-container header.widget-header div.icons {\n display: flex;\n}\n.surveyserv-widget-container header.widget-header div.icons button.fsc-button {\n transform: unset;\n width: 32px;\n height: 32px;\n display: grid;\n place-content: center;\n padding: 0;\n margin: 0;\n}\n.surveyserv-widget-container header.widget-header div.icons button.fsc-button svg path {\n fill: var(--question-text-color, #12344d);\n stroke: var(--question-text-color, #12344d);\n}\n.surveyserv-widget-container main.widget-main {\n transition: height var(--fsc-transition-duration);\n}\n.surveyserv-widget-container main.widget-main .animation-container {\n transition: height var(--fsc-transition-duration);\n overflow: auto;\n}\n.surveyserv-widget-container main.widget-main .scroll-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n overflow: hidden;\n}\n.surveyserv-widget-container main.widget-main .question-container {\n padding-top: 12px;\n}\n.surveyserv-widget-container main.widget-main .question-text {\n padding: 0 24px;\n}\n.surveyserv-widget-container main.widget-main .question-wrapper {\n padding: 4px 24px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.surveyserv-widget-container main.widget-main .question-footer {\n padding: 0 24px 24px 24px;\n}\n.surveyserv-widget-container main.widget-main.minimized div.widget-progressbar {\n display: none;\n}\n.surveyserv-widget-container main.widget-main.minimized .question-container {\n padding: 0;\n}\n.surveyserv-widget-container main.widget-main.minimized .question-footer {\n display: none;\n}\n.surveyserv-widget-container footer.widget-footer {\n height: 38px;\n background-color: var(--background-color, #f8f8f8);\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 16px;\n}\n.surveyserv-widget-container footer.widget-footer a {\n color: var(--question-text-color, var(--default-question-text-color));\n text-decoration: unset;\n font-size: 0.7rem;\n}");const d3=({surveyServAssetUrl:e,thankYouQuestion:t,placeholders:a,canResubmit:r,navigateToStart:i,resetSurvey:o,widgetStyle:s,allowMultipleSubmission:l,pivot:c,rangeToRender:u,translationVariables:d})=>{const{show_custom_button:m,show_review_links:h,show_social_links:p,image_url:f}=t?.type_info?.meta??{};return n.createElement("div",{className:"question-container thankyou"},f&&n.createElement("img",{className:"thankyou-logo-img",src:f,alt:"thankyou_logo"}),n.createElement("div",{className:f?"heading":"heading thankyou-image"},t?.type_info?.header_text??(d?.thank_you||"Thank you!")),n.createElement("div",{className:f?"text":"text thankyou-image",dangerouslySetInnerHTML:{__html:R({questionText:t.text,placeholders:a,npsRating:c?.answer,ratingLabel:L(c?.answer)?"":u?.find((e=>e?.value===String(c?.answer)))?.text??"",preference:c?.question.type_info?.scale_properties?.labels?.preference})}}),(r||l)&&n.createElement("div",{className:`wrap-up-actions ${f?"":"thank-you-image"} ${"compact"===s?"mobile":""}`.trim()},r&&n.createElement("button",{className:"action-button",tabIndex:0,onClick:i},n.createElement(El,{name:"edit"}),d?.edit_response||"Edit your response"),l&&n.createElement("button",{className:"action-button",tabIndex:0,onClick:o},n.createElement(El,{name:"reload"}),d?.another_response||"Submit another response")),n.createElement(of,{show_custom_button:m,show_review_links:h,show_social_links:p,surveyServAssetUrl:e}))},m3=({activeIndexOfBlocks:e,activeIndexOfRenderedBlocks:t,renderedBlocks:a,blocks:r,answers:i,initialStatementHasAnswer:o,translationVariables:s,activeIndexOfRenderedStatement:l,navigateToPreviousBlock:c,navigateToNextBlock:u,pages:d,canDisplayDisableButtonParams:m})=>n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:!!oe("navigation-prev",m),className:"navigation-button",onClick:c,title:l>0?s?.prev_statement||"go to previous statement":s?.prev_question||"go to previous question"},n.createElement(El,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:!!oe("navigation-next",m),onClick:u,title:s?.next_question||"go to next question"},n.createElement(El,{name:"arrow-next"}))),h3=e=>{const{widgetStyle:a,answers:r,initialStatementHasAnswer:i,renderedBlocks:o,blocks:s,activeIndexOfBlocks:l,navigateToNextStatement:c,activeIndexOfRenderedBlocks:u,translationVariables:d,saveFormValues:m,activeIndexOfRenderedStatement:h=0,onSubmitHandler:p,skipBlock:f,skipStatement:v,navigateToNextBlock:g,navigateToPreviousBlock:y,formQuestionErrors:b,textboxQuestionErrors:w,fileUploadErrors:x,contactFormErrors:M,canDisplayDisableButtonParams:k,pages:C,setFooterElementRef:P}=e,[z,S]=t.useState(!1),{question:E}=o[u],T=E?.type_info?.question_type,A={...k,isSubmitting:z},L=(e=!1)=>{const t=e?[...$].reverse():[...$];return ae("consent",A)&&"BUTTON"===R&&t.map((e=>n.createElement(Cl,{key:u+String(e.id),onClick:()=>{m(o[u],e.recordAs,!0)},disabled:oe("consent",A),className:`consent-buttons ${e.recordAs?"next":"secondary"}-button`.trim()},E?.type_info?.scale_properties?.labels?.values?.[e.id]||e.defaultValue)))},H="compact"===a&&(ae("navigation",A)&&ae("skip",A)||"CONSENT"===T||"MESSAGE"===T),R=E?.type_info?.meta?.display_format;return n.createElement(n.Fragment,null,(ae("navigation",A)||ae("next",A)||ae("next-statement",A)||ae("consent",A)||ae("submit",A)||ae("skip",A)||ae("skip-statement",A)||ae("message",A))&&n.createElement("div",{className:"question-footer",ref:e=>e?P?.(e):null},H?n.createElement("div",{className:"compact-footer-container"},ae("next",A)&&n.createElement(Cl,{onClick:()=>{m(o[u],"CHECKBOX"===E?.type_info?.meta?.display_format&&"CONSENT"===E?.type_info?.question_type?r.formValues[E.name]??!1:null,!0)},disabled:!!oe("next",A),className:"next-button"},d?.next||"Next"),ae("message",A)&&n.createElement(Cl,{onClick:f,disabled:oe("message",A),className:"next-button"},E?.type_info?.scale_properties?.labels?.values?.[0]||"Begin"),ae("submit",A)&&n.createElement("div",{className:"submit"},n.createElement(Cl,{disabled:!!oe("submit",A),onClick:()=>{_(b?.[E.name])&&_(w?.[E.name])&&_(x?.[E.name])&&_(M?.[E.name])&&(S(!0),p("COMPLETE"))}},z?d?.submitting||"Submitting":d?.submit_survey||"Submit")),ae("next-statement",A)&&n.createElement(Cl,{onClick:()=>{c?.()},disabled:!!oe("next-statement",A),className:"next-button"},d?.next||"Next"),L(),n.createElement("div",{className:"compact-footer-layout"},n.createElement(m3,{answers:r,canDisplayDisableButtonParams:A,pages:C,activeIndexOfBlocks:l,activeIndexOfRenderedBlocks:u,renderedBlocks:o,initialStatementHasAnswer:i,blocks:s,activeIndexOfRenderedStatement:h,translationVariables:d,navigateToNextBlock:g,navigateToPreviousBlock:y}),"MESSAGE"!==T&&!s[l].required&&n.createElement(Cl,{className:"skip-button",onClick:f,variant:"secondary","aria-label":"skip question"},d?.skip||"Skip"))):n.createElement(n.Fragment,null,ae("navigation",A)?n.createElement(m3,{answers:r,pages:C,canDisplayDisableButtonParams:A,activeIndexOfBlocks:l,activeIndexOfRenderedBlocks:u,activeIndexOfRenderedStatement:h,renderedBlocks:o,blocks:s,initialStatementHasAnswer:i,translationVariables:d,navigateToNextBlock:g,navigateToPreviousBlock:y}):n.createElement("div",null),n.createElement("div",{className:"action-buttons"},ae("skip",A)&&n.createElement(Cl,{className:"skip-button",variant:"secondary",onClick:f,"aria-label":"skip question"},d?.skip||"Skip"),ae("skip-statement",A)&&n.createElement(Cl,{className:"skip-button",variant:"secondary",onClick:v,"aria-label":"skip statement"},d?.skip||"Skip"),L(!0),ae("next",A)&&n.createElement(Cl,{onClick:()=>{m(o[u],"CHECKBOX"===E?.type_info?.meta?.display_format&&"CONSENT"===E?.type_info?.question_type?r.formValues[E.name]??!1:null,!0)},disabled:!!oe("next",A),className:"next-button"},d?.next||"Next"),ae("next-statement",A)&&n.createElement(Cl,{onClick:()=>{c?.()},disabled:!!oe("next-statement",A),className:"next-button"},d?.next||"Next"),ae("submit",A)&&n.createElement("div",{className:"submit"},n.createElement(Cl,{disabled:!!oe("submit",A),onClick:()=>{_(b?.[E.name])&&_(w?.[E.name])&&_(x?.[E.name])&&_(M?.[E.name])&&(S(!0),p("COMPLETE"))}},z?d?.submitting||"Submitting":d?.submit_survey||"Submit")),ae("message",A)&&n.createElement(Cl,{onClick:f,disabled:oe("message",A),className:"next-button"},E?.type_info?.scale_properties?.labels?.values?.[0]||"Begin")))))},p3=e=>{const{pages:a,activePage:r,blocks:i,renderedBlocks:o,activeBlock:s,activeIndexOfBlocks:l,activeIndexOfRenderedBlocks:c,isSurveyCompleted:u,isReverseAnimation:d,translationVariables:m,saveFormValues:h,saveOthersValue:p,skipBlock:f,skipStatement:v,initialStatementHasAnswer:g,onSubmitHandler:y,navigateToNextBlock:b,activeIndexOfRenderedStatement:w,navigateToNextStatement:x,navigateToPreviousStatement:M,navigateToPreviousBlock:P,answers:z,questions:S,resetSurvey:E,navigateToStart:T,pivot:$,formQuestionErrors:A,textboxQuestionErrors:I,fileUploadErrors:D,contactFormErrors:V,setErrors:O}=ye({...e,isWidget:!0}),[N,W]=t.useState(null),[j,F]=t.useState(null),[B,G]=t.useState(null),[Z,X]=t.useState(0),K=n.useMemo((()=>H($?.question)),[$?.question]),J=_(z.formValues)&&e.survey.prompt_settings?.is_enabled,[Q,ee]=t.useState(J),te=t.useRef(J?-1:c),ne=()=>{if(N){const t=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)-(j?.scrollHeight??0)-(B?.scrollHeight??0)-164,n=Math.min(N?.scrollHeight,Math.min(C[e.widgetStyle],t));Z!==n&&X(n)}};t.useEffect((()=>{setTimeout((()=>{ne()}),0)}),[u,N,w,c]),t.useEffect((()=>{"MATRIX_RATING_SCALE"===s?.question?.type_info?.question_type&&setTimeout((()=>{ne()}),0)}),[w]),t.useEffect((()=>{e.loadAsNewSurvey&&e.handleAction&&e.handleAction("RE_SUBMIT",E)}),[]),t.useEffect((()=>{e.setCurrentSurveyState?.({question:o[c]?.question,npsScore:$?.answer})}),[c,$?.answer]),t.useEffect((()=>{c!==te.current&&(te.current=-1)}),[c]);const ae={answers:z,blocks:i,blockIndex:c,activeIndexOfBlocks:l,initialStatementHasAnswer:g,activeIndexOfRenderedBlocks:c,activeIndexOfRenderedStatement:w,renderedBlocks:o,isMobile:!!e.isMobile,surveyStyle:"card",isWidget:!0,questions:S,pages:a};if(!s||!s?.question)return null;const re=u?i.length:l+(u?1:0),ie=u?100:(re>0?100/i.length:0)*re;return n.createElement("div",{className:`freemium-survey-components widget-survey-components\n ${e.widgetStyle}-style`.trim(),id:"freemium-survey"},u||Q?null:n.createElement("div",{className:"widget-progressbar"},n.createElement("div",{className:"progress-completion"},ie.toFixed(),"%"),n.createElement(md,{totalSteps:i.length,completedSteps:l+(u?1:0),isWidget:!0})),!Q&&!e.minimized&&a.length>0&&r?.page_id&&!u&&n.createElement("div",{className:"page-container",ref:e=>e?G(e):null},n.createElement("div",{className:"page-title",dangerouslySetInnerHTML:{__html:R({questionText:r?.title,placeholders:{},isPreview:!1})}}),n.createElement("div",{className:"page-description",dangerouslySetInnerHTML:{__html:R({questionText:r?.description,placeholders:{},isPreview:!1})}})),n.createElement("div",{className:"questions",style:{...J&&Q||te.current===c?{transition:"none"}:{}}},n.createElement(xl,null,n.createElement(vl.div,{id:`${s.question.name}`,className:`question-container ${u?"thankyou":""} ${Q?"prompt-container":""}`.trim(),"data-test-question-name":s.question.name,key:`${s.question.name}`,initial:{opacity:0,x:d?-48:k},animate:{opacity:1,x:0},exit:{opacity:0,x:d?k:-48},transition:{duration:.2}},Q&&e.survey.prompt_settings?n.createElement(rf,{config:e.survey.prompt_settings,onSelect:t=>{e.onAnsweringPrompt(t),1===t&&ee(!1)},placeholders:e.placeholders}):n.createElement("div",{className:"animation-container",style:{height:e.minimized?0:Z>0?`${Z}px`:"auto"}},n.createElement("div",{className:"scroll-container",ref:e=>e?W(e):null},u?n.createElement(d3,{surveyServAssetUrl:e.surveyServAssetUrl??"",thankYouQuestion:U({pivotQn:$?.question,pivotQnAnswer:$?.answer,block:Y({activeBlock:s,blocks:e.survey.blocks?.filter((e=>!e.is_deleted)),answers:z,questions:S,activeIndexOfBlocks:l,renderedBlocks:o,contactData:e.contactData}),questions:S}),placeholders:e.placeholders,canResubmit:e.canResubmit,widgetStyle:e.widgetStyle,navigateToStart:()=>{e.handleAction?e.handleAction("EDIT_RESPONSE",T):T()},resetSurvey:()=>{e.handleAction?e.handleAction("RE_SUBMIT",E):E()},allowMultipleSubmission:e.allowMultipleSubmission,pivot:$,rangeToRender:K,translationVariables:m}):n.createElement(n.Fragment,null,n.createElement("div",{className:`question-text ${!s.question.type_info?.pivot_question&&s.required?"required":""} ${"RANGE"===s?.question?.type_info?.question_type?"range-question-text":""}`.trim(),dangerouslySetInnerHTML:{__html:R({questionText:s?.question.text,placeholders:e.placeholders,npsRating:$?.answer,ratingLabel:L($?.answer)?"":K?.find((e=>e?.value===String($?.answer)))?.text??"",preference:$?.question.type_info?.scale_properties?.labels?.preference})},"aria-label":`question-${c}`,role:"heading","aria-level":1}),n.createElement("div",{className:"question-wrapper",onTransitionEndCapture:e=>e.stopPropagation()},n.createElement(t3,{setFocus:!0,isReverseAnimation:d,language:e?.language||"en",surveyServAssetUrl:e.surveyServAssetUrl,fileUploadErrors:D,setErrors:O,onFileUpload:e.onFileUpload,surveyLanguage:e.survey.language,block:s,question:s.question,isFinalQn:q({blocks:i,activeIndexOfBlocks:l,renderedBlocks:o,activeIndexOfRenderedBlocks:c,questions:S}),formValues:z.formValues,widgetStyle:e.widgetStyle,isMobile:!1,othersMeta:z.others,autoFocusDelay:0,activeIndexOfRenderedStatement:w,isWidget:!0,saveOthersValue:(e,t)=>{p(e,t),setTimeout((()=>{ne()}),0)},onChangeHandler:e=>{setTimeout((()=>{ne()}),0),h(s,e)},formQuestionErrors:A,textboxQuestionErrors:I,contactFormErrors:V,translationVariables:m}))))))),!u&&n.createElement(h3,{pages:a,isWidget:!0,widgetStyle:e.widgetStyle,setFooterElementRef:F,surveyStyle:"standard",answers:z,canDisplayDisableButtonParams:{...ae,blockIndex:c,activeIndexOfRenderedBlocks:c},isMobile:!1,renderedBlocks:o,initialStatementHasAnswer:g,activeIndexOfRenderedStatement:w,blocks:i,activeIndexOfRenderedBlocks:c,navigateToNextStatement:x,navigateToPreviousStatement:M,activeIndexOfBlocks:l,translationVariables:m,saveFormValues:h,skipBlock:f,skipStatement:v,onSubmitHandler:y,navigateToPreviousBlock:P,navigateToNextBlock:b,formQuestionErrors:A,textboxQuestionErrors:I,fileUploadErrors:D,contactFormErrors:V,questions:S})))},f3={default:{width:522,11:6,10:6,9:8,8:8,7:18,6:22,5:28,4:32,3:36},compact:{width:522,11:6,10:6,9:8,8:8,7:18,6:22,5:28,4:32,3:36},cozy:{width:582,11:12,10:12,9:12,8:12,7:18,6:22,5:28,4:32,3:36}},v3=({survey:e,preview:a,placeholders:r,contactData:i,overRideComponent:o,onSubmit:s,onDismiss:l,onClose:c,isMobile:u,surveyType:d,unsubscribeUrl:m,isSurveyCompleted:h,children:p=null,answerStatus:f,loadSurveyCollapsed:v=!1,handleAction:g,answers:y,onAnsweringPrompt:b,allowMultipleSubmission:w,loadAsNewSurvey:x,canResubmit:M,translationVariables:k,surveyServAssetUrl:C,surveyPoweredBy:P,onFileUpload:z})=>{const S=e.question_details?.questions||[],[E,T]=t.useState(),[$,A]=t.useState(!1),[L,V]=t.useState(v),{ui_theme:O}=e,[N,j]=t.useState(null),F=n.useMemo((()=>((e=[])=>{const t=e.sort(((e,t)=>Number(e.order)-Number(t.order)));return t.find((e=>!e.is_deleted))??t[0]})(e.blocks||[])),[e.blocks]),B=F?.question_name?F?.question_name??"":F?.category?.[0].question_name??"",q=S.find((e=>e.name===B)),U=()=>{A(!0),setTimeout((()=>{c?.()}),300)},G=t.useRef(null);return n.useEffect((()=>{const t=document.documentElement;if(!t||!e.question_details?.questions)return;let n=0;(e.question_details.questions??[]).forEach((e=>{const t=H(e);"RANGE"===e.type_info?.question_type&&t.length>n&&(n=t.length)}));const a=42*n+f3[d][n]*(n-1);t.style.setProperty("--fsc-max-range-question-width",Math.min(f3[d].width,a)+"px")}),[e,d]),n.useEffect((()=>{O&&D(O)}),[O]),n.createElement("div",{className:`surveyserv-widget-container ${u?"widget-mobile":""} ${d}-container-style ${L?"minimized":""}`,style:{opacity:$?0:1,...I(O||{})}},n.createElement("header",{id:"surveyserv-widget-header",className:("widget-header "+(L?"minimized":"")).trim()},L?n.createElement("span",{className:"header-content minimized",dangerouslySetInnerHTML:{__html:R({questionText:(!E&&e.prompt_settings?.is_enabled?e.prompt_settings.text:N?.question?.text)??W(q?.text||""),placeholders:{...r,"{{nps.rating}}":String(N?.npsScore??"")}})}}):n.createElement("div",null),n.createElement("div",{className:"icons"},!h&&n.createElement(Cl,{onClick:()=>{V((e=>!e))},variant:"secondary",className:"icon minimize-btn",title:L?k?.maximize||"Maximize widget":k?.minimize||"Minimize widget"},L?n.createElement(El,{name:"widget-maximize"}):n.createElement(El,{name:"widget-minimize"})),n.createElement(Cl,{ref:G,onClick:()=>{h||l(),U()},variant:"secondary",title:k?.dismiss||"Dismiss widget",className:"icon minimize-btn"},n.createElement(El,{name:"widget-close"})))),p,n.createElement("main",{className:("widget-main "+(L?"minimized":"")).trim()},o?n.createElement(n.Fragment,null,o):n.createElement(p3,{surveyServAssetUrl:C,answers:y,minimized:L,widgetStyle:d,answerStatus:f,survey:e,placeholders:r,isMobile:!!u,contactData:i,onFileUpload:z,allowMultipleSubmission:w,loadAsNewSurvey:x,canResubmit:M,onSubmit:s,setCurrentSurveyState:j,widgetHeaderQuerySelector:L?void 0:"#surveyserv-widget-header",onAnsweringPrompt:t=>{b?.(t),T(t),0==t&&_(e.prompt_settings?.declined_message)&&U()},handleAction:g,translationVariables:k})),n.createElement("footer",{className:("widget-footer "+(L?"minimized":"")).trim()},m&&!L&&n.createElement("a",{href:m,target:"_blank",rel:"noopener noreferrer",onClick:e=>{a&&e.preventDefault(),e.stopPropagation(),U()}},k?.unsubscribe||"Unsubscribe"),n.createElement("div",{className:"footer-text"},n.createElement(Up,{surveyPoweredBy:P}))))};Ml('.whatsapp-container {\n --message-margin: 40px;\n --message-border: 6px;\n --message-bg: #fff;\n --message-color: #0096de;\n --message-disabled-color: #aaa;\n --answers-bg: #d3ffc8;\n --answers-color: #000;\n --answers-radius: 6px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n font-size: var(--fsc-font-size);\n position: relative;\n width: 340px;\n height: 574px;\n background-image: url("https://microfrontend.prestaging.sta91ng-surveyserv.com/survey/whatsapp-bg.svg");\n background-repeat: no-repeat;\n background-size: contain;\n margin: 0 auto;\n}\n.whatsapp-container.instagram {\n --message-bg: none;\n --answers-bg: #4d5bff;\n --answers-color: #fff;\n --answers-radius: 21px;\n background-image: url("https://microfrontend.prestaging.sta91ng-surveyserv.com/survey/instagram-bg.svg");\n}\n.whatsapp-container.instagram .msg-container {\n position: relative;\n}\n.whatsapp-container.instagram .choices {\n display: none;\n flex-direction: row;\n position: absolute;\n bottom: 0;\n margin-right: 0;\n width: 93%;\n}\n.whatsapp-container.instagram .choices:before {\n content: "";\n display: block;\n width: 100%;\n position: absolute;\n top: 0px;\n border-top: 1px solid #e8e8e8;\n}\n.whatsapp-container.instagram .choices .choice {\n border: 1px solid #0584fe;\n border-radius: 50px;\n color: #0584fe;\n box-shadow: none;\n}\n.whatsapp-container.instagram .choices.one-line .range-choice,\n.whatsapp-container.instagram .choices.one-line .choice {\n flex-grow: 0;\n}\n.whatsapp-container.instagram .question-container {\n background: #efefef;\n padding: 2px;\n border-radius: 21px;\n}\n.whatsapp-container.instagram .question-container .options-popup {\n display: flex;\n overflow: auto;\n flex-direction: row;\n padding: 5px 0px 2px;\n box-shadow: none;\n border-top: 1px solid #e8e8e8;\n border-radius: 0;\n left: 7px;\n min-height: 50px;\n bottom: 0px;\n}\n.whatsapp-container.instagram .question-container .options-popup footer,\n.whatsapp-container.instagram .question-container .options-popup header {\n display: none;\n}\n.whatsapp-container.instagram .question-container .options-popup main {\n display: flex;\n padding: 0;\n}\n.whatsapp-container.instagram .question-container .options-popup main .option-row {\n border: 1px solid #0584fe;\n border-radius: 50px;\n margin: 5px;\n padding: 5px 10px;\n}\n.whatsapp-container.instagram .question-container .options-popup main .option-row button {\n color: var(--message-color);\n display: flex;\n}\n.whatsapp-container.instagram .question-container .choices-button.choice {\n font-weight: 700;\n font-size: 13.4838px;\n line-height: 16px;\n letter-spacing: -0.03em;\n color: #333333;\n border: none;\n width: auto;\n padding: 8px;\n border-radius: 10px;\n margin: 5px 10px 10px;\n box-shadow: none;\n}\n.whatsapp-container.instagram .question-container .choices-button.choice svg {\n display: none;\n}\n.whatsapp-container.instagram .question-container .question-text-container {\n box-shadow: none;\n}\n.whatsapp-container.instagram .question-container.active {\n margin-bottom: 40px;\n}\n.whatsapp-container.instagram .question-container.active .choices {\n display: flex;\n overflow: auto;\n padding-top: 10px;\n background: #fff;\n}\n.whatsapp-container.instagram .question-container.active .choices .choice button {\n white-space: nowrap;\n}\n.whatsapp-container.instagram .question-container.active .choices.multi-choice {\n padding-bottom: 0;\n}\n.whatsapp-container.instagram .question-container.active .choices.multi-choice::before {\n content: none;\n}\n.whatsapp-container.instagram .textarea-container {\n background: #fff;\n margin-right: 23px;\n}\n.whatsapp-container.instagram .textarea-container textarea {\n background: #e8e8e8;\n border-radius: 18px;\n}\n.whatsapp-container.instagram .answers {\n box-shadow: none;\n}\n.whatsapp-container .msg-container {\n margin-top: 80px;\n margin-left: 18px;\n margin-right: 20px;\n flex-grow: 1;\n padding: 8px;\n overflow: hidden;\n display: flex;\n}\n.whatsapp-container .scroll-wrapper {\n display: flex;\n flex-direction: column;\n align-items: baseline;\n gap: 12px;\n overflow: scroll;\n}\n.whatsapp-container .question-text.required::after {\n content: "*";\n color: rgb(215, 45, 48);\n margin-left: 4px;\n}\n.whatsapp-container .question-text {\n font-size: 16px;\n line-height: 18px;\n padding: 12px;\n background-color: var(--message-bg);\n border-radius: var(--message-border);\n}\n.whatsapp-container .question-text p {\n text-align: left;\n}\n.whatsapp-container .question-text a {\n color: var(--link-color);\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n.whatsapp-container .question-container {\n margin-right: var(--message-margin);\n gap: 2px;\n display: flex;\n flex-direction: column;\n pointer-events: none;\n text-align: left;\n}\n.whatsapp-container .question-container .question-text-container {\n box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 1px;\n}\n.whatsapp-container .question-container.active {\n pointer-events: initial;\n}\n.whatsapp-container .question-container.active .choice {\n color: var(--message-color);\n}\n.whatsapp-container .question-container.active .choice button {\n color: var(--message-color);\n}\n.whatsapp-container .question-container.active .choice svg:not(#star) {\n fill: var(--message-color);\n}\n.whatsapp-container .question-container.active.open-modal {\n margin-bottom: 45px;\n}\n.whatsapp-container .question-container#new {\n margin-bottom: 10px;\n}\n.whatsapp-container .answers-container {\n width: 100%;\n display: flex;\n justify-content: end;\n text-align: left;\n}\n.whatsapp-container .answers {\n background: var(--answers-bg);\n margin-left: var(--message-margin);\n border-radius: var(--answers-radius);\n color: var(--answers-color);\n padding: 12px;\n width: -moz-fit-content;\n width: fit-content;\n min-width: 80px;\n font-size: 16px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 1px;\n}\n.whatsapp-container .answers .reply-block {\n background: rgba(0, 0, 0, 0.08);\n margin: -6px -6px 4px;\n padding: 5px 8px;\n border-radius: 6px;\n border-left: 3px solid #2c5cc5;\n}\n.whatsapp-container .answers .reply-block .user {\n color: #2c5cc5;\n font-weight: 600;\n margin-bottom: 3px;\n}\n.whatsapp-container .answers:empty {\n display: none;\n}\n.whatsapp-container .answers .answer-text {\n display: flex;\n align-items: center;\n}\n.whatsapp-container .answers .answer-text span {\n white-space: nowrap;\n}\n.whatsapp-container .options-popup {\n position: absolute;\n z-index: 1;\n border-radius: 12px 12px 30px 30px;\n background-color: #fff;\n box-shadow: 0px -10px 10px rgba(0, 0, 0, 0.06);\n padding: 12px 8px;\n bottom: 15px;\n left: 18px;\n right: 22px;\n transform: translateY(80px);\n transition: all linear 0.3s;\n opacity: 0;\n}\n.whatsapp-container .fade-enter-active {\n transform: translateY(0px);\n opacity: 1;\n}\n.whatsapp-container .fade-enter-done {\n transform: translateY(0px);\n opacity: 1;\n}\n.whatsapp-container .fade-exit-active {\n opacity: 0;\n transform: translateY(80px);\n}\n.whatsapp-container .fade-exit-done {\n opacity: 0;\n transform: translateY(80px);\n}\n.whatsapp-container .option-row {\n padding-bottom: 16px;\n}\n.whatsapp-container .option-row button {\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n width: 100%;\n}\n.whatsapp-container .option-row button span {\n white-space: nowrap;\n margin-left: 5px;\n}\n.whatsapp-container header {\n text-align: center;\n display: flex;\n align-items: center;\n padding-bottom: 20px;\n position: relative;\n}\n.whatsapp-container main {\n padding: 0 8px;\n}\n.whatsapp-container .close {\n background: transparent;\n border: none;\n width: 32px;\n height: 32px;\n position: absolute;\n}\n.whatsapp-container .choices-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n gap: 12px;\n}\n.whatsapp-container .choices {\n display: flex;\n flex-direction: column;\n gap: 2px;\n list-style-type: none;\n padding-bottom: 5px;\n}\n.whatsapp-container .choices.multi-choice .choice button {\n white-space: normal;\n}\n.whatsapp-container .choices.one-line {\n flex-direction: row;\n}\n.whatsapp-container .choices.one-line .range-choice,\n.whatsapp-container .choices.one-line .choice {\n flex-grow: 1;\n}\n.whatsapp-container .choice {\n background-color: var(--message-bg);\n padding: 8px 12px;\n border-radius: var(--message-border);\n text-align: center;\n color: var(--message-disabled-color);\n box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 1px;\n}\n.whatsapp-container .choice button {\n color: var(--message-disabled-color);\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n white-space: nowrap;\n}\n.whatsapp-container .choice svg:not(#star) {\n fill: var(--message-disabled-color);\n}\n.whatsapp-container .range-choice {\n padding-top: 4px;\n padding-bottom: 4px;\n}\n.whatsapp-container h4 {\n margin: 0 auto;\n font-weight: 500;\n}\n.whatsapp-container footer {\n color: #979797;\n font-size: 0.8em;\n text-align: center;\n padding: 12px 0;\n}\n.whatsapp-container button {\n background: transparent;\n border: 0;\n cursor: pointer;\n}\n.whatsapp-container .textarea-container {\n display: flex;\n gap: 8px;\n margin-left: 12px;\n margin-right: 16px;\n margin-bottom: 26px;\n margin-top: 10px;\n margin: 0 21px 15px 18px;\n padding: 10px 12px;\n align-items: end;\n background: #f6f6f6;\n border-radius: 0 0 30px 30px;\n}\n.whatsapp-container textarea {\n resize: none;\n min-height: 40px;\n max-height: 100px;\n border-radius: 20px;\n padding: 12px;\n resize: none;\n border: none;\n width: 100%;\n}\n.whatsapp-container textarea:focus {\n outline: none;\n}\n.whatsapp-container textarea::placeholder {\n line-height: 16px;\n padding-left: 2px;\n}');const g3=({children:e,title:t,closeModal:a,isModalOpen:r})=>n.createElement(l.CSSTransition,{in:r,unmountOnExit:!0,timeout:500,classNames:"fade",key:t},n.createElement("div",{className:"options-popup",style:{}},n.createElement("header",null,n.createElement("button",{onClick:a,className:"close"},n.createElement(El,{name:"widget-close"})),n.createElement("h4",null,t)),n.createElement("main",null,e),n.createElement("footer",null,"Tab an item to select it"))),y3=({question:e,saveFormValues:a})=>{const[r,i]=t.useState(!1),{range:o}=e?.type_info?.scale_properties||{},s=Number(o?.[0]?.min),l=Number(o?.[o.length-1]?.max),c="descending"===e?.type_info?.scale_properties?.order,u=[...e?.type_info?.scale_properties?.labels?.values||[]],d=e?.type_info?.scale_properties?.labels?.preference;c&&u.reverse();const m=t.useRef(Array.from({length:l+(0===s?1:0)},((e,t)=>c?l-t:t+s)));return m.current.length<=3?n.createElement("ul",{className:`choices ${("THUMBS"===e?.type_info?.type_variant||"all"!==e?.type_info?.scale_properties?.labels?.preference)&&"one-line"}`},m.current.map(((t,r)=>"THUMBS"===e?.type_info?.type_variant?n.createElement("li",{className:"choice range-choice",key:`thumbs-${t}-${r}`},n.createElement("button",{onClick:()=>{a(t)}},n.createElement(El,{name:t?"whatsapp-thumbs-up":"whatsapp-thumbs-down"}),"all"===e?.type_info?.scale_properties?.labels?.preference&&e?.type_info?.scale_properties?.labels?.values?.[t])):n.createElement("li",{className:"choice range-choice",key:`choice-${t}-${r}`},n.createElement("button",{onClick:()=>{a(t)}},Array.from({length:t},((e,t)=>n.createElement(El,{name:"whatsapp-star",id:`choice-${t}`})))," ","all"===e?.type_info?.scale_properties?.labels?.preference&&e?.type_info?.scale_properties?.labels?.values?.[t-1]))))):n.createElement(n.Fragment,null,n.createElement("button",{onClick:()=>i(!0),className:"choices-button choice"},n.createElement(El,{name:"whatsapp-choices"}),"Rate Support"),n.createElement(g3,{title:"Rate Support",isModalOpen:r,closeModal:()=>i(!1)},m.current.map(((e,t)=>n.createElement("div",{className:"option-row"},n.createElement("button",{onClick:()=>{a(e),i(!1)}},Array.from({length:e},((e,t)=>n.createElement(El,{name:"whatsapp-star",id:`qus-${t}`})))," ","all"===d||"edges"===d&&(0===t||t===u.length-1)?n.createElement("span",null,u[e-1]):null))))))},b3=({question:e,saveFormValues:a,type:r})=>{const[i,o]=t.useState(!1);return n.createElement(n.Fragment,null,n.createElement("button",{onClick:()=>o(!0),className:"choices-button choice"},n.createElement(El,{name:"whatsapp-choices"}),"Select answer"),n.createElement(g3,{title:"Select a choice",isModalOpen:i,closeModal:()=>o(!1)},n.createElement("ul",{className:`choices multi-choice ${r}`},e.choices.map(((e,t)=>n.createElement("li",{className:"choice",style:{boxShadow:"none"},key:`${e}-${t}`},n.createElement("button",{onClick:()=>{a(e.id),o(!1)}},e.value)))))))},w3=e=>{const a=t.useRef(null);return((e,n)=>{t.useEffect((()=>{if(e){e.style.height="0px";const t=e.scrollHeight;e.style.height=t+"px"}}),[e,n])})(a.current,String(e.value)??""),t.useEffect((()=>{e.autoFocus&&a.current?.focus()}),[e.autoFocus]),n.createElement("div",{className:"textarea-container"},n.createElement("textarea",{placeholder:"Type a message",ref:a,rows:1,onChange:e.onChange,value:e.value}),n.createElement("button",{onClick:()=>{e.onSubmit(),a.current&&(a.current.value="")}},n.createElement(El,{name:"whatsapp-send"})))},x3=({text:e,placeholders:t,pivot:a,rangeToRender:r})=>n.createElement("div",{className:"question-text-container"},n.createElement("div",{className:"question-text",dangerouslySetInnerHTML:{__html:R({questionText:e,placeholders:t,npsRating:a?.answer,ratingLabel:L(a?.answer)?"":r?.find((e=>e?.value===String(a?.answer)))?.text??"",preference:a?.question.type_info?.scale_properties?.labels?.preference,isPreview:!0})},role:"heading","aria-level":1})),M3=({block:e,saveFormValues:t,type:a,translationVariables:r})=>{const{question_type:i}=e.question?.type_info;switch(i){case"RANGE":return n.createElement(y3,{question:e.question,saveFormValues:e=>t(e,!0)});case"DROPDOWN":case"MULTI_CHOICE":case"MULTI_SELECT":return n.createElement(b3,{question:e.question,saveFormValues:e=>t(e,!0),type:a,translationVariables:r});case"PARAGRAPH":case"INPUT":return null;default:return console.error(`Question type ${i} not supported`),null}},k3=({config:e,placeholders:a,onSelect:r,promptAccepted:i,type:o})=>{const s=t.useMemo((()=>e.reverse_order?e.choices?.reverse():e.choices),[e]);return n.createElement(n.Fragment,null,n.createElement("div",{className:"question-container "+(null==i?"active":"")},n.createElement(x3,{text:e.text,placeholders:a}),n.createElement("ul",{className:"choices one-line"},s?.map(((e,t)=>n.createElement("li",{className:"choice",key:`prompt-${e}-${t}`},n.createElement("button",{className:"action",onClick:()=>{r(Number(e.id))}},n.createElement(El,{name:Number(e.id)?"whatsapp-thumbs-up":"whatsapp-thumbs-down"}),e.value)))))),void 0!==i&&n.createElement("div",{className:"answers-container"},n.createElement("div",{className:"answers"},"whatsapp"===o&&n.createElement("div",{className:"reply-block"},n.createElement("p",{className:"user"},"Acme.inc"),n.createElement("p",{className:"question",dangerouslySetInnerHTML:{__html:R({questionText:e.text,placeholders:a})}})),n.createElement("div",{className:"answer-text"},n.createElement(El,{name:Number(i)?"whatsapp-thumbs-up":"whatsapp-thumbs-down"}),s.find((e=>e.id==i))?.value))),!1===i&&e.is_declined&&e.declined_message&&n.createElement("div",{className:"question-container"},n.createElement(x3,{text:e.declined_message,placeholders:a})))},C3=e=>{const{activeBlock:a,activeIndexOfBlocks:r,activeIndexOfRenderedBlocks:i,answers:o,saveFormValues:s,blocks:l,questions:c,renderedBlocks:u,onSubmitHandler:d,isSurveyCompleted:m,pivot:h}=ye(e),{type:p="whatsapp"}=e,{question_type:f}=a?.question.type_info??{},v=n.useMemo((()=>H(h?.question)),[h?.question]),g=t.useRef(null),[y,b]=t.useState(void 0);return t.useEffect((()=>{g.current&&g.current.scroll({top:1e4,behavior:"smooth"})}),[a,o,m]),a&&a.question?n.createElement("div",{className:`${p} whatsapp-container`},n.createElement("div",{className:"msg-container"},n.createElement("div",{className:"scroll-wrapper",ref:g},e.survey.prompt_settings?n.createElement(k3,{config:e.survey.prompt_settings,onSelect:e=>{b(1===e)},promptAccepted:y,placeholders:e.placeholders,type:p}):null,!e.survey.prompt_settings||y?u.map(((t,f)=>n.createElement(n.Fragment,null,n.createElement("div",{className:"question-container "+(m||f!==u.length-1?"":"active")},n.createElement(x3,{text:t.question.text,placeholders:e.placeholders,pivot:h,rangeToRender:v}),n.createElement(M3,{language:e.language||"en",block:t,placeholders:e.placeholders,saveFormValues:(e,n)=>{s(t,e,n),setTimeout((()=>{!0===n&&q({blocks:l,activeIndexOfBlocks:r,renderedBlocks:u,activeIndexOfRenderedBlocks:i,questions:c})&&d("COMPLETE")}))},type:p})),t.name===a.name&&!o.commitDirtyValue||Pl.isNil(o.formValues[t.question.name])?null:n.createElement("div",{className:"answers-container"},n.createElement("div",{className:"answers"},"THUMBS"===t.question.type_info?.type_variant?n.createElement(n.Fragment,null,"whatsapp"===p&&n.createElement("div",{className:"reply-block"},n.createElement("p",{className:"user"},"Acme.inc"),n.createElement("p",{className:"question",dangerouslySetInnerHTML:{__html:R({questionText:t.question.text||"",placeholders:e.placeholders,npsRating:h?.answer,ratingLabel:Pl.isNil(h?.answer)?"":v?.find((e=>e?.value===String(h?.answer)))?.text??"",preference:h?.question.type_info?.scale_properties?.labels?.preference,isPreview:!0})}})),n.createElement("div",{className:"answer-text"},n.createElement(El,{name:Number(o.formValues[t.question.name])?"whatsapp-thumbs-up":"whatsapp-thumbs-down"}),"all"===t.question.type_info?.scale_properties?.labels?.preference&&t.question.type_info?.scale_properties?.labels?.values?.[Number(o.formValues[t.question.name])])):"EMOJI"===t.question.type_info?.type_variant||"STAR"===t.question.type_info?.type_variant?n.createElement(n.Fragment,null,"whatsapp"===p&&o.formValues[t.question.name]&&n.createElement("div",{className:"reply-block"},n.createElement("p",{className:"user"},"Acme.inc"),n.createElement("p",{className:"question",dangerouslySetInnerHTML:{__html:R({questionText:t.question.text||"",placeholders:e.placeholders,npsRating:h?.answer,ratingLabel:Pl.isNil(h?.answer)?"":v?.find((e=>e?.value===String(h?.answer)))?.text??"",preference:h?.question.type_info?.scale_properties?.labels?.preference,isPreview:!0})}})),n.createElement("div",{className:"answer-text"},Array.from({length:Number(o.formValues[t.question.name])},((e,t)=>n.createElement(El,{name:"whatsapp-star",id:`ans-${t}`})))," ",n.createElement("span",null,t.question.type_info?.scale_properties?.labels?.values?.[Number(o.formValues[t.question.name])-1]))):"DROPDOWN"===t.question.type_info?.question_type||"MULTI_SELECT"===t.question.type_info?.question_type?n.createElement(n.Fragment,null,t.question.choices?.find((e=>e.id===o.formValues[t.question.name]))?.value||o.formValues[t.question.name]):n.createElement(n.Fragment,null,o.formValues[t.question.name])))))):null,m&&n.createElement("div",{className:"question-container",id:"new"},n.createElement(x3,{text:U({pivotQn:h?.question,pivotQnAnswer:h?.answer,block:e.survey.blocks?.find((e=>"TY"===e.name)),questions:c})?.text,placeholders:e.placeholders,pivot:h,rangeToRender:v})))),n.createElement(w3,{onChange:e=>{"PARAGRAPH"!==f||m||s(a,e.target.value)},value:"PARAGRAPH"===f&&!m&&o.formValues[a.question.name]?o.formValues[a.question.name]:"",activeBlock:!0,autoFocus:"PARAGRAPH"===f,onSubmit:()=>{s(a,null,!0),a.name===l[l.length-1].name&&d("COMPLETE")}})):null};var P3=Object.freeze({__proto__:null,allPathsLoader:function(e,t){return ke(void 0,void 0,void 0,(function(){return Ce(this,(function(n){switch(n.label){case 0:return[4,Promise.resolve().then((function(){return Pw}))];case 1:return[2,(0,n.sent().getIconPaths)(e,t)]}}))}))}}),z3=Object.freeze({__proto__:null,splitPathsBySizeLoader:function(e,t){return ke(void 0,void 0,void 0,(function(){var n,a;return Ce(this,(function(r){switch(r.label){case 0:return n=yw(e),t!==ww.STANDARD?[3,2]:[4,Promise.resolve().then((function(){return xw}))];case 1:return a=r.sent(),[3,4];case 2:return[4,Promise.resolve().then((function(){return Mw}))];case 3:a=r.sent(),r.label=4;case 4:return[2,a[n]]}}))}))}});exports.Binary=Ll,exports.Button=Cl,exports.ChannelPreview=e=>{const{survey:t,answers:a}=j(e.survey,e.answers);return"whatsapp"===e.channel?n.createElement(C3,{...e,survey:t,answers:a}):"instagram"===e.channel?n.createElement(C3,{type:"instagram",...e,survey:t,answers:a}):(console.error(`Channel ${e.channel} not supported`),null)},exports.Checkbox=ud,exports.Dropdown=Yu,exports.Input=Dl,exports.ProgressBar=md,exports.RadioGroup=dd,exports.Range=Il,exports.RankOrder=Yh,exports.Slider=qp,exports.Survey=e=>{const{survey:t,answers:a}=j(e.survey,e.answers),[r,i]=n.useState(!1);return n.useEffect((()=>{"undefined"!=typeof window&&i(window.matchMedia("(max-width: 550px)").matches),sessionStorage.clear()}),[]),n.createElement(n.Fragment,null,"standard"===e.surveyStyle?n.createElement(u3,{...e,answers:a,survey:t,isMobile:r||!!e.isMobile,initialQuestionAnswer:e.initialQuestionAnswer}):n.createElement(i3,{...e,answers:a,survey:t,isMobile:r||!!e.isMobile,surveyStyle:"card",initialQuestionAnswer:e.initialQuestionAnswer}))},exports.SurveyFooter=Gp,exports.SurveyProgress=({isSurveyCompleted:e,totalBlocks:t,completedText:a,activeIndexOfBlocks:r})=>{const i=e?t:r+(e?1:0),o=e?100:(i>0?100/t:0)*i;return n.createElement("div",{className:"survey-progress"},n.createElement("span",{className:"progress-completion"},o.toFixed(),"% "),a||"survey completed",n.createElement(md,{totalSteps:t,completedSteps:i}))},exports.TextArea=Vl,exports.WebInAppSurvey=e=>{const{survey:t,answers:a}=j(e.survey,e.answers),[r,i]=n.useState(!1),[o,s]=n.useState(!1);return n.useEffect((()=>{"undefined"!=typeof window&&i(window.matchMedia("(max-width: 550px)").matches)}),[]),n.useEffect((()=>{"undefined"!=typeof window&&s(window.matchMedia("(max-width: 1080px)").matches)}),[]),n.createElement(v3,{...e,survey:t,answers:a,isMobile:r,surveyType:r?"compact":o?"default":e.surveyType})},exports.getEmailEmbedCodeForQuestion=e=>{const{emailEmbedChannelInfo:t,survey:n,question:a,collectorId:r,customDomain:i,disabled:o,publicSurveyUrl:s}=e,l=a?.type_info?.scale_properties?.labels?.preference,c=a?.type_info?.footer_text,u=af({collectorId:r,disabled:o,publicSurveyUrl:s,contact_fields:t?.contact_fields||[],customDomain:i,initialPivotAnswer:"",surveyId:n?.id||""}).trim();return`\n <table\n class="email-embed-question"\n style="\n background-color:${n?.ui_theme?.question_background_color||"#FFFFFF"} !important;\n min-width : min(100%, 320px);\n max-width : 612px !important;\n box-shadow: rgba(18, 52, 77, 0.1) 0px 2px 16px !important;\n border-radius: 4px !important;\n border-spacing: 16px !important;\n margin: ${t?.align_center?"20px auto":"20px 0"} !important;\n "\n >\n <tbody>\n <tr>\n <td\n style="\n color: ${n?.ui_theme?.question_text_color||Yp} !important;\n padding: 16px 8px 0 8px !important;\n font-weight: 400 !important;\n font-size: 16px !important;\n text-align: ${t?.align_center?"center":"left"} !important;\n "\n >${a?.text?.trim()}</td>\n ${t?.display?.show_button?`\n <tr>\n <td\n style="\n color: ${n?.ui_theme?.question_text_color||Yp} !important;\n padding: 16px 8px 16px 8px !important;\n font-weight: 400 !important;\n font-size: 16px !important;\n text-align: ${t?.align_center?"center":"left"} !important;\n "\n >\n <a\n href=${u}\n target="_blank"\n style="\n pointer-events: ${o?"none":"unset"} !important;\n "\n >\n <button\n style="\n cursor: pointer !important;\n box-shadow: 0 0 0 8px #F0F0F0 !important;\n color: #FFF !important;\n font-size: 14px !important;\n font-style: normal !important;\n font-weight: 600 !important;\n line-height: 20px !important;\n padding: 6px 12px !important;\n border-radius: 4px !important;\n border: 1px solid #C82124 !important;\n background: linear-gradient(180deg, #D72D30 2.56%, #C82124 95.75%) !important;\n "\n >\n ${t?.display?.text}\n </button>\n </a>\n </td>\n </tr>\n `:`\n ${a?.type_info?.type_variant&&"RANGE"===a?.type_info?.question_type&&"all"!==l&&["NUMBER","EMOJI","STAR"].includes(a.type_info.type_variant)?(({emailEmbedChannelInfo:e,collectorId:t,survey:n,question:a,publicSurveyUrl:r,assetUrl:i,disabled:o,customDomain:s})=>{const l=ef(a?.type_info?.scale_properties?.button_style?.shape||"square"),c=H(a||{name:""}),u=a?.type_info?.type_variant,d=c.length,m={3:10,4:8.5,5:8,6:7.5,7:7,8:6.5,9:6,10:5.5,11:5};return`\n <tr>\n <td\n style="\n padding: 16px 0 8px 0 !important;\n text-align: center !important;\n "\n >\n <table\n style="\n border-spacing: 0px !important;\n margin: 0 auto !important;\n width: ${{3:50,4:70,5:80,6:80,7:80,8:100,9:100,10:100,11:100}[d]}% !important;\n "\n >\n <tbody>\n <tr>\n ${c.map((h=>`\n <td\n style="\n padding: 0px !important;\n text-align: center !important;\n "\n >\n <a\n style="\n text-decoration: unset !important;\n pointer-events: ${o?"none":"unset"} !important;\n display: block !important;\n width: fit-content !important;\n margin: 0 auto !important;\n "\n href="${af({collectorId:t,disabled:o,publicSurveyUrl:r,contact_fields:e?.contact_fields||[],customDomain:s,initialPivotAnswer:`${h.position}`,surveyId:n?.id||""}).trim()}"\n target="_blank"\n >\n ${"NUMBER"===a?.type_info?.type_variant?`\n <div\n style="\n border-radius: ${l} !important;\n color: ${n?.ui_theme?.question_text_color||Xp} !important;\n background-color: ${tf({position:h.position,question:a||{name:""}})} !important;\n font-size: min(${Jp/3}px, ${m[d]/2}vw) !important;\n font-weight: 600 !important;\n width: min(44px, ${m[d]}vw) !important;\n height: min(44px, ${m[d]}vw) !important;\n line-height: min(44px, ${m[d]}vw) !important;\n "\n >${h.value}</div>`:""}\n ${a?.type_info?.type_variant&&["EMOJI","STAR"].includes(a?.type_info?.type_variant)?`\n <img\n src="${nf({position:h.position,assetUrl:i,max:c.length,type_variant:u})}"\n style="\n max-width: unset !important;\n width: min(44px, ${m[d]}vw) !important;\n height: min(44px, ${m[d]}vw) !important;\n display: block !important;\n "\n />`:""}\n </a>\n </td>`)).join("")}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>`})(e):""}\n ${a?.type_info?.type_variant&&"RANGE"===a?.type_info?.question_type&&"all"===l&&["NUMBER","EMOJI","STAR"].includes(a.type_info.type_variant)?(({emailEmbedChannelInfo:e,collectorId:t,survey:n,question:a,assetUrl:r,publicSurveyUrl:i,customDomain:o,disabled:s})=>{const l=ef(a?.type_info?.scale_properties?.button_style?.shape||"square"),c=H(a||{name:""}),u=a?.type_info?.type_variant;return`\n <tr>\n <td\n style="\n padding: 0 !important;\n text-align: center !important;\n "\n >\n ${c.map((d=>`\n <a\n style="\n text-decoration: unset !important;\n display: inline-block !important;\n min-width: 100px !important;\n width: 100px !important;\n vertical-align: top !important;\n padding: 0 !important;\n margin: 12px 6px !important;\n pointer-events: ${s?"none":"unset"} !important;\n "\n href="${af({collectorId:t,disabled:s,publicSurveyUrl:i,contact_fields:e?.contact_fields||[],customDomain:o,initialPivotAnswer:`${d.position}`,surveyId:n?.id||""}).trim()}"\n target="_blank"\n >\n <table\n style="\n border-spacing: 0 !important;\n margin: 0 auto !important;\n "\n >\n <tbody>\n <tr>\n <td\n style="\n padding: 0 !important;\n text-align: center !important;\n "\n >\n ${"NUMBER"===a?.type_info?.type_variant?`\n <div\n style="\n border-radius: ${l} !important;\n color: ${n?.ui_theme?.question_text_color||Xp} !important;\n background-color: ${tf({position:d.position,question:a||{name:""}})} !important;\n font-size: 16px !important;\n font-weight: 600 !important;\n width: 44px !important;\n display: block !important;\n margin: 0 auto !important;\n height: 44px !important;\n line-height: 44px !important;\n "\n >${d.value}</div>\n `:""}\n ${a?.type_info?.type_variant&&["EMOJI","STAR"].includes(a?.type_info?.type_variant)?`\n <img\n src="${nf({position:d.position,assetUrl:r,max:c.length,type_variant:u})}"\n style="\n width: 44px !important;\n height: 44px !important;\n display: block !important;\n margin: 0 auto !important;\n "\n width="44px"\n height="44px"\n />`:""}\n </td>\n </tr>\n <tr>\n <td\n style="\n padding: 12px 0 0 0 !important;\n text-align: center !important;\n font-weight: 400 !important;\n color: ${Xp} !important;\n font-size: 12px !important;\n word-break: break-word !important;\n "\n >${d.text}</td>\n </tr>\n </tbody>\n </table>\n </a>`)).join("")}\n </td>\n </tr>`})(e):""}\n ${"RANGE"===a?.type_info?.question_type&&"TEXT"===a.type_info.type_variant?(({emailEmbedChannelInfo:e,collectorId:t,publicSurveyUrl:n,survey:a,question:r,disabled:i,customDomain:o})=>{const s=ef(r?.type_info?.scale_properties?.button_style?.shape||"square");return`\n <tr>\n <td\n style="\n padding: 0 !important;\n text-align: center !important;\n "\n >\n ${H(r||{name:""}).map((l=>`\n <a\n style="\n text-decoration: unset !important;\n display: inline-block !important;\n vertical-align: top !important;\n pointer-events: ${i?"none":"unset"} !important;\n "\n href="${af({collectorId:t,disabled:i,publicSurveyUrl:n,contact_fields:e?.contact_fields||[],customDomain:o,initialPivotAnswer:`${l.position}`,surveyId:a?.id||""}).trim()}"\n target="_blank"\n >\n <div\n style="\n border-radius: ${s} !important;\n color: ${a?.ui_theme?.question_text_color||Xp} !important;\n background-color: ${tf({position:l.position,question:r||{name:""}})} !important;\n height: 58px !important;\n width: 102px !important;\n margin: 4px !important;\n display: block !important;\n cursor: cursor !important;\n "\n >\n <table\n style="\n border-spacing: 8px 4px !important;\n height: 100% !important;\n width: 100% !important;\n "\n >\n <tbody>\n <tr>\n <td\n style="\n padding: 0 !important;\n font-size: 14px !important;\n line-height: 16px !important;\n word-break: break-word !important;\n "\n >${l.text}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </a>`)).join("")}\n </td>\n </tr>`})(e):""}\n ${"BOOLEAN"===a?.type_info?.question_type?(({emailEmbedChannelInfo:e,disabled:t,assetUrl:n,collectorId:a,survey:r,question:i,customDomain:o,publicSurveyUrl:s})=>{const l=i?.type_info?.type_variant,c=i?.type_info?.question_type,u=i?.type_info?.scale_properties?.labels?.preference,d=H(i||{name:""});let m=0;return d.forEach((e=>{e.text.length>m&&(m=e.text.length)})),`\n <tr>\n <td\n style="\n padding: 0 !important;\n text-align: center !important;\n "\n >\n ${d.map((i=>`\n <a\n style="\n text-decoration: unset !important;\n display: inline-block !important;\n vertical-align: top !important;\n height: 54px !important;\n width: ${7*m+96}px !important;\n min-width: 140px !important;\n margin: 6px !important;\n border-radius: 5px !important;\n background-color: #f2f2f2 !important;\n color: ${r?.ui_theme?.question_text_color||Xp} !important;\n pointer-events: ${t?"none":"unset"} !important;\n "\n href="${af({collectorId:a,publicSurveyUrl:s,disabled:t,contact_fields:e?.contact_fields||[],customDomain:o,initialPivotAnswer:`${i.position}`,surveyId:r?.id||""}).trim()}"\n target="_blank"\n >\n <table\n style="\n border-spacing: 8px !important;\n margin: 0 auto !important;\n height: 100% !important;\n "\n >\n <tbody>\n <tr>\n ${"TEXT"!==l?`\n <td\n style="\n padding: 0 !important;\n "\n >\n <img\n src="${nf({position:i.position,assetUrl:n,max:d.length,question_type:c,type_variant:l})}"\n width="18px"\n style="\n vertical-align: middle !important;\n "\n />\n </td>`:""}\n <td\n style="\n padding: 0 !important;\n "\n >\n <span\n style="\n display: inline-block !important;\n vertical-align: baseline !important;\n font-size: 14px !important;\n font-weight: 500 !important;\n line-height: 16px !important;\n "\n >${"all"===u?i.text:""}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </a>`)).join("")}\n </td>\n </tr>`})(e):""}\n ${"RANGE"===a?.type_info?.question_type&&"edges"===l?(({question:e})=>{const t=H(e||{name:""});return`\n <tr>\n <td\n style="\n text-align: center !important;\n padding: 8px ${{3:8,4:7,5:6,6:5,7:4,8:0,9:0,10:0,11:0}[t.length]}vw !important;\n vertical-align: baseline !important;\n "\n >\n <table\n style="\n border-spacing: 0px !important;\n margin: 0 auto !important;\n width: 100% !important;\n "\n >\n <tbody>\n <tr>\n <td style="text-align: left !important;">\n <span \n style="\n font-weight: 500 !important;\n color: ${Xp} !important;\n font-size: 12px !important;\n "\n >${t[0].value} - ${t[0].text}</span>\n </td>\n <td style="text-align: right !important;">\n <span\n style="\n font-weight: 500 !important;\n color: ${Xp} !important;\n font-size: 12px !important;\n "\n >${t[t.length-1].value} - ${t[t.length-1].text}\n </span>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n `.trim()})({question:a}):""}\n `}\n ${c&&t?.show_footer?`\n <tr>\n <td\n style="\n color: ${n?.ui_theme?.question_text_color||Yp} !important;\n padding: 16px 8px 0 8px !important;\n font-size: 12px !important;\n border-top: 1px solid ${Kp} !important;\n text-align: center !important;\n "\n >${c}</td>\n </tr>`:""}\n ${t?.show_link?`\n <tr>\n <td\n style="\n color: ${n?.ui_theme?.question_text_color||Yp} !important;\n padding: 16px 8px 0 8px !important;\n font-size: 12px !important;\n text-align: center !important;\n "\n >\n If you face any issues while responding to the survey, please copy and paste the following link into your web browser: \n <a\n style="\n text-decoration: unset !important;\n color: ${Zp} !important;\n pointer-events: ${o?"none":"unset"} !important;\n word-break: break-all !important;\n "\n href=${o?"#":u}\n target="_blank"\n >\n ${af({collectorId:r,disabled:!1,publicSurveyUrl:s,contact_fields:t?.contact_fields||[],customDomain:i,initialPivotAnswer:"",surveyId:n?.id||""}).trim()}\n </a>\n </td>\n </tr>`:""}\n </tbody>\n </table>\n `};
|
|
35
|
+
*/;const a4=({addFilter:e,utils:t})=>{const{Type:n,isString:a,replaceInString:r,guesstimateMimeType:i,getExtensionFromFilename:o,getFilenameFromURL:s}=t,l=(e,t)=>e.some((e=>{return/\*$/.test(e)?(n=e,(/^[^/]+/.exec(t)||[]).pop()===n.slice(0,-2)):e===t;var n})),c=(e,t,n)=>{if(0===t.length)return!0;const r=(e=>{let t="";if(a(e)){const n=s(e),a=o(n);a&&(t=i(a))}else t=e.type;return t})(e);return n?new Promise(((a,i)=>{n(e,r).then((e=>{l(t,e)?a():i()})).catch(i)})):l(t,r)};return e("SET_ATTRIBUTE_TO_OPTION_MAP",(e=>Object.assign(e,{accept:"acceptedFileTypes"}))),e("ALLOW_HOPPER_ITEM",((e,{query:t})=>!t("GET_ALLOW_FILE_TYPE_VALIDATION")||c(e,t("GET_ACCEPTED_FILE_TYPES")))),e("LOAD_FILE",((e,{query:t})=>new Promise(((n,a)=>{if(!t("GET_ALLOW_FILE_TYPE_VALIDATION"))return void n(e);const i=t("GET_ACCEPTED_FILE_TYPES"),o=t("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),s=c(e,i,o),l=()=>{const e=i.map((e=>t=>null!==e[t]&&(e[t]||t))(t("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"))).filter((e=>!1!==e)),n=e.filter(((t,n)=>e.indexOf(t)===n));a({status:{main:t("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:r(t("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:n.join(", "),allButLastType:n.slice(0,-1).join(", "),lastType:n[n.length-1]})}})};if("boolean"==typeof s)return s?n(e):l();s.then((()=>{n(e)})).catch(l)})))),{options:{allowFileTypeValidation:[!0,n.BOOLEAN],acceptedFileTypes:[[],n.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",n.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",n.STRING],fileValidateTypeLabelExpectedTypesMap:[{},n.OBJECT],fileValidateTypeDetectType:[null,n.FUNCTION]}}};"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:a4}));Ml('/*!\n * FilePond 4.30.6\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n.filepond--assistant{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--browser.filepond--browser{position:absolute;margin:0;padding:0;left:1em;top:1.75em;width:calc(100% - 2em);opacity:0;font-size:0}.filepond--data{position:absolute;width:0;height:0;padding:0;margin:0;border:none;visibility:hidden;pointer-events:none;contain:strict}.filepond--drip{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;opacity:.1;pointer-events:none;border-radius:.5em;background:rgba(0,0,0,.01)}.filepond--drip-blob{-webkit-transform-origin:center center;transform-origin:center center;width:8em;height:8em;margin-left:-4em;margin-top:-4em;background:#292625;border-radius:50%}.filepond--drip-blob,.filepond--drop-label{position:absolute;top:0;left:0;will-change:transform,opacity}.filepond--drop-label{right:0;margin:0;color:#4f4f4f;display:flex;justify-content:center;align-items:center;height:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;text-align:center;line-height:1.5}.filepond--label-action{-webkit-text-decoration:underline;text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;-webkit-text-decoration-color:#a7a4a4;text-decoration-color:#a7a4a4;cursor:pointer}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{font-size:1em;width:1.625em;height:1.625em;font-family:inherit;line-height:inherit;margin:0;padding:0;border:none;outline:none;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file-action-button.filepond--file-action-button svg{width:100%;height:100%}.filepond--file-action-button.filepond--file-action-button:after{position:absolute;left:-.75em;right:-.75em;top:-.75em;bottom:-.75em;content:""}.filepond--file-action-button{cursor:auto;color:#fff;border-radius:50%;background-color:rgba(0,0,0,.5);background-image:none;box-shadow:0 0 0 0 hsla(0,0%,100%,0);transition:box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{box-shadow:0 0 0 .125em hsla(0,0%,100%,.9)}.filepond--file-action-button[disabled]{color:hsla(0,0%,100%,.5);background-color:rgba(0,0,0,.25)}.filepond--file-action-button[hidden]{display:none}.filepond--action-edit-item.filepond--action-edit-item{width:2em;height:2em;padding:.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=center]{margin-left:-.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=bottom]{margin-bottom:-.1875em}.filepond--action-edit-item-alt{border:none;line-height:inherit;background:transparent;font-family:inherit;color:inherit;outline:none;padding:0;margin:0 0 0 .25em;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{width:1.3125em;height:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--file-info{position:static;display:flex;flex-direction:column;align-items:flex-start;flex:1;margin:0 .5em 0 0;min-width:0;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{position:static;display:flex;flex-direction:column;align-items:flex-end;flex-grow:0;flex-shrink:0;margin:0;min-width:2.25em;text-align:right;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;margin:0;padding:0;min-width:0;height:100%}.filepond--file-wrapper.filepond--file-wrapper>legend{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file{position:static;display:flex;height:100%;align-items:flex-start;padding:.5625em;color:#fff;border-radius:.5em}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state~=processing] .filepond--file-status-sub{opacity:0}[data-filepond-item-state~=processing] .filepond--action-abort-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-error] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-error] .filepond--action-retry-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{-webkit-animation:fall .5s linear .125s both;animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--processing-complete-indicator:not([style*=hidden])~.filepond--file-status .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{-webkit-animation:shake .65s linear both;animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@-webkit-keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:"";position:absolute;left:0;top:0;right:0;bottom:0;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{position:absolute;top:0;left:0;right:0;z-index:1;padding:0;margin:.25em;will-change:transform,opacity}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{box-shadow:0 .0625em .125em -.0625em rgba(0,0,0,.25)}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:-webkit-grab;cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{transition:box-shadow .125s ease-in-out;box-shadow:0 0 0 transparent}.filepond--item[data-drag-state=drag]{cursor:-webkit-grabbing;cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{box-shadow:0 .125em .3125em rgba(0,0,0,.325)}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;transition:background-color .25s}.filepond--list-scroller{position:absolute;top:0;left:0;right:0;margin:0;will-change:transform}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller[data-state=overflow]{overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent)}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:99999px;border:.3125em solid transparent;background-clip:content-box}.filepond--list.filepond--list{position:absolute;top:0;margin:0;padding:0;list-style-type:none;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{width:100%;height:100%;max-width:none;margin:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{bottom:0;height:auto;display:flex;justify-content:center;align-items:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{overflow:hidden;height:100%;margin-top:0;margin-bottom:0}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{left:0;right:0;height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{z-index:7}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--action-edit-item{opacity:1!important;visibility:visible!important}@media not all and (-webkit-min-device-pixel-ratio:0), not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.filepond--root[data-style-panel-layout~=circle]{will-change:transform}}}.filepond--panel-root{border-radius:.5em;background-color:#f1f0ef}.filepond--panel{position:absolute;left:0;top:0;right:0;margin:0;height:100%!important;pointer-events:none}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{-webkit-transform-style:preserve-3d;transform-style:preserve-3d;background-color:transparent!important;border:none!important}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{position:absolute;left:0;top:0;right:0;margin:0;padding:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border-bottom:none!important}.filepond--panel-top:after{content:"";position:absolute;height:2px;left:0;right:0;bottom:-1px;background-color:inherit}.filepond--panel-bottom,.filepond--panel-center{will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:translate3d(0,.5em,0);transform:translate3d(0,.5em,0)}.filepond--panel-bottom{border-top-left-radius:0!important;border-top-right-radius:0!important;border-top:none!important}.filepond--panel-bottom:before{content:"";position:absolute;height:2px;left:0;right:0;top:-1px;background-color:inherit}.filepond--panel-center{height:100px!important;border-top:none!important;border-bottom:none!important;border-radius:0!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{position:static;width:1.25em;height:1.25em;color:#fff;margin:0;pointer-events:none;will-change:transform,opacity}.filepond--progress-indicator svg{width:100%;height:100%;vertical-align:top;transform-box:fill-box}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{box-sizing:border-box;position:relative;margin-bottom:1em;font-size:1rem;line-height:normal;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-weight:450;text-align:left;text-rendering:optimizeLegibility;direction:ltr;contain:layout style size}.filepond--root *{box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root[data-disabled] .filepond--list-scroller{pointer-events:all}.filepond--root[data-disabled] .filepond--list{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-top:1em;margin-bottom:1em}.filepond--root .filepond--credits{position:absolute;right:0;opacity:.175;line-height:.85;font-size:11px;color:inherit;-webkit-text-decoration:none;text-decoration:none;z-index:3;bottom:-14px}.filepond--root .filepond--credits[style]{top:0;bottom:auto;margin-top:14px}');Ml(".PinturaModal {\n z-index: 2147483648 !important;\n}\n\n.freemium-survey-components .file-upload-container {\n display: flex;\n position: relative;\n z-index: 4;\n flex-direction: column;\n align-items: center;\n padding: 20px;\n row-gap: 12px;\n border: 2px dashed var(--file-upload-border-color);\n border-radius: 5px;\n background-color: #fafafa;\n box-shadow: 0px 12px 15px 0px rgba(18, 52, 77, 0.0509803922);\n color: var(--question-secondary-color);\n outline: none;\n transition: border 0.24s ease-in-out;\n width: 100%;\n cursor: pointer;\n margin-bottom: 10px;\n}\n.freemium-survey-components .file-upload-container.push-backward {\n z-index: 0 !important;\n}\n.freemium-survey-components .file-upload-container .drop-your-file-container {\n color: #12344d;\n font-size: var(--fsc-font-size);\n margin: 0 0 8px 0 !important;\n font-size: var(--fsc-font-size);\n font-weight: 500;\n}\n.freemium-survey-components .file-upload-container .link {\n font-weight: 500;\n font-size: 0.9em;\n line-height: 20px;\n text-align: center;\n color: var(--input-highlight-color);\n -webkit-text-decoration: underline;\n text-decoration: underline;\n margin-left: 1px;\n}\n.freemium-survey-components .file-upload-container p.max-size {\n margin: 0 0 8px 0 !important;\n font-size: 0.8em;\n font-weight: 500;\n color: #92a2b1;\n}\n.freemium-survey-components .file-upload-container p.support.file-formats {\n margin: 0 !important;\n font-size: 0.8em;\n font-weight: 500;\n color: var(--question-secondary-color);\n max-width: 80%;\n color: #92a2b1;\n line-height: 1.5;\n}\n.freemium-survey-components .file-upload-container.errored {\n border: 2px dashed var(--file-upload-error-border-color);\n}\n.freemium-survey-components .filepond--item {\n height: 200px !important;\n}\n.freemium-survey-components .filepond--item[data-filepond-item-state=load-invalid] {\n display: none;\n}\n.freemium-survey-components .filepond--item.filepond--item-error .filepond--image-preview {\n display: block !important;\n}\n.freemium-survey-components .file-upload-container {\n visibility: visible;\n}\n.freemium-survey-components .file-error {\n color: var(--text-danger);\n font-size: 0.8em;\n font-weight: 600;\n text-align: left;\n display: flex;\n align-items: start;\n}\n.freemium-survey-components .file-error span {\n line-height: 1.5;\n display: inline-block;\n width: 100%;\n line-break: anywhere;\n margin-left: 5px;\n}\n.freemium-survey-components .filepond--panel-center.filepond--item-panel {\n height: 16px !important;\n}\n.freemium-survey-components .filepond--wrapper {\n margin-bottom: 5px;\n}\n.freemium-survey-components .filepond--file-poster-wrapper {\n height: 200px;\n}\n.freemium-survey-components .filepond--panel-bottom.filepond--item-panel {\n top: 18%;\n transform: none !important;\n}\n.freemium-survey-components .filepond--root.filepond--hopper {\n position: absolute !important;\n width: 100%;\n height: 100% !important;\n z-index: 2;\n}\n.freemium-survey-components .filepond--drop-label label {\n display: none !important;\n}\n.freemium-survey-components .filepond--panel.filepond--panel-root {\n display: none;\n}\n.freemium-survey-components [data-filepond-item-state*=error] .filepond--item-panel,\n.freemium-survey-components [data-filepond-item-state*=invalid] .filepond--item-panel {\n background-color: #c82124;\n}\n.freemium-survey-components .filepond--file-status {\n max-width: 522px;\n min-width: 202px;\n}\n.freemium-survey-components .filepond--file-status-sub {\n max-width: 95%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.freemium-survey-components .filepond--file-info {\n max-width: 50%;\n}\n.freemium-survey-components.standard-survey-style .filepond--root.filepond--hopper {\n width: 90%;\n height: 70% !important;\n}\n.freemium-survey-components.widget-survey-components .filepond--root.filepond--hopper {\n width: 90%;\n height: 54% !important;\n}\n.freemium-survey-components.widget-survey-components .filepond--file-status {\n max-width: 60%;\n}\n.freemium-survey-components.mobile-preview .filepond--file-status {\n max-width: 76%;\n min-width: 100px;\n}\n.freemium-survey-components.mobile-preview .filepond--item {\n height: 50px;\n}\n.freemium-survey-components.mobile-preview .filepond--file-status-sub {\n display: none;\n}"),d.registerPlugin(n4,a4,UD,t4),C5(P5,S5,z5,E5);const r4=t.forwardRef((({onClick:e,maxFileSize:a=16,visible:r=!0,supportedFileFormats:i,translationVariables:o,fileErrors:s},l)=>{const[c,u]=t.useState(!1),d=o?.drop_your_file?o?.drop_your_file:n.createElement(n.Fragment,null,"Drop your file here, or Browse");return n.createElement("div",{ref:l,className:"file-upload-container "+(s?.current?.main?"errored":""),onClick:e,style:{visibility:r?"visible":"hidden"},onDragOver:e=>{e.preventDefault(),e.target.classList.add("push-backward")}}," ",n.createElement(El,{name:"file-upload-icon"}),"string"!=typeof d?n.createElement("p",null,d):n.createElement("p",{className:"drop-your-file-container",dangerouslySetInnerHTML:{__html:d}}),n.createElement("p",{className:"max-size"},((e,t,n)=>{if(n&&e&&t)return e.replace(t,n)})(o?.max_file_size,"{{max_file_size}}",String(a))||`Maximum file size : ${a} MB`),n.createElement("p",{className:"support file-formats"},o?.supported_file_formats||"Supported file formats: "," ",(i=i.join(", ")).trim()?n.createElement(n.Fragment,null,c?i:i.slice(0,20)," ",n.createElement("span",{onClick:()=>u(!c),style:{color:"#2C5CC5",textDecoration:"underline",cursor:"pointer"}},c?o?.show_less||"Show less":o?.show_more||"Show more")):"No formats selected"),n.createElement("div",{className:"filepond--drip"}))})),i4=({question:e,onChangeHandler:a,onFileUpload:r,setErrors:i,errors:o,translationVariables:s,surveyServAssetUrl:l,value:c})=>{const[u,m]=t.useState([]),[h,p]=t.useState([]),f=t.useRef(),v=e.type_info?.file_field?.max_file_size||10,g=t.useRef(null),y=t.useRef(),[b,w]=t.useState(!1);let x=!1;n.useEffect((()=>{const t=sessionStorage.getItem(`uploadedFile-${e?.name}`),n=t?JSON.parse(t):"";n?.source&&(n.options={...n.options,file:{name:c,size:n.fileSize}},c&&m([n]))}),[]);const M=async(t,n)=>{try{if(x)return;if(y.current&&_(g.current)||t){const i=t??y.current.getFiles()?.[0]?.file;if(i&&r){x=!0;const t=await r(i.type,i.size,i.name,e);if(n&&n(!0,50,100),t.startsWith("http")&&l){const n=await fetch(t,{method:"PUT",headers:{"Content-Type":i.type,"Content-Disposition":"attachment"},body:i}),r=new URL(t),o=`${l}${r.pathname}`;if(!n.ok)throw console.error("Error uploading file"),new Error("Error uploading file");sessionStorage.setItem(`uploadedFile-${e?.name}`,JSON.stringify({source:o,options:{type:"local"},fileSize:y.current.getFiles()?.[0]?.fileSize})),a(i.name)}else a(null),console.error("Error fetching pre-signed url");x=!1}}}catch(e){throw console.error("error in uploading file",e,"stringified error",JSON.stringify(e)),new Error("Error uploading file")}};return n.useEffect((()=>{(()=>{const t=e.type_info?.file_field?.allowed_file_types,n=Object.keys(A).map((e=>{if((t||[]).includes(e))return A[e].concat(",")})).join(" ").trim().slice(0,-1);p(n.split(", "))})()}),[]),n.createElement(n.Fragment,null,n.createElement(d.FilePond,{ref:y,files:u,labelFileProcessing:s?.uploading_text??"Uploading..",labelFileProcessingComplete:s?.upload_complete??"Upload complete",labelMaxFileSizeExceeded:s?.file_too_large??"The file is too large and cannot be uploaded.",labelMaxFileSize:"",labelTapToCancel:"",labelTapToUndo:"",labelFileTypeNotAllowed:s?.invalid_type??"The file mismatch. Retry by uploading the supported file type.",fileValidateTypeLabelExpectedTypes:"",beforeAddFile:e=>(g.current?.main&&(g.current=null,i({}),m([e]),w(!0)),!0),onremovefile:()=>{b?w(!1):(m([]),i({}),g.current=null,a(null))},allowReplace:!0,server:{process:async(e,t,n,a,r,i)=>{i(!0,0,100);try{await M(t,i),i(!0,100,100),a(t.name)}catch(e){r("An error occurred during upload")}}},onpreparefile:(e,t)=>{const n=new FileReader;n.onloadend=()=>{const t=n.result??"",a=new Blob([t],{type:e.fileType}),r=new File([a],e.filename,{type:e.fileType});M(r)},n.readAsArrayBuffer(t)},onerror:t=>{g.current=t,i({[e.name]:t})},required:!0,credits:!1,allowFileTypeValidation:!0,acceptedFileTypes:h,fileValidateTypeDetectType:(e,t)=>new Promise(((t,n)=>{const a=e.name.split(".");t(`.${a[a.length-1].toLowerCase()}`)})),imageEditor:{legacyDataToImageState:oQ,createEditor:D5,imageReader:[x5,{}],imageWriter:[M5,{}],imageProcessor:Qq,imageEditorAfterWriteImage:({src:e,dest:t,imageState:n})=>new Promise(((a,r)=>{Qq(e,{imageReader:x5(),imageWriter:M5({targetSize:{width:128,height:15,fit:"cover"}}),imageState:n}).then((n=>{a([{name:"input_",file:e},{name:"output_",file:t},{name:"thumb_",file:n.dest}])})).catch(r)})),editorOptions:{utils:["crop","finetune","filter","annotate"],imageOrienter:{read:eV,apply:fV},shapePreprocessor:V5(),...T5,...$5,...k5,locale:{...A5,..._5,...R5,...H5,...I5,...L5}}},allowFileSizeValidation:!0,maxFileSize:`${v}MB`,onupdatefiles:e=>{f.current?.classList.remove("push-backward"),e.length&&m(e)},maxFiles:1,name:`${e.id}-files`}),n.createElement(r4,{ref:f,onClick:e=>{const t=e.target;"path"!==t?.tagName&&"P"!==t?.tagName&&(!t?.className||t?.className instanceof SVGAnimatedString||t.className.includes("format-type-toggler"))||y.current.browse()},fileErrors:g,visible:Boolean(!u.length||g.current?.main),maxFileSize:v,translationVariables:{...s,tTimeZones:[{id:"",offset:"",timeZone:""}]},supportedFileFormats:h}),g?.current?.main&&n.createElement("div",{className:"file-error"},n.createElement(El,{name:"info"}),n.createElement("span",null,`${g?.current?.main}\n ${g.current?.sub}`)))};Ml(".fsc-form-field-container {\n display: flex;\n gap: 16px;\n}\n.fsc-form-field-container.layout-horizontal {\n flex-direction: row;\n flex-wrap: wrap;\n}\n.fsc-form-field-container.layout-horizontal .fsc-form-field {\n flex: 1;\n align-self: end;\n}\n.fsc-form-field-container.layout-vertical {\n flex-direction: column;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .fsc-form-field-container {\n flex-direction: row;\n flex-wrap: wrap;\n }\n .freemium-survey-components .fsc-form-field-container .fsc-form-field {\n flex: 1;\n }\n}\n.freemium-survey-components.mobile-preview .fsc-form-field-container {\n flex-direction: row;\n flex-wrap: wrap;\n}\n.freemium-survey-components.mobile-preview .fsc-form-field-container .fsc-form-field {\n flex: 1;\n}");const o4=e=>{const{placeholder:t,name:a,isRequired:r,label:i,isErrored:o,errorText:s,id:l,disabled:c,language:u,allowOnlyFuture:d,displayFormat:m,type:h,onChange:p,value:f,translationVariables:v,...g}=e,y=m?kD[m]:kD["MMM dd, yyyy"];return n.createElement("div",{className:"fsc-picker fsc-date-picker",id:`date-picker-container-${l??""}`.trim(),"aria-invalid":o},i&&n.createElement("label",{htmlFor:e.id,className:"input-label"},i,i&&r&&n.createElement("span",null,"*")),n.createElement(lx,null,n.createElement(fE,{canClearSelection:!0,closeOnSelection:!0,locale:wD(u||"en"),disabled:c,minDate:d?new Date:cf(new Date).subtract(60,"years").toDate(),maxDate:cf(new Date).add(60,"years").toDate(),fill:!0,highlightCurrentDay:!0,inputProps:{placeholder:t??y,name:a,id:l,"aria-disabled":c},dayPickerProps:{disabled:c,components:{Dropdown:e=>n.createElement(yE,{translationVariables:v,...e,disabled:c})}},showActionsBar:!0,popoverProps:{minimal:!1,placement:"bottom-start",usePortal:!0},parseDate:e=>e?cf(e).toDate():new Date,value:f?MD({dateString:f,dateTimeFormat:y,translationVariables:v}):null,formatDate:e=>e?xD({date:e,dateTimeFormat:y,translationVariables:v}):"",onChange:(e,t)=>{p?.(e?xD({date:new Date(e),dateTimeFormat:y,translationVariables:v}):null,t)},...g})),o&&s&&n.createElement("span",{className:"input-helper"},s))};Ml('/* CSS variables. */\n:root {\n --PhoneInput-color--focus: #03b2cb;\n --PhoneInputInternationalIconPhone-opacity: 0.8;\n --PhoneInputInternationalIconGlobe-opacity: 0.65;\n --PhoneInputCountrySelect-marginRight: 0.5em;\n --PhoneInputCountrySelectArrow-width: 0.3em;\n --PhoneInputCountrySelectArrow-marginLeft: var(\n --PhoneInputCountrySelect-marginRight\n );\n --PhoneInputCountrySelectArrow-borderWidth: 1px;\n --PhoneInputCountrySelectArrow-opacity: 0.45;\n --PhoneInputCountrySelectArrow-color: currentColor;\n --PhoneInputCountrySelectArrow-color--focus: var(--PhoneInput-color--focus);\n --PhoneInputCountrySelectArrow-transform: rotate(45deg);\n --PhoneInputCountryFlag-aspectRatio: 1.5;\n --PhoneInputCountryFlag-height: 1em;\n --PhoneInputCountryFlag-borderWidth: 1px;\n --PhoneInputCountryFlag-borderColor: rgba(0, 0, 0, 0.5);\n --PhoneInputCountryFlag-borderColor--focus: var(--PhoneInput-color--focus);\n --PhoneInputCountryFlag-backgroundColor--loading: rgba(0, 0, 0, 0.1);\n}\n\n.PhoneInput {\n /* This is done to stretch the contents of this component. */\n display: flex;\n align-items: center;\n}\n\n.PhoneInputInput {\n /* The phone number input stretches to fill all empty space */\n flex: 1;\n /* The phone number input should shrink\n to make room for the extension input */\n min-width: 0;\n}\n\n.PhoneInputCountryIcon {\n width: calc(var(--PhoneInputCountryFlag-height) * var(--PhoneInputCountryFlag-aspectRatio));\n height: var(--PhoneInputCountryFlag-height);\n}\n\n.PhoneInputCountryIcon--square {\n width: var(--PhoneInputCountryFlag-height);\n}\n\n.PhoneInputCountryIcon--border {\n /* Removed `background-color` because when an `<img/>` was still loading\n it would show a dark gray rectangle. */\n /* For some reason the `<img/>` is not stretched to 100% width and height\n and sometime there can be seen white pixels of the background at top and bottom. */\n background-color: var(--PhoneInputCountryFlag-backgroundColor--loading);\n /* Border is added via `box-shadow` because `border` interferes with `width`/`height`. */\n /* For some reason the `<img/>` is not stretched to 100% width and height\n and sometime there can be seen white pixels of the background at top and bottom,\n so an additional "inset" border is added. */\n box-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor), inset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor);\n}\n\n.PhoneInputCountryIconImg {\n /* Fixes weird vertical space above the flag icon. */\n /* https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/7#note_348586559 */\n display: block;\n /* 3rd party <SVG/> flag icons won\'t stretch if they have `width` and `height`.\n Also, if an <SVG/> icon\'s aspect ratio was different, it wouldn\'t fit too. */\n width: 100%;\n height: 100%;\n}\n\n.PhoneInputInternationalIconPhone {\n opacity: var(--PhoneInputInternationalIconPhone-opacity);\n}\n\n.PhoneInputInternationalIconGlobe {\n opacity: var(--PhoneInputInternationalIconGlobe-opacity);\n}\n\n/* Styling native country `<select/>`. */\n.PhoneInputCountry {\n position: relative;\n align-self: stretch;\n display: flex;\n align-items: center;\n margin-right: var(--PhoneInputCountrySelect-marginRight);\n}\n\n.PhoneInputCountrySelect {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 1;\n border: 0;\n opacity: 0;\n cursor: pointer;\n}\n\n.PhoneInputCountrySelect[disabled],\n.PhoneInputCountrySelect[readonly] {\n cursor: default;\n}\n\n.PhoneInputCountrySelectArrow {\n display: block;\n content: "";\n width: var(--PhoneInputCountrySelectArrow-width);\n height: var(--PhoneInputCountrySelectArrow-width);\n margin-left: var(--PhoneInputCountrySelectArrow-marginLeft);\n border-style: solid;\n border-color: var(--PhoneInputCountrySelectArrow-color);\n border-top-width: 0;\n border-bottom-width: var(--PhoneInputCountrySelectArrow-borderWidth);\n border-left-width: 0;\n border-right-width: var(--PhoneInputCountrySelectArrow-borderWidth);\n transform: var(--PhoneInputCountrySelectArrow-transform);\n opacity: var(--PhoneInputCountrySelectArrow-opacity);\n}\n\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon + .PhoneInputCountrySelectArrow {\n opacity: 1;\n color: var(--PhoneInputCountrySelectArrow-color--focus);\n}\n\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon--border {\n box-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus), inset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus);\n}\n\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon .PhoneInputInternationalIconGlobe {\n opacity: 1;\n color: var(--PhoneInputCountrySelectArrow-color--focus);\n}');const s4=n.forwardRef((({label:e,inline:t,startLabel:a,startAdornment:r,endLabel:i,endAdornment:o,isRequired:s,isErrored:l,showCount:c,inputStyle:u,style:d,errorText:h,maxLength:p,labelProps:f,onChangeHandler:v,containerProps:g,setFocus:y,autoFocusDelay:b=10,...w},x)=>{const k=n.useRef(null);return n.useEffect((()=>{y&&document.activeElement!==k?.current&&setTimeout((()=>{k.current?.focus()}),M+(b??0))}),[]),n.createElement("div",{className:"fsc-input-base fsc-input fsc-phone-input",style:d},e&&n.createElement("label",{htmlFor:w.id,className:"input-label",...f},e,e&&s&&n.createElement("span",null,"*")),n.createElement("div",{className:"input-container",...g},n.createElement(m,{className:"input-basic".trim(),placeholder:w.placeholder,locales:["US"],onChange:e=>{v(e)}})),l&&h&&n.createElement("span",{className:"input-helper"},h))})),l4=e=>{switch(e){case"EMAIL":return"email";case"PHONE":return"tel";case"NUMBER":return"number";default:return"text"}},c4=({question:e,autoFocusDelay:t,onChangeHandler:a,surveyStyle:r,isRequired:i,formValues:o,fieldErrors:s,translationVariables:l,language:c})=>{const u=e.type_info?.form_fields?.layout,d=e.type_info?.form_fields?.fields;return n.createElement("div",{className:`fsc-form-field-container layout-${(u??"VERTICAL").toLowerCase()}`.trim()},d?.map(((i,u)=>n.createElement("div",{className:"fsc-form-field",key:i.id},"DATE"!==i?.type&&"DATE_TIME"!==i?.type?n.createElement(n.Fragment,null,"PHONE"===i.type?n.createElement(s4,{key:u,setFocus:0===u&&"standard"!==r,autoFocusDelay:t,label:i?.label||"",type:"tel",isRequired:!!i.required,value:i.id&&o[e.name]?.[i.id]||"",onChangeHandler:t=>{i.id&&a({...o[e.name]??{},[i.id]:t||null})},isErrored:!(!i.id||!o?.[e.name]?.[i.id])&&!!s?.[i?.id||""],errorText:i.id&&o[e.name]?.[i.id]?s?.[i?.id]:""}):n.createElement(Dl,{key:u,setFocus:0===u&&"standard"!==r,autoFocusDelay:t,onKeyDown:e=>{"PHONE"===i?.type&&N(e),"NUMBER"===i?.type&&O(e)},label:i?.label||"",type:l4(i?.type??"TEXT"),isRequired:!!i.required,value:i.id&&o[e.name]?.[i.id]||"",onChange:t=>{i.id&&a({...o[e.name]??{},[i.id]:t.target.value||null})},isErrored:!(!i.id||!o?.[e.name]?.[i.id])&&!!s?.[i?.id||""],errorText:i.id&&o[e.name]?.[i.id]?s?.[i?.id]:""})):n.createElement(n.Fragment,null,"DATE_TIME"===i?.type?n.createElement(CD,{id:i.id??"",name:e.name??"",label:i?.label??"",isRequired:!!i.required,allowOnlyFuture:!!e.type_info?.meta?.allow_future_date,language:c,useAmPm:!e.type_info?.meta?.time_format,showTimezoneSelect:!1,onChange:t=>{a({...o[e.name]??{},...i.id&&{[i.id]:t}})},value:i?.id&&o[e?.name]?.[i?.id],type:"FORM_FIELD",translationVariables:l}):n.createElement(o4,{id:i.id??"",name:e.name??"",label:i?.label??"",isRequired:!!i.required,allowOnlyFuture:!!e.type_info?.meta?.allow_future_date,language:c,onChange:t=>{a({...o[e.name]??{},...i.id&&{[i.id]:t}})},value:i?.id&&o[e?.name]?.[i?.id],type:"FORM_FIELD",translationVariables:l}))))))},u4="rovingFocusGroup.onEntryFocus",d4={bubbles:!1,cancelable:!0},m4="RovingFocusGroup",[h4,p4,f4]=Kl(m4),[v4,g4]=jl(m4,[f4]),[y4,b4]=v4(m4),w4=t.forwardRef(((e,n)=>t.createElement(h4.Provider,{scope:e.__scopeRovingFocusGroup},t.createElement(h4.Slot,{scope:e.__scopeRovingFocusGroup},t.createElement(x4,Ol({},e,{ref:n})))))),x4=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:a,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=e,m=t.useRef(null),h=ql(n,m),p=Ql(o),[f=null,v]=Bc({prop:s,defaultProp:l,onChange:c}),[g,y]=t.useState(!1),b=tc(u),w=p4(a),x=t.useRef(!1),[M,k]=t.useState(0);return t.useEffect((()=>{const e=m.current;if(e)return e.addEventListener(u4,b),()=>e.removeEventListener(u4,b)}),[b]),t.createElement(y4,{scope:a,orientation:r,dir:p,loop:i,currentTabStopId:f,onItemFocus:t.useCallback((e=>v(e)),[v]),onItemShiftTab:t.useCallback((()=>y(!0)),[]),onFocusableItemAdd:t.useCallback((()=>k((e=>e+1))),[]),onFocusableItemRemove:t.useCallback((()=>k((e=>e-1))),[])},t.createElement(ec.div,Ol({tabIndex:g||0===M?-1:0,"data-orientation":r},d,{ref:h,style:{outline:"none",...e.style},onMouseDown:Wl(e.onMouseDown,(()=>{x.current=!0})),onFocus:Wl(e.onFocus,(e=>{const t=!x.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(u4,d4);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));C4([e.find((e=>e.active)),e.find((e=>e.id===f)),...e].filter(Boolean).map((e=>e.ref.current)))}}x.current=!1})),onBlur:Wl(e.onBlur,(()=>y(!1)))})))})),M4=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:a,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,l=Pc(),c=o||l,u=b4("RovingFocusGroupItem",a),d=u.currentTabStopId===c,m=p4(a),{onFocusableItemAdd:h,onFocusableItemRemove:p}=u;return t.useEffect((()=>{if(r)return h(),()=>p()}),[r,h,p]),t.createElement(h4.ItemSlot,{scope:a,id:c,focusable:r,active:i},t.createElement(ec.span,Ol({tabIndex:d?0:-1,"data-orientation":u.orientation},s,{ref:n,onMouseDown:Wl(e.onMouseDown,(e=>{r?u.onItemFocus(c):e.preventDefault()})),onFocus:Wl(e.onFocus,(()=>u.onItemFocus(c))),onKeyDown:Wl(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const a=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(a)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)?void 0:k4[a]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let n=m().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const a=n.indexOf(e.currentTarget);n=u.loop?function(e,t){return e.map(((n,a)=>e[(t+a)%e.length]))}(n,a+1):n.slice(a+1)}setTimeout((()=>C4(n)))}}))})))})),k4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function C4(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const P4=w4,z4=M4,S4="Radio",[E4,T4]=jl(S4),[$4,A4]=E4(S4),L4=t.forwardRef(((e,n)=>{const{__scopeRadio:a,name:r,checked:i=!1,required:o,disabled:s,value:l="on",onCheck:c,...u}=e,[d,m]=t.useState(null),h=ql(n,(e=>m(e))),p=t.useRef(!1),f=!d||Boolean(d.closest("form"));return t.createElement($4,{scope:a,checked:i,disabled:s},t.createElement(ec.button,Ol({type:"button",role:"radio","aria-checked":i,"data-state":R4(i),"data-disabled":s?"":void 0,disabled:s,value:l},u,{ref:h,onClick:Wl(e.onClick,(e=>{i||null==c||c(),f&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),f&&t.createElement(H4,{control:d,bubbles:!p.current,name:r,value:l,checked:i,required:o,disabled:s,style:{transform:"translateX(-100%)"}}))})),_4=t.forwardRef(((e,n)=>{const{__scopeRadio:a,forceMount:r,...i}=e,o=A4("RadioIndicator",a);return t.createElement(Ku,{present:r||o.checked},t.createElement(ec.span,Ol({"data-state":R4(o.checked),"data-disabled":o.disabled?"":void 0},i,{ref:n})))})),H4=e=>{const{control:n,checked:a,bubbles:r=!0,...i}=e,o=t.useRef(null),s=qc(a),l=zc(n);return t.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==a&&n){const t=new Event("click",{bubbles:r});n.call(e,a),e.dispatchEvent(t)}}),[s,a,r]),t.createElement("input",Ol({type:"radio","aria-hidden":!0,defaultChecked:a},i,{tabIndex:-1,ref:o,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function R4(e){return e?"checked":"unchecked"}const I4=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],D4="RadioGroup",[V4,O4]=jl(D4,[g4,T4]),N4=g4(),W4=T4(),[j4,F4]=V4(D4),B4=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:a,name:r,defaultValue:i,value:o,required:s=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:m,...h}=e,p=N4(a),f=Ql(u),[v,g]=Bc({prop:o,defaultProp:i,onChange:m});return t.createElement(j4,{scope:a,name:r,required:s,disabled:l,value:v,onValueChange:g},t.createElement(P4,Ol({asChild:!0},p,{orientation:c,dir:f,loop:d}),t.createElement(ec.div,Ol({role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:f},h,{ref:n}))))})),q4=B4,U4=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:a,disabled:r,...i}=e,o=F4("RadioGroupItem",a),s=o.disabled||r,l=N4(a),c=W4(a),u=t.useRef(null),d=ql(n,u),m=o.value===i.value,h=t.useRef(!1);return t.useEffect((()=>{const e=e=>{I4.includes(e.key)&&(h.current=!0)},t=()=>h.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),t.createElement(z4,Ol({asChild:!0},l,{focusable:!s,active:m}),t.createElement(L4,Ol({disabled:s,required:o.required,checked:m},c,i,{name:o.name,ref:d,onCheck:()=>o.onValueChange(i.value),onKeyDown:Wl((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:Wl(i.onFocus,(()=>{var e;h.current&&(null===(e=u.current)||void 0===e||e.click())}))})))})),G4=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:a,...r}=e,i=W4(a);return t.createElement(_4,Ol({},i,r,{ref:n}))})),Z4=e=>{const{checked:t,className:a,disabled:r,id:i,isRequired:o,label:s,name:l,readOnly:c,onChange:u,...d}=e;return n.createElement(q4,{className:`fsc-radio ${a??""}`.trim(),name:l,"aria-label":s||"Radio button",value:t?"default":"",required:o,disabled:r,"aria-readonly":c,onValueChange:e=>{u?.(!t,e)},...d},n.createElement("div",{className:"fsc-radio-container"},n.createElement(U4,{checked:t,"aria-checked":t,className:"fsc-radio-item",disabled:r,"aria-readonly":c,value:"default",id:i},n.createElement(G4,{className:"fsc-radio-indicator"})),s&&n.createElement("label",{htmlFor:i,className:"fsc-radio-label"},s,s&&o&&n.createElement("span",null,"*"))))};Ml(".freemium-survey-components .matrix-container {\n width: 100%;\n overflow: auto;\n max-height: 300px;\n}\n.freemium-survey-components .matrix-container::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px;\n height: 6px;\n}\n.freemium-survey-components .matrix-container::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background: #ebeff3;\n}\n.freemium-survey-components .matrix-container .checkbox-label,\n.freemium-survey-components .matrix-container .radio-label {\n border: unset;\n min-width: unset;\n padding: unset;\n display: inline-flex;\n}\n.freemium-survey-components .matrix-container table.st-mt-table,\n.freemium-survey-components .matrix-container th.st-mt-th,\n.freemium-survey-components .matrix-container td.st-mt-td,\n.freemium-survey-components .matrix-container tr.st-mt-tr {\n padding: 0;\n margin: 0;\n}\n.freemium-survey-components .matrix-container table.st-mt-table {\n border-spacing: 0;\n border-radius: 4px;\n margin: 0;\n width: 100%;\n}\n.freemium-survey-components .matrix-container th.st-mt-th {\n color: var(--question-text-color, var(--default-question-text-color));\n text-align: center;\n font-size: 0.8em;\n font-weight: 500;\n padding: 12px 24px;\n background-color: var(--question-background-color, var(--default-question-background-color));\n}\n.freemium-survey-components .matrix-container th.m-s-b-s-q-m-s-th-empty {\n z-index: 2;\n position: sticky;\n top: 0;\n left: 0;\n background-color: var(--question-background-color, var(--default-question-background-color));\n border: 1px solid rgb(242, 242, 242);\n}\n.freemium-survey-components .matrix-container th.m-s-b-s-q-m-s-th {\n border-right: 1px solid rgb(242, 242, 242);\n border-top: 1px solid rgb(242, 242, 242);\n border-bottom: 1px solid rgb(242, 242, 242);\n z-index: 1;\n position: sticky;\n top: 0;\n}\n.freemium-survey-components .matrix-container th.m-s-b-s-q-m-s-input,\n.freemium-survey-components .matrix-container td.m-s-b-s-q-m-s-input {\n position: sticky;\n left: 0;\n z-index: 1;\n background-color: var(--question-background-color, var(--default-question-background-color));\n padding: 12px;\n}\n.freemium-survey-components .matrix-container td.m-s-b-s-q-m-s-input {\n border-right: 1px solid rgb(242, 242, 242);\n border-bottom: 1px solid rgb(242, 242, 242);\n border-left: 1px solid rgb(242, 242, 242);\n font-size: 0.8em;\n font-weight: 500;\n line-height: 20px;\n text-align: left;\n min-width: 240px;\n max-width: 300px;\n word-wrap: break-word;\n}\n.freemium-survey-components .matrix-container td.m-s-b-s-q-m-s-switch {\n text-align: center;\n padding: 12px 24px;\n min-width: 100px;\n border-bottom: 1px solid rgb(242, 242, 242);\n border-right: 1px solid rgb(242, 242, 242);\n}\n.freemium-survey-components .matrix-container td.m-s-b-s-q-m-s-switch .radio,\n.freemium-survey-components .matrix-container td.m-s-b-s-q-m-s-switch .checkbox {\n margin-right: unset;\n}\n.freemium-survey-components .matrix-container td.m-s-b-s-q-m-s-switch div:first-child {\n width: -moz-fit-content;\n width: fit-content;\n margin: 0 auto;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components.standard-survey-style .matrix-container th.m-s-b-s-q-m-s-input,\n .freemium-survey-components.standard-survey-style .matrix-container td.m-s-b-s-q-m-s-input {\n position: unset;\n }\n .freemium-survey-components.standard-survey-style .matrix-container th.m-s-b-s-q-m-s-th {\n position: unset;\n }\n}\n.freemium-survey-components.mobile-preview.standard-survey-style .matrix-container th.m-s-b-s-q-m-s-input,\n.freemium-survey-components.mobile-preview.standard-survey-style .matrix-container td.m-s-b-s-q-m-s-input {\n position: unset;\n}\n.freemium-survey-components.mobile-preview.standard-survey-style .matrix-container th.m-s-b-s-q-m-s-th {\n position: unset;\n}");const Y4=e=>{const{type_info:{matrix_properties:t},onChangeHandler:a,value:r}=e;return n.createElement("div",{className:"matrix-container","data-test-input":"matrix"},n.createElement("table",{className:"st-mt-table"},n.createElement("thead",{className:"st-mt-thead"},n.createElement("tr",{className:"st-mt-tr"},n.createElement("th",{className:"m-s-b-s-q-m-s-th-empty st-mt-th"}),t?.rating_labels?.map(((e,t)=>{if(e.is_active)return n.createElement("th",{key:e.id,className:"m-s-b-s-q-m-s-th st-mt-th"},e.text)})))),n.createElement("tbody",{className:"st-mt-tbody"},t?.statements?.map(((e,i)=>{if(e.is_active)return n.createElement("tr",{key:e.id,className:"m-s-b-s-q-m-s-tr-hover st-mt-tr"},n.createElement("td",{className:"m-s-b-s-q-m-s-input st-mt-td"},e.text),t?.rating_labels?.map(((o,s)=>{if(!o.is_active)return;const l=r?.find((t=>t?.statement_id===e?.id));return n.createElement("td",{key:o.id,className:"m-s-b-s-q-m-s-switch st-mt-td"},"SINGLE_ANSWER"===t?.type&&n.createElement(Z4,{key:o.id||`${i}-key-${s}`,name:`q-m-s-radio-${i}-key-${s}`,checked:!!l?.rating_labels?.find((e=>e?.id===o?.id)),id:o.id??"",onChange:()=>{e?.id&&o?.id&&a(l?.statement_id?[...r||[]].map((e=>e?.statement_id===l?.statement_id?{...l,rating_labels:[{id:o.id||"",text:o?.text||""}]}:e)):[...r||[],{statement_id:e.id,rating_labels:[{id:o.id,text:o?.text||""}]}])},label:""}),"MULTIPLE_ANSWERS"===t?.type&&n.createElement(ud,{key:o.id||`${i}-key-${s}`,name:`q-m-s-checkbox-${i}-key-${s}`,checked:!!l?.rating_labels?.find((e=>e?.id===o?.id)),id:o.id??"",onChange:t=>{e?.id&&o?.id&&a(l?.statement_id?[...r||[]].map((e=>e.statement_id===l.statement_id?{...l,rating_labels:t?[...l.rating_labels||[],{id:o.id||"",text:o?.text||""}]:(l.rating_labels||[]).filter((e=>e?.id!==o.id))}:e)):[...r||[],{statement_id:e.id,rating_labels:[{id:o.id,text:o?.text||""}]}])}}))})))})))))};Ml(".freemium-survey-components .matrix-wd-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n text-align: left;\n}\n.freemium-survey-components .matrix-wd-container .matrix-st-count {\n color: var(--question-text-color, #12344d);\n font-size: 0.8em;\n font-weight: 500;\n line-height: 22px;\n opacity: 0.3;\n margin-bottom: 4px;\n}\n.freemium-survey-components .matrix-wd-container .matrix-st-text {\n color: var(--question-text-color, #12344d);\n font-size: var(--fsc-font-size);\n font-weight: 500;\n line-height: 23px;\n margin-bottom: 12px;\n word-wrap: break-word;\n}\n.freemium-survey-components .matrix-wd-container .matrix-st-labels {\n display: flex;\n gap: 8px;\n flex: 1;\n overflow: auto;\n}\n.freemium-survey-components .matrix-wd-container .wd-style-default {\n flex-wrap: wrap;\n flex-direction: row;\n}\n.freemium-survey-components .matrix-wd-container .wd-style-cozy {\n flex-wrap: wrap;\n flex-direction: row;\n}\n.freemium-survey-components .matrix-wd-container .wd-style-compact,\n.freemium-survey-components .matrix-wd-container .mt-mobile {\n flex-wrap: nowrap;\n flex-direction: column;\n}\n.freemium-survey-components .matrix-wd-container .m-s-b-s-q-m-s-switch {\n color: #333;\n font-weight: 400;\n padding: 6px;\n}\n.freemium-survey-components .matrix-wd-container .checkbox-label,\n.freemium-survey-components .matrix-wd-container .radio-label {\n border: unset;\n min-width: unset;\n padding: unset;\n display: inline-flex;\n font-size: var(--fsc-font-size);\n}");const X4=e=>{const{type_info:{matrix_properties:t},onChangeHandler:a,isMobile:r,isReverseAnimation:i,statementIndex:o,value:s,widgetStyle:l}=e,c=n.useMemo((()=>(t?.statements||[]).find(((e,t)=>t===o))),[o]),u=n.useMemo((()=>s?.find((e=>e?.statement_id===c?.id))),[c,s]);return n.createElement("div",{className:"matrix-wd-container","data-test-input":"matrix"},n.createElement("div",{className:"matrix-st-count"},`${o+1}/${(t?.statements||[]).length}`),n.createElement(xl,{exitBeforeEnter:!0},n.createElement(vl.div,{key:`${c?.id??""}`,initial:{opacity:1,x:i?-96:96},animate:{opacity:1,x:0},exit:{opacity:0,x:i?96:-96},transition:{duration:.3,ease:"easeIn"},className:"matrix-st-text"},c?.text)),n.createElement("div",{className:`matrix-st-labels ${r?"mt-mobile":""} wd-style-${l}`.trim()},t?.rating_labels?.map(((e,r)=>{if(!e.is_active)return;const i=!!u?.rating_labels?.find((t=>t?.id===e?.id));return n.createElement(vl.div,{key:`${e.id}`,className:"m-s-b-s-q-m-s-switch",style:{animationDelay:u?.statement_id?"unset":(r+1)/25+"s"},initial:0===(u?.rating_labels??[]).length&&{opacity:0,x:k,scale:.5},animate:{opacity:1,x:0,scale:1},transition:{duration:.3,ease:"easeInOut",delay:0===(u?.rating_labels??[]).length?(r+1)/25:0}},"SINGLE_ANSWER"===t?.type&&n.createElement(Z4,{key:e.id||`key-${r}`,name:`q-m-s-radio-key-${r}`,checked:i,id:e.id??"",onChange:()=>{c?.id&&e?.id&&a(u?.statement_id?[...s||[]].map((t=>t?.statement_id===u?.statement_id?{...u,rating_labels:[{id:e.id||"",text:e?.text||""}]}:t)):[...s||[],{statement_id:c.id,rating_labels:[{id:e.id,text:e?.text||""}]}])},label:e.text||""}),"MULTIPLE_ANSWERS"===t?.type&&n.createElement(ud,{key:e.id||`key-${r}`,name:`q-m-s-checkbox-key-${r}`,checked:i,onChange:t=>{if(c?.id&&e?.id){const n=u?.statement_id?[...s||[]].map((n=>n.statement_id===u.statement_id?{...u,rating_labels:t?[...u.rating_labels||[],{id:e.id||"",text:e?.text||""}]:(u.rating_labels||[]).filter((t=>t?.id!==e.id))}:n)):[...s||[],{statement_id:c.id,rating_labels:[{id:e.id,text:e?.text||""}]}];a(n)}},id:e.id??"",label:e.text||""}))}))))},K4=({question:e,autoFocusDelay:t,setFocus:a,formValues:r,onChangeHandler:i})=>{const o=e?.type_info?.number_field?.decimal,s=e?.type_info?.number_field?.decimal_point,l=o?2===s?"0.01":"0.1":"1",[c,u]=n.useState(""),d=n.useMemo((()=>{const e=["+","-","e","E"];return o||e.push("."),e}),[o]);return n.createElement("div",{className:"responsive-input-field"},n.createElement(Dl,{autoFocusDelay:t,isRequired:!!e.required,value:r[e.name]||"",type:"number",step:l,placeholder:e?.type_info?.meta?.placeholder??"",onKeyDown:e=>d.includes(e.key)&&e.preventDefault(),onChange:e=>{const t=new RegExp(`^[0-9]*.[0-9]{${o?`0,${Number(s)}`:0}}$`);if(""===e.target.value)u("");else if(!t.test(e.target.value))return;(e=>{if(e.startsWith(".")&&o){const t=Number(e);i(`${t}`)}else i(e)})(e.target.value)},setFocus:a,maxLength:18}))},J4=e=>{switch(e){case"EMAIL":return"email";case"PHONE":return"tel";case"URL":return"url";default:return"text"}},Q4=e=>{switch(e){case"PHONE":return"phone";case"EMAIL":return"email";case"URL":return"url";default:return""}},e3=({question:e,autoFocusDelay:t,formValues:a,onChangeHandler:r,textboxErrors:i,setFocus:o})=>{const s=e?.type_info?.text_field?.text_type;return n.createElement("div",{className:"responsive-input-field"},"PHONE"===s?n.createElement(s4,{startAdornment:n.createElement(El,{name:Q4(s)}),type:J4(s),setFocus:o,autoFocusDelay:t,label:"",isRequired:!!e.required,value:a[e.name]||"",isErrored:!!i[e.name],errorText:i[e.name]||"",placeholder:e?.type_info?.meta?.placeholder??"",onChangeHandler:e=>r(e),maxLength:50}):n.createElement(Dl,{startAdornment:s&&"TEXT"!==s&&n.createElement(El,{name:Q4(s)}),type:J4(s),setFocus:o,autoFocusDelay:t,label:"",isRequired:!!e.required,value:a[e.name]||"",isErrored:!!i[e.name],errorText:i[e.name]||"",placeholder:e?.type_info?.meta?.placeholder??"",onChange:e=>r(e.target.value),maxLength:50}))},t3=({surveyLanguage:e,language:t,question:a,formValues:r,othersMeta:i,onChangeHandler:o,saveOthersValue:s,autoFocusDelay:l,isFinalQn:c,isWidget:u,isMobile:d,initialPivotAnswer:m,initialQuestionAnswer:h,isInitialTransition:p,formQuestionErrors:f,contactFormErrors:v,activeIndexOfRenderedStatement:g=0,textboxQuestionErrors:y,isReverseAnimation:b,fileUploadErrors:w,onFileUpload:x,widgetStyle:M="default",setErrors:k,translationVariables:C,surveyServAssetUrl:P,setFocus:z,block:S,surveyStyle:E})=>{const T=a?.type_info?.footer_text&&a.type_info.meta?.question_hint?n.createElement("div",{className:"footer",role:"note",dangerouslySetInnerHTML:{__html:a?.type_info?.footer_text}}):n.createElement(n.Fragment,null);if((u||d)&&"MATRIX_RATING_SCALE"===a?.type_info?.question_type)return n.createElement(n.Fragment,null,n.createElement(X4,{isReverseAnimation:b,type_info:a?.type_info||{},onChangeHandler:e=>{o(e?.filter((e=>(e.rating_labels||[]).length>0)))},isMobile:d,value:r[a.name]||[],statementIndex:g,widgetStyle:M}),T);switch(a?.type_info?.question_type){case"MATRIX_RATING_SCALE":return n.createElement(n.Fragment,null,n.createElement(Y4,{type_info:a?.type_info||{},onChangeHandler:e=>{o(e?.filter((e=>(e.rating_labels||[]).length>0)))},value:r[a.name]||[]}),T);case"RANGE":return n.createElement(n.Fragment,null,n.createElement(Il,{question:a,onChangeHandler:o,isWidget:u,isMobile:d,widgetStyle:M,value:r[a.name],initialPivotAnswer:m,isInitialTransition:p}),T);case"CHECKBOX":case"MULTI_SELECT":return n.createElement(n.Fragment,null,n.createElement(sf,{name:a.name,values:r[a.name],othersValue:i[a.name],options:a?.choices||[],onChangeHandler:o,saveOthersValue:s,isOthersOption:!!(a?.choices||[]).find((e=>e.meta?.is_others)),othersRequired:!!a?.type_info.meta?.othersRequired,autoFocusDelay:l,translationVariables:C}),T);case"RADIO":case"DROPDOWN":return n.createElement(n.Fragment,null,n.createElement(dd,{autoFocusDelay:l,name:a.name,onChangeHandler:o,initialQuestionAnswer:h,displayFormat:a?.type_info?.meta?.display_format||"LIST",saveOthersValue:s,options:a?.choices||[],value:r[a.name],othersValue:i[a.name],isOthersOption:!!(a?.choices||[]).find((e=>e.meta?.is_others)),othersRequired:!!a?.type_info.meta?.othersRequired,isFinalQn:c,translationVariables:C}),T);case"TEXT":return n.createElement(n.Fragment,null,n.createElement(e3,{question:a,autoFocusDelay:l,formValues:r,onChangeHandler:o,textboxErrors:y||"",setFocus:z}),T);case"NUMBER":return n.createElement(n.Fragment,null,n.createElement(K4,{question:a,autoFocusDelay:l,formValues:r,setFocus:z,onChangeHandler:o}),T);case"FORM_FIELD":return n.createElement(n.Fragment,null,n.createElement(c4,{question:a,surveyStyle:E,isRequired:!!a.required,autoFocusDelay:l,translationVariables:C,onChangeHandler:o,formValues:r,fieldErrors:f?.[a.name]||{},language:e||"en"}),T);case"CONTACT_FORM":return n.createElement(n.Fragment,null,n.createElement(PD,{question:a,setFocus:z,autoFocusDelay:l,onChangeHandler:o,translationVariables:C,formValues:r,fieldErrors:v?.[a.name]||{}}),T);case"PARAGRAPH":return n.createElement(n.Fragment,null,n.createElement(Vl,{autoFocusDelay:l,isRequired:!!a.required,placeholder:a?.type_info?.meta?.placeholder??"",value:r[a.name]||"",onChange:e=>o(e.target.value),setFocus:z}),T);case"BOOLEAN":return n.createElement(n.Fragment,null,n.createElement(Ll,{type_info:a?.type_info,onSelect:o,value:r[a.name],initialPivotAnswer:m,isInitialTransition:p}),T);case"MESSAGE":return T;case"CONSENT":return n.createElement(n.Fragment,null,n.createElement(lf,{question:a,onChange:o,value:r[a.name]}),T);case"SLIDER":const g=a?.type_info.meta?.slider;return n.createElement(n.Fragment,null,n.createElement(qp,{defaultValue:[r[a.name]??g?.opening_position],min:g?.min,max:g?.max,onValueChange:([e])=>o(e),isInput:g?.numerical_input_box,gridLines:g?.grid_lines,stopAtGrid:g?.stop_at_grid_lines,allowDecimals:g?.allow_decimal,decimalPoints:g?.decimal_points,isMobile:d||"compact"===M}),T);case"RANK_ORDER":const{others_meta:b,...$}=r;return n.createElement(n.Fragment,null,n.createElement(Yh,{valueItems:$[a.name],items:a?.choices||[],onReorder:o,isPrevQuesAnswered:"card"===E||Object.keys($).length===(S.order??0)-1}),T);case"DATE_TIME":return n.createElement(n.Fragment,null,"DATE_TIME"===a.type_info.meta?.question_format?n.createElement(CD,{id:a.id??"",name:a.name??"",type:"QUESTION",displayFormat:a.type_info.meta?.format??void 0,allowOnlyFuture:a.type_info.meta?.allow_future_date||!1,useAmPm:!a.type_info.meta?.time_format,showTimezoneSelect:!!a.type_info.meta?.time_zone,onChange:o,value:r[a.name]||"",translationVariables:C,language:t||"en"}):n.createElement(o4,{allowOnlyFuture:a.type_info.meta?.allow_future_date||!1,type:"QUESTION",displayFormat:a.type_info.meta?.format??void 0,onChange:o,value:r[a.name]||"",translationVariables:C,language:t||"en"}),T);case"FILE":return n.createElement(i4,{errors:w,setErrors:e=>{k({formQuestionErrors:f,textboxQuestionErrors:y,contactFormErrors:v,fileUploadErrors:e})},onChangeHandler:o,question:a,onFileUpload:x,value:r[a.name]||"",translationVariables:C,surveyServAssetUrl:P});default:return console.error(`Question type ${a?.type_info?.question_type} not found`),null}};Ml(".freemium-survey-components.card-survey-style {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: 100%;\n}\n.freemium-survey-components.card-survey-style .question-holder {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n flex: 1;\n overflow: auto;\n justify-content: center;\n padding: 1rem;\n align-items: center;\n}\n.freemium-survey-components.card-survey-style .questions {\n display: flex;\n flex-direction: column;\n overflow: auto;\n width: var(--fsc-question-width);\n background: transparent;\n box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px;\n border-radius: 6px;\n transition: all 0.2s ease, width 0s;\n padding: 32px;\n border: 0;\n background-color: var(--question-background-color, var(--default-question-background-color));\n}\n.freemium-survey-components.card-survey-style .questions .question-container {\n flex: 1;\n overflow: auto;\n padding: 4px;\n}\n.freemium-survey-components.card-survey-style .questions .question-container .question-text {\n margin-bottom: 24px;\n}\n.freemium-survey-components.card-survey-style .questions .question-consent-buttons {\n margin-top: 12px;\n display: flex;\n gap: 1rem;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components.card-survey-style {\n margin: 0 auto;\n }\n .freemium-survey-components.card-survey-style .questions {\n width: 100%;\n overflow: auto;\n display: flex;\n flex-direction: column;\n }\n}\n.freemium-survey-components.mobile-preview.card-survey-style {\n margin: 0 auto;\n}\n.freemium-survey-components.mobile-preview.card-survey-style .questions {\n width: 100%;\n overflow: auto;\n display: flex;\n flex-direction: column;\n}");const n3=({surveyServAssetUrl:e,thankYouQuestion:a,preview:r,placeholders:i,canResubmit:o,resetSurvey:s,navigateToStart:l,isMobile:c,allowMultipleSubmission:u,pivot:d,rangeToRender:m,translationVariables:h})=>{const{redirectUrl:p,redirectDelay:f,show_custom_button:v,show_review_links:g,show_social_links:y,image_url:b}=a?.type_info?.meta??{},[w,x]=t.useState(f??10);return t.useEffect((()=>{if(!r&&p){const e=setInterval((()=>x((e=>e>1?e-1:(window.location.href=p??"",0)))),1e3);return()=>clearInterval(e)}}),[]),n.createElement("div",{className:"question-container thankyou"},b&&n.createElement("img",{className:"thankyou-logo-img",src:b,alt:"thankyou_logo"}),n.createElement("div",{className:"heading"},a?.type_info?.header_text??(h?.thank_you||"Thank you!")),n.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:R({questionText:a.text,placeholders:i,npsRating:d?.answer,ratingLabel:L(d?.answer)?"":m?.find((e=>e?.value===String(d?.answer)))?.text??"",preference:d?.question.type_info?.scale_properties?.labels?.preference,isPreview:r})}}),(o||u)&&n.createElement("div",{className:("wrap-up-actions "+(c?"mobile":"")).trim()},o&&n.createElement("button",{className:"action-button",tabIndex:0,onClick:()=>l()},n.createElement(El,{name:"edit"}),h?.edit_response||"Edit your response"),u&&n.createElement("button",{className:"action-button",tabIndex:0,onClick:s},n.createElement(El,{name:"reload"}),h?.another_response||"Submit another response")),p&&n.createElement("div",{className:"redirection-container"},n.createElement("div",{className:"redirection-text"},V(w,h?.redirect_msg),n.createElement("br",null)),n.createElement("a",{className:"link",href:p},p)),(v||g||y)&&n.createElement(of,{show_custom_button:v,show_review_links:g,show_social_links:y,surveyServAssetUrl:e}))},a3=({activeIndexOfRenderedStatement:e,navigateToPreviousBlock:t,canDisplayDisableButtonParams:a,navigateToNextBlock:r,translationVariables:i})=>n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:oe("navigation-prev",a),className:"navigation-button",onClick:t,title:e>0?i?.prev_statement||"go to previous statement":i?.prev_question||"go to previous question"},n.createElement(El,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:oe("navigation-next",a),title:i?.next_question||"Go to next question",onClick:r},n.createElement(El,{name:"arrow-next"}))),r3=e=>{const{initialStatementHasAnswer:a,answers:r,renderedBlocks:i,blocks:o,activeIndexOfBlocks:s,activeIndexOfRenderedStatement:l=0,activeIndexOfRenderedBlocks:c,saveFormValues:u,onSubmitHandler:d,skipBlock:m,skipStatement:h,navigateToNextBlock:p,navigateToPreviousBlock:f,isInitialTransition:v,initialPivotAnswer:g,translationVariables:y,navigateToNextStatement:b,canDisplayDisableButtonParams:w,formQuestionErrors:x,textboxQuestionErrors:M,contactFormErrors:C,questions:P,pages:z,isReverseAnimation:S}=e,[E,T]=t.useState(!1),{question:A}=i[c],L={...w,isSubmitting:E},H=A?.type_info?.meta?.display_format,R=q({blocks:o,activeIndexOfBlocks:s,renderedBlocks:i,activeIndexOfRenderedBlocks:c,questions:P});return n.createElement(n.Fragment,null,(ae("message",L)||ae("consent",L))&&n.createElement(xl,{exitBeforeEnter:!0},n.createElement(vl.div,{key:A.name??"",id:`consent-buttons-${A.name??""}`,className:"question-consent-buttons",initial:{opacity:0,x:S?-48:k},animate:{opacity:1,x:0},exit:{opacity:0,x:S?k:-48},transition:{duration:.2}},ae("consent",L)&&"BUTTON"===H&&$.map((e=>n.createElement(Cl,{key:c+String(e.recordAs),onClick:()=>{u(i[c],e.recordAs,!0)},disabled:oe("consent",L),className:(e.recordAs?"next":"secondary")+"-button"},A?.type_info?.scale_properties?.labels?.values?.[e.id]||e.defaultValue))),ae("message",L)&&n.createElement(Cl,{onClick:()=>{R?(T(!0),d("COMPLETE")):m()},disabled:oe("message",L),className:"next-button"},A?.type_info?.scale_properties?.labels?.values?.[0]||"Begin"))),(ae("navigation",L)||ae("next",L)||ae("next-statement",L)||ae("submit",L)||ae("skip",L)||ae("skip-statement",L))&&n.createElement("div",{className:"question-footer"},ae("navigation",L)?n.createElement(a3,{answers:r,canDisplayDisableButtonParams:L,activeIndexOfBlocks:s,activeIndexOfRenderedBlocks:c,renderedBlocks:i,initialStatementHasAnswer:a,blocks:o,activeIndexOfRenderedStatement:l,navigateToNextBlock:p,navigateToPreviousBlock:f,translationVariables:y,pages:z}):n.createElement("div",null),n.createElement("div",{className:"action-buttons"},ae("skip",L)&&n.createElement(Cl,{className:"skip-button",onClick:m,variant:"secondary","aria-label":"skip question"},y?.skip||"Skip"),ae("skip-statement",L)&&n.createElement(Cl,{className:"skip-button",onClick:h,"aria-label":"skip statement",variant:"secondary"},y?.skip||"Skip"),ae("next",L)&&n.createElement(Cl,{onClick:()=>{0!==c||!v||"RANGE"!==A.type_info?.question_type&&"BOOLEAN"!==A.type_info?.question_type||void 0===g?u(i[c],"CHECKBOX"===A?.type_info?.meta?.display_format&&"CONSENT"===A?.type_info?.question_type?r.formValues[A.name]??!1:null,!0):u(i[c],g,!0)},disabled:oe("next",L),className:"next-button"},y?.next||"Next"),ae("next-statement",L)&&n.createElement(Cl,{onClick:()=>{b?.()},disabled:!!oe("next-statement",L),className:"next-button"},y?.next||"Next"),ae("submit",L)&&n.createElement("div",{className:"submit"},n.createElement(Cl,{disabled:oe("submit",L),onClick:()=>{_(x?.[A.name])&&_(M?.[A.name])&&_(C?.[A.name])&&(T(!0),d("COMPLETE"))}},E?y?.submitting||"Submitting":y?.submit_survey||"Submit")))))},i3=e=>{const{blocks:a,pages:r,activePage:i,renderedBlocks:o,activeBlock:s,activeIndexOfBlocks:l,activeIndexOfRenderedBlocks:c,isSurveyCompleted:u,isReverseAnimation:d,saveFormValues:m,saveOthersValue:h,skipBlock:p,skipStatement:f,onSubmitHandler:v,navigateToNextBlock:g,navigateToPreviousBlock:y,answers:b,questions:w,pivot:x,isInitialTransition:M,resetSurvey:C,activeIndexOfRenderedStatement:P,navigateToNextStatement:z,navigateToPreviousStatement:S,navigateToStart:E,translationVariables:T,initialStatementHasAnswer:$,formQuestionErrors:A,textboxQuestionErrors:V,contactFormErrors:O,fileUploadErrors:N,setErrors:W}=ye(e),j=_(b.formValues)&&e.survey.prompt_settings?.is_enabled&&e.preview,[F,B]=t.useState(j),G=n.useMemo((()=>H(x?.question)),[x?.question]);t.useEffect((()=>{s&&e.onBlockChange?.(s)}),[s,e]),t.useEffect((()=>{e.survey.ui_theme&&D(e.survey.ui_theme)}),[e.survey.ui_theme]),t.useEffect((()=>{e.getSurveyProgress?.({totalBlocks:a.length,isSurveyCompleted:u,activeIndexOfBlocks:l})}),[a.length,u,l]);const Z={answers:b,blocks:a,blockIndex:c,activeIndexOfBlocks:l,initialStatementHasAnswer:$,activeIndexOfRenderedBlocks:c,activeIndexOfRenderedStatement:P,renderedBlocks:o,isMobile:!!e.isMobile,surveyStyle:e.surveyStyle,isWidget:!!e.isWidget,initialPivotAnswer:e.initialPivotAnswer,isInitialTransition:M,questions:w,pages:r};return s&&s.question?n.createElement("div",{className:("freemium-survey-components card-survey-style "+(e.isMobile?"mobile-preview":"")).trim(),id:"freemium-survey",style:{...I(e.survey.ui_theme||{})}},n.createElement("div",{className:"question-holder"},n.createElement("div",{className:"questions"},u?n.createElement(n3,{surveyServAssetUrl:e.surveyServAssetUrl??"",thankYouQuestion:U({pivotQn:x?.question,pivotQnAnswer:x?.answer,block:Y({activeBlock:s,blocks:e.survey.blocks?.filter((e=>!e.is_deleted)),answers:b,questions:w,activeIndexOfBlocks:l,renderedBlocks:o,contactData:e.contactData}),questions:w}),canResubmit:e.canResubmit,allowMultipleSubmission:e.allowMultipleSubmission,navigateToStart:()=>{e.handleAction?e.handleAction("EDIT_RESPONSE",E):E()},resetSurvey:()=>{e.handleAction?e.handleAction("RE_SUBMIT",C):C()},preview:!!e.preview,placeholders:e.placeholders,isMobile:e.isMobile,pivot:x,rangeToRender:G,translationVariables:T}):n.createElement(n.Fragment,null,!F&&r.length>0&&i?.page_id&&n.createElement("div",{className:"page-container"},n.createElement("div",{className:"page-title",dangerouslySetInnerHTML:{__html:R({questionText:i?.title,placeholders:{},isPreview:!1})}}),n.createElement("div",{className:"page-description",dangerouslySetInnerHTML:{__html:R({questionText:i?.description,placeholders:{},isPreview:!1})}})),n.createElement(xl,{exitBeforeEnter:!0},n.createElement(vl.div,{id:`${s.question.name}`,className:"question-container","data-test-question-name":s.question.name,key:`${s.question.name}`,initial:{opacity:0,x:d?-48:k},animate:{opacity:1,x:0},exit:{opacity:0,x:d?k:-48},transition:{duration:.2}},F&&e.survey.prompt_settings?n.createElement(rf,{config:e.survey.prompt_settings,onSelect:t=>{e.onAnsweringPrompt?.(t),1===t&&B(!1)},placeholders:e.placeholders,isPreview:!!e.preview}):n.createElement(n.Fragment,null,n.createElement("div",{className:("question-text "+(s.required?"required":"")).trim(),dangerouslySetInnerHTML:{__html:R({questionText:s?.question.text,placeholders:e.placeholders,npsRating:x?.answer,ratingLabel:L(x?.answer)?"":G?.find((e=>e?.value===String(x?.answer)))?.text??"",preference:x?.question.type_info?.scale_properties?.labels?.preference,isPreview:!!e.preview})},"aria-label":`question-${c}`,role:"heading","aria-level":1}),n.createElement(t3,{setFocus:!0,isReverseAnimation:d,surveyServAssetUrl:e.surveyServAssetUrl,setErrors:W,onFileUpload:e.onFileUpload,language:e.language||"en",surveyStyle:e.surveyStyle,surveyLanguage:e.survey.language,block:s,question:s.question,isFinalQn:q({blocks:a,activeIndexOfBlocks:l,renderedBlocks:o,activeIndexOfRenderedBlocks:c,questions:w}),formValues:b.formValues,othersMeta:b.others,autoFocusDelay:"standard"===e.surveyStyle?350:0,activeIndexOfRenderedStatement:P,saveOthersValue:h,onChangeHandler:e=>{m(s,e)},isMobile:!!e.isMobile,initialPivotAnswer:e.initialPivotAnswer,initialQuestionAnswer:e.initialQuestionAnswer,isInitialTransition:M,formQuestionErrors:A,textboxQuestionErrors:V,fileUploadErrors:N,contactFormErrors:O,translationVariables:T})))),n.createElement(r3,{isWidget:!1,isReverseAnimation:d,surveyStyle:e.surveyStyle,canDisplayDisableButtonParams:Z,answers:b,renderedBlocks:o,blocks:a,pages:r,activeIndexOfRenderedStatement:P,initialStatementHasAnswer:$,navigateToNextStatement:z,navigateToPreviousStatement:S,activeIndexOfRenderedBlocks:c,activeIndexOfBlocks:l,saveFormValues:m,skipBlock:p,skipStatement:f,onSubmitHandler:v,navigateToPreviousBlock:y,navigateToNextBlock:g,isInitialTransition:M,initialPivotAnswer:e.initialPivotAnswer,isMobile:!!e.isMobile,translationVariables:T,formQuestionErrors:A,textboxQuestionErrors:V,fileUploadErrors:N,contactFormErrors:O,questions:w})))),n.createElement(Gp,{...e.footerProps})):null};Ml(".freemium-survey-components.standard-survey-style {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: 100%;\n align-items: center;\n width: 100%;\n max-width: 900px;\n margin: 0 auto;\n}\n.freemium-survey-components.standard-survey-style .page-container {\n padding: 0 1rem 1rem 1rem;\n margin-bottom: 0;\n}\n.freemium-survey-components.standard-survey-style .page-container .page-title {\n margin-top: 24px;\n color: #475867;\n}\n.freemium-survey-components.standard-survey-style .page-container .page-description {\n color: #475867;\n}\n.freemium-survey-components.standard-survey-style .questions {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n padding: 24px;\n flex: 1;\n overflow: auto;\n scroll-behavior: smooth;\n}\n.freemium-survey-components.standard-survey-style .thankyou-container {\n padding: 2rem;\n}\n.freemium-survey-components.standard-survey-style .question-container.thankyou {\n flex: 1;\n overflow: auto;\n}\n.freemium-survey-components.standard-survey-style .question-container.thankyou,\n.freemium-survey-components.standard-survey-style .question-container {\n width: 100%;\n background: transparent;\n border-radius: 6px;\n box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px;\n transition: all 0.2s ease, width 0s;\n padding: 32px;\n border: 0;\n background-color: var(--question-background-color, var(--default-question-background-color));\n}\n.freemium-survey-components.standard-survey-style .question-container.thankyou .question-text,\n.freemium-survey-components.standard-survey-style .question-container .question-text {\n margin-bottom: 24px;\n}\n.freemium-survey-components.standard-survey-style .question-container.thankyou .question-text p,\n.freemium-survey-components.standard-survey-style .question-container .question-text p {\n margin: 0;\n}\n.freemium-survey-components.standard-survey-style .survey-footer {\n padding: 1rem;\n width: calc(100vw - 2rem);\n}\n.freemium-survey-components.standard-survey-style .page-actions {\n padding: 1rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.freemium-survey-components.standard-survey-style .survey-footer {\n width: 100vw;\n}\n.freemium-survey-components.standard-survey-style .questions,\n.freemium-survey-components.standard-survey-style .page-container,\n.freemium-survey-components.standard-survey-style .page-actions {\n width: 100%;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components.standard-survey-style .page-actions,\n .freemium-survey-components.standard-survey-style .survey-footer {\n width: 100%;\n }\n .freemium-survey-components.standard-survey-style .questions {\n width: 100%;\n }\n .freemium-survey-components.standard-survey-style .page-container,\n .freemium-survey-components.standard-survey-style .question-container.thankyou,\n .freemium-survey-components.standard-survey-style .question-container {\n width: 100%;\n }\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .page-actions,\n.freemium-survey-components.standard-survey-style.mobile-preview .survey-footer {\n width: 100%;\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .questions {\n width: 100%;\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .page-container,\n.freemium-survey-components.standard-survey-style.mobile-preview .question-container.thankyou,\n.freemium-survey-components.standard-survey-style.mobile-preview .question-container {\n width: 100%;\n}");Ml(':root {\n --default-brand-color: #264966;\n --default-question-text-color: #3a4b67;\n --default-question-background-color: #fff;\n --default-background-color: #f8f8f8;\n --default-button-text-color: #fff;\n --default-secondary-button-text-color: #000;\n --fsc-z-index: 2147483647;\n --fsc-transition-duration: 0.3s;\n --fsc-question-width: 700px;\n --fsc-question-max-width: 700px;\n --fsc-widget-transition-duration: 0.6s;\n --fsc-border-color: #cfd7df;\n --fsc-font-size: 14px;\n --fsc-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,\n Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n}\n\nhtml {\n font-size: var(--fsc-font-size);\n}\n\n* {\n box-sizing: border-box;\n}\n\n[data-radix-popper-content-wrapper] {\n z-index: calc(var(--fsc-z-index) + 1) !important;\n}\n\n.surveyserv-widget-container,\n.freemium-survey-components {\n font-family: var(--fsc-font-family);\n color: var(--question-text-color, var(--default-question-text-color));\n font-size: var(--fsc-font-size);\n}\n.surveyserv-widget-container .questions .question-container.prompt-container,\n.freemium-survey-components .questions .question-container.prompt-container {\n padding-top: unset;\n}\n.surveyserv-widget-container .questions .question-container .question-text,\n.freemium-survey-components .questions .question-container .question-text {\n font-size: 1.2em;\n font-weight: 500;\n line-height: 1.4;\n letter-spacing: 0.3px;\n}\n.surveyserv-widget-container .questions .question-container .question-text p,\n.freemium-survey-components .questions .question-container .question-text p {\n margin: 0;\n}\n.surveyserv-widget-container .questions .question-container .question-text.required::after,\n.freemium-survey-components .questions .question-container .question-text.required::after {\n content: "*";\n color: #d72d30;\n margin-left: 4px;\n}\n.surveyserv-widget-container .questions .question-footer,\n.freemium-survey-components .questions .question-footer {\n display: flex;\n justify-content: space-between;\n margin-top: 24px;\n}\n.surveyserv-widget-container .freemium-survey-step-navigation,\n.freemium-survey-components .freemium-survey-step-navigation {\n border-radius: 3px;\n border: 1px solid #efefef;\n width: -moz-fit-content;\n width: fit-content;\n display: flex;\n}\n.surveyserv-widget-container .freemium-survey-step-navigation button.navigation-button,\n.freemium-survey-components .freemium-survey-step-navigation button.navigation-button {\n width: 38px;\n height: 38px;\n background-color: #fff;\n border: none;\n cursor: pointer;\n display: grid;\n place-content: center;\n border-radius: 0 3px 3px 0;\n}\n.surveyserv-widget-container .freemium-survey-step-navigation button.navigation-button:disabled,\n.freemium-survey-components .freemium-survey-step-navigation button.navigation-button:disabled {\n cursor: not-allowed;\n pointer-events: none;\n opacity: 0.5;\n}\n.surveyserv-widget-container .freemium-survey-step-navigation button.navigation-button:first-of-type,\n.freemium-survey-components .freemium-survey-step-navigation button.navigation-button:first-of-type {\n border-right: 1px solid #efefef;\n border-radius: 3px 0 0 3px;\n}\n.surveyserv-widget-container .action-buttons,\n.freemium-survey-components .action-buttons {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.surveyserv-widget-container .question-container.thankyou,\n.freemium-survey-components .question-container.thankyou {\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n overflow: unset !important;\n gap: 24px;\n}\n.surveyserv-widget-container .question-container.thankyou .heading,\n.freemium-survey-components .question-container.thankyou .heading {\n font-weight: 500;\n font-size: 1.4em;\n}\n.surveyserv-widget-container .question-container.thankyou .text,\n.freemium-survey-components .question-container.thankyou .text {\n text-align: center;\n white-space: pre-wrap;\n font-weight: 500;\n font-size: var(--fsc-font-size);\n line-height: 1.6;\n color: var(--question-text-color, #475867);\n width: 75%;\n}\n.surveyserv-widget-container .question-container.thankyou .wrap-up-actions,\n.freemium-survey-components .question-container.thankyou .wrap-up-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n align-items: center;\n justify-content: center;\n}\n.surveyserv-widget-container .question-container.thankyou .wrap-up-actions button.action-button,\n.freemium-survey-components .question-container.thankyou .wrap-up-actions button.action-button {\n letter-spacing: 0.05em;\n font-weight: 600;\n font-size: var(--fsc-font-size);\n line-height: 20px;\n color: #2c5cc5;\n border: 1px solid transparent;\n transform: translateY(0px);\n transition: transform ease 0.2s;\n background-color: #e5f2fd;\n padding: 8px 12px;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n white-space: nowrap;\n border-radius: 4px;\n}\n.surveyserv-widget-container .question-container.thankyou .wrap-up-actions button.action-button:hover,\n.freemium-survey-components .question-container.thankyou .wrap-up-actions button.action-button:hover {\n transform: translateY(-4px);\n}\n.surveyserv-widget-container .question-container.thankyou .redirection-container,\n.freemium-survey-components .question-container.thankyou .redirection-container {\n display: flex;\n align-items: center;\n flex-direction: column;\n width: 100%;\n}\n.surveyserv-widget-container .question-container.thankyou .redirection-container .redirection-text,\n.freemium-survey-components .question-container.thankyou .redirection-container .redirection-text {\n color: #929292;\n margin-bottom: 12px;\n text-align: center;\n font-weight: 300;\n}\n.surveyserv-widget-container .question-container.thankyou .redirection-container .link,\n.freemium-survey-components .question-container.thankyou .redirection-container .link {\n max-width: 100%;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #666;\n font-weight: 500;\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container,\n.freemium-survey-components .question-container.thankyou .show-link-container {\n display: flex;\n gap: 12px;\n flex-wrap: wrap;\n justify-content: center;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link {\n background: #f5f7f9;\n padding: 16px;\n border-radius: 12px;\n display: flex;\n gap: 12px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link.show-custom-button-container,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link.show-custom-button-container {\n background: unset;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link .link-image-url,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link .link-image-url {\n display: grid;\n place-content: center;\n height: 45px;\n width: 45px;\n background: #fff;\n border-radius: 8px;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link .title-text,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link .title-text {\n font-size: var(--fsc-font-size);\n font-weight: 500;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link .links,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link .links {\n display: flex;\n gap: 8px;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link a,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link a {\n text-decoration: unset;\n}\n.surveyserv-widget-container .question-container.thankyou .show-link-container .show-link a .button_text,\n.freemium-survey-components .question-container.thankyou .show-link-container .show-link a .button_text {\n padding: 8px 12px;\n background: #4560f6;\n color: #fff;\n font-weight: 700;\n border-radius: 8px;\n}\n.surveyserv-widget-container div.page-container,\n.freemium-survey-components div.page-container {\n margin-bottom: 24px;\n}\n.surveyserv-widget-container div.page-container p,\n.freemium-survey-components div.page-container p {\n margin: unset;\n}\n.surveyserv-widget-container div.page-container .page-title,\n.freemium-survey-components div.page-container .page-title {\n font-size: 1.4em;\n font-weight: 500;\n margin-bottom: 12px;\n color: var(--question-text-color, #475867);\n}\n.surveyserv-widget-container div.page-container .page-description,\n.freemium-survey-components div.page-container .page-description {\n font-size: 1em;\n font-weight: 400;\n color: var(--question-text-color, #475867);\n}');const o3=["next","next-statement","next-page","skip","skip-statement","skip-page","submit","navigation","page-navigation","clear-selection","message","consent","navigation-prev","navigation-next","navigation-page-prev","navigation-page-next"],s3=({activeIndexOfBlocks:e,activeIndexOfRenderedBlocks:t,renderedBlocks:a,blocks:r,initialStatementHasAnswer:i,activeIndexOfRenderedStatement:o,answers:s,pages:l,navigateToNextPage:c,navigateToPreviousPage:u,translationVariables:d,canDisplayDisableButtonParams:m})=>n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:oe("navigation-page-prev",m),className:"navigation-button",onClick:u,title:d?.prev_question??"go to previous question"},n.createElement(El,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:oe("navigation-page-next",m),title:d?.next_question||"Go to next question",onClick:c},n.createElement(El,{name:"arrow-next"}))),l3=({surveyServAssetUrl:e,thankYouQuestion:a,preview:r,placeholders:i,canResubmit:o,allowMultipleSubmission:s,navigateToStart:l,resetSurvey:c,isMobile:u,pivot:d,rangeToRender:m,translationVariables:h})=>{const{redirectUrl:p,redirectDelay:f,image_url:v,show_custom_button:g,show_review_links:y,show_social_links:b}=a?.type_info?.meta??{},[w,x]=t.useState(f??10);return t.useEffect((()=>{if(!r&&p){const e=setInterval((()=>x((e=>e>1?e-1:(window.location.href=p??"",0)))),1e3);return()=>clearInterval(e)}}),[]),n.createElement("div",{className:"thankyou-container"},n.createElement("div",{className:"question-container thankyou"},v&&n.createElement("img",{className:"thankyou-logo-img",src:v,alt:"thankyou_logo"}),n.createElement("div",{className:"heading"},a?.type_info?.header_text??(h?.thank_you||"Thank you!")),n.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:R({questionText:a.text,placeholders:i,npsRating:d?.answer,ratingLabel:L(d?.answer)?"":m?.find((e=>e?.value===String(d?.answer)))?.text??"",preference:d?.question.type_info?.scale_properties?.labels?.preference,isPreview:r})}}),(o||s)&&n.createElement("div",{className:("wrap-up-actions "+(u?"mobile":"")).trim()},o&&n.createElement("button",{className:"action-button",tabIndex:0,onClick:()=>l()},n.createElement(El,{name:"edit"}),h?.edit_response||"Edit your response"),s&&n.createElement("button",{className:"action-button",tabIndex:0,onClick:c},n.createElement(El,{name:"reload"}),h?.another_response||"Submit another response")),p&&n.createElement(n.Fragment,null,n.createElement("div",{className:"redirection-text"},V(w,h?.redirect_msg),n.createElement("br",null)),n.createElement("a",{className:"link",href:p},p)),n.createElement(of,{show_custom_button:g,show_review_links:y,show_social_links:b,surveyServAssetUrl:e})))},c3=e=>{const{blockIndex:t,renderedBlocks:a,activeIndexOfRenderedBlocks:r,translationVariables:i,saveFormValues:o,answers:s,clearRadioSelection:l,canDisplayDisableButtonParams:c}=e,u={};o3.forEach((e=>{u[e]=!!ae(e,c)}));const d=a[t??r],{question:m}=d,h=m?.type_info?.meta?.display_format;return u?.consent||u?.["clear-selection"]||u?.message?n.createElement("div",{className:"question-footer"},n.createElement("div",null),n.createElement("div",{className:"action-buttons"},u?.["clear-selection"]&&n.createElement(Cl,{className:"sec-button",variant:"secondary",onClick:()=>l(t)},i?.clear_selection??"Clear selection"),u?.consent&&"BUTTON"===h&&$.map((e=>n.createElement(Cl,{key:r+String(e.recordAs),onClick:()=>{o(d,e.recordAs,!0,t)},disabled:oe("consent",c),variant:s.formValues?.[m.name]===e.recordAs?"primary":"secondary",className:("consent-button "+(s.formValues?.[m.name]===e.recordAs?"selected":"")).trim()},m?.type_info?.scale_properties?.labels?.values?.[e.id]??e.defaultValue))))):null},u3=e=>{const{pages:a,activePage:r,navigateToNextPage:i,navigateToPreviousPage:o,isInitialTransition:s,blocks:l,renderedBlocks:c,activeBlock:u,activeIndexOfBlocks:d,activeIndexOfRenderedBlocks:m,isSurveyCompleted:h,translationVariables:p,saveFormValues:f,saveOthersValue:v,skipBlock:g,skipStatement:y,clearRadioSelection:b,onSubmitHandler:w,answers:x,questions:M,resetSurvey:k,initialStatementHasAnswer:C,navigateToStart:P,activeIndexOfRenderedStatement:z,navigateToNextStatement:S,navigateToPreviousStatement:E,pivot:T,formQuestionErrors:$,textboxQuestionErrors:A,contactFormErrors:V,fileUploadErrors:O,setErrors:N,skipToNextPage:W}=(e=>{const a=e.survey.question_details?.questions||[],r=e.contactData||{},i=e.translationVariables||{},[o]=t.useState(e.survey?.blocks?.filter((e=>"TY"!==e.name&&!e.is_deleted))),[s,l]=t.useState({formQuestionErrors:{},textboxQuestionErrors:{},fileUploadErrors:{},contactFormErrors:{}}),[c]=t.useState(e.survey.pages??[]),[u,d]=t.useState(c?.[0]),m=t.useMemo((()=>de({pages:c,blocks:o,questions:a,initialPivotAnswer:e.initialPivotAnswer,responses:e.answers,answerStatus:e.answerStatus||"PARTIAL"})),[o,a,e.answers]),[h,p]=t.useState(m.renderedBlocks),[f,v]=t.useState(m.activeIndexOfRenderedBlocks),[g,y]=t.useState(m.activeIndexOfRenderedStatement),b=t.useRef(m.pivot),w=t.useRef(m.isInitialTransition),[x,M]=t.useState(m.answers),k=t.useRef(((m.isConsideredCompleted||"PARTIAL"===e.answerStatus)&&e.canResubmit)??!1),[C,P]=t.useState(!1),z=h[f],S=n.useMemo((()=>h.length>0?o?.findIndex((e=>e.name===h[f]?.name)):0),[f]);t.useEffect((()=>{if(0===c.length)return;const e=h?.[f]?.page_id,t=c.find((t=>t.page_id===e));e&&t?.page_id&&d(t)}),[d,h,c,f]),t.useEffect((()=>{if(m.isConsideredCompleted&&w.current&&e.canResubmit)return;const{others_meta:t,...n}=e.answers||{};b.current={...b.current,question:F({questions:a,blocks:o})};const i=a.find((e=>e.name===o?.[0]?.question_name||e.name===o?.[0]?.question_names?.[0]))??b.current.question;if(!o||!o.length||!_(n))return void(_(n)||void 0===e.initialPivotAnswer||n[i.name]===e.initialPivotAnswer||M({...x,formValues:{[i.name]:e.initialPivotAnswer}}));if(null!=e.initialPivotAnswer){const t=B(b.current.question,e.initialPivotAnswer);b.current={...b.current,answer:"BOOLEAN"===i?.type_info?.question_type?Boolean(t):t},M({...x,formValues:{...x.formValues,[i.name]:b.current.answer}})}else null!=e.initialQuestionAnswer&&M({...x,formValues:{...x.formValues,[i.name]:e.initialQuestionAnswer}});const s=U({pivotQn:b.current.question,pivotQnAnswer:b.current.answer,block:o[0],questions:a}),l=ce({activeBlock:{...o[0],question:s},blocks:o,questions:a,answers:x,pages:c,pivot:{question:b.current.question,answer:b.current.answer},renderedBlocks:h,contactData:r});p([{...o[0],question:s},...l])}),[o,e.initialPivotAnswer]),t.useEffect((()=>{if(!(m.isConsideredCompleted&&w.current&&e.canResubmit)&&!_(x.formValues)&&o&&E())if(ne({blocks:o,activeIndexOfBlocks:S,renderedBlocks:h,activeIndexOfRenderedBlocks:f,answers:x,questions:a,surveyLayout:"standard"})){const t=()=>{const e=J({renderedBlocks:h,activeBlock:z,blocks:o,activeIndexOfBlocks:S,answers:x,questions:a,contactData:r,pages:c});if(e===1/0)return void setTimeout((()=>{T("COMPLETE"),P(!0)}));setTimeout((()=>{T()}));const t=U({pivotQn:b.current?.question,pivotQnAnswer:b.current?.answer,block:o?.[e],questions:a}),n=le({renderedBlocks:h,activeIndexOfRenderedBlocks:f}),i=o?.[e],s=ce({activeBlock:{...i,question:t},answers:x,blocks:o,pivot:b.current,questions:a,pages:c,renderedBlocks:h,contactData:r}),l=[...n,...t?.name?[{...i,question:t}]:[],...s];p(l),v(n.length)};null!=e.initialPivotAnswer&&1==h.length&&w.current||t()}else"MATRIX_RATING_SCALE"===z?.question?.type_info?.question_type&&T()}),[x,o]);const E=()=>{if(z.question_name)switch(z.question?.type_info?.question_type){case"FORM_FIELD":return he({fields:z.question?.type_info?.form_fields?.fields,answers:x.formValues?.[z.question_name]||{},errorSetter:l,questionName:z.question_name,errors:s,translationVariables:i});case"TEXT":return pe({type:z.question?.type_info?.text_field?.text_type,answer:x.formValues?.[z.question_name]||"",errorSetter:l,questionName:z.question_name,errors:s,translationVariables:i});case"CONTACT_FORM":return fe({fields:z.question?.type_info?.contact_form?.fields,answers:x.formValues?.[z.question_name]||{},errorSetter:l,questionName:z.question_name,errors:s,translationVariables:i});case"FILE":return ve({errors:s.fileUploadErrors})||!z.required}return!0},T=(t="PARTIAL")=>{let n=()=>{};if(!E())return;let r={...x.formValues};"COMPLETE"===t&&(n=()=>{P(!0),k.current=!1},"CONSENT"===z.question?.type_info?.question_type&&"CHECKBOX"===z.question?.type_info?.meta?.display_format&&z.question_name&&_(x.formValues[z.question_name])&&!z.required&&(r[z.question_name]=!1,M((e=>({...e,formValues:{...e.formValues,[z.question?.name]:!1},commitDirtyValue:!1})))),r=ge({pages:c,answers:{...x,formValues:r},blocks:o,questions:a})),e.onSubmit({...r,others_meta:x.others},n,t,k.current?"EDIT":"CREATE")},$=()=>{const e=z.question;if(k.current||f===h.length-1)M({...x,formValues:{...x.formValues,[e.name]:null},commitDirtyValue:!0}),w.current&&(w.current=!1);else{const t=se({renderedBlocks:h,activeIndexOfRenderedBlocks:f,answers:x}),n=le({renderedBlocks:h,activeIndexOfRenderedBlocks:f});p(n),M({...t,formValues:{...t.formValues,[e.name]:null},commitDirtyValue:!0})}},A=()=>{y((e=>e+1))},L=(e,t,n=!1,a=f)=>{w.current=!1,e.question.name===b.current?.question.name&&(b.current={...b.current,answer:"BOOLEAN"===b.current?.question?.type_info?.question_type?Boolean(t):t});let r=x;k.current||!n&&!te({question:e.question,answers:x,isLastRenderedBlock:f===h.length-1})||(r=se({renderedBlocks:h,activeIndexOfRenderedBlocks:a,answers:x})),a!==f&&v(a),M({...r,formValues:{...r.formValues,...null!==t&&{[e.question.name]:"BOOLEAN"===e.question?.type_info?.question_type?Boolean(t):t}},commitDirtyValue:n}),"SINGLE_ANSWER"===z.question.type_info?.matrix_properties?.type&&g<(z.question?.type_info?.matrix_properties?.statements||[]).length-1&&setTimeout((()=>{A?.()}),0)},H=n.useMemo((()=>{if("MATRIX_RATING_SCALE"!==z?.question?.type_info?.question_type)return!1;const e=(z?.question?.type_info?.matrix_properties?.statements||[])[g],t=(x.formValues[z?.question.name]||[]).find((t=>t.statement_id===e?.id));return(t?.rating_labels||[]).length>0}),[g,f]);return{blocks:o,pages:c,navigateToPreviousPage:()=>{let e=u?.page_id,t=f-1;for(;e===u?.page_id&&!(t<0);)e=h[t].page_id,t--;v(t+1)},navigateToNextPage:()=>{let e=u?.page_id,t=f+1;for(;e===u?.page_id&&!(t>=h.length);)e=h[t].page_id,t++;v(t-1)},activePage:u,questions:a,renderedBlocks:h,initialStatementHasAnswer:H,activeBlock:z,activeIndexOfBlocks:S,activeIndexOfRenderedBlocks:f,activeIndexOfRenderedStatement:g,navigateToNextStatement:A,navigateToPreviousStatement:()=>{y((e=>e-1))},isInitialTransition:w.current,isSurveyCompleted:C,pivot:b.current,answers:x,translationVariables:i,...s,setErrors:l,saveFormValues:L,saveOthersValue:(e,t,n=f)=>{if(n!==f&&v(n),null===t){const t={...x.others};delete t[e],M({...x,commitDirtyValue:!1,others:t})}else M({...x,commitDirtyValue:!1,others:{...x.others,[e]:t}})},skipBlock:$,skipStatement:()=>{if(e.isMobile||e.isWidget){const e=z?.question?.type_info?.matrix_properties?.statements||[],t=e[g],n=x.formValues[z?.question.name]||[],a=g<e.length-1;L(z,n.filter((e=>e.statement_id!==t.id)),!a),a&&"MULTIPLE_ANSWERS"===z?.question?.type_info?.matrix_properties?.type&&setTimeout((()=>{A?.()}),0)}else $()},clearRadioSelection:e=>{e!==f&&v(e);const t=h[e].question;delete x.formValues[t.name],delete x.others[t.name];const n=se({renderedBlocks:h,activeIndexOfRenderedBlocks:e,answers:x}),i=ce({activeBlock:h[e],blocks:o,questions:a,answers:x,pages:c,pivot:b.current?.question?.name?{question:b.current.question,answer:b.current.answer}:null,renderedBlocks:h,contactData:r});p([...h.slice(0,e+1),...i]),M({...n,formValues:{[t.name]:null,...n.formValues},commitDirtyValue:!1})},onSubmitHandler:T,navigateToStart:()=>{k.current=!0,P(!1)},resetSurvey:()=>{P(!1);const e=U({pivotQn:b.current?.question,pivotQnAnswer:b.current?.answer,block:o[0],questions:a});p([{...o[0],question:e}]),v(0),M({formValues:{},others:{},commitDirtyValue:!1}),sessionStorage.clear()},skipToNextPage:e=>{const t={};e&&c.length>0&&h.forEach((e=>{u?.page_id===e.page_id&&"MESSAGE"!==e.question.type_info?.question_type&&(t[e.question.name]=null)}));const n=h.filter((e=>u?.page_id===e?.page_id)),a=n[n.length-1],r=h.findIndex((e=>e.name===a.name));v(r),M((e=>({...e,formValues:{...e.formValues,...t},commitDirtyValue:!0})))}}})(e),j=t.useRef(null),G=t.useRef(null),[Z,X]=t.useState(!1),K=n.useMemo((()=>H(T?.question)),[T?.question]),Q=_(x.formValues)&&e.survey.prompt_settings?.is_enabled&&e.preview,[ee,re]=t.useState(Q),ie=c.filter((e=>u?.page_id===e?.page_id));if(t.useEffect((()=>{e.getSurveyProgress?.({totalBlocks:l.length,isSurveyCompleted:h,activeIndexOfBlocks:d})}),[l.length,h,d]),t.useEffect((()=>{e.survey.ui_theme&&D(e.survey.ui_theme)}),[e.survey.ui_theme]),t.useEffect((()=>{setTimeout((()=>{G.current&&G.current.scroll(0,0)}),0)}),[r?.page_id]),!u||!u.question)return null;const{question:ue}=c[m],me={answers:x,blocks:l,blockIndex:0,activeIndexOfBlocks:d,initialStatementHasAnswer:C,activeIndexOfRenderedBlocks:m,activeIndexOfRenderedStatement:0,renderedBlocks:c,activePage:r,isMobile:!!e.isMobile,surveyStyle:e.surveyStyle,isWidget:!!e.isWidget,initialPivotAnswer:e.initialPivotAnswer,isInitialTransition:s,questions:M,pages:a},ye={};o3.forEach((e=>{ye[e]=!!ae(e,me)}));const be=c[c.length-1];return n.createElement("div",{className:`freemium-survey-components ${e.isMobile?"mobile-preview":""} standard-survey-style`,id:"freemium-survey",style:{...I(e.survey.ui_theme||{})}},ee&&e.survey.prompt_settings?n.createElement("div",{className:"questions"},n.createElement("div",{className:"question-container"},n.createElement(rf,{config:e.survey.prompt_settings,onSelect:t=>{e.onAnsweringPrompt?.(t),1===t&&re(!1)},placeholders:e.placeholders,isPreview:!!e.preview}))):n.createElement(n.Fragment,null,h?n.createElement(l3,{surveyServAssetUrl:e.surveyServAssetUrl??"",thankYouQuestion:U({pivotQn:T?.question,pivotQnAnswer:T?.answer,block:Y({activeBlock:be,blocks:e.survey.blocks?.filter((e=>!e.is_deleted)),answers:x,questions:M,activeIndexOfBlocks:l.findIndex((e=>e.name===be.name)),renderedBlocks:c,contactData:e.contactData}),questions:M}),preview:!!e.preview,placeholders:e.placeholders,pivot:{...T,question:T?.question||{name:""},answer:T?.answer},rangeToRender:K,canResubmit:e.canResubmit,isMobile:e.isMobile,allowMultipleSubmission:e.allowMultipleSubmission,translationVariables:p,navigateToStart:()=>{e.handleAction?e.handleAction("EDIT_RESPONSE",(()=>{X(!1),P()})):(X(!1),P())},resetSurvey:()=>{e.handleAction?e.handleAction("RE_SUBMIT",(()=>{X(!1),k()})):(X(!1),k())}}):n.createElement(n.Fragment,null,a.length>0&&r?.page_id&&n.createElement("div",{className:"page-container"},n.createElement("div",{className:"page-title",dangerouslySetInnerHTML:{__html:R({questionText:r?.title,placeholders:{},isPreview:!1})}}),n.createElement("div",{className:"page-description",dangerouslySetInnerHTML:{__html:R({questionText:r?.description,placeholders:{},isPreview:!1})}})),n.createElement("div",{ref:G,className:"questions"},c.map(((t,r)=>{if(a.length>0&&u?.page_id!==t?.page_id)return null;const i=ie.findIndex((e=>e.name===t.name));return n.createElement(vl.div,{id:`${u.question.name}`,key:t.question.name,ref:j,className:"question-container","data-test-question-name":u.question.name,initial:{opacity:0},animate:{opacity:1,x:0},exit:{opacity:0},transition:{duration:.2,delay:i?i/15:0}},n.createElement("div",{className:`question-text ${t.required?"required":""} ${0===r?"nps":""}`.trim(),dangerouslySetInnerHTML:{__html:R({questionText:t.question.text,placeholders:e.placeholders,npsRating:T?.answer,ratingLabel:L(T?.answer)?"":K?.find((e=>e?.value===String(T?.answer)))?.text??"",preference:T?.question.type_info?.scale_properties?.labels?.preference,isPreview:!!e.preview})},"aria-label":`question-${r}`,role:"heading","aria-level":1}),n.createElement(t3,{surveyServAssetUrl:e.surveyServAssetUrl,fileUploadErrors:O,setErrors:N,onFileUpload:e.onFileUpload,block:t,surveyLanguage:e.survey.language,language:e.language||"en",question:t.question,surveyStyle:e.surveyStyle,isFinalQn:q({blocks:l,activeIndexOfBlocks:d,renderedBlocks:c,activeIndexOfRenderedBlocks:m,questions:M}),formValues:x.formValues,othersMeta:x.others,isMobile:!!e.isMobile,autoFocusDelay:20,activeIndexOfRenderedStatement:z,saveOthersValue:(e,t)=>{v(e,t,r)},onChangeHandler:e=>{f(t,e,c.length>1&&("RANGE"===t.question.type_info?.question_type||"BOOLEAN"===t.question.type_info?.question_type),r)},initialPivotAnswer:e.initialPivotAnswer,initialQuestionAnswer:e.initialQuestionAnswer,formQuestionErrors:$,textboxQuestionErrors:A,contactFormErrors:V,translationVariables:p}),n.createElement(c3,{canDisplayDisableButtonParams:{...me,blockIndex:r},isWidget:!1,surveyStyle:e.surveyStyle,answers:x,renderedBlocks:c,blocks:l,pages:a,blockIndex:r,isInitialTransition:s,activeIndexOfRenderedBlocks:m,initialStatementHasAnswer:C,navigateToNextStatement:S,navigateToPreviousStatement:E,activeIndexOfBlocks:d,saveFormValues:f,isMobile:!!e.isMobile,skipBlock:g,skipStatement:y,clearRadioSelection:b,onSubmitHandler:w,initialPivotAnswer:e.initialPivotAnswer,translationVariables:p,formQuestionErrors:$,textboxQuestionErrors:A,contactFormErrors:V,fileUploadErrors:O,questions:M}))}))),n.createElement("div",{className:"page-actions"},n.createElement("div",null,ye["page-navigation"]&&n.createElement(s3,{answers:x,canDisplayDisableButtonParams:me,activeIndexOfBlocks:d,pages:a,activeIndexOfRenderedBlocks:m,renderedBlocks:c,initialStatementHasAnswer:C,blocks:l,activeIndexOfRenderedStatement:z,navigateToNextPage:i,navigateToPreviousPage:o,translationVariables:p})),n.createElement("div",{className:"action-buttons"},ye["skip-page"]&&n.createElement(Cl,{variant:"secondary",onClick:()=>{W(!0)},"aria-label":"skip page"},p?.skip||"Skip"),ye?.["next-page"]&&n.createElement(Cl,{onClick:()=>{W()},disabled:!!oe("next-page",me),className:"next-page"},p?.next||"Next"),ye.submit&&n.createElement(Cl,{disabled:!!oe("submit",me),onClick:()=>{_($?.[ue.name])&&_(A?.[ue.name])&&_(O?.[ue.name])&&_(V?.[ue.name])&&(X(!0),w("COMPLETE"))}},Z?p?.submitting||"Submitting":p?.submit_survey||"Submit"))))),n.createElement(Gp,{...e.footerProps}))};Ml("@keyframes mountWidget {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n.surveyserv-widget-container {\n overflow: hidden;\n position: fixed;\n bottom: 12px;\n border-radius: 6px;\n z-index: var(--fsc-z-index);\n display: flex;\n flex-direction: column;\n background-color: var(--question-background-color, #fff);\n transition: opacity var(--fsc-widget-transition-duration) ease, height var(--fsc-widget-transition-duration) ease;\n animation: mountWidget var(--fsc-widget-transition-duration) ease;\n transform: translate(-50%, 0);\n box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px;\n}\n.surveyserv-widget-container div.page-container {\n padding: 0 24px;\n margin-bottom: 0;\n}\n.surveyserv-widget-container.default-container-style {\n left: 50%;\n width: 660px;\n}\n.surveyserv-widget-container.default-container-style .question-container.thankyou {\n padding-bottom: 12px;\n}\n.surveyserv-widget-container.compact-container-style {\n width: 350px;\n max-width: calc(100vw - 64px);\n transform: unset;\n right: 32px;\n overflow: hidden;\n}\n.surveyserv-widget-container.compact-container-style .compact-footer-layout {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n width: 100%;\n}\n.surveyserv-widget-container.compact-container-style .compact-footer-container {\n flex: 1;\n display: flex;\n flex-wrap: wrap;\n gap: 24px;\n}\n.surveyserv-widget-container.compact-container-style .compact-footer-container button.consent-buttons, .surveyserv-widget-container.compact-container-style .compact-footer-container > :first-child {\n flex: 1;\n}\n.surveyserv-widget-container.compact-container-style .question-container.thankyou {\n padding: 12px;\n}\n.surveyserv-widget-container.cozy-container-style {\n left: 50%;\n width: 96%;\n}\n.surveyserv-widget-container.cozy-container-style .question-container.thankyou {\n padding-bottom: 12px;\n}\n.surveyserv-widget-container div.widget-progressbar {\n position: absolute;\n top: 10px;\n left: 12px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.surveyserv-widget-container div.widget-progressbar .progress-completion {\n font-size: 0.8rem;\n}\n.surveyserv-widget-container header.widget-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 8px 0 8px;\n}\n.surveyserv-widget-container header.widget-header.minimized {\n padding-bottom: 8px;\n}\n.surveyserv-widget-container header.widget-header span.header-content.minimized {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.surveyserv-widget-container header.widget-header div.icons {\n display: flex;\n}\n.surveyserv-widget-container header.widget-header div.icons button.fsc-button {\n transform: unset;\n width: 32px;\n height: 32px;\n display: grid;\n place-content: center;\n padding: 0;\n margin: 0;\n}\n.surveyserv-widget-container header.widget-header div.icons button.fsc-button svg path {\n fill: var(--question-text-color, #12344d);\n stroke: var(--question-text-color, #12344d);\n}\n.surveyserv-widget-container main.widget-main {\n transition: height var(--fsc-transition-duration);\n}\n.surveyserv-widget-container main.widget-main .animation-container {\n transition: height var(--fsc-transition-duration);\n overflow: auto;\n}\n.surveyserv-widget-container main.widget-main .scroll-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n overflow: hidden;\n}\n.surveyserv-widget-container main.widget-main .question-container {\n padding-top: 12px;\n}\n.surveyserv-widget-container main.widget-main .question-text {\n padding: 0 24px;\n}\n.surveyserv-widget-container main.widget-main .question-wrapper {\n padding: 4px 24px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.surveyserv-widget-container main.widget-main .question-footer {\n padding: 0 24px 24px 24px;\n}\n.surveyserv-widget-container main.widget-main.minimized div.widget-progressbar {\n display: none;\n}\n.surveyserv-widget-container main.widget-main.minimized .question-container {\n padding: 0;\n}\n.surveyserv-widget-container main.widget-main.minimized .question-footer {\n display: none;\n}\n.surveyserv-widget-container footer.widget-footer {\n height: 38px;\n background-color: var(--background-color, #f8f8f8);\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 16px;\n}\n.surveyserv-widget-container footer.widget-footer a {\n color: var(--question-text-color, var(--default-question-text-color));\n text-decoration: unset;\n font-size: 0.7rem;\n}");const d3=({surveyServAssetUrl:e,thankYouQuestion:t,placeholders:a,canResubmit:r,navigateToStart:i,resetSurvey:o,widgetStyle:s,allowMultipleSubmission:l,pivot:c,rangeToRender:u,translationVariables:d})=>{const{show_custom_button:m,show_review_links:h,show_social_links:p,image_url:f}=t?.type_info?.meta??{};return n.createElement("div",{className:"question-container thankyou"},f&&n.createElement("img",{className:"thankyou-logo-img",src:f,alt:"thankyou_logo"}),n.createElement("div",{className:f?"heading":"heading thankyou-image"},t?.type_info?.header_text??(d?.thank_you||"Thank you!")),n.createElement("div",{className:f?"text":"text thankyou-image",dangerouslySetInnerHTML:{__html:R({questionText:t.text,placeholders:a,npsRating:c?.answer,ratingLabel:L(c?.answer)?"":u?.find((e=>e?.value===String(c?.answer)))?.text??"",preference:c?.question.type_info?.scale_properties?.labels?.preference})}}),(r||l)&&n.createElement("div",{className:`wrap-up-actions ${f?"":"thank-you-image"} ${"compact"===s?"mobile":""}`.trim()},r&&n.createElement("button",{className:"action-button",tabIndex:0,onClick:i},n.createElement(El,{name:"edit"}),d?.edit_response||"Edit your response"),l&&n.createElement("button",{className:"action-button",tabIndex:0,onClick:o},n.createElement(El,{name:"reload"}),d?.another_response||"Submit another response")),n.createElement(of,{show_custom_button:m,show_review_links:h,show_social_links:p,surveyServAssetUrl:e}))},m3=({activeIndexOfBlocks:e,activeIndexOfRenderedBlocks:t,renderedBlocks:a,blocks:r,answers:i,initialStatementHasAnswer:o,translationVariables:s,activeIndexOfRenderedStatement:l,navigateToPreviousBlock:c,navigateToNextBlock:u,pages:d,canDisplayDisableButtonParams:m})=>n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:!!oe("navigation-prev",m),className:"navigation-button",onClick:c,title:l>0?s?.prev_statement||"go to previous statement":s?.prev_question||"go to previous question"},n.createElement(El,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:!!oe("navigation-next",m),onClick:u,title:s?.next_question||"go to next question"},n.createElement(El,{name:"arrow-next"}))),h3=e=>{const{widgetStyle:a,answers:r,initialStatementHasAnswer:i,renderedBlocks:o,blocks:s,activeIndexOfBlocks:l,navigateToNextStatement:c,activeIndexOfRenderedBlocks:u,translationVariables:d,saveFormValues:m,activeIndexOfRenderedStatement:h=0,onSubmitHandler:p,skipBlock:f,skipStatement:v,navigateToNextBlock:g,navigateToPreviousBlock:y,formQuestionErrors:b,textboxQuestionErrors:w,fileUploadErrors:x,contactFormErrors:M,canDisplayDisableButtonParams:k,pages:C,setFooterElementRef:P}=e,[z,S]=t.useState(!1),{question:E}=o[u],T=E?.type_info?.question_type,A={...k,isSubmitting:z},L=(e=!1)=>{const t=e?[...$].reverse():[...$];return ae("consent",A)&&"BUTTON"===R&&t.map((e=>n.createElement(Cl,{key:u+String(e.id),onClick:()=>{m(o[u],e.recordAs,!0)},disabled:oe("consent",A),className:`consent-buttons ${e.recordAs?"next":"secondary"}-button`.trim()},E?.type_info?.scale_properties?.labels?.values?.[e.id]||e.defaultValue)))},H="compact"===a&&(ae("navigation",A)&&ae("skip",A)||"CONSENT"===T||"MESSAGE"===T),R=E?.type_info?.meta?.display_format;return n.createElement(n.Fragment,null,(ae("navigation",A)||ae("next",A)||ae("next-statement",A)||ae("consent",A)||ae("submit",A)||ae("skip",A)||ae("skip-statement",A)||ae("message",A))&&n.createElement("div",{className:"question-footer",ref:e=>e?P?.(e):null},H?n.createElement("div",{className:"compact-footer-container"},ae("next",A)&&n.createElement(Cl,{onClick:()=>{m(o[u],"CHECKBOX"===E?.type_info?.meta?.display_format&&"CONSENT"===E?.type_info?.question_type?r.formValues[E.name]??!1:null,!0)},disabled:!!oe("next",A),className:"next-button"},d?.next||"Next"),ae("message",A)&&n.createElement(Cl,{onClick:f,disabled:oe("message",A),className:"next-button"},E?.type_info?.scale_properties?.labels?.values?.[0]||"Begin"),ae("submit",A)&&n.createElement("div",{className:"submit"},n.createElement(Cl,{disabled:!!oe("submit",A),onClick:()=>{_(b?.[E.name])&&_(w?.[E.name])&&_(x?.[E.name])&&_(M?.[E.name])&&(S(!0),p("COMPLETE"))}},z?d?.submitting||"Submitting":d?.submit_survey||"Submit")),ae("next-statement",A)&&n.createElement(Cl,{onClick:()=>{c?.()},disabled:!!oe("next-statement",A),className:"next-button"},d?.next||"Next"),L(),n.createElement("div",{className:"compact-footer-layout"},n.createElement(m3,{answers:r,canDisplayDisableButtonParams:A,pages:C,activeIndexOfBlocks:l,activeIndexOfRenderedBlocks:u,renderedBlocks:o,initialStatementHasAnswer:i,blocks:s,activeIndexOfRenderedStatement:h,translationVariables:d,navigateToNextBlock:g,navigateToPreviousBlock:y}),"MESSAGE"!==T&&!s[l].required&&n.createElement(Cl,{className:"skip-button",onClick:f,variant:"secondary","aria-label":"skip question"},d?.skip||"Skip"))):n.createElement(n.Fragment,null,ae("navigation",A)?n.createElement(m3,{answers:r,pages:C,canDisplayDisableButtonParams:A,activeIndexOfBlocks:l,activeIndexOfRenderedBlocks:u,activeIndexOfRenderedStatement:h,renderedBlocks:o,blocks:s,initialStatementHasAnswer:i,translationVariables:d,navigateToNextBlock:g,navigateToPreviousBlock:y}):n.createElement("div",null),n.createElement("div",{className:"action-buttons"},ae("skip",A)&&n.createElement(Cl,{className:"skip-button",variant:"secondary",onClick:f,"aria-label":"skip question"},d?.skip||"Skip"),ae("skip-statement",A)&&n.createElement(Cl,{className:"skip-button",variant:"secondary",onClick:v,"aria-label":"skip statement"},d?.skip||"Skip"),L(!0),ae("next",A)&&n.createElement(Cl,{onClick:()=>{m(o[u],"CHECKBOX"===E?.type_info?.meta?.display_format&&"CONSENT"===E?.type_info?.question_type?r.formValues[E.name]??!1:null,!0)},disabled:!!oe("next",A),className:"next-button"},d?.next||"Next"),ae("next-statement",A)&&n.createElement(Cl,{onClick:()=>{c?.()},disabled:!!oe("next-statement",A),className:"next-button"},d?.next||"Next"),ae("submit",A)&&n.createElement("div",{className:"submit"},n.createElement(Cl,{disabled:!!oe("submit",A),onClick:()=>{_(b?.[E.name])&&_(w?.[E.name])&&_(x?.[E.name])&&_(M?.[E.name])&&(S(!0),p("COMPLETE"))}},z?d?.submitting||"Submitting":d?.submit_survey||"Submit")),ae("message",A)&&n.createElement(Cl,{onClick:f,disabled:oe("message",A),className:"next-button"},E?.type_info?.scale_properties?.labels?.values?.[0]||"Begin")))))},p3=e=>{const{pages:a,activePage:r,blocks:i,renderedBlocks:o,activeBlock:s,activeIndexOfBlocks:l,activeIndexOfRenderedBlocks:c,isSurveyCompleted:u,isReverseAnimation:d,translationVariables:m,saveFormValues:h,saveOthersValue:p,skipBlock:f,skipStatement:v,initialStatementHasAnswer:g,onSubmitHandler:y,navigateToNextBlock:b,activeIndexOfRenderedStatement:w,navigateToNextStatement:x,navigateToPreviousStatement:M,navigateToPreviousBlock:P,answers:z,questions:S,resetSurvey:E,navigateToStart:T,pivot:$,formQuestionErrors:A,textboxQuestionErrors:I,fileUploadErrors:D,contactFormErrors:V,setErrors:O}=ye({...e,isWidget:!0}),[N,W]=t.useState(null),[j,F]=t.useState(null),[B,G]=t.useState(null),[Z,X]=t.useState(0),K=n.useMemo((()=>H($?.question)),[$?.question]),J=_(z.formValues)&&e.survey.prompt_settings?.is_enabled,[Q,ee]=t.useState(J),te=t.useRef(J?-1:c),ne=()=>{if(N){const t=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)-(j?.scrollHeight??0)-(B?.scrollHeight??0)-164,n=Math.min(N?.scrollHeight,Math.min(C[e.widgetStyle],t));Z!==n&&X(n)}};t.useEffect((()=>{setTimeout((()=>{ne()}),0)}),[u,N,w,c]),t.useEffect((()=>{"MATRIX_RATING_SCALE"===s?.question?.type_info?.question_type&&setTimeout((()=>{ne()}),0)}),[w]),t.useEffect((()=>{e.loadAsNewSurvey&&e.handleAction&&e.handleAction("RE_SUBMIT",E)}),[]),t.useEffect((()=>{e.setCurrentSurveyState?.({question:o[c]?.question,npsScore:$?.answer})}),[c,$?.answer]),t.useEffect((()=>{c!==te.current&&(te.current=-1)}),[c]);const ae={answers:z,blocks:i,blockIndex:c,activeIndexOfBlocks:l,initialStatementHasAnswer:g,activeIndexOfRenderedBlocks:c,activeIndexOfRenderedStatement:w,renderedBlocks:o,isMobile:!!e.isMobile,surveyStyle:"card",isWidget:!0,questions:S,pages:a};if(!s||!s?.question)return null;const re=u?i.length:l+(u?1:0),ie=u?100:(re>0?100/i.length:0)*re;return n.createElement("div",{className:`freemium-survey-components widget-survey-components\n ${e.widgetStyle}-style`.trim(),id:"freemium-survey"},u||Q?null:n.createElement("div",{className:"widget-progressbar"},n.createElement("div",{className:"progress-completion"},ie.toFixed(),"%"),n.createElement(md,{totalSteps:i.length,completedSteps:l+(u?1:0),isWidget:!0})),!Q&&!e.minimized&&a.length>0&&r?.page_id&&!u&&n.createElement("div",{className:"page-container",ref:e=>e?G(e):null},n.createElement("div",{className:"page-title",dangerouslySetInnerHTML:{__html:R({questionText:r?.title,placeholders:{},isPreview:!1})}}),n.createElement("div",{className:"page-description",dangerouslySetInnerHTML:{__html:R({questionText:r?.description,placeholders:{},isPreview:!1})}})),n.createElement("div",{className:"questions",style:{...J&&Q||te.current===c?{transition:"none"}:{}}},n.createElement(xl,{exitBeforeEnter:!0},n.createElement(vl.div,{id:`${s.question.name}`,className:`question-container ${u?"thankyou":""} ${Q?"prompt-container":""}`.trim(),"data-test-question-name":s.question.name,key:`${s.question.name}`,initial:{opacity:0,x:d?-48:k},animate:{opacity:1,x:0},exit:{opacity:0,x:d?k:-48},transition:{duration:.2}},Q&&e.survey.prompt_settings?n.createElement(rf,{config:e.survey.prompt_settings,onSelect:t=>{e.onAnsweringPrompt(t),1===t&&ee(!1)},placeholders:e.placeholders}):n.createElement("div",{className:"animation-container",style:{height:e.minimized?0:Z>0?`${Z}px`:"auto"}},n.createElement("div",{className:"scroll-container",ref:e=>e?W(e):null},u?n.createElement(d3,{surveyServAssetUrl:e.surveyServAssetUrl??"",thankYouQuestion:U({pivotQn:$?.question,pivotQnAnswer:$?.answer,block:Y({activeBlock:s,blocks:e.survey.blocks?.filter((e=>!e.is_deleted)),answers:z,questions:S,activeIndexOfBlocks:l,renderedBlocks:o,contactData:e.contactData}),questions:S}),placeholders:e.placeholders,canResubmit:e.canResubmit,widgetStyle:e.widgetStyle,navigateToStart:()=>{e.handleAction?e.handleAction("EDIT_RESPONSE",T):T()},resetSurvey:()=>{e.handleAction?e.handleAction("RE_SUBMIT",E):E()},allowMultipleSubmission:e.allowMultipleSubmission,pivot:$,rangeToRender:K,translationVariables:m}):n.createElement(n.Fragment,null,n.createElement("div",{className:`question-text ${!s.question.type_info?.pivot_question&&s.required?"required":""} ${"RANGE"===s?.question?.type_info?.question_type?"range-question-text":""}`.trim(),dangerouslySetInnerHTML:{__html:R({questionText:s?.question.text,placeholders:e.placeholders,npsRating:$?.answer,ratingLabel:L($?.answer)?"":K?.find((e=>e?.value===String($?.answer)))?.text??"",preference:$?.question.type_info?.scale_properties?.labels?.preference})},"aria-label":`question-${c}`,role:"heading","aria-level":1}),n.createElement("div",{className:"question-wrapper",onTransitionEndCapture:e=>e.stopPropagation()},n.createElement(t3,{setFocus:!0,isReverseAnimation:d,language:e?.language||"en",surveyServAssetUrl:e.surveyServAssetUrl,fileUploadErrors:D,setErrors:O,onFileUpload:e.onFileUpload,surveyLanguage:e.survey.language,block:s,question:s.question,isFinalQn:q({blocks:i,activeIndexOfBlocks:l,renderedBlocks:o,activeIndexOfRenderedBlocks:c,questions:S}),formValues:z.formValues,widgetStyle:e.widgetStyle,isMobile:!1,othersMeta:z.others,autoFocusDelay:0,activeIndexOfRenderedStatement:w,isWidget:!0,saveOthersValue:(e,t)=>{p(e,t),setTimeout((()=>{ne()}),0)},onChangeHandler:e=>{setTimeout((()=>{ne()}),0),h(s,e)},formQuestionErrors:A,textboxQuestionErrors:I,contactFormErrors:V,translationVariables:m}))))))),!u&&n.createElement(h3,{pages:a,isWidget:!0,widgetStyle:e.widgetStyle,setFooterElementRef:F,surveyStyle:"standard",answers:z,canDisplayDisableButtonParams:{...ae,blockIndex:c,activeIndexOfRenderedBlocks:c},isMobile:!1,renderedBlocks:o,initialStatementHasAnswer:g,activeIndexOfRenderedStatement:w,blocks:i,activeIndexOfRenderedBlocks:c,navigateToNextStatement:x,navigateToPreviousStatement:M,activeIndexOfBlocks:l,translationVariables:m,saveFormValues:h,skipBlock:f,skipStatement:v,onSubmitHandler:y,navigateToPreviousBlock:P,navigateToNextBlock:b,formQuestionErrors:A,textboxQuestionErrors:I,fileUploadErrors:D,contactFormErrors:V,questions:S})))},f3={default:{width:522,11:6,10:6,9:8,8:8,7:18,6:22,5:28,4:32,3:36},compact:{width:522,11:6,10:6,9:8,8:8,7:18,6:22,5:28,4:32,3:36},cozy:{width:582,11:12,10:12,9:12,8:12,7:18,6:22,5:28,4:32,3:36}},v3=({survey:e,preview:a,placeholders:r,contactData:i,overRideComponent:o,onSubmit:s,onDismiss:l,onClose:c,isMobile:u,surveyType:d,unsubscribeUrl:m,isSurveyCompleted:h,children:p=null,answerStatus:f,loadSurveyCollapsed:v=!1,handleAction:g,answers:y,onAnsweringPrompt:b,allowMultipleSubmission:w,loadAsNewSurvey:x,canResubmit:M,translationVariables:k,surveyServAssetUrl:C,surveyPoweredBy:P,onFileUpload:z})=>{const S=e.question_details?.questions||[],[E,T]=t.useState(),[$,A]=t.useState(!1),[L,V]=t.useState(v),{ui_theme:O}=e,[N,j]=t.useState(null),F=n.useMemo((()=>((e=[])=>{const t=e.sort(((e,t)=>Number(e.order)-Number(t.order)));return t.find((e=>!e.is_deleted))??t[0]})(e.blocks||[])),[e.blocks]),B=F?.question_name?F?.question_name??"":F?.category?.[0].question_name??"",q=S.find((e=>e.name===B)),U=()=>{A(!0),setTimeout((()=>{c?.()}),300)},G=t.useRef(null);return n.useEffect((()=>{const t=document.documentElement;if(!t||!e.question_details?.questions)return;let n=0;(e.question_details.questions??[]).forEach((e=>{const t=H(e);"RANGE"===e.type_info?.question_type&&t.length>n&&(n=t.length)}));const a=42*n+f3[d][n]*(n-1);t.style.setProperty("--fsc-max-range-question-width",Math.min(f3[d].width,a)+"px")}),[e,d]),n.useEffect((()=>{O&&D(O)}),[O]),n.createElement("div",{className:`surveyserv-widget-container ${u?"widget-mobile":""} ${d}-container-style ${L?"minimized":""}`,style:{opacity:$?0:1,...I(O||{})}},n.createElement("header",{id:"surveyserv-widget-header",className:("widget-header "+(L?"minimized":"")).trim()},L?n.createElement("span",{className:"header-content minimized",dangerouslySetInnerHTML:{__html:R({questionText:(!E&&e.prompt_settings?.is_enabled?e.prompt_settings.text:N?.question?.text)??W(q?.text||""),placeholders:{...r,"{{nps.rating}}":String(N?.npsScore??"")}})}}):n.createElement("div",null),n.createElement("div",{className:"icons"},!h&&n.createElement(Cl,{onClick:()=>{V((e=>!e))},variant:"secondary",className:"icon minimize-btn",title:L?k?.maximize||"Maximize widget":k?.minimize||"Minimize widget"},L?n.createElement(El,{name:"widget-maximize"}):n.createElement(El,{name:"widget-minimize"})),n.createElement(Cl,{ref:G,onClick:()=>{h||l(),U()},variant:"secondary",title:k?.dismiss||"Dismiss widget",className:"icon minimize-btn"},n.createElement(El,{name:"widget-close"})))),p,n.createElement("main",{className:("widget-main "+(L?"minimized":"")).trim()},o?n.createElement(n.Fragment,null,o):n.createElement(p3,{surveyServAssetUrl:C,answers:y,minimized:L,widgetStyle:d,answerStatus:f,survey:e,placeholders:r,isMobile:!!u,contactData:i,onFileUpload:z,allowMultipleSubmission:w,loadAsNewSurvey:x,canResubmit:M,onSubmit:s,setCurrentSurveyState:j,widgetHeaderQuerySelector:L?void 0:"#surveyserv-widget-header",onAnsweringPrompt:t=>{b?.(t),T(t),0==t&&_(e.prompt_settings?.declined_message)&&U()},handleAction:g,translationVariables:k})),n.createElement("footer",{className:("widget-footer "+(L?"minimized":"")).trim()},m&&!L&&n.createElement("a",{href:m,target:"_blank",rel:"noopener noreferrer",onClick:e=>{a&&e.preventDefault(),e.stopPropagation(),U()}},k?.unsubscribe||"Unsubscribe"),n.createElement("div",{className:"footer-text"},n.createElement(Up,{surveyPoweredBy:P}))))};Ml('.whatsapp-container {\n --message-margin: 40px;\n --message-border: 6px;\n --message-bg: #fff;\n --message-color: #0096de;\n --message-disabled-color: #aaa;\n --answers-bg: #d3ffc8;\n --answers-color: #000;\n --answers-radius: 6px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n font-size: var(--fsc-font-size);\n position: relative;\n width: 340px;\n height: 574px;\n background-image: url("https://microfrontend.prestaging.sta91ng-surveyserv.com/survey/whatsapp-bg.svg");\n background-repeat: no-repeat;\n background-size: contain;\n margin: 0 auto;\n}\n.whatsapp-container.instagram {\n --message-bg: none;\n --answers-bg: #4d5bff;\n --answers-color: #fff;\n --answers-radius: 21px;\n background-image: url("https://microfrontend.prestaging.sta91ng-surveyserv.com/survey/instagram-bg.svg");\n}\n.whatsapp-container.instagram .msg-container {\n position: relative;\n}\n.whatsapp-container.instagram .choices {\n display: none;\n flex-direction: row;\n position: absolute;\n bottom: 0;\n margin-right: 0;\n width: 93%;\n}\n.whatsapp-container.instagram .choices:before {\n content: "";\n display: block;\n width: 100%;\n position: absolute;\n top: 0px;\n border-top: 1px solid #e8e8e8;\n}\n.whatsapp-container.instagram .choices .choice {\n border: 1px solid #0584fe;\n border-radius: 50px;\n color: #0584fe;\n box-shadow: none;\n}\n.whatsapp-container.instagram .choices.one-line .range-choice,\n.whatsapp-container.instagram .choices.one-line .choice {\n flex-grow: 0;\n}\n.whatsapp-container.instagram .question-container {\n background: #efefef;\n padding: 2px;\n border-radius: 21px;\n}\n.whatsapp-container.instagram .question-container .options-popup {\n display: flex;\n overflow: auto;\n flex-direction: row;\n padding: 5px 0px 2px;\n box-shadow: none;\n border-top: 1px solid #e8e8e8;\n border-radius: 0;\n left: 7px;\n min-height: 50px;\n bottom: 0px;\n}\n.whatsapp-container.instagram .question-container .options-popup footer,\n.whatsapp-container.instagram .question-container .options-popup header {\n display: none;\n}\n.whatsapp-container.instagram .question-container .options-popup main {\n display: flex;\n padding: 0;\n}\n.whatsapp-container.instagram .question-container .options-popup main .option-row {\n border: 1px solid #0584fe;\n border-radius: 50px;\n margin: 5px;\n padding: 5px 10px;\n}\n.whatsapp-container.instagram .question-container .options-popup main .option-row button {\n color: var(--message-color);\n display: flex;\n}\n.whatsapp-container.instagram .question-container .choices-button.choice {\n font-weight: 700;\n font-size: 13.4838px;\n line-height: 16px;\n letter-spacing: -0.03em;\n color: #333333;\n border: none;\n width: auto;\n padding: 8px;\n border-radius: 10px;\n margin: 5px 10px 10px;\n box-shadow: none;\n}\n.whatsapp-container.instagram .question-container .choices-button.choice svg {\n display: none;\n}\n.whatsapp-container.instagram .question-container .question-text-container {\n box-shadow: none;\n}\n.whatsapp-container.instagram .question-container.active {\n margin-bottom: 40px;\n}\n.whatsapp-container.instagram .question-container.active .choices {\n display: flex;\n overflow: auto;\n padding-top: 10px;\n background: #fff;\n}\n.whatsapp-container.instagram .question-container.active .choices .choice button {\n white-space: nowrap;\n}\n.whatsapp-container.instagram .question-container.active .choices.multi-choice {\n padding-bottom: 0;\n}\n.whatsapp-container.instagram .question-container.active .choices.multi-choice::before {\n content: none;\n}\n.whatsapp-container.instagram .textarea-container {\n background: #fff;\n margin-right: 23px;\n}\n.whatsapp-container.instagram .textarea-container textarea {\n background: #e8e8e8;\n border-radius: 18px;\n}\n.whatsapp-container.instagram .answers {\n box-shadow: none;\n}\n.whatsapp-container .msg-container {\n margin-top: 80px;\n margin-left: 18px;\n margin-right: 20px;\n flex-grow: 1;\n padding: 8px;\n overflow: hidden;\n display: flex;\n}\n.whatsapp-container .scroll-wrapper {\n display: flex;\n flex-direction: column;\n align-items: baseline;\n gap: 12px;\n overflow: scroll;\n}\n.whatsapp-container .question-text.required::after {\n content: "*";\n color: rgb(215, 45, 48);\n margin-left: 4px;\n}\n.whatsapp-container .question-text {\n font-size: 16px;\n line-height: 18px;\n padding: 12px;\n background-color: var(--message-bg);\n border-radius: var(--message-border);\n}\n.whatsapp-container .question-text p {\n text-align: left;\n}\n.whatsapp-container .question-text a {\n color: var(--link-color);\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n.whatsapp-container .question-container {\n margin-right: var(--message-margin);\n gap: 2px;\n display: flex;\n flex-direction: column;\n pointer-events: none;\n text-align: left;\n}\n.whatsapp-container .question-container .question-text-container {\n box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 1px;\n}\n.whatsapp-container .question-container.active {\n pointer-events: initial;\n}\n.whatsapp-container .question-container.active .choice {\n color: var(--message-color);\n}\n.whatsapp-container .question-container.active .choice button {\n color: var(--message-color);\n}\n.whatsapp-container .question-container.active .choice svg:not(#star) {\n fill: var(--message-color);\n}\n.whatsapp-container .question-container.active.open-modal {\n margin-bottom: 45px;\n}\n.whatsapp-container .question-container#new {\n margin-bottom: 10px;\n}\n.whatsapp-container .answers-container {\n width: 100%;\n display: flex;\n justify-content: end;\n text-align: left;\n}\n.whatsapp-container .answers {\n background: var(--answers-bg);\n margin-left: var(--message-margin);\n border-radius: var(--answers-radius);\n color: var(--answers-color);\n padding: 12px;\n width: -moz-fit-content;\n width: fit-content;\n min-width: 80px;\n font-size: 16px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 1px;\n}\n.whatsapp-container .answers .reply-block {\n background: rgba(0, 0, 0, 0.08);\n margin: -6px -6px 4px;\n padding: 5px 8px;\n border-radius: 6px;\n border-left: 3px solid #2c5cc5;\n}\n.whatsapp-container .answers .reply-block .user {\n color: #2c5cc5;\n font-weight: 600;\n margin-bottom: 3px;\n}\n.whatsapp-container .answers:empty {\n display: none;\n}\n.whatsapp-container .answers .answer-text {\n display: flex;\n align-items: center;\n}\n.whatsapp-container .answers .answer-text span {\n white-space: nowrap;\n}\n.whatsapp-container .options-popup {\n position: absolute;\n z-index: 1;\n border-radius: 12px 12px 30px 30px;\n background-color: #fff;\n box-shadow: 0px -10px 10px rgba(0, 0, 0, 0.06);\n padding: 12px 8px;\n bottom: 15px;\n left: 18px;\n right: 22px;\n transform: translateY(80px);\n transition: all linear 0.3s;\n opacity: 0;\n}\n.whatsapp-container .fade-enter-active {\n transform: translateY(0px);\n opacity: 1;\n}\n.whatsapp-container .fade-enter-done {\n transform: translateY(0px);\n opacity: 1;\n}\n.whatsapp-container .fade-exit-active {\n opacity: 0;\n transform: translateY(80px);\n}\n.whatsapp-container .fade-exit-done {\n opacity: 0;\n transform: translateY(80px);\n}\n.whatsapp-container .option-row {\n padding-bottom: 16px;\n}\n.whatsapp-container .option-row button {\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n width: 100%;\n}\n.whatsapp-container .option-row button span {\n white-space: nowrap;\n margin-left: 5px;\n}\n.whatsapp-container header {\n text-align: center;\n display: flex;\n align-items: center;\n padding-bottom: 20px;\n position: relative;\n}\n.whatsapp-container main {\n padding: 0 8px;\n}\n.whatsapp-container .close {\n background: transparent;\n border: none;\n width: 32px;\n height: 32px;\n position: absolute;\n}\n.whatsapp-container .choices-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n gap: 12px;\n}\n.whatsapp-container .choices {\n display: flex;\n flex-direction: column;\n gap: 2px;\n list-style-type: none;\n padding-bottom: 5px;\n}\n.whatsapp-container .choices.multi-choice .choice button {\n white-space: normal;\n}\n.whatsapp-container .choices.one-line {\n flex-direction: row;\n}\n.whatsapp-container .choices.one-line .range-choice,\n.whatsapp-container .choices.one-line .choice {\n flex-grow: 1;\n}\n.whatsapp-container .choice {\n background-color: var(--message-bg);\n padding: 8px 12px;\n border-radius: var(--message-border);\n text-align: center;\n color: var(--message-disabled-color);\n box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 1px;\n}\n.whatsapp-container .choice button {\n color: var(--message-disabled-color);\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n white-space: nowrap;\n}\n.whatsapp-container .choice svg:not(#star) {\n fill: var(--message-disabled-color);\n}\n.whatsapp-container .range-choice {\n padding-top: 4px;\n padding-bottom: 4px;\n}\n.whatsapp-container h4 {\n margin: 0 auto;\n font-weight: 500;\n}\n.whatsapp-container footer {\n color: #979797;\n font-size: 0.8em;\n text-align: center;\n padding: 12px 0;\n}\n.whatsapp-container button {\n background: transparent;\n border: 0;\n cursor: pointer;\n}\n.whatsapp-container .textarea-container {\n display: flex;\n gap: 8px;\n margin-left: 12px;\n margin-right: 16px;\n margin-bottom: 26px;\n margin-top: 10px;\n margin: 0 21px 15px 18px;\n padding: 10px 12px;\n align-items: end;\n background: #f6f6f6;\n border-radius: 0 0 30px 30px;\n}\n.whatsapp-container textarea {\n resize: none;\n min-height: 40px;\n max-height: 100px;\n border-radius: 20px;\n padding: 12px;\n resize: none;\n border: none;\n width: 100%;\n}\n.whatsapp-container textarea:focus {\n outline: none;\n}\n.whatsapp-container textarea::placeholder {\n line-height: 16px;\n padding-left: 2px;\n}');const g3=({children:e,title:t,closeModal:a,isModalOpen:r})=>n.createElement(l.CSSTransition,{in:r,unmountOnExit:!0,timeout:500,classNames:"fade",key:t},n.createElement("div",{className:"options-popup",style:{}},n.createElement("header",null,n.createElement("button",{onClick:a,className:"close"},n.createElement(El,{name:"widget-close"})),n.createElement("h4",null,t)),n.createElement("main",null,e),n.createElement("footer",null,"Tab an item to select it"))),y3=({question:e,saveFormValues:a})=>{const[r,i]=t.useState(!1),{range:o}=e?.type_info?.scale_properties||{},s=Number(o?.[0]?.min),l=Number(o?.[o.length-1]?.max),c="descending"===e?.type_info?.scale_properties?.order,u=[...e?.type_info?.scale_properties?.labels?.values||[]],d=e?.type_info?.scale_properties?.labels?.preference;c&&u.reverse();const m=t.useRef(Array.from({length:l+(0===s?1:0)},((e,t)=>c?l-t:t+s)));return m.current.length<=3?n.createElement("ul",{className:`choices ${("THUMBS"===e?.type_info?.type_variant||"all"!==e?.type_info?.scale_properties?.labels?.preference)&&"one-line"}`},m.current.map(((t,r)=>"THUMBS"===e?.type_info?.type_variant?n.createElement("li",{className:"choice range-choice",key:`thumbs-${t}-${r}`},n.createElement("button",{onClick:()=>{a(t)}},n.createElement(El,{name:t?"whatsapp-thumbs-up":"whatsapp-thumbs-down"}),"all"===e?.type_info?.scale_properties?.labels?.preference&&e?.type_info?.scale_properties?.labels?.values?.[t])):n.createElement("li",{className:"choice range-choice",key:`choice-${t}-${r}`},n.createElement("button",{onClick:()=>{a(t)}},Array.from({length:t},((e,t)=>n.createElement(El,{name:"whatsapp-star",id:`choice-${t}`})))," ","all"===e?.type_info?.scale_properties?.labels?.preference&&e?.type_info?.scale_properties?.labels?.values?.[t-1]))))):n.createElement(n.Fragment,null,n.createElement("button",{onClick:()=>i(!0),className:"choices-button choice"},n.createElement(El,{name:"whatsapp-choices"}),"Rate Support"),n.createElement(g3,{title:"Rate Support",isModalOpen:r,closeModal:()=>i(!1)},m.current.map(((e,t)=>n.createElement("div",{className:"option-row"},n.createElement("button",{onClick:()=>{a(e),i(!1)}},Array.from({length:e},((e,t)=>n.createElement(El,{name:"whatsapp-star",id:`qus-${t}`})))," ","all"===d||"edges"===d&&(0===t||t===u.length-1)?n.createElement("span",null,u[e-1]):null))))))},b3=({question:e,saveFormValues:a,type:r})=>{const[i,o]=t.useState(!1);return n.createElement(n.Fragment,null,n.createElement("button",{onClick:()=>o(!0),className:"choices-button choice"},n.createElement(El,{name:"whatsapp-choices"}),"Select answer"),n.createElement(g3,{title:"Select a choice",isModalOpen:i,closeModal:()=>o(!1)},n.createElement("ul",{className:`choices multi-choice ${r}`},e.choices.map(((e,t)=>n.createElement("li",{className:"choice",style:{boxShadow:"none"},key:`${e}-${t}`},n.createElement("button",{onClick:()=>{a(e.id),o(!1)}},e.value)))))))},w3=e=>{const a=t.useRef(null);return((e,n)=>{t.useEffect((()=>{if(e){e.style.height="0px";const t=e.scrollHeight;e.style.height=t+"px"}}),[e,n])})(a.current,String(e.value)??""),t.useEffect((()=>{e.autoFocus&&a.current?.focus()}),[e.autoFocus]),n.createElement("div",{className:"textarea-container"},n.createElement("textarea",{placeholder:"Type a message",ref:a,rows:1,onChange:e.onChange,value:e.value}),n.createElement("button",{onClick:()=>{e.onSubmit(),a.current&&(a.current.value="")}},n.createElement(El,{name:"whatsapp-send"})))},x3=({text:e,placeholders:t,pivot:a,rangeToRender:r})=>n.createElement("div",{className:"question-text-container"},n.createElement("div",{className:"question-text",dangerouslySetInnerHTML:{__html:R({questionText:e,placeholders:t,npsRating:a?.answer,ratingLabel:L(a?.answer)?"":r?.find((e=>e?.value===String(a?.answer)))?.text??"",preference:a?.question.type_info?.scale_properties?.labels?.preference,isPreview:!0})},role:"heading","aria-level":1})),M3=({block:e,saveFormValues:t,type:a,translationVariables:r})=>{const{question_type:i}=e.question?.type_info;switch(i){case"RANGE":return n.createElement(y3,{question:e.question,saveFormValues:e=>t(e,!0)});case"DROPDOWN":case"MULTI_CHOICE":case"MULTI_SELECT":return n.createElement(b3,{question:e.question,saveFormValues:e=>t(e,!0),type:a,translationVariables:r});case"PARAGRAPH":case"INPUT":return null;default:return console.error(`Question type ${i} not supported`),null}},k3=({config:e,placeholders:a,onSelect:r,promptAccepted:i,type:o})=>{const s=t.useMemo((()=>e.reverse_order?e.choices?.reverse():e.choices),[e]);return n.createElement(n.Fragment,null,n.createElement("div",{className:"question-container "+(null==i?"active":"")},n.createElement(x3,{text:e.text,placeholders:a}),n.createElement("ul",{className:"choices one-line"},s?.map(((e,t)=>n.createElement("li",{className:"choice",key:`prompt-${e}-${t}`},n.createElement("button",{className:"action",onClick:()=>{r(Number(e.id))}},n.createElement(El,{name:Number(e.id)?"whatsapp-thumbs-up":"whatsapp-thumbs-down"}),e.value)))))),void 0!==i&&n.createElement("div",{className:"answers-container"},n.createElement("div",{className:"answers"},"whatsapp"===o&&n.createElement("div",{className:"reply-block"},n.createElement("p",{className:"user"},"Acme.inc"),n.createElement("p",{className:"question",dangerouslySetInnerHTML:{__html:R({questionText:e.text,placeholders:a})}})),n.createElement("div",{className:"answer-text"},n.createElement(El,{name:Number(i)?"whatsapp-thumbs-up":"whatsapp-thumbs-down"}),s.find((e=>e.id==i))?.value))),!1===i&&e.is_declined&&e.declined_message&&n.createElement("div",{className:"question-container"},n.createElement(x3,{text:e.declined_message,placeholders:a})))},C3=e=>{const{activeBlock:a,activeIndexOfBlocks:r,activeIndexOfRenderedBlocks:i,answers:o,saveFormValues:s,blocks:l,questions:c,renderedBlocks:u,onSubmitHandler:d,isSurveyCompleted:m,pivot:h}=ye(e),{type:p="whatsapp"}=e,{question_type:f}=a?.question.type_info??{},v=n.useMemo((()=>H(h?.question)),[h?.question]),g=t.useRef(null),[y,b]=t.useState(void 0);return t.useEffect((()=>{g.current&&g.current.scroll({top:1e4,behavior:"smooth"})}),[a,o,m]),a&&a.question?n.createElement("div",{className:`${p} whatsapp-container`},n.createElement("div",{className:"msg-container"},n.createElement("div",{className:"scroll-wrapper",ref:g},e.survey.prompt_settings?n.createElement(k3,{config:e.survey.prompt_settings,onSelect:e=>{b(1===e)},promptAccepted:y,placeholders:e.placeholders,type:p}):null,!e.survey.prompt_settings||y?u.map(((t,f)=>n.createElement(n.Fragment,null,n.createElement("div",{className:"question-container "+(m||f!==u.length-1?"":"active")},n.createElement(x3,{text:t.question.text,placeholders:e.placeholders,pivot:h,rangeToRender:v}),n.createElement(M3,{language:e.language||"en",block:t,placeholders:e.placeholders,saveFormValues:(e,n)=>{s(t,e,n),setTimeout((()=>{!0===n&&q({blocks:l,activeIndexOfBlocks:r,renderedBlocks:u,activeIndexOfRenderedBlocks:i,questions:c})&&d("COMPLETE")}))},type:p})),t.name===a.name&&!o.commitDirtyValue||Pl.isNil(o.formValues[t.question.name])?null:n.createElement("div",{className:"answers-container"},n.createElement("div",{className:"answers"},"THUMBS"===t.question.type_info?.type_variant?n.createElement(n.Fragment,null,"whatsapp"===p&&n.createElement("div",{className:"reply-block"},n.createElement("p",{className:"user"},"Acme.inc"),n.createElement("p",{className:"question",dangerouslySetInnerHTML:{__html:R({questionText:t.question.text||"",placeholders:e.placeholders,npsRating:h?.answer,ratingLabel:Pl.isNil(h?.answer)?"":v?.find((e=>e?.value===String(h?.answer)))?.text??"",preference:h?.question.type_info?.scale_properties?.labels?.preference,isPreview:!0})}})),n.createElement("div",{className:"answer-text"},n.createElement(El,{name:Number(o.formValues[t.question.name])?"whatsapp-thumbs-up":"whatsapp-thumbs-down"}),"all"===t.question.type_info?.scale_properties?.labels?.preference&&t.question.type_info?.scale_properties?.labels?.values?.[Number(o.formValues[t.question.name])])):"EMOJI"===t.question.type_info?.type_variant||"STAR"===t.question.type_info?.type_variant?n.createElement(n.Fragment,null,"whatsapp"===p&&o.formValues[t.question.name]&&n.createElement("div",{className:"reply-block"},n.createElement("p",{className:"user"},"Acme.inc"),n.createElement("p",{className:"question",dangerouslySetInnerHTML:{__html:R({questionText:t.question.text||"",placeholders:e.placeholders,npsRating:h?.answer,ratingLabel:Pl.isNil(h?.answer)?"":v?.find((e=>e?.value===String(h?.answer)))?.text??"",preference:h?.question.type_info?.scale_properties?.labels?.preference,isPreview:!0})}})),n.createElement("div",{className:"answer-text"},Array.from({length:Number(o.formValues[t.question.name])},((e,t)=>n.createElement(El,{name:"whatsapp-star",id:`ans-${t}`})))," ",n.createElement("span",null,t.question.type_info?.scale_properties?.labels?.values?.[Number(o.formValues[t.question.name])-1]))):"DROPDOWN"===t.question.type_info?.question_type||"MULTI_SELECT"===t.question.type_info?.question_type?n.createElement(n.Fragment,null,t.question.choices?.find((e=>e.id===o.formValues[t.question.name]))?.value||o.formValues[t.question.name]):n.createElement(n.Fragment,null,o.formValues[t.question.name])))))):null,m&&n.createElement("div",{className:"question-container",id:"new"},n.createElement(x3,{text:U({pivotQn:h?.question,pivotQnAnswer:h?.answer,block:e.survey.blocks?.find((e=>"TY"===e.name)),questions:c})?.text,placeholders:e.placeholders,pivot:h,rangeToRender:v})))),n.createElement(w3,{onChange:e=>{"PARAGRAPH"!==f||m||s(a,e.target.value)},value:"PARAGRAPH"===f&&!m&&o.formValues[a.question.name]?o.formValues[a.question.name]:"",activeBlock:!0,autoFocus:"PARAGRAPH"===f,onSubmit:()=>{s(a,null,!0),a.name===l[l.length-1].name&&d("COMPLETE")}})):null};var P3=Object.freeze({__proto__:null,allPathsLoader:function(e,t){return ke(void 0,void 0,void 0,(function(){return Ce(this,(function(n){switch(n.label){case 0:return[4,Promise.resolve().then((function(){return Pw}))];case 1:return[2,(0,n.sent().getIconPaths)(e,t)]}}))}))}}),z3=Object.freeze({__proto__:null,splitPathsBySizeLoader:function(e,t){return ke(void 0,void 0,void 0,(function(){var n,a;return Ce(this,(function(r){switch(r.label){case 0:return n=yw(e),t!==ww.STANDARD?[3,2]:[4,Promise.resolve().then((function(){return xw}))];case 1:return a=r.sent(),[3,4];case 2:return[4,Promise.resolve().then((function(){return Mw}))];case 3:a=r.sent(),r.label=4;case 4:return[2,a[n]]}}))}))}});exports.Binary=Ll,exports.Button=Cl,exports.ChannelPreview=e=>{const{survey:t,answers:a}=j(e.survey,e.answers);return"whatsapp"===e.channel?n.createElement(C3,{...e,survey:t,answers:a}):"instagram"===e.channel?n.createElement(C3,{type:"instagram",...e,survey:t,answers:a}):(console.error(`Channel ${e.channel} not supported`),null)},exports.Checkbox=ud,exports.Dropdown=Yu,exports.Input=Dl,exports.ProgressBar=md,exports.RadioGroup=dd,exports.Range=Il,exports.RankOrder=Yh,exports.Slider=qp,exports.Survey=e=>{const{survey:t,answers:a}=j(e.survey,e.answers),[r,i]=n.useState(!1);return n.useEffect((()=>{"undefined"!=typeof window&&i(window.matchMedia("(max-width: 550px)").matches),sessionStorage.clear()}),[]),n.createElement(n.Fragment,null,"standard"===e.surveyStyle?n.createElement(u3,{...e,answers:a,survey:t,isMobile:r||!!e.isMobile,initialQuestionAnswer:e.initialQuestionAnswer}):n.createElement(i3,{...e,answers:a,survey:t,isMobile:r||!!e.isMobile,surveyStyle:"card",initialQuestionAnswer:e.initialQuestionAnswer}))},exports.SurveyFooter=Gp,exports.SurveyProgress=({isSurveyCompleted:e,totalBlocks:t,completedText:a,activeIndexOfBlocks:r})=>{const i=e?t:r+(e?1:0),o=e?100:(i>0?100/t:0)*i;return n.createElement("div",{className:"survey-progress"},n.createElement("span",{className:"progress-completion"},o.toFixed(),"% "),a||"survey completed",n.createElement(md,{totalSteps:t,completedSteps:i}))},exports.TextArea=Vl,exports.WebInAppSurvey=e=>{const{survey:t,answers:a}=j(e.survey,e.answers),[r,i]=n.useState(!1),[o,s]=n.useState(!1);return n.useEffect((()=>{"undefined"!=typeof window&&i(window.matchMedia("(max-width: 550px)").matches)}),[]),n.useEffect((()=>{"undefined"!=typeof window&&s(window.matchMedia("(max-width: 1080px)").matches)}),[]),n.createElement(v3,{...e,survey:t,answers:a,isMobile:r,surveyType:r?"compact":o?"default":e.surveyType})},exports.getEmailEmbedCodeForQuestion=e=>{const{emailEmbedChannelInfo:t,survey:n,question:a,collectorId:r,customDomain:i,disabled:o,publicSurveyUrl:s}=e,l=a?.type_info?.scale_properties?.labels?.preference,c=a?.type_info?.footer_text,u=af({collectorId:r,disabled:o,publicSurveyUrl:s,contact_fields:t?.contact_fields||[],customDomain:i,initialPivotAnswer:"",surveyId:n?.id||""}).trim();return`\n <table\n class="email-embed-question"\n style="\n background-color:${n?.ui_theme?.question_background_color||"#FFFFFF"} !important;\n min-width : min(100%, 320px);\n max-width : 612px !important;\n box-shadow: rgba(18, 52, 77, 0.1) 0px 2px 16px !important;\n border-radius: 4px !important;\n border-spacing: 16px !important;\n margin: ${t?.align_center?"20px auto":"20px 0"} !important;\n "\n >\n <tbody>\n <tr>\n <td\n style="\n color: ${n?.ui_theme?.question_text_color||Yp} !important;\n padding: 16px 8px 0 8px !important;\n font-weight: 400 !important;\n font-size: 16px !important;\n text-align: ${t?.align_center?"center":"left"} !important;\n "\n >${a?.text?.trim()}</td>\n ${t?.display?.show_button?`\n <tr>\n <td\n style="\n color: ${n?.ui_theme?.question_text_color||Yp} !important;\n padding: 16px 8px 16px 8px !important;\n font-weight: 400 !important;\n font-size: 16px !important;\n text-align: ${t?.align_center?"center":"left"} !important;\n "\n >\n <a\n href=${u}\n target="_blank"\n style="\n pointer-events: ${o?"none":"unset"} !important;\n "\n >\n <button\n style="\n cursor: pointer !important;\n box-shadow: 0 0 0 8px #F0F0F0 !important;\n color: #FFF !important;\n font-size: 14px !important;\n font-style: normal !important;\n font-weight: 600 !important;\n line-height: 20px !important;\n padding: 6px 12px !important;\n border-radius: 4px !important;\n border: 1px solid #C82124 !important;\n background: linear-gradient(180deg, #D72D30 2.56%, #C82124 95.75%) !important;\n "\n >\n ${t?.display?.text}\n </button>\n </a>\n </td>\n </tr>\n `:`\n ${a?.type_info?.type_variant&&"RANGE"===a?.type_info?.question_type&&"all"!==l&&["NUMBER","EMOJI","STAR"].includes(a.type_info.type_variant)?(({emailEmbedChannelInfo:e,collectorId:t,survey:n,question:a,publicSurveyUrl:r,assetUrl:i,disabled:o,customDomain:s})=>{const l=ef(a?.type_info?.scale_properties?.button_style?.shape||"square"),c=H(a||{name:""}),u=a?.type_info?.type_variant,d=c.length,m={3:10,4:8.5,5:8,6:7.5,7:7,8:6.5,9:6,10:5.5,11:5};return`\n <tr>\n <td\n style="\n padding: 16px 0 8px 0 !important;\n text-align: center !important;\n "\n >\n <table\n style="\n border-spacing: 0px !important;\n margin: 0 auto !important;\n width: ${{3:50,4:70,5:80,6:80,7:80,8:100,9:100,10:100,11:100}[d]}% !important;\n "\n >\n <tbody>\n <tr>\n ${c.map((h=>`\n <td\n style="\n padding: 0px !important;\n text-align: center !important;\n "\n >\n <a\n style="\n text-decoration: unset !important;\n pointer-events: ${o?"none":"unset"} !important;\n display: block !important;\n width: fit-content !important;\n margin: 0 auto !important;\n "\n href="${af({collectorId:t,disabled:o,publicSurveyUrl:r,contact_fields:e?.contact_fields||[],customDomain:s,initialPivotAnswer:`${h.position}`,surveyId:n?.id||""}).trim()}"\n target="_blank"\n >\n ${"NUMBER"===a?.type_info?.type_variant?`\n <div\n style="\n border-radius: ${l} !important;\n color: ${n?.ui_theme?.question_text_color||Xp} !important;\n background-color: ${tf({position:h.position,question:a||{name:""}})} !important;\n font-size: min(${Jp/3}px, ${m[d]/2}vw) !important;\n font-weight: 600 !important;\n width: min(44px, ${m[d]}vw) !important;\n height: min(44px, ${m[d]}vw) !important;\n line-height: min(44px, ${m[d]}vw) !important;\n "\n >${h.value}</div>`:""}\n ${a?.type_info?.type_variant&&["EMOJI","STAR"].includes(a?.type_info?.type_variant)?`\n <img\n src="${nf({position:h.position,assetUrl:i,max:c.length,type_variant:u})}"\n style="\n max-width: unset !important;\n width: min(44px, ${m[d]}vw) !important;\n height: min(44px, ${m[d]}vw) !important;\n display: block !important;\n "\n />`:""}\n </a>\n </td>`)).join("")}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>`})(e):""}\n ${a?.type_info?.type_variant&&"RANGE"===a?.type_info?.question_type&&"all"===l&&["NUMBER","EMOJI","STAR"].includes(a.type_info.type_variant)?(({emailEmbedChannelInfo:e,collectorId:t,survey:n,question:a,assetUrl:r,publicSurveyUrl:i,customDomain:o,disabled:s})=>{const l=ef(a?.type_info?.scale_properties?.button_style?.shape||"square"),c=H(a||{name:""}),u=a?.type_info?.type_variant;return`\n <tr>\n <td\n style="\n padding: 0 !important;\n text-align: center !important;\n "\n >\n ${c.map((d=>`\n <a\n style="\n text-decoration: unset !important;\n display: inline-block !important;\n min-width: 100px !important;\n width: 100px !important;\n vertical-align: top !important;\n padding: 0 !important;\n margin: 12px 6px !important;\n pointer-events: ${s?"none":"unset"} !important;\n "\n href="${af({collectorId:t,disabled:s,publicSurveyUrl:i,contact_fields:e?.contact_fields||[],customDomain:o,initialPivotAnswer:`${d.position}`,surveyId:n?.id||""}).trim()}"\n target="_blank"\n >\n <table\n style="\n border-spacing: 0 !important;\n margin: 0 auto !important;\n "\n >\n <tbody>\n <tr>\n <td\n style="\n padding: 0 !important;\n text-align: center !important;\n "\n >\n ${"NUMBER"===a?.type_info?.type_variant?`\n <div\n style="\n border-radius: ${l} !important;\n color: ${n?.ui_theme?.question_text_color||Xp} !important;\n background-color: ${tf({position:d.position,question:a||{name:""}})} !important;\n font-size: 16px !important;\n font-weight: 600 !important;\n width: 44px !important;\n display: block !important;\n margin: 0 auto !important;\n height: 44px !important;\n line-height: 44px !important;\n "\n >${d.value}</div>\n `:""}\n ${a?.type_info?.type_variant&&["EMOJI","STAR"].includes(a?.type_info?.type_variant)?`\n <img\n src="${nf({position:d.position,assetUrl:r,max:c.length,type_variant:u})}"\n style="\n width: 44px !important;\n height: 44px !important;\n display: block !important;\n margin: 0 auto !important;\n "\n width="44px"\n height="44px"\n />`:""}\n </td>\n </tr>\n <tr>\n <td\n style="\n padding: 12px 0 0 0 !important;\n text-align: center !important;\n font-weight: 400 !important;\n color: ${Xp} !important;\n font-size: 12px !important;\n word-break: break-word !important;\n "\n >${d.text}</td>\n </tr>\n </tbody>\n </table>\n </a>`)).join("")}\n </td>\n </tr>`})(e):""}\n ${"RANGE"===a?.type_info?.question_type&&"TEXT"===a.type_info.type_variant?(({emailEmbedChannelInfo:e,collectorId:t,publicSurveyUrl:n,survey:a,question:r,disabled:i,customDomain:o})=>{const s=ef(r?.type_info?.scale_properties?.button_style?.shape||"square");return`\n <tr>\n <td\n style="\n padding: 0 !important;\n text-align: center !important;\n "\n >\n ${H(r||{name:""}).map((l=>`\n <a\n style="\n text-decoration: unset !important;\n display: inline-block !important;\n vertical-align: top !important;\n pointer-events: ${i?"none":"unset"} !important;\n "\n href="${af({collectorId:t,disabled:i,publicSurveyUrl:n,contact_fields:e?.contact_fields||[],customDomain:o,initialPivotAnswer:`${l.position}`,surveyId:a?.id||""}).trim()}"\n target="_blank"\n >\n <div\n style="\n border-radius: ${s} !important;\n color: ${a?.ui_theme?.question_text_color||Xp} !important;\n background-color: ${tf({position:l.position,question:r||{name:""}})} !important;\n height: 58px !important;\n width: 102px !important;\n margin: 4px !important;\n display: block !important;\n cursor: cursor !important;\n "\n >\n <table\n style="\n border-spacing: 8px 4px !important;\n height: 100% !important;\n width: 100% !important;\n "\n >\n <tbody>\n <tr>\n <td\n style="\n padding: 0 !important;\n font-size: 14px !important;\n line-height: 16px !important;\n word-break: break-word !important;\n "\n >${l.text}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </a>`)).join("")}\n </td>\n </tr>`})(e):""}\n ${"BOOLEAN"===a?.type_info?.question_type?(({emailEmbedChannelInfo:e,disabled:t,assetUrl:n,collectorId:a,survey:r,question:i,customDomain:o,publicSurveyUrl:s})=>{const l=i?.type_info?.type_variant,c=i?.type_info?.question_type,u=i?.type_info?.scale_properties?.labels?.preference,d=H(i||{name:""});let m=0;return d.forEach((e=>{e.text.length>m&&(m=e.text.length)})),`\n <tr>\n <td\n style="\n padding: 0 !important;\n text-align: center !important;\n "\n >\n ${d.map((i=>`\n <a\n style="\n text-decoration: unset !important;\n display: inline-block !important;\n vertical-align: top !important;\n height: 54px !important;\n width: ${7*m+96}px !important;\n min-width: 140px !important;\n margin: 6px !important;\n border-radius: 5px !important;\n background-color: #f2f2f2 !important;\n color: ${r?.ui_theme?.question_text_color||Xp} !important;\n pointer-events: ${t?"none":"unset"} !important;\n "\n href="${af({collectorId:a,publicSurveyUrl:s,disabled:t,contact_fields:e?.contact_fields||[],customDomain:o,initialPivotAnswer:`${i.position}`,surveyId:r?.id||""}).trim()}"\n target="_blank"\n >\n <table\n style="\n border-spacing: 8px !important;\n margin: 0 auto !important;\n height: 100% !important;\n "\n >\n <tbody>\n <tr>\n ${"TEXT"!==l?`\n <td\n style="\n padding: 0 !important;\n "\n >\n <img\n src="${nf({position:i.position,assetUrl:n,max:d.length,question_type:c,type_variant:l})}"\n width="18px"\n style="\n vertical-align: middle !important;\n "\n />\n </td>`:""}\n <td\n style="\n padding: 0 !important;\n "\n >\n <span\n style="\n display: inline-block !important;\n vertical-align: baseline !important;\n font-size: 14px !important;\n font-weight: 500 !important;\n line-height: 16px !important;\n "\n >${"all"===u?i.text:""}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </a>`)).join("")}\n </td>\n </tr>`})(e):""}\n ${"RANGE"===a?.type_info?.question_type&&"edges"===l?(({question:e})=>{const t=H(e||{name:""});return`\n <tr>\n <td\n style="\n text-align: center !important;\n padding: 8px ${{3:8,4:7,5:6,6:5,7:4,8:0,9:0,10:0,11:0}[t.length]}vw !important;\n vertical-align: baseline !important;\n "\n >\n <table\n style="\n border-spacing: 0px !important;\n margin: 0 auto !important;\n width: 100% !important;\n "\n >\n <tbody>\n <tr>\n <td style="text-align: left !important;">\n <span \n style="\n font-weight: 500 !important;\n color: ${Xp} !important;\n font-size: 12px !important;\n "\n >${t[0].value} - ${t[0].text}</span>\n </td>\n <td style="text-align: right !important;">\n <span\n style="\n font-weight: 500 !important;\n color: ${Xp} !important;\n font-size: 12px !important;\n "\n >${t[t.length-1].value} - ${t[t.length-1].text}\n </span>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n `.trim()})({question:a}):""}\n `}\n ${c&&t?.show_footer?`\n <tr>\n <td\n style="\n color: ${n?.ui_theme?.question_text_color||Yp} !important;\n padding: 16px 8px 0 8px !important;\n font-size: 12px !important;\n border-top: 1px solid ${Kp} !important;\n text-align: center !important;\n "\n >${c}</td>\n </tr>`:""}\n ${t?.show_link?`\n <tr>\n <td\n style="\n color: ${n?.ui_theme?.question_text_color||Yp} !important;\n padding: 16px 8px 0 8px !important;\n font-size: 12px !important;\n text-align: center !important;\n "\n >\n If you face any issues while responding to the survey, please copy and paste the following link into your web browser: \n <a\n style="\n text-decoration: unset !important;\n color: ${Zp} !important;\n pointer-events: ${o?"none":"unset"} !important;\n word-break: break-all !important;\n "\n href=${o?"#":u}\n target="_blank"\n >\n ${af({collectorId:r,disabled:!1,publicSurveyUrl:s,contact_fields:t?.contact_fields||[],customDomain:i,initialPivotAnswer:"",surveyId:n?.id||""}).trim()}\n </a>\n </td>\n </tr>`:""}\n </tbody>\n </table>\n `};
|