freemium-survey-components 2.0.205 → 2.0.206

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 CHANGED
@@ -38,4 +38,4 @@ const O5=({addFilter:e,utils:t})=>{const{Type:n,replaceInString:o,toNaturalFileS
38
38
  * FilePondPluginFileValidateType 1.2.9
39
39
  * Licensed under MIT, https://opensource.org/licenses/MIT/
40
40
  * Please visit https://pqina.nl/filepond/ for details.
41
- */;const v5=({addFilter:e,utils:t})=>{const{Type:n,isString:o,replaceInString:a,guesstimateMimeType:r,getExtensionFromFilename:i,getFilenameFromURL:c}=t,s=(e,t)=>e.some((e=>{return/\*$/.test(e)?(n=e,(/^[^/]+/.exec(t)||[]).pop()===n.slice(0,-2)):e===t;var n})),l=(e,t,n)=>{if(0===t.length)return!0;const a=(e=>{let t="";if(o(e)){const n=c(e),o=i(n);o&&(t=r(o))}else t=e.type;return t})(e);return n?new Promise(((o,r)=>{n(e,a).then((e=>{s(t,e)?o():r()})).catch(r)})):s(t,a)};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")||l(e,t("GET_ACCEPTED_FILE_TYPES")))),e("LOAD_FILE",((e,{query:t})=>new Promise(((n,o)=>{if(!t("GET_ALLOW_FILE_TYPE_VALIDATION"))return void n(e);const r=t("GET_ACCEPTED_FILE_TYPES"),i=t("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),c=l(e,r,i),s=()=>{const e=r.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));o({status:{main:t("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:a(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 c)return c?n(e):s();c.then((()=>{n(e)})).catch(s)})))),{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:v5}));Fs('/*!\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}');Fs(".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 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.8571em;\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.8571em;\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.8571em;\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.8571em;\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 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}"),b.registerPlugin(O5,v5,l$,f5),I3(D3,V3,X3,j3);const A5=t.forwardRef((({onClick:e,maxFileSize:o=16,visible:a=!0,supportedFileFormats:r,translationVariables:i,fileErrors:c},s)=>{const[l,p]=t.useState(!1),u=i?.drop_your_file?i?.drop_your_file:n.createElement(n.Fragment,null,"Drop your file here, or Browse");return n.createElement("div",{ref:s,className:"file-upload-container "+(c?.current?.main?"errored":""),onClick:e,style:{visibility:a?"visible":"hidden"},onDragOver:e=>{e.preventDefault(),e.target.classList.add("push-backward")}}," ",n.createElement(Xs,{name:"file-upload-icon"}),"string"!=typeof u?n.createElement("p",null,u):n.createElement("p",{className:"drop-your-file-container",dangerouslySetInnerHTML:{__html:u}}),n.createElement("p",{className:"max-size"},((e,t,n)=>{if(n&&e&&t)return e.replace(t,n)})(i?.max_file_size,"{{max_file_size}}",String(o))||`Maximum file size : ${o} MB`),n.createElement("p",{className:"support file-formats"},i?.supported_file_formats||"Supported file formats: "," ",(r=r.join(", ")).trim()?n.createElement(n.Fragment,null,l?r:r.slice(0,20)," ",n.createElement("span",{onClick:()=>p(!l),style:{color:"#2C5CC5",textDecoration:"underline",cursor:"pointer"}},l?i?.show_less||"Show less":i?.show_more||"Show more")):"No formats selected"),n.createElement("div",{className:"filepond--drip"}))})),g5=({question:e,onChangeHandler:o,onFileUpload:a,setErrors:r,translationVariables:i,surveyServAssetUrl:c,value:s,preview:l})=>{const[p,u]=t.useState([]),[d,M]=t.useState([]),m=t.useRef(),z=e.type_info?.file_field?.max_file_size||10,h=t.useRef(null),f=t.useRef(),[O,v]=t.useState(!1);let A=!1;n.useEffect((()=>{const t=localStorage.getItem(`uploadedFile-${e?.name}`),n=t?JSON.parse(t):"";n?.source&&(n.options={...n.options,file:{name:s,size:n.fileSize}},s&&u([n]))}),[]);const g=async(t,n)=>{try{if(A)return;if(f.current&&k(h.current)||t){const r=t??f.current.getFiles()?.[0]?.file;if(r&&a){A=!0;const t=await a(r.type,r.size,r.name,e);if(n&&n(!0,50,100),t.startsWith("http")&&c){const n=await fetch(t,{method:"PUT",headers:{"Content-Type":r.type,"Content-Disposition":"attachment"},body:r}),a=new URL(t),i=`${c}${a.pathname}`;if(!n.ok)throw console.error("Error uploading file"),new Error("Error uploading file");localStorage.setItem(`uploadedFile-${e?.name}`,JSON.stringify({source:i,options:{type:"local"},fileSize:f.current.getFiles()?.[0]?.fileSize})),o(r.name)}else o(l?"dummy":null),console.error("Error fetching pre-signed url");A=!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(x).map((e=>{if((t||[]).includes(e))return x[e].concat(",")})).join(" ").trim().slice(0,-1);M(n.split(", "))})()}),[]),n.createElement(n.Fragment,null,n.createElement(b.FilePond,{ref:f,files:p,labelFileProcessing:i?.uploading_text??"Uploading..",labelFileProcessingComplete:i?.upload_complete??"Upload complete",labelMaxFileSizeExceeded:i?.file_too_large??"The file is too large and cannot be uploaded.",labelMaxFileSize:"",labelTapToCancel:"",labelTapToUndo:"",labelFileTypeNotAllowed:i?.invalid_type??"The file mismatch. Retry by uploading the supported file type.",fileValidateTypeLabelExpectedTypes:"",beforeAddFile:e=>(h.current?.main&&(h.current=null,r({}),u([e]),v(!0)),!0),onremovefile:()=>{O?v(!1):(u([]),r({}),h.current=null,o(null))},allowReplace:!0,server:{process:async(e,t,n,o,a,r)=>{r(!0,0,100);try{await g(t,r),r(!0,100,100),o(t.name)}catch(e){a("An error occurred during upload")}}},onpreparefile:(e,t)=>{const n=new FileReader;n.onloadend=()=>{const t=n.result??"",o=new Blob([t],{type:e.fileType}),a=new File([o],e.filename,{type:e.fileType});g(a)},n.readAsArrayBuffer(t)},onerror:t=>{h.current=t,r({[e.name]:t})},required:!0,credits:!1,allowFileTypeValidation:!0,acceptedFileTypes:d,fileValidateTypeDetectType:(e,t)=>new Promise(((t,n)=>{const o=e.name.split(".");t(`.${o[o.length-1].toLowerCase()}`)})),imageEditor:{legacyDataToImageState:yQ,createEditor:e5,imageReader:[$3,{}],imageWriter:[_3,{}],imageProcessor:zF,imageEditorAfterWriteImage:({src:e,dest:t,imageState:n})=>new Promise(((o,a)=>{zF(e,{imageReader:$3(),imageWriter:_3({targetSize:{width:128,height:15,fit:"cover"}}),imageState:n}).then((n=>{o([{name:"input_",file:e},{name:"output_",file:t},{name:"thumb_",file:n.dest}])})).catch(a)})),editorOptions:{utils:["crop","finetune","filter","annotate"],imageOrienter:{read:h$,apply:P$},shapePreprocessor:t5(),...F3,...U3,...H3,locale:{...G3,...Z3,...J3,...K3,...Q3,...Y3}}},allowFileSizeValidation:!0,maxFileSize:`${z}MB`,onupdatefiles:e=>{m.current?.classList.remove("push-backward"),e.length&&u(e)},maxFiles:1,name:`${e.id}-files`}),n.createElement(A5,{ref:m,onClick:e=>{const t=e.target;"path"!==t?.tagName&&"P"!==t?.tagName&&(!t?.className||t?.className instanceof SVGAnimatedString||t.className.includes("format-type-toggler"))||f.current.browse()},fileErrors:h,visible:Boolean(!p.length||h.current?.main),maxFileSize:z,translationVariables:{...i,tTimeZones:[{id:"",offset:"",timeZone:""}]},supportedFileFormats:d}),h?.current?.main&&n.createElement("div",{className:"file-error"},n.createElement(Xs,{name:"info"}),n.createElement("span",null,`${h?.current?.main}\n ${h.current?.sub}`)))};Fs(".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}\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 width: 100%;\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 width: 100%;\n}");const y5=e=>{switch(e){case"EMAIL":return"email";case"PHONE":return"tel";case"NUMBER":return"number";default:return"text"}},q5=({question:e,autoFocusDelay:t,onChangeHandler:o,surveyStyle:a,formValues:r,fieldErrors:i,translationVariables:c,language:s,isQuestionBgDark:l})=>{const p=e.type_info?.form_fields?.layout,u=e.type_info?.form_fields?.fields;return n.createElement("div",{className:`fsc-form-field-container layout-${(p??"VERTICAL").toLowerCase()}`.trim()},u?.map(((p,u)=>{const d="NUMBER"===p?.type||"PHONE"===p.type?18:256;return n.createElement("div",{className:"fsc-form-field",key:p.id},"DATE"!==p?.type&&"DATE_TIME"!==p?.type?n.createElement(n.Fragment,null,"PHONE"===p.type?n.createElement(yu,{key:u,surveyLayout:a??"card",setFocus:0===u&&"standard"!==a,autoFocusDelay:t,label:p?.label||"",type:"tel",isRequired:!!p.required,showCount:!0,maxLength:d,value:p.id&&r[e.name]?.[p.id]||"",onChangeHandler:(t,n)=>{p.id&&o({...r[e.name]??{},[p.id]:t||null},!0)},isErrored:!(!p.id||!r?.[e.name]?.[p.id])&&!!i?.[p?.id||""],errorText:p.id&&r[e.name]?.[p.id]?i?.[p?.id]:"",translationVariables:c}):n.createElement(fu,{isQuestionBgDark:l,key:u,setFocus:0===u&&"standard"!==a,autoFocusDelay:t,onKeyDown:e=>{"PHONE"===p?.type&&D(e),"NUMBER"===p?.type&&I(e)},showCount:!0,maxLength:d,placeholder:"NUMBER"===p?.type?"0":void 0,label:p?.label||"",type:y5(p?.type??"TEXT"),isRequired:!!p.required,value:p.id?r[e.name]?.[p.id]??"":"",onChange:t=>{p.id&&o({...r[e.name]??{},[p.id]:t.target.value.slice(0,d)||null})},onBlur:t=>{if(p.id){const n=r[e.name]?.[p.id],a=t.target.value.slice(0,d);(L(n)||k(n))&&(L(a)||k(a))||o?.({...r[e.name]??{},[p.id]:a||null},!0)}},isErrored:!(!p.id||!r?.[e.name]?.[p.id])&&!!i?.[p?.id||""],errorText:p.id&&r[e.name]?.[p.id]?i?.[p?.id]:""})):n.createElement(n.Fragment,null,"DATE_TIME"===p?.type?n.createElement(ZS,{id:p.id??"",name:e.name??"",label:p?.label??"",isRequired:!!p.required,allowOnlyFuture:!!e.type_info?.meta?.allow_future_date,language:s,useAmPm:!e.type_info?.meta?.time_format,showTimezoneSelect:!1,onChange:t=>{o({...r[e.name]??{},...p.id&&{[p.id]:t}},!0)},value:p?.id&&r[e?.name]?.[p?.id],type:"FORM_FIELD",translationVariables:c}):n.createElement(YS,{id:p.id??"",name:e.name??"",label:p?.label??"",isRequired:!!p.required,allowOnlyFuture:!!e.type_info?.meta?.allow_future_date,language:s,onChange:t=>{o({...r[e.name]??{},...p.id&&{[p.id]:t}},!0)},value:p?.id&&r[e?.name]?.[p?.id],type:"FORM_FIELD",translationVariables:c})))})))},w5="rovingFocusGroup.onEntryFocus",W5={bubbles:!1,cancelable:!0},x5="RovingFocusGroup",[R5,L5,C5]=Ll(x5),[k5,P5]=el(x5,[C5]),[S5,E5]=k5(x5),T5=t.forwardRef(((e,n)=>t.createElement(R5.Provider,{scope:e.__scopeRovingFocusGroup},t.createElement(R5.Slot,{scope:e.__scopeRovingFocusGroup},t.createElement(N5,Ks({},e,{ref:n})))))),N5=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:o,orientation:a,loop:r=!1,dir:i,currentTabStopId:c,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:p,...u}=e,d=t.useRef(null),b=Qs(n,d),M=kl(i),[m=null,z]=al({prop:c,defaultProp:s,onChange:l}),[h,f]=t.useState(!1),O=ol(p),v=L5(o),A=t.useRef(!1),[g,y]=t.useState(0);return t.useEffect((()=>{const e=d.current;if(e)return e.addEventListener(w5,O),()=>e.removeEventListener(w5,O)}),[O]),t.createElement(S5,{scope:o,orientation:a,dir:M,loop:r,currentTabStopId:m,onItemFocus:t.useCallback((e=>z(e)),[z]),onItemShiftTab:t.useCallback((()=>f(!0)),[]),onFocusableItemAdd:t.useCallback((()=>y((e=>e+1))),[]),onFocusableItemRemove:t.useCallback((()=>y((e=>e-1))),[])},t.createElement(ml.div,Ks({tabIndex:h||0===g?-1:0,"data-orientation":a},u,{ref:b,style:{outline:"none",...e.style},onMouseDown:nl(e.onMouseDown,(()=>{A.current=!0})),onFocus:nl(e.onFocus,(e=>{const t=!A.current;if(e.target===e.currentTarget&&t&&!h){const t=new CustomEvent(w5,W5);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=v().filter((e=>e.focusable));_5([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))}}A.current=!1})),onBlur:nl(e.onBlur,(()=>f(!1)))})))})),B5=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:o,focusable:a=!0,active:r=!1,tabStopId:i,...c}=e,s=ep(),l=i||s,p=E5("RovingFocusGroupItem",o),u=p.currentTabStopId===l,d=L5(o),{onFocusableItemAdd:b,onFocusableItemRemove:M}=p;return t.useEffect((()=>{if(a)return b(),()=>M()}),[a,b,M]),t.createElement(R5.ItemSlot,{scope:o,id:l,focusable:a,active:r},t.createElement(ml.span,Ks({tabIndex:u?0:-1,"data-orientation":p.orientation},c,{ref:n,onMouseDown:nl(e.onMouseDown,(e=>{a?p.onItemFocus(l):e.preventDefault()})),onFocus:nl(e.onFocus,(()=>p.onItemFocus(l))),onKeyDown:nl(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const o=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(o)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)?void 0:$5[o]}(e,p.orientation,p.dir);if(void 0!==t){e.preventDefault();let n=d().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 o=n.indexOf(e.currentTarget);n=p.loop?function(e,t){return e.map(((n,o)=>e[(t+o)%e.length]))}(n,o+1):n.slice(o+1)}setTimeout((()=>_5(n)))}}))})))})),$5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _5(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const H5=T5,I5=B5,D5="Radio",[X5,V5]=el(D5),[j5,F5]=X5(D5),U5=t.forwardRef(((e,n)=>{const{__scopeRadio:o,name:a,checked:r=!1,required:i,disabled:c,value:s="on",onCheck:l,...p}=e,[u,d]=t.useState(null),b=Qs(n,(e=>d(e))),M=t.useRef(!1),m=!u||Boolean(u.closest("form"));return t.createElement(j5,{scope:o,checked:r,disabled:c},t.createElement(ml.button,Ks({type:"button",role:"radio","aria-checked":r,"data-state":Z5(r),"data-disabled":c?"":void 0,disabled:c,value:s},p,{ref:b,onClick:nl(e.onClick,(e=>{r||null==l||l(),m&&(M.current=e.isPropagationStopped(),M.current||e.stopPropagation())}))})),m&&t.createElement(Y5,{control:u,bubbles:!M.current,name:a,value:s,checked:r,required:i,disabled:c,style:{transform:"translateX(-100%)"}}))})),G5=t.forwardRef(((e,n)=>{const{__scopeRadio:o,forceMount:a,...r}=e,i=F5("RadioIndicator",o);return t.createElement(sl,{present:a||i.checked},t.createElement(ml.span,Ks({"data-state":Z5(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:n})))})),Y5=e=>{const{control:n,checked:o,bubbles:a=!0,...r}=e,i=t.useRef(null),c=rl(o),s=cl(n);return t.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==o&&n){const t=new Event("click",{bubbles:a});n.call(e,o),e.dispatchEvent(t)}}),[c,o,a]),t.createElement("input",Ks({type:"radio","aria-hidden":!0,defaultChecked:o},r,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Z5(e){return e?"checked":"unchecked"}const K5=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],J5="RadioGroup",[Q5,e4]=el(J5,[P5,V5]),t4=P5(),n4=V5(),[o4,a4]=Q5(J5),r4=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:o,name:a,defaultValue:r,value:i,required:c=!1,disabled:s=!1,orientation:l,dir:p,loop:u=!0,onValueChange:d,...b}=e,M=t4(o),m=kl(p),[z,h]=al({prop:i,defaultProp:r,onChange:d});return t.createElement(o4,{scope:o,name:a,required:c,disabled:s,value:z,onValueChange:h},t.createElement(H5,Ks({asChild:!0},M,{orientation:l,dir:m,loop:u}),t.createElement(ml.div,Ks({role:"radiogroup","aria-required":c,"aria-orientation":l,"data-disabled":s?"":void 0,dir:m},b,{ref:n}))))})),i4=r4,c4=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:o,disabled:a,...r}=e,i=a4("RadioGroupItem",o),c=i.disabled||a,s=t4(o),l=n4(o),p=t.useRef(null),u=Qs(n,p),d=i.value===r.value,b=t.useRef(!1);return t.useEffect((()=>{const e=e=>{K5.includes(e.key)&&(b.current=!0)},t=()=>b.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),t.createElement(I5,Ks({asChild:!0},s,{focusable:!c,active:d}),t.createElement(U5,Ks({disabled:c,required:i.required,checked:d},l,r,{name:i.name,ref:u,onCheck:()=>i.onValueChange(r.value),onKeyDown:nl((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:nl(r.onFocus,(()=>{var e;b.current&&(null===(e=p.current)||void 0===e||e.click())}))})))})),s4=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:o,...a}=e,r=n4(o);return t.createElement(G5,Ks({},r,a,{ref:n}))})),l4=e=>{const{checked:t,className:o,disabled:a,id:r,isRequired:i,label:c,name:s,readOnly:l,onChange:p,...u}=e;return n.createElement(i4,{className:`fsc-radio ${o??""}`.trim(),name:s,"aria-label":c||"Radio button",value:t?"default":"",required:i,disabled:a,"aria-readonly":l,onValueChange:e=>{p?.(!t,e)},...u},n.createElement("div",{className:"fsc-radio-container"},n.createElement(c4,{checked:t,"aria-checked":t,className:"fsc-radio-item",disabled:a,"aria-readonly":l,id:r,value:"default"},n.createElement(s4,{className:"fsc-radio-indicator"})),c&&n.createElement("label",{htmlFor:r,className:"fsc-radio-label"},c,c&&i&&n.createElement("span",null,"*"))))};Fs(".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: 1em;\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: 1em;\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 td.m-s-b-s-q-m-s-input,\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 th.m-s-b-s-q-m-s-th-empty,\n .freemium-survey-components.standard-survey-style .matrix-container th.m-s-b-s-q-m-s-th {\n position: unset;\n }\n .freemium-survey-components.standard-survey-style .matrix-container td.m-s-b-s-q-m-s-input {\n min-width: unset;\n max-width: 50vw;\n }\n}\n.freemium-survey-components.mobile-preview.standard-survey-style .matrix-container td.m-s-b-s-q-m-s-input,\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 th.m-s-b-s-q-m-s-th-empty,\n.freemium-survey-components.mobile-preview.standard-survey-style .matrix-container th.m-s-b-s-q-m-s-th {\n position: unset;\n}\n.freemium-survey-components.mobile-preview.standard-survey-style .matrix-container td.m-s-b-s-q-m-s-input {\n min-width: unset;\n max-width: 50vw;\n}");const p4=e=>{const{type_info:{matrix_properties:t},onChangeHandler:o,value:a}=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)=>e.is_active?n.createElement("th",{key:e.id,className:"m-s-b-s-q-m-s-th st-mt-th"},e.text):null)))),n.createElement("tbody",{className:"st-mt-tbody"},t?.statements?.map(((e,r)=>e.is_active?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(((i,c)=>{if(!i.is_active)return null;const s=a?.find((t=>t?.statement_id===e?.id));return n.createElement("td",{key:i.id,className:"m-s-b-s-q-m-s-switch st-mt-td"},"SINGLE_ANSWER"===t?.type&&n.createElement(l4,{key:i.id||`${r}-key-${c}`,name:`q-m-s-radio-${r}-key-${c}`,checked:!!s?.rating_labels?.find((e=>e?.id===i?.id)),id:i.id??"",onChange:()=>{e?.id&&i?.id&&o(s?.statement_id?[...a||[]].map((e=>e?.statement_id===s?.statement_id?{...s,rating_labels:[{id:i.id||"",text:i?.text||""}]}:e)):[...a||[],{statement_id:e.id,rating_labels:[{id:i.id,text:i?.text||""}]}])},label:""}),"MULTIPLE_ANSWERS"===t?.type&&n.createElement(xl,{key:i.id||`${r}-key-${c}`,name:`q-m-s-checkbox-${r}-key-${c}`,checked:!!s?.rating_labels?.find((e=>e?.id===i?.id)),id:i.id??"",onChange:t=>{e?.id&&i?.id&&o(s?.statement_id?[...a||[]].map((e=>e.statement_id===s.statement_id?{...s,rating_labels:t?[...s.rating_labels||[],{id:i.id||"",text:i?.text||""}]:(s.rating_labels||[]).filter((e=>e?.id!==i.id))}:e)):[...a||[],{statement_id:e.id,rating_labels:[{id:i.id,text:i?.text||""}]}])}}))}))):null)))))};Fs(".freemium-survey-components .matrix-wd-container {\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, var(--default-question-text-color));\n font-size: 0.8571em;\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, var(--default-question-text-color));\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 padding: 2px;\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 u4=e=>{const{type_info:{matrix_properties:t},onChangeHandler:o,name:a,isMobile:r,isReverseAnimation:i,statementIndex:c,value:s,widgetStyle:l,language:p="en"}=e,u=n.useMemo((()=>(t?.statements||[]).find(((e,t)=>t===c))),[t?.statements,c]),d=n.useMemo((()=>s?.find((e=>e?.statement_id===u?.id))),[u,s]);return n.createElement("div",{className:"matrix-wd-container","data-test-input":"matrix"},n.createElement("div",{className:"matrix-st-count"},`${c+1}/${(t?.statements||[]).length}`),n.createElement(_s,{exitBeforeEnter:!0},n.createElement(Es.div,{key:`${u?.id??""}`,initial:{opacity:0,x:S(p,i)},animate:{opacity:1,x:0},exit:{opacity:0,x:E(p,i)},transition:{duration:.2}},n.createElement("div",{className:"matrix-st-text"},u?.text),n.createElement("div",{className:`matrix-st-labels wd-style-${l} ${r?"mt-mobile":""}`.trim()},"MULTIPLE_ANSWERS"===t?.type&&n.createElement(HB,{name:a??"",onChangeHandler:e=>{if(u?.id){const n=d?.statement_id?[...s||[]].map((n=>n.statement_id===d.statement_id?{...d,rating_labels:e.map((e=>{const n=t?.rating_labels?.find((t=>t.id===e));return{id:e,text:n?.text||""}}))}:n)):[...s||[],{statement_id:u.id,rating_labels:e.map((e=>{const n=t?.rating_labels?.find((t=>t.id===e));return{id:e,text:n?.text||""}}))}];o(n)}},saveOthersValue:()=>{},options:(t?.rating_labels??[]).map((e=>({id:e.id,value:e.text}))),values:(d?.rating_labels??[]).map((e=>e.id??"")),autoFocusDelay:0,othersValue:""}),"SINGLE_ANSWER"===t?.type&&n.createElement(JS,{name:a??"",language:p||"en",onChangeHandler:e=>{const n=t?.rating_labels?.find((t=>t.id===e));u?.id&&e&&o(d?.statement_id?[...s||[]].map((t=>t?.statement_id===d?.statement_id?{...d,rating_labels:[{id:e||"",text:n?.text||""}]}:t)):[...s||[],{statement_id:u.id,rating_labels:[{id:e,text:n?.text||""}]}])},saveOthersValue:()=>{},options:(t?.rating_labels??[]).map((e=>({id:e.id,value:e.text}))),value:d?.rating_labels?.[0]?.id??"",othersValue:""})))))},d4=({question:e,autoFocusDelay:t,setFocus:o,formValues:a,surveyLayout:r,onChangeHandler:i,isQuestionBgDark:c})=>{const s=e?.type_info?.number_field?.decimal,l=e?.type_info?.number_field?.decimal_point,p=s?2===l?"0.01":"0.1":"1",u=a[e.name],[d,b]=n.useState(u);n.useEffect((()=>{d&&!u&&b(u)}),[u]);const M=e=>{s&&!L(l)&&(e.split(".")?.[1]?.length??0)>(l??0)||i(C(e,s||!1),!1)},m=n.useMemo((()=>{const e=["+","-","e","E"];return s||e.push("."),e}),[s]),z=(e=>{let t=1;for(let n=0;n<e;n++)t*=10;return t-1})(18);return n.createElement("div",{className:"responsive-input-field"},n.createElement(fu,{autoFocusDelay:t,isRequired:!!e.required,type:"number",step:p,placeholder:e?.type_info?.meta?.placeholder??s?"0.0"+(2===l?"0":""):"0",onKeyDown:e=>{m.includes(e.key)&&e.preventDefault()},..."card"===r?{value:u??"",onChange:e=>{const t=Number(e.target.value);!isNaN(t)&&t<=z&&e.target.value.length<=18&&M(e.target.value)}}:{value:d??"",onChange:e=>{const t=Number(e.target.value);!isNaN(t)&&t<=z&&e.target.value.length<=18&&b(`${t}`)},onBlur:()=>{return e=d,void((L(u)||k(u))&&(L(d)||k(d))||d===u||M(e));var e}},setFocus:o,showCount:!0,max:z,maxLength:18,isQuestionBgDark:c}))};Fs(".question-comments .input-container {\n margin-top: 10px;\n max-height: 100px !important;\n}\n.question-comments .input-container .input-basic {\n gap: 2px;\n}\n\n.question-comments .input-container textarea {\n min-height: 56px !important;\n}");const b4=({question:e,questionCommentOnchangeHandler:t,commentsMeta:o,setFocus:a,isQuestionBgDark:r,isCommentsEnabled:i})=>{const[c,s]=n.useState(o?.toString());return i?n.createElement(_s,null,n.createElement(Es.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},transition:{duration:.3,ease:"easeInOut"},exit:{height:0,opacity:0},className:"question-comments"},n.createElement(TB,{showCount:!0,maxLength:1500,rows:2,isRequired:!!e.required,placeholder:e?.type_info?.question_placeholder??"Give additional feedback",onChange:n=>{const o=n.target.value||"";s(o),t?.(e.name,o)},value:o||c,setFocus:!0,isQuestionBgDark:r}))):null},M4=e=>{switch(e){case"EMAIL":return"email";case"PHONE":return"tel";case"URL":return"url";default:return"text"}},m4=e=>{switch(e){case"PHONE":return"phone";case"EMAIL":return"email";case"URL":return"url";default:return""}},z4=({question:e,autoFocusDelay:t,formValues:o,onChangeHandler:a,textboxErrors:r,surveyLayout:i,setFocus:c,onKeyDownHandler:s,translationVariables:l,isQuestionBgDark:p})=>{const u=e?.type_info?.text_field?.text_type,d=o[e.name],[b,M]=n.useState(d);return n.useEffect((()=>{b&&!d&&M(d)}),[d]),n.createElement("div",{className:"responsive-input-field"},"PHONE"===u?n.createElement(yu,{startAdornment:n.createElement(Xs,{name:m4(u)}),type:M4(u),setFocus:c,autoFocusDelay:t,label:"",isRequired:!!e.required,value:d,isErrored:!!r[e.name],errorText:r[e.name]||"",placeholder:e?.type_info?.meta?.placeholder??"",onChangeHandler:a,maxLength:18,showCount:!0,onKeyDownHandler:s,surveyLayout:i,translationVariables:l}):n.createElement(fu,{startAdornment:u&&"TEXT"!==u&&n.createElement(Xs,{name:m4(u)}),type:M4(u),setFocus:c,autoFocusDelay:t,showCount:!0,label:"",onKeyDown:s,isRequired:!!e.required,isErrored:!!r[e.name],errorText:r[e.name]||"",placeholder:e?.type_info?.meta?.placeholder??"",..."card"===i?{value:d??"",onChange:e=>a(e.target.value)}:{onBlur:e=>{(L(d)||k(d))&&(L(b)||k(b))||b===d||a?.(e.target.value,!0)},value:b??"",onChange:e=>M(e.target.value)},maxLength:50,isQuestionBgDark:p}))},h4=({surveyLanguage:e,language:t="en",question:o,formValues:a,othersMeta:r,onChangeHandler:i,saveOthersValue:c,autoFocusDelay:s,isFinalQn:l,isWidget:p,isMobile:u,initialPivotAnswer:d,initialQuestionAnswer:b,isInitialTransition:M,formQuestionErrors:m,dateQuestionErrors:z,contactFormErrors:h,activeIndexOfRenderedStatement:f={},textboxQuestionErrors:O,isReverseAnimation:v,fileUploadErrors:A,preview:g,onFileUpload:y,widgetStyle:q="default",setErrors:w,translationVariables:W,surveyServAssetUrl:x,setFocus:R,block:C,onKeyDown:S,surveyStyle:E,isQuestionBgDark:T})=>{const N=o?.type_info?.is_question_comment,B=o?.type_info?.footer_text&&o.type_info.meta?.question_hint?n.createElement("div",{className:"footer",role:"note",dangerouslySetInnerHTML:{__html:o?.type_info?.footer_text}}):n.createElement(n.Fragment,null),$=a[o.name],[_,H]=n.useState($);switch(n.useEffect((()=>{_&&!$&&H($)}),[$]),o?.type_info?.question_type){case"MATRIX_RATING_SCALE":return n.createElement(n.Fragment,null,p||u?n.createElement(u4,{language:t,name:o.name,isReverseAnimation:v,type_info:o?.type_info||{},onChangeHandler:e=>{i(e?.filter((e=>(e.rating_labels||[]).length>0)))},isMobile:u,value:a[o.name]||[],statementIndex:f[o.name]??0,widgetStyle:q}):n.createElement(p4,{type_info:o?.type_info||{},onChangeHandler:e=>{i(e?.filter((e=>(e.rating_labels||[]).length>0)))},value:a[o.name]||[]}),B);case"RANGE":return n.createElement(n.Fragment,null,n.createElement(tE,{question:o,onChangeHandler:i,isWidget:p,isMobile:u,widgetStyle:q,value:a[o.name],initialPivotAnswer:d,isInitialTransition:M}),N&&null!=a[o.name]&&n.createElement(b4,{question:o,questionCommentOnchangeHandler:c,commentsMeta:r?.[o?.name],surveyStyle:E,setFocus:R,isQuestionBgDark:T,isCommentsEnabled:N}),B);case"CHECKBOX":case"MULTI_SELECT":return n.createElement(n.Fragment,null,n.createElement(HB,{name:o.name,values:a[o.name],othersValue:r[o.name],options:o?.choices||[],onChangeHandler:i,saveOthersValue:c,isOthersOption:!!(o?.choices||[]).find((e=>e.meta?.is_others)),othersRequired:!!o?.type_info.meta?.othersRequired,autoFocusDelay:s,translationVariables:W}),N&&null!=a[o.name]&&n.createElement(b4,{question:o,questionCommentOnchangeHandler:c,commentsMeta:r?.[o?.name],surveyStyle:E,setFocus:R,isQuestionBgDark:T,isCommentsEnabled:N}),B);case"RADIO":case"DROPDOWN":return n.createElement(n.Fragment,null,n.createElement(JS,{autoFocusDelay:s,name:o.name,onChangeHandler:i,initialQuestionAnswer:b,displayFormat:o?.type_info?.meta?.display_format||"LIST",saveOthersValue:c,options:o?.choices||[],value:a[o.name],othersValue:r[o.name],isOthersOption:!!(o?.choices||[]).find((e=>e.meta?.is_others)),language:t||"en",othersRequired:!!o?.type_info.meta?.othersRequired,isFinalQn:l,translationVariables:W,isQuestionBgDark:T}),N&&null!=a[o.name]&&n.createElement(b4,{question:o,questionCommentOnchangeHandler:c,commentsMeta:r?.[o?.name],surveyStyle:E,setFocus:R,isQuestionBgDark:T,isCommentsEnabled:N}),B);case"TEXT":return n.createElement(n.Fragment,null,n.createElement(z4,{question:o,autoFocusDelay:s,formValues:a,onChangeHandler:i,textboxErrors:O||"",setFocus:R,onKeyDownHandler:S,surveyLayout:E??"card",translationVariables:W,isQuestionBgDark:T}),B);case"NUMBER":return n.createElement(n.Fragment,null,n.createElement(d4,{question:o,autoFocusDelay:s,formValues:a,setFocus:R,onChangeHandler:i,surveyLayout:E??"card",isQuestionBgDark:T}),B);case"FORM_FIELD":return n.createElement(n.Fragment,null,n.createElement(q5,{question:o,surveyStyle:E,isRequired:!!o.required,autoFocusDelay:s,translationVariables:W,onChangeHandler:(e,t)=>{i(e,"card"!==E&&t)},formValues:a,fieldErrors:m?.[o.name]||{},language:t||"en",isQuestionBgDark:T}),B);case"CONTACT_FORM":return n.createElement(n.Fragment,null,n.createElement(DB,{question:o,setFocus:R,autoFocusDelay:s,onChangeHandler:i,translationVariables:W,formValues:a,fieldErrors:h?.[o.name]||{},language:t||"en",isQuestionBgDark:T}),B);case"PARAGRAPH":return n.createElement(n.Fragment,null,n.createElement(TB,{showCount:!0,maxLength:1500,autoFocusDelay:s,isRequired:!!o.required,placeholder:o?.type_info?.meta?.placeholder??"",..."card"===E?{value:$??"",onChange:e=>i(e.target.value)}:{onBlur:e=>{(L($)||k($))&&(L(_)||k(_))||_===$||i?.(e.target.value,!0)},value:_??"",onChange:e=>H(e.target.value)},setFocus:R,isQuestionBgDark:T}),B);case"BOOLEAN":return n.createElement(n.Fragment,null,n.createElement(Gs,{type_info:o?.type_info,onSelect:i,value:a[o.name]}),N&&null!=a[o.name]&&n.createElement(b4,{question:o,questionCommentOnchangeHandler:c,commentsMeta:r?.[o?.name],surveyStyle:E,setFocus:R,isQuestionBgDark:T,isCommentsEnabled:N}),B);case"MESSAGE":return B;case"CONSENT":return n.createElement(n.Fragment,null,n.createElement(IB,{question:o,onChange:i,value:a[o.name]}),B);case"SLIDER":const e=o?.type_info.meta?.slider;return n.createElement(n.Fragment,null,n.createElement(EB,{defaultValue:[a[o.name]??e?.opening_position],dir:P(t)?"rtl":"ltr",answer:a[o.name],min:e?.min,max:e?.max,onValueChange:([e],t)=>i(e,"card"!==E&&t),isInput:e?.numerical_input_box,gridLines:e?.grid_lines,stopAtGrid:e?.stop_at_grid_lines,allowDecimals:e?.allow_decimal,decimalPoints:e?.decimal_points,isMobile:u||"compact"===q}),N&&null!=a[o.name]&&n.createElement(b4,{question:o,questionCommentOnchangeHandler:c,commentsMeta:r?.[o?.name],surveyStyle:E,setFocus:R,isQuestionBgDark:T,isCommentsEnabled:N}),B);case"RANK_ORDER":const{others_meta:A,...C}=a;return n.createElement(n.Fragment,null,n.createElement($N,{valueItems:C[o.name],items:o?.choices||[],onReorder:(e,t)=>i(e,"card"!==E&&t)}),B);case"DATE_TIME":return n.createElement(n.Fragment,null,"DATE_TIME"===o.type_info.meta?.question_format?n.createElement(ZS,{id:o.id??"",name:o.name??"",type:"QUESTION",displayFormat:o.type_info.meta?.format??void 0,allowOnlyFuture:o.type_info.meta?.allow_future_date||!1,useAmPm:!o.type_info.meta?.time_format,showTimezoneSelect:!!o.type_info.meta?.time_zone,onChange:e=>{i(e,!1)},fieldErrors:z?.[o.name]??[],value:a[o.name]||"",translationVariables:W,language:t||"en"}):n.createElement(YS,{allowOnlyFuture:o.type_info.meta?.allow_future_date||!1,type:"QUESTION",displayFormat:o.type_info.meta?.format??void 0,onChange:e=>{i(e,!1)},value:a[o.name]||"",translationVariables:W,language:t||"en",fieldErrors:z?.[o.name]??[]}),B);case"FILE":return n.createElement(g5,{setErrors:e=>{w({formQuestionErrors:m,textboxQuestionErrors:O,contactFormErrors:h,fileUploadErrors:e,dateQuestionErrors:z})},preview:g,onChangeHandler:i,question:o,onFileUpload:y,value:a[o.name]||"",translationVariables:W,surveyServAssetUrl:x});default:return console.error(`Question type ${o?.type_info?.question_type} not found`),null}};Fs(".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 padding: 1rem;\n align-items: center;\n}\n.freemium-survey-components.card-survey-style .question-holder .question-container .footer {\n margin-top: 24px !important;\n text-align: center;\n}\n.freemium-survey-components.card-survey-style .question-holder .question-container .footer p {\n word-break: break-word;\n}\n.freemium-survey-components.card-survey-style .questions {\n display: flex;\n flex-direction: column;\n width: var(--fsc-question-width);\n max-width: 100%;\n overflow: hidden;\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 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-container .footer-alignment {\n width: 75%;\n font-size: 1.1429em;\n text-align: center;\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.freemium-survey-components.card-survey-style .questions .question-consent-buttons button.message-button {\n word-break: break-all;\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 .question-holder.prompt .questions {\n flex: unset;\n }\n .freemium-survey-components.card-survey-style .questions {\n width: 100%;\n display: flex;\n flex-direction: column;\n padding: 16px;\n }\n .freemium-survey-components.card-survey-style .questions .question-consent-buttons button.consent-button {\n width: 90%;\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 .question-holder.prompt .questions {\n flex: unset;\n}\n.freemium-survey-components.mobile-preview.card-survey-style .questions {\n width: 100%;\n display: flex;\n flex-direction: column;\n padding: 16px;\n}\n.freemium-survey-components.mobile-preview.card-survey-style .questions .question-consent-buttons button.consent-button {\n width: 90%;\n}");const f4=({surveyServAssetUrl:e,thankYouQuestion:o,preview:a,placeholders:r,canResubmit:i,resetSurvey:c,navigateToStart:s,isMobile:l,allowMultipleSubmission:p,pivot:u,rangeToRender:d,translationVariables:b})=>{const{redirectUrl:M,redirectDelay:m,show_custom_button:z,show_review_links:h,show_social_links:f,image_url:O}=o?.type_info?.meta??{},[v,A]=t.useState(m??10),[g,y]=n.useState(!1);return t.useEffect((()=>{if(!a&&M){const e=setInterval((()=>A((e=>e>1?e-1:("undefined"!=typeof window&&(window.location.href=M??""),0)))),1e3);return()=>{clearInterval(e),y(!1)}}return()=>{y(!1)}}),[]),n.createElement("div",{className:"question-container thankyou"},O&&n.createElement("img",{className:"thankyou-logo-img",src:O,alt:"thankyou_logo"}),n.createElement(n.Fragment,null,T(o)),n.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:B({questionText:o.text,placeholders:r,npsRating:u?.answer,ratingLabel:L(u?.answer)?"":d?.find((e=>e?.value===String(u?.answer)))?.text??"",preference:u?.question.type_info?.scale_properties?.labels?.preference,isPreview:a})}}),(i||p)&&n.createElement("div",{className:("wrap-up-actions "+(l?"mobile":"")).trim()},i&&n.createElement("button",{className:"action-button",tabIndex:0,disabled:g,onClick:()=>{y(!0),s()}},n.createElement(Xs,{name:"edit"}),b?.edit_response||"Edit your response"),p&&n.createElement("button",{className:"action-button",tabIndex:0,disabled:g,onClick:()=>{y(!0),c()}},n.createElement(Xs,{name:"reload"}),b?.another_response||"Submit another response")),M&&n.createElement("div",{className:"redirection-container"},n.createElement("div",{className:"redirection-text"},H(v,b?.redirect_msg),n.createElement("br",null)),n.createElement("a",{className:"link",href:M},M)),(z||h||f)&&n.createElement(_B,{show_custom_button:z,show_review_links:h,show_social_links:f,surveyServAssetUrl:e}))},O4=({activeIndexOfRenderedStatement:e,navigateToPreviousBlock:t,canDisplayDisableButtonParams:o,navigateToNextBlock:a,translationVariables:r,setAnimationInProgress:i,animationInProgress:c,question:s})=>n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:c||ge("navigation-prev",o),className:"navigation-button",onClick:()=>{i(!0),setTimeout((()=>{i(!1)}),h),t()},title:s.name&&(e?.[s.name]??0)>0?r?.prev_statement||"go to previous statement":r?.prev_question||"go to previous question"},n.createElement(Xs,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:c||ge("navigation-next",o),title:r?.next_question||"Go to next question",onClick:()=>{i(!0),setTimeout((()=>{i(!1)}),h),a()}},n.createElement(Xs,{name:"arrow-next"}))),v4=e=>{const{initialStatementHasAnswer:o,answers:a,renderedBlocks:r,blocks:i,activeIndexOfBlocks:c,activeIndexOfRenderedStatement:s={},activeIndexOfRenderedBlocks:l,saveFormValues:p,onSubmitHandler:u,skipBlock:d,skipStatement:b,survey:M,navigateToNextBlock:m,navigateToPreviousBlock:z,isInitialTransition:f,initialPivotAnswer:O,translationVariables:v,navigateToNextStatement:A,canDisplayDisableButtonParams:g,formQuestionErrors:y,dateQuestionErrors:q,textboxQuestionErrors:w,contactFormErrors:x,questions:R,pages:C,buttonRef:P,isReverseAnimation:T,isSubmitting:N}=e,[B,$]=t.useState(!1),{question:_}=r[l],H={...g,isSubmitting:N},I=_?.type_info?.meta?.display_format,D=ie({blocks:i,activeIndexOfBlocks:c,renderedBlocks:r,activeIndexOfRenderedBlocks:l,questions:R});return n.createElement(n.Fragment,null,(he("message",H)||he("consent",H))&&n.createElement(_s,{exitBeforeEnter:!0},n.createElement(Es.div,{key:_.name??"",id:`consent-buttons-${_.name??""}`,className:"question-consent-buttons",initial:{opacity:0,x:S(e.language,T)},animate:{opacity:1,x:0},exit:{opacity:0,x:E(e.language,T)},transition:{duration:.2}},he("consent",H)&&"BUTTON"===I&&W.map((e=>n.createElement(Zs,{key:l+String(e.recordAs),onClick:()=>{$(!0),setTimeout((()=>{$(!1)}),h),p(r[l],e.recordAs,!0)},disabled:B||ge("consent",H),variant:L(a.formValues?.[_.name])||a.formValues?.[_.name]===e.recordAs?"primary":"secondary",className:("consent-button "+(a.formValues?.[_.name]===e.recordAs?"selected":"")).trim()},_?.type_info?.scale_properties?.labels?.values?.[e.id]||e.defaultValue))),he("message",H)&&n.createElement(Zs,{onClick:()=>{$(!0),setTimeout((()=>{$(!1)}),h),D?u("COMPLETE"):d()},disabled:B||ge("message",H),className:"message-button"},_?.type_info?.scale_properties?.labels?.values?.[0]||"Begin"))),(he("navigation",H)||he("next",H)||he("next-statement",H)||he("submit",H)||he("skip",H)||he("skip-statement",H))&&n.createElement("div",{className:"question-footer"},he("navigation",H)?n.createElement(O4,{animationInProgress:B,setAnimationInProgress:$,answers:a,canDisplayDisableButtonParams:H,activeIndexOfBlocks:c,activeIndexOfRenderedBlocks:l,renderedBlocks:r,initialStatementHasAnswer:o,blocks:i,activeIndexOfRenderedStatement:s,navigateToNextBlock:m,navigateToPreviousBlock:z,translationVariables:v,pages:C,question:_}):n.createElement("div",null),n.createElement("div",{className:"action-buttons"},he("skip",H)&&n.createElement(Zs,{className:"skip-button",onClick:()=>{$(!0),setTimeout((()=>{$(!1)}),h),d()},variant:"secondary","aria-label":"skip question",disabled:B||N},e?.survey?.meta?.action_button?.skip||v?.actionButtonText?.skip||v?.skip||"Skip"),he("skip-statement",H)&&n.createElement(Zs,{className:"skip-button",onClick:()=>{$(!0),setTimeout((()=>{$(!1)}),h),b()},"aria-label":"skip statement",variant:"secondary",disabled:B||N},e?.survey?.meta?.action_button?.skip||v?.actionButtonText?.skip||v?.skip||"Skip"),he("next",H)&&n.createElement(Zs,{ref:P,onClick:()=>{$(!0),setTimeout((()=>{$(!1)}),h),0!==l||!f||"RANGE"!==_.type_info?.question_type&&"BOOLEAN"!==_.type_info?.question_type||_.type_info?.is_question_comment||void 0===O?p(r[l],"CHECKBOX"===_?.type_info?.meta?.display_format&&"CONSENT"===_?.type_info?.question_type?a.formValues[_.name]??!1:a.formValues[_.name],!0):p(r[l],O,!0)},disabled:B||ge("next",H),className:"next-button"},e?.survey?.meta?.action_button?.next||v?.actionButtonText?.next||v?.next||"Next"),he("next-statement",H)&&n.createElement(Zs,{ref:P,onClick:()=>{$(!0),setTimeout((()=>{$(!1)}),h),A?.(_.name)},disabled:B||!!ge("next-statement",H),className:"next-button"},e?.survey?.meta?.action_button?.next||v?.actionButtonText?.next||v?.next||"Next"),he("submit",H)&&n.createElement("div",{className:"submit"},n.createElement(Zs,{ref:P,disabled:B||ge("submit",H),onClick:()=>{k(q?.[_.name])&&k(y?.[_.name])&&k(w?.[_.name])&&k(x?.[_.name])&&($(!0),setTimeout((()=>{$(!1)}),h),u("COMPLETE"))}},M?.meta?.action_button?.submit||v?.actionButtonText?.submit||v?.submit_survey||"Submit")))))},A4=e=>{const{blocks:o,pages:a,activePage:r,renderedBlocks:i,activeBlock:c,activeIndexOfBlocks:s,activeIndexOfRenderedBlocks:l,isSurveyCompleted:p,isReverseAnimation:u,saveFormValues:d,saveOthersValue:b,skipBlock:M,skipStatement:m,onSubmitHandler:z,navigateToNextBlock:h,navigateToPreviousBlock:f,answers:O,questions:v,pivot:A,isInitialTransition:g,resetSurvey:y,activeIndexOfRenderedStatement:q,navigateToNextStatement:w,navigateToPreviousStatement:W,navigateToStart:x,translationVariables:R,initialStatementHasAnswer:C,dateQuestionErrors:T,formQuestionErrors:H,textboxQuestionErrors:I,contactFormErrors:D,fileUploadErrors:X,setErrors:V,expanded:F,setExpanded:U,isQuestionBgDark:G,isSubmitting:Y}=Ne(e);j("Card",{...e,answers:O,activePage:r,activeBlock:c,renderedBlocks:i,activeIndexOfBlocks:s,activeIndexOfRenderedBlocks:l,activeIndexOfRenderedStatement:q});const Z=t.useRef(null),K=k(O.formValues)&&e.survey.prompt_settings?.is_enabled&&e.preview,[J,Q]=t.useState(K),ee=n.useMemo((()=>N(A?.question)),[A?.question]),te=t.useMemo((()=>o.filter((({name:e},t,n)=>!le({nextBlockName:e||"",blocks:n,questions:v}))).length),[o,v]);t.useEffect((()=>{c&&e.onBlockChange?.(c,r)}),[c,e]),t.useEffect((()=>{e.survey.theme&&_(e.survey.theme)}),[e.survey.theme]),t.useEffect((()=>{e.getSurveyProgress?.({totalBlocks:te,isSurveyCompleted:p,noOfAnswers:s})}),[te,p,s]);const ne={answers:O,blocks:o,blockIndex:l,activeIndexOfBlocks:s,initialStatementHasAnswer:C,activeIndexOfRenderedBlocks:l,activeIndexOfRenderedStatement:q,renderedBlocks:i,isMobile:!!e.isMobile,surveyStyle:e.surveyStyle,isWidget:!!e.isWidget,initialPivotAnswer:e.initialPivotAnswer,isInitialTransition:g,questions:v,pages:a,activeIndexOfSet:0,branchSeparatePage:!1};return c&&c.question?n.createElement("div",{className:`freemium-survey-components card-survey-style ${P(e.language||"en")?"freemium-survey-rtl":"freemium-survey-ltr"} ${e.isMobile?"mobile-preview":""}`.trim(),id:"freemium-survey",style:{...$(e.survey.theme||{})}},n.createElement("div",{className:("question-holder "+(J?"prompt":"")).trim()},!p&&!J&&!e.isWidget&&a.length>0&&r?.page_id&&n.createElement(NB,{expanded:F,id:r.page_id,setExpanded:U,activePage:r,translationVariables:R}),n.createElement("div",{className:"questions"},p?n.createElement(f4,{surveyServAssetUrl:e.surveyServAssetUrl??"",thankYouQuestion:ce({pivotQn:A?.question,pivotQnAnswer:A?.answer,block:pe({activeBlock:c,blocks:e.survey.blocks?.filter((e=>!e.is_deleted)),answers:O,questions:v,activeIndexOfBlocks:s,renderedBlocks:i,contactData:e.contactData,surveyLayout:"card",pages:a}),questions:v}),canResubmit:e.canResubmit,allowMultipleSubmission:e.allowMultipleSubmission,navigateToStart:()=>{e.handleAction?e.handleAction("EDIT_RESPONSE",x):x()},resetSurvey:()=>{e.handleAction?e.handleAction("RE_SUBMIT",y):y()},preview:!!e.preview,placeholders:e.placeholders,isMobile:e.isMobile,pivot:A,rangeToRender:ee,translationVariables:R}):n.createElement(n.Fragment,null,!J&&e.isWidget&&a.length>0&&r?.page_id&&n.createElement(NB,{expanded:F,id:r.page_id,setExpanded:U,activePage:r,translationVariables:R}),n.createElement(_s,{exitBeforeEnter:!0},n.createElement(Es.div,{id:`${c.question.name}`,className:"question-container","data-test-question-name":c.question.name,key:`${c.question.name}`,initial:{opacity:0,x:S(e.language,u)},animate:{opacity:1,x:0},exit:{opacity:0,x:E(e.language,u)},transition:{duration:.2}},J&&e.survey.prompt_settings?n.createElement(BB,{config:e.survey.prompt_settings,onSelect:t=>{e.onAnsweringPrompt?.(t),1===t&&Q(!1)},placeholders:e.placeholders,isPreview:!!e.preview}):n.createElement(n.Fragment,null,n.createElement("div",{className:("question-text "+(c.required?"required":"")).trim(),dangerouslySetInnerHTML:{__html:B({questionText:c?.question.text,placeholders:e.placeholders,npsRating:A?.answer,ratingLabel:L(A?.answer)?"":ee?.find((e=>e?.value===String(A?.answer)))?.text??"",preference:A?.question.type_info?.scale_properties?.labels?.preference,isPreview:!!e.preview})},"aria-label":`question-${l}`,role:"heading","aria-level":1}),n.createElement(h4,{setFocus:!0,onKeyDown:e=>{"Enter"===e.key&&Z.current&&Z.current.click()},isReverseAnimation:u,preview:!!e.preview,surveyServAssetUrl:e.surveyServAssetUrl,setErrors:V,onFileUpload:e.onFileUpload,language:e.language||"en",surveyStyle:e.surveyStyle,surveyLanguage:e.survey.language,block:c,question:c.question,isFinalQn:ie({blocks:o,activeIndexOfBlocks:s,renderedBlocks:i,activeIndexOfRenderedBlocks:l,questions:v}),formValues:O.formValues,othersMeta:O.others,autoFocusDelay:"standard"===e.surveyStyle?350:0,activeIndexOfRenderedStatement:q,saveOthersValue:b,onChangeHandler:(e,t)=>{d(c,e,t)},isMobile:!!e.isMobile,initialPivotAnswer:e.initialPivotAnswer,initialQuestionAnswer:e.initialQuestionAnswer,isInitialTransition:g,formQuestionErrors:H,dateQuestionErrors:T,textboxQuestionErrors:I,fileUploadErrors:X,contactFormErrors:D,translationVariables:R,isQuestionBgDark:G})))),!J&&n.createElement(v4,{isWidget:!1,language:e.language||"en",isReverseAnimation:u,surveyStyle:e.surveyStyle,canDisplayDisableButtonParams:ne,answers:O,renderedBlocks:i,blocks:o,pages:a,activeIndexOfRenderedStatement:q,buttonRef:Z,survey:e.survey,initialStatementHasAnswer:C,navigateToNextStatement:w,navigateToPreviousStatement:W,activeIndexOfRenderedBlocks:l,activeIndexOfBlocks:s,saveFormValues:d,skipBlock:M,skipStatement:m,onSubmitHandler:z,navigateToPreviousBlock:f,navigateToNextBlock:h,isInitialTransition:g,initialPivotAnswer:e.initialPivotAnswer,isMobile:!!e.isMobile,translationVariables:R,formQuestionErrors:H,dateQuestionErrors:T,textboxQuestionErrors:I,fileUploadErrors:X,contactFormErrors:D,questions:v,isSubmitting:Y})))),n.createElement(gu,{...e.footerProps,surveyStyle:e.surveyStyle,bgColor:e.survey.theme?.palette?.survey_background??$B})):null},g4=e=>{const o=!!e.survey.meta?.branch_separate_page,a=e.survey.question_details?.questions||[],r=e.contactData||{},i=e.translationVariables||{},c=t.useRef({}),[s,l]=t.useState(e.survey?.blocks?.filter((e=>"TY"!==e.name&&!e.is_deleted))),[p,u]=t.useState({formQuestionErrors:{},textboxQuestionErrors:{},fileUploadErrors:{},contactFormErrors:{},dateQuestionErrors:{}}),[d,b]=t.useState(!1),[M,m]=t.useState(0),[z,h]=t.useState(e.survey.pages??[]),[O,v]=t.useState(z?.[0]),[A,g]=t.useState(!1),y=t.useMemo((()=>xe({pages:z,blocks:s,questions:a,initialPivotAnswer:e.initialPivotAnswer,responses:e.answers,answerStatus:e.answerStatus||"PARTIAL",branchSeparatePage:o})),[s,a,e.answers]),[q,w]=t.useState(y.renderedBlocks),[W,x]=t.useState(y.activeIndexOfRenderedBlocks),[R,C]=t.useState(0),[P,S]=t.useState(y.activeIndexOfRenderedStatement),E=t.useRef(y.pivot),T=t.useRef(y.isInitialTransition),[N,B]=t.useState(""),[$,_]=t.useState(y.answers),H=t.useRef(((y.isConsideredCompleted||"PARTIAL"===e.answerStatus)&&e.canResubmit)??!1),[I,D]=t.useState(!1),X=q[W],V=n.useMemo((()=>q.length>0?s?.findIndex((e=>e.name===q[W]?.name)):0),[W]),G=t.useMemo((()=>{const t=e.survey.theme?.palette?.question_background;return!!t&&F(t)}),[e.survey.theme?.palette?.question_background]);t.useEffect((()=>{e.survey.updated_at!==N&&(j("useEffect",{updated_at:e.survey.updated_at,props:e}),h(e.survey.pages??[]),l(e.survey.blocks?.filter((e=>"TY"!==e.name&&!e.is_deleted))),v(e.survey.pages?.[0]),B(e.survey.updated_at??""))}),[e.survey.updated_at]),t.useEffect((()=>{j("useEffect",{renderedBlocks:q,pages:z,activeIndexOfRenderedBlocks:W,props:e});const t=q?.[W]?.page_id,n=z.find((e=>e.page_id===t));z.length>0&&t&&n?.page_id&&v(n),void 0!==q?.[W]?.orderOfSet&&o&&C(q?.[W]?.orderOfSet)}),[q,z,W]),t.useEffect((()=>{j("useEffect",{blocks:s,initialPivotAnswer:e.initialPivotAnswer,props:e});let t={...$};if(y.isConsideredCompleted&&T.current&&e.canResubmit)return;const{others_meta:n,...i}=e.answers||{};E.current={...E.current,question:ae({questions:a,blocks:s})};const l=a.find((e=>e.name===s?.[0]?.question_name||e.name===s?.[0]?.question_names?.[0]))??E.current.question;if(k(i)||void 0===e.initialPivotAnswer||i[l.name]===e.initialPivotAnswer||(t={...$,formValues:{...$.formValues,[l.name]:e.initialPivotAnswer},moveToNextPage:!0}),void 0!==e.initialPivotAnswer){const n=re(E.current.question,e.initialPivotAnswer);E.current={...E.current,answer:"BOOLEAN"===l?.type_info?.question_type?Boolean(n):n},t={...$,formValues:{...$.formValues,[l.name]:E.current.answer},moveToNextPage:!1}}else void 0!==e.initialQuestionAnswer&&(t={...$,formValues:{...$.formValues,[l.name]:e.initialQuestionAnswer},moveToNextPage:!1});_(t);const p=ce({pivotQn:E.current.question,pivotQnAnswer:E.current.answer,block:s[0],questions:a}),u=we({activeBlock:{...s[0],question:p},blocks:s,questions:a,answers:t,pages:z,pivot:{question:E.current.question,answer:E.current.answer},renderedBlocks:q,contactData:r,surveyLayout:"standard",initialTransition:!0,isEditResponse:H.current,branchSeparatePage:o}),d=[{...s[0],question:p},...u];if(w(o?U(d,c):d),(e=>{if(null==e||0===Object.keys(e).length)return!0;const t=Object.keys(e).filter((e=>""!==e&&!L(e)&&"others_meta"!==e));return t.every((t=>!e[t]))&&(!e.others_meta||0===Object.keys(e.others_meta).length)})({others_meta:{},...t.formValues})||T.current)x(s.findIndex((e=>d[0].name===e.name))),C(0);else{const e=d?.[d.length-1];x(d.findIndex((t=>t.name===e?.name))),o&&C(e?.orderOfSet!==R?e?.orderOfSet:0)}S({})}),[s,e.initialPivotAnswer,M]);t.useEffect((()=>{if(j("useEffect",{answers:$,blocks:s,props:e}),!(y.isConsideredCompleted&&T.current&&e.canResubmit)&&(!k($.formValues)||$.moveToNextPage)&&s&&Y(X,$.commitDirtyValue))if(ze({blocks:s,activeIndexOfBlocks:V,renderedBlocks:q,activeIndexOfRenderedBlocks:W,answers:$,questions:a,activePage:O,pages:z,surveyLayout:"standard"})){if(void 0!==e.initialPivotAnswer&&1===q.length&&T.current&&!$.commitDirtyValue);else if($.commitDirtyValue){const t=be({renderedBlocks:q,activeBlock:X,blocks:s,activeIndexOfBlocks:V,answers:$,questions:a,contactData:r,pages:z,surveyLayout:"standard"});if(t!==1/0)T.current||!X.question.type_info?.question_type||X.question.type_info?.is_question_comment||["FORM_FIELD","MULTI_SELECT","RANK_ORDER"].includes(X.question.type_info?.question_type)?Z():(e=>{e!==1/0&&setTimeout((()=>{const t=ce({pivotQn:E.current?.question,pivotQnAnswer:E.current?.answer,block:s?.[e],questions:a});if(t?.name){const e=document.querySelector(`.question-container.standard-card-${t.name}`),n=document.querySelector(`.question-container.standard-card-${t.name} input`),o=document.querySelector(`.question-container.standard-card-${t.name} textarea`);e?.scrollIntoView({behavior:"smooth",block:"center",inline:"start"}),setTimeout((()=>{n?.focus(),o?.focus()}),f)}Z()}),0)})(t),($.moveToNextPage||!o||void 0!==e.initialPivotAnswer&&e.initialPivotAnswer!==$?.[E.current?.question?.name??""])&&((e,t)=>{if(e===1/0)return;const n=ce({pivotQn:E.current?.question,pivotQnAnswer:E.current?.answer,block:s?.[e],questions:a}),i=qe({renderedBlocks:q,activeIndexOfRenderedBlocks:W}),l=s?.[e],p=we({activeBlock:{...l,question:n},answers:$,blocks:s,pivot:E.current,questions:a,pages:z,renderedBlocks:q,contactData:r,surveyLayout:"standard",isEditResponse:H.current,branchSeparatePage:o}),u=[...i,...n?.name?[{...l,question:n}]:[],...p];S((e=>{const t={...e};return u.forEach((e=>{"MATRIX_RATING_SCALE"===e.question.type_info?.question_type&&(t[e.question.name]=0)})),t}));const d=o?U(u,c):u;w(d),t||x(i.length)})(t,!$.moveToNextPage&&!o);else{he("submit",{answers:$,blocks:s,blockIndex:0,activeIndexOfBlocks:V,initialStatementHasAnswer:J,activeIndexOfRenderedBlocks:W,activeIndexOfRenderedStatement:P,renderedBlocks:q,activePage:O,isMobile:!!e.isMobile,surveyStyle:e.surveyStyle,isWidget:!!e.isWidget,initialPivotAnswer:e.initialPivotAnswer,isInitialTransition:T.current,questions:a,pages:z,contactData:e.contactData,activeIndexOfSet:R,branchSeparatePage:o,isSubmitting:A})||Z("COMPLETE")}}}else("MATRIX_RATING_SCALE"===X?.question?.type_info?.question_type||$.commitDirtyValue)&&Z()}),[$,s]);const Y=(e,t)=>{if(e?.question_name)switch(e.question?.type_info?.question_type){case"DATE_TIME":return!t||Ce({answer:$.formValues?.[e.question_name]||"",errorSetter:u,questionName:e.question_name,errors:p,translationVariables:i});case"FORM_FIELD":return Le({fields:e.question?.type_info?.form_fields?.fields,answers:$.formValues?.[e.question_name]||{},errorSetter:u,questionName:e.question_name,errors:p,translationVariables:i});case"TEXT":return ke({type:e.question?.type_info?.text_field?.text_type,answer:$.formValues?.[e.question_name]||"",errorSetter:u,questionName:e.question_name,errors:p,translationVariables:i});case"CONTACT_FORM":return Pe({fields:e.question?.type_info?.contact_form?.fields,answers:$.formValues?.[e.question_name]||{},errorSetter:u,questionName:e.question_name,errors:p,translationVariables:i});case"FILE":return Se({errors:p.fileUploadErrors})||!e.required}return!0},Z=(t="PARTIAL")=>{let n=()=>{},o=0;if(q.some(((e,t)=>(o=t,!Y(e,!0)))))return void x(o);let i={...$.formValues};if("COMPLETE"===t){g(!0),n=()=>{g(!1),D(!0),H.current=!1};i=Ee({pages:z,answers:{...$,formValues:i},blocks:s,questions:a,contactData:r,surveyLayout:"standard"})}e.onSubmit({...i,others_meta:$.others},n,t,H.current?"EDIT":"CREATE")},K=e=>{S((t=>({...t,[e]:(L(t[e])?0:t[e])+1})))},J=n.useMemo((()=>{if("MATRIX_RATING_SCALE"!==X?.question?.type_info?.question_type)return!1;const e=X?.question?.type_info?.matrix_properties?.statements||[],t=e?.[P?.[X?.question.name]]??0,n=($.formValues[X?.question.name]||[]).find((e=>e.statement_id===t?.id));return(n?.rating_labels||[]).length>0}),[P,W]);return{blocks:s,pages:z,navigateToNextSet:()=>{const e=q.find((e=>e.orderOfSet===R+1));o&&void 0!==e?.orderOfSet&&C(e?.orderOfSet);const t=z.find((t=>t.page_id===e?.page_id));t?.page_id&&v(t),_((e=>({...e,moveToNextPage:!0})))},navigateToPreviousSet:()=>{const e=q.find((e=>e.orderOfSet===R-1));o&&void 0!==e?.orderOfSet&&C((e=>e-1));const t=z.find((t=>t.page_id===e?.page_id));t?.page_id&&v(t)},activePage:O,questions:a,renderedBlocks:q,initialStatementHasAnswer:J,activeBlock:X,activeIndexOfBlocks:V,activeIndexOfRenderedBlocks:W,activeIndexOfRenderedStatement:P,navigateToNextStatement:K,navigateToPreviousStatement:e=>{S((t=>({...t,[e]:(L(t[e])?0:t[e])-1})))},isInitialTransition:T.current,isSurveyCompleted:I,pivot:E.current,answers:$,translationVariables:i,...p,setErrors:u,saveFormValues:(e,t,n=!1,o=W)=>{if(A)return;T.current=!1,e.question.name===E.current?.question.name&&(E.current={...E.current,answer:"BOOLEAN"===E.current?.question?.type_info?.question_type?Boolean(t):t}),o!==W&&x(o);const a={...$,formValues:{...$.formValues,[e.question.name]:"BOOLEAN"===e.question?.type_info?.question_type?Boolean(t):t},commitDirtyValue:n,moveToNextPage:!1};We((({renderedBlocks:e,activeIndexOfRenderedBlocks:t})=>qe({renderedBlocks:e,activeIndexOfRenderedBlocks:t}).map((({question:e})=>e)))({renderedBlocks:q,activeIndexOfRenderedBlocks:o}),a),H.current&&(e.category??[]).length>0&&(e.category?.forEach((e=>{e.question_name&&(a.formValues[e.question_name]=null)})),a.formValues[e.question.name]=t),_(a);const r=q[o];"SINGLE_ANSWER"===r.question.type_info?.matrix_properties?.type&&(P?.[r.question.name]??0)<(r.question?.type_info?.matrix_properties?.statements||[]).length-1&&setTimeout((()=>{K?.(r.question.name)}),0)},saveOthersValue:(e,t,n=W)=>{if(n!==W&&x(n),null===t){const t={...$.others};delete t[e],_({...$,commitDirtyValue:!1,others:t,moveToNextPage:!1})}else _({...$,commitDirtyValue:!1,others:{...$.others,[e]:t},moveToNextPage:!1})},clearRadioSelection:e=>{x(e);const t=q[e].question;t.type_info?.pivot_question&&(E.current={question:t,answer:void 0}),delete $.formValues[t.name],delete $.others[t.name],"DATE_TIME"===t.type_info?.question_type&&p.dateQuestionErrors?.[t.name]&&u((e=>{const n={...e.dateQuestionErrors};return delete n[t.name],{...e,dateQuestionErrors:n}}));const n=ye({renderedBlocks:q,activeIndexOfRenderedBlocks:e,answers:$}),i={...n,formValues:{...n.formValues},moveToNextPage:!1,commitDirtyValue:!1},l=we({activeBlock:q[e],blocks:s,questions:a,answers:i,pages:z,pivot:E.current?.question?.name?{question:E.current.question,answer:E.current.answer}:null,renderedBlocks:q,contactData:r,surveyLayout:"standard",isEditResponse:H.current,branchSeparatePage:o});S((e=>{const t={...e};return l.forEach((e=>{"MATRIX_RATING_SCALE"===e.question.type_info?.question_type&&(t[e.question.name]=0)})),t}));const d=[...q.slice(0,e+1),...l];w(o?U(d,c):d),_(i)},onSubmitHandler:Z,navigateToStart:()=>{H.current=!0,D(!1),S({}),x(0),o&&("number"==typeof q?.[0].orderOfSet?C(q?.[0].orderOfSet):C(0))},isValidQuestion:Y,resetSurvey:()=>{D(!1),m((e=>e+1)),_({formValues:{},others:{},commitDirtyValue:!1,moveToNextPage:!1}),Te(localStorage)},moveToNextPage:e=>{const t={};e&&z.length>0&&q.forEach((e=>{O?.page_id!==e.page_id||o&&R!==e.orderOfSet||"MESSAGE"===e.question.type_info?.question_type||(t[e.question.name]=null)}));const n=q.filter((e=>O?.page_id===e?.page_id)),a=n[n.length-1],r=q.findIndex((e=>e.name===a?.name));W!==r&&x(r),setTimeout((()=>{_((e=>({...e,formValues:{...e.formValues,...t},commitDirtyValue:!0,moveToNextPage:!0})))}),0)},moveToNextSet:e=>{const t={};e&&q.forEach((e=>{O?.page_id!==e.page_id||o&&R!==e.orderOfSet||(t[e.question.name]=null)}));const n=q.filter((e=>O?.page_id===e?.page_id&&(!o||R===e.orderOfSet))),a=n[n.length-1],r=q.findIndex((e=>e.name===a?.name));x(r),setTimeout((()=>{_((e=>({...e,formValues:{...e.formValues,...t},commitDirtyValue:!0,moveToNextPage:!0})))}),0)},setIsSubmitting:g,isSubmitting:A,expanded:d,setExpanded:b,activeIndexOfSet:R,setActiveRenderedBlockIndex:x,isQuestionBgDark:G}};Fs(':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-standard-max-width: 900px;\n --fsc-question-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\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 li,\n.freemium-survey-components li {\n list-style-position: inside;\n}\n.surveyserv-widget-container *,\n.freemium-survey-components * {\n box-sizing: border-box;\n}\n.surveyserv-widget-container .questions .question-container,\n.freemium-survey-components .questions .question-container {\n position: relative;\n text-align: left;\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.1429em;\n font-weight: 400;\n line-height: 1.6;\n letter-spacing: 0.3px;\n color: var(--question-text-color, var(--default-question-text-color));\n position: relative;\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 p strong,\n.freemium-survey-components .questions .question-container .question-text p strong {\n font-weight: bold;\n}\n.surveyserv-widget-container .questions .question-container .question-text strong,\n.freemium-survey-components .questions .question-container .question-text strong {\n font-weight: bold;\n}\n.surveyserv-widget-container .questions .question-container .question-text .placeholder-tag > span,\n.freemium-survey-components .questions .question-container .question-text .placeholder-tag > span {\n display: none !important;\n}\n.surveyserv-widget-container .questions .question-container .question-text.required:has(p) p:last-child:after,\n.freemium-survey-components .questions .question-container .question-text.required:has(p) p:last-child:after {\n content: "*";\n position: absolute;\n color: #d72d30;\n}\n.surveyserv-widget-container .questions .question-container .question-text.required:not(:has(p))::after,\n.freemium-survey-components .questions .question-container .question-text.required:not(:has(p))::after {\n content: "*";\n position: absolute;\n color: #d72d30;\n}\n.surveyserv-widget-container .questions .question-footer,\n.freemium-survey-components .questions .question-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px;\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 height: 40px;\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 .action-buttons button.fsc-button,\n.freemium-survey-components .action-buttons button.fsc-button {\n height: max-content;\n min-width: 80px;\n word-break: break-word;\n text-align: center;\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: unset !important;\n gap: 24px;\n}\n.surveyserv-widget-container .question-container.thankyou img.thankyou-logo-img,\n.freemium-survey-components .question-container.thankyou img.thankyou-logo-img {\n height: 100px;\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.4286em;\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 word-break: break-word;\n line-height: 1.6;\n color: var(--question-text-color, var(--default-question-text-color));\n width: 75%;\n}\n.surveyserv-widget-container .question-container.thankyou .text a,\n.freemium-survey-components .question-container.thankyou .text a {\n color: #2c5cc5;\n -webkit-text-decoration: none;\n text-decoration: none;\n}\n.surveyserv-widget-container .question-container.thankyou .text a:hover,\n.freemium-survey-components .question-container.thankyou .text a:hover {\n -webkit-text-decoration: underline;\n text-decoration: underline;\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: #2c5cc5;\n font-weight: 500;\n text-decoration: unset;\n}\n.surveyserv-widget-container .question-container.thankyou .redirection-container .link:hover,\n.freemium-survey-components .question-container.thankyou .redirection-container .link:hover {\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\n@media (max-width: 550px) {\n .freemium-survey-components .question-container.thankyou {\n overflow: unset !important;\n }\n .freemium-survey-components .question-container.thankyou .redirection-container,\n .freemium-survey-components .question-container.thankyou .footer-alignment,\n .freemium-survey-components .question-container.thankyou .text {\n width: unset !important;\n }\n .freemium-survey-components .question-container.thankyou .redirection-container .placeholder-tag > span,\n .freemium-survey-components .question-container.thankyou .footer-alignment .placeholder-tag > span,\n .freemium-survey-components .question-container.thankyou .text .placeholder-tag > span {\n display: none !important;\n }\n}\n.freemium-survey-components.mobile-preview .question-container.thankyou {\n overflow: unset !important;\n}\n.freemium-survey-components.mobile-preview .question-container.thankyou .redirection-container,\n.freemium-survey-components.mobile-preview .question-container.thankyou .footer-alignment,\n.freemium-survey-components.mobile-preview .question-container.thankyou .text {\n width: unset !important;\n}\n.freemium-survey-components.mobile-preview .question-container.thankyou .redirection-container .placeholder-tag > span,\n.freemium-survey-components.mobile-preview .question-container.thankyou .footer-alignment .placeholder-tag > span,\n.freemium-survey-components.mobile-preview .question-container.thankyou .text .placeholder-tag > span {\n display: none !important;\n}\n\n.freemium-survey-ltr,\n.freemium-survey-ltr * {\n direction: ltr !important;\n}\n\n.freemium-survey-rtl,\n.freemium-survey-rtl * {\n direction: rtl;\n}\n.freemium-survey-rtl .checkbox-button-value,\n.freemium-survey-rtl * .checkbox-button-value {\n padding: 16px 16px 16px 40px !important;\n}\n.freemium-survey-rtl span.label-text:first-child,\n.freemium-survey-rtl * span.label-text:first-child {\n text-align: right !important;\n}\n.freemium-survey-rtl span.label-text:last-child,\n.freemium-survey-rtl * span.label-text:last-child {\n text-align: left !important;\n}\n.freemium-survey-rtl th.m-s-b-s-q-m-s-th-empty,\n.freemium-survey-rtl th.m-s-b-s-q-m-s-input,\n.freemium-survey-rtl td.m-s-b-s-q-m-s-input,\n.freemium-survey-rtl * th.m-s-b-s-q-m-s-th-empty,\n.freemium-survey-rtl * th.m-s-b-s-q-m-s-input,\n.freemium-survey-rtl * td.m-s-b-s-q-m-s-input {\n right: 0 !important;\n}\n.freemium-survey-rtl .progressbar,\n.freemium-survey-rtl * .progressbar {\n transform-origin: right !important;\n}\n.freemium-survey-rtl .widget-progressbar,\n.freemium-survey-rtl * .widget-progressbar {\n right: 12px !important;\n width: -moz-fit-content;\n width: fit-content;\n}\n.freemium-survey-rtl .navigation-button,\n.freemium-survey-rtl * .navigation-button {\n transform: rotate(180deg);\n}\n.freemium-survey-rtl button.radio-button-value,\n.freemium-survey-rtl .file-error,\n.freemium-survey-rtl .page-container,\n.freemium-survey-rtl .PhoneInputInput,\n.freemium-survey-rtl .question-container,\n.freemium-survey-rtl td.m-s-b-s-q-m-s-input,\n.freemium-survey-rtl span.fsc-input-helper,\n.freemium-survey-rtl * button.radio-button-value,\n.freemium-survey-rtl * .file-error,\n.freemium-survey-rtl * .page-container,\n.freemium-survey-rtl * .PhoneInputInput,\n.freemium-survey-rtl * .question-container,\n.freemium-survey-rtl * td.m-s-b-s-q-m-s-input,\n.freemium-survey-rtl * span.fsc-input-helper {\n text-align: right !important;\n}\n.freemium-survey-rtl .fsc-dropdown-trigger span:first-child,\n.freemium-survey-rtl * .fsc-dropdown-trigger span:first-child {\n text-align: right !important;\n}\n.freemium-survey-rtl .binary-question,\n.freemium-survey-rtl .prompt-actions,\n.freemium-survey-rtl * .binary-question,\n.freemium-survey-rtl * .prompt-actions {\n direction: ltr !important;\n}\n.freemium-survey-rtl .PhoneInputCountrySelectArrow,\n.freemium-survey-rtl * .PhoneInputCountrySelectArrow {\n margin-right: var(--PhoneInputCountrySelectArrow-marginLeft) !important;\n}\n.freemium-survey-rtl .item-wrapper .item-content,\n.freemium-survey-rtl * .item-wrapper .item-content {\n text-align: right !important;\n}\n.freemium-survey-rtl .mobile button.checkbox-button-value,\n.freemium-survey-rtl .mobile .all-label-text,\n.freemium-survey-rtl .mobile .PhoneInputInput,\n.freemium-survey-rtl .mobile button.radio-button-value,\n.freemium-survey-rtl .compact-style button.checkbox-button-value,\n.freemium-survey-rtl .compact-style .all-label-text,\n.freemium-survey-rtl .compact-style .PhoneInputInput,\n.freemium-survey-rtl .compact-style button.radio-button-value,\n.freemium-survey-rtl * .mobile button.checkbox-button-value,\n.freemium-survey-rtl * .mobile .all-label-text,\n.freemium-survey-rtl * .mobile .PhoneInputInput,\n.freemium-survey-rtl * .mobile button.radio-button-value,\n.freemium-survey-rtl * .compact-style button.checkbox-button-value,\n.freemium-survey-rtl * .compact-style .all-label-text,\n.freemium-survey-rtl * .compact-style .PhoneInputInput,\n.freemium-survey-rtl * .compact-style button.radio-button-value {\n text-align: right !important;\n}');Fs(".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 margin: 0 auto;\n}\n.freemium-survey-components.standard-survey-style .questions {\n max-width: var(--fsc-standard-max-width);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n padding: 24px;\n flex: 1;\n scroll-behavior: smooth;\n}\n.freemium-survey-components.standard-survey-style .questions.sec-btn {\n overflow: auto;\n}\n.freemium-survey-components.standard-survey-style .thankyou-container {\n padding: 2rem;\n max-width: var(--fsc-standard-max-width);\n width: 100%;\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:not(:last-child),\n.freemium-survey-components.standard-survey-style .question-container .question-text:not(:last-child) {\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 .question-container.thankyou .footer,\n.freemium-survey-components.standard-survey-style .question-container .footer {\n margin-top: 24px !important;\n text-align: center;\n}\n.freemium-survey-components.standard-survey-style .question-container.thankyou .footer p,\n.freemium-survey-components.standard-survey-style .question-container .footer p {\n word-break: break-word;\n}\n.freemium-survey-components.standard-survey-style .question-container.thankyou .footer-alignment,\n.freemium-survey-components.standard-survey-style .question-container .footer-alignment {\n width: 75%;\n font-size: 1.1429em;\n text-align: center;\n}\n.freemium-survey-components.standard-survey-style .survey-footer {\n padding: 1rem;\n width: 100%;\n}\n.freemium-survey-components.standard-survey-style .page-actions {\n max-width: var(--fsc-standard-max-width);\n padding: 24px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.freemium-survey-components.standard-survey-style .questions,\n.freemium-survey-components.standard-survey-style .page-actions {\n width: 100%;\n}\n.freemium-survey-components.standard-survey-style .page-action-buttons {\n display: flex;\n gap: 8px;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components.standard-survey-style .page-actions {\n flex-wrap: wrap;\n gap: 8px;\n }\n .freemium-survey-components.standard-survey-style .page-actions .page-action-buttons {\n justify-content: end;\n flex-wrap: wrap;\n gap: 8px;\n }\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 .question-container.thankyou,\n .freemium-survey-components.standard-survey-style .question-container {\n width: 100%;\n }\n .freemium-survey-components.standard-survey-style .question-container.thankyou .question-footer .question-consent-buttons,\n .freemium-survey-components.standard-survey-style .question-container .question-footer .question-consent-buttons {\n flex: 1;\n }\n .freemium-survey-components.standard-survey-style .action-buttons {\n flex-direction: column;\n }\n .freemium-survey-components.standard-survey-style .action-buttons button.consent-button {\n width: 100%;\n height: unset;\n min-height: 40px;\n }\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .page-actions {\n flex-wrap: wrap;\n gap: 8px;\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .page-actions .page-action-buttons {\n justify-content: end;\n flex-wrap: wrap;\n gap: 8px;\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 .question-container.thankyou,\n.freemium-survey-components.standard-survey-style.mobile-preview .question-container {\n width: 100%;\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .question-container.thankyou .question-footer .question-consent-buttons,\n.freemium-survey-components.standard-survey-style.mobile-preview .question-container .question-footer .question-consent-buttons {\n flex: 1;\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .action-buttons {\n flex-direction: column;\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .action-buttons button.consent-button {\n width: 100%;\n height: unset;\n min-height: 40px;\n}");const y4=["next","next-statement","next-page","next-set","skip","skip-statement","skip-page","skip-set","submit","navigation","set-navigation","clear-selection","message","consent","navigation-prev","navigation-next","navigation-page-prev","navigation-page-next","previous-matrix-statement","next-matrix-statement","navigation-set-prev","navigation-set-next"],q4=({translationVariables:e,canDisplayDisableButtonParams:t,navigateToNextSet:o,navigateToPreviousSet:a})=>n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:ge("navigation-set-prev",t),className:"navigation-button",onClick:a,title:e?.prev_question??"go to previous question"},n.createElement(Xs,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:ge("navigation-set-next",t),title:e?.next_question||"Go to next question",onClick:o},n.createElement(Xs,{name:"arrow-next"}))),w4=({surveyServAssetUrl:e,thankYouQuestion:o,preview:a,placeholders:r,canResubmit:i,allowMultipleSubmission:c,navigateToStart:s,resetSurvey:l,isMobile:p,pivot:u,rangeToRender:d,translationVariables:b})=>{const{redirectUrl:M,redirectDelay:m,image_url:z,show_custom_button:h,show_review_links:f,show_social_links:O}=o?.type_info?.meta??{},[v,A]=t.useState(m??10),[g,y]=n.useState(!1);return t.useEffect((()=>{if(!a&&M){const e=setInterval((()=>A((e=>e>1?e-1:("undefined"!=typeof window&&(window.location.href=M??""),0)))),1e3);return()=>{clearInterval(e),y(!1)}}return()=>{y(!1)}}),[]),n.createElement("div",{className:"thankyou-container"},n.createElement("div",{className:"question-container thankyou"},z&&n.createElement("img",{className:"thankyou-logo-img",src:z,alt:"thankyou_logo"}),n.createElement(n.Fragment,null,T(o)),n.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:B({questionText:o.text,placeholders:r,npsRating:u?.answer,ratingLabel:L(u?.answer)?"":d?.find((e=>e?.value===String(u?.answer)))?.text??"",preference:u?.question.type_info?.scale_properties?.labels?.preference,isPreview:a})}}),(i||c)&&n.createElement("div",{className:("wrap-up-actions "+(p?"mobile":"")).trim()},i&&n.createElement("button",{className:"action-button",tabIndex:0,disabled:g,onClick:()=>{y(!0),s()}},n.createElement(Xs,{name:"edit"}),b?.edit_response||"Edit your response"),c&&n.createElement("button",{className:"action-button",tabIndex:0,disabled:g,onClick:()=>{y(!0),l()}},n.createElement(Xs,{name:"reload"}),b?.another_response||"Submit another response")),M&&n.createElement(n.Fragment,null,n.createElement("div",{className:"redirection-text"},H(v,b?.redirect_msg),n.createElement("br",null)),n.createElement("a",{className:"link",href:M},M)),n.createElement(_B,{show_custom_button:h,show_review_links:f,show_social_links:O,surveyServAssetUrl:e})))},W4=e=>{const{blockIndex:t,renderedBlocks:o,activeIndexOfRenderedBlocks:a,translationVariables:r,saveFormValues:i,answers:c,clearRadioSelection:s,canDisplayDisableButtonParams:l,navigateToNextStatement:p,navigateToPreviousStatement:u,isSubmitting:d}=e,b={};y4.forEach((e=>{b[e]=!!he(e,l)}));const M=o[t??a],{question:m}=M,z=m?.type_info?.meta?.display_format;return b?.consent||b?.["previous-matrix-statement"]||b?.["next-matrix-statement"]||b?.["clear-selection"]||b?.message?n.createElement("div",{className:"question-footer"},n.createElement("div",null,(b?.["previous-matrix-statement"]||b?.["next-matrix-statement"])&&n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:ge("previous-matrix-statement",l),className:"navigation-button",onClick:()=>{u(m.name)},title:r?.prev_question??"go to previous question"},n.createElement(Xs,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:ge("next-matrix-statement",l),title:r?.next_question||"Go to next question",onClick:()=>{p(m.name)}},n.createElement(Xs,{name:"arrow-next"})))),n.createElement("div",{className:("action-buttons "+(b.consent?"question-consent-buttons":"")).trim()},b?.["clear-selection"]&&n.createElement(Zs,{className:"sec-button",variant:"secondary",onClick:()=>s(t),disabled:d},e?.survey?.meta?.action_button?.clear_selection||r?.actionButtonText?.clear_selection||r?.clear_selection||"Clear selection"),b?.consent&&"BUTTON"===z&&W.map((e=>n.createElement(Zs,{key:a+String(e.recordAs),onClick:()=>{i(M,e.recordAs,!1,t)},disabled:ge("consent",l),variant:L(c.formValues?.[m.name])||c.formValues?.[m.name]===e.recordAs?"primary":"secondary",className:("consent-button "+(c.formValues?.[m.name]===e.recordAs?"selected":"")).trim()},m?.type_info?.scale_properties?.labels?.values?.[e.id]??e.defaultValue))))):null},x4=e=>{const{pages:o,activePage:a,navigateToNextSet:r,navigateToPreviousSet:i,isInitialTransition:c,blocks:s,renderedBlocks:l,activeBlock:p,activeIndexOfBlocks:u,activeIndexOfRenderedBlocks:d,isSurveyCompleted:b,translationVariables:M,saveFormValues:m,saveOthersValue:z,clearRadioSelection:h,onSubmitHandler:f,answers:O,questions:v,resetSurvey:A,initialStatementHasAnswer:g,navigateToStart:y,activeIndexOfRenderedStatement:q,navigateToNextStatement:w,navigateToPreviousStatement:W,pivot:x,formQuestionErrors:R,dateQuestionErrors:C,textboxQuestionErrors:S,contactFormErrors:E,fileUploadErrors:T,setErrors:H,isSubmitting:I,setIsSubmitting:D,moveToNextSet:X,expanded:V,setExpanded:F,activeIndexOfSet:U,isValidQuestion:G,setActiveRenderedBlockIndex:Y,isQuestionBgDark:Z}=g4(e);j("Standard",{...e,answers:O,activePage:a,activeBlock:p,renderedBlocks:l,activeIndexOfSet:U,activeIndexOfBlocks:u,activeIndexOfRenderedBlocks:d,activeIndexOfRenderedStatement:q});const K=!!e.survey.meta?.branch_separate_page,J=t.useRef(null),Q=t.useRef({}),ee=t.useRef(null),te=t.useMemo((()=>N(x?.question)),[x?.question]),ne=t.useMemo((()=>s.filter((({name:e},t,n)=>!le({nextBlockName:e||"",blocks:n,questions:v}))).length),[s,v]),oe=k(O.formValues)&&e.survey.prompt_settings?.is_enabled&&e.preview,[ae,re]=t.useState(oe),se=l.filter((e=>a?.page_id===e?.page_id));if(t.useEffect((()=>{const t=Object.keys(O.formValues).length;e.getSurveyProgress?.({totalBlocks:ne,isSurveyCompleted:b,noOfAnswers:b||t>ne?ne:t})}),[ne,O,b]),t.useEffect((()=>{e.survey.theme&&_(e.survey.theme)}),[e.survey.theme]),t.useEffect((()=>{setTimeout((()=>{ee.current&&Object.keys(O.formValues).length&&ee.current?.scrollIntoView({inline:"start",block:"start",behavior:"smooth"})}),0),p&&e.onBlockChange?.(p,a)}),[a?.page_id]),!p||!p.question)return null;const{question:ue}=l[d],de={answers:O,blocks:s,blockIndex:0,activeIndexOfBlocks:u,initialStatementHasAnswer:g,activeIndexOfRenderedBlocks:d,activeIndexOfRenderedStatement:q,renderedBlocks:l,activePage:a,isMobile:!!e.isMobile,surveyStyle:e.surveyStyle,isWidget:!!e.isWidget,initialPivotAnswer:e.initialPivotAnswer,isInitialTransition:c,questions:v,pages:o,contactData:e.contactData,activeIndexOfSet:U,branchSeparatePage:K,isSubmitting:I},Me={};y4.forEach((e=>{Me[e]=!!he(e,de)}));const me=l[l.length-1];return n.createElement("div",{className:`freemium-survey-components ${P(e.language||"en")?"freemium-survey-rtl":"freemium-survey-ltr"} ${e.isMobile?"mobile-preview":""} standard-survey-style`,id:"freemium-survey",ref:ee,style:{...$(e.survey.theme||{})}},ae&&e.survey.prompt_settings?n.createElement("div",{className:"questions"},n.createElement("div",{className:"question-container"},n.createElement(BB,{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,b?n.createElement(w4,{surveyServAssetUrl:e.surveyServAssetUrl??"",thankYouQuestion:ce({pivotQn:x?.question,pivotQnAnswer:x?.answer,block:pe({activeBlock:me,blocks:e.survey.blocks?.filter((e=>!e.is_deleted)),answers:O,questions:v,activeIndexOfBlocks:s.findIndex((e=>e.name===me.name)),renderedBlocks:l,contactData:e.contactData,surveyLayout:"standard",pages:o}),questions:v}),preview:!!e.preview,placeholders:e.placeholders,pivot:{...x,question:x?.question||{name:""},answer:x?.answer},rangeToRender:te,canResubmit:e.canResubmit,isMobile:e.isMobile,allowMultipleSubmission:e.allowMultipleSubmission,translationVariables:M,navigateToStart:()=>{e.handleAction?e.handleAction("EDIT_RESPONSE",(()=>{D(!1),y()})):(D(!1),y())},resetSurvey:()=>{e.handleAction?e.handleAction("RE_SUBMIT",(()=>{D(!1),A()})):(D(!1),A())}}):n.createElement(n.Fragment,null,o.length>0&&a?.page_id&&n.createElement(NB,{expanded:V,id:a.page_id,setExpanded:F,activePage:a,translationVariables:M}),n.createElement("div",{className:("questions "+(e?.secBtnTxt?"sec-btn":"")).trim()},l.map(((t,r)=>{if(o.length>0&&a?.page_id!==t?.page_id||e.survey.meta?.branch_separate_page&&t.orderOfSet!==U)return null;const i=se.findIndex((e=>e.name===t.name)),b=be({renderedBlocks:l,activeBlock:p,blocks:s,activeIndexOfBlocks:u,answers:O,questions:v,contactData:e.contactData,pages:o,surveyLayout:"standard"});return n.createElement(Es.div,{id:t.question.name,key:t.question.name,ref:J,className:`question-container standard-card-${t.question.name}`,"data-test-question-name":p.question.name,initial:{opacity:0},animate:{opacity:1,x:0},exit:{opacity:0},transition:{duration:.2,delay:i?i/15:0},..."MULTI_SELECT"===p.question.type_info?.question_type&&b!==1/0&&-1!==b&&void 0!==O.formValues?.[t.question.name]&&Q.current[t.question.name]!==O.formValues?.[t.question.name]?{onMouseLeave:()=>{m(t,O.formValues?.[t.question.name],!0,r),Q.current[t.question.name]=O.formValues?.[t.question.name]}}:{}},n.createElement("div",{className:`question-text ${t.required?"required":""} ${0===r?"nps":""}`.trim(),dangerouslySetInnerHTML:{__html:B({questionText:t.question.text,placeholders:e.placeholders,npsRating:x?.answer,ratingLabel:L(x?.answer)?"":te?.find((e=>e?.value===String(x?.answer)))?.text??"",preference:x?.question.type_info?.scale_properties?.labels?.preference,isPreview:!!e.preview})},"aria-label":`question-${r}`,role:"heading","aria-level":1}),n.createElement(h4,{surveyServAssetUrl:e.surveyServAssetUrl,fileUploadErrors:T,setErrors:H,onFileUpload:e.onFileUpload,block:t,preview:!!e.preview,surveyLanguage:e.survey.language,language:e.language||"en",question:t.question,surveyStyle:e.surveyStyle,isFinalQn:ie({blocks:s,activeIndexOfBlocks:u,renderedBlocks:l,activeIndexOfRenderedBlocks:d,questions:v}),formValues:O.formValues,othersMeta:O.others,isMobile:!!e.isMobile,autoFocusDelay:20,activeIndexOfRenderedStatement:q,saveOthersValue:(e,t)=>{z(e,t,r)},onChangeHandler:(e,n)=>{const o=t.question.type_info?.question_type;m(t,e,!!o&&["RANGE","DROPDOWN","BOOLEAN"].includes(o)||n,r)},initialPivotAnswer:e.initialPivotAnswer,initialQuestionAnswer:e.initialQuestionAnswer,formQuestionErrors:R,dateQuestionErrors:C,textboxQuestionErrors:S,contactFormErrors:E,translationVariables:M,isQuestionBgDark:Z}),"MESSAGE"!==t.question.type_info?.question_type&&n.createElement(W4,{canDisplayDisableButtonParams:{...de,blockIndex:r},language:e.language||"en",isWidget:!1,surveyStyle:e.surveyStyle,answers:O,renderedBlocks:l,blocks:s,pages:o,survey:e.survey,blockIndex:r,isInitialTransition:c,activeIndexOfRenderedBlocks:d,initialStatementHasAnswer:g,navigateToNextStatement:w,navigateToPreviousStatement:W,activeIndexOfRenderedStatement:q,activeIndexOfBlocks:u,saveFormValues:m,isMobile:!!e.isMobile,clearRadioSelection:h,initialPivotAnswer:e.initialPivotAnswer,translationVariables:M,formQuestionErrors:R,dateQuestionErrors:C,textboxQuestionErrors:S,contactFormErrors:E,fileUploadErrors:T,questions:v,isSubmitting:I}))}))),n.createElement("div",{className:"page-actions"},n.createElement("div",null,Me["set-navigation"]&&n.createElement(q4,{answers:O,canDisplayDisableButtonParams:de,activeIndexOfBlocks:u,pages:o,activeIndexOfRenderedBlocks:d,renderedBlocks:l,initialStatementHasAnswer:g,blocks:s,activeIndexOfRenderedStatement:q,translationVariables:M,navigateToPreviousSet:i,navigateToNextSet:r})),n.createElement("div",{className:"page-action-buttons"},e?.secBtnTxt&&n.createElement(Zs,{variant:"secondary",onClick:()=>{e?.handleSecondaryAction?.({answers:O.formValues,survey:e.survey})},"aria-label":"secondary-action",disabled:I},e.secBtnTxt),Me["skip-set"]&&n.createElement(Zs,{variant:"secondary",onClick:()=>{X(!0)},"aria-label":"skip set",disabled:I},e?.survey?.meta?.action_button?.skip||M?.actionButtonText?.skip||M?.skip||"Skip"),Me?.["next-set"]&&n.createElement(Zs,{onClick:()=>{X()},disabled:!!ge("next-set",de),className:"next-set"},e?.survey?.meta?.action_button?.next||M?.actionButtonText?.next||M?.next||"Next"),Me.submit&&n.createElement(Zs,{disabled:!!ge("submit",de),onClick:()=>{let e=0;l.some(((t,n)=>(e=n,!G(t,!0))))?Y(e):k(C?.[ue.name])&&k(R?.[ue.name])&&k(S?.[ue.name])&&k(T?.[ue.name])&&k(E?.[ue.name])&&f("COMPLETE")}},e?.survey?.meta?.action_button?.submit||M?.actionButtonText?.submit||M?.submit_survey||"Submit"))))),!e.secBtnTxt&&n.createElement(gu,{...e.footerProps,surveyStyle:e.surveyStyle,bgColor:e.survey.theme?.palette?.secondary_background??$B}))},R4=e=>n.createElement("svg",{width:"11",height:"10",viewBox:"0 0 11 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("rect",{opacity:"0.01",x:"0.166748",width:"10",height:"10",fill:"white",fillOpacity:"0.01"}),n.createElement("path",{d:"M1.85044 1.68284L8.48309 8.31549",stroke:"#264966",strokeWidth:"1.5",strokeLinecap:"round"}),n.createElement("path",{d:"M8.48309 1.68284L1.85044 8.31549",stroke:"#264966",strokeWidth:"1.5",strokeLinecap:"round"})),L4=e=>n.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{clipPath:"url(#clip0_8207_70478)"},n.createElement("rect",{width:"10",height:"10",fill:"white",fillOpacity:"0.01"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.62499 3.19375C8.62499 3.4 8.79374 3.56875 8.99999 3.56875C9.20624 3.56875 9.37499 3.4 9.37499 3.19375V1C9.37499 0.79375 9.20624 0.625 8.99999 0.625H6.80624C6.59999 0.625 6.43124 0.79375 6.43124 1C6.43124 1.20625 6.59999 1.375 6.80624 1.375H8.09377L5.66876 3.80001C5.52501 3.95001 5.52501 4.18751 5.66876 4.33126C5.73751 4.40626 5.83751 4.44376 5.93126 4.44376V4.45001C6.02501 4.45001 6.11876 4.41251 6.19376 4.33751L8.62499 1.90628V3.19375ZM1 9.37501H1.00738H3.19375C3.4 9.37501 3.56875 9.20626 3.56875 9.00001C3.56875 8.79376 3.4 8.62501 3.19375 8.62501H1.90626L4.3375 6.19376C4.48125 6.04376 4.48125 5.80626 4.3375 5.66251C4.1875 5.51876 3.95 5.51876 3.80625 5.66251L1.375 8.09376V6.80626C1.375 6.60001 1.20625 6.43126 1 6.43126C0.79375 6.43126 0.625 6.60001 0.625 6.80626V9.00001C0.625 9.20626 0.79375 9.37501 1 9.37501Z",fill:"#264966"})),n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_8207_70478"},n.createElement("rect",{width:"10",height:"10",fill:"white"})))),C4=e=>n.createElement("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M7.3 1.4H0.7C0.313401 1.4 0 1.0866 0 0.699999C0 0.3134 0.313401 0 0.7 0H7.3C7.6866 0 8 0.3134 8 0.699999C8 1.0866 7.6866 1.4 7.3 1.4Z",fill:"#264966"}));Fs("@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.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 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.message-button {\n word-break: break-all;\n}\n.surveyserv-widget-container.compact-container-style .compact-footer-container button.consent-buttons, .surveyserv-widget-container.compact-container-style .compact-footer-container > button {\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 max-width: 1000px;\n min-width: 800px;\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.8571em;\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 main.widget-main {\n max-height: calc(100vh - 128px);\n overflow: auto;\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: 12px 0;\n}\n.surveyserv-widget-container main.widget-main .question-container .heading {\n width: 100%;\n}\n.surveyserv-widget-container main.widget-main .question-container .heading .footer-alignment {\n width: 75%;\n font-size: 1.1429em;\n text-align: center;\n}\n.surveyserv-widget-container main.widget-main .question-container .heading .footer {\n font-weight: 400;\n text-align: center;\n margin: 1rem auto 0 auto;\n line-height: 1.5;\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.surveyserv-widget-container main.widget-main .question-container .heading .footer p {\n margin: unset;\n word-break: break-word;\n}\n.surveyserv-widget-container main.widget-main .question-container .heading .footer:empty {\n display: none;\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 .question-footer,\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 footer.widget-footer {\n white-space: nowrap;\n flex-wrap: wrap;\n font-size: 0.8571em;\n overflow: auto;\n background-color: var(--background-color, #f8f8f8);\n display: flex;\n gap: 8px;\n justify-content: space-between;\n align-items: center;\n padding: 12px;\n}\n.surveyserv-widget-container footer.widget-footer a {\n color: var(--question-text-color, var(--default-question-text-color));\n font-size: 0.8571em;\n display: grid;\n place-content: center;\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n.surveyserv-widget-container footer.widget-footer.survey-footer-dark a {\n color: #bedbf5;\n}\n.surveyserv-widget-container footer.widget-footer.survey-footer-dark a:hover {\n color: #ffffff;\n}\n.surveyserv-widget-container footer.widget-footer.survey-footer-light a {\n color: #2c5cc5;\n}\n.surveyserv-widget-container footer.widget-footer.survey-footer-light a:hover {\n color: #c58af9;\n}\n.surveyserv-widget-container footer.widget-footer div.footer-text {\n display: flex;\n align-items: center;\n gap: 6px;\n}");const k4=({surveyServAssetUrl:e,thankYouQuestion:o,placeholders:a,canResubmit:r,navigateToStart:i,resetSurvey:c,widgetStyle:s,allowMultipleSubmission:l,pivot:p,rangeToRender:u,translationVariables:d,isQuestionBgDark:b})=>{const{show_custom_button:M,show_review_links:m,show_social_links:z,image_url:h}=o?.type_info?.meta??{},[f,O]=n.useState(!1);return t.useEffect((()=>()=>{O(!1)}),[]),n.createElement("div",{className:"question-container thankyou"},h&&n.createElement("img",{className:"thankyou-logo-img",src:h,alt:"thankyou_logo"}),n.createElement("div",{className:h?"heading":"heading thankyou-image"},n.createElement(n.Fragment,null,T(o))),n.createElement("div",{className:h?"text":"text thankyou-image",dangerouslySetInnerHTML:{__html:B({questionText:o.text,placeholders:a,npsRating:p?.answer,ratingLabel:L(p?.answer)?"":u?.find((e=>e?.value===String(p?.answer)))?.text??"",preference:p?.question.type_info?.scale_properties?.labels?.preference})}}),(r||l)&&n.createElement("div",{className:`wrap-up-actions ${h?"":"thank-you-image"} ${"compact"===s?"mobile":""}`.trim()},r&&n.createElement("button",{className:"action-button",tabIndex:0,disabled:f,onClick:()=>{O(!0),i()}},n.createElement(Xs,{name:"edit"}),d?.edit_response||"Edit your response"),l&&n.createElement("button",{className:"action-button",tabIndex:0,disabled:f,onClick:()=>{O(!0),c()}},n.createElement(Xs,{name:"reload"}),d?.another_response||"Submit another response")),n.createElement(_B,{show_custom_button:M,show_review_links:m,show_social_links:z,surveyServAssetUrl:e}))},P4=({translationVariables:e,activeIndexOfRenderedStatement:t,navigateToPreviousBlock:o,navigateToNextBlock:a,question:r,canDisplayDisableButtonParams:i,animationInProgress:c,setAnimationInProgress:s})=>n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:c||!!ge("navigation-prev",i),className:"navigation-button",onClick:()=>{s(!0),setTimeout((()=>{s(!1)}),h),o()},title:r.name&&(t?.[r.name]??0)>0?e?.prev_statement||"go to previous statement":e?.prev_question||"go to previous question"},n.createElement(Xs,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:c||!!ge("navigation-next",i),onClick:()=>{s(!0),setTimeout((()=>{s(!1)}),h),a()},title:e?.next_question||"go to next question"},n.createElement(Xs,{name:"arrow-next"}))),S4=e=>{const{widgetStyle:o,answers:a,initialStatementHasAnswer:r,renderedBlocks:i,blocks:c,activeIndexOfBlocks:s,navigateToNextStatement:l,activeIndexOfRenderedBlocks:p,translationVariables:u,saveFormValues:d,activeIndexOfRenderedStatement:b={},onSubmitHandler:M,skipBlock:m,skipStatement:z,navigateToNextBlock:f,navigateToPreviousBlock:O,formQuestionErrors:v,dateQuestionErrors:A,textboxQuestionErrors:g,fileUploadErrors:y,contactFormErrors:q,canDisplayDisableButtonParams:w,pages:x,setFooterElementRef:R,isSubmitting:C}=e,[P,S]=t.useState(!1),{question:E}=i[p],T=E?.type_info?.question_type,N={...w,isSubmitting:C},B=(e=!1)=>{const t=e?[...W].reverse():[...W];return he("consent",N)&&"BUTTON"===_&&t.map((e=>n.createElement(Zs,{key:p+String(e.id),onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),d(i[p],e.recordAs,!0)},disabled:P||ge("consent",N),variant:L(a.formValues?.[E.name])||a.formValues?.[E.name]===e.recordAs?"primary":"secondary",className:("consent-button "+(a.formValues?.[E.name]===e.recordAs?"selected":"")).trim()},E?.type_info?.scale_properties?.labels?.values?.[e.id]||e.defaultValue)))},$="compact"===o&&(he("navigation",N)&&he("skip",N)||"CONSENT"===T||"MESSAGE"===T),_=E?.type_info?.meta?.display_format;return n.createElement(n.Fragment,null,(he("navigation",N)||he("next",N)||he("next-statement",N)||he("consent",N)||he("submit",N)||he("skip",N)||he("skip-statement",N)||he("message",N))&&n.createElement("div",{className:"question-footer",ref:e=>e?R?.(e):null},$?n.createElement("div",{className:"compact-footer-container"},he("next",N)&&n.createElement(Zs,{onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),d(i[p],"CHECKBOX"===E?.type_info?.meta?.display_format&&"CONSENT"===E?.type_info?.question_type?a.formValues[E.name]??!1:a.formValues[E.name],!0)},disabled:P||!!ge("next",N),className:"next-button"},e?.survey?.meta?.action_button?.next||u?.next||"Next"),he("message",N)&&n.createElement(Zs,{onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),m()},disabled:P||ge("message",N),className:"message-button"},E?.type_info?.scale_properties?.labels?.values?.[0]||"Begin"),he("submit",N)&&n.createElement("div",{className:"submit"},n.createElement(Zs,{disabled:P||!!ge("submit",N),onClick:()=>{k(A?.[E.name])&&k(v?.[E.name])&&k(g?.[E.name])&&k(y?.[E.name])&&k(q?.[E.name])&&(S(!0),setTimeout((()=>{S(!1)}),h),M("COMPLETE"))}},e?.survey?.meta?.action_button?.submit||u?.actionButtonText?.submit||u?.submit_survey||"Submit")),he("next-statement",N)&&n.createElement(Zs,{onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),l?.(E.name)},disabled:P||!!ge("next-statement",N),className:"next-button"},e?.survey?.meta?.action_button?.next||u?.actionButtonText?.next||u?.next||"Next"),B(),n.createElement("div",{className:"compact-footer-layout"},n.createElement(P4,{animationInProgress:P,setAnimationInProgress:S,answers:a,canDisplayDisableButtonParams:N,pages:x,activeIndexOfBlocks:s,activeIndexOfRenderedBlocks:p,renderedBlocks:i,initialStatementHasAnswer:r,blocks:c,activeIndexOfRenderedStatement:b,question:E,translationVariables:u,navigateToNextBlock:f,navigateToPreviousBlock:O}),"MESSAGE"!==T&&!c[s].required&&n.createElement(Zs,{className:"skip-button",onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),m()},variant:"secondary","aria-label":"skip question",disabled:P},e?.survey?.meta?.action_button?.skip||u?.actionButtonText?.skip||u?.skip||"Skip"))):n.createElement(n.Fragment,null,he("navigation",N)?n.createElement(P4,{animationInProgress:P,setAnimationInProgress:S,answers:a,pages:x,canDisplayDisableButtonParams:N,activeIndexOfBlocks:s,activeIndexOfRenderedBlocks:p,activeIndexOfRenderedStatement:b,renderedBlocks:i,blocks:c,question:E,initialStatementHasAnswer:r,translationVariables:u,navigateToNextBlock:f,navigateToPreviousBlock:O}):n.createElement("div",null),n.createElement("div",{className:"action-buttons"},he("skip",N)&&n.createElement(Zs,{className:"skip-button",variant:"secondary",onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),m()},"aria-label":"skip question",disabled:P},e?.survey?.meta?.action_button?.skip||u?.actionButtonText?.skip||u?.skip||"Skip"),he("skip-statement",N)&&n.createElement(Zs,{className:"skip-button",variant:"secondary",onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),z()},"aria-label":"skip statement",disabled:P},e?.survey?.meta?.action_button?.skip||u?.actionButtonText?.skip||u?.skip||"Skip"),B(!0),he("next",N)&&n.createElement(Zs,{onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),d(i[p],"CHECKBOX"===E?.type_info?.meta?.display_format&&"CONSENT"===E?.type_info?.question_type?a.formValues[E.name]??!1:a.formValues[E.name],!0)},disabled:P||!!ge("next",N),className:"next-button"},e?.survey?.meta?.action_button?.next||u?.actionButtonText?.next||u?.next||"Next"),he("next-statement",N)&&n.createElement(Zs,{onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),l?.(E.name)},disabled:P||!!ge("next-statement",N),className:"next-button"},e?.survey?.meta?.action_button?.next||u?.actionButtonText?.next||u?.next||"Next"),he("submit",N)&&n.createElement("div",{className:"submit"},n.createElement(Zs,{disabled:P||!!ge("submit",N),onClick:()=>{k(A?.[E.name])&&k(v?.[E.name])&&k(g?.[E.name])&&k(y?.[E.name])&&k(q?.[E.name])&&(S(!0),setTimeout((()=>{S(!1)}),h),M("COMPLETE"))}},e?.survey?.meta?.action_button?.submit||u?.actionButtonText?.submit||u?.submit_survey||"Submit")),he("message",N)&&n.createElement(Zs,{onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),m()},disabled:P||ge("message",N),className:"next-button"},E?.type_info?.scale_properties?.labels?.values?.[0]||"Begin")))))},E4=e=>{const{pages:o,activePage:a,blocks:r,renderedBlocks:i,activeBlock:c,activeIndexOfBlocks:s,activeIndexOfRenderedBlocks:l,isSurveyCompleted:p,isReverseAnimation:u,translationVariables:d,saveFormValues:b,saveOthersValue:M,skipBlock:m,skipStatement:z,initialStatementHasAnswer:h,onSubmitHandler:f,navigateToNextBlock:O,activeIndexOfRenderedStatement:A,navigateToNextStatement:g,navigateToPreviousStatement:y,navigateToPreviousBlock:q,answers:w,questions:W,resetSurvey:x,navigateToStart:R,pivot:C,formQuestionErrors:P,dateQuestionErrors:T,textboxQuestionErrors:$,fileUploadErrors:_,contactFormErrors:H,setErrors:I,expanded:D,setExpanded:X,isQuestionBgDark:V,isSubmitting:F}=Ne({...e,isWidget:!0});j("Widget",{...e,renderedBlocks:i,activeIndexOfBlocks:s,answers:w,activeIndexOfRenderedBlocks:l,activeBlock:c});const[U,G]=t.useState(null),[Y,Z]=t.useState(null),[K,J]=t.useState(null),[Q,ee]=t.useState(0),te=n.useMemo((()=>N(C?.question)),[C?.question]),ne=k(w.formValues)&&e.survey.prompt_settings?.is_enabled,[oe,ae]=t.useState(ne),re=t.useRef(ne?-1:l),se=()=>{if(null===U||!U||"undefined"==typeof window||"undefined"==typeof document)return;const t=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)-(Y?.scrollHeight??0)-(K?.scrollHeight??0)-164,n=Math.min(U?.scrollHeight,Math.min(v[e.widgetStyle],t));Q!==n&&ee(n)};t.useEffect((()=>{setTimeout((()=>{se()}),0)}),[oe,p,U,A[c?.question?.name],l,K,D]),t.useEffect((()=>{"MATRIX_RATING_SCALE"===c?.question?.type_info?.question_type&&setTimeout((()=>{se()}),0)}),[A[c?.question?.name]]),t.useEffect((()=>{e.loadAsNewSurvey&&e.handleAction&&e.handleAction("RE_SUBMIT",x)}),[]),t.useEffect((()=>{e.setCurrentSurveyState?.({question:i[l]?.question,npsScore:C?.answer})}),[l,C?.answer]),t.useEffect((()=>{l!==re.current&&(re.current=-1)}),[l]);const le={answers:w,blocks:r,blockIndex:l,activeIndexOfBlocks:s,initialStatementHasAnswer:h,activeIndexOfRenderedBlocks:l,activeIndexOfRenderedStatement:A,renderedBlocks:i,isMobile:!!e.isMobile,surveyStyle:"card",isWidget:!0,questions:W,pages:o,contactData:e.contactData,activeIndexOfSet:0,branchSeparatePage:!1};if(!c||!c?.question)return null;const ue=p?r.length:s+(p?1:0),de=p?100:(ue>0?100/r.length:0)*ue;return n.createElement("div",{className:`freemium-survey-components widget-survey-components\n ${e.widgetStyle}-style`.trim(),id:"freemium-survey"},p||oe||!e.survey.meta?.progress_bar?null:n.createElement("div",{className:"widget-progressbar"},n.createElement("div",{className:"progress-completion"},de.toFixed(),"%"),n.createElement(KS,{totalSteps:r.length,completedSteps:s+(p?1:0),isWidget:!0})),!oe&&!e.minimized&&o.length>0&&a?.page_id&&!p&&n.createElement(NB,{ref:e=>e?J(e):null,expanded:D,id:a.page_id,setExpanded:X,activePage:a,translationVariables:d}),n.createElement("div",{className:"questions",style:{...ne&&oe||re.current===l?{transition:"none"}:{}}},n.createElement(_s,{exitBeforeEnter:!0},n.createElement(Es.div,{id:`${c.question.name}`,className:`question-container ${p?"thankyou":""} ${oe?"prompt-container":""}`.trim(),"data-test-question-name":c.question.name,key:`${c.question.name}`,initial:{opacity:0,x:S(e.language,u)},animate:{opacity:1,x:0},exit:{opacity:0,x:E(e.language,u)},transition:{duration:.2}},n.createElement("div",{className:"animation-container",style:{height:e.minimized?0:Q>0&&!D?`${Q}px`:"auto"}},n.createElement("div",{className:"scroll-container",ref:e=>e?G(e):null},oe&&e.survey.prompt_settings?n.createElement(BB,{config:e.survey.prompt_settings,onSelect:t=>{e.onAnsweringPrompt(t),1===t&&ae(!1)},placeholders:e.placeholders}):n.createElement(n.Fragment,null,p?n.createElement(k4,{surveyServAssetUrl:e.surveyServAssetUrl??"",thankYouQuestion:ce({pivotQn:C?.question,pivotQnAnswer:C?.answer,block:pe({activeBlock:c,blocks:e.survey.blocks?.filter((e=>!e.is_deleted)),answers:w,questions:W,activeIndexOfBlocks:s,renderedBlocks:i,contactData:e.contactData,surveyLayout:"card",pages:o}),questions:W}),placeholders:e.placeholders,canResubmit:e.canResubmit,widgetStyle:e.widgetStyle,navigateToStart:()=>{e.handleAction?e.handleAction("EDIT_RESPONSE",R):R()},resetSurvey:()=>{e.handleAction?e.handleAction("RE_SUBMIT",x):x()},allowMultipleSubmission:e.allowMultipleSubmission,pivot:C,rangeToRender:te,translationVariables:d,isQuestionBgDark:V}):n.createElement(n.Fragment,null,n.createElement("div",{className:`question-text ${!c.question.type_info?.pivot_question&&c.required?"required":""} ${"RANGE"===c?.question?.type_info?.question_type?"range-question-text":""}`.trim(),dangerouslySetInnerHTML:{__html:B({questionText:c?.question.text,placeholders:e.placeholders,npsRating:C?.answer,ratingLabel:L(C?.answer)?"":te?.find((e=>e?.value===String(C?.answer)))?.text??"",preference:C?.question.type_info?.scale_properties?.labels?.preference})},"aria-label":`question-${l}`,role:"heading","aria-level":1}),"MESSAGE"!==c.question.type_info?.question_type&&n.createElement("div",{className:"question-wrapper",onTransitionEndCapture:e=>e.stopPropagation()},n.createElement(h4,{setFocus:!0,surveyStyle:"card",isReverseAnimation:u,language:e?.language||"en",surveyServAssetUrl:e.surveyServAssetUrl,fileUploadErrors:_,setErrors:I,onFileUpload:e.onFileUpload,surveyLanguage:e.survey.language,block:c,question:c.question,isFinalQn:ie({blocks:r,activeIndexOfBlocks:s,renderedBlocks:i,activeIndexOfRenderedBlocks:l,questions:W}),formValues:w.formValues,widgetStyle:e.widgetStyle,isMobile:!1,othersMeta:w.others,autoFocusDelay:0,activeIndexOfRenderedStatement:A,isWidget:!0,saveOthersValue:(e,t)=>{M(e,t),setTimeout((()=>{se()}),0)},onChangeHandler:e=>{setTimeout((()=>{se()}),0),b(c,e)},formQuestionErrors:P,dateQuestionErrors:T,textboxQuestionErrors:$,contactFormErrors:H,translationVariables:d,isQuestionBgDark:V})))))))),!p&&!oe&&n.createElement(S4,{pages:o,isWidget:!0,language:e.language||"en",widgetStyle:e.widgetStyle,setFooterElementRef:Z,surveyStyle:"standard",answers:w,survey:e.survey,canDisplayDisableButtonParams:{...le,blockIndex:l,activeIndexOfRenderedBlocks:l},isMobile:!1,renderedBlocks:i,initialStatementHasAnswer:h,activeIndexOfRenderedStatement:A,blocks:r,activeIndexOfRenderedBlocks:l,navigateToNextStatement:g,navigateToPreviousStatement:y,activeIndexOfBlocks:s,translationVariables:d,saveFormValues:b,skipBlock:m,skipStatement:z,onSubmitHandler:f,navigateToPreviousBlock:q,navigateToNextBlock:O,formQuestionErrors:P,dateQuestionErrors:T,textboxQuestionErrors:$,fileUploadErrors:_,contactFormErrors:H,questions:W,isSubmitting:F})))},T4={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}},N4=({language:e="en",survey:o,preview:a,placeholders:r,contactData:i,overRideComponent:c,onSubmit:s,onDismiss:l,onClose:p,isMobile:u,surveyType:d,unsubscribeUrl:b,isSurveyCompleted:M,children:m=null,answerStatus:z,loadSurveyCollapsed:h=!1,handleAction:f,answers:O,onAnsweringPrompt:v,allowMultipleSubmission:A,loadAsNewSurvey:g,canResubmit:y,translationVariables:q,surveyServAssetUrl:w,surveyPoweredBy:W,onFileUpload:x,isQuestionBgDark:R})=>{const L=o.question_details?.questions||[],[C,S]=t.useState(),[E,T]=t.useState(!1),[H,I]=t.useState(h),[D,V]=t.useState(!1),{theme:j}=o,[U,G]=t.useState(null),Y=n.useMemo((()=>((e=[])=>{const t=e.sort(((e,t)=>Number(e.order)-Number(t.order)));return t.find((e=>!e.is_deleted))??t[0]})(o.blocks||[])),[o.blocks]),Z=Y?.question_name?Y?.question_name??"":Y?.category?.[0].question_name??"",K=L.find((e=>e.name===Z)),J=()=>{T(!0),setTimeout((()=>{p?.()}),300)},Q=t.useRef(null);return n.useEffect((()=>{const e=document.documentElement;if(!e||!o.question_details?.questions)return;let t=0;(o.question_details.questions??[]).forEach((e=>{const n=N(e);"RANGE"===e.type_info?.question_type&&n.length>t&&(t=n.length)}));const n=42*t+T4[d][t]*(t-1);e.style.setProperty("--fsc-max-range-question-width",Math.min(T4[d].width,n)+"px")}),[o,d]),n.useEffect((()=>{j&&(_(j),V(F(j.palette?.survey_background??$B)))}),[j]),n.createElement("div",{className:`surveyserv-widget-container ${P(e||"en")?"freemium-survey-rtl":"freemium-survey-ltr"} ${u?"widget-mobile":""} ${d}-container-style ${H?"minimized":""}`,style:{opacity:E?0:1,...$(j||{})}},n.createElement("header",{id:"surveyserv-widget-header",className:("widget-header "+(H?"minimized":"")).trim()},H?n.createElement("span",{className:"header-content minimized",dangerouslySetInnerHTML:{__html:B({questionText:(!C&&o.prompt_settings?.is_enabled?o.prompt_settings.text:U?.question?.text)??X(K?.text||""),placeholders:{...r,"{{nps.rating}}":String(U?.npsScore??"")}})}}):n.createElement("div",null),n.createElement("div",{className:"icons"},!M&&n.createElement(Zs,{onClick:()=>{I((e=>!e))},variant:"secondary",className:"icon minimize-btn",title:H?q?.maximize||"Maximize widget":q?.minimize||"Minimize widget"},H?n.createElement(L4,null):n.createElement(C4,null)),n.createElement(Zs,{ref:Q,onClick:()=>{M||l(),J()},variant:"secondary",title:q?.dismiss||"Dismiss widget",className:"icon minimize-btn"},n.createElement(R4,null)))),m,n.createElement("main",{className:("widget-main "+(H?"minimized":"")).trim()},c?n.createElement(n.Fragment,null,c):n.createElement(E4,{surveyServAssetUrl:w,answers:O,minimized:H,widgetStyle:d,answerStatus:z,language:e||"en",survey:o,placeholders:r,isMobile:!!u,contactData:i,onFileUpload:x,allowMultipleSubmission:A,loadAsNewSurvey:g,canResubmit:y,onSubmit:s,setCurrentSurveyState:G,widgetHeaderQuerySelector:H?void 0:"#surveyserv-widget-header",onAnsweringPrompt:e=>{v?.(e),S(e),0==e&&k(o.prompt_settings?.declined_message)&&J()},handleAction:f,translationVariables:q})),n.createElement("footer",{className:`widget-footer ${H?"minimized":""} survey-footer-${D?"dark":"light"}`.trim()},n.createElement("div",null,b&&!H&&n.createElement("a",{href:b,target:"_blank",rel:"noopener noreferrer",onClick:e=>{a&&e.preventDefault(),e.stopPropagation(),J()}},q?.unsubscribe||"Unsubscribe")),n.createElement("div",{className:"footer-text"},n.createElement(Au,{surveyPoweredBy:W,isDark:D}))))};Fs('.whatsapp-container {\n --wa-message-margin: 40px;\n --wa-message-border: 6px;\n --wa-message-bg: #fff;\n --wa-message-color: #0096de;\n --wa-message-disabled-color: #aaa;\n --wa-answers-bg: #d3ffc8;\n --wa-answers-color: #000;\n --wa-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: var(--fsc-whatsapp-bg);\n background-repeat: no-repeat;\n background-size: contain;\n margin: 0 auto;\n font-family: var(--fsc-font-family);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.whatsapp-container.instagram {\n --wa-message-bg: none;\n --wa-answers-bg: #4d5bff;\n --wa-answers-color: #fff;\n --wa-answers-radius: 21px;\n background-image: var(--fsc-instagram-bg);\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: 70px;\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: 6px;\n gap: 6px;\n height: -moz-fit-content;\n height: fit-content;\n}\n.whatsapp-container.instagram .question-container .options-popup main .option-row {\n border: 1px solid #0584fe;\n border-radius: 50px;\n padding: 5px 10px;\n}\n.whatsapp-container.instagram .question-container .options-popup main .option-row button {\n color: var(--wa-message-color);\n display: flex;\n gap: 6px;\n}\n.whatsapp-container.instagram .question-container .choices-button.choice {\n font-weight: 700;\n font-size: 1em;\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 gap: 6px;\n overflow: auto;\n flex: 1;\n background: #fff;\n margin: 0;\n padding-top: 8px;\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: 12px 0;\n margin: 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: 1.1429em;\n line-height: 18px;\n padding: 12px;\n background-color: var(--wa-message-bg);\n border-radius: var(--wa-message-border);\n word-break: break-word;\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-text .placeholder-tag > span {\n display: none !important;\n}\n.whatsapp-container .question-container {\n margin-right: var(--wa-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(--wa-message-color);\n}\n.whatsapp-container .question-container.active .choice button {\n color: var(--wa-message-color);\n}\n.whatsapp-container .question-container.active .choice svg:not(#star) {\n fill: var(--wa-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(--wa-answers-bg);\n margin-left: var(--wa-message-margin);\n border-radius: var(--wa-answers-radius);\n color: var(--wa-answers-color);\n padding: 12px;\n width: -moz-fit-content;\n width: fit-content;\n min-width: 80px;\n font-size: 1.1429em;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 1px;\n word-break: break-word;\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}\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.instagram .choices.one-line {\n flex-direction: row;\n flex-wrap: nowrap;\n}\n.whatsapp-container .choices {\n display: flex;\n flex-direction: column;\n gap: 2px;\n list-style-type: none;\n padding: 5px 0;\n}\n.whatsapp-container .choices.multi-choice .choice button {\n white-space: normal;\n}\n.whatsapp-container .choices.one-line {\n flex-direction: unset;\n flex-wrap: wrap;\n padding: 0;\n margin: 2px 0;\n}\n.whatsapp-container .choices.one-line .range-choice,\n.whatsapp-container .choices.one-line .choice {\n width: -moz-fit-content;\n width: fit-content;\n}\n.whatsapp-container .choice {\n background-color: var(--wa-message-bg);\n padding: 8px 12px;\n border-radius: var(--wa-message-border);\n text-align: center;\n color: var(--wa-message-disabled-color);\n box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 1px;\n}\n.whatsapp-container .choice button {\n color: var(--wa-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(--wa-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.8571em;\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 B4=({children:e,title:t,closeModal:o,isModalOpen:a})=>n.createElement(l.CSSTransition,{in:a,unmountOnExit:!0,timeout:500,classNames:"fade",key:t},n.createElement("div",{className:"options-popup",style:{}},n.createElement("header",null,n.createElement("button",{onClick:o,className:"close"},n.createElement(R4,null)),n.createElement("h4",null,t)),n.createElement("main",{className:"fsc-range-main"},e),n.createElement("footer",null,"Tab an item to select it"))),$4=({question:e,saveFormValues:o})=>{const[a,r]=t.useState(!1),{range:i}=e?.type_info?.scale_properties||{},c=Number(i?.[0]?.min),s=Number(i?.[i.length-1]?.max),l="descending"===e?.type_info?.scale_properties?.order,p=[...e?.type_info?.scale_properties?.labels?.values||[]],u=e?.type_info?.scale_properties?.labels?.preference;l&&p.reverse();const d=t.useRef(Array.from({length:s+(0===c?1:0)},((e,t)=>l?s-t:t+c)));return d.current.length<=3?n.createElement("ul",{className:`choices ${("THUMBS"===e?.type_info?.type_variant||"all"!==e?.type_info?.scale_properties?.labels?.preference)&&"one-line"}`},d.current.map(((t,a)=>"THUMBS"===e?.type_info?.type_variant?n.createElement("li",{className:"choice range-choice",key:`thumbs-${t}-${a}`},n.createElement("button",{onClick:()=>{o(t)}},n.createElement(Xs,{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}-${a}`},n.createElement("button",{onClick:()=>{o(t)}},Array.from({length:t},((e,t)=>n.createElement(Xs,{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:()=>r(!0),className:"choices-button choice"},n.createElement(Xs,{name:"whatsapp-choices"}),"Rate Support"),n.createElement(B4,{title:"Rate Support",isModalOpen:a,closeModal:()=>r(!1)},d.current.map(((e,t)=>n.createElement("div",{className:"option-row"},n.createElement("button",{onClick:()=>{o(e),r(!1)}},Array.from({length:e},((e,t)=>n.createElement(Xs,{name:"whatsapp-star",id:`qus-${t}`}))),"all"===u||"edges"===u&&(0===t||t===p.length-1)?n.createElement("span",null,p[e-1]):null))))))},_4=({question:e,saveFormValues:o,type:a})=>{const[r,i]=t.useState(!1);return n.createElement(n.Fragment,null,n.createElement("button",{onClick:()=>i(!0),className:"choices-button choice"},n.createElement(Xs,{name:"whatsapp-choices"}),"Select answer"),n.createElement(B4,{title:"Select a choice",isModalOpen:r,closeModal:()=>i(!1)},n.createElement("ul",{className:`choices multi-choice ${a}`},e.choices.map(((e,t)=>n.createElement("li",{className:"choice",style:{boxShadow:"none"},key:`${e}-${t}`},n.createElement("button",{onClick:()=>{o(e.id),i(!1)}},e.value)))))))},H4=e=>{const o=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])})(o.current,String(e.value)??""),t.useEffect((()=>{e.autoFocus&&o.current?.focus()}),[e.autoFocus]),n.createElement("div",{className:"textarea-container"},n.createElement("textarea",{placeholder:"Type a message",ref:o,rows:1,onChange:e.onChange,value:e.value}),n.createElement("button",{onClick:()=>{e.onSubmit(),o.current&&(o.current.value="")}},n.createElement(Xs,{name:"whatsapp-send"})))},I4=({text:e,placeholders:t,pivot:o,rangeToRender:a})=>n.createElement("div",{className:"question-text-container"},n.createElement("div",{className:"question-text",dangerouslySetInnerHTML:{__html:B({questionText:e,placeholders:t,npsRating:o?.answer,ratingLabel:L(o?.answer)?"":a?.find((e=>e?.value===String(o?.answer)))?.text??"",preference:o?.question.type_info?.scale_properties?.labels?.preference,isPreview:!0})},role:"heading","aria-level":1})),D4=({block:e,saveFormValues:t,type:o,translationVariables:a,language:r})=>{const{question_type:i}=e.question?.type_info;switch(i){case"RANGE":return n.createElement($4,{question:e.question,saveFormValues:e=>t(e,!0)});case"DROPDOWN":case"MULTI_CHOICE":case"MULTI_SELECT":return n.createElement(_4,{dir:P(r||"en")?"rtl":"ltr",question:e.question,saveFormValues:e=>t(e,!0),type:o,translationVariables:a});case"PARAGRAPH":case"INPUT":return null;default:return console.error(`Question type ${i} not supported`),null}},X4=({config:e,placeholders:o,onSelect:a,promptAccepted:r,type:i})=>{const c=t.useMemo((()=>e.reverse_order?e.choices?.reverse():e.choices),[e]);return n.createElement(n.Fragment,null,n.createElement("div",{className:"question-container "+(null==r?"active":"")},n.createElement(I4,{text:e.text,placeholders:o}),n.createElement("ul",{className:"choices one-line"},c?.map(((e,t)=>n.createElement("li",{className:"choice",key:`prompt-${e}-${t}`},n.createElement("button",{className:"action",onClick:()=>{a(Number(e.id))}},n.createElement(Xs,{name:Number(e.id)?"whatsapp-thumbs-up":"whatsapp-thumbs-down"}),e.value)))))),void 0!==r&&n.createElement("div",{className:"answers-container"},n.createElement("div",{className:"answers"},"whatsapp"===i&&n.createElement("div",{className:"reply-block"},n.createElement("p",{className:"user"},"Acme.inc"),n.createElement("p",{className:"question",dangerouslySetInnerHTML:{__html:B({questionText:e.text,placeholders:o})}})),n.createElement("div",{className:"answer-text"},n.createElement(Xs,{name:Number(r)?"whatsapp-thumbs-up":"whatsapp-thumbs-down"}),c.find((e=>e.id==r))?.value))),!1===r&&e.is_declined&&e.declined_message&&n.createElement("div",{className:"question-container"},n.createElement(I4,{text:e.declined_message,placeholders:o})))},V4=e=>{const{activeBlock:o,activeIndexOfBlocks:a,activeIndexOfRenderedBlocks:r,answers:i,saveFormValues:c,blocks:s,questions:l,renderedBlocks:p,onSubmitHandler:u,isSurveyCompleted:d,pivot:b}=Ne(e),{type:M="whatsapp"}=e,{question_type:m}=o?.question.type_info??{},z=n.useMemo((()=>N(b?.question)),[b?.question]),h=t.useRef(null),[f,O]=t.useState(void 0);return t.useEffect((()=>{h.current&&h.current.scroll({top:1e4,behavior:"smooth"})}),[o,i,d]),o&&o.question?n.createElement("div",{className:`${M} whatsapp-container`},n.createElement("div",{className:"msg-container"},n.createElement("div",{className:"scroll-wrapper",ref:h},e.survey.prompt_settings?n.createElement(X4,{config:e.survey.prompt_settings,onSelect:e=>{O(1===e)},promptAccepted:f,placeholders:e.placeholders,type:M}):null,!e.survey.prompt_settings||f?p.map(((t,m)=>n.createElement(n.Fragment,null,n.createElement("div",{className:"question-container "+(d||m!==p.length-1?"":"active")},n.createElement(I4,{text:t.question.text,placeholders:e.placeholders,pivot:b,rangeToRender:z}),n.createElement(D4,{language:e.language||"en",block:t,placeholders:e.placeholders,saveFormValues:(e,n)=>{c(t,e,n),setTimeout((()=>{!0===n&&ie({blocks:s,activeIndexOfBlocks:a,renderedBlocks:p,activeIndexOfRenderedBlocks:r,questions:l})&&u("COMPLETE")}))},type:M})),t.name===o.name&&!i.commitDirtyValue||Hs.isNil(i.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"===M&&n.createElement("div",{className:"reply-block"},n.createElement("p",{className:"user"},"Acme.inc"),n.createElement("p",{className:"question",dangerouslySetInnerHTML:{__html:B({questionText:t.question.text||"",placeholders:e.placeholders,npsRating:b?.answer,ratingLabel:Hs.isNil(b?.answer)?"":z?.find((e=>e?.value===String(b?.answer)))?.text??"",preference:b?.question.type_info?.scale_properties?.labels?.preference,isPreview:!0})}})),n.createElement("div",{className:"answer-text"},n.createElement(Xs,{name:Number(i.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(i.formValues[t.question.name])])):"EMOJI"===t.question.type_info?.type_variant||"STAR"===t.question.type_info?.type_variant?n.createElement(n.Fragment,null,"whatsapp"===M&&i.formValues[t.question.name]&&n.createElement("div",{className:"reply-block"},n.createElement("p",{className:"user"},"Acme.inc"),n.createElement("p",{className:"question",dangerouslySetInnerHTML:{__html:B({questionText:t.question.text||"",placeholders:e.placeholders,npsRating:b?.answer,ratingLabel:Hs.isNil(b?.answer)?"":z?.find((e=>e?.value===String(b?.answer)))?.text??"",preference:b?.question.type_info?.scale_properties?.labels?.preference,isPreview:!0})}})),n.createElement("div",{className:"answer-text"},Array.from({length:Number(i.formValues[t.question.name])},((e,t)=>n.createElement(Xs,{name:"whatsapp-star",id:`ans-${t}`})))," ",n.createElement("span",null,t.question.type_info?.scale_properties?.labels?.values?.[Number(i.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===i.formValues[t.question.name]))?.value||i.formValues[t.question.name]):n.createElement(n.Fragment,null,i.formValues[t.question.name])))))):null,d&&n.createElement("div",{className:"question-container",id:"new"},n.createElement(I4,{text:ce({pivotQn:b?.question,pivotQnAnswer:b?.answer,block:e.survey.blocks?.find((e=>"TY"===e.name)),questions:l})?.text,placeholders:e.placeholders,pivot:b,rangeToRender:z})))),n.createElement(H4,{onChange:e=>{"PARAGRAPH"!==m||d||c(o,e.target.value)},value:"PARAGRAPH"===m&&!d&&i.formValues[o.question.name]?i.formValues[o.question.name]:"",activeBlock:!0,autoFocus:"PARAGRAPH"===m,onSubmit:()=>{c(o,i?.formValues?.[o.question.name],!0),o.name===s[s.length-1].name&&u("COMPLETE")}})):null};var j4=Object.freeze({__proto__:null,allPathsLoader:function(e,t){return Ie(void 0,void 0,void 0,(function(){return De(this,(function(n){switch(n.label){case 0:return[4,Promise.resolve().then((function(){return Vb}))];case 1:return[2,(0,n.sent().getIconPaths)(e,t)]}}))}))}}),F4=Object.freeze({__proto__:null,splitPathsBySizeLoader:function(e,t){return Ie(void 0,void 0,void 0,(function(){var n,o;return De(this,(function(a){switch(a.label){case 0:return n=Bb(e),t!==_b.STANDARD?[3,2]:[4,Promise.resolve().then((function(){return Hb}))];case 1:return o=a.sent(),[3,4];case 2:return[4,Promise.resolve().then((function(){return Ib}))];case 3:o=a.sent(),a.label=4;case 4:return[2,o[n]]}}))}))}});exports.ALL_FONTS=[{id:"abhaya",label:"Abhaya Libre",value:"'Abhaya_Libre', Tofu, serif",url:"https://fonts.googleapis.com/css2?family=Abhaya+Libre"},{id:"arial",label:"Arial",value:"Arial, 'Helvetica Neue', Helvetica, sans-serif"},{id:"arvo",label:"Arvo",value:"'Arvo', 'Courier New', Courier, monospace",url:"https://fonts.googleapis.com/css2?family=Arvo"},{id:"biryani",label:"Biryani",value:"'Biryani', sans-serif",url:"https://fonts.googleapis.com/css2?family=Biryani"},{id:"bitter",label:"Bitter",value:"'Bitter', Georgia, Times, 'Times New Roman', serif",url:"https://fonts.googleapis.com/css2?family=Bitter"},{id:"cabin",label:"Cabin",value:"'Cabin', Arial, 'Helvetica Neue', Helvetica, sans-serif",url:"https://fonts.googleapis.com/css2?family=Cabin"},{id:"cabin_sketch",label:"Cabin Sketch",value:"'Cabin Sketch', sans-serif",url:"https://fonts.googleapis.com/css2?family=Cabin+Sketch"},{id:"cagliostro",label:"Cagliostro",value:"'Cagliostro', sans-serif",url:"https://fonts.googleapis.com/css2?family=Cagliostro"},{id:"cairo",label:"Cairo",value:"'Cairo', sans-serif",url:"https://fonts.googleapis.com/css2?family=Cairo"},{id:"courier",label:"Courier New",value:"'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace"},{id:"droid_sans",label:"Droid Sans",value:"'Droid Sans', sans-serif",url:"DroidSans.ttf"},{id:"droid_serif",label:"Droid Serif",value:"'Droid Serif', Georgia, Times, 'Times New Roman', serif",url:"DroidSerif-Regular.ttf"},{id:"georgia",label:"Georgia",value:"Georgia, Times, 'Times New Roman', serif"},{id:"hammersmith_one",label:"Hammersmith One",value:"'Hammersmith One', sans-serif",url:"https://fonts.googleapis.com/css2?family=Hammersmith+One"},{id:"hanuman",label:"Hanuman",value:"'Hanuman', sans-serif",url:"https://fonts.googleapis.com/css2?family=Hanuman"},{id:"harmattan",label:"Harmattan",value:"'Harmattan', sans-serif",url:"https://fonts.googleapis.com/css2?family=Harmattan"},{id:"heebo",label:"Heebo",value:"'Heebo', sans-serif",url:"https://fonts.googleapis.com/css2?family=Heebo"},{id:"helvetica",label:"Helvetica",value:"Helvetica, Arial, sans-serif",url:"Helvetica.ttf"},{id:"helvetica_neue",label:"Helvetica Neue",value:"'Helvetica Neue', Helvetica, Arial, sans-serif",url:"HelveticaNeueMedium.otf"},{id:"impact",label:"Impact",value:"Impact, Charcoal, sans-serif",url:"impact.ttf"},{id:"lato",label:"Lato",value:"'Lato', Tahoma, Verdana, Segoe, sans-serif",url:"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap"},{id:"lucida",label:"Lucida Sans",value:"'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Geneva, Verdana, sans-serif",url:"LSANS.TTF"},{id:"meiryo",label:"Meiryo",value:"Meiryo, Tahoma, Verdana, Segoe, sans-serif",url:"Meiryo.ttf"},{id:"merriweather",label:"Merriweather",value:"'Merriweather', 'Georgia', serif",url:"https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap"},{id:"montserrat",label:"Montserrat",value:"'Montserrat', 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif",url:"https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap"},{id:"open_sans",label:"Open Sans",value:"'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif",url:"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap"},{id:"open_sans_condensed",label:"Open Sans Condensed",value:"'Open Sans Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif",url:"OpenSans_Condensed-Regular.ttf"},{id:"oswald",label:"Oswald",value:"'Oswald', Arial, 'Helvetica Neue', Helvetica, sans-serif",url:"https://fonts.googleapis.com/css2?family=Oswald"},{id:"poppins",label:"Poppins",value:"'Poppins', Arial, Helvetica, sans-serif",url:"https://fonts.googleapis.com/css2?family=Poppins"},{id:"roboto",label:"Roboto",value:"'Roboto', Tahoma, Verdana, Segoe, sans-serif",url:"https://fonts.googleapis.com/css2?family=Roboto"},{id:"roboto_condensed",label:"Roboto Condensed",url:"https://fonts.googleapis.com/css2?family=Roboto+Condensed",value:"'Roboto Condensed', Tahoma, Verdana, Segoe, sans-serif"},{id:"source_sans_pro",label:"Source Sans Pro",value:"'Source Sans Pro', Tahoma, Verdana, Segoe, sans-serif",url:"SourceSansPro-Regular.otf"},{id:"default",label:"System Font",value:"-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial, sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'"},{id:"tahoma",label:"Tahoma",value:"Tahoma, Verdana, Segoe, sans-serif"},{id:"times",label:"Times New Roman",value:"TimesNewRoman, 'Times New Roman', Times, Beskerville, Georgia, serif"},{id:"trebuchet",label:"Trebuchet MS",value:"'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif"},{id:"ubuntu",label:"Ubuntu",value:"'Ubuntu', Tahoma, Verdana, Segoe, sans-serif",url:"https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap"},{id:"varela_round",label:"Varela Round",value:"'Varela Round', 'Trebuchet MS', Helvetica, sans-serif",url:"https://fonts.googleapis.com/css2?family=Varela&display=swap"},{id:"verdana",label:"Verdana",value:"Verdana, Geneva, sans-serif"},{id:"hiragino",label:"Hiragino Kaku Gothic Pro W3",value:"ヒラギノ角ゴ Pro W3, 'Hiragino Kaku Gothic Pro W3', Hiragino Kaku Gothic Pro,Osaka, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif",url:"Hiragino Kaku Gothic Pro W3.otf"}],exports.Binary=Gs,exports.Button=Zs,exports.ChannelPreview=e=>{j("ChannelPreview",e);const{survey:t,answers:o}=Q(e.survey,e.answers);return n.useEffect((()=>{const t=document.documentElement;!L(e.surveyServAssetUrl)&&t&&setTimeout((()=>{t.style.setProperty("--fsc-whatsapp-bg",`url(${e.surveyServAssetUrl}/survey/whatsapp-bg.svg)`),t.style.setProperty("--fsc-instagram-bg",`url(${e.surveyServAssetUrl}/survey/instagram-bg.svg)`)}),0)}),[e.surveyServAssetUrl]),n.useEffect((()=>{t.theme&&_(t.theme)}),[t.theme]),"whatsapp"===e.channel?n.createElement(V4,{...e,survey:t,answers:o}):"instagram"===e.channel?n.createElement(V4,{type:"instagram",...e,survey:t,answers:o}):(console.error(`Channel ${e.channel} not supported`),null)},exports.Checkbox=xl,exports.DatePicker=YS,exports.DateTimePicker=ZS,exports.Dropdown=Ou,exports.FONT_SIZE_OPTIONS=[{id:"default",label:"theme.fields.typography.default",value:"16px"},{id:"tiny",label:"theme.fields.typography.tiny",value:"8px"},{id:"small",label:"theme.fields.typography.small",value:"12px"},{id:"medium",label:"theme.fields.typography.medium",value:"14px"},{id:"large",label:"theme.fields.typography.large",value:"20px"},{id:"huge",label:"theme.fields.typography.huge",value:"24px"}],exports.Input=fu,exports.Loader=()=>n.createElement("div",{className:"fsc-loader"}),exports.PhoneNumberInput=yu,exports.ProgressBar=KS,exports.RadioGroup=JS,exports.Range=tE,exports.RankOrder=$N,exports.Slider=EB,exports.Survey=e=>{const{survey:t,answers:o}=Q(e.survey,e.answers),[a,r]=n.useState(!1);return n.useEffect((()=>{"undefined"!=typeof window&&window&&window.matchMedia&&"undefined"!=typeof sessionStorage&&sessionStorage&&sessionStorage.clear&&(j("Survey matchMedia",{innerHeight:window.innerHeight,innerWidth:window.innerWidth}),r(window.matchMedia("(max-width: 550px)").matches),Te(localStorage))}),[]),n.useEffect((()=>{const t=document.documentElement;!L(e.surveyServAssetUrl)&&t&&setTimeout((()=>{t.style.setProperty("--fsc-whatsapp-bg",`url(${e.surveyServAssetUrl}/survey/whatsapp-bg.svg)`),t.style.setProperty("--fsc-instagram-bg",`url(${e.surveyServAssetUrl}/survey/instagram-bg.svg)`)}),0)}),[e.surveyServAssetUrl]),j("Survey",{...e,survey:t,isMobile:a,answers:o}),n.createElement(n.Fragment,null,"standard"===e.surveyStyle?n.createElement(x4,{...e,answers:o,survey:t,isMobile:a||!!e.isMobile,initialQuestionAnswer:e.initialQuestionAnswer}):n.createElement(A4,{...e,answers:o,survey:t,isMobile:a||!!e.isMobile,surveyStyle:"card",initialQuestionAnswer:e.initialQuestionAnswer}))},exports.SurveyFooter=gu,exports.SurveyProgress=({isSurveyCompleted:e,totalBlocks:t,completedText:o,noOfAnswers:a})=>{const r=e?100:(a||0)/(t||1)*100;return n.createElement("div",{className:"survey-progress"},n.createElement("span",{className:"progress-completion"},r.toFixed(),"%  "),o||"survey completed",n.createElement(KS,{totalSteps:t,completedSteps:e?t:a}))},exports.TextArea=TB,exports.WebInAppSurvey=e=>{const{survey:t,answers:o}=Q(e.survey,e.answers),[a,r]=n.useState(!1),[i,c]=n.useState(!1);return n.useEffect((()=>{"undefined"!=typeof window&&window&&window.matchMedia&&(r(window.matchMedia("(max-width: 550px)").matches),"cozy"===e.surveyType&&c(window.matchMedia("(max-width: 1080px)").matches))}),[]),j("WebInAppSurvey",{...e,survey:t,isMobile:a,isDefault:i,answers:o}),n.createElement(N4,{...e,survey:t,answers:o,isMobile:a,surveyType:a?"compact":i?"default":e.surveyType})};
41
+ */;const v5=({addFilter:e,utils:t})=>{const{Type:n,isString:o,replaceInString:a,guesstimateMimeType:r,getExtensionFromFilename:i,getFilenameFromURL:c}=t,s=(e,t)=>e.some((e=>{return/\*$/.test(e)?(n=e,(/^[^/]+/.exec(t)||[]).pop()===n.slice(0,-2)):e===t;var n})),l=(e,t,n)=>{if(0===t.length)return!0;const a=(e=>{let t="";if(o(e)){const n=c(e),o=i(n);o&&(t=r(o))}else t=e.type;return t})(e);return n?new Promise(((o,r)=>{n(e,a).then((e=>{s(t,e)?o():r()})).catch(r)})):s(t,a)};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")||l(e,t("GET_ACCEPTED_FILE_TYPES")))),e("LOAD_FILE",((e,{query:t})=>new Promise(((n,o)=>{if(!t("GET_ALLOW_FILE_TYPE_VALIDATION"))return void n(e);const r=t("GET_ACCEPTED_FILE_TYPES"),i=t("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),c=l(e,r,i),s=()=>{const e=r.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));o({status:{main:t("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:a(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 c)return c?n(e):s();c.then((()=>{n(e)})).catch(s)})))),{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:v5}));Fs('/*!\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}');Fs(".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 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.8571em;\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.8571em;\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.8571em;\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.8571em;\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 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}"),b.registerPlugin(O5,v5,l$,f5),I3(D3,V3,X3,j3);const A5=t.forwardRef((({onClick:e,maxFileSize:o=16,visible:a=!0,supportedFileFormats:r,translationVariables:i,fileErrors:c},s)=>{const[l,p]=t.useState(!1),u=i?.drop_your_file?i?.drop_your_file:n.createElement(n.Fragment,null,"Drop your file here, or Browse");return n.createElement("div",{ref:s,className:"file-upload-container "+(c?.current?.main?"errored":""),onClick:e,style:{visibility:a?"visible":"hidden"},onDragOver:e=>{e.preventDefault(),e.target.classList.add("push-backward")}}," ",n.createElement(Xs,{name:"file-upload-icon"}),"string"!=typeof u?n.createElement("p",null,u):n.createElement("p",{className:"drop-your-file-container",dangerouslySetInnerHTML:{__html:u}}),n.createElement("p",{className:"max-size"},((e,t,n)=>{if(n&&e&&t)return e.replace(t,n)})(i?.max_file_size,"{{max_file_size}}",String(o))||`Maximum file size : ${o} MB`),n.createElement("p",{className:"support file-formats"},i?.supported_file_formats||"Supported file formats: "," ",(r=r.join(", ")).trim()?n.createElement(n.Fragment,null,l?r:r.slice(0,20)," ",n.createElement("span",{onClick:()=>p(!l),style:{color:"#2C5CC5",textDecoration:"underline",cursor:"pointer"}},l?i?.show_less||"Show less":i?.show_more||"Show more")):"No formats selected"),n.createElement("div",{className:"filepond--drip"}))})),g5=({question:e,onChangeHandler:o,onFileUpload:a,setErrors:r,translationVariables:i,surveyServAssetUrl:c,value:s,preview:l})=>{const[p,u]=t.useState([]),[d,M]=t.useState([]),m=t.useRef(),z=e.type_info?.file_field?.max_file_size||10,h=t.useRef(null),f=t.useRef(),[O,v]=t.useState(!1);let A=!1;n.useEffect((()=>{const t=localStorage.getItem(`uploadedFile-${e?.name}`),n=t?JSON.parse(t):"";n?.source&&(n.options={...n.options,file:{name:s,size:n.fileSize}},s&&u([n]))}),[]);const g=async(t,n)=>{try{if(A)return;if(f.current&&k(h.current)||t){const r=t??f.current.getFiles()?.[0]?.file;if(r&&a){A=!0;const t=await a(r.type,r.size,r.name,e);if(n&&n(!0,50,100),t.startsWith("http")&&c){const n=await fetch(t,{method:"PUT",headers:{"Content-Type":r.type,"Content-Disposition":"attachment"},body:r}),a=new URL(t),i=`${c}${a.pathname}`;if(!n.ok)throw console.error("Error uploading file"),new Error("Error uploading file");localStorage.setItem(`uploadedFile-${e?.name}`,JSON.stringify({source:i,options:{type:"local"},fileSize:f.current.getFiles()?.[0]?.fileSize})),o(r.name)}else o(l?"dummy":null),console.error("Error fetching pre-signed url");A=!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(x).map((e=>{if((t||[]).includes(e))return x[e].concat(",")})).join(" ").trim().slice(0,-1);M(n.split(", "))})()}),[]),n.createElement(n.Fragment,null,n.createElement(b.FilePond,{ref:f,files:p,labelFileProcessing:i?.uploading_text??"Uploading..",labelFileProcessingComplete:i?.upload_complete??"Upload complete",labelMaxFileSizeExceeded:i?.file_too_large??"The file is too large and cannot be uploaded.",labelMaxFileSize:"",labelTapToCancel:"",labelTapToUndo:"",labelFileTypeNotAllowed:i?.invalid_type??"The file mismatch. Retry by uploading the supported file type.",fileValidateTypeLabelExpectedTypes:"",beforeAddFile:e=>(h.current?.main&&(h.current=null,r({}),u([e]),v(!0)),!0),onremovefile:()=>{O?v(!1):(u([]),r({}),h.current=null,o(null))},allowReplace:!0,server:{process:async(e,t,n,o,a,r)=>{r(!0,0,100);try{await g(t,r),r(!0,100,100),o(t.name)}catch(e){a("An error occurred during upload")}}},onpreparefile:(e,t)=>{const n=new FileReader;n.onloadend=()=>{const t=n.result??"",o=new Blob([t],{type:e.fileType}),a=new File([o],e.filename,{type:e.fileType});g(a)},n.readAsArrayBuffer(t)},onerror:t=>{h.current=t,r({[e.name]:t})},required:!0,credits:!1,allowFileTypeValidation:!0,acceptedFileTypes:d,fileValidateTypeDetectType:(e,t)=>new Promise(((t,n)=>{const o=e.name.split(".");t(`.${o[o.length-1].toLowerCase()}`)})),imageEditor:{legacyDataToImageState:yQ,createEditor:e5,imageReader:[$3,{}],imageWriter:[_3,{}],imageProcessor:zF,imageEditorAfterWriteImage:({src:e,dest:t,imageState:n})=>new Promise(((o,a)=>{zF(e,{imageReader:$3(),imageWriter:_3({targetSize:{width:128,height:15,fit:"cover"}}),imageState:n}).then((n=>{o([{name:"input_",file:e},{name:"output_",file:t},{name:"thumb_",file:n.dest}])})).catch(a)})),editorOptions:{utils:["crop","finetune","filter","annotate"],imageOrienter:{read:h$,apply:P$},shapePreprocessor:t5(),...F3,...U3,...H3,locale:{...G3,...Z3,...J3,...K3,...Q3,...Y3}}},allowFileSizeValidation:!0,maxFileSize:`${z}MB`,onupdatefiles:e=>{m.current?.classList.remove("push-backward"),e.length&&u(e)},maxFiles:1,name:`${e.id}-files`}),n.createElement(A5,{ref:m,onClick:e=>{const t=e.target;"path"!==t?.tagName&&"P"!==t?.tagName&&(!t?.className||t?.className instanceof SVGAnimatedString||t.className.includes("format-type-toggler"))||f.current.browse()},fileErrors:h,visible:Boolean(!p.length||h.current?.main),maxFileSize:z,translationVariables:{...i,tTimeZones:[{id:"",offset:"",timeZone:""}]},supportedFileFormats:d}),h?.current?.main&&n.createElement("div",{className:"file-error"},n.createElement(Xs,{name:"info"}),n.createElement("span",null,`${h?.current?.main}\n ${h.current?.sub}`)))};Fs(".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}\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 width: 100%;\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 width: 100%;\n}");const y5=e=>{switch(e){case"EMAIL":return"email";case"PHONE":return"tel";case"NUMBER":return"number";default:return"text"}},q5=({question:e,autoFocusDelay:t,onChangeHandler:o,surveyStyle:a,formValues:r,fieldErrors:i,translationVariables:c,language:s,isQuestionBgDark:l})=>{const p=e.type_info?.form_fields?.layout,u=e.type_info?.form_fields?.fields;return n.createElement("div",{className:`fsc-form-field-container layout-${(p??"VERTICAL").toLowerCase()}`.trim()},u?.map(((p,u)=>{const d="NUMBER"===p?.type||"PHONE"===p.type?18:256;return n.createElement("div",{className:"fsc-form-field",key:p.id},"DATE"!==p?.type&&"DATE_TIME"!==p?.type?n.createElement(n.Fragment,null,"PHONE"===p.type?n.createElement(yu,{key:u,surveyLayout:a??"card",setFocus:0===u&&"standard"!==a,autoFocusDelay:t,label:p?.label||"",type:"tel",isRequired:!!p.required,showCount:!0,maxLength:d,value:p.id&&r[e.name]?.[p.id]||"",onChangeHandler:(t,n)=>{p.id&&o({...r[e.name]??{},[p.id]:t||null},!0)},isErrored:!(!p.id||!r?.[e.name]?.[p.id])&&!!i?.[p?.id||""],errorText:p.id&&r[e.name]?.[p.id]?i?.[p?.id]:"",translationVariables:c}):n.createElement(fu,{isQuestionBgDark:l,key:u,setFocus:0===u&&"standard"!==a,autoFocusDelay:t,onKeyDown:e=>{"PHONE"===p?.type&&D(e),"NUMBER"===p?.type&&I(e)},showCount:!0,maxLength:d,placeholder:"NUMBER"===p?.type?"0":void 0,label:p?.label||"",type:y5(p?.type??"TEXT"),isRequired:!!p.required,value:p.id?r[e.name]?.[p.id]??"":"",onChange:t=>{p.id&&o({...r[e.name]??{},[p.id]:t.target.value.slice(0,d)||null})},onBlur:t=>{if(p.id){const n=r[e.name]?.[p.id],a=t.target.value.slice(0,d);(L(n)||k(n))&&(L(a)||k(a))||o?.({...r[e.name]??{},[p.id]:a||null},!0)}},isErrored:!(!p.id||!r?.[e.name]?.[p.id])&&!!i?.[p?.id||""],errorText:p.id&&r[e.name]?.[p.id]?i?.[p?.id]:""})):n.createElement(n.Fragment,null,"DATE_TIME"===p?.type?n.createElement(ZS,{id:p.id??"",name:e.name??"",label:p?.label??"",isRequired:!!p.required,allowOnlyFuture:!!e.type_info?.meta?.allow_future_date,language:s,useAmPm:!e.type_info?.meta?.time_format,showTimezoneSelect:!1,onChange:t=>{o({...r[e.name]??{},...p.id&&{[p.id]:t}},!0)},value:p?.id&&r[e?.name]?.[p?.id],type:"FORM_FIELD",translationVariables:c}):n.createElement(YS,{id:p.id??"",name:e.name??"",label:p?.label??"",isRequired:!!p.required,allowOnlyFuture:!!e.type_info?.meta?.allow_future_date,language:s,onChange:t=>{o({...r[e.name]??{},...p.id&&{[p.id]:t}},!0)},value:p?.id&&r[e?.name]?.[p?.id],type:"FORM_FIELD",translationVariables:c})))})))},w5="rovingFocusGroup.onEntryFocus",W5={bubbles:!1,cancelable:!0},x5="RovingFocusGroup",[R5,L5,C5]=Ll(x5),[k5,P5]=el(x5,[C5]),[S5,E5]=k5(x5),T5=t.forwardRef(((e,n)=>t.createElement(R5.Provider,{scope:e.__scopeRovingFocusGroup},t.createElement(R5.Slot,{scope:e.__scopeRovingFocusGroup},t.createElement(N5,Ks({},e,{ref:n})))))),N5=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:o,orientation:a,loop:r=!1,dir:i,currentTabStopId:c,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:p,...u}=e,d=t.useRef(null),b=Qs(n,d),M=kl(i),[m=null,z]=al({prop:c,defaultProp:s,onChange:l}),[h,f]=t.useState(!1),O=ol(p),v=L5(o),A=t.useRef(!1),[g,y]=t.useState(0);return t.useEffect((()=>{const e=d.current;if(e)return e.addEventListener(w5,O),()=>e.removeEventListener(w5,O)}),[O]),t.createElement(S5,{scope:o,orientation:a,dir:M,loop:r,currentTabStopId:m,onItemFocus:t.useCallback((e=>z(e)),[z]),onItemShiftTab:t.useCallback((()=>f(!0)),[]),onFocusableItemAdd:t.useCallback((()=>y((e=>e+1))),[]),onFocusableItemRemove:t.useCallback((()=>y((e=>e-1))),[])},t.createElement(ml.div,Ks({tabIndex:h||0===g?-1:0,"data-orientation":a},u,{ref:b,style:{outline:"none",...e.style},onMouseDown:nl(e.onMouseDown,(()=>{A.current=!0})),onFocus:nl(e.onFocus,(e=>{const t=!A.current;if(e.target===e.currentTarget&&t&&!h){const t=new CustomEvent(w5,W5);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=v().filter((e=>e.focusable));_5([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))}}A.current=!1})),onBlur:nl(e.onBlur,(()=>f(!1)))})))})),B5=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:o,focusable:a=!0,active:r=!1,tabStopId:i,...c}=e,s=ep(),l=i||s,p=E5("RovingFocusGroupItem",o),u=p.currentTabStopId===l,d=L5(o),{onFocusableItemAdd:b,onFocusableItemRemove:M}=p;return t.useEffect((()=>{if(a)return b(),()=>M()}),[a,b,M]),t.createElement(R5.ItemSlot,{scope:o,id:l,focusable:a,active:r},t.createElement(ml.span,Ks({tabIndex:u?0:-1,"data-orientation":p.orientation},c,{ref:n,onMouseDown:nl(e.onMouseDown,(e=>{a?p.onItemFocus(l):e.preventDefault()})),onFocus:nl(e.onFocus,(()=>p.onItemFocus(l))),onKeyDown:nl(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const o=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(o)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)?void 0:$5[o]}(e,p.orientation,p.dir);if(void 0!==t){e.preventDefault();let n=d().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 o=n.indexOf(e.currentTarget);n=p.loop?function(e,t){return e.map(((n,o)=>e[(t+o)%e.length]))}(n,o+1):n.slice(o+1)}setTimeout((()=>_5(n)))}}))})))})),$5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _5(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const H5=T5,I5=B5,D5="Radio",[X5,V5]=el(D5),[j5,F5]=X5(D5),U5=t.forwardRef(((e,n)=>{const{__scopeRadio:o,name:a,checked:r=!1,required:i,disabled:c,value:s="on",onCheck:l,...p}=e,[u,d]=t.useState(null),b=Qs(n,(e=>d(e))),M=t.useRef(!1),m=!u||Boolean(u.closest("form"));return t.createElement(j5,{scope:o,checked:r,disabled:c},t.createElement(ml.button,Ks({type:"button",role:"radio","aria-checked":r,"data-state":Z5(r),"data-disabled":c?"":void 0,disabled:c,value:s},p,{ref:b,onClick:nl(e.onClick,(e=>{r||null==l||l(),m&&(M.current=e.isPropagationStopped(),M.current||e.stopPropagation())}))})),m&&t.createElement(Y5,{control:u,bubbles:!M.current,name:a,value:s,checked:r,required:i,disabled:c,style:{transform:"translateX(-100%)"}}))})),G5=t.forwardRef(((e,n)=>{const{__scopeRadio:o,forceMount:a,...r}=e,i=F5("RadioIndicator",o);return t.createElement(sl,{present:a||i.checked},t.createElement(ml.span,Ks({"data-state":Z5(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:n})))})),Y5=e=>{const{control:n,checked:o,bubbles:a=!0,...r}=e,i=t.useRef(null),c=rl(o),s=cl(n);return t.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==o&&n){const t=new Event("click",{bubbles:a});n.call(e,o),e.dispatchEvent(t)}}),[c,o,a]),t.createElement("input",Ks({type:"radio","aria-hidden":!0,defaultChecked:o},r,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Z5(e){return e?"checked":"unchecked"}const K5=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],J5="RadioGroup",[Q5,e4]=el(J5,[P5,V5]),t4=P5(),n4=V5(),[o4,a4]=Q5(J5),r4=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:o,name:a,defaultValue:r,value:i,required:c=!1,disabled:s=!1,orientation:l,dir:p,loop:u=!0,onValueChange:d,...b}=e,M=t4(o),m=kl(p),[z,h]=al({prop:i,defaultProp:r,onChange:d});return t.createElement(o4,{scope:o,name:a,required:c,disabled:s,value:z,onValueChange:h},t.createElement(H5,Ks({asChild:!0},M,{orientation:l,dir:m,loop:u}),t.createElement(ml.div,Ks({role:"radiogroup","aria-required":c,"aria-orientation":l,"data-disabled":s?"":void 0,dir:m},b,{ref:n}))))})),i4=r4,c4=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:o,disabled:a,...r}=e,i=a4("RadioGroupItem",o),c=i.disabled||a,s=t4(o),l=n4(o),p=t.useRef(null),u=Qs(n,p),d=i.value===r.value,b=t.useRef(!1);return t.useEffect((()=>{const e=e=>{K5.includes(e.key)&&(b.current=!0)},t=()=>b.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),t.createElement(I5,Ks({asChild:!0},s,{focusable:!c,active:d}),t.createElement(U5,Ks({disabled:c,required:i.required,checked:d},l,r,{name:i.name,ref:u,onCheck:()=>i.onValueChange(r.value),onKeyDown:nl((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:nl(r.onFocus,(()=>{var e;b.current&&(null===(e=p.current)||void 0===e||e.click())}))})))})),s4=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:o,...a}=e,r=n4(o);return t.createElement(G5,Ks({},r,a,{ref:n}))})),l4=e=>{const{checked:t,className:o,disabled:a,id:r,isRequired:i,label:c,name:s,readOnly:l,onChange:p,...u}=e;return n.createElement(i4,{className:`fsc-radio ${o??""}`.trim(),name:s,"aria-label":c||"Radio button",value:t?"default":"",required:i,disabled:a,"aria-readonly":l,onValueChange:e=>{p?.(!t,e)},...u},n.createElement("div",{className:"fsc-radio-container"},n.createElement(c4,{checked:t,"aria-checked":t,className:"fsc-radio-item",disabled:a,"aria-readonly":l,id:r,value:"default"},n.createElement(s4,{className:"fsc-radio-indicator"})),c&&n.createElement("label",{htmlFor:r,className:"fsc-radio-label"},c,c&&i&&n.createElement("span",null,"*"))))};Fs(".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: 1em;\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: 1em;\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 td.m-s-b-s-q-m-s-input,\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 th.m-s-b-s-q-m-s-th-empty,\n .freemium-survey-components.standard-survey-style .matrix-container th.m-s-b-s-q-m-s-th {\n position: unset;\n }\n .freemium-survey-components.standard-survey-style .matrix-container td.m-s-b-s-q-m-s-input {\n min-width: unset;\n max-width: 50vw;\n }\n}\n.freemium-survey-components.mobile-preview.standard-survey-style .matrix-container td.m-s-b-s-q-m-s-input,\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 th.m-s-b-s-q-m-s-th-empty,\n.freemium-survey-components.mobile-preview.standard-survey-style .matrix-container th.m-s-b-s-q-m-s-th {\n position: unset;\n}\n.freemium-survey-components.mobile-preview.standard-survey-style .matrix-container td.m-s-b-s-q-m-s-input {\n min-width: unset;\n max-width: 50vw;\n}");const p4=e=>{const{type_info:{matrix_properties:t},onChangeHandler:o,value:a}=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)=>e.is_active?n.createElement("th",{key:e.id,className:"m-s-b-s-q-m-s-th st-mt-th"},e.text):null)))),n.createElement("tbody",{className:"st-mt-tbody"},t?.statements?.map(((e,r)=>e.is_active?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(((i,c)=>{if(!i.is_active)return null;const s=a?.find((t=>t?.statement_id===e?.id));return n.createElement("td",{key:i.id,className:"m-s-b-s-q-m-s-switch st-mt-td"},"SINGLE_ANSWER"===t?.type&&n.createElement(l4,{key:i.id||`${r}-key-${c}`,name:`q-m-s-radio-${r}-key-${c}`,checked:!!s?.rating_labels?.find((e=>e?.id===i?.id)),id:i.id??"",onChange:()=>{e?.id&&i?.id&&o(s?.statement_id?[...a||[]].map((e=>e?.statement_id===s?.statement_id?{...s,rating_labels:[{id:i.id||"",text:i?.text||""}]}:e)):[...a||[],{statement_id:e.id,rating_labels:[{id:i.id,text:i?.text||""}]}])},label:""}),"MULTIPLE_ANSWERS"===t?.type&&n.createElement(xl,{key:i.id||`${r}-key-${c}`,name:`q-m-s-checkbox-${r}-key-${c}`,checked:!!s?.rating_labels?.find((e=>e?.id===i?.id)),id:i.id??"",onChange:t=>{e?.id&&i?.id&&o(s?.statement_id?[...a||[]].map((e=>e.statement_id===s.statement_id?{...s,rating_labels:t?[...s.rating_labels||[],{id:i.id||"",text:i?.text||""}]:(s.rating_labels||[]).filter((e=>e?.id!==i.id))}:e)):[...a||[],{statement_id:e.id,rating_labels:[{id:i.id,text:i?.text||""}]}])}}))}))):null)))))};Fs(".freemium-survey-components .matrix-wd-container {\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, var(--default-question-text-color));\n font-size: 0.8571em;\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, var(--default-question-text-color));\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 padding: 2px;\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 u4=e=>{const{type_info:{matrix_properties:t},onChangeHandler:o,name:a,isMobile:r,isReverseAnimation:i,statementIndex:c,value:s,widgetStyle:l,language:p="en"}=e,u=n.useMemo((()=>(t?.statements||[]).find(((e,t)=>t===c))),[t?.statements,c]),d=n.useMemo((()=>s?.find((e=>e?.statement_id===u?.id))),[u,s]);return n.createElement("div",{className:"matrix-wd-container","data-test-input":"matrix"},n.createElement("div",{className:"matrix-st-count"},`${c+1}/${(t?.statements||[]).length}`),n.createElement(_s,{exitBeforeEnter:!0},n.createElement(Es.div,{key:`${u?.id??""}`,initial:{opacity:0,x:S(p,i)},animate:{opacity:1,x:0},exit:{opacity:0,x:E(p,i)},transition:{duration:.2}},n.createElement("div",{className:"matrix-st-text"},u?.text),n.createElement("div",{className:`matrix-st-labels wd-style-${l} ${r?"mt-mobile":""}`.trim()},"MULTIPLE_ANSWERS"===t?.type&&n.createElement(HB,{name:a??"",onChangeHandler:e=>{if(u?.id){const n=d?.statement_id?[...s||[]].map((n=>n.statement_id===d.statement_id?{...d,rating_labels:e.map((e=>{const n=t?.rating_labels?.find((t=>t.id===e));return{id:e,text:n?.text||""}}))}:n)):[...s||[],{statement_id:u.id,rating_labels:e.map((e=>{const n=t?.rating_labels?.find((t=>t.id===e));return{id:e,text:n?.text||""}}))}];o(n)}},saveOthersValue:()=>{},options:(t?.rating_labels??[]).map((e=>({id:e.id,value:e.text}))),values:(d?.rating_labels??[]).map((e=>e.id??"")),autoFocusDelay:0,othersValue:""}),"SINGLE_ANSWER"===t?.type&&n.createElement(JS,{name:a??"",language:p||"en",onChangeHandler:e=>{const n=t?.rating_labels?.find((t=>t.id===e));u?.id&&e&&o(d?.statement_id?[...s||[]].map((t=>t?.statement_id===d?.statement_id?{...d,rating_labels:[{id:e||"",text:n?.text||""}]}:t)):[...s||[],{statement_id:u.id,rating_labels:[{id:e,text:n?.text||""}]}])},saveOthersValue:()=>{},options:(t?.rating_labels??[]).map((e=>({id:e.id,value:e.text}))),value:d?.rating_labels?.[0]?.id??"",othersValue:""})))))},d4=({question:e,autoFocusDelay:t,setFocus:o,formValues:a,surveyLayout:r,onChangeHandler:i,isQuestionBgDark:c})=>{const s=e?.type_info?.number_field?.decimal,l=e?.type_info?.number_field?.decimal_point,p=s?2===l?"0.01":"0.1":"1",u=a[e.name],[d,b]=n.useState(u);n.useEffect((()=>{d&&!u&&b(u)}),[u]);const M=e=>{s&&!L(l)&&(e.split(".")?.[1]?.length??0)>(l??0)||i(C(e,s||!1),!1)},m=n.useMemo((()=>{const e=["+","-","e","E"];return s||e.push("."),e}),[s]),z=(e=>{let t=1;for(let n=0;n<e;n++)t*=10;return t-1})(18);return n.createElement("div",{className:"responsive-input-field"},n.createElement(fu,{autoFocusDelay:t,isRequired:!!e.required,type:"number",step:p,placeholder:e?.type_info?.meta?.placeholder??s?"0.0"+(2===l?"0":""):"0",onKeyDown:e=>{m.includes(e.key)&&e.preventDefault()},..."card"===r?{value:u??"",onChange:e=>{const t=Number(e.target.value);!isNaN(t)&&t<=z&&e.target.value.length<=18&&M(e.target.value)}}:{value:d??"",onChange:e=>{const t=Number(e.target.value);!isNaN(t)&&t<=z&&e.target.value.length<=18&&b(`${t}`)},onBlur:()=>{return e=d,void((L(u)||k(u))&&(L(d)||k(d))||d===u||M(e));var e}},setFocus:o,showCount:!0,max:z,maxLength:18,isQuestionBgDark:c}))};Fs(".question-comments .input-container {\n margin-top: 10px;\n max-height: 100px !important;\n}\n.question-comments .input-container .input-basic {\n gap: 2px;\n}\n\n.question-comments .input-container textarea {\n min-height: 56px !important;\n}");const b4=({question:e,questionCommentOnchangeHandler:t,commentsMeta:o,setFocus:a,isQuestionBgDark:r,isCommentsEnabled:i})=>{const[c,s]=n.useState(o?.toString());return i?n.createElement(_s,null,n.createElement(Es.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},transition:{duration:.3,ease:"easeInOut"},exit:{height:0,opacity:0},className:"question-comments"},n.createElement(TB,{showCount:!0,maxLength:1500,rows:2,isRequired:!!e.required,placeholder:e?.type_info?.question_placeholder??"Give additional feedback",onChange:n=>{const o=n.target.value||"";s(o),t?.(e.name,o)},value:o||c,setFocus:!0,isQuestionBgDark:r}))):null},M4=e=>{switch(e){case"EMAIL":return"email";case"PHONE":return"tel";case"URL":return"url";default:return"text"}},m4=e=>{switch(e){case"PHONE":return"phone";case"EMAIL":return"email";case"URL":return"url";default:return""}},z4=({question:e,autoFocusDelay:t,formValues:o,onChangeHandler:a,textboxErrors:r,surveyLayout:i,setFocus:c,onKeyDownHandler:s,translationVariables:l,isQuestionBgDark:p})=>{const u=e?.type_info?.text_field?.text_type,d=o[e.name],[b,M]=n.useState(d);return n.useEffect((()=>{b&&!d&&M(d)}),[d]),n.createElement("div",{className:"responsive-input-field"},"PHONE"===u?n.createElement(yu,{startAdornment:n.createElement(Xs,{name:m4(u)}),type:M4(u),setFocus:c,autoFocusDelay:t,label:"",isRequired:!!e.required,value:d,isErrored:!!r[e.name],errorText:r[e.name]||"",placeholder:e?.type_info?.meta?.placeholder??"",onChangeHandler:a,maxLength:18,showCount:!0,onKeyDownHandler:s,surveyLayout:i,translationVariables:l}):n.createElement(fu,{startAdornment:u&&"TEXT"!==u&&n.createElement(Xs,{name:m4(u)}),type:M4(u),setFocus:c,autoFocusDelay:t,showCount:!0,label:"",onKeyDown:s,isRequired:!!e.required,isErrored:!!r[e.name],errorText:r[e.name]||"",placeholder:e?.type_info?.meta?.placeholder??"",..."card"===i?{value:d??"",onChange:e=>a(e.target.value)}:{onBlur:e=>{(L(d)||k(d))&&(L(b)||k(b))||b===d||a?.(e.target.value,!0)},value:b??"",onChange:e=>M(e.target.value)},maxLength:50,isQuestionBgDark:p}))},h4=({surveyLanguage:e,language:t="en",question:o,formValues:a,othersMeta:r,onChangeHandler:i,saveOthersValue:c,autoFocusDelay:s,isFinalQn:l,isWidget:p,isMobile:u,initialPivotAnswer:d,initialQuestionAnswer:b,isInitialTransition:M,formQuestionErrors:m,dateQuestionErrors:z,contactFormErrors:h,activeIndexOfRenderedStatement:f={},textboxQuestionErrors:O,isReverseAnimation:v,fileUploadErrors:A,preview:g,onFileUpload:y,widgetStyle:q="default",setErrors:w,translationVariables:W,surveyServAssetUrl:x,setFocus:R,block:C,onKeyDown:S,surveyStyle:E,isQuestionBgDark:T})=>{const N=o?.type_info?.is_question_comment,B=o?.type_info?.footer_text&&o.type_info.meta?.question_hint?n.createElement("div",{className:"footer",role:"note",dangerouslySetInnerHTML:{__html:o?.type_info?.footer_text}}):n.createElement(n.Fragment,null),$=a[o.name],[_,H]=n.useState($);switch(n.useEffect((()=>{_&&!$&&H($)}),[$]),o?.type_info?.question_type){case"MATRIX_RATING_SCALE":return n.createElement(n.Fragment,null,p||u?n.createElement(u4,{language:t,name:o.name,isReverseAnimation:v,type_info:o?.type_info||{},onChangeHandler:e=>{i(e?.filter((e=>(e.rating_labels||[]).length>0)))},isMobile:u,value:a[o.name]||[],statementIndex:f[o.name]??0,widgetStyle:q}):n.createElement(p4,{type_info:o?.type_info||{},onChangeHandler:e=>{i(e?.filter((e=>(e.rating_labels||[]).length>0)))},value:a[o.name]||[]}),B);case"RANGE":return n.createElement(n.Fragment,null,n.createElement(tE,{question:o,onChangeHandler:i,isWidget:p,isMobile:u,widgetStyle:q,value:a[o.name],initialPivotAnswer:d,isInitialTransition:M}),N&&null!=a[o.name]&&n.createElement(b4,{question:o,questionCommentOnchangeHandler:c,commentsMeta:r?.[o?.name],surveyStyle:E,setFocus:R,isQuestionBgDark:T,isCommentsEnabled:N}),B);case"CHECKBOX":case"MULTI_SELECT":return n.createElement(n.Fragment,null,n.createElement(HB,{name:o.name,values:a[o.name],othersValue:r[o.name],options:o?.choices||[],onChangeHandler:i,saveOthersValue:c,isOthersOption:!!(o?.choices||[]).find((e=>e.meta?.is_others)),othersRequired:!!o?.type_info.meta?.othersRequired,autoFocusDelay:s,translationVariables:W}),N&&null!=a[o.name]&&n.createElement(b4,{question:o,questionCommentOnchangeHandler:c,commentsMeta:r?.[o?.name],surveyStyle:E,setFocus:R,isQuestionBgDark:T,isCommentsEnabled:N}),B);case"RADIO":case"DROPDOWN":return n.createElement(n.Fragment,null,n.createElement(JS,{autoFocusDelay:s,name:o.name,onChangeHandler:i,initialQuestionAnswer:b,displayFormat:o?.type_info?.meta?.display_format||"LIST",saveOthersValue:c,options:o?.choices||[],value:a[o.name],othersValue:r[o.name],isOthersOption:!!(o?.choices||[]).find((e=>e.meta?.is_others)),language:t||"en",othersRequired:!!o?.type_info.meta?.othersRequired,isFinalQn:l,translationVariables:W,isQuestionBgDark:T}),N&&null!=a[o.name]&&n.createElement(b4,{question:o,questionCommentOnchangeHandler:c,commentsMeta:r?.[o?.name],surveyStyle:E,setFocus:R,isQuestionBgDark:T,isCommentsEnabled:N}),B);case"TEXT":return n.createElement(n.Fragment,null,n.createElement(z4,{question:o,autoFocusDelay:s,formValues:a,onChangeHandler:i,textboxErrors:O||"",setFocus:R,onKeyDownHandler:S,surveyLayout:E??"card",translationVariables:W,isQuestionBgDark:T}),B);case"NUMBER":return n.createElement(n.Fragment,null,n.createElement(d4,{question:o,autoFocusDelay:s,formValues:a,setFocus:R,onChangeHandler:i,surveyLayout:E??"card",isQuestionBgDark:T}),B);case"FORM_FIELD":return n.createElement(n.Fragment,null,n.createElement(q5,{question:o,surveyStyle:E,isRequired:!!o.required,autoFocusDelay:s,translationVariables:W,onChangeHandler:(e,t)=>{i(e,"card"!==E&&t)},formValues:a,fieldErrors:m?.[o.name]||{},language:t||"en",isQuestionBgDark:T}),B);case"CONTACT_FORM":return n.createElement(n.Fragment,null,n.createElement(DB,{question:o,setFocus:R,autoFocusDelay:s,onChangeHandler:i,translationVariables:W,formValues:a,fieldErrors:h?.[o.name]||{},language:t||"en",isQuestionBgDark:T}),B);case"PARAGRAPH":return n.createElement(n.Fragment,null,n.createElement(TB,{showCount:!0,maxLength:1500,autoFocusDelay:s,isRequired:!!o.required,placeholder:o?.type_info?.meta?.placeholder??"",..."card"===E?{value:$??"",onChange:e=>i(e.target.value)}:{onBlur:e=>{(L($)||k($))&&(L(_)||k(_))||_===$||i?.(e.target.value,!0)},value:_??"",onChange:e=>H(e.target.value)},setFocus:R,isQuestionBgDark:T}),B);case"BOOLEAN":return n.createElement(n.Fragment,null,n.createElement(Gs,{type_info:o?.type_info,onSelect:i,value:a[o.name]}),N&&null!=a[o.name]&&n.createElement(b4,{question:o,questionCommentOnchangeHandler:c,commentsMeta:r?.[o?.name],surveyStyle:E,setFocus:R,isQuestionBgDark:T,isCommentsEnabled:N}),B);case"MESSAGE":return B;case"CONSENT":return n.createElement(n.Fragment,null,n.createElement(IB,{question:o,onChange:i,value:a[o.name]}),B);case"SLIDER":const e=o?.type_info.meta?.slider;return n.createElement(n.Fragment,null,n.createElement(EB,{defaultValue:[a[o.name]??e?.opening_position],dir:P(t)?"rtl":"ltr",answer:a[o.name],min:e?.min,max:e?.max,onValueChange:([e],t)=>i(e,"card"!==E&&t),isInput:e?.numerical_input_box,gridLines:e?.grid_lines,stopAtGrid:e?.stop_at_grid_lines,allowDecimals:e?.allow_decimal,decimalPoints:e?.decimal_points,isMobile:u||"compact"===q}),N&&null!=a[o.name]&&n.createElement(b4,{question:o,questionCommentOnchangeHandler:c,commentsMeta:r?.[o?.name],surveyStyle:E,setFocus:R,isQuestionBgDark:T,isCommentsEnabled:N}),B);case"RANK_ORDER":const{others_meta:A,...C}=a;return n.createElement(n.Fragment,null,n.createElement($N,{valueItems:C[o.name],items:o?.choices||[],onReorder:(e,t)=>i(e,"card"!==E&&t)}),B);case"DATE_TIME":return n.createElement(n.Fragment,null,"DATE_TIME"===o.type_info.meta?.question_format?n.createElement(ZS,{id:o.id??"",name:o.name??"",type:"QUESTION",displayFormat:o.type_info.meta?.format??void 0,allowOnlyFuture:o.type_info.meta?.allow_future_date||!1,useAmPm:!o.type_info.meta?.time_format,showTimezoneSelect:!!o.type_info.meta?.time_zone,onChange:e=>{i(e,!1)},fieldErrors:z?.[o.name]??[],value:a[o.name]||"",translationVariables:W,language:t||"en"}):n.createElement(YS,{allowOnlyFuture:o.type_info.meta?.allow_future_date||!1,type:"QUESTION",displayFormat:o.type_info.meta?.format??void 0,onChange:e=>{i(e,!1)},value:a[o.name]||"",translationVariables:W,language:t||"en",fieldErrors:z?.[o.name]??[]}),B);case"FILE":return n.createElement(g5,{setErrors:e=>{w({formQuestionErrors:m,textboxQuestionErrors:O,contactFormErrors:h,fileUploadErrors:e,dateQuestionErrors:z})},preview:g,onChangeHandler:i,question:o,onFileUpload:y,value:a[o.name]||"",translationVariables:W,surveyServAssetUrl:x});default:return console.error(`Question type ${o?.type_info?.question_type} not found`),null}};Fs(".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 padding: 1rem;\n align-items: center;\n}\n.freemium-survey-components.card-survey-style .question-holder .question-container .footer {\n margin-top: 24px !important;\n text-align: center;\n}\n.freemium-survey-components.card-survey-style .question-holder .question-container .footer p {\n word-break: break-word;\n}\n.freemium-survey-components.card-survey-style .questions {\n display: flex;\n flex-direction: column;\n width: var(--fsc-question-width);\n max-width: 100%;\n overflow: hidden;\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 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-container .footer-alignment {\n width: 75%;\n font-size: 1.1429em;\n text-align: center;\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.freemium-survey-components.card-survey-style .questions .question-consent-buttons button.message-button {\n word-break: break-all;\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 .question-holder.prompt .questions {\n flex: unset;\n }\n .freemium-survey-components.card-survey-style .questions {\n width: 100%;\n display: flex;\n flex-direction: column;\n padding: 16px;\n }\n .freemium-survey-components.card-survey-style .questions .question-consent-buttons button.consent-button {\n width: 90%;\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 .question-holder.prompt .questions {\n flex: unset;\n}\n.freemium-survey-components.mobile-preview.card-survey-style .questions {\n width: 100%;\n display: flex;\n flex-direction: column;\n padding: 16px;\n}\n.freemium-survey-components.mobile-preview.card-survey-style .questions .question-consent-buttons button.consent-button {\n width: 90%;\n}");const f4=({surveyServAssetUrl:e,thankYouQuestion:o,preview:a,placeholders:r,canResubmit:i,resetSurvey:c,navigateToStart:s,isMobile:l,allowMultipleSubmission:p,pivot:u,rangeToRender:d,translationVariables:b})=>{const{redirectUrl:M,redirectDelay:m,show_custom_button:z,show_review_links:h,show_social_links:f,image_url:O}=o?.type_info?.meta??{},[v,A]=t.useState(m??10),[g,y]=n.useState(!1);return t.useEffect((()=>{if(!a&&M){const e=setInterval((()=>A((e=>e>1?e-1:("undefined"!=typeof window&&(window.location.href=M??""),0)))),1e3);return()=>{clearInterval(e),y(!1)}}return()=>{y(!1)}}),[]),n.createElement("div",{className:"question-container thankyou"},O&&n.createElement("img",{className:"thankyou-logo-img",src:O,alt:"thankyou_logo"}),n.createElement(n.Fragment,null,T(o)),n.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:B({questionText:o.text,placeholders:r,npsRating:u?.answer,ratingLabel:L(u?.answer)?"":d?.find((e=>e?.value===String(u?.answer)))?.text??"",preference:u?.question.type_info?.scale_properties?.labels?.preference,isPreview:a})}}),(i||p)&&n.createElement("div",{className:("wrap-up-actions "+(l?"mobile":"")).trim()},i&&n.createElement("button",{className:"action-button",tabIndex:0,disabled:g,onClick:()=>{y(!0),s()}},n.createElement(Xs,{name:"edit"}),b?.edit_response||"Edit your response"),p&&n.createElement("button",{className:"action-button",tabIndex:0,disabled:g,onClick:()=>{y(!0),c()}},n.createElement(Xs,{name:"reload"}),b?.another_response||"Submit another response")),M&&n.createElement("div",{className:"redirection-container"},n.createElement("div",{className:"redirection-text"},H(v,b?.redirect_msg),n.createElement("br",null)),n.createElement("a",{className:"link",href:M},M)),(z||h||f)&&n.createElement(_B,{show_custom_button:z,show_review_links:h,show_social_links:f,surveyServAssetUrl:e}))},O4=({activeIndexOfRenderedStatement:e,navigateToPreviousBlock:t,canDisplayDisableButtonParams:o,navigateToNextBlock:a,translationVariables:r,setAnimationInProgress:i,animationInProgress:c,question:s})=>n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:c||ge("navigation-prev",o),className:"navigation-button",onClick:()=>{i(!0),setTimeout((()=>{i(!1)}),h),t()},title:s.name&&(e?.[s.name]??0)>0?r?.prev_statement||"go to previous statement":r?.prev_question||"go to previous question"},n.createElement(Xs,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:c||ge("navigation-next",o),title:r?.next_question||"Go to next question",onClick:()=>{i(!0),setTimeout((()=>{i(!1)}),h),a()}},n.createElement(Xs,{name:"arrow-next"}))),v4=e=>{const{initialStatementHasAnswer:o,answers:a,renderedBlocks:r,blocks:i,activeIndexOfBlocks:c,activeIndexOfRenderedStatement:s={},activeIndexOfRenderedBlocks:l,saveFormValues:p,onSubmitHandler:u,skipBlock:d,skipStatement:b,survey:M,navigateToNextBlock:m,navigateToPreviousBlock:z,isInitialTransition:f,initialPivotAnswer:O,translationVariables:v,navigateToNextStatement:A,canDisplayDisableButtonParams:g,formQuestionErrors:y,dateQuestionErrors:q,textboxQuestionErrors:w,contactFormErrors:x,questions:R,pages:C,buttonRef:P,isReverseAnimation:T,isSubmitting:N}=e,[B,$]=t.useState(!1),{question:_}=r[l],H={...g,isSubmitting:N},I=_?.type_info?.meta?.display_format,D=ie({blocks:i,activeIndexOfBlocks:c,renderedBlocks:r,activeIndexOfRenderedBlocks:l,questions:R});return n.createElement(n.Fragment,null,(he("message",H)||he("consent",H))&&n.createElement(_s,{exitBeforeEnter:!0},n.createElement(Es.div,{key:_.name??"",id:`consent-buttons-${_.name??""}`,className:"question-consent-buttons",initial:{opacity:0,x:S(e.language,T)},animate:{opacity:1,x:0},exit:{opacity:0,x:E(e.language,T)},transition:{duration:.2}},he("consent",H)&&"BUTTON"===I&&W.map((e=>n.createElement(Zs,{key:l+String(e.recordAs),onClick:()=>{$(!0),setTimeout((()=>{$(!1)}),h),p(r[l],e.recordAs,!0)},disabled:B||ge("consent",H),variant:L(a.formValues?.[_.name])||a.formValues?.[_.name]===e.recordAs?"primary":"secondary",className:("consent-button "+(a.formValues?.[_.name]===e.recordAs?"selected":"")).trim()},_?.type_info?.scale_properties?.labels?.values?.[e.id]||e.defaultValue))),he("message",H)&&n.createElement(Zs,{onClick:()=>{$(!0),setTimeout((()=>{$(!1)}),h),D?u("COMPLETE"):d()},disabled:B||ge("message",H),className:"message-button"},_?.type_info?.scale_properties?.labels?.values?.[0]||"Begin"))),(he("navigation",H)||he("next",H)||he("next-statement",H)||he("submit",H)||he("skip",H)||he("skip-statement",H))&&n.createElement("div",{className:"question-footer"},he("navigation",H)?n.createElement(O4,{animationInProgress:B,setAnimationInProgress:$,answers:a,canDisplayDisableButtonParams:H,activeIndexOfBlocks:c,activeIndexOfRenderedBlocks:l,renderedBlocks:r,initialStatementHasAnswer:o,blocks:i,activeIndexOfRenderedStatement:s,navigateToNextBlock:m,navigateToPreviousBlock:z,translationVariables:v,pages:C,question:_}):n.createElement("div",null),n.createElement("div",{className:"action-buttons"},he("skip",H)&&n.createElement(Zs,{className:"skip-button",onClick:()=>{$(!0),setTimeout((()=>{$(!1)}),h),d()},variant:"secondary","aria-label":"skip question",disabled:B||N},e?.survey?.meta?.action_button?.skip||v?.actionButtonText?.skip||v?.skip||"Skip"),he("skip-statement",H)&&n.createElement(Zs,{className:"skip-button",onClick:()=>{$(!0),setTimeout((()=>{$(!1)}),h),b()},"aria-label":"skip statement",variant:"secondary",disabled:B||N},e?.survey?.meta?.action_button?.skip||v?.actionButtonText?.skip||v?.skip||"Skip"),he("next",H)&&n.createElement(Zs,{ref:P,onClick:()=>{$(!0),setTimeout((()=>{$(!1)}),h),0!==l||!f||"RANGE"!==_.type_info?.question_type&&"BOOLEAN"!==_.type_info?.question_type||_.type_info?.is_question_comment||void 0===O?p(r[l],"CHECKBOX"===_?.type_info?.meta?.display_format&&"CONSENT"===_?.type_info?.question_type?a.formValues[_.name]??!1:a.formValues[_.name],!0):p(r[l],O,!0)},disabled:B||ge("next",H),className:"next-button"},e?.survey?.meta?.action_button?.next||v?.actionButtonText?.next||v?.next||"Next"),he("next-statement",H)&&n.createElement(Zs,{ref:P,onClick:()=>{$(!0),setTimeout((()=>{$(!1)}),h),A?.(_.name)},disabled:B||!!ge("next-statement",H),className:"next-button"},e?.survey?.meta?.action_button?.next||v?.actionButtonText?.next||v?.next||"Next"),he("submit",H)&&n.createElement("div",{className:"submit"},n.createElement(Zs,{ref:P,disabled:B||ge("submit",H),onClick:()=>{k(q?.[_.name])&&k(y?.[_.name])&&k(w?.[_.name])&&k(x?.[_.name])&&($(!0),setTimeout((()=>{$(!1)}),h),u("COMPLETE"))}},M?.meta?.action_button?.submit||v?.actionButtonText?.submit||v?.submit_survey||"Submit")))))},A4=e=>{const{blocks:o,pages:a,activePage:r,renderedBlocks:i,activeBlock:c,activeIndexOfBlocks:s,activeIndexOfRenderedBlocks:l,isSurveyCompleted:p,isReverseAnimation:u,saveFormValues:d,saveOthersValue:b,skipBlock:M,skipStatement:m,onSubmitHandler:z,navigateToNextBlock:h,navigateToPreviousBlock:f,answers:O,questions:v,pivot:A,isInitialTransition:g,resetSurvey:y,activeIndexOfRenderedStatement:q,navigateToNextStatement:w,navigateToPreviousStatement:W,navigateToStart:x,translationVariables:R,initialStatementHasAnswer:C,dateQuestionErrors:T,formQuestionErrors:H,textboxQuestionErrors:I,contactFormErrors:D,fileUploadErrors:X,setErrors:V,expanded:F,setExpanded:U,isQuestionBgDark:G,isSubmitting:Y}=Ne(e);j("Card",{...e,answers:O,activePage:r,activeBlock:c,renderedBlocks:i,activeIndexOfBlocks:s,activeIndexOfRenderedBlocks:l,activeIndexOfRenderedStatement:q});const Z=t.useRef(null),K=k(O.formValues)&&e.survey.prompt_settings?.is_enabled&&e.preview,[J,Q]=t.useState(K),ee=n.useMemo((()=>N(A?.question)),[A?.question]),te=t.useMemo((()=>o.filter((({name:e},t,n)=>!le({nextBlockName:e||"",blocks:n,questions:v}))).length),[o,v]);t.useEffect((()=>{c&&e.onBlockChange?.(c,r)}),[c,e]),t.useEffect((()=>{e.survey.theme&&_(e.survey.theme)}),[e.survey.theme]),t.useEffect((()=>{e.getSurveyProgress?.({totalBlocks:te,isSurveyCompleted:p,noOfAnswers:s})}),[te,p,s]);const ne={answers:O,blocks:o,blockIndex:l,activeIndexOfBlocks:s,initialStatementHasAnswer:C,activeIndexOfRenderedBlocks:l,activeIndexOfRenderedStatement:q,renderedBlocks:i,isMobile:!!e.isMobile,surveyStyle:e.surveyStyle,isWidget:!!e.isWidget,initialPivotAnswer:e.initialPivotAnswer,isInitialTransition:g,questions:v,pages:a,activeIndexOfSet:0,branchSeparatePage:!1};return c&&c.question?n.createElement("div",{className:`freemium-survey-components card-survey-style ${P(e.language||"en")?"freemium-survey-rtl":"freemium-survey-ltr"} ${e.isMobile?"mobile-preview":""}`.trim(),id:"freemium-survey",style:{...$(e.survey.theme||{})}},n.createElement("div",{className:("question-holder "+(J?"prompt":"")).trim()},!p&&!J&&!e.isWidget&&a.length>0&&r?.page_id&&n.createElement(NB,{expanded:F,id:r.page_id,setExpanded:U,activePage:r,translationVariables:R}),n.createElement("div",{className:"questions"},p?n.createElement(f4,{surveyServAssetUrl:e.surveyServAssetUrl??"",thankYouQuestion:ce({pivotQn:A?.question,pivotQnAnswer:A?.answer,block:pe({activeBlock:c,blocks:e.survey.blocks?.filter((e=>!e.is_deleted)),answers:O,questions:v,activeIndexOfBlocks:s,renderedBlocks:i,contactData:e.contactData,surveyLayout:"card",pages:a}),questions:v}),canResubmit:e.canResubmit,allowMultipleSubmission:e.allowMultipleSubmission,navigateToStart:()=>{e.handleAction?e.handleAction("EDIT_RESPONSE",x):x()},resetSurvey:()=>{e.handleAction?e.handleAction("RE_SUBMIT",y):y()},preview:!!e.preview,placeholders:e.placeholders,isMobile:e.isMobile,pivot:A,rangeToRender:ee,translationVariables:R}):n.createElement(n.Fragment,null,!J&&e.isWidget&&a.length>0&&r?.page_id&&n.createElement(NB,{expanded:F,id:r.page_id,setExpanded:U,activePage:r,translationVariables:R}),n.createElement(_s,{exitBeforeEnter:!0},n.createElement(Es.div,{id:`${c.question.name}`,className:"question-container","data-test-question-name":c.question.name,key:`${c.question.name}`,initial:{opacity:0,x:S(e.language,u)},animate:{opacity:1,x:0},exit:{opacity:0,x:E(e.language,u)},transition:{duration:.2}},J&&e.survey.prompt_settings?n.createElement(BB,{config:e.survey.prompt_settings,onSelect:t=>{e.onAnsweringPrompt?.(t),1===t&&Q(!1)},placeholders:e.placeholders,isPreview:!!e.preview}):n.createElement(n.Fragment,null,n.createElement("div",{className:("question-text "+(c.required?"required":"")).trim(),dangerouslySetInnerHTML:{__html:B({questionText:c?.question.text,placeholders:e.placeholders,npsRating:A?.answer,ratingLabel:L(A?.answer)?"":ee?.find((e=>e?.value===String(A?.answer)))?.text??"",preference:A?.question.type_info?.scale_properties?.labels?.preference,isPreview:!!e.preview})},"aria-label":`question-${l}`,role:"heading","aria-level":1}),n.createElement(h4,{setFocus:!0,onKeyDown:e=>{"Enter"===e.key&&Z.current&&Z.current.click()},isReverseAnimation:u,preview:!!e.preview,surveyServAssetUrl:e.surveyServAssetUrl,setErrors:V,onFileUpload:e.onFileUpload,language:e.language||"en",surveyStyle:e.surveyStyle,surveyLanguage:e.survey.language,block:c,question:c.question,isFinalQn:ie({blocks:o,activeIndexOfBlocks:s,renderedBlocks:i,activeIndexOfRenderedBlocks:l,questions:v}),formValues:O.formValues,othersMeta:O.others,autoFocusDelay:"standard"===e.surveyStyle?350:0,activeIndexOfRenderedStatement:q,saveOthersValue:b,onChangeHandler:(e,t)=>{d(c,e,t)},isMobile:!!e.isMobile,initialPivotAnswer:e.initialPivotAnswer,initialQuestionAnswer:e.initialQuestionAnswer,isInitialTransition:g,formQuestionErrors:H,dateQuestionErrors:T,textboxQuestionErrors:I,fileUploadErrors:X,contactFormErrors:D,translationVariables:R,isQuestionBgDark:G})))),!J&&n.createElement(v4,{isWidget:!1,language:e.language||"en",isReverseAnimation:u,surveyStyle:e.surveyStyle,canDisplayDisableButtonParams:ne,answers:O,renderedBlocks:i,blocks:o,pages:a,activeIndexOfRenderedStatement:q,buttonRef:Z,survey:e.survey,initialStatementHasAnswer:C,navigateToNextStatement:w,navigateToPreviousStatement:W,activeIndexOfRenderedBlocks:l,activeIndexOfBlocks:s,saveFormValues:d,skipBlock:M,skipStatement:m,onSubmitHandler:z,navigateToPreviousBlock:f,navigateToNextBlock:h,isInitialTransition:g,initialPivotAnswer:e.initialPivotAnswer,isMobile:!!e.isMobile,translationVariables:R,formQuestionErrors:H,dateQuestionErrors:T,textboxQuestionErrors:I,fileUploadErrors:X,contactFormErrors:D,questions:v,isSubmitting:Y})))),n.createElement(gu,{...e.footerProps,surveyStyle:e.surveyStyle,bgColor:e.survey.theme?.palette?.survey_background??$B})):null},g4=e=>{const o=!!e.survey.meta?.branch_separate_page,a=e.survey.question_details?.questions||[],r=e.contactData||{},i=e.translationVariables||{},c=t.useRef({}),[s,l]=t.useState(e.survey?.blocks?.filter((e=>"TY"!==e.name&&!e.is_deleted))),[p,u]=t.useState({formQuestionErrors:{},textboxQuestionErrors:{},fileUploadErrors:{},contactFormErrors:{},dateQuestionErrors:{}}),[d,b]=t.useState(!1),[M,m]=t.useState(0),[z,h]=t.useState(e.survey.pages??[]),[O,v]=t.useState(z?.[0]),[A,g]=t.useState(!1),y=t.useMemo((()=>xe({pages:z,blocks:s,questions:a,initialPivotAnswer:e.initialPivotAnswer,responses:e.answers,answerStatus:e.answerStatus||"PARTIAL",branchSeparatePage:o})),[s,a,e.answers]),[q,w]=t.useState(y.renderedBlocks),[W,x]=t.useState(y.activeIndexOfRenderedBlocks),[R,C]=t.useState(0),[P,S]=t.useState(y.activeIndexOfRenderedStatement),E=t.useRef(y.pivot),T=t.useRef(y.isInitialTransition),[N,B]=t.useState(""),[$,_]=t.useState(y.answers),H=t.useRef(((y.isConsideredCompleted||"PARTIAL"===e.answerStatus)&&e.canResubmit)??!1),[I,D]=t.useState(!1),X=q[W],V=n.useMemo((()=>q.length>0?s?.findIndex((e=>e.name===q[W]?.name)):0),[W]),G=t.useMemo((()=>{const t=e.survey.theme?.palette?.question_background;return!!t&&F(t)}),[e.survey.theme?.palette?.question_background]);t.useEffect((()=>{e.survey.updated_at!==N&&(j("useEffect",{updated_at:e.survey.updated_at,props:e}),h(e.survey.pages??[]),l(e.survey.blocks?.filter((e=>"TY"!==e.name&&!e.is_deleted))),v(e.survey.pages?.[0]),B(e.survey.updated_at??""))}),[e.survey.updated_at]),t.useEffect((()=>{j("useEffect",{renderedBlocks:q,pages:z,activeIndexOfRenderedBlocks:W,props:e});const t=q?.[W]?.page_id,n=z.find((e=>e.page_id===t));z.length>0&&t&&n?.page_id&&v(n),void 0!==q?.[W]?.orderOfSet&&o&&C(q?.[W]?.orderOfSet)}),[q,z,W]),t.useEffect((()=>{j("useEffect",{blocks:s,initialPivotAnswer:e.initialPivotAnswer,props:e});let t={...$};if(y.isConsideredCompleted&&T.current&&e.canResubmit)return;const{others_meta:n,...i}=e.answers||{};E.current={...E.current,question:ae({questions:a,blocks:s})};const l=a.find((e=>e.name===s?.[0]?.question_name||e.name===s?.[0]?.question_names?.[0]))??E.current.question;if(k(i)||void 0===e.initialPivotAnswer||i[l.name]===e.initialPivotAnswer||(t={...$,formValues:{...$.formValues,[l.name]:e.initialPivotAnswer},moveToNextPage:!0}),void 0!==e.initialPivotAnswer){const n=re(E.current.question,e.initialPivotAnswer);E.current={...E.current,answer:"BOOLEAN"===l?.type_info?.question_type?Boolean(n):n},t={...$,formValues:{...$.formValues,[l.name]:E.current.answer},moveToNextPage:!1}}else void 0!==e.initialQuestionAnswer&&(t={...$,formValues:{...$.formValues,[l.name]:e.initialQuestionAnswer},moveToNextPage:!1});_(t);const p=ce({pivotQn:E.current.question,pivotQnAnswer:E.current.answer,block:s[0],questions:a}),u=we({activeBlock:{...s[0],question:p},blocks:s,questions:a,answers:t,pages:z,pivot:{question:E.current.question,answer:E.current.answer},renderedBlocks:q,contactData:r,surveyLayout:"standard",initialTransition:!0,isEditResponse:H.current,branchSeparatePage:o}),d=[{...s[0],question:p},...u];if(w(o?U(d,c):d),(e=>{if(null==e||0===Object.keys(e).length)return!0;const t=Object.keys(e).filter((e=>""!==e&&!L(e)&&"others_meta"!==e));return t.every((t=>!e[t]))&&(!e.others_meta||0===Object.keys(e.others_meta).length)})({others_meta:{},...t.formValues})||T.current)x(s.findIndex((e=>d[0].name===e.name))),C(0);else{const e=d?.[d.length-1];x(d.findIndex((t=>t.name===e?.name))),o&&C(e?.orderOfSet!==R?e?.orderOfSet:0)}S({})}),[s,e.initialPivotAnswer,M]);t.useEffect((()=>{if(j("useEffect",{answers:$,blocks:s,props:e}),!(y.isConsideredCompleted&&T.current&&e.canResubmit)&&(!k($.formValues)||$.moveToNextPage)&&s&&Y(X,$.commitDirtyValue))if(ze({blocks:s,activeIndexOfBlocks:V,renderedBlocks:q,activeIndexOfRenderedBlocks:W,answers:$,questions:a,activePage:O,pages:z,surveyLayout:"standard"})){if(void 0!==e.initialPivotAnswer&&1===q.length&&T.current&&!$.commitDirtyValue);else if($.commitDirtyValue){const t=be({renderedBlocks:q,activeBlock:X,blocks:s,activeIndexOfBlocks:V,answers:$,questions:a,contactData:r,pages:z,surveyLayout:"standard"});if(t!==1/0)T.current||!X.question.type_info?.question_type||X.question.type_info?.is_question_comment||["FORM_FIELD","MULTI_SELECT","RANK_ORDER"].includes(X.question.type_info?.question_type)?Z():(e=>{e!==1/0&&setTimeout((()=>{const t=ce({pivotQn:E.current?.question,pivotQnAnswer:E.current?.answer,block:s?.[e],questions:a});if(t?.name){const e=document.querySelector(`.question-container.standard-card-${t.name}`),n=document.querySelector(`.question-container.standard-card-${t.name} input`),o=document.querySelector(`.question-container.standard-card-${t.name} textarea`);e?.scrollIntoView({behavior:"smooth",block:"center",inline:"start"}),setTimeout((()=>{n?.focus(),o?.focus()}),f)}Z()}),0)})(t),($.moveToNextPage||!o||void 0!==e.initialPivotAnswer&&e.initialPivotAnswer!==$?.[E.current?.question?.name??""])&&((e,t)=>{if(e===1/0)return;const n=ce({pivotQn:E.current?.question,pivotQnAnswer:E.current?.answer,block:s?.[e],questions:a}),i=qe({renderedBlocks:q,activeIndexOfRenderedBlocks:W}),l=s?.[e],p=we({activeBlock:{...l,question:n},answers:$,blocks:s,pivot:E.current,questions:a,pages:z,renderedBlocks:q,contactData:r,surveyLayout:"standard",isEditResponse:H.current,branchSeparatePage:o}),u=[...i,...n?.name?[{...l,question:n}]:[],...p];S((e=>{const t={...e};return u.forEach((e=>{"MATRIX_RATING_SCALE"===e.question.type_info?.question_type&&(t[e.question.name]=0)})),t}));const d=o?U(u,c):u;w(d),t||x(i.length)})(t,!$.moveToNextPage&&!o);else{he("submit",{answers:$,blocks:s,blockIndex:0,activeIndexOfBlocks:V,initialStatementHasAnswer:J,activeIndexOfRenderedBlocks:W,activeIndexOfRenderedStatement:P,renderedBlocks:q,activePage:O,isMobile:!!e.isMobile,surveyStyle:e.surveyStyle,isWidget:!!e.isWidget,initialPivotAnswer:e.initialPivotAnswer,isInitialTransition:T.current,questions:a,pages:z,contactData:e.contactData,activeIndexOfSet:R,branchSeparatePage:o,isSubmitting:A})||Z("COMPLETE")}}}else("MATRIX_RATING_SCALE"===X?.question?.type_info?.question_type||$.commitDirtyValue)&&Z()}),[$,s]);const Y=(e,t)=>{if(e?.question_name)switch(e.question?.type_info?.question_type){case"DATE_TIME":return!t||Ce({answer:$.formValues?.[e.question_name]||"",errorSetter:u,questionName:e.question_name,errors:p,translationVariables:i});case"FORM_FIELD":return Le({fields:e.question?.type_info?.form_fields?.fields,answers:$.formValues?.[e.question_name]||{},errorSetter:u,questionName:e.question_name,errors:p,translationVariables:i});case"TEXT":return ke({type:e.question?.type_info?.text_field?.text_type,answer:$.formValues?.[e.question_name]||"",errorSetter:u,questionName:e.question_name,errors:p,translationVariables:i});case"CONTACT_FORM":return Pe({fields:e.question?.type_info?.contact_form?.fields,answers:$.formValues?.[e.question_name]||{},errorSetter:u,questionName:e.question_name,errors:p,translationVariables:i});case"FILE":return Se({errors:p.fileUploadErrors})||!e.required}return!0},Z=(t="PARTIAL")=>{let n=()=>{},o=0;if(q.some(((e,t)=>(o=t,!Y(e,!0)))))return void x(o);let i={...$.formValues};if("COMPLETE"===t){g(!0),n=()=>{g(!1),D(!0),H.current=!1};i=Ee({pages:z,answers:{...$,formValues:i},blocks:s,questions:a,contactData:r,surveyLayout:"standard"})}e.onSubmit({...i,others_meta:$.others},n,t,H.current?"EDIT":"CREATE")},K=e=>{S((t=>({...t,[e]:(L(t[e])?0:t[e])+1})))},J=n.useMemo((()=>{if("MATRIX_RATING_SCALE"!==X?.question?.type_info?.question_type)return!1;const e=X?.question?.type_info?.matrix_properties?.statements||[],t=e?.[P?.[X?.question.name]]??0,n=($.formValues[X?.question.name]||[]).find((e=>e.statement_id===t?.id));return(n?.rating_labels||[]).length>0}),[P,W]);return{blocks:s,pages:z,navigateToNextSet:()=>{const e=q.find((e=>e.orderOfSet===R+1));o&&void 0!==e?.orderOfSet&&C(e?.orderOfSet);const t=z.find((t=>t.page_id===e?.page_id));t?.page_id&&v(t),_((e=>({...e,moveToNextPage:!0})))},navigateToPreviousSet:()=>{const e=q.find((e=>e.orderOfSet===R-1));o&&void 0!==e?.orderOfSet&&C((e=>e-1));const t=z.find((t=>t.page_id===e?.page_id));t?.page_id&&v(t)},activePage:O,questions:a,renderedBlocks:q,initialStatementHasAnswer:J,activeBlock:X,activeIndexOfBlocks:V,activeIndexOfRenderedBlocks:W,activeIndexOfRenderedStatement:P,navigateToNextStatement:K,navigateToPreviousStatement:e=>{S((t=>({...t,[e]:(L(t[e])?0:t[e])-1})))},isInitialTransition:T.current,isSurveyCompleted:I,pivot:E.current,answers:$,translationVariables:i,...p,setErrors:u,saveFormValues:(e,t,n=!1,o=W)=>{if(A)return;T.current=!1,e.question.name===E.current?.question.name&&(E.current={...E.current,answer:"BOOLEAN"===E.current?.question?.type_info?.question_type?Boolean(t):t}),o!==W&&x(o);const a={...$,formValues:{...$.formValues,[e.question.name]:"BOOLEAN"===e.question?.type_info?.question_type?Boolean(t):t},commitDirtyValue:n,moveToNextPage:!1};We((({renderedBlocks:e,activeIndexOfRenderedBlocks:t})=>qe({renderedBlocks:e,activeIndexOfRenderedBlocks:t}).map((({question:e})=>e)))({renderedBlocks:q,activeIndexOfRenderedBlocks:o}),a),H.current&&(e.category??[]).length>0&&(e.category?.forEach((e=>{e.question_name&&(a.formValues[e.question_name]=null)})),a.formValues[e.question.name]=t),_(a);const r=q[o];"SINGLE_ANSWER"===r.question.type_info?.matrix_properties?.type&&(P?.[r.question.name]??0)<(r.question?.type_info?.matrix_properties?.statements||[]).length-1&&setTimeout((()=>{K?.(r.question.name)}),0)},saveOthersValue:(e,t,n=W)=>{if(n!==W&&x(n),null===t){const t={...$.others};delete t[e],_({...$,commitDirtyValue:!1,others:t,moveToNextPage:!1})}else _({...$,commitDirtyValue:!1,others:{...$.others,[e]:t},moveToNextPage:!1})},clearRadioSelection:e=>{x(e);const t=q[e].question;t.type_info?.pivot_question&&(E.current={question:t,answer:void 0}),delete $.formValues[t.name],delete $.others[t.name],"DATE_TIME"===t.type_info?.question_type&&p.dateQuestionErrors?.[t.name]&&u((e=>{const n={...e.dateQuestionErrors};return delete n[t.name],{...e,dateQuestionErrors:n}}));const n=ye({renderedBlocks:q,activeIndexOfRenderedBlocks:e,answers:$}),i={...n,formValues:{...n.formValues},moveToNextPage:!1,commitDirtyValue:!1},l=we({activeBlock:q[e],blocks:s,questions:a,answers:i,pages:z,pivot:E.current?.question?.name?{question:E.current.question,answer:E.current.answer}:null,renderedBlocks:q,contactData:r,surveyLayout:"standard",isEditResponse:H.current,branchSeparatePage:o});S((e=>{const t={...e};return l.forEach((e=>{"MATRIX_RATING_SCALE"===e.question.type_info?.question_type&&(t[e.question.name]=0)})),t}));const d=[...q.slice(0,e+1),...l];w(o?U(d,c):d),_(i)},onSubmitHandler:Z,navigateToStart:()=>{H.current=!0,D(!1),S({}),x(0),o&&("number"==typeof q?.[0].orderOfSet?C(q?.[0].orderOfSet):C(0))},isValidQuestion:Y,resetSurvey:()=>{D(!1),m((e=>e+1)),_({formValues:{},others:{},commitDirtyValue:!1,moveToNextPage:!1}),Te(localStorage)},moveToNextPage:e=>{const t={};e&&z.length>0&&q.forEach((e=>{O?.page_id!==e.page_id||o&&R!==e.orderOfSet||"MESSAGE"===e.question.type_info?.question_type||(t[e.question.name]=null)}));const n=q.filter((e=>O?.page_id===e?.page_id)),a=n[n.length-1],r=q.findIndex((e=>e.name===a?.name));W!==r&&x(r),setTimeout((()=>{_((e=>({...e,formValues:{...e.formValues,...t},commitDirtyValue:!0,moveToNextPage:!0})))}),0)},moveToNextSet:e=>{const t={};e&&q.forEach((e=>{O?.page_id!==e.page_id||o&&R!==e.orderOfSet||(t[e.question.name]=null)}));const n=q.filter((e=>O?.page_id===e?.page_id&&(!o||R===e.orderOfSet))),a=n[n.length-1],r=q.findIndex((e=>e.name===a?.name));x(r),setTimeout((()=>{_((e=>({...e,formValues:{...e.formValues,...t},commitDirtyValue:!0,moveToNextPage:!0})))}),0)},setIsSubmitting:g,isSubmitting:A,expanded:d,setExpanded:b,activeIndexOfSet:R,setActiveRenderedBlockIndex:x,isQuestionBgDark:G}};Fs(':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-standard-max-width: 900px;\n --fsc-question-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\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 li,\n.freemium-survey-components li {\n list-style-position: inside;\n}\n.surveyserv-widget-container *,\n.freemium-survey-components * {\n box-sizing: border-box;\n}\n.surveyserv-widget-container .questions .question-container,\n.freemium-survey-components .questions .question-container {\n position: relative;\n text-align: left;\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.1429em;\n font-weight: 400;\n line-height: 1.6;\n letter-spacing: 0.3px;\n color: var(--question-text-color, var(--default-question-text-color));\n position: relative;\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 p strong,\n.freemium-survey-components .questions .question-container .question-text p strong {\n font-weight: bold;\n}\n.surveyserv-widget-container .questions .question-container .question-text strong,\n.freemium-survey-components .questions .question-container .question-text strong {\n font-weight: bold;\n}\n.surveyserv-widget-container .questions .question-container .question-text .placeholder-tag > span,\n.freemium-survey-components .questions .question-container .question-text .placeholder-tag > span {\n display: none !important;\n}\n.surveyserv-widget-container .questions .question-container .question-text.required:has(p) p:last-child:after,\n.freemium-survey-components .questions .question-container .question-text.required:has(p) p:last-child:after {\n content: "*";\n position: absolute;\n color: #d72d30;\n}\n.surveyserv-widget-container .questions .question-container .question-text.required:not(:has(p))::after,\n.freemium-survey-components .questions .question-container .question-text.required:not(:has(p))::after {\n content: "*";\n position: absolute;\n color: #d72d30;\n}\n.surveyserv-widget-container .questions .question-footer,\n.freemium-survey-components .questions .question-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px;\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 height: 40px;\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 .action-buttons button.fsc-button,\n.freemium-survey-components .action-buttons button.fsc-button {\n height: max-content;\n min-width: 80px;\n word-break: break-word;\n text-align: center;\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: unset !important;\n gap: 24px;\n}\n.surveyserv-widget-container .question-container.thankyou img.thankyou-logo-img,\n.freemium-survey-components .question-container.thankyou img.thankyou-logo-img {\n height: 100px;\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.4286em;\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 word-break: break-word;\n line-height: 1.6;\n color: var(--question-text-color, var(--default-question-text-color));\n width: 75%;\n}\n.surveyserv-widget-container .question-container.thankyou .text a,\n.freemium-survey-components .question-container.thankyou .text a {\n color: #2c5cc5;\n -webkit-text-decoration: none;\n text-decoration: none;\n}\n.surveyserv-widget-container .question-container.thankyou .text a:hover,\n.freemium-survey-components .question-container.thankyou .text a:hover {\n -webkit-text-decoration: underline;\n text-decoration: underline;\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: #2c5cc5;\n font-weight: 500;\n text-decoration: unset;\n}\n.surveyserv-widget-container .question-container.thankyou .redirection-container .link:hover,\n.freemium-survey-components .question-container.thankyou .redirection-container .link:hover {\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\n@media (max-width: 550px) {\n .freemium-survey-components .question-container.thankyou {\n overflow: unset !important;\n }\n .freemium-survey-components .question-container.thankyou .redirection-container,\n .freemium-survey-components .question-container.thankyou .footer-alignment,\n .freemium-survey-components .question-container.thankyou .text {\n width: unset !important;\n }\n .freemium-survey-components .question-container.thankyou .redirection-container .placeholder-tag > span,\n .freemium-survey-components .question-container.thankyou .footer-alignment .placeholder-tag > span,\n .freemium-survey-components .question-container.thankyou .text .placeholder-tag > span {\n display: none !important;\n }\n}\n.freemium-survey-components.mobile-preview .question-container.thankyou {\n overflow: unset !important;\n}\n.freemium-survey-components.mobile-preview .question-container.thankyou .redirection-container,\n.freemium-survey-components.mobile-preview .question-container.thankyou .footer-alignment,\n.freemium-survey-components.mobile-preview .question-container.thankyou .text {\n width: unset !important;\n}\n.freemium-survey-components.mobile-preview .question-container.thankyou .redirection-container .placeholder-tag > span,\n.freemium-survey-components.mobile-preview .question-container.thankyou .footer-alignment .placeholder-tag > span,\n.freemium-survey-components.mobile-preview .question-container.thankyou .text .placeholder-tag > span {\n display: none !important;\n}\n\n.freemium-survey-ltr,\n.freemium-survey-ltr * {\n direction: ltr !important;\n}\n\n.freemium-survey-rtl,\n.freemium-survey-rtl * {\n direction: rtl;\n}\n.freemium-survey-rtl .checkbox-button-value,\n.freemium-survey-rtl * .checkbox-button-value {\n padding: 16px 16px 16px 40px !important;\n}\n.freemium-survey-rtl span.label-text:first-child,\n.freemium-survey-rtl * span.label-text:first-child {\n text-align: right !important;\n}\n.freemium-survey-rtl span.label-text:last-child,\n.freemium-survey-rtl * span.label-text:last-child {\n text-align: left !important;\n}\n.freemium-survey-rtl th.m-s-b-s-q-m-s-th-empty,\n.freemium-survey-rtl th.m-s-b-s-q-m-s-input,\n.freemium-survey-rtl td.m-s-b-s-q-m-s-input,\n.freemium-survey-rtl * th.m-s-b-s-q-m-s-th-empty,\n.freemium-survey-rtl * th.m-s-b-s-q-m-s-input,\n.freemium-survey-rtl * td.m-s-b-s-q-m-s-input {\n right: 0 !important;\n}\n.freemium-survey-rtl .progressbar,\n.freemium-survey-rtl * .progressbar {\n transform-origin: right !important;\n}\n.freemium-survey-rtl .widget-progressbar,\n.freemium-survey-rtl * .widget-progressbar {\n right: 12px !important;\n width: -moz-fit-content;\n width: fit-content;\n}\n.freemium-survey-rtl .navigation-button,\n.freemium-survey-rtl * .navigation-button {\n transform: rotate(180deg);\n}\n.freemium-survey-rtl button.radio-button-value,\n.freemium-survey-rtl .file-error,\n.freemium-survey-rtl .page-container,\n.freemium-survey-rtl .PhoneInputInput,\n.freemium-survey-rtl .question-container,\n.freemium-survey-rtl td.m-s-b-s-q-m-s-input,\n.freemium-survey-rtl span.fsc-input-helper,\n.freemium-survey-rtl * button.radio-button-value,\n.freemium-survey-rtl * .file-error,\n.freemium-survey-rtl * .page-container,\n.freemium-survey-rtl * .PhoneInputInput,\n.freemium-survey-rtl * .question-container,\n.freemium-survey-rtl * td.m-s-b-s-q-m-s-input,\n.freemium-survey-rtl * span.fsc-input-helper {\n text-align: right !important;\n}\n.freemium-survey-rtl .fsc-dropdown-trigger span:first-child,\n.freemium-survey-rtl * .fsc-dropdown-trigger span:first-child {\n text-align: right !important;\n}\n.freemium-survey-rtl .binary-question,\n.freemium-survey-rtl .prompt-actions,\n.freemium-survey-rtl * .binary-question,\n.freemium-survey-rtl * .prompt-actions {\n direction: ltr !important;\n}\n.freemium-survey-rtl .PhoneInputCountrySelectArrow,\n.freemium-survey-rtl * .PhoneInputCountrySelectArrow {\n margin-right: var(--PhoneInputCountrySelectArrow-marginLeft) !important;\n}\n.freemium-survey-rtl .item-wrapper .item-content,\n.freemium-survey-rtl * .item-wrapper .item-content {\n text-align: right !important;\n}\n.freemium-survey-rtl .mobile button.checkbox-button-value,\n.freemium-survey-rtl .mobile .all-label-text,\n.freemium-survey-rtl .mobile .PhoneInputInput,\n.freemium-survey-rtl .mobile button.radio-button-value,\n.freemium-survey-rtl .compact-style button.checkbox-button-value,\n.freemium-survey-rtl .compact-style .all-label-text,\n.freemium-survey-rtl .compact-style .PhoneInputInput,\n.freemium-survey-rtl .compact-style button.radio-button-value,\n.freemium-survey-rtl * .mobile button.checkbox-button-value,\n.freemium-survey-rtl * .mobile .all-label-text,\n.freemium-survey-rtl * .mobile .PhoneInputInput,\n.freemium-survey-rtl * .mobile button.radio-button-value,\n.freemium-survey-rtl * .compact-style button.checkbox-button-value,\n.freemium-survey-rtl * .compact-style .all-label-text,\n.freemium-survey-rtl * .compact-style .PhoneInputInput,\n.freemium-survey-rtl * .compact-style button.radio-button-value {\n text-align: right !important;\n}');Fs(".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 margin: 0 auto;\n}\n.freemium-survey-components.standard-survey-style .questions {\n max-width: var(--fsc-standard-max-width);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n padding: 24px;\n flex: 1;\n scroll-behavior: smooth;\n}\n.freemium-survey-components.standard-survey-style .questions.sec-btn {\n overflow: auto;\n}\n.freemium-survey-components.standard-survey-style .thankyou-container {\n padding: 2rem;\n max-width: var(--fsc-standard-max-width);\n width: 100%;\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:not(:last-child),\n.freemium-survey-components.standard-survey-style .question-container .question-text:not(:last-child) {\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 .question-container.thankyou .footer,\n.freemium-survey-components.standard-survey-style .question-container .footer {\n margin-top: 24px !important;\n text-align: center;\n}\n.freemium-survey-components.standard-survey-style .question-container.thankyou .footer p,\n.freemium-survey-components.standard-survey-style .question-container .footer p {\n word-break: break-word;\n}\n.freemium-survey-components.standard-survey-style .question-container.thankyou .footer-alignment,\n.freemium-survey-components.standard-survey-style .question-container .footer-alignment {\n width: 75%;\n font-size: 1.1429em;\n text-align: center;\n}\n.freemium-survey-components.standard-survey-style .survey-footer {\n padding: 1rem;\n width: 100%;\n}\n.freemium-survey-components.standard-survey-style .page-actions {\n max-width: var(--fsc-standard-max-width);\n padding: 24px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.freemium-survey-components.standard-survey-style .questions,\n.freemium-survey-components.standard-survey-style .page-actions {\n width: 100%;\n}\n.freemium-survey-components.standard-survey-style .page-action-buttons {\n display: flex;\n gap: 8px;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components.standard-survey-style .page-actions {\n flex-wrap: wrap;\n gap: 8px;\n }\n .freemium-survey-components.standard-survey-style .page-actions .page-action-buttons {\n justify-content: end;\n flex-wrap: wrap;\n gap: 8px;\n }\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 .question-container.thankyou,\n .freemium-survey-components.standard-survey-style .question-container {\n width: 100%;\n }\n .freemium-survey-components.standard-survey-style .question-container.thankyou .question-footer .question-consent-buttons,\n .freemium-survey-components.standard-survey-style .question-container .question-footer .question-consent-buttons {\n flex: 1;\n }\n .freemium-survey-components.standard-survey-style .action-buttons {\n flex-direction: column;\n }\n .freemium-survey-components.standard-survey-style .action-buttons button.consent-button {\n width: 100%;\n height: unset;\n min-height: 40px;\n }\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .page-actions {\n flex-wrap: wrap;\n gap: 8px;\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .page-actions .page-action-buttons {\n justify-content: end;\n flex-wrap: wrap;\n gap: 8px;\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 .question-container.thankyou,\n.freemium-survey-components.standard-survey-style.mobile-preview .question-container {\n width: 100%;\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .question-container.thankyou .question-footer .question-consent-buttons,\n.freemium-survey-components.standard-survey-style.mobile-preview .question-container .question-footer .question-consent-buttons {\n flex: 1;\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .action-buttons {\n flex-direction: column;\n}\n.freemium-survey-components.standard-survey-style.mobile-preview .action-buttons button.consent-button {\n width: 100%;\n height: unset;\n min-height: 40px;\n}");const y4=["next","next-statement","next-page","next-set","skip","skip-statement","skip-page","skip-set","submit","navigation","set-navigation","clear-selection","message","consent","navigation-prev","navigation-next","navigation-page-prev","navigation-page-next","previous-matrix-statement","next-matrix-statement","navigation-set-prev","navigation-set-next"],q4=({translationVariables:e,canDisplayDisableButtonParams:t,navigateToNextSet:o,navigateToPreviousSet:a})=>n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:ge("navigation-set-prev",t),className:"navigation-button",onClick:a,title:e?.prev_question??"go to previous question"},n.createElement(Xs,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:ge("navigation-set-next",t),title:e?.next_question||"Go to next question",onClick:o},n.createElement(Xs,{name:"arrow-next"}))),w4=({surveyServAssetUrl:e,thankYouQuestion:o,preview:a,placeholders:r,canResubmit:i,allowMultipleSubmission:c,navigateToStart:s,resetSurvey:l,isMobile:p,pivot:u,rangeToRender:d,translationVariables:b})=>{const{redirectUrl:M,redirectDelay:m,image_url:z,show_custom_button:h,show_review_links:f,show_social_links:O}=o?.type_info?.meta??{},[v,A]=t.useState(m??10),[g,y]=n.useState(!1);return t.useEffect((()=>{if(!a&&M){const e=setInterval((()=>A((e=>e>1?e-1:("undefined"!=typeof window&&(window.location.href=M??""),0)))),1e3);return()=>{clearInterval(e),y(!1)}}return()=>{y(!1)}}),[]),n.createElement("div",{className:"thankyou-container"},n.createElement("div",{className:"question-container thankyou"},z&&n.createElement("img",{className:"thankyou-logo-img",src:z,alt:"thankyou_logo"}),n.createElement(n.Fragment,null,T(o)),n.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:B({questionText:o.text,placeholders:r,npsRating:u?.answer,ratingLabel:L(u?.answer)?"":d?.find((e=>e?.value===String(u?.answer)))?.text??"",preference:u?.question.type_info?.scale_properties?.labels?.preference,isPreview:a})}}),(i||c)&&n.createElement("div",{className:("wrap-up-actions "+(p?"mobile":"")).trim()},i&&n.createElement("button",{className:"action-button",tabIndex:0,disabled:g,onClick:()=>{y(!0),s()}},n.createElement(Xs,{name:"edit"}),b?.edit_response||"Edit your response"),c&&n.createElement("button",{className:"action-button",tabIndex:0,disabled:g,onClick:()=>{y(!0),l()}},n.createElement(Xs,{name:"reload"}),b?.another_response||"Submit another response")),M&&n.createElement(n.Fragment,null,n.createElement("div",{className:"redirection-text"},H(v,b?.redirect_msg),n.createElement("br",null)),n.createElement("a",{className:"link",href:M},M)),n.createElement(_B,{show_custom_button:h,show_review_links:f,show_social_links:O,surveyServAssetUrl:e})))},W4=e=>{const{blockIndex:t,renderedBlocks:o,activeIndexOfRenderedBlocks:a,translationVariables:r,saveFormValues:i,answers:c,clearRadioSelection:s,canDisplayDisableButtonParams:l,navigateToNextStatement:p,navigateToPreviousStatement:u,isSubmitting:d}=e,b={};y4.forEach((e=>{b[e]=!!he(e,l)}));const M=o[t??a],{question:m}=M,z=m?.type_info?.meta?.display_format;return b?.consent||b?.["previous-matrix-statement"]||b?.["next-matrix-statement"]||b?.["clear-selection"]||b?.message?n.createElement("div",{className:"question-footer"},n.createElement("div",null,(b?.["previous-matrix-statement"]||b?.["next-matrix-statement"])&&n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:ge("previous-matrix-statement",l),className:"navigation-button",onClick:()=>{u(m.name)},title:r?.prev_question??"go to previous question"},n.createElement(Xs,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:ge("next-matrix-statement",l),title:r?.next_question||"Go to next question",onClick:()=>{p(m.name)}},n.createElement(Xs,{name:"arrow-next"})))),n.createElement("div",{className:("action-buttons "+(b.consent?"question-consent-buttons":"")).trim()},b?.["clear-selection"]&&n.createElement(Zs,{className:"sec-button",variant:"secondary",onClick:()=>s(t),disabled:d},e?.survey?.meta?.action_button?.clear_selection||r?.actionButtonText?.clear_selection||r?.clear_selection||"Clear selection"),b?.consent&&"BUTTON"===z&&W.map((e=>n.createElement(Zs,{key:a+String(e.recordAs),onClick:()=>{i(M,e.recordAs,!1,t)},disabled:ge("consent",l),variant:L(c.formValues?.[m.name])||c.formValues?.[m.name]===e.recordAs?"primary":"secondary",className:("consent-button "+(c.formValues?.[m.name]===e.recordAs?"selected":"")).trim()},m?.type_info?.scale_properties?.labels?.values?.[e.id]??e.defaultValue))))):null},x4=e=>{const{pages:o,activePage:a,navigateToNextSet:r,navigateToPreviousSet:i,isInitialTransition:c,blocks:s,renderedBlocks:l,activeBlock:p,activeIndexOfBlocks:u,activeIndexOfRenderedBlocks:d,isSurveyCompleted:b,translationVariables:M,saveFormValues:m,saveOthersValue:z,clearRadioSelection:h,onSubmitHandler:f,answers:O,questions:v,resetSurvey:A,initialStatementHasAnswer:g,navigateToStart:y,activeIndexOfRenderedStatement:q,navigateToNextStatement:w,navigateToPreviousStatement:W,pivot:x,formQuestionErrors:R,dateQuestionErrors:C,textboxQuestionErrors:S,contactFormErrors:E,fileUploadErrors:T,setErrors:H,isSubmitting:I,setIsSubmitting:D,moveToNextSet:X,expanded:V,setExpanded:F,activeIndexOfSet:U,isValidQuestion:G,setActiveRenderedBlockIndex:Y,isQuestionBgDark:Z}=g4(e);j("Standard",{...e,answers:O,activePage:a,activeBlock:p,renderedBlocks:l,activeIndexOfSet:U,activeIndexOfBlocks:u,activeIndexOfRenderedBlocks:d,activeIndexOfRenderedStatement:q});const K=!!e.survey.meta?.branch_separate_page,J=t.useRef(null),Q=t.useRef({}),ee=t.useRef(null),te=t.useMemo((()=>N(x?.question)),[x?.question]),ne=t.useMemo((()=>s.filter((({name:e},t,n)=>!le({nextBlockName:e||"",blocks:n,questions:v}))).length),[s,v]),oe=k(O.formValues)&&e.survey.prompt_settings?.is_enabled&&e.preview,[ae,re]=t.useState(oe),se=l.filter((e=>a?.page_id===e?.page_id));if(t.useEffect((()=>{const t=Object.keys(O.formValues).length;e.getSurveyProgress?.({totalBlocks:ne,isSurveyCompleted:b,noOfAnswers:b||t>ne?ne:t})}),[ne,O,b]),t.useEffect((()=>{e.survey.theme&&_(e.survey.theme)}),[e.survey.theme]),t.useEffect((()=>{setTimeout((()=>{ee.current&&Object.keys(O.formValues).length&&ee.current?.scrollIntoView({inline:"start",block:"start",behavior:"smooth"})}),0),p&&e.onBlockChange?.(p,a)}),[a?.page_id]),!p||!p.question)return null;const{question:ue}=l[d],de={answers:O,blocks:s,blockIndex:0,activeIndexOfBlocks:u,initialStatementHasAnswer:g,activeIndexOfRenderedBlocks:d,activeIndexOfRenderedStatement:q,renderedBlocks:l,activePage:a,isMobile:!!e.isMobile,surveyStyle:e.surveyStyle,isWidget:!!e.isWidget,initialPivotAnswer:e.initialPivotAnswer,isInitialTransition:c,questions:v,pages:o,contactData:e.contactData,activeIndexOfSet:U,branchSeparatePage:K,isSubmitting:I},Me={};y4.forEach((e=>{Me[e]=!!he(e,de)}));const me=l[l.length-1];return n.createElement("div",{className:`freemium-survey-components ${P(e.language||"en")?"freemium-survey-rtl":"freemium-survey-ltr"} ${e.isMobile?"mobile-preview":""} standard-survey-style`,id:"freemium-survey",ref:ee,style:{...$(e.survey.theme||{})}},ae&&e.survey.prompt_settings?n.createElement("div",{className:"questions"},n.createElement("div",{className:"question-container"},n.createElement(BB,{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,b?n.createElement(w4,{surveyServAssetUrl:e.surveyServAssetUrl??"",thankYouQuestion:ce({pivotQn:x?.question,pivotQnAnswer:x?.answer,block:pe({activeBlock:me,blocks:e.survey.blocks?.filter((e=>!e.is_deleted)),answers:O,questions:v,activeIndexOfBlocks:s.findIndex((e=>e.name===me.name)),renderedBlocks:l,contactData:e.contactData,surveyLayout:"standard",pages:o}),questions:v}),preview:!!e.preview,placeholders:e.placeholders,pivot:{...x,question:x?.question||{name:""},answer:x?.answer},rangeToRender:te,canResubmit:e.canResubmit,isMobile:e.isMobile,allowMultipleSubmission:e.allowMultipleSubmission,translationVariables:M,navigateToStart:()=>{e.handleAction?e.handleAction("EDIT_RESPONSE",(()=>{D(!1),y()})):(D(!1),y())},resetSurvey:()=>{e.handleAction?e.handleAction("RE_SUBMIT",(()=>{D(!1),A()})):(D(!1),A())}}):n.createElement(n.Fragment,null,o.length>0&&a?.page_id&&n.createElement(NB,{expanded:V,id:a.page_id,setExpanded:F,activePage:a,translationVariables:M}),n.createElement("div",{className:("questions "+(e?.secBtnTxt?"sec-btn":"")).trim()},l.map(((t,r)=>{if(o.length>0&&a?.page_id!==t?.page_id||e.survey.meta?.branch_separate_page&&t.orderOfSet!==U)return null;const i=se.findIndex((e=>e.name===t.name)),b=be({renderedBlocks:l,activeBlock:p,blocks:s,activeIndexOfBlocks:u,answers:O,questions:v,contactData:e.contactData,pages:o,surveyLayout:"standard"});return n.createElement(Es.div,{id:t.question.name,key:t.question.name,ref:J,className:`question-container standard-card-${t.question.name}`,"data-test-question-name":p.question.name,initial:{opacity:0},animate:{opacity:1,x:0},exit:{opacity:0},transition:{duration:.2,delay:i?i/15:0},..."MULTI_SELECT"===p.question.type_info?.question_type&&b!==1/0&&-1!==b&&void 0!==O.formValues?.[t.question.name]&&Q.current[t.question.name]!==O.formValues?.[t.question.name]?{onMouseLeave:()=>{m(t,O.formValues?.[t.question.name],!0,r),Q.current[t.question.name]=O.formValues?.[t.question.name]}}:{}},n.createElement("div",{className:`question-text ${t.required?"required":""} ${0===r?"nps":""}`.trim(),dangerouslySetInnerHTML:{__html:B({questionText:t.question.text,placeholders:e.placeholders,npsRating:x?.answer,ratingLabel:L(x?.answer)?"":te?.find((e=>e?.value===String(x?.answer)))?.text??"",preference:x?.question.type_info?.scale_properties?.labels?.preference,isPreview:!!e.preview})},"aria-label":`question-${r}`,role:"heading","aria-level":1}),n.createElement(h4,{surveyServAssetUrl:e.surveyServAssetUrl,fileUploadErrors:T,setErrors:H,onFileUpload:e.onFileUpload,block:t,preview:!!e.preview,surveyLanguage:e.survey.language,language:e.language||"en",question:t.question,surveyStyle:e.surveyStyle,isFinalQn:ie({blocks:s,activeIndexOfBlocks:u,renderedBlocks:l,activeIndexOfRenderedBlocks:d,questions:v}),formValues:O.formValues,othersMeta:O.others,isMobile:!!e.isMobile,autoFocusDelay:20,activeIndexOfRenderedStatement:q,saveOthersValue:(e,t)=>{z(e,t,r)},onChangeHandler:(e,n)=>{const o=t.question.type_info?.question_type;m(t,e,!!o&&["RANGE","DROPDOWN","BOOLEAN"].includes(o)||n,r)},initialPivotAnswer:e.initialPivotAnswer,initialQuestionAnswer:e.initialQuestionAnswer,formQuestionErrors:R,dateQuestionErrors:C,textboxQuestionErrors:S,contactFormErrors:E,translationVariables:M,isQuestionBgDark:Z}),"MESSAGE"!==t.question.type_info?.question_type&&n.createElement(W4,{canDisplayDisableButtonParams:{...de,blockIndex:r},language:e.language||"en",isWidget:!1,surveyStyle:e.surveyStyle,answers:O,renderedBlocks:l,blocks:s,pages:o,survey:e.survey,blockIndex:r,isInitialTransition:c,activeIndexOfRenderedBlocks:d,initialStatementHasAnswer:g,navigateToNextStatement:w,navigateToPreviousStatement:W,activeIndexOfRenderedStatement:q,activeIndexOfBlocks:u,saveFormValues:m,isMobile:!!e.isMobile,clearRadioSelection:h,initialPivotAnswer:e.initialPivotAnswer,translationVariables:M,formQuestionErrors:R,dateQuestionErrors:C,textboxQuestionErrors:S,contactFormErrors:E,fileUploadErrors:T,questions:v,isSubmitting:I}))}))),n.createElement("div",{className:"page-actions"},n.createElement("div",null,Me["set-navigation"]&&n.createElement(q4,{answers:O,canDisplayDisableButtonParams:de,activeIndexOfBlocks:u,pages:o,activeIndexOfRenderedBlocks:d,renderedBlocks:l,initialStatementHasAnswer:g,blocks:s,activeIndexOfRenderedStatement:q,translationVariables:M,navigateToPreviousSet:i,navigateToNextSet:r})),n.createElement("div",{className:"page-action-buttons"},e?.secBtnTxt&&n.createElement(Zs,{variant:"secondary",onClick:()=>{e?.handleSecondaryAction?.({answers:O.formValues,survey:e.survey})},"aria-label":"secondary-action",disabled:I},e.secBtnTxt),Me["skip-set"]&&n.createElement(Zs,{variant:"secondary",onClick:()=>{X(!0)},"aria-label":"skip set",disabled:I},e?.survey?.meta?.action_button?.skip||M?.actionButtonText?.skip||M?.skip||"Skip"),Me?.["next-set"]&&n.createElement(Zs,{onClick:()=>{X()},disabled:!!ge("next-set",de),className:"next-set"},e?.survey?.meta?.action_button?.next||M?.actionButtonText?.next||M?.next||"Next"),Me.submit&&n.createElement(Zs,{disabled:!!ge("submit",de),onClick:()=>{let e=0;l.some(((t,n)=>(e=n,!G(t,!0))))?Y(e):k(C?.[ue.name])&&k(R?.[ue.name])&&k(S?.[ue.name])&&k(T?.[ue.name])&&k(E?.[ue.name])&&f("COMPLETE")}},e?.survey?.meta?.action_button?.submit||M?.actionButtonText?.submit||M?.submit_survey||"Submit"))))),!e.secBtnTxt&&n.createElement(gu,{...e.footerProps,surveyStyle:e.surveyStyle,bgColor:e.survey.theme?.palette?.secondary_background??$B}))},R4=e=>n.createElement("svg",{width:"11",height:"10",viewBox:"0 0 11 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("rect",{opacity:"0.01",x:"0.166748",width:"10",height:"10",fill:"white",fillOpacity:"0.01"}),n.createElement("path",{d:"M1.85044 1.68284L8.48309 8.31549",stroke:"#264966",strokeWidth:"1.5",strokeLinecap:"round"}),n.createElement("path",{d:"M8.48309 1.68284L1.85044 8.31549",stroke:"#264966",strokeWidth:"1.5",strokeLinecap:"round"})),L4=e=>n.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{clipPath:"url(#clip0_8207_70478)"},n.createElement("rect",{width:"10",height:"10",fill:"white",fillOpacity:"0.01"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.62499 3.19375C8.62499 3.4 8.79374 3.56875 8.99999 3.56875C9.20624 3.56875 9.37499 3.4 9.37499 3.19375V1C9.37499 0.79375 9.20624 0.625 8.99999 0.625H6.80624C6.59999 0.625 6.43124 0.79375 6.43124 1C6.43124 1.20625 6.59999 1.375 6.80624 1.375H8.09377L5.66876 3.80001C5.52501 3.95001 5.52501 4.18751 5.66876 4.33126C5.73751 4.40626 5.83751 4.44376 5.93126 4.44376V4.45001C6.02501 4.45001 6.11876 4.41251 6.19376 4.33751L8.62499 1.90628V3.19375ZM1 9.37501H1.00738H3.19375C3.4 9.37501 3.56875 9.20626 3.56875 9.00001C3.56875 8.79376 3.4 8.62501 3.19375 8.62501H1.90626L4.3375 6.19376C4.48125 6.04376 4.48125 5.80626 4.3375 5.66251C4.1875 5.51876 3.95 5.51876 3.80625 5.66251L1.375 8.09376V6.80626C1.375 6.60001 1.20625 6.43126 1 6.43126C0.79375 6.43126 0.625 6.60001 0.625 6.80626V9.00001C0.625 9.20626 0.79375 9.37501 1 9.37501Z",fill:"#264966"})),n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_8207_70478"},n.createElement("rect",{width:"10",height:"10",fill:"white"})))),C4=e=>n.createElement("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M7.3 1.4H0.7C0.313401 1.4 0 1.0866 0 0.699999C0 0.3134 0.313401 0 0.7 0H7.3C7.6866 0 8 0.3134 8 0.699999C8 1.0866 7.6866 1.4 7.3 1.4Z",fill:"#264966"}));Fs("@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.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 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.message-button {\n word-break: break-all;\n}\n.surveyserv-widget-container.compact-container-style .compact-footer-container button.consent-buttons, .surveyserv-widget-container.compact-container-style .compact-footer-container > button {\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 max-width: 1000px;\n min-width: 800px;\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.8571em;\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 main.widget-main {\n max-height: calc(100vh - 128px);\n overflow: auto;\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: 12px 0;\n}\n.surveyserv-widget-container main.widget-main .question-container .heading {\n width: 100%;\n}\n.surveyserv-widget-container main.widget-main .question-container .heading .footer-alignment {\n width: 75%;\n font-size: 1.1429em;\n text-align: center;\n}\n.surveyserv-widget-container main.widget-main .question-container .heading .footer {\n font-weight: 400;\n text-align: center;\n margin: 1rem auto 0 auto;\n line-height: 1.5;\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.surveyserv-widget-container main.widget-main .question-container .heading .footer p {\n margin: unset;\n word-break: break-word;\n}\n.surveyserv-widget-container main.widget-main .question-container .heading .footer:empty {\n display: none;\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 .question-footer,\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 footer.widget-footer {\n white-space: nowrap;\n flex-wrap: wrap;\n font-size: 0.8571em;\n overflow: auto;\n background-color: var(--background-color, #f8f8f8);\n display: flex;\n gap: 8px;\n justify-content: space-between;\n align-items: center;\n padding: 12px;\n}\n.surveyserv-widget-container footer.widget-footer a {\n color: var(--question-text-color, var(--default-question-text-color));\n font-size: 0.8571em;\n display: grid;\n place-content: center;\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n.surveyserv-widget-container footer.widget-footer.survey-footer-dark a {\n color: #bedbf5;\n}\n.surveyserv-widget-container footer.widget-footer.survey-footer-dark a:hover {\n color: #ffffff;\n}\n.surveyserv-widget-container footer.widget-footer.survey-footer-light a {\n color: #2c5cc5;\n}\n.surveyserv-widget-container footer.widget-footer.survey-footer-light a:hover {\n color: #c58af9;\n}\n.surveyserv-widget-container footer.widget-footer div.footer-text {\n display: flex;\n align-items: center;\n gap: 6px;\n}");const k4=({surveyServAssetUrl:e,thankYouQuestion:o,placeholders:a,canResubmit:r,navigateToStart:i,resetSurvey:c,widgetStyle:s,allowMultipleSubmission:l,pivot:p,rangeToRender:u,translationVariables:d,isQuestionBgDark:b})=>{const{show_custom_button:M,show_review_links:m,show_social_links:z,image_url:h}=o?.type_info?.meta??{},[f,O]=n.useState(!1);return t.useEffect((()=>()=>{O(!1)}),[]),n.createElement("div",{className:"question-container thankyou"},h&&n.createElement("img",{className:"thankyou-logo-img",src:h,alt:"thankyou_logo"}),n.createElement("div",{className:h?"heading":"heading thankyou-image"},n.createElement(n.Fragment,null,T(o))),n.createElement("div",{className:h?"text":"text thankyou-image",dangerouslySetInnerHTML:{__html:B({questionText:o.text,placeholders:a,npsRating:p?.answer,ratingLabel:L(p?.answer)?"":u?.find((e=>e?.value===String(p?.answer)))?.text??"",preference:p?.question.type_info?.scale_properties?.labels?.preference})}}),(r||l)&&n.createElement("div",{className:`wrap-up-actions ${h?"":"thank-you-image"} ${"compact"===s?"mobile":""}`.trim()},r&&n.createElement("button",{className:"action-button",tabIndex:0,disabled:f,onClick:()=>{O(!0),i()}},n.createElement(Xs,{name:"edit"}),d?.edit_response||"Edit your response"),l&&n.createElement("button",{className:"action-button",tabIndex:0,disabled:f,onClick:()=>{O(!0),c()}},n.createElement(Xs,{name:"reload"}),d?.another_response||"Submit another response")),n.createElement(_B,{show_custom_button:M,show_review_links:m,show_social_links:z,surveyServAssetUrl:e}))},P4=({translationVariables:e,activeIndexOfRenderedStatement:t,navigateToPreviousBlock:o,navigateToNextBlock:a,question:r,canDisplayDisableButtonParams:i,animationInProgress:c,setAnimationInProgress:s})=>n.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},n.createElement("button",{disabled:c||!!ge("navigation-prev",i),className:"navigation-button",onClick:()=>{s(!0),setTimeout((()=>{s(!1)}),h),o()},title:r.name&&(t?.[r.name]??0)>0?e?.prev_statement||"go to previous statement":e?.prev_question||"go to previous question"},n.createElement(Xs,{name:"arrow-previous"})),n.createElement("button",{className:"navigation-button",disabled:c||!!ge("navigation-next",i),onClick:()=>{s(!0),setTimeout((()=>{s(!1)}),h),a()},title:e?.next_question||"go to next question"},n.createElement(Xs,{name:"arrow-next"}))),S4=e=>{const{widgetStyle:o,answers:a,initialStatementHasAnswer:r,renderedBlocks:i,blocks:c,activeIndexOfBlocks:s,navigateToNextStatement:l,activeIndexOfRenderedBlocks:p,translationVariables:u,saveFormValues:d,activeIndexOfRenderedStatement:b={},onSubmitHandler:M,skipBlock:m,skipStatement:z,navigateToNextBlock:f,navigateToPreviousBlock:O,formQuestionErrors:v,dateQuestionErrors:A,textboxQuestionErrors:g,fileUploadErrors:y,contactFormErrors:q,canDisplayDisableButtonParams:w,pages:x,setFooterElementRef:R,isSubmitting:C}=e,[P,S]=t.useState(!1),{question:E}=i[p],T=E?.type_info?.question_type,N={...w,isSubmitting:C},B=(e=!1)=>{const t=e?[...W].reverse():[...W];return he("consent",N)&&"BUTTON"===_&&t.map((e=>n.createElement(Zs,{key:p+String(e.id),onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),d(i[p],e.recordAs,!0)},disabled:P||ge("consent",N),variant:L(a.formValues?.[E.name])||a.formValues?.[E.name]===e.recordAs?"primary":"secondary",className:("consent-button "+(a.formValues?.[E.name]===e.recordAs?"selected":"")).trim()},E?.type_info?.scale_properties?.labels?.values?.[e.id]||e.defaultValue)))},$="compact"===o&&(he("navigation",N)&&he("skip",N)||"CONSENT"===T||"MESSAGE"===T),_=E?.type_info?.meta?.display_format;return n.createElement(n.Fragment,null,(he("navigation",N)||he("next",N)||he("next-statement",N)||he("consent",N)||he("submit",N)||he("skip",N)||he("skip-statement",N)||he("message",N))&&n.createElement("div",{className:"question-footer",ref:e=>e?R?.(e):null},$?n.createElement("div",{className:"compact-footer-container"},he("next",N)&&n.createElement(Zs,{onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),d(i[p],"CHECKBOX"===E?.type_info?.meta?.display_format&&"CONSENT"===E?.type_info?.question_type?a.formValues[E.name]??!1:a.formValues[E.name],!0)},disabled:P||!!ge("next",N),className:"next-button"},e?.survey?.meta?.action_button?.next||u?.next||"Next"),he("message",N)&&n.createElement(Zs,{onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),m()},disabled:P||ge("message",N),className:"message-button"},E?.type_info?.scale_properties?.labels?.values?.[0]||"Begin"),he("submit",N)&&n.createElement("div",{className:"submit"},n.createElement(Zs,{disabled:P||!!ge("submit",N),onClick:()=>{k(A?.[E.name])&&k(v?.[E.name])&&k(g?.[E.name])&&k(y?.[E.name])&&k(q?.[E.name])&&(S(!0),setTimeout((()=>{S(!1)}),h),M("COMPLETE"))}},e?.survey?.meta?.action_button?.submit||u?.actionButtonText?.submit||u?.submit_survey||"Submit")),he("next-statement",N)&&n.createElement(Zs,{onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),l?.(E.name)},disabled:P||!!ge("next-statement",N),className:"next-button"},e?.survey?.meta?.action_button?.next||u?.actionButtonText?.next||u?.next||"Next"),B(),n.createElement("div",{className:"compact-footer-layout"},n.createElement(P4,{animationInProgress:P,setAnimationInProgress:S,answers:a,canDisplayDisableButtonParams:N,pages:x,activeIndexOfBlocks:s,activeIndexOfRenderedBlocks:p,renderedBlocks:i,initialStatementHasAnswer:r,blocks:c,activeIndexOfRenderedStatement:b,question:E,translationVariables:u,navigateToNextBlock:f,navigateToPreviousBlock:O}),"MESSAGE"!==T&&!c[s].required&&n.createElement(Zs,{className:"skip-button",onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),m()},variant:"secondary","aria-label":"skip question",disabled:P},e?.survey?.meta?.action_button?.skip||u?.actionButtonText?.skip||u?.skip||"Skip"))):n.createElement(n.Fragment,null,he("navigation",N)?n.createElement(P4,{animationInProgress:P,setAnimationInProgress:S,answers:a,pages:x,canDisplayDisableButtonParams:N,activeIndexOfBlocks:s,activeIndexOfRenderedBlocks:p,activeIndexOfRenderedStatement:b,renderedBlocks:i,blocks:c,question:E,initialStatementHasAnswer:r,translationVariables:u,navigateToNextBlock:f,navigateToPreviousBlock:O}):n.createElement("div",null),n.createElement("div",{className:"action-buttons"},he("skip",N)&&n.createElement(Zs,{className:"skip-button",variant:"secondary",onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),m()},"aria-label":"skip question",disabled:P},e?.survey?.meta?.action_button?.skip||u?.actionButtonText?.skip||u?.skip||"Skip"),he("skip-statement",N)&&n.createElement(Zs,{className:"skip-button",variant:"secondary",onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),z()},"aria-label":"skip statement",disabled:P},e?.survey?.meta?.action_button?.skip||u?.actionButtonText?.skip||u?.skip||"Skip"),B(!0),he("next",N)&&n.createElement(Zs,{onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),d(i[p],"CHECKBOX"===E?.type_info?.meta?.display_format&&"CONSENT"===E?.type_info?.question_type?a.formValues[E.name]??!1:a.formValues[E.name],!0)},disabled:P||!!ge("next",N),className:"next-button"},e?.survey?.meta?.action_button?.next||u?.actionButtonText?.next||u?.next||"Next"),he("next-statement",N)&&n.createElement(Zs,{onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),l?.(E.name)},disabled:P||!!ge("next-statement",N),className:"next-button"},e?.survey?.meta?.action_button?.next||u?.actionButtonText?.next||u?.next||"Next"),he("submit",N)&&n.createElement("div",{className:"submit"},n.createElement(Zs,{disabled:P||!!ge("submit",N),onClick:()=>{k(A?.[E.name])&&k(v?.[E.name])&&k(g?.[E.name])&&k(y?.[E.name])&&k(q?.[E.name])&&(S(!0),setTimeout((()=>{S(!1)}),h),M("COMPLETE"))}},e?.survey?.meta?.action_button?.submit||u?.actionButtonText?.submit||u?.submit_survey||"Submit")),he("message",N)&&n.createElement(Zs,{onClick:()=>{S(!0),setTimeout((()=>{S(!1)}),h),m()},disabled:P||ge("message",N),className:"next-button"},E?.type_info?.scale_properties?.labels?.values?.[0]||"Begin")))))},E4=e=>{const{pages:o,activePage:a,blocks:r,renderedBlocks:i,activeBlock:c,activeIndexOfBlocks:s,activeIndexOfRenderedBlocks:l,isSurveyCompleted:p,isReverseAnimation:u,translationVariables:d,saveFormValues:b,saveOthersValue:M,skipBlock:m,skipStatement:z,initialStatementHasAnswer:h,onSubmitHandler:f,navigateToNextBlock:O,activeIndexOfRenderedStatement:A,navigateToNextStatement:g,navigateToPreviousStatement:y,navigateToPreviousBlock:q,answers:w,questions:W,resetSurvey:x,navigateToStart:R,pivot:C,formQuestionErrors:P,dateQuestionErrors:T,textboxQuestionErrors:$,fileUploadErrors:_,contactFormErrors:H,setErrors:I,expanded:D,setExpanded:X,isQuestionBgDark:V,isSubmitting:F}=Ne({...e,isWidget:!0});j("Widget",{...e,renderedBlocks:i,activeIndexOfBlocks:s,answers:w,activeIndexOfRenderedBlocks:l,activeBlock:c});const[U,G]=t.useState(null),[Y,Z]=t.useState(null),[K,J]=t.useState(null),[Q,ee]=t.useState(0),te=n.useMemo((()=>N(C?.question)),[C?.question]),ne=k(w.formValues)&&e.survey.prompt_settings?.is_enabled,[oe,ae]=t.useState(ne),re=t.useRef(ne?-1:l),se=()=>{if(null===U||!U||"undefined"==typeof window||"undefined"==typeof document)return;const t=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)-(Y?.scrollHeight??0)-(K?.scrollHeight??0)-164,n=Math.min(U?.scrollHeight,Math.min(v[e.widgetStyle],t));Q!==n&&ee(n)};t.useEffect((()=>{setTimeout((()=>{se()}),0)}),[oe,p,U,A[c?.question?.name],l,K,D]),t.useEffect((()=>{"MATRIX_RATING_SCALE"===c?.question?.type_info?.question_type&&setTimeout((()=>{se()}),0)}),[A[c?.question?.name]]),t.useEffect((()=>{e.loadAsNewSurvey&&e.handleAction&&e.handleAction("RE_SUBMIT",x)}),[]),t.useEffect((()=>{e.setCurrentSurveyState?.({question:i[l]?.question,npsScore:C?.answer})}),[l,C?.answer]),t.useEffect((()=>{l!==re.current&&(re.current=-1)}),[l]);const le={answers:w,blocks:r,blockIndex:l,activeIndexOfBlocks:s,initialStatementHasAnswer:h,activeIndexOfRenderedBlocks:l,activeIndexOfRenderedStatement:A,renderedBlocks:i,isMobile:!!e.isMobile,surveyStyle:"card",isWidget:!0,questions:W,pages:o,contactData:e.contactData,activeIndexOfSet:0,branchSeparatePage:!1};if(!c||!c?.question)return null;const ue=p?r.length:s+(p?1:0),de=p?100:(ue>0?100/r.length:0)*ue;return n.createElement("div",{className:`freemium-survey-components widget-survey-components\n ${e.widgetStyle}-style`.trim(),id:"freemium-survey"},p||oe||!e.survey.meta?.progress_bar?null:n.createElement("div",{className:"widget-progressbar"},n.createElement("div",{className:"progress-completion"},de.toFixed(),"%"),n.createElement(KS,{totalSteps:r.length,completedSteps:s+(p?1:0),isWidget:!0})),!oe&&!e.minimized&&o.length>0&&a?.page_id&&!p&&n.createElement(NB,{ref:e=>e?J(e):null,expanded:D,id:a.page_id,setExpanded:X,activePage:a,translationVariables:d}),n.createElement("div",{className:"questions",style:{...ne&&oe||re.current===l?{transition:"none"}:{}}},n.createElement(_s,{exitBeforeEnter:!0},n.createElement(Es.div,{id:`${c.question.name}`,className:`question-container ${p?"thankyou":""} ${oe?"prompt-container":""}`.trim(),"data-test-question-name":c.question.name,key:`${c.question.name}`,initial:{opacity:0,x:S(e.language,u)},animate:{opacity:1,x:0},exit:{opacity:0,x:E(e.language,u)},transition:{duration:.2}},n.createElement("div",{className:"animation-container",style:{height:e.minimized?0:Q>0&&!D?`${Q}px`:"auto"}},n.createElement("div",{className:"scroll-container",ref:e=>e?G(e):null},oe&&e.survey.prompt_settings?n.createElement(BB,{config:e.survey.prompt_settings,onSelect:t=>{e.onAnsweringPrompt(t),1===t&&ae(!1)},placeholders:e.placeholders}):n.createElement(n.Fragment,null,p?n.createElement(k4,{surveyServAssetUrl:e.surveyServAssetUrl??"",thankYouQuestion:ce({pivotQn:C?.question,pivotQnAnswer:C?.answer,block:pe({activeBlock:c,blocks:e.survey.blocks?.filter((e=>!e.is_deleted)),answers:w,questions:W,activeIndexOfBlocks:s,renderedBlocks:i,contactData:e.contactData,surveyLayout:"card",pages:o}),questions:W}),placeholders:e.placeholders,canResubmit:e.canResubmit,widgetStyle:e.widgetStyle,navigateToStart:()=>{e.handleAction?e.handleAction("EDIT_RESPONSE",R):R()},resetSurvey:()=>{e.handleAction?e.handleAction("RE_SUBMIT",x):x()},allowMultipleSubmission:e.allowMultipleSubmission,pivot:C,rangeToRender:te,translationVariables:d,isQuestionBgDark:V}):n.createElement(n.Fragment,null,n.createElement("div",{className:`question-text ${!c.question.type_info?.pivot_question&&c.required?"required":""} ${"RANGE"===c?.question?.type_info?.question_type?"range-question-text":""}`.trim(),dangerouslySetInnerHTML:{__html:B({questionText:c?.question.text,placeholders:e.placeholders,npsRating:C?.answer,ratingLabel:L(C?.answer)?"":te?.find((e=>e?.value===String(C?.answer)))?.text??"",preference:C?.question.type_info?.scale_properties?.labels?.preference})},"aria-label":`question-${l}`,role:"heading","aria-level":1}),"MESSAGE"!==c.question.type_info?.question_type&&n.createElement("div",{className:"question-wrapper",onTransitionEndCapture:e=>e.stopPropagation()},n.createElement(h4,{setFocus:!0,surveyStyle:"card",isReverseAnimation:u,language:e?.language||"en",surveyServAssetUrl:e.surveyServAssetUrl,fileUploadErrors:_,setErrors:I,onFileUpload:e.onFileUpload,surveyLanguage:e.survey.language,block:c,question:c.question,isFinalQn:ie({blocks:r,activeIndexOfBlocks:s,renderedBlocks:i,activeIndexOfRenderedBlocks:l,questions:W}),formValues:w.formValues,widgetStyle:e.widgetStyle,isMobile:!1,othersMeta:w.others,autoFocusDelay:0,activeIndexOfRenderedStatement:A,isWidget:!0,saveOthersValue:(e,t)=>{M(e,t),setTimeout((()=>{se()}),0)},onChangeHandler:e=>{setTimeout((()=>{se()}),0),b(c,e)},formQuestionErrors:P,dateQuestionErrors:T,textboxQuestionErrors:$,contactFormErrors:H,translationVariables:d,isQuestionBgDark:V})))))))),!p&&!oe&&n.createElement(S4,{pages:o,isWidget:!0,language:e.language||"en",widgetStyle:e.widgetStyle,setFooterElementRef:Z,surveyStyle:"standard",answers:w,survey:e.survey,canDisplayDisableButtonParams:{...le,blockIndex:l,activeIndexOfRenderedBlocks:l},isMobile:!1,renderedBlocks:i,initialStatementHasAnswer:h,activeIndexOfRenderedStatement:A,blocks:r,activeIndexOfRenderedBlocks:l,navigateToNextStatement:g,navigateToPreviousStatement:y,activeIndexOfBlocks:s,translationVariables:d,saveFormValues:b,skipBlock:m,skipStatement:z,onSubmitHandler:f,navigateToPreviousBlock:q,navigateToNextBlock:O,formQuestionErrors:P,dateQuestionErrors:T,textboxQuestionErrors:$,fileUploadErrors:_,contactFormErrors:H,questions:W,isSubmitting:F})))},T4={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}},N4=({language:e="en",survey:o,preview:a,placeholders:r,contactData:i,overRideComponent:c,onSubmit:s,onDismiss:l,onClose:p,isMobile:u,surveyType:d,unsubscribeUrl:b,isSurveyCompleted:M,children:m=null,answerStatus:z,loadSurveyCollapsed:h=!1,handleAction:f,answers:O,onAnsweringPrompt:v,allowMultipleSubmission:A,loadAsNewSurvey:g,canResubmit:y,translationVariables:q,surveyServAssetUrl:w,surveyPoweredBy:W,onFileUpload:x,isQuestionBgDark:R})=>{const L=o.question_details?.questions||[],[C,S]=t.useState(),[E,T]=t.useState(!1),[H,I]=t.useState(h),[D,V]=t.useState(!1),{theme:j}=o,[U,G]=t.useState(null),Y=n.useMemo((()=>((e=[])=>{const t=e.sort(((e,t)=>Number(e.order)-Number(t.order)));return t.find((e=>!e.is_deleted))??t[0]})(o.blocks||[])),[o.blocks]),Z=Y?.question_name?Y?.question_name??"":Y?.category?.[0].question_name??"",K=L.find((e=>e.name===Z)),J=()=>{T(!0),setTimeout((()=>{p?.()}),300)},Q=t.useRef(null);return n.useEffect((()=>{const e=document.documentElement;if(!e||!o.question_details?.questions)return;let t=0;(o.question_details.questions??[]).forEach((e=>{const n=N(e);"RANGE"===e.type_info?.question_type&&n.length>t&&(t=n.length)}));const n=42*t+T4[d][t]*(t-1);e.style.setProperty("--fsc-max-range-question-width",Math.min(T4[d].width,n)+"px")}),[o,d]),n.useEffect((()=>{j&&(_(j),V(F(j.palette?.survey_background??$B)))}),[j]),n.createElement("div",{className:`surveyserv-widget-container ${P(e||"en")?"freemium-survey-rtl":"freemium-survey-ltr"} ${u?"widget-mobile":""} ${d}-container-style ${H?"minimized":""}`,style:{opacity:E?0:1,...$(j||{})}},n.createElement("header",{id:"surveyserv-widget-header",className:("widget-header "+(H?"minimized":"")).trim()},H?n.createElement("span",{className:"header-content minimized",dangerouslySetInnerHTML:{__html:B({questionText:(!C&&o.prompt_settings?.is_enabled?o.prompt_settings.text:U?.question?.text)??X(K?.text||""),placeholders:{...r,"{{nps.rating}}":String(U?.npsScore??"")}})}}):n.createElement("div",null),n.createElement("div",{className:"icons"},!M&&n.createElement(Zs,{onClick:()=>{I((e=>!e))},variant:"secondary",className:"icon minimize-btn",title:H?q?.maximize||"Maximize widget":q?.minimize||"Minimize widget"},H?n.createElement(L4,null):n.createElement(C4,null)),n.createElement(Zs,{ref:Q,onClick:()=>{M||l(),J()},variant:"secondary",title:q?.dismiss||"Dismiss widget",className:"icon minimize-btn"},n.createElement(R4,null)))),m,n.createElement("main",{className:("widget-main "+(H?"minimized":"")).trim()},c?n.createElement(n.Fragment,null,c):n.createElement(E4,{surveyServAssetUrl:w,answers:O,minimized:H,widgetStyle:d,answerStatus:z,language:e||"en",survey:o,placeholders:r,isMobile:!!u,contactData:i,onFileUpload:x,allowMultipleSubmission:A,loadAsNewSurvey:g,canResubmit:y,onSubmit:s,setCurrentSurveyState:G,widgetHeaderQuerySelector:H?void 0:"#surveyserv-widget-header",onAnsweringPrompt:e=>{v?.(e),S(e),0==e&&k(o.prompt_settings?.declined_message)&&J()},handleAction:f,translationVariables:q})),n.createElement("footer",{className:`widget-footer ${H?"minimized":""} survey-footer-${D?"dark":"light"}`.trim()},n.createElement("div",null,b&&!H&&n.createElement("a",{href:b,target:"_blank",rel:"noopener noreferrer",onClick:e=>{a&&e.preventDefault(),e.stopPropagation(),J()}},q?.unsubscribe||"Unsubscribe")),n.createElement("div",{className:"footer-text"},n.createElement(Au,{surveyPoweredBy:W,isDark:D}))))};Fs('.whatsapp-container {\n --wa-message-margin: 40px;\n --wa-message-border: 6px;\n --wa-message-bg: #fff;\n --wa-message-color: #0096de;\n --wa-message-disabled-color: #aaa;\n --wa-answers-bg: #d3ffc8;\n --wa-answers-color: #000;\n --wa-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: var(--fsc-whatsapp-bg);\n background-repeat: no-repeat;\n background-size: contain;\n margin: 0 auto;\n font-family: var(--fsc-font-family);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.whatsapp-container.instagram {\n --wa-message-bg: none;\n --wa-answers-bg: #4d5bff;\n --wa-answers-color: #fff;\n --wa-answers-radius: 21px;\n background-image: var(--fsc-instagram-bg);\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: 70px;\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: 6px;\n gap: 6px;\n height: -moz-fit-content;\n height: fit-content;\n}\n.whatsapp-container.instagram .question-container .options-popup main .option-row {\n border: 1px solid #0584fe;\n border-radius: 50px;\n padding: 5px 10px;\n}\n.whatsapp-container.instagram .question-container .options-popup main .option-row button {\n color: var(--wa-message-color);\n display: flex;\n gap: 6px;\n}\n.whatsapp-container.instagram .question-container .choices-button.choice {\n font-weight: 700;\n font-size: 1em;\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 gap: 6px;\n overflow: auto;\n flex: 1;\n background: #fff;\n margin: 0;\n padding-top: 8px;\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: 12px 0;\n margin: 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: 1.1429em;\n line-height: 18px;\n padding: 12px;\n background-color: var(--wa-message-bg);\n border-radius: var(--wa-message-border);\n word-break: break-word;\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-text .placeholder-tag > span {\n display: none !important;\n}\n.whatsapp-container .question-container {\n margin-right: var(--wa-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(--wa-message-color);\n}\n.whatsapp-container .question-container.active .choice button {\n color: var(--wa-message-color);\n}\n.whatsapp-container .question-container.active .choice svg:not(#star) {\n fill: var(--wa-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(--wa-answers-bg);\n margin-left: var(--wa-message-margin);\n border-radius: var(--wa-answers-radius);\n color: var(--wa-answers-color);\n padding: 12px;\n width: -moz-fit-content;\n width: fit-content;\n min-width: 80px;\n font-size: 1.1429em;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 1px;\n word-break: break-word;\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}\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.instagram .choices.one-line {\n flex-direction: row;\n flex-wrap: nowrap;\n}\n.whatsapp-container .choices {\n display: flex;\n flex-direction: column;\n gap: 2px;\n list-style-type: none;\n padding: 5px 0;\n}\n.whatsapp-container .choices.multi-choice .choice button {\n white-space: normal;\n}\n.whatsapp-container .choices.one-line {\n flex-direction: unset;\n flex-wrap: wrap;\n padding: 0;\n margin: 2px 0;\n}\n.whatsapp-container .choices.one-line .range-choice,\n.whatsapp-container .choices.one-line .choice {\n width: -moz-fit-content;\n width: fit-content;\n}\n.whatsapp-container .choice {\n background-color: var(--wa-message-bg);\n padding: 8px 12px;\n border-radius: var(--wa-message-border);\n text-align: center;\n color: var(--wa-message-disabled-color);\n box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 1px;\n}\n.whatsapp-container .choice button {\n color: var(--wa-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(--wa-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.8571em;\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 B4=({children:e,title:t,closeModal:o,isModalOpen:a})=>n.createElement(l.CSSTransition,{in:a,unmountOnExit:!0,timeout:500,classNames:"fade",key:t},n.createElement("div",{className:"options-popup",style:{}},n.createElement("header",null,n.createElement("button",{onClick:o,className:"close"},n.createElement(R4,null)),n.createElement("h4",null,t)),n.createElement("main",{className:"fsc-range-main"},e),n.createElement("footer",null,"Tab an item to select it"))),$4=({question:e,saveFormValues:o})=>{const[a,r]=t.useState(!1),{range:i}=e?.type_info?.scale_properties||{},c=Number(i?.[0]?.min),s=Number(i?.[i.length-1]?.max),l="descending"===e?.type_info?.scale_properties?.order,p=[...e?.type_info?.scale_properties?.labels?.values||[]],u=e?.type_info?.scale_properties?.labels?.preference;l&&p.reverse();const d=t.useRef(Array.from({length:s+(0===c?1:0)},((e,t)=>l?s-t:t+c)));return d.current.length<=3?n.createElement("ul",{className:`choices ${("THUMBS"===e?.type_info?.type_variant||"all"!==e?.type_info?.scale_properties?.labels?.preference)&&"one-line"}`},d.current.map(((t,a)=>"THUMBS"===e?.type_info?.type_variant?n.createElement("li",{className:"choice range-choice",key:`thumbs-${t}-${a}`},n.createElement("button",{onClick:()=>{o(t)}},n.createElement(Xs,{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}-${a}`},n.createElement("button",{onClick:()=>{o(t)}},Array.from({length:t},((e,t)=>n.createElement(Xs,{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:()=>r(!0),className:"choices-button choice"},n.createElement(Xs,{name:"whatsapp-choices"}),"Rate Support"),n.createElement(B4,{title:"Rate Support",isModalOpen:a,closeModal:()=>r(!1)},d.current.map(((e,t)=>n.createElement("div",{className:"option-row"},n.createElement("button",{onClick:()=>{o(e),r(!1)}},Array.from({length:e},((e,t)=>n.createElement(Xs,{name:"whatsapp-star",id:`qus-${t}`}))),"all"===u||"edges"===u&&(0===t||t===p.length-1)?n.createElement("span",null,p[e-1]):null))))))},_4=({question:e,saveFormValues:o,type:a})=>{const[r,i]=t.useState(!1);return n.createElement(n.Fragment,null,n.createElement("button",{onClick:()=>i(!0),className:"choices-button choice"},n.createElement(Xs,{name:"whatsapp-choices"}),"Select answer"),n.createElement(B4,{title:"Select a choice",isModalOpen:r,closeModal:()=>i(!1)},n.createElement("ul",{className:`choices multi-choice ${a}`},e.choices.map(((e,t)=>n.createElement("li",{className:"choice",style:{boxShadow:"none"},key:`${e}-${t}`},n.createElement("button",{onClick:()=>{o(e.id),i(!1)}},e.value)))))))},H4=e=>{const o=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])})(o.current,String(e.value)??""),t.useEffect((()=>{e.autoFocus&&o.current?.focus()}),[e.autoFocus]),n.createElement("div",{className:"textarea-container"},n.createElement("textarea",{placeholder:"Type a message",ref:o,rows:1,onChange:e.onChange,value:e.value}),n.createElement("button",{onClick:()=>{e.onSubmit(),o.current&&(o.current.value="")}},n.createElement(Xs,{name:"whatsapp-send"})))},I4=({text:e,placeholders:t,pivot:o,rangeToRender:a})=>n.createElement("div",{className:"question-text-container"},n.createElement("div",{className:"question-text",dangerouslySetInnerHTML:{__html:B({questionText:e,placeholders:t,npsRating:o?.answer,ratingLabel:L(o?.answer)?"":a?.find((e=>e?.value===String(o?.answer)))?.text??"",preference:o?.question.type_info?.scale_properties?.labels?.preference,isPreview:!0})},role:"heading","aria-level":1})),D4=({block:e,saveFormValues:t,type:o,translationVariables:a,language:r})=>{const{question_type:i}=e.question?.type_info;switch(i){case"RANGE":return n.createElement($4,{question:e.question,saveFormValues:e=>t(e,!0)});case"DROPDOWN":case"MULTI_CHOICE":case"MULTI_SELECT":return n.createElement(_4,{dir:P(r||"en")?"rtl":"ltr",question:e.question,saveFormValues:e=>t(e,!0),type:o,translationVariables:a});case"PARAGRAPH":case"INPUT":return null;default:return console.error(`Question type ${i} not supported`),null}},X4=({config:e,placeholders:o,onSelect:a,promptAccepted:r,type:i})=>{const c=t.useMemo((()=>e.reverse_order?e.choices?.reverse():e.choices),[e]);return n.createElement(n.Fragment,null,n.createElement("div",{className:"question-container "+(null==r?"active":"")},n.createElement(I4,{text:e.text,placeholders:o}),n.createElement("ul",{className:"choices one-line"},c?.map(((e,t)=>n.createElement("li",{className:"choice",key:`prompt-${e}-${t}`},n.createElement("button",{className:"action",onClick:()=>{a(Number(e.id))}},n.createElement(Xs,{name:Number(e.id)?"whatsapp-thumbs-up":"whatsapp-thumbs-down"}),e.value)))))),void 0!==r&&n.createElement("div",{className:"answers-container"},n.createElement("div",{className:"answers"},"whatsapp"===i&&n.createElement("div",{className:"reply-block"},n.createElement("p",{className:"user"},"Acme.inc"),n.createElement("p",{className:"question",dangerouslySetInnerHTML:{__html:B({questionText:e.text,placeholders:o})}})),n.createElement("div",{className:"answer-text"},n.createElement(Xs,{name:Number(r)?"whatsapp-thumbs-up":"whatsapp-thumbs-down"}),c.find((e=>e.id==r))?.value))),!1===r&&e.is_declined&&e.declined_message&&n.createElement("div",{className:"question-container"},n.createElement(I4,{text:e.declined_message,placeholders:o})))},V4=e=>{const{activeBlock:o,activeIndexOfBlocks:a,activeIndexOfRenderedBlocks:r,answers:i,saveFormValues:c,blocks:s,questions:l,renderedBlocks:p,onSubmitHandler:u,isSurveyCompleted:d,pivot:b}=Ne(e),{type:M="whatsapp"}=e,{question_type:m}=o?.question.type_info??{},z=n.useMemo((()=>N(b?.question)),[b?.question]),h=t.useRef(null),[f,O]=t.useState(void 0);return t.useEffect((()=>{h.current&&h.current.scroll({top:1e4,behavior:"smooth"})}),[o,i,d]),o&&o.question?n.createElement("div",{className:`${M} whatsapp-container`},n.createElement("div",{className:"msg-container"},n.createElement("div",{className:"scroll-wrapper",ref:h},e.survey.prompt_settings?n.createElement(X4,{config:e.survey.prompt_settings,onSelect:e=>{O(1===e)},promptAccepted:f,placeholders:e.placeholders,type:M}):null,!e.survey.prompt_settings||f?p.map(((t,m)=>n.createElement(n.Fragment,null,n.createElement("div",{className:"question-container "+(d||m!==p.length-1?"":"active")},n.createElement(I4,{text:t.question.text,placeholders:e.placeholders,pivot:b,rangeToRender:z}),n.createElement(D4,{language:e.language||"en",block:t,placeholders:e.placeholders,saveFormValues:(e,n)=>{c(t,e,n),setTimeout((()=>{!0===n&&ie({blocks:s,activeIndexOfBlocks:a,renderedBlocks:p,activeIndexOfRenderedBlocks:r,questions:l})&&u("COMPLETE")}))},type:M})),t.name===o.name&&!i.commitDirtyValue||Hs.isNil(i.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"===M&&n.createElement("div",{className:"reply-block"},n.createElement("p",{className:"user"},"Acme.inc"),n.createElement("p",{className:"question",dangerouslySetInnerHTML:{__html:B({questionText:t.question.text||"",placeholders:e.placeholders,npsRating:b?.answer,ratingLabel:Hs.isNil(b?.answer)?"":z?.find((e=>e?.value===String(b?.answer)))?.text??"",preference:b?.question.type_info?.scale_properties?.labels?.preference,isPreview:!0})}})),n.createElement("div",{className:"answer-text"},n.createElement(Xs,{name:Number(i.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(i.formValues[t.question.name])])):"EMOJI"===t.question.type_info?.type_variant||"STAR"===t.question.type_info?.type_variant?n.createElement(n.Fragment,null,"whatsapp"===M&&i.formValues[t.question.name]&&n.createElement("div",{className:"reply-block"},n.createElement("p",{className:"user"},"Acme.inc"),n.createElement("p",{className:"question",dangerouslySetInnerHTML:{__html:B({questionText:t.question.text||"",placeholders:e.placeholders,npsRating:b?.answer,ratingLabel:Hs.isNil(b?.answer)?"":z?.find((e=>e?.value===String(b?.answer)))?.text??"",preference:b?.question.type_info?.scale_properties?.labels?.preference,isPreview:!0})}})),n.createElement("div",{className:"answer-text"},Array.from({length:Number(i.formValues[t.question.name])},((e,t)=>n.createElement(Xs,{name:"whatsapp-star",id:`ans-${t}`})))," ",n.createElement("span",null,t.question.type_info?.scale_properties?.labels?.values?.[Number(i.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===i.formValues[t.question.name]))?.value||i.formValues[t.question.name]):n.createElement(n.Fragment,null,i.formValues[t.question.name])))))):null,d&&n.createElement("div",{className:"question-container",id:"new"},n.createElement(I4,{text:ce({pivotQn:b?.question,pivotQnAnswer:b?.answer,block:e.survey.blocks?.find((e=>"TY"===e.name)),questions:l})?.text,placeholders:e.placeholders,pivot:b,rangeToRender:z})))),n.createElement(H4,{onChange:e=>{"PARAGRAPH"!==m||d||c(o,e.target.value)},value:"PARAGRAPH"===m&&!d&&i.formValues[o.question.name]?i.formValues[o.question.name]:"",activeBlock:!0,autoFocus:"PARAGRAPH"===m,onSubmit:()=>{c(o,i?.formValues?.[o.question.name],!0),o.name===s[s.length-1].name&&u("COMPLETE")}})):null};var j4=Object.freeze({__proto__:null,allPathsLoader:function(e,t){return Ie(void 0,void 0,void 0,(function(){return De(this,(function(n){switch(n.label){case 0:return[4,Promise.resolve().then((function(){return Vb}))];case 1:return[2,(0,n.sent().getIconPaths)(e,t)]}}))}))}}),F4=Object.freeze({__proto__:null,splitPathsBySizeLoader:function(e,t){return Ie(void 0,void 0,void 0,(function(){var n,o;return De(this,(function(a){switch(a.label){case 0:return n=Bb(e),t!==_b.STANDARD?[3,2]:[4,Promise.resolve().then((function(){return Hb}))];case 1:return o=a.sent(),[3,4];case 2:return[4,Promise.resolve().then((function(){return Ib}))];case 3:o=a.sent(),a.label=4;case 4:return[2,o[n]]}}))}))}});exports.ALL_FONTS=[{id:"Edu AU VIC WA NT Guides",label:"Edu AU VIC WA NT Guides",value:'"Edu AU VIC WA NT Guides", cursive',url:"https://fonts.googleapis.com/css2?family=Edu+AU+VIC+WA+NT+Guides:wght@400..700&display=swap%22"},{id:"abhaya",label:"Abhaya Libre",value:"'Abhaya_Libre', Tofu, serif",url:"https://fonts.googleapis.com/css2?family=Abhaya+Libre"},{id:"arial",label:"Arial",value:"Arial, 'Helvetica Neue', Helvetica, sans-serif"},{id:"arvo",label:"Arvo",value:"'Arvo', 'Courier New', Courier, monospace",url:"https://fonts.googleapis.com/css2?family=Arvo"},{id:"biryani",label:"Biryani",value:"'Biryani', sans-serif",url:"https://fonts.googleapis.com/css2?family=Biryani"},{id:"bitter",label:"Bitter",value:"'Bitter', Georgia, Times, 'Times New Roman', serif",url:"https://fonts.googleapis.com/css2?family=Bitter"},{id:"cabin",label:"Cabin",value:"'Cabin', Arial, 'Helvetica Neue', Helvetica, sans-serif",url:"https://fonts.googleapis.com/css2?family=Cabin"},{id:"cabin_sketch",label:"Cabin Sketch",value:"'Cabin Sketch', sans-serif",url:"https://fonts.googleapis.com/css2?family=Cabin+Sketch"},{id:"cagliostro",label:"Cagliostro",value:"'Cagliostro', sans-serif",url:"https://fonts.googleapis.com/css2?family=Cagliostro"},{id:"cairo",label:"Cairo",value:"'Cairo', sans-serif",url:"https://fonts.googleapis.com/css2?family=Cairo"},{id:"courier",label:"Courier New",value:"'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace"},{id:"droid_sans",label:"Droid Sans",value:"'Droid Sans', sans-serif",url:"DroidSans.ttf"},{id:"droid_serif",label:"Droid Serif",value:"'Droid Serif', Georgia, Times, 'Times New Roman', serif",url:"DroidSerif-Regular.ttf"},{id:"georgia",label:"Georgia",value:"Georgia, Times, 'Times New Roman', serif"},{id:"hammersmith_one",label:"Hammersmith One",value:"'Hammersmith One', sans-serif",url:"https://fonts.googleapis.com/css2?family=Hammersmith+One"},{id:"hanuman",label:"Hanuman",value:"'Hanuman', sans-serif",url:"https://fonts.googleapis.com/css2?family=Hanuman"},{id:"harmattan",label:"Harmattan",value:"'Harmattan', sans-serif",url:"https://fonts.googleapis.com/css2?family=Harmattan"},{id:"heebo",label:"Heebo",value:"'Heebo', sans-serif",url:"https://fonts.googleapis.com/css2?family=Heebo"},{id:"helvetica",label:"Helvetica",value:"Helvetica, Arial, sans-serif",url:"Helvetica.ttf"},{id:"helvetica_neue",label:"Helvetica Neue",value:"'Helvetica Neue', Helvetica, Arial, sans-serif",url:"HelveticaNeueMedium.otf"},{id:"impact",label:"Impact",value:"Impact, Charcoal, sans-serif",url:"impact.ttf"},{id:"lato",label:"Lato",value:"'Lato', Tahoma, Verdana, Segoe, sans-serif",url:"https://fonts.googleapis.com/css2?family=Lato"},{id:"lucida",label:"Lucida Sans",value:"'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Geneva, Verdana, sans-serif",url:"LSANS.TTF"},{id:"meiryo",label:"Meiryo",value:"Meiryo, Tahoma, Verdana, Segoe, sans-serif",url:"Meiryo.ttf"},{id:"merriweather",label:"Merriweather",value:"'Merriweather', 'Georgia', serif",url:"https://fonts.googleapis.com/css2?family=Merriweather"},{id:"montserrat",label:"Montserrat",value:"'Montserrat', 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif",url:"https://fonts.googleapis.com/css2?family=Montserrat"},{id:"open_sans",label:"Open Sans",value:"'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif",url:"https://fonts.googleapis.com/css2?family=Open+Sans"},{id:"open_sans_condensed",label:"Open Sans Condensed",value:"'Open Sans Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif",url:"OpenSans_Condensed-Regular.ttf"},{id:"oswald",label:"Oswald",value:"'Oswald', Arial, 'Helvetica Neue', Helvetica, sans-serif",url:"https://fonts.googleapis.com/css2?family=Oswald"},{id:"poppins",label:"Poppins",value:"'Poppins', Arial, Helvetica, sans-serif",url:"https://fonts.googleapis.com/css2?family=Poppins"},{id:"roboto",label:"Roboto",value:"'Roboto', Tahoma, Verdana, Segoe, sans-serif",url:"https://fonts.googleapis.com/css2?family=Roboto"},{id:"roboto_condensed",label:"Roboto Condensed",url:"https://fonts.googleapis.com/css2?family=Roboto+Condensed",value:"'Roboto Condensed', Tahoma, Verdana, Segoe, sans-serif"},{id:"source_sans_pro",label:"Source Sans Pro",value:"'Source Sans Pro', Tahoma, Verdana, Segoe, sans-serif",url:"SourceSansPro-Regular.otf"},{id:"default",label:"System Font",value:"-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial, sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'"},{id:"tahoma",label:"Tahoma",value:"Tahoma, Verdana, Segoe, sans-serif"},{id:"times",label:"Times New Roman",value:"TimesNewRoman, 'Times New Roman', Times, Beskerville, Georgia, serif"},{id:"trebuchet",label:"Trebuchet MS",value:"'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif"},{id:"ubuntu",label:"Ubuntu",value:"'Ubuntu', Tahoma, Verdana, Segoe, sans-serif",url:"https://fonts.googleapis.com/css2?family=Ubuntu"},{id:"varela_round",label:"Varela Round",value:"'Varela Round', 'Trebuchet MS', Helvetica, sans-serif",url:"https://fonts.googleapis.com/css2?family=Varela"},{id:"verdana",label:"Verdana",value:"Verdana, Geneva, sans-serif"},{id:"hiragino",label:"Hiragino Kaku Gothic Pro W3",value:"ヒラギノ角ゴ Pro W3, 'Hiragino Kaku Gothic Pro W3', Hiragino Kaku Gothic Pro,Osaka, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif",url:"Hiragino Kaku Gothic Pro W3.otf"}],exports.Binary=Gs,exports.Button=Zs,exports.ChannelPreview=e=>{j("ChannelPreview",e);const{survey:t,answers:o}=Q(e.survey,e.answers);return n.useEffect((()=>{const t=document.documentElement;!L(e.surveyServAssetUrl)&&t&&setTimeout((()=>{t.style.setProperty("--fsc-whatsapp-bg",`url(${e.surveyServAssetUrl}/survey/whatsapp-bg.svg)`),t.style.setProperty("--fsc-instagram-bg",`url(${e.surveyServAssetUrl}/survey/instagram-bg.svg)`)}),0)}),[e.surveyServAssetUrl]),n.useEffect((()=>{t.theme&&_(t.theme)}),[t.theme]),"whatsapp"===e.channel?n.createElement(V4,{...e,survey:t,answers:o}):"instagram"===e.channel?n.createElement(V4,{type:"instagram",...e,survey:t,answers:o}):(console.error(`Channel ${e.channel} not supported`),null)},exports.Checkbox=xl,exports.DatePicker=YS,exports.DateTimePicker=ZS,exports.Dropdown=Ou,exports.FONT_SIZE_OPTIONS=[{id:"default",label:"theme.fields.typography.default",value:"16px"},{id:"tiny",label:"theme.fields.typography.tiny",value:"8px"},{id:"small",label:"theme.fields.typography.small",value:"12px"},{id:"medium",label:"theme.fields.typography.medium",value:"14px"},{id:"large",label:"theme.fields.typography.large",value:"20px"},{id:"huge",label:"theme.fields.typography.huge",value:"24px"}],exports.Input=fu,exports.Loader=()=>n.createElement("div",{className:"fsc-loader"}),exports.PhoneNumberInput=yu,exports.ProgressBar=KS,exports.RadioGroup=JS,exports.Range=tE,exports.RankOrder=$N,exports.Slider=EB,exports.Survey=e=>{const{survey:t,answers:o}=Q(e.survey,e.answers),[a,r]=n.useState(!1);return n.useEffect((()=>{"undefined"!=typeof window&&window&&window.matchMedia&&"undefined"!=typeof sessionStorage&&sessionStorage&&sessionStorage.clear&&(j("Survey matchMedia",{innerHeight:window.innerHeight,innerWidth:window.innerWidth}),r(window.matchMedia("(max-width: 550px)").matches),Te(localStorage))}),[]),n.useEffect((()=>{const t=document.documentElement;!L(e.surveyServAssetUrl)&&t&&setTimeout((()=>{t.style.setProperty("--fsc-whatsapp-bg",`url(${e.surveyServAssetUrl}/survey/whatsapp-bg.svg)`),t.style.setProperty("--fsc-instagram-bg",`url(${e.surveyServAssetUrl}/survey/instagram-bg.svg)`)}),0)}),[e.surveyServAssetUrl]),j("Survey",{...e,survey:t,isMobile:a,answers:o}),n.createElement(n.Fragment,null,"standard"===e.surveyStyle?n.createElement(x4,{...e,answers:o,survey:t,isMobile:a||!!e.isMobile,initialQuestionAnswer:e.initialQuestionAnswer}):n.createElement(A4,{...e,answers:o,survey:t,isMobile:a||!!e.isMobile,surveyStyle:"card",initialQuestionAnswer:e.initialQuestionAnswer}))},exports.SurveyFooter=gu,exports.SurveyProgress=({isSurveyCompleted:e,totalBlocks:t,completedText:o,noOfAnswers:a})=>{const r=e?100:(a||0)/(t||1)*100;return n.createElement("div",{className:"survey-progress"},n.createElement("span",{className:"progress-completion"},r.toFixed(),"%  "),o||"survey completed",n.createElement(KS,{totalSteps:t,completedSteps:e?t:a}))},exports.TextArea=TB,exports.WebInAppSurvey=e=>{const{survey:t,answers:o}=Q(e.survey,e.answers),[a,r]=n.useState(!1),[i,c]=n.useState(!1);return n.useEffect((()=>{"undefined"!=typeof window&&window&&window.matchMedia&&(r(window.matchMedia("(max-width: 550px)").matches),"cozy"===e.surveyType&&c(window.matchMedia("(max-width: 1080px)").matches))}),[]),j("WebInAppSurvey",{...e,survey:t,isMobile:a,isDefault:i,answers:o}),n.createElement(N4,{...e,survey:t,answers:o,isMobile:a,surveyType:a?"compact":i?"default":e.surveyType})};