1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52688,53994,e=>{"use strict";let t,s;class i{static isAvailable(){return"u">typeof window}static isFileReaderAvailable(){return!!i.isAvailable()&&!!window.FileReader}static getLocation(){if(i.isAvailable())return window.location}static getVisualViewport(){return i.isAvailable()?window.visualViewport:null}static getInnerWidth(){if(i.isAvailable())return window.innerWidth}static getInnerHeight(){return i.isAvailable()?window.innerHeight:null}static getDevicePixelRatio(){return i.isAvailable()?window.devicePixelRatio:null}static getWindow(){if(i.isAvailable())return window}static hasOwn(e){if(i.isAvailable())return e in window}static getSelection(){if(i.isAvailable()&&window.getSelection)return window.getSelection()}static requestAnimationFrame(e){if(i.isAvailable())return window.requestAnimationFrame(e)}static addEventListener(e,t){i.isAvailable()&&window.addEventListener(e,t)}static removeEventListener(e,t){i.isAvailable()&&window.removeEventListener(e,t)}static matchMedia(e){return i.isAvailable()&&void 0!==window.matchMedia?window.matchMedia(e):null}static getScreenOrientationType(){var e,t;if(i.isAvailable())return null==(t=null==(e=window.screen)?void 0:e.orientation)?void 0:t.type}}class n{static isAvailable(){return"u">typeof document}static getBody(){if(n.isAvailable())return document.body}static getDocumentElement(){if(n.isAvailable())return document.documentElement}static getDocument(){if(n.isAvailable())return document}static getCookie(){if(n.isAvailable())return document.cookie}static setCookie(e){n.isAvailable()&&(document.cookie=e)}static activeElementBlur(){if(!n.isAvailable())return;let e=document.activeElement;e&&e.blur&&e.blur()}static createElement(e){if(n.isAvailable())return document.createElement(e)}static getComputedStyle(e){return n.isAvailable()?document.defaultView.getComputedStyle(e):new CSSStyleDeclaration}static addEventListener(e,t){n.isAvailable()&&document.addEventListener(e,t)}static removeEventListener(e,t){n.isAvailable()&&document.removeEventListener(e,t)}}let r="u">typeof globalThis?globalThis.document:(void 0).document;var a,o,l,u,h,d,c,p={version:"",designMode:{showEmptyDescriptions:!0,showEmptyTitles:!0},get allowShowEmptyDescriptionInDesignMode(){return this.designMode.showEmptyDescriptions},set allowShowEmptyDescriptionInDesignMode(val){this.designMode.showEmptyDescriptions=val},get allowShowEmptyTitleInDesignMode(){return this.designMode.showEmptyTitles},set allowShowEmptyTitleInDesignMode(val){this.designMode.showEmptyTitles=val},localization:{useLocalTimeZone:!0,storeDuplicatedTranslations:!1,defaultLocaleName:"default"},get useLocalTimeZone(){return this.localization.useLocalTimeZone},set useLocalTimeZone(val){this.localization.useLocalTimeZone=val},get storeDuplicatedTranslations(){return this.localization.storeDuplicatedTranslations},set storeDuplicatedTranslations(val){this.localization.storeDuplicatedTranslations=val},get defaultLocaleName(){return this.localization.defaultLocaleName},set defaultLocaleName(val){this.localization.defaultLocaleName=val},web:{onBeforeRequestChoices:(e,t)=>{},encodeUrlParams:!0,cacheLoadedChoices:!0,disableQuestionWhileLoadingChoices:!1},get webserviceEncodeParameters(){return this.web.encodeUrlParams},set webserviceEncodeParameters(val){this.web.encodeUrlParams=val},get useCachingForChoicesRestful(){return this.web.cacheLoadedChoices},set useCachingForChoicesRestful(val){this.web.cacheLoadedChoices=val},get useCachingForChoicesRestfull(){return this.web.cacheLoadedChoices},set useCachingForChoicesRestfull(val){this.web.cacheLoadedChoices=val},get disableOnGettingChoicesFromWeb(){return this.web.disableQuestionWhileLoadingChoices},set disableOnGettingChoicesFromWeb(val){this.web.disableQuestionWhileLoadingChoices=val},triggers:{changeNavigationButtonsOnComplete:!0,executeCompleteOnValueChanged:!1,executeSkipOnValueChanged:!0},get executeCompleteTriggerOnValueChanged(){return this.triggers.executeCompleteOnValueChanged},set executeCompleteTriggerOnValueChanged(val){this.triggers.executeCompleteOnValueChanged=val},get changeNavigationButtonsOnCompleteTrigger(){return this.triggers.changeNavigationButtonsOnComplete},set changeNavigationButtonsOnCompleteTrigger(val){this.triggers.changeNavigationButtonsOnComplete=val},get executeSkipTriggerOnValueChanged(){return this.triggers.executeSkipOnValueChanged},set executeSkipTriggerOnValueChanged(val){this.triggers.executeSkipOnValueChanged=val},serialization:{itemValueSerializeAsObject:!1,itemValueSerializeDisplayText:!1,localizableStringSerializeAsObject:!1,matrixDropdownColumnSerializeTitle:!1},get itemValueAlwaysSerializeAsObject(){return this.serialization.itemValueSerializeAsObject},set itemValueAlwaysSerializeAsObject(val){this.serialization.itemValueSerializeAsObject=val},get itemValueAlwaysSerializeText(){return this.serialization.itemValueSerializeDisplayText},set itemValueAlwaysSerializeText(val){this.serialization.itemValueSerializeDisplayText=val},get serializeLocalizableStringAsObject(){return this.serialization.localizableStringSerializeAsObject}
1,set serializeLocalizableStringAsObject(val){this.serialization.localizableStringSerializeAsObject=val},lazyRender:{enabled:!1,firstBatchSize:3},get lazyRowsRendering(){return this.lazyRender.enabled},set lazyRowsRendering(val){this.lazyRender.enabled=val},get lazyRowsRenderingStartRow(){return this.lazyRender.firstBatchSize},set lazyRowsRenderingStartRow(val){this.lazyRender.firstBatchSize=val},matrix:{defaultCellType:"dropdown",defaultRowName:"default",totalsSuffix:"-total",maxRowCount:1e3,maxRowCountInCondition:1,renderRemoveAsIcon:!0,columnWidthsByType:{file:{minWidth:"240px"},comment:{minWidth:"200px"}},rateSize:"small"},get matrixDefaultRowName(){return this.matrix.defaultRowName},set matrixDefaultRowName(val){this.matrix.defaultRowName=val},get matrixDefaultCellType(){return this.matrix.defaultCellType},set matrixDefaultCellType(val){this.matrix.defaultCellType=val},get matrixTotalValuePostFix(){return this.matrix.totalsSuffix},set matrixTotalValuePostFix(val){this.matrix.totalsSuffix=val},get matrixMaximumRowCount(){return this.matrix.maxRowCount},set matrixMaximumRowCount(val){this.matrix.maxRowCount=val},get matrixMaxRowCountInCondition(){return this.matrix.maxRowCountInCondition},set matrixMaxRowCountInCondition(val){this.matrix.maxRowCountInCondition=val},get matrixRenderRemoveAsIcon(){return this.matrix.renderRemoveAsIcon},set matrixRenderRemoveAsIcon(val){this.matrix.renderRemoveAsIcon=val},panel:{maxPanelCount:100,maxPanelCountInCondition:1},get panelDynamicMaxPanelCountInCondition(){return this.panel.maxPanelCountInCondition},set panelDynamicMaxPanelCountInCondition(val){this.panel.maxPanelCountInCondition=val},get panelMaximumPanelCount(){return this.panel.maxPanelCount},set panelMaximumPanelCount(val){this.panel.maxPanelCount=val},readOnly:{enableValidation:!1,commentRenderMode:"textarea",textRenderMode:"input"},get readOnlyCommentRenderMode(){return this.readOnly.commentRenderMode},set readOnlyCommentRenderMode(val){this.readOnly.commentRenderMode=val},get readOnlyTextRenderMode(){return this.readOnly.textRenderMode},set readOnlyTextRenderMode(val){this.readOnly.textRenderMode=val},numbering:{includeQuestionsWithHiddenNumber:!1,includeQuestionsWithHiddenTitle:!1},get setQuestionVisibleIndexForHiddenTitle(){return this.numbering.includeQuestionsWithHiddenTitle},set setQuestionVisibleIndexForHiddenTitle(val){this.numbering.includeQuestionsWithHiddenTitle=val},get setQuestionVisibleIndexForHiddenNumber(){return this.numbering.includeQuestionsWithHiddenNumber},set setQuestionVisibleIndexForHiddenNumber(val){this.numbering.includeQuestionsWithHiddenNumber=val},enterKeyAction:"default",comparator:{trimStrings:!0,caseSensitive:!1,normalizeTextCallback:(e,t)=>e},expressionDisableConversionChar:"#",expressionVariableDelimiters:{start:"{",end:"}"},expressionElementPropertyPrefix:"$",get commentPrefix(){return p.commentSuffix},set commentPrefix(val){p.commentSuffix=val},commentSuffix:"-Comment",itemValueSeparator:"|",ratingMaximumRateValueCount:20,tagboxCloseOnSelect:!1,dropdownSearchDelay:500,dropdownSaveOnOutsideClick:!1,confirmActionFunc:void 0,confirmActionAsync:void 0,minWidth:"300px",maxWidth:"100%",maxConditionRunCountOnValueChanged:10,notifications:{lifetime:2e3},autoAdvanceDelay:300,itemFlowDirection:"column",get showItemsInOrder(){return p.itemFlowDirection},set showItemsInOrder(val){p.itemFlowDirection=val},noneItemValue:"none",refuseItemValue:"refused",dontKnowItemValue:"dontknow",specialChoicesOrder:{selectAllItem:[-1],noneItem:[1],refuseItem:[2],dontKnowItem:[3],otherItem:[4]},choicesSeparator:", ",supportedValidators:{question:["expression"],comment:["text","regex"],text:["numeric","text","regex","email"],checkbox:["answercount"],imagepicker:["answercount"]},expressionVariables:{survey:"survey",self:"self",parent:"parent",matrix:"matrix",composite:"composite",item:"item",choice:"choice",column:"column",row:"row",prevRow:"prevRow",nextRow:"nextRow",totalRow:"totalRow",rowIndex:"rowIndex",visibleRowIndex:"visibleRowIndex",rowValue:"rowValue",rowName:"rowName",rowTitle:"rowTitle",panel:"panel",prevPanel:"prevPanel",nextPanel:"nextPanel",parentPanel:"parentPanel",panelIndex:"panelIndex",visiblePanelIndex:"visiblePanelIndex",unwrapPostfix:"-unwrapped"},minDate:"",maxDate:"2999-12-31",showDialog:void 0,showDefaultItemsInCreator:!0,customIcons:{},rankingDragHandleArea:"entireItem",environment:r?{root:r,_rootElement:n.getBody(),get rootElement(){var g;return null!=(g=this._rootElement)?g:n.getBody()},set rootElement(rootElement){this._rootElement=rootElement},_popupMountContainer:n.getBody(),get popupMountContainer(){var m;return null!=(m=this._popupMountContainer)?m:n.getBody()},set popupMountContainer(popupMountContainer){this._popupMountContainer=popupMountContainer},svgMountContainer:r.head,stylesSheetsMountContainer:r.head}:void 0,showMaxLengthIndicator:!0,animationEnabled:!0,titleTags:{survey:"div",page:"div",panel:"div",question:"div"},questions:{inputTypes:["color","date","datetime-local","email","month","number","password","range","tel","text","t
1ime","url","week"],dataList:["","name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","organization-title","username","new-password","current-password","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","url","photo","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-local-prefix","tel-local-suffix","tel-extension","email","impp"]},legacyProgressBarView:!1,maskSettings:{patternPlaceholderChar:"_",patternEscapeChar:"\\",patternDefinitions:{9:/[0-9]/,a:/[a-zA-Z]/,"#":/[a-zA-Z0-9]/}},storeUtcDates:!1,onDateCreated:(e,t,s)=>e,parseNumber:(e,t)=>t,acceptedFileCategories:{image:[".png",".jpg",".jpeg",".gif",".bmp",".tiff",".svg"],video:[".mp4",".avi",".mov",".wmv",".flv",".mkv",".webm"],audio:[".mp3",".wav",".aac",".ogg",".wma",".flac"],document:[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".rtf",".odt"],archive:[".zip",".rar",".7z",".tar",".gz"]},customFileCategoryName:"custom"};function v(e){if("string"==typeof e){if(!isNaN(Number(e)))return Number(e);else if(e.includes("px"))return parseFloat(e)}if("number"==typeof e)return e}function C(e){if(void 0===v(e))return e}function y(e,t){if(t&&e&&"object"==typeof t)for(var s in e){var i=e[s];!Array.isArray(i)&&i&&"object"==typeof i?(t[s]&&"object"==typeof t[s]||(t[s]={}),y(i,t[s])):t[s]=i}}function f(e,t){var s;if(!t)return p.onDateCreated(new Date,e,t);!p.storeUtcDates&&"string"==typeof t&&!((s=t).indexOf("T")>0)&&/\d{4}-\d{2}-\d{2}/.test(s)&&!isNaN(new Date(s).getTime())&&(t+="T00:00:00");let i=new Date(t);return p.onDateCreated(i,e,t)}function b(e,t="filter"){return(e=p.comparator.normalizeTextCallback(e,t)).normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\u0131/g,"i").toLowerCase()}class w{static isValueEmpty(e){if(Array.isArray(e)&&0===e.length)return!0;if(e&&w.isValueObject(e)&&e.constructor===Object){for(var t in e)if(!w.isValueEmpty(e[t]))return!1;return!0}return!e&&0!==e&&!1!==e}static isValueUndefined(e){return null==e||"number"==typeof e&&isNaN(e)}static isArrayContainsEqual(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(var s=0;s<e.length;s++){for(var i=0;i<t.length&&!w.isTwoValueEquals(e[s],t[i]);i++);if(i===t.length)return!1}return!0}static checkIfArraysEqual(e,t,s){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;if(void 0!==s.ignoreOrder&&s.ignoreOrder){for(var i=[],n=[],r=0;r<e.length;r++)i.push(e[r]),n.push(t[r]);i.sort(),n.sort(),e=i,t=n}for(var r=0;r<e.length;r++)if(!w.checkIfValuesEqual(e[r],t[r],s))return!1;return!0}static isArraysEqual(e,t,s=!1,i,n){return w.checkIfArraysEqual(e,t,{ignoreOrder:s,caseSensitive:i,trimStrings:n})}static compareStrings(e,t){let s=p.comparator.normalizeTextCallback;if(e&&(e=s(e,"compare").trim()),t&&(t=s(t,"compare").trim()),!e&&!t)return 0;if(!e)return -1;if(!t)return 1;if(e===t)return 0;let i=-1;for(let s=0;s<e.length&&s<t.length;s++){if(this.isCharDigit(e[s])&&this.isCharDigit(t[s])){i=s;break}if(e[s]!==t[s])break}if(i>-1){let s=this.getNumberFromStr(e,i),n=this.getNumberFromStr(t,i);if(!Number.isNaN(s)&&!Number.isNaN(n)&&s!==n)return s>n?1:-1}return e>t?1:-1}static checkIfValuesEqual(e,t,s){if(e===t||Array.isArray(e)&&0===e.length&&void 0===t||Array.isArray(t)&&0===t.length&&void 0===e||null==e&&""===t||null==t&&""===e)return!0;let i=void 0!==s.caseSensitive?s.caseSensitive:p.comparator.caseSensitive,n=void 0!==s.trimStrings?s.trimStrings:p.comparator.trimStrings;if("string"==typeof e&&"string"==typeof t){let s=p.comparator.normalizeTextCallback;return e=s(e,"compare"),t=s(t,"compare"),n&&(e=e.trim(),t=t.trim()),i||(e=e.toLowerCase(),t=t.toLowerCase()),e===t}if(e instanceof Date&&t instanceof Date)return e.getTime()==t.getTime();
1let r=!s.doNotConvertNumbers;if(r&&w.isConvertibleToNumber(e)&&w.isConvertibleToNumber(t)&&parseInt(e)===parseInt(t)&&parseFloat(e)===parseFloat(t))return!0;if(!w.isValueEmpty(e)&&w.isValueEmpty(t)||w.isValueEmpty(e)&&!w.isValueEmpty(t))return!1;if((!0===e||!1===e)&&"string"==typeof t)return e.toString()===t.toLocaleLowerCase();if((!0===t||!1===t)&&"string"==typeof e)return t.toString()===e.toLocaleLowerCase();let a=w.isValueObject(e),o=w.isValueObject(t);if(!a&&!o&&(r||"number"!=typeof e&&"number"!=typeof t))return e==t;if(!a||!o)return!1;if(e.equals&&t.equals)return e.equals(t);if(Array.isArray(e)&&Array.isArray(t))return w.checkIfArraysEqual(e,t,s);for(var l in e)if(e.hasOwnProperty(l)&&(!t.hasOwnProperty(l)||!this.checkIfValuesEqual(e[l],t[l],s)))return!1;for(l in t)if(t.hasOwnProperty(l)&&!e.hasOwnProperty(l))return!1;return!0}static isTwoValueEquals(e,t,s=!1,i,n){return this.checkIfValuesEqual(e,t,{ignoreOrder:s,caseSensitive:i,trimStrings:n})}static randomizeArray(e,t){let s=e=>{var s;e.sort((e,t)=>e.uniqueId-t.uniqueId);let i=(s=t||Date.now(),function(){var e=s+=0x6d2b79f5;return e=Math.imul(e^e>>>15,1|e),(((e^=e+Math.imul(e^e>>>7,61|e))^e>>>14)>>>0)/0x100000000});for(var n=e.length-1;n>0;n--){var r=Math.floor(i()*(n+1));[e[n],e[r]]=[e[r],e[n]]}},i={};for(let t=0;t<e.length;t++){let s=e[t];if(!1===s.randomize)continue;let n=s.randomizeCategory||"";i[n]||(i[n]={indices:[],items:[]}),i[n].indices.push(t),i[n].items.push(s)}for(let t in i){let{indices:n,items:r}=i[t];s(r);for(let t=0;t<n.length;t++)e[n[t]]=r[t]}return e}static getUnbindValue(e){if(Array.isArray(e)){let t=[];for(let s=0;s<e.length;s++)t.push(w.getUnbindValue(e[s]));return t}return e&&w.isValueObject(e)&&!(e instanceof Date)?JSON.parse(JSON.stringify(e)):e}static createCopy(e){return this.createCopyWithPrefix(e,void 0)}static createCopyWithPrefix(e,t){var s={};if(!e)return s;for(var i in e)s[t?t+i:i]=e[i];return s}static createDiff(e,t){let s={};if("object"!=typeof e||"object"!=typeof t)return s;for(let i in e)w.isTwoValueEquals(e[i],t[i])||(s[i]=e[i]);return s}static isConvertibleToNumber(e){return null!=e&&!Array.isArray(e)&&!isNaN(e)}static isValueObject(e,t){return e instanceof Object&&(!t||!Array.isArray(e))}static isNumber(e){return!isNaN(this.getNumber(e))}static getNumber(e){let t=w.getNumberCore(e);return p.parseNumber(e,t)}static getNumberCore(e){if("string"==typeof e){if(!(e=e.trim()))return NaN;if(0==e.indexOf("0x"))return e.length>32?NaN:parseInt(e);if(e.length>15&&w.isDigitsOnly(e)||w.isStringHasOperator(e))return NaN}let t=parseFloat(e=this.prepareStringToNumber(e));return isNaN(t)||!isFinite(e)?NaN:t}static isStringHasOperator(e){if(e.lastIndexOf("-")>0||e.lastIndexOf("+")>0)return!1;let t="*^/%";for(let s=0;s<t.length;s++)if(e.indexOf(t[s])>-1)return!0;return!1}static prepareStringToNumber(e){if("string"!=typeof e||!e)return e;let t=e.indexOf(",");return t>-1&&0>e.indexOf(",",t+1)?e.replace(",","."):e}static getMaxLength(e,t){return e<0&&(e=t),e>0?e:null}static getRemainingCharacterCounterText(e,t){return t&&!(t<=0)&&p.showMaxLengthIndicator?[e?e.length:"0",t].join("/"):""}static getNumberByIndex(e,t,s){if(e<0)return"";var i=1,n="",r=t&&"."!==t[t.length-1]?"":".",a=!0,o="A",l="";let u=e=>{if(!e)return!1;for(var t=0;t<e.length;t++)if(w.isCharDigit(e[t]))return!0;return!1};if(t){for(var h=(l=t).length-1,d=u(l),c=function(){return d&&!w.isCharDigit(l[h])||w.isCharNotLetterAndDigit(l[h])};h>=0&&c();)h--;var p="";for(h<l.length-1&&(p=l.substring(h+1),l=l.substring(0,h+1)),h=l.length-1;h>=0&&!c()&&(h--,d););o=l.substring(h+1),n=l.substring(0,h+1),parseInt(o)?i=parseInt(o):1==o.length&&(a=!1),(p||n)&&(r=p)}if(s>-1&&u(n)&&(n=this.getNumberByIndex(s,n)),a){let t=(e+i).toString();for(;t.length<o.length;)t="0"+t;return n+t+r}return n+String.fromCharCode(o.charCodeAt(0)+e)+r}static isCharNotLetterAndDigit(e){return e.toUpperCase()==e.toLowerCase()&&!w.isCharDigit(e)}static isCharDigit(e){return e>="0"&&e<="9"}static isDigitsOnly(e){if(!e)return!1;for(let t=0;t<e.length;t++)if(!w.isCharDigit(e[t]))return!1;return!0}static getNumberFromStr(e,t){if(!this.isCharDigit(e[t]))return NaN;let s="";for(;t<e.length&&this.isCharDigit(e[t]);)s+=e[t],t++;return s?this.getNumber(s):NaN}static countDecimals(e){if(w.isNumber(e)&&Math.floor(e)!==e){let t=e.toString().split(".");return t.length>1&&t[1].length||0}return 0}static correctAfterPlusMinis(e,t,s){let i=w.countDecimals(e),n=w.countDecimals(t);if(i>0||n>0){let e=Math.max(i,n);s=parseFloat(s.toFixed(e))}return s}static sumAnyValues(e,t){if(!w.isNumber(e)||!w.isNumber(t)){if(Array.isArray(e)&&Array.isArray(t))return[].concat(e).concat(t);if(Array.isArray(e)||Array.isArray(t)){let i=Array.isArray(e)?e:t,n=i===e?t:e;if("string"==typeof n){let t=i.join(", ");return i===e?t+n:n+t}if("number"==typeof n){let e=0;for(var s=0;s<i.length;
1s++)"number"==typeof i[s]&&(e=w.correctAfterPlusMinis(e,i[s],e+i[s]));return w.correctAfterPlusMinis(e,n,e+n)}}return e+t}return"string"==typeof e||"string"==typeof t?e+t:w.correctAfterPlusMinis(e,t,e+t)}static correctAfterMultiple(e,t,s){let i=w.countDecimals(e)+w.countDecimals(t);return i>0&&(s=parseFloat(s.toFixed(i))),s}static findObjByPropValue(e,t,s){for(var i=0;i<e.length;i++)if(w.isTwoValueEquals(e[i][t],s))return e[i]}static convertArrayObjectToValue(e,t){let s=[];if(!e||!Array.isArray(e))return s;for(var i=0;i<e.length;i++){let n=e[i]?e[i][t]:void 0;w.isValueEmpty(n)||s.push(n)}return s}static convertDateToString(e){let t=e=>e<10?"0"+e.toString():e.toString();return e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())}static convertDateTimeToString(e,t,s){let i=e=>e<10?"0"+e.toString():e.toString(),n=this.convertDateToString(e)+(t?"T":" ")+i(e.getHours())+":"+i(e.getMinutes());return s&&(n+=":"+i(e.getSeconds())),n}static convertValToQuestionVal(e,t){return e instanceof Date?"datetime-local"===t?w.convertDateTimeToString(e,!0):"datetime-seconds"===t?w.convertDateTimeToString(e,!0,!0):w.convertDateToString(e):this.getUnbindValue(e)}static compareVerions(e,t){if(!e&&!t)return 0;let s=e.split("."),i=t.split("."),n=s.length,r=i.length;for(let e=0;e<n&&e<r;e++){let t=s[e],n=i[e];if(t.length!==n.length)return t.length<n.length?-1:1;if(t!==n)return t<n?-1:1}return n===r?0:n<r?-1:1}static isUrlYoutubeVideo(e){if(!e)return!1;let t=["www.youtube.com","m.youtube.com","youtube.com","youtu.be"];e=(e=e.toLowerCase()).replace(/^https?:\/\//,"");for(let s=0;s<t.length;s++)if(0===e.indexOf(t[s]+"/"))return!0;return!1}}function V(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a}String.prototype.format||(String.prototype.format=function(){var e=arguments;return this.replace(/{(\d+)}/g,function(t,s){return void 0!==e[s]?e[s]:t})}),"function"==typeof SuppressedError&&SuppressedError;var x={pagePrevText:"Previous",pageNextText:"Next",completeText:"Complete",previewText:"Preview",editText:"Edit",startSurveyText:"Start",commentText:"Please leave a comment",otherItemText:"Other (describe)",noneItemText:"None",refuseItemText:"Refuse to answer",dontKnowItemText:"Don't know",selectAllItemText:"Select All",deselectAllItemText:"Deselect all",progressText:"Page {0} of {1}",indexText:"{0} of {1}",panelDynamicProgressText:"{0} of {1}",panelDynamicTabTextFormat:"Panel {panelIndex}",questionsProgressText:"Answered {0}/{1} questions",emptySurvey:"The survey doesn't contain any visible elements.",completingSurvey:"Thank you for completing the survey",completingSurveyBefore:"You have already completed this survey.",loadingSurvey:"Loading Survey...",placeholder:"Select...",ratingOptionsCaption:"Select...",buttongroupOptionsCaption:"Select...",value:"value",requiredError:"Response required.",requiredErrorInPanel:"Response required: answer at least one question.",requiredInAllRowsError:"Response required: answer questions in all rows.",eachRowUniqueError:"Each row must have a unique value.",numericError:"The value should be numeric.",minError:"The value should not be less than {0}",stepError:"Please enter a value that matches the step size of {0}.",maxError:"The value should not be greater than {0}",invalidInputError:"Invalid input",textNoDigitsAllow:"Numbers are not allowed.",incompletePatternError:"Please complete the value to match the required format.",textMinLength:"Please enter at least {0} character(s).",textMaxLength:"Please enter no more than {0} character(s).",textMinMaxLength:"Please enter at least {0} and no more than {1} characters.",minRowCountError:"Please fill in at least {0} row(s).",minSelectError:"Please select at least {0} option(s).",maxSelectError:"Please select no more than {0} option(s).",numericMinMax:"The '{0}' should be at least {1} and at most {2}",numericMin:"The '{0}' should be at least {1}",numericMax:"The '{0}' should be at most {1}
1",invalidEmail:"Please enter a valid e-mail address.",invalidExpression:"The expression: {0} should return 'true'.",urlRequestError:"The request returned error '{0}'. {1}",urlGetChoicesError:"The request returned empty data or the 'path' property is incorrect",exceedMaxSize:"The file size should not exceed {0}.",fileSizeUnits:"Bytes, KB, MB, GB, TB",exceedMaxFiles:"The maximum number of files you can upload is {0}.",noUploadFilesHandler:"Files cannot be uploaded. Please add a handler for the 'onUploadFiles' event.",otherRequiredError:"Response required: enter another value.",uploadingFile:"Your file is uploading. Please wait several seconds and try again.",loadingFile:"Loading...",chooseFile:"Choose file(s)...",noFileChosen:"No file selected",filePlaceholder:"Drag and drop a file here or click the button below to select a file to upload.",confirmDelete:"Are you sure you want to delete this record?",keyDuplicationError:"This value should be unique.",addColumn:"Add Column",addRow:"Add Row",removeRow:"Remove",noRowsText:"There are no rows.",rowIndexTemplateTitle:"Row {rowIndex}",rowNameTemplateTitle:"{rowTitle}",addPanel:"Add new",removePanel:"Remove",showDetails:"Show Details",hideDetails:"Hide Details",choices_Item:"item",choices_Choice:"Choice option",matrix_column:"Column",matrix_row:"Row",multipletext_itemname:"text",savingData:"The results are being saved on the server...",savingDataError:"An error occurred and we could not save the results.",savingDataSuccess:"The results were saved successfully!",savingExceedSize:"Your response exceeds 64KB. Please reduce the size of your file(s) and try again or contact the survey owner.",saveAgainButton:"Try again",timerMin:"min",timerSec:"sec",timerSpentAll:"You have spent {0} on this page and {1} in total.",timerSpentPage:"You have spent {0} on this page.",timerSpentSurvey:"You have spent {0} in total.",timerLimitAll:"You have spent {0} of {1} on this page and {2} of {3} in total.",timerLimitPage:"You have spent {0} of {1} on this page.",timerLimitSurvey:"You have spent {0} of {1} in total.",clearCaption:"Clear",selectCaption:"Select",signaturePlaceHolder:"Sign here",signaturePlaceHolderReadOnly:"No signature",chooseFileCaption:"Select File",takePhotoCaption:"Take Photo",photoPlaceholder:"Click the button below to take a photo using the camera.",fileOrPhotoPlaceholder:"Drag and drop or select a file to upload or take a photo using the camera.",replaceFileCaption:"Replace file",removeFileCaption:"Remove this file",booleanCheckedLabel:"Yes",booleanUncheckedLabel:"No",confirmRemoveFile:"Are you sure that you want to remove this file: {0}?",confirmRemoveAllFiles:"Are you sure that you want to remove all files?",questionTitlePatternText:"Question Title",modalCancelButtonText:"Cancel",modalApplyButtonText:"Apply",filterStringPlaceholder:"Type to search...",emptyMessage:"No data to display",loadingPage:"Loading...",loadingData:"Loading...",noEntriesText:"No entries yet.\nClick the button below to add a new entry.",noEntriesReadonlyText:"No entries",tabTitlePlaceholder:"New Panel",more:"More",tagboxDoneButtonCaption:"OK",selectToRankEmptyRankedAreaText:"All choices are selected for ranking",selectToRankEmptyUnrankedAreaText:"Drag choices here to rank them",ok:"OK",cancel:"Cancel",createCustomItem:'Create "{0}" item...',toc:"Table of contents",progressbar:"Progress bar"},I={currentLocaleValue:"",defaultLocaleValue:"en",locales:{},localeNames:{},localeNamesInEnglish:{},localeDirections:{},supportedLocales:[],useEnglishNames:!1,get showNamesInEnglish(){return this.useEnglishNames},set showNamesInEnglish(val){this.useEnglishNames=val},setupLocale(e){let t=e.localeCode;this.locales[t]=e.strings,this.localeNames[t]=e.nativeName,this.localeNamesInEnglish[t]=e.englishName,void 0!==e.rtl&&(this.localeDirections[t]=e.rtl?"rtl":"ltr")},get currentLocale(){return this.currentLocaleValue===this.defaultLocaleValue?"":this.currentLocaleValue},set currentLocale(val){this.currentLocaleValue=this.getCorrectLocaleName(val)},get defaultLocale(){return this.defaultLocaleValue},set defaultLocale(val){this.defaultLocaleValue=this.getCorrectLocaleName(val)},getCorrectLocaleName:e=>("cz"===e&&(e="cs"),"gr"===e&&(e="el"),"rs"===e&&(e="sr"),"ua"===e&&(e="uk"),e),getLocaleStr
1ings(e){return this.locales[e]},getString:function(e,t=null){let s=[],i=e=>{let t=this.locales[e];t&&s.push(t)},n=e=>{if(!e)return;i(e);let t=e.indexOf("-");t<1||i(e=e.substring(0,t))};n(t),n(this.currentLocale),n(this.defaultLocale),"en"!==this.defaultLocale&&i("en");for(let t=0;t<s.length;t++){let i=s[t][e];if(void 0!==i)return i}return this.onGetExternalString(e,t)},getLocaleName(e,t){if(!e)return"";void 0===t&&(t=this.showNamesInEnglish);let s=t?this.localeNamesInEnglish:this.localeNames,i=t?this.localeNames:this.localeNamesInEnglish;return s[e]||i[e]||e},getLocales:function(e=!1){var t=[];t.push("");var s=this.locales;if(this.supportedLocales&&this.supportedLocales.length>0){s={};for(var i=0;i<this.supportedLocales.length;i++)s[this.supportedLocales[i]]=!0}for(var n in s)e&&n==this.defaultLocale||t.push(n);var r=e=>this.getLocaleName(e).toLowerCase();return t.sort((e,t)=>{var s=r(e),i=r(t);return s===i?0:s<i?-1:1}),t},onGetExternalString:function(e,t){}};function E(e,t=null){return I.getString(e,t)}I.locales.en=x,I.localeNames.en="english";class S{get isEmpty(){return 0===this.length}get length(){return this.callbacks?this.callbacks.length:0}fireByCreatingOptions(e,t){if(this.callbacks){for(var s=0;s<this.callbacks.length;s++)if(this.callbacks[s](e,t()),!this.callbacks)return}}fire(e,t){if(!this.callbacks)return;let s=[].concat(this.callbacks);for(var i=0;i<s.length;i++)if(s[i](e,t),!this.callbacks)return}clear(){this.callbacks=void 0}add(e){this.hasFunc(e)||(this.callbacks||(this.callbacks=[]),this.callbacks.push(e),this.fireCallbackChanged())}remove(e){if(this.hasFunc(e)){var t=this.callbacks.indexOf(e,0);this.callbacks.splice(t,1),this.fireCallbackChanged()}}hasFunc(e){return null!=this.callbacks&&this.callbacks.indexOf(e,0)>-1}fireCallbackChanged(){this.onCallbacksChanged&&this.onCallbacksChanged()}}class P extends S{}class R{static get defaultLocale(){return p.localization.defaultLocaleName}static set defaultLocale(e){p.localization.defaultLocaleName=e}get localizationName(){return this._localizationName}set localizationName(e){this._localizationName!=e&&(this._localizationName=e,this.strChanged())}get allowLineBreaks(){var e,t,s;return void 0===this._allowLineBreaks&&(this._allowLineBreaks=null!=(s=null==(t=null==(e=this.owner)?void 0:e.getAllowLineBreaks)?void 0:t.call(e,this.name))&&s),this._allowLineBreaks}constructor(e,t=!1,s,i){this.owner=e,this.useMarkdown=t,this.name=s,this.values={},this.htmlValues={},this.onStringChanged=new P,this._localizationName=i}getIsMultiple(){return!1}getStringViewerClassName(e){return void 0!==e?e:"sv-string-viewer"+(this.allowLineBreaks?" sv-string-viewer--multiline":"")}get locale(){if(this.owner&&this.owner.getLocale){let e=this.owner.getLocale();if(e||!this.sharedData)return e}return this.sharedData?this.sharedData.locale:""}get isDefautlLocale(){let e=this.locale;return!e||e===p.defaultLocaleName}strChanged(){!this.isTextRequested||(this.searchableText=void 0,(void 0!==this.renderedText||!this.isEmpty||this.onGetTextCallback||this.localizationName)&&(this.calculatedTextValue=this.calcText(),this.renderedText!==this.calculatedTextValue&&(this.renderedText=void 0,this.calculatedTextValue=void 0),this.htmlValues={},this.onChanged(),this.onStringChanged.fire(this,{})))}get text(){return this.pureText}set text(e){this.setLocaleText(this.locale,e)}get calculatedText(){return this.renderedText=void 0!==this.calculatedTextValue?this.calculatedTextValue:this.calcText(),this.calculatedTextValue=void 0,this.renderedText}getPlaceholder(){let e="";if(!this.isDefautlLocale){let t=this.getRootDialect(this.locale);e=this.getLocaleText(t||p.defaultLocaleName)}return!e&&this.onGetTextCallback&&(e=this.onGetTextCallback("","")),e}calcText(){let e=this.pureText,t=e;return t&&this.owner&&this.owner.getProcessedText&&t.indexOf("{")>-1&&(t=this.owner.getProcessedText(t)),this.onGetTextCallback&&(t=this.onGetTextCallback(t,e)),t}get pureText(){this.isTextRequested=!0;var e=this.locale;e||(e=this.defaultLoc);var t=this.getValue(e);if(this.isValueEmpty(t)&&e===this.defaultLoc&&(t=this.getValue(I.defaultLocale)),this.isValueEmpty(t)){let s=this.getRootDialect(e);s&&(t=this.getValue(s))}return this.isValueEmpty(t)&&e!==this.defaultLoc&&(t=this.getValue(this.defaultLoc)),this.isValueEmpty(t)&&this.getLocalizationName()&&(t=this.getLocalizationStr()),t||(t=this.defaultValue||""),t}getRootDialect(e){if(!e)return e;let t=e.indexOf("-");return t>-1?e.substring(0,t):""}getLocalizationName(){return this.sharedData?this.sharedData.localizationName:this.localizationName}getLocalizationStr(){let e=this.getLocalizationName();return e?E(e,this.locale):""}get hasHtml(){return this.hasHtmlValue()}get html(){return this.hasHtml?this.getHtmlValue():""}get isEmpty(){return 0==this.getValuesKeys().length}get textOrHtml(){return this.hasHtml?this.getHtmlValue():this.calculatedText}get renderedHtml(){return this.textOrHtml}getLocaleText(e){return this.getLocaleTextCore(e)||""}getLocaleTextCore(e){return e||(e=this.defaultLoc),this.getValue(e)}isLocaleTextEqualsWithDefault(e,t){let s=this.getLocaleTextCore(e);return s===t||this.isValueEmpty(s)&&this.isValueEmpty(t)}clear(){this.setJson(void 0)}clearLocale(e){this.setLocaleText(e,void 0)}setLocaleText(e,t){if(e=this.getValueLoc(e),this.lastChangedLoc=e,e&&void 0===t){let t=this.getValue(e);void 0!==t&&(this.deleteValue(e),this.fireStrChanged(e,t));return}if(!this.storeDefaultText&&this.isLocaleTextEqualsWithDefault(e,t)){if(!this.isValueEmpty(t)||e&&e!==this.defaultLoc)return;let s=I.defaultLocale,i=this.getValue(s);s&&!this.isValueEmpty(i)&&(this.setValue(s,t),this.fireStrChanged(s,i));return}if(p.localization.storeDuplicatedTranslations||this.isValueEmpty(t)||!e||e==this.defaultLoc||void 0!==this.getValue(e)||t!=this.getLocaleText(this.defaultLoc)){var s=this.curLocale;e||(e=this.defaultLoc);var i=this.onStrChanged&&e===s?this.pureText:void 0;delete this.htmlValues[e],this.isValueEmpty(t)?this.deleteValue(e):"str
1ing"==typeof t&&(this.canRemoveLocValue(e,t)?this.deleteValue(e):(this.setValue(e,t),e==this.defaultLoc&&this.deleteValuesEqualsToDefault(t))),this.fireStrChanged(e,i)}}isValueEmpty(e){return null==e||!this.localizationName&&""===e}get curLocale(){return this.locale?this.locale:this.defaultLoc}canRemoveLocValue(e,t){if(p.localization.storeDuplicatedTranslations||e===this.defaultLoc)return!1;let s=this.getRootDialect(e);if(!s)return t==this.getLocaleText(this.defaultLoc);{let e=this.getLocaleText(s);return e?e==t:this.canRemoveLocValue(s,t)}}fireStrChanged(e,t){if(this.strChanged(),!this.onStrChanged)return;let s=this.pureText;(e!==this.curLocale||t!==s)&&this.onStrChanged(t,s)}hasNonDefaultText(){var e=this.getValuesKeys();return 0!=e.length&&(e.length>1||e[0]!=this.defaultLoc)}getLocales(){var e=this.getValuesKeys();return 0==e.length?[]:e}getJson(e){if(this.sharedData)return this.sharedData.getJson(e);let t=this.getValuesKeys(),s=(null==e?void 0:e.locales)||[],i=s.length>0;if(i){let e=p.localization.defaultLocaleName,i=I.defaultLocale,n=i!==e&&s.indexOf(i)>=0&&0>t.indexOf(i);for(let i=t.length-1;i>=0;i--)if(0>s.indexOf(t[i])){if(n&&t[i]===e)continue;t.splice(i,1)}}if(0==t.length){if(!i&&this.serializeCallBackText){let e=this.calcText();if(e)return e}return null}if(1==t.length&&(i||t[0]==p.localization.defaultLocaleName)&&!p.serialization.localizableStringSerializeAsObject)return this.values[t[0]];let n={};for(let e=0;e<t.length;e++){let s=t[e];n[s]=this.values[s]}return n}setJson(e,t){if(this.sharedData)return void this.sharedData.setJson(e,t);if(this.lastChangedLoc=void 0,this.values={},this.htmlValues={},null!=e)if(t)"string"==typeof e?this.values[p.defaultLocaleName]=e:(this.values=e,delete this.values.pos);else{if("string"==typeof e)this.setLocaleText(null,e);else for(var s in e)this.setLocaleText(s,e[s]);this.strChanged()}}mergeWith(e,t){if(this.sharedData)return void this.sharedData.mergeWith(e);let s=e.getLocales();if(Array.isArray(t)&&1===t.length&&1===s.length&&s[0]===this.defaultLoc)this.setLocaleText(t[0],e.getLocaleText(this.defaultLoc));else{t=t||s;for(let s=0;s<t.length;s++){let i=t[s],n=e.getLocaleText(i);this.setLocaleText(i,n)}}}get renderAs(){return this.owner&&"function"==typeof this.owner.getRenderer&&this.owner.getRenderer(this.name)||R.defaultRenderer}get renderAsData(){return this.owner&&"function"==typeof this.owner.getRendererContext&&this.owner.getRendererContext(this)||this}equals(e){return this.sharedData?this.sharedData.equals(e):!!e&&!!e.values&&w.isTwoValueEquals(this.values,e.values,!1,!0,!1)}setFindText(e){if(this.searchText!=e){if(this.searchText=e,!this.searchableText){let e=this.textOrHtml;this.searchableText=e?e.toLowerCase():""}var t=this.searchableText,s=t&&e?t.indexOf(e):void 0;return s<0&&(s=void 0),(void 0!=s||this.searchIndex!=s)&&(this.searchIndex=s,this.onSearchChanged&&this.onSearchChanged()),void 0!=this.searchIndex}}onChanged(){}hasHtmlValue(){if(!this.owner||!this.useMarkdown)return!1;let e=this.locale;if(e||(e=this.defaultLoc),void 0!==this.htmlValues[e])return!!this.htmlValues[e];let t=this.calculatedText;if(!t||this.getLocalizationName()&&t===this.getLocalizationStr())return this.setHtmlValue(e,""),!1;let s=this.owner.getMarkdownHtml(t,this.name);return this.setHtmlValue(e,s),!!s}setHtmlValue(e,t){this.htmlValues[e]=t}getHtmlValue(){var e=this.locale;return e||(e=this.defaultLoc),this.htmlValues[e]}deleteValuesEqualsToDefault(e){if(!p.localization.storeDuplicatedTranslations)for(var t=this.getValuesKeys(),s=0;s<t.length;s++)t[s]!=this.defaultLoc&&this.getValue(t[s])==e&&this.deleteValue(t[s])}getValue(e){return this.sharedData?this.sharedData.getValue(e):this.values[this.getValueLoc(e)]}setValue(e,t){this.sharedData?this.sharedData.setValue(e,t):this.values[this.getValueLoc(e)]=t}deleteValue(e){this.sharedData?this.sharedData.deleteValue(e):delete this.values[this.getValueLoc(e)]}getValueLoc(e){return this.disableLocalization?p.localization.defaultLocaleName:e}getValuesKeys(){return this.sharedData?this.sharedData.getValuesKeys():Object.keys(this.values)}get defaultLoc(){return p.localization.defaultLocaleName}}
vendor: 4,654 bytes, line 1
1R.SerializeAsObject=!1,R.defaultRenderer="sv-string-viewer",R.editableRenderer="sv-string-editor";class T{constructor(e){this.owner=e,this.values={}}getIsMultiple(){return!0}get locale(){return this.owner&&this.owner.getLocale?this.owner.getLocale():""}get value(){return this.getValue("")}set value(e){this.setValue("",e)}get text(){return Array.isArray(this.value)?this.value.join("\n"):""}set text(e){this.value=e?e.split("\n"):[]}getLocaleText(e){var t=this.getValueCore(e,!e||e===this.locale);return t&&Array.isArray(t)&&0!=t.length?t.join("\n"):""}setLocaleText(e,t){var s=t?t.split("\n"):null;this.setValue(e,s)}getValue(e){return this.getValueCore(e)}getValueCore(e,t=!0){if(e=this.getLocale(e),this.values[e])return this.values[e];if(t){var s=p.localization.defaultLocaleName;if(e!==s&&this.values[s])return this.values[s]}return[]}setValue(e,t){e=this.getLocale(e);let s=w.createCopy(this.values);t&&0!=t.length?this.values[e]=t:delete this.values[e],this.onValueChanged&&this.onValueChanged(s,this.values)}hasValue(e=""){return!this.isEmpty&&this.getValue(e).length>0}get isEmpty(){return 0==this.getValuesKeys().length}getLocale(e){return e||(e=this.locale)||p.localization.defaultLocaleName}getLocales(){var e=this.getValuesKeys();return 0==e.length?[]:e}getJson(){var e=this.getValuesKeys();return 0==e.length?null:1!=e.length||e[0]!=p.localization.defaultLocaleName||p.serialization.localizableStringSerializeAsObject?w.createCopy(this.values):this.values[e[0]]}setJson(e){if(this.values={},e)if(Array.isArray(e))this.setValue(null,e);else for(var t in e)this.setValue(t,e[t])}getValuesKeys(){return Object.keys(this.values)}}class A{constructor(e,t,s=!1){this.name=t,this.isRequiredValue=!1,this.isUniqueValue=!1,this.isSerializable=!0,this.isLightSerializable=!0,this.isCustom=!1,this.isDynamicChoices=!1,this.isBindable=!1,this.category="",this.categoryIndex=-1,this.visibleIndex=-1,this.maxLength=-1,this.isArray=!1,this.classInfoValue=e,this.isRequiredValue=s,this.idValue=A.Index++}get id(){return this.idValue}get classInfo(){return this.classInfoValue}get type(){return this.typeValue?this.typeValue:"string"}set type(e){"itemvalues"===e&&(e="itemvalue[]"),"textitems"===e&&(e="textitem[]"),this.typeValue=e,this.typeValue.indexOf("[]")===this.typeValue.length-2&&(this.isArray=!0,this.className=this.typeValue.substring(0,this.typeValue.length-2))}get isExpression(){return"expression"===this.type||"condition"===this.type}get locationInTable(){return this.locationInTableValue||"column"}set locationInTable(e){this.locationInTableValue=e}get showMode(){let e=this.locationInTableValue;return"detail"===e?"form":"column"===e?"list":""}set showMode(e){this.locationInTable="form"===e?"detail":"list"===e?"column":void 0}get isRequired(){return this.isRequiredValue}set isRequired(e){e!==this.isRequired&&(this.isRequiredValue=e,this.classInfo&&this.classInfo.resetAllProperties())}get isUnique(){return this.isUniqueValue}set isUnique(e){this.isUniqueValue=e}get uniquePropertyName(){return this.uniquePropertyValue}set uniquePropertyName(e){this.uniquePropertyValue=e}isPropertySerializable(e){return this.isSerializableFunc?this.isSerializableFunc(e):this.isSerializable}getDefaultValue(e){let t=this.defaultValueFunc?this.defaultValueFunc(e):this.defaultValueValue;return A.getItemValuesDefaultValue&&H.isDescendantOf(this.className,"itemvalue")&&(t=A.getItemValuesDefaultValue(this.defaultValueValue||[],this.className)),t}get defaultValue(){return this.getDefaultValue(void 0)}set defaultValue(e){this.defaultValueValue=e,void 0!==e&&(this.defaultValueFunc=void 0)}isDefaultValue(e){return this.isDefaultValueByObj(void 0,e)}isDefaultValueByObj(e,t){if(this.isLocalizable)return null==t;let s=this.getDefaultValue(e);return void 0!==s?"object"!=typeof s?s===t:w.isTwoValueEquals(t,s,!1,!0,!1):!1===t&&this.isBooleanType&&!this.defaultValueFunc||""===t||w.isValueEmpty(t)}getSerializableValue(e,t,s){if(this.onSerializeValue)return this.onSerializeValue(e);if(!t&&this.isSerializable&&e.getIsSerializablePropertyEmpty&&e.getIsSerializablePropertyEmpty(this))return;let i=this.getValue(e,s);if(null!=i&&!(!t&&this.isDefaultValueByObj(e,i)))return i}getValue(e,t){if(this.onGetValue)return e=this.getOriginalObj(e),this.onGetValue(e);let s=this.serializationProperty;if(s){let i=e[s];if(i)return i.getJson(t)}return e[this.name]}getPropertyValue(e){return this.isLocalizable?e[this.serializationProperty]?e[this.serializationProperty].text:null:this.getValue(e)}get hasToUseSetValue(){return this.onSetValue||this.serializationProperty}settingValue(e,t){return!this.onSettingValue||e.isLoadingFromJson?t:this.onSettingValue(e,t)}
1setValue(e,t,s){if(this.onSetValue)e=this.getOriginalObj(e),this.onSetValue(e,t,s);else if(this.serializationProperty&&e[this.serializationProperty])e[this.serializationProperty].setJson(t,!0);else{if(t&&"string"==typeof t&&("number"==this.type&&(t=parseInt(t)),this.isBooleanType)){let e=t.toLowerCase();("false"===e||"true"===e)&&(t="true"===e)}e[this.name]=t}}get isBooleanType(){return"boolean"===this.type||"switch"===this.type}validateValue(e,t){let s=this.getChoices(e,e=>{});if(!Array.isArray(s)||0===s.length||"object"==typeof t&&"object"==typeof s[0])return!0;let i=this.acceptedValues;if(Array.isArray(i)&&i.indexOf(t)>-1)return!0;for(let e=0;e<s.length;e++){let i=s[e];if(i==t||"object"==typeof i&&i.value==t)return!0}return!1}getObjType(e){return this.classNamePart?e.replace(this.classNamePart,""):e}get choices(){return this.getChoices(null)}get hasChoices(){return!!this.choicesValue||!!this.choicesfunc}getChoices(e,t=null){return null!=this.choicesValue?this.choicesValue:null!=this.choicesfunc?this.choicesfunc(e,t):null}setChoices(e,t=null){this.choicesValue=e,this.choicesfunc=t}getBaseValue(){return this.baseValue?"function"==typeof this.baseValue?this.baseValue():this.baseValue:""}setBaseValue(e){this.baseValue=e}get readOnly(){return null!=this.readOnlyValue&&this.readOnlyValue}set readOnly(e){this.readOnlyValue=e}isEnable(e){return!this.readOnly&&(!e||!this.enableIf||this.enableIf(this.getOriginalObj(e)))}isVisible(e,t=null){let s=!this.layout||!e||this.layout===e;return!!this.visible&&!!s&&(!this.visibleIf||!t||this.visibleIf(this.getOriginalObj(t)))}getOriginalObj(e){return e&&e.getOriginalByProperty?e.getOriginalByProperty(this.name):e}get visible(){return null==this.visibleValue||this.visibleValue}set visible(e){this.visibleValue=e}isAvailableInVersion(e){return!!this.alternativeName||!!this.oldName||this.isAvailableInVersionCore(e)}getSerializedName(e){return this.alternativeName?this.isAvailableInVersionCore(e)?this.name:this.alternativeName||this.oldName:this.name}getSerializedProperty(e,t){return!this.oldName||this.isAvailableInVersionCore(t)?this:e&&e.getType?H.findProperty(e.getType(),this.oldName):null}isAvailableInVersionCore(e){return!e||!this.version||0>=w.compareVerions(this.version,e)}get isLocalizable(){return null!=this.isLocalizableValue&&this.isLocalizableValue}set isLocalizable(e){this.isLocalizableValue=e}get isMultipleText(){return"string[]"===this.type}get dataList(){return Array.isArray(this.dataListValue)?this.dataListValue:[]}set dataList(e){this.dataListValue=e}mergeWith(e){Object.keys(e).forEach(t=>{this.mergeValue(e,t)}),this.isArray=e.isArray}addDependedProperty(e){this.dependedProperties||(this.dependedProperties=[]),0>this.dependedProperties.indexOf(e)&&this.dependedProperties.push(e)}getDependedProperties(){return this.dependedProperties?this.dependedProperties:[]}schemaType(){if("choicesByUrl"!==this.className){if("string"===this.className)return this.className;if(this.className&&this.isArray||this.baseClassName)return"array";if(!this.className)return"switch"==this.type?"boolean":"boolean"==this.type||"number"==this.type?this.type:"string"}}schemaRef(){if(this.className)return this.className}mergeValue(e,t){null==this[t]&&null!=e[t]&&(this[t]=e[t])}}A.Index=1;class L{static addProperty(e,t){e=e.toLowerCase();var s=L.properties;s[e]||(s[e]=[]),s[e].push(t)}static removeProperty(e,t){e=e.toLowerCase();var s=L.properties;if(s[e]){for(var i=s[e],n=0;n<i.length;n++)if(i[n].name==t){s[e].splice(n,1);break}}}static removeAllProperties(e){e=e.toLowerCase(),delete L.properties[e]}static addClass(e,t){e=e.toLowerCase(),t&&(t=t.toLowerCase()),L.parentClasses[e]=t}static getProperties(e){e=e.toLowerCase();for(var t=[],s=L.properties;e;){var i=s[e];if(i)for(var n=0;n<i.length;n++)t.push(i[n]);e=L.parentClasses[e]}return t}static createProperties(e){e&&e.getType&&L.createPropertiesCore(e,e.getType())}static createPropertiesCore(e,t){var s=L.properties;s[t]&&L.createPropertiesInObj(e,s[t]);var i=L.parentClasses[t];i&&L.createPropertiesCore(e,i)}static createPropertiesInObj(e,t){for(var s=0;s<t.length;s++)L.createPropertyInObj(e,t[s])}static createPropertyInObj(e,t){if(!L.checkIsPropertyExists(e,t.name)&&!(t.serializationProperty&&L.checkIsPropertyExists(e,t.serializationProperty))){if(t.isLocalizable&&t.serializationProperty&&e.createCustomLocalizableObj){e.createCustomLocalizableObj(t.name).defaultValue=t.getDefaultValue(e),Object.defineProperty(e,t.serializationProperty,{get:function(){return e.getLocalizableString(t.name)}});var s={get:function(){return e.getLocalizableStringText(t.name)}
1,set:function(s){e.setLocalizableStringText(t.name,s)}};Object.defineProperty(e,t.name,s)}else{var i=t.isArray||"multiplevalues"===t.type;if("function"==typeof e.createNewArray&&(H.isDescendantOf(t.className,"itemvalue")?(e.createNewArray(t.name,function(s){s.locOwner=e,s.ownerPropertyName=t.name}),i=!0):i&&e.createNewArray(t.name),i)){let s=t.getDefaultValue(e);Array.isArray(s)&&e.setPropertyValue(t.name,s)}if(e.getPropertyValue&&e.setPropertyValue){var s={get:()=>t.onGetValue?t.onGetValue(e):e.getPropertyValue(t.name,void 0),set:function(s){t.onSetValue?t.onSetValue(e,s,null):e.setPropertyValue(t.name,s)}};Object.defineProperty(e,t.name,s)}}("condition"===t.type||"expression"===t.type)&&t.onExecuteExpression&&e.addExpressionProperty(t.name,t.onExecuteExpression)}}static checkIsPropertyExists(e,t){return e.hasOwnProperty(t)||e[t]}}L.properties={},L.parentClasses={};class D{constructor(e,t,s=null,i=null){this.name=e,this.creator=s,this.parentName=i,e=e.toLowerCase(),this.isCustomValue=!s&&"survey"!==e,this.parentName&&(this.parentName=this.parentName.toLowerCase(),L.addClass(e,this.parentName),s&&this.makeParentRegularClass()),this.properties=[];for(var n=0;n<t.length;n++)this.createProperty(t[n],this.isCustom)}find(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].name==e)return this.properties[t];return null}findProperty(e){return this.fillAllProperties(),this.hashProperties[e]}getAllProperties(){return this.fillAllProperties(),this.allProperties}getRequiredProperties(){if(this.requiredProperties)return this.requiredProperties;this.requiredProperties=[];let e=this.getAllProperties();for(let t=0;t<e.length;t++)e[t].isRequired&&this.requiredProperties.push(e[t]);return this.requiredProperties}resetAllProperties(){this.allProperties=void 0,this.requiredProperties=void 0,this.hashProperties=void 0;for(var e=H.getChildrenClasses(this.name),t=0;t<e.length;t++)e[t].resetAllProperties()}get isCustom(){return this.isCustomValue}fillAllProperties(){if(this.allProperties)return;this.allProperties=[],this.hashProperties={};let e={};this.properties.forEach(t=>e[t.name]=t);let t=this.parentName?H.findClass(this.parentName):null;t&&t.getAllProperties().forEach(t=>{let s=e[t.name];s?(s.mergeWith(t),this.addPropCore(s)):this.addPropCore(t)}),this.properties.forEach(e=>{this.hashProperties[e.name]||this.addPropCore(e)})}addPropCore(e){this.allProperties.push(e),this.hashProperties[e.name]=e,e.alternativeName&&(this.hashProperties[e.alternativeName]=e)}isOverridedProp(e){return!!this.parentName&&!!H.findProperty(this.parentName,e)}hasRegularChildClass(){if(this.isCustom){this.isCustomValue=!1;for(var e=0;e<this.properties.length;e++)this.properties[e].isCustom=!1;L.removeAllProperties(this.name),this.makeParentRegularClass()}}makeParentRegularClass(){if(!this.parentName)return;let e=H.findClass(this.parentName);e&&e.hasRegularChildClass()}createProperty(e,t=!1){var s="string"==typeof e?e:e.name;if(s){var i=null,n=s.indexOf(D.typeSymbol);n>-1&&(i=s.substring(n+1),s=s.substring(0,n));var r=this.getIsPropertyNameRequired(s)||!!e.isRequired,a=new A(this,s=this.getPropertyName(s),r);if(i&&(a.type=i),"object"==typeof e){if(e.type&&(a.type=e.type),void 0!==e.default&&(a.defaultValue=e.default),void 0!==e.defaultFunc&&(a.defaultValueFunc=e.defaultFunc),w.isValueEmpty(e.isSerializable)||(a.isSerializable=e.isSerializable),w.isValueEmpty(e.isSerializableFunc)||(a.isSerializableFunc=e.isSerializableFunc),w.isValueEmpty(e.isLightSerializable)||(a.isLightSerializable=e.isLightSerializable),w.isValueEmpty(e.maxLength)||(a.maxLength=e.maxLength),void 0!==e.displayName&&(a.displayName=e.displayName),w.isValueEmpty(e.category)||(a.category=e.category),w.isValueEmpty(e.categoryIndex)||(a.categoryIndex=e.categoryIndex),w.isValueEmpty(e.nextToProperty)||(a.nextToProperty=e.nextToProperty),w.isValueEmpty(e.overridingProperty)||(a.overridingProperty=e.overridingProperty),w.isValueEmpty(e.visibleIndex)||(a.visibleIndex=e.visibleIndex),w.isValueEmpty(e.showMode)||(a.showMode=e.showMode),w.isValueEmpty(e.locationInTable)||(a.locationInTable=e.locationInTable),w.isValueEmpty(e.maxValue)||(a.maxValue=e.maxValue),w.isValueEmpty(e.minValue)||(a.minValue=e.minValue),w.isValueEmpty(e.dataList)||(a.dataList=e.dataList),w.isValueEmpty(e.isDynamicChoices)||(a.isDynamicChoices=e.isDynamicChoices),w.isValueEmpty(e.isBindable)||(a.isBindable=e.isBindable),w.isValueEmpty(e.isUnique)||(a.isUnique=e.isUnique),w.isValueEmpty(e.uniqueProperty)||(a.uniquePropertyName=e.uniqueProperty),w.isValueEmpty(e.isArray)||(a.isArray=e.isArray),Array.isArray(e.acceptedValues)&&(a.acceptedValues=e.acceptedValues),(!0===e.visible||!1===e.visible)&&(a.visible=e.visible),e.visibleIf&&(a.visibleIf=e.visibleIf),e.enableIf&&(a.enableIf=e.enableIf),e.onExecuteExpression&&(a.onExecuteExpression=e.onExecuteExpression),e.onPropertyEditorUpdate&&(a.onPropertyEditorUpdate=e.onPropertyEditorUpdate),!0===e.readOnly&&(a.readOnly=!0),!0===e.availableInMatrixColumn&&(a.availableInMatrixColumn=!0),e.choices){var o,l="function"==typeof e.choices?e.choices:null,u="function"!=typeof e.choices?e.choices:null;a.setChoices(u,l)}e.baseValue&&a.setBaseValue(e.baseValue),e.onSerializeValue&&(a.onSerializeValue=e.onSerializeValue),e.onGetValue&&(a.onGetValue=e.onGetValue),e.onSetValue&&(a.onSetValue=e.onSetValue),e.onSettingValue&&(a.onSettingValue=e.onSettingValue),e.isLocalizable&&!e.serializationProperty&&(e.serializationProperty="loc"+(o=a.name).charAt(0).toUpperCase()+o.slice(1)),e.serializationProperty&&(a.serializationProperty=e.serializationProperty,a.serializationProperty&&0==a.serializationProperty.indexOf("loc")&&(a.isLocalizable=!0)),e.isLocalizable&&(a.isLocalizable=e.isLocalizable),e.className&&(a.className=e.className),e.baseClassName&&(a.baseClassName=e.baseClassName,a.isArray=!0),!0===a.isArray&&(a.isArray=!0),e.classNamePart&&(a.classNamePart=e.classNamePart),e.alternativeName&&(a.alternativeName=e.alternativeName),e.oldName&&(a.oldName=e.oldName),e.layout&&(a.layout=e.layout),e.version&&(a.version=e.version),e.dependsOn&&this.addDependsOnProperties(a,e.dependsOn)}return this.properties.push(a),t&&!this.isOverridedProp(a.name)&&(a.isCustom=!0,L.addProperty(this.name,a)),a}}addDependsOnProperties(e,t){let s=Array.isArray(t)?t:[t];e.dependsOn=s;for(var i=0;i<s.length;i++)this.addDependsOnProperty(e,s[i])}addDependsOnProperty(e,t){var s=this.find(t);s||(s=H.findProperty(this.parentName,t)),s&&s.addDependedProperty(e.name)}getIsPropertyNameRequired(e){return e.length>0&&e[0]==D.requiredSymbol}getPropertyName(e){return this.getIsPropertyNameRequired(e)?e=e.slice(1):e}}
1D.requiredSymbol="!",D.typeSymbol=":";class O{constructor(e,t){this.type=e,this.message=t,this.description="",this.at=-1,this.end=-1}getFullDescription(){return this.message+(this.description?"\n"+this.description:"")}}class N extends O{constructor(e,t){super("unknownproperty","Unknown property in class '"+t+"': '"+e+"'."),this.propertyName=e,this.className=t}}class M extends O{constructor(e,t,s){super(t,s),this.baseClassName=e,this.type=t,this.message=s}}class k extends M{constructor(e,t){super(t,"missingtypeproperty","The property type is missing in the object. Please take a look at property: '"+e+"'."),this.propertyName=e,this.baseClassName=t}}class q extends M{constructor(e,t){super(t,"incorrecttypeproperty","The property type is incorrect in the object. Please take a look at property: '"+e+"'."),this.propertyName=e,this.baseClassName=t}}class F extends O{constructor(e,t){super("requiredproperty","The property '"+e+"' is required in class '"+t+"'."),this.propertyName=e,this.className=t}}class B extends O{constructor(e,t){super("arrayproperty","The property '"+e+"' should be an array in '"+t+"'."),this.propertyName=e,this.className=t}}class _ extends O{constructor(e,t){super("incorrectvalue","The property value: '"+t+"' is incorrect for property '"+e.name+"'."),this.property=e,this.value=t}}class Q{constructor(){this.errors=[],this.lightSerializing=!1}static get metaData(){return Q.metaDataValue}toJsonObject(e,t){return this.toJsonObjectCore(e,null,t)}toObject(e,t,s){this.toObjectCore(e,t,s);var i=this.getRequiredError(t,e);i&&this.addNewError(i,e,t)}toObjectCore(e,t,s){if(!e)return;var i=null,n=void 0,r=!0;if(t.getType&&(n=t.getType(),i=H.getProperties(n),r=!!n&&!H.isDescendantOf(n,"itemvalue")),!i)return;t.startLoadingFromJson&&t.startLoadingFromJson(e),i=this.addDynamicProperties(t,e,i),this.options=s;let a={};a[Q.typePropertyName]=!0;let o={};for(var l in e)this.setPropertyValueToObj(e,t,l,i,a,o,n,r,s);this.options=void 0,t.endLoadingFromJson&&t.endLoadingFromJson()}setPropertyValueToObj(e,t,s,i,n,r,a,o,l){if(n[s])return;if(s===Q.positionPropertyName){t[s]=e[s];return}let u=this.findProperty(i,s);if(!u&&o&&this.addNewError(new N(s.toString(),a),e,t),u){let o=u.dependsOn;Array.isArray(o)&&(r[s]=!0,o.forEach(s=>{r[s]||this.setPropertyValueToObj(e,t,s,i,n,r,a,!1,l)})),this.valueToObj(e[s],t,u,e,l),n[s]=!0}}toJsonObjectCore(e,t,s){if(!e||!e.getType)return e;if(!e.isSurvey&&"function"==typeof e.getData)return e.getData(s);var i={};null==t||t.className||(i[Q.typePropertyName]=t.getObjType(e.getType()));let n=!0===s;return s&&!0!==s||(s={}),n&&(s.storeDefaults=n),!1===s.storeLocaleStrings&&(s.locales=void 0),this.propertiesToJson(e,H.getProperties(e.getType()),i,s),this.propertiesToJson(e,this.getDynamicProperties(e),i,s),i}getDynamicProperties(e){return H.getDynamicPropertiesByObj(e)}addDynamicProperties(e,t,s){if(!e.getDynamicPropertyName&&!e.getDynamicProperties)return s;if(e.getDynamicPropertyName){let i=e.getDynamicPropertyName();if(!i)return s;i&&t[i]&&(e[i]=t[i])}let i=this.getDynamicProperties(e);return 0===i.length?s:[].concat(s).concat(i)}propertiesToJson(e,t,s,i){for(var n=0;n<t.length;n++)this.valueToJson(e,s,t[n],i)}valueToJson(e,t,s,i){i||(i={}),!this.isProretyCanBeStoredByOptions(s,i)||!s.isPropertySerializable(e)||!1===s.isLightSerializable&&this.lightSerializing||(!i.version||s.isAvailableInVersion(i.version))&&this.valueToJsonCore(e,t,s,i)}isProretyCanBeStoredByOptions(e,t){let s=t.storeLocaleStrings;return!!e.isArray||!!e.isUnique||"name"===e.name||(!1===s?!e.isLocalizable:"stringsOnly"!==s||e.isLocalizable||!!e.serializationProperty)}valueToJsonCore(e,t,s,i){let n=s.getSerializedProperty(e,i.version);if(n&&n!==s)return void this.valueToJsonCore(e,t,n,i);var r=s.getSerializableValue(e,i.storeDefaults,i);if(void 0===r)return;if(this.isValueArray(r)){for(var a=[],o=0;o<r.length;o++)a.push(this.toJsonObjectCore(r[o],s,i));"stringsOnly"===i.storeLocaleStrings&&this.reduceLocaleArray(a),r=a.length>0?a:null}else r=this.toJsonObjectCore(r,s,i);if(null==r)return;let l=s.getSerializedName(i.version);H.onSerializingProperty&&H.onSerializingProperty(e,s,r,t)||(t[l]=this.removePosOnValueToJson(s,r))}reduceLocaleArray(e){let t=e.length-1;for(;t>=0;){let s=e[t];if(s&&"object"==typeof s){let e=Object.keys(s).length;if(["type","name","value"].forEach(t=>{void 0!==s[t]&&e--}),e>0)break}t--}e.splice(t+1)}valueToObj(e,t,s,i,n){if(null!=e){if(this.removePos(s,e),null!=s&&s.hasToUseSetValue)return void s.setValue(t,e,this);if(s.isArray&&!Array.isArray(e)&&e){e=[e];let n=i&&s.alternativeName&&i[s.alternativeName]?s.alternativeName:s.name;this.addNewError(new B(n,t.getType()),i||e,t)}if(this.isValueArray(e))return void this.valueToArray(e,t,s.name,s,n);var r=this.createNewObj(e,s);r.newObj&&(this.toObjectCore(e,r.newObj,n),e=r.newObj),!r.error&&(null!=s?(s.setValue(t,e,this),n&&n.validatePropertyValues&&!s.validateValue(t,e)&&this.addNewError(new _(s,e),i,t)):t[s.name]=e)}}removePosOnValueToJson(e,t){return e.isCustom&&t&&this.removePosFromObj(t),t}removePos(e,t){!e||!e.type||0>e.type.indexOf("value")||this.removePosFromObj(t)}removePosFromObj(e){if(e&&"function"!=typeof e.getType){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.removePosFromObj(e[t]);if("object"==typeof e)for(let t in e[Q.positionPropertyName]&&delete e[Q.positionPropertyName],e)this.removePosFromObj(e[t])}}isValueArray(e){return e&&Array.isArray(e)}createNewObj(e,t){var s={newObj:null,error:null};let i=this.getClassNameForNewObj(e,t);return s.newObj=i?H.createClass(i,e):null,s.error=this.checkNewObjectOnErrors(s.newObj,e,t,i),s}getClassNameForNewObj(e,t){var s=null!=t&&t.className?t.className:void 0;if(s||(s=e[Q.typePropertyName]),!s)return s;s=s.toLowerCase();let i=t.classNamePart;return i&&0>s.indexOf(i)&&(s+=i),s}checkNewObjectOnErrors(e,t,s,i){var n=null;return e?n=this.getRequiredError(e,t):s.baseClassName&&(n=i?new q(s.name,s.baseClassName):new k(s.name,s.baseClassName)),n&&this.addNewError(n,t,e),n}getRequiredError(e,t){if(!e.getType)return null;let s=e.getType();if(H.isDescendantOf(s,"itemvalue"))return null;let i=H.findClass(s);if(!i)return null;let n=i.getRequiredProperties();if(!Array.isArray(n))return null;for(var r=0;r<n.length;r++){let s=n[r];if(w.isValueEmpty(s.defaultValue)&&!t[s.name])return new F(s.name,e.getType())}return null}addNewError(e,t,s){if(e.jsonObj=t,e.element=s,this.errors.push(e),!t)return;let i=t[Q.positionPropertyName];i&&(e.at=i.start,e.end=i.end)}valueToArray(e,t,s,i,n){if(!t[s]||this.isValueArray(t[s])){t[s]&&e.length>0&&t[s].splice(0,t[s].length);var r=t[s]?t[s]:[];this.addValuesIntoArray(e,r,i,n),t[s]||(t[s]=r)}}addValuesIntoArray(e,t,s,i){for(var n=0;n<e.length;n++){var r=this.createNewObj(e[n],s);r.newObj?(e[n].name&&(r.newObj.name=e[n].name),e[n].valueName&&(r.newObj.valueName=e[n].valueName.toString()),t.push(r.newObj),this.toObjectCore(e[n],r.newObj,i)
1):r.error||t.push(e[n])}}findProperty(e,t){if(!e)return null;for(var s=0;s<e.length;s++){var i=e[s];if(i.name==t||i.alternativeName==t)return i}return null}}Q.typePropertyName="type",Q.positionPropertyName="pos",Q.metaDataValue=new class{constructor(){this.classes={},this.alternativeNames={},this.childrenClasses={},this.dynamicPropsCache={}}getObjPropertyValue(e,t){e=e.getOriginalByProperty&&this.isNeedUseObjWrapper(e,t)?e.getOriginalByProperty(t):e;let s=H.findProperty(e.getType(),t);return s?this.getObjPropertyValueCore(e,s):e[t]}setObjPropertyValue(e,t,s){if(e[t]!==s)if(e[t]&&e[t].setJson)e[t].setJson(s,!0);else{if(Array.isArray(s)){let e=[];for(var i=0;i<s.length;i++)e.push(s[i]);s=e}else s&&"object"==typeof s&&!s.getType&&(s=w.getUnbindValue(s));e[t]=s}}getObjPropertyValueCore(e,t){if(!t.isPropertySerializable(e)||t.isArray)return e[t.name];if(t.isLocalizable){let s=e.getLocalizableString(t.name);if(s)return s.isDefautlLocale?s.text:s.getValue(s.locale);if(t.serializationProperty)return e[t.serializationProperty].text}return e.getPropertyValue(t.name)}isNeedUseObjWrapper(e,t){if(!e.getDynamicProperties)return!0;let s=e.getDynamicProperties();if(!Array.isArray(s))return!1;for(let e=0;e<s.length;e++)if(s[e].name===t)return!0;return!1}addClass(e,t,s=null,i=null){var n=new D(e=e.toLowerCase(),t,s,i);return this.classes[e]=n,i&&(i=i.toLowerCase(),this.childrenClasses[i]||(this.childrenClasses[i]=[]),this.childrenClasses[i].push(n)),n}removeClass(e){var t=this.findClass(e);if(t&&(delete this.classes[t.name],t.parentName)){var s=this.childrenClasses[t.parentName].indexOf(t);s>-1&&this.childrenClasses[t.parentName].splice(s,1)}}overrideClassCreatore(e,t){this.overrideClassCreator(e,t)}overrideClassCreator(e,t){e=e.toLowerCase();var s=this.findClass(e);s&&(s.creator=t)}getProperties(e){var t=this.findClass(e);return t?t.getAllProperties():[]}getPropertiesByObj(e){let t=e&&e.getType?e.getType():void 0;if(!t)return[];let s=this.getProperties(t),i=this.getDynamicPropertiesByObj(e);for(let e=i.length-1;e>=0;e--)this.findProperty(t,i[e].name)&&i.splice(e,1);return 0===i.length?s:[].concat(s).concat(i)}addDynamicPropertiesIntoObj(e,t,s){s.forEach(s=>{this.addDynamicPropertyIntoObj(e,t,s.name,!1),s.serializationProperty&&this.addDynamicPropertyIntoObj(e,t,s.serializationProperty,!0),s.alternativeName&&this.addDynamicPropertyIntoObj(e,t,s.alternativeName,!1)})}addDynamicPropertyIntoObj(e,t,s,i){var n={configurable:!0,get:function(){return t[s]}};i||(n.set=function(e){t[s]=e}),Object.defineProperty(e,s,n)}getDynamicPropertiesByObj(e,t=null){if(!e||!e.getType)return[];if(e.getDynamicProperties)return e.getDynamicProperties();if(!e.getDynamicType&&!t)return[];let s=t||e.getDynamicType();return this.getDynamicPropertiesByTypes(e.getType(),s)}getDynamicPropertiesByTypes(e,t,s){if(!t)return[];let i=t+"-"+e;if(this.dynamicPropsCache[i])return this.dynamicPropsCache[i];var n=this.getProperties(t);if(!n||0==n.length)return[];let r={},a=this.getProperties(e);for(var o=0;o<a.length;o++)r[a[o].name]=a[o];let l=[];s||(s=[]);for(let e=0;e<n.length;e++){let t=n[e];if(this.canAddDynamicProp(t,r[t.name])){if(s.indexOf(t.name)>-1){let e=new A(t.classInfo,t.name,t.isRequired);e.mergeWith(t),(t=e).visible=!1,t.isSerializable=!1}l.push(t)}}return this.dynamicPropsCache[i]=l,l}canAddDynamicProp(e,t){if(!t)return!0;if(e===t)return!1;let s=e.classInfo;for(;s&&s.parentName;){if((e=this.findProperty(s.parentName,e.name))&&e===t)return!0;s=e?e.classInfo:void 0}return!1}hasOriginalProperty(e,t){return!!this.getOriginalProperty(e,t)}getOriginalProperty(e,t){var s=this.findProperty(e.getType(),t);if(s)return s;let i=e.getOriginalByProperty(t);return i!==e?this.findProperty(i.getType(),t):null}getProperty(e,t){let s=this.findProperty(e,t);if(!s)return s;let i=this.findClass(e);if(s.classInfo===i)return s;let n=new A(i,s.name,s.isRequired);return n.mergeWith(s),i.properties.push(n),i.resetAllProperties(),n}findProperty(e,t){let s=this.findClass(e);return s?s.findProperty(t):null}findProperties(e,t){var s=[];let i=this.findClass(e);if(!i)return s;for(var n=0;n<t.length;n++){var r=i.findProperty(t[n]);r&&s.push(r)}return s}getAllPropertiesByName(e){for(var t=[],s=this.getAllClasses(),i=0;i<s.length;i++)for(var n=this.findClass(s[i]),r=0;r<n.properties.length;r++)if(n.properties[r].name==e){t.push(n.properties[r]);break}return t}getAllClasses(){var e=[];for(var t in this.classes)e.push(t);return e}createClass(e,t){e=e.toLowerCase();var s=this.findClass(e);if(!s)return null;if(s.creator)return s.creator(t);for(var i=s.parentName;i&&(s=this.findClass(i));)if(i=s.parentName,s.creator)return this.createCustomType(e,s.creator,t);return null}createCustomType(e,t,s){e=e.toLowerCase();var i=t(s),n=e,r=i.getTemplate?i.getTemplate():i.getType();return i.getType=function(){return n},i.getTemplate=function(){return r},L.createProperties(i),i}getChildrenClasses(e,t=!1){e=e.toLowerCase();var s=[];return this.fillChildrenClasses(e,t,s),s}getRequiredProperties(e){let t=this.findClass(e);if(!t)return[];let s=t.getRequiredProperties();for(var i=[],n=0;n<s.length;n++)i.push(s[n].name);return i}addProperties(e,t){e=e.toLowerCase();for(var s=this.findClass(e),i=0;i<t.length;i++)this.addCustomPropertyCore(s,t[i])}addProperty(e,t){return this.addCustomPropertyCore(this.findClass(e),t)}addCustomPropertyCore(e,t){if(!e)return null;var s=e.createProperty(t,!0);return s&&(this.clearDynamicPropsCache(e),e.resetAllProperties()),s}removeProperty(e,t){var s=this.findClass(e);if(!s)return!1;var i=s.find(t);i&&(this.clearDynamicPropsCache(s),this.removePropertyFromClass(s,i),s.resetAllProperties(),L.removeProperty(s.name,t))}clearDynamicPropsCache(e){this.dynamicPropsCache={}}removePropertyFromClass(e,t){var s=e.properties.indexOf(t);s<0||e.properties.splice(s,1)}fillChildrenClasses(e,t,s){var i=this.childrenClasses[e];if(i)for(var n=0;n<i.length;n++)(!t||i[n].creator)&&s.push(i[n]),this.fillChildrenClasses(i[n].name,t,s)}findClass(e){e=e.toLowerCase();var t=this.classes[e];if(!t){var s=this.alternativeNames[e];if(s&&s!=e)return this.findClass(s)}return t}isDescendantOf(e,t){if(!e||!t)return!1;e=e.toLowerCase(),t=t.toLowerCase();var s=this.findClass(e);if(!s)return!1;var i=s;do{if(i.name===t)return!0;
1i=this.classes[i.parentName]}while(!!i)return!1}addAlterNativeClassName(e,t){this.alternativeNames[t.toLowerCase()]=e.toLowerCase()}generateSchema(e){e||(e="survey");var t=this.findClass(e);if(!t)return null;var s={$schema:"http://json-schema.org/draft-07/schema#",title:"SurveyJS Library json schema",type:"object",properties:{},definitions:{locstring:this.generateLocStrClass()}};return this.generateSchemaProperties(t,s,s.definitions,!0),s}generateLocStrClass(){let e={},t=H.findProperty("survey","locale");if(t){let s=t.getChoices(null);Array.isArray(s)&&(0>s.indexOf("en")&&s.splice(0,0,"en"),s.splice(0,0,"default"),s.forEach(t=>{t&&(e[t]={type:"string"})}))}return{$id:"locstring",type:"object",properties:e}}generateSchemaProperties(e,t,s,i){if(!e)return;let n=t.properties,r=[];"question"===e.name&&(n.type={type:"string"},r.push("type"));for(let t=0;t<e.properties.length;t++){let a=e.properties[t];!1!==a.isSerializable&&!(e.parentName&&H.findProperty(e.parentName,a.name))&&(n[a.name]=this.generateSchemaProperty(a,s,i),a.isRequired&&r.push(a.name))}r.length>0&&(t.required=r)}generateSchemaProperty(e,t,s){let i;if(e.isLocalizable)return{oneOf:[{type:"string"},{$ref:this.getChemeRefName("locstring",s)}]};let n=e.schemaType(),r=e.schemaRef();var a={};if(n&&(a.type=n),e.hasChoices&&"locale"!==e.name){let t=e.getChoices(null);Array.isArray(t)&&t.length>0&&(a.enum=this.getChoicesValues(t))}if(r){if("array"===n)if("string"===e.className)a.items={type:e.className};else{let t={$ref:this.getChemeRefName(e.className,s)};!p.serialization.itemValueSerializeAsObject&&this.isDescendantOf(e.className,"itemvalue")?a.items={anyOf:[t,{type:"string"},{type:"number"}]}:a.items=t}else{let n=this.getChildrenClasses(e.className,!0);if(n.length>0)for(a.oneOf=[{$ref:this.getChemeRefName(e.className,s)}],i=0;i<n.length;i++)a.oneOf.push({$ref:this.getChemeRefName(n[i].name,s)}),this.generateChemaClass(n[i].name,t,!1);else a.$ref=this.getChemeRefName(r,s)}this.generateChemaClass(e.className,t,!1)}if(e.baseClassName){var o=this.getChildrenClasses(e.baseClassName,!0);for("question"==e.baseClassName&&o.push(this.findClass("panel")),a.items={anyOf:[]},i=0;i<o.length;i++){var l=o[i].name;a.items.anyOf.push({$ref:this.getChemeRefName(l,s)}),this.generateChemaClass(l,t,!1)}}return a}getChemeRefName(e,t){return t?"#/definitions/"+e:e}generateChemaClass(e,t,s){if(t[e])return;var i=this.findClass(e);if(!i)return;var n=!!i.parentName&&"base"!=i.parentName;n&&this.generateChemaClass(i.parentName,t,s);let r={type:"object",$id:e};t[e]=r;let a={properties:{}};this.generateSchemaProperties(i,a,t,s),n?r.allOf=[{$ref:this.getChemeRefName(i.parentName,s)},{properties:a.properties}]:r.properties=a.properties,Array.isArray(a.required)&&(r.required=a.required)}getChoicesValues(e){let t=[];return e.forEach(e=>{"object"==typeof e&&void 0!==e.value?t.push(e.value):t.push(e)}),t}};var H=Q.metaData;class z{getValueInfo(e){let t=this.getValueInfoCore(e);return!t.isFound&&void 0===t.value&&e.name.endsWith(".length")&&(t.isFound=!0,t.value=0),t}getValueInfoCore(e){let t=e.name,s=e.context,i=this.run(e.name,s,e.createObjects);if((!i||!i.isFound)&&s&&s.getRootObj){let t=s.getRootObj();if(t)return e.context=t.getValueGetterContext(),this.getValueInfo(e)}let n={isFound:!1,value:void 0};
1return i&&i.isFound&&(n.isFound=!0,n.value=i.value,n.strictCompare=i.requireStrictCompare,n.propObj=i.propObj,n.propName=i.propName,i.context&&(e.isText&&i.context.getTextValue&&(n.value=i.context.getTextValue(t,n.value,e.isDisplayValue)),i.context.getQuestion&&(n.question=i.context.getQuestion()))),n}getValue(e,t,s,i){let n=this.getValueInfo({name:e,context:t,isText:s,isDisplayValue:i});return n.isFound?n.value:void 0}getDisplayValue(e,t,s=!0){return this.getValue(e,t,!0,s)}isAnyKeyChanged(e,t){for(var s=0;s<t.length;s++){let r=t[s];if(!r)continue;let a=r.toLowerCase();if(e.hasOwnProperty(r)||r!==a&&e.hasOwnProperty(a))return!0;let o=this.getFirstNameByKeys(e,r);if(!o)continue;if(r===o)return!0;let l=e[o];if(void 0==l)continue;if(!l.hasOwnProperty("oldValue")||!l.hasOwnProperty("newValue"))return!0;let u={};u[o]=l.oldValue;var i=this.getValueFromObject(u,r);u[o]=l.newValue;var n=this.getValueFromObject(u,r);if(!w.isTwoValueEquals(i,n,!1,!1,!1))return!0}return!1}getFirstNameByKeys(e,t){let s=this.getPath(t),i="";for(let t=0;t<s.length;t++)if(i+=(t>0?".":"")+s[t].name,e.hasOwnProperty(i))return i;return""}getValueFromObject(e,t){let s=this.getValueInfo({name:t,context:new W(e)});return s.isFound?s.value:void 0}run(e,t,s){if(!t)return;let i=this.getPath(e),n=p.expressionElementPropertyPrefix,r=!!n&&i.length>0&&i[0].name[0]===n;r&&(i[0].name=i[0].name.substring(1));let a=t.getValue({path:i,isRoot:!0,index:-1,createObjects:s,isProperty:r});return(null==a?void 0:a.isFound)?a:void 0}getPath(e){let t=[],s=e.split(".");for(let e=0;e<s.length;e++)t.push(this.getValueItem(s[e]));return t}getValueItem(e){let t;if(e.lastIndexOf("]")===e.length-1){let s=e.lastIndexOf("[");if(s>-1){let i=e.substring(s+1,e.length-1);isNaN(t=w.getNumber(i))&&(t=void 0),void 0!==t&&(e=e.substring(0,s))}}let s={name:e};return void 0!==t&&(s.index=t),s}}class U{getValue(e){let t=0,s=e.path,i={isFound:!1,value:this.getInitialvalue(),context:this};for(;t<s.length;){if(t=this.checkValueByPath(s,t,i),!i.isFound)return;if(e.isProperty){if(i.obj)return new j(i.obj).getValue({path:s.slice(1),isRoot:!1,index:-1,isProperty:!0});if(!i.context)return}let n=s[t];if(t++,i.context!==this&&i.context)return i.context.getValue({path:s.slice(t),isRoot:!1,index:n.index,createObjects:e.createObjects,isProperty:e.isProperty});if(void 0!==n.index&&(this.updateItemByIndex(n.index,i),!i.isFound))return}return i}isSearchNameRevert(){return!1}checkValueByPath(e,t,s){let i=this.isSearchNameRevert(),n=t,r=this.getMaxIndexByPath(e,t);for(s.isFound=!1,i&&(t=r);!s.isFound&&t<=r&&t>=n;){let r=this.getNameByPath(e,n,t+1);if(this.updateValueByItem(r,s),s.isFound)break;t+=i?-1:1}return t}getNameByPath(e,t,s){let i="";for(let n=t;n<s;n++)n>t&&(i+="."),i+=e[n].name;return i}getMaxIndexByPath(e,t){let s=t;for(;s<e.length&&void 0===e[s].index;)s++;return s<e.length?s:e.length-1}getTextValue(e,t,s){return s?null==t?"":t.toString():t}getInitialvalue(){}updateValueByItem(e,t){}updateItemByIndex(e,t){}}class W extends U{constructor(e){super(),this.variables=e}getInitialvalue(){return this.variables}isSearchNameRevert(){return!0}updateValueByItem(e,t){let s=this.getValueByItemCore(t.value,e);t.isFound=void 0!==s,t.isFound&&(t.value=s)}updateItemByIndex(e,t){let s=t.value;t.isFound=!1,Array.isArray(s)&&(e<0&&(e=s.length+e),e>-1&&e<s.length&&(t.value=s[e],t.isFound=!0))}getValueByItemCore(e,t){if(!e||!t)return;let s=t.toLowerCase();if("length"===t&&(Array.isArray(e)||"string"==typeof e))return e.length;if("object"!=typeof e)return;let i=s[0],n=t[0].toLocaleUpperCase();for(var r in e){var a=r[0];if((a===i||a===n)&&r.toLowerCase()==s)return e[r]}}}class j extends W{constructor(e){super(e),this.obj=e}getValue(e){this.lastObj=void 0,this.lastName=void 0;let t=super.getValue(e);return(null==t?void 0:t.isFound)&&(t.propObj=this.lastObj,t.propName=this.lastName),t}getValueByItemCore(e,t){if(e&&t)return this.lastObj=e,this.lastName=t,e[t]}}class G extends W{constructor(e,t){super(e),this.second=t}getValue(e){let t=super.getValue(e);return!this.second||(null==t?void 0:t.isFound)?t:this.second.getValue(e)}}class Z{constructor(e){this.properties=null,this.asyncValues={},this.contextValue=e}get context(){return this.contextValue}hasValue(e){return!!this.context&&this.getValueInfoByContext(e).isFound}getValue(e){if(this.context)return this.getValueInfoByContext(e).value}getValueInfoByContext(e){return new z().getValueInfo({name:e,context:this.context,isText:!1})}getValueInfo(e){if(this.context){let t=this.getValueInfoByContext(e.name);if(t.isFound){let e=this.context.getObj?this.context.getObj():null;e&&t.propObj&&e.addPropertyDependency(t.propObj,t.propName)}e.value=t.value,e.hasValue=t.isFound,e.strictCompare=t.strictCompare;return}return{hasValue:!1}}}class J{constructor(e){this.expression=e}get expression(){return this.expressionExecutor?this.expressionExecutor.expression:""}set expression(e){this.expressionExecutor&&e===this.expression||(this.expressionExecutor=u(e),this.expressionExecutor.onComplete=(e,t)=>
1{this.doOnComplete(e,t)},this.variables=void 0,this.containsFunc=void 0)}getVariables(){return void 0===this.variables&&(this.variables=this.expressionExecutor.getVariables()),this.variables}hasFunction(){return void 0===this.containsFunc&&(this.containsFunc=this.expressionExecutor.hasFunction()),this.containsFunc}get isAsync(){return this.expressionExecutor.isAsync}canRun(){return this.expressionExecutor.canRun()}runContextCore(e,t){let s=J.IdRunnerCounter++;return this.onBeforeAsyncRun&&this.isAsync&&this.onBeforeAsyncRun(s),this.expressionExecutor.runContext(e,t,s)}validate(e,t,s){return this.expressionExecutor.validate(e,s,t)}doOnComplete(e,t){this.onAfterAsyncRun&&this.isAsync&&this.onAfterAsyncRun(t)}}J.IdRunnerCounter=1;class K extends J{runValues(e,t){return this.runContext(new G(e,null==t?void 0:t.context),t)}runContext(e,t){return this.runContextCore(e,t)}doOnComplete(e,t){this.onRunComplete&&this.onRunComplete(e),super.doOnComplete(e,t)}}class Y{static disposedObjectChangedProperty(e,t){Y.warn('An attempt to set a property "'+e+'" of a disposed object "'+t+'"')}static inCorrectQuestionValue(e,t){let s=JSON.stringify(t,null,3);Y.warn("An attempt to assign an incorrect value"+s+' to the following question: "'+e+'"')}static warn(e){console.warn(e)}static error(e){console.error(e)}}function $(e){if(e){let t=e.question;if(t&&t.name)return" It is used in the question: '"+t.name+"'."}return""}(a=h||(h={}))[a.SyntaxError=0]="SyntaxError",a[a.UnknownFunction=1]="UnknownFunction",a[a.UnknownVariable=2]="UnknownVariable",a[a.SemanticError=3]="SemanticError";class X extends J{runValues(e,t){return this.runContext(new G(e,null==t?void 0:t.context),t)}runContext(e,t){return!0==this.runContextCore(e,t)}doOnComplete(e,t){this.onRunComplete&&this.onRunComplete(!0==e),super.doOnComplete(e,t)}}class ee{constructor(){this.functionHash={},this.functionCache={}}register(e,t,s,i){s&&void 0===i&&(i=!0),this.clearCache(e),this.functionHash[e]={name:e,func:t,isAsync:!!s,useCache:!!i}}unregister(e){delete this.functionHash[e]}hasFunction(e){return!!this.functionHash[e]}isAsyncFunction(e){let t=this.functionHash[e];return!!t&&t.isAsync}clear(){this.functionHash={},this.clearCache()}clearCache(e){e?delete this.functionCache[e]:this.functionCache={}}getAll(){var e=[];for(var t in this.functionHash)e.push(t);return e.sort()}run(e,t,s,i){s||(s={});let n=this.functionHash[e];if(!n)return Y.warn(this.getUnknownFunctionErrorText(e,s)),null;let r=this.getCachedValue(n,t,s.survey);if(r){let e=r.result;return s.returnResult&&s.returnResult(e),e}let a={func:n.func};for(var o in s)if("returnResult"===o&&n.useCache){let e=this;a[o]=i=>{e.addToCache(n,t,s,i),s.returnResult(i)}}else a[o]=s[o];this.surveyCachedValues=n.useCache?[]:void 0,this.objsCachedValues=n.useCache?[]:void 0;let l=a.func(t,i);return s.surveyCachedValues=this.surveyCachedValues,s.objsCachedValues=this.objsCachedValues,this.surveyCachedValues=void 0,this.objsCachedValues=void 0,n.isAsync||this.addToCache(n,t,s,l),l}addSurveyCachedValue(e,t,s){this.surveyCachedValues&&this.surveyCachedValues.push({name:e,value:t,isVariable:!!s})}addObjectCachedValue(e,t,s){this.objsCachedValues&&(this.isSurveyObjectValue(s)||this.objsCachedValues.push({obj:e,name:t,value:s}))}isSurveyObjectValue(e){let t=Array.isArray(e)&&e.length>0?e[0]:e;return!!t&&"object"==typeof t&&"function"==typeof t.getType}addToCache(e,t,s,i){if(!e.useCache)return;let n=s.surveyCachedValues,r=s.objsCachedValues;if(!Array.isArray(n)||!Array.isArray(r)||0===t.length&&0===n.length&&0===r.length)return;let a=this.functionCache[e.name];Array.isArray(a)||(a=[],this.functionCache[e.name]=a),a.push({parameters:t,result:i,surveyValues:n,objectValues:r})}getCachedValue(e,t,s){if(e&&!e.useCache)return;let i=this.functionCache[e.name];if(Array.isArray(i))for(let e=i.length-1;e>=0;e--){let n=i[e];if(this.hasDisposedObj(n.objectValues)){i.splice(e,1);continue}if(this.isCachedItemValid(n,t,s))return{result:n.result}}}isCachedItemValid(e,t,s){if(!w.isTwoValueEquals(e.parameters,t))return!1;let i=e.surveyValues;if(Array.isArray(i)&&i.length>0){if(!s)return!1;for(let e=0;e<i.length;e++){let t=i[e],n=t.name,r=t.value,a=t.isVariable?s.getVariable(n):s.getValue(n);if(!w.isTwoValueEquals(a,r))return!1}}let n=e.objectValues;if(Array.isArray(n)&&n.length>0)for(let e=0;e<n.length;e++){let t=n[e],s=t.obj,i=t.name,r=s.getPropertyValueWithoutDefault(i);if(!w.isTwoValueEquals(r,t.value)&&(void 0!==t.value||r!==s.getDefaultPropertyValue(i)))return!1}return!0}hasDisposedObj(e){if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(!0===e[t].obj.isDisposed)return!0;return!1}getUnknownFunctionErrorText(e,t){return"Unknown function name: '"+e+"'."+$(t)}}function et(e,t){if(null!=e)if(Array.isArray(e))for(var s=0;s<e.length;s++)et(e[s],t);else w.isNumber(e)&&(e=w.getNumber(e)),t.push(e)}function es(e){var t=[];et(e,t);for(var s=0,i=0;i<t.length;i++)s=w.correctAfterPlusMinis(s,t[i],s+t[i]);return s}function ei(e,t){var s=[];et(e,s);for(var i=void 0,n=0;n<s.length;n++)void 0===i&&(i=s[n]),t?i>s[n]&&(i=s[n]):i<s[n]&&(i=s[n]);return i}function en(e,t){if(e.length<2||e.length>4)return null;let s=e[0];if(!s||!Array.isArray(s)&&!Array.isArray(Object.keys(s)))return null;let i=e[1];if("string"!=typeof i&&!(i instanceof String))return null;let n=i,r=2;if(e.length>2){var a;let s=Array.isArray(t)&&t.length>2?t[2]:void 0;a=e[2],s&&s.getType&&"const"===s.getType()&&"string"==typeof a&&!/[{}><=!]/.test(a)&&(n=e[2],r=3)}let o=e.length>r?e[r]:void 0;if("string"==typeof o||o instanceof String||(o=void 0),!o){let e=Array.isArray(t)&&t.length>r?t[r]:void 0;e&&e.toString()&&(o=e.toString())}return{data:s,name:i,expression:o,returnName:n}}function er(e){return"string"==typeof e?w.isNumber(e)?w.getNumber(e):void 0:e}function ea(e,t,s,i,n,r,a){return!e||w.isValueEmpty(e[t])||r&&!r.runValues(e,a)?s:i(s,n?er(e[t]):1)}function eo(e,t,s,i,n=!0){var r=en(t,s);if(!r)return;let a=r.expression?new X(r.expression):void 0;
1a&&a.isAsync&&(a=void 0);var o=void 0;if(Array.isArray(r.data))for(var l=0;l<r.data.length;l++)o=ea(r.data[l],r.name,o,i,n,a,e);else for(var u in r.data)o=ea(r.data[u],r.name,o,i,n,a,e);return o}function el(e){var t;return{survey:e.survey,question:e.question,context:null==(t=e.survey)?void 0:t.getValueGetterContext()}}function eu(e,t,s,i){var n=en(t,s);if(!n)return;let r=n.expression?new X(n.expression):void 0;r&&r.isAsync&&(r=void 0);var a=void 0,o=void 0;let l=Array.isArray(n.data)?n.data:Object.keys(n.data).map(e=>n.data[e]);for(var u=0;u<l.length;u++){let t=l[u];if(!t||w.isValueEmpty(t[n.name])||r&&!r.runValues(t,e))continue;let s=er(t[n.name]);void 0!=s&&null!=s&&(void 0==a||(i?s<a:s>a))&&(a=s,o=t)}if(o)return n.returnName!==n.name?o[n.returnName]:a}function eh(e,t,s){if("days"===s)return ep([e,t]);let i=f("function-dateDiffMonths",e),n=f("function-dateDiffMonths",t),r=n.getFullYear()-i.getFullYear();s=s||"years";let a=12*r+n.getMonth()-i.getMonth();return n.getDate()<i.getDate()&&(a-=1),"months"===s?a:~~(a/12)}function ed(e){if(!e)return!1;for(var t=e.questions,s=0;s<t.length;s++){let e=t[s];if(Array.isArray(e.panels)){for(let t=0;t<e.panels.length;t++)if(!ed(e.panels[t]))return!1}else if(!e.validate(!1))return!1}return!0}function ec(e){var t=f("function-today");return p.storeUtcDates?t.setUTCHours(0,0,0,0):t.setHours(0,0,0,0),Array.isArray(e)&&1==e.length&&t.setDate(t.getDate()+e[0]),t}function ep(e){if(!Array.isArray(e)||2!==e.length||!e[0]||!e[1])return 0;let t=f("function-diffDays",e[0]),s=f("function-diffDays",e[1]),i=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.ceil(Math.abs(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate())-i)/864e5)}function eg(e,t){let s=ec(void 0);return t&&t[0]&&(s=f("function-"+e,t[0])),s}function em(e,t){if(!e||!t)return;let s=e.question;for(;s&&s.parent;){let e=s.parent.getQuestionByName(t);if(e)return e;s=s.parentQuestion}let i=["row","panel","survey"];for(let s=0;s<i.length;s++){let n=e[i[s]];if(n&&n.getQuestionByName){let e=n.getQuestionByName(t);if(e)return e}}return null}function ev(e,t){return t.length>1&&!w.isValueEmpty(t[1])?e.getDisplayValue(!0,t[1]):e.displayValue}function eC(e,t,s){ee.Instance.addSurveyCachedValue(e,t,s)}ee.Instance=new ee,ee.Instance.register("sum",es),ee.Instance.register("min",function(e){return ei(e,!0)}),ee.Instance.register("max",function(e){return ei(e,!1)}),ee.Instance.register("count",function(e){var t=[];return et(e,t),t.length}),ee.Instance.register("avg",function(e){var t=[];et(e,t);let s=es(e);return t.length>0?s/t.length:0}),ee.Instance.register("round",function(e){var t=[];if(et(e,t),t.length>0){let e=t[0],s=t[1]||0;if(w.isNumber(e)&&w.isNumber(s)){let t=Math.pow(10,s);return Math.round(e*t*(1+Number.EPSILON))/t}}return NaN}),ee.Instance.register("trunc",function(e){var t=[];if(et(e,t),t.length>0){let e=t[0],s=t[1]||-1;if(w.isNumber(e)&&w.isNumber(s)){let t=RegExp("^-?\\d+(?:.\\d{0,"+s+"})?");return Number(e.toString().match(t)[0])}}return NaN}),ee.Instance.register("sumInArray",function(e,t){var s=eo(el(this),e,t,function(e,t){return(void 0==e&&(e=0),void 0==t||null==t)?e:w.correctAfterPlusMinis(e,t,e+t)});return void 0!==s?s:0}),ee.Instance.register("minInArray",function(e,t){return eu(el(this),e,t,!0)}),ee.Instance.register("maxInArray",function(e,t){return eu(el(this),e,t,!1)}),ee.Instance.register("countInArray",function(e,t){var s=eo(el(this),e,t,function(e,t){return(void 0==e&&(e=0),void 0==t||null==t)?e:e+1},!1);return void 0!==s?s:0}),ee.Instance.register("avgInArray",function(e,t){let s=el(this),i=i=>ee.Instance.run(i,e,s,t),n=i("countInArray");return 0==n?0:i("sumInArray")/n}),ee.Instance.register("iif",function(e){if(!Array.isArray(e)||e.length<2)return null;let t=e.length>2?e[2]:void 0;return e[0]?e[1]:t}),ee.Instance.register("getDate",function(e){return Array.isArray(e)&&!(e.length<1)&&e[0]?f("function-getDate",e[0]):null}),ee.Instance.register("age",function(e){return Array.isArray(e)&&!(e.length<1)&&e[0]?eh(e[0],void 0,(e.length>1?e[1]:"")||"years"):null}),ee.Instance.register("dateDiff",function(e){if(!Array.isArray(e)||e.length<2||!e[0]||!e[1])return null;let t=(e.length>2?e[2]:"")||"days";if("hours"===t||"minutes"===t||"seconds"===t){let s=f("function-dateDiffMonths",e[0]),i=Math.abs(f("function-dateDiffMonths",e[1])-s);return"hours"===t?Math.ceil(i/36e5):"minutes"===t?Math.ceil(i/6e4):Math.ceil(i/1e3)}return eh(e[0],e[1],t)}),ee.Instance.register("dateAdd",function(e){if(!Array.isArray(e)||e.length<2||!e[0]||!e[1])return null;let t=f("function-dateAdd",e[0]),s=e[1],i=e[2]||"days";return"days"===i&&t.setDate(t.getDate()+s),"months"===i&&t.setMonth(t.getMonth()+s),"years"===i&&t.setFullYear(t.getFullYear()+s),"hours"===i&&t.setHours(t.getHours()+s),"minutes"===i&&t.setMinutes(t.getMinutes()+s),"seconds"===i&&t.setSeconds(t.getSeconds()+s),t}),ee.Instance.register("isContainerReady",function(e){if(!e&&e.length<1||!e[0]||!this.survey)return!1;let t=e[0],s=this.survey.getPageByName(t);if(s||(s=this.survey.getPanelByName(t)),!s){let i=this.survey.getQuestionByName(t);if(!i||!Array.isArray(i.panels))return!1;if(e.length>1)e[1]<i.panels.length&&(s=i.panels[e[1]]);else{for(let e=0;e<i.panels.length;e++)if(!ed(i.panels[e]))return!1;return!0}}return ed(s)}),ee.Instance.register("isDisplayMode",function(){return this.survey&&this.survey.isDisplayMode}),ee.Instance.register("currentDate",function(){return f("function-currentDate")}),ee.Instance.register("today",ec),ee.Instance.register("getYear",function(e){if(1===e.length&&e[0])return f("function-getYear",e[0]).getFullYear()}),ee.Instance.register("currentYear",function(){return f("function-currentYear").getFullYear()}),ee.Instance.register("diffDays",ep),ee.Instance.register("year",function(e){return eg("year",e).getFullYear()}),ee.Instance.register("month",function(e){return eg("month",e).getMonth()+1}),ee.Instance.register("day",function(e){return eg("day",e).getDate()}),ee.Instance.register("weekday",function(e){return eg("weekday",e).getDay()}),ee.Instance.register("displayValue",function(e){let t=em(this,e[0]);if(!t)return void this.returnResult(void 0);if(t.isReady)this.returnResult(ev(t,e));else{let s=(t,i)=>{t.isReady&&(t.onReadyChanged.remove(s),this.returnResult(ev(t,e)))};t.onReadyChanged.add(s)}},!0,!1),ee.Instance.register("propertyValue",function(e){if(2!==e.length||!e[0]||!e[1])return;let t=em(this,e[0]);return t?t[e[1]]:void 0}),ee.Instance.register("substring",function(e){if(e.length<2)return"";let t=e[0];if(!t||"string"!=typeof t)return"";let s=e[1];if(!w.isNumber(s))return"";let i=e.length>2?e[2]:void 0;return w.isNumber(i)?t.substring(s,i):t.substring(s)}),ee.Instance.register("getComment",function(e){if(e.length<1||!e[0]||!this.survey)return;let t=this.survey.getQuestionByName(e[0]);if(!t)return"";let s=e.length>1?e[1]:void 0;if(null!=s){let e=t.getItemByValue(s);return e?t.getCommentValue(e):void 0}return t.getCommentValue(t.otherItem)||t.comment});class ey{constructor(e){this.obj=e,this.properties=null,this.values=null}getType(){return"bindings"}get isSurveyObj(){return!0}getNames(){var e=[];this.fillProperties();for(var t=0;t<this.properties.length;t++)this.properties[t].isVisible("",this.obj)&&e.push(this.properties[t].name);return e}getProperties(){var e=[];this.fillProperties();for(var t=0;t<this.properties.length;t++)e.push(this.properties[t]);return e}setBinding(e,t){this.values||(this.values={});let s=this.getJson();s!==t&&(t?this.values[e]=t:(delete this.values[e],0==Object.keys(this.values).length&&(this.values=null)),this.onChangedJSON(s))}clearBinding(e){this.setBinding(e,"")}isEmpty(){if(!this.values)return!0;for(var e in this.values)return!1;return!0}getValueNameByPropertyName(e){if(this.values)return this.values[e]}getPropertiesByValueName(e){if(!this.values)return[];var t=[];for(var s in this.values)this.values[s]==e&&t.push(s);return t}getJson(){if(this.isEmpty())return;let e={};
1return this.getNames().forEach(t=>{void 0!==this.values[t]&&(e[t]=this.values[t])}),e}setJson(e,t){let s=this.getJson();this.values=null,e&&this.getNames().forEach(t=>{void 0!==e[t]&&(this.values||(this.values={}),this.values[t]=e[t])}),t||w.isTwoValueEquals(s,this.values)||this.onChangedJSON(s)}fillProperties(){if(null===this.properties){this.properties=[];for(var e=H.getPropertiesByObj(this.obj),t=0;t<e.length;t++)e[t].isBindable&&this.properties.push(e[t])}}onChangedJSON(e){this.obj&&this.obj.onBindingChanged(e,this.getJson())}}class ef{constructor(e,t,s){this.currentDependency=e,this.target=t,this.property=s,this.dependencies=[],this.id=""+ ++ef.DependenciesCount}addDependency(e,t){this.target===e&&this.property===t||this.dependencies.some(s=>s.obj===e&&s.prop===t)||(this.dependencies.push({obj:e,prop:t,id:this.id}),e.registerPropertyChangedHandlers([t],this.currentDependency,this.id))}dispose(){this.dependencies.forEach(e=>{e.obj.unregisterPropertyChangedHandlers([e.prop],e.id)})}}ef.DependenciesCount=0;class eb{constructor(e){this._updater=e,this.dependencies=void 0,this.type=eb.ComputedUpdaterType}get updater(){return this._updater}setDependencies(e){this.clearDependencies(),this.dependencies=e}getDependencies(){return this.dependencies}clearDependencies(){this.dependencies&&(this.dependencies.dispose(),this.dependencies=void 0)}dispose(){this.clearDependencies(),this._updater=void 0}}eb.ComputedUpdaterType="__dependency_computed";class ew{static finishCollectDependencies(){let e=ew.currentDependencis;return ew.currentDependencis=void 0,e}static startCollectDependencies(e,t,s){if(void 0!==ew.currentDependencis)throw Error("Attempt to collect nested dependencies. Nested dependencies are not supported.");ew.currentDependencis=new ef(e,t,s)}static collectDependency(e,t){void 0!==ew.currentDependencis&&ew.currentDependencis.addDependency(e,t)}static get commentSuffix(){return p.commentSuffix}static set commentSuffix(e){p.commentSuffix=e}static get commentPrefix(){return ew.commentSuffix}static set commentPrefix(e){ew.commentSuffix=e}isValueEmpty(e,t=!0){return t&&(e=this.trimValue(e)),w.isValueEmpty(e)}equals(e){return!!e&&!this.isDisposed&&!e.isDisposed&&this.getType()==e.getType()&&this.equalsCore(e)}equalsCore(e){return this.name===e.name&&w.isTwoValueEquals(this.toJSON(),e.toJSON(),!1,!0,!1)}trimValue(e){return e&&("string"==typeof e||e instanceof String)?e.trim():e}static createPropertiesHash(){return{}}constructor(){this.uniqueIdValue=ew.UniqueId++,this.dependencies={},this.expressionDependencies={},this.propertyHash=ew.createPropertiesHash(),this.eventList=[],this.isLoadingFromJsonValue=!1,this.loadingOwner=null,this.onPropertyChanged=this.addEvent(),this.onNestedPropertyChanged=this.addEvent(),this.onItemValuePropertyChanged=this.addEvent(),this.isCreating=!0,this.animationAllowedLock=0,this.supportOnElementRerenderedEvent=!0,this.onElementRerenderedEventEnabled=!1,this._onElementRerendered=new P,L.createProperties(this),this.onBaseCreating(),this.isCreating=!1}dispose(){for(var e=0;e<this.eventList.length;e++)this.eventList[e].clear();this.onPropertyValueChangedCallback=void 0,this.isDisposedValue=!0,Object.keys(this.dependencies).forEach(e=>this.dependencies[e].dispose()),Object.keys(this.expressionDependencies).forEach(e=>{let t=this.expressionDependencies[e];t.obj.isDisposed||t.obj.unRegisterFunctionOnPropertyValueChanged(t.propertyName,e)}),this.expressionDependencies={},Object.keys(this.propertyHash).forEach(e=>{let t=this.getPropertyValueCore(this.propertyHash,e);t&&t.type==eb.ComputedUpdaterType&&t.dispose()})}get isDisposed(){return!0===this.isDisposedValue}get uniqueId(){return this.uniqueIdValue}get isSurveyObj(){return!0}addEvent(e){let t=new P;return this.eventList.push(t),t.onCallbacksChanged=e,t}addAsyncEvent(){let e=new ex;return this.eventList.push(e),e}onBaseCreating(){}getType(){return"base"}getOwner(){}get isPage(){return!1}get isPanel(){return!1}get isQuestion(){return!1}get isSurvey(){return!1}isDescendantOf(e){return H.isDescendantOf(this.getType(),e)}getSurvey(e=!1){return null}getValueGetterContext(){let e=this.getSurvey();if(!e)return new W({});let t=e.getValueGetterContext();if(!t||!t.getObj)return t;let s=this;return t.getObj=()=>s,t}get isDesignMode(){let e=this.getSurvey();return!!e&&e.isDesignMode}get inSurvey(){return!!this.getSurvey(!0)}get bindings(){return this.bindingsValue||(this.bindingsValue=new ey(this)),this.bindingsValue}isBindingEmpty(){return!this.bindingsValue||this.bindingsValue.isEmpty()}checkBindings(e,t){}canUpdateBindings(){return!0}updateBindings(e,t){if(this.bindingsValue&&this.canUpdateBindings()){var s=this.bindings.getValueNameByPropertyName(e);s&&this.updateBindingValue(s,t)}}updateBindingValue(e,t){}getTemplate(){return this.getType()}get isLoadingFromJson(){return this.isLoadingFromJsonValue||this.getIsLoadingFromJson()}getIsLoadingFromJson(){return!!this.loadingOwner&&!!this.loadingOwner.isLoadingFromJson||this.isLoadingFromJsonValue}startLoadingFromJson(e){this.isLoadingFromJsonValue=!0,this.jsonObj=e}endLoadingFromJson(){this.isLoadingFromJsonValue=!1}mergeLocalizationObj(e,t){this.mergeLocalizationInObjectCore(e,t),this.mergeLocalizationInArrays(e,t);let s=e.getOriginalObj(),i=this.getOriginalObj();s!==e&&i!==this&&i.mergeLocalizationObj(s,t)}mergeLocalizationInObjectCore(e,t){if(!this.canMergeObj(e))return;let s=e.localizableStrings;if(s)for(let e in s){let i=this.getPropertyByName(e);
1if(i){let n=this[i.serializationProperty||i.name];n&&n.mergeWith(s[e],t)}}}canMergeObj(e){return!!e&&"function"==typeof e.mergeLocalizationObj&&(!e.name||this.name===e.name)}mergeLocalizationInArrays(e,t){let s=e.arraysInfo;if(s)for(let i in s){let s=this.getPropertyByName(i);if(s&&s.isArray){let s=e[i],n=this[i];if(Array.isArray(s)&&Array.isArray(n))for(let e=0;e<Math.min(s.length,n.length);e++)n[e].mergeLocalizationObj(s[e],t)}}}toJSON(e){return new Q().toJsonObject(this,e)}getLocalizationJSON(e){return this.toJSON({storeLocaleStrings:"stringsOnly",locales:e})}fromJSON(e,t){new Q().toObject(e,this,t),this.onSurveyLoad()}onSurveyLoad(){}clone(){var e=H.createClass(this.getType());return e.fromJSON(this.toJSON()),e}getPropertyByName(e){let t=this.getType();return this.classMetaData&&this.classMetaData.name===t||(this.classMetaData=H.findClass(t)),this.classMetaData?this.classMetaData.findProperty(e):null}isPropertyVisible(e){let t=this.getPropertyByName(e);return!!t&&t.isVisible("",this)}static createProgressInfo(){return{questionCount:0,answeredQuestionCount:0,requiredQuestionCount:0,requiredAnsweredQuestionCount:0}}getProgressInfo(){return ew.createProgressInfo()}localeChanged(){}locStrsChanged(){if(this.arraysInfo)for(let t in this.arraysInfo){let s=this.arraysInfo[t];if(s&&s.isItemValues){var e=this.getPropertyValue(t);e&&ew.itemValueLocStrChanged&&ew.itemValueLocStrChanged(e)}}if(this.localizableStrings)for(let e in this.localizableStrings){let t=this.getLocalizableString(e);t&&t.strChanged()}}getValueAsString(e){return null==e?"":"object"==typeof e?JSON.stringify(e):e.toString()}getPropertyValue(e,t,s){let i=this.getPropertyValueWithoutDefault(e);if(s&&this.isDisposedValue&&(s=void 0),s&&Array.isArray(i)&&0===i.length&&!0===i.isReset)return delete i.isReset,this.setArrayPropertyDirectly(e,s(),!1),i;if(this.isValueUndefined(i)){let i=this.localizableStrings?this.localizableStrings[e]:void 0;if(i)return i.text;if(!this.isValueUndefined(t))return t;if(s){let t=s();if(void 0!==t)if(!Array.isArray(t))return this.setPropertyValueDirectly(e,t,!0),t;else{let s=this.createNewArray(e);return s.splice(0,0,...t),s}}let n=this.getDefaultPropertyValue(e);if(void 0!==n)return n}return i}isValueUndefined(e){return w.isValueUndefined(e)}getDefaultPropertyValue(e){let t=this.getPropertyByName(e);if(!t||t.isCustom&&this.isCreating)return;if(t.defaultValueFunc)return t.defaultValueFunc(this);let s=t.getDefaultValue(this);if(!this.isValueUndefined(s)&&!Array.isArray(s))return s;let i=this.localizableStrings?this.localizableStrings[e]:void 0;return i&&i.localizationName?this.getLocalizationString(i.localizationName):"boolean"!=t.type&&"switch"!=t.type&&(t.isCustom&&t.onGetValue?t.onGetValue(this):void 0)}hasDefaultPropertyValue(e){return void 0!==this.getDefaultPropertyValue(e)}resetPropertyValue(e){let t=this.localizableStrings?this.localizableStrings[e]:void 0;t?(this.setLocalizableStringText(e,void 0),t.clear()):this.setPropertyValue(e,void 0)}doNotSerializeEmptyProperty(e){return this.isPropertyStoredInHash(e.name)}isPropertyStoredInHash(e){return!1}getIsSerializablePropertyEmpty(e){let t=this.getOriginalByProperty(e.name);return e.isLocalizable&&!e.isMultipleText?!t.getLocalizableString(e.name):!!(t===this&&this.doNotSerializeEmptyProperty(e))&&void 0==this.getPropertyValueWithoutDefault(e.name)}getOriginalObj(){return this}getOriginalByProperty(e){let t=this.getOriginalObj();return t===this?this:t.getPropertyByName(e)?t:this}getPropertyValueWithoutDefault(e){let t=this.getPropertyValueCore(this.propertyHash,e);return ee.Instance.addObjectCachedValue(this,e,t),t}getPropertyValueCore(e,t){return(this.isLoadingFromJson||ew.collectDependency(this,t),this.getPropertyValueCoreHandler)?this.getPropertyValueCoreHandler(e,t):e[t]}geValueFromHash(){return this.propertyHash.value}setPropertyValueCore(e,t,s,i){let n=!1;this.setPropertyValueCoreHandler?(n=this.isDisposedValue)||this.setPropertyValueCoreHandler(e,t,s):e[t]!==s&&(e[t]=s,!i&&this.onPropertyValueCoreChanged&&((n=this.isDisposedValue)||this.onPropertyValueCoreChanged.fire(this,{name:t,newValue:s}))),n&&Y.disposedObjectChangedProperty(t,this.getType())}getItemValuesPropertyValue(e){let t=this.getPropertyValue(e);return Array.isArray(t)||(t=this.createItemValues(e),this.setPropertyValueDirectly(e,t)),t}
1getArrayPropertyValue(e,t,s){let i=this.getPropertyValue(e);return Array.isArray(i)||(i=this.createNewArray(e,t,s),this.setPropertyValueDirectly(e,i)),i}setArrayPropertyValue(e,t){let s=this[e],i=this.arraysInfo[e];!i||this.isTwoValueEquals(s,t)||this.setArray(e,s,t,i.isItemValues,i.onPush)}get isEditingSurveyElement(){var e=this.getSurvey();return!!e&&e.isEditingSurveyElement}iteratePropertiesHash(e){var t=[];for(var s in this.propertyHash)t.push(s);t.forEach(t=>e(this.propertyHash,t))}setPropertyValue(e,t){if(!this.isDisposedValue){if(!this.isLoadingFromJson){let s=this.getPropertyByName(e);s&&(t=s.settingValue(this,t))}var s=this.getPropertyValue(e);s&&Array.isArray(s)&&this.arraysInfo&&(!t||Array.isArray(t))?this.isTwoValueEquals(s,t)?void 0===t&&Array.isArray(s)&&(s.isReset=!0):this.setArrayPropertyDirectly(e,t):t!==s&&(this.setPropertyValueDirectly(e,t),this.isTwoValueEquals(s,t)||this.propertyValueChanged(e,s,t))}}setArrayPropertyDirectly(e,t,s=!0){var i=this.arraysInfo[e];this.setArray(e,this.getPropertyValue(e),t,!!i&&i.isItemValues,i?s&&i.onPush:null)}setPropertyValueDirectly(e,t,s){this.setPropertyValueCore(this.propertyHash,e,t,s)}clearPropertyValue(e){this.setPropertyValueCore(this.propertyHash,e,null),delete this.propertyHash[e]}onPropertyValueChangedCallback(e,t,s,i,n){}itemValuePropertyChanged(e,t,s,i){this.onItemValuePropertyChanged.fire(this,{obj:e,name:t,oldValue:s,newValue:i,propertyName:e.ownerPropertyName})}executeOnSyncPropertiesChanged(e){this.isFuncExecuting||(this.isFuncExecuting=!0,e(),this.isFuncExecuting=!1)}onPropertyValueChanged(e,t,s){}propertyValueChanged(e,t,s,i,n){if(!this.isLoadingFromJson&&(this.updateBindings(e,s),this.onPropertyValueChanged(e,t,s),this.onPropertyChanged.fire(this,{name:e,oldValue:t,newValue:s,arrayChanges:i,target:n}),this.doPropertyValueChangedCallback(e,t,s,i,this),this.checkConditionPropertyChanged(e),this.onPropChangeFunctions))for(var r=0;r<this.onPropChangeFunctions.length;r++)this.onPropChangeFunctions[r].name==e&&this.onPropChangeFunctions[r].func(s,i)}onBindingChanged(e,t){this.isLoadingFromJson||this.doPropertyValueChangedCallback("bindings",e,t)}get isInternal(){return!1}doPropertyValueChangedCallback(e,t,s,i,n){let r=r=>{r&&r.onPropertyValueChangedCallback&&r.onPropertyValueChangedCallback(e,t,s,n,i)};if(this.isInternal)return void r(this);n||(n=this);var a=this.getSurvey();a||(a=this),r(a),a!==this&&r(this)}addExpressionProperty(e,t,s){this.expressionInfo||(this.expressionInfo={}),this.expressionInfo[e]={onExecute:t,canRun:s}}validateExpression(e,t,s){if(!t)return;let i=this.getPropertyByName(e),n=!!i&&"condition"==i.type,r=this.createExpressionRunner(t).validate(this.getValueGetterContext(),s,n);return r.length?{obj:this,propertyName:e,errors:r}:void 0}validateExpressions(e={functions:!0,variables:!0,semantics:!0}){let t=[];for(let s of(H.getPropertiesByObj(this).forEach(s=>{if(s.isExpression){let i=this.validateExpression(s.name,this[s.name],e);i&&t.push(i)}}),this.getAllChildren())){let i=s.validateExpressions(e);i&&i.length>0&&t.push(...i)}return t}getAllChildren(){return[]}getDataFilteredProperties(){return{}}runConditionCore(e){if(this.expressionInfo)for(var t in this.expressionInfo)this.runConditionItemCore(t,e)}canRunConditions(){return!this.isDesignMode}checkConditionPropertyChanged(e){this.expressionInfo&&this.expressionInfo[e]&&this.canRunConditions()&&this.runConditionItemCore(e,this.getDataFilteredProperties())}runConditionItemCore(e,t){let s=this.expressionInfo[e];!this.getPropertyValue(e)||(!s.canRun||s.canRun(this))&&this.runExpressionByProperty(e,t,e=>{s.onExecute(this,e)})}doBeforeAsynRun(e){this.asynExpressionHash||(this.asynExpressionHash={});let t=!this.isAsyncExpressionRunning;this.asynExpressionHash[e]=!0,t&&this.onAsyncRunningChanged()}doAfterAsynRun(e){this.asynExpressionHash&&(delete this.asynExpressionHash[e],this.isAsyncExpressionRunning||this.onAsyncRunningChanged())}onAsyncRunningChanged(){}get isAsyncExpressionRunning(){return!!this.asynExpressionHash&&Object.keys(this.asynExpressionHash).length>0}createExpressionRunner(e){let t=new K(e);return t.onBeforeAsyncRun=e=>{this.doBeforeAsynRun(e)},t.onAfterAsyncRun=e=>{this.doAfterAsynRun(e)},t}getExpressionFromSurvey(e){let t=this[e];if(!t)return"";let s=this.getSurvey();
1return s?s.beforeExpressionRunning(this,e,t):t}runExpressionByProperty(e,t,s,i){if(!this[e])return!1;let n=this.getExpressionFromSurvey(e);if(n){let r=this.getExpressionInfoByProperty(e,n),a=r.runner;!r.isRunning&&(!i||i(a))&&(r.isRunning=!0,a.onRunComplete=e=>{s(e),r.isRunning=!1},a.runContext(this.getValueGetterContext(),this.getPropertiesCopy(t,e)))}return!0}getPropertiesCopy(e,t){let s={};for(let t in e)s[t]=e[t];return t&&(s.propertyName=t),s}getExpressionByProperty(e){let t=this.getExpressionFromSurvey(e);return t?this.getExpressionInfoByProperty(e,t).runner:null}getExpressionInfoByProperty(e,t){this.runExpressionHash||(this.runExpressionHash={});let s=this.runExpressionHash[e];return s?s.runner.expression=t:(s={runner:this.createExpressionRunner(t)},this.runExpressionHash[e]=s),s}registerPropertyChangedHandlers(e,t,s=null){for(var i=0;i<e.length;i++)this.registerFunctionOnPropertyValueChanged(e[i],t,s)}unregisterPropertyChangedHandlers(e,t=null){for(var s=0;s<e.length;s++)this.unRegisterFunctionOnPropertyValueChanged(e[s],t)}registerFunctionOnPropertyValueChanged(e,t,s=null){if(this.onPropChangeFunctions||(this.onPropChangeFunctions=[]),s)for(var i=0;i<this.onPropChangeFunctions.length;i++){var n=this.onPropChangeFunctions[i];if(n.name==e&&n.key==s){n.func=t;return}}this.onPropChangeFunctions.push({name:e,func:t,key:s})}registerFunctionOnPropertiesValueChanged(e,t,s=null){this.registerPropertyChangedHandlers(e,t,s)}unRegisterFunctionOnPropertyValueChanged(e,t=null){if(this.onPropChangeFunctions)for(var s=0;s<this.onPropChangeFunctions.length;s++){var i=this.onPropChangeFunctions[s];if(i.name==e&&i.key==t)return this.onPropChangeFunctions.splice(s,1)}}unRegisterFunctionOnPropertiesValueChanged(e,t=null){this.unregisterPropertyChangedHandlers(e,t)}addPropertyDependency(e,t){if(!e||!t||!(e instanceof ew))return;let s=this.uniqueId+"_"+e.uniqueId+"_"+t;this.expressionDependencies[s]||(e.registerFunctionOnPropertyValueChanged(t,()=>{this.onDependencyValueChanged(e,t)},s),this.expressionDependencies[s]={obj:e,propertyName:t})}onDependencyValueChanged(e,t){this.runConditionCore(this.getDataFilteredProperties()),this.locStrsChanged()}createCustomLocalizableObj(e){let t=this.getLocalizableString(e);return t||this.createLocalizableString(e,this,!1,!0)}getLocale(){let e=this.getSurvey();return e?e.getLocale():""}getLocalizationString(e){return E(e,this.getLocale())}getLocalizationFormatString(e,...t){let s=this.getLocalizationString(e);return s&&s.format?s.format(...t):""}createLocString(e){return e.hasTranslation&&!e.translationKey&&(e.translationKey=e.name),this.createLocalizableString(e.name,e.owner,e.supportsMarkdown,e.translationKey)}createLocalizableString(e,t,s=!1,i=!1){let n;t||(t=this),i&&(n=!0===i?e:i);let r=this.createLocalizableStringCore(t,e,s,n),a=this.getPropertyByName(e);return r.disableLocalization=a&&!1===a.isLocalizable,r}createLocalizableStringCore(e,t,s,i){let n=new R(e,s,t,i);return t&&(n.onStrChanged=(e,s)=>{this.propertyValueChanged(t,e,s)}),this.localizableStrings||(this.localizableStrings={}),this.localizableStrings[t]=n,n}removeLocalizableString(e){this.localizableStrings&&delete this.localizableStrings[e]}getLocalizableString(e){let t=this.localizableStrings;return t?t[e]:null}getOrCreateLocStr(e,t=!1,s=!1,i){let n=this.getLocalizableString(e);return!n&&(n=this.createLocalizableString(e,void 0,t,s),i&&i(n)),n}locStrChanged(e){let t=this.getLocalizableString(e);t&&t.strChanged()}isLocStrEmpty(e){let t=this.getLocalizableString(e);return!t||t.isEmpty}getLocalizableStringText(e,t=""){return this.getLocStringText(this.getLocalizableString(e),t)}setLocalizableStringText(e,t){this.setLocStringText(this.getLocalizableString(e),t)}getLocStringText(e,t=""){return(null==e?void 0:e.name)&&ew.collectDependency(this,e.name),(null==e?void 0:e.text)||t}setLocStringText(e,t){e&&e.text!=t&&(e.text=t)}addUsedLocales(e){if(this.localizableStrings)for(let t in this.localizableStrings){let s=this.getLocalizableString(t);s&&this.addLocStringToUsedLocales(s,e)}if(this.arraysInfo)for(let t in this.arraysInfo){let s=this.getPropertyByName(t);if(!s||!s.isPropertySerializable(this))continue;let i=this.getPropertyValue(t);if(i&&i.length)for(let t=0;t<i.length;t++){let s=i[t];s&&s.addUsedLocales&&s.addUsedLocales(e)}}}searchText(e,t){var s=[];
vendor: 12,537 bytes, line 1
1this.getSearchableLocalizedStrings(s);for(var i=0;i<s.length;i++)s[i].setFindText(e)&&t.push({element:this,str:s[i]})}getSearchableLocalizedStrings(e){if(this.localizableStrings){let s=[];this.getSearchableLocKeys(s);for(var t=0;t<s.length;t++){let i=this.getLocalizableString(s[t]);i&&e.push(i)}}if(!this.arraysInfo)return;let s=[];this.getSearchableItemValueKeys(s);for(var t=0;t<s.length;t++){var i=this.getPropertyValue(s[t]);if(i)for(var n=0;n<i.length;n++)e.push(i[n].locText)}}getSearchableLocKeys(e){}getSearchableItemValueKeys(e){}addLocStringToUsedLocales(e,t){for(var s=e.getLocales(),i=0;i<s.length;i++)0>t.indexOf(s[i])&&t.push(s[i])}createItemValues(e){var t=this,s=this.createNewArray(e,function(s){if(s.locOwner=t,s.ownerPropertyName=e,"function"==typeof s.getSurvey){let e=s.getSurvey();e&&"function"==typeof e.makeReactive&&e.makeReactive(s)}});return this.arraysInfo[e].isItemValues=!0,s}addOnArrayChangedCallback(e){this.onArrayChanged||(this.onArrayChanged=new P),this.onArrayChanged.add(e)}removeOnArrayChangedCallback(e){this.onArrayChanged&&(this.onArrayChanged.remove(e),this.onArrayChanged.isEmpty&&(this.onArrayChanged=void 0))}notifyArrayChanged(e,t,s){this.onArrayChanged&&this.onArrayChanged.fire(this,{arrayChanges:s,name:e,newValue:t,valueFromHash:this.propertyHash[e]})}addOnPropertyValueChangedCallback(e){this.onPropertyValueCoreChanged||(this.onPropertyValueCoreChanged=new P),this.onPropertyValueCoreChanged.add(e)}removeOnPropertyValueChangedCallback(e){this.onPropertyValueCoreChanged&&(this.onPropertyValueCoreChanged.remove(e),this.onPropertyValueCoreChanged.isEmpty&&(this.onPropertyValueCoreChanged=void 0))}get hasActiveUISubscribers(){return!!this.onPropertyValueCoreChanged}createNewArrayCore(e){var t=null;return this.createArrayCoreHandler&&(t=this.createArrayCoreHandler(this.propertyHash,e)),t||(t=[],this.setPropertyValueCore(this.propertyHash,e,t)),t}ensureArray(e,t=null,s=null){if(!this.arraysInfo||!this.arraysInfo[e])return this.createNewArray(e,t,s)}createNewArray(e,t=null,s=null){var i=this.createNewArrayCore(e);this.arraysInfo||(this.arraysInfo={}),this.arraysInfo[e]={onPush:t,isItemValues:!1};var n=this;return i.push=function(s){var r=Object.getPrototypeOf(i).push.call(i,s);if(!n.isDisposedValue){t&&t(s,i.length-1);let r=new eV(i.length-1,0,[s],[]);n.propertyValueChanged(e,i,i,r),n.notifyArrayChanged(e,i,r)}return r},i.shift=function(){var t=Object.getPrototypeOf(i).shift.call(i);if(!n.isDisposedValue&&t){s&&s(t);let r=new eV(i.length-1,1,[],[]);n.propertyValueChanged(e,i,i,r),n.notifyArrayChanged(e,i,r)}return t},i.unshift=function(s){var r=Object.getPrototypeOf(i).unshift.call(i,s);if(!n.isDisposedValue){t&&t(s,i.length-1);let r=new eV(0,0,[s],[]);n.propertyValueChanged(e,i,i,r),n.notifyArrayChanged(e,i,r)}return r},i.pop=function(){var t=Object.getPrototypeOf(i).pop.call(i);if(!n.isDisposedValue){s&&s(t);let r=new eV(i.length-1,1,[],[]);n.propertyValueChanged(e,i,i,r),n.notifyArrayChanged(e,i,r)}return t},i.splice=function(r,a,...o){r||(r=0),a||(a=0);var l=Object.getPrototypeOf(i).splice.call(i,r,a,...o);if(o||(o=[]),!n.isDisposedValue){if(s&&l)for(var u=0;u<l.length;u++)s(l[u]);if(t)for(var u=0;u<o.length;u++)t(o[u],r+u);let h=new eV(r,a,o,l);n.propertyValueChanged(e,i,i,h),n.notifyArrayChanged(e,i,h)}return l},i}getItemValueType(){}setArray(e,t,s,i,n){var r=[].concat(t);if(Object.getPrototypeOf(t).splice.call(t,0,t.length),s){for(var a=0;a<s.length;a++){var o=s[a];i&&ew.createItemValue&&(o=ew.createItemValue(o,this.getItemValueType())),Object.getPrototypeOf(t).push.call(t,o),n&&n(t[a])}delete t.isReset}else t.isReset=!0;let l=new eV(0,r.length,t,r);this.propertyValueChanged(e,r,t,l),this.notifyArrayChanged(e,t,l)}isTwoValueEquals(e,t,s=!1,i=!1){return w.checkIfValuesEqual(e,t,{ignoreOrder:!1,caseSensitive:!s,trimStrings:i,doNotConvertNumbers:!0})}static copyObject(e,t){for(var s in t){var i=t[s];"object"==typeof i&&(i={},this.copyObject(i,t[s])),e[s]=i}}copyCssClasses(e,t){t&&("string"==typeof t||t instanceof String?e.root=t:ew.copyObject(e,t))}getValueInLowCase(e){return e&&"string"==typeof e?e.toLowerCase():e}getElementsInDesign(e=!1){return[]}get animationAllowed(){return this.getIsAnimationAllowed()}getIsAnimationAllowed(){return p.animationEnabled&&this.animationAllowedLock>=0&&!this.isLoadingFromJson&&!this.isDisposed&&(!!this.onElementRerendered||!this.supportOnElementRerenderedEvent)}blockAnimations(){this.animationAllowedLock--}releaseAnimations(){this.animationAllowedLock++}enableOnElementRerenderedEvent(){this.onElementRerenderedEventEnabled=!0}disableOnElementRerenderedEvent(){var e;null==(e=this.onElementRerendered)||e.fire(this,{isCancel:!0}),this.onElementRerenderedEventEnabled=!1}get onElementRerendered(){return this.supportOnElementRerenderedEvent&&this.onElementRerenderedEventEnabled?this._onElementRerendered:void 0}afterRerender(){var e;null==(e=this.onElementRerendered)||e.fire(this,{isCancel:!1})}}ew.UniqueId=0,ew.currentDependencis=void 0;class eV{constructor(e,t,s,i){this.index=e,this.deleteCount=t,this.itemsToAdd=s,this.deletedItems=i}}class ex extends P{fire(e,t,s,i){if(s=s||(()=>{}),!this.callbacks)return void s();let n=[],r=[].concat(this.callbacks);for(var a=0;a<r.length;a++){let s=r[a](e,t);if(s&&s instanceof Promise&&n.push(s),!this.callbacks)return}n.length>0?(i&&i(),Promise.all(n).then(()=>{s()})):s()}}class eI{constructor(e=null,t=null){this.text=e,this.errorOwner=t,this.visible=!0,this.onUpdateErrorTextCallback=void 0}equals(e){return!!e&&!!e.getErrorType&&this.getErrorType()===e.getErrorType()&&this.text===e.text&&this.visible===e.visible}get locText(){return this.locTextValue||(this.locTextValue=new R(this.errorOwner,!0),this.locTextValue.storeDefaultText=!0,this.locTextValue.text=this.getText()),this.locTextValue}get notificationType(){return this.notificationTypeValue||"error"}set notificationType(e){this.notificationTypeValue=e}get isWarning(){return"warning"===this.notificationTypeValue}get isInfo(){return"info"===this.notificationTypeValue}get isError(){return!this.isInfo&&!this.isWarning}getCssIcon(e){let t=this.getCssError(e);return(this.isWarning?t.warningIcon:this.isInfo?t.infoIcon:t.icon)||t.icon||void 0}getCssError(e){return(e=e||{}).error||{}}getText(){var e=this.text;return e||(e=this.getDefaultText()),this.errorOwner&&(e=this.errorOwner.getErrorCustomText(e,this)),e}getErrorType(){return"base"}getDefaultText(){return""}getLocale(){return this.errorOwner?this.errorOwner.getLocale():""}getLocalizationString(e){return E(e,this.getLocale())}updateText(){this.onUpdateErrorTextCallback&&this.onUpdateErrorTextCallback(this),this.locText.text=this.getText()}}class eE extends eI{constructor(e=null,t=null){super(e,t),this.text=e}getErrorType(){return"required"}getDefaultText(){return this.getLocalizationString("requiredError")}}class eS extends eI{constructor(e=null,t=null){super(e,t),this.text=e}getErrorType(){return"requireoneanswer"}getDefaultText(){return this.getLocalizationString("requiredErrorInPanel")}}class eP extends eI{constructor(e=null,t=null){super(e,t),this.text=e}getErrorType(){return"requirenumeric"}getDefaultText(){return this.getLocalizationString("numericError")}}class eR extends eI{constructor(e,t=null){super(null,t),this.maxSize=e,this.locText.text=this.getText()}getErrorType(){return"exceedsize"}getDefaultText(){return this.getLocalizationString("exceedMaxSize").format(this.getTextSize())}getTextSize(){var e=(this.getLocalizationString("fileSizeUnits")||"Bytes, KB, MB, GB, TB").split(", ");if(0===this.maxSize)return"0 Byte";var t=Math.floor(Math.log(this.maxSize)/Math.log(1024));return(this.maxSize/Math.pow(1024,t)).toFixed([0,0,2,3,3][t])+" "+e[t]}}class eT extends eI{constructor(e,t=null){super(null,t),this.maxFiles=e,this.locText.text=this.getText()}getErrorType(){return"exceedfilescount"}getDefaultText(){return this.getLocalizationString("exceedMaxFiles").format(this.maxFiles)}}class eA extends eI{constructor(e,t,s=null){super(null,s),this.status=e,this.response=t}getErrorType(){return"webrequest"}getDefaultText(){let e=this.getLocalizationString("urlRequestError");return e?e.format(this.status,this.response):""}}class eL extends eI{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"webrequestempty"}getDefaultText(){return this.getLocalizationString("urlGetChoicesError")}}class eD extends eI{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"otherempty"}getDefaultText(){return this.getLocalizationString("otherRequiredError")}}class eO extends eI{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"uploadingfile"}getDefaultText(){return this.getLocalizationString("uploadingFile")}}class eN extends eI{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"requiredinallrowserror"}getDefaultText(){return this.getLocalizationString("requiredInAllRowsError")}}class eM extends eI{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"eachrowuniqueeerror"}getDefaultText(){return this.getLocalizationString("eachRowUniqueError")}}class ek extends eI{constructor(e,t=null){super(null,t),this.minRowCount=e}getErrorType(){return"minrowcounterror"}getDefaultText(){return this.getLocalizationString("minRowCountError").format(this.minRowCount)}}class eq extends eI{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"keyduplicationerror"}getDefaultText(){return this.getLocalizationString("keyDuplicationError")}}class eF extends eI{constructor(e=null,t=null){super(e,t),this.text=e}getErrorType(){return"patternincompleteerror"}getDefaultText(){return this.getLocalizationString("incompletePatternError")}}class eB extends eI{constructor(e,t=null){super(e,t),this.text=e}getErrorType(){return"custom"}}function e_(e={}){return function(t,s){let i=(e,t)=>{if(t&&"object"==typeof t&&t.type===eb.ComputedUpdaterType){ew.startCollectDependencies(()=>e[s]=t.updater(),e,s);let i=t.updater(),n=ew.finishCollectDependencies();return t.setDependencies(n),e.dependencies[s]&&e.dependencies[s].dispose(),e.dependencies[s]=t,i}return t};if(e&&e.localizable){let n="object"==typeof e.localizable?e.localizable:null,r=n&&n.name?n.name:"loc"+s.charAt(0).toUpperCase()+s.slice(1),a=!!n&&!!n.defaultStr&&n.defaultStr,o=n&&!0===n.markdown;Object.defineProperty(t,s,{get:function(){return this.getLocStringText(this[r])},set:function(t){t=i(this,t),this.setLocStringText(this[r],t),e&&e.onSet&&e.onSet(t,this)}}),Object.defineProperty(t,r,{get:function(){return this.getOrCreateLocStr(s,o,a,e=>{n&&"function"==typeof n.onCreate&&n.onCreate(this,e)})}})}else Object.defineProperty(t,s,{get:function(){let t,i,n=null;e&&(t=e.returnValue,e.calcFunc&&(i=()=>e.calcFunc(this)),"function"==typeof e.getDefaultValue&&(n=e.getDefaultValue(this)),void 0!==e.defaultValue&&(n=e.defaultValue));let r=this.getPropertyValue(s,n,i);return void 0!==t&&void 0===r?t:r},set:function(t){let n=i(this,t),r=this.getPropertyValue(s);if(e){if(e.isLowerCase){if(!n||"string"!=typeof n)return;n=n.toLowerCase()}e.onSetting&&(n=e.onSetting(n,this,r))}n!==r&&(this.setPropertyValue(s,n),e&&e.onSet&&e.onSet(n,this,r))}})}}function eQ(e,t,s){e.ensureArray(s,(s,i)=>{let n=t?t.onPush:null;n&&n(s,i,e)},(s,i)=>{let n=t?t.onRemove:null;n&&n(s,i,e)})}function eH(e){return function(t,s){Object.defineProperty(t,s,{get:function(){return eQ(this,e,s),this.getPropertyValue(s)},set:function(t){eQ(this,e,s);let i=this.getPropertyValue(s);t!==i&&(i?i.splice(0,i.length,...t||[]):this.setPropertyValue(s,t),e&&e.onSet&&e.onSet(t,this))}})}}class ez{constructor(e){this.onCompleted=e,this.asyncElements={},this.isRunningValue=!0}addElement(e){this.asyncElements[e]=!0}removeElement(e){delete this.asyncElements[e],this.tryComplete()}finish(){this.isRunningValue=!1,this.tryComplete()}get isRunning(){return this.isRunningValue||Object.keys(this.asyncElements).length>0}doCompleted(){this.onCompleted&&this.onCompleted()}tryComplete(){this.isRunning||this.doCompleted()}}class eU{constructor(e,t=null){this.value=e,this.error=t}}class eW extends ew{get errorOwner(){return this.owner}set errorOwner(e){this.owner=e}get id(){return"svd"+this.uniqueId}get isValidator(){return!0}getSurvey(e=!1){return this.owner&&this.owner.getSurvey?this.owner.getSurvey():null}getOwner(){return this.owner}get text(){return this.getLocStringText(this.locText)}set text(e){this.setLocStringText(this.locText,e)}get locText(){return this.getOrCreateLocStr("text",!0)}getErrorText(e){return this.text?this.text:this.getDefaultErrorText(e)}getDefaultErrorText(e){return""}
1validateOnCallback(e,t,s,i){let n=this.validate(e,s,i);return t&&t(n),n}validate(e,t,s){return null}getLocale(){return this.owner?this.owner.getLocale():""}getMarkdownHtml(e,t,s){return this.owner?this.owner.getMarkdownHtml(e,t,s):void 0}getRenderer(e){return this.owner?this.owner.getRenderer(e):null}getRendererContext(e){return this.owner?this.owner.getRendererContext(e):e}getProcessedText(e){return this.owner?this.owner.getProcessedText(e):e}createCustomError(e){let t=new eB(this.getErrorText(e),this.owner);return t.onUpdateErrorTextCallback=t=>t.text=this.getErrorText(e),t}toString(){var e=this.getType().replace("validator","");return this.text&&(e+=", "+this.text),e}}V([e_()],eW.prototype,"notificationType",void 0);class ej{run(e){let t=e.getValidators(),s=[],i=new ez(()=>{this.onAsyncCompleted&&this.onAsyncCompleted(s)});if(t.length>0){let n=e.getDataFilteredProperties(),r=e.validatedValue,a=e.getValidatorTitle();t.forEach(e=>{i.addElement(e.id),e.validateOnCallback(r,t=>{t&&t.error&&(t.error.notificationType=e.notificationType,s.push(t.error)),i.removeElement(e.id)},a,n)})}let n=[].concat(...s);return s.length=0,i.finish(),n}}class eG extends eW{constructor(e=null,t=null){super(),this.minValue=e,this.maxValue=t}getType(){return"numericvalidator"}validate(e,t,s){if(this.isValueEmpty(e))return null;if(!w.isNumber(e))return new eU(null,new eP(this.text,this.owner));let i=new eU(w.getNumber(e));return null!==this.minValue&&this.minValue>i.value||null!==this.maxValue&&this.maxValue<i.value?(i.error=this.createCustomError(t),i):"number"==typeof e?null:i}getDefaultErrorText(e){var t=e||this.getLocalizationString("value");return null!==this.minValue&&null!==this.maxValue?this.getLocalizationFormatString("numericMinMax",t,this.minValue,this.maxValue):null!==this.minValue?this.getLocalizationFormatString("numericMin",t,this.minValue):this.getLocalizationFormatString("numericMax",t,this.maxValue)}}V([e_()],eG.prototype,"minValue",void 0),V([e_()],eG.prototype,"maxValue",void 0);class eZ extends eW{constructor(){super()}getType(){return"textvalidator"}validate(e,t,s){return this.isValueEmpty(e)?null:!this.allowDigits&&/\d+$/.test(e)?new eU(null,this.createCustomError("textNoDigitsAllow")):this.minLength>0&&e.length<this.minLength||this.maxLength>0&&e.length>this.maxLength?new eU(null,this.createCustomError(t)):null}getDefaultErrorText(e){return"textNoDigitsAllow"===e?this.getLocalizationString(e):this.minLength>0&&this.maxLength>0?this.getLocalizationFormatString("textMinMaxLength",this.minLength,this.maxLength):this.minLength>0?this.getLocalizationFormatString("textMinLength",this.minLength):this.getLocalizationFormatString("textMaxLength",this.maxLength)}}V([e_()],eZ.prototype,"minLength",void 0),V([e_()],eZ.prototype,"maxLength",void 0),V([e_()],eZ.prototype,"allowDigits",void 0);class eJ extends eW{constructor(e=null,t=null){super(),this.minCount=e,this.maxCount=t}getType(){return"answercountvalidator"}validate(e,t,s){if(null==e||e.constructor!=Array)return null;var i=e.length;return 0==i?null:this.minCount&&i<this.minCount?new eU(null,this.createCustomError(this.getLocalizationFormatString("minSelectError",this.minCount))):this.maxCount&&i>this.maxCount?new eU(null,this.createCustomError(this.getLocalizationFormatString("maxSelectError",this.maxCount))):null}getDefaultErrorText(e){return e}}V([e_()],eJ.prototype,"minCount",void 0),V([e_()],eJ.prototype,"maxCount",void 0);class eK extends eW{constructor(e=null){super(),this.regex=e}getType(){return"regexvalidator"}validate(e,t,s){if(!this.regex||this.isValueEmpty(e))return null;let i=this.createRegExp();if(Array.isArray(e))for(let s=0;s<e.length;s++){let n=this.hasError(i,e[s],t);if(n)return n}return this.hasError(i,e,t)}hasError(e,t,s){return e.test(t)?null:new eU(t,this.createCustomError(s))}get insensitive(){return this.caseInsensitive}set insensitive(e){this.caseInsensitive=e}createRegExp(){let e=this.caseInsensitive?"i":"";return(this.owner?this.owner.createRegexValidator(this,this.regex,e):null)||new RegExp(this.regex,e)}}V([e_()],eK.prototype,"regex",void 0),V([e_()],eK.prototype,"caseInsensitive",void 0);class eY extends eW{constructor(){super(),this.re=/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()=[\]\.,;:\s@\"]+\.)+[^<>()=[\]\.,;:\s@\"]{2,})$/i}getType(){return"emailvalidator"}
1validate(e,t,s){return!e||this.re.test(e)?null:new eU(e,this.createCustomError(t))}getDefaultErrorText(e){return this.getLocalizationString("invalidEmail")}}class e$ extends eW{constructor(e=null){super(),this.conditionRunner=null,this.expression=e}getType(){return"expressionvalidator"}onPropertyValueChanged(e,t,s){if(super.onPropertyValueChanged(e,t,s),"expression"===e){let e=this.owner;e&&e.resetValidationDependencies&&e.resetValidationDependencies()}}validateOnCallback(e,t,s,i){this.conditionRunner&&(this.conditionRunner.onRunComplete=null);let n=null,r=i=>{n=this.generateError(i,e,s),t&&t(n)};if(!this.ensureConditionRunner())return r(!0),null;if(this.conditionRunner.onRunComplete=e=>{r(e)},!this.conditionRunner.canRun())return r(a),n;var a=this.conditionRunner.runContext(this.getValueGetterContext(),this.getPropertiesCopy(i,"expression"));return n||this.generateError(a,e,s)}generateError(e,t,s){return e?null:new eU(t,this.createCustomError(s))}getDefaultErrorText(e){return this.getLocalizationFormatString("invalidExpression",this.expression)}ensureConditionRunner(){let e=this.getExpressionFromSurvey("expression");return!!e&&(this.conditionRunner=new X(e),!0)}getValueGetterContext(){let e=this.owner;return e&&e.getValueGetterContext?e.getValueGetterContext():super.getValueGetterContext()}}V([e_()],e$.prototype,"expression",void 0),H.addClass("surveyvalidator",[{name:"text",serializationProperty:"locText",visibleIndex:99},{name:"notificationType",choices:["error","warning","info"],default:"error",visibleIndex:100}]),H.addClass("numericvalidator",["minValue:number","maxValue:number"],function(){return new eG},"surveyvalidator"),H.addClass("textvalidator",[{name:"minLength:number",default:0},{name:"maxLength:number",default:0},{name:"allowDigits:boolean",default:!0}],function(){return new eZ},"surveyvalidator"),H.addClass("answercountvalidator",["minCount:number","maxCount:number"],function(){return new eJ},"surveyvalidator"),H.addClass("regexvalidator",["regex",{name:"caseInsensitive:boolean",alternativeName:"insensitive"}],function(){return new eK},"surveyvalidator"),H.addClass("emailvalidator",[],function(){return new eY},"surveyvalidator"),H.addClass("expressionvalidator",["expression:condition"],function(){return new e$},"surveyvalidator");class eX{constructor(){this.classes=[]}isEmpty(){return""===this.toString()}append(e,t=!0){return e&&t&&("string"==typeof e&&(e=e.trim()),this.classes.push(e)),this}toString(){return this.classes.join(" ")}}let e1={root:"sv-action-bar",defaultSizeMode:"sv-action-bar--default-size-mode",smallSizeMode:"sv-action-bar--small-size-mode",item:"sv-action-bar-item",itemWithTitle:"",itemAsIcon:"sv-action-bar-item--icon",itemActive:"sv-action-bar-item--active",itemPressed:"sv-action-bar-item--pressed",itemIcon:"sv-action-bar-item__icon",itemTitle:"sv-action-bar-item__title",itemTitleWithIcon:"sv-action-bar-item__title--with-icon"};class e0 extends ew{constructor(){super(...arguments),this.rendredIdValue=e0.getNextRendredId()}static getNextRendredId(){return e0.renderedId++}get data(){return this._data}set data(e){this._data=e}get id(){return this.getId()}set id(e){this.setId(e)}getId(){return this.idValue}setId(e){this.idValue=e}addVisibilityChangedCallback(e){}removeVisibilityChangedCallback(e){}get renderedId(){return this.rendredIdValue}get owner(){return this.ownerValue}set owner(e){e!==this.owner&&(this.ownerValue=e,this.locStrsChanged())}get visible(){return this.getVisible()}set visible(e){this.setVisible(e)}get enabled(){return this.getEnabled()}set enabled(e){this.setEnabled(e)}get component(){return this.getComponent()}set component(e){this.setComponent(e)}get locTitle(){return this.getLocTitle()}set locTitle(e){this.setLocTitle(e)}get title(){return this.getTitle()}set title(e){this.setTitle(e)}get titles(){return this.locTitle.getJson()}set titles(e){this.locTitle.setJson(e)}set cssClasses(e){this.cssClassesValue=e}get cssClasses(){return this.cssClassesValue||e1}get isVisible(){return this.visible&&"popup"!==this.mode&&"removed"!==this.mode}get disabled(){return void 0!==this.enabled&&!this.enabled}get canShrink(){return!this.disableShrink&&!!this.iconName}get hasTitle(){return("small"!=this.mode&&(this.showTitle||void 0===this.showTitle)||!this.iconName)&&!!this.title}get hasSubItems(){return!!this.items&&this.items.length>0}getActionBarItemTitleCss(){return new eX().append(this.cssClasse
1s.itemTitle).append(this.cssClasses.itemTitleWithIcon,!!this.iconName).toString()}getActionBarItemCss(){let e=this.hasTitle;return new eX().append(this.cssClasses.item).append(this.cssClasses.itemWithTitle,e).append(this.cssClasses.itemAsIcon,!e).append(this.cssClasses.itemActive,!!this.active).append(this.cssClasses.itemPressed,!!this.pressed).append(this.innerCss).toString()}getActionRootCss(){return new eX().append("sv-action").append(this.css).append("sv-action--space",this.needSpace).append("sv-action--hidden",!this.isVisible).toString()}getTooltip(){return this.tooltip||this.title}getIsTrusted(e){return e.originalEvent?e.originalEvent.isTrusted:e.isTrusted}showPopup(){this.popupModel&&this.popupModel.show()}hidePopup(){this.popupModel&&this.popupModel.hide()}clearPopupTimeouts(){this.showPopupTimeout&&clearTimeout(this.showPopupTimeout),this.hidePopupTimeout&&clearTimeout(this.hidePopupTimeout)}showPopupDelayed(e){this.clearPopupTimeouts(),this.showPopupTimeout=setTimeout(()=>{this.clearPopupTimeouts(),this.showPopup()},e)}hidePopupDelayed(e){var t;(null==(t=this.popupModel)?void 0:t.isVisible)?(this.clearPopupTimeouts(),this.hidePopupTimeout=setTimeout(()=>{this.clearPopupTimeouts(),this.hidePopup(),this.isHovered=!1},e)):(this.clearPopupTimeouts(),this.isHovered=!1)}}e0.renderedId=1,V([e_()],e0.prototype,"tooltip",void 0),V([e_()],e0.prototype,"showTitle",void 0),V([e_()],e0.prototype,"innerCss",void 0),V([e_()],e0.prototype,"active",void 0),V([e_()],e0.prototype,"pressed",void 0),V([e_()],e0.prototype,"popupModel",void 0),V([e_()],e0.prototype,"needSeparator",void 0),V([e_()],e0.prototype,"template",void 0),V([e_({defaultValue:"large"})],e0.prototype,"mode",void 0),V([e_()],e0.prototype,"visibleIndex",void 0),V([e_()],e0.prototype,"disableTabStop",void 0),V([e_()],e0.prototype,"disableShrink",void 0),V([e_()],e0.prototype,"disableHide",void 0),V([e_({defaultValue:!1})],e0.prototype,"needSpace",void 0),V([e_()],e0.prototype,"ariaChecked",void 0),V([e_()],e0.prototype,"ariaExpanded",void 0),V([e_()],e0.prototype,"ariaLabelledBy",void 0),V([e_({defaultValue:"button"})],e0.prototype,"ariaRole",void 0),V([e_()],e0.prototype,"iconName",void 0),V([e_({defaultValue:24})],e0.prototype,"iconSize",void 0),V([e_()],e0.prototype,"markerIconName",void 0),V([e_()],e0.prototype,"css",void 0),V([e_({defaultValue:!1})],e0.prototype,"isPressed",void 0),V([e_({defaultValue:!1})],e0.prototype,"isHovered",void 0);class e2 extends e0{constructor(e){super(),this.locTitleChanged=()=>{let e=this.locTitle.renderedHtml;this.setPropertyValue("_title",e||void 0)},this.needUpdateMaxDimension=!1,this.needUpdateMinDimension=!1;const t=e instanceof e2?e.innerItem:e;if(this.innerItem=t,this.locTitle=t?t.locTitle:null,t)for(var s in t)"locTitle"===s||"title"===s&&this.title||(this[s]=t[s]);this.locTitleName&&this.locTitleChanged(),this.locStrChangedInPopupModel()}createLocTitle(){return this.createLocalizableString("title",this,!0)}setSubItems(e){this.markerIconName="icon-next_16x16",this.items=[...e.items],this.popupModel?this.popupModel.contentComponentData.model.setItems(this.items):this.createPopupForSubitems(e),this.component=this.getGroupComponentName()}createPopupForSubitems(e){let s=Object.assign({},e);s.searchEnabled=!1;let i=t(s,{horizontalPosition:"right",showPointer:!1,canShrink:!1});i.cssClass="sv-popup-inner",this.popupModel=i}getId(){return this.getPropertyValue("id")}setId(e){this.setPropertyValue("id",e)}getLocTitle(){return this.locTitleValue}setLocTitle(e){e||this.locTitleValue||(e=this.createLocTitle()),this.locTitleValue&&this.locTitleValue.onStringChanged.remove(this.locTitleChanged),this.locTitleValue=e,this.locTitleValue.onStringChanged.add(this.locTitleChanged),this.locTitleChanged()}getTitle(){return this._title}setTitle(e){this._title=e}get locTitleName(){return this.locTitle.localizationName}set locTitleName(e){this.locTitle.localizationName=e}locStrsChanged(){super.locStrsChanged(),this.locTooltipChanged(),this.locStrChangedInPopupModel()}doAction(e){let t=e.originalEvent?e.originalEvent:e;return this.action(this,t.isTrusted),t.preventDefault(),t.stopPropagation(),!0}doMouseDown(e){this.isMouseDown=!0}doFocus(e){if(this.onFocus){let t=e.originalEvent?e.originalEvent:e;this.onFocus(this.isMouseDown,t)}this.isMouseDown=!1}locStrChangedInPopupModel(){if(!this.popupModel||!this.popupModel.contentComponentData||!this.popupModel.contentComponentData.model)return;let e=this.popupModel.contentComponentData.model;
1Array.isArray(e.actions)&&e.actions.forEach(e=>{e.locStrsChanged&&e.locStrsChanged()})}locTooltipChanged(){this.locTooltipName&&(this.tooltip=E(this.locTooltipName,this.locTitle.locale))}getLocale(){return this.owner?this.owner.getLocale():""}getMarkdownHtml(e,t,s){return this.owner?this.owner.getMarkdownHtml(e,t,s):void 0}getProcessedText(e){return this.owner?this.owner.getProcessedText(e):e}getRenderer(e){return this.owner?this.owner.getRenderer(e):null}getRendererContext(e){return this.owner?this.owner.getRendererContext(e):e}setVisible(e){this.visible!==e&&(this._visible=e)}getVisible(){return this._visible}setEnabled(e){this._enabled=e}getEnabled(){return this.enabledIf?this.enabledIf():this._enabled}setComponent(e){this._component=e}getComponent(){return this._component}getGroupComponentName(){return"sv-list-item-group"}initLoadingIndicatorVisibilityObserver(e){"u">typeof IntersectionObserver&&(this.intersectionVisibilityObserver=new IntersectionObserver(t=>{t.forEach(t=>{e(t.isIntersecting)})},{trackVisibility:!0,delay:100}))}dispose(){this.locTitleValue&&this.locTitleValue.onStringChanged.remove(this.locTitleChanged),this.locTitleChanged=void 0,this.action=void 0,super.dispose(),this.popupModel&&this.popupModel.dispose(),this.intersectionVisibilityObserver&&(this.intersectionVisibilityObserver.disconnect(),this.intersectionVisibilityObserver=void 0)}updateDimension(e,t,s){let i="small"==e?"minDimension":"maxDimension";t&&(t.classList.contains("sv-action--hidden")?(t.classList.remove("sv-action--hidden"),this[i]=s(t),t.classList.add("sv-action--hidden")):this[i]=s(t))}afterRender(){this.afterRenderCallback&&this.afterRenderCallback()}updateMode(e,t){this.updateModeCallback?this.updateModeCallback(e,t):this.afterRenderCallback=()=>{this.updateModeCallback(e,t),this.afterRenderCallback=void 0}}updateDimensions(e,t,s){let i=s&&("large"!=s||"small"===this.mode)?s:this.mode;this.updateMode(i,(i,n)=>{this.updateDimension(i,n,e),s?t():this.updateMode("small"!==i?"small":"large",(s,i)=>{this.updateDimension(s,i,e),t()})})}}V([e_({defaultValue:!0})],e2.prototype,"_visible",void 0),V([e_({onSet:(e,t)=>{t.locTooltipChanged()}})],e2.prototype,"locTooltipName",void 0),V([e_()],e2.prototype,"_enabled",void 0),V([e_()],e2.prototype,"action",void 0),V([e_()],e2.prototype,"onFocus",void 0),V([e_()],e2.prototype,"_component",void 0),V([e_()],e2.prototype,"items",void 0),V([e_({onSet:(e,t)=>{t.locTitleValue.text!==e&&(t.locTitleValue.text=e)}})],e2.prototype,"_title",void 0);class e5{constructor(e){this.item=e,this.funcKey="sv-dropdown-action",this.setupPopupCallbacks()}setupPopupCallbacks(){let e=this.popupModel=this.item.popupModel;e&&e.registerPropertyChangedHandlers(["isVisible"],()=>{e.isVisible?this.item.pressed=!0:this.item.pressed=!1},this.funcKey)}removePopupCallbacks(){this.popupModel&&this.popupModel.unregisterPropertyChangedHandlers(["isVisible"],this.funcKey)}dispose(){this.removePopupCallbacks()}}let e7=e=>!!e&&!!("host"in e&&e.host);function e4(e){let t=(null==e?void 0:e.getRootNode())||p.environment.root;return t instanceof Document||t instanceof ShadowRoot?t:null}function e9(){let e=n.getDocument();if(!e)return null;let t=e.activeElement;return t&&t.shadowRoot&&t.shadowRoot.activeElement&&(t=t.shadowRoot.activeElement),t}function e3(e){if(!e)return n.isAvailable()?n.getDocument().documentElement:void 0;if(e.scrollHeight>e.clientHeight&&("scroll"===getComputedStyle(e).overflowY||"auto"===getComputedStyle(e).overflowY)||e.scrollWidth>e.clientWidth&&("scroll"===getComputedStyle(e).overflowX||"auto"===getComputedStyle(e).overflowX))return e;if(!e.parentElement){let t=e4(e);if(t)return e7(t)?t.host:t.documentElement}return e3(e.parentElement)}function e6(e){if(!e)return;let t=e3(e);t&&setTimeout(()=>t.dispatchEvent(new CustomEvent("scroll")),10)}function e8(e){return e?e.replace(/\s*?([\w-]+)\s*?/g,".$1"):e}function te(e){return getComputedStyle?Number.parseFloat(getComputedStyle(e).width):e.offsetWidth}function tt(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function ts(e){return e?["url(",e,")"].join(""):""}function ti(e){e.preventDefault(),e.stopPropagation()}function tn(e,t){let s={};y(t.list,s),y(e.list,s),e.list=s}class tr{constructor(e,t,s){this.container=e,this.model=t,this.afterInitializeCallback=s,this.resizeObserver=void 0,this.isInitialized=!1,this.isResizeObserverStarted=!1,this.getComputedStyle=e=>n.getComputedStyle(e),this.isDisposed=!1,"u">typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver(e=>{i.requestAnimationFrame(()=>{this.isResizeObserverStarted=!0,this.process()})}),this.resizeObserver.observe(this.container.parentElement))}getDimensions(e){return{scroll:e.scrollWidth,offset:e.offsetWidth}}getAvailableSpace(){let e=this.getComputedStyle(this.container),t=this.container.offsetWidth;return"border-box"===e.boxSizing&&(t-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)),t}getGap(){let e=this.getComputedStyle(this.container);if("flex"==e.display){let t=parseFloat(e.rowGap);return isNaN(t)?0:t}return 0}calcItemSize(e){return e.offsetWidth||e.getBoundingClientRect().width}updateItemsDimensions(e){if(!this.container)return;let t=this.isInitialized?this.model.renderedActions.filter(e=>e.needUpdateMaxDimension||e.needUpdateMinDimension):this.model.renderedActions,s=t.length;0==s&&e(),t.forEach(t=>{let i=!this.isInitialized||t.needUpdateMaxDimension,n=!this.isInitialized||t.needUpdateMinDimension;t.updateDimensions(e=>this.calcItemSize(e),()=>{t.needUpdateMaxDimension=!1,t.needUpdateMinDimension=!1,--s<=0&&e()},n?i?void 0:"small":"large")})}get isContainerVisible(){return!!this.container&&tt(this.container)}shouldProcessResponsiveness(){return this.isContainerVisible&&!this.model.isResponsivenessDisabled&&!this.isDisposed}process(){this.shouldProcessResponsiveness()&&this.updateItemsDimensions(()=>{this.shouldProcessResponsiveness()&&this.model.fit({availableSpace:this.getAvailableSpace(),gap:this.getGap()}),!this.isInitialized&&(this.isInitialized=!0,this.afterInitializeCallback&&this.afterInitializeCallback())})}update(e){this.isResizeObserverStarted&&(this.model.isResponsivenessDisabled||(e&&(this.isInitialized=!1),this.process()))}dispose(){this.isDisposed=!0,this.resizeObserver&&this.resizeObserver.disconnect(),this.isResizeObserverStarted=!1,this.resizeObserver=void 0,this.container=void 0}}function ta(e){let t,s=!1,i=!1,n=()=>{i=!0,t=void 0};return{run:(...n)=>{i=!1,t=n,s||(s=!0,queueMicrotask(()=>{i||e.apply(this,t),t=void 0,i=!1,s=!1}))},cancel:n,getLastArguments:()=>t,flushSync:()=>{!i&&s&&(e.apply(this,t),n())}}}class to extends ew{constructor(){super(...arguments),this.id=to.ContainerID++,this.visibleActions=[],this.sizeMode="default",this.raiseUpdateCallback=ta(e=>{this.update(e)}),this.onActionPropertyChangedCallback=this.onActionPropertyChanged.bind(this),this.createActionCallback=null}
1getMarkdownHtml(e,t,s){return this.locOwner?this.locOwner.getMarkdownHtml(e,t,s):void 0}getRenderer(e){return this.locOwner?this.locOwner.getRenderer(e):null}getRendererContext(e){return this.locOwner?this.locOwner.getRendererContext(e):e}getProcessedText(e){return this.locOwner?this.locOwner.getProcessedText(e):e}getLocale(){return this.locOwner?this.locOwner.getLocale():""}getRenderedActions(){return this.visibleActions}locStrsChanged(){super.locStrsChanged(),this.actions.forEach(e=>{e.locTitle&&e.locTitle.strChanged(),e.locStrsChanged()})}flushUpdates(){this.raiseUpdateCallback.flushSync()}raiseUpdate(e){var t;let s=this.raiseUpdateCallback.getLastArguments(),i=null!=(t=s&&s[0])?t:{};this.raiseUpdateCallback.run(this.mergeUpdateOptions(e,i))}mergeUpdateOptions(e,t){let s=Object.assign({},e);return s.needUpdateActions=!!s.needUpdateActions||!!t.needUpdateActions,s.needUpdateIsEmpty=!!s.needUpdateIsEmpty||!!t.needUpdateIsEmpty,s}update(e){(null==e?void 0:e.needUpdateActions)&&this.updateVisibleActions(),(null==e?void 0:e.needUpdateIsEmpty)&&this.updateIsEmpty()}updateVisibleActions(){this.visibleActions=this.getVisibleActions()}updateIsEmpty(){this.isEmpty=this.getIsEmpty()}getIsEmpty(){return this.visibleActions.length<=0}getVisibleActions(){return this.actions.filter(e=>!1!==e.visible)}onSet(){this.actions.forEach(e=>{this.patchAction(e)})}onPush(e){this.patchAction(e),this.raiseUpdate({needUpdateActions:!0,needUpdateIsEmpty:!0})}onRemove(e){this.unPatchAction(e),this.raiseUpdate({needUpdateActions:!0,needUpdateIsEmpty:!0})}onActionPropertyChanged(e,t){"_visible"==t.name&&this.raiseUpdate({needUpdateActions:!0,needUpdateIsEmpty:!0})}patchAction(e){this.setActionCssClasses(e),e.owner=this,e.onPropertyChanged.add(this.onActionPropertyChangedCallback)}unPatchAction(e){e.owner=null,e.onPropertyChanged.remove(this.onActionPropertyChangedCallback)}setActionCssClasses(e){e.cssClasses=this.cssClasses}get hasActions(){return(this.actions||[]).length>0}get hasVisibleActions(){return!this.isEmpty}get renderedActions(){return this.getRenderedActions()}getRootStyle(){}getRootCss(){let e="small"===this.sizeMode?this.cssClasses.smallSizeMode:this.cssClasses.defaultSizeMode;return new eX().append(this.cssClasses.root+(e?" "+e:"")+(this.containerCss?" "+this.containerCss:"")).append(this.cssClasses.root+"--empty",this.isEmpty).toString()}getDefaultCssClasses(){return e1}getAllActions(){return this.actions}setCssClasses(e,t=!0){this.cssClassesValue={},t&&this.copyCssClasses(this.cssClassesValue,this.getDefaultCssClasses()),y(e,this.cssClasses),this.getAllActions().forEach(e=>{this.setActionCssClasses(e)})}set cssClasses(e){this.setCssClasses(e)}get cssClasses(){return this.cssClassesValue||(this.cssClassesValue=this.getDefaultCssClasses()),this.cssClassesValue}createAction(e){return e instanceof e0?e:this.createActionCore(this,e)}createActionCore(e,t){return this.createActionCallback?this.createActionCallback(t):new e2(t)}addAction(e,t=!0){let s=this.createAction(e);if(t&&!this.isActionVisible(s))return s;let i=[].concat(this.actions,s);return this.sortItems(i),this.actions=i,s}removeActionById(e){let t=this.getActionIndexById(e);return!(t<0)&&(this.actions.splice(t,1),!0)}setItems(e,t=!0){let s=[];e.forEach(e=>{(!t||this.isActionVisible(e))&&s.push(this.createAction(e))}),t&&this.sortItems(s),this.actions=s}sortItems(e){this.hasSetVisibleIndex(e)&&e.sort(this.compareByVisibleIndex)}hasSetVisibleIndex(e){for(let t=0;t<e.length;t++){let s=e[t].visibleIndex;if(void 0!==s&&s>=0)return!0}return!1}compareByVisibleIndex(e,t){return e.visibleIndex-t.visibleIndex}isActionVisible(e){return e.visibleIndex>=0||void 0===e.visibleIndex}popupAfterShowCallback(e){}mouseOverHandler(e){e.isHovered=!0;let t=!1,s=!1;if(this.actions.forEach(i=>{i===e&&e.popupModel&&(t=!0),i.popupModel&&i.popupModel.isVisible&&(s=!0)}),t){let t=s?Math.max(this.subItemsShowDelay,this.subItemsHideDelay):this.subItemsShowDelay;e.showPopupDelayed(t),this.popupAfterShowCallback(e)}}initResponsivityManager(e,t){}resetResponsivityManager(){}getActionById(e){let t=this.getActionIndexById(e);return t>-1?this.actions[t]:null}getActionIndexById(e){for(var t=0;t<this.actions.length;t++)if(this.actions[t].id===e)return t;return -1}dispose(){super.dispose(),this.resetResponsivityManager(),this.actions.forEach(e
1=>e.dispose()),this.actions.length=0}}to.ContainerID=1,V([eH({})],to.prototype,"visibleActions",void 0),V([eH({onSet:(e,t)=>{t.onSet()},onPush:(e,t,s)=>{s.onPush(e)},onRemove:(e,t,s)=>{s.onRemove(e)}})],to.prototype,"actions",void 0),V([e_({})],to.prototype,"containerCss",void 0),V([e_({defaultValue:!0})],to.prototype,"isEmpty",void 0),V([e_({defaultValue:300})],to.prototype,"subItemsShowDelay",void 0),V([e_({defaultValue:300})],to.prototype,"subItemsHideDelay",void 0);class tl{static focusElement(e){e&&e.focus()}static visibility(e){var t=n.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&(!e.parentElement||this.visibility(e.parentElement))}static getNextElementPreorder(e){let t=e.nextElementSibling?e.nextElementSibling:e.parentElement.firstElementChild;return this.visibility(t)?t:this.getNextElementPreorder(t)}static getNextElementPostorder(e){let t=e.previousElementSibling?e.previousElementSibling:e.parentElement.lastElementChild;return this.visibility(t)?t:this.getNextElementPostorder(t)}static hasHorizontalScroller(e){return!!e&&e.scrollWidth>e.offsetWidth}static hasVerticalScroller(e){return!!e&&e.scrollHeight>e.offsetHeight}}let tu=!1,th=null;"u">typeof navigator&&navigator&&i.isAvailable()&&(th=navigator.userAgent||navigator.vendor||i.hasOwn("opera")),(o=th)&&("MacIntel"===navigator.platform&&navigator.maxTouchPoints>0||"iPad"===navigator.platform?tu=!0:(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(o)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(o.substring(0,4)))&&(tu=!0));let td=tu||!1;var tc={get isTouch(){return!this.hasMouse&&this.hasTouchEvent},get hasTouchEvent(){return i.isAvailable()&&(i.hasOwn("ontouchstart")||navigator.maxTouchPoints>0)},hasMouse:!0};tc.hasMouse=function(e){if(!e||td)return!1;let t=e("(pointer:fine)"),s=e("(any-hover:hover)");return!!t&&t.matches||!!s&&s.matches}(i.matchMedia);let tp=tc.isTouch,tg={root:"sv-list__container",item:"sv-list__item",searchClearButtonIcon:"sv-list__filter-clear-button",loadingIndicator:"sv-list__loading-indicator",itemSelected:"sv-list__item--selected",itemGroup:"sv-list__item--group",itemGroupSelected:"sv-list__item--group-selected",itemWithIcon:"sv-list__item--with-icon",itemDisabled:"sv-list__item--disabled",itemFocused:"sv-list__item--focused",itemHovered:"sv-list__item--hovered",itemTextWrap:"sv-list__item-text--wrap",itemIcon:"sv-list__item-icon",itemMarkerIcon:"sv-list-item__marker-icon",itemSeparator:"sv-list__item-separator",itemBody:"sv-list__item-body",itemsContainer:"sv-list",itemsContainerFiltering:"sv-list--filter
1ing",filter:"sv-list__filter",filterIcon:"sv-list__filter-icon",filterInput:"sv-list__input",emptyContainer:"sv-list__empty-container",emptyText:"sv-list__empty-text"};class tm extends to{hasText(e,t){if(!t)return!0;let s=e.title||"";if(this.onTextSearchCallback)return this.onTextSearchCallback(e,t);let i=b(s,"filter"),n=b(t,"filter");return i.indexOf(n)>-1}isItemVisible(e){return e.id===this.loadingIndicator.id||this.disableSearch?e.visible:e.visible&&this.hasText(e,this.filterString)}getRenderedActions(){let e=super.getRenderedActions();if(this.filterString){let t=[];return e.forEach(e=>{t.push(e),e.items&&e.items.forEach(s=>{let i=new e2(s);i.iconName||(i.iconName=e.iconName),t.push(i)})}),t}return e}get visibleItems(){return this.actions.filter(e=>this.isItemVisible(e))}onFilterStringChanged(e){this.onFilterStringChangedCallback&&this.onFilterStringChangedCallback(e),this.raiseUpdate({needUpdateIsEmpty:!0})}getIsEmpty(){return!this.renderedActions.some(e=>this.isItemVisible(e))}scrollToItem(e,t=0){setTimeout(()=>{if(!this.listContainerHtmlElement)return;let s=this.listContainerHtmlElement.querySelector(e8(e));s&&setTimeout(()=>{s.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},t)},t)}constructor(e,t,s,i,n){super(),this.onSelectionChanged=t,this.allowSelection=s,this.elementId=n,this.onItemClick=e=>{if(this.isItemDisabled(e))return;this.isExpanded=!1,this.allowSelection&&(this.selectedItem=e),this.onSelectionChanged&&this.onSelectionChanged(e);let t=e.action;t&&t(e)},this.onItemHover=e=>{this.mouseOverHandler(e)},this.isItemDisabled=e=>void 0!==e.enabled&&!e.enabled,this.getA11yItemAriaSelected=e=>{if("option"==this.listItemRole)return this.isItemSelected(e)?"true":"false"},this.getA11yItemAriaChecked=e=>{if("menuitemradio"==this.listItemRole)return this.isItemSelected(e)?"true":"false"},this.isItemSelected=e=>this.areSameItems(this.selectedItem,e),this.isItemFocused=e=>this.areSameItems(this.focusedItem,e),this.getListClass=()=>new eX().append(this.cssClasses.itemsContainer).append(this.cssClasses.itemsContainerFiltering,!!this.filterString&&this.visibleActions.length!==this.visibleItems.length).toString(),this.getItemClass=e=>{let t=this.isItemSelected(e);return new eX().append(this.cssClasses.item).append(this.cssClasses.itemWithIcon,!!e.iconName).append(this.cssClasses.itemDisabled,this.isItemDisabled(e)).append(this.cssClasses.itemFocused,this.isItemFocused(e)).append(this.cssClasses.itemSelected,!e.hasSubItems&&t).append(this.cssClasses.itemGroup,e.hasSubItems).append(this.cssClasses.itemGroupSelected,e.hasSubItems&&t).append(this.cssClasses.itemHovered,e.isHovered).append(this.cssClasses.itemTextWrap,this.textWrapEnabled).append(e.css).toString()},this.getItemStyle=e=>({"--sjs-list-item-level":(e.level||0)+1}),-1!==Object.keys(e).indexOf("items")?(Object.keys(e).forEach(t=>{switch(t){case"items":this.setItems(e.items);break;case"onFilterStringChangedCallback":this.setOnFilterStringChangedCallback(e.onFilterStringChangedCallback);break;case"onTextSearchCallback":this.setOnTextSearchCallback(e.onTextSearchCallback);break;default:this[t]=e[t]}}),this.updateActionsIds()):(this.setItems(e),this.selectedItem=i)}setOnFilterStringChangedCallback(e){this.onFilterStringChangedCallback=e}setOnTextSearchCallback(e){this.onTextSearchCallback=e}setItems(e,t=!0){super.setItems(e,t),this.updateActionsIds(),!this.isAllDataLoaded&&this.actions.length&&this.actions.push(this.loadingIndicator)}updateActionsIds(){this.elementId&&this.actions.forEach(e=>{e.elementId=this.elementId+e.id})}setSearchEnabled(e){this.searchEnabled=e,this.showSearchClearButton=e}onSet(){this.showFilter=this.searchEnabled&&(this.forceShowFilter||(this.actions||[]).length>tm.MINELEMENTCOUNT),super.onSet()}getDefaultCssClasses(){return tg}popupAfterShowCallback(e){this.addScrollEventListener(()=>{e.hidePopup()})}onItemLeave(e){e.hidePopupDelayed(this.subItemsHideDelay)}areSameItems(e,t){return this.areSameItemsCallback?this.areSameItemsCallback(e,t):!!e&&!!t&&e.id==t.id}get a11ya11y_input_ariaLabel(){return this.listAriaLabel}get filterStringPlaceholder(){return this.getLocalizationString("filterStringPlaceholder")}get emptyMessage(){return this.isAllDataLoaded?this.getLocalizationString("emptyMessage"):this.getLocalizationString("loadingData")}get scrollableContainer(){return this.listContainerHtmlElement.querySelector(e8(this.cssClasse
1s.itemsContainer))}get loadingIndicator(){if(!this.loadingIndicatorValue){let e=new e2({id:"loadingIndicator",title:this.getLocalizationString("loadingPage"),action:()=>{},css:this.cssClasses.loadingIndicator});e.initLoadingIndicatorVisibilityObserver(this.loadingIndicatorVisibilityObserver),this.loadingIndicatorValue=e}return this.loadingIndicatorValue}goToItems(e){if("ArrowDown"===e.key||40===e.keyCode){let t=e.target.parentElement.parentElement.querySelector("ul"),s=function(e){let t;for(let s=0;s<e.children.length;s++)t||"none"===getComputedStyle(e.children[s]).display||(t=e.children[s]);return t}(t);t&&s&&(tl.focusElement(s),e.preventDefault())}}onMouseMove(e){this.resetFocusedItem()}onKeyDown(e){let t=e.target;"ArrowDown"===e.key||40===e.keyCode?(tl.focusElement(tl.getNextElementPreorder(t)),e.preventDefault()):("ArrowUp"===e.key||38===e.keyCode)&&(tl.focusElement(tl.getNextElementPostorder(t)),e.preventDefault())}onPointerDown(e,t){}refresh(){""==this.filterString&&this.raiseUpdate({needUpdateIsEmpty:!0}),this.resetFocusedItem()}onClickSearchClearButton(e){e.currentTarget.parentElement.querySelector("input").focus(),this.refresh()}resetFocusedItem(){this.focusedItem=void 0}focusFirstVisibleItem(){tp||(this.focusedItem=this.visibleItems[0])}focusLastVisibleItem(){this.focusedItem=this.visibleItems[this.visibleItems.length-1]}initFocusedItem(){this.focusedItem=this.visibleItems.filter(e=>e.visible&&this.isItemSelected(e))[0],this.focusedItem||this.focusFirstVisibleItem()}focusNextVisibleItem(){if(this.focusedItem){let e=this.visibleItems,t=e.indexOf(this.focusedItem),s=e[t+1];s?this.focusedItem=s:this.focusFirstVisibleItem()}else this.initFocusedItem()}focusPrevVisibleItem(){if(this.focusedItem){let e=this.visibleItems,t=e.indexOf(this.focusedItem),s=e[t-1];s?this.focusedItem=s:this.focusLastVisibleItem()}else this.initFocusedItem()}selectFocusedItem(){this.focusedItem&&this.onItemClick(this.focusedItem)}initListContainerHtmlElement(e){this.listContainerHtmlElement=e}onItemRended(e,t){!this.isAllDataLoaded&&(e===this.actions[this.actions.length-1]&&this.listContainerHtmlElement&&(this.hasVerticalScroller=tl.hasVerticalScroller(this.scrollableContainer)),e.id===this.loadingIndicator.id&&t&&this.loadingIndicator.intersectionVisibilityObserver&&this.loadingIndicator.intersectionVisibilityObserver.observe(t))}scrollToFocusedItem(){this.scrollToItem(this.cssClasses.itemFocused)}scrollToSelectedItem(){this.selectedItem&&this.selectedItem.items&&this.selectedItem.items.length>0?this.scrollToItem(this.cssClasses.itemGroupSelected,110):this.scrollToItem(this.cssClasses.itemSelected,110)}setLoadingIndicatorVisibilityObserver(e){e&&(this.loadingIndicatorVisibilityObserver=e)}addScrollEventListener(e){e&&(this.removeScrollEventListener(),this.scrollHandler=e),this.scrollHandler&&this.scrollableContainer.addEventListener("scroll",this.scrollHandler)}removeScrollEventListener(){this.scrollHandler&&this.scrollableContainer.removeEventListener("scroll",this.scrollHandler)}dispose(){super.dispose(),this.loadingIndicatorValue&&this.loadingIndicatorValue.dispose(),this.listContainerHtmlElement=void 0}}tm.INDENT=16,tm.MINELEMENTCOUNT=10,V([e_({defaultValue:!0,onSet:(e,t)=>{t.onSet()}})],tm.prototype,"searchEnabled",void 0),V([e_({defaultValue:!1})],tm.prototype,"showFilter",void 0),V([e_({defaultValue:!1})],tm.prototype,"forceShowFilter",void 0),V([e_({defaultValue:!1})],tm.prototype,"isExpanded",void 0),V([e_({})],tm.prototype,"selectedItem",void 0),V([e_()],tm.prototype,"focusedItem",void 0),V([e_({onSet:(e,t)=>{t.onFilterStringChanged(t.filterString)}})],tm.prototype,"filterString",void 0),V([e_({defaultValue:!1})],tm.prototype,"hasVerticalScroller",void 0),V([e_({defaultValue:!0})],tm.prototype,"isAllDataLoaded",void 0),V([e_({defaultValue:!1})],tm.prototype,"showSearchClearButton",void 0),V([e_({defaultValue:!0})],tm.prototype,"renderElements",void 0),V([e_({defaultValue:!1})],tm.prototype,"textWrapEnabled",void 0),V([e_({defaultValue:"sv-list-item-content"})],tm.prototype,"itemComponent",void 0),V([e_({defaultValue:"listbox"})],tm.prototype,"listRole",void 0),V([e_({defaultValue:"option"})],tm.prototype,"listItemRole",void 0),V([e_()],tm.prototype,"listAriaLabel",void 0),V([e_({defaultValue:!1})],tm.prototype,"disableSearch",void 0);class tv extends ew{refreshInnerModel(){let e=this.contentComponentData.model;e&&e.refresh&&e.refresh()}constructor(e,t,s){if(super(),this.focusFirstInputSelector="",this.onCancel=()=>{},this.onApply=()=>!0,this.onHide=()=>{},this.onShow=()=>{},this.onBlur=()=>{},this.onDispose=()=>{},this.onVisibilityChanged=this.addEvent(),this.onFooterActionsCreated=this.addEvent(),this.onRecalculatePosition=this.addEvent(),this.contentComponentName=e,this.contentComponentData=t,s)for(var i in s)this[i]=s[i]}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"isVisible"===e&&this.onVisibilityChanged.fire(this,{model:this,isVisible:s})}toggleVisibility(){this.isVisible=!this.isVisible}show(){this.isVisible||(this.isVisible=!0)}hide(){this.isVisible&&(this.isVisible=!1)}recalculatePosition(e){this.onRecalculatePosition.fire(this,{isResetHeight:e})}updateFooterActions(e){let t={actions:e};return this.onFooterActionsCreated.fire(this,t),t.actions}getDisplayMode(){if(this.isModal)return"popup"===this.displayMode?"modal-popup":"modal-overlay";{let e;if("popup"===this.displayMode)return"menu-popup";switch(this.overlayDisplayMode){case"plain":e="menu-popup";break;case"dropdown-overlay":e="menu-overlay";break;case"tablet-dropdown-overlay":e="menu-popup-overlay";break;case"auto":e=tp?"menu-popup-overlay":"menu-popup"}return e}}updateDisplayMode(e){let t,s;switch(e){case"dropdown":t="popup",s="auto";break;case"popup":t="overlay",s="tablet-dropdown-overlay";break;case"overlay":t="overlay",s="dropdown-overlay"}if(this.displayMode!==t){let t="dropdown"===e;this.setWidthByTarget=t,this.isFocusedContent=!t}return(this.displayMode!==t||this.overlayDisplayMode!==s)&&(this.displayMode=t,this.overlayDisplayMode=s,!0)}onHiding(){this.refreshInnerModel(),this.onHide()}dispose(){super.dispose(),this.onDispose()}}function tC(e,t){e.listRole||(e.listRole="menu"),e.listItemRole||(e.listItemRole=e.allowSelection?"menuitemradio":"menuitem");let s=new tm(e);s.onSelectionChanged=t=>{e.onSelectionChanged&&e.onSelectionChanged(t),n.hide()};let i=t||{};i.onDispose=()=>{s.dispose()};let n=new tv("sv-list",{model:s},i);return n.isFocusedContent=s.showFilter,n.onShow=()=>{i.onShow&&i.onShow(),s.scrollToSelectedItem()},n.onHide=()=>{i.onHide&&i.onHide(),s.filterString=""},n}function ty(e){return null==e?void 0:e.previousElementSibling}V([e_()],tv.prototype,"contentComponentName",void 0),V([e_()],tv.prototype,"contentComponentData",void 0),V([e_({defaultValue:"bottom"})],tv.prototype,"verticalPosition",void 0),V([e_({defaultValue:"left"})],tv.prototype,"horizontalPosition",void 0),V([e_({defaultValue:!0})],tv.prototype,"showPointer",void 0),V([e_({defaultValue:!1})],tv.prototype,"showCloseButton",void 0),V([e_({defaultValue:!1})],tv.prototype,"isModal",void 0),V([e_({defaultValue:!0})],tv.prototype,"canShrink",void 0),V([e_({defaultValue:!0})],tv.prototype,"isFocusedContent",void 0),V([e_({defaultValue:!0})],tv.prototype,"isFocusedContainer",void 0),V([e_({defaultValue:""})],tv.prototype,"cssClass",void 0),V([e_({defaultValue:""})],tv.prototype,"title",void 0),V([e_({defaultValue:"auto"})],tv.prototype,"overlayDisplayMode",void 0),V([e_({defaultValue:"popup"})],tv.prototype,"displayMode",void 0),V([e_({defaultValue:"flex"})],tv.prototype,"positionMode",void 0),V([e_({defaultValue:!1})],tv.prototype,"isVisible",void 0),t=tC,(l=d||(d={}))[l.None=0]="None",l[l.Light=1]="Light",l[l.Hard=3]="Hard";class tf extends to{hideItemsGreaterN(e){let t=this.getActionsToHide();e=Math.max(e,this.minVisibleItemsCount-(this.visibleActions.length-t.length));let s=[];t.forEach(t=>{e<=0&&(t.mode="popup",s.push(t.innerItem)),e--}),this.hiddenItemsListModel.setItems(s)}getActionsToHide(){return this.visibleActions.filter(e=>!e.disableHide)}updateItemMode(e,t){let s=this.visibleActions;for(let i=s.length-1;i>=0;i--)t>e&&!s[i].disableShrink?(t-=s[i].maxDimension-s[i].minDimension,s[i].mode="small"):s[i].mode="large"}constructor(){super(),this.minVisibleItemsCount=0,this.isResponsivenessDisabled=!1,this.isInitialized=!1,this.dotsItem=function(e,t){var s;let i=t.onSelectionChanged;t.onSelectionChanged=(e,...t)=>{r.hasTitle&&(r.title=e.title),i&&i(e,t)};let n=tC(t,void 0);n.getTargetCallback=ty;let r=new e2(Object.assign({},e,{component:"sv-action-bar-item-dropdown",popupModel:n,action:(t,s)=>{e.action&&e.action(),n.isFocusedContent=n.isFocusedContent||!s,n.show()}}));return r.data=null==(s=n.contentComponentData)?void 0:s.model,r}({id:"dotsItem-id"+this.id++,css:"sv-dots",innerCss:"sv-dots__item",iconName:"icon-more",visible:!1,tooltip:E("more")},{items:[],allowSelection:!1}),this.hiddenItemsListModel.createActionCallback=e=>this.createActionCore(this.hiddenItemsListModel,e)}get hiddenItemsListModel(){return this.dotsItem.data}onSet(){super.onSet(),this.raiseUpdate({updateResponsivenessMode:d.Hard})}onPush(e){super.onPush(e),this.raiseUpdate({updateResponsivenessMode:d.Hard})}onRemove(e){super.onRemove(e),this.raiseUpdate({updateResponsivenessMode:d.Hard})}onActionPropertyChanged(e,t){super.onActionPropertyChanged(e,t),("_visible"==t.name||"_title"==t.name)&&(e.needUpdateMaxDimension=e.visible,e.needUpdateMinDimension=e.visible,this.raiseUpdate({updateResponsivenessMode:d.Light})),"disableHide"==t.name&&t.newValue&&"popup"==e.mode&&this.raiseUpdate({updateResponsivenessMode:d.Light})}getRenderedActions(){let e=super.getRenderedActions();return 0==e.length||1===e.length&&e[0].iconName?e:e.concat([this.dotsItem])}getAllActions(){return this.actions.concat(this.dotsItem)}getActionMinDimension(e){return e.disableShrink?e.maxDimension:e.minDimension}getVisibleItemsCount(e){let{availableSpace:t,gap:s}=e;t-=this.dotsItem.minDimension+s;let i=0;this.visibleActions[0].disableHide?t+=s:i-=s,this.visibleActions.filter(e=>
1e.disableHide).forEach(e=>t-=this.getActionMinDimension(e)+s);let n=this.getActionsToHide();if(1===n.length&&n[0].iconName)return 1;for(let e=0;e<n.length;e++)if((i+=this.getActionMinDimension(n[e])+s)>t)return e}fit(e){var t;if(e.availableSpace<=0)return;e.gap=null!=(t=e.gap)?t:0;let{availableSpace:s,gap:i}=e;this.dotsItem.visible=!1;let n=this.visibleActions,r=-1*e.gap,a=-1*e.gap;n.forEach(e=>{r+=this.getActionMinDimension(e)+i,a+=e.maxDimension+i}),s>=a?this.setActionsMode("large"):s<r?(this.setActionsMode("small"),this.hideItemsGreaterN(this.getVisibleItemsCount(e)),this.dotsItem.visible=!!this.hiddenItemsListModel.actions.length):this.updateItemMode(e.availableSpace,a)}createResponsivityManager(e){return new tr(e,this)}mergeUpdateOptions(e,t){let s=super.mergeUpdateOptions(e,t);return s.updateResponsivenessMode=s.updateResponsivenessMode|t.updateResponsivenessMode,s}raiseUpdate(e){super.raiseUpdate(e)}update(e){var t;super.update(e),e.updateResponsivenessMode&&(null==(t=this.responsivityManager)||t.update(e.updateResponsivenessMode==d.Hard))}initResponsivityManager(e){if(this.responsivityManager){if(this.responsivityManager.container==e)return;this.responsivityManager.dispose()}this.isInitialized=!1,this.responsivityManager=this.createResponsivityManager(e),this.responsivityManager.afterInitializeCallback=()=>{this.isInitialized=!0}}resetResponsivityManager(){this.responsivityManager&&(this.responsivityManager.dispose(),this.responsivityManager=void 0)}getRootStyle(){return this.isInitialized||this.isResponsivenessDisabled?void 0:{opacity:0}}setActionsMode(e){this.actions.forEach(t=>{"small"==e&&t.disableShrink?t.mode="large":t.mode=e})}dispose(){super.dispose(),this.dotsItem.data.dispose(),this.dotsItem.dispose(),this.resetResponsivityManager()}}V([e_()],tf.prototype,"isInitialized",void 0);class tb{constructor(){this.cancelQueue=[]}getMsFromRule(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}reflow(e){return e.offsetHeight}getAnimationsCount(e){let t="";return getComputedStyle&&(t=getComputedStyle(e).animationName),t&&"none"!=t?t.split(", ").length:0}getAnimationDuration(e){let t=getComputedStyle(e),s=t.animationDelay.split(", "),i=t.animationDuration.split(", "),n=0;for(let e=0;e<Math.max(i.length,s.length);e++)n=Math.max(n,this.getMsFromRule(i[e%i.length])+this.getMsFromRule(s[e%s.length]));return n}addCancelCallback(e){this.cancelQueue.push(e)}removeCancelCallback(e){this.cancelQueue.indexOf(e)>=0&&this.cancelQueue.splice(this.cancelQueue.indexOf(e),1)}onAnimationEnd(e,t,s){let i,n=this.getAnimationsCount(e),r=(s=!0)=>{t(s),clearTimeout(i),this.removeCancelCallback(r),e.removeEventListener("animationend",a)},a=e=>{e.target==e.currentTarget&&--n<=0&&r(!1)};n>0?(e.addEventListener("animationend",a),this.addCancelCallback(r),i=setTimeout(()=>{r(!1)},this.getAnimationDuration(e)+10)):t(!0)}afterAnimationRun(e,t){e&&t&&t.onAfterRunAnimation&&t.onAfterRunAnimation(e)}beforeAnimationRun(e,t){e&&t&&t.onBeforeRunAnimation&&t.onBeforeRunAnimation(e)}getCssClasses(e){return e.cssClass.replace(/\s+$/,"").split(/\s+/)}runAnimation(e,t,s){e&&(null==t?void 0:t.cssClass)?(this.reflow(e),this.getCssClasses(t).forEach(t=>{e.classList.add(t)}),this.onAnimationEnd(e,s,t)):s(!0)}clearHtmlElement(e,t){e&&t.cssClass&&this.getCssClasses(t).forEach(t=>{e.classList.remove(t)}),this.afterAnimationRun(e,t)}onNextRender(e,t=!1){if(!t&&i.isAvailable()){let t,s=()=>{e(!0),cancelAnimationFrame(t)};t=i.requestAnimationFrame(()=>{t=i.requestAnimationFrame(()=>{e(!1),this.removeCancelCallback(s)})}),this.addCancelCallback(s)}else e(!0)}cancel(){[].concat(this.cancelQueue).forEach(e=>e()),this.cancelQueue=[]}}class tw extends tb{onEnter(e){let t=e.getAnimatedElement(),s=e.getEnterOptions?e.getEnterOptions():{};this.beforeAnimationRun(t,s),this.runAnimation(t,s,()=>{this.clearHtmlElement(t,s)})}onLeave(e,t){let s=e.getAnimatedElement(),i=e.getLeaveOptions?e.getLeaveOptions():{};this.beforeAnimationRun(s,i),this.runAnimation(s,i,e=>{t(),this.onNextRender(()=>{this.clearHtmlElement(s,i)},e)})}}class tV extends tb{runGroupAnimation(e,t,s,i,n){let r={isAddingRunning:t.length>0,isDeletingRunning:s.length>0,isReorderingRunning:i.length>0},a=t.map(t=>e.getAnimatedElement(t)),o=t.map(t=>e.getEnterOptions?e.getEnterOptions(t,r):{}),l=s.map(t=>e.getAnimatedElement(t)),u=s.map(t=>e.getLeaveOptions?e.getLeaveOptions(t,r):{}),h=i.map(t=>e.getAnimatedElement(t.item)),d=i.map(t=>e.getReorderOptions?e.getReorderOptions(t.item,t.movedForward,r):{});t.forEach((e,t)=>{this.beforeAnimationRun(a[t],o[t])}
1),s.forEach((e,t)=>{this.beforeAnimationRun(l[t],u[t])}),i.forEach((e,t)=>{this.beforeAnimationRun(h[t],d[t])});let c=t.length+s.length+h.length,p=e=>{--c<=0&&(n&&n(),this.onNextRender(()=>{t.forEach((e,t)=>{this.clearHtmlElement(a[t],o[t])}),s.forEach((e,t)=>{this.clearHtmlElement(l[t],u[t])}),i.forEach((e,t)=>{this.clearHtmlElement(h[t],d[t])})},e))};t.forEach((e,t)=>{this.runAnimation(a[t],o[t],p)}),s.forEach((e,t)=>{this.runAnimation(l[t],u[t],p)}),i.forEach((e,t)=>{this.runAnimation(h[t],d[t],p)})}}class tx{constructor(e,t,s){this.animationOptions=e,this.update=t,this.getCurrentValue=s,this._debouncedSync=ta(e=>{this.cancelAnimations();try{this._sync(e)}catch(t){this.update(e)}})}onNextRender(e,t){let s=this.animationOptions.getRerenderEvent();if(s){let i=()=>{s.remove(n),this.cancelCallback=void 0},n=(s,n)=>{n.isCancel?t&&t():e(),i()};this.cancelCallback=()=>{t&&t(),i()},s.add(n)}else if(i.isAvailable()){let s=i.requestAnimationFrame(()=>{e(),this.cancelCallback=void 0});this.cancelCallback=()=>{t&&t(),cancelAnimationFrame(s),this.cancelCallback=void 0}}else throw Error("Can't get next render")}sync(e){this.animationOptions.isAnimationEnabled()?this._debouncedSync.run(e):(this.cancel(),this.update(e))}cancel(){this._debouncedSync.cancel(),this.cancelAnimations()}cancelAnimations(){this.cancelCallback&&this.cancelCallback(),this.animation.cancel()}}class tI extends tx{constructor(){super(...arguments),this.animation=new tw}_sync(e){e!==this.getCurrentValue()?e?(this.onNextRender(()=>{this.animation.onEnter(this.animationOptions)}),this.update(e)):this.animation.onLeave(this.animationOptions,()=>{this.update(e)}):this.update(e)}}class tE extends tx{constructor(){super(...arguments),this.animation=new tV}_sync(e){var t,s,i,n;let r,a,o,l,u,h,d,c,p,g,m,v,C;e=[].concat(e);let y=[].concat(this.getCurrentValue()),f=null==(t=this.animationOptions.allowSyncRemovalAddition)||t,b=(i=e,n=null!=(s=this.animationOptions.getKey)?s:e=>e,r=new Map,a=new Map,o=new Map,l=new Map,y.forEach(e=>{let t=n(e);if(r.has(t))throw Error("keys must be unique");r.set(n(e),e)}),i.forEach(e=>{let t=n(e);if(a.has(t))throw Error("keys must be unique");a.set(t,e)}),u=[],h=[],a.forEach((e,t)=>{r.has(t)?o.set(t,o.size):u.push(e)}),r.forEach((e,t)=>{a.has(t)?l.set(t,l.size):h.push(e)}),d=[],o.forEach((e,t)=>{let s=l.get(t),i=a.get(t);s!==e&&d.push({item:i,movedForward:s<e})}),c=Array(y.length),p=0,g=Array.from(o.keys()),y.forEach((e,t)=>{o.has(n(e))?(c[t]=a.get(g[p]),p++):c[t]=e}),m=new Map,v=[],c.forEach(e=>{let t=n(e);a.has(t)?v.length>0&&(m.set(t,v),v=[]):v.push(e)}),C=[],a.forEach((e,t)=>{m.has(t)&&m.get(t).forEach(e=>{C.push(e)}),C.push(e)}),v.forEach(e=>{C.push(e)}),{reorderedItems:d,deletedItems:h,addedItems:u,mergedItems:C});!f&&(b.reorderedItems.length>0||b.addedItems.length>0)&&(b.deletedItems=[],b.mergedItems=e),this.animationOptions.onCompareArrays&&this.animationOptions.onCompareArrays(b);let{addedItems:w,reorderedItems:V,deletedItems:x,mergedItems:I}=b,E=()=>{this.animation.runGroupAnimation(this.animationOptions,w,x,V,()=>{x.length>0&&this.update(e)})};[w,x,V].some(e=>e.length>0)?x.length<=0||V.length>0||w.length>0?(this.onNextRender(E,()=>{this.update(e)}),this.update(I)):E():this.update(e)}}class tS extends tx{constructor(e,t,s,i){super(e,t,s),this.mergeValues=i,this.animation=new tV}_sync(e){let t=[].concat(this.getCurrentValue());if(t[0]!==e[0]){let s=this.mergeValues?this.mergeValues(e,t):[].concat(t,e);this.onNextRender(()=>{this.animation.runGroupAnimation(this.animationOptions,e,t,[],()=>{this.update(e)})},()=>this.update(e)),this.update(s,!0)}else this.update(e)}}function tP(e,t,s="--animation-"){var i;e.__sv_created_properties=null!=(i=e.__sv_created_properties)?i:[],Object.keys(t).forEach(i=>{let n=`${s}${i.split(/\.?(?=[A-Z])/).join("-").toLowerCase()}`;e.style.setProperty(n,t[i]),e.__sv_created_properties.push(n)})}function tR(e){tP(e,function(e){if(n.isAvailable()){let{paddingTop:t,paddingBottom:s,borderTopWidth:i,borderBottomWidth:r,marginTop:a,marginBottom:o,boxSizing:l}=n.getComputedStyle(e),u=e.offsetHeight+"px";if("content-box"==l){let n=e.offsetHeight;
1[r,i,s,t].forEach(e=>{n-=parseFloat(e)}),u=n+"px"}return{paddingTop:t,paddingBottom:s,borderTopWidth:i,borderBottomWidth:r,marginTop:a,marginBottom:o,heightFrom:"0px",heightTo:u}}}(e))}function tT(e){Array.isArray(e.__sv_created_properties)&&(e.__sv_created_properties.forEach(t=>{e.style.removeProperty(t)}),delete e.__sv_created_properties)}class tA extends ew{constructor(){super(),this.createLocTitleProperty()}createLocTitleProperty(){return this.createLocalizableString("title",this,!0)}getAllowLineBreaks(e){var t;return(null==(t=H.findProperty(this.getType(),e))?void 0:t.type)==="text"}get title(){return this.getLocalizableStringText("title",this.getDefaultTitleValue())}set title(e){this.setTitleValue(e)}get locTitle(){return this.getLocalizableString("title")}get locRenderedTitle(){return this.locTitle}getDefaultTitleValue(){}setTitleValue(e){this.setLocalizableStringText("title",e)}get hasDescription(){return this.getPropertyValue("hasDescription",void 0,()=>this.calcDescriptionVisibility())}set hasDescription(e){this.setPropertyValue("hasDescription",e)}calcDescriptionVisibility(){let e=this.description,t=!1;if(this.isDesignMode){let e=H.findProperty(this.getType(),"description");t=!!(null==e?void 0:e.placeholder)}return!!e||t&&this.isDesignMode}resetDescriptionVisibility(){this.resetPropertyValue("hasDescription")}get locDescription(){return this.getLocalizableString("description")}get titleTagName(){let e=this.getDefaultTitleTagName(),t=this.getSurvey();return t?t.getElementTitleTagName(this,e):e}getDefaultTitleTagName(){return p.titleTags[this.getType()]}get hasTitle(){return this.title.length>0}get hasTitleActions(){return!1}get hasTitleEvents(){return this.hasTitleActions}getTitleToolbar(){return null}getTitleOwner(){}get isTitleOwner(){return!!this.getTitleOwner()}get isTitleRenderedAsString(){return this.getIsTitleRenderedAsString()}toggleState(){}get cssClasses(){return{}}get cssTitle(){return""}get ariaTitleId(){}get ariaDescriptionId(){}get titleTabIndex(){}get titleAriaExpanded(){}get titleAriaRole(){}get ariaLabel(){return this.locTitle.renderedHtml}get titleAriaLabel(){return this.ariaLabel}getIsTitleRenderedAsString(){return!this.isTitleOwner}}V([e_({localizable:{markdown:!0},onSet:(e,t)=>{t.resetDescriptionVisibility()}})],tA.prototype,"description",void 0);class tL extends tA{static getProgressInfoByElements(e,t){let s=ew.createProgressInfo();for(let t=0;t<e.length;t++){if(!e[t].isVisible)continue;let i=e[t].getProgressInfo();s.questionCount+=i.questionCount,s.answeredQuestionCount+=i.answeredQuestionCount,s.requiredQuestionCount+=i.requiredQuestionCount,s.requiredAnsweredQuestionCount+=i.requiredAnsweredQuestionCount}return t&&s.questionCount>0&&(0==s.requiredQuestionCount&&(s.requiredQuestionCount=1),s.answeredQuestionCount>0&&(s.requiredAnsweredQuestionCount=1)),s}static IsNeedScrollIntoView(e,t,s){let n=s?-1:e.getBoundingClientRect().top,r=n<0,a=-1;if(!r&&t&&(r=(a=e.getBoundingClientRect().left)<0),!r&&i.isAvailable()){let e=i.getInnerHeight();if(!(r=e>0&&e<n)&&t){let e=i.getInnerWidth();r=e>0&&e<a}}return r}static ScrollIntoView(e,t,s){if(e.scrollIntoView(t),"function"==typeof s){let t=null,n=0,r=()=>{let i=e.getBoundingClientRect().top;if(i===t){if(n++>2)return void s()}else t=i,n=0;requestAnimationFrame(r)};i.requestAnimationFrame(r)}}static ScrollElementToTop(e,t,s,i){return tL.ScrollElementToViewCore(e,!1,t,s,i)}static ScrollElementToViewCore(e,t,s,i,n){if(!e||!e.scrollIntoView)return n&&n(),!1;let r=tL.IsNeedScrollIntoView(e,t,s);return r?tL.ScrollIntoView(e,i,n):n&&n(),r}static GetFirstNonTextElement(e,t=!1){if(!e||!e.length||0==e.length)return null;if(t){let t=e[0];"#text"===t.nodeName&&(t.data=""),"#text"===(t=e[e.length-1]).nodeName&&(t.data="")}for(let t=0;t<e.length;t++)if("#text"!=e[t].nodeName&&"#comment"!=e[t].nodeName)return e[t];return null}static FocusElement(e,t,s){if(!e||!n.isAvailable())return!1;let i=!t&&tL.focusElementCore(e,s);return i||setTimeout(()=>{tL.focusElementCore(e,s)},t?100:10),i}static focusElementCore(e,t){let{root:s}=p.environment;if(!s&&!t)return!1;let i=t?t.querySelector(`#${CSS.escape(e)}`):s.getElementById(e);return!!i&&!i.disabled&&"none"!==i.style.display&&null!==i.offsetParent&&(tL.ScrollElementToViewCore(i,!0,!1),i.focus(),!0)}get effectiveColSpan(){let e=this.getPropertyValueWithoutDefault("effectiveColSpan");return void 0!==e?e:(this.setRootStyle(),this.getPropertyValue("effectiveColSpan"))}constructor(e){super(),this.selectedElementInDesignValue=this,this.parentQuestionValue=null,this.isContentElement=!1,this.isEditableTemplateElement=!1,this.isInteractiveDesignElement=!0,this._renderedIsExpanded=!0,this._isAnimatingCollapseExpand=!1,this.animationCollapsed=new tI(this.getExpandCollapseAnimationOptions(),e=>{this._renderedIsExpanded=e,this.animationAllowed&&(e?this.isAnimatingCollapseExpand=!0:this.updateElementCss(!1))},()=>this.renderedIsExpanded),this.onAfterRenderElement=this.addEvent(),this.setPropertyValueDirectly("name",this.getValidName(e))}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),["minWidth","maxWidth","renderWidth","allowRootStyle","parent"].indexOf(e)>-1&&this.updateRootStyle(),"state"===e&&(this.updateElementCss(!1),this.notifyStateChanged(t),this.stateChangedCallback&&this.stateChangedCallback()),"isReadOnly"===e&&this.onReadOnlyChanged(),"errors"===e&&this.updateVisibleErrors(),"isSingleInRow"===e&&this.updateElementCss(!1),"effectiveColSpan"===e&&(this.colSpan=s)}isPropertyStoredInHash(e){return"bindings"!==e}getSkeletonComponentNameCore(){return this.survey?this.survey.getSkeletonComponentName(this):"sv-skeleton"}canUpdateValueOnVisibleChanged(){return!this.isLoadingFromJson&&!!this.survey&&
vendor: 4,980 bytes, line 1
1!this.survey.isSettingData()}get parentQuestion(){return this.parentQuestionValue}setParentQuestion(e){this.parentQuestionValue=e,this.onParentQuestionChanged()}onParentQuestionChanged(){}getPanelInDesignMode(){return null}updateElementVisibility(){this.setPropertyValue("isVisible",this.isVisible)}get skeletonComponentName(){return this.getSkeletonComponentNameCore()}get state(){return this.getPropertyValue("state")}set state(e){this.setPropertyValue("state",e),this.renderedIsExpanded=!this.isCollapsed}notifyStateChanged(e){this.survey&&this.lifecycleCallbacks.elementContentVisibilityChanged(this)}get isCollapsed(){return"collapsed"===this.state&&!this.isDesignMode&&!this.isSingleInputMode}get isSingleInputMode(){var e;return null==(e=this.singleInput)?void 0:e.isSingleVisibleInput}get isExpanded(){return"expanded"===this.state&&!this.isSingleInputMode}collapse(){this.isDesignMode||(this.state="collapsed")}expand(){this.state="expanded"}toggleState(){return this.isCollapsed?(this.expand(),!0):!this.isExpanded||(this.collapse(),!1)}get hasStateButton(){return this.isExpanded||this.isCollapsed}get uiState(){return this.getUIState()}set uiState(e){this.setUIState(e)}getUIState(){if("default"!==this.state)return{collapsed:"collapsed"===this.state}}setUIState(e){e&&void 0!==e.collapsed&&(this.state=e.collapsed?"collapsed":"expanded")}get shortcutText(){return this.title||this.name}getTitleToolbar(){return this.titleToolbarValue||(this.titleToolbarValue=this.createActionContainer(!0),this.titleToolbarValue.locOwner=this,this.titleToolbarValue.containerCss=(this.isPanel?this.cssClasses.panel.titleBar:this.cssClasses.titleBar)||"sv-action-title-bar",this.titleToolbarValue.setItems(this.getTitleActions()),this.titleToolbarValue.flushUpdates()),this.titleToolbarValue}createActionContainer(e){let t=e?new tf:new to;return this.survey&&this.survey.getCss().actionBar&&(t.cssClasses=this.survey.getCss().actionBar),t}get titleActions(){return this.getArrayPropertyValue("titleActions")}getTitleActions(){return this.isTitleActionRequested||(this.updateTitleActions(),this.isTitleActionRequested=!0),this.titleActions}getDefaultTitleActions(){return[]}updateTitleActions(){let e=this.getDefaultTitleActions();this.survey&&(e=this.titleSettings.getUpdatedElementTitleActions(this,e)),this.setArrayPropertyValue("titleActions",e)}locStrsChanged(){super.locStrsChanged(),this.titleToolbarValue&&this.titleToolbarValue.locStrsChanged()}get hasTitleActions(){return this.getTitleActions().length>0}get hasTitleEvents(){return void 0!==this.state&&"default"!==this.state}get titleTabIndex(){return this.isPage||"default"===this.state?void 0:0}get titleAriaExpanded(){if(!this.isPage&&"default"!==this.state)return"expanded"===this.state?"true":"false"}get titleAriaRole(){if(!this.isPage&&"default"!==this.state)return"button"}setSurveyImpl(e,t){this.surveyImplValue=e,this.surveyImplValue?(this.surveyDataValue=this.surveyImplValue.getSurveyData(),this.setSurveyCore(this.surveyImplValue.getSurvey()),this.textProcessorValue=this.createTextProcessor(),this.onSetData()):(this.setSurveyCore(null),this.surveyDataValue=null,this.textProcessorValue=null),this.survey&&(this.resetDescriptionVisibility(),this.clearCssClasses()),this.blockAnimations(),this.renderedIsExpanded=!this.isCollapsed,this.releaseAnimations()}getValueGetterContext(){let e=this.data;return e?e.getValueGetterContext():super.getValueGetterContext()}createTextProcessor(){return this.surveyImplValue.getTextProcessor()}canRunConditions(){return super.canRunConditions()&&!!this.data}getDataFilteredProperties(){var e=this.data?this.data.getFilteredProperties():{};return e.question=this,e}get surveyImpl(){return this.surveyImplValue}__setData(e){this.surveyDataValue=e}get data(){return this.surveyDataValue}get survey(){return this.getSurvey()}get titleSettings(){return this.survey}get lifecycleCallbacks(){return this.survey}get cssCallbacks(){return this.survey}get singleInput(){return this.survey}getSurvey(e=!1){return this.surveyValue||this.surveyImplValue&&this.setSurveyCore(this.surveyImplValue.getSurvey()),this.surveyValue}setSurveyCore(e){this.surveyValue=e,this.surveyChangedCallback&&this.surveyChangedCallback()}get skeletonHeight(){let e;return this.survey&&this.survey.skeletonHeight&&(e=this.survey.skeletonHeight+"px"),e}get isInternal(){return this.isContentElement}get areInvisibleElementsShowing(){let e=this.parentQuestion;return(!e||!1!==e.areInvisibleElementsShowing)&&!!this.survey&&this.survey.areInvisibleElementsShowing&&(!this.isDesignMode||!this.isContentElement)}get isVisible(){return!0}get isReadOnly(){return this.readOnly}get readOnly(){return this.getPropertyValue("readOnly")}set readOnly(e){this.readOnly!=e&&(this.setPropertyValue("readOnly",e),this.isLoadingFromJson||this.setPropertyValue("isReadOnly",this.isReadOnly))}onReadOnlyChanged(){this.readOnlyChangedCallback&&this.readOnlyChangedCallback()}get css(){return this.survey?this.survey.getCss():{}}
1get cssClassesValue(){return this.getPropertyValue("cssClassesValue",void 0,()=>this.createCssClassesValue())}createCssClassesValue(){let e=this.isCalculatingCssClasses;this.isCalculatingCssClasses=!0;let t=this.calcCssClasses(this.css);return e||this.onCalcCssClasses(t),this.updateElementCssCore(t),this.isCalculatingCssClasses=!1,t}onCalcCssClasses(e){}get cssClasses(){return this.survey?this.cssClassesValue:this.calcCssClasses(this.css)}get cssTitleNumber(){let e=this.cssClasses;return e.number?e.number:e.panel?e.panel.number:void 0}get cssRequiredMark(){let e=this.cssClasses;return e.requiredMark||e.panel&&e.panel.requiredMark}getCssTitleExpandableSvg(){return"default"===this.state||this.isSingleInputMode?null:this.cssClasses.titleExpandableSvg}calcCssClasses(e){}updateElementCssCore(e){}get cssError(){return""}updateElementCss(e){this.clearCssClasses()}clearCssClasses(){this.resetPropertyValue("cssClassesValue")}getIsLoadingFromJson(){return!!super.getIsLoadingFromJson()||!!this.surveyValue&&this.surveyValue.isLoadingFromJson}get name(){return this.getPropertyValue("name","")}set name(e){var t=this.name;this.setPropertyValue("name",this.getValidName(e)),!this.isLoadingFromJson&&t&&this.onNameChanged(t)}getValidName(e){if(e){e=e.trim();let t=p.itemValueSeparator;t&&e.indexOf(t)>-1&&(e=e.replace(t,""))}return e}onNameChanged(e){}updateBindingValue(e,t){this.data&&!this.isTwoValueEquals(t,this.data.getValue(e))&&this.data.setValue(e,t,!1)}get errors(){return this.getArrayPropertyValue("errors")}set errors(e){this.setArrayPropertyValue("errors",e)}get renderedErrors(){return this.getArrayPropertyValue("renderedErrors")}set renderedErrors(e){this.setArrayPropertyValue("renderedErrors",e)}calcRenderedErrors(){let e=this.currentNotificationType;return this.errors.filter(t=>t.visible&&t.notificationType===e)}get currentNotificationType(){return this.getPropertyValue("currentNotificationType",void 0,()=>this.calcCurrentNotificationType())}calcCurrentNotificationType(){let e="",t=["info","warning","error"];for(let s=0;s<this.errors.length;s++){let i=this.errors[s];if(!i.visible)continue;let n=i.notificationType;if(!e){e=n;continue}t.indexOf(n)>t.indexOf(e)&&(e=n)}return e}updateVisibleErrors(){this.resetPropertyValue("currentNotificationType");for(var e=0,t=0;t<this.errors.length;t++)this.errors[t].visible&&e++;this.hasVisibleErrors=e>0,this.renderedErrors=this.calcRenderedErrors()}get containsErrors(){return this.getPropertyValue("containsErrors",!1)}updateContainsErrors(){this.setPropertyValue("containsErrors",this.getContainsErrors())}getContainsErrors(){return this.errors.length>0}get selectedElementInDesign(){return this.selectedElementInDesignValue}set selectedElementInDesign(e){this.selectedElementInDesignValue=e}updateCustomWidgets(){}onSurveyLoad(){}get wasRendered(){return!!this.wasRenderedValue}resetWasRendered(){this.wasRenderedValue=!1}onFirstRendering(){this.wasRendered||this.isLoadingFromJson||(this.wasRenderedValue=!0,this.onFirstRenderingCore())}onFirstRenderingCore(){}endLoadingFromJson(){super.endLoadingFromJson(),this.survey||this.onSurveyLoad()}setVisibleIndex(e){return 0}getPageVisibleIndex(){return -1}getStartIndex(){return this.parent?this.parent.getQuestionStartIndex():this.survey?this.titleSettings.getQuestionStartIndex(this.getPageVisibleIndex()):""}delete(e){}getLocale(){return this.survey?this.survey.getLocale():this.locOwner?this.locOwner.getLocale():""}
1getMarkdownHtml(e,t,s){return this.survey?this.survey.getSurveyMarkdownHtml(this,e,t,s):this.locOwner?this.locOwner.getMarkdownHtml(e,t,s):void 0}getRenderer(e,t){return this.survey&&"function"==typeof this.survey.getRendererForString?this.survey.getRendererForString(this,e,t):this.locOwner&&"function"==typeof this.locOwner.getRenderer?this.locOwner.getRenderer(e):null}getRendererContext(e,t){return this.survey&&"function"==typeof this.survey.getRendererContextForString?this.survey.getRendererContextForString(this,e,t):this.locOwner&&"function"==typeof this.locOwner.getRendererContext?this.locOwner.getRendererContext(e):e}getProcessedText(e,t){return this.isLoadingFromJson?e:this.textProcessor?this.textProcessor.processTextEx({text:e,returnDisplayValue:this.getUseDisplayValuesInDynamicTexts(),context:t||this,doEncoding:!1}).text:this.locOwner?this.locOwner.getProcessedText(e,t):e}getUseDisplayValuesInDynamicTexts(){return!0}removeSelfFromList(e){if(!e||!Array.isArray(e))return;let t=e.indexOf(this);t>-1&&e.splice(t,1)}get textProcessor(){return this.textProcessorValue}getProcessedHtml(e){return e&&this.textProcessor?this.textProcessor.processText(e,!0):e}onSetData(){}get parent(){return this.getPropertyValue("parent",null)}set parent(e){this.setPropertyValue("parent",e)}getPage(e){for(;e&&e.parent;)e=e.parent;return e&&e.isPage?e:null}moveToBase(e,t,s=null){if(!t)return!1;e.removeElement(this);let i=-1;return w.isNumber(s)&&(i=parseInt(s)),-1==i&&s&&s.getType&&(i=t.indexOf(s)),t.addElement(this,i),!0}setPage(e,t){let s=this.getPage(e);this.prevSurvey=this.survey,"string"==typeof t&&this.getSurvey().pages.forEach(e=>{t===e.name&&(t=e)}),s!==t&&(e&&e.removeElement(this),t&&t.addElement(this,-1),this.prevSurvey=void 0)}getSearchableLocKeys(e){e.push("title"),e.push("description")}get hasParent(){return this.parent&&!this.parent.isPage||void 0===this.parent}shouldAddRunnerStyles(){return!this.isDesignMode}get isCompact(){return this.survey&&this.survey.isCompact}canHaveFrameStyles(){var e;return(null==(e=this.singleInput)?void 0:e.currentSingleElement)===this||!0!==this.isInternalNested&&void 0!==this.parent&&(!this.hasParent||this.parent&&this.parent.showPanelAsPage)}
1getHasFrameV2(){return this.shouldAddRunnerStyles()&&this.canHaveFrameStyles()}getIsNested(){return this.shouldAddRunnerStyles()&&!this.canHaveFrameStyles()}getCssRoot(e){let t=!!this.isCollapsed||!!this.isExpanded;return new eX().append(e.withFrame,this.getHasFrameV2()&&!this.isCompact).append(e.compact,this.isCompact&&this.getHasFrameV2()).append(e.collapsed,!!this.isCollapsed).append(e.expandableAnimating,t&&this.isAnimatingCollapseExpand).append(e.expanded,!!this.isExpanded&&this.renderedIsExpanded).append(e.expandable,t).append(e.nested,this.getIsNested()).toString()}getRootStyle(){let e={};return this.paddingLeft&&(e["--sv-element-add-padding-left"]=this.paddingLeft),this.paddingRight&&(e["--sv-element-add-padding-right"]=this.paddingRight),e}get paddingLeft(){return this.getPropertyValue("paddingLeft",void 0,()=>this.calcPaddingLeft())}calcPaddingLeft(){return""}get paddingRight(){return this.getPropertyValue("paddingRight",void 0,()=>this.calcPaddingRight())}set paddingRight(e){this.setPropertyValue("paddingRight",e)}calcPaddingRight(){return""}resetIndents(){this.resetPropertyValue("paddingLeft"),this.resetPropertyValue("paddingRight")}get rootStyle(){return this.getPropertyValue("rootStyle",void 0,()=>this.calcRootStyle())}set rootStyle(e){this.setPropertyValue("rootStyle",e)}updateRootStyle(){this.getPropertyValueWithoutDefault("rootStyle")?this.setRootStyle():this.resetPropertyValue("effectiveColSpan")}setRootStyle(){this.rootStyle=this.calcRootStyle()}calcRootStyle(){let e,t={};if(this.parent&&(e=this.parent.getColumsForElement(this).reduce((e,t)=>t.effectiveWidth+e,0))&&100!==e&&(t.flexGrow=1,t.flexShrink=0,t.flexBasis=e+"%",t.minWidth=void 0,t.maxWidth=this.maxWidth),0==Object.keys(t).length){let e=""+this.minWidth;if(e&&"auto"!=e){if(-1!=e.indexOf("px")&&this.survey){let t=parseFloat(e=e.replace("px",""));isNaN(t)||(e=""+(e=t*this.survey.widthScale/100)+"px")}e="min(100%, "+e+")"}this.allowRootStyle&&this.renderWidth&&(t.flexGrow=1,t.flexShrink=1,t.flexBasis=this.renderWidth,t.minWidth=e,t.maxWidth=this.maxWidth)}return t}isContainsSelection(e){let t,s=n.getDocument();if(n.isAvailable()&&s&&s.selection)t=s.selection.createRange().parentElement();else{var r=i.getSelection();if(r&&r.rangeCount>0){let e=r.getRangeAt(0);e.startOffset!==e.endOffset&&(t=e.startContainer.parentNode)}}return t==e}get clickTitleFunction(){if(this.needClickTitleFunction())return e=>{if(!(e&&this.isContainsSelection(e.target)))return this.processTitleClick()}}needClickTitleFunction(){return"default"!==this.state}processTitleClick(){"default"!==this.state&&this.toggleState()}get hasAdditionalTitleToolbar(){return!1}get additionalTitleToolbar(){return this.getAdditionalTitleToolbar()}getAdditionalTitleToolbar(){return null}getCssTitle(e){if(!e)return"";let t="default"!==this.state;return new eX().append(e.title).append(e.titleNumInline,(this.no||"").length>4||t).append(e.titleExpandable,t).append(e.titleExpanded,this.isExpanded).append(e.titleCollapsed,this.isCollapsed).append(e.titleDisabled,this.isDisabledStyle).append(e.titleReadOnly,this.isReadOnly).append(e.titleOnError,this.containsErrors).toString()}get isDisabledStyle(){return this.getIsDisableAndReadOnlyStyles(!1)[1]}get isReadOnlyStyle(){return this.getIsDisableAndReadOnlyStyles(!1)[0]}getIsDisableAndReadOnlyStyles(e){let t=this.isPreviewStyle;return[(e||this.isReadOnly)&&!t,!1]}get isPreviewStyle(){return!!this.survey&&"preview"===this.survey.state}localeChanged(){super.localeChanged(),this.resetDescriptionVisibility(),this.errors.length>0&&this.errors.forEach(e=>{e.updateText()})}setWrapperElement(e){this.wrapperElement=e}getWrapperElement(){return this.wrapperElement}set isAnimatingCollapseExpand(e){e!==this._isAnimatingCollapseExpand&&(this._isAnimatingCollapseExpand=e,this.updateElementCss(!1))}get isAnimatingCollapseExpand(){return this._isAnimatingCollapseExpand||this._renderedIsExpanded!=this.isExpanded}onElementExpanded(e){}getExpandCollapseAnimationOptions(){let e=e=>{this.isAnimatingCollapseExpand=!0,tR(e)},t=e=>{this.isAnimatingCollapseExpand=!1,tT(e)};return{getRerenderEvent:()=>this.onElementRerendered,getEnterOptions:()=>
1({cssClass:(this.isPanel?this.cssClasses.panel:this.cssClasses).contentEnter,onBeforeRunAnimation:e,onAfterRunAnimation:e=>{t(e),this.onElementExpanded(!0)}}),getLeaveOptions:()=>({cssClass:(this.isPanel?this.cssClasses.panel:this.cssClasses).contentLeave,onBeforeRunAnimation:e,onAfterRunAnimation:t}),getAnimatedElement:()=>{var e;let t=this.isPanel?this.cssClasses.panel:this.cssClasses;if(t.content){let s=e8(t.content);if(s)return null==(e=this.getWrapperElement())?void 0:e.querySelector(`:scope ${s}`)}},isAnimationEnabled:()=>this.isExpandCollapseAnimationEnabled}}get isExpandCollapseAnimationEnabled(){return this.animationAllowed&&!this.isDesignMode}set renderedIsExpanded(e){let t=this._renderedIsExpanded;this.animationCollapsed.sync(e),this.isExpandCollapseAnimationEnabled||t||!this.renderedIsExpanded||this.onElementExpanded(!1)}get renderedIsExpanded(){return!!this._renderedIsExpanded}getIsAnimationAllowed(){return super.getIsAnimationAllowed()&&!!this.survey&&!this.survey.isEndLoadingFromJson}afterRenderCore(e){this.onAfterRenderElement.fire(this,{htmlElement:e})}dispose(){super.dispose(),this.titleToolbarValue&&this.titleToolbarValue.dispose()}get randomSeed(){var e;let t=(null==(e=this.getOwner())?void 0:e.randomSeed)||0,s=this.getType()+this.name;for(let e=0;e<s.length;e++)t=(t<<5)-t+s.charCodeAt(e)|0;return t}randomSeedChanged(){}}V([e_({defaultValue:1})],tL.prototype,"colSpan",void 0),V([e_({defaultValue:!1})],tL.prototype,"hasVisibleErrors",void 0),V([e_({defaultValue:!0})],tL.prototype,"isSingleInRow",void 0),V([e_({defaultValue:""})],tL.prototype,"width",void 0),V([e_()],tL.prototype,"minWidth",void 0),V([e_()],tL.prototype,"maxWidth",void 0),V([e_({defaultValue:""})],tL.prototype,"renderWidth",void 0),V([e_()],tL.prototype,"indent",void 0),V([e_({defaultValue:0})],tL.prototype,"rightIndent",void 0),V([e_({defaultValue:!0})],tL.prototype,"allowRootStyle",void 0),V([e_()],tL.prototype,"_renderedIsExpanded",void 0);class tD{constructor(e,t,s=100){this._elements=e,this._renderedHandler=t,this._elementsToRenderCount=0,this._elementsToRenderTimer=void 0,this._elementRenderedHandler=(e,t)=>{var s;null==(s=e.onAfterRenderElement)||s.remove(this._elementRenderedHandler),this._elementsToRenderCount--,this._elementsToRenderCount<=0&&this.visibleElementsRendered()},this._elements.forEach(e=>{e.onAfterRenderElement&&(e.onAfterRenderElement.add(this._elementRenderedHandler),this._elementsToRenderCount++)}),this._elementsToRenderCount>0?this._elementsToRenderTimer=setTimeout(()=>{this._elementsToRenderCount>0&&this.visibleElementsRendered()},s):this.visibleElementsRendered()}stopWaitingForElementsRendering(){this._elementsToRenderTimer&&(clearTimeout(this._elementsToRenderTimer),this._elementsToRenderTimer=void 0),this._elements.forEach(e=>{var t;null==(t=e.onAfterRenderElement)||t.remove(this._elementRenderedHandler)}),this._elementsToRenderCount=0}visibleElementsRendered(){let e=this._renderedHandler;this.dispose(),"function"==typeof e&&e()}dispose(){this.stopWaitingForElementsRendering(),this._elements=void 0,this._renderedHandler=void 0}}class tO{constructor(e,t){this.name=e,this.widgetJson=t,this.htmlTemplate=t.htmlTemplate?t.htmlTemplate:""}afterRender(e,t){this.widgetJson.afterRender&&(e.localeChangedCallback=()=>{this.widgetJson.willUnmount&&this.widgetJson.willUnmount(e,t),this.widgetJson.afterRender(e,t)},this.widgetJson.afterRender(e,t))}willUnmount(e,t){this.widgetJson.willUnmount&&this.widgetJson.willUnmount(e,t)}getDisplayValue(e,t){return this.widgetJson.getDisplayValue?this.widgetJson.getDisplayValue(e,t):null}validate(e){if(this.widgetJson.validate)return this.widgetJson.validate(e)}isFit(e){return!!this.isLibraryLoaded()&&!!this.widgetJson.isFit&&this.widgetJson.isFit(e)}get canShowInToolbox(){return!1!==this.widgetJson.showInToolbox&&"customtype"==tN.Instance.getActivatedBy(this.name)&&(!this.widgetJson.widgetIsLoaded||this.widgetJson.widgetIsLoaded())}get showInToolbox(){return!1!==this.widgetJson.showInToolbox}set showInToolbox(e){this.widgetJson.showInToolbox=e}init(){this.widgetJson.init&&this.widgetJson.init()}activatedByChanged(e){this.isLibraryLoaded()&&this.widgetJson.activatedByChanged&&this.widgetJson.activatedByChanged(e)}isLibraryLoaded(){return!this.widgetJson.widgetIsLoaded||!0==this.widgetJson.widgetIsLoaded()}get isDefaultRender(){return this.widgetJson.isDefaultRender}get pdfQuestionType(){return this.widgetJson.pdfQuestionType}get pdfRender(){return this.widgetJson.pdfRender}}class tN{constructor(){this.widgetsValues=[],this.widgetsActivatedBy={},this.onCustomWidgetAdded=new S}get widgets(){return this.widgetsValues}add(e,t="property"){this.addCustomWidget(e,t)}addCustomWidget(e,t="property"){var s=e.name;s||(s="widget_"+this.widgets.length+"1");var i=new tO(s,e);return this.widgetsValues.push(i),i.init(),this.widgetsActivatedBy[s]=t,i.activatedByChanged(t),this.onCustomWidgetAdded.fire(i,null),i}getActivatedBy(e){return this.widgetsActivatedBy[e]||"property"}setActivatedBy(e,t){if(e&&t){var s=this.getCustomWidgetByName(e);
1s&&(this.widgetsActivatedBy[e]=t,s.activatedByChanged(t))}}clear(){this.widgetsValues=[]}getCustomWidgetByName(e){for(var t=0;t<this.widgets.length;t++)if(this.widgets[t].name==e)return this.widgets[t];return null}getCustomWidget(e){for(var t=0;t<this.widgetsValues.length;t++)if(this.widgetsValues[t].isFit(e))return this.widgetsValues[t];return null}}tN.Instance=new tN;class tM{constructor(){this.renderersHash={},this.defaultHash={}}unregisterRenderer(e,t){delete this.renderersHash[e][t],this.defaultHash[e]===t&&delete this.defaultHash[e]}registerRenderer(e,t,s,i=!1){this.renderersHash[e]||(this.renderersHash[e]={}),this.renderersHash[e][t]=s,i&&(this.defaultHash[e]=t)}getRenderer(e,t){let s=this.renderersHash[e];if(s){if(t&&s[t])return s[t];let i=this.defaultHash[e];if(i&&s[i])return s[i]}return"default"}getRendererByQuestion(e){return this.getRenderer(e.getType(),e.renderAs)}clear(){this.renderersHash={}}}function tk(e,t){if(!e)return;t||(t=e=>n.getComputedStyle(e));let s=parseFloat(e.getAttribute("rows")||"2"),i=t(e),r=i.overflowY,a=parseFloat(i.lineHeight);if(e.scrollHeight){let t=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth)+parseFloat(i.paddingBottom)+parseFloat(i.paddingTop),n=(e.scrollHeight-t)/a,o=s=>{e.style.height=s*a+t+"px"};for(o(n),e.style.overflowY="hidden";e.scrollHeight<=e.offsetHeight&&n>s;)o(--n);e.style.overflowY=r,e.scrollHeight>e.offsetHeight&&o(++n)}else e.style.height="auto"}tM.Instance=new tM;class tq{updateElement(){this.element&&this.autoGrow&&setTimeout(()=>tk(this.element),1)}constructor(e){this.options=e,this.onPropertyChangedCallback=()=>{this.element&&(this.element.value=this.getTextValue(),this.updateElement())},this.question.registerFunctionOnPropertiesValueChanged(this.options.propertyNames,this.onPropertyChangedCallback,"__textarea")}setElement(e){e&&(this.element=e,this.updateElement())}resetElement(){this.element=void 0}getTextValue(){return this.options.getTextValue&&this.options.getTextValue()||""}onTextAreaChange(e){this.options.onTextAreaChange&&this.options.onTextAreaChange(e)}onTextAreaInput(e){this.options.onTextAreaInput&&this.options.onTextAreaInput(e),this.element&&this.autoGrow&&tk(this.element)}onTextAreaKeyDown(e){this.options.onTextAreaKeyDown&&this.options.onTextAreaKeyDown(e)}onTextAreaBlur(e){this.onTextAreaChange(e),this.options.onTextAreaBlur&&this.options.onTextAreaBlur(e)}onTextAreaFocus(e){var t;this.options.onTextAreaFocus&&this.options.onTextAreaFocus(e),this.isReadOnlyAttr&&(null==(t=null==e?void 0:e.target)||t.select())}get question(){return this.options.question}get id(){return this.options.id()}get placeholder(){return this.options.placeholder()}get className(){return this.options.className()}get maxLength(){if(this.options.maxLength)return this.options.maxLength()}get autoGrow(){if(this.options.autoGrow)return this.options.autoGrow()}get rows(){if(this.options.rows)return this.options.rows()}get cols(){if(this.options.cols)return this.options.cols()}get isDisabledAttr(){return this.options.isDisabledAttr()}get isReadOnlyAttr(){if(this.options.isReadOnlyAttr)return this.options.isReadOnlyAttr()}get ariaRequired(){if(this.options.ariaRequired)return this.options.ariaRequired()}get ariaLabel(){if(this.options.ariaLabel)return this.options.ariaLabel()}get ariaInvalid(){if(this.options.ariaInvalid)return this.options.ariaInvalid()}get ariaLabelledBy(){if(this.options.ariaLabelledBy)return this.options.ariaLabelledBy()}get ariaDescribedBy(){if(this.options.ariaDescribedBy)return this.options.ariaDescribedBy()}get ariaErrormessage(){if(this.options.ariaErrormessage)return this.options.ariaErrormessage()}dispose(){this.question&&this.question.unRegisterFunctionOnPropertiesValueChanged(this.options.propertyNames,"__textarea"),this.resetElement()}}class tF{constructor(e){this.question=e}get isSingleInputMode(){var e;return null==(e=this.question.singleInput)?void 0:e.isSingleVisibleInput}get isSingleInputActive(){if(!this.isSingleInputMode)return!1;let e=this.question.singleInput.currentSingleQuestion;return!!e&&e===this.rootParentQuestion}
1getPropertyValue(e,t,s){return this.question.getPropertyValue(e,t,s)}resetPropertyValue(e){this.question.resetPropertyValue(e)}get survey(){return this.question.singleInput}calculateSingleInputQuestion(){if(!this.isSingleInputActive)return;let e=this.getSingleInputQuestions();if(Array.isArray(e)&&e.length>0){let t=e[0];return this.onBeforeSetSingleInputQuestion(t),t}}get singleInputQuestion(){if(this.isSingleInputMode)return this.getPropertyValue("singleInputQuestion",void 0,()=>this.calculateSingleInputQuestion())}get currentSingleInputQuestion(){let e=this.singleInputQuestion;for(;e&&e.singleInputQuestion&&e.singleInputQuestion!==e;)e=e.singleInputQuestion;return e}get currentSingleInputParentQuestion(){let e=this.currentSingleInputQuestion;return e?e.singleInputQuestion===e?e:e.parentQuestion||this.question:this.question}get singleInputSummary(){return this.getPropertyValue("singleInputSummary",void 0,()=>{if(!this.supportNestedSingleInput())return;let e=this.singleInputQuestion;if(!e||e!==this.question)return;let t=this.createSingleInputSummary();return t&&(this.calcSingleInputActions(),this.resetPropertyValue("singleInputLocTitle")),t})}createSingleInputSummary(){}get rootParentQuestion(){return this.question.rootParentQuestion}getParentQuestions(){let e=[],t=this.question;for(;t.parentQuestion;)e.push(t.parentQuestion),t=t.parentQuestion;return e}focusSingleInput(e){this.survey.currentSingleQuestion=this.rootParentQuestion;let t=this.getParentQuestions();for(let e=t.length-1;e>=1;e--)e===t.length-1&&t[e].singleInputBehavior.setSingleInputQuestion(t[e-1]);t.length>0&&t[0].singleInputBehavior.setSingleInputQuestion(this.question),this.question.focusInputElement(e)}resetSingleInput(){this.resetSingleInputCore()}resetSingleInputCore(){let e=this.getPropertyValue("singleInputQuestion");this.resetPropertyValue("singleInputQuestion"),e&&this.onSingleInputChanged()}onSingleInputChanged(e=!0){var t,s;e&&this.resetSingleInputSummary(),null==(t=this.singleInputLocTitle)||t.strChanged(),this.resetPropertyValue("singleInputLocTitle"),this.calcSingleInputActions(),null==(s=this.survey)||s.updateNavigationElements()}resetSingleInputSummary(){var e;null==(e=this.singleInputSummary)||e.dispose(),this.resetPropertyValue("singleInputSummary")}validateSingleInput(){let e=this.currentSingleInputQuestion;return!e||e.validate(!0,!0)}getSingleInputElementPos(){if(this.singleInputQuestion===this.question)return 0;let e=this.currentSingleInputParentQuestion;if(e!==this.question&&2===e.getSingleInputElementPos())return 2;let t=this.singleInputQuestion,s=this.getSingleInputQuestions();if(s.length<2)return 0;let i=s.indexOf(t);return 0===i?-1:i>=s.length-1?1:2}singleInputOnAddItem(e){this.isSingleInputActive&&(e&&this.singleInputSummary?this.resetSingleInputSummary():this.setSingleQuestionOnChange(Number.MAX_VALUE))}singleInputOnRemoveItem(e){this.isSingleInputActive&&(this.singleInputSummary?this.onSingleInputChanged():this.setSingleQuestionOnChange(e))}getSingleQuestionOnChange(e){return null}setSingleQuestionOnChange(e){let t=this.getSingleQuestionOnChange(e);t?this.setSingleInputQuestion(t):this.resetSingleInput()}onSetAsSingleInput(){this.isSingleInputSummaryShown=!1;let e=!this.question.wasRendered||this.singleInputSummary;this.question.onFirstRendering(),e&&(this.resetSingleInputSummary(),this.resetPropertyValue("singleInputQuestion"),this.resetPropertyValue("singleInputLocTitle"))}nextSingleInput(){return this.nextPrevSingleInput(1)}prevSingleInput(){return this.nextPrevSingleInput(-1)}getSingleInputAddText(){let e=this.currentSingleInputQuestion;if(!e)return;if(e.singleInputSummary)return this.getBehavior(e).getSingleInputAddTextCore();let t=this.getSingleInputQuestions(),s=Array.isArray(t)?t.length:0;if(s>0&&t[s-1]===e)return this.getSingleInputAddTextCore()}singleInputAddItem(e){(!e||this.validateSingleInput())&&this.getBehavior(this.currentSingleInputQuestion).singleInputAddItemCore()}get singleInputLocTitle(){return this.getPropertyValue("singleInputLocTitle",void 0,()=>this.getSingleQuestionLocTitle())}getLocTitle(){return this.isSingleInputActive?this.singleInputLocTitle:null}get singleInputActions(){return this.getPropertyValue("singleInputActions",void 0,()=>this.createSingleInputActions())}get singleInputHasActions(){return this.getPropertyValue("singleInputHasActions",void 0,()=>this.createSingleInputActions())}get singleInputHideHeader(){var e;return!!(null==(e=this.singleInputQuestion)?void 0:e.singleInputQuestion)&&this.singleInputQuestion!==this.question}set singleInputHasActionsValue(e){this.question.setPropertyValue("singleInputHasActions",e)}get singleInputParentQuestion(){var e;return(null==(e=this.singleInputQuestion)?void 0:e.parentQuestion)||this.question}createSingleInputActions(){var e;if((null==(e=this.survey)?void 0:e.currentSingleQuestion)!==this.question)return;let t=new to;return t.actions=this.getSingleQuestionActions(),t}calcSingleInputActions(){if(this.question.parentQuestion)this.getBehavior(this.question.parentQuestion).calcSingleInputActions();else{let e=this.getSingleQuestionActions();this.singleInputActions&&(this.singleInputActions.actions=e),this.question.setPropertyValue("singleInputHasActions",e.length>0||void 0)}}getSingleQuestionActions(){let e,t=[],s=this.currentSingleInputParentQuestion;if(!s||s===this.question)return t;let i=this.getBehavior(s).getSingleInputQuestions(),n=[];i.length>1&&i[0]===s&&(e=s,n.push(s));let r=s.parentQuestion;for(;r;)n.push(r),r=r.parentQuestion;for(let s=n.length-1;s>=0;s--){let i=n[s];if(i!==e){let e=i.singleInputLocTitle,s=new e2({id:"single-action"+i.id,locTitle:e,css:this.question.cssClasse
1s.breadcrumbsItem,innerCss:this.question.cssClasses.breadcrumbsItemButton,action:()=>{this.getBehavior(i).singleInputMoveToFirst()}});s.cssClasses={},t.push(s)}}return t}singleInputMoveToFirst(){let e=this.singleInputQuestion;e&&e!==this.question&&this.getBehavior(e).singleInputMoveToFirst(),this.singleInputMoveToFirstCore()}singleInputMoveToFirstCore(){}getSingleQuestionLocTitle(){return this.singleInputSummary?void 0:this.getSingleQuestionLocTitleCore()}getSingleQuestionLocTitleCore(){}supportNestedSingleInput(){var e;return null==(e=this.survey)?void 0:e.supportsNestedSingleInput(this.question)}getSingleInputQuestions(){if(!this.supportNestedSingleInput())return[];let e=this.getPropertyValue("singleInputQuestion");if(e===this.question)return[this.question];let t=this.getSingleInputQuestionsCore(e,!e||!this.isSingleInputSummaryShown);return this.survey&&this.survey.updateNestedSingleQuestions(this.question,t),t.forEach(e=>{e!==this.question&&this.onSingleInputQuestionAdded(e)}),t}getSingleInputQuestionsCore(e,t){return this.question.getNestedQuestions(!0,!1)}onSingleInputQuestionAdded(e){}fillSingleInputQuestionsInContainer(e,t){}getSingleInputQuestionsForDynamic(e,t){let s=[];return e&&e!==this.question&&0>t.indexOf(e)&&this.fillSingleInputQuestionsInContainer(s,e),t.forEach(e=>s.push(e)),this.isSingleInputSummaryShown&&s.length>0&&s.unshift(this.question),s.push(this.question),s}getSingleInputAddTextCore(){}singleInputAddItemCore(){}setSingleInputQuestionCore(e){this.onBeforeSetSingleInputQuestion(e),this.question.setPropertyValue("singleInputQuestion",e)}onBeforeSetSingleInputQuestion(e){e.onFirstRendering(),e===this.question&&(this.isSingleInputSummaryShown=!0)}setSingleInputQuestion(e,t){this.singleInputQuestion!==e&&(this.setSingleInputQuestionCore(e),this.onSingleInputChanged(!t||e!==this.question))}nextPrevSingleInput(e){let t=this.currentSingleInputParentQuestion;for(;t&&t!==this.question;){if(this.getBehavior(t).nextPrevSingleInputCore(e))return!0;t=t.parentQuestion}return this.nextPrevSingleInputCore(e)}nextPrevSingleInputCore(e){let t=this.singleInputQuestion;if(!t)return!1;let s=this.getSingleInputQuestions(),i=s.indexOf(t);if(i<0){if(0===s.length)return!1;i=0,e=0}return!((i+=e)<0)&&!(i>=s.length)&&(this.setSingleInputQuestion(s[i],e<0),!0)}getBehavior(e){return e.singleInputBehavior}}class tB{constructor(e,t){this.question=e,this.isUnwrapped=t}getObj(){return this.question}getValue(e){let t=e.path,s=e.index,i=p.expressionVariables;if(e.isProperty&&t.length>1){if(e.path=t.slice(1),e.isRoot=!1,t[0].name===i.self)return new j(this.question).getValue(e);if(t[0].name===i.parent&&this.question.parentQuestion)return new j(this.question.parentQuestion).getValue(e)}if(0===t.length||1===t.length&&t[0].name===i.self)return this.getQuestionValue(s);if(t.length>1&&t[0].name===i.panel){e.isRoot=!1;let s=this.question.parent;if(s&&s.isPanel)return t.shift(),e.isProperty?new j(s).getValue(e):new tQ(s.questions).getValue(e)}if(!this.question.isEmpty()){let t=this.question.value;if(s>=0){if(!Array.isArray(t||s>=t.length))return;t=t[s]}return e.isProperty=!1,new W(t).getValue(e)}}getTextValue(e,t,s){return s?this.question.getDisplayValue(!0,t):t}getRootObj(){return this.question.data}getQuestion(){return this.question}getSurveyValue(e,t){let s=this.question.getSurvey();if(s)return s.getValueGetterContext().getValue({path:e,isRoot:!1,index:t})}getQuestionValue(e){let t=this.question,s=t.getFilteredValue(this.isUnwrapped);return e>-1&&Array.isArray(s)&&(s=e<s.length?s[e]:void 0),{isFound:!0,context:this,value:s,requireStrictCompare:t.requireStrictCompare}}}class t_ extends U{getValueFromBindedQuestions(e,t){"object"!=typeof t&&(t=void 0);let s=1===e.length?e[0].name:"",i=this.getQuestionsBySameValueNames();for(let n=0;n<i.length;n++){let r=i[n];if(s&&r.valuePropertyName===s&&t&&t.hasOwnProperty(s))return{isFound:!0,value:t[s],context:r.getValueGetterContext()};let a=r.getValueGetterContext().getValue({path:e,isRoot:!1,index:this.getIndex()});if(a&&a.isFound)return a}}getQuestionsBySameValueNames(){let e=[],t=this.getQuestionData();return t&&t.isQuestion&&(t.parent&&t.parent.isPanel&&this.fillQuestions(t.parent.getQuestionsByValueName(t.getValueName()),t,e),0===e.length&&t.survey&&this.fillQuestions(t.survey.getQuestionsByValueName(t.getValueName()),t,e)),e}
1fillQuestions(e,t,s){Array.isArray(e)&&e.forEach(e=>{e!==t&&s.push(e)})}getRootObj(){return this.getQuestionData()}}class tQ extends U{constructor(e){super(),this.questions=e}isSearchNameRevert(){return!0}updateValueByItem(e,t){let s=e.toLocaleLowerCase(),i=p.expressionVariables.unwrapPostfix;for(let e=0;e<this.questions.length;e++){let n=this.questions[e],r=n.getFilteredName().toLocaleLowerCase();if(r.toLocaleLowerCase()===s){t.isFound=!0,t.obj=n,t.context=n.getValueGetterContext(r.endsWith(i));break}}}}class tH extends ez{constructor(e){super(()=>{this.setCallbackResult()}),this.res=!0,this.errorCountValue=0,e||(e={fireCallback:!0}),this.fireCallbackValue=e.fireCallback||!1,this.isOnValueChangedValue=e.isOnValueChanged||!1,this.isOnValueChangingValue=e.isOnValueChanging||!1,this.focusOnFirstErrorValue=e.focusOnFirstError||!1,this.callbackResult=e.callbackResult||null,this.changeCurrentPage=e.changeCurrentPage||!1}get fireCallback(){return this.fireCallbackValue}get isOnValueChanged(){return this.isOnValueChangedValue}
1get isOnValueChanging(){return this.isOnValueChangingValue}get focusOnFirstError(){return this.focusOnFirstErrorValue}get result(){return this.res}get runningResult(){return this.res&&this.isRunning&&this.callbackResult?void 0:this.res}setErrorElement(e,t){Array.isArray(t)&&this.isWarningOnlyOrEmpty(t)||(this.errorCountValue++,this.res=!1,e&&(e.isQuestion?this.setQuestionError(e):e.isCollapsed&&e.expand()))}isWarningOnlyOrEmpty(e){for(let t=0;t<e.length;t++){let s=e[t];if(s.isError&&s.visible)return!1}return!0}get firstErrorQuestion(){return this.firstErrorQuestionValue}get errorCount(){return this.errorCountValue}setCallbackResult(){this.callbackResult&&!this.isCallbackFired&&(this.isCallbackFired=!0,this.callbackResult(this.res,this.firstErrorQuestion))}setQuestionError(e){if(e.expandAllParents(),!this.firstErrorQuestionValue){if(this.firstErrorQuestionValue=e,this.focusOnFirstError||this.changeCurrentPage)if(this.focusOnFirstError)e.focus(!0);else{let t=e.getSurvey();t&&e.page&&(t.currentPage=e.page)}this.setCallbackResult()}}}class tz extends tL{get afterRenderCallbacks(){return this.survey}get validationCallbacks(){return this.survey}isReadOnlyRenderDiv(){return this.isReadOnly&&"div"===p.readOnly.commentRenderMode}allowMobileInDesignMode(){return!1}updateIsMobileFromSurvey(){this.setIsMobile(this.survey._isMobile)}setIsMobile(e){let t=e&&(this.allowMobileInDesignMode()||!this.isDesignMode);this.isMobile=t}getIsMobile(){return this._isMobile}get isMobile(){return this.getIsMobile()}set isMobile(e){this._isMobile=e}themeChanged(e){}get ariaExpanded(){return this.isNewA11yStructure?null:this.getPropertyValue("ariaExpanded")}set ariaExpanded(e){this.setPropertyValue("ariaExpanded",e)}constructor(e){super(e),this.customWidgetData={isNeedRender:!0},this.hasCssErrorCallback=()=>!1,this.triggersInfo=[],this.isReadyValue=!0,this.dependedQuestions=[],this.onReadyChanged=this.addEvent(),this.isValueChangedInSurvey=!1,this.allowNotifyValueChanged=!0,this.setPropertyValueDirectly("id","sq_"+this.uniqueId),this.onCreating(),this.addExpressionProperty("visibleIf",(e,t)=>{this.visible=!0===t}),this.addExpressionProperty("enableIf",(e,t)=>{this.readOnly=!1===t}),this.addExpressionProperty("requiredIf",(e,t)=>{this.isRequired=!0===t}),this.addTriggersInfo()}onPropertyValueChanged(e,t,s){var i;super.onPropertyValueChanged(e,t,s),"validators"===e&&this.resetValidationDependencies(),["readOnly","hasVisibleErrors","containsErrors"].indexOf(e)>-1&&this.updateQuestionCss(),"showNumber"===e&&this.notifySurveyVisibilityChanged(),"no"===e&&this.resetCssTitle(),"width"===e&&(this.updateQuestionCss(),this.parent&&this.parent.elementWidthChanged(this)),"isRequired"===e&&(!this.isRequired&&this.errors.length>0&&this.validate(),this.locTitle.strChanged(),this.clearCssClasses()),("indent"===e||"rightIndent"===e)&&this.resetIndents(),("showCommentArea"===e||"showOtherItem"===e)&&this.initCommentFromSurvey(),"commentPlaceholder"===e&&this.resetRenderedCommentPlaceholder(),"_isMobile"===e&&this.onMobileChanged(),"colSpan"===e&&(null==(i=this.parent)||i.updateColumns()),"descriptionLocation"===e&&this.updateQuestionCss()}getDefaultTitle(){return this.name}createLocTitleProperty(){let e=super.createLocTitleProperty();return e.storeDefaultText=!0,e.onGetTextCallback=(e,t)=>(e||t||(e=this.getDefaultTitle()),this.survey)?this.titleSettings.getUpdatedQuestionTitle(this,e):e,this.locProcessedTitle=new R(this,!0),this.locProcessedTitle.sharedData=e,e}get locRenderedTitle(){return this.singleInputBehavior.getLocTitle()||this.locTitle}get commentTextAreaModel(){return this.commentTextAreaModelValue||(this.commentTextAreaModelValue=new tq(this.getCommentTextAreaOptions())),this.commentTextAreaModelValue}getCommentTextAreaOptions(){return{question:this,id:()=>this.commentId,propertyNames:["comment"],className:()=>this.cssClasses.comment,placeholder:()=>this.renderedCommentPlaceholder,isDisabledAttr:()=>this.isInputReadOnly||!1,rows:()=>this.commentAreaRows,autoGrow:()=>this.autoGrowComment,maxLength:()=>this.getOthersMaxLength(),ariaRequired:()=>this.a11y_input_ariaRequired,ariaLabel:()=>this.a11y_input_ariaLabel,getTextValue:()=>this.comment,onTextAreaChange:e=>{this.onCommentChange(e)},onTextAreaInput:e=>{this.onCommentInput(e)}}}getSurvey(e=!1){return e?this.parent?this.parent.getSurvey(e):null:this.onGetSurvey?this.onGetSurvey():super.getSurvey()}getValueName(){return this.valueName?this.valueName.toString():this.name}get valueName(){return this.getPropertyValue("valueName","")}set valueName(e){var t=this.getValueName();this.setPropertyValue("valueName",e),this.onValueNameChanged(t)}onValueNameChanged(e){this.survey&&(this.lifecycleCallbacks.questionRenamed(this,this.name,e||this.name),this.initDataFromSurvey())}onNameChanged(e){this.locTitle.strChanged(),this.survey&&this.lifecycleCallbacks.questionRenamed(this,e,this.valueName?this.valueName:e)}getAllChildren(){return[...super.getAllChildren(),...this.validators]}get isReady(){return this.isReadyValue}onAsyncRunningChanged(){this.updateIsReady()}ensureQuestionIsReady(){this.displayValue}waitForQuestionIsReady(e){return new Promise(t=>{if(this.ensureQuestionIsReady(),this.isReady)t(),e&&e();else{let s=(i,n)=>{n.isReady&&(this.onReadyChanged.remove(s),t(),e&&e())};this.onReadyChanged.add(s)}})}updateIsReady(){let e=this.getIsQuestionReady();if(e){let t=this.getIsReadyDependsOn();for(let s=0;s<t.length;s++)if(!t[s].getIsQuestionReady()){e=!1;break}}this.setIsReady(e)}getIsQuestionReady(){return!this.isAsyncExpressionRunning&&this.getAreNestedQuestionsReady()}getAreNestedQuestionsReady(){let e=this.getIsReadyNestedQuestions();if(!Array.isArray(e))return!0;for(let t=0;t<e.length;t++)if(!e[t].isReady)return!1;return!0}getIsReadyNestedQuestions(){return this.getNestedQuestions()}setIsReady(e){let t=this.isReadyValue;
1this.isReadyValue=e,t!=e&&(this.getIsReadyDependends().forEach(e=>e.updateIsReady()),this.onReadyChanged.fire(this,{question:this,isReady:e,oldIsReady:t}))}getIsReadyDependsOn(){return this.getIsReadyDependendCore(!0)}getIsReadyDependends(){return this.getIsReadyDependendCore(!1)}getDependedQuestionsByValueName(e){return this.survey.questionsByValueName(this.getValueName())}getIsReadyDependendCore(e){if(!this.survey)return[];let t=this.getDependedQuestionsByValueName(e),s=[];return t.forEach(e=>{e!==this&&s.push(e)}),!e&&(this.parentQuestion&&s.push(this.parentQuestion),this.dependedQuestions.length>0&&this.dependedQuestions.forEach(e=>s.push(e))),s}choicesLoaded(){}get page(){return this.parentQuestion?this.parentQuestion.page:this.getPage(this.parent)}set page(e){this.setPage(this.parent,e)}getPanels(){return null}getPageVisibleIndex(){var e;return(null==(e=this.page)?void 0:e.visibleIndex)||-1}delete(e=!0){this.removeFromParent(),e?this.dispose():this.resetDependedQuestions()}removeFromParent(){this.parent&&this.removeSelfFromList(this.parent.elements)}addDependedQuestion(e){!e||this.dependedQuestions.indexOf(e)>-1||this.dependedQuestions.push(e)}removeDependedQuestion(e){if(e){var t=this.dependedQuestions.indexOf(e);t>-1&&this.dependedQuestions.splice(t,1)}}updateDependedQuestions(){for(var e=0;e<this.dependedQuestions.length;e++)this.dependedQuestions[e].updateDependedQuestion()}updateDependedQuestion(){}resetDependedQuestion(){}get isFlowLayout(){return"flow"===this.getLayoutType()}getLayoutType(){return this.parent?this.parent.getChildrenLayoutType():"row"}isLayoutTypeSupported(e){return"flow"!==e}onVisibleChanged(){let e=this.getPropertyValue("isVisible");this.onVisibleChangedCore();let t=this.getPropertyValue("isVisible");void 0!==e&&e!==t&&this.notifySurveyVisibilityChanged()}onVisibleChangedCore(){this.updateIsVisibleProp(),!this.isVisible&&this.errors&&this.errors.length>0&&(this.errors=[])}notifyStateChanged(e){super.notifyStateChanged(e),this.isCollapsed&&this.onHidingContent()}updateElementVisibility(){this.updateIsVisibleProp()}updateIsVisibleProp(){let e=this.getPropertyValue("isVisible"),t=this.isVisible;e!==t&&(this.setPropertyValue("isVisible",t),t||this.onHidingContent()),t!==this.visible&&this.areInvisibleElementsShowing&&this.updateQuestionCss()}getUseDisplayValuesInDynamicTexts(){return this.useDisplayValuesInDynamicTexts}get isVisible(){return!(this.survey&&this.survey.areEmptyElementsHidden&&this.isEmpty())&&(!!this.areInvisibleElementsShowing||this.isVisibleCore())}get isVisibleInSurvey(){return this.isVisible&&this.isParentVisible}isVisibleCore(){return this.visible}get visibleIndex(){return this.getPropertyValue("visibleIndex",-1)}onHidingContent(){}get hideNumber(){return!this.showNumber}set hideNumber(e){this.showNumber=!e}get isAllowTitleLeft(){return!0}getType(){return"question"}get isQuestion(){return!0}getOwner(){return this.parentQuestion||this.parent}moveTo(e,t=null){return this.moveToBase(this.parent,e,t)}getProgressInfo(){return this.hasInput?{questionCount:1,answeredQuestionCount:+!this.isEmpty(),requiredQuestionCount:+!!this.isRequired,requiredAnsweredQuestionCount:!this.isEmpty()&&this.isRequired?1:0}:super.getProgressInfo()}runTriggerInfo(e,t,s){this.runExpressionByProperty(e.name,s,t=>{e.doComplete(t,s)},s=>!!e.canRun()&&(!t||this.canExecuteTriggerByKeys(t,s,this.getExpressionByProperty(e.secondName))))}canExecuteTriggerByKeys(e,t,s){!t&&s&&(t=s,s=void 0);let i=this.canExecuteTriggerByKeysCore(e,t);return"var"===i||(s?""!==this.canExecuteTriggerByKeysCore(e,s):"func"===i||"const"===i)}canExecuteTriggerByKeysCore(e,t){if(!t.expression)return"";let s=t.getVariables();return Array.isArray(s)&&0!==s.length?new z().isAnyKeyChanged(e,s)?"var":"":t.hasFunction()?"func":"const"}getValueGetterContext(e){return new tB(this,e)}addTriggersInfo(){this.addTriggerInfo({name:"resetValueIf",canRun:()=>!this.isEmpty(),doComplete:(e,t)=>{!0===e&&(this.startSetValueOnExpression(),this.updateValueWithDefaultsOrClear(),this.finishSetValueOnExpression())}}),this.addTriggerInfo({name:"setValueIf",secondName:"setValueExpression",canRun:()=>!0,doComplete:(e,t)=>
vendor: 6,671 bytes, line 1
1{e&&(this.setValueExpression?this.runTriggerInfo({name:"setValueExpression",canRun:()=>!0,doComplete:(e,t)=>this.runExpressionSetValue(e)},void 0,t):this.clearValue())}}),this.addTriggerInfo({name:"setValueExpression",canRun:()=>!this.setValueIf,doComplete:(e,t)=>this.runExpressionSetValue(e)})}addTriggerInfo(e){this.triggersInfo.push(e)}runTriggers(e,t,s){if(this.isSettingQuestionValue||this.parentQuestion&&this.parentQuestion.getValueName()===e)return;s||((s={})[e]=t);let i=this.getDataFilteredProperties();this.triggersInfo.forEach(e=>{this.runTriggerInfo(e,s,i)})}runConditions(){this.data&&!this.isLoadingFromJson&&(this.isDesignMode||this.runCondition(this.getDataFilteredProperties()),this.locStrsChanged())}setSurveyImpl(e,t){super.setSurveyImpl(e),this.survey&&(this.lifecycleCallbacks.questionCreated(this),!0!==t&&this.runConditions(),this.visible||this.updateIsVisibleProp(),this.updateIsMobileFromSurvey())}get parent(){return this.getPropertyValue("parent",null)}set parent(e){this.parent!==e&&(this.removeFromParent(),this.setPropertyValue("parent",e),e&&this.updateQuestionCss(),this.onParentChanged())}onParentChanged(){}get singleInputBehavior(){return this._singleInputBehavior||(this._singleInputBehavior=this.createSingleInputBehavior()),this._singleInputBehavior}createSingleInputBehavior(){return new tF(this)}get singleInputQuestion(){return this.singleInputBehavior.singleInputQuestion}get singleInputSummary(){return this.singleInputBehavior.singleInputSummary}get rootParentQuestion(){let e=this;for(;e.parentQuestion;)e=e.parentQuestion;return e}resetSingleInput(){this.singleInputBehavior.resetSingleInput()}validateSingleInput(){return this.singleInputBehavior.validateSingleInput()}getSingleInputElementPos(){return this.singleInputBehavior.getSingleInputElementPos()}get isSingleInputActive(){return this.singleInputBehavior.isSingleInputActive}singleInputOnAddItem(e){this.singleInputBehavior.singleInputOnAddItem(e)}singleInputOnRemoveItem(e){this.singleInputBehavior.singleInputOnRemoveItem(e)}onSetAsSingleInput(){this.singleInputBehavior.onSetAsSingleInput()}nextSingleInput(){return this.singleInputBehavior.nextSingleInput()}prevSingleInput(){return this.singleInputBehavior.prevSingleInput()}getSingleInputAddText(){return this.singleInputBehavior.getSingleInputAddText()}singleInputAddItem(e){this.singleInputBehavior.singleInputAddItem(e)}get singleInputLocTitle(){return this.singleInputBehavior.singleInputLocTitle}get singleInputActions(){return this.singleInputBehavior.singleInputActions}get singleInputHasActions(){return this.singleInputBehavior.singleInputHasActions}singleInputMoveToFirst(){this.singleInputBehavior.singleInputMoveToFirst()}get hasTitle(){return"hidden"!==this.getTitleLocation()&&!this.singleInputBehavior.singleInputHideHeader}get titleLocation(){return this.getPropertyValue("titleLocation")}set titleLocation(e){var t="hidden"==this.titleLocation||"hidden"==e;this.setPropertyValue("titleLocation",e.toLowerCase()),this.updateQuestionCss(),t&&this.notifySurveyVisibilityChanged()}get showTitle(){return"hidden"!==this.getTitleLocation()}set showTitle(e){this.titleLocation=e?"default":"hidden"}getTitleOwner(){return this}getIsTitleRenderedAsString(){return"hidden"===this.titleLocation}notifySurveyOnChildrenVisibilityChanged(){return!1}notifySurveyVisibilityChanged(){if(!this.canUpdateValueOnVisibleChanged())return;this.lifecycleCallbacks.questionVisibilityChanged(this,this.isVisible,!this.parentQuestion||this.parentQuestion.notifySurveyOnChildrenVisibilityChanged());let e=this.isClearValueOnHidden;this.visible||this.clearValueOnHidding(e),e&&this.isVisibleInSurvey&&this.updateValueWithDefaults()}clearValueOnHidding(e){e&&this.clearValueIfInvisible()}get titleWidth(){if(this.parent&&"left"===this.getTitleLocation()){let e=this.parent.getColumsForElement(this),t=e.length;if(0!==t&&e[0].questionTitleWidth)return e[0].questionTitleWidth;let s=this.getQuestionParentTitleWidth(),i=this.getPercentQuestionTitleWidth(s);if(!i&&this.parent){let e=s;return e&&!isNaN(e)&&(e+="px"),e}return i/(t||1)+"%"}}getQuestionParentTitleWidth(){if(!this.parent)return;let e=this.parent.getQuestionTitleWidth();return!e&&this.parentQuestion?this.parentQuestion.getQuestionParentTitleWidth():e}getPercentQuestionTitleWidth(e){if(e&&"%"===e[e.length-1])return parseInt(e)}getTitleLocation(){if(this.isFlowLayout)return"hidden";var e=this.getTitleLocationCore();return"left"!==e||this.isAllowTitleLeft||(e="top"),e}getTitleLocationCore(){return"default"!==this.titleLocation?this.titleLocation:this.getParentTitleLocation()}getParentTitleLocation(){return this.parent?this.parent.getQuestionTitleLocation():this.survey?this.titleSettings.questionTitleLocation:"top"}get hasTitleOnLeft(){return this.hasTitle&&"left"===this.getTitleLocation()}get hasTitleOnTop(){return this.hasTitle&&"top"===this.getTitleLocation()}get hasTitleOnBottom(){return this.hasTitle&&"bottom"===this.getTitleLocation()}get hasTitleOnLeftTop(){if(!this.hasTitle)return!1;let e=this.getTitleLocation();return"left"===e||"top"===e}getErrorLocation(){return"default"!==this.errorLocation?this.errorLocation:this.parentQuestion?this.parentQuestion.getChildErrorLocation(this):this.parent?this.parent.getQuestionErrorLocation():this.survey?this.titleSettings.questionErrorLocation:"top"}getChildErrorLocation(e){return this.getErrorLocation()}get hasInput(){return!0}get hasSingleInput(){return this.hasInput&&!this.isContainer}get inputId(){return this.id+"i"}getDefaultTitleValue(){return this.name}getDefaultTitleTagName(){return p.titleTags.question}get hasDescriptionUnderTitle(){return"underTitle"==this.getDescriptionLocation()&&this.hasDescription}get hasDescriptionUnderInput(){return"underInput"==this.getDescriptionLocation()&&this.hasDescription}getDescriptionLocation(){return"default"!==this.descriptionLocation?this.descriptionLocation:this.survey?this.titleSettings.questionDescriptionLocation:"underTitle"}needClickTitleFunction(){return super.needClickTitleFunction()||this.hasInput}processTitleClick(){if(super.processTitleClick(),!this.isCollapsed)return setTimeout(()=>{this.focus()},1),!0}get commentPlaceHolder(){return this.commentPlaceholder}set commentPlaceHolder(e){this.commentPlaceholder=e}get renderedCommentPlaceholder(){var e;return null!=(e=this.getPropertyValue("renderedCommentPlaceholder"))?e:this.isReadOnly?void 0:this.commentPlaceholder}resetRenderedCommentPlaceholder(){this.resetPropertyValue("renderedCommentPlaceholder")}getAllErrors(){return this.errors.slice()}getErrorByType(e){for(let t=0;t<this.errors.length;t++)if(this.errors[t].getErrorType()===e)return this.errors[t];return null}
1get customWidget(){return this.isCustomWidgetRequested||this.customWidgetValue||(this.isCustomWidgetRequested=!0,this.updateCustomWidget()),this.customWidgetValue}updateCustomWidget(){this.customWidgetValue=tN.Instance.getCustomWidget(this)}localeChanged(){super.localeChanged(),this.resetRenderedCommentPlaceholder(),this.localeChangedCallback&&this.localeChangedCallback()}get isCompositeQuestion(){return!1}get isContainer(){return!1}onCommentInput(e){this.isInputTextUpdate&&e.target&&(this.comment=e.target.value)}onCommentChange(e){this.comment=e.target.value,this.comment!==e.target.value&&(e.target.value=this.comment)}afterRenderQuestionElement(e){this.survey&&this.hasSingleInput&&this.afterRenderCallbacks.afterRenderQuestionInput(this,e)}afterRender(e){this.afterRenderCore(e),this.survey&&(this.afterRenderCallbacks.afterRenderQuestion(this,e),this.afterRenderQuestionCallback&&this.afterRenderQuestionCallback(this,e),(this.supportComment()||this.supportOther())&&(this.commentElements=[],this.getCommentElementsId().forEach(t=>{let s=null==e?void 0:e.querySelector(`#${t}`);s&&this.commentElements.push(s)})),this.checkForResponsiveness(e))}afterRenderCore(e){super.afterRenderCore(e)}getCommentElementsId(){return[this.commentId]}beforeDestroyQuestionElement(e){this.commentElements=void 0}get processedTitle(){return this.locProcessedTitle.textOrHtml||this.name}get fullTitle(){return this.locTitle.renderedHtml}get titlePattern(){return this.survey?this.titleSettings.questionTitlePattern:"numTitleRequire"}get isRequireTextOnStart(){return this.isRequired&&"requireNumTitle"==this.titlePattern}get isRequireTextBeforeTitle(){return this.isRequired&&"numRequireTitle"==this.titlePattern&&""!==this.requiredMark}get isRequireTextAfterTitle(){return this.isRequired&&"numTitleRequire"==this.titlePattern&&""!==this.requiredMark}calcCssClasses(e){let t={error:{}};return this.copyCssClasses(t,e.question),this.copyCssClasses(t.error,e.error),this.updateCssClasses(t,e),t}onCalcCssClasses(e){super.onCalcCssClasses(e),this.survey&&this.cssCallbacks.updateQuestionCssClasses(this,e),this.onUpdateCssClassesCallback&&this.onUpdateCssClassesCallback(e)}get cssRoot(){return this.ensureElementCss(),this.getPropertyValue("cssRoot","")}setCssRoot(e){this.setPropertyValue("cssRoot",e)}getCssRoot(e){let t=this.hasCssError(!0);return new eX().append(super.getCssRoot(e)).append(this.isFlowLayout&&!this.isDesignMode?e.flowRoot:e.mainRoot).append(e.titleLeftRoot,!this.isFlowLayout&&this.hasTitleOnLeft).append(e.titleTopRoot,!this.isFlowLayout&&this.hasTitleOnTop).append(e.titleBottomRoot,!this.isFlowLayout&&this.hasTitleOnBottom).append(e.descriptionUnderInputRoot,!this.isFlowLayout&&this.hasDescriptionUnderInput).append(e.hasError,t).append(e.hasErrorTop,t&&"top"==this.getErrorLocation()).append(e.hasErrorBottom,t&&"bottom"==this.getErrorLocation()).append(e.small,!this.width).append(e.answered,this.isAnswered).append(e.noPointerEventsMode,this.isReadOnlyAttr).toString()}get cssHeader(){return this.ensureElementCss(),this.getPropertyValue("cssHeader","")}setCssHeader(e){this.setPropertyValue("cssHeader",e)}getCssHeader(e){return new eX().append(e.header).append(e.headerTop,this.hasTitleOnTop).append(e.headerLeft,this.hasTitleOnLeft).append(e.headerBottom,this.hasTitleOnBottom).toString()}supportContainerQueries(){return!1}get cssContent(){return this.ensureElementCss(),this.getPropertyValue("cssContent","")}setCssContent(e){this.setPropertyValue("cssContent",e)}getCssContent(e){return new eX().append(e.content).append(e.contentSupportContainerQueries,this.supportContainerQueries()).append(e.contentLeft,this.hasTitleOnLeft).toString()}get cssTitle(){return this.ensureElementCss(),this.getPropertyValue("cssTitle",void 0,()=>this.getCssTitle(this.getCssClasses()))}resetCssTitle(){this.resetPropertyValue("cssTitle")}getCssTitle(e){return new eX().append(super.getCssTitle(e)).append(e.singleInputTitle,!!this.singleInputQuestion).append(e.titleOnAnswer,!this.containsErrors&&this.isAnswered).append(e.titleEmpty,!this.title.trim()).toString()}get cssDescription(){return this.ensureElementCss(),this.getPropertyValue("cssDescription","")}setCssDescription(e){this.setPropertyValue("cssDescription",e)}getCssDescription(e){return new eX().append(e.description).append(e.descriptionUnderInput,"underInput"==this.getDescriptionLocation()).toString()}get showErrorsAboveQuestion(){return"top"===this.getErrorLocation()}get showErrorsBelowQuestion(){return"bottom"===this.getErrorLocation()}get cssError(){return this.ensureElementCss(),this.getPropertyValue("cssError","")}setCssError(e){this.setPropertyValue("cssError",e)}getCssError(e){return new eX().append(e.error.root).append(e.error.warningMode,"warning"===this.currentNotificationType).append(e.error.infoMode,"info"===this.currentNotificationType).append(e.errorsContainer).append(e.errorsContainerTop,this.showErrorsAboveQuestion).append(e.errorsContainerBottom,this.showErrorsBelowQuestion).toString()}hasCssError(e){let t=this.errors;for(let s=0;s<t.length;s++){let i=t[s];if(i.visible&&(e||i.isError))return!0}return this.hasCssErrorCallback()}updateVisibleErrors(){super.updateVisibleErrors(),this.updateQuestionCss()}get isSingleInputQuestionMode(){return!!this.parentQuestion&&this.isSingleInputMode}getIsNested(){return!this.isSingleInputQuestionMode&&super.getIsNested()}
1getHasFrameV2(){return!!this.isSingleInputQuestionMode||super.getHasFrameV2()}getRootCss(){return new eX().append(this.cssRoot,!this.singleInputQuestion).append(this.cssClasses.mobile,this.isMobile).append(this.cssClasses.readOnly,this.isReadOnlyStyle).append(this.cssClasses.disabled,this.isDisabledStyle).append(this.cssClasses.preview,this.isPreviewStyle).append(this.cssClasses.invisible,!this.isDesignMode&&this.areInvisibleElementsShowing&&!this.visible).toString()}getQuestionRootCss(){return new eX().append(this.cssClasses.root).append(this.cssClasses.rootMobile,this.isMobile).toString()}updateElementCss(e){this.wasRendered?(super.updateElementCss(e),e&&this.updateQuestionCss()):this.clearCssClasses(),this.resetIndents()}updateQuestionCss(){!this.isLoadingFromJson&&this.survey&&!this.isDisposed&&this.wasRendered&&this.updateElementCssCore(this.cssClasses)}ensureElementCss(){this.cssClassesValue||this.updateQuestionCss()}getCssClasses(){return this.cssClasses}updateElementCssCore(e){this.setCssRoot(this.getCssRoot(e)),this.setCssHeader(this.getCssHeader(e)),this.setCssContent(this.getCssContent(e)),this.resetCssTitle(),this.setCssDescription(this.getCssDescription(e)),this.setCssError(this.getCssError(e))}updateCssClasses(e,t){if(!t.question)return;let s=t[this.getCssType()],i=new eX().append(e.title).append(t.question.titleRequired,this.isRequired);e.title=i.toString();let n=new eX().append(e.root).append(s,this.isRequired&&!!t.question.required);if(null==s)e.root=n.toString();else if("string"==typeof s||s instanceof String)e.root=n.append(s.toString()).toString();else for(let t in e.root=n.toString(),s)e[t]=s[t]}getCssType(){return this.getType()}get renderCssRoot(){return this.cssClasses.root||void 0}calcPaddingLeft(){return this.getIndentSize(this.indent)}calcPaddingRight(){return this.getIndentSize(this.rightIndent)}getIndentSize(e){return!(e<1)&&this.getSurvey()&&this.cssClasses&&this.cssClasses.indent?e*this.cssClasses.indent+"px":""}focus(e=!1,t){if(this.isDesignMode||!this.isVisible||this.isReadOnly||!this.survey)return;let s=this.page,i=!!s&&this.survey.activePage!==s,n=this.isSingleInputMode;if(i&&!n)this.survey.focusQuestionByInstance(this,e);else if(n)this.singleInputBehavior.focusSingleInput(e);else{this.expandAllParents();let s=this.survey.isSmoothScrollEnabled?{behavior:"smooth"}:void 0;this.survey.scrollElementToTop({element:this,question:this,id:this.id,scrollIfVisible:t,scrollIntoViewOptions:s,onScolledCallback:()=>{this.focusInputElement(e)}})}}focusInputElement(e){var t;let s=e?this.getFirstErrorInputElementId():this.getFirstInputElementId(),i=null==(t=this.survey)?void 0:t.rootElement;(tL.FocusElement(s,!1,i)||this.customWidget)&&this.fireCallback(this.focusCallback)}get isValidateVisitedEmptyFields(){return this.supportEmptyValidation()&&!!this.survey&&this.validationCallbacks.getValidateVisitedEmptyFields()&&this.isEmpty()}supportEmptyValidation(){return!1}onBlur(e){this.onBlurCore(e)}onFocus(e){this.onFocusCore(e)}onBlurCore(e){this.isFocusEmpty&&this.isEmpty()&&this.validate(!0)}onFocusCore(e){this.isFocusEmpty=this.isValidateVisitedEmptyFields}expandAllParents(){this.expandAllParentsCore(this)}expandAllParentsCore(e){e&&(e.isCollapsed&&e.expand(),this.expandAllParentsCore(e.parent),this.expandAllParentsCore(e.parentQuestion))}focusIn(){!this.survey||this.isDisposed||this.isContainer||this.survey.whenQuestionFocusIn(this)}fireCallback(e){e&&e()}getOthersMaxLength(){return this.survey&&this.survey.maxCommentLength>0?this.survey.maxCommentLength:null}onCreating(){}getFirstQuestionToFocus(e){return this.hasInput&&(!e||this.currentErrorCount>0)?this:null}getFirstInputElementId(){return this.inputId}getFirstErrorInputElementId(){return this.getFirstInputElementId()}supportComment(){let e=this.getPropertyByName("showCommentArea");return!e||e.visible}supportOther(){return!1}get showCommentArea(){return this.getPropertyValue("showCommentArea",!1)}set showCommentArea(e){this.supportComment()&&this.setPropertyValue("showCommentArea",e)}get hasComment(){return this.showCommentArea}set hasComment(e){this.showCommentArea=e}get ariaTitleId(){return this.id+"_ariaTitle"}get ariaDescriptionId(){return this.id+"_ariaDescription"}get commentId(){return this.id+"_comment"}get requireUpdateCommentValue(){return this.showCommentArea}get isReadOnly(){let e=!!this.parent&&this.parent.isReadOnly,t=!!this.parentQuestion&&this.parentQuestion.isReadOnly,s=!!this.survey&&this.survey.isDisplayMode,i=!!this.readOnlyCallback&&this.readOnlyCallback();return this.readOnly||e||s||t||i}get isInputReadOnly(){return void 0!==this.forceIsInputReadOnly?this.forceIsInputReadOnly:this.isReadOnly||this.isDesignMode}get renderedInputReadOnly(){return this.isInputReadOnly?"":void 0}get renderedInputDisabled(){return this.isInputReadOnly?"":void 0}get isReadOnlyAttr(){return this.isReadOnly}get isDisabledAttr(){return this.isDesignMode||!!this.readOnlyCallback&&this.readOnlyCallback()}onReadOnlyChanged(){this.setPropertyValue("isInputReadOnly",this.isInputReadOnly),super.onReadOnlyChanged(),this.isReadOnly&&this.clearErrors(),this.updateQuestionCss(),this.resetRenderedCommentPlaceholder()}surveyChoiceItemVisibilityChange(){}runCondition(e){!this.isDesignMode&&(e||(e={}),e.question=this,this.runConditionCore(e),this.isValueChangedDirectly||this.isClearValueOnHidden&&!this.isVisibleInSurvey||this.runDefaultValueExpression(e))}get isInDesignMode(){return!this.isContentElement&&this.isDesignMode}get no(){return this.getPropertyValue("no",void 0,()=>this.calcNo())}calcNo(){let e="",t=this.getHasTitleOnCalcNo()&&this.showNumber&&this.visibleIndex>=0;
1return(t&&(e=w.getNumberByIndex(this.visibleIndex,this.getStartIndex())),this.onGetNoCallback)?this.onGetNoCallback(e):(t&&(this.parent&&(e=this.parent.addNoFromChild(e)),this.survey&&(e=this.titleSettings.getUpdatedQuestionNo(this,e))),e)}getHasTitleOnCalcNo(){return this.hasTitle}onSurveyLoad(){this.isCustomWidgetRequested=!1,this.fireCallback(this.surveyLoadCallback),this.updateValueWithDefaults(),this.isEmpty()&&this.initDataFromSurvey()}onSetData(){super.onSetData(),this.isDesignMode||!this.survey||this.isLoadingFromJson||(this.initDataFromSurvey(),this.onSurveyValueChanged(this.value),this.updateValueWithDefaults(),this.updateIsAnswered())}initDataFromSurvey(){if(this.data){let e=this.data.getValue(this.getValueName());w.isValueEmpty(e)&&this.isLoadingFromJson||this.updateValueFromSurvey(e),this.initCommentFromSurvey()}}initCommentFromSurvey(){this.data&&this.requireUpdateCommentValue?this.updateCommentFromSurvey(this.data.getComment(this.getValueName())):this.updateCommentFromSurvey("")}runExpression(e){if(this.survey&&e)return this.survey.runExpression(e)}get commentAreaRows(){return this.survey&&this.survey.commentAreaRows}get autoGrowComment(){return this.survey&&this.survey.autoGrowComment}get allowResizeComment(){return this.survey&&this.survey.allowResizeComment}get questionValue(){return this.getPropertyValueWithoutDefault("value")}set questionValue(e){this.setPropertyValue("value",e)}get questionComment(){return this.getPropertyValueWithoutDefault("comment")}set questionComment(e){this.setPropertyValue("comment",e),this.fireCallback(this.commentChangedCallback)}get isValueArray(){return!1}get value(){return this.getValueCore()}set value(e){this.setNewValue(e)}getStructuredValue(e=-1){return this.value}get hasFilteredValue(){return!1}getFilteredValue(e){return this.value}getFilteredName(){return this.getValueName()}get valueForSurvey(){return this.valueForSurveyCore(this.value)}valueForSurveyCore(e){return this.valueToDataCallback?this.valueToDataCallback(e):e}valueFromDataCore(e){return this.valueFromDataCallback?this.valueFromDataCallback(e):e}clearValue(e,t){void 0!==this.value&&(this.value=void 0),this.comment&&!0!==e&&(this.comment=void 0),this.setValueChangedDirectly(!0===t),this.onClearValue()}onClearValue(){}clearValueFromUI(){this.clearValue(!0,!0)}clearValueOnly(){this.clearValue(!0)}unbindValue(){this.clearValue()}createValueCopy(){return this.getUnbindValue(this.value)}initDataUI(){}getUnbindValue(e){return this.isValueSurveyElement(e)?e:w.getUnbindValue(e)}isValueSurveyElement(e){return!!e&&(Array.isArray(e)?e.length>0&&this.isValueSurveyElement(e[0]):!0===e.isSurveyObj)}canClearValueAsInvisible(e){return"onHiddenContainer"===e&&!this.isParentVisible||!this.isVisibleInSurvey&&(!this.page||!this.page.isStartPage)&&(!this.survey||!this.survey.hasVisibleQuestionByValueName(this))}get isParentVisible(){if(this.parentQuestion&&!this.parentQuestion.isVisible)return!1;for(var e=this.parent;e;){if(!e.isVisible)return!1;e=e.parent}return!0}clearValueIfInvisible(e="onHidden"){let t=this.getClearIfInvisible();"none"===t||"onHidden"===e&&"onComplete"===t||("onHiddenContainer"!==e||t===e)&&this.clearValueIfInvisibleCore(e)}clearValueIfInvisibleCore(e){this.canClearValueAsInvisible(e)&&this.clearValue()}getClearIfInvisible(){let e=this.clearIfInvisible;return this.survey?this.survey.getQuestionClearIfInvisible(e):"default"!==e?e:"onComplete"}get displayValue(){return this.isLoadingFromJson?"":this.getDisplayValue(!0)}getDisplayValue(e,t){var s=this.calcDisplayValue(e,t);return this.survey&&(s=this.titleSettings.getQuestionDisplayValue(this,s)),this.displayValueCallback?this.displayValueCallback(s):s}calcDisplayValue(e,t){if(this.customWidget){var s=this.customWidget.getDisplayValue(this,t);if(s)return s}return(t=void 0==t?this.createValueCopy():t,this.isValueEmpty(t)&&!this.locDefaultDisplayValue.isEmpty&&(t=this.defaultDisplayValue),this.isValueEmpty(t,!this.allowSpaceAsAnswer))?this.getDisplayValueEmpty():this.getDisplayValueCore(e,t)}getDisplayValueCore(e,t){return t}getDisplayValueEmpty(){return""}get defaultValue(){return this.getPropertyValue("defaultValue")}set defaultValue(e){if(this.isValueExpression(e)){this.defaultValueExpression=e.substring(1);return}this.setPropertyValue("defaultValue",this.valueToData(e)),this.updateV
1alueWithDefaults()}get defaultValueExpression(){return this.getPropertyValue("defaultValueExpression")}set defaultValueExpression(e){this.setPropertyValue("defaultValueExpression",e),this.defaultValueRunner=void 0,this.updateValueWithDefaults()}get resizeStyle(){return this.allowResizeComment?"both":"none"}getPlainData(e){if(e||(e={includeEmpty:!0,includeQuestionTypes:!1}),e.includeEmpty||!this.isEmpty()){var t={name:this.name,title:this.locTitle.renderedHtml,value:this.value,displayValue:this.displayValue,isNode:!1,getString:e=>this.getValueAsString(e)};return!0===e.includeQuestionTypes&&(t.questionType=this.getType()),(e.calculations||[]).forEach(e=>{t[e.propertyName]=this.getPlainDataCalculatedValue(e.propertyName)}),this.showCommentArea&&(t.isNode=!0,t.data=[{name:0,isComment:!0,title:"Comment",value:p.commentSuffix,displayValue:this.comment,getString:e=>this.getValueAsString(e),isNode:!1}]),t}}getPlainDataCalculatedValue(e){return this[e]}get quizQuestionCount(){return this.isVisible&&this.hasInput&&!this.isValueEmpty(this.correctAnswer)?this.getQuizQuestionCount():0}get correctAnswerCount(){return this.isEmpty()||this.isValueEmpty(this.correctAnswer)?0:this.getCorrectAnswerCount()}getQuizQuestionCount(){return 1}getCorrectAnswerCount(){return+!!this.checkIfAnswerCorrect()}checkIfAnswerCorrect(){let e=w.isTwoValueEquals(this.value,this.correctAnswer,this.getAnswerCorrectIgnoreOrder(),p.comparator.caseSensitive,!0),t=+!!e,s=this.quizQuestionCount-t,i={result:e,correctAnswers:t,correctAnswerCount:t,incorrectAnswers:s,incorrectAnswerCount:s};return this.survey&&this.survey.onCorrectQuestionAnswer(this,i),i.result}getAnswerCorrectIgnoreOrder(){return!1}isAnswerCorrect(){return this.correctAnswerCount==this.quizQuestionCount}updateValueWithDefaults(){if(this.isLoadingFromJson||!this.isDesignMode&&this.isDefaultValueEmpty())return;let e=this.isEmpty();!this.isDesignMode&&!e||e&&this.isDefaultValueEmpty()||this.isClearValueOnHidden&&!this.isVisible||this.isDesignMode&&this.isContentElement&&this.isDefaultValueEmpty()||this.setDefaultValue()}get isValueDefault(){return!this.isEmpty()&&(this.isTwoValueEquals(this.defaultValue,this.value)||!this.isValueChangedDirectly&&!!this.defaultValueExpression)}get isClearValueOnHidden(){let e=this.getClearIfInvisible();return"none"!==e&&"onComplete"!==e&&("onHidden"===e||"onHiddenContainer"===e)}getQuestionFromArray(e,t){return null}getDefaultValue(){return this.defaultValue}isDefaultValueEmpty(){return!this.defaultValueExpression&&this.isValueEmpty(this.defaultValue,!this.allowSpaceAsAnswer)}setDefaultValue(){this.setDefaultValueCore(e=>{e=this.convertToCorrectValue(e),this.isTwoValueEquals(this.value,e)||this.setDefaultIntoValue(e)})}setDefaultIntoValue(e){this.value=e}setDefaultValueCore(e){let t=t=>{this.runExpressionSetValueCore(t,e)};this.runDefaultValueExpression(void 0,t)||t(this.getUnbindValue(this.defaultValue))}updateValueWithDefaultsOrClear(){this.isDesignMode||this.isLoadingFromJson||(this.isDefaultValueEmpty()?this.clearValue():this.setDefaultValue())}isValueExpression(e){return!!e&&"string"==typeof e&&e.length>0&&"="==e[0]}convertFuncValuetoQuestionValue(e){return w.convertValToQuestionVal(e)}runExpressionSetValueCore(e,t){t(this.convertFuncValuetoQuestionValue(e))}runExpressionSetValue(e){this.runExpressionSetValueCore(e,e=>{this.isTwoValueEquals(this.value,e)||(this.startSetValueOnExpression(),this.value=e,this.finishSetValueOnExpression())})}startSetValueOnExpression(){var e;null==(e=this.survey)||e.startSetValueOnExpression()}finishSetValueOnExpression(){var e;null==(e=this.survey)||e.finishSetValueOnExpression()}runDefaultValueExpression(e=null,t){return!!this.data&&(t||(t=e=>{this.runExpressionSetValue(e)}),e||((e=this.defaultValueExpression?this.data.getFilteredProperties():{}).question=this),this.runExpressionByProperty("defaultValueExpression",e,e=>{void 0==e&&(e=this.defaultValue),this.isChangingViaDefaultValue=!0,t(e),this.isChangingViaDefaultValue=!1}))}get comment(){return this.getQuestionComment()}set comment(e){e=this.getTrimmedComment(e),this.comment!==e&&this.setNewComment(e)}getTrimmedComment(e){return"string"!=typeof e||e.trim()?e:""}getCommentAreaCss(e=!1){return new eX().append("form-group",e).append(this.cssClasse
1s.formGroup,!e).append(this.cssClasses.commentArea).append(this.cssClasses.otherArea,e).toString()}getQuestionComment(){return this.questionComment}isEmpty(){return this.isValueEmpty(this.value,!this.allowSpaceAsAnswer)}updateIsAnswered(){let e=this.isAnswered;this.setPropertyValue("isAnswered",this.getIsAnswered()),e!==this.isAnswered&&this.updateQuestionCss()}getIsAnswered(){return!this.isEmpty()}get validators(){return this.getArrayPropertyValue("validators",e=>{e.owner=this,this.resetValidationDependencies()},e=>{this.resetValidationDependencies()})}set validators(e){this.setArrayPropertyValue("validators",e)}getValidators(){return this.validators}getSupportedValidators(){let e=[],t=this.getType();for(;t;){let s=p.supportedValidators[t];if(s)for(let t=s.length-1;t>=0;t--)e.splice(0,0,s[t]);t=H.findClass(t).parentName}return e}addConditionObjectsByContext(e,t){e.push({name:this.getFilteredName(),text:this.processedTitle,question:this})}getNestedQuestions(e=!1,t=!0,s=!1){let i=[];return(this.collectNestedQuestions(i,e,t,s),s||1!==i.length||i[0]!==this)?i:[]}collectNestedQuestions(e,t=!1,s=!0,i=!1){(!t||this.isVisible)&&this.collectNestedQuestionsCore(e,t,s,i)}collectNestedQuestionsCore(e,t,s,i){e.push(this)}addNestedQuestion(e,t,s,i){s?this.collectNestedQuestions(e,t,s,i):(!t||this.isVisible)&&e.push(this)}getConditionJson(e=null,t=null){let s=new Q().toJsonObject(this);return s.type=this.getType(),s}hasErrors(e=!0,t=!1){return!this.validateCore(e,!1,t)}validate(e=!0,t=!1,s=!1,i,n){return this.validateCore(e,!0,t,s,i,n)}validateCore(e,t,s=!1,i=!1,n,r){t&&i&&this.parent&&this.parent.validateContainerOnly();let a=new tH({isOnValueChanged:i,isOnValueChanging:r,focusOnFirstError:s,fireCallback:e,callbackResult:n});return this.validateElement(a),a.finish(),a.runningResult}validateElement(e){return this.validateElementCore(e)}validateElementCore(e){let t=this.checkForErrors(e);return e.fireCallback&&(this.errors=t,this.errors!==t&&this.errors.forEach(e=>e.locText.strChanged())),e.setErrorElement(this,t),this.updateContainsErrors(),this.isCollapsed&&e.fireCallback&&t.length>0&&this.expand(),0===t.length}get currentErrorCount(){return this.errors.length}get requiredMark(){return null!=this.survey&&this.isRequired?this.titleSettings.requiredMark:""}get requiredText(){return this.requiredMark}addError(e){if(!e)return;let t=null;t="string"==typeof e||e instanceof String?this.addCustomError(e):e,this.errors.push(t)}addCustomError(e){return new eB(e,this.survey)}removeError(e){if(!e)return!1;let t=this.errors,s=t.indexOf(e);return -1!==s&&t.splice(s,1),-1!==s}checkForErrors(e){var t=[];if(this.isVisible&&this.canCollectErrors()&&this.collectErrors(t,e),this.survey){if
1(this.validateValueCallback&&0===t.length){let e=this.validateValueCallback();e&&t.push(e)}this.validationCallbacks.validateQuestion(this,t,e.fireCallback)}return t}canCollectErrors(){return!this.isReadOnly||p.readOnly.enableValidation}collectErrors(e,t){if(this.onCheckForErrors(e,t.isOnValueChanged,t.fireCallback),e.length>0||!this.canRunValidators(t.isOnValueChanged))return;let s=this.runValidators(t);if(s.length>0){e.length=0;for(var i=0;i<s.length;i++)e.push(s[i])}}canRunValidators(e){return!0}onCheckForErrors(e,t,s){if((!t||this.isOldAnswered)&&this.hasRequiredError()){let t=new eE(this.requiredErrorText,this);t.onUpdateErrorTextCallback=e=>{e.text=this.requiredErrorText},e.push(t)}if(!this.isEmpty()&&this.customWidget){let t=this.customWidget.validate(this);t&&e.push(this.addCustomError(t))}}hasRequiredError(){return this.isRequired&&this.isEmpty()}get isRunningValidators(){return this.getIsRunningValidators()}getIsRunningValidators(){return!!this.validatorRunner}runValidators(e){return this.validatorRunner&&(this.validatorRunner.onAsyncCompleted=null),this.validatorRunner=new ej,this.validatorRunner.onAsyncCompleted=t=>{this.doOnAsyncCompleted(e.fireCallback,t),e.setErrorElement(this,t),e.removeElement(this.id)},e.addElement(this.id),this.validatorRunner.run(this)}doOnAsyncCompleted(e,t){e&&t.forEach(e=>{0>this.errors.indexOf(e)&&this.errors.push(e)}),this.validatorRunner=null}setNewValue(e){if(this.survey&&(e=this.survey.questionValueChanging(this,e)),this.isNewValueEqualsToValue(e)||!this.checkIsValueCorrect(e))return;let t=this.getUnbindValue(this.value);this.isOldAnswered=this.isAnswered,this.isSettingQuestionValue=!0,this.setNewValueInData(e),this.allowNotifyValueChanged&&this.onValueChanged(),this.isSettingQuestionValue=!1,this.isAnswered!==this.isOldAnswered&&this.updateQuestionCss(),this.isOldAnswered=void 0,this.survey&&this.survey.questionValueChanged(this,t)}getValueChangingOptions(e){}checkIsValueCorrect(e){let t=this.isValueEmpty(e,!this.allowSpaceAsAnswer)||this.isNewValueCorrect(e);return t||Y.inCorrectQuestionValue(this.name,e),t}isNewValueCorrect(e){return!0}isNewValueEqualsToValue(e){let t=this.value;return!!this.isTwoValueEquals(e,t,!1,!1)&&!(e===t&&t&&(Array.isArray(t)||"object"==typeof t))}isTextValue(){return!1}getIsInputTextUpdate(){return!!this.survey&&this.survey.isUpdateValueTextOnTyping}get requireStrictCompare(){return!1}getExpressionValue(e){return e}getDataLocNotification(){return!!this.isInputTextUpdate&&"text"}get isInputTextUpdate(){return this.getIsInputTextUpdate()&&this.isTextValue()}setNewValueInData(e){e=this.valueToData(e),this.isValueChangedInSurvey||this.setValueCore(e)}getValueCore(){return this.questionValue}setValueCore(e){this.setQuestionValue(e),null!=this.data&&this.canSetValueToSurvey()&&(e=this.valueForSurvey,this.data.setValue(this.getValueName(),e,this.getDataLocNotification(),this.allowNotifyValueChanged,this.name)),this.isMouseDown=!1}canSetValueToSurvey(){return!0}valueFromData(e){return e}valueToData(e){return e}convertToCorrectValue(e){return e}onValueChanged(){}onMouseDown(){this.isMouseDown=!0}setNewComment(e){if(this.questionComment===e||(!this.isUpdatingValueFromSurvey&&this.survey&&(e=this.survey.questionValueChanging(this,e,!0)),this.questionComment===e))return;let t=this.questionComment;this.questionComment=e,this.setCommentIntoData(e),!this.isUpdatingValueFromSurvey&&this.survey&&this.survey.questionValueChanged(this,t,!0)}setCommentIntoData(e){null!=this.data&&this.data.setComment(this.getValueName(),e,!!this.getIsInputTextUpdate()&&"text")}getValidName(e){return tU(super.getValidName(e))}updateValueFromSurvey(e,t=!1){if(e=this.getUnbindValue(e),e=this.valueFromDataCore(e),!this.checkIsValueCorrect(e))return;let s=this.isValueEmpty(e);this.isUpdatingValueFromSurvey=!0,!s&&this.defaultValueExpression?this.setDefaultValueCore(t=>{this.updateValueFromSurveyCore(e,this.isTwoValueEquals(e,t))}):(this.updateValueFromSurveyCore(e,this.data!==this.getSurvey()),t&&s&&(this.isValueChangedDirectly=!1),s&&this.updateBindingsOnClearFromSurveyCore()),this.isUpdatingValueFromSurvey=!1,this.updateDependedQuestions(),this.updateIsAnswered()}canUpdateBindings(){return!this.isUpdatingValueFromSurvey}updateBindingsOnClearFromSurveyCore(){let e=this.data;
1e&&!this.isBindingEmpty()&&this.bindings.getNames().forEach(t=>{let s=this.bindings.getValueNameByPropertyName(t),i=e.getValue(s);this.isValueEmpty(i)||this.updateBindingProp(t,i)})}updateValueFromSurveyCore(e,t){this.isChangingViaDefaultValue=t,e=this.valueFromData(e);let s=this.isTwoValueEquals(this.questionValue,this.convertToCorrectValue(e));this.setQuestionValue(e),s||this.resetSingleInput(),this.isChangingViaDefaultValue=!1}updateCommentFromSurvey(e){this.questionComment=e}onChangeQuestionValue(e){}setValueChangedDirectly(e){this.isValueChangedDirectly=e,this.setValueChangedDirectlyCallback&&this.setValueChangedDirectlyCallback(e)}setQuestionValue(e,t=!0){e=this.convertToCorrectValue(e);let s=this.isTwoValueEquals(this.questionValue,e);s||this.isChangingViaDefaultValue||this.isParentChangingViaDefaultValue||this.setValueChangedDirectly(!0),this.questionValue=e,s||this.onChangeQuestionValue(e),!s&&this.allowNotifyValueChanged&&this.fireCallback(this.valueChangedCallback),t&&this.updateIsAnswered()}get isParentChangingViaDefaultValue(){var e;return(null==(e=this.data)?void 0:e.isChangingViaDefaultValue)===!0}onSurveyValueChanged(e){}setVisibleIndex(e){return this.isVisibleIndexNegative(e)&&(e=-1),this.setPropertyValue("visibleIndex",e),this.resetPropertyValue("no"),e<0?0:1}isVisibleIndexNegative(e){return e<0||!this.isVisible||!this.getHasTitleOnCalcNo()&&!p.numbering.includeQuestionsWithHiddenTitle||!this.showNumber&&!p.numbering.includeQuestionsWithHiddenNumber}removeElement(e){return!1}supportGoNextPageAutomatic(){return this.supportAutoAdvance()}supportAutoAdvance(){return!1}supportGoNextPageError(){return!0}clearIncorrectValues(){}clearOnDeletingContainer(){}clearErrors(){this.errors=[]}clearUnusedValues(){}onAnyValueChanged(e,t){this.validateOnAnyQuestionValueChanged(e,t)}checkBindings(e,t){if(!this.bindings.isEmpty()&&this.data)for(var s=this.bindings.getPropertiesByValueName(e),i=0;i<s.length;i++){let e=s[i];this.isValueEmpty(t)&&w.isNumber(this[e])&&(t=0),this.updateBindingProp(e,t)}}updateBindingProp(e,t){this[e]=t}getComponentName(){return tM.Instance.getRendererByQuestion(this)}isDefaultRendering(){return!!this.customWidget||"default"===this.getComponentName()}getErrorCustomText(e,t){return this.survey?this.survey.getSurveyErrorCustomText(this,e,t):e}createRegexValidator(e,t,s){var i;return(null==(i=this.survey)?void 0:i.createRegexValidator(this,e,t,s))||new RegExp(t,s)}getValidatorTitle(){return null}get validatedValue(){return this.value}set validatedValue(e){this.value=e}processPopupVisiblilityChanged(e,t){this.survey.processPopupVisiblityChanged(this,e,t)}processOpenDropdownMenu(e){this.survey.processOpenDropdownMenu(this,e)}onTextKeyDownHandler(e){13===e.keyCode&&this.survey.questionEditFinishCallback(this,e)}transformToMobileView(){}transformToDesktopView(){}needResponsiveWidth(){return!1}supportResponsiveness(){return!1}needResponsiveness(){return this.supportResponsiveness()&&!this.isDesignMode}checkForResponsiveness(e){if(this.needResponsiveness())if(this.isCollapsed){let t=()=>{this.isExpanded&&(this.initResponsiveness(e),this.unregisterPropertyChangedHandlers(["state"],"for-responsiveness"))};this.registerPropertyChangedHandlers(["state"],t,"for-responsiveness")}else this.initResponsiveness(e)}getObservedElementSelector(){return".sd-scrollable-container"}onMobileChanged(){this.onMobileChangedCallback&&this.onMobileChangedCallback()}triggerResponsiveness(e=!0){this.triggerResponsivenessCallback&&this.triggerResponsivenessCallback(e)}initResponsiveness(e){if(n.isAvailable()&&(this.destroyResizeObserver(),e&&this.isDefaultRendering())){let t,s=this.getObservedElementSelector();if(!s||!e.querySelector(s))return;let n=!1;this.triggerResponsivenessCallback=i=>{i&&(t=void 0,this.renderAs="default",n=!1);let r=()=>{let i=e.querySelector(s);if(this.isDefaultRendering()&&(t=i.scrollWidth),n||!tt(i))n=!1;else{let e=te(i);n=this.processResponsiveness(t,e)}};i?setTimeout(r,1):r()},this.resizeObserver=new ResizeObserver(e=>{i.requestAnimationFrame(()=>{this.triggerResponsiveness(!1)})}),this.onMobileChangedCallback=()=>{setTimeout(()=>{let i=e.querySelector(s);this.processResponsiveness(t,te(i))},0)},this.resizeObserver.observe(e)}}getCompactRenderAs(){return"default"}getDesktopRenderAs(){return"default"}onBeforeSetCompactRenderer(){}onBeforeSetDesktopRenderer(){}
1processResponsiveness(e,t){if(Math.abs(e-(t=Math.round(t)))>2){let s=this.renderAs;return e>t?(this.onBeforeSetCompactRenderer(),this.renderAs=this.getCompactRenderAs()):(this.onBeforeSetDesktopRenderer(),this.renderAs=this.getDesktopRenderAs()),s!==this.renderAs}return!1}destroyResizeObserver(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0,this.onMobileChangedCallback=void 0,this.triggerResponsivenessCallback=void 0,this.renderAs=this.getDesktopRenderAs())}dispose(){super.dispose(),this.resetDependedQuestions(),this.destroyResizeObserver()}resetDependedQuestions(){for(var e=0;e<this.dependedQuestions.length;e++)this.dependedQuestions[e].resetDependedQuestion()}getValidatorVariableNames(){let e=[],t=this.getPropertyValue("validators");if(!Array.isArray(t)||0===t.length)return e;let s=this.getValueName(),i=p.expressionVariables.panel+"."+s,n=p.expressionVariables.row+"."+s;for(let r=0;r<t.length;r++){let a=t[r];if("expressionvalidator"===a.getType()&&a.expression){let t=new K(a.expression).getVariables();for(let r=0;r<t.length;r++){let a=t[r];a!==s&&a!==i&&a!==n&&0>e.indexOf(a)&&e.push(a)}}}return e}getValidationDependentNames(){return this.validationDependentNames||(this.validationDependentNames=this.getValidatorVariableNames()),this.validationDependentNames}validateOnAnyQuestionValueChanged(e,t){if(!this.survey)return;let s=this.getValidationDependentNames();if(0===s.length)return;let i=e+".";if(0>s.indexOf(e)&&!s.some(e=>0===e.indexOf(i)))return;let n=this.getAllErrors().length>0;if(!n&&this.validationCallbacks.isValidateOnValueChanged){let e=this.data.findQuestionByName(t);n=!e||0==e.getAllErrors().length}n&&this.validate(!0,!1,!0)}resetValidationDependencies(){this.validationDependentNames=void 0}get isNewA11yStructure(){return!1}get ariaLabel(){return this.isNewA11yStructure||this.hasTitle&&!this.parentQuestion?null:this.locTitle.renderedHtml}get ariaRole(){return this.isNewA11yStructure?null:"textbox"}get ariaRequired(){return this.isNewA11yStructure?null:this.isRequired?"true":"false"}get ariaInvalid(){return this.isNewA11yStructure?null:this.hasCssError()?"true":"false"}get ariaLabelledBy(){return this.isNewA11yStructure||!this.hasTitle||this.parentQuestion?null:this.ariaTitleId}get ariaDescribedBy(){return this.isNewA11yStructure?null:this.hasTitle&&this.hasDescription?this.ariaDescriptionId:null}getContentAriaHidden(){return null}get contentAriaHidden(){return this.getContentAriaHidden()}get ariaErrormessage(){return this.isNewA11yStructure?null:this.hasCssError()?this.id+"_errors":null}get a11y_input_ariaRole(){return null}get a11y_input_ariaRequired(){return this.isRequired?"true":"false"}get a11y_input_ariaInvalid(){return this.hasCssError()?"true":"false"}get a11y_input_ariaLabel(){return this.hasTitle&&!this.parentQuestion?null:this.locTitle.renderedHtml}get a11y_input_ariaLabelledBy(){return this.hasTitle&&!this.parentQuestion?this.ariaTitleId:null}get a11y_input_ariaDescribedBy(){let e=null;return this.hasCssError()?e=this.id+"_errors":this.hasTitle&&!this.parentQuestion&&this.hasDescription&&"hidden"!==this.descriptionLocation&&(e=this.ariaDescriptionId),e}get a11y_input_ariaErrormessage(){return null}get a11y_input_ariaExpanded(){return this.getPropertyValue("ariaExpanded")}get dragDropMatrixAttribute(){return null}}function tU(e){if(!e)return e;for(e=e.trim().replace(/[\{\}]+/g,"");e&&e[0]===p.expressionDisableConversionChar;)e=e.substring(1);return e}V([e_({defaultValue:!1})],tz.prototype,"_isMobile",void 0),V([e_()],tz.prototype,"forceIsInputReadOnly",void 0),V([e_({onSet:(e,t)=>{t.onVisibleChangedCore(),t.notifySurveyVisibilityChanged()}})],tz.prototype,"visible",void 0),V([e_()],tz.prototype,"useDisplayValuesInDynamicTexts",void 0),V([e_()],tz.prototype,"visibleIf",void 0),V([e_()],tz.prototype,"showNumber",void 0),V([e_()],tz.prototype,"errorLocation",void 0),V([e_()],tz.prototype,"descriptionLocation",void 0),V([e_({localizable:!0})],tz.prototype,"requiredErrorText",void 0),V([e_({localizable:{defaultStr:!0,markdown:!0}})],tz.prototype,"commentText",void 0),V([e_({localizable:!0})],tz.prototype,"commentPlaceholder",void 0),V([e_({localizable:!0})],tz.prototype,"defaultDisplayValue",void 0),V([e_()],tz.prototype,"startWithNewLine",void 0),V([e_()],tz.prototype,"isRequired",void 0),V([e_()],tz.prototype,"requiredIf",void 0),V([e_()],tz.prototype,"id",void 0),V([e_()],tz.prototype,"enableIf",void 0),V([e_()],tz.prototype,"clearIfInvisible",void 0),V([e_()],tz.prototype,"resetValueIf",void 0),V([e_()],tz.prototype,"setValueIf",void 0),V([e_()],tz.prototype,"setValueExpression",void 0),V([e_({onSetting:(e,t)=>
1t.valueToData(e)})],tz.prototype,"correctAnswer",void 0),V([e_({returnValue:!1})],tz.prototype,"isAnswered",void 0),V([e_()],tz.prototype,"renderAs",void 0),V([e_({defaultValue:!1})],tz.prototype,"inMatrixMode",void 0),V([e_()],tz.prototype,"randomize",void 0),V([e_()],tz.prototype,"randomizeCategory",void 0),H.addClass("question",[{name:"!name",onSettingValue:(e,t)=>tU(t)},{name:"state",default:"default",choices:["default","collapsed","expanded"]},{name:"visible:switch",default:!0,overridingProperty:"visibleIf"},{name:"useDisplayValuesInDynamicTexts:boolean",alternativeName:"useDisplayValuesInTitle",default:!0,layout:"row"},"visibleIf:condition",{name:"width"},{name:"minWidth",defaultFunc:()=>p.minWidth},{name:"maxWidth",defaultFunc:()=>p.maxWidth,onSettingValue:(e,t)=>t||void 0},{name:"colSpan:number",visible:!1,onSerializeValue:e=>e.getPropertyValue("colSpan")},{name:"effectiveColSpan:number",minValue:1,isSerializable:!1,visibleIf:function(e){return!!e&&!!e.survey&&e.survey.gridLayoutEnabled}},{name:"startWithNewLine:boolean",default:!0,layout:"row"},{name:"indent:number",default:0,choices:[0,1,2,3],layout:"row"},{name:"page",isSerializable:!1,visibleIf:function(e){var t=e?e.survey:null;return!t||!t.pages||t.pages.length>1},choices:function(e){var t=e?e.survey:null;return t?t.pages.map(e=>({value:e.name,text:e.title})):[]}},{name:"title:text",serializationProperty:"locTitle",layout:"row",dependsOn:"name",onPropertyEditorUpdate:function(e,t){e&&t&&(t.placeholder=e.locTitle.getPlaceholder())}},{name:"titleLocation",default:"default",choices:["default","top","bottom","left","hidden"],layout:"row"},{name:"showTitle:boolean",isSerializable:!1,dependsOn:"titleLocation"},{name:"description:text",serializationProperty:"locDescription",layout:"row"},{name:"descriptionLocation",default:"default",choices:["default","underInput","underTitle"]},{name:"showNumber:boolean",dependsOn:"titleLocation",default:!0,visibleIf:function(e){if(!e)return!0;if("hidden"===e.titleLocation)return!1;var t=e?e.parent:null;if(!(!t||"off"!==t.showQuestionNumbers))return!1;var s=e?e.survey:null;return!s||"off"!==s.showQuestionNumbers||!!t&&"onpanel"===t.showQuestionNumbers}},{name:"hideNumber:boolean",visible:!1,isSerializable:!1},{name:"valueName",onSettingValue:(e,t)=>tU(t)},"enableIf:condition","resetValueIf:condition","setValueIf:condition","setValueExpression:expression","defaultValue:value","defaultValueExpression:expression","correctAnswer:value",{name:"clearIfInvisible",default:"default",choices:["default","none","onComplete","onHidden","onHiddenContainer"]},{name:"isRequired:switch",overridingProperty:"requiredIf"},"requiredIf:condition",{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText"},{name:"errorLocation",default:"default",choices:["default","top","bottom"]},{name:"readOnly:switch",overridingProperty:"enableIf"},{name:"validators:validators",baseClassName:"surveyvalidator",classNamePart:"validator"},{name:"bindings:bindings",serializationProperty:"bindings",isSerializableFunc:e=>!e.isBindingEmpty(),visibleIf:function(e){return e.bindings.getNames().length>0}},{name:"renderAs",default:"default",visible:!1},{name:"showCommentArea:switch",visible:!1,layout:"row",alternativeName:"hasComment"},{name:"commentText",dependsOn:"showCommentArea",visibleIf:function(e){return e.showCommentArea},serializationProperty:"locCommentText"},{name:"commentPlaceholder",alternativeName:"commentPlaceHolder",serializationProperty:"locCommentPlaceholder",dependsOn:"showCommentArea",visibleIf:function(e){return e.showCommentArea}},{name:"defaultDisplayValue",serializationProperty:"locDefaultDisplayValue"},{name:"randomize:boolean",default:!0,visible:!1,locationInTable:"detail"},{name:"randomizeCategory:string",visible:!1,locationInTable:"detail"}]),H.addAlterNativeClassName("question","questionbase");class tW{constructor(e){this.item=e}getObj(){return this.item}getValue(e){let t=e.path,s=t.length>0?t[0].name.toLocaleLowerCase():"",i=p.expressionVariables,n=[i.item,i.choice,i.self].indexOf(s)>-1;if(1===t.length&&n)return{isFound:!0,value:this.item.value,context:this};if(e.isProperty&&t.length>1&&n)return e.path=t.slice(1),new j(this.item).getValue(e);let r=this.item.locOwner;if(r&&r.getValueGetterContext)return r.getValueGetterContext().getValue(e)}getRootObj(){let e=this.item.locOwner;return e&&e.getValueGetterContext?e:this.item.getSurvey()}
1getTextValue(e,t,s){return s&&t===this.item.value?this.item.textOrHtml:null!=t?t.toString():""}}class tj extends e0{getMarkdownHtml(e,t,s){return this.locOwner?this.locOwner.getMarkdownHtml(e,t,s||this):void 0}getRenderer(e){return this.locOwner?this.locOwner.getRenderer(e,this):null}getRendererContext(e){return this.locOwner?this.locOwner.getRendererContext(e,this):e}getProcessedText(e){return this.locOwner?this.locOwner.getProcessedText(e,this):e}static get Separator(){return p.itemValueSeparator}static set Separator(e){p.itemValueSeparator=e}static setData(e,t,s){e.length=0;for(let i=0;i<t.length;i++){let n=t[i],r=n&&"function"==typeof n.getType?n.getType():null!=s?s:"itemvalue",a=H.createClass(r);a.setData(n),n.originalItem&&(a.originalItem=n.originalItem),n.data&&(a.data=n.data),e.push(a)}}static getData(e){for(var t=[],s=0;s<e.length;s++)t.push(e[s].getData());return t}getOwner(){return this.locOwner||super.getOwner()}static getItemByValue(e,t){if(!Array.isArray(e))return null;let s=w.isValueEmpty(t);for(var i=0;i<e.length;i++)if(s&&w.isValueEmpty(e[i].value)||w.isTwoValueEquals(e[i].value,t,!1,!0,!1))return e[i];return null}static getTextOrHtmlByValue(e,t){var s=tj.getItemByValue(e,t);return null!==s?s.textOrHtml:""}static locStrsChanged(e){for(var t=0;t<e.length;t++)e[t].locStrsChanged()}static runConditionsForItems(e,t,s,i,n=!0,r){return tj.runConditionsForItemsCore(e,t,s,i,!0,n,r)}static runEnabledConditionsForItems(e,t,s,i){return tj.runConditionsForItemsCore(e,null,t,s,!1,!0,i)}static runConditionsForItemsCore(e,t,s,i,n,r=!0,a){for(var o=!1,l=0;l<e.length;l++){var u=e[l],h=!!r&&!!u.getConditionRunner&&u.getConditionRunner(n);h||(h=s);var d=!0;h&&(d=h.runContext(u.getValueGetterContext(),i)),a&&(d=a(u,d)),t&&d&&t.push(u),d!=(n?u.isVisible:u.isEnabled)&&(o=!0,n?u.setIsVisible&&u.setIsVisible(d):u.setIsEnabled&&u.setIsEnabled(d))}return o}constructor(e,t,s){super(),this.typeName=s,this.ownerPropertyName="",t&&(this.locText.text=t),e&&"object"==typeof e?this.setData(e,!0):this.setValue(e,!0),this.getType()!=this.getBaseType()&&L.createProperties(this)}getType(){return this.typeName||this.getBaseType()}getBaseType(){return"itemvalue"}getSurvey(e=!1){return this.locOwner&&this.locOwner.getSurvey?this.locOwner.getSurvey():null}getLocale(){return this.locOwner&&this.locOwner.getLocale?this.locOwner.getLocale():""}getLocalizableString(e){return"text"===e?this.locText:super.getLocalizableString(e)}getValueGetterContext(){return new tW(this)}get isInternal(){return!0===this.isGhost}createLocText(){let e=this.createLocalizableStringCore(this,"text",!0,"text");return e.onGetTextCallback=e=>this.onGetText(e),e}onGetText(e){return e||this.getValueText()}getValueText(){let e=this.value;return w.isValueEmpty(e)?null:e.toString()}get locText(){return this.getLocText()}getLocText(){return this.locTextValue||(this.locTextValue=this.createLocText()),this.locTextValue}setLocText(e){this.locTextValue=e}get locOwner(){return this._locOwner}set locOwner(e){this._locOwner=e,this.onLocOwnerChanged()}onLocOwnerChanged(){}onDependencyValueChanged(e,t){let s=this.locOwner;s&&s.onDependencyValueChanged?s.onDependencyValueChanged(e,t):super.onDependencyValueChanged(e,t)}get value(){return this.getPropertyValue("value")}set value(e){this.setValue(e,!1)}setValue(e,t){let s;e=this.getCorrectValue(e);let i=p.itemValueSeparator;if(i&&!w.isValueEmpty(e)){var n=e.toString(),r=n.indexOf(i);r>-1&&(e=n.slice(0,r),s=n.slice(r+1))}t?this.setPropertyValueDirectly("value",e):this.setPropertyValue("value",e),s&&(this.text=s),this.id=this.value}getCorrectValue(e){return e}get hasText(){return!!this.pureText}get pureText(){var e;return(null==(e=this.locTextValue)?void 0:e.pureText)||""}set pureText(e){this.text=e}get text(){return this.calculatedText}set text(e){this.locText.text=e}get textOrHtml(){return this.locTextValue?this.locText.textOrHtml:this.getValueText()}get calculatedText(){return this.locTextValue?this.locText.calculatedText:this.getValueText()}get shortcutText(){return this.text}canSerializeValue(){let e=this.value;return null!=e&&!Array.isArray(e)&&"object"!=typeof e}getData(e){var t=this.toJSON(e);if(t.value&&t.value.pos&&delete t.value.pos,w.isValueEmpty(t.value))return t;let s=this.canSerializeValue();return s&&(p.serialization.itemValueSerializeAsObject||p.serialization.itemValueSerializeDisplayText)||1!=Object.keys(t).length?(p.serialization.itemValueSerializeDisplayText&&void 0===t.text&&s&&(t.text=this.value.toString()),t):this.value}toJSON(e){var t={},s=H.getProperties(this.getType());s&&0!=s.length||(s=H.getProperties(this.getBaseType()));for(var i=new Q,n=0;n<s.length;n++){let r=s[n];this.canAddPpropertyToJSON(r)&&i.valueToJson(this,t,r,e)}return t}isPropertyStoredInHash(e){return"text"!==e}canAddPpropertyToJSON(e){return!("text"===e.name&&(!this.locTextValue||!this.locTextValue.hasNonDefaultText()&&w.isTwoValueEquals(this.value,this.locTextValue.getLocaleText(""),!1,!0,!1)))}setData(e,t){var s;if(!w.isValueEmpty(e)){if(void 0===e.value&&void 0!==e.text&&1===Object.keys(e).length&&(e.value=e.text),void 0!==e.value){let t;if("function"==typeof e.toJSON)t=e.toJSON();else if(Array.isArray(e.elements))for(var i in t={},e)"elements"!==i&&(t[i]=e[i]);else t=e;new Q().toObject(t,this)}else this.setValue(e,t);t||null==(s=this.locTextValue)||s.strChanged()}}get visibleIf(){return this.getPropertyValueWithoutDefault("visibleIf")||""}set visibleIf(e){this.setPropertyValue("visibleIf",e)}get enableIf(){return this.getPropertyValueWithoutDefault("enableIf")||""}set enableIf(e){this.setPropertyValue("enableIf",e)}get isVisible(){let e=this.getPropertyValueWithoutDefault("isVisible");return void 0===e||e}setIsVisible(e){this.setPropertyValue("isVisible",e)}get isEnabled(){let e=this.getPropertyValueWithoutDefault("isEnabled");return void 0===e||e}setIsEnabled(e){this.setPropertyValue("isEnabled",e)}onPropertyValueChanged(e,t,s){"value"!==e||this.hasText||null==(i=this.locTextValue)||i.strChanged();var i,n="itemValuePropertyChanged";this.locOwner&&this.locOwner[n]&&this.locOwner[n](this,e,t,s)}getConditionRunner(e){return e?this.getVisibleConditionRunner():this.getEnableConditionRunner()}getVisibleConditionRunner(){let e=this.getExpressionFromSurvey("visibleIf");return e?(this.visibleConditionRunner||(this.visibleConditionRunner=new X(e)),this.visibleConditionRunner.expression=e,this.visibleConditionRunner):null}getEnableConditionRunner(){let e=this.getExpressionFromSurvey("enableIf");return e?(this.enableConditionRunner||(this.enableConditionRunner=new X(e)),this.enableConditionRunner.expression=e,this.enableConditionRunner):null}get selected(){let e=this._locOwner;return e instanceof tz&&e.isItemSelected&&void 0===this.selectedValue&&(this.selectedValue=new eb(()=>e.isItemSelected(this))),this.selectedValue}getComponent(){return this._locOwner instanceof tz?this.componentValue||this._locOwner.itemComponent:this.componentValue}setComponent(e){this.componentValue=e}setRootElement(e){this._htmlElement=e}getRootElement(){return this._htmlElement}getEnabled(){return this.isEnabled}setEnabled(e){this.setIsEnabled(e)}getVisible(){let e=void 0===this.isVisible||this.isVisible,t=void 0===this._visible||this._visible;return e&&t}setVisible(e){this.visible!==e&&(this._visible=e)}get _visible(){return this.getPropertyValue("visible",!0)}set _visible(e){this.setPropertyValue("visible",e)}getLocTitle(){return this.locText}getTitle(){return this.text}setLocTitle(e){}setTitle(e){}}V([e_()],tj.prototype,"selectedValue",void 0),V([e_({defaultValue:""})],tj.prototype,"icon",void 0),V([e_()],tj.prototype,"randomize",void 0),V([e_()],tj.prototype,"randomizeCategory",void 0),ew.createItemValue=function(e,t){var s=null;return(s=t?Q.metaData.createClass(t,{}):"function"==typeof e.getType?new tj(null,void 0,e.getType()):new tj(null)).setData(e),s}
vendor: 7,378 bytes, line 1
1,ew.itemValueLocStrChanged=function(e){tj.locStrsChanged(e)},A.getItemValuesDefaultValue=(e,t)=>{let s=[];return tj.setData(s,Array.isArray(e)?e:[],t),s},H.addClass("itemvalue",[{name:"!value",isUnique:!0},{name:"text",serializationProperty:"locText"},{name:"visibleIf:condition",locationInTable:"detail"},{name:"enableIf:condition",locationInTable:"detail",visibleIf:e=>!e||"rateValues"!==e.ownerPropertyName},{name:"randomize:boolean",default:!0,visible:!1,locationInTable:"detail"},{name:"randomizeCategory:string",visible:!1,locationInTable:"detail"}],e=>new tj(e));class tG extends ew{constructor(e=null,t=null){super(),this.expressionIsRunning=!1,this.isCalculated=!1,e&&(this.name=e),t&&(this.expression=t)}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"expression"===e&&this.rerunExpression()}setOwner(e){this.data=e,this.rerunExpression()}getOwner(){return this.data}getType(){return"calculatedvalue"}getSurvey(e=!1){return this.data&&this.data.getSurvey?this.data.getSurvey():null}get owner(){return this.data}locCalculation(){this.expressionIsRunning=!0}unlocCalculation(){this.expressionIsRunning=!1}resetCalculation(){this.isCalculated=!1}doCalculation(e,t){this.isCalculated||(this.runExpressionCore(e,t),this.isCalculated=!0)}runExpression(e){this.runExpressionCore(null,e)}get value(){if(this.data)return this.data.getVariable(this.name)}setValue(e){this.data&&this.data.setVariable(this.name,e)}get canRunExpression(){return!!this.data&&!this.isLoadingFromJson&&!!this.expression&&!this.expressionIsRunning&&!!this.name}rerunExpression(){this.canRunExpression&&this.runExpression({survey:this.getSurvey()})}onDependencyValueChanged(e,t){this.rerunExpression()}runExpressionCore(e,t){this.canRunExpression&&this.ensureExpression()&&(this.locCalculation(),e&&this.runDependentExpressions(e,t),this.expressionRunner.runContext(this.getValueGetterContext(),this.getPropertiesCopy(t,"expression")))}runDependentExpressions(e,t){var s=this.expressionRunner.getVariables();if(s)for(var i=0;i<e.length;i++){var n=e[i];n===this||0>s.indexOf(n.name)||n.doCalculation(e,t)}}ensureExpression(){let e=this.getExpressionFromSurvey("expression");return!!e&&(this.expressionRunner?this.expressionRunner.expression=e:(this.expressionRunner=this.createExpressionRunner(e),this.expressionRunner.onRunComplete=e=>{w.isTwoValueEquals(e,this.value,!1,!0,!1)||this.setValue(e),this.unlocCalculation()}),!0)}}V([e_()],tG.prototype,"name",void 0),V([e_()],tG.prototype,"includeIntoResult",void 0),V([e_()],tG.prototype,"expression",void 0),H.addClass("calculatedvalue",[{name:"!name",isUnique:!0},"expression:expression","includeIntoResult:boolean"],function(){return new tG},"base");class tZ extends ew{constructor(e=null){super(),this.expression=e}getType(){return"expressionitem"}getOwner(){return this.locOwner}runCondition(e){let t=!1;return this.runExpressionByProperty("expression",e,e=>{t=!0===e}),t}get locHtml(){return this.getLocalizableString("html")}getLocale(){return this.locOwner?this.locOwner.getLocale():""}getMarkdownHtml(e,t,s){return this.locOwner?this.locOwner.getMarkdownHtml(e,t,s):void 0}getRenderer(e){return this.locOwner?this.locOwner.getRenderer(e):null}getRendererContext(e){return this.locOwner?this.locOwner.getRendererContext(e):e}getProcessedText(e){return this.locOwner?this.locOwner.getProcessedText(e):e}getSurvey(e=!1){return this.locOwner}}V([e_({returnValue:""})],tZ.prototype,"expression",void 0);class tJ extends tZ{constructor(e=null,t=null){super(e),t&&(this.html=t)}getType(){return"htmlconditionitem"}}V([e_({localizable:{markdown:!0}})],tJ.prototype,"html",void 0);class tK extends tZ{constructor(e=null,t=null){super(e),t&&(this.url=t)}getType(){return"urlconditionitem"}}V([e_({localizable:!0})],tK.prototype,"url",void 0),H.addClass("expressionitem",["expression:condition"],function(){return new tZ},"base"),H.addClass("htmlconditionitem",[{name:"html:html",serializationProperty:"locHtml"}],function(){return new tJ},"expressionitem"),H.addClass("urlconditionitem",[{name:"url:string",serializationProperty:"locUrl"}],function(){return new tK},"expressionitem");class tY{constructor(){this.parser=new DOMParser}assignValue(e,t,s){Array.isArray(e[t])?e[t].push(s):void 0!==e[t]?e[t]=[e[t]].concat(s):"object"==typeof s&&1===Object.keys(s).length&&Object.keys(s)[0]===t?e[t]=s[t]:e[t]=s}xml2Json(e,t){if(e.children&&e.children.length>0)for(let s=0;s<e.children.length;s++){let i=e.children[s],n={};this.xml2Json(i,n),this.assignValue(t,i.nodeName,n)}else this.assignValue(t,e.nodeName,e.textContent)}parseXmlString(e){let t=this.parser.parseFromString(e,"text/xml"),s={};return this.xml2Json(t,s),s}}class t$ extends ew{constructor(){super(...arguments),this.lastObjHash="",this.isRunningValue=!1,this.processedUrl="",this.processedPath="",this.isUsingCacheFromUrl=void 0,this.error=null,this.createItemValue=e=>new tj(e)}static get EncodeParameters(){return p.web.encodeUrlParams}static set EncodeParameters(e){p.web.encodeUrlParams=e}static clearCache(){t$.itemsResult={},t$.sendingSameRequests={}}static addSameRequest(e){if(!e.isUsingCache)return!1;var t=e.objHash,s=t$.sendingSameRequests[t];return s?(s.push(e),e.isRunningValue=!0,!0):(t$.sendingSameRequests[e.objHash]=[],!1)}static unregisterSameRequests(e,t){if(e.isUsingCache){var s=t$.sendingSameRequests[e.objHash];if(delete t$.sendingSameRequests[e.objHash],s)for(var i=0;i<s.length;i++)s[i].isRunningValue=!1,s[i].getResultCallback&&s[i].getResultCallback(t)}}static get onBeforeSendRequest(){return p.web.onBeforeRequestChoices}static set onBeforeSendRequest(e){p.web.onBeforeRequestChoices=e}static getCachedItemsResult(e){var t=e.objHash,s=t$.itemsResult[t];return!!s&&(e.getResultCallback&&e.getResultCallback(s),!0)}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"url"===e&&(this.owner&&this.owner.setPropertyValue("isUsingRestful",!!s),this.isUsingCacheFromUrl=void 0,s&&(s.indexOf(t$.cacheText)>-1?this.isUsingCacheFromUrl=!0:s.indexOf(t$.noCacheText)>-1&&(this.isUsingCacheFromUrl=!1)))}getSurvey(e=!1){return this.owner?this.owner.survey:null}run(e=null){if(this.url&&this.getResultCallback){if(this.processedText(e),!this.processedUrl){this.doEmptyResultCallback({}),this.lastObjHash=this.objHash;return}this.lastObjHash===this.objHash||(this.lastObjHash=this.objHash,this.error=null,this.useChangedItemsResults()||t$.addSameRequest(this)||this.sendRequest())}}get isUsingCache(){return!0===this.isUsingCacheFromUrl||!1!==this.isUsingCacheFromUrl&&p.web.cacheLoadedChoices}get isRunning(){return this.getIsRunning()}getIsRunning(){return this.isRunningValue}get isWaitingForParameters(){return this.url&&!this.processedUrl}useChangedItemsResults(){return t$.getCachedItemsResult(this)}doEmptyResultCallback(e){var t=[];this.updateResultCallback&&(t=this.updateResultCallback(t,e)),this.getResultCallback(t)}processedText(e){var t=this.url;if(t&&(t=t.replace(t$.cacheText,"").replace(t$.noCacheText,"")),e){var s=e.processTextEx({text:t,runAtDesign:!0}),i=e.processTextEx({text:this.path,runAtDesign:!0});s.hasAllValuesOnLastRun&&i.hasAllValuesOnLastRun?(this.processedUrl=s.text,this.processedPath=i.text):(this.processedUrl="",this.processedPath="")}else this.processedUrl=t,this.processedPath=this.path;this.onProcessedUrlCallback&&this.onProcessedUrlCallback(this.processedUrl,this.processedPath)}parseResponse(e){let t;
1if(e&&"function"==typeof e.indexOf&&0===e.indexOf("<"))t=new tY().parseXmlString(e);else try{t=JSON.parse(e)}catch(s){t=(e||"").split("\n").map(e=>e.trim(" ")).filter(e=>!!e)}return t}sendRequest(){"u">typeof XMLHttpRequest?this.sendXmlHttpRequest():"u">typeof fetch?this.sendFetchRequest():(this.error=new eA("The browser does not support XMLHttpRequest or fetch API","",this.owner),this.doEmptyResultCallback(""))}sendXmlHttpRequest(){var e=new XMLHttpRequest;e.open("GET",this.processedUrl),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var t=this,s=this.objHash;e.onload=function(){t.beforeLoadRequest(),200===e.status?t.onLoad(t.parseResponse(e.response),s):t.onError(e.statusText,e.responseText)};var i={url:this.processedUrl,request:e};p.web.onBeforeRequestChoices&&p.web.onBeforeRequestChoices(this,i),this.beforeSendRequest(),i.request.send()}sendFetchRequest(){let e=this,t=this.objHash,s={url:this.processedUrl,fetchOptions:{method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"}}};p.web.onBeforeRequestChoices&&p.web.onBeforeRequestChoices(this,s),this.beforeSendRequest(),fetch(s.url,s.fetchOptions).then(s=>(e.beforeLoadRequest(),200===s.status)?s.text().then(s=>{e.onLoad(e.parseResponse(s),t)}):s.text().then(t=>{e.onError(s.statusText,t)})).catch(t=>{e.onError(t.message,"")})}getType(){return"choicesByUrl"}get isEmpty(){return!this.url&&!this.path}dispose(){super.dispose(),this.getResultCallback=null,this.beforeSendRequestCallback=null,this.updateResultCallback=null,this.getItemValueCallback=null}getCustomPropertiesNames(){for(var e=this.getCustomProperties(),t=[],s=0;s<e.length;s++)t.push(this.getCustomPropertyName(e[s].name));return t}getCustomPropertyName(e){return e+"Name"}getCustomProperties(){for(var e=H.getProperties(this.itemValueType),t=[],s=0;s<e.length;s++)"value"!==e[s].name&&"text"!==e[s].name&&"visibleIf"!==e[s].name&&"enableIf"!==e[s].name&&t.push(e[s]);return t}getAllPropertiesNames(){let e=[];return H.getPropertiesByObj(this).forEach(t=>e.push(t.name)),this.getCustomPropertiesNames().forEach(t=>e.push(t)),e}setData(e){e||(e={}),this.getAllPropertiesNames().forEach(t=>{this[t]=e[t]});let t=e.attachData||e.attachOriginalItems;void 0!==t&&(this.attachData=t)}getData(){let e={},t=!1;return this.getAllPropertiesNames().forEach(s=>{let i=this[s];this.isValueEmpty(i)||i===this.getDefaultPropertyValue(s)||(e[s]=i,t=!0)}),t?e:null}get attachOriginalItems(){return this.attachData}set attachOriginalItems(e){this.attachData=e}get itemValueType(){if(!this.owner)return"itemvalue";var e=H.findProperty(this.owner.getType(),"choices");return e&&"itemvalue[]"!=e.type?e.type:"itemvalue"}clear(){this.setData(void 0)}beforeSendRequest(){this.isRunningValue=!0,this.beforeSendRequestCallback&&this.beforeSendRequestCallback()}beforeLoadRequest(){this.isRunningValue=!1}onLoad(e,t=null){t||(t=this.objHash);let s=[],i=this.getResultAfterPath(e);if(i&&i.length)for(let e=0;e<i.length;e++){let t=i[e];if(!t)continue;let n=this.getItemValueCallback?this.getItemValueCallback(t):this.getValue(t),r=this.createItemValue(n);this.setTitle(r,t),this.setCustomProperties(r,t),this.attachData&&(r.originalItem=t,r.data=t);let a=this.getImageLink(t);a&&(r.imageLink=a),this.setItemValueProperties(r,t),s.push(r)}else this.allowEmptyResponse||(this.error=new eL(null,this.owner));this.updateResultCallback&&(s=this.updateResultCallback(s,e)),this.isUsingCache&&(t$.itemsResult[t]=s),this.callResultCallback(s,t),t$.unregisterSameRequests(this,s)}setItemValueProperties(e,t){["isExclusive","showCommentArea","isCommentRequired","visibleIf","enableIf"].forEach(s=>{void 0!==t[s]&&(e[s]=t[s])})}callResultCallback(e,t){t==this.objHash&&this.getResultCallback(e)}setCustomProperties(e,t){for(var s=this.getCustomProperties(),i=0;i<s.length;i++){var n=s[i],r=this.getValueCore(t,this.getPropertyBinding(n.name));this.isValueEmpty(r)||(e[n.name]=r)}}getPropertyBinding(e){return this[this.getCustomPropertyName(e)]?this[this.getCustomPropertyName(e)]:this[e]?this[e]:e}onError(e,t){this.error=new eA(e,t,this.owner),this.doEmptyResultCallback(t),t$.unregisterSameRequests(this,[])}getResultAfterPath(e){if(!e||!this.processedPath)return e;for(var t=this.getPathes(),s=0;s<t.length;s++)if(!(e=e[t[s]]))return null;return e}getPathes(){var e=[];return 0==(e=this.processedPath.indexOf(";")>-1?this.path.split(";"):this.processedPath.indexOf(",")>-1?this.processedPath.split(","):this.processedPath.split(".")).length&&e.push(this.processedPath),e}getValue(e){return e?this.valueName?this.getValueCore(e,this.valueName):e instanceof Object?Object.keys(e).length<1?null:e[Object.keys(e)[0]]:e:null}setTitle(e,t){var s=this.titleName?this.titleName:"title",i=this.getValueCore(t,s);i&&e.locText.setJson(i)}getImageLink(e){var t=this.imageLinkName?this.imageLinkName:"imageLink";return this.getValueCore(e,t)}getValueCore(e,t){if(!e)return null;if(0>t.indexOf("."))return e[t];for(var s=t.split("."),i=0;i<s.length;i++)if(!(e=e[s[i]]))return null;return e}get objHash(){return this.processedUrl+";"+this.processedPath+";"+this.valueName+";"+this.titleName+";"+this.imageLinkName+";"+this.attachData}}t$.cacheText="{CACHE}",t$.noCacheText="{NOCACHE}",t$.itemsResult={},t$.sendingSameRequests={},V([e_({returnValue:""})],t$.prototype,"url",void 0),V([e_({returnValue:""})],t$.prototype,"path",void 0),V([e_({returnValue:""})],t$.prototype,"valueName",void 0),V([e_({returnValue:""})],t$.prototype,"titleName",void 0),V([e_({returnValue:""})],t$.prototype,"imageLinkName",void 0),V([e_()],t$.prototype,"allowEmptyResponse",void 0),V([e_()],t$.prototype,"attachData",void 0),H.addClass("choicesByUrl",["url","path","valueName","titleName",{name:"imageLinkName",visibleIf:function(e){return!!e&&!!e.owner&&"imagepicker"==e.owner.getType()}},{name:"allowEmptyResponse:boolean"},{name:"attachData:boolean",alternativeName:"attachOriginalItems",visible:!1}],function(){return new t$});class tX{constructor(){this._id=tX.counter++}get id(){return this._id}toString(e){return""}hasFunction(){return!1}hasAsyncFunction(){return!1}
1addToAsyncList(e){}addOperandsToList(e){e.push(this),this.addChildrenToList(e)}isEqual(e){return!!e&&e.getType()===this.getType()&&this.isContentEqual(e)}areOperatorsEquals(e,t){return!e&&!t||!!e&&e.isEqual(t)}addChildrenToList(e){}}tX.counter=1;class t1 extends tX{constructor(e,t=null,s=null,i=!1){super(),this.operatorName=e,this.left=t,this.right=s,this.isArithmeticValue=i,i?this.consumer=t9.binaryFunctions.arithmeticOp(e):this.consumer=t9.binaryFunctions[e],null==this.consumer&&t9.throwInvalidOperatorError(e)}get requireStrictCompare(){return this.getIsOperandRequireStrict(this.left)||this.getIsOperandRequireStrict(this.right)}getIsOperandRequireStrict(e){return!!e&&e.requireStrictCompare}getType(){return"binary"}get isArithmetic(){return this.isArithmeticValue}get isConjunction(){return"or"==this.operatorName||"and"==this.operatorName}get conjunction(){return this.isConjunction?this.operatorName:""}get operator(){return this.operatorName}get leftOperand(){return this.left}get rightOperand(){return this.right}isContentEqual(e){return e.operator===this.operator&&this.areOperatorsEquals(this.left,e.left)&&this.areOperatorsEquals(this.right,e.right)}evaluateParam(e,t){return null==e?null:e.evaluate(t)}evaluate(e){return this.consumer.call(this,this.evaluateParam(this.left,e),this.evaluateParam(this.right,e),this.requireStrictCompare)}toString(e){if(e){var t=e(this);if(t)return t}return"("+t9.safeToString(this.left,e)+" "+t9.operatorToString(this.operatorName)+" "+t9.safeToString(this.right,e)+")"}setVariables(e){null!=this.left&&this.left.setVariables(e),null!=this.right&&this.right.setVariables(e)}hasFunction(){return!!this.left&&this.left.hasFunction()||!!this.right&&this.right.hasFunction()}addChildrenToList(e){this.left&&this.left.addOperandsToList(e),this.right&&this.right.addOperandsToList(e)}hasAsyncFunction(){return!!this.left&&this.left.hasAsyncFunction()||!!this.right&&this.right.hasAsyncFunction()}addToAsyncList(e){this.left&&this.left.addToAsyncList(e),this.right&&this.right.addToAsyncList(e)}}class t0 extends tX{constructor(e,t){super(),this.expressionValue=e,this.operatorName=t,this.consumer=t9.unaryFunctions[t],null==this.consumer&&t9.throwInvalidOperatorError(t)}get operator(){return this.operatorName}get expression(){return this.expressionValue}getType(){return"unary"}toString(e){if(e){var t=e(this);if(t)return t}let s=t9.operatorToString(this.operator),i=this.expression.toString(e);return this.isRigtOperator?i+" "+s:s+" "+i}get isRigtOperator(){let e=this.operatorName.toLowerCase();return"notempty"===e||"empty"===e}isContentEqual(e){return e.operator==this.operator&&this.areOperatorsEquals(this.expression,e.expression)}hasFunction(){return this.expression.hasFunction()}addChildrenToList(e){this.expression.addOperandsToList(e)}hasAsyncFunction(){return this.expression.hasAsyncFunction()}addToAsyncList(e){this.expression.addToAsyncList(e)}evaluate(e){let t=this.expression.evaluate(e);return this.consumer.call(this,t)}setVariables(e){this.expression.setVariables(e)}}class t2 extends tX{constructor(e){super(),this.values=e}getType(){return"array"}toString(e,t){if(e){let t=e(this);if(t)return t}let s=this.values.map(function(t){return t.toString(e)}).join(", ");return t?s:"["+s+"]"}evaluate(e){return this.values.map(function(t){return t.evaluate(e)})}setVariables(e){this.values.forEach(t=>{t.setVariables(e)})}hasFunction(){return this.values.some(e=>e.hasFunction())}addChildrenToList(e){this.values.forEach(t=>{t.addOperandsToList(e)})}hasAsyncFunction(){return this.values.some(e=>e.hasAsyncFunction())}addToAsyncList(e){this.values.forEach(t=>t.addToAsyncList(e))}isContentEqual(e){if(e.values.length!==this.values.length)return!1;for(var t=0;t<this.values.length;t++)if(!e.values[t].isEqual(this.values[t]))return!1;return!0}}class t5 extends tX{constructor(e){super(),this.value=e}getType(){return"const"}toString(e){if(e){var t=e(this);if(t)return t}return""===this.value?"''":this.value.toString()}get correctValue(){return this.getCorrectValue(this.value)}get requireStrictCompare(){return!1}evaluate(){return this.getCorrectValue(this.value)}setVariables(e){}getCorrectValue(e){if(!e||"string"!=typeof e)return e;if(t9.isBooleanValue(e))return"true"===e.toLowerCase();if(e.length>1&&this.isQuote(e[0])&&this.isQuote(e[e.length-1]))return e.substring(1,e.length-1);if(w.isNumber(e)){if("0"===e[0]&&0!=e.indexOf("0x")){let t=e.length,s=t>1&&("."===e[1]||","===e[1]);if(!s&&t>1||s&&t<2)return e}return w.getNumber(e)}return e}isBoolean(){return this.value&&"string"==typeof this.value?t9.isBooleanValue(this.value):!0===this.value||!1===this.value}isContentEqual(e){return e.value==this.value}isQuote(e){return"'"==e||'"'==e}}class t7 extends t5{static get DisableConversionChar(){return p.expressionDisableConversionChar}static set DisableConversionChar(e){p.expressionDisableConversionChar=e}constructor(e){super(e),this.variableName=e,this.valueInfo={},this.useValueAsItIs=!1,this.variableName&&this.variableName.length>1&&this.variableName[0]===t7.DisableConversionChar&&(this.variableName=this.variableName.substring(1),this.useValueAsItIs=!0)}get requireStrictCompare(){return!0===this.valueInfo.strictCompare}getType(){return"variable"}toString(e){if(e){var t=e(this);if(t)return t}var s=this.useValueAsItIs?t7.DisableConversionChar:"";return p.expressionVariableDelimiters.start+s+this.variableName+p.expressionVariableDelimiters.end}get variable(){return this.variableName}evaluate(e){if(this.valueInfo.name=this.variableName,e.getValueInfo(this.valueInfo),!this.valueInfo.hasValue)return this.returnJSONObject(this.variableName);let t=this.valueInfo.value;return this.valueInfo.onProcessValue&&(t=this.valueInfo.onProcessValue(t)),this.getCorrectValue(t)}setVariables(e){e.push(this.variableName)}getCorrectValue(e){return this.useValueAsItIs?e:super.getCorrectValue(e)}isContentEqual(e){return e.variable==this.variable}returnJSONObject(e){if(!e||e.length<2||1>e.indexOf(":"))return null;try{return JSON.parse("{"+e+"}")}catch(e){return null}}}class t4 extends tX{constructor(e,t){super(),this.originalValue=e,this.parameters=t,Array.isArray(t)&&0===t.length&&(this.parameters=new t2([]))}getType(){return"function"}get functionName(){return this.originalValue}get paramValues(){return this.parameters.values}evaluate(e){let t=this.getAsynValue(e);return t?t.value:this.evaluateCore(e)}evaluateCore(e){let t=e.properties,s=this.parameters.evaluate(e);if(this.isAsyncFunction()){let s=this.id,i=e.asyncValues,n=e.onCompleteAsyncFunc;if(i&&n){let r=this;(t=w.createCopy(e.properties)).returnResult=e=>{i[s]={value:e},n(r)}}}let i=ee.Instance.run(this.functionName,s,t,this.parameters.values);return i instanceof Promise?void i.then(e=>{t.returnResult(e)}):i}toString(e){if(e){var t=e(this);if(t)return t}return this.originalValue+"("+this.parameters.toString(e,!0)+")"}setVariables(e){this.parameters.setVariables(e)}isReady(e){return!!this.getAsynValue(e)}addChildrenToList(e){this.parameters.addOperandsToList(e)}getAsynValue(e){return e.asyncValues[this.id]}hasFunction(){return!0}hasAsyncFunction(){return this.isAsyncFunction()||this.parameters.hasAsyncFunction()}isAsyncFunction(){return ee.Instance.isAsyncFunction(this.originalValue)}addToAsyncList(e){let t;if(this.isAsyncFunction()&&(t={operand:this}),this.parameters.hasAsyncFunction()){let e=[];
1this.parameters.addToAsyncList(e),e.forEach(e=>e.parent=t),t||(t={}),t.children=e}t&&e.push(t)}isContentEqual(e){return e.originalValue==this.originalValue&&this.areOperatorsEquals(e.parameters,this.parameters)}}class t9{static throwInvalidOperatorError(e){throw Error("Invalid operator: '"+e+"'")}static safeToString(e,t){return null==e?"":e.toString(t)}static toOperandString(e){return!e||w.isNumber(e)||t9.isBooleanValue(e)||(e="'"+e+"'"),e}static isBooleanValue(e){return!!e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())}static countDecimals(e){if(w.isNumber(e)&&Math.floor(e)!==e){let t=e.toString().split(".");return t.length>1&&t[1].length||0}return 0}static plusMinus(e,t,s){let i=t9.countDecimals(e),n=t9.countDecimals(t);if(i>0||n>0){let e=Math.max(i,n);s=parseFloat(s.toFixed(e))}return s}static isTwoValueEquals(e,t,s=!0){return"undefined"===e&&(e=void 0),"undefined"===t&&(t=void 0),w.isTwoValueEquals(e,t,s)}static operatorToString(e){let t=t9.signs[e];return null==t?e:t}static convertValForDateCompare(e,t){if(t instanceof Date&&"string"==typeof e){let s=f("expression-operand",e);return t.setMilliseconds(0),t.getHours()>0||t.getMinutes()>0||t.getSeconds()>0||s.setHours(0,0,0),s}return"string"==typeof t&&e instanceof Date&&(t.length<17&&e.setSeconds(0,0),t.length<14&&e.setMinutes(0,0),t.length<11&&e.setHours(0,0)),e}}t9.unaryFunctions={empty:function(e){return w.isValueEmpty(e)},notempty:function(e){return!t9.unaryFunctions.empty(e)},negate:function(e){return!e}},t9.binaryFunctions={arithmeticOp(e){let t=(e,t)=>w.isValueEmpty(e)?"number"==typeof t?0:"string"==typeof e?e:"string"==typeof t?"":Array.isArray(t)?[]:0:e;return function(s,i){s=t(s,i),i=t(i,s);let n=t9.binaryFunctions[e];return null==n?null:n.call(this,s,i)}},and:function(e,t){return e&&t},or:function(e,t){return e||t},plus:function(e,t){return w.sumAnyValues(e,t)},minus:function(e,t){return w.correctAfterPlusMinis(e,t,e-t)},mul:function(e,t){return w.correctAfterMultiple(e,t,e*t)},div:function(e,t){return t?e/t:null},mod:function(e,t){return t?e%t:null},power:function(e,t){return Math.pow(e,t)},greater:function(e,t){return null!=e&&null!=t&&(e=t9.convertValForDateCompare(e,t),t=t9.convertValForDateCompare(t,e),e>t)},less:function(e,t){return null!=e&&null!=t&&(e=t9.convertValForDateCompare(e,t),t=t9.convertValForDateCompare(t,e),e<t)},greaterorequal:function(e,t){return!!t9.binaryFunctions.equal(e,t)||t9.binaryFunctions.greater(e,t)},lessorequal:function(e,t){return!!t9.binaryFunctions.equal(e,t)||t9.binaryFunctions.less(e,t)},equal:function(e,t,s){return e=t9.convertValForDateCompare(e,t),t=t9.convertValForDateCompare(t,e),t9.isTwoValueEquals(e,t,!0!==s)},notequal:function(e,t,s){return!t9.binaryFunctions.equal(e,t,s)},contains:function(e,t){return t9.binaryFunctions.containsCore(e,t,!0)},notcontains:function(e,t){return!(e||w.isValueEmpty(t))||t9.binaryFunctions.containsCore(e,t,!1)},anyof:function(e,t){if(w.isValueEmpty(e)&&w.isValueEmpty(t))return!0;if(w.isValueEmpty(e)||!Array.isArray(e)&&0===e.length)return!1;if(w.isValueEmpty(t))return!0;if(!Array.isArray(e))return t9.binaryFunctions.contains(t,e);if(!Array.isArray(t))return t9.binaryFunctions.contains(e,t);for(var s=0;s<t.length;s++)if(t9.binaryFunctions.contains(e,t[s]))return!0;return!1},noneof:function(e,t){return!t9.binaryFunctions.anyof(e,t)},allof:function(e,t){if(!e&&!w.isValueEmpty(t))return!1;if(!Array.isArray(t))return t9.binaryFunctions.contains(e,t);for(var s=0;s<t.length;s++)if(!t9.binaryFunctions.contains(e,t[s]))return!1;return!0},containsCore:function(e,t,s){if(Array.isArray(e)&&!e.length)return!s;if(!e&&0!==e&&!1!==e)return!1;if(e.length||(e=e.toString()),"string"==typeof e||e instanceof String){if(!t)return!1;t=t.toString(),p.comparator.caseSensitive||(e=e.toLowerCase(),t=t.toLowerCase());var i=e.indexOf(t)>-1;return s?i:!i}for(var n=Array.isArray(t)?t:[t],r=0;r<n.length;r++){var a=0;for(t=n[r];a<e.length&&!t9.isTwoValueEquals(e[a],t);a++);if(a==e.length)return!s}return s}},t9.signs={less:"<",lessorequal:"<=",greater:">",greaterorequal:">
1=",equal:"==",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",and:"and",or:"or",power:"^",mod:"%",negate:"!"};let t3=function(){class e extends SyntaxError{constructor(e,t,s,i){super(e),this.expected=t,this.found=s,this.location=i,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let s=null,i=e.find(e=>e.source===this.location.source);i&&(s=i.text.split(/\r\n|\n|\r/g));let n=this.location.start,r=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(n):n,a=this.location.source+":"+r.line+":"+r.column;if(s){let e=this.location.end,i="".padEnd(r.line.toString().length," "),o=s[n.line-1],l=(n.line===e.line?e.column:o.length+1)-n.column||1;t+="\n --> "+a+"\n"+i+" |\n"+r.line+" | "+o+"\n"+i+" | "+"".padEnd(n.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+a}return t}static buildMessage(e,t){function s(e){return e.codePointAt(0).toString(16).toUpperCase()}let i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function n(e){return i?e.replace(i,e=>"\\u{"+s(e)+"}"):e}function r(e){return n(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+s(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+s(e)))}function a(e){return n(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+s(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+s(e)))}let o={literal:e=>'"'+r(e.text)+'"',class(e){let t=e.parts.map(e=>Array.isArray(e)?a(e[0])+"-"+a(e[1]):a(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return o[e.type](e)}return"Expected "+function(e){let t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let s=1;s<t.length;s++)t[s-1]!==t[s]&&(t[e]=t[s],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+(t?'"'+r(t)+'"':"end of input")+" found."}}return{StartRules:["Expression"],SyntaxError:e,parse:function(t,s){let i,n={},r=(s=void 0!==s?s:{}).grammarSource,a={Expression:e_},o=e_,l="equal",u="undefined",h="null",d=/^[\-]/,c=/^[^"']/,p=/^[^{}]/,g=/^[0-9]/,m=/^[1-9]/,v=/^[a-zA-Z_]/,C=/^[ \t\n\r]/,y=eM("||",!1),f=eM("or",!0),b=eM("&&",!1),w=eM("and",!0),V=eM("<=",!1),x=eM("lessorequal",!0),I=eM(">=",!1),E=eM("greaterorequal",!0),S=eM("==",!1),P=eM("equal",!0),R=eM("=",!1),T=eM("!=",!1),A=eM("notequal",!0),L=eM("<",!1),D=eM("less",!0),O=eM(">",!1),N=eM("greater",!0),M=eM("+",!1),k=eM("-",!1),q=eM("*",!1),F=eM("/",!1),B=eM("%",!1),_=eM("^",!1),Q=eM("power",!0),H=eM("*=",!1),z=eM("contains",!0),U=eM("contain",!0),W=eM("notcontains",!0),j=eM("notcontain",!0),G=eM("anyof",!0),Z=eM("allof",!0),J=eM("noneof",!0),K=eM("(",!1),Y=eM(")",!1),$=eM("!",!1),X=eM("negate",!0),ee=eM("empty",!0),et=eM("notempty",!0),es=eM("undefined",!1),ei=eM("null",!1),en=eM("{",!1),er=eM("}",!1),ea=eM("''",!1),eo=eM('""',!1),el=eM("'",!1),eu=eM('"',!1),eh=eM("[",!1),ed=eM("]",!1),ec=eM(",",!1),ep=eM("true",!0),eg=eM("false",!0),em=eM("0x",!1),ev=ek(["-"],!1,!1,!1),eC=eM(".",!1),ey=eM("0",!1),ef=eM("\\'",!1),eb=eM('\\"',!1),ew=ek(['"',"'"],!0,!1,!1),eV=ek(["{","}"],!0,!1,!1),ex=ek([["0","9"]],!1,!1,!1),eI=ek([["1","9"]],!1,!1,!1),eE=ek([["a","z"],["A","Z"],"_"],!1,!1,!1),eS=ek([" "," ","\n","\r"],!1,!1,!1),eP=0|s.peg$currPos,eR=eP,eT=[{line:1,column:1}],eA=eP,eL=s.peg$maxFailExpected||[],eD=0|s.peg$silentFails,eO={};if(s.startRule){if(!(s.startRule in a))throw Error("Can't start parsing from rule \""+s.startRule+'".');o=a[s.startRule]}function eN(){return t.substring(eR,eP)}function eM(e,t){return{type:"literal",text:e,ignoreCase:t}}function ek(e,t,s,i){return{type:"class",parts:e,inverted:t,ignoreCase:s,unicode:i}}function eq(e){let s,i=eT[e];if(i)return i;if(e>=eT.length)s=eT.length-1;else for(s=e;!eT[--s];);for(i={line:(i=eT[s]).line,column:i.column};s<e;)10===t.charCodeAt(s)?(i.line++,i.column=1):i.column++,s++;return eT[e]=i,i}function eF(e,t,s){let i=eq(e),n=eq(t);return{source:r,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:n.line,column:n.column}}}function eB(e){eP<eA||(eP>eA&&(eA=eP,eL=[]),eL.push(e))}function e_(){let e,t,s,i,r,a,o,l,u=34*eP+0,h=eO[u];if(h)return eP=h.nextPos,h.result;if(e=eP,e8(),(t=eH())!==n){for(s=[],i=eP,r=e8(),(a=eQ())!==n?(o=e8(),(l=eH())!==n?i=r=[r,a,o,l]:(eP=i,i=n)):(eP=i,i=n);i!==n;)s.push(i),i=eP,r=e8(),(a=eQ())!==n?(o=e8(),(l=eH())!==n?i=r=[r,a,o,l]:(eP=i,i=n)):(eP=i,i=n);i=e8(),eR=e,e=te(t,s,!0)}else eP=e,e=n;return eO[u]={nextPos:eP,result:e},e}function eQ(){let e,s,i=34*eP+1,r=eO[i];return r?(eP=r.nextPos,r.result):(e=eP,"||"===t.substr(eP,2)?(s="||",eP+=2):(s=n,0===eD&&eB(y)),s===n&&("or"===(s=t.substr(eP,2)).toLowerCase()?eP+=2:(s=n,0===eD&&eB(f))),s!==n&&(eR=e,s="or"),e=s,eO[i]={nextPos:eP,result:e},e)}function eH(){let e,t,s,i,r,a,o,l,u=34*eP+2,h=eO[u];if(h)return eP=h.nextPos,h.result;if(e=eP,(t=eU())!==n){for(s=[],i=eP,r=e8(),(a=ez())!==n?(o=e8(),(l=eU())!==n?i=r=[r,a,o,l]:(eP=i,i=n)):(eP=i,i=n);i!==n;)s.push(i),i=eP,r=e8(),(a=ez())!==n?(o=e8(),(l=eU())!==n?i=r=[r,a,o,l]:(eP=i,i=n)):(eP=i,i=n);eR=e,e=te(t,s,!0)}else eP=e,e=n;return eO[u]={nextPos:eP,result:e},e}function ez(){let e,s,i=34*eP+3,r=eO[i];return r?(eP=r.nextPos,r.result):(e=eP,"&&"===t.substr(eP,2)?(s="&&",eP+=2):(s=n,0===eD&&eB(b)),s===n&&("and"===(s=t.substr(eP,3)).toLowerCase()?eP+=3:(s=n,0===eD&&eB(w))),s!==n&&(eR=e,s="and"),e=s,eO[i]={nextPos:eP,result:e},e)}function eU(){let e,t,s,i,r,a,o,l,u=34*eP+4,h=eO[u];if(h)return eP=h.nextPos,h.result;
1if(e=eP,(t=ej())!==n){for(s=[],i=eP,r=e8(),(a=eW())!==n?(o=e8(),(l=ej())!==n?i=r=[r,a,o,l]:(eP=i,i=n)):(eP=i,i=n);i!==n;)s.push(i),i=eP,r=e8(),(a=eW())!==n?(o=e8(),(l=ej())!==n?i=r=[r,a,o,l]:(eP=i,i=n)):(eP=i,i=n);eR=e,e=te(t,s)}else eP=e,e=n;return eO[u]={nextPos:eP,result:e},e}function eW(){let e,s,i=34*eP+5,r=eO[i];return r?(eP=r.nextPos,r.result):(e=eP,"<="===t.substr(eP,2)?(s="<=",eP+=2):(s=n,0===eD&&eB(V)),s===n&&("lessorequal"===(s=t.substr(eP,11)).toLowerCase()?eP+=11:(s=n,0===eD&&eB(x))),s!==n&&(eR=e,s="lessorequal"),(e=s)===n&&(e=eP,">="===t.substr(eP,2)?(s=">=",eP+=2):(s=n,0===eD&&eB(I)),s===n&&("greaterorequal"===(s=t.substr(eP,14)).toLowerCase()?eP+=14:(s=n,0===eD&&eB(E))),s!==n&&(eR=e,s="greaterorequal"),(e=s)===n&&(e=eP,"=="===t.substr(eP,2)?(s="==",eP+=2):(s=n,0===eD&&eB(S)),s===n&&((s=t.substr(eP,5)).toLowerCase()===l?eP+=5:(s=n,0===eD&&eB(P))),s!==n&&(eR=e,s="equal"),(e=s)===n&&(e=eP,61===t.charCodeAt(eP)?(s="=",eP++):(s=n,0===eD&&eB(R)),s===n&&((s=t.substr(eP,5)).toLowerCase()===l?eP+=5:(s=n,0===eD&&eB(P))),s!==n&&(eR=e,s="equal"),(e=s)===n&&(e=eP,"!="===t.substr(eP,2)?(s="!=",eP+=2):(s=n,0===eD&&eB(T)),s===n&&("notequal"===(s=t.substr(eP,8)).toLowerCase()?eP+=8:(s=n,0===eD&&eB(A))),s!==n&&(eR=e,s="notequal"),(e=s)===n&&(e=eP,60===t.charCodeAt(eP)?(s="<",eP++):(s=n,0===eD&&eB(L)),s===n&&("less"===(s=t.substr(eP,4)).toLowerCase()?eP+=4:(s=n,0===eD&&eB(D))),s!==n&&(eR=e,s="less"),(e=s)===n&&(e=eP,62===t.charCodeAt(eP)?(s=">",eP++):(s=n,0===eD&&eB(O)),s===n&&("greater"===(s=t.substr(eP,7)).toLowerCase()?eP+=7:(s=n,0===eD&&eB(N))),s!==n&&(eR=e,s="greater"),e=s)))))),eO[i]={nextPos:eP,result:e},e)}function ej(){let e,t,s,i,r,a,o,l,u=34*eP+6,h=eO[u];if(h)return eP=h.nextPos,h.result;if(e=eP,(t=eZ())!==n){for(s=[],i=eP,r=e8(),(a=eG())!==n?(o=e8(),(l=eZ())!==n?i=r=[r,a,o,l]:(eP=i,i=n)):(eP=i,i=n);i!==n;)s.push(i),i=eP,r=e8(),(a=eG())!==n?(o=e8(),(l=eZ())!==n?i=r=[r,a,o,l]:(eP=i,i=n)):(eP=i,i=n);eR=e,e=te(t,s,!0)}else eP=e,e=n;return eO[u]={nextPos:eP,result:e},e}function eG(){let e,s,i=34*eP+7,r=eO[i];return r?(eP=r.nextPos,r.result):(e=eP,43===t.charCodeAt(eP)?(s="+",eP++):(s=n,0===eD&&eB(M)),s!==n&&(eR=e,s="plus"),(e=s)===n&&(e=eP,45===t.charCodeAt(eP)?(s="-",eP++):(s=n,0===eD&&eB(k)),s!==n&&(eR=e,s="minus"),e=s),eO[i]={nextPos:eP,result:e},e)}function eZ(){let e,t,s,i,r,a,o,l,u=34*eP+8,h=eO[u];if(h)return eP=h.nextPos,h.result;if(e=eP,(t=eK())!==n){for(s=[],i=eP,r=e8(),(a=eJ())!==n?(o=e8(),(l=eK())!==n?i=r=[r,a,o,l]:(eP=i,i=n)):(eP=i,i=n);i!==n;)s.push(i),i=eP,r=e8(),(a=eJ())!==n?(o=e8(),(l=eK())!==n?i=r=[r,a,o,l]:(eP=i,i=n)):(eP=i,i=n);eR=e,e=te(t,s,!0)}else eP=e,e=n;return eO[u]={nextPos:eP,result:e},e}function eJ(){let e,s,i=34*eP+9,r=eO[i];return r?(eP=r.nextPos,r.result):(e=eP,42===t.charCodeAt(eP)?(s="*",eP++):(s=n,0===eD&&eB(q)),s!==n&&(eR=e,s="mul"),(e=s)===n&&(e=eP,47===t.charCodeAt(eP)?(s="/",eP++):(s=n,0===eD&&eB(F)),s!==n&&(eR=e,s="div"),(e=s)===n&&(e=eP,37===t.charCodeAt(eP)?(s="%",eP++):(s=n,0===eD&&eB(B)),s!==n&&(eR=e,s="mod"),e=s)),eO[i]={nextPos:eP,result:e},e)}function eK(){let e,t,s,i,r,a,o,l,u=34*eP+10,h=eO[u];if(h)return eP=h.nextPos,h.result;if(e=eP,(t=e$())!==n){for(s=[],i=eP,r=e8(),(a=eY())!==n?(o=e8(),(l=e$())!==n?i=r=[r,a,o,l]:(eP=i,i=n)):(eP=i,i=n);i!==n;)s.push(i),i=eP,r=e8(),(a=eY())!==n?(o=e8(),(l=e$())!==n?i=r=[r,a,o,l]:(eP=i,i=n)):(eP=i,i=n);eR=e,e=te(t,s,!0)}else eP=e,e=n;return eO[u]={nextPos:eP,result:e},e}function eY(){let e,s,i=34*eP+11,r=eO[i];return r?(eP=r.nextPos,r.result):(e=eP,94===t.charCodeAt(eP)?(s="^",eP++):(s=n,0===eD&&eB(_)),s===n&&("power"===(s=t.substr(eP,5)).toLowerCase()?eP+=5:(s=n,0===eD&&eB(Q))),s!==n&&(eR=e,s="power"),e=s,eO[i]={nextPos:eP,result:e},e)}function e$(){let e,t,s,i,r,a,o,l,u=34*eP+12,h=eO[u];if(h)return eP=h.nextPos,h.result;if(e=eP,(t=e1())!==n){for(s=[],i=eP,r=e8(),(a=eX())!==n?(o=e8(),(l=e1())===n&&(l=null),i=r=[r,a,o,l]):(eP=i,i=n);i!==n;)s.push(i),i=eP,r=e8(),(a=eX())!==n?(o=e8(),(l=e1())===n&&(l=null),i=r=[r,a,o,l]):(eP=i,i=n);eR=e,e=te(t,s)}else eP=e,e=n;return eO[u]={nextPos:eP,result:e},e}function eX(){let e,s,i=34*eP+13,r=eO[i];return r?(eP=r.nextPos,r.result):(e=eP,"*="===t.substr(eP,2)?(s="*=",eP+=2):(s=n,0===eD&&eB(H)),s===n&&("contains"===(s=t.substr(eP,8)).toLowerCase()?eP+=8:(s=n,0===eD&&eB(z)),s===n&&("contain"===(s=t.substr(eP,7)).toLowerCase()?eP+=7:(s=n,0===eD&&eB(U)))),s!==n&&(eR=e,s="contains"),(e=s)===n&&(e=eP,"notcontains"===(s=t.substr(eP,11)).toLowerCase()?eP+=11:(s=n,0===eD&&eB(W)),s===n&&("notcontain"===(s=t.substr(eP,10)).toLowerCase()?eP+=10:(s=n,0===eD&&eB(j))),s!==n&&(eR=e,s="notcontains"),(e=s)===n&&(e=eP,"anyof"===(s=t.substr(eP,5)).toLowerCase()?eP+=5:(s=n,0===eD&&eB(G)),s!==n&&(eR=e,s="anyof"),(e=s)===n&&(e=eP,"allof"===(s=t.substr(eP,5)).toLowerCase()?eP+=5:(s=n,0===eD&&eB(Z)),s!==n&&(eR=e,s="allof"),(e=s)===n&&(e=eP,"noneof"===(s=t.substr(eP,6)).toLowerCase()?eP+=6:(s=n,0===eD&&eB(J)),s!==n&&(eR=e,s="noneof"),e=s)))),eO[i]={nextPos:eP,result:e},e)}function e1(){let e,s,i,r,a,o,l,u,h,d,c,p,g,m,v,C=34*eP+14,y=eO[C];if(y)return eP=y.nextPos,y.result;
1(g=eP,40===t.charCodeAt(eP)?(m="(",eP++):(m=n,0===eD&&eB(K)),m!==n&&(e8(),(v=e_())!==n))?(e8(),41===t.charCodeAt(eP)?eP++:0===eD&&eB(Y),eR=g,g=v):(eP=g,g=n);return g===n&&(g=(o=eO[a=34*eP+15])?(eP=o.nextPos,o.result):((e=eP,(s=e9())!==n&&(40===t.charCodeAt(eP)?(i="(",eP++):(i=n,0===eD&&eB(K)),i!==n))?(r=e2(),41===t.charCodeAt(eP)?eP++:0===eD&&eB(Y),eR=e,e=new t4(s,r)):(eP=e,e=n),eO[a]={nextPos:eP,result:e},e))===n&&(g=function(){let e,s,i,r=34*eP+16,a=eO[r];if(a)return eP=a.nextPos,a.result;if((e=eP,33===t.charCodeAt(eP)?(s="!",eP++):(s=n,0===eD&&eB($)),s===n&&("negate"===(s=t.substr(eP,6)).toLowerCase()?eP+=6:(s=n,0===eD&&eB(X))),s!==n&&(e8(),(i=e1())!==n))?(eR=e,e=new t0(i,"negate")):(eP=e,e=n),e===n)if(e=eP,(s=e0())!==n){let r,a,o,l;if(e8(),(i=(l=eO[o=34*eP+17])?(eP=l.nextPos,l.result):(r=eP,"empty"===(a=t.substr(eP,5)).toLowerCase()?eP+=5:(a=n,0===eD&&eB(ee)),a!==n&&(eR=r,a="empty"),(r=a)===n&&(r=eP,"notempty"===(a=t.substr(eP,8)).toLowerCase()?eP+=8:(a=n,0===eD&&eB(et)),a!==n&&(eR=r,a="notempty"),r=a),eO[o]={nextPos:eP,result:r},r))!==n)eR=e,e=new t0(s,i);else eP=e,e=n}else eP=e,e=n;return eO[r]={nextPos:eP,result:e},e}())===n&&(g=e0())===n&&(g=(p=eO[c=34*eP+20])?(eP=p.nextPos,p.result):((l=eP,91===t.charCodeAt(eP)?(u="[",eP++):(u=n,0===eD&&eB(eh)),u!==n&&(h=e2(),93===t.charCodeAt(eP)?(d="]",eP++):(d=n,0===eD&&eB(ed)),d!==n))?(eR=l,l=h):(eP=l,l=n),eO[c]={nextPos:eP,result:l},l)),eO[C]={nextPos:eP,result:g},g}function e0(){let e,s,i,r,a=34*eP+18,o=eO[a];return o?(eP=o.nextPos,o.result):(e=eP,e8(),t.substr(eP,9)===u?(s=u,eP+=9):(s=n,0===eD&&eB(es)),s===n&&(t.substr(eP,4)===h?(s=h,eP+=4):(s=n,0===eD&&eB(ei))),s!==n?(eR=e,e=null):(eP=e,e=n),e===n&&((e=eP,e8(),(s=function(){let e,s,i,r,a,o,l,u,h=34*eP+19,c=eO[h];if(c)return eP=c.nextPos,c.result;return a=eP,(o=(r=eO[i=34*eP+22])?(eP=r.nextPos,r.result):(e=eP,"true"===(s=t.substr(eP,4)).toLowerCase()?eP+=4:(s=n,0===eD&&eB(ep)),s!==n&&(eR=e,s=!0),(e=s)===n&&(e=eP,"false"===(s=t.substr(eP,5)).toLowerCase()?eP+=5:(s=n,0===eD&&eB(eg)),s!==n&&(eR=e,s=!1),e=s),eO[i]={nextPos:eP,result:e},e))!==n&&(eR=a),(a=o)===n&&(a=eP,(o=function(){let e,s,i,r=34*eP+23,a=eO[r];if(a)return eP=a.nextPos,a.result;if(e=eP,"0x"===t.substr(eP,2)?(s="0x",eP+=2):(s=n,0===eD&&eB(em)),s!==n&&(i=e3())!==n?(eR=e,e=parseInt(eN(),16)):(eP=e,e=n),e===n){let r,a,u,h,c;if(e=eP,s=t.charAt(eP),d.test(s)?eP++:(s=n,0===eD&&eB(ev)),s===n&&(s=null),(i=(c=eO[h=34*eP+24])?(eP=c.nextPos,c.result):(r=eP,(a=e3())!==n?(46===t.charCodeAt(eP)?(u=".",eP++):(u=n,0===eD&&eB(eC)),u!==n&&e3()!==n?(eR=r,r=parseFloat(eN())):(eP=r,r=n)):(eP=r,r=n),r===n&&(r=eP,(a=function(){let e,s,i=34*eP+31,r=eO[i];if(r)return eP=r.nextPos,r.result;if(e=[],s=t.charAt(eP),m.test(s)?eP++:(s=n,0===eD&&eB(eI)),s!==n)for(;s!==n;)e.push(s),s=t.charAt(eP),m.test(s)?eP++:(s=n,0===eD&&eB(eI));else e=n;return eO[i]={nextPos:eP,result:e},e}())!==n?((u=e3())===n&&(u=null),eR=r,r=parseInt(eN(),10)):(eP=r,r=n),r===n&&(r=eP,48===t.charCodeAt(eP)?(a="0",eP++):(a=n,0===eD&&eB(ey)),a!==n&&(eR=r,a=0),r=a)),eO[h]={nextPos:eP,result:r},r))!==n){var o,l;eR=e,o=s,l=i,e=null==o?l:-l}else eP=e,e=n}return eO[r]={nextPos:eP,result:e},e}())!==n&&(eR=a),(a=o)===n&&(a=eP,(o=e9())!==n&&(eR=a),(a=o)===n&&(a=eP,"''"===t.substr(eP,2)?(o="''",eP+=2):(o=n,0===eD&&eB(ea)),o!==n&&(eR=a,o=""),(a=o)===n)&&(a=eP,'""'===t.substr(eP,2)?(o='""',eP+=2):(o=n,0===eD&&eB(eo)),o!==n&&(eR=a,o=""),(a=o)===n)&&((a=eP,39===t.charCodeAt(eP)?(o="'",eP++):(o=n,0===eD&&eB(el)),o!==n&&(l=e5())!==n&&(39===t.charCodeAt(eP)?(u="'",eP++):(u=n,0===eD&&eB(el)),u!==n))?(eR=a,a="'"+l+"'"):(eP=a,a=n),a===n&&((a=eP,34===t.charCodeAt(eP)?(o='"',eP++):(o=n,0===eD&&eB(eu)),o!==n&&(l=e5())!==n&&(34===t.charCodeAt(eP)?(u='"',eP++):(u=n,0===eD&&eB(eu)),u!==n))?(eR=a,a="'"+l+"'"):(eP=a,a=n))))),eO[h]={nextPos:eP,result:a},a}())!==n)?(eR=e,e=new t5(s)):(eP=e,e=n),e===n&&((e=eP,e8(),123===t.charCodeAt(eP)?(s="{",eP++):(s=n,0===eD&&eB(en)),s!==n&&(i=function(){let e,t,s,i=34*eP+25,r=eO[i];if(r)return eP=r.nextPos,r.result;if(e=eP,t=[],(s=e4())!==n)for(;s!==n;)t.push(s),s=e4();else t=n;return t!==n&&(eR=e,t=t.join("")),e=t,eO[i]={nextPos:eP,result:e},e}())!==n&&(125===t.charCodeAt(eP)?(r="}",eP++):(r=n,0===eD&&eB(er)),r!==n))?(eR=e,e=new t7(i)):(eP=e,e=n))),eO[a]={nextPos:eP,result:e},e)}function e2(){let e,s,i,r,a,o,l,u,h=34*eP+21,d=eO[h];if(d)return eP=d.nextPos,d.result;for(e=eP,(s=e_())===n&&(s=null),i=[],r=eP,a=e8(),44===t.charCodeAt(eP)?(o=",",eP++):(o=n,0===eD&&eB(ec)),o!==n?(l=e8(),(u=e_())!==n?r=a=[a,o,l,u]:(eP=r,r=n)):(eP=r,r=n);r!==n;)i.push(r),r=eP,a=e8(),44===t.charCodeAt(eP)?(o=",",eP++):(o=n,0===eD&&eB(ec)),o!==n?(l=e8(),(u=e_())!==n?r=a=[a,o,l,u]:(eP=r,r=n)):(eP=r,r=n);return eR=e,e=function(e,t){if(null==e)return new t2([]);var s=[e];if(Array.isArray(t)){for(var i,n=(i=t,[].concat.apply([],i)),r=3;r<n.length;r+=4)s.push(n[r])}return new t2(s)}(s,i),eO[h]={nextPos:eP,result:e},e}function e5(){let e,t,s,i=34*eP+26,r=eO[i];if(r)return eP=r.nextPos,r.result;if(e=eP,t=[],(s=e7())!==n)for(;s!==n;)t.push(s),s=e7();else t=n;return t!==n&&(eR=e,t=t.join("")),e=t,eO[i]={nextPos:eP,result:e},e}function e7(){let e,s,i=34*eP+27,r=eO[i];return r?(eP=r.nextPos,r.result):(e=eP,"\\'"===t.substr(eP,2)?(s="\\'",eP+=2):(s=n,0===eD&&eB(ef)),s!==n&&(eR=e,s="'"),(e=s)===n&&(e=eP,'\\"'===t.substr(eP,2)?(s='\\"',eP+=2):(s=n,0===eD&&eB(eb)),s!==n&&(eR=e,s='"'),(e=s)===n&&(e=eP,s=t.charAt(eP),c.test(s)?eP++:(s=n,0===eD&&eB(ew)),s!==n&&(eR=e,s=eN()),e=s)),eO[i]={nextPos:eP,result:e},e)}function e4(){let e,s,i=34*eP+28,r=eO[i];return r?(eP=r.nextPos,r.result):(e=eP,s=t.charAt(eP),p.test(s)?eP++:(s=n,0===eD&&eB(eV)),s!==n&&(eR=e,s=eN()),e=s,eO[i]={nextPos:eP,result:e},e)}function e9(){let e,t,s,i,r,a,o=34*eP+29,l=eO[o];if(l)return eP=l.nextPos,l.result;
1if(e=eP,e6()!==n){if(t=[],s=eP,(i=e3())!==n){for(r=[],a=e6();a!==n;)r.push(a),a=e6();s=i=[i,r]}else eP=s,s=n;for(;s!==n;)if(t.push(s),s=eP,(i=e3())!==n){for(r=[],a=e6();a!==n;)r.push(a),a=e6();s=i=[i,r]}else eP=s,s=n;eR=e,e=eN()}else eP=e,e=n;return eO[o]={nextPos:eP,result:e},e}function e3(){let e,s,i=34*eP+30,r=eO[i];if(r)return eP=r.nextPos,r.result;if(e=[],s=t.charAt(eP),g.test(s)?eP++:(s=n,0===eD&&eB(ex)),s!==n)for(;s!==n;)e.push(s),s=t.charAt(eP),g.test(s)?eP++:(s=n,0===eD&&eB(ex));else e=n;return eO[i]={nextPos:eP,result:e},e}function e6(){let e,s,i=34*eP+32,r=eO[i];if(r)return eP=r.nextPos,r.result;if(e=[],s=t.charAt(eP),v.test(s)?eP++:(s=n,0===eD&&eB(eE)),s!==n)for(;s!==n;)e.push(s),s=t.charAt(eP),v.test(s)?eP++:(s=n,0===eD&&eB(eE));else e=n;return eO[i]={nextPos:eP,result:e},e}function e8(){let e,s,i=34*eP+33,r=eO[i];if(r)return eP=r.nextPos,r.result;for(eD++,e=[],s=t.charAt(eP),C.test(s)?eP++:(s=n,0===eD&&eB(eS));s!==n;)e.push(s),s=t.charAt(eP),C.test(s)?eP++:(s=n,0===eD&&eB(eS));return eD--,eO[i]={nextPos:eP,result:e},e}function te(e,t,s=!1){return t.reduce(function(e,t){return new t1(t[1],e,t[3],s)},e)}let tt=(i=o())!==n&&eP===t.length;function ts(){var s,r,a;throw i!==n&&eP<t.length&&eB({type:"end"}),s=eL,r=eA<t.length?function(e=eP){let s=t.codePointAt(e);return void 0===s?"":String.fromCodePoint(s)}(eA):null,a=eA<t.length?eF(eA,eA+1):eF(eA,eA),new e(e.buildMessage(s,r),s,r,a)}return s.peg$library?{peg$result:i,peg$currPos:eP,peg$FAILED:n,peg$maxFailExpected:eL,peg$maxFailPos:eA,peg$success:tt,peg$throw:tt?void 0:ts}:tt?i:void ts()}}}();t3.SyntaxError.prototype.name="PeggySyntaxError";let t6=t3.parse,t8=t3.SyntaxError;class se{constructor(e,t){this.at=e,this.code=t}}class st{patchExpression(e){return(e=this.patchBraces(e)).replace(/=>/g,">=").replace(/=</g,"<=").replace(/<>/g,"!=").replace(/equals/g,"equal ").replace(/notequals/g,"notequal ")}patchBraces(e){let t=p.expressionVariableDelimiters.start,s=p.expressionVariableDelimiters.end;if("{"===t&&"}"===s)return e;if(t===s){let s=e.split(t),i=s[0];for(let e=1;e<s.length;e++)i+=(e%2==1?"{":"}")+s[e];return i}return e.split(t).join("{").split(s).join("}")}createCondition(e){return this.parseExpression(e)}parseExpression(e){try{return t6(this.patchExpression(e))}catch(e){e instanceof t8&&(this.conditionError=new se(e.location.start.offset,e.message))}}get error(){return this.conditionError}}class ss{constructor(e,t,s,i,n){this.operand=e,this.id=t,this.onComplete=s,this.processValue=new Z(n),this.processValue.properties=i}run(e){if(!e)return this.runValues();this.processValue.onCompleteAsyncFunc=e=>{let t=this.getAsyncItemByOperand(e,this.asyncFuncList);t&&this.doAsyncFunctionReady(t)},this.asyncFuncList=[],this.operand.addToAsyncList(this.asyncFuncList);for(var t=0;t<this.asyncFuncList.length;t++)this.runAsyncItem(this.asyncFuncList[t]);return!1}getAsyncItemByOperand(e,t){if(!Array.isArray(t))return null;for(let s=0;s<t.length;s++){if(t[s].operand===e)return t[s];let i=this.getAsyncItemByOperand(e,t[s].children);if(i)return i}return null}runAsyncItem(e){e.children?e.children.forEach(e=>this.runAsyncItem(e)):this.runAsyncItemCore(e)}runAsyncItemCore(e){e.operand?e.operand.evaluate(this.processValue):this.doAsyncFunctionReady(e)}doAsyncFunctionReady(e){if(e.parent&&this.isAsyncChildrenReady(e))return void this.runAsyncItemCore(e.parent);for(var t=0;t<this.asyncFuncList.length;t++)if(!this.isAsyncFuncReady(this.asyncFuncList[t]))return;this.runValues()}isAsyncFuncReady(e){return(!e.operand||!!e.operand.isReady(this.processValue))&&this.isAsyncChildrenReady(e)}isAsyncChildrenReady(e){if(e.children){for(let t=0;t<e.children.length;t++)if(!this.isAsyncFuncReady(e.children[t]))return!1}return!0}runValues(){var e=this.operand.evaluate(this.processValue);return this.onComplete&&this.onComplete(e,this.id),e}}class si{static getQuestionErrorText(e){return $(e)}constructor(e){this.parser=new st,this.isAsyncValue=!1,this.hasFunctionValue=!1,this.setExpression(e)}get expression(){return this.expressionValue}setExpression(e){this.expression!==e&&(this.expressionValue=e,this.operand=this.parser.parseExpression(e),this.hasFunctionValue=!!this.canRun()&&this.operand.hasFunction(),this.isAsyncValue=!!this.hasFunction()&&this.operand.hasAsyncFunction())}getVariables(){if(!this.operand)return[];var e=[];return this.operand.setVariables(e),e}hasFunction(){return this.hasFunctionValue}get isAsync(){return this.isAsyncValue}canRun(){return!!this.operand}run(e,t,s){return this.runContext(new G(e,null==t?void 0:t.context),t,s)}runContext(e,t=null,s){return this.operand?new ss(this.operand,s,this.onComplete,t,e).run(this.isAsync):(this.expression&&Y.warn("Invalid expression: '"+this.expression+"'."+$(t)),null)}
1validate(e,t,s){let i=[];if(!this.operand)return i.push({errorType:h.SyntaxError}),i;let n=[];if(this.operand.addOperandsToList(n),s.semantics&&t&&1==n.length&&"const"===n[0].getType()&&!n[0].isBoolean())return i.push({errorType:h.SemanticError}),i;let r=n.reduce((e,t)=>{let s=t.getType();return e[s]||(e[s]=[]),e[s].push(t),e},{});if(s.functions)for(let e of r.function||[])ee.Instance.hasFunction(e.functionName)||i.push({errorType:h.UnknownFunction,functionName:e.functionName});if(s.variables){let t=this.getArrayContextVarNames(r,e);for(let s of r.variable||[])new Z(e).hasValue(s.variable)||t.has(s.variable)||i.push({errorType:h.UnknownVariable,variableName:s.variable})}return i}getArrayContextVarNames(e,t){let s=new Set,i=this.getSurveyFromContext(t);if(!i)return s;let n=new Set(["sumInArray","minInArray","maxInArray","countInArray","avgInArray"]);for(let t of e.function||[]){if(!n.has(t.functionName))continue;let e=t.paramValues;if(!e||e.length<1||"variable"!==e[0].getType())continue;let r=i.getQuestionByValueName(e[0].variable,!0);if(!r)continue;let a=r.templateElements;Array.isArray(a)&&a.forEach(e=>{e.name&&s.add(e.name)});let o=r.columns;Array.isArray(o)&&o.forEach(e=>{e.name&&s.add(e.name)})}return s}getSurveyFromContext(e){if(!e||!e.getObj)return null;let t=e.getObj();return t?t.getQuestionByValueName?t:t.getSurvey?t.getSurvey():null:null}}si.createExpressionExecutor=e=>new si(e),u=e=>new si(e);class sn extends tz{createColumnValues(){return this.createItemValues("columns")}constructor(e){super(e),this.generatedVisibleRows=null,this.generatedTotalRow=null,this.columns=this.createColumnValues(),this.rows=this.createItemValues("rows")}getType(){return"matrixbase"}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),("rowsVisibleIf"===e||"columnsVisibleIf"===e)&&this.runCondition(this.getDataFilteredProperties())}endLoadingFromJson(){super.endLoadingFromJson(),this.updateVisibilityBasedOnRows()}get isCompositeQuestion(){return!0}get visibleColumns(){let e=[];return this.columns.forEach(t=>{this.isColumnVisible(t)&&e.push(t)}),e}isColumnVisible(e){return e.isVisible}getVisibleRows(){return[]}get visibleRows(){return this.getVisibleRows()}runConditionCore(e){super.runConditionCore(e),this.runItemsCondition(e)}onColumnsChanged(){}onRowsChanged(){this.updateVisibilityBasedOnRows(),this.fireCallback(this.visibleRowsChangedCallback)}updateVisibilityBasedOnRows(){this.hideIfRowsEmpty&&this.onVisibleChanged()}isVisibleCore(){var e;let t=super.isVisibleCore();return t&&this.hideIfRowsEmpty?(null==(e=this.visibleRows)?void 0:e.length)>0:t}shouldRunColumnExpression(){return!this.survey||!this.survey.areInvisibleElementsShowing}runItemsCondition(e){let t=this.runConditionsForRows(e),s=this.runConditionsForColumns(e);(s||t)&&(this.isClearValueOnHidden&&s&&this.clearInvisibleColumnValues(),this.clearGeneratedRows(),s&&this.onColumnsChanged(),this.onRowsChanged())}clearGeneratedRows(){this.generatedVisibleRows=null}createRowsVisibleIfRunner(){return null}runConditionsForRows(e){let t=this.areInvisibleElementsShowing,s=t?null:this.createRowsVisibleIfRunner(),i=tj.runConditionsForItems(this.rows,void 0,s,e,!t);return tj.runEnabledConditionsForItems(this.rows,void 0,e),i}runConditionsForColumns(e){let t=!this.areInvisibleElementsShowing,s=this.getExpressionFromSurvey("columnsVisibleIf"),i=t&&s?new X(s):null;return tj.runConditionsForItems(this.columns,void 0,i,e,this.shouldRunColumnExpression())}clearInvisibleColumnValues(){}clearInvisibleValuesInRows(){}needResponsiveWidth(){return!0}get columnsAutoWidth(){return!this.isMobile&&!this.columns.some(e=>!!e.width)}getTableCss(){var e;return new eX().append(this.cssClasses.root).append(this.cssClasses.columnsAutoWidth,this.columnsAutoWidth).append(this.cssClasses.noHeader,!this.showHeader).append(this.cssClasses.hasFooter,!!(null==(e=this.renderedTable)?void 0:e.showAddRowOnBottom)).append(this.cssClasses.rootAlternateRows,this.alternateRows).append(this.cssClasses.rootVerticalAlignTop,"top"===this.verticalAlign).append(this.cssClasses.rootVerticalAlignMiddle,"middle"===this.verticalAlign).toString()}
1getTableWrapperCss(){return new eX().append(this.cssClasses.tableWrapper).append(this.cssClasses.tableWrapperLeft,"left"==this.titleLocation).toString()}getCellAriaLabel(e,t,s){let i=e.locText&&e.locText.renderedHtml?e.locText.renderedHtml:"";s&&(i=s);let n=t.locTitle&&t.locTitle.renderedHtml?t.locTitle.renderedHtml:"",r=(this.getLocalizationString("matrix_row")||"row").toLocaleLowerCase(),a=(this.getLocalizationString("matrix_column")||"column").toLocaleLowerCase();return`${r} ${i}, ${a} ${n}`}get isNewA11yStructure(){return!0}getIsMobile(){return"auto"==this.displayMode?super.getIsMobile():"list"===this.displayMode}}V([e_()],sn.prototype,"showHeader",void 0),V([e_()],sn.prototype,"columns",void 0),V([e_()],sn.prototype,"rows",void 0),V([e_()],sn.prototype,"rowsVisibleIf",void 0),V([e_()],sn.prototype,"columnsVisibleIf",void 0),V([e_()],sn.prototype,"verticalAlign",void 0),V([e_()],sn.prototype,"alternateRows",void 0),V([e_({returnValue:""})],sn.prototype,"columnMinWidth",void 0),V([e_({returnValue:""})],sn.prototype,"rowTitleWidth",void 0),V([e_()],sn.prototype,"displayMode",void 0),H.addClass("matrixbase",[{name:"showCommentArea:switch",visible:!0},"columnsVisibleIf:condition","rowsVisibleIf:condition","columnMinWidth",{name:"showHeader:boolean",default:!0},{name:"verticalAlign",choices:["top","middle"],default:"middle"},{name:"alternateRows:boolean",default:!1},{name:"displayMode",default:"auto",choices:["auto","table","list"],visible:!1}],void 0,"question");class sr{}class sa{constructor(e,t){this.name=e,this.returnDisplayValue=t,this.isExists=!1}}class so{constructor(){this._unObservableValues=[void 0]}get hasAllValuesOnLastRunValue(){return this._unObservableValues[0]}set hasAllValuesOnLastRunValue(e){this._unObservableValues[0]=e}process(e,t,s,i){if(this.hasAllValuesOnLastRunValue=!0,!e||!this.canProcess())return e;let n=this.getItems(e),r=p.expressionVariableDelimiters.start.length,a=p.expressionVariableDelimiters.end.length;for(let l=n.length-1;l>=0;l--){let u=n[l],h=this.getName(e.substring(u.start+r,u.end+1-a));if(h){let n=new sa(h,!0===t);if(this.onProcessValue(n),n.isExists||(this.hasAllValuesOnLastRunValue=!1),n.isExists||i){w.isValueEmpty(n.value)&&(this.hasAllValuesOnLastRunValue=!1);var o=w.isValueEmpty(n.value)?"":n.value;s&&(o=encodeURIComponent(o)),e=e.substring(0,u.start)+o+e.substring(u.end+1)}}}return e}canProcess(){return!!this.onProcess}onProcessValue(e){this.onProcess&&this.onProcess(e)}processValue(e,t){var s=new sa(e,t);return this.onProcess&&this.onProcess(s),s}get hasAllValuesOnLastRun(){return!!this.hasAllValuesOnLastRunValue}processText(e,t){return this.process(e,t)}processTextEx(e){let t={hasAllValuesOnLastRun:!0,text:e.text};return t.text=this.process(e.text,e.returnDisplayValue,e.doEncoding,e.replaceUndefinedValues),t.hasAllValuesOnLastRun=this.hasAllValuesOnLastRun,t}getItems(e){var t=[],s=e.length,i=-1;let n=p.expressionVariableDelimiters.start,r=p.expressionVariableDelimiters.end,a=n.length,o=r.length;for(var l=0;l<s;l++){if(e.substring(l,l+a)===n){i=l,l+=a-1;continue}if(e.substring(l,l+o)===r){if(i>-1){var u=new sr;u.start=i,u.end=l+o-1,this.isValidItemName(e.substring(i+a,l))&&t.push(u)}i=-1,l+=o-1;continue}}return t}isValidItemName(e){return!!e&&0>e.indexOf(":")}getName(e){if(e)return e.trim()}}class sl extends so{constructor(e){super(),this.obj=e}canProcess(){return!0}onProcessValue(e){this.getProcessedTextValue(e),e.element=this.getContextObj(),super.onProcessValue(e)}processText(e,t){return this.processTextEx({text:e,returnDisplayValue:t}).text}processTextEx(e){var t;return!e.runAtDesign&&(null==(t=this.survey)?void 0:t.isDesignMode)?{hasAllValuesOnLastRun:!0,text:e.text}:(this.context=e.context,super.processTextEx(e))}get survey(){let e=this.obj;return e.getSurvey?e.getSurvey():null}getContextObj(){return this.context||this.obj}getProcessedTextValue(e){let t=this.getContextObj(),s=new z().getValueInfo({name:e.name,context:t.getValueGetterContext(),isText:!0,isDisplayValue:e.returnDisplayValue});s.isFound&&(e.isExists=s.isFound,e.value=s.value)}}class su{constructor(e,t){this.name=e,this.json=t;var s=this;H.addClass(e,[],function(e){return sh.Instance.createQuestion(e?e.name:"",s)},"question"),this.onInit()}onInit(){this.json.onInit&&this.json.onInit()}onCreated(e){this.json.onCreated&&this.json.onCreated(e)}onLoaded(e){this.json.onLoaded&&this.json.onLoaded(e)}onAfterRender(e,t){this.json.onAfterRender&&this.json.onAfterRender(e,t)}onAfterRenderContentElement(e,t,s){this.json.onAfterRenderContentElement&&this.json.onAfterRenderContentElement(e,t,s)}
1onUpdateQuestionCssClasses(e,t,s){this.json.onUpdateQuestionCssClasses&&this.json.onUpdateQuestionCssClasses(e,t,s)}onSetQuestionValue(e,t){this.json.onSetQuestionValue&&this.json.onSetQuestionValue(e,t),this.json.onValueSet&&this.json.onValueSet(e,t)}onPropertyChanged(e,t,s){this.json.onPropertyChanged&&this.json.onPropertyChanged(e,t,s)}onValueChanged(e,t,s){this.json.onValueChanged&&this.json.onValueChanged(e,t,s)}onValueChanging(e,t,s){return this.json.onValueChanging?this.json.onValueChanging(e,t,s):s}onGetErrorText(e){if(this.json.getErrorText)return this.json.getErrorText(e)}onItemValuePropertyChanged(e,t,s,i,n){this.json.onItemValuePropertyChanged&&this.json.onItemValuePropertyChanged(e,{obj:t,propertyName:s,name:i,newValue:n})}getDisplayValue(e,t,s){return this.json.getDisplayValue?this.json.getDisplayValue(s):s.getDisplayValue(e,t)}get defaultQuestionTitle(){return this.json.defaultQuestionTitle}setValueToQuestion(e){let t=this.json.valueToQuestion||this.json.setValue;return t?t(e):e}getValueFromQuestion(e){let t=this.json.valueFromQuestion||this.json.getValue;return t?t(e):e}get isComposite(){return!!this.json.elementsJSON||!!this.json.createElements}getDynamicProperties(){return Array.isArray(this.dynamicProperties)||(this.dynamicProperties=this.calcDynamicProperties()),this.dynamicProperties}getNumberQuestionsWithHiddenTitle(e){let t=this.json.numberQuestionsWithHiddenTitle;return void 0===t?e:t}calcDynamicProperties(){let e=this.json.inheritBaseProps;if(!e||!this.json.questionJSON)return[];let t=this.json.questionJSON.type;if(!t)return[];if(Array.isArray(e)){let s=[];return e.forEach(e=>{let i=H.findProperty(t,e);i&&s.push(i)}),s}let s=[];for(let e in this.json.questionJSON)s.push(e);return H.getDynamicPropertiesByTypes(this.name,t,s)}}class sh{constructor(){this.customQuestionValues=[]}add(e){if(!e)return;let t=e.name;if(!t)throw"Attribute name is missed";if(t=t.toLowerCase(),this.getCustomQuestionByName(t))throw"There is already registered custom question with name '"+t+"'";if(H.findClass(t))throw"There is already class with name '"+t+"'";var s=new su(t,e);this.onAddingJson&&this.onAddingJson(t,s.isComposite),this.customQuestionValues.push(s)}remove(e){if(!e)return!1;let t=this.getCustomQuestionIndex(e.toLowerCase());return!(t<0)&&(this.removeByIndex(t),!0)}get items(){return this.customQuestionValues}getCustomQuestionByName(e){let t=this.getCustomQuestionIndex(e);return t>=0?this.customQuestionValues[t]:void 0}getCustomQuestionIndex(e){for(var t=0;t<this.customQuestionValues.length;t++)if(this.customQuestionValues[t].name===e)return t;return -1}removeByIndex(e){H.removeClass(this.customQuestionValues[e].name),this.customQuestionValues.splice(e,1)}clear(e){for(let t=this.customQuestionValues.length-1;t>=0;t--)(e||!this.customQuestionValues[t].json.internal)&&this.removeByIndex(t)}createQuestion(e,t){return t.isComposite?this.createCompositeModel(e,t):this.createCustomModel(e,t)}createCompositeModel(e,t){return this.onCreateComposite?this.onCreateComposite(e,t):new sg(e,t)}createCustomModel(e,t){return this.onCreateCustom?this.onCreateCustom(e,t):new sc(e,t)}}sh.Instance=new sh;class sd extends tz{constructor(e,t){super(e),this.customQuestion=t,L.createProperties(this),this.locQuestionTitle=this.createLocalizableString("questionTitle"),this.locQuestionTitle.setJson(this.customQuestion.defaultQuestionTitle),this.createWrapper(),this.customQuestion&&this.customQuestion.onCreated(this)}getType(){return this.customQuestion?this.customQuestion.name:"custom"}locStrsChanged(){super.locStrsChanged(),this.getElement()&&this.getElement().locStrsChanged()}randomSeedChanged(){this.getElement()&&this.getElement().randomSeedChanged()}localeChanged(){super.locStrsChanged(),this.getElement()&&this.getElement().localeChanged()}getDefaultTitle(){return this.locQuestionTitle.isEmpty?super.getDefaultTitle():this.getProcessedText(this.locQuestionTitle.textOrHtml)}addUsedLocales(e){super.addUsedLocales(e),this.getElement()&&this.getElement().addUsedLocales(e)}needResponsiveWidth(){let e=this.getElement();return!!e&&e.needResponsiveWidth()}createWrapper(){}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),this.customQuestion&&!this.isLoadingFromJson&&this.customQuestion.onPropertyChanged(this,e,s)}itemValuePropertyChanged(e,t,s,i){super.itemValuePropertyChanged(e,t,s,i),this.customQuestion&&!this.isLoadingFromJson&&this.customQuestion.onItemValuePropertyChanged(this,e,e.ownerPropertyName,t,i)}onFirstRenderingCore(){super.onFirstRenderingCore();let e=this.getElement();e&&e.onFirstRendering()}onHidingContent(){super.onHidingContent();let e=this.getElement();e&&e.onHidingContent()}getProgressInfo(){let e=super.getProgressInfo();
1return this.getElement()&&(e=this.getElement().getProgressInfo()),this.isRequired&&0==e.requiredQuestionCount&&(e.requiredQuestionCount=1,this.isEmpty()||(e.answeredQuestionCount=1)),e}initElement(e){e&&e.setSurveyImpl(this)}setSurveyImpl(e,t){this.isSettingValOnLoading=!0,super.setSurveyImpl(e,t),this.initElement(this.getElement()),this.isSettingValOnLoading=!1}onCustomQuestionLoaded(){!this.isLoadedCalled&&this.customQuestion&&this.survey&&(this.customQuestion.onLoaded(this),this.isLoadedCalled=!0)}onSurveyLoad(){super.onSurveyLoad(),this.isLoadedCalled=!1,this.getElement()&&this.getElement().onSurveyLoad(),this.onCustomQuestionLoaded()}setSurveyCore(e){super.setSurveyCore(e),!1===this.isLoadedCalled&&e&&this.onCustomQuestionLoaded()}afterRenderQuestionElement(e){}afterRenderCore(e){super.afterRenderCore(e),this.customQuestion&&this.customQuestion.onAfterRender(this,e)}onUpdateQuestionCssClasses(e,t){this.customQuestion&&this.customQuestion.onUpdateQuestionCssClasses(this,e,t)}setQuestionValue(e,t=!0){super.setQuestionValue(e,t),this.updateElementCss(),this.customQuestion&&this.customQuestion.onSetQuestionValue(this,e)}setNewValue(e){super.setNewValue(e),this.updateElementCss()}onCheckForErrors(e,t,s){if(super.onCheckForErrors(e,t,s),this.customQuestion){let t=this.customQuestion.onGetErrorText(this);t&&e.push(new eB(t,this))}}getSurveyData(){return this}getTextProcessor(){return this.textProcessor}getValue(e){return this.value}setValue(e,t,s,i){if(!this.data)return;this.customQuestion&&this.customQuestion.onValueChanged(this,e,t);var n=this.convertDataName(e);let r=this.convertDataValue(e,t);this.valueToDataCallback&&(r=this.valueToDataCallback(r)),this.data.setValue(n,r,s,i),this.updateIsAnswered(),this.updateElementCss()}getQuestionByName(e){}isValueChanging(e,t){if(this.customQuestion){let s=t;if(t=this.customQuestion.onValueChanging(this,e,t),!w.isTwoValueEquals(t,s)){let s=this.getQuestionByName(e);if(s)return s.value=t,!0}}return!1}convertDataName(e){return this.getValueName()}convertDataValue(e,t){return t}getComment(e){return this.data?this.data.getComment(this.getValueName()):""}setComment(e,t,s){this.data&&this.data.setComment(this.getValueName(),t,s)}getFilteredProperties(){return this.data?this.data.getFilteredProperties():{}}findQuestionByName(e){return this.data?this.data.findQuestionByName(e):null}addElement(e,t){}removeElement(e){return!1}getQuestionTitleLocation(){return"left"}getQuestionTitleWidth(){}getColumsForElement(e){return[]}updateColumns(){}getQuestionStartIndex(){return this.getStartIndex()}getChildrenLayoutType(){return"row"}elementWidthChanged(e){}get elements(){return[]}indexOf(e){return -1}ensureRowsVisibility(){}validateContainerOnly(){}getQuestionErrorLocation(){return this.getErrorLocation()}getContentAriaHidden(){return this.isDesignMode||super.getContentAriaHidden()}getContentDisplayValueCore(e,t,s){return s?this.customQuestion.getDisplayValue(e,t,s):super.getDisplayValueCore(e,t)}}class sc extends sd{getTemplate(){return"custom"}getDynamicProperties(){return this.customQuestion.getDynamicProperties()||[]}getDynamicType(){return this.questionWrapper?this.questionWrapper.getType():"question"}getOriginalObj(){return this.questionWrapper}getOriginalByProperty(e){var t,s;let i=null==(s=null==(t=this.customQuestion)?void 0:t.json)?void 0:s.inheritBaseProps;return!(!0===i||Array.isArray(i)&&i.indexOf(e)>-1)&&H.findProperty("question",e)?this:super.getOriginalByProperty(e)}createWrapper(){this.questionWrapper=this.createQuestion(),this.createDynamicProperties(this.questionWrapper),this.getDynamicProperties().length>0&&(this.questionWrapper.onPropertyValueChangedCallback=(e,t,s,i,n)=>{this.getDynamicProperty(e)&&this.propertyValueChanged(e,t,s,n)})}getDynamicProperty(e){let t=this.getDynamicProperties();for(let s=0;s<t.length;s++)if(t[s].name===e)return t[s];return null}getElement(){return this.contentQuestion}supportAutoAdvance(){return!!this.contentQuestion&&this.contentQuestion.supportAutoAdvance()}onAnyValueChanged(e,t){super.onAnyValueChanged(e,t),this.contentQuestion&&this.contentQuestion.onAnyValueChanged(e,t)}getQuestionByName(e){return this.contentQuestion}getDefaultTitle(){return this.hasJSONTitle&&this.contentQuestion?this.getProcessedText(this.contentQuestion.title):super.getDefaultTitle()}setValue(e,t,s,i){this.isValueChanging(e,t)||super.setValue(e,t,s,i)}updateCommentFromSurvey(e){super.updateCommentFromSurvey(e);let t=this.contentQuestion;t&&t.updateCommentFromSurvey(e)}get requireUpdateCommentValue(){var e;return null==(e=this.contentQuestion)?void 0:e.requireUpdateCommentValue}
vendor: 4,120 bytes, line 1
1onSetData(){super.onSetData(),this.survey&&!this.isEmpty()&&this.setValue(this.name,this.value,!1,this.allowNotifyValueChanged)}validateElementCore(e){if(!this.contentQuestion)return!0;var t=this.contentQuestion.validateElement(e);this.errors=[];for(var s=0;s<this.contentQuestion.errors.length;s++)this.errors.push(this.contentQuestion.errors[s]);return t=t&&super.validateElementCore(e),this.updateElementCss(),t}focus(e=!1){this.contentQuestion?this.contentQuestion.focus(e):super.focus(e)}afterRenderCore(e){super.afterRenderCore(e),this.contentQuestion&&this.contentQuestion.afterRender(e)}get contentQuestion(){return this.questionWrapper}get ariaTitleId(){return this.contentQuestion?this.contentQuestion.ariaTitleId:this.id+"_ariaTitle11"}get ariaDescriptionId(){return this.contentQuestion?this.contentQuestion.ariaDescriptionId:this.id+"_ariaDescription"}get commentId(){return this.contentQuestion?this.contentQuestion.commentId:this.id+"_comment"}createQuestion(){var e=this.customQuestion.json,t=null;if(e.questionJSON){this.hasJSONTitle=!!e.questionJSON.title;let s=e.questionJSON.type;if(!s||!H.findClass(s))throw"type attribute in questionJSON is empty or incorrect";(t=H.createClass(s)).fromJSON(e.questionJSON),t=this.checkCreatedQuestion(t)}else e.createQuestion&&(t=this.checkCreatedQuestion(e.createQuestion()));return this.initElement(t),t&&(t.isContentElement=!0,t.name||(t.name="question"),t.onUpdateCssClassesCallback=e=>{this.onUpdateQuestionCssClasses(t,e)},t.hasCssErrorCallback=()=>this.errors.length>0,t.setValueChangedDirectlyCallback=e=>{this.setValueChangedDirectly(e)}),t}checkCreatedQuestion(e){return e&&(e.isQuestion||(e=Array.isArray(e.questions)&&e.questions.length>0?e.questions[0]:H.createClass("text"),Y.error("Could not create component: '"+this.getType()+"'. questionJSON should be a question."))),e}onSurveyLoad(){super.onSurveyLoad(),this.contentQuestion&&this.isEmpty()&&!this.contentQuestion.isEmpty()&&(this.value=this.getContentQuestionValue())}runConditionCore(e){super.runConditionCore(e),this.contentQuestion&&this.contentQuestion.runCondition(e)}convertDataName(e){let t=this.contentQuestion;if(!t||e===this.getValueName())return super.convertDataName(e);var s=e.replace(t.getValueName(),this.getValueName());return 0==s.indexOf(this.getValueName())?s:super.convertDataName(e)}convertDataValue(e,t){return this.convertDataName(e)==super.convertDataName(e)?this.getContentQuestionValue():t}getContentQuestionValue(){if(!this.contentQuestion)return;let e=this.contentQuestion.value;return this.customQuestion&&(e=this.customQuestion.getValueFromQuestion(e)),e}setContentQuestionValue(e){this.contentQuestion&&(this.customQuestion&&(e=this.customQuestion.setValueToQuestion(e)),this.contentQuestion.value=e)}canSetValueToSurvey(){return!1}setQuestionValue(e,t=!0){super.setQuestionValue(e,t),this.isLoadingFromJson||!this.contentQuestion||this.isTwoValueEquals(this.getContentQuestionValue(),e)||this.setContentQuestionValue(this.getUnbindValue(e))}onSurveyValueChanged(e){super.onSurveyValueChanged(e),this.contentQuestion&&this.contentQuestion.onSurveyValueChanged(e)}getValueCore(){return this.contentQuestion?this.getContentQuestionValue():super.getValueCore()}setValueChangedDirectly(e){this.isSettingValueChanged||(this.isSettingValueChanged=!0,super.setValueChangedDirectly(e),this.contentQuestion&&this.contentQuestion.setValueChangedDirectly(e),this.isSettingValueChanged=!1)}createDynamicProperties(e){if(!e)return;let t=this.getDynamicProperties();Array.isArray(t)&&H.addDynamicPropertiesIntoObj(this,e,t)}initElement(e){super.initElement(e),e&&(e.parent=this,e.afterRenderQuestionCallback=(e,t)=>{this.customQuestion&&this.customQuestion.onAfterRenderContentElement(this,e,t)},e.onGetNoCallback=e=>this.no)}updateElementCss(e){this.contentQuestion&&this.questionWrapper.updateElementCss(e),super.updateElementCss(e)}setIsMobile(e){super.setIsMobile(e),this.contentQuestion&&this.contentQuestion.setIsMobile(e)}updateElementCssCore(e){super.updateElementCssCore(this.getCssClasses())}getCssClasses(){return this.contentQuestion?this.contentQuestion.cssClasse
1s:super.getCssClasses()}getDisplayValueCore(e,t){return super.getContentDisplayValueCore(e,t,this.contentQuestion)}}class sp extends tB{constructor(e){super(e),this.question=e}getObj(){return this.question}getValue(e){let t=this.question,s=e.path;return s.length>0&&(s.length>1||!e.isRoot)?(s[0].name===p.expressionVariables.composite&&s.shift(),e.isRoot=!1,e.isProperty?new j(t.contentPanel).getValue(e):new tQ(t.contentPanel.questions).getValue(e)):{isFound:!1}}}class sg extends sd{constructor(e,t){super(e,t),this.customQuestion=t,this.settingNewValue=!1,this.textProcessing=new sl(this)}createWrapper(){this.panelWrapper=this.createPanel()}getTemplate(){return"composite"}getElement(){return this.contentPanel}getCssRoot(e){return new eX().append(super.getCssRoot(e)).append(e.composite).toString()}get contentPanel(){return this.panelWrapper}validateElementCore(e){let t=super.validateElementCore(e),s=this.contentPanel;return s?s.validateElement(e)&&t:t}updateElementCss(e){super.updateElementCss(e),this.contentPanel&&this.contentPanel.updateElementCss(e)}dispose(){this.unConnectEditingObj(),super.dispose()}updateEditingObj(){let e=this.survey;e&&"function"!=typeof e.getEditingSurveyElement&&(e=null);let t=null==e?void 0:e.getEditingSurveyElement();if(!t)return;let s=t[this.getValueName()];return s&&!s.onPropertyChanged&&(s=void 0),s!==this.editingObjValue&&(this.unConnectEditingObj(),this.editingObjValue=s,s&&(this.onEditingObjPropertyChanged=(e,t)=>{this.setNewValueIntoQuestion(t.name,this.editingObjValue[t.name])},s.onPropertyChanged.add(this.onEditingObjPropertyChanged))),this.editingObjValue}unConnectEditingObj(){this.editingObjValue&&!this.editingObjValue.isDisposed&&this.editingObjValue.onPropertyChanged.remove(this.onEditingObjPropertyChanged)}getEditingSurveyElement(){return this.editingObjValue}getTextProcessor(){return this.textProcessing}findQuestionByName(e){let t=this.getQuestionByName(e);return t||super.findQuestionByName(e)}clearValueIfInvisibleCore(e){super.clearValueIfInvisibleCore(e);let t=this.contentPanel.questions;for(var s=0;s<t.length;s++)t[s].clearValueIfInvisible(e)}onAnyValueChanged(e,t){super.onAnyValueChanged(e,t);for(var s=this.contentPanel.questions,i=0;i<s.length;i++)s[i].onAnyValueChanged(e,t)}get isContainer(){return!0}createPanel(){var e=H.createClass("panel");e.showQuestionNumbers="off",e.renderWidth="100%";var t=this.customQuestion.json;return t.elementsJSON&&e.fromJSON({elements:t.elementsJSON}),t.createElements&&t.createElements(e,this),this.initElement(e),this.setIsContentElement(e),e.readOnly=this.isReadOnly,e.onGetNoCallback=e=>this.no,e.questions.forEach(e=>{e.setParentQuestion(this),e.onUpdateCssClassesCallback=t=>{this.onUpdateQuestionCssClasses(e,t)}}),this.setAfterRenderCallbacks(e),e}getHasTitleOnCalcNo(){let e=super.getHasTitleOnCalcNo();return this.customQuestion?this.customQuestion.getNumberQuestionsWithHiddenTitle(e):e}onReadOnlyChanged(){this.contentPanel&&(this.contentPanel.readOnly=this.isReadOnly),super.onReadOnlyChanged()}updateValueFromSurvey(e,t=!1){this.updateEditingObj(),super.updateValueFromSurvey(e,t)}onSurveyLoad(){if(this.isSettingValOnLoading=!0,this.contentPanel&&(this.contentPanel.readOnly=this.isReadOnly,this.setIsContentElement(this.contentPanel)),super.onSurveyLoad(),this.contentPanel){let e=this.getContentPanelValue();w.isValueEmpty(e)||(this.value=e)}this.isSettingValOnLoading=!1}setIsContentElement(e){e.isContentElement=!0;for(var t=e.elements,s=0;s<t.length;s++){var i=t[s];i.isPanel?this.setIsContentElement(i):i.isContentElement=!0}}setVisibleIndex(e){if(this.isVisibleIndexNegative(e))return super.setVisibleIndex(-1);let t=super.setVisibleIndex(e);return this.isVisible&&this.contentPanel&&(t+=this.contentPanel.setVisibleIndex(e+1)),t}runConditionCore(e){super.runConditionCore(e),this.contentPanel&&this.contentPanel.runCondition(e)}onSurveyValueChanged(e){super.onSurveyValueChanged(e);let t=e||{};this.contentPanel&&this.contentPanel.questions.forEach(e=>{e.onSurveyValueChanged(t[e.getValueName()])})}getValue(e){var t=this.value;return t?t[e]:null}getQuestionByName(e){return this.contentPanel?this.contentPanel.getQuestionByName(e):void 0}setValue(e,t,s,i){if(this.settingNewValue)return void this.setNewValueIntoQuestion(e,t);if(!this.isValueChanging(e,t)){if(this.settingNewValue=!0,!this.isEditingSurveyElement&&this.contentPanel){let e=0,t=this.contentPanel.questions.length+1;for(;
1e<t&&this.updateValueCoreWithPanelValue();)e++}this.setNewValueIntoQuestion(e,t),super.setValue(e,t,s,i),this.settingNewValue=!1,this.runPanelTriggers(p.expressionVariables.composite+"."+e,t),this.isEditingSurveyElement&&this.runCondition(this.getFilteredProperties())}}setComment(e,t){let s=this.getUnbindValue(this.value),i=this.getCommentName(e);if(!s&&!t||t&&s&&s[i]===t)return;t?(s||(s={}),s[i]=t):delete s[i];let n=this.getQuestionByName(e);n&&n.comment!==t&&(n.comment=t),this.settingNewValue||(this.value=s)}getComment(e){let t=this.getQuestionByName(e);if(t)return t.comment;let s=this.value;return!!s&&s[this.getCommentName(e)]||""}getCommentName(e){return e+p.commentSuffix}runPanelTriggers(e,t){this.contentPanel&&this.contentPanel.questions.forEach(s=>{s.runTriggers(e,t)})}updateValueCoreWithPanelValue(){let e=this.getContentPanelValue();return!this.isTwoValueEquals(this.getValueCore(),e)&&(this.setValueCore(e),!0)}getContentPanelValue(e){return e||(e=this.contentPanel.getValue()),this.customQuestion.setValueToQuestion(e)}getValueForContentPanel(e){return this.customQuestion.getValueFromQuestion(e)}setNewValueIntoQuestion(e,t){var s=this.getQuestionByName(e);s&&!this.isTwoValueEquals(t,s.value)&&(s.value=t)}addConditionObjectsByContext(e,t){if(this.contentPanel)for(var s=this.contentPanel.questions,i=this.name,n=this.title,r=0;r<s.length;r++)e.push({name:i+"."+s[r].name,text:n+"."+s[r].title,question:s[r]})}collectNestedQuestionsCore(e,t,s,i){this.contentPanel&&(i&&e.push(this),this.contentPanel.questions.forEach(n=>n.addNestedQuestion(e,t,s,i)))}convertDataValue(e,t){var s=this.contentPanel&&!this.isEditingSurveyElement?this.contentPanel.getValue():this.getValueForContentPanel(this.value);return s||(s={}),s.getType||(s=w.getUnbindValue(s)),this.isValueEmpty(t)&&!this.isEditingSurveyElement?delete s[e]:s[e]=t,this.getContentPanelValue(s)}setQuestionValue(e,t=!0){this.setValuesIntoQuestions(e),!this.isEditingSurveyElement&&this.contentPanel&&(e=this.getContentPanelValue()),super.setQuestionValue(e,t)}setValuesIntoQuestions(e){if(!this.contentPanel||this.settingNewValue)return;e=this.getValueForContentPanel(e);let t=this.settingNewValue;this.settingNewValue=!0;let s=this.contentPanel.questions;for(var i=0;i<s.length;i++){let t=s[i],n=t.getValueName(),r=this.getCommentName(n),a=e?e[n]:void 0,o=!!e&&e[r]||"";this.isTwoValueEquals(t.value,a)||void 0===a&&t.isEmpty()||(t.value=a),t.comment!==o&&(t.comment=o)}this.settingNewValue=t}getValueGetterContext(){return new sp(this)}getDisplayValueCore(e,t){return super.getContentDisplayValueCore(e,t,this.contentPanel)}setAfterRenderCallbacks(e){if(e&&this.customQuestion)for(var t=e.questions,s=0;s<t.length;s++)t[s].afterRenderQuestionCallback=(e,t)=>{this.customQuestion.onAfterRenderContentElement(this,e,t)}}get ariaRole(){return"group"}setIsMobile(e){super.setIsMobile(e),this.contentPanel&&this.contentPanel.questions.forEach(t=>{t.setIsMobile(e)})}}class sm{static get DefaultChoices(){let e=E("choices_Item");return[e+"1",e+"2",e+"3"]}static get DefaultColums(){var e=E("matrix_column")+" ";return[e+"1",e+"2",e+"3"]}static get DefaultRows(){var e=E("matrix_row")+" ";return[e+"1",e+"2"]}static get DefaultMutlipleTextItems(){var e=E("multipletext_itemname");return[e+"1",e+"2"]}registerQuestion(e,t,s=!0){sv.Instance.registerElement(e,t,s)}registerCustomQuestion(e){sv.Instance.registerCustomQuestion(e)}unregisterElement(e,t=!1){sv.Instance.unregisterElement(e,t)}clear(){sv.Instance.clear()}getAllTypes(){return sv.Instance.getAllTypes()}createQuestion(e,t){return sv.Instance.createElement(e,t)}}sm.Instance=new sm;class sv{constructor(){this.creatorHash={},this.registerCustomQuestion=(e,t=!0)=>{this.registerElement(e,t=>{let s=H.createClass(e);return s&&(s.name=t),s},t)}}registerElement(e,t,s=!0){this.creatorHash[e]={showInToolbox:s,creator:t}}clear(){this.creatorHash={}}unregisterElement(e,t=!1){delete this.creatorHash[e],t&&H.removeClass(e)}getAllToolboxTypes(){return this.getAllTypesCore(!0)}getAllTypes(){return this.getAllTypesCore(!1)}createElement(e,t){var s=this.creatorHash[e];if(s&&s.creator)return s.creator(t);let i=sh.Instance.getCustomQuestionByName(e);return i?sh.Instance.createQuestion(t,i):null}getAllTypesCore(e){var t=[];for(var s in this.creatorHash)(!e||this.creatorHash[s].showInToolbox)&&t.pu
vendor: 9,416 bytes, line 1
1sh(s);return t.sort()}}sv.Instance=new sv;class sC extends tz{onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),["format","currency","displayStyle"].indexOf(e)>-1&&this.updateFormatedValue()}getType(){return"expression"}get hasInput(){return!1}locCalculation(){this.isExecutionLocked=!0}unlocCalculation(){this.isExecutionLocked=!1}runConditionCore(e){super.runConditionCore(e),this.isExecutionLocked||!this.runIfReadOnly&&this.isReadOnly||this.runExpressionByProperty("expression",e,e=>{this.value=this.roundValue(e)})}canCollectErrors(){return!0}hasRequiredError(){return!1}get runIfReadOnly(){return!0===this.runIfReadOnlyValue}set runIfReadOnly(e){this.runIfReadOnlyValue=e}get formatedValue(){return this.getPropertyValue("formatedValue","")}updateFormatedValue(){this.setPropertyValue("formatedValue",this.getDisplayValueCore(!1,this.value))}onValueChanged(){this.updateFormatedValue()}updateValueFromSurvey(e,t){super.updateValueFromSurvey(e,t),this.updateFormatedValue()}getDisplayValueCore(e,t){var s=null==t?this.defaultValue:t,i="";if(!this.isValueEmpty(s)){var n=this.getValueAsStr(s);i=this.format?this.format.format(n):n}return this.survey&&(i=this.titleSettings.getExpressionDisplayValue(this,s,i)),i}roundValue(e){if(e!==1/0)return this.precision<0||!w.isNumber(e)?e:parseFloat(e.toFixed(this.precision))}getValueAsStr(e){if("date"==this.displayStyle){let t=f("question-expression",e);if(t&&t.toLocaleDateString)return t.toLocaleDateString()}if("none"!=this.displayStyle&&w.isNumber(e)){var t=this.getLocale();t||(t="en");var s={style:this.displayStyle,currency:this.currency,useGrouping:this.useGrouping};return this.maximumFractionDigits>-1&&(s.maximumFractionDigits=this.maximumFractionDigits),this.minimumFractionDigits>-1&&(s.minimumFractionDigits=this.minimumFractionDigits),e.toLocaleString(t,s)}return e.toString()}get ariaRole(){return"presentation"}}function sy(){return["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]}function sf(e,t,s){let i=s?t:e;return -1==e||-1==t?i:e>t?s?e:t:i}V([e_({localizable:!0})],sC.prototype,"format",void 0),V([e_()],sC.prototype,"expression",void 0),V([e_({onSetting:e=>e<-1?-1:e>20?20:e})],sC.prototype,"maximumFractionDigits",void 0),V([e_({onSetting:e=>e<-1?-1:e>20?20:e})],sC.prototype,"minimumFractionDigits",void 0),V([e_()],sC.prototype,"displayStyle",void 0),V([e_({onSetting:(e,t)=>0>sy().indexOf(e)?t.currency:e})],sC.prototype,"currency",void 0),V([e_()],sC.prototype,"useGrouping",void 0),V([e_()],sC.prototype,"precision",void 0),H.addClass("expression",["expression:expression",{name:"format",serializationProperty:"locFormat"},{name:"displayStyle",default:"none",choices:["none","decimal","currency","percent","date"]},{name:"currency",choices:()=>sy(),default:"USD",visibleIf:e=>"currency"===e.displayStyle},{name:"maximumFractionDigits:number",onSettingValue:(e,t)=>sf(e.minimumFractionDigits,t,!0),default:-1},{name:"minimumFractionDigits:number",onSettingValue:(e,t)=>sf(t,e.maximumFractionDigits,!1),default:-1},{name:"useGrouping:boolean",default:!0},{name:"precision:number",default:-1},{name:"enableIf",visible:!1,isSerializable:!1},{name:"isRequired",visible:!1,isSerializable:!1},{name:"readOnly",visible:!1,isSerializable:!1},{name:"requiredErrorText",visible:!1,isSerializable:!1},{name:"resetValueIf",visible:!1,isSerializable:!1},{name:"setValueIf",visible:!1,isSerializable:!1},{name:"setValueExpression",visible:!1,isSerializable:!1},{name:"defaultValueExpression",visible:!1,isSerializable:!1},{name:"defaultValue",visible:!1,isSerializable:!1},{name:"correctAnswer",visible:!1,isSerializable:!1},{name:"requiredIf",visible:!1,isSerializable:!1}],function(){return new sC("")},"question"),sm.Instance.registerQuestion("expression",e=>new sC(e));class sb{constructor(e){this.column=e}getObj(){return this.column}getValue(e){let t=e.path,s=t.length>0?t[0].name.toLocaleLowerCase():"",i=p.expressionVariables,n=[i.self,i.column].indexOf(s)>-1;if(e.isProperty&&t.length>1&&n)return e.path=t.slice(1),new j(this.column).getValue(e);if(1===t.length&&["name","item"].indexOf(s)>-1)return{isFound:!0,value:this.column.name};if(this.column.isDesignMode){let t=this.column.getDesignRowContext();if(t)return t.getValue(e)}}getRootObj(){return this.column.colOwner}}function sw(e,t,s,i){e.storeOthersAsComment=!!s&&s.storeOthersAsComment,(!e.choices||0==e.choices.length)&&e.isChoicesUrlEmpty&&(e.choices=s.choices),e.isChoicesUrlEmpty||e.choicesByUrl.run(i.getTextProcessor())}var sV={dropdown:{onCellQuestionUpdate:(e,t,s,i)=>{sw(e,t,s,i),e.locPlaceholder&&e.locPlaceholder.isEmpty&&!s.locPlaceholder.isEmpty&&(e.placeholder=s.placeholder)}},checkbox:{onCellQuestionUpdate:(e,t,s,i)=>{sw(e,t,s,i),e.colCount=t.colCount>-1?t.colCount:s.columnColCount}},radiogroup:{onCellQuestionUpdate:(e,t,s,i)=>{sw(e,t,s,i),e.colCount=t.colCount>-1?t.colCount:s.columnColCount}},tagbox:{onCellQuestionUpdate:(e,t,s,i)=>{sw(e,t,s,i)}},text:{},comment:{},boolean:{onCellQuestionUpdate:(e,t,s,i)=>{e.renderAs=t.renderAs}},expression:{},rating:{},slider:{}};class sx extends ew{static getColumnTypes(){var e=[];for(var t in sV)e.push(t);return e}constructor(e,t,s){super(),this.indexValue=-1,this._hasVisibleCell=!0,this.isColumnsVisibleIf=!0,this.previousChoicesId=void 0,this.colOwnerValue=s,this.updateTemplateQuestion(void 0,e,t)}onPropertyValueChanged(e,t,s){if(super.onPropertyValueChanged(e,t,s),"showInMultipleColumns"===e&&this.doShowInMultipleColumnsChanged(),"visible"===e&&this.doColumnVisibilityChanged(),"isRequired"===e&&this.updateIsRenderedRequired(s),this.colOwner&&!this.isLoadingFromJson){if(this.isShowInMultipleColumns){if("choicesOrder"===e)return;["visibleChoices","choices"].indexOf(e)>-1&&this.colOwner.onShowInMultipleColumnsChanged(this)}H.hasOriginalProperty(this,e)&&this.colOwner.onColumnPropertyChanged(this,e,s)}}getOriginalObj(){return this.templateQuestion}getClassNameProperty(){return"cellType"}getSurvey(e=!1){return this.colOwner?this.colOwner.survey:null}getOwner(){return this.colOwner}endLoadingFromJson(){super.endLoadingFromJson(),this.templateQuestion.autoOtherMode=this.isShowInMultipleColumns,this.templateQuestion.endLoadingFromJson(),this.templateQuestion.onGetSurvey=()=>this.getSurvey()}getDynamicPropertyName(){return"cellType"}getDynamicType(){return"default"===this.cellType?"question":this.calcCellQuestionType(null)}get colOwner(){return this.colOwnerValue}set colOwner(e){this.colOwnerValue=e,e&&(this.updateTemplateQuestion(),this.setParentQuestionToTemplate(this.templateQuestion))}getValueGetterContext(){return new sb(this)}getDesignRowContext(){var e;return null==(e=this.colOwner)?void 0:e.getDesignRowContext()}locStrsChanged(){super.locStrsChanged(),this.locTitle.strChanged()}addUsedLocales(e){super.addUsedLocales(e),this.templateQuestion.addUsedLocales(e)}get index(){return this.indexValue}setIndex(e){this.indexValue=e}getType(){return"matrixdropdowncolumn"}getAllChildren(){return[...super.getAllChildren(),...this.validators]}get cellType(){return this.getPropertyValue("cellType")}set cellType(e){e=e.toLocaleLowerCase(),this.updateTemplateQuestion(e),this.setPropertyValue("cellType",e),this.colOwner&&this.colOwner.onColumnCellTypeChanged(this)}get templateQuestion(){return this.templateQuestionValue}get value(){return this.templateQuestion.name}get isVisible(){return!0}get isColumnVisible(){return!!this.areInvisibleElementsShowing||this.visible&&this.hasVisibleCell}get areInvisibleElementsShowing(){var e;return null==(e=this.getSurvey())?void 0:e.areInvisibleElementsShowing}get visible(){return this.templateQuestion.visible}set visible(e){this.templateQuestion.visible=e}get hasVisibleCell(){return this._hasVisibleCell}set hasVisibleCell(e){this._hasVisibleCell=e}onCellVisibilityChanged(e){this.colOwner&&this.hasVisibleCell!==e&&this.colOwner.onColumnCellVisibilityChanged(this)}getVisibleMultipleChoices(){let e=this.templateQuestion.visibleChoices;if(!Array.isArray(e))return[];if(!Array.isArray(this._visiblechoices))return e;let t=[];for(let s=0;s<e.length;s++){let i=e[s];this._visiblechoices.indexOf(i.value)>-1&&t.push(i)}return t}get getVisibleChoicesInCell(){if(Array.isArray(this._visiblechoices))return this._visiblechoices;let e=this.templateQuestion.visibleChoices;return Array.isArray(e)?e:[]}setVisibleChoicesInCell(e){this._visiblechoices=e}get isFilteredMultipleColumns(){if(!this.showInMultipleColumns)return!1;le
vendor: 3,386 bytes, line 1
1t e=this.templateQuestion.choices;if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(e[t].visibleIf)return!0;return!1}get name(){return this.templateQuestion.name}set name(e){this.templateQuestion.name=e}get title(){return this.templateQuestion.title}set title(e){this.templateQuestion.title=e}get locTitle(){return this.templateQuestion.locTitle}get fullTitle(){return this.locTitle.textOrHtml}get defaultDisplayValue(){return this.templateQuestion.defaultDisplayValue}set defaultDisplayValue(e){this.templateQuestion.defaultDisplayValue=e}get locDefaultDisplayValue(){return this.templateQuestion.locDefaultDisplayValue}updateIsRenderedRequired(e){this.isRenderedRequired=e||this.isRequired}get requiredMark(){return this.isRenderedRequired&&this.getSurvey()?this.getSurvey().requiredMark:this.templateQuestion.requiredMark}get requiredErrorText(){return this.templateQuestion.requiredErrorText}set requiredErrorText(e){this.templateQuestion.requiredErrorText=e}get locRequiredErrorText(){return this.templateQuestion.locRequiredErrorText}get readOnly(){return this.templateQuestion.readOnly}set readOnly(e){this.templateQuestion.readOnly=e}get hasOther(){return this.showOtherItem}set hasOther(e){this.showOtherItem=e}get showOtherItem(){return this.templateQuestion.showOtherItem}set showOtherItem(e){this.templateQuestion.showOtherItem=e}get visibleIf(){return this.templateQuestion.visibleIf}set visibleIf(e){this.templateQuestion.visibleIf=e}get enableIf(){return this.templateQuestion.enableIf}set enableIf(e){this.templateQuestion.enableIf=e}get requiredIf(){return this.templateQuestion.requiredIf}set requiredIf(e){this.templateQuestion.requiredIf=e}get resetValueIf(){return this.templateQuestion.resetValueIf}set resetValueIf(e){this.templateQuestion.resetValueIf=e}get defaultValueExpression(){return this.templateQuestion.defaultValueExpression}set defaultValueExpression(e){this.templateQuestion.defaultValueExpression=e}get setValueIf(){return this.templateQuestion.setValueIf}set setValueIf(e){this.templateQuestion.setValueIf=e}get setValueExpression(){return this.templateQuestion.setValueExpression}set setValueExpression(e){this.templateQuestion.setValueExpression=e}get isSupportMultipleColumns(){return["checkbox","radiogroup"].indexOf(this.cellType)>-1}get isShowInMultipleColumns(){return this.showInMultipleColumns&&this.isSupportMultipleColumns}get validators(){return this.templateQuestion.validators}set validators(e){this.templateQuestion.validators=e}get hasTotal(){return"none"!=this.totalType||!!this.totalExpression}get width(){return this.templateQuestion.width}set width(e){this.templateQuestion.width=e}getLocale(){return this.colOwner?this.colOwner.getLocale():""}getMarkdownHtml(e,t,s){return this.colOwner?this.colOwner.getMarkdownHtml(e,t,s):void 0}getRenderer(e){return this.colOwner?this.colOwner.getRenderer(e):null}getRendererContext(e){return this.colOwner?this.colOwner.getRendererContext(e):e}getProcessedText(e){return this.colOwner?this.colOwner.getProcessedText(e,this):e}createCellQuestion(e){var t=this.calcCellQuestionType(e),s=this.createNewQuestion(t);return this.callOnCellQuestionUpdate(s,e),s}startLoadingFromJson(e){super.startLoadingFromJson(e),e&&!e.cellType&&e.choices&&(e.cellType=this.colOwner.getCellType())}updateCellQuestion(e,t,s=null){this.setQuestionProperties(e,s,!s)}callOnCellQuestionUpdate(e,t){var s=
1sV[e.getType()];s&&s.onCellQuestionUpdate&&s.onCellQuestionUpdate(e,this,this.colOwner,t)}defaultCellTypeChanged(){this.updateTemplateQuestion()}calcCellQuestionType(e){let t=this.getDefaultCellQuestionType();return e&&this.colOwner&&(t=this.colOwner.getCustomCellType(this,e,t)),t}getDefaultCellQuestionType(e){return(e||(e=this.cellType),"default"!==e)?e:this.colOwner?this.colOwner.getCellType():p.matrix.defaultCellType}updateTemplateQuestion(e,t,s){let i=this.getDefaultCellQuestionType(e),n=this.templateQuestion?this.templateQuestion.getType():"";i!==n&&(this.templateQuestion&&this.removeProperties(n),this.templateQuestionJsonValue=void 0,this.templateQuestionValue=this.createNewQuestion(i),this.templateQuestion.locOwner=this,this.addProperties(i),t&&(this.name=t),s?this.title=s:this.templateQuestion.locTitle.strChanged(),p.serialization.matrixDropdownColumnSerializeTitle&&(this.templateQuestion.locTitle.serializeCallBackText=!0),this.templateQuestion.onPropertyChanged.add((e,t)=>{this.templateQuestionJsonValue=void 0,this.propertyValueChanged(t.name,t.oldValue,t.newValue,t.arrayChanges,t.target)}),this.templateQuestion.onNestedPropertyChanged.add((e,t)=>{this.templateQuestionJsonValue=void 0,this.colOwner&&!this.isLoadingFromJson&&this.colOwner.onColumnNestedPropertyChanged(this,t.name,t.nestedName,t.newValue)}),this.templateQuestion.onItemValuePropertyChanged.add((e,t)=>{this.templateQuestionJsonValue=void 0,this.doItemValuePropertyChanged(t.propertyName,t.obj,t.name,t.newValue,t.oldValue)}),this.templateQuestion.isContentElement=!0,this.isLoadingFromJson||(this.templateQuestion.onGetSurvey=()=>this.getSurvey()),this.templateQuestion.locTitle.strChanged())}createNewQuestion(e){var t=H.createClass(e);return t||(t=H.createClass("text")),t.loadingOwner=this,t.isEditableTemplateElement=!0,t.autoOtherMode=this.isShowInMultipleColumns,this.setQuestionProperties(t),this.setParentQuestionToTemplate(t),t}setParentQuestionToTemplate(e){this.colOwner&&this.colOwner.isQuestion&&e.setParentQuestion(this.colOwner)}setQuestionProperties(e,t=null,s=!1){if(this.templateQuestion){var i;if(t)t(i=new Q().toJsonObject(this.templateQuestion,!0));else if(s)this.templateQuestionJsonValue||(this.templateQuestionJsonValue=JSON.stringify(new Q().toJsonObject(this.templateQuestion,!0))),i=JSON.parse(this.templateQuestionJsonValue);else{let t=this.templateQuestion.getType()===e.getType();i=new Q().toJsonObject(this.templateQuestion,t)}i.type=e.getType(),"default"===this.cellType&&this.colOwner&&this.colOwner.hasChoices()&&delete i.choices,delete i.itemComponent,this.jsonObj&&"rating"===i.type&&this.isLoadingFromJson&&Object.keys(this.jsonObj
1).forEach(e=>{i[e]=this.jsonObj[e]}),new Q().toObject(i,e),e.isContentElement=this.templateQuestion.isContentElement,this.previousChoicesId=void 0,e.loadedChoicesFromServerCallback=()=>{if(!this.isShowInMultipleColumns||this.previousChoicesId&&this.previousChoicesId!==e.id)return;this.previousChoicesId=e.id;let t=e.visibleChoices;this.templateQuestion.choices=t,this.propertyValueChanged("choices",t,t)}}}doItemValuePropertyChanged(e,t,s,i,n){H.hasOriginalProperty(t,s)&&(null==this.colOwner||this.isLoadingFromJson||this.colOwner.onColumnItemValuePropertyChanged(this,e,t,s,i,n))}doShowInMultipleColumnsChanged(){null!=this.colOwner&&this.colOwner.onShowInMultipleColumnsChanged(this),this.templateQuestion&&(this.templateQuestion.autoOtherMode=this.isShowInMultipleColumns)}doColumnVisibilityChanged(){null==this.colOwner||this.isDesignMode||this.colOwner.onColumnVisibilityChanged(this)}getProperties(e){return H.getDynamicPropertiesByObj(this,e)}removeProperties(e){for(var t=this.getProperties(e),s=0;s<t.length;s++){var i=t[s];delete this[i.name],i.serializationProperty&&delete this[i.serializationProperty]}}addProperties(e){let t=this.getProperties(e);H.addDynamicPropertiesIntoObj(this,this.templateQuestion,t)}}function sI(e,t,s){return e+(t?"-error":"")+(s?"-detail":"")}V([e_({onSet:(e,t)=>t.templateQuestion.isRequired=e})],sx.prototype,"isRequired",void 0),V([e_({getDefaultValue:e=>e.isRequired})],sx.prototype,"isRenderedRequired",void 0),V([e_()],sx.prototype,"isUnique",void 0),V([e_()],sx.prototype,"showInMultipleColumns",void 0),V([e_()],sx.prototype,"totalType",void 0),V([e_()],sx.prototype,"totalExpression",void 0),V([e_({localizable:!0})],sx.prototype,"totalFormat",void 0),V([e_({localizable:!0})],sx.prototype,"cellHint",void 0),V([e_({onSet:(e,t)=>t.templateQuestion.renderAs=e})],sx.prototype,"renderAs",void 0),V([e_({onSetting:e=>e<-1?-1:e>20?20:e})],sx.prototype,"totalMaximumFractionDigits",void 0),V([e_({onSetting:e=>e<-1?-1:e>20?20:e})],sx.prototype,"totalMinimumFractionDigits",void 0),V([e_()],sx.prototype,"totalDisplayStyle",void 0),V([e_()],sx.prototype,"totalAlignment",void 0),V([e_({onSetting:(e,t)=>0>sy().indexOf(e)?t.totalCurrency:e})],sx.prototype,"totalCurrency",void 0),V([e_({defaultValue:""})],sx.prototype,"minWidth",void 0),V([e_({onSetting:e=>e<-1||e>4?-1:e})],sx.prototype,"colCount",void 0),H.addClass("matrixdropdowncolumn",[{name:"!name",isUnique:!0},{name:"title",serializationProperty:"locTitle",dependsOn:"name",onPropertyEditorUpdate:function(e,t){e&&t&&(t.placeholder=e.locTitle.getPlaceholder())}},{name:"cellHint",serializationProperty:"locCellHint",visible:!1},{name:"cellType",default:"default",choices:()=>{var e=sx.getColumnTypes();return e.splice(0,0,"default"),e}},{name:"colCount",default:-1,choices:[-1,0,1,2,3,4]},{name:"isRequired:boolean",defaultFunc:e=>{let t=null==e?void 0:e.templateQuestion;return!!t&&(H.findProperty(t.getType(),"isRequired").getDefaultValue(t)||!1)}},"isUnique:boolean",{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText"},"readOnly:boolean",{name:"minWidth",onPropertyEditorUpdate:function(e,t){e&&t&&(t.value=e.minWidth)}},"width",{name:"visible:switch",default:!0,overridingProperty:"visibleIf"},"visibleIf:condition","enableIf:condition","requiredIf:condition","resetValueIf:condition","setValueIf:condition","setValueExpression:expression",{name:"showInMultipleColumns:boolean",dependsOn:"cellType",visibleIf:e=>e.isSupportMultipleColumns},{name:"validators:validators",baseClassName:"surveyvalidator",classNamePart:"validator"},{name:"totalType",visibleIf:e=>!e.isShowInMultipleColumns,default:"none",choices:["none","sum","count","min","max","avg"]},{name:"totalExpression:expression",visibleIf:e=>!e.isShowInMultipleColumns},{name:"totalFormat",serializationProperty:"locTotalFormat",visibleIf:e=>e.hasTotal},{name:"totalDisplayStyle",visibleIf:e=>e.hasTotal,default:"none",choices:["none","decimal","currency","percent"]},{name:"totalAlignment",visibleIf:e=>e.hasTotal,default:"auto",choices:["auto","left","center","right"]},{name:"totalCurrency",visibleIf:e=>e.hasTotal,choices:()=>sy(),default:"USD"},{name:"totalMaximumFractionDigits:number",default:-1,visibleIf:e=>e.hasTotal},{name:"totalMinimumFractionDigits:number",default:-1,visibleIf:e=>e.hasTotal},{name:"renderAs",default:"default",visible:!1},{name:"defaultDisplayValue",serializationProperty:"locDefaultDisplayValue"}],function(){return new sx("")});class sE{constructor(){this.minWidth="",this.width="",this.colSpans=1,this.isActionsCell=!1,this.isErrorsCell=!1,this.isDragHandlerCell=!1,this.isDetailRowCell=!1,this.classNameValue="",this.idValue=sE.counter++}get requiredMark(){return this.column&&this.column.isRenderedRequired?this.column.requiredMark:void 0}get hasQuestion(){return!!this.question&&!this.isErrorsCell}get hasTitle(){return!!this.locTitle}get hasPanel(){return!!this.panel}get id(){let e=this.question?this.question.id:this.idValue.toString();return this.isChoice&&(e+="-"+(Number.isInteger(this.choiceIndex)?"index"+this.choiceIndex.toString():this.item.id)),sI(e,this.isErrorsCell,this.isDetailRowCell)}get item(){return this.itemValue}set item(e){this.itemValue=e,e&&(e.hideCaption=!0)}get isChoice(){return!!this.item}get isItemChoice(){return this.isChoice&&!this.isOtherChoice}get choiceValue(){return this.isChoice?this.item.value:null}get isCheckbox(){return this.isItemChoice&&this.question.isDescendantOf("checkbox")}
1get isRadio(){return this.isItemChoice&&this.question.isDescendantOf("radiogroup")}get isFirstChoice(){return 0===this.choiceIndex}set className(e){this.classNameValue=e}get className(){let e=new eX().append(this.classNameValue);return this.hasQuestion&&e.append(this.question.cssClasses.hasError,this.question.errors.length>0).append(this.question.cssClasses.answered,this.question.isAnswered),e.toString()}get cellQuestionWrapperClassName(){return this.cell.getQuestionWrapperClassName(this.matrix.cssClasses.cellQuestionWrapper)}get isVisible(){var e;return!this.hasQuestion&&!this.isErrorsCell||!(null==(e=this.matrix)?void 0:e.isMobile)||this.question.isVisible}get showResponsiveTitle(){var e;return this.hasQuestion&&(null==(e=this.matrix)?void 0:e.isMobile)}get responsiveTitleCss(){return new eX().append(this.matrix.cssClasses.cellResponsiveTitle).toString()}get responsiveLocTitle(){return this.cell.column.locTitle}get headers(){if(this.cell&&this.cell.column){if(this.matrix.IsMultiplyColumn(this.cell.column))if(this.item)return this.item.locText.renderedHtml;else return"";let e=this.cell.column.cellHint;return e?""===e.trim()?"":this.cell.column.locCellHint.renderedHtml:this.hasQuestion&&this.question.isVisible&&this.question.title?this.question.title:this.cell.column.title}return this.hasQuestion&&this.question.isVisible?this.question.locTitle.renderedHtml:this.hasTitle&&this.locTitle.renderedHtml||""}getTitle(){return this.matrix&&this.matrix.showHeader?this.headers:""}calculateFinalClassName(e){let t=this.cell.question.cssClasses,s=new eX().append(t.itemValue,!!t).append(t.asCell,!!t);return s.append(e.cell,s.isEmpty()&&!!e).append(e.choiceCell,this.isChoice).toString()}focusIn(){this.question&&this.question.focusIn()}}sE.counter=1;class sS extends ew{constructor(e,t=!1){super(),this.cssClasses=e,this.isDetailRow=t,this.hasEndActions=!1,this.isErrorsRow=!1,this.cells=[]}get id(){var e;return sI((null==(e=this.row)?void 0:e.id)||this.uniqueId.toString(),this.isErrorsRow,this.isDetailRow)}get dropTargetId(){var e;return null==(e=this.row)?void 0:e.id}get attributes(){return this.row?{"data-sv-drop-target-matrix-row":this.row.id}:{}}get className(){var e,t;return new eX().append(this.cssClasses.row).append(this.cssClasses.detailRow,this.isDetailRow).append(this.cssClasses.rowHasPanel,null==(e=this.row)?void 0:e.hasPanel).append(this.cssClasses.expandedRow,(null==(t=this.row)?void 0:t.isDetailPanelShowing)&&!this.isDetailRow).append(this.cssClasses.rowHasEndActions,this.hasEndActions).append(this.cssClasses.ghostRow,this.isGhostRow).append(this.cssClasses.rowAdditional,this.isAdditionalClasses).toString()}setRootElement(e){this.rootElement=e}getRootElement(){return this.rootElement}focusCell(e){if(this.rootElement){let t=`:scope td:nth-of-type(${e+1}) input, :scope td:nth-of-type(${e+1}) button`,s=this.rootElement.querySelectorAll(t)[0];s&&s.focus()}}}V([e_({defaultValue:!1})],sS.prototype,"isGhostRow",void 0),V([e_({defaultValue:!1})],sS.prototype,"isAdditionalClasses",void 0),V([e_({defaultValue:!0})],sS.prototype,"visible",void 0);class sP extends sS{constructor(e){super(e),this.isErrorsRow=!0}get attributes(){return{}}get className(){return new eX().append(this.cssClasses.row).append(this.cssClasses.errorRow).toString()}onAfterCreated(){let e=()=>{this.visible=this.cells.some(e=>e.question&&e.question.hasVisibleErrors)};this.cells.forEach(t=>{t.question&&t.question.registerFunctionOnPropertyValueChanged("hasVisibleErrors",e)}),e()}}class sR extends sS{constructor(e,t){super(e),this.customId=t,this.isErrorsRow=!1}get attributes(){return{}}get dropTargetId(){return this.customId}get className(){return new eX().append(this.cssClasses.row).append(this.cssClasses.rowEmpty).toString()}}class sT extends ew{getIsAnimationAllowed(){return super.getIsAnimationAllowed()&&this.matrix.animationAllowed}getRenderedRowsAnimationOptions(){let e=e=>{e.querySelectorAll(":scope > td > *").forEach(e=>{tR(e)})},t=e=>{e.querySelectorAll(":scope > td > *").forEach(e=>{tT(e)})};return{isAnimationEnabled:()=>this.animationAllowed,getRerenderEvent:()=>this.onElementRerendered,getAnimatedElement:e=>e.getRootElement(),getLeaveOptions:()=>
1({cssClass:this.cssClasses.rowLeave,onBeforeRunAnimation:e,onAfterRunAnimation:t}),getEnterOptions:(s,i)=>({cssClass:this.cssClasses.rowEnter,onBeforeRunAnimation:e,onAfterRunAnimation:t}),getKey:e=>e.id}}updateRenderedRows(){this.renderedRows=this.rows}get renderedRows(){return this._renderedRows}set renderedRows(e){this.renderedRowsAnimation.sync(e)}get wrapperDropTargetId(){var e;return null==(e=this.renderedRows[this.renderedRows.length-1])?void 0:e.dropTargetId}constructor(e){super(),this.matrix=e,this._renderedRows=[],this.renderedRowsAnimation=new tE(this.getRenderedRowsAnimationOptions(),e=>{this._renderedRows=e},()=>this._renderedRows),this.hasActionCellInRowsValues={},this.build()}get showTable(){return this.getPropertyValue("showTable",!0)}get showHeader(){return this.getPropertyValue("showHeader")}get showAddRow(){return this.getPropertyValue("showAddRow",!1)}get showAddRowOnTop(){return this.getPropertyValue("showAddRowOnTop",!1)}get showAddRowOnBottom(){return this.getPropertyValue("showAddRowOnBottom",!1)}get showFooter(){return this.matrix.hasFooter&&this.matrix.isColumnLayoutHorizontal}get hasFooter(){return!!this.footerRow}get hasRemoveRows(){return this.hasRemoveRowsValue}isRequireReset(){return this.isRequireResetValue||this.hasRemoveRows!=this.matrix.canRemoveRows||!this.matrix.isColumnLayoutHorizontal}requireReset(){this.isRequireResetValue=!0}get headerRow(){return this.headerRowValue}get footerRow(){return this.footerRowValue}get isRowsDragAndDrop(){return this.matrix.isRowsDragAndDrop&&this.matrix.isColumnLayoutHorizontal}get showCellErrorsTop(){return"top"===this.matrix.getErrorLocation()}get showCellErrorsBottom(){return"bottom"===this.matrix.getErrorLocation()}build(){this.hasRemoveRowsValue=this.matrix.canRemoveRows,this.matrix.visibleRows,this.cssClasses=this.matrix.cssClasses,this.buildRowsActions(),this.buildHeader(),this.buildRows(),this.buildFooter(),this.updateShowTableAndAddRow()}updateShowTableAndAddRow(){let e=this.rows.length>0||this.matrix.isDesignMode||!this.matrix.getShowColumnsIfEmpty();this.setPropertyValue("showTable",e);let t=this.matrix.isDesignMode,s=!t&&this.matrix.canAddRow&&e,i=s,n=s;i&&(i="default"===this.matrix.getAddRowLocation()?!this.matrix.isColumnLayoutHorizontal:"bottom"!==this.matrix.getAddRowLocation()),n&&"topBottom"!==this.matrix.getAddRowLocation()&&(n=!i),this.setPropertyValue("showAddRow",!t&&this.matrix.canAddRow),this.setPropertyValue("showAddRowOnTop",i),this.setPropertyValue("showAddRowOnBottom",n)}onAddedRow(e,t){if(this.getRenderedDataRowCount()>=this.matrix.visibleRows.length)return;let s=this.getRenderedRowIndexByIndex(t);this.rowsActions.splice(t,0,this.buildRowActions(e)),this.addHorizontalRow(this.rows,e,s),this.updateShowTableAndAddRow()}getRenderedRowIndexByIndex(e){let t=0,s=0;for(var i=0;i<this.rows.length;i++){if(s===e){(this.rows[i].isErrorsRow||this.rows[i].isDetailRow)&&(t++,i+1<this.rows.length&&this.rows[i+1].isDetailRow&&t++);break}t++,!this.rows[i].isErrorsRow&&!this.rows[i].isDetailRow&&s++}return s<e?this.rows.length:t}getRenderedDataRowCount(){for(var e=0,t=0;t<this.rows.length;t++)!this.rows[t].isErrorsRow&&!this.rows[t].isDetailRow&&e++;return e}onRemovedRow(e){var t=this.getRenderedRowIndex(e);if(!(t<0)){this.rowsActions.splice(t,1);var s=1;t<this.rows.length-1&&this.showCellErrorsBottom&&this.rows[t+1].isErrorsRow&&s++,t<this.rows.length-1&&(this.rows[t+1].isDetailRow||this.showCellErrorsBottom&&t+1<this.rows.length-1&&this.rows[t+2].isDetailRow)&&s++,t>0&&this.showCellErrorsTop&&this.rows[t-1].isErrorsRow&&(t--,s++),this.rows.splice(t,s),this.updateShowTableAndAddRow()}}onDetailPanelChangeVisibility(e,t){let s=this.getRenderedRowIndex(e);if(s<0)return;let i=s;this.showCellErrorsBottom&&i++;var n=i<this.rows.length-1&&this.rows[i+1].isDetailRow?i+1:-1;if((!t||!(n>-1))&&(t||!(n<0)))if(t){var r=this.createDetailPanelRow(e,this.rows[s]);this.rows.splice(i+1,0,r)}else this.rows.splice(n,1)}focusActionCell(e,t){let s=this.rows[this.rows.length-1];if(this.matrix.isColumnLayoutHorizontal){let t=this.getRenderedRowIndex(e);s=this.rows[t]}null==s||s.focusCell(t)}getRenderedRowIndex(e){for(var t=0;t<this.rows.length;t++)if(this.rows[t].row==e)return t;return -1}buildRowsActions(){this.rowsActions=[];for(var e=this.matrix.visibleRows,t=0;t<e.length;t++)this.rowsActions.push(this.buildRowActions(e[t]))}createRenderedRow(e,t=!1){return new sS(e,t)}createErrorRenderedRow(e){return new sP(e)}createEmptyRenderedRow(e){return new sR(e,this.matrix.id)}buildHeader(){var e=this.matrix.isColumnLayoutHorizontal&&this.matrix.showHeader||this.matrix.hasRowText&&!this.matrix.isColumnLayoutHorizontal;if(this.setPropertyValue("showHeader",e),e){if(this.headerRowValue=this.createRenderedRow(this.cssClasse
1s),this.isRowsDragAndDrop&&this.headerRow.cells.push(this.createHeaderCell(null,"action",this.cssClasses.actionsCellDrag)),this.hasActionCellInRows("start")&&this.headerRow.cells.push(this.createHeaderCell(null,"action")),this.matrix.hasRowText&&this.matrix.showHeader&&this.headerRow.cells.push(this.createHeaderCell(null)),this.matrix.isColumnLayoutHorizontal)for(var t=0;t<this.matrix.columns.length;t++){var s=this.matrix.columns[t];s.isColumnVisible&&(this.matrix.IsMultiplyColumn(s)?this.createMutlipleColumnsHeader(s):this.headerRow.cells.push(this.createHeaderCell(s)))}else{for(var i=this.matrix.visibleRows,t=0;t<i.length;t++){let e=this.createTextCell(i[t].locText);this.setHeaderCellCssClasses(e),e.row=i[t],this.headerRow.cells.push(e)}if(this.matrix.hasFooter){let e=this.createTextCell(this.matrix.getFooterText());this.setHeaderCellCssClasses(e),this.headerRow.cells.push(e)}}this.hasActionCellInRows("end")&&this.headerRow.cells.push(this.createHeaderCell(null,"action"))}}buildFooter(){if(this.showFooter){if(this.footerRowValue=this.createRenderedRow(this.cssClasses),this.isRowsDragAndDrop&&this.footerRow.cells.push(this.createHeaderCell(null)),this.hasActionCellInRows("start")&&this.footerRow.cells.push(this.createHeaderCell(null,"action")),this.matrix.hasRowText){let e=this.createTextCell(this.matrix.getFooterText());e.className=new eX().append(e.className).append(this.cssClasses.footerTotalCell).toString(),this.footerRow.cells.push(e)}for(var e=this.matrix.visibleTotalRow.cells,t=0;t<e.length;t++){var s=e[t];if(s.column.isColumnVisible)if(this.matrix.IsMultiplyColumn(s.column))this.createMutlipleColumnsFooter(this.footerRow,s);else{var i=this.createEditCell(s);s.column&&this.setCellWidth(s.column,i),i.className=new eX().append(i.className).append(this.cssClasses.footerCell).toString(),this.footerRow.cells.push(i)}}this.hasActionCellInRows("end")&&this.footerRow.cells.push(this.createHeaderCell(null,"action"))}}buildRows(){this.blockAnimations();var e=this.matrix.isColumnLayoutHorizontal?this.buildHorizontalRows():this.buildVerticalRows();this.rows=e,this.releaseAnimations()}hasActionCellInRows(e){return void 0===this.hasActionCellInRowsValues[e]&&(this.hasActionCellInRowsValues[e]=this.hasActionsCellInLocaltion(e)),this.hasActionCellInRowsValues[e]}hasActionsCellInLocaltion(e){return"end"==e&&!!this.hasRemoveRows||this.matrix.visibleRows.some((t,s)=>!this.isValueEmpty(this.getRowActions(s,e)))}canRemoveRow(e){return this.matrix.canRemoveRow(e)}buildHorizontalRows(){var e=this.matrix.visibleRows,t=[];if(0==e.length&&this.matrix.allowRowReorder&&this.matrix.allowRowDragIn){let e=this.createEmptyRow(),s=this.createTextCell(this.matrix.locNoRowsText);s.colSpans=this.headerRow&&this.headerRow.cells.length||1,e.cells.push(s),t.push(e)}for(var s=0;s<e.length;s++)this.addHorizontalRow(t,e[s]);return t}addHorizontalRow(e,t,s=-1){let i=this.createHorizontalRow(t),n=this.createErrorRow(i);if(i.row=t,s<0&&(s=e.length),this.matrix.isMobile){let t=[];for(let e=0;e<i.cells.length;e++)this.showCellErrorsTop&&!n.cells[e].isEmpty&&t.push(n.cells[e]),t.push(i.cells[e]),this.showCellErrorsBottom&&!n.cells[e].isEmpty&&t.push(n.cells[e]);i.cells=t,e.splice(s,0,i)}else e.splice(s,0,...this.showCellErrorsTop?[n,i]:[i,n]),s++;t.isDetailPanelShowing&&e.splice(s+1,0,this.createDetailPanelRow(t,i))}getRowDragCell(e){let t=new sE,s=this.matrix.lockedRowCount;return t.isDragHandlerCell=s<1||e>=s,t.isEmpty=!t.isDragHandlerCell,t.className=this.getActionsCellClassName(t),t.row=this.matrix.visibleRows[e],t}getActionsCellClassName(e=null){let t=new eX().append(this.cssClasses.actionsCell).append(this.cssClasses.actionsCellDrag,null==e?void 0:e.isDragHandlerCell).append(this.cssClasses.detailRowCell,null==e?void 0:e.isDetailRowCell).append(this.cssClasses.verticalCell,!this.matrix.isColumnLayoutHorizontal);if(e.isActionsCell){let s=e.item.value.actions;this.cssClasses.actionsCellPrefix&&s.forEach(e=>{t.append(this.cssClasses.actionsCellPrefix+"--"+e.id)})}return t.toString()}getRowActionsCell(e,t,s=!1){let i=this.getRowActions(e,t);if(!this.isValueEmpty(i)){let t=new sE,n=this.matrix.allowAdaptiveActions?new tf:new to;return this.matrix.survey&&this.matrix.survey.getCss().actionBar&&(n.cssClasse
1s=this.matrix.survey.getCss().actionBar),n.setItems(i),t.item=new tj(n),t.isActionsCell=!0,t.isDragHandlerCell=!1,t.isDetailRowCell=s,t.className=this.getActionsCellClassName(t),t.row=this.matrix.visibleRows[e],t}return null}getRowActions(e,t){var s=this.rowsActions[e];return Array.isArray(s)?s.filter(e=>(e.location||(e.location="start"),e.location===t)):[]}buildRowActions(e){var t=[];return this.setDefaultRowActions(e,t),this.matrix.survey&&(t=this.matrix.survey.getUpdatedMatrixRowActions(this.matrix,e,t)),t}get showRemoveButtonAsIcon(){return p.matrix.renderRemoveAsIcon&&this.matrix.survey&&"sd-root-modern"===this.matrix.survey.css.root}setDefaultRowActions(e,t){let s=this.matrix;this.hasRemoveRows&&this.canRemoveRow(e)&&(this.showRemoveButtonAsIcon?t.push(new e2({id:"remove-row",css:"sv-action--remove-row",iconName:"icon-delete-24x24",iconSize:"auto",component:"sv-action-bar-item",innerCss:new eX().append(this.matrix.cssClasses.button).append(this.matrix.cssClasses.buttonRemove).toString(),location:"end",showTitle:!1,title:s.removeRowText,enabled:!s.isInputReadOnly,data:{row:e,question:s},action:()=>{s.removeRowUI(e)}})):t.push(new e2({id:"remove-row",css:"sv-action--remove-row",location:"end",enabled:!this.matrix.isInputReadOnly,component:"sv-matrix-remove-button",data:{row:e,question:this.matrix}}))),e.hasPanel&&(this.matrix.isMobile?t.unshift(new e2({id:"show-detail-mobile",css:"sv-action--show-detail-mobile",title:new eb(()=>e.isDetailPanelShowing?this.matrix.getLocalizationString("hideDetails"):this.matrix.getLocalizationString("showDetail
1s")),showTitle:!0,location:"end",action:t=>{e.showHideDetailPanelClick()}})):t.push(new e2({id:"show-detail",title:new eb(()=>e.isDetailPanelShowing?this.matrix.getLocalizationString("hideDetails"):this.matrix.getLocalizationString("showDetails")),showTitle:!1,location:"start",component:"sv-matrix-detail-button",data:{row:e,question:this.matrix}})))}createErrorRow(e){let t=this.createErrorRenderedRow(this.cssClasses);for(let s=0;s<e.cells.length;s++){let i=e.cells[s];i.hasQuestion?this.matrix.IsMultiplyColumn(i.cell.column)?i.isFirstChoice?t.cells.push(this.createErrorCell(i.cell)):t.cells.push(this.createEmptyCell(!0)):t.cells.push(this.createErrorCell(i.cell)):t.cells.push(this.createEmptyCell(!0))}return t.onAfterCreated(),t}createEmptyRow(){return this.createEmptyRenderedRow(this.cssClasses)}createHorizontalRow(e){var t=this.createRenderedRow(this.cssClasses);if(this.isRowsDragAndDrop){var s=this.matrix.visibleRows.indexOf(e);t.cells.push(this.getRowDragCell(s))}if(this.addRowActionsCell(e,t,"start"),this.matrix.hasRowText){var i=this.createTextCell(e.locText);i.row=e,t.cells.push(i),this.setCellWidth(null,i),i.className=new eX().append(i.className).append(this.cssClasses.rowTextCell).append(this.cssClasses.columnTitleCell,!this.matrix.isColumnLayoutHorizontal).append(this.cssClasses.detailRowText,e.hasPanel).toString()}for(var n=0;n<e.cells.length;n++){let s=e.cells[n];if(s.column.isColumnVisible)if(this.matrix.IsMultiplyColumn(s.column))this.createMutlipleEditCells(t,s);else{s.column.isShowInMultipleColumns&&s.question.visibleChoices.map(e=>e.hideCaption=!1);var i=this.createEditCell(s);t.cells.push(i),this.setCellWidth(s.column,i)}}return this.addRowActionsCell(e,t,"end"),t}addRowActionsCell(e,t,s){var i=this.matrix.visibleRows.indexOf(e);if(this.hasActionCellInRows(s)){let e=this.getRowActionsCell(i,s,t.isDetailRow);if(e)t.cells.push(e),t.hasEndActions=!0;else{var n=new sE;n.isEmpty=!0,n.isDetailRowCell=t.isDetailRow,t.cells.push(n)}}}createDetailPanelRow(e,t){let s=this.matrix.isDesignMode;var i=this.createRenderedRow(this.cssClasses,!0);i.row=e;var n=new sE;this.matrix.hasRowText&&(n.colSpans=2),n.isEmpty=!0,s||i.cells.push(n);var r=null;this.hasActionCellInRows("end")&&((r=new sE).isEmpty=!0);var a=new sE;return a.panel=e.detailPanel,a.colSpans=t.cells.length-(s?0:n.colSpans)-(r?r.colSpans:0),a.className=this.cssClasses.detailPanelCell,i.cells.push(a),r&&(this.matrix.isMobile?this.addRowActionsCell(e,i,"end"):i.cells.push(r)),"function"==typeof this.matrix.onCreateDetailPanelRenderedRowCallback&&this.matrix.onCreateDetailPanelRenderedRowCallback(i),i}buildVerticalRows(){for(var e=this.matrix.columns,t=[],s=0;s<e.length;s++){var i=e[s];if(i.isColumnVisible)if(this.matrix.IsMultiplyColumn(i))this.createMutlipleVerticalRows(t,i,s);else{let e=this.createVerticalRow(i,s),n=this.createErrorRow(e);this.showCellErrorsTop?(t.push(n),t.push(e)):(t.push(e),t.push(n))}}return this.hasActionCellInRows("end")&&t.push(this.createEndVerticalActionRow()),t}createMutlipleVerticalRows(e,t,s){var i=this.getMultipleColumnChoices(t);if(i)for(var n=0;n<i.length;n++){let r=this.createVerticalRow(t,s,i[n],n),a=this.createErrorRow(r);this.showCellErrorsTop?(e.push(a),e.push(r)):(e.push(r),e.push(a))}}createVerticalRow(e,t,s=null,i=-1){var n=this.createRenderedRow(this.cssClasses);if(this.matrix.showHeader){var r=s?s.locText:e.locTitle,a=this.createTextCell(r);a.column=e,a.className=new eX().append(a.className).append(this.cssClasses.rowTextCell).append(this.cssClasses.columnTitleCell).toString(),n.cells.push(a)}for(var o=this.matrix.visibleRows,l=0;l<o.length;l++){var u=s,h=i>=0?i:l,d=o[l].cells[t],c=s?d.question.visibleChoices:void 0;c&&h<c.length&&(u=c[h]);var p=this.createEditCell(d,u);p.item=u,p.choiceIndex=h,n.cells.push(p)}return this.matrix.hasTotal&&n.cells.push(this.createEditCell(this.matrix.visibleTotalRow.cells[t])),n}createEndVerticalActionRow(){var e=this.createRenderedRow(this.cssClasses);this.matrix.showHeader&&e.cells.push(this.createEmptyCell());for(var t=this.matrix.visibleRows,s=0;s<t.length;s++)e.cells.push(this.getRowActionsCell(s,"end"));return this.matrix.hasTotal&&e.cells.push(this.createEmptyCell()),e}createMutlipleEditCells(e,t,s=!1){var i=s?this.getMultipleColumnChoices(t.column):t.question.visibleChoices;if(i)for(var n=0;n<i.length;n++){var r=this.createEditCell(t,s?void 0:i[n]);
1s||(this.setItemCellCssClasses(r),r.choiceIndex=n),e.cells.push(r)}}setItemCellCssClasses(e){e.className=new eX().append(this.cssClasses.cell).append(this.cssClasses.itemCell).append(this.cssClasses.radioCell,e.isRadio).append(this.cssClasses.checkboxCell,e.isCheckbox).toString()}createEditCell(e,t){var s=new sE;return s.cell=e,s.row=e.row,s.column=e.column,s.question=e.question,s.matrix=this.matrix,s.item=t,s.isOtherChoice=!!t&&!!e.question&&e.question.otherItem===t,s.className=s.calculateFinalClassName(this.cssClasses),s}createErrorCell(e,t){var s=new sE;return s.question=e.question,s.row=e.row,s.matrix=this.matrix,s.isErrorsCell=!0,s.className=new eX().append(this.cssClasses.cell).append(this.cssClasses.errorsCell).append(this.cssClasses.errorsCellTop,this.showCellErrorsTop).append(this.cssClasses.errorsCellBottom,this.showCellErrorsBottom).toString(),s}createMutlipleColumnsFooter(e,t){this.createMutlipleEditCells(e,t,!0)}createMutlipleColumnsHeader(e){var t=this.getMultipleColumnChoices(e);if(t)for(var s=0;s<t.length;s++){var i=this.createTextCell(t[s].locText);this.setHeaderCell(e,i),this.setHeaderCellCssClasses(i),this.headerRow.cells.push(i)}}getMultipleColumnChoices(e){var t=e.templateQuestion.choices;return t&&Array.isArray(t)&&0==t.length?[].concat(this.matrix.choices,e.getVisibleMultipleChoices()):(t=e.getVisibleMultipleChoices())&&Array.isArray(t)?t:null}setHeaderCellCssClasses(e,t,s){e.className=new eX().append(this.cssClasses.headerCell).append(this.cssClasses.columnTitleCell,this.matrix.isColumnLayoutHorizontal).append(this.cssClasses.emptyCell,!!e.isEmpty).append(this.cssClasses.cell+"--"+t,!!t).append(s,!!s).toString()}createHeaderCell(e,t=null,s){let i=e?this.createTextCell(e.locTitle):this.createEmptyCell();return i.column=e,this.setHeaderCell(e,i),t||(t=e&&"default"!==e.cellType?e.cellType:this.matrix.cellType),this.setHeaderCellCssClasses(i,t,s),i}setHeaderCell(e,t){this.setCellWidth(e,t)}setCellWidth(e,t){t.minWidth=null!=e?this.matrix.getColumnWidth(e):this.matrix.getRowTitleWidth(),t.width=null!=e?e.width:this.matrix.getRowTitleWidth()}createTextCell(e){var t=new sE;return t.locTitle=e,this.cssClasses.cell&&(t.className=this.cssClasses.cell),t}createEmptyCell(e=!1){let t=this.createTextCell(null);return t.isEmpty=!0,t.className=new eX().append(this.cssClasses.cell).append(this.cssClasses.emptyCell).append(this.cssClasses.errorsCell,e).toString(),t}}V([eH({onPush:(e,t,s)=>{s.updateRenderedRows()},onRemove:(e,t,s)=>{s.updateRenderedRows()}})],sT.prototype,"rows",void 0),V([eH()],sT.prototype,"_renderedRows",void 0);class sA extends t_{constructor(e){super(),this.item=e}getIndex(){return this.item.getIndex()}getQuestionData(){return this.item.data}get questionName(){return""}get variableName(){return this.item.getVariableName()}getValue(e){let t=e.path;if(0===t.length)return;if(1===t.length){let e=this.getItemValue(t[0].name);if(void 0!==e)return{isFound:!0,value:e,context:this};if(this.questionName&&t[0].name===this.questionName){let e=this.item.data;return{isFound:!0,context:e.getValueGetterContext(),value:e.getFilteredData()}}}if(t.length>1){let s=t[0].name===this.getPrevName()?-1:+(t[0].name===this.getNextName());if(0!==s){let i=this.visibleIndex+s,n=this.getVisibleItem(i);return n?(t[0].name=this.variableName,n.getValueGetterContext().getValue(e)):{isFound:!0,value:void 0,context:this}}}let s=this.getSpecificValue(e);if(s)return s;let i=t[0].name===this.variableName;if(i||!e.isRoot){i&&t.shift();let s=super.getValue(e);if(s&&s.isFound)return s;let n=this.item.getAllValues();return e.isRoot&&(s=this.getValueFromBindedQuestions(t,n))?s:new W(n).getValue(e)}}updateValueByItem(e,t){let s=this.item.getQuestionsByValueName(e,!0);s.length>0&&(t.isFound=!0,t.obj=s[0],t.context=s[0].getValueGetterContext())}}class sL{constructor(e){this.data=e,this.isSettingValue=!1,this.textPreProcessor=new sl(this)}getSurveyData(){return this}getTextProcessor(){return this.textPreProcessor}getSurvey(){return this.data?this.data.getSurvey():null}getValue(e){return this.getAllValues()[e]}getAllValues(){return this.data.getItemData(this)}getFilteredProperties(){return{survey:this.getSurvey(),[this.getVariableName()]:this}}findQuestionByName(e){if(!e)return;let t=this.getVariableName()+".";if(0===e.indexOf(t))return this.getQuestionByName(e.substring(t.length));let s=this.getSurvey();return s?s.getQuestionByName(e):null}runTriggers(e,t,s){(e||s)&&this.questions.forEach(i=>
1i.runTriggers(e,t,s))}runTriggersOnSetValue(e,t){let s=this.questions,i=p.commentSuffix;if(e.endsWith(i)){e=e.substring(0,e.length-i.length);let s=this.getQuestionByName(e);s&&(t=s.value)}let n=this.getVariableName()+"."+e;for(var r=0;r<s.length;r++){let i=s[r];i.getValueName()!==e&&i.checkBindings(e,t),i.runTriggers(n,t)}var a=this.data.getItemIndex(this);a<0||this.data.getBindedQuestions().forEach(s=>{if(s!==this.data&&"function"==typeof s.getItem){let i=s.getItem(a);if(i&&i instanceof sL){let s=i.getVariableName()+"."+e;i.runTriggers(s,t)}}})}updateSharedQuestionsValue(e,t){let s=this.getQuestionsByValueName(e);if(s.length>1)for(let e=0;e<s.length;e++)w.isTwoValueEquals(s[e].value,t)||(this.isSettingValue=!0,s[e].updateValueFromSurvey(t),this.isSettingValue=!1)}isValueChanged(e,t){let s=this.data.getItemData(this),i=s?s[e]:void 0;return!w.isTwoValueEquals(t,i,!1,!0,!1)}getSharedQuestionByName(e){return this.data?this.data.getSharedQuestionFromArray(e,this.getIndex()):null}}class sD{constructor(e,t,s){this.column=e,this.row=t,this.data=s,this.questionValue=this.createQuestion(e,t,s),this.questionValue.updateCustomWidget(),this.updateCellQuestionTitleDueToAccessebility(t),this.questionValue.registerPropertyChangedHandlers(["isVisible"],()=>{this.onQuestionVisibilityChanged()},"cell")}updateCellQuestionTitleDueToAccessebility(e){this.questionValue.locTitle.onGetTextCallback=t=>{let s=null==e?void 0:e.getSurvey();if(!s||s.isSingleVisibleInput)return this.questionValue.title;let i=e.getAccessbilityText();return i?this.column.colOwner.getCellAriaLabel(e,this.column,i):this.questionValue.title}}locStrsChanged(){this.question.locStrsChanged()}createQuestion(e,t,s){let i=s.createQuestion(this.row,this.column);return i.onFirstRendering(),i.readOnlyCallback=()=>!this.row.isRowEnabled(),i.validateValueCallback=function(){return s.validateCell(t,e.name,t.value)},L.getProperties(e.getType()).forEach(t=>{let s=t.name;void 0!==e[s]&&(i[s]=e[s])}),i}get question(){return this.questionValue}get value(){return this.question.value}set value(e){this.question.value=e}getQuestionWrapperClassName(e){return e}runCondition(e){this.question.runCondition(e)}onQuestionVisibilityChanged(){this.column.onCellVisibilityChanged(this.question.isVisible)}dispose(){this.questionValue.unregisterPropertyChangedHandlers(["isVisible"],"cell"),this.questionValue.dispose()}}class sO extends sD{constructor(e,t,s){super(e,t,s),this.column=e,this.row=t,this.data=s,this.updateCellQuestion()}createQuestion(e,t,s){var i=H.createClass("expression");return i.setSurveyImpl(t),i}locStrsChanged(){this.updateCellQuestion(),super.locStrsChanged()}updateCellQuestion(){this.question.locCalculation(),this.column.updateCellQuestion(this.question,null,function(e){delete e.defaultValue}),this.question.expression=this.getTotalExpression(),this.question.format=this.column.totalFormat,this.question.currency=this.column.totalCurrency,this.question.displayStyle=this.column.totalDisplayStyle,this.question.maximumFractionDigits=this.column.totalMaximumFractionDigits,this.question.minimumFractionDigits=this.column.totalMinimumFractionDigits,this.question.unlocCalculation(),this.question.runIfReadOnly=!0}getQuestionWrapperClassName(e){let t=super.getQuestionWrapperClassName(e);if(!t)return t;this.question.expression&&"''"!=this.question.expression&&(t+=" "+e+"--expression");let s=this.column.totalAlignment;return"auto"===s&&"dropdown"===this.column.cellType&&(s="left"),t+" "+e+"--"+s}getTotalExpression(){if(this.column.totalExpression)return this.column.totalExpression;if("none"==this.column.totalType)return"''";var e=this.column.totalType+"InArray";return ee.Instance.hasFunction(e)?e+"({matrix}, '"+this.column.name+"')":""}}class sN extends sA{constructor(e){super(e),this.row=e}get visibleIndex(){return this.getQuestionData().visibleRows.indexOf(this.row)}getNextName(){return p.expressionVariables.nextRow}getPrevName(){return p.expressionVariables.prevRow}getVisibleItem(e){let t=this.getQuestionData();return e<0||e>=t.visibleRows.length?null:t.visibleRows[e]}getSpecificValue(e){let t=e.path;if(t.length>1&&t[0].name===p.expressionVariables.totalRow){let s=this.row.data.visibleTotalRow;if(s)return t[0].name="row",s.getValueGetterContext().getValue(e)}return null}get questionName(){return p.expressionVariables.matrix}getRootObj(){return this.row.data}getItemValue(e){let t=p.expressionVariables;return(e=e.toLocaleLowerCase())===t.rowIndex.toLocaleLowerCase()?this.row.rowIndex:e===t.visibleRowIndex.toLocaleLowerCase()?this.visibleIndex+1:[t.item,t.rowName.toLocaleLowerCase(),t.rowValue.toLocaleLowerCase()].indexOf(e)>-1?this.row.rowName:e==t.rowTitle.toLocaleLowerCase()?this.row.rowTitle:void 0}}class sM extends sL{static getId(){return"srow_"+sM.idCounter++}constructor(e,t){super(e),this.data=e,this.detailPanelValue=null,this.visibleValue=!0,this.cells=[],this.visibleIndex=-1,this.isCreatingDetailPanel=!1,this.data=e,this.subscribeToChanges(t),this.showHideDetailPanelClick=()=>
1{if(this.getSurvey().isDesignMode)return!0;this.showHideDetailPanel()},this.idValue=sM.getId()}get id(){return this.idValue}get rowName(){return null}get rowTitle(){return this.rowName}get dataName(){return this.rowName}get text(){return this.rowName}getValueGetterContext(){return new sN(this)}isRowEnabled(){return!0}isRowHasEnabledCondition(){return!1}get isVisible(){return this.visible&&this.isItemVisible()}get visible(){return this.visibleValue}set visible(e){var t;this.visible!==e&&(this.visibleValue=e,null==(t=this.data)||t.onRowVisibilityChanged(this))}isItemVisible(){return!0}get value(){return this.getValueCore(!1)}set value(e){this.isSettingValue=!0,this.subscribeToChanges(e);for(var t=this.questions,s=0;s<t.length;s++){var i=t[s],n=this.getCellValue(e,i.getValueName()),r=i.comment,a=e?e[i.getValueName()+ew.commentSuffix]:"";void 0==a&&(a=""),i.updateValueFromSurvey(n),(a||this.isTwoValueEquals(r,i.comment))&&i.updateCommentFromSurvey(a),i.onSurveyValueChanged(n)}this.isSettingValue=!1}get filteredValue(){return this.getValueCore(!0)}getValueCore(e){for(var t={},s={},i=0;i<this.cells.length;i++){var n=this.cells[i].question;if(n){var r=n.getValueName();s[r]=!0,n.isEmpty()||(t[r]=e?n.getFilteredValue():n.value),n.comment&&this.getSurvey()&&this.getSurvey().storeOthersAsComment&&(t[r+ew.commentSuffix]=n.comment)}}for(var a=this.detailPanel?this.detailPanel.questions:[],i=0;i<a.length;i++){var n=a[i],r=n.getValueName();!s[r]&&(n.isEmpty()||(t[r]=e?n.getFilteredValue():n.value),n.comment&&this.getSurvey()&&this.getSurvey().storeOthersAsComment&&(t[r+ew.commentSuffix]=n.comment))}return t}get locText(){return null}getAccessbilityText(){return this.locText&&this.locText.renderedHtml}get hasPanel(){return!!this.data&&this.data.hasDetailPanel(this)}get detailPanel(){return this.detailPanelValue}get detailPanelId(){return this.detailPanel?this.detailPanel.id:""}get isDetailPanelShowing(){return!!this.data&&this.data.getIsDetailPanelShowing(this)}setIsDetailPanelShowing(e){!e&&this.detailPanel&&this.detailPanel.onHidingContent(),this.data&&this.data.setIsDetailPanelShowing(this,e),e&&this.detailPanel&&this.detailPanel.onFirstRendering(),this.onDetailPanelShowingChanged&&this.onDetailPanelShowingChanged()}showHideDetailPanel(){this.isDetailPanelShowing?this.hideDetailPanel():this.showDetailPanel()}showDetailPanel(){this.ensureDetailPanel(),this.detailPanelValue&&this.setIsDetailPanelShowing(!0)}hideDetailPanel(e=!1){this.setIsDetailPanelShowing(!1),e&&(this.detailPanelValue=null)}ensureDetailPanel(){if(!this.isCreatingDetailPanel&&!this.detailPanelValue&&this.hasPanel&&this.data){this.isCreatingDetailPanel=!0,this.detailPanelValue=this.data.createRowDetailPanel(this);var e=this.detailPanelValue.questions,t=this.getDataRowValue();if(!w.isValueEmpty(t))for(var s=0;s<e.length;s++){let i=e[s].getValueName(),n=this.editingObj?H.getObjPropertyValue(this.editingObj,i):t[i];w.isValueEmpty(n)||(e[s].value=n)}this.detailPanelValue.setSurveyImpl(this),this.isCreatingDetailPanel=!1}}getAllValues(){let e=this.value;if(this.data){let s=this.getDataRowValue();if(s)for(var t in s)void 0===e[t]&&(e[t]=s[t])}return e}getVariableName(){return p.expressionVariables.row}getDataRowValue(){return this.data?this.data.getItemData(this):null}runCondition(e,t,s){if(!this.data)return;let i=w.createCopy(e);i[p.expressionVariables.row]=this,this.visible=!0===s||this.getRowVisibleIfBaseOnExpression(e,t),this.runRowsEnableCondition(i);for(var n=0;n<this.cells.length;n++)this.cells[n].runCondition(i);this.detailPanel&&this.detailPanel.runCondition(i),this.isRowHasEnabledCondition()&&this.onQuestionReadOnlyChanged()}runRowsEnableCondition(e){}getRowsVisibleIfExpression(e){return e?[e]:[]}getRowVisibleIfBaseOnExpression(e,t){let s=this.getRowsVisibleIfExpression(t),i=!0;for(let t=0;t<s.length&&(i=new X(s[t]).runContext(this.getValueGetterContext(),e));t++);return i}updateElementVisibility(){this.cells.forEach(e=>e.question.updateElementVisibility()),this.detailPanel&&this.detailPanel.updateElementVisibility()}getNamesWithDefaultValues(){let e=[];return this.questions.forEach(t=>{t.isValueDefault&&e.push(t.getValueName())}),e}clearValue(e,t){for(var s=this.questions,i=0;i<s.length;i++)s[i].clearValue(e,t)}onAnyValueChanged(e,t){for(var s=this.questions,i=0;i<s.length;i++)s[i].onAnyValueChanged(e,t)}getDataValueCore(e,t){var s=this.getSurvey();return s?s.getDataValueCore(e,t):e[t]}setValue(e,t){this.setValueCore(e,t,!1)}getComment(e){var t=this.getQuestionByName(e);return t?t.comment:""}setComment(e,t,s){this.setValueCore(e,t,!0)}
1setValueCore(e,t,s){if(this.isSettingValue||this.isCreatingDetailPanel)return;s||this.updateSharedQuestionsValue(e,t);let i=this.getQuestionByName(e),n=this.onCellValueChanging(i,this.value,s),r=s?e+ew.commentSuffix:e;if(!this.isValueChanged(r,n)||this.data.isValidateOnValueChanging&&!this.validateCellQuestion(i))return;let a=null==t&&!i||s&&!t&&!!i;this.data.updateItemValue(this,r,n,a);let o=p.expressionVariables.row;if(r&&this.runTriggersOnSetValue(r,t),this.onAnyValueChanged(o,""),!s&&i){let t=this.getSurvey();if(t&&t.isValidateOnValueChanged){let t=this.data.columns.filter(t=>t.name===e)[0];t&&t.isUnique&&this.data.checkIfValueInRowDuplicated(this,i)}}}onCellValueChanging(e,t,s){if(!e)return t;let i=e.getValueName(),n=s?i+ew.commentSuffix:i,r=this.data.onRowChanging(this,n,t);return this.isTwoValueEquals(r,e.value)?t:(this.isSettingValue=!0,s?e.comment=r:e.value=r,this.isSettingValue=!1,this.value)}validateCellQuestion(e){if(!e)return!0;if(!e.validateElement(new tH({fireCallback:!0,isOnValueChanged:!this.data.isValidateOnValueChanging})))return!1;if(e.isEmpty())return!0;var t=this.getCellByColumnName(e.name);return!t||!t.column||!t.column.isUnique||!this.data.checkIfValueInRowDuplicated(this,e)}get isEmpty(){var e=this.value;if(w.isValueEmpty(e))return!0;for(var t in e)if(void 0!==e[t]&&null!==e[t])return!1;return!0}hasValueAnyQuestion(e){let t=e?this.visibleQuestions:this.questions;for(let e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1}getQuestionByColumn(e){var t=this.getCellByColumn(e);return t?t.question:null}getCellByColumn(e){for(var t=0;t<this.cells.length;t++)if(this.cells[t].column==e)return this.cells[t];return null}getCellByColumnName(e){for(var t=0;t<this.cells.length;t++)if(this.cells[t].column.name==e)return this.cells[t];return null}getQuestionByColumnName(e){var t=this.getCellByColumnName(e);return t?t.question:null}get questions(){for(var e=[],t=0;t<this.cells.length;t++)e.push(this.cells[t].question);for(var s=this.detailPanel?this.detailPanel.questions:[],t=0;t<s.length;t++)e.push(s[t]);return e}get visibleQuestions(){let e=[];return this.questions.forEach(t=>{t.isVisible&&e.push(t)}),e}getQuestionByName(e){var t=this.getQuestionByColumnName(e);return t||(this.detailPanel?this.detailPanel.getQuestionByName(e):null)}getQuestionsByName(e){let t=[],s=this.getQuestionByColumnName(e);return s&&t.push(s),this.detailPanel&&(s=this.detailPanel.getQuestionByName(e))&&t.push(s),t}getQuestionsByValueName(e,t){t&&(e=e.toLocaleLowerCase());let s=[];for(var i=0;i<this.cells.length;i++){let n=this.cells[i],r=n.question;if(!r)continue;let a=r.getValueName();t&&(a=a.toLocaleLowerCase()),a===e&&s.push(n.question)}return this.detailPanel&&(s=s.concat(this.detailPanel.getQuestionsByValueName(e,t))),s}clearIncorrectValues(e){for(var t in e){var s=this.getQuestionByName(t);if(s){var i=s.value;s.clearIncorrectValues(),this.isTwoValueEquals(i,s.value)||this.setValue(t,s.value)}else!this.getSharedQuestionByName(t)&&0>t.indexOf(p.matrix.totalsSuffix)&&this.setValue(t,null)}}getLocale(){return this.data?this.data.getLocale():""}
1getMarkdownHtml(e,t,s){return this.data?this.data.getMarkdownHtml(e,t,s):void 0}getRenderer(e){return this.data?this.data.getRenderer(e):null}getRendererContext(e){return this.data?this.data.getRendererContext(e):e}getProcessedText(e){return this.data?this.data.getProcessedText(e,this):e}locStrsChanged(){for(var e=0;e<this.cells.length;e++)this.cells[e].locStrsChanged();this.detailPanel&&this.detailPanel.locStrsChanged()}randomSeedChanged(){for(var e=0;e<this.cells.length;e++)this.cells[e].question.randomSeedChanged();this.detailPanel&&this.detailPanel.randomSeedChanged()}updateCellQuestionOnColumnChanged(e,t,s){var i=this.getCellByColumn(e);i&&this.updateCellOnColumnChanged(i,t,s)}updateCellQuestionOnColumnItemValueChanged(e,t,s,i,n,r){var a=this.getCellByColumn(e);a&&this.updateCellOnColumnItemValueChanged(a,t,s,i,n,r)}onQuestionReadOnlyChanged(){let e=this.questions;for(var t=0;t<e.length;t++){let s=e[t];s.setPropertyValue("isReadOnly",s.isReadOnly)}if(this.detailPanel){let e=!!this.data&&this.data.isMatrixReadOnly();this.detailPanel.readOnly=e||!this.isRowEnabled()}}validate(e){let t=!0,s=this.cells;if(!s)return t;for(let i=0;i<s.length;i++){if(!s[i])continue;let n=s[i].question;n&&n.isVisible&&(e&&!0===e.isOnValueChanged&&n.isEmpty()||(t=n.validateElement(e)&&t))}if(this.hasPanel&&(this.detailPanelValue||!e||!e.isOnValueChanging)){this.ensureDetailPanel();let s=this.detailPanel.validateElement(e);e.hideErroredPanel||s||!e.fireCallback||(e.isSingleDetailPanel&&(e.hideErroredPanel=!0),this.showDetailPanel()),t=s&&t}return t}updateCellOnColumnChanged(e,t,s){"choices"===t&&Array.isArray(s)&&0===s.length&&this.data&&(s=this.data.choices),e.question[t]=s}updateCellOnColumnItemValueChanged(e,t,s,i,n,r){var a=e.question[t];if(Array.isArray(a)){var o="value"===i?r:s.value,l=tj.getItemByValue(a,o);l&&(l[i]=n)}}buildCells(e){this.isSettingValue=!0;for(var t=this.data.columns,s=0;s<t.length;s++){var i=t[s],n=this.createCell(i);this.cells.push(n);var r=this.getCellValue(e,i.name);if(!w.isValueEmpty(r)){n.question.value=r;var a=i.name+ew.commentSuffix;e&&!w.isValueEmpty(e[a])&&(n.question.comment=e[a])}}this.isSettingValue=!1}isTwoValueEquals(e,t){return w.isTwoValueEquals(e,t,!1,!0,!1)}getCellValue(e,t){return this.editingObj?H.getObjPropertyValue(this.editingObj,t):e?e[t]:void 0}createCell(e){return new sD(e,this,this.data)}get rowIndex(){return this.getItemIndex()}getIndex(){return this.getItemIndex()-1}getItemIndex(){return this.data?this.data.getItemIndex(this)+1:-1}get editingObj(){return this.editingObjValue}dispose(){for(let e=0;e<this.cells.length;e++)this.cells[e].dispose();this.editingObj&&(this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged),this.editingObjValue=null)}subscribeToChanges(e){e&&e.getType&&e.onPropertyChanged&&e!==this.editingObj&&(this.editingObjValue=e,this.onEditingObjPropertyChanged=(e,t)=>{this.updateOnSetValue(t.name,t.newValue)},this.editingObj.onPropertyChanged.add(this.onEditingObjPropertyChanged))}updateOnSetValue(e,t){this.isSettingValue=!0;let s=this.getQuestionsByName(e);for(let e=0;e<s.length;e++)s[e].value=t;this.isSettingValue=!1}}sM.idCounter=1;class sk extends sM{constructor(e){super(e,null),this.buildCells(null)}createCell(e){return new sO(e,this,this.data)}setValue(e,t){this.data&&!this.isSettingValue&&this.data.onTotalValueChanged()}runCondition(e,t){var s,i=0;do s=w.getUnbindValue(this.value),super.runCondition(e,""),i++;while(!w.isTwoValueEquals(s,this.value)&&i<3)}updateCellOnColumnChanged(e,t,s){e.updateCellQuestion()}}class sq{constructor(e,t){this.matrix=e,this.row=t}getLocale(){return this.matrix.getLocale()}
vendor: 8,233 bytes, line 1
1getMarkdownHtml(e,t,s){return this.matrix.getMarkdownHtml(e,t,s)}getProcessedText(e){return this.matrix.processSingleInputTitle(e,this.row)}getRenderer(e){return this.matrix.getRenderer(e)}getRendererContext(e){return this.matrix.getRendererContext(e)}}class sF extends sn{constructor(){super(...arguments),this.isRowChanging=!1,this.lockResetRenderedTable=!1}get matrixCallbacks(){return this.survey}get choiceCallbacks(){return this.survey}static get defaultCellType(){return p.matrix.defaultCellType}static set defaultCellType(e){p.matrix.defaultCellType=e}static addDefaultColumns(e){for(var t=sm.DefaultColums,s=0;s<t.length;s++)e.addColumn(t[s])}createColumnValues(){return this.createNewArray("columns",e=>{e.colOwner=this,this.onAddColumn&&this.onAddColumn(e),this.survey&&this.matrixCallbacks.matrixColumnAdded(this,e)},e=>{e.colOwner=null,this.onRemoveColumn&&this.onRemoveColumn(e)})}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),("columns"===e||"cellType"===e)&&this.updateColumnsAndRows(),["placeholder","columnColCount","rowTitleWidth","choices"].indexOf(e)>-1&&this.clearRowsAndResetRenderedTable(),["transposeData","addRowButtonLocation","hideColumnsIfEmpty","showHeader","minRowCount","isReadOnly","rowCount","hasFooter","detailPanelMode","displayMode"].indexOf(e)>-1&&this.resetRenderedTable()}getType(){return"matrixdropdownbase"}getAllChildren(){return[...super.getAllChildren(),...this.detailElements]}dispose(){super.dispose(),this.clearGeneratedRows()}get isContainer(){return!0}get isRowsDynamic(){return!1}get isUpdateLocked(){return this.isLoadingFromJson||this.isUpdating}beginUpdate(){this.isUpdating=!0}endUpdate(){this.isUpdating=!1,this.updateColumnsAndRows()}updateColumnsAndRows(){this.updateColumnsIndexes(this.columns),this.updateColumnsCellType(),this.generatedTotalRow=null,this.clearRowsAndResetRenderedTable()}itemValuePropertyChanged(e,t,s,i){super.itemValuePropertyChanged(e,t,s,i),"choices"===e.ownerPropertyName&&this.clearRowsAndResetRenderedTable()}get columnLayout(){return this.transposeData?"vertical":"horizontal"}set columnLayout(e){this.transposeData="vertical"===e}get columnsLocation(){return this.columnLayout}set columnsLocation(e){this.columnLayout=e}getChildErrorLocation(e){let t=e.parent?this.detailErrorLocation:this.cellErrorLocation;return"default"!==t?t:super.getChildErrorLocation(e)}get isColumnLayoutHorizontal(){return!!this.isMobile||!this.transposeData}get useCaseSensitiveComparison(){return void 0!==this.useCaseSensitiveComparisonValue?this.useCaseSensitiveComparisonValue:p.comparator.caseSensitive}set useCaseSensitiveComparison(e){this.useCaseSensitiveComparisonValue=e}get isUniqueCaseSensitive(){return this.useCaseSensitiveComparison}set isUniqueCaseSensitive(e){this.useCaseSensitiveComparison=e}get detailPanel(){if(!this.detailPanelValue){let e=this.createNewDetailPanel();e.selectedElementInDesign=this,e.renderWidth="100%",e.isInteractiveDesignElement=!1,e.showTitle=!1;let t=this.getPropertyValueWithoutDefault("allowAdaptiveActions");void 0!==t&&(e.allowAdaptiveActions=t),this.detailPanelValue=e}return this.detailPanelValue}getPanels(){let e=this.getPanelInDesignMode();return e?[e]:null}getPanelInDesignMode(){return"none"!==this.detailPanelMode?this.detailPanel:null}get detailElements(){return this.detailPanel.elements}isPropertyStoredInHash(e){return"detailElements"===e?!this.detailPanelValue:super.isPropertyStoredInHash(e)}createNewDetailPanel(){return H.createClass("panel")}get hasRowText(){return!0}getFooterText(){return null}get canAddRow(){return!1}get canRemoveRows(){return!1}canRemoveRow(e){return!0}onPointerDown(e,t){}onRowsChanged(){this.clearVisibleRows(),this.resetRenderedTable(),super.onRowsChanged(),this.updateRowsVisibleIndexes()}updateRowsVisibleIndexes(){let e=this.visibleRows;if(!Array.isArray(e))return;let t=p.expressionVariables.visibleRowIndex,s={};s[t]=0;for(let i=0;i<e.length;i++)e[i].visibleIndex=i,s[t]=i+1,e[i].runTriggers(t,i+1,s)}onStartRowAddingRemoving(){this.lockResetRenderedTable=!0,this.setValueChangedDirectly(!0)}onEndRowAdding(){if(this.lockResetRenderedTable=!1,this.renderedTable)if(this.renderedTable.isRequireReset())this.resetRenderedTable();else{let e=this.visibleRows.length-1;this.renderedTable.onAddedRow(this.visibleRows[e],e)}}onEndRowRemoving(e){this.lockResetRenderedTable=!1,this.renderedTable.isRequireReset()?this.resetRenderedTable():e&&this.renderedTable.onRemovedRow(e)}clearRowsAndResetRenderedTable(){this.clearGeneratedRows(),this.resetRenderedTable(),this.fireCallback(this.columnsChangedCallback)}resetRenderedTable(e){this.isRendredTableCreated&&(this.lockResetRenderedTable||this.isUpdateLocked?e&&this.renderedTable.requireReset():(this.resetPropertyValue("renderedTable"),this.fireCallback(this.onRenderedTableResetCallback)))}clearGeneratedRows(){if(this.clearVisibleRows(),this.generatedVisibleRows){for(var e=0;e<this.generatedVisibleRows.length;e++)this.generatedVisibleRows[e].dispose();super.clearGeneratedRows()}}get isRendredTableCreated(){return!!this.getPropertyValueWithoutDefault("renderedTable")}get renderedTable(){return this.getPropertyValue("renderedTable",void 0,()=>this.createRenderedTable())}createRenderedTable(){return new sT(this)}getRowByQuestion(e){if(e)return e.data}onMatrixRowCreated(e){if(this.survey)for(var t={rowValue:e.value,row:e,column:null,columnName:null,cell:null,cellQuestion:null,value:null},s=0;s<this.columns.length;s++){t.column=this.columns[s],t.columnName=t.column.name;var i=e.cells[s];t.cell=i,t.cellQuestion=i.question,t.value=i.value,this.onCellCreatedCallback&&this.onCellCreatedCallback(t),this.matrixCallbacks.matrixCellCreated(this,t)}}isSelectCellType(){return H.isDescendantOf(this.cellType,"selectbase")}updateColumnsCellType(){for(var e=0;e<this.columns.length;e++)this.columns[e].defaultCellTypeChanged()}updateColumnsIndexes(e){for(var t=0;t<e.length;t++)e[t].setIndex(t)}get allowAdaptiveActions(){return this.getPropertyValue("allowAdaptiveActions")}set allowAdaptiveActions(e){this.setPropertyValue("allowAdaptiveActions",e),this.detailPanelValue&&(this.detailPanel.allowAdaptiveActions=e)}hasChoices(){let e=this.getPropertyValueWithoutDefault("choices");return e&&e.length>0}onColumnPropertyChanged(e,t,s){if(this.updateHasFooter(),this.generatedVisibleRows){for(var i=0;i<this.generatedVisibleRows.length;i++)this.generatedVisibleRows[i].updateCellQuestionOnColumnChanged(e,t,s);this.generatedTotalRow&&this.generatedTotalRow.updateCellQuestionOnColumnChanged(e,t,s),this.onColumnsChanged(),"isRequired"==t&&this.resetRenderedTable()}}onColumnNestedPropertyChanged(e,t,s,i){if(this.generatedVisibleRows)for(var n=0;n<this.generatedVisibleRows.length;n++){let r=this.generatedVisibleRows[n].getQuestionByColumn(e);r&&r[t]&&(r[t][s]=i)}}onColumnItemValuePropertyChanged(e,t,s,i,n,r){if(this.generatedVisibleRows)for(var a=0;a<this.generatedVisibleRows.length;a++)this.generatedVisibleRows[a].updateCellQuestionOnColumnItemValueChanged(e,t,s,i,n,r)}onShowInMultipleColumnsChanged(e){this.resetTableAndRows()}onColumnVisibilityChanged(e){this.resetTableAndRows()}onColumnCellVisibilityChanged(e){this.isDesignMode||this.isRunningCellsCondition||this.isColumnVisibilityChanged(e,!0)&&this.resetRenderedTable(!0)}onColumnCellTypeChanged(e){this.updateDefaultRowValue(e),this.resetTableAndRows()}getDesignRowContext(){return(this.visibleRows&&this.visibleRows.length>0?this.visibleRows[0]:this.createMatrixRow(new tj(1))).getValueGetterContext()}updateDefaultRowValue(e){let t=this.defaultRowValue;t&&"file"===e.cellType&&t[e.name]&&(delete t[e.name],0===Object.keys(t).length&&(t=void 0),this.defaultRowValue=t)}resetTableAndRows(){this.clearGeneratedRows(),this.resetRenderedTable()}getRowTitleWidth(){return""}get hasFooter(){return this.getPropertyValue("hasFooter",!1)}getAddRowLocation(){return"default"}getShowColumnsIfEmpty(){return!1}updateShowTableAndAddRow(){this.renderedTable&&this.renderedTable.updateShowTableAndAddRow()}updateHasFooter(){this.setPropertyValue("hasFooter",this.hasTotal)}get hasTotal(){for(var e=0;e<this.columns.length;e++)if(this.columns[e].hasTotal)return!0;return!1}getCellType(){return this.cellType}getCustomCellType(e,t,s){if(!this.survey)return s;
1var i={rowValue:t.value,row:t,column:e,columnName:e.name,cellType:s};return this.matrixCallbacks.matrixCellCreating(this,i),i.cellType}getConditionJson(e=null,t=null){let s;if(!t)return super.getConditionJson(e);let i="";for(let e=t.length-1;e>=0&&"."!=t[e];e--)i=t[e]+i;let n=this.getColumnByName(i);return n?s=n.createCellQuestion(null):"none"!==this.detailPanelMode&&(s=this.detailPanel.getQuestionByName(i)),s?s.getConditionJson(e):null}clearIncorrectValues(){if(!Array.isArray(this.visibleRows))return;let e=this.generatedVisibleRows;for(let t=0;t<e.length;t++)e[t].clearIncorrectValues(this.getRowValue(t))}clearErrors(){super.clearErrors(),this.runFuncForCellQuestions(e=>{e.clearErrors()})}localeChanged(){super.localeChanged(),this.runFuncForCellQuestions(e=>{e.localeChanged()})}runFuncForCellQuestions(e){let t=this.generatedVisibleRows;if(t)for(let s=0;s<t.length;s++){let i=t[s];if(i.isVisible)for(let t=0;t<i.cells.length;t++)e(i.cells[t].question)}}runItemsCondition(e){let t,s=0,i=!1,n=this.runConditionsForColumns(e);do t=w.getUnbindValue(this.totalValue),i=this.runCellsCondition(e)||i,this.runTotalsCondition(e),s++;while(!w.isTwoValueEquals(t,this.totalValue)&&s<3)i&&this.isClearValueOnHidden&&this.clearInvisibleValuesInRows(),n&&this.resetRenderedTable(!0),this.updateVisibilityBasedOnRows()}runTriggers(e,t,s){super.runTriggers(e,t,s),this.runFuncForCellQuestions(i=>{i.runTriggers(e,t,s)})}updateElementVisibility(){super.updateElementVisibility();let e=this.generatedVisibleRows;e&&e.forEach(e=>e.updateElementVisibility()),this.updateShowTableAndAddRow()}shouldRunColumnExpression(){return!1}runCellsCondition(e){if(this.isDesignMode)return!1;let t=!1;this.isRunningCellsCondition=!0;let s=this.areInvisibleElementsShowing,i=this.getExpressionFromSurvey("rowsVisibleIf"),n=this.generatedVisibleRows;
1if(n)for(var r=0;r<n.length;r++){let a=n[r].isVisible;n[r].runCondition(e,i,s),a!==n[r].isVisible&&(t=!0)}return this.checkColumnsVisibility(),this.checkColumnsRenderedRequired(),this.isRunningCellsCondition=!1,t}runConditionsForColumns(e){let t=this.getExpressionFromSurvey("columnsVisibleIf");return this.columns.forEach(s=>{t?s.isColumnsVisibleIf=!0===new X(t).runContext(s.getValueGetterContext(),e):s.isColumnsVisibleIf=!0}),!1}checkColumnsVisibility(){if(!this.isDesignMode){for(var e=!1,t=0;t<this.columns.length;t++){let s=this.columns[t],i=!!s.visibleIf||s.isFilteredMultipleColumns;(i||this.columnsVisibleIf||!s.isColumnVisible)&&(e=this.isColumnVisibilityChanged(s,i)||e)}e&&this.resetRenderedTable(!0)}}checkColumnsRenderedRequired(){let e=this.generatedVisibleRows;if(e)for(var t=0;t<this.columns.length;t++){let i=this.columns[t];if(!i.requiredIf||!i.isColumnVisible)continue;let n=e.length>0;for(var s=0;s<e.length;s++)if(!e[s].cells[t].question.isRequired){n=!1;break}i.updateIsRenderedRequired(n)}}isColumnVisibilityChanged(e,t){let s=e.isColumnVisible,i=!t,n=this.generatedVisibleRows,r=t&&n,a=r&&e.isFilteredMultipleColumns,o=a?e.getVisibleChoicesInCell:[],l=[];if(r)for(let t=0;t<n.length;t++){let s=n[t].cells[e.index],r=null==s?void 0:s.question;if(r&&r.isVisible)if(i=!0,a)this.updateNewVisibleChoices(r,l);else break}return e.hasVisibleCell=i&&e.isColumnsVisibleIf,!(!a||(e.setVisibleChoicesInCell(l),w.isArraysEqual(o,l,!0,!1,!1)))||s!==e.isColumnVisible}updateNewVisibleChoices(e,t){let s=e.visibleChoices;if(Array.isArray(s))for(let e=0;e<s.length;e++){let i=s[e];0>t.indexOf(i.value)&&t.push(i.value)}}runTotalsCondition(e){this.generatedTotalRow&&this.generatedTotalRow.runCondition(e)}IsMultiplyColumn(e){return e.isShowInMultipleColumns&&!this.isMobile}locStrsChanged(){super.locStrsChanged();for(var e=this.columns,t=0;t<e.length;t++)e[t].locStrsChanged();var s=this.generatedVisibleRows;
1if(s){for(var t=0;t<s.length;t++)s[t].locStrsChanged();this.generatedTotalRow&&this.generatedTotalRow.locStrsChanged()}}randomSeedChanged(){let e=this.columns;for(var t=0;t<e.length;t++)e[t].templateQuestion.randomSeedChanged();let s=this.generatedVisibleRows;if(s)for(var t=0;t<s.length;t++)s[t].randomSeedChanged()}getColumnByName(e){for(var t=0;t<this.columns.length;t++)if(this.columns[t].name==e)return this.columns[t];return null}getColumnName(e){return this.getColumnByName(e)}getColumnWidth(e){var t;return e.minWidth?e.minWidth:this.columnMinWidth?this.columnMinWidth:(null==(t=p.matrix.columnWidthsByType[e.cellType])?void 0:t.minWidth)||""}get choices(){return this.getItemValuesPropertyValue("choices")}set choices(e){this.setArrayPropertyValue("choices",e)}get optionsCaption(){return this.placeholder}set optionsCaption(e){this.placeholder=e}get singleInputTitleTemplate(){return this.getLocStringText(this.locSingleInputTitleTemplate)}set singleInputTitleTemplate(e){this.setLocStringText(this.locSingleInputTitleTemplate,e)}get locSingleInputTitleTemplate(){return this.getOrCreateLocStr("singleInputTitleTemplate",!0,this.getSingleInputTitleTemplate(),e=>{e.owner=new sq(this)})}getMatrixDropdownBaseSingleQuestionLocTitleCore(){return this.locSingleInputTitleTemplate}getSingleInputTitleTemplate(){return""}processSingleInputTitle(e,t){t||(t=this.getRowByQuestion(this.singleInputQuestion));let s=t?t.getTextProcessor():this.textProcessor;return s?s.processText(e,!0):e}createSingleInputBehavior(){return new sB(this)}get storeOthersAsComment(){return!!this.survey&&this.choiceCallbacks.storeOthersAsComment}addColumn(e,t){var s=new sx(e,t,this);return this.columns.push(s),s}clearVisibleRows(){this.visibleRowsArray=null}isColumnVisible(e){return e.isColumnVisible}getVisibleRows(){return this.isUpdateLocked?null:this.isGenereatingRows?[]:(this.visibleRowsArray||(this.generateVisibleRowsIfNeeded(),this.visibleRowsArray=this.getVisibleFromGenerated(this.generatedVisibleRows),this.updateRowsVisibleIndexes()),this.visibleRowsArray)}get allRows(){return this.isGenereatingRows?[]:(this.generateVisibleRowsIfNeeded(),this.generatedVisibleRows)}generateVisibleRowsIfNeeded(){if(!this.isUpdateLocked&&!this.generatedVisibleRows){this.isGenereatingRows=!0,this.generatedVisibleRows=this.generateRows(),this.isGenereatingRows=!1;for(var e=0;e<this.generatedVisibleRows.length;e++){let t=this.generatedVisibleRows[e];t.visibleIndex=e,this.onMatrixRowCreated(t)}this.data&&(this.runCellsCondition(this.data.getFilteredProperties()),this.isValueChangedWithoutRows&&(this.isValueChangedWithoutRows=!1,this.runTriggersOnNewRows())),this.generatedVisibleRows&&(this.updateValueOnRowsGeneration(this.generatedVisibleRows),this.updateIsAnswered())}}runTriggersOnNewRows(){let e=this.value;this.generatedVisibleRows.forEach(t=>{let s=this.getRowValueCore(t,e);if(!w.isValueEmpty(s)){let e=w.createCopyWithPrefix(s,p.expressionVariables.row+".");t.runTriggers("",void 0,e)}})}getVisibleFromGenerated(e){let t=[];return e?(e.forEach(e=>{e.isVisible&&t.push(e)}),t.length===e.length?e:t):t}updateValueOnRowsGeneration(e){for(var t=this.createNewValue(!0),s=this.createNewValue(),i=0;i<e.length;i++){var n=e[i];if(!n.editingObj){var r=this.getRowValue(i),a=n.value;this.isTwoValueEquals(r,a)||(s=this.getNewValueOnRowChanged(n,"",a,!1,s).value)}}this.isTwoValueEquals(t,s)||(this.isRowChanging=!0,this.setNewValue(s),this.isRowChanging=!1)}get totalValue(){return this.hasTotal&&this.visibleTotalRow?this.visibleTotalRow.value:{}}getVisibleTotalRow(){return this.isUpdateLocked?null:(this.hasTotal?!this.generatedTotalRow&&(this.generatedTotalRow=this.generateTotalRow(),this.data&&this.runTotalsCondition({survey:this.survey})):this.generatedTotalRow=null,this.generatedTotalRow)}get visibleTotalRow(){return this.getVisibleTotalRow()}onSurveyLoad(){super.onSurveyLoad(),this.updateColumnsIndexes(this.columns),this.clearGeneratedRows(),this.generatedTotalRow=null,this.updateHasFooter(),this.genetateColumnsName()}genetateColumnsName(){this.columns.forEach(e=>{e.name&&""!==e.name||(e.name=this.generateNewName(this.columns,"question"))})}
1generateNewName(e,t){return this.getSurvey().getNewGeneratedName(e,t)}getRowValue(e){if(e<0||!Array.isArray(this.visibleRows))return null;var t=this.generatedVisibleRows;if(e>=t.length)return null;let s=this.value,i=this.getRowValueCore(t[e],s);return this.isValueSurveyElement(s)?i:w.getUnbindValue(i)}getItemData(e){return this.getRowValue(this.getItemIndex(e))}checkIfValueInRowDuplicated(e,t){return!!this.generatedVisibleRows&&this.isValueInColumnDuplicated(t.name,!0,e)}setRowValue(e,t){if(e<0)return null;var s=this.visibleRows;if(e>=s.length)return null;s[e].value=t,this.updateItemValue(s[e],"",t,!1)}generateRows(){return null}generateTotalRow(){return new sk(this)}createNewValue(e=!1){var t=this.value?this.createValueCopy():{};return e&&this.isMatrixValueEmpty(t)?null:t}getRowValueCore(e,t,s=!1){var i=t&&t[e.rowName]?t[e.rowName]:null;return!i&&s&&(i={},t&&(t[e.rowName]=i)),i}getRowObj(e){var t=this.getRowValueCore(e,this.value);return t&&t.getType?t:null}getRowDisplayValue(e,t,s){if(!s||t.editingObj)return s;for(var i=Object.keys(s),n=0;n<i.length;n++){var r=i[n],a=t.getQuestionByName(r);if(a||(a=this.getSharedQuestionByName(r,t)),a){var o=a.getDisplayValue(e,s[r]);e&&a.title&&a.title!==r?(s[a.title]=o,delete s[r]):s[r]=o}}return s}getPlainData(e={includeEmpty:!0}){var t=super.getPlainData(e);if(t){t.isNode=!0;let s=Array.isArray(t.data)?[].concat(t.data):[];t.data=this.visibleRows.map(t=>{var s={name:t.dataName,title:t.text,value:t.value,displayValue:this.getRowDisplayValue(!1,t,t.value),getString:e=>this.getValueAsString(e),isNode:!0,data:t.cells.map(t=>t.question.getPlainData(e)).filter(e=>!!e)};return(e.calculations||[]).forEach(e=>{s[e.propertyName]=t[e.propertyName]}),s}),t.data=t.data.concat(s)}return t}addConditionObjectsByContext(e,t){let s=[].concat(this.columns);"none"!==this.detailPanelMode&&(s=s.concat(this.detailPanel.questions));let i=!!t&&s.indexOf(t)>-1,n=!0===t||i,r=this.getConditionObjectsRowIndeces();n&&r.push(-1);for(var a=0;a<r.length;a++){let n=r[a],l=n>-1?this.getConditionObjectRowName(n):"row";if(!l)continue;let u=n>-1?this.getConditionObjectRowText(n):"row",h=n>-1||!0===t,d=h&&-1===n?".":"",c=(h?this.getValueName():"")+d+l+".",p=(h?this.processedTitle:"")+d+u+".";for(var o=0;o<s.length;o++){let r=s[o];if(-1===n&&t===r)continue;let a={name:c+r.name,text:p+r.fullTitle,question:this};-1===n&&!0===t?a.context=this:i&&c.startsWith("row.")&&(a.context=t),e.push(a)}}}onHidingContent(){if(super.onHidingContent(),!this.generatedVisibleRows)return;let e=[];this.collectNestedQuestions(e,!0),e.forEach(e=>e.onHidingContent())}getIsReadyNestedQuestions(){if(!this.generatedVisibleRows)return[];let e=[];return this.collectNestedQuestonsInRows(this.generatedVisibleRows,e,!1,!0,!1),this.generatedTotalRow&&this.collectNestedQuestonsInRows([this.generatedTotalRow],e,!1,!0,!1),e}collectNestedQuestionsCore(e,t,s,i){i&&e.push(this),this.collectNestedQuestonsInRows(this.visibleRows,e,t,s,i)}collectNestedQuestonsInRows(e,t,s,i,n){Array.isArray(e)&&e.forEach(e=>{e.questions.forEach(e=>e.addNestedQuestion(t,s,i,n))})}getConditionObjectRowName(e){return""}getConditionObjectRowText(e){return this.getConditionObjectRowName(e)}getConditionObjectsRowIndeces(){return[]}getProgressInfo(){if(this.getIsRequireToGenerateRows()&&this.generateVisibleRowsIfNeeded(),this.generatedVisibleRows)return tL.getProgressInfoByElements(this.getCellQuestions(),this.isRequired);let e=ew.createProgressInfo();return this.updateProgressInfoByValues(e),0===e.requiredQuestionCount&&this.isRequired&&(e.requiredQuestionCount=1,e.requiredAnsweredQuestionCount=+!this.isEmpty()),e}getIsRequireToGenerateRows(){return!!this.rowsVisibleIf}updateProgressInfoByValues(e){}updateProgressInfoByRow(e,t){for(var s=0;s<this.columns.length;s++){let i=this.columns[s];if(!i.templateQuestion.hasInput)continue;let n=!w.isValueEmpty(t[i.name]);(n||!i.templateQuestion.visibleIf)&&(e.questionCount+=1,e.requiredQuestionCount+=i.isRequired,e.answeredQuestionCount+=+!!n,e.requiredAnsweredQuestionCount+=n&&i.isRequired?1:0)}}getCellQuestions(){let e=[];return this.runFuncForCellQuestions(t=>{e.push(t)}),e}onBeforeValueChanged(e){}onSetQuestionValue(){if(!this.isRowChanging&&(this.onBeforeValueChanged(this.value),this.generatedVisibleRows&&0!=this.generatedVisibleRows.length)){this.isRowChanging=!0;for(var e=this.createNewValue(),t=0;t<this.generatedVisibleRows.length;t++){var s=this.generatedVisibleRows[t];this.generatedVisibleRows[t].value=this.getRowValueCore(s,e)}this.isRowChanging=!1}}setQuestionValue(e){super.setQuestionValue(e,!1),this.onSetQuestionValue(),this.updateIsAnswered()}supportAutoAdvance(){var e=this.generatedVisibleRows;
1if(e||(e=this.visibleRows),!e)return!0;for(var t=0;t<e.length;t++){var s=this.generatedVisibleRows[t].cells;if(s)for(var i=0;i<s.length;i++){var n=s[i].question;if(n&&(!n.supportAutoAdvance()||!n.value))return!1}}return!0}getContainsErrors(){return super.getContainsErrors()||this.checkForAnswersOrErrors(e=>e.containsErrors,!1)}getIsAnswered(){return super.getIsAnswered()&&this.checkForAnswersOrErrors(e=>e.isAnswered,!0)}checkForAnswersOrErrors(e,t=!1){var s=this.generatedVisibleRows;if(!s)return!1;for(var i=0;i<s.length;i++){var n=s[i].cells;if(n){for(var r=0;r<n.length;r++)if(n[r]){var a=n[r].question;if(a&&a.isVisible){if(e(a)){if(!t)return!0}else if(t)return!1}}}}return!!t}validateElementCore(e){let t=this.validateRows(e),s=this.isValueDuplicated(e);return super.validateElementCore(e)&&t&&!s}getIsRunningValidators(){if(super.getIsRunningValidators())return!0;if(!this.generatedVisibleRows)return!1;for(var e=0;e<this.generatedVisibleRows.length;e++){var t=this.generatedVisibleRows[e].cells;if(t){for(var s=0;s<t.length;s++)if(t[s]){var i=t[s].question;if(i&&i.isRunningValidators)return!0}}}return!1}getAllErrors(){var e=super.getAllErrors(),t=this.generatedVisibleRows;
1if(null===t)return e;for(var s=0;s<t.length;s++)for(var i=t[s],n=0;n<i.cells.length;n++){var r=i.cells[n].question.getAllErrors();r&&r.length>0&&(e=e.concat(r))}return e}validateRows(e){let t=this.generatedVisibleRows;t||(t=this.visibleRows);var s=!0;e.isSingleDetailPanel="underRowSingle"===this.detailPanelMode;for(var i=0;i<t.length;i++)t[i].isVisible&&(s=t[i].validate(e)&&s);return s}isValueDuplicated(e){if(!this.generatedVisibleRows)return!1;for(var t=this.getUniqueColumnsNames(),s=!1,i=0;i<t.length;i++){let n=this.getDuplicatedRowAndShowErrors(t[i],!0);n&&n.length>0&&(e.setErrorElement(n[0].getQuestionByColumnName(t[i])),s=!0)}return s}getUniqueColumnsNames(){for(var e=[],t=0;t<this.columns.length;t++)this.columns[t].isUnique&&e.push(this.columns[t].name);return e}isValueInColumnDuplicated(e,t,s){let i=this.getDuplicatedRowAndShowErrors(e,t,s);return s?i.indexOf(s)>-1:i.length>0}getDuplicatedRowAndShowErrors(e,t,s){let i=this.getDuplicatedRows(e);return t&&this.showDuplicatedErrorsInRows(i,e),this.removeDuplicatedErrorsInRows(i,e),i}getDuplicatedRows(e){let t={},s=[],i=this.generatedVisibleRows;for(var n=0;n<i.length;n++){let s,r=i[n].getQuestionByName(e);if(r)s=r.value;else{let t=this.getRowValue(n);s=t?t[e]:void 0}this.isValueEmpty(s)||(this.useCaseSensitiveComparison||"string"!=typeof s||(s=s.toLocaleLowerCase()),t[s]||(t[s]=[]),t[s].push(i[n]))}for(let e in t)t[e].length>1&&t[e].forEach(e=>s.push(e));return s}showDuplicatedErrorsInRows(e,t){e.forEach(e=>{var s;let i=e.getQuestionByName(t),n=null==(s=this.detailPanelValue)?void 0:s.getQuestionByName(t);!i&&n&&(e.showDetailPanel(),e.detailPanel&&(i=e.detailPanel.getQuestionByName(t))),i&&(n&&e.showDetailPanel(),this.addDuplicationError(i))})}removeDuplicatedErrorsInRows(e,t){this.generatedVisibleRows.forEach(s=>{if(0>e.indexOf(s)){let e=s.getQuestionByName(t);e&&this.removeDuplicationError(s,e)}})}getDuplicationError(e){let t=e.errors;for(let e=0;e<t.length;e++)if("keyduplicationerror"===t[e].getErrorType())return t[e];return null}addDuplicationError(e){this.getDuplicationError(e)||e.addError(new eq(this.keyDuplicationError,this))}removeDuplicationError(e,t){t.removeError(this.getDuplicationError(t))&&0===t.errors.length&&e.editingObj&&(e.editingObj[t.getValueName()]=t.value)}getFirstQuestionToFocus(e){return this.getFirstCellQuestion(e)}getFirstInputElementId(){var e=this.getFirstCellQuestion(!1);return e?e.inputId:super.getFirstInputElementId()}getFirstErrorInputElementId(){var e=this.getFirstCellQuestion(!0);return e?e.inputId:super.getFirstErrorInputElementId()}getFirstCellQuestion(e){if(!this.generatedVisibleRows)return null;for(var t=0;t<this.generatedVisibleRows.length;t++)for(var s=this.generatedVisibleRows[t].cells,i=0;i<s.length;i++){let t=s[i].question;if(t.isVisible&&!t.isReadOnly&&(!e||t.currentErrorCount>0))return t}return null}onReadOnlyChanged(){if(super.onReadOnlyChanged(),this.generateRows)for(var e=0;e<this.visibleRows.length;e++)this.visibleRows[e].onQuestionReadOnlyChanged()}createQuestion(e,t){return this.createQuestionCore(e,t)}createQuestionCore(e,t){var s=t.createCellQuestion(e);return s.setSurveyImpl(e),s.setParentQuestion(this),s.inMatrixMode=!0,s}deleteRowValue(e,t){return e?(delete e[t.rowName],this.isObject(e)&&0==Object.keys(e).length?null:e):e}onAnyValueChanged(e,t){if(!this.isUpdateLocked&&!this.isDoingonAnyValueChanged){if(!this.generatedVisibleRows){e===this.getValueName()&&(this.isValueChangedWithoutRows=!0);return}this.isDoingonAnyValueChanged=!0;for(var s=this.generatedVisibleRows,i=0;i<s.length;i++)s[i].onAnyValueChanged(e,t);var n=this.visibleTotalRow;n&&n.onAnyValueChanged(e,t),this.isDoingonAnyValueChanged=!1}}isObject(e){return null!==e&&"object"==typeof e}getOnCellValueChangedOptions(e,t,s){return{row:e,columnName:t,rowValue:s,value:s?s[t]:null,getCellQuestion:t=>e.getQuestionByName(t),cellQuestion:e.getQuestionByName(t),column:this.getColumnByName(t)}}onCellValueChanged(e,t,s,i){if(this.survey){var n=this.getOnCellValueChangedOptions(e,t,s);n.oldValue=i,this.onCellValueChangedCallback&&this.onCellValueChangedCallback(n),this.matrixCallbacks.matrixCellValueChanged(this,n)}}
1validateCell(e,t,s){if(this.survey){var i=this.getOnCellValueChangedOptions(e,t,s);return this.matrixCallbacks.matrixCellValidate(this,i)}}get isValidateOnValueChanging(){return!!this.survey&&this.validationCallbacks.isValidateOnValueChanging}get hasInvisibleRows(){let e=this.generatedVisibleRows;if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(!e[t].isVisible)return!0;return!1}getFilteredData(){return this.isEmpty()||!this.generatedVisibleRows||this.isEditingSurveyElement?this.value:this.getFilteredDataCore()}getFilteredDataCore(){return this.value}onRowChanging(e,t,s){if(!this.survey&&!this.cellValueChangingCallback)return s?s[t]:null;var i=this.getOnCellValueChangedOptions(e,t,s),n=this.getRowValueCore(e,this.createNewValue(),!0);return i.oldValue=n?n[t]:null,this.cellValueChangingCallback&&(i.value=this.cellValueChangingCallback(e,t,i.value,i.oldValue)),this.survey&&this.matrixCallbacks.matrixCellValueChanging(this,i),i.value}getSharedQuestionFromArray(e,t){return this.survey&&this.valueName?this.survey.getQuestionByValueNameFromArray(this.valueName,e,t):null}updateItemValue(e,t,s,i){var n=t?this.getRowObj(e):null;if(n){var r=n[t],a=null;s&&!i&&(a=s[t]),this.isRowChanging=!0,H.setObjPropertyValue(n,t,a),this.isRowChanging=!1,this.onCellValueChanged(e,t,n,r)}else{var o=this.createNewValue(!0),l=this.getRowValueCore(e,o,!0),r=null==l?void 0:l[t],u=this.getNewValueOnRowChanged(e,t,s,i,this.createNewValue());if(this.isTwoValueEquals(o,u.value))return;this.isRowChanging=!0,this.setNewValue(u.value),this.isRowChanging=!1,t&&this.onCellValueChanged(e,t,u.rowValue,r)}this.getUniqueColumnsNames().indexOf(t)>-1&&this.isValueInColumnDuplicated(t,!!n)}getNewValueOnRowChanged(e,t,s,i,n){let r=this.getRowValueCore(e,n,!0);if(i&&delete r[t],e.questions.forEach(e=>{delete r[e.getValueName()]}),s)for(var a in s=JSON.parse(JSON.stringify(s)))this.isValueEmpty(s[a])||(r[a]=s[a]);return this.isObject(r)&&0===Object.keys(r).length&&(n=this.deleteRowValue(n,e)),{value:n=this.correctValueForMinMaxRows(n),rowValue:r}}correctValueForMinMaxRows(e){return e}getItemIndex(e){return Array.isArray(this.generatedVisibleRows)?this.generatedVisibleRows.indexOf(e):-1}getElementsInDesign(e=!1){let t;return t="none"==this.detailPanelMode?super.getElementsInDesign(e):e?[this.detailPanel]:this.detailElements,this.columns.concat(t)}hasDetailPanel(e){return"none"!=this.detailPanelMode&&(!!this.isDesignMode||(this.onHasDetailPanelCallback?this.onHasDetailPanelCallback(e):this.detailElements.length>0))}getIsDetailPanelShowing(e){if("none"==this.detailPanelMode)return!1;if(this.isDesignMode){var t=0==this.visibleRows.indexOf(e);return t&&!e.detailPanel&&e.showDetailPanel(),t}return this.getPropertyValue("isRowShowing"+e.id,!1)}setIsDetailPanelShowing(e,t){if(t!=this.getIsDetailPanelShowing(e)){if(t&&"underRowSingle"===this.detailPanelMode)for(var s=this.visibleRows,i=0;i<s.length;i++)s[i].isDetailPanelShowing&&s[i].hideDetailPanel();this.setPropertyValue("isRowShowing"+e.id,t),this.updateDetailPanelButtonCss(e),this.renderedTable&&this.renderedTable.onDetailPanelChangeVisibility(e,t),this.survey&&this.matrixCallbacks.matrixDetailPanelVisibleChanged(this,e.rowIndex-1,e,t)}}getDetailPanelButtonCss(e){let t=new eX().append(this.getPropertyValue("detailButtonCss"+e.id));return t.append(this.cssClasses.detailButton,""===t.toString()).toString()}getDetailPanelIconCss(e){let t=new eX().append(this.getPropertyValue("detailIconCss"+e.id));return t.append(this.cssClasses.detailIcon,""===t.toString()).toString()}getDetailPanelIconId(e){return this.getIsDetailPanelShowing(e)?this.cssClasses.detailIconExpandedId:this.cssClasses.detailIconId}updateDetailPanelButtonCss(e){let t=this.cssClasses,s=this.getIsDetailPanelShowing(e),i=new eX().append(t.detailIcon).append(t.detailIconExpanded,s);this.setPropertyValue("detailIconCss"+e.id,i.toString());let n=new eX().append(t.detailButton).append(t.detailButtonExpanded,s);this.setPropertyValue("detailButtonCss"+e.id,n.toString())}createRowDetailPanel(e){if(this.isDesignMode)return this.detailPanel;var t=this.createNewDetailPanel();t.readOnly=this.isReadOnly||!e.isRowEnabled(),t.setSurveyImpl(e);var s=this.detailPanel.toJSON();return new Q().toObject(s,t),t.renderWidth="100%",t.updateCustomWidgets(),this.onCreateDetailPanelCallback&&this.onCreateDetailPanelCallback(e,t),t.questions.forEach(e
1=>e.setParentQuestion(this)),t.onSurveyLoad(),t}getSharedQuestionByName(e,t){if(!this.survey||!this.valueName)return null;var s=this.getItemIndex(t);return s<0?null:this.survey.getQuestionByValueNameFromArray(this.valueName,e,s)}getBindedQuestions(){return this.survey&&this.valueName?this.survey.getQuestionsByValueName(this.valueName):[]}getItem(e){return e<0||!this.generatedVisibleRows||e>=this.generatedVisibleRows.length?null:this.generatedVisibleRows[e]}onTotalValueChanged(){this.data&&this.visibleTotalRow&&!this.isUpdateLocked&&!this.isSett&&this.data.setValue(this.getValueName()+p.matrix.totalsSuffix,this.totalValue,!1)}isMatrixReadOnly(){return this.isReadOnly}onRowVisibilityChanged(e){this.clearVisibleRows(),this.resetRenderedTable(),this.resetSingleInput()}clearValueIfInvisibleCore(e){super.clearValueIfInvisibleCore(e),this.clearInvisibleValuesInRows()}clearInvisibleValuesInRows(){var e;this.isEmpty()||!this.isRowsFiltered()||((null==(e=this.survey)?void 0:e.questionsByValueName(this.getValueName()))||[]).length<2&&(this.value=this.getFilteredData())}isRowsFiltered(){return this.visibleRows!==this.generatedVisibleRows}getQuestionFromArray(e,t){return t>=this.visibleRows.length?null:this.visibleRows[t].getQuestionByName(e)}isMatrixValueEmpty(e){if(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)if(this.isObject(e[t])&&Object.keys(e[t]).length>0)return!1;return!0}return 0==Object.keys(e).length}}get SurveyModel(){return this.survey}getCellTemplateData(e){return this.SurveyModel.getMatrixCellTemplateData(e)}getCellWrapperComponentName(e){return this.SurveyModel.getElementWrapperComponentName(e,e.row instanceof sk?"row-footer":"cell")}getCellWrapperComponentData(e){return this.SurveyModel.getElementWrapperComponentData(e,e.row instanceof sk?"row-footer":"cell")}getColumnHeaderWrapperComponentName(e){return this.SurveyModel.getElementWrapperComponentName(e,"column-header")}getColumnHeaderWrapperComponentData(e){return this.SurveyModel.getElementWrapperComponentData(e,"column-header")}getRowHeaderWrapperComponentName(e){return this.SurveyModel.getElementWrapperComponentName(e,"row-header")}getRowHeaderWrapperComponentData(e){return this.SurveyModel.getElementWrapperComponentData(e,"row-header")}onMobileChanged(){super.onMobileChanged(),this.resetRenderedTable()}getRootCss(){return new eX().append(super.getRootCss()).append(this.cssClasses.rootScroll,this.horizontalScroll).toString()}afterRenderQuestionElement(e){super.afterRenderQuestionElement(e),this.setRootElement(null==e?void 0:e.parentElement)}beforeDestroyQuestionElement(e){super.beforeDestroyQuestionElement(e),this.setRootElement(void 0)}setRootElement(e){this.rootElement=e}getRootElement(){return this.rootElement}get dragDropMatrixAttribute(){return this.renderedTable.wrapperDropTargetId}}V([e_()],sF.prototype,"transposeData",void 0),V([e_({isLowerCase:!0})],sF.prototype,"detailErrorLocation",void 0),V([e_({isLowerCase:!0})],sF.prototype,"cellErrorLocation",void 0),V([e_()],sF.prototype,"detailPanelMode",void 0),V([e_({isLowerCase:!0,defaultValue:p.matrix.defaultCellType})],sF.prototype,"cellType",void 0),V([e_({onSetting:e=>e<0?0:e>4?4:e})],sF.prototype,"columnColCount",void 0),V([e_()],sF.prototype,"horizontalScroll",void 0),V([e_({localizable:{defaultStr:!0}})],sF.prototype,"placeholder",void 0),V([e_({localizable:{defaultStr:!0}})],sF.prototype,"keyDuplicationError",void 0);class sB extends tF{get matrixBase(){return this.question}getSingleQuestionLocTitleCore(){return this.matrixBase.locSingleInputTitleTemplate}singleInputMoveToFirstCore(){var e;let t=null==(e=this.matrixBase.singleInputQuestion)?void 0:e.data;this.singleInputEditRow(t)}singleInputEditRow(e){if(!e)return;let t=e.visibleQuestions;Array.isArray(t)&&t.length>0&&this.setSingleInputQuestion(t[0])}}H.addClass("matrixdropdownbase",[{name:"columns:matrixdropdowncolumns",uniqueProperty:"name",className:"matrixdropdowncolumn",isArray:!0},{name:"columnLayout",alternativeName:"columnsLocation",choices:["horizontal","vertical"],visible:!1,isSerializable:!1},{name:"transposeData:boolean",version:"1.9.130",oldName:"columnLayout"},{name:"detailElements",baseClassName:"question",visible:!1,isLightSerializable:!1},{name:"detailPanelMode",choices:["none","underRow","underRowSingle"],default:"none"},{name:"cellErrorLocation",default:"default",choices:["default","to
1p","bottom"]},{name:"detailErrorLocation",default:"default",choices:["default","top","bottom"],visibleIf:e=>!!e&&"none"!=e.detailPanelMode},{name:"horizontalScroll:boolean",visible:!1},{name:"choices:itemvalue[]",uniqueProperty:"value",visibleIf:e=>e.isSelectCellType()},{name:"placeholder",alternativeName:"optionsCaption",serializationProperty:"locPlaceholder"},{name:"keyDuplicationError",serializationProperty:"locKeyDuplicationError"},{name:"singleInputTitleTemplate",serializationProperty:"locSingleInputTitleTemplate",visibleIf(e){var t;return(null==(t=e.survey)?void 0:t.questionsOnPageMode)==="inputPerPage"}},{name:"cellType",default:"dropdown",choices:()=>sx.getColumnTypes()},{name:"columnColCount",default:0,choices:[0,1,2,3,4]},"columnMinWidth",{name:"allowAdaptiveActions:boolean",default:!1,visible:!1}],function(){return new sF("")},"matrixbase");class s_ extends U{constructor(e){super(),this.question=e}getObj(){return this.question}getValue(e){let t=e.path;if(!this.question.isDesignMode&&!e.createObjects&&this.question.isEmpty()&&0===t.length)return{isFound:!0,value:void 0};if(t.length>0){let t=super.getValue(e);if(t&&t.isFound)return t}return new W(this.question.value).getValue(e)}getRootObj(){return this.question.data}updateValueByItem(e,t){var s;let i=this.question.visibleRows;e=e.toLocaleLowerCase();for(let n=0;n<i.length;n++){let r=i[n];if(((null==(s=r.rowName)?void 0:s.toString())||"").toLocaleLowerCase()===e){t.isFound=!0,t.obj=r,t.context=r.getValueGetterContext();return}}}}class sQ extends sM{constructor(e,t,s,i){super(s,i),this.name=e,this.item=t,this.buildCells(i)}get rowName(){return this.name}get rowTitle(){return this.text}get text(){return this.item.text}get locText(){return this.item.locText}isItemVisible(){return this.item.isVisible}isRowEnabled(){return this.item.isEnabled}isRowHasEnabledCondition(){return!!this.item.enableIf}getRowsVisibleIfExpression(e){let t=super.getRowsVisibleIfExpression(e);return this.item.visibleIf&&t.push(this.item.visibleIf),t}runRowsEnableCondition(e){this.item.enableIf&&(this.item.enabled=new X(this.item.enableIf).runContext(this.getValueGetterContext(),e))}}class sH extends sF{constructor(){super(...arguments),this.defaultValuesInRows={}}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"rows"===e&&this.generatedVisibleRows&&(this.clearGeneratedRows(),this.resetRenderedTable(),this.getVisibleRows(),this.clearIncorrectValues()),"hideIfRowsEmpty"===e&&this.updateVisibilityBasedOnRows()}getType(){return"matrixdropdown"}getAllChildren(){return[...super.getAllChildren(),...this.columns,...this.rows]}getFooterText(){return this.locTotalText}getRowTitleWidth(){return this.rowTitleWidth}getSingleInputTitleTemplate(){return"rowNameTemplateTitle"}getValueGetterContext(){return new s_(this)}getDisplayValueCore(e,t){if(!t)return t;var s=this.visibleRows,i={};if(!s)return i;for(var n=0;n<s.length;n++){var r=s[n].rowName,a=t[r];if(a){if(e){var o=tj.getTextOrHtmlByValue(this.rows,r);o&&(r=o)}i[r]=this.getRowDisplayValue(e,s[n],a)}}return i}getConditionObjectRowName(e){return"."+this.rows[e].value}getConditionObjectRowText(e){return"."+this.rows[e].calculatedText}getConditionObjectsRowIndeces(){let e=[];for(var t=0;t<this.rows.length;t++)e.push(t);return e}isNewValueCorrect(e){return w.isValueObject(e,!0)}clearIncorrectValues(){if(!this.isEmpty()){this.getVisibleRows();let e={},t=this.value;for(let s in t){let i=this.getRowByKey(s);i&&i.isVisible&&(e[s]=t[s])}this.value=e}super.clearIncorrectValues()}getRowByKey(e){let t=this.generatedVisibleRows;
1if(!t)return null;for(let s=0;s<t.length;s++)if(t[s].rowName===e)return t[s];return null}clearGeneratedRows(){this.generatedVisibleRows&&(this.isDisposed||this.generatedVisibleRows.forEach(e=>{this.defaultValuesInRows[e.rowName]=e.getNamesWithDefaultValues()}),super.clearGeneratedRows())}getRowValueForCreation(e,t){let s=e[t];if(!s)return s;let i=this.defaultValuesInRows[t];return Array.isArray(i)&&0!==i.length&&i.forEach(e=>{delete s[e]}),s}generateRows(){var e=[],t=this.rows;if(!t||0===t.length)return e;var s=this.value;s||(s={});for(var i=0;i<t.length;i++){let n=t[i];this.isValueEmpty(n.value)||e.push(this.createMatrixRow(n,this.getRowValueForCreation(s,n.value)))}return e}createMatrixRow(e,t){return new sQ(e.value,e,this,t)}getFilteredDataCore(){let e={};return this.generatedVisibleRows.forEach(t=>{t.isVisible&&!t.isEmpty&&(e[t.rowName]=t.filteredValue)}),e}getSearchableItemValueKeys(e){e.push("rows")}getIsRequireToGenerateRows(){if(super.getIsRequireToGenerateRows())return!0;for(let e=0;e<this.rows.length;e++)if(this.rows[e].visibleIf)return!0;return!1}updateProgressInfoByValues(e){let t=this.value;t||(t={});for(var s=0;s<this.rows.length;s++){let i=t[this.rows[s].value];this.updateProgressInfoByRow(e,i||{})}}sortVisibleRows(e){return this.survey&&this.survey.isDesignMode?e:"random"===this.rowOrder.toLowerCase()?w.randomizeArray(e,this.randomSeed):e}endLoadingFromJson(){super.endLoadingFromJson(),this.rows=this.sortVisibleRows(this.rows)}randomSeedChanged(){"random"===this.rowOrder.toLowerCase()&&(this.rows=this.sortVisibleRows(this.rows),this.clearGeneratedRows(),this.resetRenderedTable(),super.randomSeedChanged())}}function sz(e){let t=t=>{t?e.funcOnYes():e.funcOnNo&&e.funcOnNo()};if(p&&p.confirmActionFunc){var s;return void t((s=e.message,p&&p.confirmActionFunc?p.confirmActionFunc(s):confirm(s)))}p&&p.confirmActionAsync?p.confirmActionAsync(e.message,t,e):sU(e.message,t,e)}function sU(e,t,s={}){let i=new R(void 0,!1);i.defaultValue=e||s.message;let n=p.showDialog({componentName:"sv-string-viewer",data:{model:i},onApply:()=>(t(!0),!0),onCancel:()=>(t(!1),!1),displayMode:"popup",isFocusedContent:!1,cssClass:s.cssClass||"sv-popup--confirm"},s.rootElement),r=n.footerToolbar,a=r.getActionById("apply");return r.getActionById("cancel").title=E("cancel",s.locale),a.title=s.applyTitle||E("ok",s.locale),a.innerCss="sd-btn--danger",n.width="min-content",!0}V([e_({localizable:{markdown:!0}})],sH.prototype,"totalText",void 0),V([e_()],sH.prototype,"hideIfRowsEmpty",void 0),V([e_({isLowerCase:!0})],sH.prototype,"rowOrder",void 0),H.addClass("matrixdropdown",[{name:"rows:itemvalue[]",uniqueProperty:"value"},"rowsVisibleIf:condition","rowTitleWidth",{name:"totalText",serializationProperty:"locTotalText"},"hideIfRowsEmpty:boolean",{name:"rowOrder",default:"initial",choices:["initial","random"]}],function(){return new sH("")},"matrixdropdownbase"),sm.Instance.registerQuestion("matrixdropdown",e=>{var t=new sH(e);return t.choices=[1,2,3,4,5],t.rows=sm.DefaultRows,sF.addDefaultColumns(t),t}),p.confirmActionAsync||(p.confirmActionAsync=(e,t,s)=>{sU(e,t,s)}),i.getWindow()&&i.getWindow().addEventListener("touchmove",e=>{sW.PreventScrolling&&e.preventDefault()},{passive:!1});class sW{constructor(e,t=!0,s=!1){this.dd=e,this.longTap=t,this.fitToContainer=s,this.scrollIntervalId=null,this.stopLongTapIfMoveEnough=e=>{e.preventDefault(),this.currentX=e.pageX,this.currentY=e.pageY,this.isMicroMovement||(this.returnUserSelectBack(),this.stopLongTap())},this.stopLongTap=e=>{clearTimeout(this.timeoutID),this.timeoutID=null,n.getDocument().removeEventListener("pointerup",this.stopLongTap),n.getDocument().removeEventListener("pointermove",this.stopLongTapIfMoveEnough)},this.handlePointerCancel=e=>{this.clear()},this.handleEscapeButton=e=>{27==e.keyCode&&this.clear()},this.onContextMenu=e=>{e.preventDefault(),e.stopPropagation()},this.dragOver=e=>{this.moveShortcutElement(e),this.draggedElementShortcut.style.cursor="grabbing",this.dd.dragOver(e)},this.clear=()=>{cancelAnimationFrame(this.scrollIntervalId),n.getDocument().removeEventListener("pointermove",this.dragOver),n.getDocument().removeEventListener("pointercancel",this.handlePointerCancel),n.getDocument().removeEventListener("keydown",this.handleEscapeButton),n.getDocument().removeEventListener("pointerup",this.drop),this.draggedElementShortcut.removeEventListener("pointerup",this.drop),tp&&this.draggedElementShortcut.removeEventListener("contextmenu",this.onContextMenu),this.draggedElementShortcut.parentElement.removeChild(this.draggedElementShortcut),this.dd.clear(),this.draggedElementShortcut=null,this.scrollIntervalId=null,tp&&(this.savedTargetNode.style.cssText=null,this.savedTargetNode&&this.savedTargetNode.parentElement.removeChild(this.savedTargetNode),this.insertNodeToParentAtIndex(this.savedTargetNodeParent,this.savedTargetNode,this.savedTargetNodeIndex),sW.PreventScrolling=!1),this.savedTargetNode=null,this.savedTargetNodeParent=null,this.savedTargetNodeIndex=null,this.returnUserSelectBack()},this.drop=()=>{this.dd.drop(),this.clear()},this.draggedElementShortcut=null}get documentOrShadowRoot(){let e=this.rootElement.getRootNode();return e instanceof Document||e instanceof ShadowRoot?e:void 0}get rootElement(){return e7(p.environment.root)?this.rootContainer||p.environment.root:this.rootContainer||p.environment.root.documentElement||n.getDocument().body}get viewRootElement(){return e7(this.rootElement)?this.rootElement.host:this.rootElement}get isMicroMovement(){let e=Math.abs(this.currentX-this.startX),t=Math.abs(this.currentY-this.startY);return e<5&&t<5}
1startLongTapProcessing(e,t,s,i,r=!1){this.startX=e.pageX,this.startY=e.pageY,n.getDocument().body.style.setProperty("touch-action","none","important"),this.timeoutID=setTimeout(()=>{this.doStartDrag(e,t,s,i),r||(this.savedTargetNode=e.target,this.savedTargetNode.style.cssText=` 2 position: absolute; 3 height: 1px!important; 4 width: 1px!important; 5 overflow: hidden; 6 clip: rect(1px 1px 1px 1px); 7 clip: rect(1px, 1px, 1px, 1px); 8 `,this.savedTargetNodeParent=this.savedTargetNode.parentElement,this.savedTargetNodeIndex=this.getNodeIndexInParent(this.savedTargetNode),this.rootElement.appendChild(this.savedTargetNode)),this.stopLongTap()},500*!!this.longTap),n.getDocument().addEventListener("pointerup",this.stopLongTap),n.getDocument().addEventListener("pointermove",this.stopLongTapIfMoveEnough)}moveShortcutElement(e){let t=this.viewRootElement.getBoundingClientRect().x,s=this.viewRootElement.getBoundingClientRect().y,i=this.viewRootElement.scrollLeft,r=this.viewRootElement.scrollTop;this.doScroll(e.clientY,e.clientX);let a=this.draggedElementShortcut.offsetHeight,o=this.draggedElementShortcut.offsetWidth,l=this.draggedElementShortcut.shortcutXOffset||o/2,u=this.draggedElementShortcut.shortcutYOffset||a/2;"rtl"===n.getComputedStyle(this.rootElement).direction&&(l=o/2,u=a/2);let h=n.getDocument().documentElement.clientHeight,d=n.getDocument().documentElement.clientWidth,c=e.pageX,p=e.pageY,g=e.clientX,m=e.clientY;t-=i,s-=r;let v=this.getShortcutBottomCoordinate(m,a,u);if(this.getShortcutRightCoordinate(g,o,l)>=d){this.draggedElementShortcut.style.left=d-o-t+"px",this.draggedElementShortcut.style.top=m-u-s+"px";return}if(g-l<=0){this.draggedElementShortcut.style.left=c-g-t+"px",this.draggedElementShortcut.style.top=m-s-u+"px";return}if(v>=h){this.draggedElementShortcut.style.left=g-l-t+"px",this.draggedElementShortcut.style.top=h-a-s+"px";return}if(m-u<=0){this.draggedElementShortcut.style.left=g-l-t+"px",this.draggedElementShortcut.style.top=p-m-s+"px";return}this.draggedElementShortcut.style.left=g-t-l+"px",this.draggedElementShortcut.style.top=m-s-u+"px"}getShortcutBottomCoordinate(e,t,s){return e+t-s}getShortcutRightCoordinate(e,t,s){return e+t-s}requestAnimationFrame(e){return requestAnimationFrame(e)}scrollByDrag(e,t,s){let i,r,a,o;"HTML"===e.tagName?(i=0,r=n.getDocument().documentElement.clientHeight,a=0,o=n.getDocument().documentElement.clientWidth):(i=e.getBoundingClientRect().top,r=e.getBoundingClientRect().bottom,a=e.getBoundingClientRect().left,o=e.getBoundingClientRect().right);let l=()=>{let n=t-i<=100,u=r-t<=100,h=s-a<=100,d=o-s<=100;!n||h||d?!u||h||d?!d||n||u?!h||n||u||(e.scrollLeft-=15):e.scrollLeft+=15:e.scrollTop+=15:e.scrollTop-=15,this.scrollIntervalId=this.requestAnimationFrame(l)};this.scrollIntervalId=this.requestAnimationFrame(l)}doScroll(e,t){cancelAnimationFrame(this.scrollIntervalId);let s=this.draggedElementShortcut.style.display;this.draggedElementShortcut.style.display="none";let i=this.documentOrShadowRoot.elementFromPoint(t,e);this.draggedElementShortcut.style.display=s||"block";let n=e3(i);this.scrollByDrag(n,e,t)}doStartDrag(e,t,s,i){tp&&(sW.PreventScrolling=!0),3!==e.which&&(this.dd.dragInit(e,t,s,i),this.rootElement.append(this.draggedElementShortcut),this.moveShortcutElement(e),n.getDocument().addEventListener("pointermove",this.dragOver),n.getDocument().addEventListener("pointercancel",this.handlePointerCancel),n.getDocument().addEventListener("keydown",this.handleEscapeButton),n.getDocument().addEventListener("pointerup",this.drop),tp?this.draggedElementShortcut.addEventListener("contextmenu",this.onContextMenu):this.draggedElementShortcut.addEventListener("pointerup",this.drop))}returnUserSelectBack(){n.getDocument().body.style.setProperty("touch-action","auto"),n.getDocument().body.style.setProperty("user-select","auto"),n.getDocument().body.style.setProperty("-webkit-user-select","auto")}startDrag(e,t,s,i,r=!1){(n.getDocument().body.style.setProperty("user-select","none","important"),n.getDocument().body.style.setProperty("-webkit-user-select","none","important"),tp)?this.startLongTapProcessing(e,t,s,i,r):this.doStartDrag(e,t,s,i)}getNodeIndexInParent(e){return[...e.parentElement.childNodes].indexOf(e)}insertNodeToParentAtIndex(e,t,s){e.insertBefore(t,e.childNodes[s])}}sW.PreventScrolling=!1;class sj{get isBottom(){return!!this._isBottom}set isBottom(e){this._isBottom=e,this.ghostPositionChanged()}ghostPositionChanged(){this.onGhostPositionChanged.fire({},{})}get dropTargetDataAttributeName(){return`[data-sv-drop-target-${this.draggedElementType}]`}get survey(){var e;return this.surveyValue||(null==(e=this.creator)?void 0:e.survey)}constructor(e,t,s,i){var n;this.surveyValue=e,this.creator=t,this._isBottom=null,this.onGhostPositionChanged=new P,this.onDragStart=new P,this.onDragEnd=new P,this.onDragClear=new P,this.onBeforeDrop=this.onDragStart,this.onAfterDrop=this.onDragEnd,this.draggedElement=null,this.dropTarget=null,this.prevDropTarget=null,this.allowDropHere=!1,this.banDropHere=()=>{this.allowDropHere=!1,this.doBanDropHere(),this.dropTarget=null,this.domAdapter.draggedElementShortcut.style.cursor="not-allowed",this.isBottom=null},this.doBanDropHere=()=>{},this.domAdapter=i||new sW(this,s,null==(n=this.survey)?void 0:n.fitToContainer)}startDrag(e,t,s,i,n=!1){this.domAdapter.rootContainer=this.getRootElement(this.survey,this.creator),this.domAdapter.startDrag(e,t,s,i,n)}getRootElement(e,t){return t?t.rootElement:e.rootElement}dragInit(e,t,s,i){this.draggedElement=t,this.parentElement=s;let n=this.getShortcutText(this.draggedElement);this.domAdapter.draggedElementShortcut=this.createDraggedElementShortcut(n,i,e),this.onStartDrag(e);let r=this.draggedElement&&this.draggedElement.parent;this.onDragStart.fire(this,{fromElement:r,draggedElement:this.draggedElement})}onStartDrag(e){}isDropTargetDoesntChanged(e){return this.dropTarget===this.prevDropTarget&&e===this.isBottom}getShortcutText(e){return null==e?void 0:e.shortcutText}createDraggedElementShortcut(e,t,s){let i=n.createElement("div");return i&&(i.innerText=e,i.className=this.getDraggedElementClass()),i}getDraggedElementClass(){return"sv-dragged-element-shortcut"}doDragOver(){}afterDragOver(e){}findDropTargetNodeFromPoint(e,t){let s=this.domAdapter.draggedElementShortcut.style.display;
8if(this.domAdapter.draggedElementShortcut.style.display="none",!n.isAvailable())return null;let i=this.domAdapter.documentOrShadowRoot.elementsFromPoint(e,t);this.domAdapter.draggedElementShortcut.style.display=s||"block";let r=0,a=i[0];for(;a&&a.className&&"function"==typeof a.className.indexOf&&-1!=a.className.indexOf("sv-drag-target-skipped");)a=i[++r];return a?this.findDropTargetNodeByDragOverNode(a):null}getDataAttributeValueByNode(e){let t="svDropTarget";return this.draggedElementType.split("-").forEach(e=>{t+=this.capitalizeFirstLetter(e)}),e.dataset[t]}getDropTargetByNode(e,t){let s=this.getDataAttributeValueByNode(e);return this.getDropTargetByDataAttributeValue(s,e,t)}capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}calculateVerticalMiddleOfHTMLElement(e){let t=e.getBoundingClientRect();return t.y+t.height/2}calculateHorizontalMiddleOfHTMLElement(e){let t=e.getBoundingClientRect();return t.x+t.width/2}calculateIsBottom(e,t){return!1}findDropTargetNodeByDragOverNode(e){return e.closest(this.dropTargetDataAttributeName)}dragOver(e){let t=this.findDropTargetNodeFromPoint(e.clientX,e.clientY);if(!t)return void this.banDropHere();this.dropTarget=this.getDropTargetByNode(t,e);let s=this.isDropTargetValid(this.dropTarget,t);if(this.doDragOver(),!s)return void this.banDropHere();let i=this.calculateIsBottom(e.clientY,t);this.allowDropHere=!0,this.isDropTargetDoesntChanged(i)||(this.isBottom=null,this.isBottom=i,this.draggedElement!=this.dropTarget&&this.afterDragOver(t),this.prevDropTarget=this.dropTarget)}drop(){if(this.allowDropHere){let e=this.draggedElement.parent,t=this.doDrop();this.onDragEnd.fire(this,{fromElement:e,draggedElement:t,toElement:this.dropTarget})}}clear(){let e={draggedElement:this.draggedElement};this.dropTarget=null,this.prevDropTarget=null,this.draggedElement=null,this.isBottom=null,this.parentElement=null,this.onDragClear.fire(this,e)}}class sG extends sj{constructor(){super(...arguments),this.dropIsBanned=!1,this.matrixRowMap={},this.fromIndex=null,this.toIndex=null,this.toMatrix=null,this.expandCollapseTimer=null,this.expandCollapseHandlingRow=null,this.doBanDropHere=()=>{this.dropIsBanned||(this.removeGhost(),this.parentElement.renderedTable.rows.splice(this.initialDraggedElementIndex,0,this.draggedRenderedRow),this.dropIsBanned=!0,this.lastDropTargetParentElement=this.parentElement)},this.doDrop=()=>{if(this.parentElement==this.toMatrix)this.fromIndex<this.toIndex&&this.toIndex--,this.parentElement.moveRowByIndex(this.fromIndex,this.toIndex);else if(this.toMatrix){let e=Object.assign({},this.parentElement.value[this.fromIndex]);this.parentElement.removeRowByIndex(this.fromIndex),this.toMatrix.addRowByIndex(e,this.toIndex)}return this.parentElement}}get draggedElementType(){return"matrix-row"}patchUserSelect(){let e=n.getBody();e&&(this.restoreUserSelectValue=e.style.userSelect,e.style.userSelect="none")}onStartDrag(){var e;this.patchUserSelect();let t=this.parentElement.renderedTable.rows,s=t.findIndex(e=>e.row===this.draggedElement);s>=0&&(this.draggedRenderedRow=t[s],this.initialDraggedElementIndex=s,this.draggedRenderedRow.isGhostRow=!0,this.lastDropTargetParentElement=this.parentElement);let i=[];this.survey.onMatrixRowDragOver.isEmpty?i.push(this.parentElement):this.fillMatricies(this.survey.getAllQuestions(),i),this.fillMatrixRowMap(i),this.fromIndex=this.parentElement.visibleRows.indexOf(this.draggedElement),null==(e=this.draggedElement)||e.hideDetailPanel()}fillMatricies(e,t){e.filter(e=>e.isDescendantOf("matrixdynamic")&&e.allowRowReorder).forEach(e=>{t.push(e),"none"!==e.detailPanelMode&&e.visibleRows.forEach(e=>{e.isDetailPanelShowing&&this.fillMatricies(e.questions,t)})})}fillMatrixRowMap(e){e.forEach(e=>{e.visibleRows.forEach(t=>{this.matrixRowMap[t.id]={row:t,matrix:e}}),0==e.visibleRows.length&&(this.matrixRowMap[e.id]={row:e,matrix:e})})}get shortcutClass(){return new eX().append(this.parentElement.cssClasses.draggedRow).toString()}createDraggedElementShortcut(e,t,s){let i=n.createElement("div");if(i){if(i.className=this.shortcutClass,t){let e=t.closest("[data-sv-drop-target-matrix-row]"),n=e.cloneNode(!0);n.style.cssText=` 9 width: ${e.offsetWidth}px; 10 `,n.classList.remove("sv-matrix__drag-drop--moveup"),n.classList.remove("sv-matrix__drag-drop--movedown"),this.draggedElement.isDragDropMoveDown=!1,this.draggedElement.isDragDropMoveUp=!1,i.appendChild(n);let r=t.getBoundingClientRect();i.shortcutXOffset=s.clientX-r.x,i.shortcutYOffset=s.clientY-r.y}return i}}getDropTargetByDataAttributeValue(e){let t=this.matrixRowMap[e];return(null==t?void 0:t.row)||(null==t?void 0:t.matrix)}canInsertIntoThisRow(e){let t=this.parentElement.lockedRowCount;return t<=0||e.rowIndex>t}isDropTargetValid(e,t){return this.canInsertIntoThisRow(e)}calculateIsBottom(e,t){if(t.dataset.svDropTargetMatrix)return!0;let s=t.getBoundingClientRect();return e>=s.y+s.height/2}doDragOver(){var e,t,s,i,n,r,a,o;if(!this.survey.onMatrixRowDragOver.isEmpty&&this.dropTarget&&void 0!==this.dropTarget.isDetailPanelShowing&&!1===this.dropTarget.isDetailPanelShowing){let l=this.dropTarget,u=l.data,h=u.renderedTable.rows.filter(e=>e.row==l)[0],d=null==(i=null==(s=null==(t=null==(e=null==h?void 0:h.cells[1])?void 0:e.item)?void 0:t.value)?void 0:s.actions)?void 0:i.filter(e=>
10"show-detail"==e.id)[0],c=null==(o=null==(a=null==(r=null==(n=null==h?void 0:h.cells[h.cells.length-1])?void 0:n.item)?void 0:r.value)?void 0:a.actions)?void 0:o.filter(e=>"show-detail"==e.id)[0];(null==d?void 0:d.visible)||(null==c?void 0:c.visible)?this.expandCollapseHandlingRow!==l.id&&(this.expandCollapseHandlingRow=l.id,this.clearExpandCollapseTimeout(),this.expandCollapseTimer=setTimeout(()=>{let e=[];l.showDetailPanel(),this.fillMatricies([u],e),this.fillMatrixRowMap(e)},500)):this.clearExpandCollapseTimeout()}}removeGhost(){let e=this.lastDropTargetParentElement.renderedTable.rows,t=e.indexOf(this.draggedRenderedRow);t>=0&&e.splice(t,1)}afterDragOver(e){if(!this.dropTarget)return;let t=this.matrixRowMap[this.dropTarget.id].matrix,s=this.matrixRowMap[this.dropTarget.id].row,i=this.isBottom&&!s.isDetailPanelShowing?1:0,n=0,r={allow:t==this.parentElement,row:s,fromMatrix:this.parentElement,toMatrix:t};if(this.survey.onMatrixRowDragOver.fire(this.survey,r),!r.allow)return;this.removeGhost(),this.lastDropTargetParentElement=t;let a=t.renderedTable.rows;if(t.visibleRows.length>0){let e=a.findIndex(e=>e.row==this.dropTarget);e>=0&&a.splice(e+i,0,this.draggedRenderedRow),n=t.visibleRows.indexOf(this.dropTarget)+i}else t.renderedTable.headerRow||(a[0].cells[0].colSpans=this.draggedRenderedRow.cells.length),a.splice(0,0,this.draggedRenderedRow);this.toIndex=n,this.toMatrix=t,this.dropIsBanned=!1,super.ghostPositionChanged()}clear(){this.matrixRowMap={},this.parentElement.renderedTable.rows.forEach(e=>{e.isGhostRow=!1}),this.parentElement.clearOnDrop(),this.toMatrix&&this.toMatrix.clearOnDrop(),this.fromIndex=null,this.toIndex=null;let e=n.getBody();e&&(e.style.userSelect=this.restoreUserSelectValue||"initial"),super.clear(),this.clearExpandCollapseTimeout()}clearExpandCollapseTimeout(){clearTimeout(this.expandCollapseTimer),this.expandCollapseTimer=null,this.expandCollapseHandlingRow=null}}class sZ{constructor(e,t=!0){this.dragHandler=e,this.preventOnTouch=t,this.rootNode=null,this.onPointerUp=e=>{this.clearListeners()},this.tryToStartDrag=e=>{if(this.currentX=e.pageX,this.currentY=e.pageY,!this.isMicroMovement)return this.clearListeners(),this.dragHandler(this.pointerDownEvent,this.targets,this.itemModel),!0}}onPointerDown(e,t){if(this.targets={currentTarget:e.currentTarget,target:e.target},tp&&this.preventOnTouch)return void this.dragHandler(e,this.targets,t);this.pointerDownEvent=e,this.startX=e.pageX,this.startY=e.pageY;let s=e4(this.targets.currentTarget);s&&(s.addEventListener("pointermove",this.tryToStartDrag),this.rootNode=s,this.targets.currentTarget.addEventListener("pointerup",this.onPointerUp),this.itemModel=t)}get isMicroMovement(){let e=Math.abs(this.currentX-this.startX),t=Math.abs(this.currentY-this.startY);return e<10&&t<10}clearListeners(){var e;this.pointerDownEvent&&(null==(e=this.rootNode)||e.removeEventListener("pointermove",this.tryToStartDrag),this.targets.currentTarget.getRootNode().removeEventListener("pointermove",this.tryToStartDrag),this.targets.currentTarget.removeEventListener("pointerup",this.onPointerUp))}}class sJ{constructor(e,t,s){this.locText=e,this.btnEdit=t,this.btnRemove=s}get showRemove(){return!!this.btnRemove}}class sK{constructor(e,t){this.question=e,this.noEntry=t,this.items=[]}isEmpty(){return 0==this.items.length}dispose(){this.items.forEach(e=>{var t,s;null==(t=e.btnEdit)||t.dispose(),null==(s=e.btnRemove)||s.dispose()})}}class sY extends tB{constructor(e){super(e),this.question=e}getValue(e){let t=e.path,s=e.index,i=this.question;if(s>-1&&i.isDesignMode)return i.getDesignRowContext().getValue(e);if(s>-1){let t=i.allRows;return s>=0&&s<t.length?(e.isRoot=!1,t[s].getValueGetterContext().getValue(e)):{isFound:!1,value:void 0,context:this}}return!e.createObjects&&this.question.isEmpty()?{isFound:0===t.length,value:void 0}:super.getValue(e)}}class s$ extends sM{constructor(e,t,s){super(t,s),this.index=e,this.buildCells(s)}getItemIndex(){let e=super.getItemIndex();return e>0?e:this.index+1}get rowName(){return this.id}get dataName(){return"row"+(this.index+1)}get text(){return"row "+(this.visibleIndex+1)}getAccessbilityText(){return(this.visibleIndex+1).toString()}get shortcutText(){let e=this.data.visibleRows.indexOf(this)+1,t=this.cells.length>1?this.cells[1].questionValue:void 0,s=this.cells.length>0?this.cells[0].questionValue:void 0;return t&&t.value||s&&s.value||""+e}}class sX extends sF{constructor(e){super(e),this.rowCounter=0,this.setRowCountValueFromData=!1,this.startDragMatrixRow=(e,t)=>{this.dragDropMatrixRows.startDrag(e,this.draggedRow,this,t.target)},this.initialRowCount=this.getDefaultPropertyValue("rowCount"),this.dragOrClickHelper=new sZ(this.startDragMatrixRow)}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),("hideColumnsIfEmpty"===e||"allowAddRows"===e)&&this.updateShowTableAndAddRow(),["allowRowReorder","isReadOnly","lockedRowCount"].indexOf(e)>-1&&this.resetRenderedTable(),"minRowCount"===e&&this.onMinRowCountChanged(),"maxR
10owCount"===e&&this.onMaxRowCountChanged(),"allowRemoveRows"!==e||this.isUpdateLocked||this.resetRenderedTable()}setSurveyImpl(e,t){super.setSurveyImpl(e,t),this.dragDropMatrixRows=new sG(this.survey,null,!0)}isBanStartDrag(e){let t=e.target;return"true"===t.getAttribute("contenteditable")||"INPUT"===t.nodeName||!this.isDragHandleAreaValid(t)}isDragHandleAreaValid(e){return"icon"!==this.matrixCallbacks.matrixDragHandleArea||e.classList.contains(this.cssClasses.dragElementDecorator)}onPointerDown(e,t){!t||!this.isRowsDragAndDrop||this.isDesignMode||this.isBanStartDrag(e)||(this.draggedRow=t,this.dragOrClickHelper.onPointerDown(e))}getType(){return"matrixdynamic"}getAllChildren(){return[...super.getAllChildren(),...this.columns,...this.choices]}get isRowsDynamic(){return!0}get isValueArray(){return!0}get defaultValueFromLastRow(){return this.copyDefaultValueFromLastEntry}set defaultValueFromLastRow(e){this.copyDefaultValueFromLastEntry=e}isDefaultValueEmpty(){return super.isDefaultValueEmpty()&&this.isValueEmpty(this.defaultRowValue)}valueFromData(e){return this.minRowCount<1||this.isEditingSurveyElement||this.isEmpty()?super.valueFromData(e):this.correctValueForMinMaxRows(e)}correctValueForMinMaxRows(e){Array.isArray(e)||(e=[]);for(var t=e.length;t<this.minRowCount;t++)e.push({});return e}isNewValueCorrect(e){return Array.isArray(e)}setDefaultValue(){if(this.isValueEmpty(this.defaultRowValue)||!this.isValueEmpty(this.defaultValue))return void super.setDefaultValue();if(this.isEmpty()&&0!=this.rowCount){for(var e=[],t=0;t<this.rowCount;t++)e.push(this.defaultRowValue);this.value=e}}moveRowByIndex(e,t){let s=this.createNewValue(),i=Math.max(e,t);if(!Array.isArray(s)&&i>=s.length)return;let n=s[e];s.splice(e,1),s.splice(t,0,n);let r=this.generatedVisibleRows;
10if(Array.isArray(r)&&i<r.length){let s=r[t],i=r[e];if(this.getIsDetailPanelShowing(i)!==this.getIsDetailPanelShowing(s)){let e=this.getIsDetailPanelShowing(s);this.setIsDetailPanelShowing(s,this.getIsDetailPanelShowing(i)),this.setIsDetailPanelShowing(i,e)}}this.value=s,this.draggedRow=null}addRowByIndex(e,t){let s=this.createNewValue();(Array.isArray(s)||!(t>=s.length))&&(s.splice(t,0,e),this.rowCount++,this.value=s)}removeRowByIndex(e){let t=this.createNewValue();(Array.isArray(t)||!(e>=t.length))&&(t.splice(e,1),this.rowCount--,this.value=t)}clearOnDrop(){this.isEditingSurveyElement||this.resetRenderedTable()}initDataUI(){this.generatedVisibleRows||this.getVisibleRows()}get rowCount(){return this.rowCountValue}set rowCount(e){if(!((e=w.getNumber(e))<0)&&!(e>p.matrix.maxRowCount)&&e!==this.rowCount){this.setRowCountValueFromData=!1;var t=this.rowCountValue;if(this.rowCountValue=e,this.value&&this.value.length>e){var s=this.value;s.splice(e),this.value=s}if(this.isUpdateLocked){this.initialRowCount=e;return}if(this.generatedVisibleRows||0==t){this.generatedVisibleRows||(this.clearGeneratedRows(),this.generatedVisibleRows=[]),this.generatedVisibleRows.splice(e);for(var i=t;i<e;i++){var n=this.createMatrixRow(this.getValueForNewRow());this.generatedVisibleRows.push(n),this.onMatrixRowCreated(n)}this.runCondition(this.getDataFilteredProperties())}this.onRowsChanged()}}updateBindingProp(e,t){super.updateBindingProp(e,t);let s=this.generatedVisibleRows;
10if("rowCount"!==e||!Array.isArray(s))return;let i=this.getUnbindValue(this.value)||[];if(i.length<s.length){let e=!1;for(let t=i.length;t<s.length;t++)e||(e=!s[t].isEmpty),i.push(s[t].value||{});e&&(this.value=i)}}updateProgressInfoByValues(e){let t=this.value;Array.isArray(t)||(t=[]);for(var s=0;s<this.rowCount;s++){let i=s<t.length?t[s]:{};this.updateProgressInfoByRow(e,i)}}getValueForNewRow(){var e=null;return this.onGetValueForNewRowCallBack&&(e=this.onGetValueForNewRowCallBack(this)),e}get allowRowsDragAndDrop(){return this.allowRowReorder}set allowRowsDragAndDrop(e){this.allowRowReorder=e}get allowRowDragIn(){var e,t;return!(null==(t=null==(e=this.survey)?void 0:e.onMatrixRowDragOver)?void 0:t.isEmpty)}get isRowsDragAndDrop(){return this.allowRowReorder&&!this.isReadOnly}get iconDragElement(){return this.cssClasses.iconDragElement}createRenderedTable(){return new s1(this)}get rowCountValue(){return this.getPropertyValue("rowCount")}set rowCountValue(e){this.setPropertyValue("rowCount",e)}onMinRowCountChanged(){let e=this.minRowCount;e>this.maxRowCount&&(this.maxRowCount=e),this.initialRowCount<e&&(this.initialRowCount=e),this.rowCount<e&&(this.rowCount=e)}onMaxRowCountChanged(){let e=this.maxRowCount;e<this.minRowCount&&(this.minRowCount=e),this.rowCount>e&&(this.rowCount=e)}get canAddRow(){return this.allowAddRows&&!this.isReadOnly&&this.rowCount<this.maxRowCount}get canRemoveRows(){var e=this.allowRemoveRows&&!this.isReadOnly&&this.rowCount>this.minRowCount;return this.canRemoveRowsCallback?this.canRemoveRowsCallback(e):e}canRemoveRow(e){if(!this.survey)return!0;let t=e.rowIndex-1;return(!(this.lockedRowCount>0)||!(t<this.lockedRowCount))&&this.matrixCallbacks.matrixAllowRemoveRow(this,t,e)}addRowUI(){this.addRow(!0)}getQuestionToFocusOnAddingRow(){if(0===this.visibleRows.length)return null;for(var e=this.visibleRows[this.visibleRows.length-1],t=0;t<e.cells.length;t++){var s=e.cells[t].question;if(s&&s.isVisible&&!s.isReadOnly)return s}return null}addRow(e){let t=this.rowCount,s=this.canAddRow;var i={question:this,canAddRow:s,allow:s};if(this.survey&&this.matrixCallbacks.matrixBeforeRowAdded(i),(s!==i.allow?i.allow:s!==i.canAddRow?i.canAddRow:s)&&(this.onStartRowAddingRemoving(),this.addRowCore(),this.onEndRowAdding(),this.singleInputOnAddItem(!1),this.detailPanelShowOnAdding&&this.visibleRows.length>0&&this.visibleRows[this.visibleRows.length-1].showDetailPanel(),e&&t!==this.rowCount)){let e=this.getQuestionToFocusOnAddingRow();e&&e.focus()}}runConditionsForColumns(e){return!1}unbindValue(){this.clearGeneratedRows(),this.clearPropertyValue("value"),this.rowCountValue=0,super.unbindValue()}isValueSurveyElement(e){return this.isEditingSurveyElement||super.isValueSurveyElement(e)}addRowCore(){var e=this.rowCount;this.rowCount=this.rowCount+1;var t=this.getDefaultRowValue(!0),s=null;if(this.isValueEmpty(t)||(s=this.createNewValue()).length==this.rowCount&&(s[s.length-1]=t,this.value=s),this.data){this.runCellsCondition(this.getDataFilteredProperties());let e=this.generatedVisibleRows;
10if(this.isValueEmpty(t)&&e.length>0){let t=e[e.length-1];!this.isValueEmpty(t.value)&&(s||(s=this.createNewValue()),this.isValueSurveyElement(s)||this.isTwoValueEquals(s[s.length-1],t.value)||(s[s.length-1]=t.value,this.value=s))}}if(this.survey){let t=this.visibleRows;if(e+1==this.rowCount&&t.length>0){let e=t[t.length-1];this.matrixCallbacks.matrixRowAdded(this,e),this.onRowsChanged()}}}getDefaultRowValue(e){for(var t=null,s=0;s<this.columns.length;s++){var i=this.columns[s].templateQuestion;i&&!this.isValueEmpty(i.getDefaultValue())&&((t=t||{})[this.columns[s].name]=i.getDefaultValue())}if(!this.isValueEmpty(this.defaultRowValue))for(var n in this.defaultRowValue)(t=t||{})[n]=this.defaultRowValue[n];if(e&&this.copyDefaultValueFromLastEntry){var r=this.value;if(r&&Array.isArray(r)&&r.length>=this.rowCount-1){var a=r[this.rowCount-2];for(var n in a)(t=t||{})[n]=a[n]}}return t}focusAddBUtton(){let e=this.getRootElement();if(e&&this.cssClasses.buttonAdd){let t=e.querySelectorAll("."+this.cssClasses.buttonAdd)[0];t&&t.focus()}}getActionCellIndex(e){let t=+!!this.showHeader;return this.isColumnLayoutHorizontal?e.cells.length:this.visibleRows.indexOf(e)+t}removeRowUI(e){if(e&&e.rowName){var t=this.visibleRows.indexOf(e);if(t<0)return;e=t}this.removeRow(e,void 0,()=>{let e=this.visibleRows.length,s=t>=e?e-1:t,i=s>-1?this.visibleRows[s]:void 0;setTimeout(()=>{i?this.renderedTable.focusActionCell(i,this.getActionCellIndex(i)):this.focusAddBUtton()},10)})}isRequireConfirmOnRowDelete(e){if(!this.confirmDelete||e<0||e>=this.rowCount)return!1;var t=this.createNewValue();return!this.isValueEmpty(t)&&!!Array.isArray(t)&&!(e>=t.length)&&!this.isValueEmpty(t[e])}removeRow(e,t,s){if(this.canRemoveRows&&!(e<0)&&!(e>=this.rowCount)){var i=this.visibleRows&&e<this.visibleRows.length?this.visibleRows[e]:null;if(void 0===t&&(t=this.isRequireConfirmOnRowDelete(e)),t)return void sz({message:this.confirmDeleteText,funcOnYes:()=>{this.removeRowAsync(e,i),s&&s()},locale:this.getLocale(),rootElement:this.survey.rootElement,cssClass:this.cssClasses.confirmDialog});this.removeRowAsync(e,i),s&&s()}}removeRowAsync(e,t){(!t||!this.survey||this.matrixCallbacks.matrixRowRemoving(this,e,t))&&(this.onStartRowAddingRemoving(),this.removeRowCore(e),this.singleInputOnRemoveItem(e),this.onEndRowRemoving(t),this.initialRowCount>this.rowCount&&(this.initialRowCount=this.rowCount))}removeRowCore(e){var t=this.visibleRows?this.visibleRows[e]:null;if(!((e=this.generatedVisibleRows.indexOf(t))<0)){if(this.generatedVisibleRows&&e<this.generatedVisibleRows.length&&this.generatedVisibleRows.splice(e,1),this.rowCountValue--,this.value){var s=[];s=Array.isArray(this.value)&&e<this.value.length?this.createValueCopy():this.createNewValue(),this.isRowChanging=!0,s.splice(e,1),s=this.deleteRowValue(s,null),this.value=s,this.isRowChanging=!1}this.onRowsChanged(),this.survey&&this.matrixCallbacks.matrixRowRemoved(this,e,t)}}createSingleInputBehavior(){return new s0(this)}get defaultAddRowText(){return this.getLocalizationString(this.isColumnLayoutHorizontal?"addRow":"addColumn")}getSingleInputTitleTemplate(){return"rowIndexTemplateTitle"}get addRowLocation(){return this.addRowButtonLocation}set addRowLocation(e){this.addRowButtonLocation=e}getAddRowLocation(){return this.addRowButtonLocation}getShowColumnsIfEmpty(){return this.hideColumnsIfEmpty}get locEditRowText(){return this.getOrCreateLocStr("editRowText",!1,"editText")}get emptyRowsText(){return this.noRowsText}set emptyRowsText(e){this.noRowsText=e}get locEmptyRowsText(){return this.locNoRowsText}getValueGetterContext(){return new sY(this)}getDisplayValueCore(e,t){if(!t||!Array.isArray(t))return t;for(var s=this.getUnbindValue(t),i=this.visibleRows,n=0;n<i.length&&n<s.length;n++){var r=s[n];r&&(s[n]=this.getRowDisplayValue(e,i[n],r))}return s}getConditionObjectRowName(e){return"["+e.toString()+"]"}getConditionObjectsRowIndeces(){let e=[],t=Math.max(this.rowCount,1);for(var s=0;s<Math.min(p.matrix.maxRowCountInCondition,t);s++)e.push(s);return e}supportAutoAdvance(){return!1}get hasRowText(){return!1}onCheckForErrors(e,t,s){super.onCheckForErrors(e,t,s),t||this.validateMinRows()||e.push(new ek(this.minRowCount,this))}validateMinRows(){if(this.minRowCount<=0||!this.isRequired||!this.generatedVisibleRows)return!0;let e=0;return this.generatedVisibleRows.forEach(t=>{!t.isEmpty&&e++}),e>=this.minRowCount}getUniqueColumnsNames(){var e=super.getUniqueColumnsNames();let t=this.keyName;return t&&0>e.indexOf(t)&&e.push(t),e}generateRows(){var e=[];
10if(0===this.rowCount)return e;for(var t=this.createNewValue(),s=0;s<this.rowCount;s++)e.push(this.createMatrixRow(this.getRowValueByIndex(t,s)));return this.isValueEmpty(this.getDefaultRowValue(!1))||(this.value=t),e}createMatrixRow(e){return new s$(this.rowCounter++,this,e)}getInsertedDeletedIndex(e,t){let s=Math.min(e.length,t.length);for(let i=0;i<s;i++)if(t[i]!==e[i].editingObj)return i;return s}isEditingObjectValueChanged(){let e=this.value;if(!this.generatedVisibleRows||!this.isValueSurveyElement(e))return!1;let t=this.lastDeletedRow;this.lastDeletedRow=void 0;let s=this.generatedVisibleRows;if(!Array.isArray(e)||Math.abs(s.length-e.length)>1||s.length===e.length)return!1;let i=this.getInsertedDeletedIndex(s,e);if(s.length>e.length){this.lastDeletedRow=s[i];let e=s[i];s.splice(i,1),this.isRendredTableCreated&&this.renderedTable.onRemovedRow(e)}else{let n;t&&t.editingObj===e[i]?n=t:(t=void 0,n=this.createMatrixRow(e[i])),s.splice(i,0,n),t||this.onMatrixRowCreated(n),this.isRendredTableCreated&&this.renderedTable.onAddedRow(n,i)}return this.setPropertyValueDirectly("rowCount",e.length),!0}updateValueFromSurvey(e,t=!1){let s=this.setRowCountValueFromData;this.setRowCountValueFromData=!0;let i=!1;if(!s&&this.minRowCount>0&&!this.draggedRow){let t=Array.isArray(e)?e.length:0,s=this.isEditingSurveyElement;if(t<this.minRowCount&&(s&&this.rowCount>0||!s&&!w.isValueEmpty(this.defaultRowValue))){Array.isArray(e)||(e=[]);for(let i=t;i<this.minRowCount;i++)s?this.getValueForNewRow():e.push(w.createCopy(this.defaultRowValue))}s&&(t<=this.minRowCount&&this.rowCount>this.minRowCount||t>this.minRowCount&&this.rowCount<=this.minRowCount)&&(i=!0)}super.updateValueFromSurvey(e,t),i&&this.onRowsChanged(),this.setRowCountValueFromData=!1}getFilteredDataCore(){let e=[];return this.generatedVisibleRows.forEach(t=>{t.isVisible&&!t.isEmpty&&e.push(t.filteredValue)}),e}onBeforeValueChanged(e){if(e&&Array.isArray(e)){var t=e.length;if(!(t==this.rowCount||!this.setRowCountValueFromData&&t<this.initialRowCount||this.isEditingObjectValueChanged())&&(this.setRowCountValueFromData=!0,this.rowCountValue=t,this.generatedVisibleRows)){if(t==this.generatedVisibleRows.length+1){this.onStartRowAddingRemoving();let s=this.getRowValueByIndex(e,t-1),i=this.createMatrixRow(s);this.generatedVisibleRows.push(i),this.onMatrixRowCreated(i),this.onEndRowAdding()}else this.clearGeneratedRows(),this.getVisibleRows(),this.onRowsChanged();this.setRowCountValueFromData=!1}}}createNewValue(){var e=this.createValueCopy();e&&Array.isArray(e)||(e=[]),e.length>this.rowCount&&e.splice(this.rowCount);var t=this.getDefaultRowValue(!1);t=t||{};for(var s=e.length;s<this.rowCount;s++)e.push(this.getUnbindValue(t));return e}deleteRowValue(e,t){if(!Array.isArray(e))return e;for(var s=!0,i=0;i<e.length;i++)if(this.isObject(e[i])&&Object.keys(e[i]).length>0){s=!1;break}return s?null:e}getRowValueByIndex(e,t){return Array.isArray(e)&&t>=0&&t<e.length?e[t]:null}getRowValueCore(e,t,s=!1){if(!this.generatedVisibleRows)return{};var i=this.getRowValueByIndex(t,this.generatedVisibleRows.indexOf(e));return!i&&s&&(i={}),i}getAddRowButtonCss(e=!1){return new eX().append(this.cssClasses.button).append(this.cssClasses.buttonAdd).append(this.cssClasses.emptyRowsButton,e).toString()}getRemoveRowButtonCss(){return new eX().append(this.cssClasses.button).append(this.cssClasses.buttonRemove).toString()}getRootCss(){var e;return new eX().append(super.getRootCss()).append(this.cssClasses.empty,!(null==(e=this.renderedTable)?void 0:e.showTable)).toString()}}V([e_()],sX.prototype,"confirmDelete",void 0),V([e_({defaultValue:""})],sX.prototype,"keyName",void 0),V([e_()],sX.prototype,"defaultRowValue",void 0),V([e_()],sX.prototype,"copyDefaultValueFromLastEntry",void 0),V([e_()],sX.prototype,"allowRowReorder",void 0),V([e_({defaultValue:0})],sX.prototype,"lockedRowCount",void 0),V([e_({onSetting:e=>e<0?0:e})],sX.prototype,"minRowCount",void 0),V([e_({onSetting:e=>e<=0?1:e>p.matrix.maxRowCount?p.matrix.maxRowCount:e})],sX.prototype,"maxRowCount",void 0),V([e_()],sX.prototype,"allowAddRows",void 0),V([e_()],sX.prototype,"allowRemoveRows",void 0),V([e_()],sX.prototype,"detailPanelShowOnAdding",void 0),V([e_({localizable:{defaultStr:"confirmDelete"}})],sX.prototype,"confirmDeleteText",void 0),V([e_({localizable:{defaultStr:"addRow",onCreate:(e,t)=>
10t.onGetTextCallback=t=>t||e.defaultAddRowText}})],sX.prototype,"addRowText",void 0),V([e_()],sX.prototype,"addRowButtonLocation",void 0),V([e_()],sX.prototype,"hideColumnsIfEmpty",void 0),V([e_({localizable:{defaultStr:"removeRow"}})],sX.prototype,"removeRowText",void 0),V([e_({localizable:{defaultStr:!0}})],sX.prototype,"noRowsText",void 0);class s1 extends sT{setDefaultRowActions(e,t){super.setDefaultRowActions(e,t)}}class s0 extends sB{get matrixDynamic(){return this.question}onSingleInputQuestionAdded(e){this.matrixDynamic.showHeader||(e.titleLocation="hidden")}getSingleInputQuestionsCore(e,t){let s=[],i=this.matrixDynamic.visibleRows;if(t)for(let e=0;e<i.length;e++){let t=i[e];t.hasValueAnyQuestion(!0)&&t.validate(new tH)||this.fillSingleInputQuestionsByRow(s,t)}return this.getSingleInputQuestionsForDynamic(e,s)}fillSingleInputQuestionsInContainer(e,t){let s=t.data;this.fillSingleInputQuestionsByRow(e,s)}fillSingleInputQuestionsByRow(e,t){t&&t.questions.forEach(t=>t.addNestedQuestion(e,!0,!1,!1))}getSingleInputAddTextCore(){if(this.matrixDynamic.canAddRow)return this.matrixDynamic.addRowText}singleInputAddItemCore(){this.matrixDynamic.addRowUI()}getSingleQuestionOnChange(e){let t=this.matrixDynamic.visibleRows;
10if(t.length>0){(e<0||e>=t.length)&&(e=t.length-1);let s=t[e].visibleQuestions;if(s.length>0)return s[0]}return null}createSingleInputSummary(){let e=this.matrixDynamic,t=new sK(e,e.locNoRowsText),s=[],i=e.canRemoveRows;return e.visibleRows.forEach(t=>{let n=new R(new sq(e,t),!0,void 0,e.getSingleInputTitleTemplate());n.setJson(e.locSingleInputTitleTemplate.getJson());let r=new e2({locTitle:e.locEditRowText,action:()=>{this.singleInputEditRow(t)}}),a=i&&e.canRemoveRow(t)?new e2({locTitle:e.locRemoveRowText,action:()=>{e.removeRowUI(t)}}):void 0;s.push(new sJ(n,r,a))}),t.items=s,t}}H.addClass("matrixdynamic",[{name:"allowAddRows:boolean",default:!0},{name:"allowRemoveRows:boolean",default:!0},{name:"rowCount:number",default:2,minValue:0,isBindable:!0},{name:"minRowCount:number",default:0,minValue:0},{name:"maxRowCount:number",default:p.matrix.maxRowCount},{name:"keyName"},"defaultRowValue:rowvalue",{name:"copyDefaultValueFromLastEntry:boolean",alternativeName:"defaultValueFromLastRow"},{name:"confirmDelete:boolean"},{name:"confirmDeleteText",dependsOn:"confirmDelete",visibleIf:function(e){return!e||e.confirmDelete},serializationProperty:"locConfirmDeleteText"},{name:"addRowButtonLocation",alternativeName:"addRowLocation",default:"default",choices:["default","top","bottom","topBottom"]},{name:"addRowText",serializationProperty:"locAddRowText"},{name:"removeRowText",serializationProperty:"locRemoveRowText"},"hideColumnsIfEmpty:boolean",{name:"noRowsText:text",alternativeName:"emptyRowsText",serializationProperty:"locNoRowsText",dependsOn:"hideColumnsIfEmpty",visibleIf:function(e){return!e||e.hideColumnsIfEmpty}},{name:"detailPanelShowOnAdding:boolean",dependsOn:"detailPanelMode",visibleIf:function(e){return"none"!==e.detailPanelMode}},{name:"allowRowReorder:switch",alternativeName:"allowRowsDragAndDrop"}],function(){return new sX("")},"matrixdropdownbase"),sm.Instance.registerQuestion("matrixdynamic",e=>{var t=new sX(e);return t.choices=[1,2,3,4,5],sF.addDefaultColumns(t),t});var s2={currentType:"default",getCss:function(){var e=this.currentType?this[this.currentType]:s5;return e||(e=s5),e},getAvailableThemes:function(){return Object.keys(this).filter(e=>-1===["currentType","getCss","getAvailableThemes"].indexOf(e))}},s5={root:"sd-root-modern",rootProgress:"sd-progress",rootMobile:"sd-root-modern--mobile",rootAnimationDisabled:"sd-root-modern--animation-disabled",rootReadOnly:"sd-root--readonly",rootCompact:"sd-root--compact",rootFitToContainer:"sd-root-modern--full-container",rootWrapper:"sd-root-modern__wrapper",rootWrapperFixed:"sd-root-modern__wrapper--fixed",rootWrapperHasImage:"sd-root-modern__wrapper--has-image",rootBackgroundImage:"sd-root_background-image",container:"sd-container-modern",header:"sd-title sd-container-modern__title",bodyContainer:"sv-components-row",body:"sd-body",bodyWithTimer:"sd-body--with-timer",clockTimerRoot:"sd-timer",clockTimerRootTop:"sd-timer--top",clockTimerRootBottom:"sd-timer--bottom",clockTimerProgress:"sd-timer__progress",clockTimerProgressAnimation:"sd-timer__progress--animation",clockTimerTextContainer:"sd-timer__text-container",clockTimerMinorText:"sd-timer__text--minor",clockTimerMajorText:"sd-timer__text--major",bodyEmpty:"sd-body sd-body--empty",bodyLoading:"sd-body--loading",footer:"sd-footer sd-body__navigation sd-clearfix",title:"sd-title",description:"sd-description",logo:"sd-logo",logoImage:"sd-logo__image",headerText:"sd-header__text",headerClose:"sd-hidden",navigationButton:"",bodyNavigationButton:"sd-btn",completedPage:"sd-completedpage",completedBeforePage:"sd-completed-before-page",timerRoot:"sd-body__timer",navigation:{complete:"sd-btn--action sd-navigation__complete-btn",prev:"sd-navigation__prev-btn",next:"sd-navigation__next-btn",start:"sd-navigation__start-btn",preview:"sd-navigation__preview-btn",edit:"sd-btn sd-btn--small"},panel:{contentEnter:"sd-element__content--enter",contentLeave:"sd-element__content--leave",enter:"sd-element-wrapper--enter",leave:"sd-element-wrapper--leave",asPage:"sd-panel--as-page",number:"sd-element__num",title:"sd-title sd-element__title sd-panel__title",titleExpandable:"sd-element__title--expandable",titleExpandableSvg:"sd-element__title-expandable-svg",titleNumInline:"sd-element__title--num-inline",titleExpanded:"sd-element__title--expanded",titleCollapsed:"sd-element__title--collapsed",titleDisabled:"sd-element__title--disabled",titleOnExpand:"sd-panel__title--expanded",titleOnError:"sd-panel__title--error",titleBar:"sd-action-title-bar",description:"sd-description sd-panel__description",container:"sd-element sd-element--complex sd-panel sd-row__panel",withFrame:"sd-element--with-frame",content:"sd-element__content sd-panel__content",icon:"sd-panel__icon",iconExpanded:"sd-panel__icon--expanded",footer
10:"sd-panel__footer",requiredMark:"sd-panel__required-text",header:"sd-panel__header sd-element__header sd-element__header--location-top",collapsed:"sd-element--collapsed",expanded:"sd-element--expanded",expandable:"sd-element--expandable",expandableAnimating:"sd-elemenet--expandable--animating",nested:"sd-element--nested sd-element--nested-with-borders",invisible:"sd-element--invisible",navigationButton:"",compact:"sd-element--with-frame sd-element--compact",errorsContainer:"sd-panel__errbox sd-element__erbox sd-element__erbox--above-element"},paneldynamic:{mainRoot:"sd-element sd-question sd-question--paneldynamic sd-element--complex sd-question--complex sd-row__question",empty:"sd-question--empty",root:"sd-paneldynamic",iconRemove:"sd-hidden",navigation:"sd-paneldynamic__navigation",title:"sd-title sd-element__title sd-question__title",header:"sd-paneldynamic__header sd-element__header",headerTab:"sd-paneldynamic__header-tab",button:"sd-action sd-paneldynamic__btn",buttonRemove:"sd-action--negative sd-paneldynamic__remove-btn",buttonAdd:"sd-paneldynamic__add-btn",buttonPrev:"sd-paneldynamic__prev-btn sd-action--icon sd-action",buttonPrevDisabled:"sd-action--disabled",buttonNextDisabled:"sd-action--disabled",buttonNext:"sd-paneldynamic__next-btn sd-action--icon sd-action",progressContainer:"sd-paneldynamic__progress-container",progress:"sd-progress",progressBar:"sd-progress__bar",nested:"sd-element--nested sd-element--nested-with-borders",progressText:"sd-paneldynamic__progress-text",separator:"sd-paneldynamic__separator",panelWrapper:"sd-paneldynamic__panel-wrapper",footer:"sd-paneldynamic__footer",panelFooter:"sd-paneldynamic__panel-footer",footerButtonsContainer:"sd-paneldynamic__buttons-container",panelsContainer:"sd-paneldynamic__panels-container",panelWrapperInRow:"sd-paneldynamic__panel-wrapper--in-row",panelWrapperEnter:"sd-paneldynamic__panel-wrapper--enter",panelWrapperLeave:"sd-paneldynamic__panel-wrapper--leave",panelWrapperList:"sd-paneldynamic__panel-wrapper--list",progressBtnIcon:"icon-progressbuttonv2",noEntriesPlaceholder:"sd-paneldynamic__placeholder sd-question__placeholder",compact:"sd-element--with-frame sd-element--compact",tabsContainer:"sd-paneldynamic__tabs-container",tabsContainerWithHeader:"sd-paneldynamic__tabs-container--with-header",tabsRoot:"sd-tabs-toolbar",tabsLeft:"sd-tabs-toolbar--left",tabsRight:"sd-tabs-toolbar--right",tabsCenter:"sd-tabs-toolbar--center",tabs:{item:"sd-tab-item",itemPressed:"sd-tab-item--pressed",itemAsIcon:"sd-tab-item--icon",itemIcon:"sd-tab-item__icon",itemTitle:"sd-tab-item__title"}},progress:"sd-progress sd-body__progress",progressTop:"sd-body__progress--top",progressBottom:"sd-body__progress--bottom",progressBar:"sd-progress__bar",progressText:"sd-progress__text",progressButtonsRoot:"sd-progress-buttons",progressButtonsNumbered:"sd-progress-buttons--numbered",progressButtonsFitSurveyWidth:"sd-progress-buttons--fit-survey-width",progressButtonsContainerCenter:"sd-progress-buttons__container-center",progressButtonsContainer:"sd-progress-buttons__container",progressButtonsConnector:"sd-progress-buttons__connector",progressButtonsButton:"sd-progress-buttons__button",progressButtonsButtonBackground:"sd-progress-buttons__button-background",progressButtonsButtonContent:"sd-progress-buttons__button-content",progressButtonsHeader:"sd-progress-buttons__header",progressButtonsFooter:"sd-progress-buttons__footer",progressButtonsImageButtonLeft:"sd-progress-buttons__image-button-left",progressButtonsImageButtonRight:"sd-progress-buttons__image-button-right",progressButtonsImageButtonHidden:"sd-progress-buttons__image-button--hidden",progressButtonsListContainer:"sd-progress-buttons__list-container",progressButtonsList:"sd-progress-buttons__list",progressButtonsListElementPassed:"sd-progress-buttons__list-element--passed",progressButtonsListElementCurrent:"sd-progress-buttons__list-element--current",progressButtonsListElementNonClickable:"sd-progress-buttons__list-element--nonclickable",progressButtonsPageTitle:"sd-progress-buttons__page-title",progressButtonsPageDescription:"sd-progress-buttons__page-description",progressTextInBar:"sd-hidden",page:{root:"sd-page sd-body__page",emptyHeaderRoot:"sd-page__empty-header",title:"sd-title sd-page__title",description:"sd-description sd-page__description",number:"sd-page__num",errorsContainer:"sd-page__errbox"},pageTitle:"sd-title sd-page__title",pageDescription:"sd-description sd-page__description",row:"sd-row sd-clearfix",rowMultiple:"sd-row--multiple",rowCompact:"sd-row--compact",rowEnter:"sd-row--enter",rowDelayedEnter:"sd-row--delayed-enter",rowLeave:"sd-row--leave",rowReplace:"sd-row--replace",pageRow:"sd-page__row",question:{contentEnter:"sd-element__content--enter",contentLeave:"sd-element__content--leave",enter:"sd-element-wrapper--enter",leave:"sd-element-wrapper--leave",mobile:"sd-question--mobile",mainRoot:"sd-element sd-question sd-row__question",flowRoot:"sd-element sd-question sd-row__question sd-row__question--flow",withFrame:"sd-element--with-frame",asCell:"sd-table__cell",answered:"sd-question--answered",header:"sd-question__header sd-element__header",headerLeft:"sd-question__header--location--left",headerTop:"sd-question__header--location-top sd-element__header--location-top",headerBottom:"sd-question__header--location--bottom",content:"sd-element__content sd-question__content",contentSupportContainerQueries:"sd-question__content--support-container-queries",contentLeft:"sd-question__content--left",titleNumInline:"sd-element__title--num-inline",titleLeftRoot:"sd-question--left",titleTopRoot:"sd-question--title-top",descriptionUnderInputRoot:"sd-question--description-under-input",titleBottomRoot:"sd-question--title-bottom",titleOnAnswer:"sd-question__title--answer",titleEmpty:"sd-question__title--empty",titleOnError:"sd-question__title--error",title:"sd-title sd-element__title sd-question__title",titleExpandable:"sd-element__title--expandable",titleExpandableSvg:"sd-element__title-expandable-svg",titleExpanded:"sd-element__title--expanded",titleCollapsed:"sd-element__title--collapsed",titleDisabled:"sd-element__title--disabled",titleReadOnly:"sd-element__title--readonly",t
10itleBar:"sd-action-title-bar",requiredMark:"sd-question__required-text",number:"sd-element__num",description:"sd-description sd-question__description",descriptionUnderInput:"sd-question__description--under-input",comment:"sd-input sd-comment",required:"sd-question--required",titleRequired:"sd-question__title--required",indent:20,footer:"sd-question__footer",commentArea:"sd-question__comment-area",formGroup:"sd-question__form-group",hasError:"sd-question--error",hasErrorTop:"sd-question--error-top",hasErrorBottom:"sd-question--error-bottom",collapsed:"sd-element--collapsed",expandable:"sd-element--expandable",expandableAnimating:"sd-elemenet--expandable--animating",expanded:"sd-element--expanded",nested:"sd-element--nested",invisible:"sd-element--invisible",composite:"sd-element--complex sd-composite",disabled:"sd-question--disabled",readOnly:"sd-question--readonly",preview:"sd-question--preview",noPointerEventsMode:"sd-question--no-pointer-events",errorsContainer:"sd-element__erbox sd-question__erbox",errorsContainerTop:"sd-element__erbox--above-element sd-question__erbox--above-question",errorsContainerBottom:"sd-question__erbox--below-question",confirmDialog:"sd-popup--confirm sv-popup--confirm",singleInputTitle:"sd-element__title--singleinput",singleInputWrapper:"sd-question__singleinput-wrapper",breadcrumbsRoot:"sd-breadcrumbs",breadcrumbsItem:"sd-breadcrumbs-item",breadcrumbsItemButton:"sd-breadcrumbs-item__button",breadcrumbsSeparator:"sd-breadcrumbs-separator",summary:"sd-summary",summaryRow:"sd-summary-row",summaryRowContent:"sd-summary-row__content",summaryRowActions:"sd-summary-row__actions",summaryRowAction:"sd-summary-row-action",summaryRowActionEdit:"sd-summary-row-action sd-summary-row-action--edit",summaryRowActionDelete:"sd-summary-row-action sd-summary-row-action--delete"},image:{mainRoot:"sd-element sd-question sd-question--image",root:"sd-image",image:"sd-image__image",adaptive:"sd-image__image--adaptive",noImage:"sd-image__no-image",noImageSvgIconId:"icon-no-image",withFrame:""},html:{mainRoot:"sd-element sd-question sd-row__question sd-question--html",root:"sd-html",withFrame:"",nested:"sd-element--nested sd-html--nested"},error:{root:"sd-error",warningMode:"sd-error--warning",infoMode:"sd-error--info",icon:"",item:"sd-error__item",locationTop:"",locationBottom:""},checkbox:{root:"sd-selectbase",rootMobile:"sd-selectbase--mobile",rootRow:"sd-selectbase--row",rootMultiColumn:"sd-selectbase--multi-column",item:"sd-item sd-checkbox sd-selectbase__item",itemEnter:"sd-item--enter",itemLeave:"sd-item--leave",itemOnError:"sd-item--error",itemSelectAll:"sd-checkbox--selectall",itemNone:"sd-checkbox--none",itemDisabled:"sd-item--disabled sd-checkbox--disabled",itemReadOnly:"sd-item--readonly sd-checkbox--readonly",itemPreview:"sd-item--preview sd-checkbox--preview",itemPreviewSvgIconId:"#icon-check-16x16",itemChecked:"sd-item--checked sd-checkbox--checked",itemHover:"sd-item--allowhover sd-checkbox--allowhover",itemInline:"sd-selectbase__item--inline",label:"sd-selectbase__label",labelChecked:"",itemControl:"sd-visuallyhidden sd-item__control sd-checkbox__control",itemDecorator:"sd-item__svg sd-checkbox__svg",itemSvgIconId:"#icon-check-16x16",controlLabel:"sd-item__control-label",materialDecorator:"sd-item__decorator sd-checkbox__decorator",otherArea:"sd-selectbase__other",column:"sd-selectbase__column"},radiogroup:{root:"sd-selectbase",rootMobile:"sd-selectbase--mobile",rootRow:"sd-selectbase--row",rootMultiColumn:"sd-selectbase--multi-column",item:"sd-item sd-radio sd-selectbase__item",itemOnError:"sd-item--error",itemInline:"sd-selectbase__item--inline",label:"sd-selectbase__label",labelChecked:"",itemEnter:"sd-item--enter",itemLeave:"sd-item--leave",itemDisabled:"sd-item--disabled sd-radio--disabled",itemReadOnly:"sd-item--readonly sd-radio--readonly",itemPreview:"sd-item--preview sd-radio--preview",itemPreviewSvgIconId:"#icon-check-16x16",itemChecked:"sd-item--checked sd-radio--checked",itemHover:"sd-item--allowhover sd-radio--allowhover",itemControl:"sd-visuallyhidden sd-item__control sd-radio__control",itemDecorator:"sd-item__svg sd-radio__svg",controlLabel:"sd-item__control-label",materialDecorator:"sd-item__decorator sd-radio__decorator",otherArea:"sd-selectbase__other",clearButton:"",column:"sd-selectbase__column"},boolean:{mainRoot:"sd-element sd-question sd-row__question sd-question--boolean",root:"sv_qcbc sv_qbln sd-scrollable-container sd-boolean-root",rootRadio:"sv_qcbc sv_qbln sd-scrollable-container sd-scrollable-container--compact",item:"sd-boolean",itemOnError:"sd-boolean--error",control:"sd-boolean__control sd-visuallyhidden",itemChecked:"sd-boolean--checked",itemE
10xchanged:"sd-boolean--exchanged",itemIndeterminate:"sd-boolean--indeterminate",itemDisabled:"sd-boolean--disabled",itemReadOnly:"sd-boolean--readonly",itemPreview:"sd-boolean--preview",itemHover:"sd-boolean--allowhover",label:"sd-boolean__label",labelTrue:"sd-boolean__label--true",labelFalse:"sd-boolean__label--false",switch:"sd-boolean__switch",disabledLabel:"sd-checkbox__label--disabled",labelReadOnly:"sd-checkbox__label--readonly",labelPreview:"sd-checkbox__label--preview",sliderText:"sd-boolean__thumb-text",slider:"sd-boolean__thumb",sliderGhost:"sd-boolean__thumb-ghost",radioItem:"sd-item",radioItemChecked:"sd-item--checked sd-radio--checked",radioItemDisabled:"sd-item--disabled sd-radio--disabled",radioItemReadOnly:"sd-item--readonly sd-radio--readonly",radioItemPreview:"sd-item--preview sd-radio--preview",itemPreviewSvgIconId:"#icon-check-16x16",radioLabel:"sd-selectbase__label",radioControlLabel:"sd-item__control-label",radioFieldset:"sd-selectbase",itemRadioDecorator:"sd-item__svg sd-radio__svg",materialRadioDecorator:"sd-item__decorator sd-radio__decorator",itemRadioControl:"sd-visuallyhidden sd-item__control sd-radio__control",rootCheckbox:"sd-selectbase",checkboxItem:"sd-item sd-selectbase__item sd-checkbox",checkboxLabel:"sd-selectbase__label",checkboxItemOnError:"sd-item--error",checkboxItemIndeterminate:"sd-checkbox--intermediate",checkboxItemChecked:"sd-item--checked sd-checkbox--checked",checkboxItemDecorator:"sd-item__svg sd-checkbox__svg",checkboxItemDisabled:"sd-item--disabled sd-checkbox--disabled",checkboxItemReadOnly:"sd-item--readonly sd-checkbox--readonly",checkboxItemPreview:"sd-item--preview sd-checkbox--preview",controlCheckbox:"sd-visuallyhidden sd-item__control sd-checkbox__control",checkboxMaterialDecorator:"sd-item__decorator sd-checkbox__decorator",checkboxControlLabel:"sd-item__control-label",checkboxIsLabelRendered:"sd-checkbox--label-rendered",svgIconCheckedId:"#icon-check-16x16"},text:{root:"sd-input sd-text",small:"sd-row__question--small",controlDisabled:"sd-input--disabled",controlReadOnly:"sd-input--readonly",controlPreview:"sd-input--preview",constrolWithCharacterCounter:"sd-text__character-counter",characterCounterBig:"sd-text__character-counter--big",content:"sd-text__content sd-question__content",remainingCharacterCounter:"sd-remaining-character-counter",onError:"sd-input--error",isValueChanged:"sd-input--value-changed"},multipletext:{root:"sd-multipletext",rootMobile:"sd-multipletext--mobile",itemLabel:"sd-multipletext__item-container sd-input",itemLabelReadOnly:"sd-input--readonly",itemLabelDisabled:"sd-input--disabled",itemLabelPreview:"sd-input--preview",itemLabelOnError:"sd-multipletext__item-container--error",itemLabelAllowFocus:"sd-multipletext__item-container--allow-focus",itemLabelAnswered:"sd-multipletext__item-container--answered",itemWithCharacterCounter:"sd-multipletext-item__character-counter",item:"sd-multipletext__item",itemTitle:"sd-multipletext__item-title",content:"sd-multipletext__content sd-question__content",row:"sd-multipletext__row",cell:"sd-multipletext__cell",cellError:"sd-multipletext__cell--error",cellErrorTop:"sd-multipletext__cell--error-top",cellErrorBottom:"sd-multipletext__cell--error-bottom"},dropdown:{root:"sd-selectbase",popup:"sv-dropdown-popup",small:"sd-row__question--small",selectWrapper:"sv-dropdown_select-wrapper",onError:"sd-input--error",label:"sd-selectbase__label",itemEnter:"sd-item--enter",itemLeave:"sd-item--leave",item:"sd-item sd-radio sd-selectbase__item",itemDisabled:"sd-item--disabled sd-radio--disabled",itemChecked:"sd-item--checked sd-radio--checked",itemHover:"sd-item--allowhover sd-radio--allowhover",itemControl:"sd-visuallyhidden sd-item__control sd-radio__control",itemDecorator:"sd-item__svg sd-radio__svg",cleanButtonIconId:"icon-cancel",chevronButton:"sd-dropdown_chevron-button",chevronButtonSvg:"sd-dropdown_chevron-button-svg",chevronButtonIconId:"icon-chevron",control:"sd-input sd-dropdown",controlInputFieldComponent:"sd-dropdown__input-field-component",controlValue:"sd-dropdown__value",controlDisabled:"sd-input--disabled",controlReadOnly:"sd-input--readonly",controlPreview:"sd-input--preview",controlEmpty:"sd-dropdown--empty",controlLabel:"sd-item__control-label",f
10ilterStringInput:"sd-dropdown__filter-string-input",materialDecorator:"sd-item__decorator sd-radio__decorator",hintPrefix:"sd-dropdown__hint-prefix",hintSuffix:"sd-dropdown__hint-suffix"},imagepicker:{mainRoot:"sd-element sd-question sd-row__question",root:"sd-selectbase sd-imagepicker",rootResponsive:"sd-imagepicker--responsive",rootStatic:"sd-imagepicker--static",rootColumn:"sd-imagepicker--column",item:"sd-imagepicker__item",itemOnError:"sd-imagepicker__item--error",itemInline:"sd-imagepicker__item--inline",itemChecked:"sd-imagepicker__item--checked",itemDisabled:"sd-imagepicker__item--disabled",itemReadOnly:"sd-imagepicker__item--readonly",itemPreview:"sd-imagepicker__item--preview",itemHover:"sd-imagepicker__item--allowhover",label:"sd-imagepicker__label",itemDecorator:"sd-imagepicker__item-decorator",imageContainer:"sd-imagepicker__image-container",itemControl:"sd-imagepicker__control sd-visuallyhidden",image:"sd-imagepicker__image",itemText:"sd-imagepicker__text",itemNoImage:"sd-imagepicker__no-image",itemNoImageSvgIcon:"sd-imagepicker__no-image-svg",itemNoImageSvgIconId:"icon-no-image",column:"sd-selectbase__column sd-imagepicker__column",checkedItemDecorator:"sd-imagepicker__check-decorator",checkedItemSvgIcon:"sd-imagepicker__check-icon",checkedItemSvgIconId:"icon-check-24x24"},matrix:{mainRoot:"sd-element sd-question sd-row__question sd-element--complex sd-question--complex sd-question--table",tableWrapper:"sd-matrix sd-table-wrapper",tableWrapperLeft:"sd-table-wrapper--left",root:"sd-table sd-matrix__table",columnsAutoWidth:"sd-table--columnsautowidth",noHeader:"sd-table--no-header",rootVerticalAlignTop:"sd-table--align-top",rootVerticalAlignMiddle:"sd-table--align-middle",rootAlternateRows:"sd-table--alternate-rows",rowError:"sd-matrix__row--error",cell:"sd-table__cell sd-matrix__cell",row:"sd-table__row",rowDisabled:"sd-table__row-disabled",rowReadOnly:"sd-table__row-readonly",headerCell:"sd-table__cell sd-table__cell--header",rowTextCell:"sd-table__cell sd-matrix__cell sd-table__cell--row-text",label:"sd-item sd-{type} sd-matrix__label",itemOnError:"sd-item--error",itemValue:"sd-visuallyhidden sd-item__control sd-{type}__control",itemChecked:"sd-item--checked sd-{type}--checked",itemDisabled:"sd-item--disabled sd-{type}--disabled",itemReadOnly:"sd-item--readonly sd-{type}--readonly",itemPreview:"sd-item--preview sd-{type}--preview",itemPreviewSvgIconId:"#icon-check-16x16",itemHover:"sd-{type}--allowhover",materialDecorator:"sd-item__decorator sd-{type}__decorator",itemDecorator:"sd-item__svg sd-{type}__svg",cellText:"sd-matrix__text",cellTextSelected:"sd-matrix__text--checked",cellTextDisabled:"sd-matrix__text--disabled",cellResponsiveTitle:"sd-matrix__responsive-title",compact:"sd-element--with-frame sd-element--compact"},matrixdropdown:{mainRoot:"sd-element sd-question sd-row__question sd-element--complex sd-question--complex sd-question--table",rootScroll:"sd-question--scroll",root:"sd-table sd-matrixdropdown",columnsAutoWidth:"sd-table--columnsautowidth",noHeader:"sd-table--no-header",hasFooter:"sd-table--has-footer",rootVerticalAlignTop:"sd-table--align-top",rootVerticalAlignMiddle:"sd-table--align-middle",tableWrapper:"sd-table-wrapper",tableWrapperLeft:"sd-table-wrapper--left",rootAlternateRows:"sd-table--alternate-rows",cell:"sd-table__cell",cellResponsiveTitle:"sd-table__responsive-title",errorsCell:"sd-table__cell--error",errorsCellTop:"sd-table__cell--error-top",errorsCellBottom:"sd-table__cell--error-bottom",itemCell:"sd-table__cell--item",row:"sd-table__row",rowDelayedEnter:"sd-table__row--delayed-enter",rowEnter:"sd-table__row--enter",rowLeave:"sd-table__row--leave",expandedRow:"sd-table__row--expanded",rowHasPanel:"sd-table__row--has-panel",rowHasEndActions:"sd-table__row--has-end-actions",headerCell:"sd-table__cell sd-table__cell--header",rowTextCell:"sd-table__cell sd-table__cell--row-text",footerCell:"sd-table__cell sd-table__cell--footer",footerTotalCell:"sd-table__cell sd-table__cell--footer-total",columnTitleCell:"sd-table__cell--column-title",cellRequiredMark:"sd-question__required-text",detailButton:"sd-table__cell--detail-button",detailButtonExpanded:"sd-table__cell--detail-button--expanded",detailIcon:"sd-detail-panel__icon",detailIconExpanded:"sd-detail-panel__icon--expanded",detailIconId:"icon-expanddetail",detailIconExpandedId:"icon-collapsedetail",detailPanelCell:"sd-table__cell--detail-panel",detailRowCell:"sd-table__cell--detail",actionsCellPrefix:"sd-table__cell-action",actionsCell:"sd-table__cell sd-table__cell--actions",actionsCellDrag:"sd-table__cell--drag",emptyCell:"sd-table__cell--empty",verticalCell:"sd-table__cell--vertical",cellQuestionWrapper:"sd-matrix__question-wrapper sd-table__question-wrapper",compact:"sd-element--with-frame sd-element--compact"},matrixdynamic:{mainRoot:"sd-element sd-question sd-row__question sd-element--complex sd-question--complex sd-question--table",rootScroll:"sd-question--scroll",empty:"sd-question--empty",root:"sd-table sd-matrixdynamic",columnsAutoWidth:"sd-table--columnsautowidth",noHeader:"sd-table--no-header",hasFooter:"sd-table--has-footer",tableWrapper:"sd-table-wrapper",tableWrapperLeft:"sd-table-wrapper--left",rootAlternateRows:"sd-table--alternate-rows",content:"sd-matrixdynamic__content sd-question__content",cell:"sd-table__cell",cellResponsiveTitle:"sd-table__responsive-title",row:"sd-table__row",rowEmpty:"sd-table__row--empty",rowDelayedEnter:"sd-table__row--delayed-enter",rowEnter:"sd-table__row--enter",rowLeave:"sd-table__row--leave",rowHasPanel:"sd-table__row--has-panel",rowHasEndActions:"sd-table__row--has-end-actions",expandedRow:"sd-table__row--expanded",itemCell:"sd-table__cell--item",headerCell:"sd-table__cell sd-table__cell--header",rowTextCell:"sd-table__cell sd-table__cell--row-text",footerCell:"sd-table__cell sd-table__cell--footer",columnTitleCell:"sd-table__cell--column-title",cellRequiredMark:"sd-question__required-text",button:"sd-action sd-matrixdynamic__btn",detailRow:"sd-table__row
10sd-table__row--detail",detailButton:"sd-table__cell--detail-button",detailButtonExpanded:"sd-table__cell--detail-button--expanded",detailIcon:"sd-detail-panel__icon",detailIconExpanded:"sd-detail-panel__icon--expanded",detailIconId:"icon-expanddetail",detailIconExpandedId:"icon-collapsedetail",detailPanelCell:"sd-table__cell--detail-panel",detailRowCell:"sd-table__cell--detail",actionsCellPrefix:"sd-table__cell-action",actionsCell:"sd-table__cell sd-table__cell--actions",actionsCellDrag:"sd-table__cell--drag",buttonAdd:"sd-matrixdynamic__add-btn",buttonRemove:"sd-action--negative sd-matrixdynamic__remove-btn",iconAdd:"sd-hidden",iconRemove:"",dragElementDecorator:"sd-drag-element__svg",iconDragElement:"#icon-drag-24x24",footer:"sd-matrixdynamic__footer",footerTotalCell:"sd-table__cell sd-table__cell--footer-total",noRowsSection:"sd-matrixdynamic__placeholder sd-question__placeholder",iconDrag:"sv-matrixdynamic__drag-icon",ghostRow:"sv-matrix-row--drag-drop-ghost-mod",draggedRow:"sv-matrixdynamic-dragged-row",emptyCell:"sd-table__cell--empty",verticalCell:"sd-table__cell--vertical",cellQuestionWrapper:"sd-matrix__question-wrapper sd-table__question-wrapper",errorsCell:"sd-table__cell--error",errorsCellTop:"sd-table__cell--error-top",errorsCellBottom:"sd-table__cell--error-bottom",compact:"sd-element--with-frame sd-element--compact"},rating:{rootDropdown:"sd-scrollable-container sd-scrollable-container--compact sd-selectbase",root:"sd-scrollable-container sd-rating",rootWrappable:"sd-rating--wrappable",rootLabelsTop:"sd-rating--labels-top",rootLabelsBottom:"sd-rating--labels-bottom",rootLabelsDiagonal:"sd-rating--labels-diagonal",item:"sd-rating__item",itemOnError:"sd-rating__item--error",itemHover:"sd-rating__item--allowhover",selected:"sd-rating__item--selected",itemStar:"sd-rating__item-star",itemStarOnError:"sd-rating__item-star--error",itemStarHover:"sd-rating__item-star--allowhover",itemStarSelected:"sd-rating__item-star--selected",itemStarDisabled:"sd-rating__item-star--disabled",itemStarReadOnly:"sd-rating__item-star--readonly",itemStarPreview:"sd-rating__item-star--preview",itemStarHighlighted:"sd-rating__item-star--highlighted",itemStarUnhighlighted:"sd-rating__item-star--unhighlighted",itemStarSmall:"sd-rating__item-star--small",itemSmiley:"sd-rating__item-smiley",itemSmileyOnError:"sd-rating__item-smiley--error",itemSmileyHover:"sd-rating__item-smiley--allowhover",itemSmileySelected:"sd-rating__item-smiley--selected",itemSmileyDisabled:"sd-rating__item-smiley--disabled",itemSmileyReadOnly:"sd-rating__item-smiley--readonly",itemSmileyPreview:"sd-rating__item-smiley--preview",itemSmileyHighlighted:"sd-rating__item-star--highlighted",itemSmileyScaleColored:"sd-rating__item-smiley--scale-colored",itemSmileyRateColored:"sd-rating__item-smiley--rate-colored",itemSmileySmall:"sd-rating__item-smiley--small",minText:"sd-rating__item-text sd-rating__min-text",itemText:"sd-rating__item-text",maxText:"sd-rating__item-text sd-rating__max-text",itemDisabled:"sd-rating__item--disabled",itemReadOnly:"sd-rating__item--readonly",itemPreview:"sd-rating__item--preview",itemFixedSize:"sd-rating__item--fixed-size",control:"sd-input sd-dropdown",itemSmall:"sd-rating--small",selectWrapper:"sv-dropdown_select-wrapper",controlValue:"sd-dropdown__value",controlDisabled:"sd-input--disabled",controlReadOnly:"sd-input--readonly",controlPreview:"sd-input--preview",controlEmpty:"sd-dropdown--empty",filterStringInput:"sd-dropdown__filter-string-input",chevronButtonIconId:"icon-chevron",popup:"sv-dropdown-popup",onError:"sd-input--error"},slider:{root:"sd-slider",rootSingleMode:"sd-slider--single",rootNegativeScaleMode:"sd-slider--negative-scale-mode",rootDesignMode:"sd-slider--design-mode",rootAnimatedThumbMode:"sd-slider--animated-thumb-mode",rootTooltipsAlwaysMode:"sd-slider--tooltips-always-mode",rootLabelsShowValueTextMode:"sd-slider--labels-show-value-text-mode",visualContainer:"sd-slider-container",visualContainerSlider:"sd-slider-container__slider",rangeTrack:"sd-slider__track sd-slider__range-track",inverseTrackLeft:"sd-slider__track sd-slider__inverse-track sd-slider__inverse-track--left",inverseTrackRight:"sd-slider__track sd-slider__inverse-track sd-slider__inverse-track--right",thumbContainer:"sd-slider__thumb-container",thumbContainerIndeterminateMode:"sd-slider__thumb-container--indeterminate",thumbContainerFocusedMode:"sd-slider__thumb-container--focused",thumb:"sd-slider__thumb",thumbDot:"sd-slider__thumb-dot",tooltip:"sd-slider__tooltip",tooltipPanel:"sd-slider__tooltip-panel",tooltipOnHoverMode:"sd-slider__tooltip--on-hover",tooltipValue:"sd-slider__tooltip-value",input:"sd-slider__input",labelsContainer:"sd-slider-labels-container",label:"sd-slider__label",labelLongMod:"sd-slider__label--long",labelTick:"sd-slider__label-tick",labelTextContainer:"sd-slider__label-text-container",labelText:"sd-slider__label-text",labelTextSecondaryMode:"sd-slider__label-text sd-slider__label-text--secondary",clearButton:""},comment:{root:"sd-input sd-comment",small:"sd-row__question--small",controlDisabled:"sd-input--disabled",controlReadOnly:"sd-input--readonly",controlPreview:"sd-input--preview",content:"sd-comment__content sd-question__content",remainingCharacterCounter:"sd-remaining-character-counter",onError:"sd-input--error"},expression:"sd-expression",file:{root:"sd-file",rootDragging:"sd-file--dragging",rootAnswered:"sd-file--answered",rootDisabled:"sd-file--disabled",rootReadOnly:"sd-file--readonly",rootPreview:"sd-file--preview",placeholderInput:"sd-visuallyhidden",previewItem:"sd-file__preview-item",fileSign:"",fileList:"sd-file__list",fileSignBottom:"sd-file__sign",dragArea:"sd-file__drag-area",dragAreaActive:"sd-file__drag-area--active",fileDecorator:"sd-file__decorator",onError:"sd-file__decorator--error",fileDecoratorDrag:"sd-file__decorator--drag",fileInput:"sd-visuallyhidden",chooseFile:"sd-file__choose-btn",chooseFileAsText:"sd-action sd-file__choose-btn--text",chooseFileAsTextDisabled:"sd-action--disabled",chooseFileAsIcon:"sd-file__choose-btn--icon",chooseFileIconId:"icon-choosefile",disabled:"sd-file__choose-btn--disabled",controlDisabled:"sd-file__choose-file-btn--disabled",removeButton:"sd-context-btn--negative",removeButtonBottom:"",removeButtonIconId:"icon-clear",removeFile:"sd-hidden",removeFileSvg:"",removeFileSvgIconId:"icon-close_16x16",wrapper:"sd-file__wrapper",defaultImage:"sd-file__default-image",defaultImageIconId:"icon-defaultf
10ile",leftIconId:"icon-arrowleft",rightIconId:"icon-arrowright",removeFileButton:"sd-context-btn--small sd-context-btn--with-border sd-context-btn--colorful sd-context-btn--negative sd-file__remove-file-button",dragAreaPlaceholder:"sd-file__drag-area-placeholder",imageWrapper:"sd-file__image-wrapper",imageWrapperDefaultImage:"sd-file__image-wrapper--default-image",single:"sd-file--single",singleImage:"sd-file--single-image",mobile:"sd-file--mobile",videoContainer:"sd-file__video-container",contextButton:"sd-context-btn",video:"sd-file__video",actionsContainer:"sd-file__actions-container",closeCameraButton:"sd-file__close-camera-button",changeCameraButton:"sd-file__change-camera-button",takePictureButton:"sd-file__take-picture-button",loadingIndicator:"sd-file__loading-indicator",page:"sd-file__page"},signaturepad:{mainRoot:"sd-element sd-question sd-question--signature sd-row__question",root:"sd-signaturepad sjs_sp_container",small:"sd-row__question--small",controls:"sjs_sp_controls sd-signaturepad__controls",placeholder:"sjs_sp_placeholder",canvas:"sjs_sp_canvas sd-signaturepad__canvas",backgroundImage:"sjs_sp__background-image sd-signaturepad__background-image",clearButton:"sjs_sp_clear sd-context-btn sd-context-btn--negative sd-signaturepad__clear",clearButtonIconId:"icon-clear",loadingIndicator:"sd-signaturepad__loading-indicator"},saveData:{root:"sv-save-data_root",rootWithButtons:"sv-save-data_root--with-buttons",info:"sv-save-data_info",error:"sv-save-data_error",success:"sv-save-data_success",button:"sv-save-data_button",shown:"sv-save-data_root--shown"},window:{root:"sv_window",rootCollapsedMod:"sv_window--collapsed",rootFullScreenMode:"sv_window--full-screen",rootContent:"sv_window_root-content",body:"sv_window_content",header:{root:"sv_window_header",titleCollapsed:"sv_window_header_title_collapsed",buttonsContainer:"sv_window_buttons_container",button:"sv_window_button",buttonExpanded:"",buttonCollapsed:"",collapseButton:"sv_window_button sv_window_button_collapse",closeButton:"sv_window_button sv_window_button_close",fullScreenButton:"sv_window_button sv_window_button_full_screen"}},ranking:{root:"sv-ranking",rootMobileMod:"sv-ranking--mobile",rootDragMod:"sv-ranking--drag",rootDisabled:"sd-ranking--disabled",rootReadOnly:"sd-ranking--readonly",rootPreview:"sd-ranking--preview",rootDesignMode:"sv-ranking--design-mode",rootDragHandleAreaIcon:"sv-ranking--drag-handle-area-icon",rootSelectToRankMod:"sv-ranking--select-to-rank",rootSelectToRankEmptyValueMod:"sv-ranking--select-to-rank-empty-value",rootSelectToRankAlignVertical:"sv-ranking--select-to-rank-vertical",rootSelectToRankAlignHorizontal:"sv-ranking--select-to-rank-horizontal",rootSelectToRankSwapAreas:"sv-ranking--select-to-rank-swap-areas",item:"sv-ranking-item",itemContent:"sv-ranking-item__content sd-ranking-item__content",itemIndex:"sv-ranking-item__index sd-ranking-item__index",itemIndexEmptyMode:"sv-ranking-item__index--empty sd-ranking-item__index--empty",itemDisabled:"sv-ranking-item--disabled",itemReadOnly:"sv-ranking-item--readonly",itemPreview:"sv-ranking-item--preview",controlLabel:"sv-ranking-item__text",itemGhostNode:"sv-ranking-item__ghost",itemIconContainer:"sv-ranking-item__icon-container",itemIcon:"sv-ranking-item__icon",itemIconHoverMod:"sv-ranking-item__icon--hover",itemIconFocusMod:"sv-ranking-item__icon--focus",itemGhostMod:"sv-ranking-item--ghost",itemDragMod:"sv-ranking--drag",itemOnError:"sv-ranking-item--error",container:"sv-ranking__container",containerEmptyMode:"sv-ranking__container--empty",containerFromMode:"sv-ranking__container--from",containerToMode:"sv-ranking__container--to",containerPlaceholder:"sv-ranking__container-placeholder",containersDivider:"sv-ranking__containers-divider"},buttongroup:{root:"sd-button-group-scrollable-container sv-button-group",item:"sv-button-group__item",itemIcon:"sv-button-group__item-icon",itemDecorator:"sv-button-group__item-decorator",itemCaption:"sv-button-group__item-caption",itemHover:"sv-button-group__item--hover",itemSelected:"sv-button-group__item--selected",itemDisabled:"sv-button-group__item--disabled",itemControl:"sv-visuallyhidden",rootDropdown:"sd-button-group-scrollable-container sd-scrollable-container--compact sd-selectbase",selectWrapper:"sv-dropdown_select-wrapper",control:"sd-input sd-dropdown",controlEmpty:"sd-dropdown--empty",controlValue:"sd-dropdown__value",controlDisabled:"sd-input--disabled",controlReadOnly:"sd-input--readonly",controlPreview:"sd-input--preview",controlLabel:"sd-item__control-label",f
10ilterStringInput:"sd-dropdown__filter-string-input",chevronButtonIconId:"icon-chevron",popup:"sv-dropdown-popup",cleanButtonIconId:"icon-cancel",hintPrefix:"sd-dropdown__hint-prefix",hintSuffix:"sd-dropdown__hint-suffix"},list:{root:"sv-list__container sd-list",item:"sv-list__item sd-list__item",itemBody:"sv-list__item-body sd-list__item-body",itemSelected:"sv-list__item--selected sd-list__item--selected",itemFocused:"sv-list__item--focused sd-list__item--focused",itemHovered:"sv-list__item--hovered sd-list__item--hovered"},actionBar:{root:"sd-action-bar",item:"sd-action",defaultSizeMode:"",smallSizeMode:"",itemPressed:"sd-action--pressed",itemAsIcon:"sd-action--icon",itemIcon:"sd-action__icon",itemTitle:"sd-action__title"},variables:{mobileWidth:"--sd-mobile-width",themeMark:"--sv-defaultV2-mark"},tagbox:{root:"sd-selectbase",popup:"sv-dropdown-popup",small:"sd-row__question--small",selectWrapper:"sv-dropdown_select-wrapper",onError:"sd-input--error",label:"sd-selectbase__label",itemSvgIconId:"#icon-check-16x16",item:"sd-item sd-checkbox sd-selectbase__item",itemDisabled:"sd-item--disabled sd-checkbox--disabled",itemChecked:"sd-item--checked sd-checkbox--checked",itemHover:"sd-item--allowhover sd-checkbox--allowhover",itemControl:"sd-visuallyhidden sd-item__control sd-checkbox__control",itemDecorator:"sd-item__svg sd-checkbox__svg",itemEnter:"sd-item--enter",itemLeave:"sd-item--leave",cleanButtonIconId:"icon-cancel-24x24",cleanItemButton:"sd-tagbox-item_clean-button",cleanItemButtonSvg:"sd-tagbox-item_clean-button-svg",cleanItemButtonIconId:"icon-clear_16x16",chevronButtonIconId:"icon-chevron",control:"sd-input sd-tagbox sd-dropdown",controlValue:"sd-tagbox__value sd-dropdown__value",controlValueItems:"sd-tagbox__value-items",placeholderInput:"sd-tagbox__placeholder",controlEditable:"sd-input--editable",controlDisabled:"sd-input--disabled",controlReadOnly:"sd-input--readonly",controlPreview:"sd-input--preview",controlEmpty:"sd-dropdown--empty sd-tagbox--empty",controlLabel:"sd-item__control-label",filterStringInput:"sd-tagbox__filter-string-input sd-dropdown__filter-string-input",materialDecorator:"sd-item__decorator sd-checkbox__decorator",hint:"sd-tagbox__hint",hintPrefix:"sd-dropdown__hint-prefix sd-tagbox__hint-prefix",hintSuffix:"sd-dropdown__hint-suffix sd-tagbox__hint-suffix",hintSuffixWrapper:"sd-tagbox__hint-suffix-wrapper"},imagemap:{root:"sd-imagemap",bg:"sd-imagemap-bg",svg:"sd-imagemap-svg",svgItem:"sd-imagemap-svg-item",svgItemHovered:"sd-imagemap-svg-item sd-imagemap-svg-item--hover",svgItemSelected:"sd-imagemap-svg-item sd-imagemap-svg-item--selected",svgItemDisabled:"sd-imagemap-svg-item sd-imagemap-svg-item--disabled",svgControlPoint:"sd-imagemap-control-point"}};s2.default=s5;var s7={setTimeout:e=>s7.safeTimeOut(e,1e3),clearTimeout:e=>{clearTimeout(e)},safeTimeOut:(e,t)=>t<=0?(e(),0):setTimeout(e,t),now:()=>Date.now()};class s4{constructor(){this.listenerCounter=0,this.timerId=-1,this.onTimerTick=new P,this.onTimer=this.onTimerTick}static get instance(){return s4.instanceValue||(s4.instanceValue=new s4),s4.instanceValue}start(e=null){e&&this.onTimerTick.add(e),this.prevTimeInMs=s7.now(),this.timerId<0&&(this.timerId=s7.setTimeout(()=>{this.doTimer()})),this.listenerCounter++}stop(e=null){e&&this.onTimerTick.remove(e),this.listenerCounter--,0==this.listenerCounter&&this.timerId>-1&&(s7.clearTimeout(this.timerId),this.timerId=-1)}doTimer(){if((this.onTimerTick.isEmpty||0==this.listenerCounter)&&(this.timerId=-1),this.timerId<0)return;let e=s7.now(),t=Math.floor((e-this.prevTimeInMs)/1e3);this.prevTimeInMs=e,t<0&&(t=1);let s=this.timerId;this.onTimerTick.fire(this,{seconds:t}),s===this.timerId&&(this.timerId=s7.setTimeout(()=>{this.doTimer()}))}}s4.instanceValue=null;class s9 extends ew{constructor(e){super(),this.timerFunc=null,this.surveyValue=e}get survey(){return this.surveyValue}start(){!this.survey||this.isRunning||this.isDesignMode||(this.survey.onCurrentPageChanged.add(()=>{this.update()}),this.timerFunc=(e,t)=>{this.doTimer(t.seconds)},this.setIsRunning(!0),this.update(),s4.instance.start(this.timerFunc))}stop(){this.isRunning&&(this.setIsRunning(!1),s4.instance.stop(this.timerFunc))}get isRunning(){return this.getPropertyValue("isRunning",!1)}setIsRunning(e){this.setPropertyValue("isRunning",e)}update(){this.updateText(),this.updateProgress()}doTimer(e){var t=this.survey.currentPage;if(t){let s=t.getMaxTimeToFinish();s>0&&s<t.timeSpent+e&&(e=s-t.timeSpent),t.timeSpent=t.timeSpent+e}this.spent=this.spent+e,this.update(),this.onTimerTick&&this.onTimerTick(t)}updateProgress(){let{spent:e,limit:t}=this.survey.timerInfo;
10t?(0==e?(this.progress=0,setTimeout(()=>{this.progress=Math.floor((e+1)/t*100)/100},0)):e<=t&&(this.progress=Math.floor((e+1)/t*100)/100),this.progress>1&&(this.progress=void 0)):this.progress=void 0}updateText(){let e=this.survey.timerClock;this.clockMajorText=e.majorText,this.clockMinorText=e.minorText,this.text=this.survey.timerInfoText}get showProgress(){return void 0!==this.progress}get showTimerAsClock(){return!!this.survey.getCss().clockTimerRoot}get rootCss(){return new eX().append(this.survey.getCss().clockTimerRoot).append(this.survey.getCss().clockTimerRootTop,this.survey.isTimerPanelShowingOnTop).append(this.survey.getCss().clockTimerRootBottom,this.survey.isTimerPanelShowingOnBottom).toString()}getProgressCss(){return new eX().append(this.survey.getCss().clockTimerProgress).append(this.survey.getCss().clockTimerProgressAnimation,this.progress>0).toString()}get textContainerCss(){return this.survey.getCss().clockTimerTextContainer}get minorTextCss(){return this.survey.getCss().clockTimerMinorText}get majorTextCss(){return this.survey.getCss().clockTimerMajorText}}V([e_()],s9.prototype,"text",void 0),V([e_()],s9.prototype,"progress",void 0),V([e_()],s9.prototype,"clockMajorText",void 0),V([e_()],s9.prototype,"clockMinorText",void 0),V([e_({defaultValue:0})],s9.prototype,"spent",void 0);class s3 extends ew{constructor(e){super(),this.cssClasses=e,this.timeout=p.notifications.lifetime,this.timer=void 0,this.actionsVisibility={},this.showActions=!0,this.actionBar=new to,this.actionBar.setCssClasses({root:e1.root,defaultSizeMode:e1.defaultSizeMode,smallSizeMode:e1.smallSizeMode},!1),this.css=this.cssClasses.root}getCssClass(e){return new eX().append(this.cssClasses.root).append(this.cssClasses.rootWithButtons,this.actionBar.getVisibleActions().length>0).append(this.cssClasses.info,"error"!==e&&"success"!==e).append(this.cssClasses.error,"error"===e).append(this.cssClasses.success,"success"===e).append(this.cssClasses.shown,this.active).toString()}updateActionsVisibility(e){this.actionBar.actions.forEach(t=>t.visible=this.showActions&&this.actionsVisibility[t.id]===e)}notify(e,t="info",s=!1){this.isDisplayed=!0,setTimeout(()=>{this.updateActionsVisibility(t),this.message=e,this.active=!0,this.css=this.getCssClass(t),this.timer&&(clearTimeout(this.timer),this.timer=void 0),s||(this.timer=setTimeout(()=>{this.timer=void 0,this.active=!1,this.css=this.getCssClass(t)},this.timeout))},1)}addAction(e,t){e.visible=!1,e.innerCss=this.cssClasses.button;let s=this.actionBar.addAction(e);this.actionsVisibility[s.id]=t}}V([e_({defaultValue:!1})],s3.prototype,"active",void 0),V([e_({defaultValue:!1})],s3.prototype,"isDisplayed",void 0),V([e_()],s3.prototype,"message",void 0),V([e_()],s3.prototype,"css",void 0);class s6{calcRow(e){return"top"===e?1:"middle"===e?2:3}calcColumn(e){return"left"===e?1:"center"===e?2:3}calcAlignItems(e){return"left"===e?"flex-start":"center"===e?"center":"flex-end"}calcAlignText(e){return"left"===e?"start":"center"===e?"center":"end"}calcJustifyContent(e){return"top"===e?"flex-start":"middle"===e?"center":"flex-end"}calcGridRow(){let e=this.calcRow(this.positionY);if(this.cover.renderedHeight)return e;let t=this.cover.getVisibleRows(),s=t.indexOf(e);if(-1===s)return 0;let i=t.length;return 3===i?e:1===i?1:s+1}constructor(e,t,s){this.cover=e,this.positionX=t,this.positionY=s}get survey(){return this.cover.survey}get css(){return new eX().append(s6.CLASSNAME).append(`${s6.CLASSNAME}--${this.positionX}`).append(`${s6.CLASSNAME}--${this.positionY}`).append(s6.CLASSNAME+"--empty",this.isEmpty).toString()}get style(){let e=this.calcGridRow(),t={};return t.gridRow=e,t.gridColumn=0!==e?this.calcColumn(this.positionX):0,t.width=this.width?this.width+"px":void 0,0===e&&(t.display="none"),t}get contentStyle(){let e={};return e.textAlign=this.calcAlignText(this.positionX),e.alignItems=this.calcAlignItems(this.positionX),e.justifyContent=this.calcJustifyContent(this.positionY),e.maxWidth=this.contentMaxWidth,e}get showLogo(){return this.survey.hasLogo&&this.positionX===this.cover.logoPositionX&&this.positionY===this.cover.logoPositionY}get showTitle(){return this.survey.hasTitle&&this.positionX===this.cover.titlePositionX&&this.positionY===this.cover.titlePositionY}get showDescription(){return this.survey.renderedHasDescription&&this.positionX===this.cover.descriptionPositionX&&this.positionY===this.cover.descriptionPositionY}get isEmpty(){return!this.showLogo&&!this.showTitle&&!this.showDescription}get textAreaWidth(){return this.cover.renderedTextAreaWidth}get width(){if(this.cover.width)return Math.ceil(this.cover.width/3)}get contentMaxWidth(){return this.cover.getContentMaxWidth(this)}}s6.CLASSNAME="sv-header__cell";
10class s8 extends ew{calcBackgroundSize(e){return"fill"===e?"100% 100%":"tile"===e?"auto":e}updateHeaderClasses(){let e=!this.backgroundColor||"transparent"===this.backgroundColor,t="var(--sjs-primary-backcolor)"===this.backgroundColor,s=!e&&!t;this.headerClasses=new eX().append("sv-header").append("sv-header--height-auto",!this.renderedHeight).append("sv-header__without-background",e&&!this.backgroundImage).append("sv-header__background-color--none",e&&!this.titleColor&&!this.descriptionColor).append("sv-header__background-color--accent",t&&!this.titleColor&&!this.descriptionColor).append("sv-header__background-color--custom",s&&!this.titleColor&&!this.descriptionColor).append("sv-header__overlap",this.overlapEnabled).toString()}updateContentClasses(){let e=!!this.survey&&this.survey.calculateWidthMode(),t="survey"===this.inheritWidthFrom&&!!e&&"static"===e;if(this.maxWidth=t?this.survey.width:void 0,this.maxWidth){let e=this.maxWidth.toString();-1===e.indexOf("px")&&-1===e.indexOf("%")&&(this.maxWidth=parseFloat(e)+"px")}this.contentClasses=new eX().append("sv-header__content").append("sv-header__content--static",t).append("sv-header__content--responsive","container"===this.inheritWidthFrom||!!e&&"responsive"===e).toString()}
10updateBackgroundImageClasses(){this.backgroundImageClasses=new eX().append("sv-header__background-image").append("sv-header__background-image--contain","contain"===this.backgroundImageFit).append("sv-header__background-image--tile","tile"===this.backgroundImageFit).toString()}fromTheme(e){super.fromJSON(e.header||{}),e.cssVariables&&(this.backgroundColor=e.cssVariables["--sjs-header-backcolor"],this.titleColor=e.cssVariables["--sjs-font-headertitle-color"],this.descriptionColor=e.cssVariables["--sjs-font-headerdescription-color"]),this.init()}init(){this.renderBackgroundImage=ts(this.backgroundImage),this.updateHeaderClasses(),this.updateContentClasses(),this.updateBackgroundImageClasses()}constructor(){super(),this.cells=[],["top","middle","bottom"].forEach(e=>["left","center","right"].forEach(t=>this.cells.push(new s6(this,t,e)))),this.init()}getType(){return"cover"}get renderedHeight(){return(!this.survey||this.survey.isMobile)&&this.survey?this.survey&&this.survey.isMobile&&this.mobileHeight?this.mobileHeight+"px":void 0:this.height?this.height+"px":void 0}get renderedTextAreaWidth(){return this.textAreaWidth?this.textAreaWidth+"px":void 0}get isEmpty(){return!this.survey.hasLogo&&!this.survey.hasTitle&&!this.survey.renderedHasDescription}get survey(){return this._survey}set survey(e){this._survey!==e&&(this._survey=e,e&&(this.updateContentClasses(),this._survey.onPropertyChanged.add((e,t)=>{("widthMode"==t.name||"width"==t.name)&&this.updateContentClasses()})))}get backgroundImageStyle(){return this.backgroundImage?{opacity:this.backgroundImageOpacity,backgroundImage:this.renderBackgroundImage,backgroundSize:this.calcBackgroundSize(this.backgroundImageFit)}:null}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),("height"===e||"backgroundColor"===e||"backgroundImage"===e||"overlapEnabled"===e)&&this.updateHeaderClasses(),"inheritWidthFrom"===e&&this.updateContentClasses(),"backgroundImageFit"===e&&this.updateBackgroun
10dImageClasses()}getVisibleRows(){let e=[];for(let t=0;t<3;t++){let s=3*t;this.cells[s].isEmpty&&this.cells[s+1].isEmpty&&this.cells[s+2].isEmpty||e.push(t+1)}return 0!==e.length?e:[1,2,3]}getContentMaxWidth(e){if(e.isEmpty||e.showLogo)return;let t=this.cells.indexOf(e),s=Math.floor(t/3),i=t%3;if(1==i){if(!this.cells[3*s].isEmpty||!this.cells[3*s+2].isEmpty)return"100%"}else if(0==i){let e=0,t=i+1;for(;t<3&&this.cells[3*s+t].isEmpty;)this.cells[3*s+t].isEmpty&&e++,t++;return 100*(e+1)+"%"}else if(2==i){let e=0,t=i-1;for(;t>0&&this.cells[3*s+t].isEmpty;)this.cells[3*s+t].isEmpty&&e++,t--;return 100*(e+1)+"%"}}processResponsiveness(){if(this.survey&&this.survey.rootElement&&!this.survey.isMobile){let e=this.survey.rootElement.querySelectorAll(".sv-header__content")[0];if(!e)return;let t=e.getBoundingClientRect().width,s=n.getComputedStyle(e),i=parseFloat(s.paddingLeft)||0,r=parseFloat(s.paddingRight)||0,a=parseFloat(s.columnGap)||0;this.width=t-i-r-2*a}}get hasBackground(){return!!this.backgroundImage||"transparent"!==this.backgroundColor}}V([e_()],s8.prototype,"height",void 0),V([e_()],s8.prototype,"mobileHeight",void 0),V([e_()],s8.prototype,"inheritWidthFrom",void 0),V([e_()],s8.prototype,"textAreaWidth",void 0),V([e_()],s8.prototype,"textGlowEnabled",void 0),V([e_()],s8.prototype,"overlapEnabled",void 0),V([e_({defaultValue:"transparent"})],s8.prototype,"backgroundColor",void 0),V([e_()],s8.prototype,"titleColor",void 0),V([e_()],s8.prototype,"descriptionColor",void 0),V([e_({onSet:(e,t)=>{t.renderBackgroundImage=ts(e)}})],s8.prototype,"backgroundImage",void 0),V([e_()],s8.prototype,"renderBackgroundImage",void 0),V([e_()],s8.prototype,"backgroundImageFit",void 0),V([e_()],s8.prototype,"backgroundImageOpacity",void 0),V([e_()],s8.prototype,"logoPositionX",void 0),V([e_()],s8.prototype,"logoPositionY",void 0),V([e_()],s8.prototype,"titlePositionX",void 0),V([e_()],s8.prototype,"titlePositionY",void 0),V([e_()],s8.prototype,"descriptionPositionX",void 0),V([e_()],s8.prototype,"descriptionPositionY",void 0),V([e_()],s8.prototype,"logoStyle",void 0),V([e_()],s8.prototype,"titleStyle",void 0),V([e_()],s8.prototype,"descriptionStyle",void 0),V([e_()],s8.prototype,"headerClasses",void 0),V([e_()],s8.prototype,"contentClasses",void 0),V([e_()],s8.prototype,"width",void 0),V([e_()],s8.prototype,"maxWidth",void 0),V([e_()],s8.prototype,"backgroundImageClasses",void 0),H.addClass("cover",[{name:"height:number",minValue:0,default:0},{name:"mobileHeight:number",minValue:0,default:0},{name:"inheritWidthFrom",default:"survey"},{name:"textAreaWidth:number",minValue:0,default:0},{name:"textGlowEnabled:boolean"},{name:"overlapEnabled:boolean"},{name:"backgroundImage:file"},{name:"backgroundImageOpacity:number",minValue:0,maxValue:1,default:1},{name:"backgroundImageFit",default:"cover",choices:["cover","fill","contain"]},{name:"logoPositionX",default:"left"},{name:"logoPositionY",default:"top"},{name:"titlePositionX",default:"left"},{name:"titlePositionY",default:"bottom"},{name:"descriptionPositionX",default:"left"},{name:"descriptionPositionY",default:"bottom"}],function(){return new s8});class ie{constructor(e){this.type=e,this.timestamp=new Date}}class it extends ew{constructor(){super(),this.taskList=[],this.onAllTasksCompleted=this.addEvent()}runTask(e,t){let s=new ie(e);return this.taskList.push(s),this.hasActiveTasks=!0,t(()=>this.taskFinished(s)),s}waitAndExecute(e){this.hasActiveTasks?this.onAllTasksCompleted.add(()=>{e()}):e()}taskFinished(e){let t=this.taskList.indexOf(e);t>-1&&this.taskList.splice(t,1),this.hasActiveTasks&&0==this.taskList.length&&(this.hasActiveTasks=!1,this.onAllTasksCompleted.fire(this,{}))}}V([e_({defaultValue:!1})],it.prototype,"hasActiveTasks",void 0);class is extends ew{constructor(e,t){super(),this.effectiveWidth=e,this.questionTitleWidth=t}getType(){return"panellayoutcolumn"}isEmpty(){return!this.width&&!this.questionTitleWidth}}V([e_()],is.prototype,"width",void 0),V([e_({onSet:(e,t,s)=>{e!==s&&(t.width=e)}})],is.prototype,"effectiveWidth",void 0),V([e_()],is.prototype,"questionTitleWidth",void 0),H.addClass("panellayoutcolumn",[{name:"effectiveWidth:number",isSerializable:!1,minValue:0},{name:"width:number",visible:!1},"questionTitleWidth"],e=>new is);class ii extends ew{get allowRendering(){return!this.panel||!this.panel.survey||!this.panel.survey.isLazyRenderingSuspended}startLazyRendering(e,t=e3){if(!n.isAvailable())return;this._scrollableParent=t(e),this._scrollableParent===n.getDocumentElement()&&
10(this._scrollableParent=i.getWindow());let s=this._scrollableParent.scrollHeight>this._scrollableParent.clientHeight;this.isNeedRender=!s,s&&(this._updateVisibility=()=>{if(this.allowRendering){var t=function(e,t=0){let s=e4(e);if(!s||!e.offsetHeight)return!1;let n=e7(s)?s.host.clientHeight:s.documentElement.clientHeight,r=e.getBoundingClientRect(),a=Math.max(n,i.getInnerHeight());return Math.max(-t,r.top)<=Math.min(a+t,r.bottom)}(e,50);!this.isNeedRender&&t&&(this.isNeedRender=!0,this.stopLazyRendering())}},this.lazyRenderingTimeout=setTimeout(()=>{this._scrollableParent&&this._scrollableParent.addEventListener&&this._scrollableParent.addEventListener("scroll",this._updateVisibility),this.ensureVisibility()},10))}ensureVisibility(){this._updateVisibility&&this._updateVisibility()}stopLazyRendering(){this._scrollableParent&&this._updateVisibility&&this._scrollableParent.removeEventListener&&this._scrollableParent.removeEventListener("scroll",this._updateVisibility),clearTimeout(this.lazyRenderingTimeout),this._scrollableParent=void 0,this._updateVisibility=void 0}constructor(e){super(),this.panel=e,this._scrollableParent=void 0,this._updateVisibility=void 0,this.visibleElementsAnimation=new tE(this.getVisibleElementsAnimationOptions(),e=>{this.setWidth(e),this.setPropertyValue("visibleElements",e)},()=>this.visibleElements),this.visible=e.areInvisibleElementsShowing,this.createNewArray("elements"),this.createNewArray("visibleElements")}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"visible"===e&&this.onVisibleChangedCallback&&this.onVisibleChangedCallback()}setIsLazyRendering(e){this.isLazyRenderingValue=e,this.isNeedRender=!e}isLazyRendering(){return!0===this.isLazyRenderingValue}get id(){return"pr_"+this.uniqueId}equalsCore(e){return this==e}get elements(){return this.getPropertyValue("elements")}getIsAnimationAllowed(){var e;return super.getIsAnimationAllowed()&&this.visible&&(null==(e=this.panel)?void 0:e.animationAllowed)}getVisibleElementsAnimationOptions(){let e=e=>{tR(e),tP(e,{width:te(e)+"px"})};return{getRerenderEvent:()=>this.onElementRerendered,isAnimationEnabled:()=>this.animationAllowed,allowSyncRemovalAddition:!1,getAnimatedElement:e=>e.getWrapperElement(),getLeaveOptions:t=>({cssClass:(t.isPanel?t.cssClasses.panel:t.cssClasses).leave,onBeforeRunAnimation:e,onAfterRunAnimation:tT}),getEnterOptions:t=>({cssClass:(t.isPanel?t.cssClasses.panel:t.cssClasses).enter,onBeforeRunAnimation:e,onAfterRunAnimation:tT})}}set visibleElements(e){if(e.length)this.visible=!0;else{this.visible=!1,this.visibleElementsAnimation.cancel();return}this.visibleElementsAnimation.sync(e)}get visibleElements(){return this.getPropertyValue("visibleElements")}updateVisible(){for(var e=[],t=0;t<this.elements.length;t++)this.elements[t].isVisible&&e.push(this.elements[t]),(this.elements[t].isPanel||"paneldynamic"===this.elements[t].getType())&&(this.setIsLazyRendering(!1),this.stopLazyRendering());this.visibleElements=e}addElement(e){this.elements.push(e),this.updateVisible()}get index(){return this.panel.rows.indexOf(this)}setWidth(e){var t=e.length;if(0==t)return;let s=1===e.length;for(var i=[],n=0;n<this.elements.length;n++){var r=this.elements[n];if(r.isVisible){r.isSingleInRow=s;var a=this.getElementWidth(r);a&&(r.renderWidth=this.getRenderedWidthFromWidth(a),i.push(r)),r.rightIndent=0}else r.renderWidth=""}for(var n=0;n<this.elements.length;n++){var r=this.elements[n];!r.isVisible||i.indexOf(r)>-1||(0==i.length?r.renderWidth=`${Number.parseFloat((100/t).toFixed(6))}%`:r.renderWidth=this.getRenderedCalcWidth(r,i,t))}}getRenderedCalcWidth(e,t,s){for(var i="100%",n=0;n<t.length;n++)i+=" - "+t[n].renderWidth;var r=s-t.length;return r>1&&(i="("+i+")/"+r.toString()),"calc("+i+")"}getElementWidth(e){var t=e.width;return t&&"string"==typeof t?t.trim():""}getRenderedWidthFromWidth(e){return w.isNumber(e)?e+"px":e}dispose(){super.dispose(),this.stopLazyRendering()}getRowCss(){return new eX().append(this.panel.cssClasses.row).append(this.panel.cssClasses.rowCompact,this.panel.isCompact).append(this.panel.cssClasses.pageRow,this.panel.isPage||this.panel.showPanelAsPage).append(this.panel.cssClasse
10s.rowMultiple,this.visibleElements.length>1).toString()}setRootElement(e){this.rootElement=e}getRootElement(){return this.rootElement}}V([e_({defaultValue:!0})],ii.prototype,"visible",void 0),V([e_()],ii.prototype,"isNeedRender",void 0);class ir extends tL{get validationCallbacks(){return this.survey}get gridLayoutColumns(){let e=this.getArrayPropertyValue("gridLayoutColumns",e=>{e.onPropertyValueChangedCallback=this.onColumnPropertyValueChangedCallback});return this._columns||(this.generateColumns([].concat(e)),e=this._columns,this.gridLayoutColumns=e),e}set gridLayoutColumns(e){this.setArrayPropertyValue("gridLayoutColumns",e)}onAddRow(e){this.onRowVisibleChanged(),e.onVisibleChangedCallback=()=>this.onRowVisibleChanged()}getRowsAnimationOptions(){return{getRerenderEvent:()=>this.onElementRerendered,isAnimationEnabled:()=>this.animationAllowed,getAnimatedElement:e=>e.getRootElement(),getLeaveOptions:(e,t)=>({cssClass:this.cssClasses.rowLeave,onBeforeRunAnimation:tR,onAfterRunAnimation:tT}),getEnterOptions:(e,t)=>{let s=this.cssClasses;return{cssClass:new eX().append(s.rowEnter).append(s.rowDelayedEnter,t.isDeletingRunning).toString(),onBeforeRunAnimation:tR,onAfterRunAnimation:tT}}}}get visibleRows(){return this.getPropertyValue("visibleRows")}set visibleRows(e){this.rowsAnimation.sync(e)}onRemoveRow(e){e.visibleElementsAnimation.cancel(),this.visibleRows=this.rows.filter(e=>e.visible),e.onVisibleChangedCallback=void 0}onRowVisibleChanged(){this.visibleRows=this.rows.filter(e=>e.visible)}constructor(e=""){super(e),this.isQuestionsReady=!1,this.questionsValue=[],this._columns=void 0,this._columnsReady=!1,this.rowsAnimation=new tE(this.getRowsAnimationOptions(),e=>{this.setPropertyValue("visibleRows",e)},()=>this.visibleRows),this.isRandomizing=!1,this.onColumnPropertyValueChangedCallback=(e,t,s,i,n)=>{this._columnsReady&&(this.updateColumnWidth(this.gridLayoutColumns),this.updateRootStyle())},this.locCountRowUpdates=0,this.createNewArray("rows",(e,t)=>{this.onAddRow(e)},e=>{this.onRemoveRow(e)}),this.createNewArray("visibleRows"),this.elementsValue=this.createNewArray("elements",this.onAddElement.bind(this),this.onRemoveElement.bind(this)),this.setPropertyValueDirectly("id","sp_"+this.uniqueId),this.addExpressionProperty("visibleIf",(e,t)=>{this.visible=!0===t},e=>!this.areInvisibleElementsShowing),this.addExpressionProperty("enableIf",(e,t)=>{this.readOnly=!1===t}),this.addExpressionProperty("requiredIf",(e,t)=>{this.isRequired=!0===t})}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"questionTitleLocation"===e&&(this.onVisibleChanged.bind(this),this.updateElementCss(!0)),["questionStartIndex","showQuestionNumbers"].indexOf(e)>-1&&this.updateVisibleIndexes(),"title"===e&&this.resetHasTextInTitle(),"visible"===e&&(this.setPropertyValue("isVisible",this.isVisible),this.onVisibleChanged())}getType(){return"panelbase"}getValueGetterContext(){let e=super.getValueGetterContext();if(!e)return e;let t=this;return{getValue:t=>e.getValue(t),getTextValue:e.getTextValue?(t,s,i)=>e.getTextValue(t,s,i):void 0,getObj:()=>t,getRootObj:e.getRootObj?()=>e.getRootObj():void 0,getQuestion:e.getQuestion?()=>e.getQuestion():void 0}}setSurveyImpl(e,t){this.blockAnimations(),super.setSurveyImpl(e,t),this.isDesignMode&&this.onVisibleChanged();for(var s=0;s<this.elements.length;s++)this.elements[s].setSurveyImpl(e,t);this.releaseAnimations()}endLoadingFromJson(){super.endLoadingFromJson(),this.markQuestionListDirty(),this.onRowsChanged()}get hasTextInTitle(){return this.getPropertyValue("hasTextInTitle",void 0,()=>!!this.title)}resetHasTextInTitle(){this.resetPropertyValue("hasTextInTitle")}get hasTitle(){return this.canShowTitle(this.survey)&&(this.hasTextInTitle||this.locTitle.textOrHtml.length>0)||this.isDesignMode&&!this.isPanel&&this.showTitle&&p.designMode.showEmptyTitles}delete(e=!0){this.deletePanel(),this.removeFromParent(),e&&this.dispose()}deletePanel(){let e=this.elements;for(let t=0;t<e.length;t++){let s=e[t];s.isPanel&&s.deletePanel(),this.onRemoveElementNotifySurvey(s)}}removeFromParent(){}canShowTitle(e){return!0}getDefaultTitleTagName(){return p.titleTags.panel}get _showDescription(){return(!!this.hasTitle||!this.isDesignMode)&&(this.survey&&this.survey.showPageTitles&&this.hasDescription||this.showDescription&&this.isDesignMode&&p.designMode.showEmptyDescriptions)}localeChanged(){super.localeChanged();for(var e=0;e<this.elements.length;e++)this.elements[e].localeChanged()}locStrsChanged(){super.locStrsChanged();for(var e=0;e<this.elements.length;e++)this.elements[e].locStrsChanged()}randomSeedChanged(){this.randomizeElements(this.areQuestionsRandomized),this.elements.forEac
vendor: 2,322 bytes, line 10
10h(e=>{e.randomSeedChanged()})}getAllChildren(){return[...super.getAllChildren(),...this.elements]}getMarkdownHtml(e,t,s){return"navigationTitle"===t&&this.locNavigationTitle.isEmpty?this.locTitle.renderedHtml||this.name:super.getMarkdownHtml(e,t,s)}get locNavigationTitle(){return this.getOrCreateLocStr("navigationTitle",!0,!1,e=>{e.onGetTextCallback=e=>e||this.title||this.name})}get renderedNavigationTitle(){return this.locNavigationTitle.renderedHtml}get requiredMark(){return this.survey&&this.isRequired?this.titleSettings.requiredMark:""}get requiredText(){return this.requiredMark}get titlePattern(){return this.survey?this.titleSettings.questionTitlePattern:"numTitleRequire"}get isRequireTextOnStart(){return this.isRequired&&"requireNumTitle"==this.titlePattern}get isRequireTextBeforeTitle(){return this.isRequired&&"numRequireTitle"==this.titlePattern}get isRequireTextAfterTitle(){return this.isRequired&&"numTitleRequire"==this.titlePattern}get questionsOrder(){return this.questionOrder}set questionsOrder(e){this.questionOrder=e}addNoFromChild(e){return e}canRandomize(e){return e&&"initial"!==this.questionOrder||"random"===this.questionOrder}randomizeElements(e){if(!this.canRandomize(e)||this.isRandomizing)return!1;this.isRandomizing=!0;for(var t=[],s=this.elements,i=0;i<s.length;i++)t.push(s[i]);let n=w.randomizeArray(t,this.randomSeed);return this.setArrayPropertyDirectly("elements",n,!1),this.updateRows(),this.updateVisibleIndexes(),this.isRandomizing=!1,!0}get areQuestionsRandomized(){return"random"==("default"==this.questionOrder&&this.survey?this.survey.questionOrder:this.questionOrder)}get parent(){return this.getPropertyValue("parent",null)}set parent(e){this.setPropertyValue("parent",e)}get depth(){return null==this.parent?0:this.parent.depth+1}calcCssClasses(e){var t={panel:{},error:{},row:"",rowEnter:"",rowLeave:"",rowDelayedEnter:"",rowMultiple:"",pageRow:"",rowCompact:""};return this.copyCssClasses(t.panel,e.panel),this.copyCssClasses(t.error,e.error),e.pageRow&&(t.pageRow=e.pageRow),e.rowCompact&&(t.rowCompact=e.rowCompact),e.row&&(t.row=e.row),e.rowEnter&&(t.rowEnter=e.rowEnter),e.rowLeave&&(t.rowLeave=e.rowLeave),e.rowDelayedEnter&&(t.rowDelayedEnter=e.rowDelayedEnter),e.rowMultiple&&(t.rowMultiple=e.rowMultiple),this.survey&&this.cssCallbacks.updatePanelCssClasse
10s(this,t),t}get isPanel(){return!1}getPanels(){return[this]}getLayoutType(){return"row"}isLayoutTypeSupported(e){return"flow"!==e}get questions(){return this.isQuestionsReady||(this.questionsValue=this.getQuestionsCore(!1),this.isQuestionsReady=!0),this.questionsValue}get visibleQuestions(){return this.getQuestionsCore(!0)}getQuestionsCore(e){let t=[];for(let i=0;i<this.elements.length;i++){let n=this.elements[i];if(!e||n.isVisible)if(n.isPanel){var s=n.getQuestionsCore(e);for(let e=0;e<s.length;e++)t.push(s[e])}else t.push(n)}return t}getQuestions(e){let t=this.questions;if(!e)return t;let s=[];return t.forEach(e=>{s.push(e),e.getNestedQuestions().forEach(e=>s.push(e))}),s}getQuestionByName(e){for(var t=this.questions,s=0;s<t.length;s++)if(t[s].name==e)return t[s];return null}getElementByName(e){if(e==this.name)return this;for(var t=this.elements,s=0;s<t.length;s++){var i=t[s];if(i.name==e)return i;let n=i.getPanels();if(Array.isArray(n))for(let t=0;t<n.length;t++){let s=n[t].getElementByName(e);if(s)return s}}return null}getQuestionByValueName(e,t=!1){let s=this.getQuestionsByValueName(e,t);return s.length>0?s[0]:null}getQuestionsByValueName(e,t=!1){let s=[];t&&(e=e.toLowerCase());for(var i=this.questions,n=0;n<i.length;n++){let r=i[n].getValueName();t&&(r=r.toLowerCase()),r==e&&s.push(i[n])}return s}getValue(){var e={};return this.collectValues(e,0),w.getUnbindValue(e)}hasValueAnyQuestion(e){let t=e?this.visibleQuestions:this.questions;for(let e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1}collectValues(e,t){let s=this.elements;0===t&&(s=this.questions);for(var i=0;i<s.length;i++){let a=s[i];if(a.isPanel||a.isPage){let s={};a.collectValues(s,t-1)&&(e[a.name]=s)}else if(!a.isEmpty()){var n=a.getValueName();if(e[n]=a.getStructuredValue(t-1),this.data){var r=this.data.getComment(n);r&&(e[n+ew.commentSuffix]=r)}}}return!0}getDisplayValue(e){for(var t={},s=this.questions,i=0;i<s.length;i++){var n=s[i];n.isEmpty()||(t[e?n.title:n.getValueName()]=n.getDisplayValue(e))}return t}getComments(){var e={};if(!this.data)return e;for(var t=this.questions,s=0;s<t.length;s++){var i=t[s],n=this.data.getComment(i.getValueName());n&&(e[i.getValueName()]=n)}return e}clearIncorrectValues(){for(var e=0;e<this.elements.length;e++)this.elements[e].clearIncorrectValues()}clearErrors(){for(var e=0;e<this.elements.length;e++)this.elements[e].clearErrors();this.errors=[]}markQuestionListDirty(){this.isQuestionsReady=!1,this.parent&&this.parent.markQuestionListDirty()}get elements(){return ew.collectDependency(this,"elements"),this.elementsValue}getElementsInDesign(e=!1){return this.elements}containsElement(e){for(var t=0;t<this.elements.length;t++){var s=this.elements[t];if(s==e)return!0;var i=s.getPanels();if(Array.isArray(i)){for(let t=0;t<i.length;t++)if(i[t].containsElement(e))return!0}}return!1}searchText(e,t){super.searchText(e,t);for(var s=0;s<this.elements.length;s++)this.elements[s].searchText(e,t)}hasErrors(e=!0,t=!1){return!this.validate(e,t)}validate(e=!0,t=!1,s){let i=new tH({fireCallback:e,focusOnFirstError:t,callbackResult:s});return this.validateCore(i),i.finish(),i.runningResult}validateContainerOnly(){this.validateInPanels(new tH({fireCallback:!0,isOnValueChanged:!1})),this.parent&&this.parent.validateContainerOnly()}validateInPanels(e){if(!this.isReadOnly){var t=[];this.validateRequired(e,t),this.survey&&(this.validationCallbacks.validatePanel(this,t,e.fireCallback),e.setErrorElement(this,t)),e.fireCallback&&(this.errors=t)}}getErrorCustomText(e,t){return this.survey?this.survey.getSurveyErrorCustomText(this,e,t):e}validateRequired(e,t){if(!this.isRequired)return;var s=[];if(this.addQuestionsToList(s,!0),0==s.length)return;for(var i=0;i<s.length;i++)if(!s[i].isEmpty())return;let n=new eS(this.requiredErrorText,this);t.push(n),e.setErrorElement(s[0],[n])}validateElement(e){let t=e.errorCount;return this.validateCore(e),e.errorCount<=t}validateCore(e){var t;let s=null==(t=this.singleInput)?void 0:t.currentSingleQuestion;s&&0>this.questions.indexOf(s)&&(s=void 0);let i=s?[s]:this.elements,n=null;for(var r=0;r<i.length;
10r++)(n=i[r]).isVisible&&(n.isPanel?n.validateCore(e):n.validateElement(e));s||(this.validateInPanels(e),this.updateContainsErrors())}getContainsErrors(){var e=super.getContainsErrors();if(e)return e;for(var t=this.elements,s=0;s<t.length;s++)if(t[s].containsErrors)return!0;return!1}updateElementVisibility(){for(let e=0;e<this.elements.length;e++)this.elements[e].updateElementVisibility();super.updateElementVisibility()}getFirstQuestionToFocus(e=!1,t=!1){if(!e&&!t&&this.isCollapsed)return null;for(var s=this.elements,i=0;i<s.length;i++){var n=s[i];if(n.isVisible&&(t||!n.isCollapsed))if(n.isPanel){var r=n.getFirstQuestionToFocus(e,t);if(r)return r}else{let t=n.getFirstQuestionToFocus(e);if(t)return t}}return null}getFirstVisibleQuestion(){let e=this.questions;for(let t=0;t<e.length;t++)if(e[t].isVisible)return e[t];return null}getFirstVisibleElement(){let e=this.elements;for(let t=0;t<e.length;t++)if(e[t].isVisible)return e[t];return null}focusFirstQuestion(){let e=this.getFirstQuestionToFocus();e&&e.focus()}focusFirstErrorQuestion(){var e=this.getFirstQuestionToFocus(!0);e&&e.focus()}addQuestionsToList(e,t=!1,s=!1){this.addElementsToList(e,t,s,!1)}addPanelsIntoList(e,t=!1,s=!1){this.addElementsToList(e,t,s,!0)}addElementsToList(e,t,s,i){(!t||this.visible)&&this.addElementsToListCore(e,this.elements,t,s,i)}addElementsToListCore(e,t,s,i,n){for(var r=0;r<t.length;r++){var a=t[r];(!s||a.visible)&&((n&&a.isPanel||!n&&!a.isPanel)&&e.push(a),a.isPanel?a.addElementsToListCore(e,a.elements,s,i,n):i&&this.addElementsToListCore(e,a.getElementsInDesign(!1),s,i,n))}}calcMaxRowColSpan(){let e=0;return this.rows.forEach(t=>{let s=0,i=!1;t.elements.forEach(e=>{e.width&&(i=!0),s+=e.colSpan||1}),!i&&s>e&&(e=s)}),e}updateColumnWidth(e){let t=0,s=0;if(e.forEach(e=>{e.width?(t+=e.width,e.setPropertyValue("effectiveWidth",e.width)):s++}),s){let i=Math.floor((100-t)/s*100)/100;for(let t=0;t<e.length;t++)e[t].width||e[t].setPropertyValue("effectiveWidth",i)}}updateColumns(){this._columns=void 0,this.updateRootStyle()}updateRootStyle(){var e;super.updateRootStyle(),null==(e=this.elements)||e.forEach(e=>e.updateRootStyle())}updateCustomWidgets(){for(var e=0;e<this.elements.length;e++)this.elements[e].updateCustomWidgets()}getQuestionTitleLocation(){return this.onGetQuestionTitleLocation?this.onGetQuestionTitleLocation():"default"!=this.questionTitleLocation?this.questionTitleLocation:this.parent?this.parent.getQuestionTitleLocation():this.survey?this.titleSettings.questionTitleLocation:"top"}availableQuestionTitleWidth(){return"left"===this.getQuestionTitleLocation()||this.hasElementWithTitleLocationLeft()}hasElementWithTitleLocationLeft(){return this.elements.some(e=>e instanceof ir?e.hasElementWithTitleLocationLeft():e instanceof tz?"left"===e.getTitleLocation():void 0)}getQuestionTitleWidth(){return(this.onGetQuestionTitleWidth?this.onGetQuestionTitleWidth():this.questionTitleWidth)||this.parent&&this.parent.getQuestionTitleWidth()}get columns(){return this._columns||(this.generateColumns(this.gridLayoutColumns),this.gridLayoutColumns=this._columns),this._columns||[]}generateColumns(e){var t;let s=null==(t=this.survey)?void 0:t.gridLayoutEnabled,i=[].concat(e);if(s){let t=this.calcMaxRowColSpan();if(t<=e.length)i=e.slice(0,t);else for(let s=e.length;s<t;s++){let e=new is;i.push(e)}}this._columns=i;try{this._columnsReady=!1,this.updateColumnWidth(i)}finally{this._columnsReady=!0}}createGridLayoutColumns(){return this.generateColumns([]),this._columns}updateGridColumns(){this.updateColumns(),this.elements.forEach(e=>{e.isPanel&&e.updateGridColumns()})}getColumsForElement(e){let t=this.findRowByElement(e);if(!t||!this.survey||!this.survey.gridLayoutEnabled)return[];let s=t.elements.length-1;for(;s>=0&&t.elements[s].getPropertyValueWithoutDefault("colSpan");)s--;let i=t.elements.indexOf(e),n=0;for(let e=0;e<i;e++)n+=t.elements[e].colSpan;let r=e.getPropertyValueWithoutDefault("colSpan");if(!r&&i===s){let e=0;for(let i=0;i<t.elements.length;i++)i!==s&&(e+=t.elements[i].colSpan);r=this.columns.length-e}let a=this.columns.slice(n,n+(r||1));return e.setPropertyValueDirectly("effectiveColSpan",a.length),a}isQuestionIndexRecursive(){return!!this.survey&&"recursive"===this.titleSettings.showQuestionNumbers}getQuestionStartIndex(){let e=this.getStartIndex();
10return this.isQuestionIndexRecursive()?this.getStartIndexSubs(e,!0):e}getStartIndexSubs(e,t){if(!e||!this.isComplexIndex(e))return e;let s="."===e[e.length-1]?".":"";s&&(e=e.substring(0,e.length-1));let i=e.lastIndexOf(".");return e+=s,t?e.substring(i+1):e.substring(0,i+1)}getQuestionStartIndexVsVisibleIndex(e,t){let s=this.getStartIndexSubs(e,!1),i=this.getStartIndexSubs(e,!0);return w.getNumberByIndex(t,s)+i}isComplexIndex(e){let t=e.indexOf(".");return t>-1&&t<e.length-1}getChildrenLayoutType(){return"row"}getProgressInfo(){return tL.getProgressInfoByElements(this.elements,this.isRequired)}get root(){for(var e=this;e.parent;)e=e.parent;return e}childVisibilityChanged(){this.isRunningConditions||this.getIsPageVisible(null)!==this.getPropertyValue("isVisible",!0)&&this.onVisibleChanged()}canRenderFirstRows(){return this.isPage}isLazyRenderInRow(e){return!!this.survey&&!!this.survey.isLazyRendering&&(e>=this.survey.lazyRenderFirstBatchSize||!this.canRenderFirstRows())}createRowAndSetLazy(e){let t=this.createRow();return t.setIsLazyRendering(this.isLazyRenderInRow(e)),t}createRow(){return new ii(this)}onSurveyLoad(){this.blockAnimations(),super.onSurveyLoad();for(var e=0;e<this.elements.length;e++)this.elements[e].onSurveyLoad();this.onElementVisibilityChanged(this),this.releaseAnimations()}onFirstRenderingCore(){super.onFirstRenderingCore(),this.onRowsChanged(),this.elements.forEach(e=>e.onFirstRendering())}updateRows(){this.isLoadingFromJson||(this.getElementsForRows().forEach(e=>{e.isPanel&&e.updateRows()}),this.onRowsChanged())}get rows(){return this.getPropertyValue("rows")}ensureRowsVisibility(){this.rows.forEach(e=>{e.ensureVisibility()})}onRowsChanged(){!this.isLoadingFromJson&&this.wasRendered&&(this.blockAnimations(),this.setArrayPropertyDirectly("rows",this.buildRows()),this.updateColumns(),this.releaseAnimations())}blockRowsUpdates(){this.locCountRowUpdates++}releaseRowsUpdates(){this.locCountRowUpdates--}updateRowsBeforeElementRemoved(e){if(!this.wasRendered&&0===this.rows.length)return;let t=this.findRowByElement(e),s=this.rows.indexOf(t),i=t.elements.indexOf(e);t.elements.splice(i,1),0==t.elements.length?this.rows.splice(s,1):!t.elements[0].startWithNewLine&&this.rows[s-1]?(t.elements.forEach(e=>this.rows[s-1].addElement(e)),this.rows.splice(s,1)):t.updateVisible()}updateRowsOnElementAdded(e){if(!this.wasRendered&&0===this.rows.length&&this.elements.length>1)return;let t=this.elements.indexOf(e),s=this.elements[t+1],i=e=>{let t=this.createRowAndSetLazy(e);return this.isDesignMode&&t.setIsLazyRendering(!1),this.rows.splice(e,0,t),t},n=(e,t,s,...i)=>{let n=e.elements.splice(t,s,...i);return e.updateVisible(),n};if(!s)return void(0==t||e.startWithNewLine?n(i(this.rows.length),0,0,e):this.rows[this.rows.length-1].addElement(e));let r=this.findRowByElement(s);if(!r)return;let a=this.rows.indexOf(r),o=r.elements.indexOf(s);0==o?s.startWithNewLine?e.startWithNewLine||a<1?i(a).addElement(e):this.rows[a-1].addElement(e):n(r,0,0,e):e.startWithNewLine?n(i(a+1),0,0,...[e].concat(n(r,o,r.elements.length))):n(r,o,0,e)}canFireAddRemoveNotifications(e){return!!this.survey&&e.prevSurvey!==this.survey}onAddElement(e,t){let s=this.survey,i=this.canFireAddRemoveNotifications(e);this.surveyImpl&&e.setSurveyImpl(this.surveyImpl),e.parent=this,this.markQuestionListDirty(),this.canBuildRows()&&this.updateRowsOnElementAdded(e),i&&(e.isPanel?s.panelAdded(e,t,this,this.root):s.questionAdded(e,t,this,this.root)),this.addElementCallback&&this.addElementCallback(e),e.registerPropertyChangedHandlers(["visible","isVisible"],()=>{this.onElementVisibilityChanged(e)},this.id),e.registerPropertyChangedHandlers(["startWithNewLine"],()=>{this.onElementStartWithNewLineChanged(e)},this.id),this.onElementVisibilityChanged(this)}onRemoveElement(e){e.parent=null,this.unregisterElementPropertiesChanged(e),this.markQuestionListDirty(),this.updateRowsOnElementRemoved(e),this.isRandomizing||(this.onRemoveElementNotifySurvey(e),this.removeElementCallback&&this.removeElementCallback(e),this.onElementVisibilityChanged(this))}unregisterElementPropertiesChanged(e){e.unregisterPropertyChangedH
10andlers(["visible","isVisible","startWithNewLine"],this.id)}onRemoveElementNotifySurvey(e){this.canFireAddRemoveNotifications(e)&&(e.isPanel?this.lifecycleCallbacks.panelRemoved(e):this.lifecycleCallbacks.questionRemoved(e))}onElementVisibilityChanged(e){this.isLoadingFromJson||this.isRandomizing||(this.updateRowsVisibility(e),this.childVisibilityChanged(),this.parent&&this.parent.onElementVisibilityChanged(this))}onElementStartWithNewLineChanged(e){this.locCountRowUpdates>0||(this.blockAnimations(),this.updateRowsBeforeElementRemoved(e),this.updateRowsOnElementAdded(e),this.releaseAnimations())}updateRowsVisibility(e){for(var t=this.rows,s=0;s<t.length;s++){var i=t[s];if(i.elements.indexOf(e)>-1){i.updateVisible(),i.visible&&!i.isNeedRender&&(i.isNeedRender=!0);break}}}canBuildRows(){return!this.isLoadingFromJson&&"row"==this.getChildrenLayoutType()}buildRows(){if(!this.canBuildRows())return[];let e=[],t=this.getElementsForRows();for(let s=0;s<t.length;s++){let i=t[s],n=0==s||i.startWithNewLine,r=n?this.createRowA
10ndSetLazy(e.length):e[e.length-1];n&&e.push(r),r.addElement(i)}return e.forEach(e=>e.updateVisible()),e}getElementsForRows(){return this.elements}getDragDropInfo(){let e=this.getPage(this.parent);return e?e.getDragDropInfo():void 0}updateRowsOnElementRemoved(e){this.canBuildRows()&&(this.updateRowsRemoveElementFromRow(e,this.findRowByElement(e)),this.updateColumns())}updateRowsRemoveElementFromRow(e,t){if(t&&t.panel){var s=t.elements.indexOf(e);!(s<0)&&(t.elements.splice(s,1),t.elements.length>0?(this.blockRowsUpdates(),t.elements[0].startWithNewLine=!0,this.releaseRowsUpdates(),t.updateVisible()):t.index>=0&&t.panel.rows.splice(t.index,1))}}getAllRows(){let e=[];return this.rows.forEach(t=>{let s=[];t.elements.forEach(e=>{e.isPanel?s.push(...e.getAllRows()):"paneldynamic"==e.getType()&&(this.isDesignMode?s.push(...e.template.getAllRows()):e.panels.forEach(e=>s.push(...e.getAllRows())))}),e.push(t),e.push(...s)}),e}findRowAndIndexByElement(e,t){if(!e)return{row:void 0,index:this.rows.length-1};t=t||this.rows;for(var s=0;s<t.length;s++)if(t[s].elements.indexOf(e)>-1)return{row:t[s],index:s};return{row:null,index:-1}}forceRenderRow(e){e&&!e.isNeedRender&&(e.isNeedRender=!0,e.stopLazyRendering())}forceRenderElement(e,t=()=>{},s=0){let i=this.getAllRows(),{row:n,index:r}=this.findRowAndIndexByElement(e,i);if(r>=0&&r<i.length){let e=[];e.push(n);for(let t=r-1;t>=r-s&&t>=0;t--)e.push(i[t]);this.forceRenderRows(e,t)}}forceRenderRows(e,t=()=>{}){let s,i=(s=e.length,()=>{--s<=0&&t()});e.forEach(e=>new tD(e.visibleElements,i)),e.forEach(e=>this.forceRenderRow(e))}findRowByElement(e){return this.findRowAndIndexByElement(e).row}elementWidthChanged(e){if(!this.isLoadingFromJson){var t=this.findRowByElement(e);t&&t.updateVisible()}}get ariaTitleId(){return this.id+"_ariaTitle"}get ariaLabelledBy(){return this.hasTitle?this.ariaTitleId:null}get ariaLabel(){return this.hasTitle?null:this.title||this.name||null}get ariaRole(){return"group"}get processedTitle(){return this.getRenderedTitle(this.locTitle.textOrHtml)}getRenderedTitle(e){return null!=this.textProcessor?this.textProcessor.processText(e,!0):e}onHidingContent(){this.questions.forEach(e=>e.onHidingContent())}onVisibleChanged(){if(!this.isRandomizing&&(this.setPropertyValue("isVisible",this.isVisible),this.canUpdateValueOnVisibleChanged())){let t=this.questions,s=this.isVisible;for(var e=0;e<t.length;e++){let i=t[e];s?i.updateValueWithDefaults():(i.clearValueIfInvisible("onHiddenContainer"),i.onHidingContent())}}}notifyStateChanged(e){super.notifyStateChanged(e),this.isCollapsed&&this.questions.forEach(e=>e.onHidingContent())}get isVisible(){return this.areInvisibleElementsShowing||this.getIsPageVisible(null)}getIsContentVisible(e){if(this.areInvisibleElementsShowing)return!0;for(var t=0;t<this.elements.length;t++)if(this.elements[t]!=e&&this.elements[t].isVisible)return!0;return!1}getIsPageVisible(e){let t=this.getIsContentVisible(e);return this.visible&&t}setVisibleIndex(e){if(!this.isVisible||e<0)return this.resetVisibleIndexes(),0;this.lastVisibleIndex=e;var t=e;e+=this.beforeSetVisibleIndex(e);var s=this.getPanelStartIndex(e),i=s;let n=this.elements;for(var r=0;r<n.length;r++)i+=n[r].setVisibleIndex(i);return this.isContinueNumbering()&&(e+=i-s),e-t}updateVisibleIndexes(){void 0!==this.lastVisibleIndex&&(this.resetVisibleIndexes(),this.setVisibleIndex(this.lastVisibleIndex))}resetVisibleIndexes(){let e=this.elements;for(var t=0;t<e.length;t++)e[t].setVisibleIndex(-1)}beforeSetVisibleIndex(e){return 0}getPanelStartIndex(e){return e}isContinueNumbering(){return!0}get isReadOnly(){var e=!!this.parent&&this.parent.isReadOnly,t=!!this.survey&&this.survey.isDisplayMode;return this.readOnly||e||t}onReadOnlyChanged(){for(var e=0;e<this.elements.length;e++){var t=this.elements[e];t.setPropertyValue("isReadOnly",t.isReadOnly)}super.onReadOnlyChanged()}updateElementCss(e){super.updateElementCss(e);for(let t=0;t<this.elements.length;t++)this.elements[t].updateElementCss(e)}addElement(e,t=-1){return!!this.canAddElement(e)&&(t<0||t>=this.elements.length?this.elements.push(e):this.elements.splice(t,0,e),this.wasRendered&&e.onFirstRendering(),this.updateColumns(),!0)}insertElement(e,t,s="bottom"){if(!t)return void this.addElement(e);this.blockRowsUpdates();let i=this.elements.indexOf(t),n=this.findRowByElement(t);"left"==s||"right"==s?"right"==s?(e.startWithNewLine=!1,i++):0==n.elements.indexOf(t)?(t.startWithNewLine=!1,e.startWithNewLine=!0):e.startWithNewLine=!1:(e.startWithNewLine=!0,i="top"==s?this.elements.indexOf(n.elements[0]):this.elements.indexOf(n.elements[n.elements.length-1])+1),this.releaseRowsUpdates(),this.addElement(e,i)}insertElementAfter(e,t){let s=this.elements.indexOf(t);s>=0&&this.addElement(e,s+1)}insertElementBefore(e,t){let s=this.elements.indexOf(t);s>=0&&this.addElement(e,s)}canAddElement(e){return!!e&&e.isLayoutTypeSupported(this.getChildrenLayoutType())}addQuestion(e,t=-1){return this.addElement(e,t)}
vendor: 4,957 bytes, line 10
10addPanel(e,t=-1){return this.addElement(e,t)}addNewQuestion(e,t=null,s=-1){var i=sm.Instance.createQuestion(e,t);return this.addQuestion(i,s)?i:null}addNewPanel(e=null){var t=this.createNewPanel(e);return this.addPanel(t)?t:null}indexOf(e){return this.elements.indexOf(e)}createNewPanel(e){var t=H.createClass("panel");return t.name=e,t}removeElement(e){var t=this.elements.indexOf(e);if(t<0){for(var s=0;s<this.elements.length;s++)if(this.elements[s].removeElement(e))return!0;return!1}return this.elements.splice(t,1),this.updateColumns(),!0}removeQuestion(e){this.removeElement(e)}runCondition(e){if(this.isDesignMode||this.isLoadingFromJson)return;var t=this.elements.slice();let s=this.getIsPageVisible();this.isRunningConditions=!0;for(var i=0;i<t.length;i++)t[i].runCondition(e);this.runConditionCore(e);let n=this.getIsPageVisible();this.isRunningConditions=!1,s!==n&&this.childVisibilityChanged()}onAnyValueChanged(e,t){for(var s=this.elements,i=0;i<s.length;i++)s[i].onAnyValueChanged(e,t)}checkBindings(e,t){for(var s=this.elements,i=0;i<s.length;i++)s[i].checkBindings(e,t)}needResponsiveWidth(){let e=!1;return this.elements.forEach(t=>{t.needResponsiveWidth()&&(e=!0)}),this.rows.forEach(t=>{t.elements.length>1&&(e=!0)}),e}get hasDescriptionUnderTitle(){return this.hasDescription}get cssHeader(){return this.cssClasses.panel.header}get cssDescription(){return this.cssClasses.panel.description}getQuestionErrorLocation(){return"default"!==this.questionErrorLocation?this.questionErrorLocation:this.parent?this.parent.getQuestionErrorLocation():this.survey?this.titleSettings.questionErrorLocation:"top"}getTitleOwner(){return this}get no(){return""}get cssTitleNumber(){return this.cssClasses.panel.number}get cssRequiredMark(){return this.cssClasses.panel.requiredMark}get cssError(){return this.getCssError(this.cssClasses)}getCssError(e){return new eX().append(e.error.root).toString()}getSerializableColumnsValue(){if(void 0===this.getPropertyValueWithoutDefault("gridLayoutColumns"))return;let e=-1;for(let t=this.gridLayoutColumns.length-1;t>=0;t--)if(!this.gridLayoutColumns[t].isEmpty()){e=t;break}return this.gridLayoutColumns.slice(0,e+1)}afterRender(e){this.afterRenderCore(e)}dispose(){if(super.dispose(),this.rows){for(let e=0;e<this.rows.length;e++)this.rows[e].dispose();this.rows.splice(0,this.rows.length)}this.disposeElements(),this.elements.splice(0,this.elements.length)}disposeElements(){for(let e=0;e<this.elements.length;e++)this.elements[e].dispose()}}V([e_({defaultValue:!0})],ir.prototype,"showTitle",void 0),V([e_({defaultValue:!0})],ir.prototype,"showDescription",void 0),V([e_({localizable:!0})],ir.prototype,"requiredErrorText",void 0),V([e_()],ir.prototype,"questionOrder",void 0),V([e_({returnValue:""})],ir.prototype,"questionStartIndex",void 0),V([e_()],ir.prototype,"visibleIf",void 0),V([e_()],ir.prototype,"id",void 0),V([e_()],ir.prototype,"isRequired",void 0),V([e_()],ir.prototype,"requiredIf",void 0),V([e_({onSet:e=>e.toLowerCase()})],ir.prototype,"questionTitleLocation",void 0),V([e_()],ir.prototype,"questionTitleWidth",void 0),V([e_()],ir.prototype,"visible",void 0),V([e_()],ir.prototype,"enableIf",void 0),V([e_()],ir.prototype,"questionErrorLocation",void 0);class ia extends ir{constructor(){super(...arguments),this.forcusFirstQuestionOnExpand=!0}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"width"===e&&this.parent&&this.parent.elementWidthChanged(this),["indent","innerIndent","rightIndent"].indexOf(e)>-1&&this.resetIndents(),"colSpan"===e&&this.parent&&this.parent.updateColumns(),("showNumber"===e||"showQuestionNumbers"===e)&&this.notifySurveyOnVisibilityChanged()}getType(){return"panel"}get contentId(){return this.id+"_content"}getSurvey(e=!1){return e&&this.isPanel?this.parent?this.parent.getSurvey(e):null:super.getSurvey(e)}get isPanel(){return!0}getOwner(){return this.parent}get page(){return this.getPage(this.parent)}set page(e){this.setPage(this.parent,e)}removeFromParent(){this.parent&&this.removeSelfFromList(this.parent.elements)}moveTo(e,t=null){return this.moveToBase(this.parent,e,t)}getPanelInDesignMode(){return this}get visibleIndex(){return this.getPropertyValue("visibleIndex",-1)}addNoFromChild(e){let t=this.getRecursiveNo();return t?("."!==t[t.length-1]&&this.canAddDot(e)&&(t+="."),t+e):super.addNoFromChild(e)}getRecursiveNo(){return this.recursiveNoCallback?this.recursiveNoCallback():this.isQuestionIndexRecursive()?this.calcNo():""}canAddDot(e){return!!e&&RegExp("^[\\p{L}\\d]","u").test(e[0])}getPageVisibleIndex(){var e;return(null==(e=this.page)?void 0:e.visibleIndex)||-1}getQuestionStartIndex(){let e=this.questionStartIndex;return e&&this.isQuestionIndexOnPanel&&this.isComplexIndex(e)?this.getQuestionStartIndexVsVisibleIndex(e,this.visibleIndex):e||super.getQuestionStartIndex()}get no(){return this.getPropertyValue("no",void 0,()=>this.calcNo())}calcNo(){let e=this.hasTitle?w.getNumberByIndex(this.visibleIndex,this.get
10StartIndex()):"";return this.onGetNoCallback?this.onGetNoCallback(e):(this.parent&&(e=this.parent.addNoFromChild(e)),this.survey&&(e=this.titleSettings.getUpdatedPanelNo(this,e)),e||"")}notifyStateChanged(e){this.isLoadingFromJson||this.locTitle.strChanged(),super.notifyStateChanged(e)}createLocTitleProperty(){let e=super.createLocTitleProperty();return e.onGetTextCallback=e=>(e||"default"===this.state||(e=this.name),e),e}beforeSetVisibleIndex(e){if(this.isPage||!this.parent)return super.beforeSetVisibleIndex(e);let t=-1;return(this.showNumber||this.isQuestionIndexRecursive())&&(this.isDesignMode||!this.locTitle.isEmpty||this.hasParentInQuestionIndex())&&(t=e),this.setPropertyValue("visibleIndex",t),this.resetPropertyValue("no"),t<0?0:1}getPanelStartIndex(e){return"off"===this.showQuestionNumbers?-1:this.isQuestionIndexOnPanel?0:e}get isQuestionIndexOnPanel(){return"onpanel"===this.showQuestionNumbers||this.isQuestionIndexRecursive()}isQuestionIndexRecursive(){let e=this.showQuestionNumbers;return"default"!==e?"recursive"===e:super.isQuestionIndexRecursive()}hasParentInQuestionIndex(){if(!this.isQuestionIndexOnPanel)return!1;let e=this.questionStartIndex,t=e.indexOf(".");return t>-1&&t<e.length-1}isContinueNumbering(){return"off"!==this.showQuestionNumbers&&!this.isQuestionIndexOnPanel}notifySurveyOnVisibilityChanged(){null==this.survey||this.isLoadingFromJson||this.lifecycleCallbacks.panelVisibilityChanged(this,this.isVisible)}getRenderedTitle(e){if(this.isPanel&&!e){if(this.isCollapsed||this.isExpanded)return this.name;if(this.isDesignMode)return"["+this.name+"]"}return super.getRenderedTitle(e)}calcPaddingLeft(){return this.getIndentSize(this.indent)}calcPaddingRight(){return this.getIndentSize(this.rightIndent)}resetIndents(){this.resetPropertyValue("innerPaddingLeft"),super.resetIndents()}
10getIndentSize(e){if(this.survey){if(e<1)return"";var t=this.survey.css;return t&&t.question&&t.question.indent?e*t.question.indent+"px":""}}clearOnDeletingContainer(){this.elements.forEach(e=>{(e instanceof tz||e instanceof ia)&&e.clearOnDeletingContainer()})}get footerActions(){return this.getArrayPropertyValue("footerActions")}getFooterToolbar(){var e,t;if(!this.footerToolbarValue){var s=this.footerActions;this.hasEditButton&&s.push({id:"cancel-preview",locTitle:this.survey.locEditText,innerCss:this.survey.cssNavigationEdit,component:"sv-nav-btn",action:()=>{this.cancelPreview()}}),s=this.onGetFooterActionsCallback?this.onGetFooterActionsCallback():null==(e=this.survey)?void 0:e.getUpdatedPanelFooterActions(this,s),this.footerToolbarValue=this.createActionContainer(this.allowAdaptiveActions);let i=this.onGetFooterToolbarCssCallback?this.onGetFooterToolbarCssCallback():"";i||(i=null==(t=this.cssClasses.panel)?void 0:t.footer),i&&(this.footerToolbarValue.containerCss=i),this.footerToolbarValue.setItems(s),this.footerToolbarValue.flushUpdates()}return this.footerToolbarValue}get hasEditButton(){return!1}cancelPreview(){this.hasEditButton&&this.survey.cancelPreviewByPage(this)}get cssTitle(){return this.getCssPanelTitle()}getCssPanelTitle(){return this.getCssTitle(this.cssClasses.panel)}getCssTitleExpandableSvg(){return"default"===this.state?null:this.cssClasses.panel.titleExpandableSvg}get showErrorsAbovePanel(){return!this.showPanelAsPage}getCssError(e){if(this.isPage)return super.getCssError(e);let t=new eX().append(super.getCssError(e)).append(e.panel.errorsContainer);return t.append("panel-error-root",t.isEmpty()).toString()}onVisibleChanged(){super.onVisibleChanged(),this.notifySurveyOnVisibilityChanged()}needResponsiveWidth(){return!this.startWithNewLine||super.needResponsiveWidth()}focusIn(){this.survey&&this.survey.whenPanelFocusIn(this)}
10getHasFrameV2(){return super.getHasFrameV2()&&!this.showPanelAsPage}getIsNested(){return super.getIsNested()&&void 0!==this.parent}get showPanelAsPage(){return!1}expand(e=!0){this.forcusFirstQuestionOnExpand=e,super.expand()}onElementExpanded(e){if(this.forcusFirstQuestionOnExpand&&null!=this.survey&&!this.isLoadingFromJson){let t=this.getFirstQuestionToFocus(!1);t&&setTimeout(()=>{!this.isDisposed&&this.survey&&this.survey.scrollElementToTop({element:t,question:t,id:t.inputId,scrollIfVisible:!1,scrollIntoViewOptions:{behavior:"smooth"}})},15*!e)}}getCssRoot(e){return new eX().append(super.getCssRoot(e)).append(e.container).append(e.asPage,this.showPanelAsPage).append(e.invisible,!this.isDesignMode&&this.areInvisibleElementsShowing&&!this.visible).toString()}getContainerCss(){return this.getCssRoot(this.cssClasses.panel)}afterRenderCore(e){var t;super.afterRenderCore(e),this.isPanel&&(null==(t=this.survey)||t.afterRenderPanel(this,e))}}V([e_()],ia.prototype,"showNumber",void 0),V([e_()],ia.prototype,"showQuestionNumbers",void 0),V([e_()],ia.prototype,"innerIndent",void 0),V([e_()],ia.prototype,"startWithNewLine",void 0),V([e_()],ia.prototype,"allowAdaptiveActions",void 0),V([e_({calcFunc:e=>e.getIndentSize(e.innerIndent)})],ia.prototype,"innerPaddingLeft",void 0),H.addClass("panelbase",["name",{name:"elements",alternativeName:"questions",baseClassName:"question",visible:!1,isLightSerializable:!1},{name:"visible:switch",default:!0,overridingProperty:"visibleIf"},{name:"readOnly:boolean",overridingProperty:"enableIf"},"visibleIf:condition","enableIf:condition","requiredIf:condition",{name:"questionTitleWidth",visibleIf:function(e){return!!e&&e.availableQuestionTitleWidth()}},{name:"questionTitleLocation",default:"default",choices:["default","top","bottom","left","hidden"]},{name:"gridLayoutColumns:panellayoutcolumns",className:"panellayoutcolumn",isArray:!0,onSerializeValue:e=>e.getSerializableColumnsValue(),visibleIf:function(e){return!!e&&!!e.survey&&e.survey.gridLayoutEnabled}},{name:"title:text",serializationProperty:"locTitle"},{name:"description:text",serializationProperty:"locDescription"},{name:"questionOrder",alternativeName:"questionsOrder",default:"default",choices:["default","initial","random"]},{name:"questionErrorLocation",default:"default",choices:["default","top","bottom"]}],function(){return new ir}),H.addClass("panel",[{name:"state",default:"default",choices:["default","collapsed","expanded"]},{name:"isRequired:switch",overridingProperty:"requiredIf"},{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText"},{name:"startWithNewLine:boolean",default:!0},{name:"width"},{name:"minWidth",defaultFunc:()=>"auto"},{name:"maxWidth",defaultFunc:()=>p.maxWidth,onSettingValue:(e,t)=>t||void 0},{name:"colSpan:number",visible:!1,onSerializeValue:e=>e.getPropertyValue("colSpan")},{name:"effectiveColSpan:number",minValue:1,isSerializable:!1,visibleIf:function(e){return!!e.survey&&e.survey.gridLayoutEnabled}},{name:"innerIndent:number",default:0,choices:[0,1,2,3]},{name:"indent:number",default:0,choices:[0,1,2,3],visible:!1},{name:"page",isSerializable:!1,visibleIf:function(e){var t=e?e.survey:null;return!t||!t.pages||t.pages.length>1},choices:function(e){var t=e?e.survey:null;return t?t.pages.map(e=>({value:e.name,text:e.title})):[]}},{name:"showNumber:boolean"},{name:"showQuestionNumbers",default:"default",choices:["default","onpanel","recursive","off"]},{name:"questionStartIndex",visibleIf:e=>e.isPanel},{name:"allowAdaptiveActions:boolean",default:!0,visible:!1}],function(){return new ia},"panelbase"),sv.Instance.registerElement("panel",e=>new ia(e));class io extends ia{constructor(){super(...arguments),this.timeSpent=0,this._isReadyForClean=!0}getType(){return"page"}toString(){return this.name}get isPage(){return!this.isPanel}get isPanel(){return!!this.parent}getOwner(){return this.survey}get showPanelAsPage(){return!0}get hasEditButton(){return this.isPanel&&this.survey&&"preview"===this.survey.state&&!!this.parent&&!this.parent.isPanel}getElementsForRows(){var e;if(!this.isStartPage){let t=null==(e=this.singleInput)?void 0:e.currentSingleElement;if(t)return t.page===this?[t]:[]}return super.getElementsForRows()}disposeElements(){this.isPageContainer||super.disposeElements()}onRemoveElement(e){this.isPageContainer?(e.parent=null,this.unregisterElementPropertiesChanged(e)):super.onRemoveElement(e)}getTemplate(){return this.isPanel?"panel":super.getTemplate()}getPanelInDesignMode(){return null}get no(){if(!this.canShowPageNumber()||!this.survey)return"";let e=this.isStartPage?"":this.num+". ";
10return this.titleSettings.getUpdatedPageNo(this,e)}addNoFromChild(e){return e}get cssTitleNumber(){return this.isPanel?this.cssClasses.panel.number:this.cssClasses.page.number}getCssTitleExpandableSvg(){return null}get cssRequiredMark(){return""}canShowPageNumber(){return this.survey&&this.survey.showPageNumbers}canShowTitle(e){return!e||e.showPageTitles}setTitleValue(e){super.setTitleValue(e),this.navigationLocStrChanged()}getDefaultTitleTagName(){return p.titleTags.page}get navigationTitle(){return this.getLocStringText(this.locNavigationTitle)}set navigationTitle(e){this.setLocStringText(this.locNavigationTitle,e)}navigationLocStrChanged(){this.isLocStrEmpty("navigationTitle")&&this.locTitle.strChanged(),this.locStrChanged("navigationTitle"),this.locStrChanged("navigationDescription")}getMarkdownHtml(e,t,s){let i=super.getMarkdownHtml(e,t,s);return"navigationTitle"===t&&this.canShowPageNumber()&&i?this.num+". "+i:i}removeFromParent(){this.survey&&this.removeSelfFromList(this.survey.pages)}get visibleIndex(){return this.getPropertyValue("visibleIndex",-1)}set visibleIndex(e){this.setPropertyValue("visibleIndex",e)}canRenderFirstRows(){return!this.isDesignMode||0==this.visibleIndex}isQuestionIndexRecursive(){return super.isQuestionIndexRecursive()&&this.isComplexIndex(this.getStartIndex())}getPanelStartIndex(e){return this.isQuestionIndexRecursive()?0:e}getPageVisibleIndex(){return this.visibleIndex}getQuestionStartIndex(){let e=this.getStartIndex();return this.isQuestionIndexRecursive()?this.getQuestionStartIndexVsVisibleIndex(e,this.num-1):e}get isStartPage(){return this.survey&&this.survey.isPageStarted(this)}get isStarted(){return this.isStartPage}calcCssClasses(e){if(this.isPanel)return super.calcCssClasses(e);let t={page:{},error:{},pageTitle:"",pageDescription:"",row:"",rowMultiple:"",pageRow:"",rowCompact:"",rowEnter:"",rowLeave:"",rowDelayedEnter:"",rowReplace:""};return this.copyCssClasses(t.page,e.page),this.copyCssClasses(t.error,e.error),e.pageTitle&&(t.pageTitle=e.pageTitle),e.pageDescription&&(t.pageDescription=e.pageDescription),e.row&&(t.row=e.row),e.pageRow&&(t.pageRow=e.pageRow),e.rowMultiple&&(t.rowMultiple=e.rowMultiple),e.rowCompact&&(t.rowCompact=e.rowCompact),e.rowEnter&&(t.rowEnter=e.rowEnter),e.rowDelayedEnter&&(t.rowDelayedEnter=e.rowDelayedEnter),e.rowLeave&&(t.rowLeave=e.rowLeave),e.rowReplace&&(t.rowReplace=e.rowReplace),this.survey&&this.cssCallbacks.updatePageCssClasses(this,t),t}getCssPanelTitle(){return this.isPanel?super.getCssPanelTitle():this.cssClasses.page?new eX().append(this.cssClasses.page.title).toString():""}get cssRoot(){return!this.isPanel&&this.cssClasses.page&&this.survey?new eX().append(this.cssClasses.page.root).append(this.cssClasses.page.emptyHeaderRoot,!this.survey.renderedHasHeader&&!(this.survey.isShowProgressBarOnTop&&!this.survey.isStaring)).toString():""}getCssError(e){return this.isPanel?super.getCssError(e):new eX().append(super.getCssError(e)).append(e.page.errorsContainer).toString()}get navigationButtonsVisibility(){let e=this.showNavigationButtons;return null==e?"inherit":e?"show":"hide"}set navigationButtonsVisibility(e){this.showNavigationButtons=e}get showNavigationButtons(){return this.getPropertyValue("showNavigationButtons",void 0)}set showNavigationButtons(e){this.setShowNavigationButtonsProperty(e)}setShowNavigationButtonsProperty(e){"string"==typeof e&&(e=e.toLowerCase()),!0===e||!1===e?this.setPropertyValue("showNavigationButtons",e):"show"===e?this.setPropertyValue("showNavigationButtons",!0):"hide"===e?this.setPropertyValue("showNavigationButtons",!1):this.setPropertyValue("showNavigationButtons",void 0)}get isActive(){return!!this.survey&&this.survey.currentPage===this}get wasShown(){return this.wasRendered}get hasShown(){return this.wasRendered}setWasShown(e){e||this.resetWasRendered()}onFirstRenderingCore(){if(super.onFirstRenderingCore(),!this.isDesignMode){for(var e,t=this.elements,s=0;s<t.length;s++)t[s].isPanel&&t[s].randomizeElements(this.areQuestionsRandomized);if(this.randomizeElements(this.areQuestionsRandomized)){let t=null==(e=this.singleInput)?void 0:e.currentSingleElement;(null==t?void 0:t.page)===this&&(this.singleInput.currentSingleElement=this.getFirstVisibleElement())}}}scrollToTop(){this.survey&&this.survey.scrollElementToTop({element:this,question:null,page:this,id:this.id,scrollIfVisible:!1,scrollIntoViewOptions:{block:"start"}})}getAllPanels(e=!1,t=!1){var s=[];return this.addPanelsIntoList(s,e,t),s}getPanels(e=!1,t=!1){return this.getAllPanels(e,t)}get maxTimeToFinish(){return this.timeLimit}set maxTimeToFinish(e){this.timeLimit=e}
10getMaxTimeToFinish(){if(0!==this.timeLimit)return this.timeLimit;let e=this.survey?this.survey.timeLimitPerPage:0;return e>0?e:0}onNumChanged(e){}onVisibleChanged(){this.isRandomizing||(super.onVisibleChanged(),null!=this.survey&&this.lifecycleCallbacks.pageVisibilityChanged(this,this.isVisible))}ensureRowsVisibility(){super.ensureRowsVisibility(),this.getPanels().forEach(e=>e.ensureRowsVisibility())}get isReadyForClean(){return this._isReadyForClean}set isReadyForClean(e){let t=this._isReadyForClean;this._isReadyForClean=e,this._isReadyForClean!==t&&this.isReadyForCleanChangedCallback&&this.isReadyForCleanChangedCallback()}enableOnElementRerenderedEvent(){super.enableOnElementRerenderedEvent(),this.isReadyForClean=!1}disableOnElementRerenderedEvent(){super.disableOnElementRerenderedEvent(),this.isReadyForClean=!0}}V([e_({localizable:!0})],io.prototype,"navigationDescription",void 0),V([e_({defaultValue:!1})],io.prototype,"passed",void 0),V([e_({defaultValue:-1,onSet:(e,t)=>t.onNumChanged(e)})],io.prototype,"num",void 0),V([e_({defaultValue:0})],io.prototype,"timeLimit",void 0),H.addClass("page",[{name:"showNavigationButtons:boolean",defaultFunc:()=>void 0,onSetValue:function(e,t){e&&e.setShowNavigationButtonsProperty(t)},alternativeName:"navigationButtonsVisibility"},{name:"timeLimit:number",alternativeName:"maxTimeToFinish",default:0,minValue:0,visibleIf:e=>!!e.survey&&e.survey.showTimer},{name:"navigationTitle",serializationProperty:"locNavigationTitle"},{name:"navigationDescription",visibleIf:function(e){return!!e.survey&&"buttons"===e.survey.progressBarType},serializationProperty:"locNavigationDescription"},{name:"title:text",serializationProperty:"locTitle"},{name:"description:text",serializationProperty:"locDescription"},{name:"state",visible:!1},{name:"isRequired",visible:!1},{name:"startWithNewLine",visible:!1},{name:"width",visible:!1},{name:"minWidth",visible:!1},{name:"maxWidth",visible:!1},{name:"colSpan",visible:!1,isSerializable:!1},{name:"effectiveColSpan:number",visible:!1,isSerializable:!1},{name:"innerIndent",visible:!1},{name:"indent",visible:!1},{name:"page",visible:!1,isSerializable:!1},{name:"showNumber",visible:!1},{name:"showQuestionNumbers",visible:!1},{name:"allowAdaptiveActions",visible:!1},{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText",visible:!1}],function(){return new io},"panel");class il extends ew{constructor(e){super(),this.survey=e,this.onResize=this.addEvent(),e.onPagesVisibleChangedCallback=()=>{this.visiblePages=e.visiblePages},this.visiblePages=e.visiblePages}isListElementClickable(e){return!this.survey.onServerValidateQuestions||!!this.survey.onServerValidateQuestions.isEmpty||"onComplete"===this.survey.checkErrorsMode||e<=this.survey.currentPageNo+1}getRootCss(e="center"){let t=this.survey.css.progressButtonsContainerCenter;return this.survey.css.progressButtonsRoot&&(t+=" "+this.survey.css.progressButtonsRoot+" "+this.survey.css.progressButtonsRoot+"--"+(-1!==["footer","contentBottom"].indexOf(e)?"bottom":"top"),t+=" "+this.survey.css.progressButtonsRoot+"--"+(this.showItemTitles?"with-titles":"no-titles")),this.showItemNumbers&&this.survey.css.progressButtonsNumbered&&(t+=" "+this.survey.css.progressButtonsNumbered),this.isFitToSurveyWidth&&(t+=" "+this.survey.css.progressButtonsFitSurveyWidth),t}getListElementCss(e){if(!(e>=this.survey.visiblePages.length))return new eX().append(this.survey.css.progressButtonsListElementPassed,this.survey.visiblePages[e].passed).append(this.survey.css.progressButtonsListElementCurrent,this.survey.currentPageNo===e).append(this.survey.css.progressButtonsListElementNonClickable,!this.isListElementClickable(e)).toString()}getScrollButtonCss(e,t){return new eX().append(this.survey.css.progressButtonsImageButtonLeft,t).append(this.survey.css.progressButtonsImageButtonRight,!t).append(this.survey.css.progressButtonsImageButtonHidden,!e).toString()}clickListElement(e){e instanceof io||(e=this.survey.visiblePages[e]),this.survey.tryNavigateToPage(e)}isListContainerHasScroller(e){let t=e.querySelector("."+this.survey.css.progressButtonsListContainer);return!!t&&t.scrollWidth>t.offsetWidth}isCanShowItemTitles(e){let t=e.querySelector("ul");return!t||t.children.length<2||(t.clientWidth>t.parentElement.clientWidth?(this.minListWidth=Math.min(this.minListWidth||1/0,t.clientWidth),!1):!(t.parentElement.clientWidth<this.minListWidth))}get isFitToSurveyWidth(){return"default"===s2.currentType&&"survey"===this.survey.progressBarInheritWidthFrom&&"static"==this.survey.widthMode}get progressWidth(){return this.isFitToSurveyWidth?this.survey.renderedWidth:""}get showItemNumbers(){return"default"===s2.currentType&&this.survey.progressBarShowPageNumbers}get showItemTitles(){return"default"!==s2.currentType||this.survey.progressBarShowPageTitles}getItemNumber(e){let t="";return this.showItemNumbers&&(t+=this.survey.visiblePages.indexOf(e)+1),t}get headerText(){return this.survey.currentPage?this.survey.currentPage.renderedNavigationTitle:""}get footerText(){return this.progressText}get progressText(){return this.getPropertyValue("progressText",void 0,()=>this.survey.getProgressText())}get progressBarAriaLabel(){return E("progressbar",this.survey.getLocale())}resetProgressText(){this.resetPropertyValue("progressText")}processResponsiveness(e){this.onResize.fire(this,{width:e})}}V([eH()],il.prototype,"visiblePages",void 0);class iu{constructor(e,t,s){this.model=e,this.element=t,this.viewModel=s,this.criticalProperties=["progressBarType","progressBarShowPageTitles"],this.canShowItemTitles=!0,this.processResponsiveness=(e,t)=>{if(this.viewModel.onUpdateScroller(e.isListContainerHasScroller(this.element)),e.showItemTitles){if(e.survey.isMobile){this.canShowItemTitles=!1,this.viewModel.onResize(this.canShowItemTitles);return}this.canShowItemTitles=e.isCanShowItemTitles(this.element),this.viewModel.onResize(this.canShowItemTitles)}},this.model.survey.registerFunctionOnPropertiesValueChanged(this.criticalProperties,()=>this.forceUpdate(),"ProgressButtonsResponsivityManager"+this.viewModel.container),this.model.onResize.add(this.processResponsiveness),this.forceUpdate(),this.observer=new MutationObserver(()=>{let e=t.querySelectorAll("ul > li");this.pages!==e.length&&(this.pages=e.length,this.model.minListWidth=void 0,this.forceUpdate())}),this.observer.observe(t,{childList:!0,subtree:!0})}forceUpdate(){this.viewModel.onUpdateSettings(),this.processResponsiveness(this.model,{})}dispose(){this.model.onResize.remove(this.processResponsiveness),this.model.survey.unRegisterFunctionOnPropertiesValueChanged(this.criticalProperties,"ProgressButtonsResponsivityManager"+this.viewModel.container),this.observer.disconnect(),this.observer=void 0,this.element=void 0,this.model=void 0}}function ih(e,t){return(e.pages||[]).map(s=>new e2({id:s.name,locTitle:s.locNavigationTitle,action:()=>
10{if(n.activeElementBlur(),t&&t(),s.isPage)return e.tryNavigateToPage(s);if(s.isPanel)return!!e.isDesignMode||(s.focusFirstQuestion(),!0)},visible:new eb(()=>s.isVisible&&!s.isStartPage)}))}class id{constructor(e){this.survey=e,this.icon="icon-navmenu_24x24",this.togglePopup=()=>{this.popupModel.toggleVisibility()},this.listModel=function(e,t){var s=ih(e,t),i=new tm({items:s,searchEnabled:!1,locOwner:e,listRole:"menu",listItemRole:"menuitemradio",listAriaLabel:E("toc",e.getLocale())});i.allowSelection=!1;let n=(e,t)=>{i.selectedItem=!!e&&i.actions.filter(t=>t.id===e.name)[0]||t};n(e.currentPage,s[0]),e.onCurrentPageChanged.add((t,s)=>{n(e.currentPage)}),e.onFocusInQuestion.add((e,t)=>{n(function e(t){if(t.parentQuestion)return e(t.parentQuestion);let s=t.parent;for(;s&&"page"!==s.getType()&&s.parent;)s=s.parent;return s&&"page"===s.getType()?s:null}(t.question))});let r=()=>{i.setItems(ih(e,t))};return e.registerFunctionOnPropertyValueChanged("pages",r,"toc"),e.onEndLoadingFromJson.add(r),i}(e,()=>{this.popupModel.isVisible=!1}),this.popupModel=new tv("sv-list",{model:this.listModel}),this.popupModel.overlayDisplayMode="tablet-dropdown-overlay",this.popupModel.displayMode=new eb(()=>this.isMobile?"overlay":"popup"),id.StickyPosition&&(e.registerFunctionOnPropertyValueChanged("_isMobile",()=>this.updateStickyTOCSize(e.rootElement),"toc"),e.onAfterRenderSurvey.add((e,t)=>this.initStickyTOCSubscriptions(t.htmlElement)),this.initStickyTOCSubscriptions(e.rootElement))}initStickyTOCSubscriptions(e){id.StickyPosition&&e&&(e.addEventListener("scroll",t=>{this.updateStickyTOCSize(e)}),this.updateStickyTOCSize(e))}updateStickyTOCSize(e){if(!e)return;let t=e.querySelector("."+id.RootStyle);if(t&&(t.style.height="",!this.isMobile&&id.StickyPosition&&e)){let s=e.getBoundingClientRect().height,i=this.survey.findLayoutElement("advanced-header"),n=i&&i.data,r=!n||n.hasBackground,a="advanced"===this.survey.headerView?".sv-header":".sv_custom_header+div div."+(this.survey.css.title||"sd-title"),o=e.querySelector(a),l=o&&r?o.getBoundingClientRect().height:0,u=e.querySelector(".sv-scroll__scroller")||e,h=u.scrollTop>l?0:l-u.scrollTop;t.style.height=s-h-1+"px"}}get isMobile(){return this.survey.isMobile}get containerCss(){return function(e,t=!1){let s=id.RootStyle;return t?s+" "+id.RootStyle+"--mobile":(s+=" "+id.RootStyle+"--"+(e.tocLocation||"").toLowerCase(),id.StickyPosition&&(s+=" "+id.RootStyle+"--sticky"),s)}(this.survey,this.isMobile)}dispose(){this.survey.unRegisterFunctionOnPropertyValueChanged("_isMobile","toc");let[e]=this.survey.unRegisterFunctionOnPropertyValueChanged("pages","toc");this.survey.onEndLoadingFromJson.remove(e),this.survey.onPageAdded.remove(e),this.popupModel.dispose(),this.listModel.dispose()}}id.RootStyle="sv_progress-toc",id.StickyPosition=!0;class ic extends U{constructor(e,t,s){super(),this.survey=e,this.valuesHash=t,this.variablesHash=s}getObj(){return this.survey}getValue(e){let t=e.path;if(1===t.length){let e=t[0].name,s=this.getBuiltInVariableValue(e);if("locale"===e&&(s=this.survey.locale||I.defaultLocale),void 0!==s)return{value:s,isFound:!0}}if(e.isProperty&&t.length>1&&t[0].name.toLocaleLowerCase()===p.expressionVariables.survey)return new j(this.survey).getValue({path:t.slice(1),isRoot:!1,index:-1});let s=new W(this.variablesHash).getValue(e);return s&&s.isFound||(s=super.getValue(e))&&s.isFound?s:new W(this.valuesHash).getValue(e)}updateValueByItem(e,t){let s=p.expressionVariables.unwrapPostfix,i=e.endsWith(s);i&&(e=e.substring(0,e.length-s.length));let n=this.survey.getQuestionByValueName(e,!0);n&&(t.isFound=!0,t.obj=n,t.context=n.getValueGetterContext(i))}isSearchNameRevert(){return!0}getBuiltInVariableValue(e){let t=this.survey;if("pageno"===(e=e.toLocaleLowerCase())){var s=t.currentPage;return null!=s?t.visiblePages.indexOf(s)+1:0}return"pagecount"===e?t.visiblePageCount:"correctedanswers"===e||"correctanswers"===e||"correctedanswercount"===e?t.getCorrectedAnswerCount():"incorrectedanswers"===e||"incorrectanswers"===e||"incorrectedanswercount"===e?t.getInCorrectedAnswerCount():"questioncount"===e?t.getQuizQuestionCount():void 0}}class ip extends tA{get platformName(){return ip.platform}get commentSuffix(){return p.commentSuffix}set commentSuffix(e){p.commentSuffix=e}get commentPrefix(){return this.commentSuffix}set commentPrefix(e){this.commentSuffix=e}constructor(e=null,t=null){super(),this.valuesHash={},this.variablesHash={},this.onEndLoadingFromJson=this.addEvent(),this.onTriggerExecuted=this.addEvent(),this.onCompleting=this.addAsyncEvent(),this.onComplete=this.addEvent(),this.onShowingPreview=this.addEvent(),this.onNavigateToUrl=this.addEvent(),this.onStarted=this.addEvent(),this.onPartialSend=this.addEvent(),this.onCurrentPageChanging=this.addAsyncEvent(),this.onCurrentPageChanged=this.addEvent(),this.onValueChanging=this.addEvent(),this.onValueChanged=this.addEvent(),this.onVariableChanged=this.addEvent(),this.onQuestionVisibleChanged=this.addEvent(),this.onVisibleChanged=this.onQuestionVisibleChanged,this.onPageVisibleChanged=this.addEvent(),this.onPanelVisibleChanged=this.addEvent(),this.onQuestionCreated=this.addEvent(),this.onQuestionAdded=this.addEvent(),this.onQuestionRemoved=this.addEvent(),this.onPanelAdded=this.addEvent(),this.onPanelRemoved=this.addEvent(),this.onPageAdded=this.addEvent(),this.onCreateRegexValidator=this.addEvent(),this.onValidateQuestion=this.addEvent(),this.onSettingQuestionErrors=this.addEvent(),this.onServerValidateQuestions=this.addEvent(),this.onValidatePanel=this.addEvent(),this.onErrorCustomText=this.addEvent(),this.onValidatePage=this.addEvent(),this.onValidatedErrorsOnCurrentPage=this.onValidatePage,this.onProcessHtml=this.addEvent(()=>this.locStrsChanged()),this.onGetQuestionDisplayValue=this.addEvent(),this.onGetQuestionTitle=this.addEvent(()=>this.locStrsChanged()),this.onGetTitleTagName=this.addEvent(),this.onGetQuestionNumber=this.addEvent(()=>this.resetVisibleIndexes()),this.onGetQuestionNo=this.onGetQuestionNumber,this.onGetPanelNumber=this.addEvent(()=>this.resetVisibleIndexes()),this.onGetPageNumber=this.addEvent(),this.onGetProgressText=this.addEvent(()=>this.updateProgressText()),this.onProgressText=this.onGetProgressText,this.onTextMarkdown=this.addEvent(()=>this.locStrsChanged()),this.onTextRenderAs=this.addEvent(),this.onSendResult=this.addEvent(),this.onGetResult=this.addEvent(),this.onOpenFileChooser=this.addEvent(),this.onUploadFiles=this.addEvent(),this.onDownloadFile=this.addEvent(),this.onClearFiles=this.addEvent(),this.onChoicesLoaded=this.addEvent(),this.onLoadChoicesFromServer=this.onChoicesLoaded,this.onLoadedSurveyFromService=this.addEvent(),this.onProcessDynamicText=this.addEvent(),this.onProcessTextValue=this.onProcessDynamicText,this.onUpdateQuestionCssClasse
10s=this.addEvent(()=>this.currentPageUpdateElementCss()),this.onUpdatePanelCssClasses=this.addEvent(()=>this.currentPageUpdateElementCss()),this.onUpdatePageCssClasses=this.addEvent(()=>this.currentPageUpdateElementCss()),this.onUpdateChoiceItemCss=this.addEvent(),this.onAfterRenderSurvey=this.addEvent(),this.onAfterRenderHeader=this.addEvent(),this.onAfterRenderPage=this.addEvent(),this.onAfterRenderQuestion=this.addEvent(),this.onAfterRenderQuestionInput=this.addEvent(),this.onAfterRenderPanel=this.addEvent(),this.onFocusInQuestion=this.addEvent(),this.onFocusInPanel=this.addEvent(),this.onShowingChoiceItem=this.addEvent(()=>this.rebuildQuestionChoices()),this.onChoicesLazyLoad=this.addEvent(),this.onChoicesSearch=this.addEvent(),this.onGetChoiceDisplayValue=this.addEvent(),this.onMatrixRowAdded=this.addEvent(),this.onMatrixRowAdding=this.addEvent(),this.onMatrixBeforeRowAdded=this.onMatrixRowAdding,this.onMatrixRowRemoving=this.addEvent(),this.onMatrixRowRemoved=this.addEvent(),this.onMatrixRenderRemoveButton=this.addEvent(),this.onMatrixAllowRemoveRow=this.onMatrixRenderRemoveButton,this.onMatrixDetailPanelVisibleChanged=this.addEvent(),this.onMatrixCellCreating=this.addEvent(),this.onMatrixCellCreated=this.addEvent(),this.onAfterRenderMatrixCell=this.addEvent(),this.onMatrixAfterCellRender=this.onAfterRenderMatrixCell,this.onMatrixCellValueChanged=this.addEvent(),this.onMatrixCellValueChanging=this.addEvent(),this.onMatrixCellValidate=this.addEvent(),this.onMatrixColumnAdded=this.addEvent(),this.onMultipleTextItemAdded=this.addEvent(),this.onDynamicPanelAdded=this.addEvent(),this.onDynamicPanelRemoved=this.addEvent(),this.onDynamicPanelRemoving=this.addEvent(),this.onTimerTick=this.addEvent(),this.onTimer=this.onTimerTick,this.onTimerPanelInfoText=this.addEvent(),this.onDynamicPanelValueChanged=this.addEvent(),this.onDynamicPanelItemValueChanged=this.onDynamicPanelValueChanged,this.onDynamicPanelValueChanging=this.addEvent(),this.onGetDynamicPanelTabTitle=this.addEvent(),this.onDynamicPanelCurrentIndexChanged=this.addEvent(),this.onCheckAnswerCorrect=this.addEvent(),this.onIsAnswerCorrect=this.onCheckAnswerCorrect,this.onDragDropAllow=this.addEvent(),this.onMatrixRowDragOver=this.addEvent(),this.onExpressionRunning=this.addEvent(),this.onScrollToTop=this.addEvent(),this.onScrollingElementToTop=this.onScrollToTop,this.onLocaleChangedEvent=this.addEvent(),this.onGetQuestionTitleActions=this.addEvent(),this.onGetPanelTitleActions=this.addEvent(),this.onGetPageTitleActions=this.addEvent(),this.onGetPanelFooterActions=this.addEvent(),this.onGetMatrixRowActions=this.addEvent(),this.onElementContentVisibilityChanged=this.addEvent(),this.onUIStateChanged=this.addEvent(),this.onGetExpressionDisplayValue=this.addEvent(),this.onCheckSingleInputPerPageMode=this.addEvent(),this.onGetLoopQuestions=this.addEvent(),this.onPopupVisibleChanged=this.addEvent(),this.onOpenDropdownMenu=this.addEvent(),this.onElementWrapperComponentName=this.addEvent(),this.onElementWrapperComponentData=this.addEvent(),this.onCreateCustomChoiceItem=this.addEvent(),this.jsonErrors=null,this.cssValue=null,this.showHeaderOnCompletePage="auto",this._isLazyRenderingSuspended=!1,this.hideRequiredErrors=!1,this.cssVariables={},this._isMobile=!1,this._isCompact=!1,this.setValueOnExpressionCounter=0,this._isDesignMode=!1,this.validationAllowSwitchPages=!1,this.validationAllowComplete=!1,this.isNavigationButtonPressed=!1,this.mouseDownPage=null,this.isSmoothScrollEnabled=!1,this.onResize=new P,this.isCurrentPageRendering=!0,this.isCurrentPageRendered=void 0,this.skeletonHeight=void 0,this.isTriggerIsRunning=!1,this.triggerKeys=null,this.isValueChangedOnRunningCondition=!1,this.conditionRunnerCounter=0,this.conditionUpdateVisibleIndexes=!1,this.conditionNotifyElementsOnAnyValueOrVariableChanged=!1,this.isEndLoadingFromJson=null,this.nofifyQuesitonHash={},this.questionHashes={names:{},namesInsensitive:{},valueNames:{},valueNamesInsensitive:{}},this.setValueFromTriggerCounter=0,this.isMovingPage=!1,this.needRenderIcons=!0,this.skippedPages=[],this.skeletonComponentName="sv-skeleton",this.taskManager=new it,this.questionErrorComponent="sv-question-error",this.createNewArray("pages",e=>{e.isReadyForCleanChangedCallback&&e.isReadyForCleanChangedCallback(),this.doOnPageAdded(e)},e=>{e.isReadyForClean?this.doOnPageRemoved(e):e.isReadyForCleanChangedCallback=()=>{this.doOnPageRemoved(e),e.isReadyForCleanChangedCallback=void 0}}),this.locTitle.onStringChanged.add(()=>
10this.resetPropertyValue("titleIsEmpty")),e&&(("string"==typeof e||e instanceof String)&&(e=JSON.parse(e)),e&&e.clientId&&(this.clientId=e.clientId),this.fromJSON(e),this.surveyId&&this.loadSurveyFromService(this.surveyId,this.clientId)),t&&this.render(t),this.updateCss(),this.setCalculatedWidthModeUpdater()}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"questionsOnPageMode"===e&&this.onQuestionsOnPageModeChanged(t),"locale"===e&&this.onSurveyLocaleChanged(),"randomSeed"===e&&this.randomSeedChanged(),"firstPageIsStartPage"===e&&this.onFirstPageIsStartedChanged(),"readOnly"===e&&this.onReadOnlyChanged(),"progressBarType"===e&&this.updateProgressText(),["questionStartIndex","requiredMark","questionTitlePattern"].indexOf(e)>-1&&this.resetVisibleIndexes(),["isLoading","isCompleted","isCompletedBefore","readOnly","isStartedState","currentPage","isShowingPreview"].indexOf(e)>-1&&this.updateState(),["state","currentPage","showPreviewBeforeComplete"].indexOf(e)>-1&&this.onStateAndCurrentPageChanged(),("logo"===e||"logoPosition"===e)&&this.resetHasLogo(),"backgroundImage"===e&&this.resetPropertyValue("renderBackgroundImage"),["backgroundImage","backgroundOpacity","backgroundImageFit","fitToContainer","backgroundImageAttachment"].indexOf(e)>-1&&this.resetPropertyValue("backgroundImageStyle"),("showPrevButton"===e||"showCompleteButton"===e)&&this.updateButtonsVisibility()}currentPageUpdateElementCss(){this.currentPage&&this.currentPage.updateElementCss()}get tocModel(){return this.tocModelValue||(this.tocModelValue=new id(this)),this.tocModelValue}processClosedPopup(e,t){throw Error("Method not implemented.")}createTryAgainAction(){return{id:"save-again",title:this.getLocalizationString("saveAgainButton"),action:()=>{this.isCompleted?this.saveDataOnComplete():this.doComplete()}}}getOrCreateHtmlLocString(e,t,s){return this.getOrCreateLocStr(e,!1,t,e=>{s&&(e.onGetTextCallback=e=>this.processHtml(e,s))})}getType(){return"survey"}get pages(){return this.getPropertyValue("pages")}render(e=null){this.renderCallback&&this.renderCallback()}updateSurvey(e,t){for(var s in e)if("model"!=s&&"children"!=s)if(0==s.indexOf("on")&&this[s]&&this[s].add){let t=e[s],i=function(e,s){t(e,s)};this[s].add(i)}else this[s]=e[s];e&&e.data&&this.onValueChanged.add((t,s)=>{e.data[s.name]=s.value})}getCss(){return this.css}updateCompletedPageCss(){this.containerCss=this.css.container,this.completedCss=new eX().append(this.css.body).append(this.css.completedPage).toString(),this.completedBeforeCss=new eX().append(this.css.body).append(this.css.completedBeforePage).toString(),this.loadingBodyCss=new eX().append(this.css.body).append(this.css.bodyLoading).toString()}updateCss(){this.rootCss=this.getRootCss(),this.updateNavigationCss(),this.updateCompletedPageCss(),this.updateWrapperFormCss()}get css(){return this.cssValue||(this.cssValue={},this.copyCssClasses(this.cssValue,s2.getCss())),this.cssValue}set css(e){this.setCss(e)}setCss(e,t=!0){t?this.mergeValues(e,this.css):this.cssValue=e,this.updateElementCss(!1)}
10get cssTitle(){return this.css.title}get bodyCss(){return new eX().append(this.css.body).append(this.css.bodyWithTimer,this.showTimer&&"running"===this.state).append(this.css.body+"--"+this.calculatedWidthMode).toString()}get bodyContainerCss(){return this.css.bodyContainer}get cssNavigationComplete(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.complete)}get cssNavigationPreview(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.preview)}get cssNavigationEdit(){return this.getNavigationCss(this.css.navigationButton,this.css.navigation.edit)}get cssNavigationPrev(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.prev)}get cssNavigationStart(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.start)}get cssNavigationNext(){return this.getNavigationCss(this.cssSurveyNavigationButton,this.css.navigation.next)}get cssSurveyNavigationButton(){return new eX().append(this.css.navigationButton).append(this.css.bodyNavigationButton).toString()}insertAdvancedHeader(e){e.survey=this,this.layoutElements.push({id:"advanced-header",container:"header",component:"sv-header",index:-100,data:e,processResponsiveness:t=>e.processResponsiveness()})}get lazyRenderEnabled(){return!0===this.lazyRenderEnabledValue}set lazyRenderEnabled(e){if(this.lazyRenderEnabled===e)return;this.lazyRenderEnabledValue=e;let t=this.currentPage;t&&t.updateRows()}get lazyRendering(){return this.lazyRenderEnabled}set lazyRendering(e){this.lazyRenderEnabled=e}get isLazyRendering(){return this.lazyRenderEnabled||p.lazyRender.enabled}get lazyRenderFirstBatchSize(){return this.lazyRenderFirstBatchSizeValue||p.lazyRender.firstBatchSize}set lazyRenderFirstBatchSize(e){this.lazyRenderFirstBatchSizeValue=e}get isLazyRenderingSuspended(){return this._isLazyRenderingSuspended}suspendLazyRendering(){this.isLazyRendering&&(this._isLazyRenderingSuspended=!0)}releaseLazyRendering(){this.isLazyRendering&&(this._isLazyRenderingSuspended=!1)}updateLazyRenderingRowsOnRemovingElements(){if(this.isLazyRendering){var e,t,s=this.currentPage;s&&e6(null==(t=this.rootElement||(null==(e=this.creator)?void 0:e.rootElement))?void 0:t.querySelector(`#${s.id}`))}}get triggers(){return this.getArrayPropertyValue("triggers",e=>{e.setOwner(this)})}set triggers(e){this.setArrayPropertyValue("triggers",e)}get calculatedValues(){return this.getArrayPropertyValue("calculatedValues",e=>{e.setOwner(this)})}set calculatedValues(e){this.setArrayPropertyValue("calculatedValues",e)}get focusFirstQuestionAutomatic(){return this.autoFocusFirstQuestion}set focusFirstQuestionAutomatic(e){this.autoFocusFirstQuestion=e}get focusOnFirstError(){return this.autoFocusFirstError}set focusOnFirstError(e){this.autoFocusFirstError=e}get showNavigationButtons(){return this.getPropertyValue("showNavigationButtons")}set showNavigationButtons(e){"both"===e&&(e="topBottom");let t=["top","bottom","topBottom"].indexOf(e)>-1,s=!0===e||t;this.setPropertyValue("showNavigationButtons",s),t&&(this.navigationButtonsLocation=e)}get showCompletedPage(){return this.showCompletePage}set showCompletedPage(e){this.showCompletePage=e}get navigateToUrlOnCondition(){return this.getArrayPropertyValue("navigateToUrlOnCondition",e=>{e.locOwner=this})}set navigateToUrlOnCondition(e){this.setArrayPropertyValue("navigateToUrlOnCondition",e)}
10getNavigateToUrl(){var e=this.getExpressionItemOnRunCondition(this.navigateToUrlOnCondition),t=e?e.url:this.navigateToUrl;return t&&(t=this.processText(t,!1)),t}navigateTo(){var e={url:this.getNavigateToUrl(),allow:!0};if(this.onNavigateToUrl.fire(this,e),e.url&&e.allow){var t=e.url;let s=i.getLocation();t&&s&&(s.href=t&&t.toLocaleLowerCase().indexOf("javascript:")>-1?encodeURIComponent(t):t)}}get requiredText(){return this.requiredMark}set requiredText(e){this.requiredMark=e}beforeSettingQuestionErrors(e,t){this.makeRequiredErrorsInvisible(t),this.onSettingQuestionErrors.fire(this,{question:e,errors:t})}makeRequiredErrorsInvisible(e){if(this.hideRequiredErrors)for(var t=0;t<e.length;t++){var s=e[t].getErrorType();("required"==s||"requireoneanswer"==s)&&(e[t].visible=!1)}}getQuestionStartIndex(e){if(e>=0&&e<this.visiblePages.length)for(let t=e;t>=0;t--){let e=this.visiblePages[t];if(e.questionStartIndex)return e.questionStartIndex}return this.questionStartIndex}get maxOthersLength(){return this.maxCommentLength}set maxOthersLength(e){this.maxCommentLength=e}get goNextPageAutomatic(){return this.autoAdvanceEnabled}set goNextPageAutomatic(e){this.autoAdvanceEnabled=e}get allowCompleteSurveyAutomatic(){return this.autoAdvanceAllowComplete}set allowCompleteSurveyAutomatic(e){this.autoAdvanceAllowComplete=e}getValidateVisitedEmptyFields(){return this.validateVisitedEmptyFields&&this.isValidateOnValueChange}clearIncorrectValues(e=!1){for(var t=0;t<this.pages.length;t++)this.pages[t].clearIncorrectValues();if(e){var s=this.data,i=!1;for(var n in s)if(!(this.getQuestionByValueName(n)||this.iscorrectValueWithPostPrefix(n,p.commentSuffix)||this.iscorrectValueWithPostPrefix(n,p.matrix.totalsSuffix))){var r=this.getCalculatedValueByName(n);r&&r.includeIntoResult||(i=!0,delete s[n])}i&&(this.data=s)}}iscorrectValueWithPostPrefix(e,t){return e.indexOf(t)===e.length-t.length&&!!this.getQuestionByValueName(e.substring(0,e.indexOf(t)))}get locale(){return this.getPropertyValueWithoutDefault("locale")||I.currentLocale}set locale(e){e!==I.defaultLocale||I.currentLocale||(e=""),this.setPropertyValue("locale",e)}onSurveyLocaleChanged(){this.notifyElementsOnAnyValueOrVariableChanged("locale"),this.localeChanged(),this.onLocaleChangedEvent.fire(this,this.locale)}get localeDir(){return I.localeDirections[this.locale]}getUsedLocales(){var e=[];this.addUsedLocales(e);var t=e.indexOf("default");if(t>-1){var s=I.defaultLocale,i=e.indexOf(s);i>-1&&e.splice(i,1),t=e.indexOf("default"),e[t]=s}return e}localeChanged(){for(var e=0;e<this.pages.length;e++)this.pages[e].localeChanged()}getLocale(){return this.locale}locStrsChanged(){var e;if(!this.isClearingUnsedValues&&(super.locStrsChanged(),this.currentPage)){if(this.isDesignMode)this.pages.forEach(e=>e.locStrsChanged());else{var t=this.activePage;t&&t.locStrsChanged();let e=this.visiblePages;for(var s=0;s<e.length;s++)e[s].navigationLocStrChanged()}this.isStartPageActive||this.updateProgressText(),null==(e=this.navigationBarValue)||e.locStrsChanged()}}getAllChildren(){let e=super.getAllChildren();return e.push(...this.pages),e.push(...this.calculatedValues),e.push(...this.triggers),e.push(...this.completedHtmlOnCondition),e.push(...this.navigateToUrlOnCondition),e}
10getMarkdownHtml(e,t,s){return this.getSurveyMarkdownHtml(this,e,t,s)}getRenderer(e){return this.getRendererForString(this,e)}getRendererContext(e){return this.getRendererContextForString(this,e)}getRendererForString(e,t,s){let i=this.getBuiltInRendererForString(e,t,s);i=this.elementWrapperComponentNameCore(i,e,"string",t);let n={element:e,name:t,renderAs:i};return this.onTextRenderAs.fire(this,n),n.renderAs}getRendererContextForString(e,t,s){return this.elementWrapperDataCore(t,e,"string")}getExpressionDisplayValue(e,t,s){let i={question:e,value:t,displayValue:s};return this.onGetExpressionDisplayValue.fire(this,i),i.displayValue}getBuiltInRendererForString(e,t,s){if(this.isDesignMode)return R.editableRenderer}getProcessedText(e,t){return this.processText(e,!0,t)}getLocString(e){return this.getLocalizationString(e)}getErrorCustomText(e,t){return this.getSurveyErrorCustomText(this,e,t)}createRegexValidator(e,t,s,i){let n={question:e,validator:t,pattern:s,flags:i};return this.onCreateRegexValidator.fire(this,n),new RegExp(n.pattern,n.flags)}getSurveyErrorCustomText(e,t,s){let i={text:t,name:s.getErrorType(),obj:e,error:s};return this.onErrorCustomText.fire(this,i),i.text}getQuestionDisplayValue(e,t){let s={question:e,displayValue:t};return this.onGetQuestionDisplayValue.fire(this,s),s.displayValue}get renderedLogoWidth(){return this.logoWidth?v(this.logoWidth):void 0}get renderedStyleLogoWidth(){return this.logoWidth?C(this.logoWidth):void 0}get renderedLogoHeight(){return this.logoHeight?v(this.logoHeight):void 0}get renderedStyleLogoHeight(){return this.logoHeight?C(this.logoHeight):void 0}get hasLogo(){return this.getPropertyValue("hasLogo",void 0,()=>!!this.logo&&"none"!==this.logoPosition)}resetHasLogo(){this.resetPropertyValue("hasLogo")}get isLogoBefore(){return!this.isDesignMode&&this.renderedHasLogo&&("left"===this.logoPosition||"top"===this.logoPosition)}get isLogoAfter(){return this.isDesignMode?this.renderedHasLogo:this.renderedHasLogo&&("right"===this.logoPosition||"bottom"===this.logoPosition)}get logoClassNames(){return new eX().append(this.css.logo).append({left:"sv-logo--left",right:"sv-logo--right",top:"sv-logo--top",bottom:"sv-logo--bottom"}[this.logoPosition]).toString()}get titleIsEmpty(){return this.getPropertyValue("titleIsEmpty",void 0,()=>this.locTitle.isEmpty)}get renderedHasTitle(){return this.isDesignMode?this.isPropertyVisible("title"):!this.titleIsEmpty&&this.showTitle}get renderedHasDescription(){return this.isDesignMode?this.isPropertyVisible("description"):!!this.hasDescription&&this.showTitle}get hasTitle(){return this.renderedHasTitle}get renderedHasLogo(){return this.isDesignMode?this.isPropertyVisible("logo"):this.hasLogo}get renderedHasHeader(){return this.renderedHasTitle||this.renderedHasLogo}get themeVariables(){return Object.assign({},this.cssVariables)}setIsMobile(e=!0){this._isMobile!==e&&(this._isMobile=e,this.updateCss(),this.getAllQuestions().forEach(t=>t.setIsMobile(e)))}get isMobile(){return this._isMobile&&!this.isDesignMode}set isCompact(e){e!==this._isCompact&&(this._isCompact=e,this.updateElementCss(),this.triggerResponsiveness(!0))}get isCompact(){return this._isCompact}isLogoImageChoosen(){return this.locLogo.renderedHtml}get titleMaxWidth(){return""}get renderBackgroundImage(){return this.getPropertyValue("renderBackgroundImage",void 0,()=>ts(this.backgroundImage))}get backgroundImageStyle(){return this.getPropertyValue("backgroundImageStyle",void 0,()=>this.calcBackgroundImageStyle())}calcBackgroundImageStyle(){return{opacity:this.backgroundOpacity,backgroundImage:this.renderBackgroundImage,backgroundSize:this.backgroundImageFit,backgroundAttachment:this.fitToContainer?void 0:this.backgroundImageAttachment}}updateWrapperFormCss(){this.wrapperFormCss=new eX().append(this.css.rootWrapper).append(this.css.rootWrapperHasImage,!!this.backgroundImage).append(this.css.rootWrapperFixed,!this.formScrollDisabled).toString()}get completedHtml(){return this.getLocStringText(this.locCompletedHtml)}set completedHtml(e){this.setLocStringText(this.locCompletedHtml,e)}get locCompletedHtml(){return this.getOrCreateHtmlLocString("completedHtml","completingSurvey")}get completedHtmlOnCondition(){return this.getArrayPropertyValue("completedHtmlOnCondition",e=>{e.locOwner=this})}set completedHtmlOnCondition(e){this.setArrayPropertyValue("completedHtmlOnCondition",e)}runExpression(e,t){let s;if(!e)return null;var i=this.getFilteredProperties();let n=this.createExpressionRunner(e);return n.onRunComplete=e=>{s=e,t&&t(e)},n.runContext(this.getValueGetterContext(),i)||s}
10beforeExpressionRunning(e,t,s){let i={element:e,propertyName:t,expression:s,allow:!0};return this.onExpressionRunning.fire(this,i),i.allow?i.expression:""}get isSettingValueOnExpression(){return this.setValueOnExpressionCounter>0}startSetValueOnExpression(){this.setValueOnExpressionCounter++}finishSetValueOnExpression(){this.setValueOnExpressionCounter--}runCondition(e){if(!e)return!1;let t=this.getFilteredProperties();return new X(e).runContext(this.getValueGetterContext(),t)}runTriggers(){this.checkTriggers(this.getFilteredValues(),!1)}get renderedCompletedHtml(){var e=this.getExpressionItemOnRunCondition(this.completedHtmlOnCondition);return e?e.html:this.completedHtml}getExpressionItemOnRunCondition(e){if(0==e.length)return null;for(var t=this.getFilteredProperties(),s=0;s<e.length;s++)if(e[s].runCondition(t))return e[s];return null}get completedBeforeHtml(){return this.getLocStringText(this.locCompletedBeforeHtml)}set completedBeforeHtml(e){this.setLocStringText(this.locCompletedBeforeHtml,e)}get locCompletedBeforeHtml(){return this.getOrCreateHtmlLocString("completedBeforeHtml","completingSurveyBefore","completed-before")}get loadingHtml(){return this.getLocStringText(this.locLoadingHtml)}set loadingHtml(e){this.setLocStringText(this.locLoadingHtml,e)}get locLoadingHtml(){return this.getOrCreateHtmlLocString("loadingHtml","loadingSurvey","loading")}getNavigationCss(e,t){return new eX().append(e).append(t).toString()}get navigationBar(){return this.navigationBarValue||(this.navigationBarValue=this.createNavigationBar(),this.navigationBarValue.locOwner=this,this.updateNavigationCss(),this.navigationBarValue.flushUpdates()),this.navigationBarValue}createNavigationBar(){if(this.createNavigationBarCallback)return this.createNavigationBarCallback();let e=new to;return e.setItems(this.createNavigationActions()),e}addNavigationItem(e){e.component||(e.component="sv-nav-btn"),e.innerCss||(e.innerCss=this.cssSurveyNavigationButton);let t=e.action;return e.action=()=>{this.waitAndExecute(()=>t())},this.navigationBar.addAction(e)}removeNavigationItem(e){var t;null==(t=this.navigationBarValue)||t.removeActionById(e)}createNavigationActions(){let e="sv-nav-btn",t=new e2({id:"sv-nav-start",visible:new eb(()=>this.isStartPageActive),visibleIndex:10,locTitle:this.locStartSurveyText,action:()=>this.start(),component:e}),s=new e2({id:"sv-nav-prev",visible:new eb(()=>this.isShowPrevButton),enabled:new eb(()=>!this.isNavigationBlocked),visibleIndex:20,data:{mouseDown:()=>this.navigationMouseDown()},locTitle:this.locPagePrevText,action:()=>this.performPrevious(),component:e}),i=new e2({id:"sv-nav-next",visible:new eb(()=>this.isShowNextButton),enabled:new eb(()=>!this.isNavigationBlocked),visibleIndex:30,data:{mouseDown:()=>this.nextPageMouseDown()},locTitle:this.locPageNextText,action:()=>this.nextPageUIClick(),component:e}),n=new e2({id:"sv-nav-preview",visible:new eb(()=>this.isPreviewButtonVisible),enabled:new eb(()=>!this.isNavigationBlocked),visibleIndex:40,data:{mouseDown:()=>this.navigationMouseDown()},locTitle:this.locPreviewText,action:()=>this.showPreview(),component:e}),r=new e2({id:"sv-nav-complete",visible:new eb(()=>this.isCompleteButtonVisible),enabled:new eb(()=>!this.isNavigationBlocked),visibleIndex:50,data:{mouseDown:()=>this.navigationMouseDown()},locTitle:this.locCompleteText,action:()=>this.taskManager.waitAndExecute(()=>this.tryComplete()),component:e});return this._updateNavigationItemCssCallback=()=>{t.innerCss=this.cssNavigationStart,s.innerCss=this.cssNavigationPrev,i.innerCss=this.cssNavigationNext,n.innerCss=this.cssNavigationPreview,r.innerCss=this.cssNavigationComplete},[t,s,i,n,r]}updateNavigationCss(){let e=this.navigationBarValue;e&&(e.cssClasses=this.css.actionBar,e.containerCss=this.css.footer,this._updateNavigationItemCssCallback&&this._updateNavigationItemCssCallback())}getElementTitleTagName(e,t){if(this.onGetTitleTagName.isEmpty)return t;let s={element:e,tagName:t};return this.onGetTitleTagName.fire(this,s),s.tagName}getQuestionTitlePatternOptions(){let e=[],t=this.getLocalizationString("questionTitlePatternText"),s=this.questionStartIndex?this.questionStartIndex:"1.";return e.push({value:"numTitleRequire",text:s+" "+t+" "+this.requiredMark}),e.push({value:"numRequireTitle",text:s+" "+this.requiredMark+" "+t}),e.push({value:"numTitle",text:s+" "+t}),e}get questionTitleTemplate(){return this.getLocStringText(this.locQuestionTitleTemplate)}set questionTitleTemplate(e){this.setLocStringText(this.locQuestionTitleTemplate,e),this.questionTitlePattern=this.getNewTitlePattern(e),this.questionStartIndex=this.getNewQuestionTitleElement(e,"no",this.questionStartIndex,"1"),this.requiredMark=this.getNewQuestionTitleElement(e,"require",this.requiredMark,"*")}getNewTitlePattern(e){if(e){for(var t=[];e.indexOf("{")>-1;){var s=(e=e.substring(e.indexOf("{")+1)).indexOf("}");if(s<0)break;t.push(e.substring(0,s)),e=e.substring(s+1)}if(t.length>1){if("require"==t[0])return"requireNumTitle";if("require"==t[1]&&3==t.length)return"numRequireTitle";if(0>t.indexOf("require"))return"numTitle"}if(1==t.length&&"title"==t[0])return"numTitle"}return"numTitleRequire"}getNewQuestionTitleElement(e,t,s,i){if(t="{"+t+"}",!e||0>e.indexOf(t))return s;for(var n=e.indexOf(t),r="",a="",o=n-1;o>=0&&"}"!=e[o];o--);for(o<n-1&&(r=e.substring(o+1,n)),n+=t.length,o=n;o<e.length&&"{"!=e[o];o++);for(o>n&&(a=e.substring(n,o)),o=0;o<r.length&&33>r.charCodeAt(o);)o++;for(r=r.substring(o),o=a.length-1;o>=0&&33>
10a.charCodeAt(o);)o--;return(a=a.substring(0,o+1),r||a)?r+(s||i)+a:s}get locQuestionTitleTemplate(){return this.getOrCreateLocStr("questionTitleTemplate",!0)}getUpdatedQuestionTitle(e,t){if(this.onGetQuestionTitle.isEmpty)return t;let s={question:e,title:t};return this.onGetQuestionTitle.fire(this,s),s.title}getUpdatedQuestionNo(e,t){if(this.onGetQuestionNumber.isEmpty)return t;let s={question:e,number:t,no:t};return this.onGetQuestionNumber.fire(this,s),s.no===t?s.number:s.no}getUpdatedPanelNo(e,t){if(this.onGetPanelNumber.isEmpty)return t;let s={panel:e,number:t};return this.onGetPanelNumber.fire(this,s),s.number}getUpdatedPageNo(e,t){if(this.onGetPageNumber.isEmpty)return t;let s={page:e,number:t};return this.onGetPageNumber.fire(this,s),s.number}get showQuestionNumbers(){return this.getPropertyValue("showQuestionNumbers")}set showQuestionNumbers(e){!0===e&&(e="on"),!1===e&&(e="off"),(e="onpage"===(e=e.toLowerCase())?"onPage":e)!==this.showQuestionNumbers&&(this.setPropertyValue("showQuestionNumbers",e),this.updateVisibleIndexes())}get progressBar(){return this.progressBarValue||(this.progressBarValue=new il(this)),this.progressBarValue}get showProgressBar(){return this.getPropertyValue("showProgressBar")}set showProgressBar(e){this.setShowProgressBar(e)}setShowProgressBar(e){"off"===e&&(e=!1),!0===e||!1===e?this.setPropertyValue("showProgressBar",e):(this.setPropertyValue("showProgressBar",!0),this.progressBarLocation=e)}get progressBarComponentName(){let e=this.progressBarType;return!p.legacyProgressBarView&&"default"===s2.currentType&&ig(e,"pages")&&(e="buttons"),"progress-"+e}get isShowProgressBarOnTop(){return!!this.canShowProgressBar()&&!!this.showProgressBar&&-1!==["auto","aboveheader","belowheader","topbottom","top","both"].indexOf(this.progressBarLocation)}get isShowProgressBarOnBottom(){return!!this.canShowProgressBar()&&!!this.showProgressBar&&("bottom"===this.progressBarLocation||"both"===this.progressBarLocation||"topbottom"===this.progressBarLocation)}getProgressTypeComponent(){return"sv-progress-"+this.progressBarType.toLowerCase()}getProgressCssClasses(e=""){return new eX().append(this.css.progress).append(this.css.progressTop,this.isShowProgressBarOnTop&&(!e||"header"==e)).append(this.css.progressBottom,this.isShowProgressBarOnBottom&&(!e||"footer"==e)).toString()}canShowProgressBar(){return!this.isShowingPreview||!this.showPreviewBeforeComplete||"allQuestions"!=this.previewMode}get processedTitle(){return this.locTitle.renderedHtml}get questionTitleLocation(){return this.getPropertyValue("questionTitleLocation")}set questionTitleLocation(e){this.setPropertyValue("questionTitleLocation",e.toLowerCase()),this.isLoadingFromJson||this.updateElementCss(!0)}updateElementCss(e){this.startPage&&this.startPage.updateElementCss(e);for(var t=this.visiblePages,s=0;s<t.length;s++)t[s].updateElementCss(e);this.updateCss()}get mode(){return this.readOnly?"display":"edit"}set mode(e){(e=e.toLowerCase())==this.mode||("edit"==e||"display"==e)&&(this.readOnly="display"==e)}onReadOnlyChanged(){for(var e=0;e<this.pages.length;e++){var t=this.pages[e];t.setPropertyValue("isReadOnly",t.isReadOnly)}this.updateButtonsVisibility(),this.updateCss()}get data(){for(var e={},t=this.getValuesKeys(),s=0;s<t.length;s++){var i=t[s],n=this.getDataValueCore(this.valuesHash,i);void 0!==n&&(e[i]=n)}return this.setCalculatedValuesIntoResult(e),e}set data(e){this.valuesHash={},this.setDataCore(e,!e)}mergeData(e){if(!e)return;let t=this.data;this.mergeValues(e,t),this.setDataCore(t)}get uiState(){let e={};this.lastActiveQuestion&&(e.activeElementName=this.lastActiveQuestion.rootParentQuestion.name);let t=this.getPropertyValueWithoutDefault("randomSeed");t&&(e.randomSeed=t);let s=(t,s)=>{s.forEach(s=>{let i=s.uiState;i&&(e[t]=e[t]||{},e[t][s.name]=i)})};return s("pages",this.pages),s("panels",this.getAllPanels()),s("questions",this.getAllQuestions()),e}set uiState(e){var t;if("object"!=typeof e||!e)return;let s=(e,t)=>{for(let s in e||{}){let i=t(s);i&&(i.uiState=e[s])}};s(e.pages,this.getPageByName.bind(this)),s(e.panels,this.getPanelByName.bind(this)),s(e.questions,this.getQuestionByName.bind(this)),e.activeElementName&&(null==(t=this.getQuestionByName(e.activeElementName))||t.focu
10s()),e.randomSeed&&(this.randomSeed=e.randomSeed)}get randomSeed(){return this.getPropertyValue("randomSeed",void 0,()=>Math.floor(Date.now()/4+1e3*Math.random()))}set randomSeed(e){this.setPropertyValue("randomSeed",e)}randomSeedChanged(){for(var e=0;e<this.pages.length;e++)this.pages[e].randomSeedChanged()}setDataCore(e,t=!1){if(t&&(this.valuesHash={}),e)for(var s in e){let t="string"==typeof s?s.trim():s;this.setDataValueCore(this.valuesHash,t,e[s])}this.isSettingDataValue=!0,this.updateAllQuestionsValue(t),this.notifyAllQuestionsOnValueChanged(),this.notifyElementsOnAnyValueOrVariableChanged(""),this.isSettingDataValue=!1,this.runConditions(),this.updateAllQuestionsValue(t)}isSettingData(){return!0===this.isSettingDataValue}get isSurvey(){return!0}getData(e){let t=e||{includePages:!1,includePanels:!1};return t.includePages||t.includePanels?this.getStructuredData(!!t.includePages,t.includePanels?100:+!!t.includePages):this.data}getStructuredData(e=!0,t=-1){if(0===t)return this.data;let s={};return this.pages.forEach(i=>{if(e){let e={};i.collectValues(e,t-1)&&(s[i.name]=e)}else i.collectValues(s,t)}),s}setStructuredData(e,t=!1){if(!e)return;let s={};for(let t in e)if(this.getQuestionByValueName(t))s[t]=e[t];else{let i=this.getPageByName(t);i||(i=this.getPanelByName(t)),i&&this.collectDataFromPanel(i,s,e[t])}t?this.mergeData(s):this.data=s}collectDataFromPanel(e,t,s){for(let i in s){let n=e.getElementByName(i);n&&(n.isPanel?this.collectDataFromPanel(n,t,s[i]):t[i]=s[i])}}get editingObj(){return this.editingObjValue}set editingObj(e){if(this.editingObj!=e&&(this.unConnectEditingObj(),this.editingObjValue=e,!this.isDisposed)){if(!e)for(var t=this.getAllQuestions(),s=0;s<t.length;s++)t[s].unbindValue();this.editingObj&&(this.setDataCore({}),this.onEditingObjPropertyChanged=(e,t)=>{H.hasOriginalProperty(this.editingObj,t.name)&&("locale"===t.name&&this.setDataCore({}),this.updateOnSetValue(t.name,this.editingObj[t.name],t.oldValue))},this.editingObj.onPropertyChanged.add(this.onEditingObjPropertyChanged))}}unConnectEditingObj(){this.editingObj&&!this.editingObj.isDisposed&&this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged)}get isEditingSurveyElement(){return!!this.editingObj}setCalculatedValuesIntoResult(e){for(var t=0;t<this.calculatedValues.length;t++){var s=this.calculatedValues[t];s.includeIntoResult&&s.name&&void 0!==this.getVariable(s.name)&&(e[
10s.name]=this.getVariable(s.name))}}getPlainData(e){e||(e={includeEmpty:!0,includeQuestionTypes:!1,includeValues:!1});let t=[],s=[];if(this.getAllQuestions().forEach(i=>{var n=i.getPlainData(e);n&&(t.push(n),s.push(i.valueName||i.name))}),e.includeValues){let e=this.getValuesKeys();for(var i=0;i<e.length;i++){var n=e[i];if(-1==s.indexOf(n)){var r=this.getDataValueCore(this.valuesHash,n);r&&t.push({name:n,title:n,value:r,displayValue:r,isNode:!1,getString:e=>this.getValueAsString(e)})}}}return t}getFilteredValues(){let e={};for(var t in this.variablesHash)e[t]=this.variablesHash[t];if(this.addCalculatedValuesIntoFilteredValues(e),!this.isDesignMode){let i=this.getValuesKeys();for(var s=0;s<i.length;s++){var t=i[s];e[t]=this.getDataValueCore(this.valuesHash,t)}this.getAllQuestions().forEach(t=>{t.hasFilteredValue&&(e[t.getFilteredName()]=t.getFilteredValue(!0))})}return e}addCalculatedValuesIntoFilteredValues(e){for(var t=this.calculatedValues,s=0;s<t.length;s++)e[t[s].name]=t[s].value}getFilteredProperties(){return{survey:this}}getValuesKeys(){if(!this.editingObj)return Object.keys(this.valuesHash);for(var e=H.getPropertiesByObj(this.editingObj),t=[],s=0;s<e.length;s++)t.push(e[s].name);return t}getDataValueCore(e,t){return this.editingObj?H.getObjPropertyValue(this.editingObj,t):this.getDataFromValueHash(e,t)}setDataValueCore(e,t,s){this.editingObj?H.setObjPropertyValue(this.editingObj,t,s):this.setDataToValueHash(e,t,s)}deleteDataValueCore(e,t){this.editingObj?this.editingObj[t]=null:this.deleteDataFromValueHash(e,t)}getDataFromValueHash(e,t){return this.valueHashGetDataCallback?this.valueHashGetDataCallback(e,t):e[t]}setDataToValueHash(e,t,s){this.valueHashSetDataCallback?this.valueHashSetDataCallback(e,t,s):e[t]=s}deleteDataFromValueHash(e,t){this.valueHashDeleteDataCallback?this.valueHashDeleteDataCallback(e,t):delete e[t]}get comments(){for(var e={},t=this.getValuesKeys(),s=0;s<t.length;s++){var i=t[s];i.indexOf(this.commentSuffix)>0&&(e[i]=this.getDataValueCore(this.valuesHash,i))}return e}get visiblePages(){if(this.isDesignMode)return this.pages;if(this.pageContainerValue&&(this.isShowingPreview||this.isSinglePage))return[this.pageContainerValue];for(var e=[],t=0;t<this.pages.length;t++)this.isPageInVisibleList(this.pages[t])&&e.push(this.pages[t]);return e}isPageInVisibleList(e){return this.isDesignMode||e.isVisible&&!e.isStartPage}get isEmpty(){return 0==this.pages.length}get PageCount(){return this.pageCount}get pageCount(){return this.pages.length}get visiblePageCount(){return this.visiblePages.length}get startPage(){var e=this.firstPageIsStartPage&&this.pages.length>1?this.pages[0]:null;return e&&e.onFirstRendering(),e}get startedPage(){return this.startPage}get currentPage(){return this.getPropertyValue("currentPage",null)}set currentPage(e){if(this.isLoadingFromJson)return;var t=this.getPageByObject(e);if(e&&!t||!t&&this.isCurrentPageAvailable)return;var s=this.visiblePages;if(null!=t&&0>s.indexOf(t)||t==this.currentPage)return;let i=this.currentSingleElement;if(!this.isShowingPreview&&i&&t!==i.page){this.currentSingleElement=t.getFirstVisibleElement();return}let n=this.currentPage,r=this.createPageChangeEventOptions(t,n),a=()=>{this.setPropertyValue("currentPage",t),t&&(t.onFirstRendering(),t.updateCustomWidgets()),this.locStrsChanged(),this.isShowingPreview||this.currentPageChanged(t,n)};this.isShowingPreview||i?a():this.currentPageChanging(r,a)}get currentElementName(){var e;return(null==(e=this.currentElement)?void 0:e.name)||""}set currentElementName(e){e&&(this.currentElement=this.getElementByName(e))}get currentElement(){return this.currentSingleElement||this.currentPage}set currentElement(e){if(e)if(e.isPage)this.currentPage=e;else{let t=e.page;t&&!this.isSingleVisibleQuestion?this.currentPage=t:this.currentSingleElement=e}}getElementByName(e){return e?this.getPageByName(e)||this.getPanelByName(e)||this.getQuestionByName(e):null}tryNavigateToPage(e){if(!this.performValidationOnPageChanging(e))return!1;let t=this.visiblePages.indexOf(e)<this.currentPageNo||!this.doServerValidation(!1,!1,e);return t&&(this.currentPage=e),t}performValidationOnPageChanging(e){if(this.isDesignMode)return!1;if(this.canGoTroughValidation())return!0;let t=this.visiblePages.indexOf(e);if(t<0||t>=this.visiblePageCount||t===this.currentPageNo)return!1;if(t<this.currentPageNo||"onComplete"===this.checkErrorsMode||this.validationAllowSwitchPages)return!0;
vendor: 2,226 bytes, line 10
10if(!this.validateCurrentPage())return!1;for(let e=this.currentPageNo+1;e<t;e++){let t=this.visiblePages[e];if(!t.validate(!0,!0))return!1;t.passed=!0}return!0}updateCurrentPage(){this.isCurrentPageAvailable||(this.currentPage=this.firstVisiblePage)}get isCurrentPageAvailable(){let e=this.currentPage;return!!e&&this.isPageInVisibleList(e)&&this.isPageExistsInSurvey(e)}isPageExistsInSurvey(e){return this.pages.indexOf(e)>-1||!!this.onContainsPageCallback&&this.onContainsPageCallback(e)}get activePage(){return this.getPropertyValue("activePage")}get isStartPageActive(){return"starting"===this.state}get isShowStartingPage(){return this.isStartPageActive}get isShowingPage(){return"running"==this.state||"preview"==this.state||this.isStartPageActive}updateActivePage(){let e=this.isStartPageActive?this.startPage:this.currentPage;e!==this.activePage&&this.setPropertyValue("activePage",e)}onStateAndCurrentPageChanged(){this.updateActivePage(),this.updateButtonsVisibility()}getPageByObject(e){if(!e)return null;if(e.getType&&"page"==e.getType())return e;if("string"==typeof e||e instanceof String)return this.getPageByName(String(e));if(!isNaN(e)){var t=Number(e),s=this.visiblePages;return e<0||e>=s.length?null:s[t]}return e}get currentPageNo(){return this.visiblePages.indexOf(this.currentPage)}set currentPageNo(e){var t=this.visiblePages;e<0||e>=t.length||(this.currentPage=t[e])}get questionsOrder(){return this.questionOrder}set questionsOrder(e){this.questionOrder=e}focusFirstQuestion(){if(!this.focusingQuestionInfo){var e=this.activePage;e&&(e.scrollToTop(),e.focusFirstQuestion())}}scrollToTopOnPageChange(e=!0){var t=this.activePage;t&&(e&&t.scrollToTop(),this.isCurrentPageRendering&&this.autoFocusFirstQuestion&&!this.focusingQuestionInfo&&(t.focusFirstQuestion(),this.isCurrentPageRendering=!1))}get state(){return this.getPropertyValue("state","empty")}updateState(){this.setPropertyValue("state",this.calcState())}calcState(){return this.isLoading?"loading":this.isCompleted?"completed":this.isCompletedBefore?"completedbefore":!this.isDesignMode&&this.isEditMode&&this.isStartedState&&this.startPage?"starting":this.isShowingPreview?this.currentPage?"preview":"empty":this.currentPage?"running":"empty"}
10get isShowingPreview(){return this.getPropertyValue("isShowingPreview",!1)}set isShowingPreview(e){this.isShowingPreview!=e&&(this.setPropertyValue("isShowingPreview",e),this.onShowingPreviewChanged())}beginLoading(){this.isLoading=!0}endLoading(){this.isLoading=!1}get completedState(){return this.getPropertyValue("completedState","")}get completedStateText(){return this.getPropertyValue("completedStateText","")}setCompletedState(e,t){this.setPropertyValue("completedState",e),t||("saving"==e&&(t=this.getLocalizationString("savingData")),"error"==e&&(t=this.getLocalizationString("savingDataError")),"success"==e&&(t=this.getLocalizationString("savingDataSuccess"))),this.setPropertyValue("completedStateText",t),"completed"===this.state&&this.showCompletePage&&this.completedState&&this.notify(this.completedStateText,this.completedState,"error"===e)}get notifier(){return this.notifierValue||(this.notifierValue=new s3(this.css.saveData),this.notifierValue.addAction(this.createTryAgainAction(),"error")),this.notifierValue}notify(e,t,s=!1){this.notifier.showActions=s,this.notifier.notify(e,t,s)}clear(e=!0,t=!0){this.isCompleted=!1,this.isCompletedBefore=!1,this.isLoading=!1,this.completedByTriggers=void 0,this.skippedPages=[],this.lastActiveQuestion=void 0,e&&this.setDataCore(null,!0),this.timerModel.spent=0;for(var s=0;s<this.pages.length;s++)this.pages[s].timeSpent=0,this.pages[s].setWasShown(!1),this.pages[s].passed=!1;if(this.onFirstPageIsStartedChanged(),t&&(this.currentPage=this.firstVisiblePage,this.currentSingleElement)){let e=this.getSingleElements();this.currentSingleElement=e.length>0?e[0]:void 0}e&&this.updateValuesWithDefaults()}mergeValues(e,t){y(e,t)}updateValuesWithDefaults(){if(!this.isDesignMode&&!this.isLoading)for(var e=0;e<this.pages.length;e++)for(var t=this.pages[e].questions,s=0;s<t.length;s++)t[s].updateValueWithDefaults()}updateCustomWidgets(e){e&&e.updateCustomWidgets()}currentPageChanging(e,t){e.allow=!0,e.allowChanging=!0;let s=()=>{e.allowChanging&&e.allow&&(e.newCurrentPage!==e.oldCurrentPage&&(this.isCurrentPageRendering=!0),t()),e.message&&this.notify(e.message,e.allow?"success":"error"),this.isNavigationBlocked=!1};this.onCurrentPageChanging.fire(this,e,()=>s(),()=>this.isNavigationBlocked=!0)}currentPageChanged(e,t){if(this.notifyQuestionsOnHidingContent(t),t&&!t.isDisposed&&!t.passed&&t.validate(!1)&&(t.passed=!0),!0===this.isCurrentPageRendered&&(this.isCurrentPageRendered=!1),!this.currentSingleElement){let s=this.createPageChangeEventOptions(e,t);this.onCurrentPageChanged.fire(this,s)}}notifyQuestionsOnHidingContent(e){e&&!e.isDisposed&&e.questions.forEach(e=>e.onHidingContent())}createPageChangeEventOptions(e,t,s,i){let n=e&&t?e.visibleIndex-t.visibleIndex:0,r=n;return 0===r&&i&&s&&(r=e.elements.indexOf(s)-e.elements.indexOf(i)),{oldCurrentQuestion:i,newCurrentQuestion:s,oldCurrentPage:t,newCurrentPage:e,isNextPage:1===n,isPrevPage:-1===n,isGoingForward:r>0,isGoingBackward:r<0,isAfterPreview:!0===this.changeCurrentPageFromPreview}}getProgress(){if(null==this.currentPage)return 0;if("pages"!==this.progressBarType){var e=this.getProgressInfo();return"requiredQuestions"===this.progressBarType?e.requiredQuestionCount>=1?Math.ceil(100*e.requiredAnsweredQuestionCount/e.requiredQuestionCount):100:e.questionCount>=1?Math.ceil(100*e.answeredQuestionCount/e.questionCount):100}let t=this.visiblePages;return Math.ceil(100*t.indexOf(this.currentPage)/t.length)}get isNavigationButtonsShowing(){if(this.isDesignMode)return"none";var e=this.activePage;return e&&!1!==e.showNavigationButtons?!0===e.showNavigationButtons?this.showNavigationButtons?this.navigationButtonsLocation:"bottom":this.showNavigationButtons?this.navigationButtonsLocation:"none":"none"}get isNavigationButtonsShowingOnTop(){return this.getIsNavigationButtonsShowingOn("top")}get isNavigationButtonsShowingOnBottom(){return this.getIsNavigationButtonsShowingOn("bottom")}getIsNavigationButtonsShowingOn(e){var t=this.isNavigationButtonsShowing;return"both"==t||"topBottom"==t||t==e}get isEditMode(){return!this.readOnly}get isDisplayMode(){return this.readOnly&&!this.isDesignMode||"preview"==this.state}get isUpdateValueTextOnTyping(){return"onTyping"==this.textUpdateMode}get isDesignMode(){return this._isDesignMode}setDesignMode(e){!!this._isDesignMode!=!!e&&(this._isDesignMode=!!e,this.onQuestionsOnPageModeChanged("standard"))}get showInvisibleElements(){return this.getPropertyValue("showInvisibleElements",!1)}set showInvisibleElements(e){var t=this.visiblePages;this.setPropertyValue("showInvisibleElements",e),this.isLoadingFromJson||(this.runConditions(),this.updateAllElementsVisibility(t))}updateAllElementsVisibility(e){for(var t=0;t<this.pages.length;t++){var s=this.pages[t];s.updateElementVisibility(),e.indexOf(s)>-1!=s.isVisible&&(this.onPageVisibleChanged.fire(this,{page:s,visible:s.isVisible}),this.onPagesVisibleChangedCallback&&this.onPagesVisibleChangedCallback())}}get areInvisibleElementsShowing(){return this.isDesignMode||this.showInvisibleElements}get areEmptyElementsHidden(){return this.isShowingPreview&&this.showPreviewBeforeComplete&&"answeredQuestions"==this.previewMode&&this.isAnyQuestionAnswered}get isAnyQuestionAnswered(){let e=this.getAllQuestions(!0);for(let t=0;t<e.length;t++)if(!e[t].isEmpty())return!0;return!1}get hasCookie(){if(!this.cookieName)return!1;var e=n.getCookie();return e&&e.indexOf(this.cookieName+"=true")>-1}setCookie(){this.cookieName&&n.setCookie(this.cookieName+"=true; expires=Fri, 31 Dec 9999 0:0:0 GMT")}deleteCookie(){this.cookieName&&n.setCookie(this.cookieName+"=;")}get ignoreValidation(){return!this.validationEnabled}set ignoreValidation(e){this.validationEnabled=!e}nextPage(){return this.currentSingleElement?this.performNext():!this.isLastPage&&this.doCurrentPageComplete(!1)}performNext(){let e=this.currentSingleElement;if(!e)return this.nextPage();if(this.resetNavigationButton(),this.isSingleVisibleInput){if(!e.validateSingleInput())return!1;if(e.nextSingleInput())return this.updateButtonsVisibility(),!0}return this.validationEnabled?!0===this.validateElements([e],!0,!1,t=>{t||this.performNextAfterValidation(e)}):(this.performNextAfterValidation(e),!0)}performNextAfterValidation(e){this.sendPartialResult();let t=this.getSingleElements(),s=t.indexOf(e);if(s<0||s===t.length-1)return!1;let i={};e.isQuestion?i[e.name]=e.value:e.isPanel&&(i=e.getValue()),this.checkTriggers(i,!0,!1,!0,e.name),e===this.currentSingleElement&&(this.currentSingleElement=t[s+1])}performPrevious(){return this.prevPage()}validateOnNavigate(e,t){let s=this.canGoTroughValidation()||e&&this.validationAllowComplete||!e&&(this.validationAllowSwitchPages||this.isValidateOnComplete)||t&&this.isValidateOnComplete,i=()=>{t?this.showPreviewCore():this.doCurrentPageCompleteCore(e)};if(s)return i(),!0;let n=e=>{e||i()};return this.isValidateOnComplete?this.isLastPage?!0!==this.validate(!0,this.autoFocusFirstError,n,!0):(i(),!0):!1!==this.validateCurrentPage(n)}canGoTroughValidation(){return!this.isEditMode||!this.validationEnabled}get isCurrentPageHasErrors(){return!1===this.validateActivePage()}get isCurrentPageValid(){return this.validateActivePage()}hasCurrentPageErrors(e){return this.hasPageErrors(void 0,e)}validateCurrentPage(e){return this.validatePage(void 0,e)}hasPageErrors(e,t){let s=this.validatePage(e,t);return void 0===s?s:!s}validatePage(e,t){return e||(e=this.activePage),!e||this.validatePageCore(e,!0,t)}
10hasErrors(e=!0,t=!1,s){let i=this.validate(e,t,s);return void 0===i?i:!i}validate(e=!0,t=!1,s,i){return this.validateElements(this.visiblePages,e,t,s,i)}validateElements(e,t=!0,s=!1,i,n){i&&(t=!0);let r=new tH({fireCallback:t,focusOnFirstError:s,callbackResult:i?e=>{i(!e)}:void 0,changeCurrentPage:!!n});for(let t of e)t.validateElement(r);return r.finish(),r.runningResult}ensureUniqueNames(e=null){if(null==e)for(var t=0;t<this.pages.length;t++)this.ensureUniqueName(this.pages[t]);else this.ensureUniqueName(e)}ensureUniqueName(e){if(e.isPage&&this.ensureUniquePageName(e),e.isPanel&&this.ensureUniquePanelName(e),e.isPage||e.isPanel)for(var t=e.elements,s=0;s<t.length;s++)this.ensureUniqueNames(t[s]);else this.ensureUniqueQuestionName(e)}ensureUniquePageName(e){return this.ensureUniqueElementName(e,e=>this.getPageByName(e))}ensureUniquePanelName(e){return this.ensureUniqueElementName(e,e=>this.getPanelByName(e))}ensureUniqueQuestionName(e){return this.ensureUniqueElementName(e,e=>this.getQuestionByName(e))}ensureUniqueElementName(e,t){var s=t(e.name);if(s&&s!=e){for(var i=this.getNewName(e.name);t(i);)var i=this.getNewName(e.name);e.name=i}}getNewName(e){for(var t=e.length;t>0&&e[t-1]>="0"&&e[t-1]<="9";)t--;var s=e.substring(0,t),i=0;return t<e.length&&(i=parseInt(e.substring(t))),s+ ++i}validateActivePage(e){return this.validatePageCore(this.activePage,e)}validatePageCore(e,t,s){let i,n;if(void 0===t&&(t=this.focusOnFirstError),!e)return!0;s&&(n=t=>{if(void 0===i)i=!t;else{let i=this.fireValidatedErrorsOnPage(e);s(!t||i)}});let r=e.validate(!0,t,n);if(void 0===i&&s)return i=!1,r;let a=this.fireValidatedErrorsOnPage(e);return s&&void 0!==i&&s(i||a),r&&!a}fireValidatedErrorsOnPage(e){if(this.onValidatePage.isEmpty||!e)return!1;let t=this.getNestedQuestionsByQuestionArray(e.questions,!0);for(var s=[],i=[],n=0;n<t.length;n++){var r=t[n];if(r.errors.length>0){s.push(r);for(var a=0;a<r.errors.length;a++)i.push(r.errors[a])}}let o=i.length;return this.onValidatePage.fire(this,{questions:s,errors:i,page:e}),i.length>o}prevPage(){if(this.isFirstPage||"starting"===this.state)return!1;this.resetNavigationButton();let e=this.currentSingleElement;if(this.doSkipOnPrevPage(e))return!0;if(e)return this.prevPageSingleElement(e);let t=this.visiblePages,s=t.indexOf(this.currentPage);return this.currentPage=t[s-1],!0}doSkipOnPrevPage(e){let t,s=e||this.currentPage,i=this.skippedPages.find(e=>e.to===s);if(i){this.skippedPages.splice(this.skippedPages.indexOf(i),1);let e=i.from;!e.isDisposed&&e.isVisible&&(t=e)}return t&&(e?this.currentSingleElement=t:this.currentPage=t),!!t}prevPageSingleElement(e){if(this.isSingleVisibleInput&&e.prevSingleInput())return this.updateButtonsVisibility(),!0;let t=this.getSingleElements(),s=t.indexOf(e);return 0!==s&&(this.currentSingleElement=t[s-1],!0)}tryComplete(){return this.isValidateOnComplete&&this.cancelPreview(),this.doCurrentPageComplete(!0),this.isCompleted}completeLastPage(){return this.tryComplete()}navigationMouseDown(){return this.isNavigationButtonPressed=!0,!0}resetNavigationButton(){this.isNavigationButtonPressed=!1}nextPageUIClick(){return(!this.mouseDownPage||this.mouseDownPage===this.activePage)&&(this.mouseDownPage=null,this.performNext())}nextPageMouseDown(){return this.mouseDownPage=this.activePage,this.navigationMouseDown()}showPreview(){return this.resetNavigationButton(),!(!this.isValidateOnComplete&&this.doServerValidation(!0,!0))&&!!this.validateOnNavigate(!0,!0)&&this.isShowingPreview}showPreviewCore(){var e={allowShowPreview:!0,allow:!0};this.onShowingPreview.fire(this,e),this.isShowingPreview=e.allowShowPreview&&e.allow}cancelPreview(e=null){var t;if(!this.isShowingPreview)return;this.gotoPageFromPreview=e,this.isShowingPreview=!1;let s=null==(t=this.currentSingleElement)?void 0:t.page;s&&(s.updateRows(),this.currentPage=s)}cancelPreviewByPage(e){this.cancelPreview(e)}doCurrentPageComplete(e){return!this.isValidatingOnServer&&(this.resetNavigationButton(),!0===this.validateOnNavigate(e))}doCurrentPageCompleteCore(e){return!this.doServerValidation(e)&&(e?(this.currentPage&&(this.currentPage.passed=!0),this.doComplete(this.canBeCompletedByTrigger,this.completedTrigger)):(this.doNextPage(),!0))}get isSinglePage(){return"singlePage"==this.questionsOnPageMode}set isSinglePage(e){this.questionsOnPageMode=e?"singlePage":"standard"}get isSingleVisibleQuestion(){return!this.isDesignMode&&(this.isSingleVisibleQuestionVal(this.questionsOnPageMode)||this.isSingleVisibleInput)}get isSingleVisibleInput(){return!this.isDesignMode&&"inputPerPage"==this.questionsOnPageMode}isSingleVisibleQuestionVal(e){return"questionPerPage"===e||"questionOnPage"===e}get firstPageIsStarted(){return this.firstPageIsStartPage}set firstPageIsStarted(e){this.firstPageIsStartPage=e}isPageStarted(e){return this.firstPageIsStartPage&&this.pages.length>1&&this.pages[0]===e}setShowPreviewBeforeComplete(e){void 0===e||"noPreview"===e||!1===e?this.setPropertyValue("showPreviewBeforeComplete",!1):(this.setPropertyValue("showPreviewBeforeComplete",!0),"showAllQuestions"===e&&(this.previewMode="allQuestions"),"showAnsweredQuestions"===e&&(this.previewMode="answeredQuestions"))}onFirstPageIsStartedChanged(){this.isStartedState=this.firstPageIsStartPage&&this.pages.length>1,this.pageVisibilityChanged(this.pages[0],!this.isStartedState)}onShowingPreviewChanged(){this.updatePagesContainer()}createRootPage(e,t){let s=H.createClass("page");
10return s.name=e,s.isPageContainer=!0,t.forEach(e=>{e.isStartPage||s.addElement(e)}),s}disposeContainerPage(){let e=this.pageContainerValue;[].concat(e.elements).forEach(t=>e.removeElement(t)),e.dispose(),this.pageContainerValue=void 0}updatePagesContainer(){let e;if(this.isDesignMode)return;this.getAllQuestions().forEach(e=>e.updateElementVisibility()),this.setPropertyValue("currentPage",void 0);let t="preview-page";if(this.isSinglePage){let s=this.pageContainerValue;s&&s.name===t?(e=s.elements[0],this.disposeContainerPage()):e=this.createRootPage("single-page",this.pages)}this.isShowingPreview&&(e=this.createRootPage(t,e?[e]:this.pages)),e&&(e.setSurveyImpl(this),this.pageContainerValue=e,this.currentPage=e,this.currentSingleElementValue&&this.visiblePages.forEach(e=>e.updateRows()));let s=!1;if(!this.isSinglePage&&!this.isShowingPreview){this.disposeContainerPage();let e=this.gotoPageFromPreview;this.gotoPageFromPreview=null,w.isValueEmpty(e)&&this.visiblePageCount>0&&(e=this.visiblePages[this.visiblePageCount-1]),e&&(s=!0,this.changeCurrentPageFromPreview=!0,this.currentPage=e,this.changeCurrentPageFromPreview=!1)}this.currentPage||!(this.visiblePageCount>0)||s||(this.currentPage=this.visiblePages[0]),this.isShowingPreview&&this.pages.forEach(e=>{e.onFirstRendering()}),this.pages.forEach(e=>{e.wasRendered&&e.updateElementCss(!0)}),this.updateButtonsVisibility()}getSingleElements(e){let t=[],s=this.pages,i=this.isSingleVisibleInput;for(var n=0;n<s.length;n++){let r=s[n];if(!r.isStartPage&&r.isVisible){let s=[];i?r.addQuestionsToList(s,!0):r.elements.forEach(e=>
10s.push(e)),s.forEach(s=>{(s===e||s.isVisible)&&t.push(s)})}}return t}get currentSingleElement(){return this.isShowingPreview?void 0:this.currentSingleElementValue}set currentSingleElement(e){if(e&&e.isQuestion&&this.isSingleVisibleQuestionVal(this.questionsOnPageMode))for(;e.parent&&e.parent.isPanel;)e=e.parent;let t=this.currentSingleElement;if(e!==t&&!this.isCompleted){let s=(null==e?void 0:e.isQuestion)?e:void 0,i=(null==t?void 0:t.isQuestion)?t:void 0,n=null==e?void 0:e.page,r=n&&t?this.createPageChangeEventOptions(n,t.page,s,i):void 0,a=()=>{this.currentSingleElementValue=e,e?(this.isSingleVisibleInput&&e.isQuestion&&e.onSetAsSingleInput(),n.updateRows(),n!==this.currentPage?this.currentPage=n:s&&this.autoFocusFirstQuestion&&s.focus(),this.updateButtonsVisibility(),r&&this.onCurrentPageChanged.fire(this,r)):this.visiblePages.forEach(e=>e.updateRows())};r?this.currentPageChanging(r,a):a()}}get currentSingleQuestion(){let e=this.currentSingleElement;return e&&e.isQuestion?e:void 0}set currentSingleQuestion(e){this.currentSingleElement=e}supportsNestedSingleInput(e){let t={question:e,enabled:!0};return this.onCheckSingleInputPerPageMode.fire(this,t),t.enabled}updateNestedSingleQuestions(e,t){this.onGetLoopQuestions.fire(this,{question:e,nestedQuestions:t})}changeCurrentSingleElementOnVisibilityChanged(){let e=this.currentSingleElement;if(!e||e.isVisible)return;let t=this.getSingleElements(e),s=t.indexOf(e),i=s>0?t[s-1]:s<t.length-1?t[s+1]:void 0;this.currentSingleElement=i}onQuestionsOnPageModeChanged(e){if(!this.isShowingPreview&&!this.isDesignMode&&(this.skippedPages=[],this.currentSingleElement=void 0,"singlePage"===e&&this.updatePagesContainer(),"inputPerPage"===e&&this.getAllQuestions().forEach(e=>e.resetSingleInput()),this.isSinglePage&&this.updatePagesContainer(),this.setupSingleInputNavigationActions(),this.isSingleVisibleQuestion)){let e=this.getSingleElements();e.length>0&&(this.currentSingleElement=e[0])}}setupSingleInputNavigationActions(){let e="sv-singleinput-add";if(this.isSingleVisibleInput){let t=()=>{this.currentSingleQuestion.singleInputAddItem(!0),this.resetNavigationButton()};this.addNavigationItem({id:e,visible:!1,action:()=>t()})}else this.removeNavigationItem(e)}getPageStartIndex(){return this.firstPageIsStartPage&&this.pages.length>0?1:0}get isFirstPage(){return this.getPropertyValue("isFirstPage")}get isLastPage(){return this.getPropertyValue("isLastPage")}updateNavigationElements(){this.updateButtonsVisibility()}updateButtonsVisibility(){this.updateIsFirstLastPageState(),this.setPropertyValue("isShowPrevButton",this.calcIsShowPrevButton()),this.setPropertyValue("isShowNextButton",this.calcIsShowNextButton()),this.setPropertyValue("isCompleteButtonVisible",this.calcIsCompleteButtonVisible()),this.setPropertyValue("isPreviewButtonVisible",this.calcIsPreviewButtonVisible()),this.setPropertyValue("isCancelPreviewButtonVisible",this.calcIsCancelPreviewButtonVisible()),this.updateSingleInputActions()}updateSingleInputActions(){var e;if(!this.isSingleVisibleInput)return;let t=this.currentSingleQuestion;t&&(e=this.navigationBar.getActionById("sv-singleinput-add"))&&(e.title=t.getSingleInputAddText(),e.visible=!!e.title)}get isShowPrevButton(){return this.getPropertyValue("isShowPrevButton")}get isShowNextButton(){return this.getPropertyValue("isShowNextButton")}get isCompleteButtonVisible(){return this.getPropertyValue("isCompleteButtonVisible")}get isPreviewButtonVisible(){return this.getPropertyValue("isPreviewButtonVisible")}get isCancelPreviewButtonVisible(){return this.getPropertyValue("isCancelPreviewButtonVisible")}get isFirstElement(){return this.getPropertyValue("isFirstElement")}get isLastElement(){return this.getPropertyValue("isLastElement")}updateIsFirstLastPageState(){let e,t,s=this.currentPage,i=this.currentSingleElement;if(i){let s=!0,n=!0;if(this.isSingleVisibleInput){let e=i.getSingleInputElementPos();0!==e&&(s=-1===e,n=1===e)}let r=this.getSingleElements(),a=r.indexOf(i);a>=0&&(e=s&&0===a,t=n&&a===r.length-1)}this.setPropertyValue("isFirstPage",!!s&&s===this.firstVisiblePage&&(!i||!0===e)),this.setPropertyValue("isLastPage",!!s&&s===this.lastVisiblePage&&(!i||!0===t)),this.setPropertyValue("isFirstElement",e),this.setPropertyValue("isLastElement",t)}get isLastPageOrElement(){return void 0!==this.isLastElement?this.isLastElement:this.isLastPage}get isFirstPageOrElement(){return void 0!==this.isFirstElement?this.isFirstElement:this.isFirstPage}calcIsShowPrevButton(){if(this.isFirstPageOrElement||!this.showPrevButton||"running"!==this.state)return!1;if(void 0!==this.isFirstElement)return!0;let e=this.visiblePages[this.currentPageNo-1];return e&&0>=e.getMaxTimeToFinish()}calcIsShowNextButton(){return"running"===this.state&&!this.isLastPageOrElement&&!this.canBeCompletedByTrigger}calcIsCompleteButtonVisible(){let e=this.state;return this.isEditMode&&("running"===this.state&&(this.isLastPageOrElement&&!this.showPreviewBeforeComplete||this.canBeCompletedByTrigger)||"preview"===e)&&this.showCompleteButton}calcIsPreviewButtonVisible(){return this.isEditMode&&this.showPreviewBeforeComplete&&"running"==this.state&&this.isLastPageOrElement}calcIsCancelPreviewButtonVisible(){return this.isEditMode&&this.showPreviewBeforeComplete&&"preview"==this.state}
10get firstVisiblePage(){if(1===this.visiblePageCount)return this.visiblePages[0];let e=this.pages;for(let t=0;t<e.length;t++)if(this.isPageInVisibleList(e[t]))return e[t];return null}get lastVisiblePage(){if(1===this.visiblePageCount)return this.visiblePages[0];let e=this.pages;for(let t=e.length-1;t>=0;t--)if(this.isPageInVisibleList(e[t]))return e[t];return null}doComplete(e=!1,t){if(!this.isCompleted)return this.checkOnCompletingEvent(e,t,s=>{s?(this.checkOnPageTriggers(!0),this.stopTimer(),this.notifyQuestionsOnHidingContent(this.currentPage),this.isCompleted=!0,this.cancelPreview(),this.clearUnusedValues(),this.saveDataOnComplete(e,t),this.setCookie()):this.isCompleted=!1})}saveDataOnComplete(e=!1,t){let s=this.hasCookie,i=e=>{o=!0,this.setCompletedState("saving",e)},n=e=>{this.setCompletedState("error",e)},r=e=>{this.setCompletedState("success",e),this.navigateTo()},a=e=>{this.setCompletedState("","")};var o=!1;this.onComplete.fire(this,{isCompleteOnTrigger:e,completeTrigger:t,showSaveInProgress:i,showSaveError:n,showSaveSuccess:r,clearSaveMessages:a,showDataSaving:i,showDataSavingError:n,showDataSavingSuccess:r,showDataSavingClear:a}),!s&&this.surveyPostId&&this.sendResult(),o||this.navigateTo()}checkOnCompletingEvent(e,t,s){let i,n={allowComplete:!0,allow:!0,isCompleteOnTrigger:e,completeTrigger:t},r=()=>{this.isNavigationBlocked=!1;let e=n.allowComplete&&n.allow;n.message&&this.notify(n.message,e?"success":"error"),i=e,s(e)};return this.onCompleting.fire(this,n,r,()=>this.isNavigationBlocked=!0),i}start(){return!!this.firstPageIsStartPage&&(this.isCurrentPageRendering=!0,!!this.validatePageCore(this.startPage,!0)&&(this.isStartedState=!1,this.notifyQuestionsOnHidingContent(this.pages[0]),this.startTimerFromUI(),this.onStarted.fire(this,{}),this.updateVisibleIndexes(),this.currentPageNo=0,this.currentPage&&this.currentPage.locStrsChanged(),!0))}get isValidatingOnServer(){return this.getPropertyValue("isValidatingOnServer",!1)}setIsValidatingOnServer(e){e!=this.isValidatingOnServer&&(this.setPropertyValue("isValidatingOnServer",e),this.onIsValidatingOnServerChanged())}createServerValidationOptions(e,t,s){var i=this;let n={data:{},errors:{},survey:this,complete:function(){i.completeServerValidation(n,t,s)}};if(e&&this.isValidateOnComplete)n.data=this.data;else for(var r=this.activePage.questions,a=0;a<r.length;a++){var o=r[a];if(o.visible){var l=this.getValue(o.getValueName());this.isValueEmpty(l)||(n.data[o.getValueName()]=l)}}return n}onIsValidatingOnServerChanged(){}doServerValidation(e,t=!1,s){if(!this.onServerValidateQuestions||this.onServerValidateQuestions.isEmpty||!e&&this.isValidateOnComplete)return!1;this.setIsValidatingOnServer(!0);let i="function"==typeof this.onServerValidateQuestions;return this.serverValidationEventCount=i?1:this.onServerValidateQuestions.length,i?this.onServerValidateQuestions(this,this.createServerValidationOptions(e,t,s)):this.onServerValidateQuestions.fireByCreatingOptions(this,()=>this.createServerValidationOptions(e,t,s)),!0}completeServerValidation(e,t,s){if(this.serverValidationEventCount>1&&(this.serverValidationEventCount--,e&&e.errors&&0===Object.keys(e.errors).length)||(this.serverValidationEventCount=0,this.setIsValidatingOnServer(!1),!e&&!e.survey))return;var i=e.survey;let n=!0;if(e.errors){var r=this.autoFocusFirstError;for(var a in e.errors){var o=i.getQuestionByName(a);o&&o.errors&&(n=!1,o.addError(new eB(e.errors[a],this)),r&&(r=!1,o.page&&(this.currentPage=o.page),o.focus(!0)))}this.fireValidatedErrorsOnPage(this.currentPage)}n&&(t?this.showPreviewCore():s?this.currentPage=s:i.isLastPage?i.doComplete():i.doNextPage())}doNextPage(){var e=this.currentPage;if(this.checkOnPageTriggers(!1),this.sendPartialResult(),this.isCompleted)this.doComplete(!0);else if(e===this.currentPage){var t=this.visiblePages,s=t.indexOf(this.currentPage);this.currentPage=t[s+1]}}setCompleted(e){this.doComplete(!0,e)}sendPartialResult(){this.partialSendEnabled&&!this.isCompleted&&this.sendResult(this.surveyPostId,this.clientId,!0)}canBeCompleted(e,t){var s;if(!p.triggers.changeNavigationButtonsOnComplete)return;let i=this.canBeCompletedByTrigger;this.completedByTriggers||(this.completedByTriggers={}),t?this.completedByTriggers[e.id]={trigger:e,pageId:null==(s=this.currentPage)?void 0:s.id}:delete this.completedByTriggers[e.id],i!==this.canBeCompletedByTrigger&&this.updateButtonsVisibility()}get canBeCompletedByTrigger(){var e;if(!this.completedByTriggers)return!1;let t=Object.keys(this.completedByTriggers);if(0===t.length)return!1;let s=null==(e=this.currentPage)?void 0:e.id;if(!s)return!0;for(let e=0;e<t.length;e++)if(s===this.completedByTriggers[t[e]].pageId)return!0;return!1}get completedTrigger(){if(!this.canBeCompletedByTrigger)return;let e=Object.keys(this.completedByTriggers)[0];return this.completedByTriggers[e].trigger}get processedCompletedHtml(){var e=this.renderedCompletedHtml;return e?this.processHtml(e,"completed"):""}get processedCompletedBeforeHtml(){return this.locCompletedBeforeHtml.textOrHtml}get processedLoadingHtml(){return this.locLoadingHtml.textOrHtml}getProgressInfo(){var e=this.isDesignMode?this.pages:this.visiblePages;return tL.getProgressInfoByElements(e,!1)}get progressBarAriaLabel(){return E("progressbar",this.getLocale())}get progressText(){return this.progressBar.progressText}get progressValue(){return this.getPropertyValue("progressValue",void 0,()=>this.getProgress())}updateProgressText(e=!1){this.isShowingPreview||e&&"pages"==this.progressBarType&&this.onGetProgressText.isEmpty||(this.progressBarValue&&this.progressBarValue.resetProgressText(),this.resetPropertyValue("progressValue"))}getProgressText(){if(!this.isDesignMode&&null==this.currentPage)return"";let e={questionCount:0,answeredQuestionCount:0,requiredQuestionCount:0,requiredAnsweredQuestionCount:0,text:""};var t=this.progressBarType.toLowerCase();if("questions"===t||"requiredquestions"===t||"correctquestions"===t||!this.onGetProgressText.isEmpty){var s=this.getProgressInfo();e.questionCount=s.questionCount,e.answeredQuestionCount=s.answeredQuestionCount,e.requiredQuestionCount=s.requiredQuestionCount,e.requiredAnsweredQuestionCount=s.requiredAnsweredQuestionCount}return e.text=this.getProgressTextCore(e),this.onGetProgressText.fire(this,e),e.text}getProgressTextCore(e){var t=this.progressBarType.toLowerCase();if("questions"===t)return this.getLocalizationFormatString("questionsProgressText",e.answeredQuestionCount,e.questionCount);if("requiredquestions"===t)return this.getLocalizationFormatString("questionsProgressText",e.requiredAnsweredQuestionCount,e.requiredQuestionCount);if("correctquestions"===t){var s=this.getCorrectedAnswerCount();return this.getLocalizationFormatString("questionsProgressText",s,e.questionCount)}var i=this.isDesignMode?this.pages:this.visiblePages,n=i.indexOf(this.currentPage)+1;return this.getLocalizationFormatString("progressText",n,i.length)}getRootCss(){return new eX().append(this.css.root).append(this.css.rootProgress+"--"+this.progressBarType).append(this.css.rootMobile,this.isMobile).append(this.css.rootAnimationDisabled,!p.animationEnabled).append(this.css.rootReadOnly,this.readOnly&&!this.isDesignMode).append(this.css.rootCompact,this.isCompact).append(this.css.rootFitToContainer,this.fitToContainer).toString()}afterRenderSurvey(e){if(!i.isAvailable())return;this.destroyResizeObserver(),Array.isArray(e)&&(e=tL.GetFirstNonTextElement(e));let t=e;this._processingResponsivenessFunc=void 0;let s=this.css.variables;if(s){let e=Number.parseFloat(n.getComputedStyle(t).getPropertyValue(s.mobileWidth));if(e){let s=!1,n=i.getScreenOrientationType();this._processingResponsivenessFunc=()=>this.processResponsiveness(t.offsetWidth,e,t.offsetHeight),this.resizeObserver=new ResizeObserver(e=>{i.requestAnimationFrame(()=>{let e=i.getScreenOrientationType();(s||!tt(t))&&n===e?s=!1:(s=!!this._processingResponsivenessFunc&&this._processingResponsivenessFunc(),n=e)})}),this.resizeObserver.observe(t)}}this.onAfterRenderSurvey.fire(this,{survey:this,htmlElement:e}),this.rootElement=e,this.scrollerElement=e.getElementsByClassName("sv-scroll__scroller")[0],this.addScrollEventListener()}forceProcessResponsiveness(){this._processingResponsivenessFunc&&this._processingResponsivenessFunc()}beforeDestroySurveyElement(){this._processingResponsivenessFunc=void 0,this.destroyResizeObserver(),this.removeScrollEventListener(),this.rootElement=void 0,this.scrollerElement=void 0}processResponsiveness(e,t,s){let i=e<t,n=this.isMobile!==i;
vendor: 4,730 bytes, line 10
10return this.setIsMobile(i),this.layoutElements.forEach(t=>t.processResponsiveness&&t.processResponsiveness(e)),this.onResize.fire(this,{height:s,width:e}),n}triggerResponsiveness(e){this.getAllQuestions().forEach(t=>{t.triggerResponsiveness(e)})}destroyResizeObserver(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0)}updateQuestionCssClasses(e,t){this.onUpdateQuestionCssClasses.fire(this,{question:e,cssClasses:t})}updatePanelCssClasses(e,t){this.onUpdatePanelCssClasses.fire(this,{panel:e,cssClasses:t})}updatePageCssClasses(e,t){this.onUpdatePageCssClasses.fire(this,{page:e,cssClasses:t})}updateChoiceItemCss(e,t){t.question=e,this.onUpdateChoiceItemCss.fire(this,t)}afterRenderPage(e){if(!this.isDesignMode&&!this.focusingQuestionInfo){let e=!1===this.isCurrentPageRendered;setTimeout(()=>this.scrollToTopOnPageChange(e),1)}this.focusQuestionInfo(),this.isCurrentPageRendered=!0,this.onAfterRenderPage.isEmpty||this.onAfterRenderPage.fire(this,{page:this.activePage,htmlElement:e})}afterRenderHeader(e){this.onAfterRenderHeader.isEmpty||this.onAfterRenderHeader.fire(this,{htmlElement:e})}afterRenderQuestion(e,t){this.onAfterRenderQuestion.fire(this,{question:e,htmlElement:t})}afterRenderQuestionInput(e,t){if(this.onAfterRenderQuestionInput.isEmpty)return;let s=e.inputId,i=e4(t);if(i){if(s&&(!t||t.id!==s)&&void 0!==i){let e=i.getElementById(s);e&&(t=e)}this.onAfterRenderQuestionInput.fire(this,{question:e,htmlElement:t})}}afterRenderPanel(e,t){this.onAfterRenderPanel.fire(this,{panel:e,htmlElement:t})}get lastActiveQuestion(){return this.lastActiveQuestionValue}set lastActiveQuestion(e){this.lastActiveQuestionValue=e,this.doUIStateChanged("activeElementName",e)}whenQuestionFocusIn(e){this.lastActiveQuestion=e,this.onFocusInQuestion.fire(this,{question:e})}whenPanelFocusIn(e){this.onFocusInPanel.fire(this,{panel:e})}rebuildQuestionChoices(){this.getAllQuestions().forEach(e=>e.surveyChoiceItemVisibilityChange())}canChangeChoiceItemsVisibility(){return!this.onShowingChoiceItem.isEmpty}getChoiceItemVisibility(e,t,s){let i={question:e,item:t,visible:s};return this.onShowingChoiceItem.fire(this,i),i.visible}loadQuestionChoices(e){this.onChoicesLazyLoad.isEmpty?e.setItems([],0):this.onChoicesLazyLoad.fire(this,e)}getChoiceDisplayValue(e){this.onGetChoiceDisplayValue.isEmpty?e.setItems(null):this.onGetChoiceDisplayValue.fire(this,e)}matrixBeforeRowAdded(e){this.onMatrixRowAdding.fire(this,e)}matrixRowAdded(e,t){this.onMatrixRowAdded.fire(this,{question:e,row:t})}matrixColumnAdded(e,t){this.onMatrixColumnAdded.fire(this,{question:e,column:t})}multipleTextItemAdded(e,t){this.onMultipleTextItemAdded.fire(this,{question:e,item:t})}getQuestionByValueNameFromArray(e,t,s){var i=this.getQuestionsByValueName(e);if(i){for(var n=0;n<i.length;n++){var r=i[n].getQuestionFromArray(t,s);if(r)return r}return null}}matrixRowRemoved(e,t,s){this.onMatrixRowRemoved.fire(this,{question:e,rowIndex:t,row:s})}matrixRowRemoving(e,t,s){var i={question:e,rowIndex:t,row:s,allow:!0};return this.onMatrixRowRemoving.fire(this,i),i.allow}matrixAllowRemoveRow(e,t,s){let i={question:e,rowIndex:t,row:s,allow:!0};return this.onMatrixRenderRemoveButton.fire(this,i),i.allow}matrixDetailPanelVisibleChanged(e,t,s,i){let n={question:e,rowIndex:t,row:s,visible:i,detailPanel:s.detailPanel};this.onMatrixDetailPanelVisibleChanged.fire(this,n)}matrixCellCreating(e,t){t.question=e,this.onMatrixCellCreating.fire(this,t)}matrixCellCreated(e,t){t.question=e,this.onMatrixCellCreated.fire(this,t)}matrixAfterCellRender(e){var t;let s=this.onAfterRenderMatrixCell;s.isEmpty||(e.question=null==(t=e.cellQuestion)?void 0:t.parentQuestion,s.fire(this,e))}matrixCellValueChanged(e,t){t.question=e,this.onMatrixCellValueChanged.fire(this,t)}matrixCellValueChanging(e,t){t.question=e,this.onMatrixCellValueChanging.fire(this,t)}get isValidateOnValueChanging(){return"onValueChanging"===this.checkErrorsMode}get isValidateOnValueChanged(){return"onValueChanged"===this.checkErrorsMode}get isValidateOnValueChange(){return this.isValidateOnValueChanged||this.isValidateOnValueChanging}get isValidateOnComplete(){return"onComplete"===this.checkErrorsMode||this.validationAllowSwitchPages&&!this.validationAllowComplete}matrixCellValidate(e,t){return t.question=e,this.onMatrixCellValidate.fire(this,t),t.error?new eB(t.error,this):null}dynamicPanelAdded(e,t,s,i){!this.isLoadingFromJson&&i&&this.updateVisibleIndexes(e.page),this.onDynamicPanelAdded.fire(this,{question:e,panel:s,panelIndex:t})}dynamicPanelRemoved(e,t,s,i){for(var n=s?s.questions:[],r=0;r<n.length;r++)n[r].clearOnDeletingContainer();i&&this.updateVisibleIndexes(e.page),this.onDynamicPanelRemoved.fire(this,{question:e,panelIndex:t,panel:s})}
10dynamicPanelRemoving(e,t,s){let i={question:e,panelIndex:t,panel:s,allow:!0};return this.onDynamicPanelRemoving.fire(this,i),i.allow}dynamicPanelGetTabTitle(e,t){t.question=e,this.onGetDynamicPanelTabTitle.fire(this,t)}dynamicPanelCurrentIndexChanged(e,t){t.question=e,this.onDynamicPanelCurrentIndexChanged.fire(this,t),this.doUIStateChanged("activePanelIndex",e)}dragAndDropAllow(e){return this.onDragDropAllow.fire(this,e),e.allow}elementContentVisibilityChanged(e){this.currentPage&&this.currentPage.ensureRowsVisibility(),this.onElementContentVisibilityChanged.fire(this,{element:e}),this.doUIStateChanged("collapsed",e)}doUIStateChanged(e,t){this.onUIStateChanged.isEmpty||this.onUIStateChanged.fire(this,{changedProperty:e,element:t})}getUpdatedPanelFooterActions(e,t,s){let i={question:s,panel:e,actions:t};return this.onGetPanelFooterActions.fire(this,i),i.actions}getUpdatedElementTitleActions(e,t){return e.isPage?this.getUpdatedPageTitleActions(e,t):e.isPanel?this.getUpdatedPanelTitleActions(e,t):this.getUpdatedQuestionTitleActions(e,t)}getTitleActionsResult(e,t){return e!=t.actions?t.actions:e!=t.titleActions?t.titleActions:e}getUpdatedQuestionTitleActions(e,t){let s={question:e,actions:t,titleActions:t};return this.onGetQuestionTitleActions.fire(this,s),this.getTitleActionsResult(t,s)}getUpdatedPanelTitleActions(e,t){let s={panel:e,actions:t,titleActions:t};return this.onGetPanelTitleActions.fire(this,s),this.getTitleActionsResult(t,s)}getUpdatedPageTitleActions(e,t){var s={page:e,actions:t,titleActions:t};return this.onGetPageTitleActions.fire(this,s),this.getTitleActionsResult(t,s)}getUpdatedMatrixRowActions(e,t,s){let i={question:e,actions:s,row:t};return this.onGetMatrixRowActions.fire(this,i),i.actions}scrollElementToTop(e,t,s,i,n,r,a,o){let{element:l,question:u,page:h,id:d,scrollIfVisible:c,scrollIntoViewOptions:g,passedRootElement:m,onScolledCallback:v}=e&&"function"==typeof e.getType?{element:e,question:t,page:s,id:i,scrollIfVisible:n,scrollIntoViewOptions:r,passedRootElement:a,onScolledCallback:o}:e,C={element:l,question:u,page:h,elementId:d,cancel:!1,allow:!0};if(this.onScrollToTop.fire(this,C),!C.cancel&&C.allow){let e=this.getPageByElement(l),t=l,s=l.parentQuestion;!e&&s&&(e=this.getPageByElement(s),t=s);let{rootElement:i}=p.environment,n=this.rootElement||m||i;if(this.isLazyRendering&&e){let s=1;this.skeletonHeight&&n&&"function"==typeof n.getBoundingClientRect&&(s=n.getBoundingClientRect().height/this.skeletonHeight-1),e.forceRenderElement(t,()=>{let t=null==n?void 0:n.querySelector(`#${C.elementId}`);this.suspendLazyRendering(),tL.ScrollElementToTop(t,c,g,()=>{this.releaseLazyRendering(),e6(n.querySelector(`#${e.id}`)),v&&v()})},s)}else if(l.isPage&&!this.isSinglePage&&!this.isDesignMode&&this.rootElement){let e=n.querySelector(e8(this.css.rootWrapper));tL.ScrollElementToViewCore(e,!1,c,g,v)}else{let e=null==n?void 0:n.querySelector(`#${C.elementId}`);this.suspendLazyRendering(),tL.ScrollElementToTop(e,c,g,()=>{this.releaseLazyRendering(),e6(e),v&&v()})}}}chooseFiles(e,t,s){if(this.onOpenFileChooser.isEmpty)i.isFileReaderAvailable()&&(e.value="",e.onchange=s=>{if(!i.isFileReaderAvailable()||!e||!e.files||e.files.length<1)return;let n=[];for(let t=0;t<e.files.length;t++)n.push(e.files[t]);t(n)},e.click());else this.onOpenFileChooser.fire(this,{input:e,element:s&&s.element||this.survey,elementType:s&&s.elementType,item:s&&s.item,propertyName:s&&s.propertyName,callback:t,context:s})}uploadFiles(e,t,s,i,n){this.onUploadFiles.isEmpty?i("error",this.getLocString("noUploadFilesHandler")):this.taskManager.runTask("file",r=>{this.onUploadFiles.fire(this,{question:e,name:t,sourceType:n,files:s||[],callback:(e,t)=>{i(e,t),r()}})}),this.surveyPostId&&this.uploadFilesCore(t,s,i)}downloadFile(e,t,s,i){this.onDownloadFile.isEmpty&&i&&i("skipped",s.content||s),this.onDownloadFile.fire(this,{question:e,name:t,content:s.content||s,fileValue:s,
10callback:i})}clearFiles(e,t,s,i,n){this.onClearFiles.isEmpty&&n&&n("success",s),this.onClearFiles.fire(this,{question:e,name:t,value:s,fileName:i,callback:n})}updateChoicesFromServer(e,t,s){var i={question:e,choices:t,serverResult:s};return this.onChoicesLoaded.fire(this,i),i.choices}loadedChoicesFromServer(e){this.locStrsChanged()}uploadFilesCore(e,t,s){this.reportWarningOnUsingService()}getPage(e){return this.pages[e]}addPage(e,t=-1){null!=e&&(t<0||t>=this.pages.length?this.pages.push(e):this.pages.splice(t,0,e))}addNewPage(e=null,t=-1){var s=this.createNewPage(e);return this.addPage(s,t),s}removePage(e){var t=this.pages.indexOf(e);t<0||(this.pages.splice(t,1),this.currentPage==e&&(this.currentPage=this.pages.length>0?this.pages[0]:null))}getQuestionByName(e,t=!1){let s=this.getQuestionsFromHash(this.questionHashes.names,this.questionHashes.namesInsensitive,e,t);return s?s[0]:null}findQuestionByName(e){return this.getQuestionByName(e)}getEditingSurveyElement(){return this.editingObjValue}getQuestionByValueName(e,t=!1){var s=this.getQuestionsByValueName(e,t);return s?s[0]:null}getQuestionsByValueName(e,t=!1){return this.getQuestionsFromHash(this.questionHashes.valueNames,this.questionHashes.valueNamesInsensitive,e,t)}getCalculatedValueByName(e){for(var t=0;t<this.calculatedValues.length;t++)if(e==this.calculatedValues[t].name)return this.calculatedValues[t];return null}getQuestionsFromHash(e,t,s,i){if(!s)return null;let n=e[s];return n||i&&(n=t[s=s.toLowerCase()])?n:null}getQuestionsByNames(e,t=!1){var s=[];if(!e)return s;for(var i=0;i<e.length;i++)if(e[i]){var n=this.getQuestionByName(e[i],t);n&&s.push(n)}return s}getPageByElement(e){for(var t=0;t<this.pages.length;t++){var s=this.pages[t];if(s.containsElement(e))return s}return null}getPageByQuestion(e){return this.getPageByElement(e)}getPageByName(e){for(var t=0;t<this.pages.length;t++)if(this.pages[t].name==e)return this.pages[t];return null}getPagesByNames(e){var t=[];if(!e)return t;for(var s=0;s<e.length;s++)if(e[s]){var i=this.getPageByName(e[s]);i&&t.push(i)}return t}getAllQuestions(e=!1,t=!1,s=!1){s&&(t=!1,(e?this.visiblePages:this.pages).forEach(e=>e.onFirstRendering()));for(var i=[],n=0;n<this.pages.length;n++)this.pages[n].addQuestionsToList(i,e,t);return s?this.getNestedQuestionsByQuestionArray(i,e):i}getNestedQuestionsByQuestionArray(e,t){let s=[];return e.forEach(e=>{e.getNestedQuestions(t,!0,!0).forEach(e=>s.push(e))}),s}getQuizQuestions(){for(var e=[],t=this.getPageStartIndex(),s=t;s<this.pages.length;s++)if(this.pages[s].isVisible)for(var i=this.pages[s].questions,n=0;n<i.length;n++){var r=i[n];r.quizQuestionCount>0&&e.push(r)}return e}getPanelByName(e,t=!1){var s=this.getAllPanels();t&&(e=e.toLowerCase());for(var i=0;i<s.length;i++){var n=s[i].name;if(t&&(n=n.toLowerCase()),n==e)return s[i]}return null}getAllPanels(e=!1,t=!1){for(var s=[],i=0;i<this.pages.length;i++)this.pages[i].addPanelsIntoList(s,e,t);return s}createNewPage(e){let t=H.createClass("page");return t.name=e,t}getValueChangeReason(){return this.isSettingValueOnExpression?"expression":this.isSettingValueFromTrigger?"trigger":void 0}questionOnValueChanging(e,t,s){if(this.editingObj){let s=H.findProperty(this.editingObj.getType(),e);s&&(t=s.settingValue(this.editingObj,t))}if(this.onValueChanging.isEmpty)return t;var i={name:e,question:this.getQuestionByValueName(s||e),value:this.getUnbindValue(t),oldValue:this.getValue(e),reason:this.getValueChangeReason()};return this.onValueChanging.fire(this,i),i.value}getLocNotification(e,t,s){return!!(!1===e&&w.isTwoValueEquals(t,s,!1,!0,!1))||e}updateQuestionValue(e,t){if(!this.isLoadingFromJson){var s=this.getQuestionsByValueName(e);if(s)for(var i=0;i<s.length;i++){var n=s[i].value;(n===t&&Array.isArray(n)&&this.editingObj||!this.isTwoValueEquals(n,t))&&s[i].updateValueFromSurvey(t,!1)}}}validateQuestionOnValueChanged(e){!this.isNavigationButtonPressed&&(this.isValidateOnValueChanged||e.getAllErrors().length>0)&&this.validateQuestionOnValueChangedCore(e)}validateQuestionOnValueChangedCore(e){var t=e.getAllErrors().length;let s=e.validate(!0,!1,!this.isValidateOnValueChanging,void 0,this.isValidateOnValueChanging);return e.page&&this.isValidateOnValueChange&&(t>0||e.getAllErrors().length>0)&&this.fireValidatedErrorsOnPage(e.page),s}validateOnValueChanging(e,t){if(this.isLoadingFromJson)return!1;let s=this.getQuestionsByValueName(e);
10if(!s)return!1;let i=!0;for(let e=0;e<s.length;e++){let n=s[e];this.isTwoValueEquals(n.valueForSurvey,t)||(n.value=t),i=this.validateQuestionOnValueChangedCore(n)&&i&&0==n.errors.length}return i}fireOnValueChanged(e,t,s){this.onValueChanged.fire(this,{name:e,question:s,value:t,reason:this.getValueChangeReason()})}notifyQuestionOnValueChanged(e,t,s){if(!this.isLoadingFromJson){var i=this.getQuestionsByValueName(e);if(i)for(var n=0;n<i.length;n++){var r=i[n];this.validateQuestionOnValueChanged(r),r.onSurveyValueChanged(t)}this.updateProgressText(!0),this.fireOnValueChanged(e,t,s?this.getQuestionByName(s):void 0),this.isDisposed||(this.checkElementsBindings(e,t),this.notifyElementsOnAnyValueOrVariableChanged(e,s))}}checkElementsBindings(e,t){this.isRunningElementsBindings=!0;for(var s=0;s<this.pages.length;s++)this.pages[s].checkBindings(e,t);this.isRunningElementsBindings=!1,this.updateVisibleIndexAfterBindings&&(this.updateVisibleIndexes(),this.updateVisibleIndexAfterBindings=!1)}notifyElementsOnAnyValueOrVariableChanged(e,t){if("processing"!==this.isEndLoadingFromJson){if(this.isRunningConditions){this.conditionNotifyElementsOnAnyValueOrVariableChanged=!0;return}for(var s=0;s<this.pages.length;s++)this.pages[s].onAnyValueChanged(e,t);this.isEndLoadingFromJson||this.locStrsChanged()}}updateAllQuestionsValue(e){for(var t=this.getAllQuestions(),s=0;s<t.length;s++){var i=t[s],n=i.getValueName();i.updateValueFromSurvey(this.getValue(n),e),i.requireUpdateCommentValue&&i.updateCommentFromSurvey(this.getComment(n))}}notifyAllQuestionsOnValueChanged(){for(var e=this.getAllQuestions(),t=0;t<e.length;t++)e[t].onSurveyValueChanged(this.getValue(e[t].getValueName()))}checkOnPageTriggers(e){for(var t=this.getCurrentPageQuestions(!0),s={},i=0;i<t.length;i++){var n=t[i].getValueName();s[n]=this.getValue(n)}this.addCalculatedValuesIntoFilteredValues(s),this.checkTriggers(s,!0,e)}getCurrentPageQuestions(e=!1){var t=[],s=this.currentPage;if(!s)return t;for(var i=0;i<s.questions.length;i++){var n=s.questions[i];(e||n.visible)&&n.name&&t.push(n)}return t}checkTriggers(e,t,s=!1,i=!1,n){if(this.isCompleted||0==this.triggers.length||this.isDisplayMode)return;if(this.isTriggerIsRunning){for(var r in e)this.triggerKeys[r]=e[r];return}let a=!1;if(!s&&n&&this.hasRequiredValidQuestionTrigger){let e=this.getQuestionByValueName(n);a=e&&!e.validate(!1)}this.isTriggerIsRunning=!0,this.triggerKeys=e;let o=this.getFilteredProperties(),l={isOnNextPage:t,isOnComplete:s,isOnNavigation:i,keys:this.triggerKeys,properties:o},u=w.createCopy(this.triggerKeys);for(let e=0;e<3&&(this.runSurveyTriggers(l,a),!(this.isCompleted||w.isTwoValueEquals(u,this.triggerKeys)));e++)this.triggerKeys=w.createDiff(this.triggerKeys,u),u=w.createCopy(this.triggerKeys);this.canBeCompletedByTrigger!=this.canBeCompletedByTrigger&&this.updateButtonsVisibility(),this.isTriggerIsRunning=!1}runSurveyTriggers(e,t){for(let s=0;s<this.triggers.length;s++){let i=this.triggers[s];t&&i.requireValidQuestion||(e.keys=this.triggerKeys,i.checkExpression(e))}}checkTriggersAndRunConditions(e,t,s){var i={};i[e]={newValue:t,oldValue:s},this.runConditionOnValueChanged(e,t),this.checkTriggers(i,!1,!1,!1,e)}get hasRequiredValidQuestionTrigger(){for(let e=0;e<this.triggers.length;e++)if(this.triggers[e].requireValidQuestion)return!0;return!1}doElementsOnLoad(){for(var e=0;e<this.pages.length;e++)this.pages[e].onSurveyLoad()}get isRunningConditions(){return this.isRunningConditionsValue}runExpressions(){this.runConditions()}runConditions(){if(!this.isCompleted&&"processing"!==this.isEndLoadingFromJson&&!this.isRunningConditions){this.isRunningConditionsValue=!0;var e=this.getFilteredProperties();this.runConditionsCore(e),this.isRunningConditionsValue=!1,this.isValueChangedOnRunningCondition&&this.conditionRunnerCounter<p.maxConditionRunCountOnValueChanged?(this.isValueChangedOnRunningCondition=!1,this.conditionRunnerCounter++,this.runConditions()):(this.isValueChangedOnRunningCondition=!1,this.conditionRunnerCounter=0,this.conditionUpdateVisibleIndexes&&(this.conditionUpdateVisibleIndexes=!1,this.updateVisibleIndexes()),this.conditionNotifyElementsOnAnyValueOrVariableChanged&&(this.conditionNotifyElementsOnAnyValueOrVariableChanged=!1,this.notifyElementsOnAnyValueOrVariableChanged("")))}}runConditionOnValueChanged(e,t){this.questionTriggersKeys||(this.questionTriggersKeys={}),this.questionTriggersKeys[e]=t,this.isRunningConditions?this.isValueChangedOnRunningCondition=!0:(this.runConditions(),this.runQuestionsTriggers(e,t),this.questionTriggersKeys=void 0)}runConditionsCore(e){for(var t=this.pages,s=0;s<this.calculatedValues.length;s++)this.calculatedValues[s].resetCalculation();for(var s=0;s<this.calculatedValues.length;s++)this.calculatedValues[s].doCalculation(this.calculatedValues,e);super.runConditionCore(e);for(let s=0;s<t.length;s++)t[s].runCondition(e)}runQuestionsTriggers(e,t){this.isDisplayMode||this.isDesignMode||this.getAllQuestions().forEac
10h(s=>{s.runTriggers(e,t,this.questionTriggersKeys)})}sendResult(e=null,t=null,s=!1){!this.isEditMode||(s&&this.onPartialSend&&this.onPartialSend.fire(this,null),!e&&this.surveyPostId&&(e=this.surveyPostId),e&&(t&&(this.clientId=t),(!s||this.clientId)&&this.reportWarningOnUsingService()))}getResult(e,t){this.reportWarningOnUsingService()}loadSurveyFromService(e=null,t=null){e&&(this.surveyId=e),t&&(this.clientId=t),this.reportWarningOnUsingService()}reportWarningOnUsingService(){Y.warn("Self-hosted Form Library no longer supports integration with SurveyJS Demo Service. Learn more: https://surveyjs.io/stay-updated/release-notes/v2.0.0#form-library-removes-apis-for-integration-with-surveyjs-demo-service")}loadSurveyFromServiceJson(e){e&&(this.fromJSON(e),this.notifyAllQuestionsOnValueChanged(),this.onLoadSurveyFromService(),this.onLoadedSurveyFromService.fire(this,{}))}onLoadingSurveyFromService(){}onLoadSurveyFromService(){}resetVisibleIndexes(){for(var e=this.getAllQuestions(!0),t=0;t<e.length;t++)e[t].setVisibleIndex(-1);this.updateVisibleIndexes()}updateVisibleIndexes(e){if(!this.isLoadingFromJson&&!this.isEndLoadingFromJson){if(this.isRunningConditions&&this.onQuestionVisibleChanged.isEmpty&&this.onPageVisibleChanged.isEmpty){this.conditionUpdateVisibleIndexes=!0;return}if(this.isRunningElementsBindings){this.updateVisibleIndexAfterBindings=!0;return}this.updatePageVisibleIndexes(),this.updatePageElementsVisibleIndexes(e),this.updateProgressText(!0)}}updatePageElementsVisibleIndexes(e){if("onPage"==this.showQuestionNumbers)for(var t=e?[e]:this.visiblePages,s=0;s<t.length;s++)t[s].setVisibleIndex(0);else{let e=this.getStartVisibleIndex(),t=this.pages;for(let s=0;s<t.length;s++)e+=t[s].setVisibleIndex(e)}}getStartVisibleIndex(){let e=this.showQuestionNumbers;return"on"===e||"recursive"===e?0:-1}updatePageVisibleIndexes(){this.updateButtonsVisibility();let e=0,t=1;this.pages.forEach(e=>{});for(var s=0;s<this.pages.length;s++){let i=this.pages[s],n=i.isVisible&&(s>0||!i.isStartPage);i.questionStartIndex&&(t=1),i.visibleIndex=n?e++:-1,i.num=n?t++:-1}}fromJSON(e,t){if(!e)return;this.resetHasLogo(),this.resetPropertyValue("titleIsEmpty"),this.questionHashesClear(),this.jsonErrors=null,this.sjsVersion=void 0;let s=new Q;s.toObject(e,this,t),s.errors.length>0&&(this.jsonErrors=s.errors),this.onStateAndCurrentPageChanged(),this.endLoading(),this.updateState(),this.sjsVersion&&p.version&&w.compareVerions(this.sjsVersion,p.version)>0&&Y.warn("The version of the survey JSON schema (v"+this.sjsVersion+") is newer than your current Form Library version ("+p.version+"). Please update the Form Library to make sure that all survey features work as expected.")}toJSON(e){let t=super.toJSON(e);if((null==e?void 0:e.storeLocaleStrings)==="stringsOnly"){let s=e.locales;Array.isArray(s)&&1===s.length&&(t.locale=s[0])}return t}mergeLocalizationJSON(e,t){let s=new ip(e);if(s.locale&&(t=[s.locale]),Array.isArray(t)){let e=I.defaultLocale,s=p.localization.defaultLocaleName;if(e!==s)for(let i=0;i<t.length;i++)t[i]===e&&(t[i]=s)}this.mergeLocalizationObj(s,t)}isPropertyStoredInHash(e){return!0}startLoadingFromJson(e){super.startLoadingFromJson(e),e&&e.locale&&(this.locale=e.locale)}setJsonObject(e){this.fromJSON(e)}endLoadingFromJson(){this.isEndLoadingFromJson="processing",this.onFirstPageIsStartedChanged(),super.endLoadingFromJson(),this.hasCookie&&(this.isCompletedBefore=!0),this.doElementsOnLoad(),this.onQuestionsOnPageModeChanged("standard"),this.isEndLoadingFromJson="conditions",this.runConditions(),this.notifyElementsOnAnyValueOrVariableChanged(""),this.isEndLoadingFromJson=null,this.updateVisibleIndexes(),this.updateCurrentPage(),this.setCalculatedWidthModeUpdater(),this.onEndLoadingFromJson.fire(this,{})}getProcessedTextValue(e){if(this.getProcessedTextValueCore(e),!this.onProcessDynamicText.isEmpty){var t=this.isValueEmpty(e.value);this.onProcessDynamicText.fire(this,e),e.isExists=e.isExists||t&&!this.isValueEmpty(e.value)}}getProcessedTextValueCore(e){let t=e.name.toLocaleLowerCase();if(-1!==["no","require","title"].indexOf(t))return;let s=new z().getValueInfo({name:t,context:this.getValueGetterContext(),isText:!0,isDisplayValue:e.returnDisplayValue});s.isFound&&(e.isExists=!0,e.value=s.value)}clearUnusedValues(){this.isClearingUnsedValues=!0;for(var e=this.getAllQuestions(),t=0;t<e.length;t++)e[t].clearUnusedValues();this.clearInvisibleQuestionValues(),this.isClearingUnsedValues=!1}hasVisibleQuestionByValueName(e){var t=this.getQuestionsByValueName(e.getValueName());if(!Array.isArray(t)||t.length<2)return!1;for(var s=0;s<t.length;s++){let i=t[s];if(i!==e&&i.isVisible&&i.isParentVisible&&!i.parentQuestion&&i.parentQuestion===e.parentQuestion)return!0}return!1}questionsByValueName(e){return this.getQuestionsByValueName(e)||[]}clearInvisibleQuestionValues(){let e="none"===this.clearInvisibleValues?"none":"onComplete",t=this.getAllQuestions();for(var s=0;s<t.length;s++)t[s].clearValueIfInvisible(e)}getVariable(e){if(!e)return null;e=e.toLowerCase();let t=this.getVariableCore(e);return eC(e,t,!0),t}getVariableCore(e){let t=this.variablesHash[e];return this.isValueEmpty(t)&&(e.indexOf(".")>-1||e.indexOf("[")>-1)?new z().getValue(e,new W(this.variablesHash)):t}setVariable(e,t){if(!e)return;let s=this.getVariable(e);this.valuesHash&&delete this.valuesHash[e],e=e.toLowerCase(),this.variablesHash[e]=t,this.notifyElementsOnAnyValueOrVariableChanged(e),w.isTwoValueEquals(s,t)||(this.checkTriggersAndRunConditions(e,t,s),this.onVariableChanged.fire(this,{name:e,value:t}))}getVariableNames(){var e=[];for(var t in this.variablesHash)e.push(t);return e}getUnbindValue(e){return this.editingObj?e:w.getUnbindValue(e)}getValue(e){if(!e||0==e.length)return null;var t=this.getDataValueCore(this.valuesHash,e);let s=this.getUnbindValue(t);return eC(e,s),s}setValue(e,t,s=!1,i=!0,n){var r=t;if((i&&(r=this.questionOnValueChanging(e,t)),!this.isValidateOnValueChanging||this.validateOnValueChanging(e,r))&&!(!this.editingObj&&this.isValueEqual(e,r)&&this.isTwoValueEquals(r,t))){var a=this.getValue(e);this.isValueEmpyOnSetValue(e,r)?this.deleteDataValueCore(this.valuesHash,e):(r=this.getUnbindValue(r),this.setDataValueCore(this.valuesHash,e,r)),s=this.getLocNotification(s,r,a),this.updateOnSetValue(e,r,a,s,i,n)}}getDynamicPanelOptions(e,t,s){let i=e.parentQuestion;if(!i||!i.isDescendantOf("paneldynamic")||t.isEmpty)return;let n=i.getValueChangingOptions(e);return n&&s&&(n.name=e.name+this.commentSuffix),n}
10questionValueChanging(e,t,s){let i=this.getDynamicPanelOptions(e,this.onDynamicPanelValueChanging,s);return i?(i.value=t,this.onDynamicPanelValueChanging.fire(this,i),i.value):t}questionValueChanged(e,t,s){let i=this.getDynamicPanelOptions(e,this.onDynamicPanelValueChanged,s);i&&(i.value=s?e.comment:e.value,i.oldValue=t,this.onDynamicPanelValueChanged.fire(this,i))}isValueEmpyOnSetValue(e,t){return!!this.isValueEmpty(t,!1)&&(!this.editingObj||null==t||this.editingObj.getDefaultPropertyValue(e)===t)}updateOnSetValue(e,t,s,i=!1,n=!0,r){this.updateQuestionValue(e,t),!0===i||this.isDisposed||this.isRunningElementsBindings||(r=r||e,this.nofifyQuesitonHash[e]=!0,this.checkTriggersAndRunConditions(e,t,s),this.nofifyQuesitonHash[e]&&(n&&this.notifyQuestionOnValueChanged(e,t,r),"text"!==i&&this.tryGoNextPageAutomatic(e),delete this.nofifyQuesitonHash[e]))}isValueEqual(e,t){(""===t||void 0===t)&&(t=null);var s=this.getValue(e);return((""===s||void 0===s)&&(s=null),null===t||null===s)?t===s:this.isTwoValueEquals(t,s)}doOnPageAdded(e){e.setSurveyImpl(this),e.name||(e.name=this.generateNewName(this.pages,"page")),this.questionHashesPanelAdded(e),this.updateVisibleIndexes(),!this.runningPages&&(this.isLoadingFromJson||(this.updateProgressText(),this.updateCurrentPage()),this.canFireAddPage()&&this.onPageAdded.fire(this,{page:e}))}canFireAddPage(){return!this.isMovingPage}doOnPageRemoved(e){e.setSurveyImpl(null),this.runningPages||(e===this.currentPage&&this.updateCurrentPage(),this.updateVisibleIndexes(),this.updateProgressText(),this.updateLazyRenderingRowsOnRemovingElements())}generateNewName(e,t){for(var s={},i=0;i<e.length;i++)s[e[i].name]=!0;for(var n=1;s[t+n];)n++;return t+n}getNewGeneratedName(e,t){return this.generateNewName(e,t)}tryGoNextPageAutomatic(e){if(this.isEndLoadingFromJson||!this.autoAdvanceEnabled||!this.currentPage)return;let t=this.getQuestionByValueName(e);if(!t||t&&(!t.visible||!t.supportAutoAdvance())||!t.validate(!1)&&!t.supportGoNextPageError())return;if(this.currentSingleElement){let e=this.currentSingleElement,t=()=>{e===this.currentSingleElement&&(this.isLastElement?this.autoAdvanceAllowComplete&&this.tryCompleteOrShowPreview():this.performNext())};s7.safeTimeOut(t,p.autoAdvanceDelay)}var s=this.getCurrentPageQuestions();if(0>s.indexOf(t))return;for(var i=0;i<s.length;i++)if(s[i].hasInput&&s[i].isEmpty())return;if(this.isLastPage&&(!0!==this.autoAdvanceEnabled||!this.autoAdvanceAllowComplete)||!this.validateActivePage(!1))return;let n=this.currentPage,r=()=>{n===this.currentPage&&(this.isLastPage?this.tryCompleteOrShowPreview():this.nextPage())};s7.safeTimeOut(r,p.autoAdvanceDelay)}tryCompleteOrShowPreview(){this.showPreviewBeforeComplete?this.showPreview():this.tryComplete()}getComment(e){return this.getValue(e+this.commentSuffix)||""}setComment(e,t,s=!1){if(t||(t=""),this.isTwoValueEquals(t,this.getComment(e)))return;let i=e+this.commentSuffix;t=this.questionOnValueChanging(i,t,e),s=this.getLocNotification(s,t,this.getComment(e)),this.isValueEmpty(t)?this.deleteDataValueCore(this.valuesHash,i):this.setDataValueCore(this.valuesHash,i,t);var n=this.getQuestionsByValueName(e);if(n)for(var r=0;r<n.length;r++)n[r].updateCommentFromSurvey(t),this.validateQuestionOnValueChanged(n[r]);s||this.checkTriggersAndRunConditions(e,this.getValue(e),void 0),"text"!==s&&this.tryGoNextPageAutomatic(e);var a=this.getQuestionByValueName(e);a&&(this.fireOnValueChanged(i,t,a),a.comment=t,a.comment!=t&&(a.comment=t))}clearValue(e){this.setValue(e,null),this.setComment(e,null)}get clearValueOnDisableItems(){return this.clearDisabledChoices}set clearValueOnDisableItems(e){this.clearDisabledChoices=e}getQuestionClearIfInvisible(e){return this.isShowingPreview||this.runningPages?"none":"default"!==e?e:this.clearInvisibleValues}questionVisibilityChanged(e,t,s){s&&this.updateVisibleIndexes(e.page),t||this.changeCurrentSingleElementOnVisibilityChanged(),this.onQuestionVisibleChanged.fire(this,{question:e,name:e.name,visible:t})}pageVisibilityChanged(e,t){if(this.isLoadingFromJson)return;(t&&!this.currentPage||e===this.currentPage)&&this.updateCurrentPage(),this.updateVisibleIndexes(),t||this.changeCurrentSingleElementOnVisibilityChanged();let s=this.currentSingleElement,i=this.currentPage;s&&i&&s.page!==i&&(this.currentSingleElement=i.getFirstVisibleElement()),this.onPageVisibleChanged.fire(this,{page:e,visible:t}),this.onPagesVisibleChangedCallback&&this.onPagesVisibleChangedCallback()}panelVisibilityChanged(e,t){e.page&&(this.updateVisibleIndexes(e.page),t||this.changeCurrentSingleElementOnVisibilityChanged()),this.onPanelVisibleChanged.fire(this,{panel:e,visible:t})}questionCreated(e){this.onQuestionCreated.fire(this,{question:e})}questionAdded(e,t,s,i){e.name||(e.name=this.generateNewName(this.getAllQuestions(!1,!0),"question")),e.page&&this.questionHashesAdded(e),this.isLoadingFromJson||(this.currentPage||this.updateCurrentPage(),this.updateVisibleIndexes(e.page),this.setCalculatedWidthModeUpdater()),this.canFireAddElement()&&this.onQuestionAdded.fire(this,{question:e,name:e.name,index:t,parent:s,page:i,parentPanel:s,rootPanel:i})}canFireAddElement(){return!this.isMovingQuestion}questionRemoved(e){this.questionHashesRemoved(e,e.name,e.getValueName()),this.updateVisibleIndexes(e.page),this.onQuestionRemoved.fire(this,{question:e,name:e.name}),this.updateLazyRenderingRowsOnRemovingElements()}questionRenamed(e,t,s){this.questionHashesRemoved(e,t,s),this.questionHashesAdded(e)}questionHashesClear(){this.questionHashes.names={},this.questionHashes.namesInsensitive={},this.questionHashes.valueNames={},this.questionHashes.valueNamesInsensitive={}}questionHashesPanelAdded(e){if(!this.isLoadingFromJson)for(var t=e.questions,s=0;s<t.length;s++)this.questionHashesAdded(t[s])}questionHashesAdded(e){this.questionHashAddedCore(this.questionHashes.names,e,e.name),this.questionHashAddedCore(this.questionHashes.namesInsensitive,e,e.name.toLowerCase()),this.questionHashAddedCore(this.questionHashes.valueNames,e,e.getValueName()),this.questionHashAddedCore(this.questionHashes.valueNamesInsensitive,e,e.getValueName().toLowerCase())}questionHashesRemoved(e,t,s){t&&(this.questionHashRemovedCore(this.questionHashes.names,e,t),this.questionHashRemovedCore(this.questionHashes.namesInsensitive,e,t.toLowerCase())),s&&(this.questionHashRemovedCore(this.questionHashes.valueNames,e,s),this.questionHashRemovedCore(this.questionHashes.valueNamesInsensitive,e,s.toLowerCase()))}
10questionHashAddedCore(e,t,s){var i=e[s];if(i){var i=e[s];0>i.indexOf(t)&&i.push(t)}else e[s]=[t]}questionHashRemovedCore(e,t,s){var i=e[s];if(i){var n=i.indexOf(t);n>-1&&i.splice(n,1),0==i.length&&delete e[s]}}panelAdded(e,t,s,i){e.name||(e.name=this.generateNewName(this.getAllPanels(!1,!0),"panel")),this.questionHashesPanelAdded(e),this.updateVisibleIndexes(e.page),this.canFireAddElement()&&this.onPanelAdded.fire(this,{panel:e,name:e.name,index:t,parent:s,page:i,parentPanel:s,rootPanel:i})}panelRemoved(e){this.updateVisibleIndexes(e.page),this.onPanelRemoved.fire(this,{panel:e,name:e.name}),this.updateLazyRenderingRowsOnRemovingElements()}validateQuestion(e,t,s){if(!this.onValidateQuestion.isEmpty){var i={name:e.name,question:e,value:e.value,errors:t,error:null};this.onValidateQuestion.fire(this,i),i.error&&t.push(new eB(i.error,this))}s&&this.beforeSettingQuestionErrors(e,t)}validatePanel(e,t,s){if(e.isPanel&&!this.onValidatePanel.isEmpty){let s={name:e.name,panel:e,error:null,errors:t};this.onValidatePanel.fire(this,s),s.error&&t.push(new eB(s.error,this))}s&&this.makeRequiredErrorsInvisible(t)}processHtml(e,t){t||(t="");var s={html:e,reason:t};return this.onProcessHtml.fire(this,s),this.processText(s.html,!0)}getValueGetterContext(){return new ic(this,this.valuesHash,this.variablesHash)}processText(e,t,s){return this.processTextEx({text:e,returnDisplayValue:t,doEncoding:!1,context:s}).text}processTextEx(e){return(void 0===e.doEncoding&&(e.doEncoding=p.web.encodeUrlParams),e.runAtDesign||!this.isDesignMode)?this.textPreProcessor.processTextEx(e):{text:e.text,hasAllValuesOnLastRun:!1}}get textPreProcessor(){return this.textPreProcessorValue||(this.textPreProcessorValue=new sl(this),this.textPreProcessorValue.onProcess=e=>{this.getProcessedTextValue(e)}),this.textPreProcessorValue}getSurveyMarkdownHtml(e,t,s,i){let n={element:e,text:t,name:s,item:i,html:null};return this.onTextMarkdown.fire(this,n),n.html}getCorrectedAnswerCount(){return this.getCorrectAnswerCount()}getCorrectAnswerCount(){return this.getCorrectedAnswerCountCore(!0)}getQuizQuestionCount(){for(var e=this.getQuizQuestions(),t=0,s=0;s<e.length;s++)t+=e[s].quizQuestionCount;return t}getInCorrectedAnswerCount(){return this.getIncorrectAnswerCount()}getInCorrectAnswerCount(){return this.getIncorrectAnswerCount()}getIncorrectAnswerCount(){return this.getCorrectedAnswerCountCore(!1)}onCorrectQuestionAnswer(e,t){this.onIsAnswerCorrect.isEmpty||(t.question=e,this.onIsAnswerCorrect.fire(this,t))}getCorrectedAnswerCountCore(e){var t=this.getQuizQuestions(),s=0;for(let i=0;i<t.length;i++){let n=t[i],r=n.correctAnswerCount;e?s+=r:s+=n.quizQuestionCount-r}return s}getCorrectedAnswers(){return this.getCorrectedAnswerCount()}getInCorrectedAnswers(){return this.getInCorrectedAnswerCount()}get showTimerPanel(){return this.showTimer?this.timerLocation:"none"}set showTimerPanel(e){this.showTimer="none"!==e,this.showTimer&&(this.timerLocation=e)}get isTimerPanelShowingOnTop(){return this.showTimer&&"top"===this.timerLocation}get isTimerPanelShowingOnBottom(){return this.showTimer&&"bottom"===this.timerLocation}get timerInfoMode(){return this.getTimerInfoVal(this.getPropertyValue("timerInfoMode"))}set timerInfoMode(e){this.setPropertyValue("timerInfoMode",e)}getTimerInfoVal(e){return"all"===e?"combined":e}get showTimerPanelMode(){let e=this.timerInfoMode;return"combined"===e?"all":e}set showTimerPanelMode(e){this.timerInfoMode=this.getTimerInfoVal(e)}updateGridColumns(){this.pages.forEach(e=>e.updateGridColumns())}setCalculatedWidthModeUpdater(){this.isLoadingFromJson||(this.calculatedWidthModeUpdater&&this.calculatedWidthModeUpdater.dispose(),this.calculatedWidthModeUpdater=new eb(()=>this.calculateWidthMode()),this.calculatedWidthMode=this.calculatedWidthModeUpdater)}calculateWidthMode(){if("auto"==this.widthMode){let e=!1;return this.isSingleVisibleInput||this.pages.forEach(t=>{t.needResponsiveWidth()&&(e=!0)}),e?"responsive":"static"}return this.widthMode}get renderedWidth(){let e="static"==this.getPropertyValue("calculatedWidthMode"),t=this.getPropertyValue("width");if(this.isScaled&&this.responsiveStartWidth>1){let s=this.responsiveStartWidth;try{t=t||this.staticStartWidth,s=isNaN(t)?parseFloat(t.toString().replace("px","")):t}catch(e){}return(e?s:this.responsiveStartWidth)*this.widthScale/100+"px"}return t&&!isNaN(t)&&(t+="px"),e&&t||void 0}setStaticStartWidth(e){this.staticStartWidth=e}setResponsiveStartWidth(e){this.responsiveStartWidth=e}get isScaled(){return Math.abs(this.widthScale-100)>.001}get timerInfo(){return this.getTimerInfo()}get timerClock(){let e,t;if(this.currentPage){let{spent:s,limit:i,minorSpent:n,minorLimit:r}=this.getTimerInfo();e=i>0?this.getDisplayClockTime(i-s):this.getDisplayClockTime(s),void 0!==n&&(t=r>0?this.getDisplayClockTime(r-n):this.getDisplayClockTime(n))}return{majorText:e,minorText:t}}get timerInfoText(){let e={text:this.getTimerInfoText()};this.onTimerPanelInfoText.fire(this,e);var t=new R(this,!0);return t.text=e.text,t.textOrHtml}getTimerInfo(){let e=this.currentPage;if(!e)return{spent:0,limit:0};let t=e.timeSpent,s=this.timeSpent,i=e.getMaxTimeToFinish(),n=this.timeLimit;return"page"==this.timerInfoMode?{spent:t,limit:i}:"survey"==this.timerInfoMode?{spent:s,limit:n}:i>0&&n>0?{spent:t,limit:i,minorSpent:s,minorLimit:n}:i>0?{spent:t,limit:i,minorSpent:s}:n>0?{spent:s,limit:n,minorSpent:t}:{spent:t,minorSpent:s}}getTimerInfoText(){var e=this.currentPage;if(!e)return"";var t=this.getDisplayTime(e.timeSpent),s=this.getDisplayTime(this.timeSpent),i=e.getMaxTimeToFinish(),n=this.getDisplayTime(i),r=this.getDisplayTime(this.timeLimit);return"page"==this.timerInfoMode?this.getTimerInfoPageText(e,t,n):"survey"==this.timerInfoMode?this.getTimerInfoSurveyText(s,r):"combined"==this.timerInfoMode?i<=0&&this.timeLimit<=0?this.getLocalizationFormatString("timerSpentAll",t,s):i>0&&this.timeLimit>0?this.getLocalizationFormatString("timerLimitAll",t,n,s,r):this.getTimerInfoPageText(e,t,n)+" "+this.getTimerInfoSurveyText(s,r):""}
10getTimerInfoPageText(e,t,s){return e&&e.getMaxTimeToFinish()>0?this.getLocalizationFormatString("timerLimitPage",t,s):this.getLocalizationFormatString("timerSpentPage",t,s)}getTimerInfoSurveyText(e,t){let s=this.timeLimit>0?"timerLimitSurvey":"timerSpentSurvey";return this.getLocalizationFormatString(s,e,t)}getDisplayClockTime(e){e<0&&(e=0);let t=Math.floor(e/60),s=e%60,i=s.toString();return s<10&&(i="0"+i),`${t}:${i}`}getDisplayTime(e){let t=Math.floor(e/60),s=e%60,i="";return(t>0&&(i+=t+" "+this.getLocalizationString("timerMin")),i&&0==s)?i:(i&&(i+=" "),i+s+" "+this.getLocalizationString("timerSec"))}get timerModel(){return this.timerModelValue||(this.timerModelValue=new s9(this),this.timerModelValue.onTimerTick=e=>{this.doTimer(e)}),this.timerModelValue}startTimer(){this.isEditMode&&this.timerModel.start()}startTimerFromUI(){this.showTimer&&"running"===this.state&&this.startTimer()}stopTimer(){this.timerModel.stop()}get timeSpent(){return this.timerModel.spent}set timeSpent(e){this.timerModel.spent=e}get maxTimeToFinish(){return this.timeLimit}set maxTimeToFinish(e){this.timeLimit=e}get maxTimeToFinishPage(){return this.timeLimitPerPage}set maxTimeToFinishPage(e){this.timeLimitPerPage=e}doTimer(e){if(this.onTimerTick.fire(this,{}),this.timeLimit>0&&this.timeLimit<=this.timeSpent&&(this.timeSpent=this.timeLimit,this.tryComplete()),e){var t=e.getMaxTimeToFinish();t>0&&t==e.timeSpent&&(this.isLastPage?this.tryComplete():this.nextPage())}}get inSurvey(){return!0}getSurveyData(){return this}getSurvey(){return this}getTextProcessor(){return this}getObjects(e,t){var s=[];return Array.prototype.push.apply(s,this.getPagesByNames(e)),Array.prototype.push.apply(s,this.getQuestionsByNames(t)),s}setTriggerValue(e,t,s){if(e)if(s)this.setVariable(e,t);else{this.startSetValueFromTrigger();let s=new z().getValueInfo({name:e,context:this.getValueGetterContext(),createObjects:!0});s.isFound&&s.question?s.question.value=t:0>e.indexOf(".")&&this.setValue(e,t),this.finishSetValueFromTrigger()}}copyTriggerValue(e,t,s){if(!e||!t)return;let i=new z().getValueInfo({name:t,context:this.getValueGetterContext(),createObjects:!0,isText:s,isDisplayValue:s});i.isFound&&this.setTriggerValue(e,w.getUnbindValue(i.value),!1)}triggerExecuted(e){this.onTriggerExecuted.fire(this,{trigger:e})}get isSettingValueFromTrigger(){return this.setValueFromTriggerCounter>0}startSetValueFromTrigger(){this.setValueFromTriggerCounter++}finishSetValueFromTrigger(){this.setValueFromTriggerCounter--}startMovingQuestion(){this.isMovingQuestion=!0}stopMovingQuestion(){this.isMovingQuestion=!1}get isQuestionDragging(){return this.isMovingQuestion}startMovingPage(){this.isMovingPage=!0}stopMovingPage(){this.isMovingPage=!1}focusQuestion(e){return this.focusQuestionByInstance(this.getQuestionByName(e,!0))}focusQuestionByInstance(e,t=!1){var s;if(!e||!e.isVisible||!e.page||(null==(s=this.focusingQuestionInfo)?void 0:s.question)===e)return!1;this.focusingQuestionInfo={question:e,onError:t};let i=this.currentSingleElement;this.skippedPages.push({from:i||this.currentPage,to:i?e:e.page});let n=this.activePage!==e.page&&!e.page.isStartPage;return n&&(this.currentPage=e.page),this.isSingleVisibleQuestion&&!this.isDesignMode&&(this.currentSingleElement=e),n||this.focusQuestionInfo(),!0}focusQuestionInfo(){var e;let t=null==(e=this.focusingQuestionInfo)?void 0:e.question;t&&!t.isDisposed&&t.focus(this.focusingQuestionInfo.onError),this.focusingQuestionInfo=void 0}questionEditFinishCallback(e,t){let s=this.enterKeyAction||p.enterKeyAction;if("loseFocus"==s&&t.target.blur(),"moveToNextEditor"==s){let s=this.currentPage.questions,i=s.indexOf(e);i>-1&&i<s.length-1?s[i+1].focus():t.target.blur()}}elementWrapperComponentNameCore(e,t,s,i,n){if(this.onElementWrapperComponentName.isEmpty)return e;let r={componentName:e,element:t,wrapperName:s,reason:i,item:n};return this.onElementWrapperComponentName.fire(this,r),r.componentName}elementWrapperDataCore(e,t,s,i,n){if(this.onElementWrapperComponentData.isEmpty)return e;let r={data:e,element:t,wrapperName:s,reason:i,item:n};return this.onElementWrapperComponentData.fire(this,r),r.data}
10getElementWrapperComponentName(e,t){let s="logo-image"===t?"sv-logo-image":ip.TemplateRendererComponentName;return this.elementWrapperComponentNameCore(s,e,"component",t)}getQuestionContentWrapperComponentName(e){return this.elementWrapperComponentNameCore(ip.TemplateRendererComponentName,e,"content-component")}getRowWrapperComponentName(e){return this.elementWrapperComponentNameCore(ip.TemplateRendererComponentName,e,"row")}getItemValueWrapperComponentName(e,t){return this.elementWrapperComponentNameCore(ip.TemplateRendererComponentName,t,"itemvalue",void 0,e)}getElementWrapperComponentData(e,t){return this.elementWrapperDataCore(e,e,"component",t)}getRowWrapperComponentData(e){return this.elementWrapperDataCore(e,e,"row")}getItemValueWrapperComponentData(e,t){return this.elementWrapperDataCore(e,t,"itemvalue",void 0,e)}getMatrixCellTemplateData(e){let t=e.question;return this.elementWrapperDataCore(t,t,"cell")}searchText(e){e&&(e=e.toLowerCase());for(var t=[],s=0;s<this.pages.length;s++)this.pages[s].searchText(e,t);return t}getSkeletonComponentName(e){return this.skeletonComponentName}get layoutElements(){return this.getPropertyValue("layoutElements",void 0,()=>this.createLayoutElements())}createLayoutElements(){let e=[];return e.push({id:"timerpanel",template:"survey-timerpanel",component:"sv-timerpanel",getData:()=>this.timerModel}),e.push({id:"progress-buttons",component:"sv-progress-buttons",getData:()=>this.progressBar,processResponsiveness:e=>this.progressBar.processResponsiveness&&this.progressBar.processResponsiveness(e)}),e.push({id:"progress-questions",component:"sv-progress-questions",data:this}),e.push({id:"progress-pages",component:"sv-progress-pages",data:this}),e.push({id:"progress-correctquestions",component:"sv-progress-correctquestions",data:this}),e.push({id:"progress-requiredquestions",component:"sv-progress-requiredquestions",data:this}),e.push({id:"toc-navigation",component:"sv-navigation-toc",getData:()=>this.tocModel,processResponsiveness:e=>this.tocModel.updateStickyTOCSize(this.rootElement)}),e.push({id:"buttons-navigation",component:"sv-action-bar",getData:()=>this.navigationBar}),e.push({id:"buttons-navigation-top",component:"sv-action-bar",getData:()=>this.navigationBar}),e}addLayoutElement(e){let t=this.removeLayoutElement(e.id);return this.layoutElements.push(e),t}findLayoutElement(e){return this.layoutElements.filter(t=>t.id===e)[0]}removeLayoutElement(e){let t=this.findLayoutElement(e);if(t){let e=this.layoutElements.indexOf(t);this.layoutElements.splice(e,1)}return t}getContainerContent(e){let t=[];for(let s of this.layoutElements)if("display"!==this.mode&&ig(s.id,"timerpanel"))"header"===e&&this.isTimerPanelShowingOnTop&&!this.isStartPageActive&&t.push(s),"footer"===e&&this.isTimerPanelShowingOnBottom&&!this.isStartPageActive&&t.push(s);else if("running"===this.state&&ig(s.id,this.progressBarComponentName)){if("singlePage"!=this.questionsOnPageMode||"questions"==this.progressBarType){let i=this.findLayoutElement("advanced-header"),n=i&&i.data,r=!n||n.hasBackground;ig(this.progressBarLocation,"aboveHeader")&&(r=!1),ig(this.progressBarLocation,"belowHeader")&&(r=!0),this.showTOC&&!(n&&n.hasBackground)&&this.isShowProgressBarOnTop&&!this.isStartPageActive?"center"===e&&(r?delete s.index:s.index=-150,t.push(s)):("header"!==e||r||(s.index=-150,this.isShowProgressBarOnTop&&!this.isStartPageActive&&t.push(s)),"center"===e&&r&&(s.index&&delete s.index,this.isShowProgressBarOnTop&&!this.isStartPageActive&&t.push(s))),"footer"===e&&this.isShowProgressBarOnBottom&&!this.isStartPageActive&&t.push(s)}}else if(ig(s.id,"buttons-navigation-top"))"contentTop"===e&&this.isNavigationButtonsShowingOnTop&&t.push(s);else if(ig(s.id,"buttons-navigation"))"contentBottom"===e&&this.isNavigationButtonsShowingOnBottom&&t.push(s);else if("running"===this.state&&ig(s.id,"toc-navigation")&&this.showTOC)"left"===e&&-1!==["left","both"].indexOf(this.tocLocation)&&t.push(s),"right"===e&&-1!==["right","both"].indexOf(this.tocLocation)&&t.push(s);else if(ig(s.id,"advanced-header")){if("running"===this.state||"starting"===this.state||!0===this.showHeaderOnCompletePage&&"completed"===this.state){let i=s&&s.data;
10this.showTOC&&!(i&&i.hasBackground)?"contentTop"===e&&t.push(s):s.container===e&&t.push(s)}}else(Array.isArray(s.container)&&-1!==s.container.indexOf(e)||s.container===e)&&t.push(s);return t.sort((e,t)=>(e.index||0)-(t.index||0)),t.forEach(e=>{e.getData&&(e.data=e.getData())}),t}processPopupVisiblityChanged(e,t,s){s?this.onScrollCallback=()=>{t.hide()}:this.onScrollCallback=void 0,this.onPopupVisibleChanged.fire(this,{question:e,popup:t,visible:s})}processOpenDropdownMenu(e,t){let s=Object.assign({question:e},t);this.onOpenDropdownMenu.fire(this,s),t.menuType=s.menuType}getCssTitleExpandableSvg(){return null}createCustomChoiceItem(e){this.onCreateCustomChoiceItem.fire(this,e)}applyTheme(e){if(e){if(Object.keys(e).forEach(t=>{"header"!==t&&("isPanelless"===t?this.isCompact=e[t]:this[t]=e[t])}),"header"in e&&!e.headerView&&(this.headerView="advanced"),"basic"!==this.headerView){this.removeLayoutElement("advanced-header");let t=new s8;t.fromTheme(e),this.insertAdvancedHeader(t)}this.themeChanged(e)}}themeChanged(e){this.getAllQuestions().forEach(t=>t.themeChanged(e))}waitAndExecute(e){this.taskManager.waitAndExecute(e)}dispose(){if(this.unConnectEditingObj(),this.removeScrollEventListener(),this.destroyResizeObserver(),this.rootElement=void 0,this.layoutElements){for(var e=0;e<this.layoutElements.length;e++)this.layoutElements[e].data&&this.layoutElements[e].data!==this&&this.layoutElements[e].data.dispose&&this.layoutElements[e].data.dispose();this.layoutElements.splice(0,this.layoutElements.length)}if(super.dispose(),this.editingObj=null,this.pages){this.currentPage=null;for(var e=0;e<this.pages.length;e++)this.pages[e].setSurveyImpl(void 0),this.pages[e].dispose();this.pages.splice(0,this.pages.length),this.disposeCallback&&this.disposeCallback()}}_isElementShouldBeSticky(e){var t;if(!e)return!1;let s=null==(t=this.scrollerElement)?void 0:t.querySelector(e);return!!s&&!!this.scrollerElement&&this.scrollerElement.scrollTop>0&&s.getBoundingClientRect().y<=this.scrollerElement.getBoundingClientRect().y}get rootScrollDisabled(){return!(this.fitToContainer&&this.formScrollDisabled)}get formScrollDisabled(){return!this.backgroundImage||"fixed"!==this.backgroundImageAttachment}onScroll(){this.rootElement&&(this._isElementShouldBeSticky(".sv-components-container-center")?this.rootElement.classList&&this.rootElement.classList.add("sv-root--sticky-top"):this.rootElement.classList&&this.rootElement.classList.remove("sv-root--sticky-top"),this.tocModel&&this.tocModel.updateStickyTOCSize(this.rootElement)),this.onScrollCallback&&this.onScrollCallback()}addScrollEventListener(){this.scrollHandler=()=>{this.onScroll()},this.rootElement.addEventListener("scroll",this.scrollHandler),this.rootElement.getElementsByTagName("form")[0]&&this.rootElement.getElementsByTagName("form")[0].addEventListener("scroll",this.scrollHandler),this.scrollerElement&&this.scrollerElement.addEventListener("scroll",this.scrollHandler)}removeScrollEventListener(){this.rootElement&&this.scrollHandler&&(this.rootElement.removeEventListener("scroll",this.scrollHandler),this.rootElement.getElementsByTagName("form")[0]&&this.rootElement.getElementsByTagName("form")[0].removeEventListener("scroll",this.scrollHandler),this.scrollerElement&&this.scrollerElement.removeEventListener("scroll",this.scrollHandler))}}function ig(e,t){return!!e&&!!t&&e.toUpperCase()===t.toUpperCase()}ip.TemplateRendererComponentName="sv-template-renderer",ip.platform="unknown",V([e_()],ip.prototype,"sjsVersion",void 0),V([e_()],ip.prototype,"$schema",void 0),V([e_()],ip.prototype,"completedCss",void 0),V([e_()],ip.prototype,"completedBeforeCss",void 0),V([e_()],ip.prototype,"loadingBodyCss",void 0),V([e_()],ip.prototype,"containerCss",void 0),V([e_({onSet:(e,t)=>{t.updateCss()}})],ip.prototype,"fitToContainer",void 0),V([e_({onSet:(e,t)=>{if("basic"===e)t.removeLayoutElement("advanced-header");else if(!t.findLayoutElement("advanced-header")){let e=new s8;t.insertAdvancedHeader(e)}}})],ip.prototype,"headerView",void 0),V([e_()],ip.prototype,"showBrandInfo",void 0),V([e_()],ip.prototype,"enterKeyAction",void 0),V([e_()],ip.prototype,"lazyRenderFirstBatchSizeValue",void 0),V([e_()],ip.prototype,"surveyId",void 0),V([e_()],ip.prototype,"surveyPostId",void 0),V([e_()],ip.prototype,"clientId",void 0),V([e_()],ip.prototype,"cookieName",void 0),V([e_()],ip.prototype,"partialSendEnabled",void 0),V([e_()],ip.prototype,"sendResultOnPageNext",void 0),V([e_()],ip.prototype,"surveyShowDataSaving",void 0),V([e_()],ip.prototype,"autoF
10ocusFirstQuestion",void 0),V([e_()],ip.prototype,"autoFocusFirstError",void 0),V([e_()],ip.prototype,"navigationButtonsLocation",void 0),V([e_()],ip.prototype,"showPrevButton",void 0),V([e_({defaultValue:!0})],ip.prototype,"showCompleteButton",void 0),V([e_()],ip.prototype,"showTOC",void 0),V([e_()],ip.prototype,"tocLocation",void 0),V([e_()],ip.prototype,"showTitle",void 0),V([e_()],ip.prototype,"showPageTitles",void 0),V([e_()],ip.prototype,"showCompletePage",void 0),V([e_()],ip.prototype,"navigateToUrl",void 0),V([e_()],ip.prototype,"requiredMark",void 0),V([e_({returnValue:""})],ip.prototype,"questionStartIndex",void 0),V([e_()],ip.prototype,"storeOthersAsComment",void 0),V([e_()],ip.prototype,"maxTextLength",void 0),V([e_()],ip.prototype,"maxCommentLength",void 0),V([e_()],ip.prototype,"autoAdvanceEnabled",void 0),V([e_()],ip.prototype,"autoAdvanceAllowComplete",void 0),V([e_()],ip.prototype,"checkErrorsMode",void 0),V([e_()],ip.prototype,"validateVisitedEmptyFields",void 0),V([e_()],ip.prototype,"autoGrowComment",void 0),V([e_()],ip.prototype,"allowResizeComment",void 0),V([e_()],ip.prototype,"commentAreaRows",void 0),V([e_()],ip.prototype,"textUpdateMode",void 0),V([e_({onSetting:e=>!0===e?"onComplete":!1===e?"none":e})],ip.prototype,"clearInvisibleValues",void 0),V([e_()],ip.prototype,"keepIncorrectValues",void 0),V([e_({localizable:{defaultStr:"emptySurvey",markdown:!0}})],ip.prototype,"emptySurveyText",void 0),V([e_({localizable:!0})],ip.prototype,"logo",void 0),V([e_()],ip.prototype,"logoWidth",void 0),V([e_()],ip.prototype,"logoHeight",void 0),V([e_()],ip.prototype,"logoPosition",void 0),V([e_()],ip.prototype,"logoFit",void 0),V([e_({defaultValue:{}})],ip.prototype,"cssVariables",void 0),V([e_()],ip.prototype,"_isMobile",void 0),V([e_()],ip.prototype,"_isCompact",void 0),V([e_({onSet:(e,t)=>{t.updateCss()}})],ip.prototype,"backgroundImage",void 0),V([e_()],ip.prototype,"backgroundImageFit",void 0),V([e_({onSet:(e,t)=>{t.updateCss()}})],ip.prototype,"backgroundImageAttachment",void 0),V([e_()],ip.prototype,"backgroundOpacity",void 0),V([e_()],ip.prototype,"wrapperFormCss",void 0),V([e_({localizable:{defaultStr:!0}})],ip.prototype,"startSurveyText",void 0),V([e_({localizable:{defaultStr:!0}})],ip.prototype,"pagePrevText",void 0),V([e_({localizable:{defaultStr:!0}})],ip.prototype,"pageNextText",void 0),V([e_({localizable:{defaultStr:!0}})],ip.prototype,"completeText",void 0),V([e_({localizable:{defaultStr:!0}})],ip.prototype,"previewText",void 0),V([e_({localizable:{defaultStr:!0}})],ip.prototype,"editText",void 0),V([e_({defaultValue:"numTitleRequire",onSetting:e=>"numRequireTitle"!==e&&"requireNumTitle"!==e&&"numTitle"!=e?"numTitleRequire":e})],ip.prototype,"questionTitlePattern",void 0),V([e_({onSet:(e,t)=>t.updateVisibleIndexes()})],ip.prototype,"showPageNumbers",void 0),V([e_({onSetting:e=>e.toLowerCase()})],ip.prototype,"progressBarLocation",void 0),V([e_({onSetting:e=>"correctquestion"===e?"correctQuestion":"requiredquestion"===e?"requiredQuestion":e})],ip.prototype,"progressBarType",void 0),V([e_({getDefaultValue:e=>"buttons"===e.progressBarType})],ip.prototype,"progressBarShowPageTitles",void 0),V([e_()],ip.prototype,"progressBarShowPageNumbers",void 0),V([e_()],ip.prototype,"progressBarInheritWidthFrom",void 0),V([e_({onSetting:e=>e.toLowerCase()})],ip.prototype,"questionErrorLocation",void 0),V([e_()],ip.prototype,"questionDescriptionLocation",void 0),V([e_()],ip.prototype,"readOnly",void 0),V([e_({defaultValue:"entireItem"})],ip.prototype,"matraixDragHandleArea",void 0),V([e_()],ip.prototype,"questionOrder",void 0),V([e_({defaultValue:!1})],ip.prototype,"isCompleted",void 0),V([e_({defaultValue:!1})],ip.prototype,"isStartedState",void 0),V([e_({defaultValue:!1})],ip.prototype,"isCompletedBefore",void 0),V([e_({defaultValue:!1})],ip.prototype,"isLoading",void 0),V([e_({defaultValue:!1})],ip.prototype,"isNavigationBlocked",void 0),V([e_({defaultValue:!0})],ip.prototype,"validationEnabled",void 0),V([e_()],ip.prototype,"questionsOnPageMode",void 0),V([e_()],ip.prototype,"firstPageIsStartPage",void 0),V([e_()],ip.prototype,"showPreviewBeforeComplete",void 0),V([e_()],ip.prototype,"previewMode",void 0),V([e_()],ip.prototype,"rootCss",void 0),V([e_({defaultValue:!1})],ip.prototype,"clearDisabledChoices",void 0),V([e_()],ip.prototype,"showTimer",void 0),V([e_()],ip.prototype,"timerLocation",void 0),V([e_({onSet:(e,t)=>{t.updateGridColumns()}})],ip.prototype,"gridLayoutEnabled",void 0),V([e_()],ip.prototype,"widthMode",void 0),V([e_()],ip.prototype,"calculatedWidthMode",void 0),V([e_()],ip.prototype,"width",void 0),V([e_({defaultValue:100,onSet(e,t,s){t.pages.forEac
vendor: 10,056 bytes, line 10
10h(e=>e.updateRootStyle())}})],ip.prototype,"widthScale",void 0),V([e_()],ip.prototype,"staticStartWidth",void 0),V([e_()],ip.prototype,"responsiveStartWidth",void 0),V([e_({defaultValue:0})],ip.prototype,"timeLimit",void 0),V([e_({defaultValue:0})],ip.prototype,"timeLimitPerPage",void 0),H.addClass("survey",[{name:"locale",choices:()=>I.getLocales(!0),onGetValue:e=>e.locale==I.defaultLocale?null:e.locale},{name:"title",serializationProperty:"locTitle",dependsOn:"locale"},{name:"description:text",serializationProperty:"locDescription",dependsOn:"locale"},{name:"logo:file",serializationProperty:"locLogo"},{name:"logoWidth",default:"auto",minValue:0},{name:"logoHeight",default:"40px",minValue:0},{name:"logoFit",default:"contain",choices:["none","contain","cover","fill"]},{name:"logoPosition",default:"left",choices:["none","left","right","top","bottom"]},{name:"autoFocusFirstQuestion:boolean",alternativeName:"focusFirstQuestionAutomatic"},{name:"autoFocusFirstError:boolean",default:!0,alternativeName:"focusOnFirstError"},{name:"completedHtml:html",serializationProperty:"locCompletedHtml"},{name:"completedBeforeHtml:html",serializationProperty:"locCompletedBeforeHtml"},{name:"completedHtmlOnCondition:htmlconditions",className:"htmlconditionitem",isArray:!0},{name:"loadingHtml:html",serializationProperty:"locLoadingHtml"},{name:"pages:surveypages",className:"page",isArray:!0,onSerializeValue:e=>e.originalPages||e.pages},{name:"elements",alternativeName:"questions",baseClassName:"question",visible:!1,isLightSerializable:!1,onGetValue:function(e){return null},onSetValue:function(e,t,s){e.pages.splice(0,e.pages.length);var i=e.addNewPage("");s.toObject({questions:t},i,null==s?void 0:s.options)}},{name:"triggers:triggers",baseClassName:"surveytrigger",classNamePart:"trigger"},{name:"calculatedValues:calculatedvalues",className:"calculatedvalue",isArray:!0},{name:"sjsVersion",visible:!1},{name:"$schema",visible:!1},{name:"surveyId",visible:!1},{name:"surveyPostId",visible:!1},{name:"surveyShowDataSaving:boolean",visible:!1},"cookieName",{name:"partialSendEnabled:boolean",alternativeName:"sendResultOnPageNext"},{name:"showNavigationButtons:boolean",default:!0},{name:"navigationButtonsLocation",default:"bottom",choices:["top","bottom","topBottom"]},{name:"showPrevButton:boolean",default:!0,visibleIf:e=>"none"!==e.showNavigationButtons},{name:"showTitle:boolean",default:!0},{name:"showPageTitles:boolean",default:!0},{name:"showCompletePage:boolean",default:!0,alternativeName:"showCompletedPage"},"navigateToUrl",{name:"navigateToUrlOnCondition:urlconditions",className:"urlconditionitem",isArray:!0},{name:"questionOrder",alternativeName:"questionsOrder",default:"initial",choices:["initial","random"]},{name:"matrixDragHandleArea",visible:!1,default:"entireItem",choices:["entireItem","icon"]},"showPageNumbers:boolean",{name:"showQuestionNumbers",default:"off",acceptedValues:[!1,!0],choices:["on","onPage","recursive","off"]},{name:"questionTitleLocation",default:"top",choices:["top","bottom","left"]},{name:"questionDescriptionLocation",default:"underTitle",choices:["underInput","underTitle"]},{name:"questionErrorLocation",default:"top",choices:["top","bottom"]},{name:"showProgressBar:boolean",default:!1,onSetValue:(e,t,s)=>{e&&e.setShowProgressBar(t)}},{name:"progressBarLocation",default:"auto",choices:["auto","aboveheader","belowheader","bottom","topbottom"],visibleIf:e=>e.showProgressBar},{name:"progressBarType",default:"pages",choices:["pages","questions","requiredQuestions","correctQuestions"],visibleIf:e=>e.showProgressBar},{name:"progressBarShowPageTitles:switch",visibleIf:e=>e.showProgressBar&&"pages"===e.progressBarType},{name:"progressBarShowPageNumbers:switch",visibleIf:e=>e.showProgressBar&&"pages"===e.progressBarType},{name:"progressBarInheritWidthFrom",default:"container",choices:["container","survey"],visibleIf:e=>e.showProgressBar&&"pages"===e.progressBarType},{name:"showTOC:switch",default:!1},{name:"tocLocation",default:"left",choices:["left","right"],dependsOn:["showTOC"],visibleIf:e=>!!e&&e.showTOC},{name:"readOnly:boolean"},{name:"mode",visible:!1,isSerializable:!1},{name:"storeOthersAsComment:boolean",default:!0},{name:"maxTextLength:number",default:0,minValue:0},{name:"maxCommentLength:number",default:0,minValue:0,alternativeName:"maxOthersLength"},{name:"autoAdvanceEnabled:boolean",alternativeName:"goNextPageAutomatic",onSetValue:function(e,t){"autogonext"!==t&&(t=w.isTwoValueEquals(t,!0)),"autogonext"===t&&(t=!0),e.setPropertyValue("autoAdvanceEnabled",t)}},{name:"autoAdvanceAllowComplete:boolean",default:!0,alternativeName:"allowCompleteSurveyAutomatic",visibleIf:e=>!0===e.autoAdvanceEnabled},{name:"clearInvisibleValues",default:"onComplete",choices:["none","onComplete","onHidden","onHiddenContainer"]},{name:"checkErrorsMode",default:"onNextPage",choices:["onNextPage","onValueChanged","onComplete"]},{name:"validateVisitedEmptyFields:boolean",dependsOn:"checkErrorsMode",visibleIf:e=>"onValueChanged"===e.checkErrorsMode},{name:"textUpdateMode",default:"onBlur",choices:["onBlur","onTyping"]},{name:"autoGrowComment:boolean",default:!1},{name:"allowResizeComment:boolean",default:!0},{name:"commentAreaRows:number",minValue:1},{name:"startSurveyText",serializationProperty:"locStartSurveyText",visibleIf:e=>e.firstPageIsStartPage},{name:"pagePrevText",serializationProperty:"locPagePrevText",visibleIf:e=>"none"!==e.showNavigationButtons&&e.showPrevButton},{name:"pageNextText",serializationProperty:"locPageNextText",visibleIf:e=>"none"!==e.showNavigationButtons},{name:"completeText",serializationProperty:"locCompleteText",visibleIf:e=>"none"!==e.showNavigationButtons},{name:"previewText",serializationProperty:"locPreviewText",visibleIf:e=>e.showPreviewBeforeComplete},{name:"editText",serializationProperty:"locEditText",visibleIf:e=>e.showPreviewBeforeComplete},{name:"requiredMark",default:"*",alternativeName:"requiredText"},{name:"questionStartIndex",dependsOn:["showQuestionNumbers"],visibleIf:e=>!e||"off"!==e.showQuestionNumbers},{name:"questionTitlePattern",default:"numTitleRequire",dependsOn:["questionStartIndex","requiredMark"],choices:e=>e?e.getQuestionTitlePatternOptions():[]},{name:"questionTitleTemplate",visible:!1,isSerializable:!1,serializationProperty:"locQuestionTitleTemplate"},{name:"firstPageIsStartPage:boolean",default:!1,alternativeName:"firstPageIsStarted"},{name:"isSinglePage:boolean",default:!1,visible:!1,isSerializable:!1},{name:"questionsOnPageMode",default:"standard",choices:["standard","singlePage","questionPerPage","inputPerPage"]},{name:"showPreviewBeforeComplete:boolean",default:!1,onSetValue:(e,t,s)=>{e&&e.setShowPreviewBeforeComplete(t)}},{name:"previewMode",default:"allQuestions",choices:["allQuestions","answeredQuestions"],visibleIf:e=>e.showPreviewBeforeComplete},{name:"showTimer:boolean"},{name:"timeLimit:number",alternativeName:"maxTimeToFinish",default:0,minValue:0,enableIf:e=>e.showTimer},{name:"timeLimitPerPage:number",alternativeName:"maxTimeToFinishPage",default:0,minValue:0,enableIf:e=>e.showTimer},{name:"timerLocation",default:"top",choices:["top","bottom"],enableIf:e=>e.showTimer},{name:"timerInfoMode",alternativeName:"showTimerPanelMode",default:"combined",choices:["page","survey","combined"],enableIf:e=>e.showTimer},{name:"showTimerPanel",visible:!1,isSerializable:!1},{name:"widthMode",default:"auto",choices:["auto","static","responsive"]},{name:"gridLayoutEnabled:boolean",default:!1},{name:"width",visibleIf:e=>"static"===e.widthMode},{name:"fitToContainer:boolean",default:!0,visible:!1},{name:"headerView",default:"basic",choices:["basic","advanced"],visible:!1},{name:"backgroundImage:file",visible:!1},{name:"backgroundImageFit",default:"cover",choices:["auto","contain","cover"],visible:!1},{name:"backgroundImageAttachment",default:"scroll",choices:["scroll","fixed"],visible:!1},{name:"backgroundOpacity:number",minValue:0,maxValue:1,default:1,visible:!1},{name:"showBrandInfo:boolean",default:!1,visible:!1}]);let im="other";class iv extends tj{getBaseType(){return"choiceitem"}getAllChildren(){return[...super.getAllChildren(),...this.hasElements?this.detailElements:[]]}get choiceOwner(){return this.locOwner}get supportElements(){var e;return(null==(e=this.choiceOwner)?void 0:e.supportElementsInChoice())===!0}get isCommentShowing(){return this.getPropertyValue("isCommentShowing",!1)}setIsCommentShowing(e){this.setPropertyValue("isCommentShowing",e)}get supportComment(){let e=this.locOwner;return!!e&&!!e.supportMultipleComment&&e.supportMultipleComment(this)}isPropertyStoredInHash(e){return"elements"===e?!this.hasElements:super.isPropertyStoredInHash(e)}canAddPpropertyToJSON(e){return"commentPlaceholder"===e.name?!!this.getLocalizableString("commentPlaceholder"):super.canAddPpropertyToJSON(e)}onLocOwnerChanged(){this.showCommentArea&&!this.supportComment&&(this.showCommentArea=!1),this.setPanelSurvey(this.panelValue)}get onExpandPanelAtDesign(){return this.onExpandPanelAtDesignValue||(this.onExpandPanelAtDesignValue=new P),this.onExpandPanelAtDesignValue}get isPanelShowing(){return!!this.panelValue&&!!this.choiceOwner&&this.hasElements&&!0===this.choiceOwner.isItemSelected(this)}get hasElements(){let e=this.panelValue;return!!e&&e.elements.length>0}get panel(){return this.panelValue||(this.panelValue=this.createPanel()),this.panelValue}get isPanelCreated(){return!!this.panelValue}get elements(){return this.panel.elements}panelFirstRendering(){this.hasElements&&this.isPanelShowing&&this.panel.onFirstRendering()}createPanel(){let e=H.createClass("panel");return e.renderWidth="100%",e.isInteractiveDesignElement=!1,e.showTitle=!1,e.isInternalNested=!0,e.choiceItem=this,this.setPanelSurvey(e),e}setPanelSurvey(e){var t;if(e&&!e.survey){e.selectedElementInDesign=this.choiceOwner;let s=null==(t=this.choiceOwner)?void 0:t.getSurvey();s&&(e.name="choicePanel"+e.uniqueId,e.parent=this.choiceOwner.parent,e.setSurveyImpl(s))}}dispose(){var e;super.dispose(),null==(e=this.panelValue)||e.dispose(),this.panelValue=void 0}}V([e_({onSetting:(e,t)=>
10!!t.supportComment&&e})],iv.prototype,"showCommentArea",void 0),V([e_()],iv.prototype,"isCommentRequired",void 0),V([e_({localizable:!0})],iv.prototype,"commentPlaceholder",void 0);class iC extends tz{get choiceCallbacks(){return this.survey}get waitingChoicesByURL(){return!this.isChoicesLoaded&&this.hasChoicesUrl}constructor(e){super(e),this.isRunningChoicesValue=!1,this.isFirstLoadChoicesFromUrl=!0,this.isUpdatingChoicesDependedQuestions=!1,this._renderedChoices=[],this.renderedChoicesAnimation=new tE(this.getRenderedChoicesAnimationOptions(),e=>{this._renderedChoices=e,this.renderedChoicesChangedCallback&&this.renderedChoicesChangedCallback()},()=>this._renderedChoices),this.headItemsCount=0,this.footItemsCount=0,this.createItemValues("choices"),this.createNewArray("visibleChoices",()=>this.updateRenderedChoices(),()=>this.updateRenderedChoices())}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),["choices","customChoices","choicesFromQuestion","choicesFromQuestionMode","choiceValuesFromQuestion","choiceTextsFromQuestion","showOtherItem","showNoneItem","showRefuseItem","showDontKnowItem","isUsingRestful","isMessagePanelVisible","choicesOrder"].indexOf(e)>-1&&("choices"!==e||!this.filterItems())&&this.onVisibleChoicesChanged(),"hideIfChoicesEmpty"===e&&this.onVisibleChanged(),"selectedItemValues"===e&&this.onSelectedItemValuesChangedHandler(s),("choicesVisibleIf"===e||"choicesEnableIf"===e)&&this.filterItems()}getType(){return"selectbase"}getAllChildren(){return[...super.getAllChildren(),...this.choices]}dispose(){super.dispose();let e=this.getQuestionWithChoices();e&&e.removeDependedQuestion(this);let t=this.commentAreaModelValues;t&&Object.keys(t).forEach(e=>{t[e].dispose()}),this.doForPanels(void 0,e=>e.dispose())}supportElementsInChoice(){return!1}getPanels(){if(!this.supportElementsInChoice())return super.getPanels();let e=[];return this.choices.forEach(t=>{t.isPanelCreated&&e.push(t.panel)}),e}getVisiblePanels(e){if(!this.supportElementsInChoice())return null;let t=[];return this.choices.forEach(s=>{s.isPanelCreated&&s.isPanelShowing===e&&t.push(s.panel)}),t}doForPanels(e,t){let s=void 0!==e?this.getVisiblePanels(e):this.getPanels();Array.isArray(s)&&s.forEach(t)}collectNestedQuestionsCore(e,t,s,i){e.push(this),s&&this.supportElementsInChoice()&&this.choices.forEach(n=>{n.hasElements&&(!t||n.isPanelShowing)&&n.panel.questions.forEach(n=>n.addNestedQuestion(e,t,s,i))})}getElementsInDesign(e=!1){if(!this.supportElementsInChoice())return[];let t=[];return this.choices.forEach(s=>{s.hasElements&&(e?t.push(s.panel):t.push(...s.elements))}),t}get otherTextAreaModel(){return this.getCommentTextAreaModel(this.otherItem)}getCommentTextAreaModel(e){let t=null==e?void 0:e.value;if(void 0===t)return null;this.commentAreaModelValues||(this.commentAreaModelValues={});let s=this.commentAreaModelValues;return s[t]||(s[t]=new tq(this.getOtherTextAreaOptions(e))),s[t]}getOtherTextAreaOptions(e){return{question:this,id:()=>this.getItemCommentId(e),propertyNames:[this.getCommentPropertyValue(e)],className:()=>this.cssClasses.comment,placeholder:()=>this.getCommentPlaceholder(e),isDisabledAttr:()=>this.isInputReadOnly||!1,rows:()=>this.commentAreaRows,maxLength:()=>this.getOthersMaxLength(),autoGrow:()=>this.survey&&this.survey.autoGrowComment,ariaRequired:()=>this.ariaRequired||this.a11y_input_ariaRequired,ariaLabel:()=>this.ariaLabel||this.a11y_input_ariaLabel,getTextValue:()=>this.getCommentValueCore(e),onTextAreaChange:t=>{this.onOtherValueChange(e,t)},onTextAreaInput:t=>{this.onOtherValueInput(e,t)}}}getCommentPlaceholder(e){if(e.commentPlaceholder)return e.commentPlaceholder;if(this.isOtherItemByValue(e))return this.otherPlaceholder;let t=this.commentPlaceholder;return new sl(e).processText(t,!0)}resetDependedQuestion(){this.choicesFromQuestion=""}get otherId(){return this.getItemCommentId(this.otherItem)}getItemCommentId(e){return this.id+"_"+e.uniqueId}getCommentElementsId(){return[this.commentId,this.otherId]}getItemValueType(){return"choiceitem"}createItemValue(e,t){let s=this.createChoiceItem(e);return s.locOwner=this,t&&(s.text=t),s}
vendor: 4,587 bytes, line 10
10createChoiceItem(e){return H.createClass(this.getItemValueType(),{value:e})}validateElementCore(e){!0!==e.isOnValueChanged&&"none"!==this.getClearIfInvisible()&&this.clearIncorrectValues();let t=!0;return this.doForPanels(!0,s=>{t&&(t=s.validateElement(e))}),super.validateElementCore(e)&&t}get isUsingCarryForward(){return!!this.carryForwardQuestionType}get carryForwardQuestionType(){return this.getPropertyValue("carryForwardQuestionType")}setCarryForwardQuestionType(e,t){this.setPropertyValue("carryForwardQuestionType",e?"select":t?"array":void 0)}get isUsingRestful(){return this.getPropertyValueWithoutDefault("isUsingRestful")||!1}updateIsUsingRestful(){this.setPropertyValueDirectly("isUsingRestful",this.hasChoicesUrl)}supportGoNextPageError(){return!this.isOtherSelected||!!this.otherValue}isLayoutTypeSupported(e){return!0}localeChanged(){super.localeChanged(),"none"!==this.choicesOrder&&(this.updateVisibleChoices(),this.onVisibleChoicesChanged())}locStrsChanged(){super.locStrsChanged(),this.choicesFromUrl&&(tj.locStrsChanged(this.choicesFromUrl),tj.locStrsChanged(this.visibleChoices)),this.isUsingCarryForward&&tj.locStrsChanged(this.visibleChoices)}updatePrevOtherErrorValue(e){let t=this.otherValue;e!==t&&(this.prevOtherErrorValue=t)}setNewComment(e){this.isOtherSelected&&this.getStoreOthersAsComment()&&this.updatePrevOtherErrorValue(e),super.setNewComment(e)}get otherValue(){return this.getStoreOthersAsComment()?this.getQuestionComment():this.otherValueCore}set otherValue(e){e=this.getTrimmedComment(e),this.isSettingComment||this.otherValue===e||(this.onUpdateCommentOnAutoOtherMode(e),this.updatePrevOtherErrorValue(e),this.isSettingComment=!0,this.getStoreOthersAsComment()?this.setNewComment(e):(this.otherValueCore=e,this.isOtherSelected&&!this.isRenderedValueSetting&&(this.value=this.getValueOnSettingOther(e))),this.isSettingComment=!1,this.updateChoicesDependedQuestions())}get otherValueCore(){return this.getPropertyValue("otherValue")}set otherValueCore(e){this.setPropertyValue("otherValue",e)}get otherItem(){return this.otherItemValue||(this.otherItemValue=this.createBuiltInItem(im,"otherText","otherItemText",e=>{e.setPropertyValue("showCommentArea",!0),e.isCommentRequired=!0})),this.otherItemValue}get isOtherSelected(){return this.showOtherItem&&this.isOtherValue(this.renderedValue)}get isNoneSelected(){return this.showNoneItem&&this.getIsItemValue(this.renderedValue,this.noneItem)}supportMultipleComment(e){return!0}isCommentShowing(e){return e&&e.showCommentArea&&this.isItemSelected(e)}getCommentValue(e){return this.isCommentShowing(e)&&this.getCommentValueCore(e)||""}setCommentValue(e,t){this.isCommentShowing(e)&&this.setCommentValueCore(e,t)}get commentPropertyValue(){return"comment"}getCommentValueCore(e){return this.isOtherItemByValue(e)?this.otherValue:this.getPropertyValue(this.getCommentPropertyValue(e),this.getCommentValueByItem(e))||""}getCommentValueByItem(e){let t=this.value;return"object"==typeof t&&t[this.commentPropertyValue]||""}setCommentValueCore(e,t){this.isOtherItemByValue(e)?this.otherValue=t:(this.setCommentPropertyValue(e,t),this.isItemSelectedCore(e)&&(t?this.value={value:e.value,comment:t}:this.value=e.value))}setCommentPropertyValue(e,t){this.setPropertyValue(this.getCommentPropertyValue(e),t)}isOtherItemByValue(e){return this.isOtherValue(e.value)}getCommentPropertyValue(e){return this.isOtherItemByValue(e)?this.getStoreOthersAsComment()?"comment":"otherValue":"other_"+e.uniqueId}get hasNone(){return this.showNoneItem}set hasNone(e){this.showNoneItem=e}get noneItem(){return this.noneItemValue||(this.noneItemValue=this.createBuiltInNoneItem(p.noneItemValue,"noneText","noneItemText")),this.noneItemValue}get noneText(){return this.getLocStringText(this.locNoneText)}set noneText(e){this.setLocStringText(this.locNoneText,e)}get locNoneText(){return this.noneItem.locText}get refuseItem(){return this.refuseItemValue||(this.refuseItemValue=this.createBuiltInNoneItem(p.refuseItemValue,"refuseText","refuseItemText")),this.refuseItemValue}get refuseText(){return this.getLocStringText(this.locRefuseText)}set refuseText(e){this.setLocStringText(this.locRefuseText,e)}get locRefuseText(){return this.refuseItem.locText}get dontKnowItem(){return this.dontKnowItemValue||(this.dontKnowItemValue=this.createBuiltInNoneItem(p.dontKnowItemValue,"dontKnowText","dontKnowItemText")),this.dontKnowItemValue}get dontKnowText(){return this.getLocStringText(this.locDontKnowText)}set dontKnowText(e){this.setLocStringText(this.locDontKnowText,e)}get locDontKnowText(){return this.dontKnowItem.locText}
10createBuiltInNoneItem(e,t,s){return this.createBuiltInItem(e,t,s,e=>e.isExclusive=!0)}createBuiltInItem(e,t,s,i){let n=this.createChoiceItem(e),r=this.createLocalizableString(t,n,!0,s);return n.setLocText(r),i&&i(n),n.locOwner=this,n}surveyChoiceItemVisibilityChange(){this.filterItems()}addUsedLocales(e){super.addUsedLocales(e),this.doForPanels(void 0,t=>{t.addUsedLocales(e)})}runConditionCore(e){super.runConditionCore(e),this.runItemsEnableCondition(e),this.runItemsCondition(e),this.choices.forEach(t=>{t.runConditionCore(e)}),this.doForPanels(void 0,t=>{t.runCondition(e)})}isTextValue(){return!0}setDefaultIntoValue(e){!this.isValueEmpty(e)&&!this.waitingChoicesByURL&&this.showOtherItem&&this.hasUnknownValue(e,!0)?this.setDefaultUnknownValue(e):super.setDefaultIntoValue(e)}setDefaultUnknownValue(e){this.renderedValue=this.setOtherValueIntoValue(e),this.otherValue=e}valueToData(e){return w.isValueEmpty(e)?e:Array.isArray(e)?e.length>0?e[0]:void 0:e}filterItems(){if(this.isLoadingFromJson||!this.data||this.areInvisibleElementsShowing)return!1;var e=this.getDataFilteredProperties();return this.runItemsEnableCondition(e),this.runItemsCondition(e)}runItemsCondition(e){let t=this.runConditionsForItems(e);return this.filteredChoicesValue&&this.filteredChoicesValue.length===this.activeChoices.length&&(this.filteredChoicesValue=void 0),t&&(this.onVisibleChoicesChanged(),this.clearIncorrectValues()),t}runItemsEnableCondition(e){let t=this.getChoicesCondition("choicesEnableIf");tj.runEnabledConditionsForItems(this.activeChoices,t,e,(e,t)=>t&&this.onEnableItemCallBack(e))&&this.clearDisabledValues(),this.onAfterRunItemsEnableCondition()}onAfterRunItemsEnableCondition(){}onEnableItemCallBack(e){return!0}onSelectedItemValuesChangedHandler(e){var t;null==(t=this.survey)||t.loadedChoicesFromServer(this)}getItemIfChoicesNotContainThisValue(e,t){return this.waitingChoicesByURL?this.createItemValue(e,t):null}getSingleSelectedItem(){let e=this.selectedItemValues;if(this.isEmpty())return null;let t=this.getItemByValue(this.value);return this.onGetSingleSelectedItem(t),t||e&&this.value==e.id||this.updateSelectedItemValues(),t||e||(this.isOtherSelected?this.otherItem:this.getItemIfChoicesNotContainThisValue(this.value))}onGetSingleSelectedItem(e){}getMultipleSelectedItems(){return[]}getChoicesCondition(e){let t=this.getExpressionFromSurvey(e);return t?new X(t):null}canSurveyChangeItemVisibility(){return!!this.survey&&this.choiceCallbacks.canChangeChoiceItemsVisibility()}changeItemVisibility(){return this.canSurveyChangeItemVisibility()?(e,t)=>this.choiceCallbacks.getChoiceItemVisibility(this,e,t):null}runConditionsForItems(e){this.filteredChoicesValue=[];let t=this.changeItemVisibility(),s=this.areInvisibleElementsShowing?null:this.getChoicesCondition("choicesVisibleIf"),i=this.activeChoices;return tj.runConditionsForItems(i,this.getFilteredChoices(),s,e,!this.survey||!this.survey.areInvisibleElementsShowing,(e,s)=>t?t(e,s):s)||this.isCarryForwardChanged(i)}isCarryForwardChanged(e){if(!this.isUsingCarryForward)return!1;let t=this.visibleChoices;if(t.length!==e.length)return!0;for(let s=0;s<e.length;s++)if(t[s].value!==e[s].value)return!0;return!1}isOtherValue(e){return Array.isArray(e)?e.indexOf(im)>-1:e===im}getIsItemValue(e,t){return e===t.value}get validatedValue(){return this.renderedValueToDataCore(this.value)}createRestful(){return new t$}getQuestionComment(){return this.showCommentArea?super.getQuestionComment():this.otherValueCore?this.otherValueCore:this.showCommentArea||this.getStoreOthersAsComment()?super.getQuestionComment():this.otherValueCore}selectOtherValueFromComment(e){e&&(this.prevIsOtherSelected=!0),this.value=e?this.otherItem.value:void 0}onUpdateCommentOnAutoOtherMode(e){if(!this.autoOtherMode)return;let t=this.isOtherSelected;(!t&&e||t&&!e)&&this.selectOtherValueFromComment(!!e)}getValueOnSettingOther(e){let t=this.rendredValueToData(this.renderedValue);if(this.showCommentArea||this.getStoreOthersAsComment())return t;let s=this.getItemByValue(e);if(!s||s===this.otherItemValue)return t;if(this.otherValueCore="",!Array.isArray(t))return e;let i=t.indexOf(this.otherItem.value);return i>-1&&t.splice(i,1),0>t.indexOf(e)&&t.push(e),t}onClearValue(){super.onClearValue(),this.selectedItemValues=void 0}get renderedValue(){return this.getPropertyValue("renderedValue",null)}set renderedValue(e){this.setRenderedValue(e,!0)}setRenderedValue(e,t){this.setPropertyValue("renderedValue",e),t&&!this.isReadOnlyAttr&&(e=this.rendredValueToData(e),this.isTwoValueEquals(e,this.value)||(this.value=e)),this.onRenderedValueChagned(t)}
10onRenderedValueChagned(e){this.choices.forEach(t=>this.updateItemIsCommentShowing(t,e)),this.showOtherItem&&this.updateItemIsCommentShowing(this.otherItem,e)}updateItemIsCommentShowing(e,t){if(e.showCommentArea){let s=this.isCommentShowing(e);e.setIsCommentShowing(s),!s&&t&&this.setCommentValueCore(e,void 0)}}selectItem(e){if(this.isReadOnlyAttr||!e)return;let t=this.getSingleSelectedItem();this.renderedValue=e.value,t&&t!==this.getSingleSelectedItem()&&this.onItemDeselected(t),this.onItemSelected(e)}onItemSelected(e){e.showCommentArea&&this.focusOtherComment(e)}onItemDeselected(e){e.showCommentArea&&this.setCommentValueCore(e,void 0)}setQuestionValue(e,t=!0,s=!0){this.isLoadingFromJson||this.isTwoValueEquals(this.value,e)||(this.setRenderedValue(this.rendredValueFromData(e),!1),super.setQuestionValue(e,t),this.updateChoicesDependedQuestions(),this.updateChoicesPanels(),!this.showCommentArea&&s&&!this.isOtherSelected&&this.otherValue&&(this.makeCommentEmpty=!0,this.otherValueCore="",this.setPropertyValue("comment","")))}setValueCore(e){super.setValueCore(e),this.makeCommentEmpty&&(this.setCommentIntoData(""),this.makeCommentEmpty=!1)}setNewValue(e){var t;e=this.valueFromData(e),(this.isRunningChoices||(null==(t=this.choicesByUrlValue)?void 0:t.isWaitingForParameters))&&this.isValueEmpty(e)||(this.cachedValueForUrlRequests=e),super.setNewValue(e)}valueFromData(e){let t=this.getItemByValue(e,this.activeChoices);return t?this.getChoiceValue(t,e,!1):super.valueFromData(e)}updateChoicesPanels(){this.supportElementsInChoice()&&this.wasRendered&&(this.choices.forEach(e=>{e.isDescendantOf("choiceitem")&&e.panelFirstRendering()}),this.isClearValueOnHidden&&this.clearValuesInVisiblePanels("onHiddenContainer"))}getChoiceValue(e,t,s){let i="object"==typeof t,n=i?t[this.commentPropertyValue]:"",r=!w.isValueEmpty(n);if(i&&e.showCommentArea&&(s||r)){let t={value:e.value};return r&&(t[this.commentPropertyValue]=n),t}return e.value}getItemByValue(e,t){let s=t||this.visibleChoices;return e&&"object"==typeof e&&!w.isValueEmpty(e.value)&&(e=e.value),tj.getItemByValue(s,e)}rendredValueFromData(e){if(e&&"object"==typeof e&&!w.isValueEmpty(e.value)){let t=this.getItemByValue(e.value);t&&(this.setCommentPropertyValue(t,e[this.commentPropertyValue]),e=e.value)}return this.getStoreOthersAsComment()||!this.showOtherItem?e:this.renderedValueFromDataCore(e)}getValueFromValueWithComment(e){return e&&"object"==typeof e&&!w.isValueEmpty(e.value)?e.value:e}getFilteredValue(e){return this.getValueFromValueWithComment(this.value)}rendredValueToData(e){return this.getStoreOthersAsComment()?e:this.renderedValueToDataCore(e)}renderedValueFromDataCore(e){return this.hasUnknownValue(e,!0,!1)?(this.otherValue=e,this.otherItem.value):this.valueFromData(e)}renderedValueToDataCore(e){return this.isOtherValue(e)&&this.needConvertRenderedOtherToDataValue()&&(e=this.otherValue),e}needConvertRenderedOtherToDataValue(){let e=this.otherValue;return!!this.getTrimmedComment(e)&&this.hasUnknownValue(e,!0,!1)}getIsQuestionReady(){return super.getIsQuestionReady()&&!this.waitingChoicesByURL&&!this.waitingGetChoiceDisplayValueResponse}updateSelectedItemValues(){if(this.waitingGetChoiceDisplayValueResponse||!this.survey||this.isEmpty())return;let e=this.value,t=Array.isArray(e)?e:[e];t.some(e=>!this.getItemByValue(e,this.choices))&&(this.choicesLazyLoadEnabled||this.hasChoicesUrl)&&(this.waitingGetChoiceDisplayValueResponse=!0,this.updateIsReady(),this.choiceCallbacks.getChoiceDisplayValue({question:this,values:t,setItems:(s,...i)=>{if(this.waitingGetChoiceDisplayValueResponse=!1,!s||!s.length)return void this.updateIsReady();let n=s.map((e,s)=>this.createItemValue(t[s],e));this.setCustomValuesIntoItems(n,i),Array.isArray(e)?this.selectedItemValues=n:this.selectedItemValues=n[0],this.updateIsReady(),this.onSelectedItemValuesUpdated()}}))}onSelectedItemValuesUpdated(){}setCustomValuesIntoItems(e,t){Array.isArray(t)&&0!==t.length&&t.forEach(t=>{let s=t.values,i=t.propertyName;if(Array.isArray(s))for(let t=0;t<e.length&&t<s.length;t++)e[t][i]=s[t]})}hasUnknownValue(e,t=!1,s=!0,i=!1){if(!Array.isArray(e))return this.hasUnknownValueItem(e,t,s,i);for(let n=0;n<e.length;n++)if(this.hasUnknownValueItem(e[n],t,s,i))return!0;return!1}hasUnknownValueItem(e,t=!1,s=!0,i=!1){if(!i&&this.isValueEmpty(e)||t&&this.isOtherValue(e)||this.showNoneItem&&e==this.noneItem.value||this.showRefuseItem&&e==this.refuseItem.value||this.showDontKnowItem&&e==this.dontKnowItem.value)return!1;var n=s?this.getFilteredChoices():this.activeChoices;return null==this.getItemByValue(e,n)}isValueDisabled(e){var t=this.getItemByValue(e,this.getFilteredChoices());return!!t&&!t.isEnabled}endLoadingFromJson(){super.endLoadingFromJson(),this.updateVisibleChoices()}
10get customChoices(){return this.getItemValuesPropertyValue("customChoices")}set customChoices(e){this.setArrayPropertyValue("customChoices",e)}get choicesByUrl(){return this.getPropertyValue("choicesByUrl",void 0,()=>this.createChoicesByUrl())}set choicesByUrl(e){if(!e)return;let t=this.choicesByUrlValue;t&&(t.dispose(),this.setPropertyValueDirectly("choicesByUrl",this.createChoicesByUrl())),this.choicesByUrl.fromJSON(e.toJSON())}get choicesByUrlValue(){return this.getPropertyValueWithoutDefault("choicesByUrl")}get isChoicesUrlEmpty(){let e=this.choicesByUrlValue;return!e||e.isEmpty}createChoicesByUrl(){let e=this.createRestful();return e.owner=this,e.loadingOwner=this,e.createItemValue=e=>this.createItemValue(e),e.beforeSendRequestCallback=()=>{this.onBeforeSendRequest()},e.getResultCallback=e=>{this.onLoadChoicesFromUrl(e)},e.updateResultCallback=(e,t)=>this.survey?this.choiceCallbacks.updateChoicesFromServer(this,e,t):e,e}get choicesFromQuestion(){return this.getPropertyValue("choicesFromQuestion")}set choicesFromQuestion(e){var t=this.getQuestionWithChoices();this.isLockVisibleChoices=!!t&&t.name===e,t&&t.name!==e&&(t.removeDependedQuestion(this),this.isInDesignMode&&!this.isLoadingFromJson&&e&&this.setPropertyValue("choicesFromQuestion",void 0)),this.setPropertyValue("choicesFromQuestion",e),this.isLockVisibleChoices=!1}get otherText(){return this.getLocStringText(this.locOtherText)}set otherText(e){this.setLocStringText(this.locOtherText,e),this.onVisibleChoicesChanged()}get locOtherText(){return this.otherItem.locText}get otherPlaceHolder(){return this.otherPlaceholder}set otherPlaceHolder(e){this.otherPlaceholder=e}get visibleChoices(){return this.getPropertyValue("visibleChoices")}get enabledChoices(){for(var e=[],t=this.visibleChoices,s=0;s<t.length;s++)t[s].isEnabled&&e.push(t[s]);return e}updateVisibleChoices(){if(this.isLoadingFromJson||this.isDisposed)return;var e=this.calcVisibleChoices(),t=[];(e||[]).forEach(e=>t.push(e));let s=this.visibleChoices;(!this.isTwoValueEquals(s,t)||this.choicesLazyLoadEnabled)&&(this.setArrayPropertyDirectly("visibleChoices",t),this.updateRenderedChoices())}calcVisibleChoices(){let e=[];return this.customChoices.forEach(t=>e.push(t)),this.getFilteredChoices().forEach(t=>e.push(t)),e=this.sortArrayByChoicesOrder(e),this.addToVisibleChoices(e,this.isAddDefaultItems),e}setCanShowOptionItemCallback(e){this.canShowOptionItemCallback=e,e&&this.onVisibleChoicesChanged()}get newItem(){return this.newItemValue}addToVisibleChoices(e,t){this.headItemsCount=0,this.footItemsCount=0,this.isEmptyActiveChoicesInDesign||this.addNewItemToVisibleChoices(e,t);let s=[];this.addNonChoicesItems(s,t),s.sort((e,t)=>e.index===t.index?0:e.index<t.index?-1:1);for(let t=0;t<s.length;t++){let i=s[t];i.index<0?(e.splice(t,0,i.item),this.headItemsCount++):(e.push(i.item),this.footItemsCount++)}}addNewItemToVisibleChoices(e,t){t&&(this.newItemValue||(this.newItemValue=this.createItemValue("newitem"),this.newItemValue.isGhost=!0,this.newItemValue.registerFunctionOnPropertyValueChanged("isVisible",()=>{this.updateVisibleChoices()})),this.newItemValue.isVisible&&!this.isUsingCarryForward&&this.canShowOptionItem(()=>this.newItemValue,t,!1)&&(this.footItemsCount=1,e.push(this.newItemValue)))}addNonChoicesItems(e,t){this.supportNone()&&this.addNonChoiceItem(e,()=>this.noneItem,t,this.showNoneItem,p.specialChoicesOrder.noneItem),this.supportRefuse()&&this.addNonChoiceItem(e,()=>this.refuseItem,t,this.showRefuseItem,p.specialChoicesOrder.refuseItem),this.supportDontKnow()&&this.addNonChoiceItem(e,()=>this.dontKnowItem,t,this.showDontKnowItem,p.specialChoicesOrder.dontKnowItem),this.supportOther()&&this.addNonChoiceItem(e,()=>this.otherItem,t,this.showOtherItem,p.specialChoicesOrder.otherItem)}addNonChoiceItem(e,t,s,i,n){let r=this.canShowOptionItem(t,s,i);
10r&&n.forEach(t=>e.push({index:t,item:r}))}canShowOptionItem(e,t,s){let i=this.canSurveyChangeItemVisibility();if(!t&&!s&&!i)return null;let n=e(),r=s||t&&(!this.canShowOptionItemCallback||this.canShowOptionItemCallback(n));return i&&(r=this.changeItemVisibility()(n,r)),r?n:null}isItemInList(e){return e===this.otherItemValue?this.showOtherItem:e===this.noneItemValue?this.showNoneItem:e===this.refuseItemValue?this.showRefuseItem:e===this.dontKnowItemValue?this.showDontKnowItem:e!==this.newItemValue}get isAddDefaultItems(){return p.showDefaultItemsInCreator&&this.isInDesignMode&&!this.customWidget}getPlainData(e={includeEmpty:!0,includeQuestionTypes:!1}){var t=super.getPlainData(e);if(t){var s=Array.isArray(this.value)?this.value:[this.value];t.isNode=!0,t.data=(t.data||[]).concat(s.map((t,s)=>{var i=this.getItemByValue(t),n={name:s,title:this.getLocalizationString("choices_Choice"),value:t,displayValue:this.getChoicesDisplayValue(this.visibleChoices,t),getString:e=>this.getValueAsString(e),isNode:!1};return i&&(e.calculations||[]).forEach(e=>{n[e.propertyName]=i[e.propertyName]}),this.isOtherSelected&&this.otherItemValue===i&&(n.isOther=!0,n.displayValue=this.otherValue),n}))}return t}getDisplayValueCore(e,t){return(t=this.getValueFromValueWithComment(t),this.useDisplayValuesInDynamicTexts)?this.getChoicesDisplayValue(this.visibleChoices,t):t}getDisplayValueEmpty(){return tj.getTextOrHtmlByValue(this.visibleChoices,void 0)}getChoicesDisplayValue(e,t){if(this.isOtherValue(t))return this.otherValue?this.otherValue:this.locOtherText.textOrHtml;let s=this.getSingleSelectedItem();if(s&&this.isTwoValueEquals(s.value,t))return s.locText.textOrHtml;var i=tj.getTextOrHtmlByValue(e,t);return""==i&&t?t:i}getDisplayArrayValue(e,t,s){var i=this.visibleChoices,n=[];let r=[];for(var a=0;a<t.length;a++)r.push(s?s(a):t[a]);if(w.isTwoValueEquals(this.value,r)&&this.getMultipleSelectedItems().forEac
10h((e,t)=>n.push(this.getItemDisplayValue(e,r[t]))),0===n.length)for(var a=0;a<r.length;a++){let e=this.getChoicesDisplayValue(i,r[a]);e&&n.push(e)}return n.join(p.choicesSeparator)}getItemDisplayValue(e,t){if(this.isOtherItemByInstance(e)){if(this.showOtherItem&&this.showCommentArea&&t)return t;if(this.comment)return this.comment}return e.locText.textOrHtml}getFilteredChoices(){return this.filteredChoicesValue?this.filteredChoicesValue:this.activeChoices}get activeChoices(){let e=this.getCarryForwardQuestion();return"select"===this.carryForwardQuestionType?(e.addDependedQuestion(this),this.getChoicesFromSelectQuestion(e)):"array"===this.carryForwardQuestionType?(e.addDependedQuestion(this),this.getChoicesFromArrayQuestion(e)):this.isEmptyActiveChoicesInDesign?[]:this.choicesFromUrl?this.choicesFromUrl:this.getChoices()}get isEmptyActiveChoicesInDesign(){return this.isInDesignMode&&(this.hasChoicesUrl||this.isMessagePanelVisible)}getCarryForwardQuestion(e){let t=this.findCarryForwardQuestion(e),s=this.getQuestionWithChoicesCore(t),i=s?null:this.getQuestionWithArrayValue(t);return this.setCarryForwardQuestionType(!!s,!!i),s||i?t:null}getIsReadyDependsOn(){let e=super.getIsReadyDependsOn();return this.carryForwardQuestion&&e.push(this.carryForwardQuestion),e}getQuestionWithChoices(){return this.getQuestionWithChoicesCore(this.findCarryForwardQuestion())}findCarryForwardQuestion(e){var t;return e||(e=this.data||(null==(t=this.parentQuestion)?void 0:t.data)),this.carryForwardQuestion=null,this.choicesFromQuestion&&e&&(this.carryForwardQuestion=e.findQuestionByName(this.choicesFromQuestion)),this.carryForwardQuestion}getQuestionWithChoicesCore(e){return e&&e.visibleChoices&&H.isDescendantOf(e.getType(),"selectbase")&&e!==this?e:null}getQuestionWithArrayValue(e){return e&&e.isValueArray?e:null}getChoicesFromArrayQuestion(e){if(this.isInDesignMode)return[];let t=e.value;if(!Array.isArray(t))return[];let s=[];for(var i=0;i<t.length;i++){let e=t[i];if(!w.isValueObject(e))continue;let n=this.getValueKeyName(e);if(n&&!this.isValueEmpty(e[n])){let t=this.choiceTextsFromQuestion?e[this.choiceTextsFromQuestion]:void 0;s.push(this.createItemValue(e[n],t))}}return s}getValueKeyName(e){if(this.choiceValuesFromQuestion)return this.choiceValuesFromQuestion;let t=Object.keys(e);return t.length>0?t[0]:void 0}getChoicesFromSelectQuestion(e){if(this.isInDesignMode)return[];let t=[];var s="selected"==this.choicesFromQuestionMode||"unselected"!=this.choicesFromQuestionMode&&void 0;let i=e.visibleChoices;for(var n=0;n<i.length;n++)if(!e.isBuiltInChoice(i[n])){if(void 0===s){t.push(this.copyChoiceItem(i[n]));continue}var r=e.isItemSelected(i[n]);(r&&s||!r&&!s)&&t.push(this.copyChoiceItem(i[n]))}return"selected"===this.choicesFromQuestionMode&&!this.showOtherItem&&e.isOtherSelected&&e.otherValue&&t.push(this.createItemValue(e.otherItem.value,e.otherValue)),t}copyChoiceItem(e){let t=this.createItemValue(e.value);return t.setData(e),t}get hasActiveChoices(){var e=this.visibleChoices;e&&0!=e.length||(this.onVisibleChoicesChanged(),e=this.visibleChoices);for(var t=0;t<e.length;t++)if(!this.isBuiltInChoice(e[t]))return!0;return!1}isBuiltInChoice(e){return!!e&&[this.otherItemValue,this.noneItemValue,this.refuseItemValue,this.dontKnowItemValue,this.newItemValue].indexOf(e)>-1}isNoneItem(e){return!0===e.isExclusive}getChoices(){return this.choices}get hasOther(){return this.showOtherItem}set hasOther(e){this.showOtherItem=e}get requireUpdateCommentValue(){return this.showCommentArea||this.showOtherItem}supportOther(){return this.isSupportProperty("showOtherItem")}supportNone(){return this.isSupportProperty("showNoneItem")}supportRefuse(){return this.isSupportProperty("showRefuseItem")}supportDontKnow(){return this.isSupportProperty("showDontKnowItem")}isSupportProperty(e){return!this.isDesignMode||this.getPropertyByName(e).visible}onCheckForErrors(e,t,s){if(super.onCheckForErrors(e,t,s),this.hasEmptyComments()&&(!t||this.prevOtherErrorValue)){let t=new eD(this.otherErrorText,this);t.onUpdateErrorTextCallback=e=>{e.text=this.otherErrorText},e.push(t)}}hasEmptyComments(){let e=this.visibleChoices;for(let t=0;t<e.length;t++){let s=e[t];if(s.isCommentRequired&&this.isCommentShowing(s)&&!this.getCommentValue(e[t]))return!0}return!1}setSurveyImpl(e,t){this.isRunningChoicesValue=!0,super.setSurveyImpl(e,t),this.isRunningChoicesValue=!1,this.runChoicesByUrl(),this.isAddDefaultItems&&this.updateVisibleChoices(),this.randomSeedChanged()}setSurveyCore(e){super.setSurveyCore(e),e&&this.choicesFromQuestion&&this.onVisibleChoicesChanged()}getStoreOthersAsComment(){return!this.showCommentArea&&(!!this.checkHasChoicesComments()||!0===this.storeOthersAsComment||"default"==this.storeOthersAsComment&&(null==this.survey||this.choiceCallbacks.storeOthersAsComment)||this.hasChoicesUrl&&!this.choicesFromUrl)}checkHasChoicesComments(){let e=this.choices;for(let t=0;t<e.length;t++)if(e[t].showCommentArea)return!0;return!1}onSurveyLoad(){this.runChoicesByUrl(),this.onVisibleChoicesChanged(),this.doForPanels(void 0,e=>{e.onSurveyLoad()}),super.onSurveyLoad()}onFirstRenderingCore(){super.onFirstRenderingCore(),this.doForPanels(!0,e=>{e.onFirstRendering()})}onAnyValueChanged(e,t){super.onAnyValueChanged(e,t),e!=this.getValueName()&&this.runChoicesByUrl();let s=this.choicesFromQuestion;e&&s&&(e===s||t===s)&&(this.onVisibleChoicesChanged(),this.clearIncorrectValues())}updateValueFromSurvey(e,t){var s="";this.showOtherItem&&this.activeChoices.length>
100&&!this.isRunningChoices&&this.getStoreOthersAsComment()&&(this.hasUnknownValue(e)&&!this.isOtherValue(e)?(s=this.getCommentFromValue(e),e=this.setOtherValueIntoValue(e)):this.data&&(s=this.data.getComment(this.getValueName()))),super.updateValueFromSurvey(e,t),this.isRunningChoices&&!this.isEmpty()&&(this.cachedValueForUrlRequests=this.value),s&&(this.isUpdatingValueFromSurvey=!0,this.setNewComment(s),this.isUpdatingValueFromSurvey=!1),this.updateValueForPanels(t,!1)}updateCommentFromSurvey(e){super.updateCommentFromSurvey(e),this.updateValueForPanels(!1,!0)}updateValueForPanels(e,t){this.data&&this.doForPanels(!0,s=>{s.questions.forEach(s=>{let i=s.getValueName();t?s.updateCommentFromSurvey(this.data.getComment(i)):s.updateValueFromSurvey(this.data.getValue(i),e)})})}getCommentFromValue(e){return e}setOtherValueIntoValue(e){return this.otherItem.value}onOtherValueInput(e,t){this.isInputTextUpdate&&t.target&&this.setCommentValueCore(e,t.target.value)}onOtherValueChange(e,t){let s=t.target;if(!s)return;this.setCommentValueCore(e,s.value||"");let i=this.getCommentValueCore(e);i!==s.value&&(s.value=i||"")}runChoicesByUrl(){if(this.updateIsUsingRestful(),this.choicesByUrlValue&&!this.isLoadingFromJson&&!this.isRunningChoicesValue&&!this.isInDesignMode&&!this.choicesLazyLoadEnabled){var e=this.surveyImpl?this.surveyImpl.getTextProcessor():this.textProcessor;e||(e=this.survey),e&&(this.updateIsReady(),this.isRunningChoicesValue=!0,this.choicesByUrl.run(e),this.isRunningChoicesValue=!1)}}get isRunningChoices(){var e;return this.isRunningChoicesValue||(null==(e=this.choicesByUrlValue)?void 0:e.isRunning)}onBeforeSendRequest(){!0!==p.web.disableQuestionWhileLoadingChoices||this.isReadOnly||(this.enableOnLoadingChoices=!0,this.readOnly=!0)}onLoadChoicesFromUrl(e){this.enableOnLoadingChoices&&(this.readOnly=!1);let t=[];if(!this.isReadOnly){let e=this.choicesByUrlValue;e&&e.error&&t.push(e.error)}var s,i=null,n=!0;this.isFirstLoadChoicesFromUrl&&!this.cachedValueForUrlRequests&&this.defaultValue&&(this.cachedValueForUrlRequests=this.defaultValue,n=!1),this.isValueEmpty(this.cachedValueForUrlRequests)&&(this.cachedValueForUrlRequests=this.value);var r=this.createCachedValueForUrlRequests(this.cachedValueForUrlRequests,n);if(e&&(e.length>0||(null==(s=this.choicesByUrlValue)?void 0:s.allowEmptyResponse))&&(i=[],tj.setData(i,e)),i)for(var a=0;a<i.length;a++)i[a].locOwner=this;this.setChoicesFromUrl(i,t,r)}canAvoidSettChoicesFromUrl(e){return!(this.isFirstLoadChoicesFromUrl||(!e||Array.isArray(e)&&0===e.length)&&!this.isEmpty())&&w.isTwoValueEquals(this.choicesFromUrl,e)}setChoicesFromUrl(e,t,s){if(!this.canAvoidSettChoicesFromUrl(e)){if(this.isFirstLoadChoicesFromUrl=!1,this.choicesFromUrl=e,this.filterItems(),this.onVisibleChoicesChanged(),e){var i=this.updateCachedValueForUrlRequests(s,e);if(i&&!this.isReadOnly){var n=!this.isTwoValueEquals(this.value,i.value);try{this.isValueEmpty(i.value)||(this.allowNotifyValueChanged=!1,this.setQuestionValue(void 0,!0,!1)),this.allowNotifyValueChanged=n,n?this.value=i.value:this.setQuestionValue(i.value,!0,!1)}finally{this.allowNotifyValueChanged=!0}}}this.isReadOnly||e||this.isFirstLoadChoicesFromUrl||(this.value=null),this.errors=t,this.choicesLoaded()}}createCachedValueForUrlRequests(e,t){if(this.isValueEmpty(e))return null;if(Array.isArray(e)){for(var s=[],i=0;i<e.length;i++)s.push(this.createCachedValueForUrlRequests(e[i],!0));return s}var n=!t||!this.hasUnknownValue(e);return{value:e,isExists:n}}updateCachedValueForUrlRequests(e,t){if(this.isValueEmpty(e))return null;if(Array.isArray(e)){for(var s=[],i=0;i<e.length;i++){var n=this.updateCachedValueForUrlRequests(e[i],t);if(n&&!this.isValueEmpty(n.value)){var r=n.value,a=this.getItemByValue(n.value,t);a&&(r=a.value),s.push(r)}}return{value:s}}var o=e.isExists&&this.hasUnknownValue(e.value)?null:e.value,a=this.getItemByValue(o,t);return a&&(o=a.value),{value:o}}updateChoicesDependedQuestions(){this.isLoadingFromJson||this.isUpdatingChoicesDependedQuestions||!this.allowNotifyValueChanged||this.isRunningChoices||(this.isUpdatingChoicesDependedQuestions=!0,this.updateDependedQuestions(),this.isUpdatingChoicesDependedQuestions=!1)}updateDependedQuestion(){this.onVisibleChoicesChanged(),this.clearIncorrectValues()}onSurveyValueChanged(e){super.onSurveyValueChanged(e),this.updateChoicesDependedQuestions()}onVisibleChoicesChanged(){this.isLoadingFromJson||this.isLockVisibleChoices||(this.updateVisibleChoices(),this.isOtherValue(this.renderedValue)&&this.setRenderedValue(this.rendredValueFromData(this.value),!1),this.onVisibleChanged(),this.visibleChoicesChangedCallback&&this.visibleChoicesChangedCallback(),this.updateChoicesDependedQuestions())}isVisibleCore(){let e=super.isVisibleCore();if(!this.hideIfChoicesEmpty||!e)return e;var t=this.isUsingCarryForward?this.visibleChoices:this.getFilteredChoices();return!t||t.length>0}sortArrayByChoicesOrder(e){let t=e.slice();if(this.isInDesignMode)return t;let s=this.choicesOrder.toLowerCase();return"asc"==s?this.sortArray(t,1):"desc"==s?this.sortArray(t,-1):"random"==s?this.randomizeArray(t):t}sortArray(e,t){return e.sort(function(e,s){return w.compareStrings(e.calculatedText,s.calculatedText)*t})}randomSeedChanged(){"random"===this.choicesOrder.toLowerCase()&&this.updateVisibleChoices()}randomizeArray(e){return w.randomizeArray(e,this.randomSeed)}get hasChoicesUrl(){var e;return!!(null==(e=this.choicesByUrlValue)?void 0:e.url)}clearIncorrectValues(){this.canClearIncorrectValues()&&this.hasValueToClearIncorrectValues()&&(this.clearIncorrectValuesCallback?this.clearIncorrectValuesCallback():this.clearIncorrectValuesCore())}canClearIncorrectValues(){return!this.canAddCustomChoices()&&(!this.carryForwardQuestion||!!this.carryForwardQuestion.isReady)&&(!this.survey||!(this.survey.questionsByValueName(this.getValueName()).length>1))&&(!this.hasChoicesUrl||!!this.choicesFromUrl&&0!=this.choicesFromUrl.length)}canAddCustomChoices(){return!1}hasValueToClearIncorrectValues(){return(!this.survey||!this.survey.keepIncorrectValues)&&!this.keepIncorrectValues&&!this.isEmpty()}clearValueIfInvisibleCore(e){super.clearValueIfInvisibleCore(e),this.clearIncorrectValues(),this.clearValuesInVisiblePanels(e)}clearValuesInVisiblePanels(e){this.doForPanels(!1,t=>
10{t.questions.forEach(e=>{e.clearValue()}),t.questions.forEach(t=>{t.clearValueIfInvisible(e)})})}isItemSelected(e){return this.isOtherItemByInstance(e)?this.isOtherSelected:this.isItemSelectedCore(e)}isItemSelectedCore(e){return e.value===this.renderedValue}clearDisabledValues(){this.survey&&this.choiceCallbacks.clearDisabledChoices&&this.clearDisabledValuesCore()}clearIncorrectValuesCore(){var e=this.value;this.canClearValueAnUnknown(e)&&this.clearValue(!0)}canClearValueAnUnknown(e){return(!!this.getStoreOthersAsComment()||!this.isOtherSelected)&&this.hasUnknownValue(e,!0,!0,!0)}clearDisabledValuesCore(){this.isValueDisabled(this.value)&&this.clearValue(!0)}clearUnusedValues(){super.clearUnusedValues(),this.isOtherValueUnused()&&(this.otherValue="")}isOtherValueUnused(){return!this.isOtherSelected}getColumnClass(){return new eX().append(this.cssClasses.column).append("sv-q-column-"+this.colCount,this.hasColumns).toString()}getItemIndex(e){return this.visibleChoices.indexOf(e)}getItemClass(e){let t={item:e};var s=this.getItemClassCore(e,t);return t.css=s,this.survey&&this.cssCallbacks.updateChoiceItemCss(this,t),t.css}getCurrentColCount(){return this.colCount}getItemClassCore(e,t){let s=new eX().append(this.cssClasses.item).append(this.cssClasses.itemInline,!this.hasColumns&&0===this.colCount).append("sv-q-col-"+this.getCurrentColCount(),!this.hasColumns&&0!==this.colCount).append(this.cssClasses.itemOnError,this.hasCssError()),i=this.getIsDisableAndReadOnlyStyles(!e.isEnabled),n=i[0],r=i[1],a=this.isItemSelected(e),o=!r&&!a&&!(this.survey&&this.survey.isDesignMode),l=e===this.noneItemValue;return t.isDisabled=r||n,t.isChecked=a,t.isNone=l,s.append(this.cssClasses.itemDisabled,r).append(this.cssClasses.itemReadOnly,n).append(this.cssClasses.itemPreview,this.isPreviewStyle).append(this.cssClasses.itemChecked,a).append(this.cssClasses.itemHover,o).append(this.cssClasses.itemNone,l).toString()}getLabelClass(e){return new eX().append(this.cssClasses.label).append(this.cssClasses.labelChecked,this.isItemSelected(e)).toString()}getControlLabelClass(e){return new eX().append(this.cssClasses.controlLabel).append(this.cssClasses.controlLabelChecked,this.isItemSelected(e)).toString()||void 0}updateRenderedChoices(){this.renderedChoices=this.onGetRenderedChoicesCallback?this.onGetRenderedChoicesCallback(this.visibleChoices):this.visibleChoices}getRenderedChoicesAnimationOptions(){return{isAnimationEnabled:()=>this.animationAllowed,getRerenderEvent:()=>this.onElementRerendered,getKey:e=>e!=this.newItemValue?e.value:this.newItemValue,getLeaveOptions:e=>{let t=this.cssClasses.itemLeave;if(this.hasColumns){let s=this.bodyItems.indexOf(e);-1!==s&&s!==this.bodyItems.length-1&&(t="")}return{cssClass:t,onBeforeRunAnimation:tR,onAfterRunAnimation:tT}},getAnimatedElement:e=>e.getRootElement(),getEnterOptions:e=>{let t=this.cssClasses.itemEnter;if(this.hasColumns){let s=this.bodyItems.indexOf(e);-1!==s&&s!==this.bodyItems.length-1&&(t="")}return{cssClass:t,onBeforeRunAnimation:t=>{if(0==this.getCurrentColCount()&&this.bodyItems.indexOf(e)>=0){let e=t.parentElement.firstElementChild.offsetLeft;t.offsetLeft>e&&tP(t,{moveAnimationDuration:"0s",fadeAnimationDelay:"0s"},"--")}tR(t)},onAfterRunAnimation:tT}}}}get renderedChoices(){return this._renderedChoices}set renderedChoices(e){this.renderedChoicesAnimation.sync(e)}get headItems(){let e=this.separateSpecialChoices||this.isInDesignMode?this.headItemsCount:0,t=[];for(let s=0;s<e;s++)this.renderedChoices[s]&&t.push(this.renderedChoices[s]);return t}get footItems(){let e=this.separateSpecialChoices||this.isInDesignMode?this.footItemsCount:0,t=[],s=this.renderedChoices;for(let i=0;i<e;i++)this.renderedChoices[s.length-e+i]&&t.push(this.renderedChoices[s.length-e+i]);return t}get dataChoices(){return this.renderedChoices.filter(e=>!this.isBuiltInChoice(e))}get bodyItems(){return this.hasHeadItems||this.hasFootItems?this.dataChoices:this.renderedChoices}get hasHeadItems(){return this.headItems.length>0}get hasFootItems(){return this.footItems.length>0}get itemFlowDirection(){return p.itemFlowDirection}
10get columns(){if(!this.hasColumns||0===this.renderedChoices.length)return[];let e=this.getCurrentColCount(),t=this.separateSpecialChoices||this.isInDesignMode?this.dataChoices:this.renderedChoices;return"column"===this.itemFlowDirection?this.getColumnsWithColumnItemFlow(t,e):this.getColumnsWithRowItemFlow(t,e)}getColumnsWithColumnItemFlow(e,t){let s=[],i=Math.floor(e.length/t);e.length%t&&(i+=1);let n=e.length,r=t,a=0;for(let o=0;o<t;o++){let t=[];for(let s=0;s<i;s++){n<=r&&(i=1);let o=e[s+a];o&&(t.push(o),n--)}s.push(t),r--,a+=t.length}return s}getColumnsWithRowItemFlow(e,t){let s=[];for(let i=0;i<t;i++){let n=[];for(let s=i;s<e.length;s+=t)n.push(e[s]);s.push(n)}return s}getItemsColumnKey(e){return(e||[]).map(e=>e.uniqueId).join("-")}get hasColumns(){return!this.isMobile&&this.getCurrentColCount()>1}get rowLayout(){return 0==this.getCurrentColCount()&&!(this.hasFootItems||this.hasHeadItems)}get blockedRow(){return 0==this.getCurrentColCount()&&(this.hasFootItems||this.hasHeadItems)}choicesLoaded(){this.isChoicesLoaded=!0,this.updateIsReady(),this.survey&&this.choiceCallbacks.loadedChoicesFromServer(this),this.loadedChoicesFromServerCallback&&this.loadedChoicesFromServerCallback()}getItemValueWrapperComponentName(e){let t=this.survey;
10return t?t.getItemValueWrapperComponentName(e,this):ip.TemplateRendererComponentName}getItemValueWrapperComponentData(e){let t=this.survey;return t?t.getItemValueWrapperComponentData(e,this):e}ariaItemChecked(e){return this.renderedValue===e.value?"true":"false"}isOtherItem(e){return this.showOtherItem&&this.isOtherValue(e.value)}isOtherItemByInstance(e){let t=this.showOtherItem?this.otherItem:this.otherItemValue;return!!e&&e===t}get itemSvgIcon(){return this.isPreviewStyle&&this.cssClasses.itemPreviewSvgIconId?this.cssClasses.itemPreviewSvgIconId:this.cssClasses.itemSvgIconId}getSelectBaseRootCss(){return new eX().append(this.getQuestionRootCss()).append(this.cssClasses.rootRow,this.rowLayout).toString()}allowMobileInDesignMode(){return!0}getAriaItemLabel(e){return e.locText.renderedHtml}getItemId(e){return this.inputId+"_"+this.getItemIndex(e)}get questionName(){return this.name+"_"+this.id}getItemEnabled(e){return!this.isDisabledAttr&&e.isEnabled}focusOtherComment(e){var t;this.autoOtherMode||tL.FocusElement(this.getItemCommentId(e),!1,null==(t=this.survey)?void 0:t.rootElement)}getDefaultItemComponent(){return""}}V([e_()],iC.prototype,"selectedItemValues",void 0),V([e_()],iC.prototype,"showNoneItem",void 0),V([e_()],iC.prototype,"showRefuseItem",void 0),V([e_()],iC.prototype,"showDontKnowItem",void 0),V([e_()],iC.prototype,"choicesVisibleIf",void 0),V([e_()],iC.prototype,"choicesEnableIf",void 0),V([e_()],iC.prototype,"autoOtherMode",void 0),V([e_()],iC.prototype,"choices",void 0),V([e_()],iC.prototype,"choicesFromQuestionMode",void 0),V([e_()],iC.prototype,"choiceValuesFromQuestion",void 0),V([e_()],iC.prototype,"choiceTextsFromQuestion",void 0),V([e_()],iC.prototype,"hideIfChoicesEmpty",void 0),V([e_()],iC.prototype,"keepIncorrectValues",void 0),V([e_()],iC.prototype,"storeOthersAsComment",void 0),V([e_({isLowerCase:!0})],iC.prototype,"choicesOrder",void 0),V([e_()],iC.prototype,"separateSpecialChoices",void 0),V([e_({localizable:{defaultStr:!0}})],iC.prototype,"otherPlaceholder",void 0),V([e_({localizable:{defaultStr:"Other required error",markdown:!0}})],iC.prototype,"otherErrorText",void 0),V([e_()],iC.prototype,"isMessagePanelVisible",void 0),V([e_({onSetting:(e,t)=>!!t.supportOther()&&e})],iC.prototype,"showOtherItem",void 0),V([eH()],iC.prototype,"_renderedChoices",void 0),V([e_({getDefaultValue:e=>e.getDefaultItemComponent()})],iC.prototype,"itemComponent",void 0);class iy extends iC{get colCount(){return this.getPropertyValue("colCount",this.isFlowLayout?0:void 0)}set colCount(e){e<0||e>5||this.isFlowLayout||(this.setPropertyValue("colCount",e),this.fireCallback(this.colCountChangedCallback))}onParentChanged(){super.onParentChanged(),this.isFlowLayout&&this.setPropertyValue("colCount",null)}onParentQuestionChanged(){this.onVisibleChoicesChanged()}getSearchableItemValueKeys(e){e.push("choices")}}function ib(e,t){var s;if(!e)return!1;if(e.templateQuestion){let t=null==(s=e.colOwner)?void 0:s.data;if(!(e=e.templateQuestion).getCarryForwardQuestion(t))return!1}return e.carryForwardQuestionType===t}H.addClass("choiceitem",[{name:"showCommentArea:boolean",locationInTable:"detail",visibleIf:e=>e.supportComment},{name:"isCommentRequired:boolean",locationInTable:"detail",visibleIf:e=>e.showCommentArea},{name:"commentPlaceholder",locationInTable:"detail",serializationProperty:"locCommentPlaceholder",visibleIf:e=>e.showCommentArea},{name:"elements",baseClassName:"question",visible:!1,isLightSerializable:!1,isSerializableFunc:e=>e.hasElements}],e=>new iv(e),"itemvalue"),H.addClass("selectbase",[{name:"showCommentArea:switch",visible:!0},"choicesFromQuestion:question_carryforward",{name:"choices:choiceitem[]",uniqueProperty:"value",baseValue:function(){return E("choices_Item")},dependsOn:"choicesFromQuestion",visibleIf:e=>!e.choicesFromQuestion},{name:"choicesFromQuestionMode",default:"all",choices:["all","selected","unselected"],dependsOn:"choicesFromQuestion",visibleIf:e=>ib(e,"select")},{name:"choiceValuesFromQuestion",dependsOn:"choicesFromQuestion",visibleIf:e=>ib(e,"array")},{name:"choiceTextsFromQuestion",dependsOn:"choicesFromQuestion",visibleIf:e=>ib(e,"array")},{name:"choicesOrder",default:"none",choices:["none","asc","desc","random"],dependsOn:"choicesFromQuestion",visibleIf:e=>!e.choicesFromQuestion},{name:"choicesByUrl:restfull",className:"choicesByUrl",onGetValue:e=>{let t=e.choicesByUrlValue;return t?t.toJSON():void 0},onSetValue:(e,t)=>
10{e.choicesByUrl.setData(t)}},"hideIfChoicesEmpty:boolean","choicesVisibleIf:condition",{name:"choicesEnableIf:condition",dependsOn:"choicesFromQuestion",visibleIf:e=>!e.choicesFromQuestion},{name:"defaultValue:value",visibleIf:e=>!e.choicesFromQuestion,dependsOn:"choicesFromQuestion"},{name:"correctAnswer:value",visibleIf:e=>!e.choicesFromQuestion,dependsOn:"choicesFromQuestion"},{name:"separateSpecialChoices:boolean",visible:!1},{name:"showOtherItem:boolean",alternativeName:"hasOther"},{name:"showNoneItem:boolean",alternativeName:"hasNone"},{name:"showRefuseItem:boolean",visible:!1,version:"1.9.128"},{name:"showDontKnowItem:boolean",visible:!1,version:"1.9.128"},{name:"otherPlaceholder",alternativeName:"otherPlaceHolder",serializationProperty:"locOtherPlaceholder",dependsOn:"showOtherItem",visibleIf:function(e){return e.showOtherItem}},{name:"noneText",serializationProperty:"locNoneText",dependsOn:"showNoneItem",visibleIf:function(e){return e.showNoneItem}},{name:"refuseText",serializationProperty:"locRefuseText",dependsOn:"showRefuseItem",visibleIf:function(e){return e.showRefuseItem}},{name:"dontKnowText",serializationProperty:"locDontKnowText",dependsOn:"showDontKnowItem",visibleIf:function(e){return e.showDontKnowItem}},{name:"otherText",serializationProperty:"locOtherText",dependsOn:"showOtherItem",visibleIf:function(e){return e.showOtherItem}},{name:"otherErrorText",serializationProperty:"locOtherErrorText",dependsOn:"showOtherItem",visibleIf:function(e){return e.showOtherItem}},{name:"storeOthersAsComment",default:"default",choices:["default",!0,!1],visible:!1}],null,"question"),H.addClass("checkboxbase",[{name:"colCount:number",default:1,choices:[0,1,2,3,4,5],layout:"row"}],null,"selectbase");let iw="sv-focused--by-key";function iV(e){let t=e.target;t&&t.classList&&t.classList.remove(iw)}function ix(e,t){if(e.target&&"true"===e.target.contentEditable)return;let s=e.target;if(!s)return;let i=e.which||e.keyCode;if(9===i){s.classList&&!s.classList.contains(iw)&&s.classList.add(iw);return}if(t){if(!t.__keyDownReceived)return;t.__keyDownReceived=!1}13===i||32===i?s.click&&s.click():(!t||t.processEsc)&&27===i&&s.blur&&s.blur()}function iI(e,t={processEsc:!0}){if(t&&(t.__keyDownReceived=!0),e.target&&"true"===e.target.contentEditable)return;var s=e.which||e.keyCode;let i=[13,32];t.processEsc&&i.push(27),-1!==i.indexOf(s)&&e.preventDefault()}class iE extends ew{get focusFirstInputSelector(){return this.getFocusFirstInputSelector()}getFocusFirstInputSelector(){return tp?this.isValueEmpty(this.question.value)?this.itemSelector:this.selectedItemSelector:!this.listModel.showFilter&&this.question.value?this.selectedItemSelector:""}resetItemsSettings(){this.itemsSettings.skip=0,this.itemsSettings.take=Math.max(this.minPageSize,this.question.choicesLazyLoadPageSize),this.itemsSettings.totalCount=0,this.itemsSettings.items=[]}setItems(e,t){this.itemsSettings.items=[].concat(this.itemsSettings.items,e),this.itemsSettings.totalCount=t,this.listModel.isAllDataLoaded=this.choicesLazyLoadEnabled&&this.itemsSettings.items.length==this.itemsSettings.totalCount,this.question.choices=this.itemsSettings.items}_loadQuestionChoices(e){let t=this.filterString;this.setIsChoicesLoading(!0),this.question.survey.loadQuestionChoices({question:this.question,filter:this.filterString,skip:this.itemsSettings.skip,take:this.itemsSettings.take,setItems:(s,i)=>{this.setItems(s||[],i||0),this.popupRecalculatePosition(this.itemsSettings.skip===this.itemsSettings.take),e&&e(),this.processCustomValue(t),this.setIsChoicesLoading(!1)}}),this.itemsSettings.skip+=this.itemsSettings.take}setIsChoicesLoading(e){this.question.setIsChoicesLoading&&this.question.setIsChoicesLoading(e)}processCustomValue(e){if(!this.allowCustomChoices)return;let t=e||this.filterString;this.listModel.getVisibleActions().filter(e=>w.isTwoValueEquals(e.text,t,!1,!1))[0]?this.customValue=void 0:(this.customValue=t,this.updateItems(),this.listModel.focusFirstVisibleItem())}updateQuestionChoices(e){let t=this.itemsSettings.skip+1<this.itemsSettings.totalCount;(!this.itemsSettings.skip||t)&&(this.resetTimer(),this.filterString&&p.dropdownSearchDelay>0?this.timer=setTimeout(()=>{this._loadQuestionChoices(e)},p.dropdownSearchDelay):this._loadQuestionChoices(e))}resetTimer(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}updatePopupFocusFirstInputSelector(){this._popupModel.focusFirstInputSelector=this.focusFirstInputSelector}getDropdownMenuOptions(){let e=i.getInnerWidth(),t=i.getInnerHeight(),n=function(e,t,n=600){return void 0!==s?s:Math.min(e||i.getInnerWidth(),t||i.getInnerHeight())>=n}(e,t),r="dropdown",a="desktop";return tp&&(r="popup",a=n?"tablet":"mobile"),{menuType:r,deviceType:a,hasTouchScreen:tp,screenHeight:t,screenWidth:e}}
10checkFocusRemainsWithinComponent(e){if(!this.question.cssClasses.root||!(null==e?void 0:e.target))return!1;let t=e.target.closest(e8(this.question.cssClasses.root));return t&&t.contains(e.relatedTarget)}createButtons(){this.editorButtons=new to,this.editorButtons.containerCss="sd-dropdown-action-bar",this.chevronButton=new e2({id:"chevron",css:"sd-editor-chevron-button",iconName:this.question.cssClasses.chevronButtonIconId||"icon-chevron",iconSize:"auto",showTitle:!1,locTitle:this.locSelectCaption,disableTabStop:!0,enabled:!this.question.isInputReadOnly,visible:!this.question.isPreviewStyle,action:e=>{this.onClick()}}),this.clearButton=new e2({id:"clear",css:"sd-editor-clean-button",iconName:this.question.cssClasses.cleanButtonIconId||"icon-cancel-24x24",iconSize:"auto",showTitle:!1,locTitle:this.locClearCaption,disableTabStop:!0,enabled:!this.question.isInputReadOnly,visible:this.isClearButtonVisible,action:e=>{this.onClear()}}),this.editorButtons.setItems([this.clearButton,this.chevronButton]),this.editorButtons.actions.forEach(e=>e.cssClasses={item:"sd-editor-button-item",itemIcon:"sv-editor-button-item__icon",itemPressed:"sd-editor-button-item--pressed"})}get isClearButtonVisible(){return this.question.allowClear&&!this.question.isEmpty()&&!this.question.isReadOnly}updateButtonsState(){this.chevronButton&&(this.chevronButton.setEnabled(!this.question.isInputReadOnly),this.chevronButton.setVisible(!this.question.isPreviewStyle)),this.clearButton&&(this.clearButton.setEnabled(!this.question.isInputReadOnly),this.clearButton.setVisible(this.isClearButtonVisible))}createPopup(){this._popupModel=new tv("sv-list",{model:this.listModel},{verticalPosition:"bottom",horizontalPosition:"center",showPointer:!1}),this._popupModel.displayMode=tp?"overlay":"popup",this._popupModel.positionMode="fixed",this._popupModel.isFocusedContainer=!1,this._popupModel.isFocusedContent=tp,this._popupModel.setWidthByTarget=!tp,this._popupModel.locale=this.question.getLocale(),this.updatePopupFocusFirstInputSelector(),this.listModel.registerPropertyChangedHandlers(["showFilter"],()=>{this.updatePopupFocusFirstInputSelector()}),this._popupModel.onVisibilityChanged.add((e,t)=>{this.popupVisibilityChanged(t.isVisible),this.chevronButton.pressed=t.isVisible})}popupVisibilityChanged(e){if(e&&(this.listModel.renderElements=!0),e&&this.choicesLazyLoadEnabled&&(this.listModel.actions=[],this.resetItemsSettings(),this.updateQuestionChoices()),e){this.updatePopupFocusFirstInputSelector();let e=this.getDropdownMenuOptions();this.question.processOpenDropdownMenu(e),this._popupModel.updateDisplayMode(e.menuType)&&this.listModel.setSearchEnabled(this.inputAvailable&&"dropdown"!==e.menuType),this.question.onOpenedCallBack&&this.question.onOpenedCallBack()}e||this.onHidePopup(),this.ariaExpanded=e?"true":"false",this.question.processPopupVisiblilityChanged(this.popupModel,e)}setFilterStringToListModel(e){if(this.listModel.filterString=e,this.listModel.resetFocusedItem(),this.question.selectedItem&&this.question.selectedItem.text.indexOf(e)>=0){this.listModel.focusedItem=this.getAvailableItems().filter(e=>e.id==this.question.selectedItem.value)[0],this.listModel.filterString&&this.listModel.actions.map(e=>e.selectedValue=!1);return}this.listModel.focusedItem&&this.listModel.isItemVisible(this.listModel.focusedItem)||this.listModel.focusFirstVisibleItem()}setTextWrapEnabled(e){this.listModel.textWrapEnabled=e}popupRecalculatePosition(e){setTimeout(()=>{this.popupModel.recalculatePosition(e)},1)}onHidePopup(){this.question.suggestedItem=null,this.choicesLazyLoadEnabled&&this.resetItemsSettings(),this.customValue=void 0,this.resetCustomItemValue()}getAvailableItems(){return this.allowCustomChoices?[].concat(this.question.visibleChoices,[this.customItemValue]):this.question.visibleChoices}setOnTextSearchCallbackForListModel(e){e.setOnTextSearchCallback((e,t)=>{if(e.id===this.customItemValue.id)return e.visible;if(this.filteredItems)return this.filteredItems.indexOf(e)>=0;let s=b(e.text,"filter"),i=b(t,"filter"),n=s.indexOf(i);return"startsWith"==this.question.searchMode?0==n:n>-1})}createListModel(){let e=this.getAvailableItems(),t=this.onSelectionChanged;t||(t=e=>{this.setQuestionValue(e),this.popupModel.hide()});let s=new tm({items:e,onSelectionChanged:t,allowSelection:!1,locOwner:this.question,elementId:this.listElementId});return this.setOnTextSearchCallbackForListModel(s),s.renderElements=!1,s.forceShowFilter=this.question.choicesLazyLoadEnabled||this.question.allowCustomChoices,s.areSameItemsCallback=(e,t)=>e===t,s}setQuestionValue(e){let t=e;this.allowCustomChoices&&e.id===this.customItemValue.id&&(t=this.createCustomItem()),t&&(this.resetFilterString(),this.question.selectItem(t),this.searchEnabled&&this.applyInputString(t))}selectAvailableItem(){if(!tp&&p.dropdownSaveOnOutsideClick&&this.popupModel.isVisible){let e=this.listModel.visibleItems;if(e.length>0)return this.listModel.onItemClick(e[0]),!0}return!1}createCustomItem(){let e=new tj(this.customValue),t={item:e,question:this.question,allow:!0};return(this.question.survey.createCustomChoiceItem(t),t.allow)?(this.question.customChoices.push(e),this.customValue=void 0,this.updateItems(),e):(this.clear(),null)}updateAfterListModelCreated(e){e.isItemSelected=e=>!!e.selected,e.isAllDataLoaded=!this.choicesLazyLoadEnabled,e.disableSearch=this.choicesLazyLoadEnabled,e.actions.forEach(e
10=>e.disableTabStop=!0),e.setOnFilterStringChangedCallback(this.listModelFilterStringChanged),e.setLoadingIndicatorVisibilityObserver(e=>{e&&this.updateQuestionChoices()})}getPopupCssClasses(){return"sv-single-select-list"}updateCssClasses(e,t){this.popupModel.cssClass=new eX().append(e).append(this.getPopupCssClasses()).toString(),this.listModel.cssClasses=t}resetFilterString(){this.filterString&&(this.filterString=void 0,this.listModel.filterString=""),this.inputString=null,this.hintString=""}clear(){this.customValue=void 0,this.resetFilterString()}onSetFilterString(){if(this.filteredItems=void 0,!this.filterString&&!this.popupModel.isVisible)return;let e={question:this.question,choices:this.getAvailableItems(),filter:this.filterString,filteredChoices:void 0};this.question.survey.onChoicesSearch.fire(this.question.survey,e),this.filteredItems=e.filteredChoices,this.filterString&&!this.popupModel.isVisible&&this.popupModel.show();let t=()=>{this.setFilterStringToListModel(this.filterString),this.filterString&&this.applyHintString(),this.popupRecalculatePosition(!0)};this.choicesLazyLoadEnabled?(this.resetItemsSettings(),this.updateQuestionChoices(t)):t()}get isAllDataLoaded(){return!!this.itemsSettings.totalCount&&this.itemsSettings.items.length==this.itemsSettings.totalCount}loadQuestionChoices(e){this.isAllDataLoaded||this._loadQuestionChoices(e)}get canShowSelectedItem(){return!this.focused||this._markdownMode||!this.searchEnabled}get needRenderInput(){return!this.question.isInputReadOnly||!!this.placeholderRendered}updateCustomItemValue(){this.customValue?(this.customItemValue.text=this.getCustomItemText(this.customValue),this.customItemValue.visible=!0):this.resetCustomItemValue()}resetCustomItemValue(){this.customItemValue.text="",this.customItemValue.visible=!1}get customItemValue(){return this._customItemValue||(this._customItemValue=new tj("newCustomItem",this.getCustomItemText(this.customValue)),this._customItemValue.css="sv-list-item--custom-value"),this._customItemValue}getCustomItemText(e){let t=this.question.createCustomChoiceText;return t?t.replace("{0}",e):this.getLocalizationFormatString("createCustomItem",e)}applyInputString(e){(null==e?void 0:e.locText.hasHtml)||this.question.inputFieldComponentName?(this._markdownMode=!0,this.inputString=this.cleanHtml(null==e?void 0:e.locText.getHtmlValue()),this.hintString=""):(this.inputString=null==e?void 0:e.title,this.hintString=null==e?void 0:e.title)}cleanHtml(e){return this.htmlCleanerElement?(this.htmlCleanerElement.innerHTML=e,this.htmlCleanerElement.textContent):""}fixInputCase(){let e=this.hintStringMiddle;e&&this.inputString!=e&&(this.inputString=e)}applyHintString(){let e=this.listModel.focusedItem||this.question.selectedItem;(null==e?void 0:e.locText.hasHtml)||this.question.inputFieldComponentName?(this._markdownMode=!0,this.hintString=""):e===this.customItemValue?this.hintString="":this.hintString=null==e?void 0:e.title}get inputStringRendered(){return this.inputString||""}set inputStringRendered(e){var t;this.inputString=e,this.filterString=e,this.choicesLazyLoadEnabled||this.processCustomValue(),e&&this.searchEnabled&&(null==(t=this.listModel.focusedItem)?void 0:t.id)!==this.customItemValue.id||(this.hintString="")}get placeholderRendered(){return this.hintString||this.question.readOnly||!this.question.isEmpty()?"":this.inputPlaceholder}get listElementId(){return this.question.inputId+"_list"}get hintStringLC(){var e;return(null==(e=this.hintString)?void 0:e.toLowerCase())||""}get inputStringLC(){var e;return(null==(e=this.inputString)?void 0:e.toLowerCase())||""}get showHintPrefix(){return!!this.inputString&&this.hintStringLC.indexOf(this.inputStringLC)>0}get hintStringPrefix(){return this.inputString?this.hintString.substring(0,this.hintStringLC.indexOf(this.inputStringLC)):null}get showHintString(){return!!this.searchEnabled&&!!(this.hintStringLC||this.inputStringLC)||!this.searchEnabled&&this.hintStringLC&&this.question.isEmpty()}get hintStringSuffix(){return this.hintStringLC.indexOf(this.inputStringLC)>=0?this.hintString.substring(this.hintStringLC.indexOf(this.inputStringLC)+this.inputStringLC.length):""}get hintStringMiddle(){let e=this.hintStringLC.indexOf(this.inputStringLC);return -1==e?null:this.hintString.substring(e,e+this.inputStringLC.length)}constructor(e,t){super(),this.question=e,this.onSelectionChanged=t,this.minPageSize=25,this.loadingItemHeight=40,this.timer=void 0,this._markdownMode=!1,this.filteredItems=void 0,this.selectedItemSelector=".sv-list__item--selected",this.itemSelector=".sv-list__item",this.itemsSettings={skip:0,take:0,totalCount:0,items:[]},this.listModelFilterStringChanged=e=>{this.filterString!==e&&(this.filterString=e,this.choicesLazyLoadEnabled||this.processCustomValue())}
vendor: 4,735 bytes, line 10
10,this.questionPropertyChangedHandler=(e,t)=>{this.onPropertyChangedHandler(e,t)},this.surveyPropertyChangedHandler=(e,t)=>{"state"===t.name&&this.updateButtonsState()},this.ariaExpanded="false",this.createLocalizableString("clearCaption",this.question,!1,!0),this.createLocalizableString("selectCaption",this.question,!1,!0),this.htmlCleanerElement=n.createElement("div"),e.onPropertyChanged.add(this.questionPropertyChangedHandler),e.survey&&e.survey.onPropertyChanged.add(this.surveyPropertyChangedHandler),this.showInputFieldComponent=this.question.showInputFieldComponent,this.listModel=this.createListModel(),this.setChoicesLazyLoadEnabled(this.question.choicesLazyLoadEnabled),this.setInputPlaceholder(this.question.placeholder),this.updateAfterListModelCreated(this.listModel),this.setSearchEnabled(this.question.searchEnabled),this.setAllowCustomChoices(this.question.allowCustomChoices),this.setTextWrapEnabled(this.question.textWrapEnabled),this.createPopup(),this.createButtons(),this.resetItemsSettings();const s=e.cssClasses;this.updateCssClasses(s.popup,s.list)}get popupModel(){return this._popupModel}get clearCaption(){return this.getLocalizableStringText("clearCaption")}set clearCaption(e){this.setLocalizableStringText("clearCaption",e)}get locClearCaption(){return this.getLocalizableString("clearCaption")}get selectCaption(){return this.getLocalizableStringText("selectCaption")}set selectCaption(e){this.setLocalizableStringText("selectCaption",e)}get locSelectCaption(){return this.getLocalizableString("selectCaption")}get inputAvailable(){return this.searchEnabled||this.allowCustomChoices}get noTabIndex(){return this.question.isInputReadOnly||this.inputAvailable}get filterReadOnly(){return!this.filterStringEnabled||!this.focused}get filterStringEnabled(){return!this.question.isInputReadOnly&&this.inputAvailable}get inputMode(){return tp?"none":"text"}get popupEnabled(){return!this.question.isInputReadOnly}get ariaQuestionRole(){return this.filterStringEnabled?void 0:"combobox"}get ariaQuestionRequired(){return this.ariaQuestionRole?this.question.a11y_input_ariaRequired:void 0}get ariaQuestionInvalid(){return this.ariaQuestionRole?this.question.a11y_input_ariaInvalid:void 0}get ariaQuestionErrorMessage(){return this.ariaQuestionRole?this.question.a11y_input_ariaErrormessage:void 0}get ariaQuestionLabel(){return this.ariaQuestionRole?this.question.a11y_input_ariaLabel:void 0}get ariaQuestionLabelledby(){return this.ariaQuestionRole?this.question.a11y_input_ariaLabelledBy:void 0}get ariaQuestionDescribedby(){return this.ariaQuestionRole?this.question.a11y_input_ariaDescribedBy:void 0}get ariaQuestionControls(){return this.ariaQuestionRole&&this.popupEnabled?this.listElementId:void 0}get ariaQuestionExpanded(){return this.ariaQuestionRole?this.popupEnabled?this.ariaExpanded:"false":void 0}get ariaQuestionActivedescendant(){return this.ariaQuestionRole?this.ariaActivedescendant:void 0}get ariaInputRole(){return this.filterStringEnabled?"combobox":void 0}get ariaInputRequired(){return this.ariaInputRole?this.question.a11y_input_ariaRequired:void 0}get ariaInputInvalid(){return this.ariaInputRole?this.question.a11y_input_ariaInvalid:void 0}get ariaInputErrorMessage(){return this.ariaInputRole?this.question.a11y_input_ariaErrormessage:void 0}get ariaInputLabel(){return this.ariaInputRole?this.question.a11y_input_ariaLabel:void 0}get ariaInputLabelledby(){return this.ariaInputRole?this.question.a11y_input_ariaLabelledBy:void 0}get ariaInputDescribedby(){return this.ariaInputRole?this.question.a11y_input_ariaDescribedBy:void 0}get ariaInputControls(){return this.ariaInputRole&&this.popupEnabled?this.listElementId:void 0}get ariaInputExpanded(){return this.ariaInputRole?this.popupEnabled?this.ariaExpanded:"false":void 0}get ariaInputActivedescendant(){return this.ariaInputRole?this.ariaActivedescendant:void 0}setSearchEnabled(e){this.listModel.setSearchEnabled(tp&&(e||this.question.allowCustomChoices)),this.searchEnabled=e}setAllowCustomChoices(e){this.allowCustomChoices=e,this.listModel.forceShowFilter=this.question.choicesLazyLoadEnabled||e,e&&(this.searchEnabled=e)}setChoicesLazyLoadEnabled(e){this.choicesLazyLoadEnabled=e,this.listModel.disableSearch=e,this.listModel.isAllDataLoaded=!e,this.listModel.forceShowFilter=e||this.question.allowCustomChoices}setInputPlaceholder(e){this.inputPlaceholder=e}updateItems(){this.listModel.setItems(this.getAvailableItems())}onClick(e){this.question.readOnly||this.question.isDesignMode||this.question.isPreviewStyle||this.question.isReadOnlyAttr||(this._popupModel.toggleVisibility(),this.focusItemOnClickAndPopup(),this.question.focusInputElement(!1))}chevronPointerDown(e){this._popupModel.isVisible&&e.preventDefault()}
10onPropertyChangedHandler(e,t){"value"==t.name&&(this.showInputFieldComponent=this.question.showInputFieldComponent,this.updateButtonsState()),("readOnly"===t.name||"isInputReadOnly"===t.name||"isDesignMode"===t.name||"forceIsInputReadOnly"===t.name||"allowClear"===t.name)&&this.updateButtonsState(),"textWrapEnabled"==t.name&&this.setTextWrapEnabled(t.newValue)}focusItemOnClickAndPopup(){this._popupModel.isVisible&&this.question.value&&this.changeSelectionWithKeyboard(!1)}onClear(e){this.question.clearValueFromUI(),this._popupModel.hide(),e&&(e.preventDefault(),e.stopPropagation())}getSelectedAction(){return this.question.selectedItem||null}changeSelectionWithKeyboard(e){var t;let s=this.listModel.focusedItem;!s&&this.question.selectedItem?tj.getItemByValue(this.question.visibleChoices,this.question.value)&&(this.listModel.focusedItem=this.question.selectedItem):e?this.listModel.focusPrevVisibleItem():this.listModel.focusNextVisibleItem(),this.beforeScrollToFocusedItem(s),this.scrollToFocusedItem(),this.afterScrollToFocusedItem(),this.ariaActivedescendant=null==(t=this.listModel.focusedItem)?void 0:t.elementId}beforeScrollToFocusedItem(e){this.question.value&&e&&(e.selectedValue=!1,this.listModel.focusedItem.selectedValue=!this.listModel.filterString,this.question.suggestedItem=this.listModel.focusedItem)}afterScrollToFocusedItem(){var e;this.question.value&&!this.listModel.filterString&&this.searchEnabled?this.applyInputString(this.listModel.focusedItem||this.question.selectedItem):this.applyHintString(),this.fixInputCase(),this.ariaActivedescendant=null==(e=this.listModel.focusedItem)?void 0:e.elementId}keyHandler(e){let t=e.keyCode,s=e.which||t;this.handleKeyEvent(t,s,e).stopPropagation&&(e.preventDefault(),e.stopPropagation())}handleKeyEvent(e,t,s){return e===iE.KEY_UP?this.handleArrowUp(s):e===iE.KEY_DOWN?this.handleArrowDown():e===iE.KEY_TAB?this.handleTab(s):e===iE.KEY_SPACE?this.handleSpace(s):e===iE.KEY_ENTER?this.handleEnter(s):t===iE.KEY_DELETE||t===iE.KEY_BACKSPACE?this.handleDelete(s):e===iE.KEY_ESCAPE?this.handleEscape():this.handleOtherKeys(s)}handleArrowUp(e){return this.popupModel.isVisible?this.changeSelectionWithKeyboard(!0):ix(e,{processEsc:!1,disableTabStop:this.question.isInputReadOnly}),{stopPropagation:!0}}handleArrowDown(){return this.popupModel.show(),this.changeSelectionWithKeyboard(!1),{stopPropagation:!0}}handleTab(e){return this.handleEnter(e),this.popupModel.hide(),{stopPropagation:!1}}handleSpace(e){return this.popupModel.isVisible?this.searchEnabled&&this.inputString?{stopPropagation:!1}:(this.listModel.selectFocusedItem(),this.onFocus(e),{stopPropagation:!0}):(this.popupModel.show(),this.changeSelectionWithKeyboard(!1),{stopPropagation:!0})}handleEnter(e){return this.popupModel.isVisible?this.handleEnterWhenPopupVisible(e):this.handleEnterWhenPopupHidden(e),{stopPropagation:!0}}handleEnterWhenPopupHidden(e){this.question.survey.questionEditFinishCallback(this.question,e)}handleEnterWhenPopupVisible(e){this.searchEnabled&&!this.inputString&&!this._markdownMode&&this.question.value?(this._popupModel.hide(),this.onClear(e)):(this.listModel.selectFocusedItem(),this.onFocus(e))}handleDelete(e){return this.inputAvailable||this.onClear(e),{stopPropagation:!1}}handleEscape(){return this._popupModel.hide(),this.resetFilterString(),this.onEscape(),{stopPropagation:!1}}handleOtherKeys(e){return ix(e,{processEsc:!1,disableTabStop:this.question.isInputReadOnly}),{stopPropagation:!1}}onEscape(){this.searchEnabled&&this.applyInputString(this.question.selectedItem)}onScroll(e){let t=e.target;t.scrollHeight-(t.scrollTop+t.offsetHeight)<=this.loadingItemHeight&&this.updateQuestionChoices()}onBlur(e){this.checkFocusRemainsWithinComponent(e)||(this.focused=!1,this.popupModel.isVisible&&"overlay"==this.popupModel.displayMode||(iV(e),this.selectAvailableItem()||this.resetFilterString(),this._popupModel.hide(),e.stopPropagation()))}onFocus(e){this.focused=!0,this.setInputStringFromSelectedItem(this.question.selectedItem)}setInputStringFromSelectedItem(e){this.focused&&this.searchEnabled&&e&&this.applyInputString(e)}dispose(){super.dispose(),this.question&&this.question.onPropertyChanged.remove(this.questionPropertyChangedH
vendor: 4,820 bytes, line 10
10andler),this.question&&this.question.survey&&this.question.survey.onPropertyChanged.remove(this.surveyPropertyChangedHandler),this.questionPropertyChangedHandler=void 0,this.surveyPropertyChangedHandler=void 0,this.listModel&&this.listModel.dispose(),this.popupModel&&this.popupModel.dispose(),this.htmlCleanerElement=void 0}scrollToFocusedItem(){this.listModel.scrollToFocusedItem()}}function iS(e){return class extends e{get dropdownListModel(){return this.dropdownListModelValue}set dropdownListModel(e){this.dropdownListModelValue=e}get popupModel(){return this.dropdownListModel.popupModel}get showClearButton(){return this.allowClear&&!this.isEmpty()}get readOnlyText(){return this.locReadOnlyText.calculatedText}get locReadOnlyText(){return this.getOrCreateLocStr("readOnlyText",!0,!1,e=>{e.onGetTextCallback=()=>this.calculateReadOnlyText()||this.placeholder})}calculateReadOnlyText(){return this.displayValue}resetReadOnlyText(){this.resetPropertyValue("readOnlyText")}updateCustomChoices(e,t){}onOpenedCallBack(){this.onOpened.fire(this,{question:this,choices:this.choices})}onSelectedItemValuesUpdated(){super.onSelectedItemValuesUpdated(),this.resetReadOnlyText()}hasUnknownValue(e,t,s,i){return!this.choicesLazyLoadEnabled&&super.hasUnknownValue(e,t,s,i)}needConvertRenderedOtherToDataValue(){var e;let t=null==(e=this.otherValue)?void 0:e.trim();return!!t&&super.hasUnknownValue(t,!0,!1)}getItemIfChoicesNotContainThisValue(e,t){return this.choicesLazyLoadEnabled?this.createItemValue(e,t):super.getItemIfChoicesNotContainThisValue(e,t)}onVisibleChoicesChanged(){super.onVisibleChoicesChanged(),this.dropdownListModelValue&&this.dropdownListModel.updateItems()}canAddCustomChoices(){return this.allowCustomChoices}getIsQuestionReady(){return super.getIsQuestionReady()&&!this._isChoicesLoading}ensureQuestionIsReady(){super.ensureQuestionIsReady(),this.dropdownListModel&&this.choicesLazyLoadEnabled&&this.dropdownListModel.loadQuestionChoices()}onLoadChoicesFromUrl(e){this.updateCustomChoices(this.value,e),super.onLoadChoicesFromUrl(e)}valueFromData(e){let t=super.valueFromData(e);return this.survey&&this.survey.isSettingData()&&this.updateCustomChoices(t,this.visibleChoices),t}setIsChoicesLoading(e){this._isChoicesLoading=e,this.updateIsReady()}supportEmptyValidation(){return!0}onBlurCore(e){this.dropdownListModel.onBlur(e),super.onBlurCore(e)}onFocusCore(e){this.dropdownListModel.onFocus(e),super.onFocusCore(e)}calcCssClasses(e){let t=super.calcCssClasses(e);return this.dropdownListModelValue&&this.dropdownListModel.updateCssClasses(t.popup,t.list),t}onClearValue(){var e;super.onClearValue(),null==(e=this.dropdownListModelValue)||e.clear()}dispose(){super.dispose(),this.dropdownListModelValue&&(this.dropdownListModelValue.dispose(),this.dropdownListModelValue=void 0)}}}iE.KEY_UP=38,iE.KEY_DOWN=40,iE.KEY_TAB=9,iE.KEY_ENTER=13,iE.KEY_ESCAPE=27,iE.KEY_SPACE=32,iE.KEY_DELETE=46,iE.KEY_BACKSPACE=8,V([e_({defaultValue:!1})],iE.prototype,"focused",void 0),V([e_({defaultValue:!1})],iE.prototype,"allowCustomChoices",void 0),V([e_({onSet:(e,t)=>{t.updateCustomItemValue()}})],iE.prototype,"customValue",void 0),V([e_({defaultValue:!0})],iE.prototype,"searchEnabled",void 0),V([e_()],iE.prototype,"choicesLazyLoadEnabled",void 0),V([e_({defaultValue:"",onSet:(e,t)=>{t.onSetFilterString()}})],iE.prototype,"filterString",void 0),V([e_({defaultValue:"",onSet:(e,t)=>{t.question.inputHasValue=!!e}})],iE.prototype,"inputString",void 0),V([e_({})],iE.prototype,"showInputFieldComponent",void 0),V([e_()],iE.prototype,"ariaActivedescendant",void 0),V([e_()],iE.prototype,"ariaExpanded",void 0),V([e_()],iE.prototype,"inputPlaceholder",void 0),V([e_({defaultValue:""})],iE.prototype,"hintString",void 0);class iP extends iS(iC){constructor(){super(...arguments),this.lastSelectedItemValue=null,this.minMaxChoices=[],this.onOpened=this.addEvent()}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),["choicesMin","choicesMax","choicesStep"].indexOf(e)>-1&&this.onVisibleChoicesChanged(),["value","renderAs","showOtherItem","otherText","placeholder","choices","visibleChoices"].indexOf(e)>-1&&(this.getSingleSelectedItem(),this.resetReadOnlyText()),"placeholder"===e&&this.updateInputPlaceholder(s)}locStrsChanged(){super.locStrsChanged(),this.resetReadOnlyText(),this.updateInputPlaceholder(this.placeholder)}updateInputPlaceholder(e){this.dropdownListModelValue&&this.dropdownListModel.setInputPlaceholder(e)}get showOptionsCaption(){return this.allowClear}set showOptionsCaption(e){this.allowClear=e}get optionsCaption(){return this.placeholder}set optionsCaption(e){this.placeholder=e}getType(){return"dropdown"}get isNewA11yStructure(){return!0}get a11yQuestionAriaRole(){return this.searchEnabled?null:"combobox"}get a11yInputAriaRole(){return this.searchEnabled?"combobox":null}
10get selectedItem(){return this.getSingleSelectedItem()}isOtherValueUnused(){var e;return!(null==(e=this.selectedItem)?void 0:e.showCommentArea)}onGetSingleSelectedItem(e){e&&(this.lastSelectedItemValue=e)}get isShowingChoiceComment(){var e;return null==(e=this.selectedItem)?void 0:e.showCommentArea}supportAutoAdvance(){return!this.isShowingChoiceComment}getChoices(){var e=super.getChoices();if(this.choicesMax<=this.choicesMin)return e;for(var t=[],s=0;s<e.length;s++)t.push(e[s]);if(0===this.minMaxChoices.length||this.minMaxChoices.length!==(this.choicesMax-this.choicesMin)/this.choicesStep+1){this.minMaxChoices=[];for(var s=this.choicesMin;s<=this.choicesMax;s+=this.choicesStep)this.minMaxChoices.push(this.createItemValue(s))}return t.concat(this.minMaxChoices)}getControlClass(){return new eX().append(this.cssClasses.control).append(this.cssClasses.controlEmpty,this.isEmpty()).append(this.cssClasses.onError,this.hasCssError()).append(this.cssClasses.controlDisabled,this.isDisabledStyle).append(this.cssClasses.controlReadOnly,this.isReadOnlyStyle).append(this.cssClasses.controlPreview,this.isPreviewStyle).append(this.cssClasses.controlInputFieldComponent,!!this.inputFieldComponentName).toString()}updateCssClasses(e,t){super.updateCssClasses(e,t),this.useDropdownList&&tn(e,t)}get selectedItemLocText(){let e=this.suggestedItem||this.selectedItem;return null==e?void 0:e.locText}get inputFieldComponentName(){return this.inputFieldComponent||this.itemComponent}get showSelectedItemLocText(){return!this.inputHasValue&&!this.inputFieldComponentName&&!!this.selectedItemLocText&&this.dropdownListModel.canShowSelectedItem}get showInputFieldComponent(){return!this.inputHasValue&&!!this.inputFieldComponentName&&!this.isEmpty()}calculateReadOnlyText(){if(!this.useDropdownList){if(this.isOtherSelected)return this.otherText;if(this.isNoneSelected)return this.noneText}let e=this.selectedItem;return e?e.text:""}get useDropdownList(){return"select"!==this.renderAs}get dropdownListModel(){return this.isDisposed||!this.useDropdownList||this.dropdownListModelValue||(this.dropdownListModelValue=new iE(this)),this.dropdownListModelValue}set dropdownListModel(e){this.dropdownListModelValue=e}onSelectedItemValuesChangedHandler(e){var t;null==(t=this.dropdownListModelValue)||t.setInputStringFromSelectedItem(e),super.onSelectedItemValuesChangedHandler(e)}updateCustomChoices(e,t){null!=e&&this.allowCustomChoices&&!this.choicesLazyLoadEnabled&&(this.customChoices.splice(0,this.customChoices.length),t.filter(t=>w.isTwoValueEquals(t.id,e,!1,!1))[0]||this.customChoices.splice(0,this.customChoices.length,new tj(e)))}getFirstInputElementId(){return this.getInputIdCore(this.searchEnabled||this.allowCustomChoices)}getInputId(){return this.getInputIdCore(!0)}getInputIdCore(e){let t=e&&this.useDropdownList?"_0":"";return this.inputId+t}onClearValue(){super.onClearValue(),this.lastSelectedItemValue=null}afterRenderCore(e){super.afterRenderCore(e),this.dropdownListModelValue&&this.dropdownListModelValue.clear()}onClick(e){this.onOpenedCallBack&&this.onOpenedCallBack()}onKeyUp(e){46===(e.which||e.keyCode)&&(this.clearValueFromUI(),e.preventDefault(),e.stopPropagation())}}V([e_({localizable:{defaultStr:!0}})],iP.prototype,"placeholder",void 0),V([e_()],iP.prototype,"choicesMin",void 0),V([e_()],iP.prototype,"choicesMax",void 0),V([e_({onSetting:e=>e<1?1:e})],iP.prototype,"choicesStep",void 0),V([e_()],iP.prototype,"autocomplete",void 0),V([e_()],iP.prototype,"allowClear",void 0),V([e_({onSet:(e,t)=>{t.dropdownListModelValue&&t.dropdownListModel.setSearchEnabled(e)}})],iP.prototype,"searchEnabled",void 0),V([e_()],iP.prototype,"searchMode",void 0),V([e_({onSet:(e,t)=>{t.dropdownListModelValue&&t.dropdownListModel.setAllowCustomChoices(e)}})],iP.prototype,"allowCustomChoices",void 0),V([e_({localizable:{defaultStr:"createCustomItem"}})],iP.prototype,"createCustomChoiceText",void 0),V([e_()],iP.prototype,"textWrapEnabled",void 0),V([e_({defaultValue:!1})],iP.prototype,"inputHasValue",void 0),V([e_({onSet:(e,t)=>{t.dropdownListModelValue&&t.dropdownListModel.setChoicesLazyLoadEnabled(e)}})],iP.prototype,"choicesLazyLoadEnabled",void 0),V([e_()],iP.prototype,"choicesLazyLoadPageSize",void 0),V([e_()],iP.prototype,"suggestedItem",void 0),H.addClass("dropdown",[{name:"placeholder",alternativeName:"optionsCaption",serializationProperty:"locPlaceholder"},{name:"allowClear:boolean",alternativeName:"showOptionsCaption",default:!0},{name:"choicesMin:number",default:0},{name:"choicesMax:number",default:0},{name:"choicesStep:number",default:1,minValue:1},{name:"autocomplete",alternativeName:"autoComplete",choices:p.questions.dataList},{name:"textWrapEnabled:boolean",default:!0},{name:"renderAs",default:"default",visible:!1},{name:"searchEnabled:boolean",default:!0,visible:!1},{name:"allowCustomChoices:boolean",visibleIf:e=>!e.choicesFromQuestion,dependsOn:"choicesFromQuestion"},{name:"createCustomChoiceText",serializationProperty:"locCreateCustomChoiceText",visibleIf:e=>e.allowCustomChoices},{name:"searchMode",default:"contains",choices:["contains","startsWith"]},{name:"choicesLazyLoadEnabled:boolean",visible:!1},{name:"choicesLazyLoadPageSize:number",default:25,visible:!1},{name:"inputFieldComponent",visible:!1},{name:"itemComponent",visible:!1,default:""}],function(){return new iP("")},"selectbase"),sm.Instance.registerQuestion("dropdown",e=>{var t=new iP(e);return t.choices=sm.DefaultChoices,t});class iR{constructor(e){this.row=e}getObj(){return this.row}getValue(e){if(0===e.path.length)return{isFound:!0,value:this.row.value,context:this}}
10getTextValue(e,t,s){return s?this.row.getDisplayValue(t):t}}class iT extends tj{getBaseType(){return"matrixcolumn"}}V([e_({defaultValue:!1})],iT.prototype,"isExclusive",void 0);class iA extends ew{constructor(e,t,s,i){super(),this.item=e,this.fullName=t,this.data=s,this.setValueDirectly(i),this.data.hasErrorInRow(this)&&(this.hasError=!0)}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"value"===e&&this.data&&this.data.onMatrixRowChanged(this)}cellClick(e){this.data.cellClick(this,e)}isChecked(e){return this.data.isCellChecked(this,e)}get name(){return this.item.value}get text(){return this.item.text}get locText(){return this.item.locText}getOwner(){return this.data}get isVisible(){return this.item.isVisible}get value(){return this.getPropertyValue("value")}set value(e){this.isReadOnly||this.setValueDirectly(this.data.getCorrectedRowValue(e))}setValueDirectly(e){this.setPropertyValue("value",e)}getDisplayValue(e){return this.data.getDisplayRowValue(e)}get isReadOnly(){return!this.item.enabled||this.data.isInputReadOnly}get isReadOnlyAttr(){return this.data.isReadOnlyAttr}get isDisabledAttr(){return!this.item.enabled||this.data.isDisabledAttr}get rowTextClasses(){return new eX().append(this.data.cssClasses.rowTextCell).toString()}get rowClasses(){let e=this.data.cssClasses;return new eX().append(e.row).append(e.rowError,this.hasError).append(e.rowReadOnly,this.isReadOnly).append(e.rowDisabled,this.data.isDisabledStyle).toString()}getValueGetterContext(){return new iR(this)}}V([e_({defaultValue:!1})],iA.prototype,"hasError",void 0);class iL extends ew{constructor(e){super(),this.cellsOwner=e,this.values={},this.locs={}}getType(){return"cells"}get isEmpty(){return 0==Object.keys(this.values).length}valuesChanged(){!this.locNotification&&this.onValuesChanged&&this.onValuesChanged()}getDefaultCellLocText(e){return this.getCellLocCore(this.defaultRowValue,e)}getCellDisplayLocText(e,t){return this.getCellLocCore(e,t)}getCellLocCore(e,t){if(e=this.getCellRowColumnValue(e,this.rows),t=this.getCellRowColumnValue(t,this.columns),w.isValueEmpty(e)||w.isValueEmpty(t))return null;this.locs[e]||(this.locs[e]={});let s=this.locs[e][t];return s||(s=this.createString(e,t,s=>s.setJson(this.getCellLocData(e,t)))),s}get defaultRowValue(){return p.matrix.defaultRowName}getCellLocData(e,t){let s=this.getCellLocDataFromValue(e,t);return s||this.getCellLocDataFromValue(this.defaultRowValue,t)}getCellLocDataFromValue(e,t){return this.values[e]&&this.values[e][t]?this.values[e][t]:null}getCellText(e,t){var s=this.getCellLocCore(e,t);return s?s.calculatedText:null}setCellText(e,t,s){let i=this.getCellLocCore(e,t);i&&(i.text=s)}updateValues(e,t,s){s?(this.values[e]||(this.values[e]={}),this.values[e][t]=s,this.valuesChanged()):this.values[e]&&this.values[e][t]&&(delete this.values[e][t],0==Object.keys(this.values[e]).length&&delete this.values[e],this.valuesChanged())}getDefaultCellText(e){var t=this.getCellLocCore(this.defaultRowValue,e);return t?t.calculatedText:null}setDefaultCellText(e,t){this.setCellText(this.defaultRowValue,e,t)}getCellDisplayText(e,t){var s=this.getCellDisplayLocText(e,t);return s?s.calculatedText:null}get rows(){return this.cellsOwner?this.cellsOwner.getRows():[]}get columns(){return this.cellsOwner?this.cellsOwner.getColumns():[]}getCellRowColumnValue(e,t){if(null==e)return null;if("number"==typeof e){if(e<0||e>=t.length)return null;e=t[e].value}return e.value?e.value:e}getJson(e){if(this.isEmpty||(null==e?void 0:e.storeLocaleStrings)===!1)return null;let t=this.values[this.defaultRowValue],s={};for(let i in this.values){let n={},r=this.values[i];for(let s in r)if(i===this.defaultRowValue||!t||t[s]!==r[s]){let t=this.getCellLocCore(i,s);n[s]=t?t.getJson(e):r[s]}s[i]=n}return s}setJson(e,t){if(this.values={},e){for(var s in e)if("pos"!=s){var i=e[s];for(var n in this.values[s]={},i)"pos"!=n&&(this.values[s][n]=i[n])}}this.locNotification=!0,this.runFuncOnLocs((e,t,s)=>s.setJson(this.getCellLocData(e,t))),this.locNotification=!1,this.valuesChanged()}mergeWith(e,t){this.locNotification=!0;
10let s={locales:t,storeLocaleStrings:!0};for(let i in e.values){let n=e.values[i];for(let r in n){let n=e.getCellLocCore(i,r);if(n){let e=this.getCellLocCore(i,r);e?e.mergeWith(n,t):e=this.createString(i,r,e=>e.setJson(n.getJson(s)))}}}this.locNotification=!1,this.onValuesChanged()}locStrsChanged(){this.runFuncOnLocs((e,t,s)=>s.strChanged())}runFuncOnLocs(e){for(let t in this.locs){let s=this.locs[t];for(let i in s)e(t,i,s[i])}}createString(e,t,s){let i=new R(this.cellsOwner,!0);return s(i),i.onGetTextCallback=e=>{if(!e){let e=tj.getItemByValue(this.columns,t);if(e)return e.locText.getJson()||e.value}return e},i.onStrChanged=(s,i)=>{this.updateValues(e,t,i)},this.locs[e][t]=i,i}}class iD extends U{constructor(e){super(),this.question=e}getObj(){return this.question}getValue(e){if(e.path.length>0){let t=super.getValue(e);if(t&&t.isFound)return t}return new W(this.question.value).getValue(e)}getRootObj(){return this.question.data}updateValueByItem(e,t){var s;let i=this.question.getMatrixRows();e=e.toLocaleLowerCase();for(let n=0;n<i.length;n++){let r=i[n];if(((null==(s=r.name)?void 0:s.toString())||"").toLocaleLowerCase()===e){t.isFound=!0,t.obj=r,t.context=r.getValueGetterContext();return}}}}class iO extends sn{constructor(e){super(e),this.isRowChanging=!1,this.emptyLocalizableString=new R(this),this.cellsValue=new iL(this),this.cellsValue.onValuesChanged=()=>{this.updateHasCellText(),this.propertyValueChanged("cells",this.cells,this.cells)}}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"columns"===e&&this.onColumnsChanged(),"rows"===e&&this.executeOnSyncPropertiesChanged(()=>{this.rows=this.sortVisibleRows(this.rows),this.runCondition(this.getDataFilteredProperties()),this.onRowsChanged()}),"hideIfRowsEmpty"===e&&this.updateVisibilityBasedOnRows(),"cellType"===e&&(this.value=this.convertToCorrectValue(this.value)),"rowOrder"===e&&this.onRowsChanged()}getType(){return"matrix"}getAllChildren(){return[...super.getAllChildren(),...this.columns,...this.rows]}get isMultiSelect(){return"checkbox"===this.cellType}get hasSingleInput(){return!1}get isAllRowRequired(){return this.eachRowRequired}set isAllRowRequired(e){this.eachRowRequired=e}get hasRows(){return this.rows.length>0}get rowsOrder(){return this.rowOrder}set rowsOrder(e){this.rowOrder=e}getRows(){return this.rows}getColumns(){return this.visibleColumns}addColumn(e,t){var s=new iT(e,t);return this.columns.push(s),s}get checkType(){return this.isMultiSelect?"checkbox":"radio"}formatCss(e){return(e||"").replace("{type}",this.checkType)}getItemClass(e,t){let s=e.isChecked(t),i=this.isReadOnly,n=this.hasCellText,r=this.cssClasses;return new eX().append(r.cell,n).append(n?r.cellText:this.formatCss(r.label)).append(r.itemOnError,!n&&(this.eachRowRequired||this.eachRowUnique?e.hasError:this.hasCssError())).append(n?r.cellTextSelected:this.formatCss(r.itemChecked),s).append(n?r.cellTextDisabled:this.formatCss(r.itemDisabled),this.isDisabledStyle).append(n?r.cellTextReadOnly:this.formatCss(r.itemReadOnly),this.isReadOnlyStyle).append(n?r.cellTextPreview:this.formatCss(r.itemPreview),this.isPreviewStyle).append(this.formatCss(r.itemHover),!s&&!i&&!n).toString()}get itemSvgIcon(){return this.isPreviewStyle&&this.cssClasses.itemPreviewSvgIconId?this.cssClasses.itemPreviewSvgIconId:this.cssClasses.itemSvgIconId}getItemSvgIcon(e,t){return this.isMultiSelect&&e.isChecked(t)?this.cssClasses.itemPreviewSvgIconId:this.itemSvgIcon}get cssItemValue(){return this.formatCss(this.cssClasses.itemValue)}get cssMaterialDecorator(){return this.formatCss(this.cssClasses.materialDecorator)}get cssItemDecorator(){return this.formatCss(this.cssClasses.itemDecorator)}locStrsChanged(){super.locStrsChanged(),this.cells.locStrsChanged()}getQuizQuestionCount(){for(var e=0,t=0;t<this.rows.length;t++)!this.isValueEmpty(this.correctAnswer[this.rows[t].value])&&e++;return e}convertToCorrectValue(e){if(null==e||"object"!=typeof e)return e;let t=Object.keys(e);for(let s=0;s<t.length;s++){let i=t[s],n=e[i];Array.isArray(n)&&!this.isMultiSelect&&(n.length>0?e[i]=n[0]:delete e[i]),!Array.isArray(n)&&this.isMultiSelect&&(e[i]=[n])}return e}getCorrectAnswerCount(){for(var e=0,t=this.value,s=0;s<this.rows.length;s++){var i=this.rows[s].value;!this.isValueEmpty(t[i])&&this.isTwoValueEquals(this.correctAnswer[i],t[i])&&e++}return e}runConditionCore(e){tj.runEnabledConditionsForItems(this.rows,void 0,e),super.runConditionCore(e)}createRowsVisibleIfRunner(){let e=this.getExpressionFromSurvey("rowsVisibleIf");return e?new X(e):null}onRowsChanged(){this.clearGeneratedRows(),super.onRowsChanged()}getMatrixRows(){if(this.generatedVisibleRows)return this.generatedVisibleRows;let e=[],t=this.value;t||(t={});let s=this.rows;for(let i=0;i<s.length;i++){let n=s[i];if(this.isValueEmpty(n.value))continue;let r=this.id+"_"+n.value.toString().replace(/\s/g,"_");e.push(this.createMatrixRow(n,r,t[n.value]))}return this.generatedVisibleRows=e,e}getVisibleRows(){let e=[];
10return this.getMatrixRows().forEach(t=>{t.isVisible&&e.push(t)}),e}getMatrixSingleInputQuestions(e,t){if(this.nestedQuestionsValue)return this.nestedQuestionsValue;let s=[],i=this.isMultiSelect?"checkbox":"radiogroup";return this.visibleRows.forEach(e=>{let t=H.createClass(i);t.name=e.name,t.locTitle.sharedData=e.locText,t.choices=this.visibleColumns,t.value=e.value,t.isRequired=this.eachRowRequired,t.setSurveyImpl(this),t.setParentQuestion(this),s.push(t)}),this.nestedQuestionsValue=s,s}disposeNestedQuestions(){this.nestedQuestionsValue&&(this.nestedQuestionsValue.forEach(e=>e.dispose()),this.nestedQuestionsValue=null)}getRowByName(e){let t=this.visibleRows;for(let s=0;s<t.length;s++)if(t[s].name===e)return t[s];return null}createSingleInputBehavior(){return new iN(this)}resetSingleInput(){this.disposeNestedQuestions(),super.resetSingleInput()}dispose(){this.disposeNestedQuestions(),super.dispose()}getSurveyData(){return this}getTextProcessor(){var e;return null==(e=this.surveyImpl)?void 0:e.getTextProcessor()}getValue(e){let t=this.getRowByName(e);return t?t.value:void 0}setValue(e,t){this.getRowByName(e).value=t}getComment(e){var t;return null==(t=this.data)?void 0:t.getComment(e)}setComment(e,t,s){var i;null==(i=this.data)||i.setComment(e,t,s)}getFilteredProperties(){var e;return null==(e=this.data)?void 0:e.getFilteredProperties()}findQuestionByName(e){var t;return null==(t=this.data)?void 0:t.findQuestionByName(e)}sortVisibleRows(e){return this.survey&&this.survey.isDesignMode?e:"random"===this.rowOrder.toLowerCase()?w.randomizeArray(e,this.randomSeed):e}randomSeedChanged(){"random"===this.rowOrder.toLowerCase()&&(this.rows=this.sortVisibleRows(this.rows),this.onRowsChanged())}endLoadingFromJson(){super.endLoadingFromJson(),this.rows=this.sortVisibleRows(this.rows),this.onRowsChanged(),this.onColumnsChanged()}isNewValueCorrect(e){return w.isValueObject(e,!0)}get visibleRows(){return this.getVisibleRows()}get cells(){return this.cellsValue}set cells(e){this.cells.setJson(e&&e.getJson?e.getJson():null)}isPropertyStoredInHash(e){return"cells"!==e&&super.isPropertyStoredInHash(e)}mergeLocalizationObj(e,t){super.mergeLocalizationObj(e,t),e instanceof iO&&this.cells.mergeWith(e.cells,t)}get hasCellText(){return this.getPropertyValue("hasCellText",!1)}updateHasCellText(){this.setPropertyValue("hasCellText",!this.cells.isEmpty)}setCellText(e,t,s){this.cells.setCellText(e,t,s)}getCellText(e,t){return this.cells.getCellText(e,t)}setDefaultCellText(e,t){this.cells.setDefaultCellText(e,t)}getDefaultCellText(e){return this.cells.getDefaultCellText(e)}getCellDisplayText(e,t){return this.cells.getCellDisplayText(e,t)}getCellDisplayLocText(e,t){return this.cells.getCellDisplayLocText(e,t)||this.emptyLocalizableString}supportAutoAdvance(){return!0===this.isMouseDown&&this.hasValuesInAllRows()}onCheckForErrors(e,t,s){if(super.onCheckForErrors(e,t,s),!t||this.hasCssError()){let t={noValue:!1,isNotUnique:!1};this.checkErrorsAllRows(s,t),t.noValue&&e.push(new eN(null,this)),t.isNotUnique&&e.push(new eM(null,this))}}hasValuesInAllRows(){let e={noValue:!1,isNotUnique:!1};return this.checkErrorsAllRows(!1,e,!0),!e.noValue}checkErrorsAllRows(e,t,s){let i=this.eachRowRequired||s,n=this.eachRowUnique;if(t.noValue=!1,t.isNotUnique=!1,e&&(this.errorsInRow=void 0),!i&&!n)return;let r=this.visibleRows;
10if(!r)return;let a={};for(var o=0;o<r.length;o++){let s=r[o].value,l=this.isValueEmpty(s),u=n&&!l&&!0===a[s];l=l&&i,e&&(l||u)&&this.addErrorIntoRow(r[o]),l||(a[s]=!0),t.noValue=t.noValue||l,t.isNotUnique=t.isNotUnique||u}e&&r.forEach(e=>{e.hasError=this.hasErrorInRow(e)})}addErrorIntoRow(e){this.errorsInRow||(this.errorsInRow={}),this.errorsInRow[e.name]=!0,e.hasError=!0}refreshRowsErrors(){this.errorsInRow&&this.checkErrorsAllRows(!0,{noValue:!1,isNotUnique:!1})}getIsAnswered(){return super.getIsAnswered()&&this.hasValuesInAllRows()}createMatrixRow(e,t,s){var i=new iA(e,t,this,s);return this.onMatrixRowCreated(i),i}onMatrixRowCreated(e){}setQuestionValue(e,t=!0){if(super.setQuestionValue(e,this.isRowChanging||t),this.generatedVisibleRows&&0!=this.generatedVisibleRows.length){this.isRowChanging=!0;var s=this.value;if(s||(s={}),0==this.rows.length)this.generatedVisibleRows[0].setValueDirectly(s);else for(var i=0;i<this.generatedVisibleRows.length;i++){var n=s[this.generatedVisibleRows[i].name];this.isValueEmpty(n)&&(n=null),this.generatedVisibleRows[i].setValueDirectly(n)}this.refreshRowsErrors(),this.updateIsAnswered(),this.isRowChanging=!1}}getValueGetterContext(){return new iD(this)}getDisplayValueCore(e,t){var s={};for(var i in t){var n=e?tj.getTextOrHtmlByValue(this.rows,i):i;n||(n=i);let a=t[i];var r=Array.isArray(a)?a.map(e=>tj.getTextOrHtmlByValue(this.columns,e)||e):tj.getTextOrHtmlByValue(this.columns,a);r||(r=a),s[n]=r}return s}getPlainData(e={includeEmpty:!0}){var t=super.getPlainData(e);if(t){var s=this.createValueCopy();t.isNode=!0,t.data=(e.includeEmpty?this.visibleRows:this.visibleRows.filter(e=>e.name in(s||{}))).map(t=>{let i=s?s[t.name]:void 0,n=Array.isArray(i)?i.map(e=>tj.getTextOrHtmlByValue(this.visibleColumns,e)):tj.getTextOrHtmlByValue(this.visibleColumns,i);var r={name:t.name,title:t.text,value:i,displayValue:n,getString:e=>this.getValueAsString(e),isNode:!1},a=tj.getItemByValue(this.visibleColumns,i);return a&&(e.calculations||[]).forEach(e=>{r[e.propertyName]=a[e.propertyName]}),r})}return t}addConditionObjectsByContext(e,t){for(var s=0;s<this.rows.length;s++){var i=this.rows[s];i.value&&e.push({name:this.getValueName()+"."+i.value,text:this.processedTitle+"."+i.calculatedText,question:this})}}getConditionJson(e=null,t=null){if(!t)return super.getConditionJson(e);var s=new iP(t);s.choices=this.columns;var i=new Q().toJsonObject(s);return i.type=s.getType(),i}clearIncorrectValues(){this.clearInvisibleValuesInRowsAndColumns(!0,!0,!0),super.clearIncorrectValues()}clearValueIfInvisibleCore(e){super.clearValueIfInvisibleCore(e),this.clearInvisibleValuesInRowsAndColumns(!0,!0,!1)}clearInvisibleColumnValues(){this.clearInvisibleValuesInRowsAndColumns(!1,!0,!1)}clearInvisibleValuesInRows(){this.clearInvisibleValuesInRowsAndColumns(!0,!1,!1)}clearInvisibleValuesInRowsAndColumns(e,t,s){if(this.isEmpty())return;let i=this.getUnbindValue(this.value),n={},r=this.rows;for(let s=0;s<r.length;s++){let a=r[s].value;i[a]&&(e&&!r[s].isVisible?delete i[a]:(t&&this.clearIncorrectValuesInRow(a,i),void 0!=i[a]&&(n[a]=i[a])))}s&&(i=n),this.isTwoValueEquals(i,this.value)||(this.value=i)}clearIncorrectValuesInRow(e,t){let s=t[e];if(void 0===s)return void delete t[e];if(this.isMultiSelect&&Array.isArray(s)){for(let e=s.length-1;e>=0;e--)this.getVisibleColumnByValue(s[e])||s.splice(e,1);0===s.length&&delete t[e]}else this.getVisibleColumnByValue(s)||delete t[e]}getVisibleColumnByValue(e){let t=tj.getItemByValue(this.columns,e);return t&&t.isVisible?t:null}getFirstInputElementId(){var e=this.generatedVisibleRows;return(e||(e=this.visibleRows),e.length>0&&this.visibleColumns.length>0)?this.inputId+"_"+e[0].name+"_0":super.getFirstInputElementId()}onMatrixRowChanged(e){if(!this.isRowChanging){if(this.isRowChanging=!0,this.hasRows){let t=this.value||{};this.isValueEmpty(e.value)?delete t[e.name]:t[e.name]=e.value,this.setNewValue(t)}else this.setNewValue(e.value);this.isRowChanging=!1}}getCorrectedRowValue(e){let t=this.getColumnByValue(e);return t?t.value:e}getDisplayRowValue(e){let t=this.getColumnByValue(e);return t?t.text:null!=e?e.toString():""}cellClick(e,t){this.isReadOnly||this.isDisabledAttr||(e.value=this.getValueOnCellClick(e,t))}getValueOnCellClick(e,t){if(this.isMultiSelect){if(t.isExclusive){if(this.isCellChecked(e,t))return;return[t.value]}let s=Array.isArray(e.value)?[].concat(e.value):[];if(this.isCellChecked(e,t)){let i=this.getRowValueIndex(e,t);i>-1&&s.splice(i,1),0===s.length&&(s=void 0)}
10else Array.isArray(s)||(s=[]),this.columns.forEach(e=>{if(e.isExclusive){let t=s.indexOf(e.value);t>-1&&s.splice(t,1)}}),s.push(t.value);return s}return t.value}isCellChecked(e,t){return this.isMultiSelect?this.getRowValueIndex(e,t)>-1:w.isTwoValueEquals(e.value,t.value)}getRowValueIndex(e,t){let s=e.value;if(!Array.isArray(s))return -1;for(let e=0;e<s.length;e++)if(this.isTwoValueEquals(s[e],t.value))return e;return -1}getColumnByValue(e){let t=this.columns;for(var s=0;s<t.length;s++)if(e===t[s].value)return t[s];for(var s=0;s<t.length;s++)if(this.isTwoValueEquals(e,t[s].value))return t[s];return null}hasErrorInRow(e){return!!this.errorsInRow&&!!this.errorsInRow[e.name]}getSearchableItemValueKeys(e){e.push("columns"),e.push("rows")}get SurveyModel(){return this.survey}getColumnHeaderWrapperComponentName(e){return this.SurveyModel.getElementWrapperComponentName({column:e},"column-header")}getColumnHeaderWrapperComponentData(e){return this.SurveyModel.getElementWrapperComponentData({column:e},"column-header")}getRowHeaderWrapperComponentName(e){return this.SurveyModel.getElementWrapperComponentName({row:e},"row-header")}getRowHeaderWrapperComponentData(e){return this.SurveyModel.getElementWrapperComponentData({row:e},"row-header")}}V([e_({onSetting:e=>"checkbox"!==e?"radio":e})],iO.prototype,"cellType",void 0),V([e_()],iO.prototype,"cellComponent",void 0),V([e_()],iO.prototype,"eachRowRequired",void 0),V([e_()],iO.prototype,"eachRowUnique",void 0),V([e_({isLowerCase:!0})],iO.prototype,"rowOrder",void 0),V([e_()],iO.prototype,"hideIfRowsEmpty",void 0),H.addClass("matrixcolumn",[{name:"isExclusive:boolean",visibleIf:e=>{var t;return(null==(t=e.locOwner)?void 0:t.cellType)==="checkbox"},locationInTable:"detail"}],e=>new iT(e),"itemvalue"),H.addClass("matrix",["rowTitleWidth",{name:"columns:matrixcolumn[]",uniqueProperty:"value",baseValue:function(){return E("matrix_column")}},{name:"rows:itemvalue[]",uniqueProperty:"value",baseValue:function(){return E("matrix_row")}},{name:"cells:cells",serializationProperty:"cells"},{name:"rowOrder",alternativeName:"rowsOrder",default:"initial",choices:["initial","random"]},{name:"eachRowRequired:boolean",alternativeName:"isAllRowRequired"},{name:"eachRowUnique:boolean"},"hideIfRowsEmpty:boolean",{name:"cellComponent",visible:!1,default:"survey-matrix-cell"},{name:"cellType",default:"radio",choices:["radio","checkbox"]}],function(){return new iO("")},"matrixbase"),sm.Instance.registerQuestion("matrix",e=>{var t=new iO(e);return t.rows=sm.DefaultRows,t.columns=sm.DefaultColums,t});class iN extends tF{get matrix(){return this.question}getSingleInputQuestionsCore(e,t){return this.matrix.getMatrixSingleInputQuestions(e,t)}}class iM extends ew{updateRemainingCharacterCounter(e,t){this.remainingCharacterCounter=w.getRemainingCharacterCounterText(e,t)}}V([e_()],iM.prototype,"remainingCharacterCounter",void 0);class ik extends tz{constructor(){super(...arguments),this.characterCounter=new iM}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"maxLength"===e&&this.updateRemainingCharacterCounter(this.value)}isTextValue(){return!0}getMaxLength(){return w.getMaxLength(this.maxLength,this.survey?this.survey.maxTextLength:-1)}updateRemainingCharacterCounter(e){this.characterCounter.updateRemainingCharacterCounter(e,this.getMaxLength())}get placeHolder(){return this.placeholder}set placeHolder(e){this.placeholder=e}get locPlaceHolder(){return this.locPlaceholder}getType(){return"textbase"}isEmpty(){return super.isEmpty()||""===this.value}getIsInputTextUpdate(){return"default"==this.textUpdateMode?super.getIsInputTextUpdate():"onTyping"==this.textUpdateMode}get renderedPlaceholder(){let e=()=>this.hasPlaceholder()?this.placeHolder:void 0;return this.getPropertyValue("renderedPlaceholder",void 0,e)}onReadOnlyChanged(){super.onReadOnlyChanged(),this.resetRenderedPlaceholder()}localeChanged(){super.localeChanged(),this.resetRenderedPlaceholder()}supportEmptyValidation(){return!0}resetRenderedPlaceholder(){this.resetPropertyValue("renderedPlaceholder")}hasPlaceholder(){return!this.isReadOnly}setNewValue(e){super.setNewValue(e),this.updateRemainingCharacterCounter(e)}setQuestionValue(e,t=!0){super.setQuestionValue(e,t),this.updateRemainingCharacterCounter(e)}convertToCorrectValue(e){return Array.isArray(e)?e.join(this.getValueSeparator()):e}getValueSeparator(){return", "}getControlCssClassBuilder(){return new eX().append(this.cssClasse
10s.root).append(this.cssClasses.onError,this.hasCssError()).append(this.cssClasses.controlDisabled,this.isDisabledStyle).append(this.cssClasses.controlReadOnly,this.isReadOnlyStyle).append(this.cssClasses.controlPreview,this.isPreviewStyle)}getControlClass(){return this.getControlCssClassBuilder().toString()}get isNewA11yStructure(){return!0}}V([e_()],ik.prototype,"maxLength",void 0),V([e_({localizable:!0,onSet:(e,t)=>t.resetRenderedPlaceholder()})],ik.prototype,"placeholder",void 0),V([e_()],ik.prototype,"textUpdateMode",void 0),H.addClass("textbase",[],function(){return new ik("")},"question");class iq{setInputValue(e){this.inputElement.maxLength>=0&&this.inputElement.maxLength<e.length&&(e=e.slice(0,this.inputElement.maxLength)),this.inputElement.value=e}updateInputValue(){this.inputElement.placeholder&&this.inputElement.value==this.maskedEmptyValue&&(this.inputElement.value="")}constructor(e,t,s){this.inputMaskInstance=e,this.inputElement=t,this.prevUnmaskedValue=void 0,this.inputMaskInstancePropertyChangedHandler=(e,t)=>{if("saveMaskedValue"!==t.name){let e=this.inputMaskInstance.getMaskedValue(this.prevUnmaskedValue);this.setInputValue(e)}},this.clickHandler=e=>{this.inputElement.value==this.maskedEmptyValue&&this.inputElement.setSelectionRange(0,0)},this.focusHandler=e=>{this.inputElement.placeholder&&""==this.inputElement.value&&this.setInputValue(this.maskedEmptyValue),this.clickHandler(e)},this.blurHandler=e=>{this.updateInputValue()},this.beforeInputHandler=e=>{if(this.inputElement.readOnly)return void e.preventDefault();let t=this.createArgs(e),s=this.inputMaskInstance.processInput(t);this.setInputValue(s.value),this.inputElement.setSelectionRange(s.caretPosition,s.caretPosition),s.cancelPreventDefault||e.preventDefault()},this.changeHandler=e=>{let t=this.inputMaskInstance.processInput({prevValue:"",insertedChars:e.target.value,selectionStart:0,selectionEnd:0});this.setInputValue(t.value)};let i=s;null==i&&(i=""),this.maskedEmptyValue=this.inputMaskInstance.getMaskedValue(""),this.setInputValue(e.saveMaskedValue?i:e.getMaskedValue(i)),this.updateInputValue(),this.prevUnmaskedValue=i,e.onPropertyChanged.add(this.inputMaskInstancePropertyChangedHandler),this.addInputEventListener()}createArgs(e){let t={insertedChars:e.data,selectionStart:e.target.selectionStart,selectionEnd:e.target.selectionEnd,prevValue:e.target.value,inputDirection:"forward"};return"deleteContentBackward"===e.inputType&&(t.inputDirection="backward",t.selectionStart===t.selectionEnd&&(t.selectionStart=Math.max(t.selectionStart-1,0))),"deleteContentForward"===e.inputType&&t.selectionStart===t.selectionEnd&&(t.selectionEnd+=1),t}addInputEventListener(){this.inputElement&&(this.inputElement.addEventListener("beforeinput",this.beforeInputHandler),this.inputElement.addEventListener("click",this.clickHandler),this.inputElement.addEventListener("focus",this.focusHandler),this.inputElement.addEventListener("blur",this.blurHandler),this.inputElement.addEventListener("change",this.changeHandler))}removeInputEventListener(){this.inputElement&&(this.inputElement.removeEventListener("beforeinput",this.beforeInputHandler),this.inputElement.removeEventListener("click",this.clickHandler),this.inputElement.removeEventListener("focus",this.focusHandler),this.inputElement.removeEventListener("blur",this.blurHandler),this.inputElement.removeEventListener("change",this.changeHandler))}dispose(){this.removeInputEventListener(),this.inputElement=void 0,this.inputMaskInstance.onPropertyChanged.remove(this.inputMaskInstancePropertyChangedHandler)}}var iF=/[0-9]/;function iB(){let e=(H.getChildrenClasses("masksettings")||[]).map(e=>{let t=e.name;
10return -1!==e.name.indexOf("mask")&&(t=t.slice(0,t.indexOf("mask"))),t});return e.unshift("none"),e}class i_ extends ik{createMaskAdapter(){this.input&&!this.maskTypeIsEmpty&&(this.maskInputAdapter=new iq(this.maskInstance,this.input,this.value))}deleteMaskAdapter(){this.maskInputAdapter&&(this.maskInputAdapter.dispose(),this.maskInputAdapter=void 0)}updateMaskAdapter(){this.deleteMaskAdapter(),this.createMaskAdapter()}onSetMaskType(e){this.setNewMaskSettingsProperty(),this.updateMaskAdapter()}get maskTypeIsEmpty(){switch(this.inputType){case"tel":case"text":return"none"===this.maskType;default:return!0}}get maskSettings(){return this.getPropertyValue("maskSettings")}set maskSettings(e){if(!e)return;let t=this.maskSettings;t&&t.dispose(),this.setNewMaskSettingsProperty(),this.maskSettings.fromJSON(e.toJSON()),this.updateMaskAdapter()}setNewMaskSettingsProperty(){this.setPropertyValue("maskSettings",this.createMaskSettings())}createMaskSettings(){let e=this.maskType&&"none"!==this.maskType?this.maskType+"mask":"masksettings";H.findClass(e)||(e="masksettings");let t=H.createClass(e);return t.onPropertyChanged.add((e,t)=>{this.onNestedPropertyChanged.fire(this,{name:"maskSettings",newValue:t.newValue,nestedName:t.name}),this.updateInputValue()}),t.owner=this,t}constructor(e){super(e),this.doNotUpdateInputValue=!1,this._isWaitingForEnter=!1,this._isValueChanged=!1,this.onCompositionUpdate=e=>{this.isInputTextUpdate&&setTimeout(()=>{this.updateValueOnEvent(e)},1),this.updateRemainingCharacterCounter(e.target.value)},this.onKeyUp=e=>{this.updateDateValidationMessage(e),this.updateNumericValue(e),this.isInputTextUpdate?this._isWaitingForEnter&&13!==e.keyCode||(this.updateValueOnEvent(e),this._isWaitingForEnter=!1):13===e.keyCode&&this.updateValueOnEvent(e),this.updateRemainingCharacterCounter(e.target.value)},this.readOnlyBlocker=e=>{if(this.isReadOnlyAttr&&["color","range"].indexOf(this.inputType)>-1)return e.preventDefault(),!0},this.onKeyDown=e=>{if(!this.readOnlyBlocker(e)){if(this.setIsValueChanged(),this.onKeyDownPreprocess&&this.onKeyDownPreprocess(e),"number"===this.inputType&&this.shouldPreventNumberInput(e))return void e.preventDefault();this.isInputTextUpdate&&(this._isWaitingForEnter=229===e.keyCode),this.onTextKeyDownHandler(e)}},this.onChange=e=>{this.setIsValueChanged(),this.updateDateValidationMessage(e);let t=e4(this.input);t&&((e.target!==t.activeElement||this.isInputTextUpdate)&&this.updateValueOnEvent(e),this.updateRemainingCharacterCounter(e.target.value))},this.setNewMaskSettingsProperty()}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),["min","max","inputType","minValueExpression","maxValueExpression"].indexOf(e)>-1&&this.setRenderedMinMax(),("inputType"===e||"inputSize"===e)&&(this.resetInputSize(),this.resetRenderedPlaceholder())}isTextValue(){return this.isDateInputType||["text","number","password"].indexOf(this.inputType)>-1}getType(){return"text"}onSurveyLoad(){super.onSurveyLoad(),this.setRenderedMinMax()}get inputType(){return this.getPropertyValue("inputType")}set inputType(e){("datetime_local"===(e=e.toLowerCase())||"datetime"===e)&&(e="datetime-local"),this.setPropertyValue("inputType",e.toLowerCase()),this.isLoadingFromJson||(this.min=void 0,this.max=void 0,this.step=void 0),this.updateMaskAdapter()}getMaxLength(){return this.isTextInput?super.getMaxLength():null}getSupportedValidators(){let e={},t=["text","email","tel","password","url"];e.text=t,e.regex=t,e.email=["email"],e.numeric=["number","range"];let s=super.getSupportedValidators();for(let t=s.length-1;t>=0;t--){let i=s[t];e[i]&&0>e[i].indexOf(this.inputType)&&s.splice(t,1)}return s}runConditionCore(e){super.runConditionCore(e),(this.minValueExpression||this.maxValueExpression)&&this.setRenderedMinMax(e)}getDisplayValueCore(e,t){return this.maskTypeIsEmpty||w.isValueEmpty(t)?super.getDisplayValueCore(e,t):this.maskInstance.getMaskedValue(t)}isLayoutTypeSupported(e){return!0}get size(){return this.inputSize}set size(e){this.inputSize=e}get isTextInput(){return["text","search","tel","url","email","password"].indexOf(this.inputType)>-1}get renderedInputSize(){return this.getPropertyValue("renderedInputSize",void 0,()=>{let e=this.calInputSize();return e>0?e:void 0})}
10get inputWidth(){return this.getPropertyValue("inputWidth",void 0,()=>this.calInputSize()>0?"auto":"")}calInputSize(){if(!this.isTextInput)return 0;let e=this.inputSize>0?this.inputSize:0;return e<1&&this.parent&&this.parent.inputSize&&(e=this.parent.inputSize),e}resetInputSize(){this.resetPropertyValue("renderedInputSize"),this.resetPropertyValue("inputWidth")}get min(){return this.getPropertyValue("min")}set min(e){if(this.isValueExpression(e)){this.minValueExpression=e.substring(1);return}this.setPropertyValue("min",e)}get max(){return this.getPropertyValue("max")}set max(e){if(this.isValueExpression(e)){this.maxValueExpression=e.substring(1);return}this.setPropertyValue("max",e)}get renderedMin(){return this.getPropertyValue("renderedMin")}get renderedMax(){return this.getPropertyValue("renderedMax")}get isMinMaxType(){return iH(this)}get maskInstance(){return this.maskSettings}get inputValue(){return this._inputValue||this.maskTypeIsEmpty?this._inputValue:this.maskInstance.getMaskedValue("")}set inputValue(e){let t=e,s=e;!this.maskTypeIsEmpty&&(null==(t=this.maskInstance.getUnmaskedValue(e))||""===t?(this.doNotUpdateInputValue=!0,t=void 0):(s=this.maskInstance.getMaskedValue(t),t&&this.maskSettings.saveMaskedValue&&(t=s))),this._inputValue=s,w.isTwoValueEquals(this.value,t,!1,!0)||(this.value=t)}getFilteredValue(){return this.getExpressionValue(this.value)}getExpressionValue(e){return!this.maskTypeIsEmpty&&this.maskSettings.saveMaskedValue?this.maskInstance.getUnmaskedValue(e):e}convertToCorrectValue(e){if(null!=e&&!this.maskTypeIsEmpty&&this.maskSettings.saveMaskedValue){let t=this.maskInstance.getMaskedValue(e);return"string"==typeof e&&(this.maskInstance.getUnmaskedValue(e)||!this.maskInstance.getUnmaskedValue(t))?e:t}return super.convertToCorrectValue(e)}onChangeQuestionValue(e){super.onChangeQuestionValue(e),this.updateInputValue()}updateInputValue(){let e=this.value;if(this.doNotUpdateInputValue){this.doNotUpdateInputValue=!1;return}this.maskTypeIsEmpty?this._inputValue=e:this.maskSettings.saveMaskedValue?this._inputValue=null!=e?e:this.maskInstance.getMaskedValue(""):this._inputValue=this.maskInstance.getMaskedValue(e)}hasToConvertToUTC(e){return p.storeUtcDates&&this.isDateTimeLocaleType()&&!!e}createDate(e){return f("question-text",e)}valueForSurveyCore(e){return this.hasToConvertToUTC(e)&&(e=this.createDate(e).toISOString()),super.valueForSurveyCore(e)}valueFromDataCore(e){if(this.hasToConvertToUTC(e)){let t=this.createDate(e),s=this.createDate(t.getTime()-60*t.getTimezoneOffset()*1e3).toISOString();e=s.substring(0,s.length-2)}return super.valueFromDataCore(e)}isMaskInputIncomplete(){if(this.maskTypeIsEmpty||!this.isEmpty())return!1;let e=this._inputValue;return!!e&&e!==this.maskInstance.getMaskedValue("")}onCheckForErrors(e,t,s){var i,n;if(super.onCheckForErrors(e,t,s),this.isMaskInputIncomplete()){let t=e.findIndex(e=>"required"===e.getErrorType());t>=0&&e.splice(t,1),e.push(new eF(null,this))}let r=this.getIsInputTextUpdate();if(!t||!r){if((null==(n=null==(i=this===null||void 0===this?void 0:this.input)?void 0:i.validity)?void 0:n.badInput)&&e.push(new eB(this.invalidInputErrorText,this)),!this.isOnValueChanged){if(this.isValueLessMin){let t=new eB(this.getMinMaxErrorText(this.minErrorText,this.getCalculatedMinMax(this.renderedMin)),this);t.onUpdateErrorTextCallback=e=>{e.text=this.getMinMaxErrorText(this.minErrorText,this.getCalculatedMinMax(this.renderedMin))},e.push(t)}if(this.isValueGreaterMax){let t=new eB(this.getMinMaxErrorText(this.maxErrorText,this.getCalculatedMinMax(this.renderedMax)),this);t.onUpdateErrorTextCallback=e=>{e.text=this.getMinMaxErrorText(this.maxErrorText,this.getCalculatedMinMax(this.renderedMax))},e.push(t)}this.isStepNumberIncorrect&&e.push(new eB(this.getStepErrorText(),this)),0===e.length&&this.dateValidationMessage&&e.push(new eB(this.dateValidationMessage,this))}if("email"===this.inputType&&!this.validators.some(e=>"emailvalidator"===e.getType())){let t=this.getValidatorTitle(),s=new eY;s.owner=this;let i=s.validate(this.value,t);i&&i.error&&e.push(i.error)}}}canSetValueToSurvey(){if(!this.isMinMaxType)return!0;let e=!this.isValueLessMin&&!this.isValueGreaterMax;return(!e||this.errors.length>0)&&this.survey&&(this.validationCallbacks.isValidateOnValueChanging||this.validationCallbacks.isValidateOnValueChanged)&&this.validate(),e}convertFuncValuetoQuestionValue(e){let t=this.maskTypeIsEmpty?this.inputType:this.maskSettings.getTypeForExpressions(),s=w.convertValToQuestionVal(e,t);return!this.maskTypeIsEmpty&&this.maskSettings.saveMaskedValue&&"string"==typeof s?this.maskInstance.getMaskedValue(s):s}getMinMaxErrorText(e,t){if(w.isValueEmpty(t))return e;let s=t.toString();return"date"===this.inputType&&t.toDateString&&(s=t.toDateString()),e.replace("{0}",s)}getStepErrorText(){return this.stepErrorText.replace("{0}",this.renderedStep)}get isValueLessMin(){return!this.isValueEmpty(this.renderedMin)&&!this.isEmpty()&&this.getCalculatedMinMax(this.value)<this.getCalculatedMinMax(this.renderedMin)}get isValueGreaterMax(){return!this.isValueEmpty(this.renderedMax)&&!this.isEmpty()&&this.getCalculatedMinMax(this.value)>this.getCalculatedMinMax(this.renderedMax)}get isStepNumberIncorrect(){if("number"!==this.inputType||this.isEmpty()||!w.isNumber(this.renderedStep)||!w.isNumber(this.value))return!1;let e=w.getNumber(this.value),t=w.getNumber(this.renderedStep),s=1;for(;(Math.round(t*s)/s!==t||Math.round(e*s)/s!==e)&&s<1e6;)s*=10;return e=Math.round(e*s),(t=Math.round(t*s))>0&&e%t!=0}get isDateInputType(){return"date"===this.inputType||this.isDateTimeLocaleType()}isDateTimeLocaleType(){return"datetime-local"===this.inputType}getCalculatedMinMax(e){return this.isValueEmpty(e)?e:this.isDateInputType?this.createDate(e):e}setRenderedMinMax(e=null){let t=(e,t)=>{this.setPropertyValue(e,this.convertFuncValuetoQuestionValue(t))},s=e=>{!e&&this.isDateInputType&&p.minDate&&(e=p.minDate),t("renderedMin",e)},i=e=>{!e&&this.isDateInputType&&(e=p.maxDate),t("renderedMax",e)};this.runExpressionByProperty("minValueExpression",e,e=>{s(e)})||s(this.min),this.runExpressionByProperty("maxValueExpression",e,e=>{i(e)})||i(this.max)}get renderedStep(){return this.isValueEmpty(this.step)?"number"!==this.inputType?void 0:"any":this.step}getIsInputTextUpdate(){return!!this.maskTypeIsEmpty&&super.getIsInputTextUpdate()}supportAutoAdvance(){return!this.getIsInputTextUpdate()&&!this.isDateInputType}supportGoNextPageError(){return!this.isDateInputType}get dataList(){return this.locDataList.value}set dataList(e){this.locDataList.value=e}get locDataList(){return this.locDataListValue||(this.locDataListValue=new T(this),this.locDataListValue.onValueChanged=(e,t)=>{this.propertyValueChanged("dataList",e,t)}),this.locDataListValue}get dataListId(){var e;return(null==(e=this.locDataListValue)?void 0:e.hasValue())?this.id+"_datalist":void 0}isPropertyStoredInHash(e){return"dataList"===e?!this.locDataListValue:super.isPropertyStoredInHash(e)}setNewValue(e){this.setIsValueChanged(),(e=this.correctValueType(e))&&(this.dateValidationMessage=void 0),super.setNewValue(e)}correctValueType(e){if(!e)return e;if("number"===this.inputType||"range"===this.inputType)return w.isNumber(e)?w.getNumber(e):"";if("month"===this.inputType){let t=this.createDate(e),s=0==t.toISOString().indexOf(e)&&-1==e.indexOf("T"),i=s?t.getUTCMonth():t.getMonth(),n=(s?t.getUTCFullYear():t.getFullYear()).toString();for(;n.length<4;)n="0"+n;let r=i+1;return n+"-"+(r<10?"0":"")+r}return e}hasPlaceholder(){return!this.isReadOnly&&"range"!==this.inputType}getControlCssClassBuilder(){let e=this.getMaxLength();
10return super.getControlCssClassBuilder().append(this.cssClasses.constrolWithCharacterCounter,!!e).append(this.cssClasses.characterCounterBig,e>99).append(this.cssClasses.isValueChanged,this._isValueChanged)}isReadOnlyRenderDiv(){return this.isReadOnly&&"div"===p.readOnly.textRenderMode}get inputStyle(){var e={};return e.width=this.inputWidth,this.updateTextAlign(e),e}updateTextAlign(e){"auto"!==this.inputTextAlignment?e.textAlign=this.inputTextAlignment:this.maskTypeIsEmpty||"auto"===this.maskSettings.getTextAlignment()||(e.textAlign=this.maskSettings.getTextAlignment())}setIsValueChanged(){!this._isValueChanged&&(this._isValueChanged=!0,this.input&&this.cssClasses.isValueChanged&&this.input.classList.add(this.cssClasses.isValueChanged))}updateValueOnEvent(e){if("color"===this.inputType&&!this._isValueChanged)return;let t=e.target.value;this.isTwoValueEquals(this.value,t)||(this.inputValue=t)}updateNumericValue(e){var t;if("number"!==this.inputType||"-"!==e.key)return;let s=(null==(t=e.target)?void 0:t.value)||this.prevNumberValue;"string"==typeof s&&s.length>0&&(e.target.value=s[0]+s.substring(1).replace(/-/g,"")),this.prevNumberValue=void 0}updateDateValidationMessage(e){this.dateValidationMessage=this.isDateInputType&&e.target?e.target.validationMessage:void 0}shouldPreventNumberInput(e){var t;let s=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return!1;if(["e","E","+"].indexOf(s)>-1)return!0;if("-"===s){if(!w.isValueEmpty(this.renderedMin)){let e=w.getNumber(this.renderedMin);if(!isNaN(e)&&e>=0)return!0}this.prevNumberValue=(null==(t=e.target)?void 0:t.value)||""}return!1}onBlurCore(e){this.updateDateValidationMessage(e),this.updateValueOnEvent(e),this.updateRemainingCharacterCounter(e.target.value),super.onBlurCore(e)}onFocusCore(e){this.updateRemainingCharacterCounter(e.target.value),super.onFocusCore(e)}afterRenderQuestionElement(e){e&&(this.input=e instanceof HTMLInputElement?e:e.querySelector("input"),this.createMaskAdapter()),super.afterRenderQuestionElement(e)}beforeDestroyQuestionElement(e){this.deleteMaskAdapter(),this.input=void 0}}V([e_({onSet:(e,t)=>{t.onSetMaskType(e)}})],i_.prototype,"maskType",void 0),V([e_()],i_.prototype,"inputTextAlignment",void 0),V([e_()],i_.prototype,"inputSize",void 0),V([e_()],i_.prototype,"autocomplete",void 0),V([e_()],i_.prototype,"minValueExpression",void 0),V([e_()],i_.prototype,"maxValueExpression",void 0),V([e_({localizable:{defaultStr:"minError",markdown:!0}})],i_.prototype,"minErrorText",void 0),V([e_({localizable:{defaultStr:"maxError",markdown:!0}})],i_.prototype,"maxErrorText",void 0),V([e_({localizable:{defaultStr:"stepError",markdown:!0}})],i_.prototype,"stepErrorText",void 0),V([e_({localizable:{defaultStr:"invalidInputError",markdown:!0}})],i_.prototype,"invalidInputErrorText",void 0),V([e_()],i_.prototype,"_inputValue",void 0),V([e_()],i_.prototype,"step",void 0);let iQ=["number","range","date","datetime-local","month","time","week"];function iH(e){let t=e?e.inputType:"";return!!t&&iQ.indexOf(t)>-1}function iz(e,t){let s=e.split(t);return 2===s.length&&w.isNumber(s[0])&&w.isNumber(s[1])?60*parseFloat(s[0])+parseFloat(s[1]):-1}function iU(e,t,s,i){let n=i?s:t;if(!iH(e)||w.isValueEmpty(t)||w.isValueEmpty(s))return n;if(0===e.inputType.indexOf("date")||"month"===e.inputType){let r="month"===e.inputType,a="question-text-minmax",o=f(a,r?t+"-01":t),l=f(a,r?s+"-01":s);if(!o||!l)return n;if(o>l)return i?t:s}if("week"===e.inputType||"time"===e.inputType){let r,a,o="week"===e.inputType?"-W":":";return(r=iz(t,o),a=iz(s,o),r<0||a<0||!(r>a))?n:i?t:s}if("number"===e.inputType){if(!w.isNumber(t)||!w.isNumber(s))return n;if(w.getNumber(t)>w.getNumber(s))return i?t:s}return"string"==typeof t||"string"==typeof s?n:t>s?i?t:s:n}function iW(e,t){e&&e.inputType&&(t.inputType="range"!==e.inputType?e.inputType:"number",t.textUpdateMode="onBlur")}function ij(e){return"number"===e.inputType||"range"===e.inputType}H.addClass("text",[{name:"inputType",default:"text",choices:p.questions.inputTypes},{name:"inputSize:number",alternativeName:"size",minValue:0,dependsOn:"inputType",visibleIf:function(e){return!!e&&e.isTextInput}},{name:"textUpdateMode",default:"default",choices:["default","onBlur","onTyping"],dependsOn:"inputType",visibleIf:function(e){return!!e&&e.isTextInput}},{name:"autocomplete",alternativeName:"autoComplete",choices:p.questions.dataList},{name:"min",dependsOn:"inputType",visibleIf:function(e){return iH(e)},onPropertyEditorUpdate:function(e,t){iW(e,t)},onSettingValue:(e,t)=>
vendor: 18,448 bytes, line 10
10iU(e,t,e.max,!1)},{name:"max",dependsOn:"inputType",nextToProperty:"*min",visibleIf:function(e){return iH(e)},onSettingValue:(e,t)=>iU(e,e.min,t,!0),onPropertyEditorUpdate:function(e,t){iW(e,t)}},{name:"minValueExpression:expression",dependsOn:"inputType",visibleIf:function(e){return iH(e)}},{name:"maxValueExpression:expression",dependsOn:"inputType",visibleIf:function(e){return iH(e)}},{name:"minErrorText",serializationProperty:"locMinErrorText",dependsOn:"inputType",visibleIf:function(e){return iH(e)}},{name:"maxErrorText",serializationProperty:"locMaxErrorText",dependsOn:"inputType",visibleIf:function(e){return iH(e)}},{name:"stepErrorText",serializationProperty:"locStepErrorText",dependsOn:"inputType",visibleIf:e=>ij(e)},{name:"inputTextAlignment",default:"auto",choices:["left","right","auto"]},{name:"maskType",default:"none",visibleIndex:0,dependsOn:"inputType",visibleIf:e=>"text"===e.inputType||"tel"===e.inputType,choices:e=>iB()},{name:"maskSettings:masksettings",className:"masksettings",visibleIndex:1,dependsOn:["inputType","maskType"],visibleIf:e=>"text"===e.inputType||"tel"===e.inputType,onGetValue:function(e){return e.maskSettings.getData()},onSetValue:function(e,t){e.maskSettings.setData(t)}},{name:"step:number",dependsOn:"inputType",visibleIf:e=>ij(e)},{name:"maxLength:number",default:-1,dependsOn:"inputType",visibleIf:function(e){return!!e&&e.isTextInput}},{name:"placeholder",alternativeName:"placeHolder",serializationProperty:"locPlaceholder",dependsOn:"inputType",visibleIf:function(e){return!!e&&e.isTextInput}},{name:"dataList:string[]",serializationProperty:"locDataList",dependsOn:"inputType",visibleIf:function(e){return!!e&&"text"===e.inputType}}],function(){return new i_("")},"textbase"),sm.Instance.registerQuestion("text",e=>new i_(e));class iG extends U{constructor(e){super(),this.question=e}getRootObj(){return this.question.data}updateValueByItem(e,t){let s=this.question.items;for(let i=0;i<s.length;i++){let n=s[i].editor;if(n.getValueName()===e){t.isFound=!0,t.obj=n,t.context=n.getValueGetterContext();return}}}}class iZ extends i_{get a11y_input_ariaLabel(){return this.locTitle.renderedHtml}get a11y_input_ariaLabelledBy(){return null}get a11y_input_ariaDescribedBy(){return null}}class iJ extends ew{constructor(e=null,t=null){super(),this.focusIn=()=>{this.editor.focusIn()},this.editorValue=this.createEditor(e),this.maskSettings=this.editorValue.maskSettings,this.editor.questionTitleTemplateCallback=function(){return""},this.editor.titleLocation="left",t&&(this.title=t),this.editor.onPropertyChanged.add((e,t)=>{"maskSettings"!==t.name&&this.onPropertyChanged.fire(this,t)})}getType(){return"multipletextitem"}getOwner(){return this.question}getAllChildren(){return[...super.getAllChildren(),...this.validators]}get id(){return this.editor.id}getOriginalObj(){return this.editor}get name(){return this.editor.name}set name(e){this.editor.name=e}get question(){return this.data}get editor(){return this.editorValue}createEditor(e){return new iZ(e)}addUsedLocales(e){super.addUsedLocales(e),this.editor.addUsedLocales(e)}localeChanged(){super.localeChanged(),this.editor.localeChanged()}locStrsChanged(){super.locStrsChanged(),this.editor.locStrsChanged()}setData(e){this.data=e,e&&(this.editor.defaultValue=e.getItemDefaultValue(this.name),this.editor.setSurveyImpl(this),this.editor.parent=e,this.editor.setParentQuestion(e))}get isRequired(){return this.editor.isRequired}set isRequired(e){this.editor.isRequired=e}get inputType(){return this.editor.inputType}set inputType(e){this.editor.inputType=e}get title(){return this.editor.title}set title(e){this.editor.title=e}get locTitle(){return this.editor.locTitle}get fullTitle(){return this.editor.fullTitle}get maxLength(){return this.editor.maxLength}set maxLength(e){this.editor.maxLength=e}getMaxLength(){var e=this.getSurvey();return w.getMaxLength(this.maxLength,e?e.maxTextLength:-1)}get placeholder(){return this.editor.placeholder}set placeholder(e){this.editor.placeholder=e}get locPlaceholder(){return this.editor.locPlaceholder}get placeHolder(){return this.placeholder}set placeHolder(e){this.placeholder=e}get locPlaceHolder(){return this.locPlaceholder}get requiredErrorText(){return this.editor.requiredErrorText}set requiredErrorText(e){this.editor.requiredErrorText=e}get locRequiredErrorText(){return this.editor.locRequiredErrorText}get inputSize(){return this.editor.inputSize}set inputSize(e){this.editor.inputSize=e}get size(){return this.inputSize}set size(e){this.inputSize=e}get defaultValueExpression(){return this.editor.defaultValueExpression}set defaultValueExpression(e){this.editor.defaultValueExpression=e}get minValueExpression(){return this.editor.minValueExpression}set minValueExpression(e){this.editor.minValueExpression=e}get maxValueExpression(){return this.editor.maxValueExpression}set maxValueExpression(e){this.editor.maxValueExpression=e}get validators(){return this.editor.validators}set validators(e){this.editor.validators=e}getValidators(){return this.validators}get maskType(){return this.editor.maskType}set maskType(e){this.editor.maskType=e,this.maskSettings=this.editor.maskSettings}get maskSettings(){return this.getPropertyValue("maskSettings")}set maskSettings(e){this.setPropertyValue("maskSettings",e),this.editor.maskSettings!==e&&(this.editor.maskSettings=e)}get inputTextAlignment(){return this.editor.inputTextAlignment}set inputTextAlignment(e){this.editor.inputTextAlignment=e}get value(){return this.data?this.data.getMultipleTextValue(this.name):null}set value(e){null!=this.data&&this.data.setMultipleTextValue(this.name,e)}isEmpty(){return this.editor.isEmpty()}onValueChanged(e){this.valueChangedCallback&&this.valueChangedCallback(e)}getSurveyData(){return this}getSurvey(){return this.data?this.data.getSurvey():null}getTextProcessor(){return this.data?this.data.getTextProcessor():null}getValue(e){return this.data?this.data.getMultipleTextValue(e):null}setValue(e,t){this.data&&this.data.setMultipleTextValue(e,t)}getComment(e){return null}setComment(e,t){}getFilteredProperties(){return{survey:this.getSurvey()}}findQuestionByName(e){let t=this.getSurvey();return t?t.getQuestionByName(e):null}getValidatorTitle(){return this.title}get validatedValue(){return this.value}set validatedValue(e){this.value=e}getDataFilteredProperties(){return this.getFilteredProperties()}}class iK extends tz{static addDefaultItems(e){for(var t=sm.DefaultMutlipleTextItems,s=0;s<t.length;s++)e.addItem(t[s])}constructor(e){super(e),this.isMultipleItemValueChanging=!1,this.createNewArray("items",e=>{e.setData(this),this.survey&&this.survey.multipleTextItemAdded(this,e)})}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),["items","colCount","itemErrorLocation"].indexOf(e)>-1&&this.calcVisibleRows(),"inputSize"===e&&this.resetItemsSize()}getType(){return"multipletext"}getAllChildren(){return[...super.getAllChildren(),...this.items]}setSurveyImpl(e,t){super.setSurveyImpl(e,t);for(var s=0;s<this.items.length;s++)this.items[s].setData(this)}get isAllowTitleLeft(){return!1}get isContainer(){return!0}onSurveyLoad(){this.editorsOnSurveyLoad(),super.onSurveyLoad(),w.isValueEmpty(this.rows)||this.calcVisibleRows()}setQuestionValue(e,t=!0){super.setQuestionValue(e,t),this.performForEveryEditor(e=>{e.editor.updateValueFromSurvey(e.value)}),this.updateIsAnswered()}onSurveyValueChanged(e){super.onSurveyValueChanged(e),this.performForEveryEditor(e=>{e.editor.onSurveyValueChanged(e.value)})}resetItemsSize(){this.performForEveryEditor(e=>{e.editor.resetInputSize()})}editorsOnSurveyLoad(){this.performForEveryEditor(e=>{e.editor.onSurveyLoad()})}performForEveryEditor(e){for(var t=0;t<this.items.length;t++){var s=this.items[t];s.editor&&e(s)}}addItem(e,t=null){var s=this.createTextItem(e,t);return this.items.push(s),s}getItemByName(e){for(var t=0;t<this.items.length;t++)if(this.items[t].name==e)return this.items[t];return null}getElementsInDesign(e=!1){return super.getElementsInDesign(e).concat(this.items)}addConditionObjectsByContext(e,t){for(var s=0;s<this.items.length;s++){var i=this.items[s];e.push({name:this.getValueName()+"."+i.name,text:this.processedTitle+"."+i.fullTitle,question:this})}}collectNestedQuestionsCore(e,t,s,i){i&&e.push(this),this.items.forEach(n=>n.editor.addNestedQuestion(e,t,s,i))}getConditionJson(e=null,t=null){if(!t)return super.getConditionJson(e);var s=this.getItemByName(t);if(!s)return null;var i=new Q().toJsonObject(s);return i.type="text",i}locStrsChanged(){super.locStrsChanged();for(var e=0;e<this.items.length;e++)this.items[e].locStrsChanged()}localeChanged(){super.localeChanged();for(var e=0;e<this.items.length;e++)this.items[e].localeChanged()}getQuestionErrorLocation(){return"default"!==this.itemErrorLocation?this.itemErrorLocation:this.getErrorLocation()}get showItemErrorOnTop(){return"top"==this.getQuestionErrorLocation()}get showItemErrorOnBottom(){return"bottom"==this.getQuestionErrorLocation()}getChildErrorLocation(e){return this.getQuestionErrorLocation()}isNewValueCorrect(e){return w.isValueObject(e,!0)}supportAutoAdvance(){for(var e=0;e<this.items.length;e++)if(this.items[e].isEmpty())return!1;return!0}get itemSize(){return this.inputSize}set itemSize(e){this.inputSize=e}onRowCreated(e){return e}calcVisibleRows(){let e,t,s=this.colCount,i=this.items,n=0,r=[];for(var a=0;a<i.length;a++)0==n&&(e=this.onRowCreated(new iY),t=this.onRowCreated(new i$),this.showItemErrorOnTop?(r.push(t),r.push(e)):(r.push(e),r.push(t))),e.cells.push(new iX(i[a],this)),t.cells.push(new i1(i[a],this)),(++n>=s||a==i.length-1)&&(n=0,t.onAfterCreated());this.rows=r}getRows(){return w.isValueEmpty(this.rows)&&this.calcVisibleRows(),this.rows}onValueChanged(){super.onValueChanged(),this.onItemValueChanged()}createTextItem(e,t){return new iJ(e,t)}onItemValueChanged(){if(!this.isMultipleItemValueChanging)for(var e=0;e<this.items.length;e++){var t=null;this.value&&this.items[e].name in this.value&&(t=this.value[this.items[e].name]),this.items[e].onValueChanged(t)}}runConditionCore(e){super.runConditionCore(e),this.items.forEach(t=>t.editor.runCondition(e))}getIsRunningValidators(){if(super.getIsRunningValidators())return!0;for(var e=0;e<this.items.length;e++)if(this.items[e].editor.isRunningValidators)return!0;return!1}validateElementCore(e){let t=!0;for(var s=0;s<this.items.length;s++)e.isOnValueChanged&&this.items[s].editor.isEmpty()||(t=this.items[s].editor.validateElement(e)&&t);return super.validateElementCore(e)&&t}getAllErrors(){for(var e=super.getAllErrors(),t=0;t<this.items.length;t++){var s=this.items[t].editor.getAllErrors();s&&s.length>0&&(e=e.concat(s))}return e}clearErrors(){super.clearErrors();for(var e=0;e<this.items.length;e++)this.items[e].editor.clearErrors()}getContainsErrors(){var e=super.getContainsErrors();if(e)return e;for(var t=this.items,s=0;s<t.length;s++)if(t[s].editor.containsErrors)return!0;return!1}getIsAnswered(){if(!super.getIsAnswered())return!1;for(var e=0;e<this.items.length;e++){var t=this.items[e].editor;if(t.isVisible&&!t.isAnswered)return!1}return!0}getProgressInfo(){for(var e=[],t=0;t<this.items.length;t++)e.push(this.items[t].editor);return tL.getProgressInfoByElements(e,this.isRequired)}getValueGetterContext(){return new iG(this)}getDisplayValueCore(e,t){if(!t)return t;for(var s={},i=0;i<this.items.length;i++){var n=this.items[i],r=t[n.name];if(!w.isValueEmpty(r)){var a=n.name;e&&n.title&&(a=n.title),s[a]=n.editor.getDisplayValue(e,r)}}return s}allowMobileInDesignMode(){return!0}getMultipleTextValue(e){return this.value?this.value[e]:null}setMultipleTextValue(e,t){this.isMultipleItemValueChanging=!0,this.isValueEmpty(t)&&(t=void 0);var s=this.value;s||(s={}),s[e]=t,this.setNewValue(s),this.isMultipleItemValueChanging=!1}getItemDefaultValue(e){return this.defaultValue?this.defaultValue[e]:null}getTextProcessor(){return this.textProcessor}addElement(e,t){}removeElement(e){return!1}getQuestionTitleLocation(){return"left"}getQuestionTitleWidth(){}getColumsForElement(e){return[]}updateColumns(){}getQuestionStartIndex(){return this.getStartIndex()}getChildrenLayoutType(){return"row"}elementWidthChanged(e){}get elements(){return[]}indexOf(e){return -1}ensureRowsVisibility(){}validateContainerOnly(){}getItemLabelCss(e){return new eX().append(this.cssClasses.itemLabel).append(this.cssClasses.itemLabelDisabled,this.isDisabledStyle).append(this.cssClasses.itemLabelReadOnly,this.isReadOnlyStyle).append(this.cssClasses.itemLabelPreview,this.isPreviewStyle).append(this.cssClasses.itemLabelAnswered,e.editor.isAnswered).append(this.cssClasses.itemLabelAllowFocus,!this.isDesignMode).append(this.cssClasses.itemLabelOnError,e.editor.errors.length>0).append(this.cssClasses.itemWithCharacterCounter,!!e.getMaxLength()).toString()}getItemCss(){return new eX().append(this.cssClasses.item).toString()}getItemTitleCss(){return new eX().append(this.cssClasses.itemTitle).toString()}get ariaRole(){return"group"}get ariaRequired(){return null}get ariaInvalid(){return null}}V([e_()],iK.prototype,"items",void 0),V([e_()],iK.prototype,"itemErrorLocation",void 0),V([e_({onSetting:e=>e<1?1:e>5?5:e})],iK.prototype,"colCount",void 0),V([e_()],iK.prototype,"inputSize",void 0),V([e_({returnValue:""})],iK.prototype,"itemTitleWidth",void 0),V([eH()],iK.prototype,"rows",void 0);class iY extends ew{constructor(){super(...arguments),this.isVisible=!0,this.cells=[]}}V([e_()],iY.prototype,"isVisible",void 0),V([eH()],iY.prototype,"cells",void 0);class i$ extends iY{onAfterCreated(){let e=()=>{this.isVisible=this.cells.some(e=>{var t,s;return(null==(t=e.item)?void 0:t.editor)&&(null==(s=e.item)?void 0:s.editor.hasVisibleErrors)})};this.cells.forEach(t=>{var s,i;(null==(s=t.item)?void 0:s.editor)&&(null==(i=t.item)||i.editor.registerFunctionOnPropertyValueChanged("hasVisibleErrors",e))}),e()}}class iX{constructor(e,t){this.item=e,this.question=t,this.isErrorsCell=!1}getClassName(){return new eX().append(this.question.cssClasses.cell).toString()}get className(){return this.getClassName()}}class i1 extends iX{constructor(){super(...arguments),this.isErrorsCell=!0}getClassName(){return new eX().append(super.getClassName()).append(this.question.cssClasses.cellError).append(this.question.cssClasses.cellErrorTop,this.question.showItemErrorOnTop).append(this.question.cssClasses.cellErrorBottom,this.question.showItemErrorOnBottom).toString()}}H.addClass("multipletextitem",[{name:"!name",isUnique:!0},"isRequired:boolean",{name:"placeholder",alternativeName:"placeHolder",serializationProperty:"locPlaceholder"},{name:"inputType",default:"text",choices:p.questions.inputTypes},{name:"maskType",default:"none",visibleIndex:0,dependsOn:"inputType",visibleIf:e=>"text"===e.inputType,choices:e=>iB()},{name:"maskSettings:masksettings",className:"masksettings",visibleIndex:1,dependsOn:"inputType",visibleIf:e=>"text"===e.inputType,onGetValue:function(e){return e.maskSettings.getData()},onSetValue:function(e,t){e.maskSettings.setData(t)}},{name:"inputTextAlignment",default:"auto",choices:["left","right","auto"]},{name:"title",serializationProperty:"locTitle"},{name:"maxLength:number",default:-1},{name:"inputSize:number",alternativeName:"size",minValue:0},{name:"requiredErrorText:text",serializationProperty:"locRequiredErrorText"},{name:"defaultValueExpression:expression"},{name:"minValueExpression:expression",dependsOn:"inputType",visibleIf:function(e){return iH(e)}},{name:"maxValueExpression:expression",dependsOn:"inputType",visibleIf:function(e){return iH(e)}},{name:"validators:validators",baseClassName:"surveyvalidator",classNamePart:"validator"}],function(){return new iJ("")}),H.addClass("multipletext",[{name:"!items:textitems",className:"multipletextitem",isArray:!0},{name:"inputSize:number",minValue:0,visible:!1,alternativeName:"itemSize"},{name:"colCount:number",default:1,choices:[1,2,3,4,5]},{name:"itemErrorLocation",default:"default",choices:["default","top","bottom"],visible:!1},{name:"itemTitleWidth"}],function(){return new iK("")},"question"),sm.Instance.registerQuestion("multipletext",e=>{var t=new iK(e);return iK.addDefaultItems(t),t});class i0 extends ia{onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"content"===e&&this.onContentChanged()}getType(){return"flowpanel"}getChildrenLayoutType(){return"flow"}onSurveyLoad(){super.onSurveyLoad(),this.onContentChanged()}onContentChanged(){var e="";e=this.onCustomHtmlProducing?this.onCustomHtmlProducing():this.produceHtml(),this.html=e,this.contentChangedCallback&&this.contentChangedCallback()}produceHtml(){for(var e=[],t=/{(.*?(element:)[^$].*?)}/g,s=this.content,i=0,n=null;null!==(n=t.exec(s));){n.index>i&&(e.push(s.substring(i,n.index)),i=n.index);var r=this.getQuestionFromText(n[0]);r?e.push(this.getHtmlForQuestion(r)):e.push(s.substring(i,n.index+n[0].length)),i=n.index+n[0].length}return i<s.length&&e.push(s.substring(i,s.length)),e.join("").replace(RegExp("<br>","g"),"<br/>")}getQuestionFromText(e){return e=(e=e.substring(1,e.length-1)).replace(i0.contentElementNamePrefix,"").trim(),this.getQuestionByName(e)}getHtmlForQuestion(e){return this.onGetHtmlForQuestion?this.onGetHtmlForQuestion(e):""}getQuestionHtmlId(e){return this.name+"_"+e.id}onAddElement(e,t){super.onAddElement(e,t),this.addElementToContent(e),e.renderWidth=""}onRemoveElement(e){var t=this.getElementContentText(e);this.content=this.content.replace(t,""),super.onRemoveElement(e)}dragDropMoveElement(e,t,s){}addElementToContent(e){if(!this.isLoadingFromJson){var t=this.getElementContentText(e);this.insertTextAtCursor(t)||(this.content=this.content+t)}}insertTextAtCursor(e,t=null){if(!this.isDesignMode||!i.isAvailable())return!1;let s=i.getSelection();if(s.getRangeAt&&s.rangeCount){let i=s.getRangeAt(0);i.deleteContents();let r=new Text(e);if(i.insertNode(r),this.getContent){var n=this.getContent(t);this.content=n}return!0}return!1}getElementContentText(e){return"{"+i0.contentElementNamePrefix+e.name+"}"}}i0.contentElementNamePrefix="element:",V([e_({localizable:!0})],i0.prototype,"content",void 0),V([e_({returnValue:""})],i0.prototype,"html",void 0),H.addClass("flowpanel",[{name:"content:html",serializationProperty:"locContent"}],function(){return new i0},"panel");class i2 extends tz{constructor(e){super(e)}getType(){return"nonvalue"}get hasInput(){return!1}get hasTitle(){return!1}getTitleLocation(){return""}get hasComment(){return!1}validateElementCore(e){return!0}getAllErrors(){return[]}supportAutoAdvance(){return!1}
10addConditionObjectsByContext(e,t){}getConditionJson(e=null,t=null){return null}get ariaRole(){return null}get ariaRequired(){return null}}H.addClass("nonvalue",[{name:"title",visible:!1},{name:"description",visible:!1},{name:"valueName",visible:!1},{name:"enableIf",visible:!1},{name:"defaultValue",visible:!1},{name:"correctAnswer",visible:!1},{name:"clearIfInvisible",visible:!1},{name:"isRequired",visible:!1,isSerializable:!1},{name:"requiredErrorText",visible:!1},{name:"readOnly",visible:!1},{name:"requiredIf",visible:!1},{name:"validators",visible:!1},{name:"titleLocation",visible:!1},{name:"showTitle",visible:!1,isSerializable:!1},{name:"showCommentArea",visible:!1},{name:"useDisplayValuesInDynamicTexts",alternativeName:"useDisplayValuesInTitle",visible:!1}],function(){return new i2("")},"question");class i5 extends tz{constructor(e){super(e)}getType(){return"empty"}}H.addClass("empty",[],function(){return new i5("")},"question");class i7{constructor(e,t){this.val=null!=e?e:[],this.name=t}add(e){return this.contains(e)||(this.name?this.val.push({[this.name]:e}):this.val.push(e)),this.val}indexOf(e){for(let t=0;t<this.val.length;t++)if(this.getValue(t)===e)return t;return -1}contains(e){return this.indexOf(e)>-1}toggle(e,t=0){return this.contains(e)?this.remove(e):t>0&&this.val.length>=t?this.val:this.add(e)}remove(e){let t=this.indexOf(e);return t>-1&&this.val.splice(t,1),this.val}convert(e){return null==e?e:(Array.isArray(e)||(e=[e]),this.name)?e.map(e=>e&&"object"==typeof e&&this.name in e?e:{[this.name]:e}):e}getNamedValue(e){return this.name?{[this.name]:e}:e}getValues(){if(this.val)return this.val.map((e,t)=>this.getValue(t))}getValue(e){if(e<0||e>=this.val.length)return;let t=this.val[e];return this.name&&"object"==typeof t?t[this.name]:t}equals(e){if(!Array.isArray(e)||this.val.length!==e.length)return!1;let t=new i7(e,this.name).getValues(),s=this.getValues();for(let e=0;e<t.length;e++)if(t[e]!==s[e])return!1;return!0}}class i4 extends iv{getBaseType(){return"checkboxitem"}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"showCommentArea"===e&&this.locOwner&&this.locOwner.onItemHasCommentChanged()}}V([e_()],i4.prototype,"isExclusive",void 0);class i9 extends iy{constructor(){super(...arguments),this.invisibleOldValues={},this.isChangingValueOnClearIncorrect=!1}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),["showSelectAllItem","selectAllText"].indexOf(e)>-1&&this.onVisibleChoicesChanged(),"choices"===e&&this.onItemHasCommentChanged(),("maxSelectedChoices"===e||"minSelectedChoices"===e)&&this.filterItems()}supportElementsInChoice(){return!0}getDefaultItemComponent(){return"survey-checkbox-item"}getType(){return"checkbox"}getItemValueType(){return"checkboxitem"}onCreating(){super.onCreating(),this.createNewArray("renderedValue"),this.createNewArray("value")}getFirstInputElementId(){return this.inputId+"_0"}getValuePropertyName(){return this.valuePropertyName||(this.isTheOnlyComment?"":"value")}getQuestionFromArray(e,t){if(e&&e===this.getValuePropertyName()){let e=this.value;if(Array.isArray(e)&&t<e.length)return this}return null}getDependedQuestionsByValueName(e){return e&&this.getValuePropertyName()?[]:super.getDependedQuestionsByValueName(e)}get selectAllItem(){return this.selectAllItemValue||(this.selectAllItemValue=this.createBuiltInItem("","selectAllText","selectAllItemText",e=>{e.value="",e.id="selectall"})),this.selectAllItemValue}get selectAllText(){return this.getLocalizableStringText("selectAllText")}set selectAllText(e){this.setLocStringText(this.locSelectAllText,e)}get locSelectAllText(){return this.selectAllItem.locText}get hasSelectAll(){return this.showSelectAllItem}set hasSelectAll(e){this.showSelectAllItem=e}get isAllSelected(){return this.allElementsSelected()}set isAllSelected(e){e?this.selectAll():this.unselectAll()}toggleSelectAll(){this.isAllSelected=!this.isAllSelected}allElementsSelected(){if(this.isNoneItemsSelected())return!1;let e=this.getVisibleEnableItems();if(0===e.length)return!1;let t=this.value;if(!t||!Array.isArray(t)||0===t.length||t.length<e.length)return!1;let s=this.getPropertyNameArray(t).getValues();for(let t=0;t<e.length;t++)if(0>s.indexOf(e[t].value))return!1;return!0}isNoneItemsSelected(){let e=this.getNoneItems();for(let t=0;t<e.length;t++)if(this.isItemSelected(e[t]))return!0;return!1}getNoneItems(){let e=[];
10return this.visibleChoices.forEach(t=>{this.isNoneItem(t)&&e.push(t)}),e}selectAll(){this.selectAllCore(e=>e.isEnabled||this.isItemSelected(e))}unselectAll(){this.selectAllCore(e=>!e.isEnabled&&this.isItemSelected(e))}selectAllCore(e){let t=[],s=this.getVisibleEnableItems(!0);for(let i=0;i<s.length;i++){let n=s[i];e(n)&&t.push(n.value)}this.renderedValue=t}clickItemHandler(e,t){this.selectItem(e,t)}selectItem(e,t){if(!this.isReadOnlyAttr&&e)if(e===this.selectAllItem)!0===t||!1===t?this.isAllSelected=t:this.toggleSelectAll();else{if(this.isNoneItem(e))this.renderedValue=t?[e.value]:[];else{let s=[].concat(this.renderedValue||[]),i=s.indexOf(e.value);t?i<0&&s.push(e.value):i>-1&&s.splice(i,1),this.renderedValue=s}t&&this.onItemSelected(e)}}isItemSelectedCore(e){if(e===this.selectAllItem)return this.isAllSelected;var t=this.renderedValue;if(!t||!Array.isArray(t))return!1;for(var s=0;s<t.length;s++)if(this.isTwoValueEquals(t[s],e.value))return!0;return!1}hasUnknownValueItem(e,t=!1,s=!0,i=!1){return super.hasUnknownValueItem(this.getPropertyNameArray([e]).getValue(0),t,s,i)}setCommentValueCore(e,t){if(t=this.getTrimmedComment(t),this.isOtherItemByValue(e))super.setCommentValueCore(e,t);else{this.setCommentPropertyValue(e,t);let s=this.getItemValIndexByItemValue(e.value);if(s>-1){let e=this.createValueCopy(),i=e[s];t?i[this.commentPropertyValue]=t:delete i[this.commentPropertyValue],this.value=e}}}getCommentValueByItem(e){let t=this.getItemValIndexByItemValue(e.value);return t>-1?this.value[t][this.commentPropertyValue]:void 0}getItemValIndexByItemValue(e){return this.getPropertyNameArray(this.value).indexOf(e)}get isTheOnlyComment(){return this.getPropertyValue("isTheOnlyComment",void 0,()=>this.calcIsTheOnlyComment())}calcIsTheOnlyComment(){for(let e=0;e<this.choices.length;e++){let t=this.choices[e];if(t.showCommentArea&&!this.isOtherValue(t.value))return!1}return!0}onItemHasCommentChanged(){this.resetPropertyValue("isTheOnlyComment")}getValueFromReal(e){return this.getPropertyNameArray([]).getNamedValue(e)}get isValueArray(){return!0}get selectedChoices(){let e=this.renderedValue,t=this.visibleChoices,s=this.selectedItemValues;if(this.isEmpty())return[];let i=this.defaultSelectedItemValues?[].concat(this.defaultSelectedItemValues,t):t,n=e.map(e=>tj.getItemByValue(i,e)).filter(e=>!!e);return n.length||s||this.updateSelectedItemValues(),this.validateItemValues(n)}get selectedItems(){return this.selectedChoices}get hasFilteredValue(){return!!this.getValuePropertyName()}getFilteredName(){let e=super.getFilteredName();return this.hasFilteredValue&&(e+=p.expressionVariables.unwrapPostfix),e}getFilteredValue(e){return this.hasFilteredValue&&(e||!this.valuePropertyName)?this.renderedValue:super.getFilteredValue(e)}getMultipleSelectedItems(){return this.selectedChoices}validateItemValues(e){if(e.length)return e;let t=this.selectedItemValues;return t&&t.length?(this.defaultSelectedItemValues=[].concat(t),t):this.renderedValue.map(e=>this.createItemValue(e))}getAnswerCorrectIgnoreOrder(){return!0}onCheckForErrors(e,t,s){if(super.onCheckForErrors(e,t,s),!t&&this.checkMinSelectedChoicesUnreached()){let t=new eB(this.getLocalizationFormatString("minSelectError",this.minSelectedChoices),this);e.push(t)}}onVisibleChoicesChanged(){super.onVisibleChoicesChanged(),this.updateSelectAllItemProps()}onEnableItemCallBack(e){return!this.shouldCheckMaxSelectedChoices()||this.isItemSelected(e)}onAfterRunItemsEnableCondition(){this.updateSelectAllItemProps();let e=this.maxSelectedChoices<1||this.isOtherSelected||!this.shouldCheckMaxSelectedChoices();this.showOtherItem&&this.otherItem.setIsEnabled(e)}updateSelectAllItemProps(){this.showSelectAllItem&&this.selectAllItem.setIsEnabled(this.getSelectAllEnabled())}getSelectAllEnabled(){if(!this.showSelectAllItem)return!0;let e=this.getVisibleEnableItems().length,t=this.maxSelectedChoices;return(!(t>0)||!(t<e))&&e>0}getVisibleEnableItems(e){let t=[],s=this.visibleChoices;for(let i=0;i<s.length;i++){let n=s[i];(e||n.isEnabled)&&!this.isBuiltInChoice(n)&&!n.isExclusive&&t.push(n)}return t}shouldCheckMaxSelectedChoices(){if(this.maxSelectedChoices<1)return!1;var e=this.value;return(Array.isArray(e)?e.length:0)>=this.maxSelectedChoices}checkMinSelectedChoicesUnreached(){if(this.minSelectedChoices<1)return!1;var e=this.value,t=Array.isArray(e)?e.length:0;return!(1===t&&this.isNoneItemsSelected())&&t<this.minSelectedChoices}getItemClassCore(e,t){return this.value,t.isSelectAllItem=e===this.selectAllItem,new eX().append(super.getItemClassCore(e,t)).append(this.cssClasse
10s.itemSelectAll,t.isSelectAllItem).toString()}updateValueFromSurvey(e,t){super.updateValueFromSurvey(e,t),this.invisibleOldValues={}}onSurveyLoad(){this.onItemHasCommentChanged(),super.onSurveyLoad()}getPropertyNameArray(e){return new i7(e,this.getValuePropertyName())}setDefaultUnknownValue(e){if(!Array.isArray(e))return void super.setDefaultUnknownValue(e);let t=this.getPropertyNameArray(e);if(this.hasActiveChoices){let i=[],n="";for(var s=0;s<e.length;s++){let e=t.getValue(s);this.hasUnknownValue(e)?n||(n=e,i.push(this.otherItem.value)):i.push(e)}this.renderedValue=i,this.otherValue=n}else{for(var s=0;s<e.length;s++){let e=t.getValue(s);this.addIntoInvisibleOldValues(e)}this.value=e}}addIntoInvisibleOldValues(e){this.invisibleOldValues[e]=e}hasValueToClearIncorrectValues(){return super.hasValueToClearIncorrectValues()||!w.isValueEmpty(this.invisibleOldValues)}setNewValue(e){this.isChangingValueOnClearIncorrect||(this.invisibleOldValues={}),e=this.valueFromData(e);var t=this.value;e||(e=[]),t||(t=[]),this.isTwoValueEquals(t,e)||(this.removeNoneItemsValues(t,e),super.setNewValue(e))}getCommentFromValue(e){var t=this.getFirstUnknownIndex(e);return t<0?"":e[t]}getStoreOthersAsComment(){return!this.getValuePropertyName()&&super.getStoreOthersAsComment()}setOtherValueIntoValue(e){var t=this.getFirstUnknownIndex(e);return t<0||e.splice(t,1,this.getPropertyNameArray([]).getNamedValue(this.otherItem.value)),e}getFirstUnknownIndex(e){if(!Array.isArray(e))return -1;for(var t=0;t<e.length;t++)if(this.hasUnknownValueItem(e[t],!1,!1))return t;return -1}removeNoneItemsValues(e,t){if(this.getPropertyNameArray(e).equals(t))return;let s=this.getNoneItems().map(e=>e.value);if(s.length>0){let i=this.noneIndexInArray(e,s),n=this.noneIndexInArray(t,s);if(i.index>-1)if(i.val===n.val)t.length>0&&t.splice(n.index,1);else{let e=this.noneIndexInArray(t,[i.val]);e.index>-1&&e.index<t.length-1&&t.splice(e.index,1)}else n.index>-1&&t.length>1&&t.splice(0,t.length,this.getValueFromReal(n.val))}}noneIndexInArray(e,t){if(!Array.isArray(e))return{index:-1,val:void 0};let s=this.getPropertyNameArray(e);for(var i=e.length-1;i>=0;i--){let e=t.indexOf(s.getValue(i));if(e>-1)return{index:i,val:t[e]}}return{index:-1,val:void 0}}supportSelectAll(){return this.isSupportProperty("showSelectAllItem")}addNonChoicesItems(e,t){super.addNonChoicesItems(e,t),this.supportSelectAll()&&this.addNonChoiceItem(e,()=>this.selectAllItem,t,this.showSelectAllItem,p.specialChoicesOrder.selectAllItem)}isBuiltInChoice(e){return e===this.selectAllItem||super.isBuiltInChoice(e)}isItemInList(e){return e==this.selectAllItem?this.showSelectAllItem:super.isItemInList(e)}getDisplayValueEmpty(){return tj.getTextOrHtmlByValue(this.visibleChoices.filter(e=>e!=this.selectAllItemValue),void 0)}getDisplayValueCore(e,t){if(!Array.isArray(t))return super.getDisplayValueCore(e,t);let s=e=>this.getPropertyNameArray(t).getValue(e);return this.getDisplayArrayValue(e,t,s)}clearIncorrectValuesCore(){this.clearIncorrectAndDisabledValues(!1)}clearDisabledValuesCore(){this.clearIncorrectAndDisabledValues(!0)}clearIncorrectAndDisabledValues(e){var t=this.value,s=!1,i=this.restoreValuesFromInvisible();if(!t&&0==i.length)return;if(!Array.isArray(t)||0==t.length){if(this.isChangingValueOnClearIncorrect=!0,e||(this.showCommentArea?this.value=null:this.clearValue(!0)),this.isChangingValueOnClearIncorrect=!1,0==i.length)return;t=[]}var n=[];let r=this.getPropertyNameArray(t);for(var a=0;a<t.length;a++){let i=r.getValue(a);var o=this.canClearValueAnUnknown(i);(e||o)&&(!e||this.isValueDisabled(i))?(s=!0,o&&this.addIntoInvisibleOldValues(t[a])):n.push(t[a])}for(var a=0;a<i.length;a++)n.push(i[a]),s=!0;s&&(this.isChangingValueOnClearIncorrect=!0,0==n.length?this.clearValue(!0):this.value=n,this.isChangingValueOnClearIncorrect=!1)}restoreValuesFromInvisible(){for(var e=[],t=this.visibleChoices,s=0;s<t.length;s++){let n=t[s];if(n!==this.selectAllItem){var i=t[s].value;w.isTwoValueEquals(i,this.invisibleOldValues[i])&&(this.isItemSelected(n)||e.push(i),delete this.invisibleOldValues[i])}}return e}getConditionJson(e=null,t=null){let s=super.getConditionJson(e,t);
10return("contains"==e||"notcontains"==e)&&(s.type="radiogroup"),s.maxSelectedChoices=0,s.minSelectedChoices=0,s}isAnswerCorrect(){return w.isArrayContainsEqual(this.value,this.correctAnswer)}setDefaultValueWithOthers(){this.value=this.renderedValueFromDataCore(this.defaultValue)}getIsItemValue(e,t){return!!e&&!!Array.isArray(e)&&e.indexOf(t.value)>=0}valueFromData(e){if(!e)return e;if(!Array.isArray(e))return[super.valueFromData(e)];let t=[];for(let s=0;s<e.length;s++){let i=this.getItemByValue(e[s],this.visibleChoices);i?t.push(this.getChoiceValue(i,e[s],!0)):t.push(e[s])}return t}rendredValueFromData(e){return e=this.convertValueFromObject(e),super.rendredValueFromData(e)}convertValueFromObject(e){return Array.isArray(e)?this.getPropertyNameArray(e).getValues():e}renderedValueFromDataCore(e){if(e&&Array.isArray(e)||(e=[]),!this.hasActiveChoices)return e;for(var t=0;t<e.length&&!this.isOtherValue(e[t]);t++)if(this.hasUnknownValueItem(e[t],!0,!1)){this.otherValue=e[t];var s=e.slice();return s[t]=this.otherItem.value,s}return e}renderedValueToDataCore(e){if(!e||!e.length)return e;let t=[],s=this.createValueCopy();for(var i=0;i<e.length;i++){let n=-1,r=e[i];this.isOtherValue(r)&&this.needConvertRenderedOtherToDataValue()?(n=this.getFirstUnknownIndex(s),r=this.otherValue,n>-1&&(s[n]=this.getValueFromReal(this.otherValue))):n=this.getItemValIndexByItemValue(r),n>-1?t.push(s[n]):t.push(this.getValueFromReal(r))}return t}valueToData(e){return w.isValueEmpty(e)?e:(Array.isArray(e)||(e=[e]),this.getPropertyNameArray(e).convert(e))}selectOtherValueFromComment(e){var t=[];let s=this.renderedValue;if(Array.isArray(s))for(var i=0;i<s.length;i++)this.isOtherValue(s[i])||t.push(s[i]);e&&t.push(this.otherItem.value),this.value=t}get checkBoxSvgPath(){return"M5,13l2-2l3,3l7-7l2,2l-9,9L5,13z"}get isNewA11yStructure(){return!0}get a11y_input_ariaRole(){return"group"}get a11y_input_ariaRequired(){return null}}V([e_()],i9.prototype,"valuePropertyName",void 0),V([e_()],i9.prototype,"showSelectAllItem",void 0),V([e_({onSetting:e=>e<0?0:e})],i9.prototype,"maxSelectedChoices",void 0),V([e_({onSetting:e=>e<0?0:e})],i9.prototype,"minSelectedChoices",void 0),H.addClass("checkboxitem",[{name:"isExclusive:boolean",locationInTable:"detail"}],e=>new i4(e),"choiceitem"),H.addClass("checkbox",[{name:"showSelectAllItem:boolean",alternativeName:"hasSelectAll"},{name:"separateSpecialChoices",visible:!0},{name:"maxSelectedChoices:number",default:0,onSettingValue:(e,t)=>{if(t<=0)return 0;let s=e.minSelectedChoices;return s>0&&t<s?s:t}},{name:"minSelectedChoices:number",default:0,onSettingValue:(e,t)=>{if(t<=0)return 0;let s=e.maxSelectedChoices;return s>0&&t>s?s:t}},{name:"selectAllText",serializationProperty:"locSelectAllText",dependsOn:"showSelectAllItem",visibleIf:function(e){return e.showSelectAllItem}},"valuePropertyName",{name:"itemComponent",visible:!1,default:"survey-checkbox-item"}],function(){return new i9("")},"checkboxbase"),H.getProperty("checkbox","choices").type="checkboxitem[]",sm.Instance.registerQuestion("checkbox",e=>{var t=new i9(e);return t.choices=sm.DefaultChoices,t});class i3 extends tm{updateItemState(){this.actions.forEach(e=>{let t=this.isItemSelected(e);e.visible=!this.hideSelectedItems||!t})}constructor(e){super(e),this.onItemClick=e=>{!this.isItemDisabled(e)&&(this.isExpanded=!1,this.isItemSelected(e)?(this.selectedItems.splice(this.selectedItems.indexOf(e),1)[0],this.onSelectionChanged&&this.onSelectionChanged(e,"removed")):(this.selectedItems.push(e),this.onSelectionChanged&&this.onSelectionChanged(e,"added")))},this.isItemDisabled=e=>void 0!==e.enabled&&!e.enabled,this.isItemSelected=e=>!!this.allowSelection&&this.selectedItems.filter(t=>this.areSameItems(t,e)).length>0,this.setSelectedItems(e.selectedItems||[])}updateState(){this.updateItemState(),this.raiseUpdate({needUpdateIsEmpty:!0})}setSelectedItems(e){this.selectedItems=e,this.updateState()}selectFocusedItem(){super.selectFocusedItem(),this.hideSelectedItems&&this.focusNextVisibleItem()}}V([e_()],i3.prototype,"hideSelectedItems",void 0);class i6 extends iE{get needRenderInput(){return!this.question.isInputReadOnly||!!this.filterStringPlaceholder}locStrsChanged(){super.locStrsChanged(),this.syncFilterStringPlaceholder()}updateListState(){this.listModel.updateState(),this.updateCustomItemValue(),this.syncFilterStringPlaceholder()}
10syncFilterStringPlaceholder(){this.getSelectedActions().length||this.question.selectedItems.length||this.listModel.focusedItem?this.filterStringPlaceholder=void 0:this.filterStringPlaceholder=this.question.placeholder}getSelectedActions(){return this.listModel.actions.filter(e=>e.selected)}getFocusFirstInputSelector(){return this.listModel.hideSelectedItems&&tp&&!this.isValueEmpty(this.question.value)?this.itemSelector:super.getFocusFirstInputSelector()}getPopupCssClasses(){return"sv-multi-select-list"}createListModel(){let e=this.getAvailableItems(),t=this.onSelectionChanged;t||(t=(e,t)=>{this.resetFilterString(),"selectall"===e.id?this.selectAllItems():"added"===t&&e.value===p.noneItemValue?this.selectNoneItem():"added"===t?this.selectItem(e.value):"removed"===t&&this.deselectItem(e.value),this.popupRecalculatePosition(!1),this.closeOnSelect&&(this.popupModel.isVisible=!1)});let s=new i3({items:e,onSelectionChanged:t,allowSelection:!1,locOwner:this.question,elementId:this.listElementId});return this.setOnTextSearchCallbackForListModel(s),s.forceShowFilter=this.question.choicesLazyLoadEnabled||this.question.allowCustomChoices,s}get shouldResetAfterCancel(){return tp&&!this.closeOnSelect}createPopup(){super.createPopup(),this.popupModel.onFooterActionsCreated.add((e,t)=>{t.actions.push({id:"sv-dropdown-done-button",title:this.doneButtonCaption,innerCss:"sv-popup__button--done",needSpace:!0,action:()=>{this.popupModel.isVisible=!1},enabled:new eb(()=>!this.isTwoValueEquals(this.question.renderedValue,this.previousValue))})}),this.popupModel.onVisibilityChanged.add((e,t)=>{this.shouldResetAfterCancel&&t.isVisible&&(this.previousValue=[].concat(this.question.renderedValue||[]))}),this.popupModel.onCancel=()=>{this.shouldResetAfterCancel&&(this.question.renderedValue=this.previousValue,this.updateListState())}}selectAllItems(){this.question.toggleSelectAll(),this.question.isAllSelected&&this.question.hideSelectedItems&&this.popupModel.hide(),this.updateListState()}selectNoneItem(){this.question.renderedValue=[p.noneItemValue],this.updateListState()}selectItem(e){let t;if(this.allowCustomChoices&&e===this.customItemValue.id){let e=this.createCustomItem();e&&(t=e.id)}else t=e;if(null!=t){let e=[].concat(this.question.renderedValue||[]);e.push(t),this.question.renderedValue=e,this.updateListState()}}deselectItem(e){let t=[].concat(this.question.renderedValue||[]);t.splice(t.indexOf(e),1),this.question.renderedValue=t,this.applyHintString(),this.updateListState()}clear(){super.clear(),this.syncFilterStringPlaceholder()}onClear(e){super.onClear(e),this.updateListState()}setHideSelectedItems(e){this.listModel.hideSelectedItems=e,this.updateListState()}removeLastSelectedItem(){this.deselectItem(this.question.renderedValue[this.question.renderedValue.length-1]),this.popupRecalculatePosition(!1)}constructor(e,t){super(e,t),this.setHideSelectedItems(e.hideSelectedItems),this.syncFilterStringPlaceholder(),this.closeOnSelect=e.closeOnSelect}inputKeyHandler(e){8!==e.keyCode||this.filterString||(this.removeLastSelectedItem(),e.preventDefault(),e.stopPropagation())}setInputStringFromSelectedItem(e){this.question.searchEnabled&&(this.inputString=null)}focusItemOnClickAndPopup(){}onEscape(){}beforeScrollToFocusedItem(e){}afterScrollToFocusedItem(){var e;(null==(e=this.listModel.focusedItem)?void 0:e.selected)?this.hintString="":this.applyHintString(),this.syncFilterStringPlaceholder()}handleEnterWhenPopupVisible(e){this.listModel.selectFocusedItem(),this.onFocus(e)}onPropertyChangedHandler(e,t){super.onPropertyChangedHandler(e,t),("value"===t.name||"renderedValue"===t.name||"placeholder"===t.name)&&this.syncFilterStringPlaceholder()}}V([e_({defaultValue:""})],i6.prototype,"filterStringPlaceholder",void 0),V([e_({defaultValue:!0})],i6.prototype,"closeOnSelect",void 0),V([e_()],i6.prototype,"previousValue",void 0),V([e_({localizable:{defaultStr:"tagboxDoneButtonCaption"}})],i6.prototype,"doneButtonCaption",void 0);class i8 extends iS(i9){constructor(){super(...arguments),this.itemDisplayNameMap={},this.onOpened=this.addEvent()}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),["value","renderAs","showOtherItem","otherText","placeholder","choices","visibleChoices"].indexOf(e)>-1&&this.resetReadOnlyText(),"placeholder"===e&&this.dropdownListModelValue&&this.dropdownListModel.setInputPlaceholder(s)}supportElementsInChoice(){return!1}locStrsChanged(){var e;super.locStrsChanged(),this.resetReadOnlyText(),null==(e=this.dropdownListModelValue)||e.locStrsChanged()}getDefaultItemComponent(){return""}get dropdownListModel(){return this.isDisposed||this.dropdownListModelValue||(this.dropdownListModelValue=new i6(this)),this.dropdownListModelValue}set dropdownListModel(e){this.dropdownListModelValue=e}getType(){return"tagbox"}supportMultipleComment(e){return this.isOtherValue(e.value)}get a11yInputAriaRole(){return"combobox"}
vendor: 4,081 bytes, line 10
10getControlClass(){return new eX().append(this.cssClasses.control).append(this.cssClasses.controlEmpty,this.isEmpty()).append(this.cssClasses.onError,this.hasCssError()).append(this.cssClasses.controlEditable,!this.isDisabledStyle&&!this.isReadOnlyStyle&&!this.isPreviewStyle).append(this.cssClasses.controlDisabled,this.isDisabledStyle).append(this.cssClasses.controlReadOnly,this.isReadOnlyStyle).append(this.cssClasses.controlPreview,this.isPreviewStyle).toString()}updateCssClasses(e,t){super.updateCssClasses(e,t),tn(e,t)}validateItemValues(e){this.updateItemDisplayNameMap();let t=this.renderedValue;if(e.length&&e.length===t.length)return e;let s=this.selectedItemValues;if(!e.length&&s&&s.length)return this.defaultSelectedItemValues=[].concat(s),s;let i=e.map(e=>e.value);return t.filter(e=>-1===i.indexOf(e)).forEach(t=>{let s=this.getItemIfChoicesNotContainThisValue(t,this.itemDisplayNameMap[t]);s&&e.push(s)}),e.sort((e,s)=>t.indexOf(e.value)-t.indexOf(s.value)),e}updateItemDisplayNameMap(){let e=e=>{this.itemDisplayNameMap[e.value]=e.text};(this.defaultSelectedItemValues||[]).forEach(e),(this.selectedItemValues||[]).forEach(e),this.visibleChoices.forEach(e)}updateCustomChoices(e,t){if(null!=e&&e.length>0&&this.allowCustomChoices&&!this.choicesLazyLoadEnabled){this.customChoices.splice(0,this.customChoices.length);let s=[];e.forEach(e=>{t.filter(t=>w.isTwoValueEquals(t.id,e,!1,!1))[0]||s.push(new tj(e))}),s.length>0&&this.customChoices.splice(0,this.customChoices.length,...s)}}getFirstInputElementId(){return this.inputId+(this.searchEnabled||this.allowCustomChoices?"_0":"")}getInputId(){return this.inputId+"_0"}allElementsSelected(){let e=super.allElementsSelected();return this.updateSelectAllItemText(e),e}updateSelectAllItemText(e){this.selectAllTextValue=this.selectAllTextValue||this.locSelectAllText,this.selectAllItem.setLocText(e?this.deselectAllText():this.selectAllTextValue)}deselectAllText(){return this.deselectAllTextValue||(this.deselectAllTextValue=this.createLocalizableString("deselectAllText",this.selectAllItem,!0,"deselectAllItemText")),this.deselectAllTextValue}}V([e_()],i8.prototype,"searchMode",void 0),V([e_({onSet:(e,t)=>{t.dropdownListModelValue&&t.dropdownListModel.setAllowCustomChoices(e)}})],i8.prototype,"allowCustomChoices",void 0),V([e_({localizable:{defaultStr:"createCustomItem"}})],i8.prototype,"createCustomChoiceText",void 0),V([e_()],i8.prototype,"allowClear",void 0),V([e_({onSet:(e,t)=>{t.dropdownListModelValue&&t.dropdownListModel.setSearchEnabled(e)}})],i8.prototype,"searchEnabled",void 0),V([e_({onSet:(e,t)=>{t.dropdownListModelValue&&t.dropdownListModel.setHideSelectedItems(e)}})],i8.prototype,"hideSelectedItems",void 0),V([e_({onSet:(e,t)=>{t.dropdownListModelValue&&t.dropdownListModel.setChoicesLazyLoadEnabled(e)}})],i8.prototype,"choicesLazyLoadEnabled",void 0),V([e_()],i8.prototype,"choicesLazyLoadPageSize",void 0),V([e_({getDefaultValue:()=>p.tagboxCloseOnSelect})],i8.prototype,"closeOnSelect",void 0),V([e_()],i8.prototype,"textWrapEnabled",void 0),V([e_({localizable:{defaultStr:!0}})],i8.prototype,"placeholder",void 0),H.addClass("tagbox",[{name:"placeholder",serializationProperty:"locPlaceholder"},{name:"allowClear:boolean",default:!0},{name:"searchEnabled:boolean",default:!0},{name:"allowCustomChoices:boolean",default:!1,visibleIf:e=>!e.choicesFromQuestion,dependsOn:"choicesFromQuestion"},{name:"createCustomChoiceText",serializationProperty:"locCreateCustomChoiceText",visibleIf:e=>e.allowCustomChoices},{name:"textWrapEnabled:boolean",default:!0},{name:"choicesLazyLoadEnabled:boolean",default:!1,visible:!1},{name:"choicesLazyLoadPageSize:number",default:25,visible:!1},{name:"hideSelectedItems:boolean",default:!1},{name:"closeOnSelect:boolean"},{name:"itemComponent",visible:!1,default:""},{name:"searchMode",default:"contains",choices:["contains","startsWith"]}],function(){return new i8("")},"checkbox"),sm.Instance.registerQuestion("tagbox",e=>{let t=new i8(e);return t.choices=sm.DefaultChoices,t});class ne extends sj{constructor(){super(...arguments),this.doDragOver=()=>
10{"imagepicker"===this.parentElement.getType()||(this.domAdapter.draggedElementShortcut.querySelector(".svc-item-value-controls__button").style.cursor="grabbing")},this.doBanDropHere=()=>{"imagepicker"===this.parentElement.getType()||(this.domAdapter.draggedElementShortcut.querySelector(".svc-item-value-controls__button").style.cursor="not-allowed")}}get draggedElementType(){return"item-value"}createDraggedElementShortcut(e,t,s){if("imagepicker"===this.parentElement.getType())return this.createImagePickerShortcut(this.draggedElement,e,t,s);let i=n.createElement("div");if(!i)return;i.className="sv-drag-drop-choices-shortcut";let r=t.closest("[data-sv-drop-target-item-value]").cloneNode(!0);r.classList.add("sv-drag-drop-choices-shortcut__content"),r.querySelector(".svc-item-value-controls__drag-icon").style.visibility="visible",r.querySelector(".svc-item-value-controls__remove").style.backgroundColor="transparent",r.classList.remove("svc-item-value--moveup"),r.classList.remove("svc-item-value--movedown"),this.draggedElement.isDragDropMoveDown=!1,this.draggedElement.isDragDropMoveUp=!1,i.appendChild(r);let a=t.getBoundingClientRect();return i.shortcutXOffset=s.clientX-a.x,i.shortcutYOffset=s.clientY-a.y,this.isBottom=null,"function"==typeof this.onShortcutCreated&&this.onShortcutCreated(i),i}createImagePickerShortcut(e,t,s,i){let r=n.createElement("div");if(!r)return;r.classList.add("sv-drag-drop-image-picker-shortcut");let a=s.closest("[data-sv-drop-target-item-value]");this.imagepickerControlsNode=a.querySelector(".svc-image-item-value-controls");let o=a.querySelector(".sd-imagepicker__image-container"),l=a.querySelector(e.imageLink?"img":".sd-imagepicker__no-image").cloneNode(!0);return this.imagepickerControlsNode&&(this.imagepickerControlsNode.style.display="none"),o.style.width=l.width+"px",o.style.height=l.height+"px",l.style.objectFit="cover",l.style.borderRadius="4px",r.appendChild(l),r}getDropTargetByDataAttributeValue(e){return this.parentElement.choices.filter(t=>""+t.value==e)[0]}getChoices(){let e=this.parentElement;if("ranking"===e.getType())if(e.selectToRankEnabled)return e.unRankingChoices;else return e.rankingChoices;return e.visibleChoices}isDropTargetValid(e,t){let s=this.getChoices();if("imagepicker"!==this.parentElement.getType()){let e=s.indexOf(this.dropTarget),t=s.indexOf(this.draggedElement);if(t>e&&this.dropTarget.isDragDropMoveUp)return this.dropTarget.isDragDropMoveUp=!1,!1;if(t<e&&this.dropTarget.isDragDropMoveDown)return this.dropTarget.isDragDropMoveDown=!1,!1}return -1!==s.indexOf(e)}isDropTargetDoesntChanged(e){return this.dropTarget===this.prevDropTarget&&e===this.isBottom}calculateIsBottom(e,t){let s=t.getBoundingClientRect();return e>=s.y+s.height/2}afterDragOver(e){let t=this.getChoices(),s=t.indexOf(this.dropTarget),i=t.indexOf(this.draggedElement);if(i<s&&!0===this.isBottom)t.splice(i,1),t.splice(s,0,this.draggedElement);else{if(!(i>s)||!1!==this.isBottom)return;t.splice(s,1),t.splice(i,0,this.dropTarget)}"imagepicker"!==this.parentElement.getType()&&(i!==s&&(e.classList.remove("svc-item-value--moveup"),e.classList.remove("svc-item-value--movedown"),this.dropTarget.isDragDropMoveDown=!1,this.dropTarget.isDragDropMoveUp=!1),i>s&&(this.dropTarget.isDragDropMoveDown=!0),i<s&&(this.dropTarget.isDragDropMoveUp=!0),super.ghostPositionChanged())}doDrop(){let e=this.parentElement.choices,t=this.getChoices().filter(t=>-1!==e.indexOf(t)),s=e.indexOf(this.draggedElement),i=t.indexOf(this.draggedElement);return e.splice(s,1),e.splice(i,0,this.draggedElement),this.parentElement}clear(){this.parentElement&&this.updateVisibleChoices(this.parentElement),this.imagepickerControlsNode&&(this.imagepickerControlsNode.style.display="flex",this.imagepickerControlsNode=null),super.clear()}updateVisibleChoices(e){"ranking"===e.getType()?e.updateRankingChoices():e.updateVisibleChoices()}}class nt extends ne{constructor(){super(...arguments),this.isDragOverRootNode=!1,this.doDragOver=()=>{this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item").style.cursor="grabbing"},this.reorderRankedItem=(e,t,s)=>{if(t==s)return;let i=e.rankingChoices,n=i[t];e.isValueSetByUser=!0,i.splice(t,1),i.splice(s,0,n),this.updateDraggedElementShortcut(s+1)},this.doBanDropHere=()=>{if(this.isDragOverRootNode){this.allowDropHere=!0;return}this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item").style.cursor="not-allowed",tp&&this.parentElement.updateRankingChoices(!0)}}get draggedElementType(){return"ranking-item"}createDraggedElementShortcut(e,t,s){let i=n.createElement("div");if(!i)return;i.className=this.shortcutClass+" sv-ranking-shortcut";let r=t.cloneNode(!0);i.appendChild(r);let a=t.getBoundingClientRect();"rtl"===n.getComputedStyle(this.survey.rootElement).direction?i.style.right=a.right:i.style.left=a.x,i.style.top=a.y,this.domAdapter.rootElement.append(i);let o=i.offsetHeight,l=s.clientY;return l>a.y+o&&(l=a.y+o-10),i.shortcutXOffset=s.clientX-a.x,i.shortcutYOffset=l-a.y,this.parentElement&&this.parentElement.useFullItemSizeForShortcut&&(i.style.width=t.offsetWidth+"px",i.style.height=t.offsetHeight+"px"),i}get shortcutClass(){return new eX().append(this.parentElement.cssClasse
10s.root).append(this.parentElement.cssClasses.rootMobileMod,td).toString()}getDropTargetByDataAttributeValue(e){return this.parentElement.rankingChoices[e]}findDropTargetNodeByDragOverNode(e){return this.isDragOverRootNode=this.getIsDragOverRootNode(e),super.findDropTargetNodeByDragOverNode(e)}getIsDragOverRootNode(e){return"string"==typeof e.className&&-1!==e.className.indexOf("sv-ranking")}isDropTargetValid(e,t){return -1!==this.parentElement.rankingChoices.indexOf(e)}calculateIsBottom(e,t){return this.dropTarget instanceof tj&&this.draggedElement!==this.dropTarget&&super.calculateIsBottom(e,t)}getIndices(e,t,s){let i=t.indexOf(this.draggedElement),n=s.indexOf(this.dropTarget);return i<0&&this.draggedElement&&(this.draggedElement=tj.getItemByValue(t,this.draggedElement.value)||this.draggedElement,i=t.indexOf(this.draggedElement)),-1===n?n=e.value.length:t==s?(!this.isBottom&&i<n&&n--,this.isBottom&&i>n&&n++):t!=s&&this.isBottom&&n++,{fromIndex:i,toIndex:n}}afterDragOver(e){let{fromIndex:t,toIndex:s}=this.getIndices(this.parentElement,this.parentElement.rankingChoices,this.parentElement.rankingChoices);this.reorderRankedItem(this.parentElement,t,s)}updateDraggedElementShortcut(e){var t;(null==(t=this.domAdapter)?void 0:t.draggedElementShortcut)&&(this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item__index").innerText=null!==e?e+"":"")}ghostPositionChanged(){this.parentElement.currentDropTarget=this.draggedElement,super.ghostPositionChanged()}doDrop(){return this.parentElement.setValue(),this.parentElement}clear(){this.parentElement&&(this.parentElement.dropTargetNodeMove=null,this.parentElement.updateRankingChoices(!0)),super.clear()}}class ns extends nt{constructor(){super(...arguments),this.selectToRank=(e,t,s)=>{let i=[].concat(e.rankingChoices),n=e.unRankingChoices[t];i.splice(s,0,n),this.updateChoices(e,i)},this.unselectFromRank=(e,t,s)=>{let i=[].concat(e.rankingChoices);i.splice(t,1),this.updateChoices(e,i)}}findDropTargetNodeByDragOverNode(e){if("from-container"===e.dataset.ranking||"to-container"===e.dataset.ranking)return e;let t=e.closest("[data-ranking='to-container']"),s=e.closest("[data-ranking='from-container']");return 0===this.parentElement.unRankingChoices.length&&s?s:0===this.parentElement.rankingChoices.length&&t?t:super.findDropTargetNodeByDragOverNode(e)}getDropTargetByDataAttributeValue(e){return this.parentElement.rankingChoices[e]||this.parentElement.unRankingChoices[e]}getDropTargetByNode(e,t){return"to-container"===e.dataset.ranking?"to-container":"from-container"===e.dataset.ranking||e.closest("[data-ranking='from-container']")?"from-container":super.getDropTargetByNode(e,t)}isDropTargetValid(e,t){return"to-container"===e||"from-container"===e||super.isDropTargetValid(e,t)}afterDragOver(e){let t=this.parentElement,s=t.rankingChoices,i=t.unRankingChoices;this.isDraggedElementUnranked&&this.isDropTargetRanked?this.doRankBetween(e,i,s,this.selectToRank):this.isDraggedElementRanked&&this.isDropTargetRanked?this.doRankBetween(e,s,s,this.reorderRankedItem):this.isDraggedElementRanked&&!this.isDropTargetRanked&&this.doRankBetween(e,s,i,this.unselectFromRank)}doRankBetween(e,t,s,i){let n=this.parentElement,{fromIndex:r,toIndex:a}=this.getIndices(n,t,s);i(n,r,a,e)}get isDraggedElementRanked(){return -1!==this.parentElement.rankingChoices.indexOf(this.draggedElement)}get isDropTargetRanked(){return"to-container"===this.dropTarget||-1!==this.parentElement.rankingChoices.indexOf(this.dropTarget)}get isDraggedElementUnranked(){return!this.isDraggedElementRanked}updateChoices(e,t){e.isValueSetByUser=!0,e.rankingChoices=t,e.updateUnRankingChoices(t)}}class ni extends i9{constructor(e){super(e),this.domNode=null,this.onVisibleChoicesChanged=()=>{if(super.onVisibleChoicesChanged(),!this.carryForwardStartUnranked||this.isValueSetByUser||this.selectToRankEnabled||this.defaultValue||(this.value=[]),1===this.visibleChoices.length&&!this.selectToRankEnabled){this.value=[],this.value.push(this.visibleChoices[0].value),this.updateRankingChoices();return}this.isEmpty()||this.selectToRankEnabled||(this.visibleChoices.length>this.value.length&&this.addToValueByVisibleChoices(),this.visibleChoices.length<this.value.length&&this.removeFromValueByVisibleChoices()),this.updateRankingChoices()},this.localeChanged=()=>{super.localeChanged(),this.updateRankingChoicesSync()},this._rankingChoicesAnimation=new tE(this.getChoicesAnimationOptions(!0),e=>{this._renderedRankingChoices=e},()=>this.renderedRankingChoices),this._unRankingChoicesAnimation=new tE(this.getChoicesAnimationOptions(!1),e=>{this._renderedUnRankingChoices=e},()=>this.renderedUnRankingChoices),this.rankingChoices=[],this.unRankingChoices=[],this._renderedRankingChoices=[],this._renderedUnRankingChoices=[],this.handlePointerDown=(e,t,s)=>{let i=e.target;this.isDragStartNodeValid(i)&&this.isAllowStartDrag(i,t)&&(this.draggedChoiceValue=t.value,this.draggedTargetNode=s,this.dragOrClickHelper.onPointerDown(e))},this.startDrag=e=>{let t=tj.getItemByValue(this.visibleChoices,this.draggedChoiceValue);this.dragDropRankingChoices.startDrag(e,t,this,this.draggedTargetNode)},this.handlePointerUp=(e,t,s)=>{if(!this.selectToRankEnabled)return;let i=e.target;this.isAllowStartDrag(i,t)&&this.handleKeydownSelectToRank(e,t," ",!1)},this.handleKeydown=(e,t)=>{if(!this.isReadOnlyAttr&&!this.isDesignMode){let s=e.key,i=this.rankingChoices.indexOf(t);if(this.selectToRankEnabled)return void this.handleKeydownSelectToRank(e,t);if("ArrowUp"===s&&i||"ArrowDown"===s&&i!==this.rankingChoices.length-1){let t="ArrowUp"==s?i-1:i+1;this.dragDropRankingChoices.reorderRankedItem(this,i,t),this.setValueAfterKeydown(t,"",!0,e)}}},this.focusItem=(e,t)=>
10{this.domNode&&(this.selectToRankEnabled&&t?this.domNode.querySelectorAll("[data-ranking='"+t+"'] ."+this.cssClasses.item)[e].focus():this.domNode.querySelectorAll("."+this.cssClasses.item)[e].focus())},this.isValueSetByUser=!1,this.setValue=()=>{let e=[];this.rankingChoices.forEach(t=>{e.push(t.value)}),this.value=e,this.isValueSetByUser=!0},this.dragOrClickHelper=new sZ(this.startDrag)}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"selectToRankEnabled"===e&&(this.clearValue(!0),this.setDragDropRankingChoices(),this.updateRankingChoicesSync())}getType(){return"ranking"}supportElementsInChoice(){return!1}getItemTabIndex(e){if(!this.isDesignMode&&!e.disabled)return 0}supportContainerQueries(){return this.selectToRankEnabled}get rootClass(){return new eX().append(this.cssClasses.root).append(this.cssClasses.rootMobileMod,this.isMobileMode()).append(this.cssClasses.rootDisabled,this.isDisabledStyle).append(this.cssClasses.rootReadOnly,this.isReadOnlyStyle).append(this.cssClasses.rootPreview,this.isPreviewStyle).append(this.cssClasses.rootDesignMode,!!this.isDesignMode).append(this.cssClasses.itemOnError,this.hasCssError()).append(this.cssClasses.rootDragHandleAreaIcon,"icon"===p.rankingDragHandleArea).append(this.cssClasses.rootSelectToRankMod,this.selectToRankEnabled).append(this.cssClasses.rootSelectToRankEmptyValueMod,this.isEmpty()).append(this.cssClasses.rootSelectToRankAlignHorizontal,this.selectToRankEnabled&&"horizontal"===this.renderedSelectToRankAreasLayout).append(this.cssClasses.rootSelectToRankAlignVertical,this.selectToRankEnabled&&"vertical"===this.renderedSelectToRankAreasLayout).append(this.cssClasses.rootSelectToRankSwapAreas,this.selectToRankEnabled&&"horizontal"===this.renderedSelectToRankAreasLayout&&this.selectToRankSwapAreas).toString()}isItemSelectedCore(e){return!this.selectToRankEnabled||super.isItemSelectedCore(e)}getItemClassCore(e,t){return new eX().append(super.getItemClassCore(e,t)).append(this.cssClasses.itemGhostMod,this.currentDropTarget===e).toString()}getContainerClasses(e){let t=!1,s="to"===e,i="from"===e;return s?t=0===this.renderedRankingChoices.length:i&&(t=0===this.renderedUnRankingChoices.length),new eX().append(this.cssClasses.container).append(this.cssClasses.containerToMode,s).append(this.cssClasses.containerFromMode,i).append(this.cssClasses.containerEmptyMode,t).toString()}isItemCurrentDropTarget(e){return this.dragDropRankingChoices.dropTarget===e}get ghostPositionCssClass(){return"top"===this.ghostPosition?this.cssClasses.dragDropGhostPositionTop:"bottom"===this.ghostPosition?this.cssClasses.dragDropGhostPositionBottom:""}getItemIndexClasses(e){let t;return t=this.selectToRankEnabled?-1!==this.unRankingChoices.indexOf(e):this.isEmpty(),new eX().append(this.cssClasses.itemIndex).append(this.cssClasses.itemIndexEmptyMode,t).toString()}getNumberByIndex(e){return this.isEmpty()?"":e+1+""}updateRankingChoicesSync(){this.blockAnimations(),this.updateRankingChoices(),this.releaseAnimations()}setSurveyImpl(e,t){super.setSurveyImpl(e,t),this.setDragDropRankingChoices(),this.updateRankingChoicesSync()}isAnswerCorrect(){return w.isArraysEqual(this.value,this.correctAnswer,!1)}get requireStrictCompare(){return!0}onSurveyValueChanged(e){super.onSurveyValueChanged(e),this.isLoadingFromJson||this.updateRankingChoices()}onSurveyLoad(){this.blockAnimations(),super.onSurveyLoad(),this.updateRankingChoices(),this.releaseAnimations()}updateValueFromSurvey(e,t){super.updateValueFromSurvey(e,t),e&&(this.isValueSetByUser=!0)}addToValueByVisibleChoices(){let e=this.value.slice();this.visibleChoices.forEach(t=>{-1===e.indexOf(t.value)&&e.push(t.value)}),this.value=e}removeFromValueByVisibleChoices(){let e=this.value.slice(),t=this.visibleChoices;for(let s=this.value.length-1;s>=0;s--)tj.getItemByValue(t,this.value[s])||e.splice(s,1);this.value=e}getChoicesAnimationOptions(e){return{getKey:e=>e.value,getRerenderEvent:()=>this.onElementRerendered,isAnimationEnabled:()=>this.animationAllowed&&!this.isDesignMode&&this.isVisible&&!!this.domNode,getReorderOptions:(e,t)=>{let s="";
10return e!==this.currentDropTarget&&(s=t?"sv-dragdrop-movedown":"sv-dragdrop-moveup"),{cssClass:s}},getLeaveOptions:t=>{let s=e?this.renderedRankingChoices:this.renderedUnRankingChoices;return"vertical"==this.renderedSelectToRankAreasLayout&&1==s.length&&s.indexOf(t)>=0?{cssClass:"sv-ranking-item--animate-item-removing-empty"}:{cssClass:"sv-ranking-item--animate-item-removing",onBeforeRunAnimation:e=>{e.style.setProperty("--animation-height",e.offsetHeight+"px")}}},getEnterOptions:t=>{let s=e?this.renderedRankingChoices:this.renderedUnRankingChoices;return"vertical"==this.renderedSelectToRankAreasLayout&&1==s.length&&s.indexOf(t)>=0?{cssClass:"sv-ranking-item--animate-item-adding-empty"}:{cssClass:"sv-ranking-item--animate-item-adding",onBeforeRunAnimation:e=>{e.style.setProperty("--animation-height",e.offsetHeight+"px")}}},getAnimatedElement:t=>{var s;let i=this.cssClasses,n="";this.selectToRankEnabled&&(!e&&i.containerFromMode?n=e8(i.containerFromMode):e&&i.containerToMode&&(n=e8(i.containerToMode)));let r=e?this.renderedRankingChoices.indexOf(t):this.renderedUnRankingChoices.indexOf(t);return null==(s=this.domNode)?void 0:s.querySelector(`${n} [data-sv-drop-target-ranking-item='${r}']`)},allowSyncRemovalAddition:!0}}get rankingChoicesAnimation(){return this._rankingChoicesAnimation}get unRankingChoicesAnimation(){return this._unRankingChoicesAnimation}get renderedRankingChoices(){return this._renderedRankingChoices}set renderedRankingChoices(e){this.rankingChoicesAnimation.sync(e)}get renderedUnRankingChoices(){return this._renderedUnRankingChoices}set renderedUnRankingChoices(e){this.unRankingChoicesAnimation.sync(e)}updateRenderedRankingChoices(){this.renderedRankingChoices=this.rankingChoices}updateRenderedUnRankingChoices(){this.renderedUnRankingChoices=this.unRankingChoices}updateRankingChoices(e=!1){if(this.selectToRankEnabled)return void this.updateRankingChoicesSelectToRankMode(e);let t=[];if(e&&(this.rankingChoices=[]),this.isEmpty()){this.rankingChoices=this.visibleChoices;return}this.value.forEach(e=>{this.visibleChoices.forEach(s=>{s.value===e&&t.push(s)})}),this.rankingChoices=t}updateUnRankingChoices(e){let t=[];this.visibleChoices.forEach(e=>{t.push(e)}),e.forEach(e=>{t.forEach((s,i)=>{s.value===e.value&&t.splice(i,1)})}),this.unRankingChoices=t}updateRankingChoicesSelectToRankMode(e){let t=[];this.isEmpty()||this.value.forEach(e=>{this.visibleChoices.forEach(s=>{s.value===e&&t.push(s)})}),this.updateUnRankingChoices(t),this.rankingChoices=t}endLoadingFromJson(){super.endLoadingFromJson(),this.setDragDropRankingChoices()}setDragDropRankingChoices(){this.dragDropRankingChoices=this.createDragDropRankingChoices()}createDragDropRankingChoices(){return this.selectToRankEnabled?new ns(this.survey,null,this.longTap):new nt(this.survey,null,this.longTap)}isDragStartNodeValid(e){return"icon"!==p.rankingDragHandleArea||e.classList.contains(this.cssClasses.itemIconHoverMod)}isAllowStartDrag(e,t){return!this.isReadOnly&&!this.isDesignMode&&this.canStartDragDueMaxSelectedChoices(e)&&this.canStartDragDueItemEnabled(t)}canStartDragDueMaxSelectedChoices(e){return!this.selectToRankEnabled||!e.closest("[data-ranking='from-container']")||this.checkMaxSelectedChoicesUnreached()}canStartDragDueItemEnabled(e){return e.enabled}checkMaxSelectedChoicesUnreached(){if(this.maxSelectedChoices<1)return!0;var e=this.value;return(Array.isArray(e)?e.length:0)<this.maxSelectedChoices}afterRenderQuestionElement(e){this.domNode=e,super.afterRenderQuestionElement(e)}beforeDestroyQuestionElement(e){this.domNode=void 0,super.beforeDestroyQuestionElement(e)}supportSelectAll(){return!1}supportOther(){return!1}supportNone(){return!1}supportRefuse(){return!1}supportDontKnow(){return!1}handleKeydownSelectToRank(e,t,s,i=!0){let n;if(this.isDesignMode)return;let r=e.key;if(s&&(r=s)," "!==r&&"ArrowUp"!==r&&"ArrowDown"!==r)return;let a=this.dragDropRankingChoices,o=this.rankingChoices,l=-1!==o.indexOf(t),u=(l?o:this.unRankingChoices).indexOf(t);if(u<0)return;if(" "===r&&!l){if(!this.checkMaxSelectedChoicesUnreached()||!this.canStartDragDueItemEnabled(t))return;n=this.value.length,a.selectToRank(this,u,n),this.setValueAfterKeydown(n,"to-container",i,e);return}if(!l)return;if(" "===r){a.unselectFromRank(this,u),n=this.unRankingChoices.indexOf(t),this.setValueAfterKeydown(n,"from-container",i,e);return}let h="ArrowUp"===r?-1:+("ArrowDown"===r);0===h||(n=u+h)<0||n>=o.length||(a.reorderRankedItem(this,u,n),this.setValueAfterKeydown(n,"to-container",i,e))}setValueAfterKeydown(e,t,s=!0,i){this.setValue(),s&&setTimeout(()=>{this.focusItem(e,t)},1),i&&i.preventDefault()}
vendor: 5,475 bytes, line 10
10getIconHoverCss(){return new eX().append(this.cssClasses.itemIcon).append(this.cssClasses.itemIconHoverMod).toString()}getIconFocusCss(){return new eX().append(this.cssClasses.itemIcon).append(this.cssClasses.itemIconFocusMod).toString()}getDefaultItemComponent(){return"sv-ranking-item"}get renderedSelectToRankAreasLayout(){return this.isMobileMode()?"vertical":this.selectToRankAreasLayout}isMobileMode(){return td}get useFullItemSizeForShortcut(){return this.getPropertyValue("useFullItemSizeForShortcut")}set useFullItemSizeForShortcut(e){this.setPropertyValue("useFullItemSizeForShortcut",e)}get dragDropSvgIcon(){return this.cssClasses.dragDropSvgIconId||"#icon-drag-24x24"}get arrowsSvgIcon(){return this.cssClasses.arrowsSvgIconId||"#icon-reorder-24x24"}get dashSvgIcon(){return this.cssClasses.dashSvgIconId||"#icon-rankingundefined-16x16"}get isNewA11yStructure(){return!1}get ariaRole(){return"group"}}V([eH({onSet:(e,t)=>t.updateRenderedRankingChoices(),onRemove:(e,t,s)=>s.updateRenderedRankingChoices(),onPush:(e,t,s)=>s.updateRenderedRankingChoices()})],ni.prototype,"rankingChoices",void 0),V([eH({onSet:(e,t)=>t.updateRenderedUnRankingChoices(),onRemove:(e,t,s)=>s.updateRenderedUnRankingChoices(),onPush:(e,t,s)=>s.updateRenderedUnRankingChoices()})],ni.prototype,"unRankingChoices",void 0),V([eH()],ni.prototype,"_renderedRankingChoices",void 0),V([eH()],ni.prototype,"_renderedUnRankingChoices",void 0),V([e_({defaultValue:null})],ni.prototype,"currentDropTarget",void 0),V([e_()],ni.prototype,"longTap",void 0),V([e_({defaultValue:!1})],ni.prototype,"selectToRankEnabled",void 0),V([e_({defaultValue:!1})],ni.prototype,"selectToRankSwapAreas",void 0),V([e_({defaultValue:!0})],ni.prototype,"carryForwardStartUnranked",void 0),V([e_()],ni.prototype,"selectToRankAreasLayout",void 0),V([e_({localizable:{defaultStr:!0,markdown:!0}})],ni.prototype,"selectToRankEmptyRankedAreaText",void 0),V([e_({localizable:{defaultStr:!0,markdown:!0}})],ni.prototype,"selectToRankEmptyUnrankedAreaText",void 0),H.addClass("ranking",[{name:"showOtherItem",visible:!1,isSerializable:!1},{name:"otherText",visible:!1,isSerializable:!1},{name:"otherErrorText",visible:!1,isSerializable:!1},{name:"storeOthersAsComment",visible:!1,isSerializable:!1},{name:"showNoneItem",visible:!1,isSerializable:!1},{name:"showRefuseItem",visible:!1,isSerializable:!1},{name:"showDontKnowItem",visible:!1,isSerializable:!1},{name:"noneText",visible:!1,isSerializable:!1},{name:"showSelectAllItem",visible:!1,isSerializable:!1},{name:"selectAllText",visible:!1,isSerializable:!1},{name:"colCount:number",visible:!1,isSerializable:!1},{name:"separateSpecialChoices",visible:!1,isSerializable:!1},{name:"longTap",default:!0,visible:!1,isSerializable:!1},{name:"selectToRankEnabled:switch",default:!1,visible:!0,isSerializable:!0},{name:"selectToRankSwapAreas:switch",default:!1,visible:!1,isSerializable:!0,dependsOn:"selectToRankEnabled"},{name:"selectToRankAreasLayout",default:"horizontal",choices:["horizontal","vertical"],dependsOn:"selectToRankEnabled",visibleIf:e=>!!e.selectToRankEnabled,visible:!0,isSerializable:!0},{name:"selectToRankEmptyRankedAreaText:text",serializationProperty:"locSelectToRankEmptyRankedAreaText",dependsOn:"selectToRankEnabled",visibleIf:e=>!!e.selectToRankEnabled},{name:"selectToRankEmptyUnrankedAreaText:text",serializationProperty:"locSelectToRankEmptyUnrankedAreaText",dependsOn:"selectToRankEnabled",visibleIf:e=>!!e.selectToRankEnabled},{name:"maxSelectedChoices:number",visible:!0,default:0,dependsOn:"selectToRankEnabled",visibleIf:e=>!!e.selectToRankEnabled,isSerializable:!0},{name:"minSelectedChoices:number",visible:!0,default:0,dependsOn:"selectToRankEnabled",visibleIf:e=>!!e.selectToRankEnabled,isSerializable:!0},{name:"itemComponent",visible:!1,default:"sv-ranking-item"}],function(){return new ni("")},"checkbox"),sm.Instance.registerQuestion("ranking",e=>{let t=new ni(e);return t.choices=sm.DefaultChoices,t});class nn extends ik{constructor(e){super(e)}get textAreaModel(){return this.textAreaModelValue||(this.textAreaModelValue=new tq(this.getTextAreaOptions())),this.textAreaModelValue}getTextAreaOptions(){let e=this;return{question:this,id:()=>this.inputId,propertyNames:["value"],className:()=>this.className,placeholder:()=>this.renderedPlaceholder,isDisabledAttr:()=>this.isDisabledAttr,isReadOnlyAttr:()=>this.isReadOnlyAttr||this.forceIsInputReadOnly||!1,autoGrow:()=>this.renderedAutoGrow,maxLength:()=>this.getMaxLength(),rows:()=>this.rows,cols:()=>this.cols,ariaRequired:()=>this.a11y_input_ariaRequired,ariaLabel:()=>this.a11y_input_ariaLabel,ariaLabelledBy:()=>this.a11y_input_ariaLabelledBy,ariaDescribedBy:()=>this.a11y_input_ariaDescribedBy,ariaInvalid:()=>this.a11y_input_ariaInvalid,ariaErrormessage:()=>this.a11y_input_ariaErrormessage,getTextValue:()=>this.value,onTextAreaChange:t=>{var s;s=t.target.value,w.isTwoValueEquals(e.value,s,!1,!0,!1)||(e.value=s)},onTextAreaInput:e=>{this.onInput(e)},onTextAreaKeyDown:e=>{this.onKeyDown(e)},onTextAreaFocus:e=>{this.onFocus(e)},onTextAreaBlur:e=>{this.onBlur(e)}}}get renderedAutoGrow(){let e=this.autoGrow;return void 0===e&&this.survey?this.survey.autoGrowComment:!!e}get renderedAllowResize(){let e=this.allowResize;return void 0===e&&this.survey?this.survey.allowResizeComment:!!e}get resizeStyle(){return this.renderedAllowResize?"both":"none"}getType(){return"comment"}afterRenderQuestionElement(e){this.element=(null==e?void 0:e.querySelector(`#${this.inputId}
10`))||e,super.afterRenderQuestionElement(e)}beforeDestroyQuestionElement(e){super.beforeDestroyQuestionElement(e),this.element=void 0}onInput(e){this.isInputTextUpdate&&(this.value=e.target.value),this.updateRemainingCharacterCounter(e.target.value)}onBlurCore(e){super.onBlurCore(e)}onKeyDown(e){this.onKeyDownPreprocess&&this.onKeyDownPreprocess(e),this.acceptCarriageReturn||"Enter"!==e.key&&13!==e.keyCode||(e.preventDefault(),e.stopPropagation())}setNewValue(e){!this.acceptCarriageReturn&&e&&(e=e.replace(RegExp("(\r\n|\n|\r)","gm"),"")),super.setNewValue(e)}getValueSeparator(){return"\n"}notifyStateChanged(e){super.notifyStateChanged(e),this.isCollapsed||this.textAreaModel.updateElement()}get className(){return(this.cssClasses?this.getControlClass():"panel-comment-root")||void 0}}function nr(){if(void 0===nr.isIEOrEdge){let e=navigator.userAgent,t=e.indexOf("MSIE "),s=e.indexOf("Trident/");nr.isIEOrEdge=e.indexOf("Edge/")>0||s>0||t>0}return nr.isIEOrEdge}V([e_()],nn.prototype,"rows",void 0),V([e_()],nn.prototype,"cols",void 0),V([e_()],nn.prototype,"acceptCarriageReturn",void 0),V([e_()],nn.prototype,"autoGrow",void 0),V([e_()],nn.prototype,"allowResize",void 0),H.addClass("comment",[{name:"maxLength:number",default:-1},{name:"cols:number",default:50,visible:!1,isSerializable:!1},{name:"rows:number",default:4},{name:"placeholder",alternativeName:"placeHolder",serializationProperty:"locPlaceholder"},{name:"textUpdateMode",default:"default",choices:["default","onBlur","onTyping"]},{name:"autoGrow:boolean",defaultFunc:()=>void 0},{name:"allowResize:boolean",defaultFunc:()=>void 0},{name:"acceptCarriageReturn:boolean",default:!0,visible:!1}],function(){return new nn("")},"textbase"),sm.Instance.registerQuestion("comment",e=>new nn(e));let na="environment",no="user";class nl{constructor(){this.canFlipValue=void 0}static clear(){nl.cameraList=void 0,nl.cameraIndex=-1}static setCameraList(e){let t=function(e){let t=e.label.toLocaleLowerCase();return t.indexOf(no)>-1?no:t.indexOf(na)>-1?na:t.indexOf("front")>-1?no:t.indexOf("back")>-1?na:""};nl.clear(),Array.isArray(e)&&e.length>0&&(nl.cameraIndex=-1,e.sort((s,i)=>{if(s===i)return 0;if(s.label!==i.label){let e=t(s),n=t(i);if(e!==n){if(e===no)return -1;if(n===no)return 1;if(e===na)return -1;if(n===na)return 1}}return e.indexOf(s)<e.indexOf(i)?-1:1})),nl.cameraList=e}hasCamera(e){if(void 0!==nl.cameraList)return void this.hasCameraCallback(e);if(nl.mediaDevicesCallback){let t=t=>{this.setVideoInputs(t),this.hasCameraCallback(e)};nl.mediaDevicesCallback(t);return}"u">typeof navigator&&navigator.mediaDevices?navigator.mediaDevices.enumerateDevices().then(t=>{this.setVideoInputs(t),this.hasCameraCallback(e),this.updateCanFlipValue()}).catch(t=>{nl.cameraList=null,this.hasCameraCallback(e)}):(nl.cameraList=null,this.hasCameraCallback(e))}getMediaConstraints(e){let t=nl.cameraList;if(!Array.isArray(t)||t.length<1)return;nl.cameraIndex<0&&(nl.cameraIndex=0);let s=t[nl.cameraIndex],i={};return s&&s.deviceId?i.deviceId={exact:s.deviceId}:i.facingMode=nl.cameraFacingMode,e&&((null==e?void 0:e.height)&&(i.height={ideal:e.height}),(null==e?void 0:e.width)&&(i.width={ideal:e.width})),{video:i,audio:!1}}startVideo(e,t,s,i){if(!e)return void t(void 0);e.style.width="100%",e.style.height="auto",e.style.height="100%",e.style.objectFit="contain";let n=this.getMediaConstraints({width:s,height:i});navigator.mediaDevices.getUserMedia(n).then(s=>{var i;e.srcObject=s,(null==(i=nl.cameraList[nl.cameraIndex])?void 0:i.deviceId)||!s.getTracks()[0].getCapabilities().facingMode||(nl.canSwitchFacingMode=!0,this.updateCanFlipValue()),e.play(),t(s)}).catch(e=>{t(void 0)})}getImageSize(e){return{width:e.videoWidth,height:e.videoHeight}}snap(e,t){if(!e||!n.isAvailable())return!1;let s=n.getDocument().createElement("canvas"),i=this.getImageSize(e);s.height=i.height,s.width=i.width;let r=s.getContext("2d");return r.clearRect(0,0,s.width,s.height),r.drawImage(e,0,0,s.width,s.height),s.toBlob(t,"image/png"),!0}updateCanFlipValue(){let e=nl.cameraList;this.canFlipValue=Array.isArray(e)&&e.length>1||nl.canSwitchFacingMode,this.onCanFlipChangedCallback&&this.onCanFlipChangedCallback(this.canFlipValue)}canFlip(e){return void 0===this.canFlipValue&&this.updateCanFlipValue(),e&&(this.onCanFlipChangedCallback=e),this.canFlipValue}flip(){this.canFlip()&&(nl.canSwitchFacingMode?nl.cameraFacingMode=nl.cameraFacingMode===no?"environment":no:nl.cameraIndex>=nl.cameraList.length-1?nl.cameraIndex=0:nl.cameraIndex++)}hasCameraCallback(e){e(Array.isArray(nl.cameraList))}setVideoInputs(e){let t=[];
10e.forEach(e=>{"videoinput"===e.kind&&t.push(e)}),nl.setCameraList(t.length>0?t:null)}}nl.cameraIndex=-1,nl.cameraFacingMode=no,nl.canSwitchFacingMode=!1;let nu=p.customFileCategoryName;class nh extends tz{constructor(){super(...arguments),this.isUploading=!1,this.onUploadStateChanged=this.addEvent(),this.onStateChanged=this.addEvent()}stateChanged(e){this.currentState!=e&&("loading"===e&&(this.isUploading=!0),"loaded"===e&&(this.isUploading=!1),"error"===e&&(this.isUploading=!1),this.currentState=e,this.onStateChanged.fire(this,{state:e}),this.onUploadStateChanged.fire(this,{state:e}))}get showLoadingIndicator(){return this.isUploading}get fileCallbacks(){return this.survey}clearValue(e,t){this.clearOnDeletingContainer(),super.clearValue(e,t)}clearOnDeletingContainer(){this.fileCallbacks&&this.fileCallbacks.clearFiles(this,this.name,this.value,null,()=>{})}onCheckForErrors(e,t,s){super.onCheckForErrors(e,t,s),this.isUploading&&this.waitForUpload&&e.push(new eO(this.getLocalizationString("uploadingFile"),this))}uploadFiles(e,t){this.fileCallbacks&&(this.errors=[],this.stateChanged("loading"),this.fileCallbacks.uploadFiles(this,this.name,e,(e,t)=>{Array.isArray(e)&&(this.setValueFromResult(e),Array.isArray(t)&&(t.forEach(e=>this.errors.push(new eO(e,this))),this.stateChanged("error"))),"success"===e&&Array.isArray(t)&&this.setValueFromResult(t),"error"===e&&("string"==typeof t&&this.errors.push(new eO(t,this)),Array.isArray(t)&&t.length>0&&t.forEach(e=>this.errors.push(new eO(e,this))),this.stateChanged("error")),this.stateChanged("loaded")},t))}loadPreview(e){}onChangeQuestionValue(e){super.onChangeQuestionValue(e),this.stateChanged(this.isEmpty()?"empty":"loaded")}getIsQuestionReady(){return super.getIsQuestionReady()&&!this.isFileLoading}get isFileLoading(){return this.isFileLoadingValue}set isFileLoading(e){this.isFileLoadingValue=e,this.updateIsReady()}}V([e_()],nh.prototype,"isUploading",void 0),V([e_({defaultValue:"empty"})],nh.prototype,"currentState",void 0),V([e_()],nh.prototype,"storeDataAsText",void 0),V([e_()],nh.prototype,"waitForUpload",void 0);class nd extends ew{static getId(){return"sv_sfp_"+nd.pageCounter++}constructor(e,t){super(),this.question=e,this.index=t,this.id=nd.getId()}get css(){return this.question.cssClasses.page}}nd.pageCounter=0,V([eH({})],nd.prototype,"items",void 0);class nc extends nh{get fileNavigatorVisible(){let e=this.showLoadingIndicator,t=this.isPlayingVideo,s=this.containsMultiplyFiles,i=this.pageSize<this.previewValue.length;return!e&&!t&&s&&i}get pagesCount(){return Math.ceil(this.previewValue.length/this.pageSize)}get actionsContainerVisible(){let e=this.showLoadingIndicator,t=this.isPlayingVideo;return!e&&!t}constructor(e){super(e),this.isDragging=!1,this.canFlipCameraValue=void 0,this.prevPreviewLength=0,this.isClearingFiles=!1,this._renderedPages=[],this.pagesAnimation=new tS(this.getPagesAnimationOptions(),e=>{this._renderedPages=e},()=>this.renderedPages),this.calcAvailableItemsCount=(e,t,s)=>{let i=Math.floor(e/(t+s));return(i+1)*(t+s)-s<=e&&i++,i},this.dragCounter=0,this.onDragEnter=e=>{this.canDragDrop()&&(e.preventDefault(),this.isDragging=!0,this.dragCounter++)},this.onDragOver=e=>{if(!this.canDragDrop())return e.returnValue=!1,!1;e.dataTransfer.dropEffect="copy",e.preventDefault()},this.onDrop=e=>{if(this.canDragDrop()){this.isDragging=!1,this.dragCounter=0,e.preventDefault();let t=e.dataTransfer;this.onChange(t)}},this.onDragLeave=e=>{this.canDragDrop()&&(this.dragCounter--,0===this.dragCounter&&(this.isDragging=!1))},this.doChange=e=>{var t=e.target||e.srcElement;this.onChange(t)},this.doClean=()=>{this.needConfirmRemoveFile?sz({message:this.confirmRemoveAllMessage,funcOnYes:()=>{this.clearFilesCore()},locale:this.getLocale(),rootElement:this.survey.rootElement,cssClass:this.cssClasses.confirmDialog}):this.clearFilesCore()},this.doDownloadFileFromContainer=e=>{e.stopPropagation();let t=e.currentTarget;if(t&&t.getElementsByTagName){let e=t.getElementsByTagName("a")[0];null==e||e.click()}},this.doDownloadFile=(e,t)=>{e.stopPropagation(),nr()&&(e.preventDefault(),function(e,t){try{let s=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";
10")[0],n=new ArrayBuffer(s.length),r=new Uint8Array(n);for(let e=0;e<s.length;e++)r[e]=s.charCodeAt(e);let a=new Blob([n],{type:i});navigator&&navigator.msSaveBlob&&navigator.msSaveOrOpenBlob(a,t)}catch(e){}}(t.content,t.name))},this.createNewArray("acceptedCategories",void 0,e=>{e===nu&&(this.acceptedTypes=void 0)}),this.actionsContainerValue=this.createActionsContainer()}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"acceptedTypes"===e&&this.updateAcceptedCategories(),"acceptedCategories"===e&&(!Array.isArray(s)||0>s.indexOf(nu))&&(this.acceptedTypes=void 0)}get actionsContainer(){return 0===this.actionsContainerValue.actions.length&&(this.actionsContainerValue.actions=this.createContainerActions()),this.actionsContainerValue}get fileNavigator(){return this.fileNavigatorValue||(this.fileNavigatorValue=this.createActionsContainer(),this.fileNavigatorValue.actions=this.createFileNavigatorActions()),this.fileNavigatorValue}createActionsContainer(){let e=new to;return e.locOwner=this,e}createContainerActions(){return[new e2({iconName:"icon-choosefile",id:"sv-file-choose-file",iconSize:"auto",data:{question:this},enabledIf:()=>!this.isInputReadOnly,visible:new eb(()=>{let e=this.isDesignMode,t="camera"===this.sourceType;return!e&&this.hasFileUI||e&&!t}),component:"sv-file-choose-btn"}),new e2({iconName:"icon-takepicture_24x24",id:"sv-file-start-camera",iconSize:"auto",locTitle:this.locTakePhotoCaption,visible:new eb(()=>{let e=this.isDesignMode,t="file"===this.sourceType;return!e&&this.hasVideoUI||e&&!t}),showTitle:new eb(()=>!this.isAnswered),enabledIf:()=>!this.isInputReadOnly,action:()=>{this.startVideo()}}),new e2({iconName:"icon-clear",id:"sv-file-clean",iconSize:"auto",locTitle:this.locClearButtonCaption,showTitle:!1,enabledIf:()=>!this.isInputReadOnly,visible:new eb(()=>this.isAnswered),innerCss:new eb(()=>this.cssClasses.removeButton),action:()=>{this.doClean()}})]}createFileNavigatorActions(){return this.fileIndexAction=new e2({id:"fileIndex",css:"sv-action--file-index",title:this.getFileIndexCaption(),enabled:!1}),this.prevFileAction=new e2({id:"prevPage",iconSize:16,action:()=>{this.navigationDirection="left",this.indexToShow=this.previewValue.length&&(this.indexToShow-1+this.pagesCount)%this.pagesCount||0,this.updateFileIndexActionTitle()}}),this.nextFileAction=new e2({id:"nextPage",iconSize:16,action:()=>{this.navigationDirection="right",this.indexToShow=this.previewValue.length&&(this.indexToShow+1)%this.pagesCount||0,this.updateFileIndexActionTitle()}}),this.updateFileNavigatorActionsCss(this.cssClasses),[this.prevFileAction,this.fileIndexAction,this.nextFileAction]}updateFileIndexActionTitle(){this.fileIndexAction&&(this.fileIndexAction.title=this.getFileIndexCaption())}get closeCameraAction(){return this.closeCameraActionValue||(this.closeCameraActionValue=new e2({iconName:"icon-closecamera",id:"sv-file-close-camera",iconSize:"auto",innerCss:new eb(()=>new eX().append(this.cssClasses.contextButton).append(this.cssClasses.closeCameraButton).toString()),action:()=>{this.stopVideo()}}),this.closeCameraActionValue.cssClasses={}),this.closeCameraActionValue}get takePictureAction(){return this.takePictureActionValue||(this.takePictureActionValue=new e2({iconName:"icon-takepicture",id:"sv-file-take-picture",iconSize:"auto",innerCss:new eb(()=>new eX().append(this.cssClasses.contextButton).append(this.cssClasses.takePictureButton).toString()),locTitle:this.locTakePhotoCaption,showTitle:!1,action:()=>{this.snapPicture()}}),this.takePictureActionValue.cssClasses={}),this.takePictureActionValue}get changeCameraAction(){return this.changeCameraActionValue||(this.changeCameraActionValue=new e2({iconName:"icon-changecamera",id:"sv-file-change-camera",iconSize:"auto",innerCss:new eb(()=>new eX().append(this.cssClasses.contextButton).append(this.cssClasses.changeCameraButton).toString()),visible:new eb(()=>this.canFlipCamera()),action:()=>{this.flipCamera()}}),this.changeCameraActionValue.cssClasses={}),this.changeCameraActionValue}get videoId(){return this.id+"_video"}get hasVideoUI(){return"file"!==this.currentMode}get hasFileUI(){return"camera"!==this.currentMode}startVideo(){"file"===this.currentMode||this.isDesignMode||this.isPlayingVideo||(this.setIsPlayingVideo(!0),setTimeout(()=>{this.startVideoInCamera()},0))}get videoHtmlElement(){var e;return null==(e=this.rootElement)?void 0:e.querySelector(`#${this.videoId}`)}startVideoInCamera(){this.camera.startVideo(this.videoHtmlElement,e=>
10{this.videoStream=e,e||this.stopVideo()},v(this.imageWidth),v(this.imageHeight))}stopVideo(){this.setIsPlayingVideo(!1),this.closeVideoStream()}snapPicture(){if(!this.isPlayingVideo)return;let e=e=>{if(e){let t=new File([e],"snap_picture.png",{type:"image/png"});this.loadFiles([t],"camera")}};this.camera.snap(this.videoHtmlElement,e),this.stopVideo()}canFlipCamera(){return void 0===this.canFlipCameraValue&&(this.canFlipCameraValue=this.camera.canFlip(e=>{this.canFlipCameraValue=e})),this.canFlipCameraValue}flipCamera(){this.canFlipCamera()&&(this.closeVideoStream(),this.camera.flip(),this.startVideoInCamera())}closeVideoStream(){this.videoStream&&(this.videoStream.getTracks().forEach(e=>{e.stop()}),this.videoStream=void 0)}onHidingContent(){super.onHidingContent(),this.stopVideo()}updateFileNavigatorActionsCss(e){this.prevFileAction&&(this.prevFileAction.iconName=e.leftIconId),this.nextFileAction&&(this.nextFileAction.iconName=e.rightIconId)}updateElementCssCore(e){super.updateElementCssCore(e),this.updateFileNavigatorActionsCss(e),this.updateCurrentMode()}getFileIndexCaption(){return this.getLocalizationFormatString("indexText",this.indexToShow+1,this.pagesCount)}updateFileNavigator(){this.updatePages(),this.navigationDirection=void 0,this.indexToShow=this.previewValue.length&&(this.indexToShow+this.pagesCount)%this.pagesCount||0,this.updateFileIndexActionTitle()}updateRenderedPages(){this.pages&&this.pages[this.indexToShow]&&(this.renderedPages=[this.pages[this.indexToShow]])}updatePages(){let e;this.blockAnimations(),this.pages=[],this.renderedPages=[],this.previewValue.forEach((t,s)=>{s%this.pageSize==0&&(e=new nd(this,this.pages.length),this.pages.push(e)),e.items.push(t)}),this.releaseAnimations(),this.updateRenderedPages()}previewValueChanged(){this.navigationDirection=void 0,this.previewValue.length!==this.prevPreviewLength&&(this.previewValue.length>0?this.prevPreviewLength>this.previewValue.length?this.indexToShow>=this.pagesCount&&this.indexToShow>0&&(this.indexToShow=this.pagesCount-1,this.navigationDirection="left-delete"):this.indexToShow=Math.floor(this.prevPreviewLength/this.pageSize):this.indexToShow=0),this.updatePages(),this.updateFileIndexActionTitle(),this.containsMultiplyFiles=this.previewValue.length>1,!(this.previewValue.length>0)||this.calculatedGapBetweenItems||this.calculatedItemWidth||setTimeout(()=>{this.processResponsiveness(0,this._width)},1),this.prevPreviewLength=this.previewValue.length}getType(){return"file"}onChangeQuestionValue(e){super.onChangeQuestionValue(e),this.isLoadingFromJson||this.loadPreview(e)}updateAcceptedCategories(){this.acceptedTypes&&0>this.acceptedCategories.indexOf(nu)&&this.acceptedCategories.push(nu)}get renderedAcceptedTypes(){let e=[];this.acceptedCategories.forEach(t=>{let s=p.acceptedFileCategories[t];s&&e.push(...s)});return(Array.isArray(this.acceptedTypes)?this.acceptedTypes:(this.acceptedTypes||"").split(",")).forEach(t=>{t&&0>e.indexOf(t)&&e.push(t)}),e.length>0?e.join(","):void 0}chooseFile(e){if(!this.rootElement)return;let t=this.rootElement.querySelector(`#${this.inputId}`);t&&(e.preventDefault(),e.stopImmediatePropagation(),t&&(this.fileCallbacks?this.fileCallbacks.chooseFiles(t,e=>this.loadFiles(e,"file"),{element:this,elementType:this.getType(),propertyName:this.name}):t.click()))}getConfirmRemoveMessage(e){return this.confirmRemoveMessage.format(e)}get locRenderedPlaceholder(){return void 0===this.locRenderedPlaceholderValue&&(this.locRenderedPlaceholderValue=new eb(()=>{let e=this.isReadOnly,t=!this.isDesignMode&&this.hasFileUI||this.isDesignMode&&"camera"!=this.sourceType,s=!this.isDesignMode&&this.hasVideoUI||this.isDesignMode&&"file"!=this.sourceType;return e?this.locNoFileChosenCaption:t&&s?this.locFileOrPhotoPlaceholder:t?this.locFilePlaceholder:this.locPhotoPlaceholder})),this.locRenderedPlaceholderValue}get currentMode(){return this.getPropertyValue("currentMode",this.sourceType)}get isPlayingVideo(){return this.getPropertyValue("isPlayingVideo",!1)}setIsPlayingVideo(e){this.setPropertyValue("isPlayingVideo",e)}updateCurrentMode(){!this.isDesignMode&&this.survey&&("file"!==this.sourceType?this.camera.hasCamera(e=>{this.setPropertyValue("currentMode",e?this.sourceType:"file")}):this.setPropertyValue("currentMode",this.sourceType))}get inputTitle(){return this.isUploading?this.loadingFileTitle:this.isEmpty()?this.chooseFileTitle:" "}get chooseButtonText(){return this.isEmpty()||this.allowMultiple?this.chooseButtonCaption:this.replaceButtonCaption}clear(e){this.fileCallbacks&&(this.containsMultiplyFiles=!1,this.isClearingFiles=!0,this.fileCallbacks.clearFiles(this,this.name,this.value,
10null,(t,s)=>{"success"===t&&(this.value=void 0,this.errors=[],e&&e(),this.indexToShow=0,this.updateFileIndexActionTitle(),this.isClearingFiles=!1)}))}get renderCapture(){return this.allowCameraAccess?"user":void 0}get multipleRendered(){return this.allowMultiple?"multiple":void 0}get showFileDecorator(){let e=this.isPlayingVideo,t=this.showLoadingIndicator;return!e&&!t}get showDragAreaPlaceholder(){return!this.isAnswered}get showLoadingIndicator(){return this.isUploading||this.isClearingFiles}get allowShowPreview(){let e=this.showLoadingIndicator,t=this.isPlayingVideo;return!e&&!t}get showPreviewContainer(){return this.previewValue&&this.previewValue.length>0}defaultImage(e){return!this.canPreviewImage(e)&&!!this.cssClasses.defaultImage}removeFile(e){this.removeFileByContent(this.value.filter(t=>t.name===e)[0])}removeFileByContent(e){this.fileCallbacks&&(this.isClearingFiles=!0,this.fileCallbacks.clearFiles(this,this.name,this.value,e.name,(t,s)=>{if("success"===t){var i=this.value;Array.isArray(i)?this.value=i.filter(t=>!w.isTwoValueEquals(t,e,!0,!1,!1)):this.value=void 0,this.isClearingFiles=!1}}))}setValueFromResult(e){this.value=(this.value||[]).concat(e.map(e=>({name:e.file.name,type:e.file.type,content:e.content})))}loadFiles(e,t){if(this.survey&&(this.errors=[],this.allFilesOk(e))){var s=()=>{this.stateChanged("loading");var s=[];this.storeDataAsText?e.forEach(t=>{let i=new FileReader;i.onload=n=>{(s=s.concat([{name:t.name,type:t.type,content:i.result}])).length===e.length&&(this.value=(this.value||[]).concat(s))},i.readAsDataURL(t)}):this.uploadFiles(e,t)};this.allowMultiple?s():this.clear(s)}}get camera(){return this.cameraValue||(this.cameraValue=new nl),this.cameraValue}canPreviewImage(e){return this.allowImagesPreview&&!!e&&this.isFileImage(e)}loadPreview(e){if((!this.showPreview||this.prevLoadedPreviewValue!==e)&&(this.previewValue.splice(0,this.previewValue.length),this.showPreview&&e)){this.prevLoadedPreviewValue=e;var t=Array.isArray(e)?e:e?[e]:[];this.storeDataAsText?(t.forEach(e=>{var t=e.content||e;this.previewValue.push({name:e.name,type:e.type,content:t})}),this.previewValueChanged()):(this._previewLoader&&this._previewLoader.dispose(),this.isFileLoading=!0,this._previewLoader=new np(this,(e,t)=>{"error"!==e&&(t.forEach(e=>{this.previewValue.push(e)}),this.previewValueChanged()),this.isFileLoading=!1,this._previewLoader.dispose(),this._previewLoader=void 0}),this._previewLoader.load(t))}}allFilesOk(e){var t=this.errors?this.errors.length:0;e=e||[];let s=Array.isArray(this.value)?this.value.length:0;return this.maxFiles>0&&this.maxFiles<e.length+s&&this.errors.push(new eT(this.maxFiles,this)),e.forEach(e=>{this.maxSize>0&&e.size>this.maxSize&&this.errors.push(new eR(this.maxSize,this))}),t===this.errors.length}isFileImage(e){if(!e||!e.content||!e.content.substring)return!1;let t="data:image";var s=e.content&&e.content.substring(0,t.length);return(s=s&&s.toLowerCase())===t||!!e.type&&0===e.type.toLowerCase().indexOf("image/")}getPlainData(e={includeEmpty:!0}){var t=super.getPlainData(e);return t&&!this.isEmpty()&&(t.isNode=!1,t.data=(Array.isArray(this.value)?this.value:[this.value]).map((e,t)=>({name:t,title:"File",value:e.content&&e.content||e,displayValue:e.name&&e.name||e,getString:e=>this.getValueAsString(e),isNode:!1}))),t}getImageWrapperCss(e){return new eX().append(this.cssClasses.imageWrapper).append(this.cssClasses.imageWrapperDefaultImage,this.defaultImage(e)).toString()}getActionsContainerCss(e){return new eX().append(e.actionsContainer).append(e.actionsContainerAnswered,this.isAnswered).toString()}getRemoveButtonCss(){return new eX().append(this.cssClasses.removeFileButton).append(this.cssClasses.contextButton).toString()}getChooseFileCss(){let e=this.isAnswered;return new eX().append(this.cssClasses.chooseFile).append(this.cssClasses.controlDisabled,this.isReadOnly).append(this.cssClasses.chooseFileAsText,!e).append(this.cssClasses.chooseFileAsTextDisabled,!e&&this.isInputReadOnly).append(this.cssClasses.contextButton,e).append(this.cssClasses.chooseFileAsIcon,e).toString()}getReadOnlyFileCss(){return new eX().append("form-control").append(this.cssClasse
10s.placeholderInput).toString()}get fileRootCss(){return new eX().append(this.cssClasses.root).append(this.cssClasses.rootDisabled,this.isDisabledStyle).append(this.cssClasses.rootReadOnly,this.isReadOnlyStyle).append(this.cssClasses.rootPreview,this.isPreviewStyle).append(this.cssClasses.rootDragging,this.isDragging).append(this.cssClasses.rootAnswered,this.isAnswered).append(this.cssClasses.single,!this.allowMultiple).append(this.cssClasses.singleImage,!this.allowMultiple&&this.isAnswered&&this.canPreviewImage(this.value[0])).append(this.cssClasses.mobile,this.isMobile).toString()}getFileDecoratorCss(){return new eX().append(this.cssClasses.fileDecorator).append(this.cssClasses.onError,this.hasCssError()).append(this.cssClasses.fileDecoratorDrag,this.isDragging).toString()}onChange(e){if(!i.isFileReaderAvailable()||!e||!e.files||e.files.length<1)return;let t=[],s=this.allowMultiple?e.files.length:1;for(let i=0;i<s;i++)t.push(e.files[i]);e.value="",this.loadFiles(t)}updateActionsContainerCss(e,t){let s=this.actionsContainerValue;
10s.cssClasses=e.actionBar,s.cssClasses.itemWithTitle=s.cssClasses.item,s.cssClasses.item="",s.cssClasses.itemAsIcon=t.contextButton,s.containerCss=t.actionsContainer}calcCssClasses(e){let t=super.calcCssClasses(e);return this.updateActionsContainerCss(e,t),t}onSurveyLoad(){super.onSurveyLoad(),this.updateAcceptedCategories(),this.updateCurrentMode(),this.loadPreview(this.value)}needResponsiveness(){return this.supportResponsiveness()}supportResponsiveness(){return!0}getObservedElementSelector(){return e8(this.cssClasses.dragArea)}getFileListSelector(){return e8(this.cssClasses.fileList)}get renderedPages(){return this._renderedPages}set renderedPages(e){this.pagesAnimation.sync(e)}getPagesAnimationOptions(){return{getEnterOptions:e=>{let t=this.cssClasses.page;return{cssClass:t?new eX().append(`${t}--enter-from-left`,"left"==this.navigationDirection||"left-delete"==this.navigationDirection).append(`${t}--enter-from-right`,"right"==this.navigationDirection).toString():""}},getLeaveOptions:e=>{let t=this.cssClasses.page;return{cssClass:t?new eX().append(`${t}--leave-to-left`,"right"==this.navigationDirection).append(`${t}--leave-to-right`,"left"==this.navigationDirection).toString():""}},getAnimatedElement:e=>{var t;return null==(t=this.rootElement)?void 0:t.querySelector(`#${e.id}`)},isAnimationEnabled:()=>this.animationAllowed&&!!this.rootElement,getRerenderEvent:()=>this.onElementRerendered}}triggerResponsiveness(e){e&&(this.calculatedGapBetweenItems=void 0,this.calculatedItemWidth=void 0),super.triggerResponsiveness()}processResponsiveness(e,t){if(this._width=t,this.rootElement&&(!this.calculatedGapBetweenItems||!this.calculatedItemWidth)&&this.allowMultiple){let e=this.getFileListSelector()?this.rootElement.querySelector(this.getFileListSelector()):void 0;if(e){let t=e.querySelector(e8(this.cssClasses.page));if(t){let e=t.querySelector(e8(this.cssClasses.previewItem));this.calculatedGapBetweenItems=Math.ceil(Number.parseFloat(n.getComputedStyle(t).gap)),e&&(this.calculatedItemWidth=Math.ceil(Number.parseFloat(n.getComputedStyle(e).width)))}}}return!!this.calculatedGapBetweenItems&&!!this.calculatedItemWidth&&(this.pageSize=Math.max(this.calcAvailableItemsCount(t,this.calculatedItemWidth,this.calculatedGapBetweenItems),1),!0)}canDragDrop(){return!this.isInputReadOnly&&"camera"!==this.currentMode&&!this.isPlayingVideo}afterRenderQuestionElement(e){super.afterRenderQuestionElement(e),this.rootElement=e}beforeDestroyQuestionElement(e){super.beforeDestroyQuestionElement(e),this.stopVideo(),this.rootElement=void 0}clearFilesCore(){if(this.rootElement){let e=this.rootElement.querySelectorAll("input")[0];e&&(e.value="")}this.clear()}doRemoveFile(e,t){(t.stopPropagation(),this.needConfirmRemoveFile)?sz({message:this.getConfirmRemoveMessage(e.name),funcOnYes:()=>{this.removeFileCore(e)},locale:this.getLocale(),rootElement:this.survey.rootElement,cssClass:this.cssClasses.confirmDialog}):this.removeFileCore(e)}removeFileCore(e){let t=this.previewValue.indexOf(e);this.removeFileByContent(-1===t?e:this.value[t])}dispose(){this.cameraValue=void 0,this.closeVideoStream(),super.dispose()}}V([e_()],nc.prototype,"isDragging",void 0),V([eH({})],nc.prototype,"previewValue",void 0),V([eH({})],nc.prototype,"pages",void 0),V([e_({defaultValue:0,onSet:(e,t)=>{t.updateRenderedPages()}})],nc.prototype,"indexToShow",void 0),V([e_({defaultValue:1,onSet:(e,t)=>{t.updateFileNavigator()}})],nc.prototype,"pageSize",void 0),V([e_({defaultValue:!1})],nc.prototype,"containsMultiplyFiles",void 0),V([e_()],nc.prototype,"allowCameraAccess",void 0),V([e_({onSet:(e,t)=>{t.isLoadingFromJson||t.updateCurrentMode()}})],nc.prototype,"sourceType",void 0),V([e_()],nc.prototype,"canFlipCameraValue",void 0),V([e_()],nc.prototype,"showPreview",void 0),V([e_()],nc.prototype,"allowMultiple",void 0),V([e_()],nc.prototype,"imageHeight",void 0),V([e_()],nc.prototype,"imageWidth",void 0),V([e_()],nc.prototype,"acceptedCategories",void 0),V([e_()],nc.prototype,"acceptedTypes",void 0),V([e_()],nc.prototype,"allowImagesPreview",void 0),V([e_()],nc.prototype,"maxSize",void 0),V([e_()],nc.prototype,"maxFiles",void 0),V([e_()],nc.prototype,"needConfirmRemoveFile",void 0),V([e_({localizable:{defaultStr:"confirmRemoveFile"}})],nc.prototype,"confirmRemoveMessage",void 0),V([e_({localizable:{defaultStr:"confirmRemoveAllFiles"}})],nc.prototype,"confirmRemoveAllMessage",void 0),V([e_({localizable:{defaultStr:"noFileChosen"}})],nc.prototype,"noFileChosenCaption",void 0),V([e_({localizable:{defaultStr:"chooseFileCaption"}})],nc.prototype,"chooseButtonCaption",void 0),V([e_({localizable:{defaultStr:!0}})],nc.prototype,"takePhotoCaption",void 0),V([e_({localizable:{defaultStr:"replaceFileCaption"}})],nc.prototype,"replaceButtonCaption",void 0),V([e_({localizable:{defaultStr:!0}})],nc.prototype,"removeFileCaption",void 0),V([e_({localizable:{defaultStr:"loadingFile"}})],nc.prototype,"loadingFileTitle",void 0),V([e_({localizable:{defaultStr:"chooseFile"}})],nc.prototype,"chooseFileTitle",void 0),V([e_({localizable:{defaultStr:"clearCaption"}})],nc.prototype,"clearButtonCaption",void 0),V([e_({localizable:{defaultStr:!0}})],nc.prototype,"fileOrPhotoPlaceholder",void 0),V([e_({localizable:{defaultStr:!0}})],nc.prototype,"photoPlaceholder",void 0),V([e_({localizable:{defaultStr:!0}})],nc.prototype,"filePlaceholder",void 0),V([e_()],nc.prototype,"locRenderedPlaceholderValue",void 0),V([e_()],nc.prototype,"isClearingFiles",void 0),V([eH()],nc.prototype,"_renderedPages",void 0),H.addClass("file",[{name:"showCommentArea:switch",visible:!0},{name:"showPreview:boolean",default:!0,visible:!1},"allowMultiple:boolean",{name:"allowImagesPreview:boolean",default:!0,dependsOn:"showPreview",visibleIf:e=>!!e.showPreview},"imageHeight","imageWidth",{name:"acceptedCategories:set",choices:()=>{let e=[];for(let t in p.acceptedFileCategories)e.push(t);return e.push(nu),e},onSerializeValue:e=>{let t=[];
10return e.acceptedCategories.forEach(e=>{p.acceptedFileCategories[e]&&t.push(e)}),t}},{name:"acceptedTypes",dependsOn:"acceptedCategories",visibleIf:e=>e.acceptedCategories.indexOf(nu)>-1},{name:"storeDataAsText:boolean",default:!0},{name:"waitForUpload:boolean",default:!1},{name:"maxSize:number",default:0},{name:"maxFiles:number",default:1e3,visibleIf:e=>e.allowMultiple},{name:"defaultValue",visible:!1},{name:"correctAnswer",visible:!1},{name:"validators",visible:!1},{name:"needConfirmRemoveFile:boolean"},{name:"sourceType",choices:["file","camera","file-camera"],default:"file"},{name:"fileOrPhotoPlaceholder:text",serializationProperty:"locFileOrPhotoPlaceholder"},{name:"photoPlaceholder:text",serializationProperty:"locPhotoPlaceholder"},{name:"filePlaceholder:text",serializationProperty:"locFilePlaceholder"},{name:"allowCameraAccess:switch",visible:!1}],function(){return new nc("")},"question"),sm.Instance.registerQuestion("file",e=>new nc(e));class np{constructor(e,t){this.fileQuestion=e,this.callback=t,this.loaded=[]}load(e){let t=0;this.loaded=Array(e.length),e.forEach((s,i)=>{this.fileQuestion.fileCallbacks&&this.fileQuestion.fileCallbacks.downloadFile(this.fileQuestion,this.fileQuestion.name,s,(n,r)=>{this.fileQuestion&&this.callback&&("error"!==n?(this.loaded[i]={content:r,name:s.name,type:s.type},++t===e.length&&this.callback(n,this.loaded)):this.callback("error",this.loaded))})})}dispose(){this.fileQuestion=void 0,this.callback=void 0}}class ng extends i2{getType(){return"html"}get isCompositeQuestion(){return!0}getProcessedText(e){return this.ignoreHtmlProgressing?e:super.getProcessedText(e)}get processedHtml(){return this.processHtml(this.html)}processHtml(e){return this.survey?this.survey.processHtml(e,"html-question"):this.html}get isNewA11yStructure(){return!0}get renderCssRoot(){return new eX().append(this.cssClasses.root).append(this.cssClasses.nested,this.getIsNested()).toString()||void 0}}V([e_({localizable:{onCreate:(e,t)=>{t.onGetTextCallback=t=>
10e.survey&&!e.ignoreHtmlProgressing?e.processHtml(t):t}}})],ng.prototype,"html",void 0),H.addClass("html",[{name:"html:html",serializationProperty:"locHtml"},{name:"showNumber",visible:!1},{name:"state",visible:!1},{name:"titleLocation",visible:!1},{name:"descriptionLocation",visible:!1},{name:"errorLocation",visible:!1},{name:"indent",visible:!1},{name:"width",visible:!1}],function(){return new ng("")},"nonvalue"),sm.Instance.registerQuestion("html",e=>new ng(e));class nm extends iy{constructor(e){super(e)}getDefaultItemComponent(){return"survey-radiogroup-item"}getType(){return"radiogroup"}supportElementsInChoice(){return!0}getFirstInputElementId(){return this.inputId+"_0"}get selectedItem(){return this.getSingleSelectedItem()}get showClearButton(){return this.allowClear}set showClearButton(e){this.allowClear=e}get canShowClearButton(){return this.allowClear&&!this.isReadOnly}get clearButtonCaption(){return this.getLocalizationString("clearCaption")}supportAutoAdvance(){var e;return!0===this.isMouseDown&&!(null==(e=this.selectedItem)?void 0:e.showCommentArea)}getConditionJson(e=null,t=null){let s=super.getConditionJson(e,t);return delete s.allowClear,delete s.showClearButton,s}setNewComment(e){this.isMouseDown=!0,super.setNewComment(e),this.isMouseDown=!1}clickItemHandler(e){this.selectItem(e)}isOtherValueUnused(){var e;return!(null==(e=this.selectedItem)?void 0:e.showCommentArea)}getDefaultTitleActions(){let e=[];
10if(!this.isDesignMode){let t=new e2({locTitleName:"clearCaption",id:`sv-clr-btn-${this.id}`,action:()=>{this.clearValueFromUI()},innerCss:this.cssClasses.clearButton,visible:new eb(()=>this.canShowClearButton),ariaLabelledBy:this.a11y_input_ariaLabelledBy});e.push(t)}return e}get isNewA11yStructure(){return!0}get a11y_input_ariaRole(){return"radiogroup"}}function nv(e,t){if("function"==typeof getComputedStyle&&t){let s=getComputedStyle(t);return s.getPropertyValue&&s.getPropertyValue(e)}return""}function nC(e,t,s,i){let r=!!e&&e[t];if(r||(r=nv(s,i)),!r)return null;let a=n.createElement("canvas");if(!a)return null;var o=a.getContext("2d");o.fillStyle=r,"#000000"==o.fillStyle&&(o.fillStyle=nv(s,i));let l=o.fillStyle;if(l.startsWith("rgba"))return l.substring(5,l.length-1).split(",").map(e=>+e.trim());var u=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(l);return u?[parseInt(u[1],16),parseInt(u[2],16),parseInt(u[3],16),1]:null}V([e_()],nm.prototype,"allowClear",void 0),H.addClass("radiogroup",[{name:"allowClear:boolean",alternativeName:"showClearButton"},{name:"separateSpecialChoices",visible:!0},{name:"itemComponent",visible:!1,default:"survey-radiogroup-item"}],function(){return new nm("")},"checkboxbase"),sm.Instance.registerQuestion("radiogroup",e=>{var t=new nm(e);return t.choices=sm.DefaultChoices,t});class ny extends tj{constructor(e,t){super(e,t)}getType(){return"ratingitem"}get ratingOwner(){return this.locOwner}get style(){return this.getPropertyValue("style",void 0,()=>{var e;return null==(e=this.ratingOwner)?void 0:e.getItemStyle(this)})}get className(){return this.getPropertyValue("className",void 0,()=>{var e;return null==(e=this.ratingOwner)?void 0:e.getItemClass(this)})}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),-1===["style","className"].indexOf(e)&&this.resetVisuals()}resetVisuals(){this.resetPropertyValue("style"),this.resetPropertyValue("className")}get description(){var e;return null==(e=this.ratingOwner)?void 0:e.getDescription(this)}getLocText(){var e;return(null==(e=this.ratingOwner)?void 0:e.getLocTextForItem(this))||super.getLocText()}}V([e_({defaultValue:""})],ny.prototype,"highlight",void 0);class nf extends tz{constructor(e){super(e),this.createItemValues("rateValues")}resetItemsVisuals(){let e=this.getPropertyValue("visibleChoices");Array.isArray(e)&&e.forEach(e=>e.resetVisuals())}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"rateValues"===e&&this.executeOnSyncPropertiesChanged(()=>{this.autoGenerate=0==this.rateValues.length,this.setIconsToRateValues(),this.resetRenderedItems()}),"autoGenerate"===e&&this.executeOnSyncPropertiesChanged(()=>{this.autoGenerate||0!==this.rateValues.length||this.setArray("rateValues",this.rateValues,this.visibleRateValues,!1,!1),this.autoGenerate&&(this.rateValues.splice(0,this.rateValues.length),this.updateRateMax()),this.resetRenderedItems()}),"rateCount"===e&&this.executeOnSyncPropertiesChanged(()=>{if(this.useRateValues())if(this.rateCount<this.rateValues.length){if(this.rateCount>=10&&"smileys"==this.rateType)return;this.rateValues.splice(this.rateCount,this.rateValues.length-this.rateCount)}else for(let e=this.rateValues.length;e<this.rateCount;e++)this.rateValues.push(new ny(E("choices_Item")+(e+1)));else this.rateMax=this.rateMin+this.rateStep*(this.rateCount-1)}),["rateMin","rateMax","rateStep","rateValues"].indexOf(e)>-1&&this.executeOnSyncPropertiesChanged(()=>this.updateRateCount()),["cssClassesValue","isReadOnly","isVisible","errors","value"].indexOf(e)>-1&&this.resetItemsVisuals(),["value","renderAs","placeholder","choices","visibleChoices"].indexOf(e)>-1&&this.resetReadOnlyText(),["rateMin","rateMax","minRateDescription","maxRateDescription","rateStep","displayRateDescriptionsAsExtremeItems","rateType","rateValues"].indexOf(e)>-1&&(("rateType"===e||"rateValues"===e)&&this.setIconsToRateValues(),this.resetRenderedItems(),"rateType"===e&&this.updateRateCount()),("rateColorMode"===e||"scaleColorMode"===e)&&this.updateColors(this.survey.themeVariables),"displayMode"===e&&this.updateRenderAsBasedOnDisplayMode(!1)}
10setIconsToRateValues(){"smileys"==this.rateType&&this.rateValues.map(e=>e.icon=this.getItemSmiley(e))}locStrsChanged(){var e;super.locStrsChanged(),this.resetReadOnlyText(),null==(e=this.dropdownListModelValue)||e.locStrsChanged()}endLoadingFromJson(){super.endLoadingFromJson(),void 0!==this.jsonObj.rateMin&&void 0!==this.jsonObj.rateCount&&void 0===this.jsonObj.rateMax&&this.updateRateMax(),void 0!==this.jsonObj.rateMax&&void 0!==this.jsonObj.rateCount&&void 0===this.jsonObj.rateMin&&this.updateRateMin(),void 0===this.jsonObj.autoGenerate&&void 0!==this.jsonObj.rateValues&&(this.autoGenerate=!this.jsonObj.rateValues.length),this.updateRateCount(),this.setIconsToRateValues()}useRateValues(){return!!this.rateValues.length&&!this.autoGenerate}updateRateMax(){this.rateMax=this.rateMin+this.rateStep*(this.rateCount-1)}updateRateMin(){this.rateMin=this.rateMax-this.rateStep*(this.rateCount-1)}updateRateCount(){let e=0;(e=this.useRateValues()?this.rateValues.length:Math.trunc((this.rateMax-this.rateMin)/(this.rateStep||1))+1)>10&&"smileys"==this.rateType&&(e=10),this.rateCount=e,this.rateValues.length>e&&this.rateValues.splice(e,this.rateValues.length-e)}get showSelectedItemLocText(){return!this.readOnly&&!this.inputHasValue&&!!this.selectedItemLocText}get selectedItemLocText(){var e;return!this.readOnly&&(null==(e=this.visibleRateValues.filter(e=>e.value==this.value)[0])?void 0:e.locText)}selectItem(e){!this.isReadOnly&&e&&(this.value=e.value)}updateColors(e){"monochrome"===this.colorMode||!n.isAvailable()||nf.colorsCalculated||(nf.badColor=nC(e,"--sjs-special-red","--sd-rating-bad-color",this.rootElement),nf.normalColor=nC(e,"--sjs-special-yellow","--sd-rating-normal-color",this.rootElement),nf.goodColor=nC(e,"--sjs-special-green","--sd-rating-good-color",this.rootElement),nf.badColorLight=nC(e,"--sjs-special-red-light","--sd-rating-bad-color-light",this.rootElement),nf.normalColorLight=nC(e,"--sjs-special-yellow-light","--sd-rating-normal-color-light",this.rootElement),nf.goodColorLight=nC(e,"--sjs-special-green-light","--sd-rating-good-color-light",this.rootElement),this.colorsCalculated=!0,this.resetRenderedItems())}getDisplayValueCore(e,t){return this.useRateValues?tj.getTextOrHtmlByValue(this.visibleRateValues,t)||t:super.getDisplayValueCore(e,t)}get visibleRateValues(){return this.visibleChoices}supportEmptyValidation(){return this.isDropdown}get isDropdown(){return"dropdown"===this.renderAs}itemValuePropertyChanged(e,t,s,i){!this.useRateValues()&&["value","text","icon","visibleIf","enableIf"].indexOf(t)>=0&&(this.autoGenerate=!1),super.itemValuePropertyChanged(e,t,s,i)}runConditionCore(e){super.runConditionCore(e),this.runRateItesmCondition(e)}runRateItesmCondition(e){var t;if(!this.useRateValues())return;let s=!1;if((null==(t=this.survey)?void 0:t.areInvisibleElementsShowing)?this.rateValues.forEach(e=>{s=s||!e.isVisible,e.setIsVisible(e,!0)}):s=tj.runConditionsForItems(this.rateValues,void 0,void 0,e,!0),s&&(this.resetRenderedItems(),!this.isEmpty()&&!this.isReadOnly)){let e=tj.getItemByValue(this.rateValues,this.value);e&&!e.isVisible&&this.clearValue()}}getRateValuesCore(){let e=this.useRateValues()?this.rateValues:this.createRateValues(),t=[];return e.forEach(e=>{e.isVisible&&t.push(e)}),t}calculateRateValues(){let e=this.getRateValuesCore();return"smileys"==this.rateType&&e.length>10&&(e=e.slice(0,10)),e}getDescription(e){if(!this.isLoadingFromJson&&this.isDropdown)return this.getExtremeDescription(e)}getExtremeDescription(e){let t=this.visibleChoices,s=t.indexOf(e);return 0==s?this.minRateDescription&&this.locMinRateDescription:s==t.length-1?this.maxRateDescription&&this.locMaxRateDescription:void 0}getLocTextForItem(e){if(!this.isLoadingFromJson&&!this.isDropdown&&this.displayRateDescriptionsAsExtremeItems)return this.getExtremeDescription(e)}resetRenderedItems(){if(this.autoGenerate){let e=this.createRateValues();this.rateMax=e[e.length-1].value}this.resetPropertyValue("visibleChoices")}get renderedRateItems(){return this.visibleChoices}get visibleChoices(){return this.getPropertyValue("visibleChoices",void 0,()=>this.calculateRateValues())}updateVisibleChoices(){this.resetRenderedItems()}createRateValues(){for(var e=[],t=this.rateMin,s=this.rateStep;t<=this.rateMax&&e.length<p.ratingMaximumRateValueCount;){let i=new ny(t,"");i.locOwner=this,i.ownerPropertyName="rateValues",e.push(i),t=this.correctValue(t+s,s)}return e}correctValue(e,t){if(!e||Math.round(e)==e)return e;for(var s=0;Math.round(t)!=t;)t*=10,s++;return parseFloat(e.toFixed(s))}getType(){return"rating"}getAllChildren(){return[...super.getAllChildren(),...this.rateValues]}getItemValueType(){return"ratingitem"}getFirstInputElementId(){return this.inputId+"_0"}getInputId(e){return this.inputId+"_"+e}get questionName(){return this.name+"_"+this.id}supportAutoAdvance(){return!0===this.isMouseDown||this.isDropdown}supportOther(){return!1}getPlainDataCalculatedValue(e){let t=super.getPlainDataCalculatedValue(e);if(void 0!==t||!this.useRateValues||this.isEmpty())return t;let s=tj.getItemByValue(this.visibleRateValues,this.value);return s?s[e]:void 0}get hasMinRateDescription(){return this.getPropertyValue("hasMinRateDescription",void 0,()=>!!this.minRateDescription)}get hasMaxRateDescription(){return this.getPropertyValue("hasMaxRateDescription",void 0,()=>!!this.maxRateDescription)}get hasMinLabel(){return!this.displayRateDescriptionsAsExtremeItems&&!!this.hasMinRateDescription}get hasMaxLabel(){return!this.displayRateDescriptionsAsExtremeItems&&!!this.hasMaxRateDescription}updateRenderAsBasedOnDisplayMode(e){this.isDesignMode?(e||this.isDropdown)&&(this.renderAs="default"):(e||"auto"!==this.displayMode)&&(this.renderAs="dropdown"===this.displayMode?"dropdown":"default")}onSurveyLoad(){super.onSurveyLoad(),this.isDropdown&&"auto"===this.displayMode?this.displayMode="dropdown":this.updateRenderAsBasedOnDisplayMode()}get rateDisplayMode(){return this.rateType}set rateDisplayMode(e){this.rateType=e}get isStar(){return"stars"==this.rateType}get isSmiley(){return"smileys"==this.rateType}getDefaultItemComponent(){return this.isDropdown?"sv-rating-dropdown-item":this.isStar?"sv-rating-item-star":this.isSmiley?"sv-rating-item-smiley":"sv-rating-item"}valueToData(e){if(this.useRateValues()){var t=tj.getItemByValue(this.visibleChoices,e);return t?t.value:e}return isNaN(e)?e:parseFloat(e)}setValueFromClick(e){if(!this.isReadOnlyAttr){this.value===("string"==typeof this.value?e:parseFloat(e))?this.clearValue(!0):this.value=e;for(let e=0;e<this.visibleChoices.length;e++)this.visibleChoices[e].highlight="none"}}onItemMouseIn(e){if(tp||this.isReadOnly||!e.isEnabled||this.isDesignMode)return;let t=!0,s=!this.isEmpty();if("stars"!==this.rateType){e.highlight="highlighted";return}for(let i=0;i<this.visibleChoices.length;i++)this.visibleChoices[i].highlight=t&&!s&&"highlighted"||!t&&s&&"unhighlighted"||"none",this.visibleChoices[i]==e&&(t=!1),this.visibleChoices[i].value==this.value&&(s=!1)}
10onItemMouseOut(e){tp||(this.visibleChoices.forEach(e=>e.highlight="none"),this.resetItemsVisuals())}get itemSmallMode(){return!this.isSingleInputActive&&this.inMatrixMode&&"small"==p.matrix.rateSize}get ratingRootCss(){let e=this.hasMaxLabel||this.hasMinLabel;return new eX().append(this.cssClasses.root).append(this.cssClasses.rootWrappable,"buttons"==this.displayMode||!!this.survey&&this.survey.isDesignMode||"auto"==this.displayMode&&!this.supportResponsiveness()).append(this.cssClasses.rootLabelsTop,e&&"top"==this.rateDescriptionLocation).append(this.cssClasses.rootLabelsBottom,e&&"bottom"==this.rateDescriptionLocation).append(this.cssClasses.rootLabelsDiagonal,e&&"topBottom"==this.rateDescriptionLocation).append(this.cssClasses.itemSmall,this.itemSmallMode&&"labels"!=this.rateType).toString()}get itemStarIcon(){return this.itemSmallMode?"icon-rating-star-small":"icon-rating-star"}get itemStarIconAlt(){return this.itemStarIcon+"-2"}getItemSmiley(e){let t=["very-good","not-good","normal","good","average","excellent","poor","perfect","very-poor","terrible"].slice(0,this.useRateValues()?this.rateValues.length:this.rateMax-this.rateMin+1),s=["terrible","very-poor","poor","not-good","average","normal","good","very-good","excellent","perfect"].filter(e=>-1!=t.indexOf(e));return this.useRateValues()?s[this.rateValues.indexOf(e)]:s[e.value-this.rateMin]}getItemSmileyIconName(e){return"icon-"+this.getItemSmiley(e)}afterRenderQuestionElement(e){super.afterRenderQuestionElement(e),this.rootElement=e,"dropdown"!==this.renderAs&&(this.colorsCalculated=!1,this.updateColors(this.survey.themeVariables))}getRenderedItemColor(e,t){let s=t?nf.badColorLight:nf.badColor,i=t?nf.goodColorLight:nf.goodColor,n=(this.rateCount-1)/2,r=t?nf.normalColorLight:nf.normalColor;if(e<n?i=r:(s=r,e-=n),!s||!i)return null;let a=[0,0,0,0];for(let t=0;t<4;t++)a[t]=s[t]+(i[t]-s[t])*e/n,t<3&&(a[t]=Math.trunc(a[t]));return"rgba("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+")"}getItemStyle(e){if("monochrome"===this.scaleColorMode&&"default"==this.rateColorMode||this.isPreviewStyle||this.isReadOnlyStyle)return{};let t=this.visibleRateValues.indexOf(e),s=this.getRenderedItemColor(t,!1),i="highlighted"==e.highlight&&"colored"===this.scaleColorMode&&this.getRenderedItemColor(t,!0);return i?{"--sd-rating-item-color":s,"--sd-rating-item-color-light":i}:{"--sd-rating-item-color":s}}getItemClass(e){let t=this.value==e.value;this.isStar&&(t=this.useRateValues()?this.rateValues.indexOf(this.rateValues.filter(e=>e.value==this.value)[0])>=this.rateValues.indexOf(e):this.value>=e.value);let s=!(this.isReadOnly||!e.isEnabled)&&this.value!=e.value&&!(this.survey&&this.survey.isDesignMode),i=this.isStar&&"highlighted"==e.highlight,n=this.isStar&&"unhighlighted"==e.highlight,r=this.cssClasses.item,a=this.cssClasses.selected,o=this.cssClasses.itemDisabled,l=this.cssClasses.itemReadOnly,u=this.cssClasses.itemPreview,h=this.cssClasses.itemHover,d=this.cssClasses.itemOnError,c=null,p=null,g=null,m=null,v=null;this.isStar&&(r=this.cssClasses.itemStar,a=this.cssClasses.itemStarSelected,o=this.cssClasses.itemStarDisabled,l=this.cssClasses.itemStarReadOnly,u=this.cssClasses.itemStarPreview,h=this.cssClasses.itemStarHover,d=this.cssClasses.itemStarOnError,c=this.cssClasses.itemStarHighlighted,p=this.cssClasses.itemStarUnhighlighted,v=this.cssClasses.itemStarSmall),this.isSmiley&&(r=this.cssClasses.itemSmiley,a=this.cssClasses.itemSmileySelected,o=this.cssClasses.itemSmileyDisabled,l=this.cssClasses.itemSmileyReadOnly,u=this.cssClasses.itemSmileyPreview,h=this.cssClasses.itemSmileyHover,d=this.cssClasses.itemSmileyOnError,c=this.cssClasses.itemSmileyHighlighted,g=this.cssClasses.itemSmileyScaleColored,m=this.cssClasses.itemSmileyRateColored,v=this.cssClasses.itemSmileySmall);let C=!this.isStar&&!this.isSmiley&&(!this.displayRateDescriptionsAsExtremeItems||this.useRateValues()&&e!=this.rateValues[0]&&e!=this.rateValues[this.rateValues.length-1]||!this.useRateValues()&&e.value!=this.rateMin&&e.value!=this.rateMax)&&e.locText.calculatedText.length<=2&&Number.isInteger(Number(e.locText.calculatedText)),y={item:e,css:""};return y.css=new eX().append(r).append(a,t).append(o,this.isDisabledStyle).append(l,this.isReadOnlyStyle).append(u,this.isPreviewStyle).append(h,s).append(c,i).append(g,"colored"==this.scaleColorMode).append(m,"scale"==this.rateColorMode&&t).append(p,n).append(d,this.hasCssError()).append(v,this.itemSmallMode).append(this.cssClasse
vendor: 4,246 bytes, line 10
10s.itemFixedSize,C).toString(),this.survey&&this.cssCallbacks.updateChoiceItemCss(this,y),y.css}getControlClass(){return this.isEmpty(),new eX().append(this.cssClasses.control).append(this.cssClasses.controlEmpty,this.isEmpty()).append(this.cssClasses.onError,this.hasCssError()).append(this.cssClasses.controlDisabled,this.isDisabledStyle).append(this.cssClasses.controlReadOnly,this.isReadOnlyStyle).append(this.cssClasses.controlPreview,this.isPreviewStyle).toString()}get allowClear(){return!0}get searchEnabled(){return!1}get renderedValue(){return this.value}set renderedValue(e){this.value=e}isItemSelected(e){return e.value==this.value}get readOnlyText(){return this.locReadOnlyText.calculatedText}get locReadOnlyText(){return this.getOrCreateLocStr("readOnlyText",!0,!1,e=>{e.onGetTextCallback=()=>this.displayValue||this.placeholder})}resetReadOnlyText(){this.resetPropertyValue("readOnlyText")}needResponsiveWidth(){let e=this.getPropertyValue("rateStep"),t=this.getPropertyValue("rateMax"),s=this.getPropertyValue("rateMin");return"dropdown"!=this.displayMode&&!!(this.hasMinRateDescription||this.hasMaxRateDescription||e&&(t-s)/e>9)}supportResponsiveness(){return!this.inMatrixMode}onBeforeSetCompactRenderer(){this.isDisposed||this.dropdownListModelValue||(this.dropdownListModelValue=new iE(this))}getCompactRenderAs(){return"buttons"==this.displayMode?"default":"dropdown"}getDesktopRenderAs(){return"dropdown"==this.displayMode?"dropdown":"default"}set dropdownListModel(e){this.dropdownListModelValue=e,this.updateElementCss()}get dropdownListModel(){return this.isDropdown&&this.onBeforeSetCompactRenderer(),this.dropdownListModelValue}onBlurCore(e){var t;null==(t=this.dropdownListModel)||t.onBlur(e),super.onBlurCore(e)}updateCssClasses(e,t){super.updateCssClasses(e,t),tn(e,t)}calcCssClasses(e){let t=super.calcCssClasses(e);return this.dropdownListModelValue&&this.dropdownListModelValue.updateCssClasses(t.popup,t.list),t}themeChanged(e){this.colorsCalculated=!1,this.updateColors(e.cssVariables)}setSurveyImpl(e,t){super.setSurveyImpl(e,t),this.survey&&(this.updateColors(this.survey.themeVariables),this.updateRenderAsBasedOnDisplayMode())}dispose(){super.dispose(),this.dropdownListModelValue&&(this.dropdownListModelValue.dispose(),this.dropdownListModelValue=void 0)}get a11yInputAriaRole(){return this.isDropdown?"combobox":null}get isNewA11yStructure(){return!0}get a11y_input_ariaRole(){return"radiogroup"}}nf.colorsCalculated=!1,V([e_({defaultValue:!1})],nf.prototype,"inputHasValue",void 0),V([e_()],nf.prototype,"autoGenerate",void 0),V([e_()],nf.prototype,"rateValues",void 0),V([e_()],nf.prototype,"rateMin",void 0),V([e_()],nf.prototype,"rateMax",void 0),V([e_()],nf.prototype,"rateStep",void 0),V([e_()],nf.prototype,"rateCount",void 0),V([e_({localizable:{markdown:!0,onCreate:(e,t)=>t.onStringChanged.add(()=>e.setPropertyValue("hasMinRateDescription",!t.isEmpty))}})],nf.prototype,"minRateDescription",void 0),V([e_({localizable:{markdown:!0,onCreate:(e,t)=>t.onStringChanged.add(()=>e.setPropertyValue("hasMaxRateDescription",!t.isEmpty))}})],nf.prototype,"maxRateDescription",void 0),V([e_()],nf.prototype,"displayRateDescriptionsAsExtremeItems",void 0),V([e_()],nf.prototype,"displayMode",void 0),V([e_()],nf.prototype,"rateDescriptionLocation",void 0),V([e_()],nf.prototype,"rateType",void 0),V([e_()],nf.prototype,"scaleColorMode",void 0),V([e_()],nf.prototype,"rateColorMode",void 0),V([e_({getDefaultValue:e=>e.getDefaultItemComponent()})],nf.prototype,"itemComponent",void 0),V([e_({localizable:{defaultStr:"ratingOptionsCaption"}})],nf.prototype,"placeholder",void 0),H.addClass("ratingitem",[],function(e){return new ny(e,"")},"itemvalue"),H.addClass("rating",[{name:"showCommentArea:switch",visible:!0},{name:"rateType",alternativeName:"rateDisplayMode",default:"labels",choices:["labels","stars","smileys"]},{name:"scaleColorMode",default:"monochrome",choices:["monochrome","colored"],visibleIf:function(e){return"smileys"==e.rateType}},{name:"rateColorMode",default:"scale",choices:["default","scale"],visibleIf:function(e){return"smileys"==e.rateType&&"monochrome"==e.scaleColorMode}},{name:"autoGenerate",default:!0,choices:[!0,!1]},{name:"rateCount:number",default:5,onSettingValue:(e,t)=>
10t<2?2:t>p.ratingMaximumRateValueCount&&t>e.rateValues.length?p.ratingMaximumRateValueCount:t>10&&"smileys"==e.rateType?10:t},{name:"rateValues:ratingitem[]",baseValue:function(){return E("choices_Item")},visibleIf:function(e){return!e.autoGenerate}},{name:"rateMin:number",default:1,onSettingValue:(e,t)=>t>e.rateMax-e.rateStep?e.rateMax-e.rateStep:t,visibleIf:function(e){return!!e.autoGenerate}},{name:"rateMax:number",default:5,onSettingValue:(e,t)=>t<e.rateMin+e.rateStep?e.rateMin+e.rateStep:t,visibleIf:function(e){return!!e.autoGenerate}},{name:"rateStep:number",default:1,minValue:.1,onSettingValue:(e,t)=>(t<=0&&(t=1),t>e.rateMax-e.rateMin&&(t=e.rateMax-e.rateMin),t),visibleIf:function(e){return!!e.autoGenerate}},{name:"minRateDescription",alternativeName:"mininumRateDescription",serializationProperty:"locMinRateDescription"},{name:"maxRateDescription",alternativeName:"maximumRateDescription",serializationProperty:"locMaxRateDescription"},{name:"displayRateDescriptionsAsExtremeItems:boolean",default:!1,visibleIf:function(e){return"labels"==e.rateType}},{name:"rateDescriptionLocation",default:"leftRight",choices:["leftRight","top","bottom","topBottom"]},{name:"displayMode",default:"auto",choices:["auto","buttons","dropdown"]},{name:"itemComponent",visible:!1,defaultFunc:e=>e?(e.getOriginalObj&&(e=e.getOriginalObj()),e.getDefaultItemComponent()):"sv-rating-item"}],function(){return new nf("")},"question"),sm.Instance.registerQuestion("rating",e=>new nf(e));class nb extends tj{getBaseType(){return"sliderlabel"}onGetText(e){return e||!this.locOwner?super.onGetText(e):this.locOwner.getTextByItem(this)}getCorrectValue(e){return"number"==typeof e?e:w.isNumber(e)?parseFloat(e.toString()):this.value||0}}V([e_({defaultValue:!1})],nb.prototype,"showValue",void 0);class nw extends tz{get labelCount(){return this.customLabels.length>0?this.customLabels.length:this.tickSize?Math.round(100/this.tickSize)+2:this.getPropertyValue("labelCount")}set labelCount(e){this.setPropertyValue("labelCount",e)}get allowSwap(){return!this.minRangeLength&&this.getPropertyValue("allowSwap",!0)}set allowSwap(e){this.setPropertyValue("allowSwap",e)}constructor(e){super(e),this.getThumbContainerCss=e=>new eX().append(this.cssClasses.thumbContainer).append(this.cssClasses.thumbContainerIndeterminateMode,!!this.isIndeterminate).append(this.cssClasses.thumbContainerFocusedMode,e===this.focusedThumb).toString(),this.getLabelCss=e=>new eX().append(this.cssClasses.label).append(this.cssClasses.labelLongMod,e.renderedHtml.length>10).toString(),this.isIndeterminate=!1,this.getTrackPercentLeft=()=>{let{renderedValue:e,sliderType:t,renderedMin:s}=this;return"single"===t?e[0]>0?this.getPercent(Math.max(0,s)):this.getPercent(e[0]):this.getPercent(Math.min(...e))},this.getTrackPercentRight=()=>{let{renderedValue:e,sliderType:t,renderedMax:s}=this;return 100-("single"===t?e[0]>0?this.getPercent(e[0]):this.getPercent(Math.min(0,s)):this.getPercent(Math.max(...e)))},this.getPercent=e=>{let{renderedMax:t,renderedMin:s}=this;return Math.abs(e-s)/(t-s)*100},this.ensureMaxRangeBorders=(e,t)=>{let{renderedMaxRangeLength:s,renderedValue:i}=this,n=i.slice(),r=n[t],a=!1;n[t]=e;for(let e=0;e<n.length-1;e++)if(Math.abs(n[e]-n[e+1])>s){a=!0;break}return a?r:e},this.ensureMinRangeBorders=(e,t)=>{let{renderedMinRangeLength:s,renderedValue:i,allowSwap:n,renderedMin:r,renderedMax:a}=this,o=i.slice(),l=o[t],u=!1;o[t]=e;for(let e=0;e<o.length-1;e++)if(Math.abs(o[e]-o[e+1])<s){u=!0;break}if(!n){let s=t>0?o[t-1]:r,i=t<o.length-1?o[t+1]:a;(e<=s||e>=i)&&(u=!0)}return u?l:e},this.getClosestToStepValue=e=>{let{step:t,renderedMin:s,renderedMax:i}=this,n=s+Math.trunc((i-s)/t)*t,r=s+Math.round((e-s)/t)*t;return Math.min(n,r)},this.handleRangeOnChange=e=>{if(!this.isRangeMoving||!this.isAllowToChange())return;let{renderedMax:t,renderedMin:s,renderedValue:i,ensureMaxRangeBorders:n,ensureMinRangeBorders:r}=this,a=e.target,o=this.oldInputValue-a.value;this.oldInputValue=+a.value;let l=!1;for(let e=0;e<i.length;e++){let a=i[e]-o;(a=r(a=n(a,e),e))<=t&&a>=s?i.splice(e,1,a):l=!0}if(l){l=!1;return}},this.prepareInputRangeForMoving=(e,t)=>
10{let{renderedMax:s,renderedMin:i}=this;this.isRangeMoving=!0,this.animatedThumb=!1;let n=e4(t);if(!n)return;let r=n.querySelector("#"+this.id+"-sjs-slider-input-range-input");r.style.setProperty("--sjs-range-slider-range-input-thumb-width","20px"),r.style.setProperty("--sjs-range-slider-range-input-thumb-left","initial"),r.style.setProperty("--sjs-range-slider-range-input-thumb-position","static");let a=(e.clientX-t.getBoundingClientRect().x)/t.getBoundingClientRect().width*100/100*(s-i)+i;r.value=""+a,this.oldInputValue=a},this.handleRangePointerDown=(e,t)=>{let{dragOrClickHelper:s,allowDragRange:i,step:n,prepareInputRangeForMoving:r}=this,a=e.target;n&&(a.step="0.01"),i&&(s.dragHandler=()=>{r.call(this,e,t)},s.onPointerDown(e))},this.handleRangePointerUp=(e,t)=>{let{step:s,renderedValue:i,getClosestToStepValue:n}=this,r=e.target;if(this.isRangeMoving){if(this.refreshInputRange(),this.isRangeMoving=!1,s){r.step=""+s;for(let e=0;e<i.length;e++)i[e]=n(i[e]);this.setSliderValue(i)}return}r.style.setProperty("--sjs-range-slider-range-input-thumb-width","0px"),r.style.setProperty("--sjs-range-slider-range-input-thumb-left","initial"),r.style.setProperty("--sjs-range-slider-range-input-thumb-position","static"),this.setValueByClickOnPath(e,t)},this.refreshInputRange=e=>{let{allowDragRange:t,renderedValue:s,getPercent:i}=this;if(!t)return;let n=e||this.questionRootElement.querySelector("#"+this.id+"-sjs-slider-input-range-input");if(!n)return;let r=i(s[s.length-1]),a=i(s[0]);n.style.setProperty("--sjs-range-slider-range-input-thumb-width",`calc(${r-a}% - 20px - 20px)`),n.style.setProperty("--sjs-range-slider-range-input-thumb-left",`calc(${a}% + 20px)`),n.style.setProperty("--sjs-range-slider-range-input-thumb-position","absolute")},this.setSliderValue=e=>{if(this.isAllowToChange()){let t;"single"===this.sliderType?t=Array.isArray(e)?e[0]:e:"range"===this.sliderType&&(t=e),this.value=t,this.resetPropertyValue("renderedValue")}},this.setValueByClickOnPath=(e,t)=>{let{renderedMax:s,renderedMin:i}=this,r="rtl"==n.getComputedStyle(n.getBody()).direction,a=(e.clientX-t.getBoundingClientRect().x)/t.getBoundingClientRect().width*100;r&&(a=100-a);let o=a/100*(s-i)+i;this.setValueByClick(o,e.target)},this.setValueByClick=(e,t)=>{let{step:s,getClosestToStepValue:i,ensureMaxRangeBorders:n,ensureMinRangeBorders:r,renderedValue:a,refreshInputRange:o,setSliderValue:l}=this;this.animatedThumb=!0;let u=a.slice(),h=0;for(let t=0;t<u.length;t++){let s=Math.abs(u[h]-e);Math.abs(u[t]-e)<s&&(h=t)}if(u.length>1&&(e=r(e=n(e,h),h)),u[h]=e,s){let e=a.slice();for(let t=0;t<u.length;t++){let n=e[t]/s,r=u[t]/s;Math.round(r)===n&&(r>n?u[t]=u[t]+s:r<n&&(u[t]=u[t]-s)),u[t]=i(u[t])}}l(u),o()},this.handleOnChange=(e,t)=>
10{if(!this.isAllowToChange()||null===this.oldValue)return;let{allowSwap:s,ensureMaxRangeBorders:i,ensureMinRangeBorders:n,renderedValue:r}=this,a=+e.target.value;r.length>1&&(a=i(a,t),s||(a=n(a,t))),r.splice(t,1,a)},this.handlePointerDown=e=>{let{step:t,renderedValue:s}=this;if(t)for(let e=0;e<s.length;e++)this.questionRootElement.querySelector("#"+this.id+`-sjs-slider-input-${e}`).step=.01;this.oldValue=this.renderedValue,this.animatedThumb=!1},this.handlePointerUp=e=>{e.stopPropagation();let{step:t,focusedThumb:s,renderedValue:i,allowSwap:n,renderedMinRangeLength:r,getClosestToStepValue:a,refreshInputRange:o,setSliderValue:l}=this,u=i[s];if(e.target,i.sort((e,t)=>e-t),this.focusedThumb=i.indexOf(u),t)for(let e=0;e<i.length;e++)i[e]=a(i[e]),this.questionRootElement.querySelector("#"+this.id+`-sjs-slider-input-${e}`).step=t;if(n){for(let e=0;e<i.length-1;e++)if(Math.abs(i[e]-i[e+1])<r){this.setPropertyValue("renderedValue",this.oldValue);break}}l(i),o(),this.oldValue=null},this.handleKeyDown=e=>{this.oldValue=this.renderedValue,this.animatedThumb=!0},this.handleKeyUp=e=>{this.oldValue=null,this.setSliderValue(this.renderedValue)},this.handleOnFocus=e=>{this.focusedThumb=e},this.handleOnBlur=()=>{this.focusedThumb=null},this.handleLabelPointerUp=(e,t)=>{let s=e.target;isNaN(t)||this.setValueByClick(t,s)},this.getTooltipValue=e=>{let{step:t,getClosestToStepValue:s,renderedValue:i,tooltipFormat:n,formatNumber:r}=this,a=i[e];return a=r(a=t?s(a):a),n.replace("{0}",""+a)},this.getLabelText=e=>{let{step:t,renderedMax:s,renderedMin:i,renderedLabelCount:n,formatNumber:r}=this,a=n-1,o=0===a?0:e*(s-i)/a;return t%1!=0?""+r(o+i):""+Math.round(o+i)},this.getLabelPosition=e=>{let{max:t,min:s,renderedLabelCount:i,customLabels:n}=this,r=i-1;return 0===r?0:s+e*(t-s)/r},this.isRangeMoving=!1,this.oldInputValue=null,this.oldValue=null,this.calcRenderedValue=()=>{let e,{renderedMax:t,renderedMin:s,renderedMaxRangeLength:i,getClosestToStepValue:n,sliderType:r}=this;if("single"===r)return null==(e=this.ensureValueRespectMinMax(this.value))||0===e.length?(this.isIndeterminate=!0,this.isNegativeScale?[Math.min(t,0)]:[s]):Array.isArray(e)?[e[0]]:[e];if(0===(e=Array.isArray(this.value)?this.value.slice():[]).length){let e=t-s;if(this.isIndeterminate=!0,Math.abs(e)>i){let r=(e-i)/2;return[n(s+r),n(t-r)]}return[s,t]}return e.map(e=>this.ensureValueRespectMinMax(e))},this.createItemValues("customLabels"),this.dragOrClickHelper=new sZ(null,!1)}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"autoGenerate"===e&&this.executeOnSyncPropertiesChanged(()=>{this.autoGenerate||0!==this.customLabels.length||this.setPropertyValue("customLabels",this.calcGeneratedLabels()),this.autoGenerate&&this.customLabels.splice(0,this.customLabels.length)}),["min","max","step","autoGenerate","labelFormat","labelCount"].indexOf(e)>-1&&(this.resetPropertyValue("generatedLabels"),this.locStrsChanged()),["min","max","step","maxRangeLength","minRangeLength","sliderType"].indexOf(e)>-1&&this.resetPropertyValue("renderedValue")}get generatedLabels(){return this.getPropertyValue("generatedLabels",void 0,()=>this.calcGeneratedLabels())}get renderedValue(){return this.getPropertyValue("renderedValue",void 0,()=>this.calcRenderedValue())}set renderedValue(e){this.setPropertyValue("renderedValue",e)}getType(){return"slider"}getAllChildren(){return[...super.getAllChildren(),...this.customLabels]}get rootCss(){return new eX().append(this.cssClasses.root).append(this.cssClasses.rootSingleMode,"single"===this.sliderType).append(this.cssClasses.rootNegativeScaleMode,!!this.isNegativeScale).append(this.cssClasses.rootDesignMode,!!this.isDesignMode).append(this.cssClasses.rootAnimatedThumbMode,!!this.animatedThumb).append(this.cssClasses.rootTooltipsAlwaysMode,"always"===this.tooltipVisibility).append(this.cssClasses.rootLabelsShowValueTextMode,this.isLabelsShowValueText).toString()}get tooltipCss(){return new eX().append(this.cssClasses.tooltip).append(this.cssClasses.tooltipOnHoverMode,"auto"===this.tooltipVisibility).toString()}get renderedLabelCount(){return this.labelCount<0?6:this.labelCount}get renderedMax(){return this.max}get renderedMin(){return this.min}get renderedMaxRangeLength(){var e;return null!=(e=this.maxRangeLength)?e:this.renderedMax-this.renderedMin}get renderedMinRangeLength(){var e;return null!=(e=this.minRangeLength)?e:this.step}get renderedLabels(){let e=this.generatedLabels,t=this.customLabels;return this.autoGenerate?e:t}get isNegativeScale(){return this.renderedMin<0}getTextByItem(e){let t=e.value.toString();return this.labelFormat.replace("{0}",""+t)}endLoadingFromJson(){super.endLoadingFromJson(),void 0!==this.jsonObj.customLabels&&(this.autoGenerate=!1),this.isDesignMode||"range"!==this.sliderType||this.createNewArray("value")}updateValueFromSurvey(e,t){e=this.ensureValueRespectMinMax(e),super.updateValueFromSurvey(e,t),this.isIndeterminate&&(this.isIndeterminate=!1),this.resetPropertyValue("renderedValue")}itemValuePropertyChanged(e,t,s,i){if(!0===this.autoGenerate){let t=this.generatedLabels.indexOf(e);this.autoGenerate=!1,this.setPropertyValue("customLabels",this.calcGeneratedLabels()),e=this.customLabels[t]}"text"===t&&(Number.isFinite(+i)?e.value=+i:e.text=i),super.itemValuePropertyChanged(e,t,s,i)}
10afterRenderQuestionElement(e){super.afterRenderQuestionElement(e),this.questionRootElement=e}beforeDestroyQuestionElement(e){super.beforeDestroyQuestionElement(e),this.questionRootElement=void 0}runConditionCore(e){super.runConditionCore(e),this.runExpressionByProperty("maxValueExpression",e,e=>{this.max=null!=e?e:this.renderedMax}),this.runExpressionByProperty("minValueExpression",e,e=>{this.min=null!=e?e:this.renderedMin})}setNewValue(e){e=this.ensureValueRespectMinMax(e),super.setNewValue(e),this.isIndeterminate&&(this.isIndeterminate=!1),this.resetPropertyValue("renderedValue")}setDefaultValue(){super.setDefaultValue();let e=this.defaultValue;"single"===this.sliderType&&Array.isArray(e)&&this.setSliderValue(e),this.resetPropertyValue("renderedValue")}getDefaultTitleActions(){let e=[];if(!this.isDesignMode){let t=new e2({locTitleName:"clearCaption",id:`sv-clr-btn-${this.id}`,action:()=>{this.clearValueFromUI()},innerCss:this.cssClasses.clearButton,visible:new eb(()=>this.allowClear&&!this.isReadOnly),ariaLabelledBy:this.a11y_input_ariaLabelledBy});e.push(t)}return e}getItemValueType(){return"sliderlabel"}createLabelItem(e){let t=new nb(e);return t.locOwner=this,t}calcGeneratedLabels(){let e=[];for(let t=0;t<this.renderedLabelCount;t++)e.push(this.createLabelItem(this.getLabelPosition(t)));return e}formatNumber(e){return parseFloat(e.toFixed(4))}ensureValueRespectMinMax(e){return Array.isArray(e)?e.forEach((t,s,i)=>{t<this.min&&(e[s]=this.min),t>this.max&&(e[s]=this.max),0===s?null==t&&(e[s]=this.min):s===i.length-1&&null==t&&(e[s]=this.max)}):(e<this.min&&(e=this.min),e>this.max&&(e=this.max)),e}isAllowToChange(){return!this.isReadOnly&&!this.isDisabledAttr&&!this.isPreviewStyle&&!this.isDisabledStyle}get isLabelsShowValueText(){return!!this.customLabels.find(e=>e.showValue)}}function nV(e,t,s,i){return e>=t?s?e+i:t-i:s?t:e}V([e_({defaultValue:"single"})],nw.prototype,"sliderType",void 0),V([e_({defaultValue:100})],nw.prototype,"max",void 0),V([e_({defaultValue:0})],nw.prototype,"min",void 0),V([e_({defaultValue:null})],nw.prototype,"maxValueExpression",void 0),V([e_({defaultValue:null})],nw.prototype,"minValueExpression",void 0),V([e_({defaultValue:null})],nw.prototype,"maxRangeLength",void 0),V([e_({defaultValue:null})],nw.prototype,"minRangeLength",void 0),V([e_({defaultValue:"{0}"})],nw.prototype,"tooltipFormat",void 0),V([e_({defaultValue:"{0}"})],nw.prototype,"labelFormat",void 0),V([e_({defaultValue:"auto"})],nw.prototype,"tooltipVisibility",void 0),V([e_()],nw.prototype,"step",void 0),V([e_({defaultValue:!0})],nw.prototype,"showLabels",void 0),V([e_({defaultValue:!0})],nw.prototype,"autoGenerate",void 0),V([e_()],nw.prototype,"customLabels",void 0),V([e_({defaultValue:!0})],nw.prototype,"allowDragRange",void 0),V([e_({defaultValue:null})],nw.prototype,"tickSize",void 0),V([e_({defaultValue:!1})],nw.prototype,"allowClear",void 0),V([e_({defaultValue:null})],nw.prototype,"focusedThumb",void 0),V([e_({defaultValue:null})],nw.prototype,"animatedThumb",void 0),H.addClass("sliderlabel",[{name:"!value:number"},{name:"visibleIf",visible:!1},{name:"enableIf",visible:!1},{name:"showValue:boolean",locationInTable:"detail",default:!1}],e=>new nb(e),"itemvalue"),H.addClass("slider",[{name:"sliderType",default:"single",choices:["single","range"]},{name:"autoGenerate",default:!0,isSerializable:!1,choices:[!0,!1]},{name:"min:number",default:0,onSettingValue:(e,t)=>nV(t,e.max,!1,e.step)},{name:"max:number",default:100,onSettingValue:(e,t)=>nV(e.min,t,!0,e.step)},{name:"step:number",default:1},{name:"minValueExpression",type:"expression"},{name:"maxValueExpression",type:"expression"},{name:"minRangeLength:number",visibleIf:function(e){return"range"===e.sliderType}},{name:"maxRangeLength:number",visibleIf:function(e){return"range"===e.sliderType}},{name:"customLabels:sliderlabel[]",visibleIf:function(e){return!e.autoGenerate}},{name:"showLabels:boolean",default:!0},{name:"tooltipVisibility:string",default:"auto",choices:["auto","always","never"]},{name:"labelFormat:string",default:"{0}"},{name:"tooltipFormat:string",default:"{0}"},{name:"allowDragRange:boolean",default:!0,visible:!1,visibleIf:function(e){return"range"===e.sliderType}},{name:"allowSwap:boolean",default:!0,visibleIf:function(e){return"range"===e.sliderType}},{name:"labelCount:number",default:-1,visibleIf:function(e){return e.autoGenerate}},{name:"allowClear:boolean",default:!1}],function(){return new nw("")},"question"),sm.Instance.registerQuestion("slider",e=>new nw(e));
10class nx extends tz{getType(){return"boolean"}isLayoutTypeSupported(e){return!0}supportAutoAdvance(){return"checkbox"!==this.renderAs}get isIndeterminate(){return this.isEmpty()}get booleanValue(){return this.isEmpty()?null:this.value==this.getValueTrue()}set booleanValue(e){this.isReadOnly||this.isDesignMode||this.setBooleanValue(e)}setBooleanValue(e){this.isValueEmpty(e)?this.value=void 0:this.value=!0==e?this.getValueTrue():this.getValueFalse()}get defaultValue(){return this.getPropertyValue("defaultValue")}set defaultValue(e){!0===e&&(e="true"),!1===e&&(e="false"),this.setPropertyValue("defaultValue",e),this.updateValueWithDefaults()}getDefaultValue(){let e=this.defaultValue;if("indeterminate"!==e&&null!=e)return"true"==e?this.getValueTrue():this.getValueFalse()}get locTitle(){let e=this.getLocalizableString("title");return(this.isLabelRendered&&!this.showTitle||this.isValueEmpty(e.text))&&!this.isValueEmpty(this.locLabel.text)?this.locLabel:e}get labelRenderedAriaID(){return this.isLabelRendered?this.ariaTitleId:null}beforeDestroyQuestionElement(e){super.beforeDestroyQuestionElement(e),this.leftAnswerElement=void 0}get isLabelRendered(){return"hidden"===this.titleLocation||this.useTitleAsLabel}get canRenderLabelDescription(){return this.isLabelRendered&&this.hasDescription&&(this.hasDescriptionUnderTitle||this.hasDescriptionUnderInput)}get isDeterminated(){return null!==this.booleanValue&&void 0!==this.booleanValue}get locLabelLeft(){return this.swapOrder?this.locLabelTrue:this.locLabelFalse}get locLabelRight(){return this.swapOrder?this.locLabelFalse:this.locLabelTrue}getValueTrue(){return void 0===this.valueTrue||this.valueTrue}getValueFalse(){return void 0!==this.valueFalse&&this.valueFalse}setDefaultValue(){this.isDefaultValueSet("true",this.valueTrue)&&this.setBooleanValue(!0),this.isDefaultValueSet("false",this.valueFalse)&&this.setBooleanValue(!1);let e=this.defaultValue;("indeterminate"===e||null==e)&&this.setBooleanValue(void 0)}isDefaultValueSet(e,t){return this.defaultValue==e||void 0!==t&&this.defaultValue===t}getDisplayValueCore(e,t){return t==this.getValueTrue()?this.locLabelTrue.textOrHtml:this.locLabelFalse.textOrHtml}getItemCssValue(e){return new eX().append(e.item).append(e.itemOnError,this.hasCssError()).append(e.itemDisabled,this.isDisabledStyle).append(e.itemReadOnly,this.isReadOnlyStyle).append(e.itemPreview,this.isPreviewStyle).append(e.itemHover,!this.isDesignMode).append(e.itemChecked,!!this.booleanValue).append(e.itemExchanged,!!this.swapOrder).append(e.itemIndeterminate,!this.isDeterminated).append(e.itemIsLabelRendered,!!this.isLabelRendered).toString()}getItemCss(){return this.getItemCssValue(this.cssClasses)}getCheckboxItemCss(){return this.getItemCssValue({item:this.cssClasses.checkboxItem,itemOnError:this.cssClasses.checkboxItemOnError,itemDisabled:this.cssClasses.checkboxItemDisabled,itemDisable:this.cssClasses.checkboxItemDisabled,itemReadOnly:this.cssClasses.checkboxItemReadOnly,itemPreview:this.cssClasses.checkboxItemPreview,itemChecked:this.cssClasses.checkboxItemChecked,itemIndeterminate:this.cssClasses.checkboxItemIndeterminate,itemIsLabelRendered:this.cssClasses.checkboxIsLabelRendered})}getLabelCss(e){return new eX().append(this.cssClasses.label).append(this.cssClasses.disabledLabel,!e===this.booleanValue||this.isDisabledStyle).append(this.cssClasses.labelReadOnly,this.isReadOnlyStyle).append(this.cssClasses.labelPreview,this.isPreviewStyle).append(this.cssClasses.labelTrue,!this.isIndeterminate&&!this.swapOrder===e).append(this.cssClasses.labelFalse,!this.isIndeterminate&&e===this.swapOrder).toString()}updateValueFromSurvey(e,t=!1){super.updateValueFromSurvey(e,t)}onValueChanged(){super.onValueChanged()}get svgIcon(){return this.booleanValue&&this.cssClasses.svgIconCheckedId?this.cssClasses.svgIconCheckedId:!this.isDeterminated&&this.cssClasses.svgIconIndId?this.cssClasses.svgIconIndId:!this.booleanValue&&this.cssClasses.svgIconUncheckedId?this.cssClasses.svgIconUncheckedId:this.cssClasses.svgIconId}get itemSvgIcon(){return this.isPreviewStyle&&this.cssClasses.itemPreviewSvgIconId?this.cssClasse
10s.itemPreviewSvgIconId:this.cssClasses.itemSvgIconId}get allowClick(){return this.isIndeterminate&&!this.isInputReadOnly}getCheckedLabel(){return!0===this.booleanValue?this.locLabelTrue:!1===this.booleanValue?this.locLabelFalse:void 0}setQuestionValue(e,t=!0){"true"===e&&"true"!==this.valueTrue&&(e=!0),"false"===e&&"false"!==this.valueFalse&&(e=!1),("indeterminate"===e||null===e)&&(e=void 0),super.setQuestionValue(e,t)}onLabelClick(e,t){return this.allowClick&&(ti(e),this.booleanValue=t),!0}calculateBooleanValueByEvent(e,t){let s=!1;n.isAvailable()&&(s="rtl"==n.getComputedStyle(e.target).direction),this.booleanValue=s?!t:t}onSwitchClickModel(e){if(this.allowClick){ti(e);var t=e.offsetX/e.target.offsetWidth>.5;this.calculateBooleanValueByEvent(e,t);return}return!0}onKeyDownCore(e){return("ArrowLeft"===e.key||"ArrowRight"===e.key)&&(e.stopPropagation(),this.calculateBooleanValueByEvent(e,"ArrowRight"===e.key)),!0}getRadioItemClass(e,t){let s;return e.radioItem&&(s=e.radioItem),e.radioItemChecked&&t===this.value&&(s=(s?s+" ":"")+e.radioItemChecked),this.isDisabledStyle&&(s+=" "+e.radioItemDisabled),this.isReadOnlyStyle&&(s+=" "+e.radioItemReadOnly),this.isPreviewStyle&&(s+=" "+e.radioItemPreview),s}supportResponsiveness(){return!0}getCompactRenderAs(){return"radio"}createActionContainer(e){return super.createActionContainer("checkbox"!==this.renderAs)}getIsTitleRenderedAsString(){return!1}get isNewA11yStructure(){return!0}get a11y_input_ariaRole(){return"switch"}}V([e_({localizable:!0})],nx.prototype,"label",void 0),V([e_({defaultValue:!1,onSet:(e,t)=>{e&&t.setPropertyValue("titleLocation","hidden")}})],nx.prototype,"useTitleAsLabel",void 0),V([e_({localizable:{defaultStr:"booleanCheckedLabel",markdown:!0}})],nx.prototype,"labelTrue",void 0),V([e_({defaultValue:!1})],nx.prototype,"swapOrder",void 0),V([e_({localizable:{defaultStr:"booleanUncheckedLabel",markdown:!0}})],nx.prototype,"labelFalse",void 0),V([e_()],nx.prototype,"valueTrue",void 0),V([e_()],nx.prototype,"valueFalse",void 0),H.addClass("boolean",[{name:"showCommentArea:switch",visible:!0},{name:"label:text",serializationProperty:"locLabel",isSerializable:!1,visible:!1},{name:"labelTrue",serializationProperty:"locLabelTrue"},{name:"labelFalse",serializationProperty:"locLabelFalse"},"valueTrue","valueFalse",{name:"swapOrder:boolean"},{name:"renderAs",default:"default",visible:!1},{name:"useTitleAsLabel",default:!1,visible:!1}],function(){return new nx("")},"question"),sm.Instance.registerQuestion("boolean",e=>new nx(e));class nI extends iv{getBaseType(){return"imageitemvalue"}isPropertyStoredInHash(e){return"imageLink"!==e&&super.isPropertyStoredInHash(e)}getLocale(){return this.locOwner?this.locOwner.getLocale():""}
10getMarkdownHtml(e,t,s){return this.locOwner?this.locOwner.getMarkdownHtml(e,t,s):void 0}getRenderer(e){return this.locOwner?this.locOwner.getRenderer(e):null}getRendererContext(e){return this.locOwner?this.locOwner.getRendererContext(e):e}getProcessedText(e,t){return this.locOwner?this.locOwner.getProcessedText(e,t):e}onErrorHandler(){this.contentNotLoaded=!0}set contentNotLoaded(e){this.locOwner instanceof nE&&"video"==this.locOwner.contentMode?this.videoNotLoaded=e:this.imageNotLoaded=e}get contentNotLoaded(){return this.locOwner instanceof nE&&"video"==this.locOwner.contentMode?this.videoNotLoaded:this.imageNotLoaded}}V([e_({defaultValue:!1})],nI.prototype,"videoNotLoaded",void 0),V([e_({defaultValue:!1})],nI.prototype,"imageNotLoaded",void 0),V([e_({localizable:!0})],nI.prototype,"imageLink",void 0);class nE extends iy{constructor(e){super(e),this.isResponsiveValue=!1,this.onContentLoaded=(e,t)=>{e.contentNotLoaded=!1;let s=t.target;"video"==this.contentMode?e.aspectRatio=s.videoWidth/s.videoHeight:e.aspectRatio=s.naturalWidth/s.naturalHeight,this._width&&this.processResponsiveness(0,this._width)},this.gridColCount=void 0,this.colCount=0,this.calcIsResponsive()}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),["minImageWidth","maxImageWidth","minImageHeight","maxImageHeight","visibleChoices","colCount","isResponsiveValue"].indexOf(e)>-1&&this._width&&this.processResponsiveness(0,this._width),("imageWidth"===e||"imageHeight"===e)&&this.calcIsResponsive(),"imageLink"===e&&(this.imageNotLoaded=!1,this.videoNotLoaded=!1)}getType(){return"imagepicker"}supportAutoAdvance(){return!this.multiSelect}get hasSingleInput(){return!1}getItemValueType(){return"imageitemvalue"}get isCompositeQuestion(){return!0}get itemFlowDirection(){return"row"}supportOther(){return!1}supportNone(){return!1}supportRefuse(){return!1}supportDontKnow(){return!1}isAnswerCorrect(){return this.multiSelect?w.isArrayContainsEqual(this.value,this.correctAnswer):super.isAnswerCorrect()}isItemSelected(e){var t=this.value;if(this.isValueEmpty(t)||!e.imageLink||e.contentNotLoaded)return!1;if(!this.multiSelect)return this.isTwoValueEquals(t,e.value);if(!Array.isArray(t))return!1;for(var s=0;s<t.length;s++)if(this.isTwoValueEquals(t[s],e.value))return!0;return!1}getItemEnabled(e){return!!e.imageLink&&!e.contentNotLoaded&&super.getItemEnabled(e)}clearIncorrectValues(){if(this.multiSelect){var e=this.value;if(e){if(!Array.isArray(e)||0==e.length)return void this.clearValue(!0);for(var t=[],s=0;s<e.length;s++)this.hasUnknownValue(e[s],!0)||t.push(e[s]);t.length!=e.length&&(0==t.length?this.clearValue(!0):this.value=t)}}else super.clearIncorrectValues()}getDisplayValueCore(e,t){return this.multiSelect||Array.isArray(t)?this.getDisplayArrayValue(e,t):super.getDisplayValueCore(e,t)}endLoadingFromJson(){super.endLoadingFromJson(),!this.isDesignMode&&this.multiSelect&&(this.createNewArray("renderedValue"),this.createNewArray("value")),this.calcIsResponsive()}getValueCore(){var e=super.getValueCore();return void 0!==e?e:this.multiSelect?[]:e}convertValToArrayForMultSelect(e){return!this.multiSelect||this.isValueEmpty(e)||Array.isArray(e)?e:[e]}renderedValueFromDataCore(e){return this.convertValToArrayForMultSelect(e)}renderedValueToDataCore(e){return this.convertValToArrayForMultSelect(e)}get imageScale(){return this.survey?this.survey.widthScale/100:1}get renderedImageHeight(){return(this.isResponsive?Math.floor(this.responsiveImageHeight):this.imageHeight*this.imageScale)||150*this.imageScale}get renderedImageWidth(){return(this.isResponsive?Math.floor(this.responsiveImageWidth):this.imageWidth*this.imageScale)||200*this.imageScale}valueToData(e){return e}get inputType(){return this.multiSelect?"checkbox":"radio"}isBuiltInChoice(e){return!1}addToVisibleChoices(e,t){this.addNewItemToVisibleChoices(e,t)}getSelectBaseRootCss(){let e=this.isResponsive;return new eX().append(super.getSelectBaseRootCss()).append(this.cssClasses.rootResponsive,e).append(this.cssClasses.rootStatic,!e).append(this.cssClasses.rootColumn,1==this.getCurrentColCount()).toString()}get isResponsive(){return this.isResponsiveValue}get exactSizesAreEmpty(){return!["imageHeight","imageWidth"].some(e=>void 0!==this[e]&&null!==this[e])}calcIsResponsive(){this.isResponsiveValue=this.exactSizesAreEmpty}
10getObservedElementSelector(){return e8(this.cssClasses.root)}supportResponsiveness(){return!0}needResponsiveness(){return this.supportResponsiveness()}needResponsiveWidth(){return this.colCount>2}getCurrentColCount(){return void 0===this.responsiveColCount||0===this.colCount?this.colCount:this.responsiveColCount}getContainerStyle(){return this.isResponsive?{gridAutoFlow:this.gridColCount?null:"column",gridTemplateColumns:this.gridColCount?`repeat(${this.gridColCount}, 1fr)`:null}:{}}processResponsiveness(e,t){if(this._width=t=Math.floor(t),this.isResponsive){var s;let e,i,n=this.choices.length+ +!!this.isDesignMode,r=(this.gapBetweenItems||0)*this.imageScale,a=this.minImageWidth*this.imageScale,o=this.maxImageWidth*this.imageScale,l=this.maxImageHeight*this.imageScale,u=this.minImageHeight*this.imageScale,h=this.colCount,d=(((i=Math.floor((s=t)/(a+r)))+1)*(a+r)-r<=s&&i++,i);0===h?(e=(r+a)*n-r>t?Math.floor((t-r*(d-1))/d):Math.floor((t-r*(n-1))/n),this.gridColCount=Math.max(Math.min(n,d),1)):(d<h?(this.responsiveColCount=Math.max(d,1),h=this.responsiveColCount):this.responsiveColCount=h,this.gridColCount=this.responsiveColCount,e=Math.floor((t-r*(h-1))/h)),e=Math.max(a,Math.min(e,o));let c=5e-324;this.choices.forEach(t=>{let s=e/t.aspectRatio;c=s>c?s:c}),c>l?c=l:c<u&&(c=u);let p=this.responsiveImageWidth,g=this.responsiveImageHeight;return this.responsiveImageWidth=e,this.responsiveImageHeight=c,p!==this.responsiveImageWidth||g!==this.responsiveImageHeight}return!1}triggerResponsiveness(e=!0){e&&this.reCalcGapBetweenItemsCallback&&this.reCalcGapBetweenItemsCallback(),super.triggerResponsiveness(e)}afterRender(e){super.afterRender(e);let t=this.getObservedElementSelector(),s=e&&t?e.querySelector(t):void 0;s&&(this.reCalcGapBetweenItemsCallback=()=>{this.gapBetweenItems=Math.ceil(Number.parseFloat(n.getComputedStyle(s).gap))||16},this.reCalcGapBetweenItemsCallback())}get ariaRole(){return this.multiSelect?"group":"radiogroup"}get ariaRequired(){return null}get inputRequiredAttribute(){return this.multiSelect?this.hasRequiredError():null}}V([e_()],nE.prototype,"multiSelect",void 0),V([e_()],nE.prototype,"showLabel",void 0),V([e_()],nE.prototype,"imageHeight",void 0),V([e_({})],nE.prototype,"responsiveImageHeight",void 0),V([e_()],nE.prototype,"imageWidth",void 0),V([e_({})],nE.prototype,"responsiveImageWidth",void 0),V([e_()],nE.prototype,"imageFit",void 0),V([e_({onSet:(e,t)=>{"video"===e&&(t.showLabel=!0)}})],nE.prototype,"contentMode",void 0),V([e_({})],nE.prototype,"isResponsiveValue",void 0),V([e_({})],nE.prototype,"maxImageWidth",void 0),V([e_({})],nE.prototype,"minImageWidth",void 0),V([e_({})],nE.prototype,"maxImageHeight",void 0),V([e_({})],nE.prototype,"minImageHeight",void 0),V([e_({})],nE.prototype,"responsiveColCount",void 0),V([e_()],nE.prototype,"gridColCount",void 0),H.addClass("imageitemvalue",[{name:"imageLink:file",serializationProperty:"locImageLink"}],e=>new nI(e),"itemvalue"),H.addClass("responsiveImageSize",[],void 0,"number"),H.addClass("imagepicker",[{name:"showOtherItem",visible:!1},{name:"otherText",visible:!1},{name:"showNoneItem",visible:!1},{name:"showRefuseItem",visible:!1},{name:"showDontKnowItem",visible:!1},{name:"noneText",visible:!1},{name:"placeholder",visible:!1},{name:"otherErrorText",visible:!1},{name:"storeOthersAsComment",visible:!1},{name:"contentMode",default:"image",choices:["image","video"]},{name:"imageFit",default:"contain",choices:["none","contain","cover","fill"]},{name:"imageHeight:number",minValue:0},{name:"imageWidth:number",minValue:0},{name:"minImageWidth:responsiveImageSize",default:200,minValue:0},{name:"minImageHeight:responsiveImageSize",default:133,minValue:0},{name:"maxImageWidth:responsiveImageSize",default:3e3,minValue:0},{name:"maxImageHeight:responsiveImageSize",default:3e3,minValue:0},"showLabel:boolean",{name:"colCount:number",default:0,choices:[0,1,2,3,4,5]},"multiSelect:boolean"],function(){return new nE("")},"checkboxbase"),H.getProperty("imagepicker","choices").type="imageitemvalue[]",sm.Instance.registerQuestion("imagepicker",e=>new nE(e));class nS extends tz{constructor(e){super(e),this.onBgImageLoaded=()=>{this.svg&&this.bg&&(this.svg.setAttribute("viewBox",`0 0 ${this.bg.naturalWi
10dth} ${this.bg.naturalHeight}`),this.renderSVG())},this.onClickHandler=e=>{if(this.isInDesignMode&&this.selectedArea){let t=e.target.dataset.idx;if(t)this.selectedArea.removeCoord(Number(t));else{let[t,s]=this.scaleCoordsToSVG([e.offsetX,e.offsetY]);this.selectedArea.addCoord(t,s)}this.drawAreaControls();return}let t=e.target.dataset.uid;if(!t)return;let s=this.areas.find(e=>e.uniqueId===Number(t));this.mapItemToggle(s)},this.onMouseOverHandler=e=>{if(this.isInDesignMode&&this.selectedArea)return;let t=e.target.dataset.uid;t&&(this.hoveredUID=Number(t))},this.onMouseOutHandler=()=>{this.hoveredUID=null},this.onMouseDownHandler=e=>{void 0!==e.target.dataset.idx&&(this.activeControlPoint=e.target)},this.onMouseUpHandler=()=>{this.activeControlPoint=null},this.onMouseMoveHandler=e=>{if(!this.activeControlPoint)return;let[t,s]=this.scaleCoordsToSVG([e.offsetX,e.offsetY]),i=Number(this.activeControlPoint.dataset.idx);this.selectedArea.setCoord(i,t,s)},this.controlPoints=[],this.createItemValues("areas")}get isMultiSelect(){return!this.isDesignMode&&this.multiSelect}getType(){return"imagemap"}getAllChildren(){return[...super.getAllChildren(),...this.areas]}onValueChanged(){super.onValueChanged(),this.renderSVG()}localeChanged(){super.localeChanged(),this.renderSVG()}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"isSelectedInDesigner"===e&&!1===s&&(this.selectedArea=void 0),"multiSelect"===e&&this.clearValue(),["idleStrokeColor","idleStrokeWidth","idleFillColor","hoverStrokeColor","hoverStrokeWidth","hoverFillColor","selectedStrokeColor","selectedStrokeWidth","selectedFillColor"].indexOf(e)>-1&&this.updateCSSVariables(),this.isInDesignMode&&"areas"===e&&!this.areas.length&&(this.selectedArea=void 0),["areas","shape","selectedArea","hoveredUID"].indexOf(e)>-1&&this.renderSVG()}getValueCore(){var e=super.getValueCore();if(!(!this.isMultiSelect&&Array.isArray(e))||0!==e.length)return e}runConditionCore(e){if(super.runConditionCore(e),tj.runEnabledConditionsForItems(this.areas,void 0,e),tj.runConditionsForItems(this.areas,void 0,void 0,e,!0)){let e=this.getClearIfInvisible();("onHidden"==e||"onHiddenContainer"==e)&&this.clearIncorrectValues(),this.renderSVG()}}clearValueIfInvisibleCore(e){super.clearValueIfInvisibleCore(e),this.clearIncorrectValues()}clearIncorrectValues(){if(super.clearIncorrectValues(),this.value)if(this.isMultiSelect)this.value=this.value.filter(e=>{let t=this.areas.find(t=>t.value===e);return!!t&&t.isVisible});else{let e=this.areas.find(e=>e.value===this.value);e&&e.isVisible||(this.value=void 0)}}afterRenderQuestionElement(e){i.isAvailable()&&e&&this.initImageMap(e),super.afterRenderQuestionElement(e)}beforeDestroyQuestionElement(e){super.beforeDestroyQuestionElement(e),this.bg&&this.bg.removeEventListener("load",this.onBgImageLoaded),this.svg&&(this.svg.removeEventListener("click",this.onClickHandler),this.svg.removeEventListener("mouseover",this.onMouseOverHandler),this.svg.removeEventListener("mouseout",this.onMouseOutHandler),this.svg.removeEventListener("mousedown",this.onMouseDownHandler),this.svg.removeEventListener("mouseup",this.onMouseUpHandler),this.svg.removeEventListener("mousemove",this.onMouseMoveHandler))}initImageMap(e){e&&(this.bg=e.querySelector(`#${this.id}-bg`),this.svg=e.querySelector(`#${this.id}-svg`),this.bg.addEventListener("load",this.onBgImageLoaded),this.svg.removeEventListener("click",this.onClickHandler),this.svg.addEventListener("click",this.onClickHandler),this.svg.removeEventListener("mouseover",this.onMouseOverHandler),this.svg.addEventListener("mouseover",this.onMouseOverHandler),this.svg.removeEventListener("mouseout",this.onMouseOutHandler),this.svg.addEventListener("mouseout",this.onMouseOutHandler),this.svg.removeEventListener("mousedown",this.onMouseDownHandler),this.svg.addEventListener("mousedown",this.onMouseDownHandler),this.svg.removeEventListener("mouseup",this.onMouseUpHandler),this.svg.addEventListener("mouseup",this.onMouseUpHandler),this.svg.removeEventListener("mousemove",this.onMouseMoveHandler),this.svg.addEventListener("mousemove",this.onMouseMoveHandler),this.updateCSSVariables())}scaleCoordsToSVG([e,t]){if(!this.svg||!this.bg)return[e,t];let s=this.svg.getScreenCTM().a;return[e/s,t/s]}getCSSVariables(){let e={"--sd-imagemap-idle-fill-color":this.idleFillColor,"--sd-imagemap-idle-stroke-color":this.idleStrokeColor,"--sd-imagemap-idle-stroke-width":this.idleStrokeWidth,"--sd-imagemap-hover-fill-color":this.hoverFillColor,"--sd-imagemap-hover-stroke-color":this.hoverStrokeColor,"--sd-imagemap-hover-stroke-width":this.hoverStrokeWidth,"--sd-imagemap-selected-fill-color":this.selectedFillC
10olor,"--sd-imagemap-selected-stroke-color":this.selectedStrokeColor,"--sd-imagemap-selected-stroke-width":this.selectedStrokeWidth};for(let t in e)(void 0==e[t]||null===e[t])&&delete e[t];return Object.keys(e).map(t=>`${t}: ${e[t]}`).join("; ")}updateCSSVariables(){if(!this.svg)return;let e=this.getCSSVariables();e.length?this.svg.setAttribute("style",e):this.svg.removeAttribute("style")}dispose(){super.dispose()}renderSVG(){!this.svg||this.requestAnimationFrameId||(this.requestAnimationFrameId=requestAnimationFrame(()=>{for(let e of(this.requestAnimationFrameId=null,this.svg.innerHTML="",this.areas))e.render(this.svg);this.drawAreaControls()}))}onCheckForErrors(e,t,s){if(super.onCheckForErrors(e,t,s),this.isMultiSelect){let t=Array.isArray(this.value)?this.value.length:0;this.maxSelectedAreas>0&&t>this.maxSelectedAreas&&e.push(new eB(this.getLocalizationFormatString("maxSelectError",this.maxSelectedAreas),this)),this.minSelectedAreas>0&&t<this.minSelectedAreas&&e.push(new eB(this.getLocalizationFormatString("minSelectError",this.minSelectedAreas),this))}}convertToCorrectValue(e){return this.isMultiSelect&&(e=new i7(e,this.valuePropertyName).convert(e)),super.convertToCorrectValue(e)}getDisplayValueCore(e,t){return t?(Array.isArray(t)||(t=[t]),t=(t=t.map(e=>"object"==typeof e?this.valuePropertyName?e[this.valuePropertyName]:void 0:e).filter(e=>void 0!==e)).map(e=>{var t;return(null==(t=this.areas.find(t=>t.value===e))?void 0:t.text)||void 0}).filter(e=>void 0!==e).join(p.choicesSeparator)):t}mapItemToggle(e){if(this.isInDesignMode){this.selectedArea=this.selectedArea===e?void 0:e;return}if(!this.isReadOnly&&e.enabled){if(!this.isMultiSelect){this.value=this.value===e.value?void 0:e.value;return}this.value=new i7(this.value,this.valuePropertyName).toggle(e.value,this.maxSelectedAreas)}}isItemSelected(e){return this.isInDesignMode?this.selectedArea===e:this.isMultiSelect?new i7(this.value,this.valuePropertyName).contains(e.value):this.value===e.value}isItemHovered(e){if(!this.hoveredUID)return!1;let t=this.areas.find(e=>e.uniqueId===this.hoveredUID);return!!t&&(this.isInDesignMode?e.uniqueId===this.hoveredUID:e.value===t.value)}addItem(e){let t=new nP(e);return this.areas.push(t),t}createControlPoint(e,t,s){let i=n.getDocument().createElementNS("http://www.w3.org/2000/svg","circle");return i.setAttribute("cx",e),i.setAttribute("cy",t),i.setAttribute("r","4"),i.setAttribute("class",this.cssClasses.svgControlPoint),i.dataset.idx=s.toString(),i}drawAreaControls(){if(!this.isInDesignMode)return;for(let e of this.controlPoints)e.parentNode===this.svg&&this.svg.removeChild(e);this.controlPoints=[];let e=this.areas.find(e=>e===this.selectedArea);if(!e)return;let t=e.getShape(),s=e.getCoords();switch(t){case"rect":for(let e=0;e<4;e+=2){let t=this.createControlPoint(s[e],s[e+1],this.controlPoints.length);this.svg.appendChild(t),this.controlPoints.push(t)}break;case"circle":for(let[e,t]of[[s[0],s[1]],[Number(s[0])+Number(s[2]),s[1]]]){let s=this.createControlPoint(e,t,this.controlPoints.length);this.svg.appendChild(s),this.controlPoints.push(s)}break;case"poly":for(let e=0;e<s.length;e+=2){let t=this.createControlPoint(s[e],s[e+1],this.controlPoints.length);this.svg.appendChild(t),this.controlPoints.push(t)}}}}V([e_()],nS.prototype,"imageLink",void 0),V([e_()],nS.prototype,"areas",void 0),V([e_()],nS.prototype,"hoveredUID",void 0),V([e_()],nS.prototype,"valuePropertyName",void 0),V([e_({defaultValue:!0})],nS.prototype,"multiSelect",void 0),V([e_({onSetting:e=>e<0?0:e})],nS.prototype,"maxSelectedAreas",void 0),V([e_({onSetting:e=>e<0?0:e})],nS.prototype,"minSelectedAreas",void 0),V([e_()],nS.prototype,"shape",void 0),V([e_()],nS.prototype,"idleStrokeColor",void 0),V([e_()],nS.prototype,"idleStrokeWidth",void 0),V([e_()],nS.prototype,"idleFillColor",void 0),V([e_()],nS.prototype,"hoverStrokeColor",void 0),V([e_()],nS.prototype,"hoverStrokeWidth",void 0),V([e_()],nS.prototype,"hoverFillColor",void 0),V([e_()],nS.prototype,"selectedStrokeColor",void 0),V([e_()],nS.prototype,"selectedStrokeWidth",void 0),V([e_()],nS.prototype,"selectedFillC
10olor",void 0),V([e_()],nS.prototype,"selectedArea",void 0);class nP extends tj{constructor(e){super(e)}getBaseType(){return"imagemaparea"}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s);let i=this.locOwner;["idleStrokeColor","idleStrokeWidth","idleFillColor","hoverStrokeColor","hoverStrokeWidth","hoverFillColor","selectedStrokeColor","selectedStrokeWidth","selectedFillColor"].indexOf(e)>-1&&this.updateCSSVariables(),"shape"===e&&i.renderSVG(),"coords"===e&&(this.draw(),i.renderSVG())}getShape(){let e=this.locOwner;return"inherit"===this.shape?null==e?void 0:e.shape:this.shape}getCoords(){let e=this.getShape(),t=this.coords?this.coords.split(",").map(e=>e.trim()).filter(e=>""!==e):[];switch(e){case"rect":t=t.length<4?["10","10","100","50"]:t;break;case"circle":t=t.length<3?["50","50","40"]:t;break;case"poly":t=t.length?t:["50","10","90","90","10","90"]}return t}getSVGCoords(){let e=this.getCoords();switch(this.getShape()){case"rect":let[t,s,i,n]=e.map(Number);return[Math.min(t,i),Math.min(s,n),Math.abs(i-t),Math.abs(n-s)].map(e=>e.toString());case"circle":return[e[0],e[1],e[2]];case"poly":return e}}addCoord(e,t){if("poly"!==this.getShape())return;let s=this.getCoords();this.coords=s+`,${e},${t}`}removeCoord(e){if("poly"!==this.getShape())return;let t=this.getCoords();t.length/2<=3||(t.splice(2*e,2),this.coords=t.join(","))}setCoord(e,t,s){let i=this.getCoords();switch(this.getShape()){case"rect":if(e<0||e>1)return;i[2*e]=t.toString(),i[2*e+1]=s.toString();break;case"circle":if(e<0||e>1)return;if(0===e)i[2*e]=t.toString(),i[2*e+1]=s.toString();else{let e=Number(i[0]),n=Number(i[1]);i[2]=Math.sqrt((t-e)*(t-e)+(s-n)*(s-n)).toString()}break;case"poly":i[2*e]=t.toString(),i[2*e+1]=s.toString()}this.coords=i.join(",")}draw(){switch(this.getShape()){case"rect":let[e,t,s,i]=this.getSVGCoords();this.svg.setAttribute("x",e),this.svg.setAttribute("y",t),this.svg.setAttribute("width",s),this.svg.setAttribute("height",i);break;case"circle":let[n,r,a]=this.getSVGCoords();this.svg.setAttribute("cx",n),this.svg.setAttribute("cy",r),this.svg.setAttribute("r",a);break;case"poly":this.svg.setAttribute("points",this.getSVGCoords().join(","))}}render(e){if(!e)return;let t=this.getSVGElement();this.updateCSSVariables(),this.updateCSSClasses(),t.setAttribute("title",this.text?this.text:""),this.visible&&t.ownerSVGElement!==e&&e.appendChild(t)}getSVGElement(){let e=this.getShape();if(this.svg&&this.svg.tagName===e)return this.svg;let t=n.getDocument().createElementNS("http://www.w3.org/2000/svg","poly"===e?"polygon":e);return t.dataset.uid=this.uniqueId.toString(),this.svg=t,this.draw(),this.svg}getCSSVariables(){let e={"--sd-imagemap-idle-fill-color":this.idleFillColor,"--sd-imagemap-idle-stroke-color":this.idleStrokeColor,"--sd-imagemap-idle-stroke-width":this.idleStrokeWidth,"--sd-imagemap-hover-fill-color":this.hoverFillColor,"--sd-imagemap-hover-stroke-color":this.hoverStrokeColor,"--sd-imagemap-hover-stroke-width":this.hoverStrokeWidth,"--sd-imagemap-selected-fill-color":this.selectedFillColor,"--sd-imagemap-selected-stroke-color":this.selectedStrokeColor,"--sd-imagemap-selected-stroke-width":this.selectedStrokeWidth};for(let t in e)(void 0==e[t]||null===e[t])&&delete e[t];return Object.keys(e).map(t=>`${t}: ${e[t]}`).join("; ")}getCSSClasses(){let e=this.locOwner;if(!e)return"";let t=e.cssClasses,s=e.isItemSelected(this),i=e.isItemHovered(this);return this.enabled?s?t.svgItemSelected:i?t.svgItemHovered:t.svgItem:t.svgItemDisabled}updateCSSVariables(){if(!this.svg)return;let e=this.getCSSVariables();e.length?this.svg.setAttribute("style",e):this.svg.removeAttribute("style")}updateCSSClasses(){this.svg&&this.svg.setAttribute("class",this.getCSSClasses())}}V([e_()],nP.prototype,"shape",void 0),V([e_()],nP.prototype,"coords",void 0),V([e_()],nP.prototype,"idleFillColor",void 0),V([e_()],nP.prototype,"idleStrokeColor",void 0),V([e_()],nP.prototype,"idleStrokeWidth",void 0),V([e_()],nP.prototype,"hoverFillColor",void 0),V([e_()],nP.prototype,"hoverStrokeColor",void 0),V([e_()],nP.prototype,"hoverStrokeWidth",void 0),V([e_()],nP.prototype,"selectedFillC
10olor",void 0),V([e_()],nP.prototype,"selectedStrokeColor",void 0),V([e_()],nP.prototype,"selectedStrokeWidth",void 0),H.addClass("imagemaparea",[{name:"value",isUnique:!1},{name:"shape",choices:["inherit","circle","rect","poly"],default:"inherit"},{name:"coords:string",locationInTable:"detail"},{name:"idleFillColor:color",locationInTable:"detail"},{name:"idleStrokeColor:color",locationInTable:"detail"},{name:"idleStrokeWidth:number",locationInTable:"detail"},{name:"hoverFillColor:color",locationInTable:"detail"},{name:"hoverStrokeColor:color",locationInTable:"detail"},{name:"hoverStrokeWidth:number",locationInTable:"detail"},{name:"selectedFillColor:color",locationInTable:"detail"},{name:"selectedStrokeColor:color",locationInTable:"detail"},{name:"selectedStrokeWidth:number",locationInTable:"detail"}],()=>new nP(""),"itemvalue"),H.addClass("imagemap",[{name:"imageLink:file"},{name:"areas:imagemaparea[]"},{name:"multiSelect:boolean",default:!0},{name:"valuePropertyName"},{name:"shape",choices:["circle","rect","poly"],default:"poly"},{name:"idleFillColor:color"},{name:"idleStrokeColor:color"},{name:"idleStrokeWidth:number"},{name:"hoverFillColor:color"},{name:"hoverStrokeColor:color"},{name:"hoverStrokeWidth:number"},{name:"selectedFillColor:color"},{name:"selectedStrokeColor:color"},{name:"selectedStrokeWidth:number"},{name:"maxSelectedAreas:number",default:0,onSettingValue:(e,t)=>{if(t<=0)return 0;let s=e.minSelectedAreas;return s>0&&t<s?s:t}},{name:"minSelectedAreas:number",default:0,onSettingValue:(e,t)=>{if(t<=0)return 0;let s=e.maxSelectedAreas;return s>0&&t>s?s:t}}],()=>new nS(""),"question");let nR=[".mp4",".mov",".wmv",".flv",".avi",".mkv"],nT="embed";class nA extends i2{onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),("contentMode"===e||"imageLink"===e)&&this.calculateRenderedMode()}getType(){return"image"}get isCompositeQuestion(){return!1}onSurveyLoad(){super.onSurveyLoad(),this.calculateRenderedMode()}get renderedStyleHeight(){return this.imageHeight?C(this.imageHeight):void 0}get renderedHeight(){return this.imageHeight?v(this.imageHeight):void 0}get renderedStyleWidth(){return this.imageWidth?C(this.imageWidth):void 0}get renderedWidth(){return this.imageWidth?v(this.imageWidth):void 0}get renderedMode(){return this.getPropertyValue("renderedMode","image")}get ariaInvalid(){return null}get ariaLabel(){return null}get renderedAltText(){return this.altText||this.title}getImageCss(){let e=this.getPropertyByName("imageHeight"),t=this.getPropertyByName("imageWidth"),s=e.isDefaultValue(this.imageHeight)&&t.isDefaultValue(this.imageWidth);return new eX().append(this.cssClasses.image).append(this.cssClasses.adaptive,s).toString()}onLoadHandler(){this.contentNotLoaded=!1}onErrorHandler(){this.contentNotLoaded=!0}setRenderedMode(e){this.setPropertyValue("renderedMode",e)}calculateRenderedMode(){"auto"!==this.contentMode?this.setRenderedMode(this.contentMode):this.isYoutubeVideo()?this.setRenderedMode("youtube"):this.isVideo()?this.setRenderedMode("video"):this.setRenderedMode("image")}isYoutubeVideo(){return w.isUrlYoutubeVideo(this.imageLink)}isVideo(){let e=this.imageLink;if(!e)return!1;e=e.toLowerCase();for(let t=0;t<nR.length;t++)if(e.endsWith(nR[t]))return!0;return!1}}V([e_({defaultValue:!1})],nA.prototype,"contentNotLoaded",void 0),V([e_({localizable:{onCreate:(e,t)=>{t.onGetTextCallback=t=>(function(e,t){if(!e||!w.isUrlYoutubeVideo(e))return t?"":e;if(e.toLocaleLowerCase().indexOf(nT)>-1)return e;let s="";for(var i=e.length-1;i>=0&&"="!==e[i]&&"/"!==e[i];i--)s=e[i]+s;return"https://www.youtube.com/"+nT+"/"+s})(t,"youtube"==e.contentMode)}}})],nA.prototype,"imageLink",void 0),V([e_({localizable:!0})],nA.prototype,"altText",void 0),V([e_()],nA.prototype,"imageHeight",void 0),V([e_()],nA.prototype,"imageWidth",void 0),V([e_()],nA.prototype,"imageFit",void 0),V([e_({onSet:(e,t)=>{"video"===e&&(t.showLabel=!0)}})],nA.prototype,"contentMode",void 0),H.addClass("image",[{name:"imageLink:file",serializationProperty:"locImageLink"},{name:"altText",serializationProperty:"locAltText",alternativeName:"text"},{name:"contentMode",default:"auto",choices:["auto","image","video","youtube"]},{name:"imageFit",default:"contain",choices:["none","contain","cover","fill"]},{name:"imageHeight",default:"150"},{name:"imageWidth",default:"200"}],function(){return new nA("")},"nonvalue"),sm.Instance.registerQuestion("image",e=>new nA(e));
10class nL{constructor(e,t,s,i){if(isNaN(e)||isNaN(t))throw Error(`Point is invalid: (${e}, ${t})`);this.x=+e,this.y=+t,this.pressure=s||0,this.time=i||Date.now()}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}equals(e){return this.x===e.x&&this.y===e.y&&this.pressure===e.pressure&&this.time===e.time}velocityFrom(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):0}}class nD{static fromPoints(e,t){let s=this.calculateControlPoints(e[0],e[1],e[2]).c2,i=this.calculateControlPoints(e[1],e[2],e[3]).c1;return new nD(e[1],s,i,e[2],t.start,t.end)}static calculateControlPoints(e,t,s){let i=e.x-t.x,n=e.y-t.y,r=t.x-s.x,a=t.y-s.y,o={x:(e.x+t.x)/2,y:(e.y+t.y)/2},l={x:(t.x+s.x)/2,y:(t.y+s.y)/2},u=Math.sqrt(i*i+n*n),h=Math.sqrt(r*r+a*a),d=o.x-l.x,c=o.y-l.y,p=h/(u+h),g={x:l.x+d*p,y:l.y+c*p},m=t.x-g.x,v=t.y-g.y;return{c1:new nL(o.x+m,o.y+v),c2:new nL(l.x+m,l.y+v)}}constructor(e,t,s,i,n,r){this.startPoint=e,this.control2=t,this.control1=s,this.endPoint=i,this.startWidth=n,this.endWidth=r}length(){let e,t,s=0;for(let i=0;i<=10;i+=1){let n=i/10,r=this.point(n,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this.point(n,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(i>0){let i=r-e,n=a-t;s+=Math.sqrt(i*i+n*n)}e=r,t=a}return s}point(e,t,s,i,n){return t*(1-e)*(1-e)*(1-e)+3*s*(1-e)*(1-e)*e+3*i*(1-e)*e*e+n*e*e*e}}class nO{constructor(){try{this._et=new EventTarget}catch(e){this._et=document}}addEventListener(e,t,s){this._et.addEventListener(e,t,s)}dispatchEvent(e){return this._et.dispatchEvent(e)}removeEventListener(e,t,s){this._et.removeEventListener(e,t,s)}}class nN extends nO{constructor(e,t={}){super(),this.canvas=e,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this._handleMouseDown=e=>{1===e.buttons&&this._strokeBegin(e)},this._handleMouseMove=e=>{this._strokeMoveUpdate(e)},this._handleMouseUp=e=>{1===e.buttons&&this._strokeEnd(e)},this._handleTouchStart=e=>{if(e.cancelable&&e.preventDefault(),1===e.targetTouches.length){let t=e.changedTouches[0];this._strokeBegin(t)}},this._handleTouchMove=e=>{e.cancelable&&e.preventDefault();let t=e.targetTouches[0];this._strokeMoveUpdate(t)},this._handleTouchEnd=e=>{if(e.target===this.canvas){e.cancelable&&e.preventDefault();let t=e.changedTouches[0];this._strokeEnd(t)}},this._handlePointerStart=e=>{e.preventDefault(),this._strokeBegin(e)},this._handlePointerMove=e=>{this._strokeMoveUpdate(e)},this._handlePointerEnd=e=>{this._drawingStroke&&(e.preventDefault(),this._strokeEnd(e))},this.velocityFilterWeight=t.velocityFilterWeight||.7,this.minWidth=t.minWidth||.5,this.maxWidth=t.maxWidth||2.5,this.throttle="throttle"in t?t.throttle:16,this.minDistance="minDistance"in t?t.minDistance:5,this.dotSize=t.dotSize||0,this.penColor=t.penColor||"black",this.backgroundColor=t.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=t.compositeOperation||"source-over",this.canvasContextOptions="canvasContextOptions"in t?t.canvasContextOptions:{},this._strokeMoveUpdate=this.throttle?function(e,t=250){let s,i,n,r=0,a=null,o=()=>{r=Date.now(),a=null,s=e.apply(i,n),a||(i=null,n=[])};return function(...l){let u=Date.now(),h=t-(u-r);return i=this,n=l,h<=0||h>t?(a&&(clearTimeout(a),a=null),r=u,s=e.apply(i,n),a||(i=null,n=[])):a||(a=window.setTimeout(o,h)),s}}(nN.prototype._strokeUpdate,this.throttle):nN.prototype._strokeUpdate,this._ctx=e.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){let{_ctx:e,canvas:t}=this;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0}fromDataURL(e,t={}){return new Promise((s,i)=>{let n=new Image,r=t.ratio||window.devicePixelRatio||1,a=t.width||this.canvas.width/r,o=t.height||this.canvas.height/r,l=t.xOffset||0,u=t.yOffset||0;this._reset(this._getPointGroupOptions()),n.onload=()=>{this._ctx.drawImage(n,l,u,a,o),s()},n.onerror=e=>{i(e)},n.crossOrigin="anonymous",n.src=e,this._isEmpty=!1})}toDataURL(e="image/png",t){return"image/svg+xml"===e?("object"!=typeof t&&(t=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(t))}`):("number"!=typeof t&&(t=void 0),this.canvas.toDataURL(e,t))}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";let e=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!e?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerStart),this.canvas.removeEventListener("pointermove",this._handlePointerMove),this.canvas.ownerDocument.removeEventListener("pointerup",this._handlePointerEnd),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("mousemove",this._handleMouseMove),this.canvas.ownerDocument.removeEventListener("mouseup",this._handleMouseUp),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this.canvas.removeEventListener("touchmove",this._handleTouchMove),this.canvas.removeEventListener("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}fromData(e,{clear:t=!0}={}){t&&this.clear(),this._fromData(e,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(e)}toData(){return this._data}_getPointGroupOptions(e){return{penColor:e&&"penColor"in e?e.penColor:this.penColor,dotSize:e&&"dotSize"in e?e.dotSize:this.dotSize,minWidth:e&&"minWidth"in e?e.minWidth:this.minWidth,maxWidth:e&&"maxWidth"in e?e.maxWidth:this.maxWidth,velocityFilterWeight:e&&"velocityFilterWeight"in e?e.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:e&&"compositeOperation"in e?e.compositeOperation:this.compositeOperation}}_strokeBegin(e){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:e,cancelable:!0})))return;this._drawingStroke=!0;let t=this._getPointGroupOptions(),s=Object.assign(Object.assign({},t),{points:[]});this._data.push(s),this._reset(t),this._strokeUpdate(e)}_strokeUpdate(e){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(e);this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:e}));let t=e.clientX,s=e.clientY,i=void 0!==e.pressure?e.pressure:void 0!==e.force?e.force:0,n=this._createPoint(t,s,i),r=this._data[this._data.length-1],a=r.points,o=a.length>0&&a[a.length-1],l=!!o&&n.distanceTo(o)<=this.minDistance,u=this._getPointGroupOptions(r);if(!o||!(o&&l)){let e=this._addPoint(n,u);o?e&&this._drawCurve(e,u):this._drawDot(n,u),a.push({time:n.time,x:n.x,y:n.y,pressure:n.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:e}))}_strokeEnd(e){this._drawingStroke&&(this._strokeUpdate(e),this._drawingStroke=!1,this.dispatchEvent(new CustomEvent("endStroke",{detail:e})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerStart),this.canvas.addEventListener("pointermove",this._handlePointerMove),this.canvas.ownerDocument.addEventListener("pointerup",this._handlePointerEnd)}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown),this.canvas.addEventListener("mousemove",this._handleMouseMove),this.canvas.ownerDocument.addEventListener("mouseup",this._handleMouseUp)}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart),this.canvas.addEventListener("touchmove",this._handleTouchMove),this.canvas.addEventListener("touchend",this._handleTouchEnd)}_reset(e){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(e.minWidth+e.maxWidth)/2,this._ctx.fillStyle=e.penColor,this._ctx.globalCompositeOperation=e.compositeOperation}
10_createPoint(e,t,s){let i=this.canvas.getBoundingClientRect();return new nL(e-i.left,t-i.top,s,new Date().getTime())}_addPoint(e,t){let{_lastPoints:s}=this;if(s.push(e),s.length>2){3===s.length&&s.unshift(s[0]);let e=this._calculateCurveWidths(s[1],s[2],t),i=nD.fromPoints(s,e);return s.shift(),i}return null}_calculateCurveWidths(e,t,s){let i=s.velocityFilterWeight*t.velocityFrom(e)+(1-s.velocityFilterWeight)*this._lastVelocity,n=this._strokeWidth(i,s),r={end:n,start:this._lastWidth};return this._lastVelocity=i,this._lastWidth=n,r}_strokeWidth(e,t){return Math.max(t.maxWidth/(e+1),t.minWidth)}_drawCurveSegment(e,t,s){let i=this._ctx;i.moveTo(e,t),i.arc(e,t,s,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(e,t){let s=this._ctx,i=e.endWidth-e.startWidth,n=2*Math.ceil(e.length());s.beginPath(),s.fillStyle=t.penColor;for(let s=0;s<n;s+=1){let r=s/n,a=r*r,o=a*r,l=1-r,u=l*l,h=u*l,d=h*e.startPoint.x;d+=3*u*r*e.control1.x+3*l*a*e.control2.x+o*e.endPoint.x;let c=h*e.startPoint.y;c+=3*u*r*e.control1.y+3*l*a*e.control2.y+o*e.endPoint.y;let p=Math.min(e.startWidth+o*i,t.maxWidth);this._drawCurveSegment(d,c,p)}s.closePath(),s.fill()}_drawDot(e,t){let s=this._ctx,i=t.dotSize>0?t.dotSize:(t.minWidth+t.maxWidth)/2;s.beginPath(),this._drawCurveSegment(e.x,e.y,i),s.closePath(),s.fillStyle=t.penColor,s.fill()}_fromData(e,t,s){for(let i of e){let{points:e}=i,n=this._getPointGroupOptions(i);if(e.length>1)for(let s=0;s<e.length;s+=1){let i=e[s],r=new nL(i.x,i.y,i.pressure,i.time);0===s&&this._reset(n);let a=this._addPoint(r,n);a&&t(a,n)}else this._reset(n),s(e[0],n)}}toSVG({includeBackgroundColor:e=!1}={}){let t=this._data,s=Math.max(window.devicePixelRatio||1,1),i=this.canvas.width/s,n=this.canvas.height/s,r=document.createElementNS("http://www.w3.org/2000/svg","svg");if(r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),r.setAttribute("viewBox",`0 0 ${i} ${n}`),r.setAttribute("width",i.toString()),r.setAttribute("height",n.toString()),e&&this.backgroundColor){let e=document.createElement("rect");e.setAttribute("width","100%"),e.setAttribute("height","100%"),e.setAttribute("fill",this.backgroundColor),r.appendChild(e)}return this._fromData(t,(e,{penColor:t})=>{let s=document.createElement("path");if(!isNaN(e.control1.x)&&!isNaN(e.control1.y)&&!isNaN(e.control2.x)&&!isNaN(e.control2.y)){let i=`M ${e.startPoint.x.toFixed(3)},${e.startPoint.y.toFixed(3)} C ${e.control1.x.toFixed(3)},${e.control1.y.toFixed(3)} ${e.control2.x.toFixed(3)},${e.control2.y.toFixed(3)} ${e.endPoint.x.toFixed(3)},${e.endPoint.y.toFixed(3)}`;s.setAttribute("d",i),s.setAttribute("stroke-width",(2.25*e.endWidth).toFixed(3)),s.setAttribute("stroke",t),s.setAttribute("fill","none"),s.setAttribute("stroke-linecap","round"),r.appendChild(s)}},(e,{penColor:t,dotSize:s,minWidth:i,maxWidth:n})=>{let a=document.createElement("circle");a.setAttribute("r",(s>0?s:(i+n)/2).toString()),a.setAttribute("cx",e.x.toString()),a.setAttribute("cy",e.y.toString()),a.setAttribute("fill",t),r.appendChild(a)}),r.outerHTML}}class nM extends nh{onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),("penColor"===e||"backgroundColor"===e||"backgroundImage"===e)&&this.signaturePad&&this.updateColors(this.signaturePad)}getPenColorFromTheme(){let e=this.survey;return!!e&&!!e.themeVariables&&e.themeVariables["--sjs-primary-backcolor"]}updateColors(e){let t=this.getPenColorFromTheme(),s=this.getPropertyByName("penColor");e.penColor=this.penColor||t||s.defaultValue||"#1ab394";let i=this.getPropertyByName("backgroundColor"),n=t?"transparent":void 0;e.backgroundColor=(this.backgroundImage?"transparent":this.backgroundColor)||n||i.defaultValue||"#ffffff"}getCssRoot(e){return new eX().append(super.getCssRoot(e)).append(e.small,"300"===this.signatureWidth.toString()).toString()}getFormat(){return"jpeg"===this.dataFormat?"image/jpeg":"svg"===this.dataFormat?"image/svg+xml":""}updateValue(){if(this.signaturePad){var e=this.signaturePad.toDataURL(this.getFormat());this.valueIsUpdatingInternally=!0,this.value=e,this.valueIsUpdatingInternally=!1}}constructor(e){super(e),this.valueIsUpdatingInternally=!1,this._loadedData=void 0,this.updateV
10alueHandler=()=>{this._loadedData=void 0,this.scaleCanvas(!0,!0)}}getType(){return"signaturepad"}afterRenderQuestionElement(e){i.isAvailable()&&e&&(this.isDesignMode||this.initSignaturePad(e),this.element=e),super.afterRenderQuestionElement(e)}beforeDestroyQuestionElement(e){e&&this.destroySignaturePad(e)}themeChanged(e){this.signaturePad&&this.updateColors(this.signaturePad)}resizeCanvas(){this.canvas.width=this.containerWidth,this.canvas.height=this.containerHeight}scaleCanvas(e=!0,t=!1){let s=this.canvas,i=s.offsetWidth/this.containerWidth;(this.scale!=i||t)&&(this.scale=i,s.style.width=this.renderedCanvasWidth,this.resizeCanvas(),this.signaturePad.minWidth=this.penMinWidth*i,this.signaturePad.maxWidth=this.penMaxWidth*i,s.getContext("2d").scale(1/i,1/i),e&&this.loadPreview(this.value))}fromUrl(e){if(this.isFileLoading=!0,"string"==typeof e?/^data:((?:\w+\/(?:(?!;).)+)?)((?:;[^;]+?)*),(.+)$/.test(e):null)this.fromDataUrl(e),this.isFileLoading=!1;else{let t=new Image;t.crossOrigin="anonymous",t.src=e,t.onload=()=>{if(this.canvas){let s=n.createElement("canvas");s.width=this.containerWidth,s.height=this.containerHeight,s.getContext("2d").drawImage(t,0,0);var e=s.toDataURL(this.getFormat());this.fromDataUrl(e)}this.isFileLoading=!1},t.onerror=()=>{this.isFileLoading=!1}}}fromDataUrl(e){if(this._loadedData=e,this.signaturePad){let t=1,s=this.scale;"svg"===this.dataFormat&&(t=i.getDevicePixelRatio()||1,s=1);let n={width:this.canvas.width*s/t,height:this.canvas.height*s/t};this.signaturePad.fromDataURL(e,n)}}get loadedData(){return this._loadedData}loadPreview(e){if(!e){this.signaturePad&&this.canvas&&(this.canvas.getContext("2d").clearRect(0,0,this.canvas.width*this.scale,this.canvas.height*this.scale),this.signaturePad.clear()),this.hasDrawnStroke=!1,this.valueWasChangedFromLastUpload=!1;return}if(this.storeDataAsText)this.fromDataUrl(e);else if(this.loadedData)this.fromDataUrl(this.loadedData);else{var t=e?[e]:[];this._previewLoader&&this._previewLoader.dispose(),this.isFileLoading=!0,this._previewLoader=new np(this,(t,s)=>{"success"===t&&s&&s.length>0&&s[0].content?(this.fromDataUrl(s[0].content),this.isFileLoading=!1):"skipped"===t&&this.fromUrl(e),this._previewLoader.dispose(),this._previewLoader=void 0}),this._previewLoader.load(t)}}onChangeQuestionValue(e){super.onChangeQuestionValue(e),this.isLoadingFromJson||(this._loadedData=void 0,this.loadPreview(e))}onSurveyLoad(){super.onSurveyLoad(),this.loadPreview(this.value)}initSignaturePad(e){var t=e.getElementsByTagName("canvas")[0];this.canvas=t,this.resizeCanvas();var s=new nN(t,{backgroundColor:"#ffffff"});this.signaturePad=s,this.isInputReadOnly&&s.off(),this.readOnlyChangedCallback=()=>{this.isInputReadOnly?s.off():s.on()},this.updateColors(s),s.addEventListener("beginStroke",()=>{this.scaleCanvas(),this.hasDrawnStroke=!0,t.focus()},{once:!1}),s.addEventListener("endStroke",()=>{this.storeDataAsText?this.updateValue():this.valueWasChangedFromLastUpload=!0},{once:!1}),this.updateValueHandler(),this.readOnlyChangedCallback();var i=(e,t)=>{"signatureWidth"!==t.name&&"signatureHeight"!==t.name||this.valueIsUpdatingInternally||this.updateValueHandler()};this.onPropertyChanged.add(i),this.signaturePad.propertyChangedHandler=i}destroySignaturePad(e){this.signaturePad&&(this.onPropertyChanged.remove(this.signaturePad.propertyChangedHandler),this.signaturePad.off()),this.readOnlyChangedCallback=null,this.signaturePad=null}get containerHeight(){return this.signatureHeight||200}get containerWidth(){return this.signatureWidth||300}get renderedCanvasWidth(){return this.signatureAutoScaleEnabled?"100%":this.containerWidth+"px"}get canShowClearButton(){let e=!this.nothingIsDrawn(),t=this.isUploading;return!this.isInputReadOnly&&this.allowClear&&e&&!t}get clearButtonCaption(){return this.getLocalizationString("clearCaption")}get locRenderedPlaceholder(){return this.isReadOnly?this.locPlaceholderReadOnly:this.locPlaceholder}nothingIsDrawn(){let e=this.hasDrawnStroke,t=this.isEmpty(),s=this.isUploading,i=this.valueWasChangedFromLastUpload;return!e&&t&&!s&&!i}needShowPlaceholder(){return this.showPlaceholder&&this.nothingIsDrawn()}onBlurCore(e){if(super.onBlurCore(e),!this.storeDataAsText&&!this.element.contains(e.relatedTarget)){var t,s,i;
10this.valueWasChangedFromLastUpload&&(this.uploadFiles([(t=this.signaturePad.toDataURL(this.getFormat()),s=this.name+"."+nk(this.dataFormat),i=this.getFormat(),new File([new Uint8Array(atob(t.split(",")[1]).split("").map(e=>e.charCodeAt(0))).buffer],s,{type:i}))],"signature"),this.valueWasChangedFromLastUpload=!1)}}uploadResultItemToValue(e){return e.content}setValueFromResult(e){this.valueIsUpdatingInternally=!0,this.value=(null==e?void 0:e.length)?e.map(e=>e.content)[0]:void 0,this.valueIsUpdatingInternally=!1}onClearValue(){super.onClearValue(),this.valueWasChangedFromLastUpload=!1,this._loadedData=void 0,this.loadPreview(this.value)}endLoadingFromJson(){super.endLoadingFromJson(),300===this.signatureWidth&&this.width&&"number"==typeof this.width&&this.width&&(Y.warn("Use signatureWidth property to set width for the signature pad"),this.signatureWidth=this.width,this.width=void 0),200===this.signatureHeight&&this.height&&(Y.warn("Use signatureHeight property to set width for the signature pad"),this.signatureHeight=this.height,this.height=void 0)}}function nk(e){return e||(e="png"),"jpeg"!==(e=e.replace("image/","").replace("+xml",""))&&"svg"!==e&&(e="png"),e}V([e_({defaultValue:!1})],nM.prototype,"hasDrawnStroke",void 0),V([e_({defaultValue:!1})],nM.prototype,"isReadyForUpload",void 0),V([e_({defaultValue:!1})],nM.prototype,"valueWasChangedFromLastUpload",void 0),V([e_({onSetting:e=>nk(e)})],nM.prototype,"dataFormat",void 0),V([e_()],nM.prototype,"signatureWidth",void 0),V([e_()],nM.prototype,"signatureHeight",void 0),V([e_()],nM.prototype,"signatureAutoScaleEnabled",void 0),V([e_()],nM.prototype,"penMinWidth",void 0),V([e_()],nM.prototype,"penMaxWidth",void 0),V([e_()],nM.prototype,"height",void 0),V([e_()],nM.prototype,"allowClear",void 0),V([e_()],nM.prototype,"penColor",void 0),V([e_()],nM.prototype,"backgroundColor",void 0),V([e_()],nM.prototype,"backgroundImage",void 0),V([e_({})],nM.prototype,"showPlaceholder",void 0),V([e_({localizable:{defaultStr:"signaturePlaceHolder",markdown:!0}})],nM.prototype,"placeholder",void 0),V([e_({localizable:{defaultStr:"signaturePlaceHolderReadOnly",markdown:!0}})],nM.prototype,"placeholderReadOnly",void 0),H.addClass("signaturepad",[{name:"signatureWidth:number",default:300},{name:"signatureHeight:number",default:200},{name:"signatureAutoScaleEnabled:boolean",default:!1},{name:"penMinWidth:number",default:.5},{name:"penMaxWidth:number",default:2.5},{name:"height:number",visible:!1},{name:"allowClear:boolean",default:!0},{name:"showPlaceholder:boolean",default:!0},{name:"placeholder:text",serializationProperty:"locPlaceholder",dependsOn:"showPlaceholder",visibleIf:e=>e.showPlaceholder},{name:"placeholderReadOnly:text",serializationProperty:"locPlaceholderReadOnly",dependsOn:"showPlaceholder",visibleIf:e=>e.showPlaceholder},{name:"backgroundImage:file"},{name:"penColor:color"},{name:"backgroundColor:color"},{name:"dataFormat",default:"png",choices:[{value:"png",text:"PNG"},{value:"jpeg",text:"JPEG"},{value:"svg",text:"SVG"}],onSettingValue:(e,t)=>nk(t)},{name:"defaultValue",visible:!1},{name:"correctAnswer",visible:!1},{name:"storeDataAsText:boolean",default:!0},{name:"waitForUpload:boolean",default:!1}],function(){return new nM("")},"question"),sm.Instance.registerQuestion("signaturepad",e=>new nM(e));class nq extends sA{constructor(e){super(e),this.item=e}getNextName(){return p.expressionVariables.nextPanel}getPrevName(){return p.expressionVariables.prevPanel}getVisibleItem(e){return e<0||e>=this.getPanels(!0).length?null:this.getPanels(!0)[e].data}getSpecificValue(e){let t=e.path;if(t.length>1&&t[0].name.toLocaleLowerCase()===p.expressionVariables.parentPanel.toLocaleLowerCase()){let s=this.item.data;if(s&&s.parentQuestion&&s.parent&&s.parent.data)return t[0].name=this.variableName,e.isRoot=!0,s.parent.data.getValueGetterContext().getValue(e)}return null}getTextValue(e,t,s){return e=e.toLocaleLowerCase(),[this.indexVar,this.visIndexVar].indexOf(e)>-1&&t>-1&&t++,super.getTextValue(e,t,s)}get indexVar(){return p.expressionVariables.panelIndex.toLocaleLowerCase()}get visIndexVar(){return p.expressionVariables.visiblePanelIndex.toLocaleLowerCase()}getItemValue(e){return(e=e.toLocaleLowerCase())===this.indexVar?this.panelIndex:e==this.visIndexVar?this.visibleIndex:void 0}get panelIndex(){return this.getPanels(!1).indexOf(this.item.panel)}get visibleIndex(){return this.getPanels(!0).indexOf(this.item.panel)}getPanels(e){let t=this.item.data;return t?e?t.visiblePanels:t.panels:[]}}class nF extends tB{constructor(e){super(e),this.question=e}getValue(e){let t=e.path,s=this.question,i=e.index;if(i>-1&&s.isDesignMode&&t.length>0){let i=t[0].name,n=s.template.getQuestionByName(i);return n?(t.shift(),0===t.length?{isFound:!0}:n.getValueGetterContext().getValue(e)):{isFound:!1}}if(i>-1){if(i>=0&&i<s.panels.length){let t=s.panels[i].data;return e.isRoot=!1,t.getValueGetterContext().getValue(e)}return{isFound:!1,value:void 0,context:this}}return!e.createObjects&&this.question.isEmpty()?{isFound:0===t.length,value:void 0}:super.getValue(e)}}class nB extends e2{constructor(e){super(e)}}class n_ extends sL{constructor(e,t){super(e),this.data=e,this.data=e,this.panelValue=t,this.setSurveyImpl()}get panel(){return this.panelValue}setSurveyImpl(){this.panel.setSurveyImpl(this)}getValueGetterContext(){return new nq(this)}getVariableName(){return p.expressionVariables.panel}getQuestionsByValueName(e,t){return this.panel.getQuestionsByValueName(e,t)}getQuestionByName(e){return this.panel.getQuestionByName(e)}getIndex(){return this.data.getItemIndex(this)}get questions(){return this.panel.questions}setValue(e,t){!this.isSettingValue&&this.isValueChanged(e,t)&&(this.updateSharedQuestionsValue(e,t),this.data.updateItemValue(this,e,w.getUnbindValue(t),!1),this.runTriggersOnSetValue(e,t))}getComment(e){return this.getValue(e+p.commentSuffix)||""}setComment(e,t,s){this.setValue(e+p.commentSuffix,t)}}class nQ{constructor(e){this.data=e}getSurveyData(){return null}getSurvey(){return this.data.getSurvey()}getTextProcessor(){return null}}class nH extends tz{get dynamicPanelCallbacks(){return this.survey}constructor(e){super(e),this._renderedPanels=[],this.isPanelsAnimationRunning=!1,this.isAddingNewPanels=!1,this.isSetPanelItemData={},this.createNewArray("panels",e=>{this.onPanelAdded(e)},e=>{this.onPanelRemoved(e)}),this.createNewArray("visiblePanels"),this.templateValue=this.createAndSetupNewPanelObject(),this.template.renderWidth="100%",this.template.selectedElementInDesign=this,this.template.addElementCallback=e=>
10{this.addOnPropertyChangedCallback(e),this.rebuildPanels()},this.template.removeElementCallback=()=>{this.rebuildPanels()}}onPropertyValueChanged(e,t,s){if(super.onPropertyValueChanged(e,t,s),"panelsState"===e&&this.setPanelsState(),["newPanelPosition","displayMode","showProgressBar"].indexOf(e)>-1&&this.updateFooterActions(),"allowAddPanel"===e&&this.updateNoEntriesTextDefaultLoc(),"minPanelCount"===e&&this.onMinPanelCountChanged(),"maxPanelCount"===e&&this.onMaxPanelCountChanged(),["templateQuestionTitleLocation","templateQuestionTitleWidth"].indexOf(e)>-1){let e=this.visiblePanelsCore;e&&e.forEach(e=>{e.updateElementCss(!0)})}"showQuestionNumbers"===e&&this.survey&&this.lifecycleCallbacks.questionVisibilityChanged(this,this.visible,!0),"tabAlign"===e&&this.isRenderModeTab&&(this.tabbedMenu.containerCss=this.getTabbedMenuCss())}validateExpressions(e={functions:!0,variables:!0,semantics:!0}){this.useTemplatePanel||new n_(this,this.template);let t=super.validateExpressions(e);return this.useTemplatePanel||this.setTemplatePanelSurveyImpl(),t}get isCompositeQuestion(){return!0}get isContainer(){return!0}getFirstQuestionToFocus(e){for(let t of this.currentPanel?[this.currentPanel]:this.visiblePanelsCore){let s=t.getFirstQuestionToFocus(e);if(s)return s}return this.showAddPanelButton&&(!e||this.currentErrorCount>0)?this:null}getFirstInputElementId(){let e=this.getFirstQuestionToFocus(!1);return e&&e!==this?e.inputId:this.showAddPanelButton?this.addButtonId:super.getFirstInputElementId()}getFirstErrorInputElementId(){let e=this.getFirstQuestionToFocus(!0);return e?e.inputId:super.getFirstErrorInputElementId()}setSurveyImpl(e,t){super.setSurveyImpl(e,t),this.setTemplatePanelSurveyImpl(),this.setPanelsSurveyImpl()}getFilteredData(){return this.value}assignOnPropertyChangedToTemplate(){for(var e=this.template.elements,t=0;t<e.length;t++)this.addOnPropertyChangedCallback(e[t])}addOnPropertyChangedCallback(e){e.isQuestion&&e.setParentQuestion(this),e.onPropertyChanged.add((e,t)=>{this.onTemplateElementPropertyChanged(e,t)}),e.isPanel&&(e.addElementCallback=e=>{this.addOnPropertyChangedCallback(e)})}onTemplateElementPropertyChanged(e,t){if(!this.isLoadingFromJson&&!this.useTemplatePanel&&0!=this.panelsCore.length&&H.findProperty(e.getType(),t.name))for(var s=this.panelsCore,i=0;i<s.length;i++){var n=s[i].getQuestionByName(e.name);n&&n[t.name]!==t.newValue&&(n[t.name]=t.newValue)}}get useTemplatePanel(){return this.isDesignMode&&!this.isContentElement}getType(){return"paneldynamic"}getAllChildren(){return[...super.getAllChildren(),...this.templateElements]}clearOnDeletingContainer(){this.panelsCore.forEach(e=>{e.clearOnDeletingContainer()})}get isAllowTitleLeft(){return!1}removeElement(e){return this.template.removeElement(e)}get template(){return this.templateValue}getPanelInDesignMode(){return this.template}getPanels(){return[this.template]}get templateElements(){return this.template.elements}isPropertyStoredInHash(e){return"templateElements"!==e&&super.isPropertyStoredInHash(e)}get templateTitle(){return this.template.title}set templateTitle(e){this.template.title=e}get locTemplateTitle(){return this.template.locTitle}getLocalizableString(e){return"templateTitle"===e?this.template.locTitle:super.getLocalizableString(e)}get templateDescription(){return this.template.description}set templateDescription(e){this.template.description=e}get locTemplateDescription(){return this.template.locDescription}get templateVisibleIf(){return this.getPropertyValue("templateVisibleIf")}set templateVisibleIf(e){this.setPropertyValue("templateVisibleIf",e),this.template.visibleIf=e}get questionStartIndex(){return this.template.questionStartIndex}set questionStartIndex(e){this.template.questionStartIndex=e}get items(){for(var e=[],t=0;t<this.panelsCore.length;t++)e.push(this.panelsCore[t].data);return e}get panels(){return this.buildPanelsFirstTime(this.canBuildPanels),this.panelsCore}get visiblePanels(){return this.buildPanelsFirstTime(this.canBuildPanels),this.visiblePanelsCore}get panelsCore(){return this.getPropertyValue("panels")}get visiblePanelsCore(){return this.getPropertyValue("visiblePanels")}onPanelAdded(e){if(this.onPanelRemovedCore(e),!e.visible)return;let t=0,s=this.panelsCore;for(var i=0;i<s.length&&s[i]!==e;i++)s[i].visible&&t++;this.visiblePanelsCore.splice(t,0,e),this.addTabFromToolbar(e,t),this.currentPanel||(this.currentPanel=e),this.updateRenderedPanels()}onPanelRemoved(e){let t=this.onPanelRemovedCore(e);if(this.currentPanel===e){let e=this.visiblePanelsCore;t>=e.length&&(t=e.length-1),this.currentPanel=t>=0?e[t]:null}this.updateRenderedPanels()}
10onPanelRemovedCore(e){let t=this.visiblePanelsCore,s=t.indexOf(e);return s>-1&&(t.splice(s,1),this.removeTabFromToolbar(e)),s}get currentIndex(){return this.isRenderModeList?-1:this.useTemplatePanel?0:this.visiblePanelsCore.indexOf(this.currentPanel)}set currentIndex(e){e<0||this.visiblePanelCount<1||(e>=this.visiblePanelCount&&(e=this.visiblePanelCount-1),this.currentPanel=this.visiblePanelsCore[e])}get currentPanel(){if(this.isDesignMode)return this.template;if(this.isRenderModeList||this.useTemplatePanel)return null;let e=this.getPropertyValue("currentPanel",null);return!e&&this.visiblePanelCount>0&&(e=this.visiblePanelsCore[0],this.currentPanel=e),e}set currentPanel(e){if(this.isRenderModeList||this.useTemplatePanel)return;let t=this.getPropertyValue("currentPanel"),s=e?this.visiblePanelsCore.indexOf(e):-1;(!e||!(s<0))&&e!==t&&(t&&t.onHidingContent(),e&&e.onFirstRendering(),this.setPropertyValue("currentPanel",e),this.updateRenderedPanels(),this.updateFooterActions(),this.updateTabToolbarItemsPressedState(),this.fireCallback(this.currentIndexChangedCallback),s>-1&&this.survey&&this.dynamicPanelCallbacks.dynamicPanelCurrentIndexChanged(this,{panel:e,visiblePanelIndex:s}))}getUIState(){let e=super.getUIState(),t=this.currentIndex;return t>0&&((e=e||{}).activePanelIndex=t),e}setUIState(e){super.setUIState(e),e.activePanelIndex&&(this.currentIndex=e.activePanelIndex)}updateRenderedPanels(){let e=[];this.isRenderModeList?e=[].concat(this.visiblePanels):this.currentPanel&&(e=[this.currentPanel]),e.forEach(e=>this.panelOnFirstRendering(e)),this.renderedPanels=e}panelOnFirstRendering(e){e&&(e.onFirstRendering(),e.locStrsChanged())}set renderedPanels(e){0==this.renderedPanels.length||0==e.length?(this.blockAnimations(),this.panelsAnimation.sync(e),this.releaseAnimations()):(this.isPanelsAnimationRunning=!0,this.panelsAnimation.sync(e))}get renderedPanels(){return this._renderedPanels}getPanelsAnimationOptions(){let e=()=>{if(this.isRenderModeList)return"";let e=new eX,t=!1,s=this.renderedPanels.filter(e=>e!==this.currentPanel)[0],i=this.visiblePanels.indexOf(s);return i<0&&(t=!0,i=this.removedPanelIndex),e.append("sv-pd-animation-adding",!!this.focusNewPanelCallback).append("sv-pd-animation-removing",t).append("sv-pd-animation-left",i<=this.currentIndex).append("sv-pd-animation-right",i>this.currentIndex).toString()};return{getRerenderEvent:()=>this.onElementRerendered,getAnimatedElement:e=>{var t,s;if(e&&this.cssContent){let i=e8(this.cssContent);return null==(s=null==(t=this.getWrapperElement())?void 0:t.querySelector(`:scope ${i} #${e.id}`))?void 0:s.parentElement}},getEnterOptions:()=>({onBeforeRunAnimation:e=>{if(this.focusNewPanelCallback){let t=this.isRenderModeList?e:e.parentElement;tL.ScrollElementToViewCore(t,!1,!1,{behavior:"smooth"})}!this.isRenderModeList&&e.parentElement?tP(e.parentElement,{heightTo:e.offsetHeight+"px"}):tR(e)},onAfterRunAnimation:e=>{tT(e),e.parentElement&&tT(e.parentElement)},cssClass:new eX().append(this.cssClasses.panelWrapperEnter).append(e()).toString()}),getLeaveOptions:()=>({onBeforeRunAnimation:e=>{!this.isRenderModeList&&e.parentElement?tP(e.parentElement,{heightFrom:e.offsetHeight+"px"}):tR(e)},onAfterRunAnimation:e=>{tT(e),e.parentElement&&tT(e.parentElement)},cssClass:new eX().append(this.cssClasses.panelWrapperLeave).append(e()).toString()}),isAnimationEnabled:()=>this.animationAllowed&&!!this.getWrapperElement()}}disablePanelsAnimations(){this.panelsCore.forEach(e=>{e.blockAnimations()})}enablePanelsAnimations(){this.panelsCore.forEach(e=>{e.releaseAnimations()})}updatePanelsAnimation(){this._panelsAnimations=new(this.isRenderModeList?tE:tS)(this.getPanelsAnimationOptions(),(e,t)=>{this._renderedPanels=e,t||(this.isPanelsAnimationRunning=!1,this.focusNewPanel())},()=>this._renderedPanels)}get panelsAnimation(){return this._panelsAnimations||this.updatePanelsAnimation(),this._panelsAnimations}onHidingContent(){super.onHidingContent(),this.currentPanel?this.currentPanel.onHidingContent():this.visiblePanelsCore.forEach(e=>e.onHidingContent())}get panelPrevText(){return this.prevPanelText}set panelPrevText(e){this.prevPanelText=e}get panelNextText(){return this.nextPanelText}set panelNextText(e){this.nextPanelText=e}get panelAddText(){return this.addPanelText}set panelAddText(e){this.addPanelText=e}get panelRemoveText(){return this.removePanelText}set panelRemoveText(e){this.removePanelText=e}get isProgressTopShowing(){return"carousel"==this.displayMode&&("top"===this.progressBarLocation||"topBottom"===this.progressBarLocation)}get isProgressBottomShowing(){return"carousel"==this.displayMode&&("bottom"===this.progressBarLocation||"topBottom"===this.progressBarLocation)}get isPrevButtonVisible(){return this.currentIndex>0}get isPrevButtonShowing(){return this.isPrevButtonVisible}get isNextButtonVisible(){return this.currentIndex>=0&&this.currentIndex<this.visiblePanelCount-1}get isNextButtonShowing(){return this.isNextButtonVisible}get isRangeShowing(){return this.showProgressBar&&this.currentIndex>=0&&this.visiblePanelCount>1}getElementsInDesign(e=!1){return e?[this.template]:this.templateElements}prepareValueForPanelCreating(){this.addingNewPanelsValue=this.value,this.isAddingNewPanels=!0,this.isNewPanelsValueChanged=!1}setValueAfterPanelsCreating(){this.isAddingNewPanels=!1,this.isNewPanelsValueChanged&&(this.isValueChangingInternally=!0,this.value=this.addingNewPanelsValue,this.isValueChangingInternally=!1)}getValueCore(){return this.isAddingNewPanels?this.addingNewPanelsValue:super.getValueCore()}setValueCore(e){this.isAddingNewPanels?(this.isNewPanelsValueChanged=!0,this.addingNewPanelsValue=e):super.setValueCore(e)}setIsMobile(e){super.setIsMobile(e),(this.panelsCore||[]).forEac
10h(t=>t.getQuestions(!0).forEach(t=>{t.setIsMobile(e)}))}themeChanged(e){super.themeChanged(e),(this.panelsCore||[]).forEach(t=>t.getQuestions(!0).forEach(t=>{t.themeChanged(e)}))}get panelCount(){return!this.canBuildPanels||this.wasNotRenderedInSurvey?this.getPropertyValue("panelCount"):this.panelsCore.length}set panelCount(e){if(e<0)return;if(!this.isLoadingFromJson&&this.isDesignMode){let t=this.minPanelCount;e<t&&(e=t);let s=this.maxPanelCount;s>0&&e>s&&(e=s)}if(!this.canBuildPanels||this.wasNotRenderedInSurvey){this.setPropertyValue("panelCount",e),this.updateFooterActions();return}if(e==this.panelsCore.length||this.useTemplatePanel)return;this.updateBindings("panelCount",e),this.prepareValueForPanelCreating();let t=e-this.panelCount==1;for(let t=this.panelCount;t<e;t++){let e=this.createNewPanel();this.panelsCore.push(e),"list"==this.displayMode&&"default"!=this.panelsState&&("expanded"===this.panelsState?e.expand():e.title&&e.collapse())}t&&this.singleInputOnAddItem(this.settingPanelCountBasedOnValue),e<this.panelCount&&this.panelsCore.splice(e,this.panelCount-e),this.disablePanelsAnimations(),this.setValueAfterPanelsCreating(),this.setValueBasedOnPanelCount(),this.reRunCondition(),this.updateFooterActions(),this.fireCallback(this.panelCountChangedCallback),this.enablePanelsAnimations()}get visiblePanelCount(){return this.visiblePanels.length}getStructuredValue(e=-1){if(e<0||this.isEmpty()||!Array.isArray(this.value))return this.value;let t=[],s=Math.min(this.visiblePanelCount,this.value.length);for(let i=0;i<s;i++){let s=this.visiblePanels[i],n={};s.collectValues(n,e),t.push(n)}return t}setTemplatePanelSurveyImpl(){this.template.setSurveyImpl(this.useTemplatePanel?this.surveyImpl:new nQ(this))}setPanelsSurveyImpl(){for(var e=0;e<this.panelsCore.length;e++){var t=this.panelsCore[e];t!=this.template&&t.setSurveyImpl(t.data)}}setPanelsState(){if(!this.useTemplatePanel&&"list"==this.displayMode&&this.templateTitle)for(var e=0;e<this.panelsCore.length;e++){var t=this.panelsState;"firstExpanded"===t&&(t=0===e?"expanded":"collapsed"),"expanded"===t?this.panelsCore[e].expand(!1):this.panelsCore[e].state=t}}setValueBasedOnPanelCount(){var e=this.value;if(e&&Array.isArray(e)||(e=[]),e.length!=this.panelCount){for(var t=e.length;t<this.panelCount;t++){let s=this.panels[t].getValue(),i=w.isValueEmpty(s)?{}:s;e.push(i)}e.length>this.panelCount&&e.splice(this.panelCount,e.length-this.panelCount),this.isValueChangingInternally=!0,this.value=e,this.isValueChangingInternally=!1}}onMinPanelCountChanged(){let e=this.minPanelCount;e>this.maxPanelCount&&(this.maxPanelCount=e),this.panelCount<e&&(this.panelCount=e)}onMaxPanelCountChanged(){let e=this.maxPanelCount;e<this.minPanelCount&&(this.minPanelCount=e),this.panelCount>e&&(this.panelCount=e),this.updateFooterActions()}get addButtonId(){return this.id+"addPanel"}get templateTitleLocation(){return this.templateQuestionTitleLocation}set templateTitleLocation(e){this.templateQuestionTitleLocation=e}resetSingleInput(){super.resetSingleInput(),this.locTemplateTitle.onGetTextCallback=null}get locEditPanelText(){return this.getOrCreateLocStr("editPanelText",!1,"editText")}createSingleInputBehavior(){return new nz(this)}getShowQuestionNumbers(){var e;let t=this.showQuestionNumbers;if("default"===t){let t=null==(e=this.survey)?void 0:e.showQuestionNumbers;if("recursive"===t)return t}return t}notifySurveyOnChildrenVisibilityChanged(){return"default"===this.showQuestionNumbers}get panelRemoveButtonLocation(){return this.removePanelButtonLocation}set panelRemoveButtonLocation(e){this.removePanelButtonLocation=e}get showRangeInProgress(){return this.showProgressBar}set showRangeInProgress(e){this.showProgressBar=e}get renderMode(){let e=this.displayMode;if("carousel"==e){let e=this.progressBarLocation;if("top"==e)return"progressTop";if("bottom"==e)return"progressBottom";if("topBottom"==e)return"progressTopBottom"}return e}set renderMode(e){(e||"").startsWith("progress")?("progressTop"==e?this.progressBarLocation="top":"progressBottom"==e?this.progressBarLocation="bottom":"progressTopBottom"==e&&(this.progressBarLocation="topBottom"),this.displayMode="carousel"):this.displayMode=e}updatePanelView(){this.blockAnimations(),this.updateRenderedPanels(),this.releaseAnimations(),this.updatePanelsAnimation()}get isRenderModeList(){return"list"===this.displayMode||this.isSingleInputActive}get isRenderModeTab(){return"tab"===this.displayMode&&!this.isSingleInputActive}setVisibleIndex(e){let t=this.isDesignMode?[this.template]:this.visiblePanelsCore;
10if(this.isVisibleIndexNegative(e))return t.forEach(e=>e.setVisibleIndex(-1)),super.setVisibleIndex(-1);let s=this.getShowQuestionNumbers(),i="default"===s,n=i?e:0;for(let e=0;e<t.length;e++){let r=this.setPanelVisibleIndex(t[e],n,"off"!=s);i&&(n+=r)}return super.setVisibleIndex(i?-1:e),i?n-e:1}setPanelVisibleIndex(e,t,s){return s?e.setVisibleIndex(t):(e.setVisibleIndex(-1),0)}get canAddPanel(){return!this.isDesignMode&&(!!this.legacyNavigation||!!this.isRenderModeList||!(this.currentIndex<this.visiblePanelCount-1)||"next"===this.newPanelPosition)&&this.allowAddPanel&&!this.isReadOnly&&this.panelCount<this.maxPanelCount}get canRemovePanel(){return!this.isDesignMode&&this.allowRemovePanel&&!this.isReadOnly&&this.panelCount>this.minPanelCount}rebuildPanels(){if(!this.isLoadingFromJson){this.prepareValueForPanelCreating();var e=[];if(this.useTemplatePanel)new n_(this,this.template),e.push(this.template);else for(var t=0;t<this.panelCount;t++)e.push(this.createNewPanel());this.panelsCore.splice(0,this.panelsCore.length,...e),this.setValueAfterPanelsCreating(),this.setPanelsState(),this.reRunCondition(),this.updateFooterActions(),this.fireCallback(this.panelCountChangedCallback),this.updateTabToolbar()}}get defaultValueFromLastPanel(){return this.copyDefaultValueFromLastEntry}set defaultValueFromLastPanel(e){this.copyDefaultValueFromLastEntry=e}isDefaultValueEmpty(){return super.isDefaultValueEmpty()&&this.isValueEmpty(this.defaultPanelValue)}setDefaultValue(){if(this.isValueEmpty(this.defaultPanelValue)||!this.isValueEmpty(this.defaultValue))return void super.setDefaultValue();if(this.isEmpty()&&0!=this.panelCount){for(var e=[],t=0;t<this.panelCount;t++)e.push(this.defaultPanelValue);this.value=e}}get isValueArray(){return!0}isEmpty(){var e=this.value;if(!e||!Array.isArray(e))return!0;for(var t=0;t<e.length;t++)if(!this.isRowEmpty(e[t]))return!1;return!0}getProgressInfo(){return tL.getProgressInfoByElements(this.visiblePanelsCore,this.isRequired)}isRowEmpty(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}addPanelUI(){return this.addPanel(void 0,!0)}addPanel(e,t){let s=!0===t;if(s&&(!this.canAddPanel||!this.canLeaveCurrentPanel()))return null;let i=this.addPanelCore(e);return this.panelOnFirstRendering(i),s&&("list"===this.displayMode&&"default"!==this.panelsState&&i.expand(),this.focusNewPanelCallback=()=>{null==i||i.focusFirstQuestion()},this.isPanelsAnimationRunning||this.focusNewPanel()),i}addPanelCore(e){let t=this.currentIndex;return void 0===e&&(e=t<0?this.panelCount:t+1),(e<0||e>this.panelCount)&&(e=this.panelCount),this.updateValueOnAddingPanel(t<0?this.panelCount-1:t,e),this.isRenderModeList||(this.currentIndex=e),this.notifyOnPanelAddedRemoved(!0,e),this.panelsCore[e]}focusNewPanel(){this.focusNewPanelCallback&&(this.focusNewPanelCallback(),this.focusNewPanelCallback=void 0)}updateValueOnAddingPanel(e,t){this.panelCount++;let s=this.value;if(!Array.isArray(s)||s.length!==this.panelCount)return;let i=!1,n=this.panelCount-1;if(t<n){i=!0;let e=s[n];s.splice(n,1),s.splice(t,0,e)}if(this.isValueEmpty(this.defaultPanelValue)||(i=!0,this.copyValue(s[t],this.defaultPanelValue)),this.copyDefaultValueFromLastEntry&&s.length>1){let r=e>-1&&e<=n?e:n;i=!0,this.copyValue(s[t],s[r])}i&&(this.value=s)}canLeaveCurrentPanel(){return"list"===this.displayMode||!this.currentPanel||this.currentPanel.validate(!0,!0)}copyValue(e,t){for(var s in t)e[s]=t[s]}getPanelRemoveButtonId(e){return e.id+"_remove_button"}isRequireConfirmOnDelete(e){if(!this.confirmDelete)return!1;let t=this.getVisualPanelIndex(e);if(t<0||t>=this.visiblePanelCount)return!1;let s=this.visiblePanelsCore[t].getValue();return!this.isValueEmpty(s)&&(this.isValueEmpty(this.defaultPanelValue)||!this.isTwoValueEquals(s,this.defaultPanelValue))}goToNextPanel(){return!(this.currentIndex<0)&&!!this.canLeaveCurrentPanel()&&(this.currentIndex++,!0)}goToPrevPanel(){!(this.currentIndex<0)&&this.currentIndex--}removePanelUI(e){this.removePanel(e,this.isRequireConfirmOnDelete(e))}removePanel(e,t){let s=this.getVisualPanelIndex(e);if(!(s<0)&&!(s>=this.visiblePanelCount))if(void 0!==t){if(!this.canRemovePanel)return;let e=()=>{var e;this.removePanelCore(s);let t=this.visiblePanelCount,i=s>=t?t-1:s,n=0===t?this.addButtonId:i>-1?this.getPanelRemoveButtonId(this.visiblePanels[i]):"";n&&tL.FocusElement(n,!0,null==(e=this.survey)?void 0:e.rootElement)};t?sz({message:this.confirmDeleteText,funcOnYes:()=>{e()},locale:this.getLocale(),rootElement:this.survey.rootElement,cssClass:this.cssClasse
10s.confirmDialog}):e()}else this.removePanelCore(s)}removePanelCore(e){this.removedPanelIndex=e;let t=this.visiblePanelsCore[e],s=this.panelsCore.indexOf(t);if(!(s<0)&&(!this.survey||this.dynamicPanelCallbacks.dynamicPanelRemoving(this,s,t))){this.panelsCore.splice(s,1),this.setPropertyValue("panelCount",this.panelCount),this.singleInputOnRemoveItem(e);var i=this.value;i&&Array.isArray(i)&&!(s>=i.length)?(this.isValueChangingInternally=!0,i.splice(s,1),this.value=i,this.updateFooterActions(),this.fireCallback(this.panelCountChangedCallback),this.notifyOnPanelAddedRemoved(!1,s,t),this.isValueChangingInternally=!1):this.updateFooterActions()}}notifyOnPanelAddedRemoved(e,t,s){s||(s=this.panelsCore[t]);let i=this.getShowQuestionNumbers();if(this.survey){let n="default"===i;e?this.dynamicPanelCallbacks.dynamicPanelAdded(this,t,s,n):this.dynamicPanelCallbacks.dynamicPanelRemoved(this,t,s,n)}e&&s&&("onpanel"===i||"recursive"===i)&&s.setVisibleIndex(0)}recursiveNoCallback(){return"recursive"===this.getShowQuestionNumbers()?this.no:""}getVisualPanelIndex(e){if(w.isNumber(e))return e;let t=this.visiblePanelsCore;for(var s=0;s<t.length;s++)if(t[s]===e||t[s].data===e)return s;return -1}getPanelVisibleIndexById(e){let t=this.visiblePanelsCore;for(var s=0;s<t.length;s++)if(t[s].id===e)return s;return -1}locStrsChanged(){super.locStrsChanged(),this.locTemplateTitle.strChanged();for(var e=this.panelsCore,t=0;t<e.length;t++)e[t].locStrsChanged();this.tabbedMenu&&this.tabbedMenu.locStrsChanged()}randomSeedChanged(){let e=this.panelsCore;for(var t=0;t<e.length;t++)e[t].randomSeedChanged()}clearIncorrectValues(){for(var e=0;e<this.panelsCore.length;e++)this.clearIncorrectValuesInPanel(e)}clearErrors(){super.clearErrors();for(var e=0;e<this.panelsCore.length;e++)this.panelsCore[e].clearErrors()}getQuestionFromArray(e,t){return t<0||t>=this.panelsCore.length?null:this.panelsCore[t].getQuestionByName(e)}clearIncorrectValuesInPanel(e){var t=this.panelsCore[e];t.clearIncorrectValues();var s=this.value,i=s&&e<s.length?s[e]:null;if(i){var n=!1;for(var r in i)!(this.getSharedQuestionFromArray(r,e)||t.getQuestionByValueName(r))&&(this.iscorrectValueWithPostPrefix(t,r,p.commentSuffix)||this.iscorrectValueWithPostPrefix(t,r,p.matrix.totalsSuffix)||(delete i[r],n=!0));n&&(s[e]=i,this.value=s)}}iscorrectValueWithPostPrefix(e,t,s){return t.indexOf(s)===t.length-s.length&&!!e.getQuestionByName(t.substring(0,t.indexOf(s)))}getSharedQuestionFromArray(e,t){return this.survey&&this.valueName?this.survey.getQuestionByValueNameFromArray(this.valueName,e,t):null}addConditionObjectsByContext(e,t){let s=(null==t?void 0:t.isValidator)?t.errorOwner:t,i=!!t&&(!0===t||this.template.questions.indexOf(s)>-1),n=[],r=this.template.questions;for(var a=0;a<r.length;a++)r[a].addConditionObjectsByContext(n,t);for(var o=0;o<p.panel.maxPanelCountInCondition;o++){let t="["+o+"].",s=this.getValueName()+t,i=this.processedTitle+t;for(var a=0;a<n.length;a++)n[a].context?e.push(n[a]):e.push({name:s+n[a].name,text:i+n[a].text,question:n[a].question})}if(i){let s=!0===t?this.getValueName()+".":"",i=!0===t?this.processedTitle+".":"",r=p.expressionVariables.panel+".";for(var a=0;a<n.length;a++){if(n[a].question==t)continue;let o={name:s+r+n[a].name,text:i+r+n[a].text,question:n[a].question};o.context=this,e.push(o)}}}collectNestedQuestionsCore(e,t,s,i){i&&e.push(this);let n=t?this.visiblePanelsCore:this.panelsCore;Array.isArray(n)&&n.forEach(n=>{n.questions.forEach(n=>n.addNestedQuestion(e,t,s,i))})}getConditionJson(e=null,t=null){if(!t)return super.getConditionJson(e);var s=t,i=t.indexOf(".");i>-1&&(s=t.substring(0,i),t=t.substring(i+1));var n=this.template.getQuestionByName(s);return n?n.getConditionJson(e,t):null}onReadOnlyChanged(){var e=this.isReadOnly;this.template.readOnly=e;for(var t=0;t<this.panelsCore.length;t++)this.panelsCore[t].readOnly=e;this.updateNoEntriesTextDefaultLoc(),this.updateFooterActions(),super.onReadOnlyChanged()}updateNoEntriesTextDefaultLoc(){let e=this.getLocalizableString("noEntriesText");e&&(e.localizationName=this.getNoEntriesLocalizationName())}getNoEntriesLocalizationName(){return this.isReadOnly||!this.allowAddPanel?"noEntriesReadonlyText":"noEntriesText"}onSurveyLoad(){this.template.readOnly=this.isReadOnly,this.template.onSurveyLoad();let e=this.adjustPanelCount();e>-1&&this.setPropertyValue("panelCount",e),super.onSurveyLoad()}adjustPanelCount(){let e=this.getPropertyValue("panelCount");return e<this.minPanelCount?this.minPanelCount:e>this.maxPanelCount?this.maxPanelCount:-1}buildPanelsFirstTime(e=!1){if(!this.hasPanelBuildFirstTime&&(e||!this.wasNotRen
10deredInSurvey)){if(this.blockAnimations(),this.hasPanelBuildFirstTime=!0,this.isBuildingPanelsFirstTime=!0,this.getPropertyValue("panelCount")>0&&(this.panelCount=this.getPropertyValue("panelCount")),this.useTemplatePanel&&this.rebuildPanels(),this.setPanelsSurveyImpl(),this.setPanelsState(),this.assignOnPropertyChangedToTemplate(),this.data&&this.isValueChangedWithoutPanels&&(this.isValueChangedWithoutPanels=!1,this.runTriggersOnBuildPanelsFirstTime()),this.survey)for(var t=0;t<this.panelCount;t++)this.notifyOnPanelAddedRemoved(!0,t);this.updateIsReady(),this.showAddPanelButton||this.updateNoEntriesTextDefaultLoc(),this.updateFooterActions(),this.isBuildingPanelsFirstTime=!1,this.releaseAnimations()}}runTriggersOnBuildPanelsFirstTime(){this.value,this.visiblePanelsCore.forEach(e=>{let t=this.getItemData(e.data);if(!w.isValueEmpty(t)){let s=w.createCopyWithPrefix(t,p.expressionVariables.panel+".");e.data.runTriggers("",void 0,s)}})}get showAddPanelButton(){return this.allowAddPanel&&!this.isReadOnly}get wasNotRenderedInSurvey(){return!this.hasPanelBuildFirstTime&&!this.wasRendered&&!!this.survey}get canBuildPanels(){return!this.isLoadingFromJson&&!this.useTemplatePanel}onFirstRenderingCore(){super.onFirstRenderingCore(),this.buildPanelsFirstTime(),this.template.onFirstRendering()}localeChanged(){super.localeChanged(),this.panelsCore.forEach(e=>e.localeChanged())}runConditionCore(e){super.runConditionCore(e),this.runPanelsCondition(this.panelsCore,e)}runTriggers(e,t,s){super.runTriggers(e,t,s),this.visiblePanelsCore.forEach(i=>{i.data.runTriggers(e,t,s)})}reRunCondition(){this.data&&this.runCondition(this.getDataFilteredProperties())}runPanelsCondition(e,t){let s=this.isValueChangingInternally;this.isValueChangingInternally=!0;for(var i=0;i<e.length;i++){let s=e[i],n=p.expressionVariables.panel,r=w.createCopy(t);r[n]=s,s.runCondition(r),s.isVisible}this.isValueChangingInternally=s}onAnyValueChanged(e,t){super.onAnyValueChanged(e,t),this.hasPanelBuildFirstTime||e!==this.getValueName()||(this.isValueChangedWithoutPanels=!0);for(var s=0;s<this.panelsCore.length;s++)this.panelsCore[s].onAnyValueChanged(e,t),this.panelsCore[s].onAnyValueChanged(p.expressionVariables.panel,"")}hasKeysDuplicated(e){for(var t,s=[],i=0;i<this.panelsCore.length;i++)t=this.isValueDuplicated(this.panelsCore[i],s,e)||t;return t}
10updatePanelsContainsErrors(){let e=this.changingValueQuestions;if(Array.isArray(e)&&0!==e.length){for(var t=e[0].parent;t;)t.updateContainsErrors(),t=t.parent;this.updateContainsErrors()}}validateElementCore(e){if(this.isValueChangingInternally&&!this.hasInputInChangedQuestions()||this.isBuildingPanelsFirstTime)return!0;let t=!0,s=this.changingValueQuestions;if(Array.isArray(s)){let i=!0;s.forEach(t=>{i=t.validateElement(e)&&i}),t=!this.hasKeysDuplicated(e)&&i,this.updatePanelsContainsErrors()}else t=this.validateInPanels(e);return super.validateElementCore(e)&&t}hasInputInChangedQuestions(){let e=this.changingValueQuestions;if(!Array.isArray(e)||0===e.length)return!1;for(let t=0;t<e.length;t++)if(e[t].hasInput)return!0;return!1}getContainsErrors(){var e=super.getContainsErrors();if(e)return e;for(var t=this.panelsCore,s=0;s<t.length;s++)if(t[s].containsErrors)return!0;return!1}getIsAnswered(){if(!super.getIsAnswered())return!1;for(var e=this.visiblePanelsCore,t=0;t<e.length;t++){var s=[];e[t].addQuestionsToList(s,!0);for(var i=0;i<s.length;i++)if(!s[i].isAnswered)return!1}return!0}clearValueOnHidding(e){if(!e){if(this.survey&&"none"===this.survey.getQuestionClearIfInvisible("onHidden"))return;this.clearValueInPanelsIfInvisible("onHiddenContainer")}super.clearValueOnHidding(e)}clearValueIfInvisible(e="onHidden"){let t="onHidden"===e?"onHiddenContainer":e;this.clearValueInPanelsIfInvisible(t),super.clearValueIfInvisible(e)}clearValueInPanelsIfInvisible(e){for(var t=0;t<this.panelsCore.length;t++){let n=this.panelsCore[t];var s=n.questions;this.isSetPanelItemData={};for(var i=0;i<s.length;i++){let t=s[i];(!t.visible||n.isVisible)&&(t.clearValueIfInvisible(e),this.isSetPanelItemData[t.getValueName()]=this.maxCheckCount+1)}}this.isSetPanelItemData={}}getIsRunningValidators(){if(super.getIsRunningValidators())return!0;for(var e=0;e<this.panelsCore.length;e++)for(var t=this.panelsCore[e].questions,s=0;s<t.length;s++)if(t[s].isRunningValidators)return!0;return!1}getAllErrors(){var e=super.getAllErrors();let t=this.visiblePanelsCore;for(var s=0;s<t.length;s++)for(var i=t[s].questions,n=0;n<i.length;n++){var r=i[n].getAllErrors();r&&r.length>0&&(e=e.concat(r))}return e}getValueGetterContext(){return new nF(this)}getDisplayValueCore(e,t){var s=this.getUnbindValue(t);if(!s||!Array.isArray(s))return s;for(var i=0;i<this.panelsCore.length&&i<s.length;i++){var n=s[i];n&&(s[i]=this.getPanelDisplayValue(i,n,e))}return s}getPanelDisplayValue(e,t,s){if(!t)return t;for(var i=this.panelsCore[e],n=Object.keys(t),r=0;r<n.length;r++){var a=n[r],o=i.getQuestionByValueName(a);if(o||(o=this.getSharedQuestionFromArray(a,e)),o){var l=o.getDisplayValue(s,t[a]);t[a]=l,s&&o.title&&o.title!==a&&(t[o.title]=l,delete t[a])}}return t}validateInPanels(e){let t=!0,s=this.visiblePanels,i=[];for(let n=0;n<s.length;n++){let r=s[n].validateElement(e);r=!this.isValueDuplicated(s[n],i,e)&&r,!this.isRenderModeList&&!r&&t&&e.focusOnFirstError&&(this.currentIndex=n),t=r&&t}return t}isValueDuplicated(e,t,s){if(!this.keyName)return!1;var i=e.getQuestionByValueName(this.keyName);if(!i||i.isEmpty())return!1;var n=i.value;
10let r=this.changingValueQuestions;Array.isArray(r)&&0>r.indexOf(i)&&i.validateElement(s);for(var a=0;a<t.length;a++)if(n==t[a])return s.fireCallback&&i.addError(new eq(this.keyDuplicationError,this)),s.setErrorElement(i),!0;return t.push(n),!1}getPanelActions(e){let t=e.footerActions;return"right"!==this.removePanelButtonLocation&&t.push(new e2({id:`remove-panel-${e.id}`,component:"sv-paneldynamic-remove-btn",visible:new eb(()=>[this.canRenderRemovePanel(e,"bottom")].every(e=>!0===e)),data:{question:this,panel:e}})),this.survey&&(t=this.titleSettings.getUpdatedPanelFooterActions(e,t,this)),t}canRenderRemovePanelOnRight(e){return this.canRenderRemovePanel(e,"right")}canRenderRemovePanel(e,t){let s=this.canRemovePanel,i="collapsed"!==e.state;return this.removePanelButtonLocation===t&&s&&i}createNewPanel(){var e=this.createAndSetupNewPanelObject(),t=this.template.toJSON();return new Q().toObject(t,e),e.renderWidth="100%",e.updateCustomWidgets(),e.questions.forEach(e=>e.setParentQuestion(this)),new n_(this,e),e.onGetFooterActionsCallback=()=>this.getPanelActions(e),e.onGetFooterToolbarCssCallback=()=>this.cssClasses.panelFooter,e.registerPropertyChangedHandlers(["visible"],()=>{e.visible?this.onPanelAdded(e):this.onPanelRemoved(e),this.updateFooterActions()}),e}createAndSetupNewPanelObject(){var e=this.createNewPanelObject();return e.isInteractiveDesignElement=!1,e.setParentQuestion(this),e.onGetQuestionTitleLocation=()=>this.getTemplateQuestionTitleLocation(),e.onGetQuestionTitleWidth=()=>this.templateQuestionTitleWidth,e.recursiveNoCallback=()=>this.recursiveNoCallback(),e}getTemplateQuestionTitleLocation(){return"default"!=this.templateQuestionTitleLocation?this.templateQuestionTitleLocation:this.getParentTitleLocation()}getChildErrorLocation(e){return"default"!==this.templateErrorLocation?this.templateErrorLocation:super.getChildErrorLocation(e)}createNewPanelObject(){return H.createClass("panel")}setPanelCountBasedOnValue(){if(!this.isValueChangingInternally&&!this.useTemplatePanel){var e=this.value,t=e&&Array.isArray(e)?e.length:0;0==t&&this.getPropertyValue("panelCount")>0&&(t=this.getPropertyValue("panelCount")),this.settingPanelCountBasedOnValue=!0,this.panelCount=t,this.settingPanelCountBasedOnValue=!1}}setQuestionValue(e){if(!this.settingPanelCountBasedOnValue){if(super.setQuestionValue(e,!1),this.setPanelCountBasedOnValue(),!this.isSettingPanelItemData())for(var t=0;t<this.panelsCore.length;t++)this.panelUpdateValueFromSurvey(this.panelsCore[t]);this.updateIsAnswered()}}isSettingPanelItemData(){for(let e in this.isSetPanelItemData)if(this.isSetPanelItemData[e]>0)return!0;return!1}onSurveyValueChanged(e){if(!(void 0===e&&this.isAllPanelsEmpty())){super.onSurveyValueChanged(e);for(var t=0;t<this.panelsCore.length;t++)this.panelSurveyValueChanged(this.panelsCore[t]);void 0===e&&this.setValueBasedOnPanelCount(),this.updateIsReady()}}isAllPanelsEmpty(){for(var e=0;e<this.panelsCore.length;e++)if(!w.isValueEmpty(this.panelsCore[e].getValue()))return!1;return!0}panelUpdateValueFromSurvey(e){let t=e.questions;for(var s=this.getItemData(e.data),i=0;i<t.length;i++){let e=t[i];e.updateValueFromSurvey(s[e.getValueName()]),e.updateCommentFromSurvey(s[e.getValueName()+p.commentSuffix]),e.initDataUI()}}panelSurveyValueChanged(e){for(var t=e.questions,s=this.getItemData(e.data),i=0;i<t.length;i++){var n=t[i];n.onSurveyValueChanged(s[n.getValueName()])}}onSetData(){super.onSetData(),!this.isLoadingFromJson&&this.useTemplatePanel&&(this.setTemplatePanelSurveyImpl(),this.rebuildPanels())}isNewValueCorrect(e){return Array.isArray(e)}getValueChangingOptions(e){let t=e.parent;for(;t.parent;)t=t.parent;let s=t,i=this.panels.indexOf(s);return{question:this,panel:s,name:e.name,panelIndex:i,panelData:this.getPanelItemDataByIndex(i),oldValue:e.value}}getItemIndex(e){var t=this.items.indexOf(e);return t>-1?t:this.items.length}getItemData(e){return this.getPanelItemDataByIndex(this.items.indexOf(e))}getBindedQuestions(){return this.survey&&this.valueName?this.survey.getQuestionsByValueName(this.valueName):[]}getItem(e){let t=this.visiblePanels[e]||void 0;return null==t?void 0:t.data}getPanelItemDataByIndex(e){let t=this.items;var s=this.value;return(e<0&&Array.isArray(s)&&s.length>t.length&&(e=t.length),e<0||!s||!Array.isArray(s)||s.length<=e)?{}:s[e]}updateItemValue(e,t,s,i){if(e===this.template.data||this.isSetPanelItemData[t]>this.maxCheckCount)return;this.isSetPanelItemData[t]||(this.isSetPanelItemData[t]=0),this.isSetPanelItemData[t]++;var n=this.items,r=n.indexOf(e);r<0&&(r=n.length);var a=this.getUnbindValue(this.value);a&&Array.isArray(a)||(a=[]);let o=Math.max(r+1,n.length);for(var l=a.length;l<o;l++)a.push({});if(a[r]||(a[r]={}),this.isValueEmpty(s)?delete a[r][t]:a[r][t]=s,r>
10=0&&r<this.panelsCore.length){Array.isArray(this.changingValueQuestions)||(this.changingValueQuestions=[]);let e=t,s=p.commentSuffix;e.endsWith(s)&&(e=e.substring(0,e.length-s.length));let i=this.panelsCore[r].getQuestionByValueName(e);i&&this.changingValueQuestions.push(i)}this.value=a,this.changingValueQuestions=null,this.isSetPanelItemData[t]--,this.isSetPanelItemData[t]-1&&delete this.isSetPanelItemData[t]}getPlainData(e={includeEmpty:!0}){var t=super.getPlainData(e);if(t){t.isNode=!0;let s=Array.isArray(t.data)?[].concat(t.data):[];t.data=this.panels.map((t,s)=>{var i={name:t.name||s,title:t.title||"Panel",value:t.getValue(),displayValue:t.getValue(),getString:e=>this.getValueAsString(e),isNode:!0,data:t.questions.map(t=>t.getPlainData(e)).filter(e=>!!e)};return(e.calculations||[]).forEach(e=>{i[e.propertyName]=t[e.propertyName]}),i}),t.data=t.data.concat(s)}return t}updateElementCss(e){super.updateElementCss(e);for(var t=0;t<this.panelsCore.length;t++)this.panelsCore[t].updateElementCss(e)}get progressText(){var e=this.visiblePanelCount;return this.getLocalizationFormatString("panelDynamicProgressText",this.currentIndex+1,e)}get progress(){return(this.currentIndex+1)/this.visiblePanelCount*100+"%"}get progressBarAriaLabel(){return E("progressbar",this.getLocale())}getRootCss(){return new eX().append(super.getRootCss()).append(this.cssClasses.empty,this.get
10ShowNoEntriesPlaceholder()).toString()}get cssHeader(){let e=this.isRenderModeTab&&!!this.visiblePanelCount;return new eX().append(super.getCssHeader(this.cssClasses)).append(this.cssClasses.headerTab,this.hasTitleOnTop&&e).toString()}getTabsContainerCss(){return new eX().append(this.cssClasses.tabsContainer).append(this.cssClasses.tabsContainerWithHeader,this.hasTitleOnTop).toString()}getPanelWrapperCss(e){return new eX().append(this.cssClasses.panelWrapper,!e||e.visible).append(this.cssClasses.panelWrapperList,this.isRenderModeList).append(this.cssClasses.panelWrapperInRow,"right"===this.removePanelButtonLocation).toString()}getPanelRemoveButtonCss(){return new eX().append(this.cssClasses.button).append(this.cssClasses.buttonRemove).append(this.cssClasses.buttonRemoveRight,"right"===this.removePanelButtonLocation).toString()}getAddButtonCss(){return new eX().append(this.cssClasses.button).append(this.cssClasses.buttonAdd).append(this.cssClasses.buttonAdd+"--list-mode","list"===this.displayMode).toString()}getPrevButtonCss(){return new eX().append(this.cssClasses.buttonPrev).append(this.cssClasses.buttonPrevDisabled,!this.isPrevButtonVisible).toString()}getNextButtonCss(){return new eX().append(this.cssClasses.buttonNext).append(this.cssClasses.buttonNextDisabled,!this.isNextButtonVisible).toString()}get noEntriesText(){return this.getLocStringText(this.locNoEntriesText)}set noEntriesText(e){this.setLocStringText(this.locNoEntriesText,e)}get locNoEntriesText(){return this.getOrCreateLocStr("noEntriesText",!1,this.getNoEntriesLocalizationName())}getShowNoEntriesPlaceholder(){return!!this.cssClasses.noEntriesPlaceholder&&!this.isDesignMode&&0===this.visiblePanelCount}needResponsiveWidth(){let e=this.getPanels();for(let t=0;t<e.length;t++){let s=e[t];if(s.isVisible&&s.needResponsiveWidth())return!0}return!1}get hasTabbedMenu(){return this.isRenderModeTab&&this.visiblePanels.length>0}get tabbedMenu(){return this.isRenderModeTab?(this.tabbedMenuValue||(this.tabbedMenuValue=new tf,this.tabbedMenuValue.dotsItem.popupModel.showPointer=!1,this.tabbedMenuValue.dotsItem.popupModel.verticalPosition="bottom",this.tabbedMenuValue.dotsItem.popupModel.horizontalPosition="center",this.updateElementCss(!1)),this.tabbedMenuValue):null}get showFooterToolbar(){return this.footerToolbar&&this._showFooterToolbar}get footerToolbar(){return this.footerToolbarValue||this.initFooterToolbar(),this.footerToolbarValue}get ariaRole(){return"group"}get ariaRequired(){return null}get ariaInvalid(){return null}updateFooterActions(){this.updateFooterActionsCallback&&this.updateFooterActionsCallback()}initFooterToolbar(){this.footerToolbarValue=this.createActionContainer();let e=[],t=new e2({id:"sv-pd-prev-btn",title:this.prevPanelText,action:()=>{this.goToPrevPanel()}}),s=new e2({id:"sv-pd-next-btn",title:this.nextPanelText,action:()=>{this.goToNextPanel()}}),i=new e2({id:"sv-pd-add-btn",component:"sv-paneldynamic-add-btn",data:{question:this}}),n=new e2({id:"sv-prev-btn-icon",component:"sv-paneldynamic-prev-btn",data:{question:this}}),r=new e2({id:"sv-pd-progress-text",component:"sv-paneldynamic-progress-text",data:{question:this}}),a=new e2({id:"sv-pd-next-btn-icon",component:"sv-paneldynamic-next-btn",data:{question:this}});e.push(t,s,i,n,r,a),this.updateFooterActionsCallback=()=>{let e=this.legacyNavigation,o=this.isRenderModeList,l=this.isMobile,u=!e&&!o;t.visible=u&&this.currentIndex>0,s.visible=u&&this.currentIndex<this.visiblePanelCount-1,s.needSpace=l&&s.visible&&t.visible,i.visible=this.canAddPanel,i.needSpace=this.isMobile&&!s.visible&&t.visible,r.visible=!this.isRenderModeList&&!l,r.needSpace=!e&&!this.isMobile;let h=e&&!o;n.visible=h,a.visible=h,n.needSpace=h},this.updateFooterActionsCallback(),this.footerToolbarValue.setItems(e),this.footerToolbar.flushUpdates(),this._showFooterToolbar=new eb(()=>{var e;return null==(e=this.footerToolbarValue)?void 0:e.hasVisibleActions})}createTabByPanel(e,t){if(!this.isRenderModeTab)return;let s=new R(e,!0);s.onGetTextCallback=s=>{if(s||(s=this.locTabTitlePlaceholder.renderedHtml),!this.survey)return s;let i={title:s,panel:e,visiblePanelIndex:t};return this.dynamicPanelCallbacks.dynamicPanelGetTabTitle(this,i),i.title},s.sharedData=this.locTemplateTabTitle;let i=e.id,n=this.getPanelVisibleIndexById(i)===this.currentIndex;return new nB({id:`${this.id}_tab_${i}`,panelId:i,pressed:n,locTitle:s,disableHide:n,action:()=>{this.currentIndex=this.getPanelVisibleIndexById(i)}})}
10getTabbedMenuCss(e){let t=null!=e?e:this.cssClasses;return new eX().append(t.tabsRoot).append(t.tabsLeft,"left"===this.tabAlign).append(t.tabsRight,"right"===this.tabAlign).append(t.tabsCenter,"center"===this.tabAlign).toString()}updateTabToolbarItemsPressedState(){if(!this.isRenderModeTab||this.currentIndex<0||this.currentIndex>=this.visiblePanelCount)return;let e=this.visiblePanelsCore[this.currentIndex];this.tabbedMenu.actions.forEach(t=>{let s=t.panelId===e.id;t.pressed=s,t.disableHide=s})}updateTabToolbar(){if(!this.isRenderModeTab)return;let e=[],t=this.visiblePanelsCore;for(let s=0;s<t.length;s++)this.visiblePanelsCore.forEach(i=>e.push(this.createTabByPanel(t[s],s)));this.tabbedMenu.setItems(e)}addTabFromToolbar(e,t){if(!this.isRenderModeTab)return;let s=this.createTabByPanel(e,t);this.tabbedMenu.actions.splice(t,0,s),this.updateTabToolbarItemsPressedState()}removeTabFromToolbar(e){if(!this.isRenderModeTab)return;let t=this.tabbedMenu.actions.find(t=>t.panelId==e.id);t&&(this.tabbedMenu.actions.splice(this.tabbedMenu.actions.indexOf(t),1),this.updateTabToolbarItemsPressedState())}get showNavigation(){return(!this.isReadOnly||1!=this.visiblePanelCount)&&this.visiblePanelCount>0&&!!this.cssClasses.footer}showSeparator(e){return this.isRenderModeList&&e<this.renderedPanels.length-1}calcCssClasses(e){let t=super.calcCssClasses(e),s=this.tabbedMenu;
10return s&&(s.containerCss=this.getTabbedMenuCss(t),s.cssClasses=t.tabs,s.dotsItem.cssClasses=t.tabs,s.dotsItem.popupModel.contentComponentData.model.cssClasses=e.list),t}onMobileChanged(){super.onMobileChanged(),this.updateFooterActions()}}V([e_({localizable:{defaultStr:"panelDynamicTabTextFormat",markdown:!0}})],nH.prototype,"templateTabTitle",void 0),V([e_({localizable:{defaultStr:!0,markdown:!0}})],nH.prototype,"tabTitlePlaceholder",void 0),V([eH({})],nH.prototype,"_renderedPanels",void 0),V([e_()],nH.prototype,"confirmDelete",void 0),V([e_({defaultValue:""})],nH.prototype,"keyName",void 0),V([e_({localizable:{defaultStr:"confirmDelete"}})],nH.prototype,"confirmDeleteText",void 0),V([e_({localizable:{defaultStr:!0}})],nH.prototype,"keyDuplicationError",void 0),V([e_({localizable:{defaultStr:"pagePrevText"}})],nH.prototype,"prevPanelText",void 0),V([e_({localizable:{defaultStr:"pageNextText"}})],nH.prototype,"nextPanelText",void 0),V([e_({localizable:{defaultStr:"addPanel"}})],nH.prototype,"addPanelText",void 0),V([e_({localizable:{defaultStr:"removePanel"}})],nH.prototype,"removePanelText",void 0),V([e_()],nH.prototype,"panelsState",void 0),V([e_({onSetting:e=>e<0?0:e})],nH.prototype,"minPanelCount",void 0),V([e_({onSetting:e=>e<=0?1:e<p.panel.maxPanelCount?e:p.panel.maxPanelCount})],nH.prototype,"maxPanelCount",void 0),V([e_()],nH.prototype,"allowAddPanel",void 0),V([e_()],nH.prototype,"newPanelPosition",void 0),V([e_()],nH.prototype,"allowRemovePanel",void 0),V([e_()],nH.prototype,"templateQuestionTitleLocation",void 0),V([e_()],nH.prototype,"templateQuestionTitleWidth",void 0),V([e_()],nH.prototype,"templateErrorLocation",void 0),V([e_({onSetting:e=>e?"onsurvey"===(e=e.toLowerCase())?"default":e:"off"})],nH.prototype,"showQuestionNumbers",void 0),V([e_()],nH.prototype,"removePanelButtonLocation",void 0),V([e_({onSet:(e,t)=>{t.fireCallback(t.renderModeChangedCallback),t.updatePanelView()}})],nH.prototype,"displayMode",void 0),V([e_({onSet:(e,t)=>{t.fireCallback(t.currentIndexChangedCallback)}})],nH.prototype,"showProgressBar",void 0),V([e_({onSet:(e,t)=>{}})],nH.prototype,"progressBarLocation",void 0),V([e_()],nH.prototype,"tabAlign",void 0),V([e_()],nH.prototype,"defaultPanelValue",void 0),V([e_()],nH.prototype,"copyDefaultValueFromLastEntry",void 0),V([e_({defaultValue:!1})],nH.prototype,"_showFooterToolbar",void 0),V([e_({defaultValue:!1,onSet:(e,t)=>{t.updateFooterActions()}})],nH.prototype,"legacyNavigation",void 0);class nz extends tF{get panelDynamic(){return this.question}getSingleInputQuestionsCore(e,t){this.panelDynamic.onFirstRendering();let s=[],i=this.panelDynamic.visiblePanels;if(t)for(let e=0;e<i.length;e++){let t=i[e];t.hasValueAnyQuestion(!0)&&t.validate(!1,!1)||this.fillSingleInputQuestionsByPanel(s,t)}return this.getSingleInputQuestionsForDynamic(e,s)}fillSingleInputQuestionsInContainer(e,t){let s=this.getPanelByQuestion(t);this.fillSingleInputQuestionsByPanel(e,s)}fillSingleInputQuestionsByPanel(e,t){t&&t.visibleQuestions.forEach(t=>t.addNestedQuestion(e,!0,!1,!1))}getSingleQuestionLocTitleCore(){let e=this.panelDynamic.locTemplateTitle;return e.onGetTextCallback=e=>{let t=this.panelDynamic.singleInputQuestion;return t?this.processSingleInputTitle(e,this.getPanelByQuestion(t)):e},e}processSingleInputTitle(e,t){return(e||(e=this.getSingleInputTitleTemplate()),t)?t.getProcessedText(e):e}getSingleInputTitleTemplate(){return this.panelDynamic.getLocalizationString("panelDynamicTabTextFormat")}getPanelByQuestion(e){let t=e.parent;for(;t&&t.parent;)t=t.parent;return t}getSingleInputAddTextCore(){if(this.panelDynamic.canAddPanel)return this.panelDynamic.addPanelText}singleInputAddItemCore(){this.panelDynamic.addPanelUI()}getSingleQuestionOnChange(e){let t=this.panelDynamic.visiblePanels;if(t.length>0){(e<0||e>=t.length)&&(e=t.length-1);let s=t[e].visibleQuestions;if(s.length>0)return s[0]}return null}createSingleInputSummary(){let e=this.panelDynamic,t=new sK(e,e.locNoEntriesText),s=[];return e.visiblePanels.forEach(t=>{let i=new R(e,!0,void 0,e.locTemplateTitle.localizationName);i.setJson(e.locTemplateTitle.getJson()),i.onGetTextCallback=s=>this.processSingleInputTitle(e.templateTitle,t);let n=new e2({locTitle:e.locEditPanelText,action:()=>{this.singInputEditPanel(t)}}),r=e.canRemovePanel?new e2({locTitle:e.locRemovePanelText,action:()=>{e.removePanelUI(t)}}):void 0;s.push(new sJ(i,n,r))}),t.items=s,t}singleInputMoveToFirstCore(){var e;let t=null==(e=this.panelDynamic.singleInputQuestion)?void 0:e.parent;for(;t&&t.parent;)t=t.parent;this.singInputEditPanel(t)}singInputEditPanel(e){if(!e)return;let t=e.visibleQuestions;t.length>0&&this.setSingleInputQuestion(t[0])}}H.addClass("paneldynamic",[{name:"showCommentArea:switch",visible:!0},{name:"templateElements",alternativeName:"questions",baseClassName:"question",visible:!1,isLightSerializable:!1},{name:"templateTitle:text",serializationProperty:"locTemplateTitle"},{name:"templateTabTitle",serializationProperty:"locTemplateTabTitle",visibleIf:e=>"tab"===e.displayMode},{name:"tabTitlePlaceholder",serializationProperty:"locTabTitlePlaceholder",visibleIf:e=>"tab"===e.displayMode},{name:"templateDescription:text",serializationProperty:"locTemplateDescription"},{name:"minWidth",defaultFunc:()=>"auto"},{name:"noEntriesText:text",serializationProperty:"locNoEntriesText"},{name:"allowAddPanel:boolean",default:!0},{name:"allowRemovePanel:boolean",default:!0},{name:"newPanelPosition",choices:["next","last"],default:"last"},{name:"panelCount:number",isBindable:!0,default:0,choices:[0,1,2,3,4,5,6,7,8,9,10]},{name:"minPanelCount:number",default:0,minValue:0},{name:"maxPanelCount:number",defaultFunc:()=>p.panel.maxPanelCount},"defaultPanelValue:panelvalue",{name:"copyDefaultValueFromLastEntry:boolean",alternativeName:"defaultValueFromLastPanel"},{name:"panelsState",default:"default",choices:["default","collapsed","expanded","firstExpanded"],visibleIf:e=>"list"===e.displayMode},{name:"keyName"},{name:"keyDuplicationError",serializationProperty:"locKeyDuplicationError"},{name:"confirmDelete:boolean"},{name:"confirmDeleteText",serializationProperty:"locConfirmDeleteText",visibleIf:e=>e.confirmDelete},{name:"addPanelText",alternativeName:"panelAddText",serializationProperty:"locAddPanelText",visibleIf:e=>e.allowAddPanel},{name:"removePanelText",alternativeName:"panelRemoveText",serializationProperty:"locRemovePanelText",visibleIf:e=>e.allowRemovePanel},{name:"prevPanelText",alternativeName:"panelPrevText",serializationProperty:"locPrevPanelText",visibleIf:e=>"list"!==e.displayMode},{name:"nextPanelText",alternativeName:"panelNextText",serializationProperty:"locNextPanelText",visibleIf:e=>"list"!==e.displayMode},{name:"showQuestionNumbers",default:"off",choices:["default","onpanel","recursive","off"]},{name:"questionStartIndex",visibleIf:e=>{let t=e.showQuestionNumbers;return"onpanel"===t||"recursive"===t}},{name:"renderMode",visible:!1,isSerializable:!1},{name:"displayMode",default:"list",choices:["list","carousel","tab"]},{name:"showProgressBar:boolean",alternativeName:"showRangeInProgress",default:!0,visibleIf:e=>"carousel"===e.displayMode},{name:"progressBarLocation",default:"top",choices:["top","bottom","topBottom"],visibleIf:e=>e.showProgressBar&&"carousel"===e.displayMode},{name:"tabAlign",default:"center",choices:["left","center","right"],visibleIf:e=>"tab"===e.displayMode},{name:"templateQuestionTitleLocation",alternativeName:"templateTitleLocation",default:"default",choices:["default","to
10p","bottom","left"]},{name:"templateQuestionTitleWidth",visibleIf:function(e){return!!e&&e.template.availableQuestionTitleWidth()}},{name:"templateErrorLocation",default:"default",choices:["default","top","bottom"]},{name:"templateVisibleIf:expression"},{name:"removePanelButtonLocation",alternativeName:"panelRemoveButtonLocation",default:"bottom",choices:["bottom","right"],visibleIf:e=>e.allowRemovePanel}],function(){return new nH("")},"question"),sm.Instance.registerQuestion("paneldynamic",e=>new nH(e));class nU{static getProgressTextInBarCss(e){return new eX().append(e.progressText).append(e.progressTextInBar).toString()}static getProgressTextUnderBarCss(e){return new eX().append(e.progressText).append(e.progressTextUnderBar).toString()}}class nW extends ew{static get operators(){return null!=nW.operatorsValue||(nW.operatorsValue={empty:function(e,t){return!e},notempty:function(e,t){return!!e},equal:function(e,t){return e==t},notequal:function(e,t){return e!=t},contains:function(e,t){return e&&e.indexOf&&e.indexOf(t)>-1},notcontains:function(e,t){return!e||!e.indexOf||-1==e.indexOf(t)},greater:function(e,t){return e>t},less:function(e,t){return e<t},greaterorequal:function(e,t){return e>=t},lessorequal:function(e,t){return e<=t}}),nW.operatorsValue}constructor(){super()}get id(){return this.uniqueId}getType(){return"triggerbase"}toString(){var e=this.getType().replace("trigger",""),t=this.expression;return t&&(e+=", "+t),e}get isInternal(){return!0===this.isGhost}get operator(){return this.getPropertyValue("operator","equal")}set operator(e){!e||(e=e.toLowerCase(),nW.operators[e]&&this.setPropertyValue("operator",e))}get expression(){return this.getPropertyValue("expression",this.buildExpression())}set expression(e){this.setPropertyValue("expression",e)}canBeExecuted(e){return!0}canBeExecutedOnComplete(){return!1}checkExpression(e){if(this.isExecutingOnNextPage=e.isOnNextPage,this.isExecutingOnNavigation=e.isOnNavigation||e.isOnNextPage,!this.canBeExecuted(e.isOnNextPage)||e.isOnComplete&&!this.canBeExecutedOnComplete())return;let t=Object.keys(e.keys);if(Array.isArray(t)&&!this.canBeExecuteOnKeysChange(t))return;let s=e.properties||null;!this.runExpressionByProperty("expression",s,e=>{this.triggerResult(!0===e,s)},t=>this.isCheckRequired(t,e.keys))&&this.isCheckRequired(null,e.keys)&&this.canSuccessOnEmptyExpression()&&this.triggerResult(!0,s)}canBeExecuteOnKeysChange(e){return!0}canSuccessOnEmptyExpression(){return!1}check(e){nW.operators[this.operator](e,this.value)?this.onSuccess(null):this.onFailure()}get requireValidQuestion(){return!1}triggerResult(e,t){e?(this.onSuccess(t),this.onSuccessExecuted()):this.onFailure()}onSuccess(e){}onFailure(){}onSuccessExecuted(){}buildExpression(){return!this.name||this.isValueEmpty(this.value)&&this.isRequireValue?"":"{"+this.name+"} "+this.operator+" "+t9.toOperandString(this.value)}isCheckRequired(e,t){return!!t&&((null==e?void 0:e.hasFunction())===!0||new z().isAnyKeyChanged(t,this.getUsedVariables(e)))}getUsedVariables(e){if(!e)return[];let t=e.getVariables();if(Array.isArray(t)){let e=p.expressionVariables.unwrapPostfix;for(let s=t.length-1;s>=0;s--){let i=t[s];i.endsWith(e)&&t.push(i.substring(0,i.length-e.length))}}return t}get isRequireValue(){return"empty"!==this.operator&&"notempty"!=this.operator}}nW.operatorsValue=null,V([e_()],nW.prototype,"value",void 0),V([e_()],nW.prototype,"name",void 0);class nj extends nW{constructor(){super(),this.ownerValue=null}get owner(){return this.ownerValue}setOwner(e){this.ownerValue=e}getOwner(){return this.owner}getSurvey(e=!1){return this.owner&&this.owner.getSurvey?this.owner.getSurvey():null}isRealExecution(){return!0}onSuccessExecuted(){this.owner&&this.isRealExecution()&&this.owner.triggerExecuted(this)}}class nG extends nj{constructor(){super(),this.pages=[],this.questions=[]}getType(){return"visibletrigger"}onSuccess(e){this.onTrigger(this.onItemSuccess)}onFailure(){this.onTrigger(this.onItemFailure)}onTrigger(e){if(this.owner)for(var t=this.owner.getObjects(this.pages,this.questions),s=0;s<t.length;s++)e(t[s])}onItemSuccess(e){e.visible=!0}onItemFailure(e){e.visible=!1}}class nZ extends nj{constructor(){super()}getType(){return"completetrigger"}get requireValidQuestion(){return!0}isRealExecution(){return!p.triggers.executeCompleteOnValueChanged===this.isExecutingOnNavigation}onSuccess(e){this.owner&&(this.isRealExecution()?this.owner.setCompleted(this):this.owner.canBeCompleted(this,!0))}onFailure(){this.owner.canBeCompleted(this,!1)}}class nJ extends nj{constructor(){super()}getType(){return"setvaluetrigger"}canBeExecuted(e){return!e&&!!this.setToName}canBeExecuteOnKeysChange(e){return(1!==e.length||e[0]!==this.setToName)&&super.canBeExecuteOnKeysChange(e)}onPropertyValueChanged(e,t,s){if(super.onPropertyValueChanged(e,t,s),"setToName"===e){var i=this.getSurvey();i&&!i.isLoadingFromJson&&i.isDesignMode&&(this.setValue=void 0)}}onSuccess(e){this.setToName&&this.owner&&this.owner.setTriggerValue(this.setToName,w.getUnbindValue(this.setValue),this.isVariable)}}V([e_()],nJ.prototype,"setToName",void 0),V([e_()],nJ.prototype,"setValue",void 0),V([e_()],nJ.prototype,"isVariable",void 0);
vendor: 6,473 bytes, line 10
10class nK extends nj{constructor(){super()}getType(){return"skiptrigger"}get requireValidQuestion(){return this.canBeExecuted(!1)}canBeExecuted(e){return!p.triggers.executeSkipOnValueChanged===e}onSuccess(e){this.gotoName&&this.owner&&this.owner.focusQuestion(this.gotoName)}}V([e_()],nK.prototype,"gotoName",void 0);class nY extends nj{constructor(){super()}getType(){return"runexpressiontrigger"}canBeExecuted(e){return!e}onSuccess(e){this.owner&&this.runExpressionByProperty("runExpression",e,e=>{this.onCompleteRunExpression(e)})}onCompleteRunExpression(e){this.setToName&&void 0!==e&&this.owner.setTriggerValue(this.setToName,w.convertValToQuestionVal(e),!1)}}V([e_()],nY.prototype,"setToName",void 0),V([e_()],nY.prototype,"runExpression",void 0);class n$ extends nj{constructor(){super()}canBeExecuted(e){return!e&&!!this.setToName&&!!this.fromName}getType(){return"copyvaluetrigger"}canBeExecuteOnKeysChange(e){return(1!==e.length||e[0]!==this.setToName)&&super.canBeExecuteOnKeysChange(e)}onSuccess(e){this.setToName&&this.owner&&this.owner.copyTriggerValue(this.setToName,this.fromName,this.copyDisplayValue)}canSuccessOnEmptyExpression(){return!0}getUsedVariables(e){let t=super.getUsedVariables(e);return 0===t.length&&this.fromName&&t.push(this.fromName),t}}V([e_()],n$.prototype,"setToName",void 0),V([e_()],n$.prototype,"fromName",void 0),V([e_()],n$.prototype,"copyDisplayValue",void 0),H.addClass("trigger",[{name:"operator",default:"equal",visible:!1},{name:"value",visible:!1},"expression:condition"]),H.addClass("surveytrigger",[{name:"name",visible:!1}],null,"trigger"),H.addClass("visibletrigger",["pages:pages","questions:questions"],function(){return new nG},"surveytrigger"),H.addClass("completetrigger",[],function(){return new nZ},"surveytrigger"),H.addClass("setvaluetrigger",[{name:"!setToName:questionvalue"},{name:"setValue:triggervalue",dependsOn:"setToName",visibleIf:function(e){return!!e&&!!e.setToName}},{name:"isVariable:boolean",visible:!1}],function(){return new nJ},"surveytrigger"),H.addClass("copyvaluetrigger",[{name:"!fromName:questionvalue"},{name:"!setToName:questionvalue"},{name:"copyDisplayValue:boolean",visible:!1}],function(){return new n$},"surveytrigger"),H.addClass("skiptrigger",[{name:"!gotoName:question"}],function(){return new nK},"surveytrigger"),H.addClass("runexpressiontrigger",[{name:"setToName:questionvalue"},"runExpression:expression"],function(){return new nY},"surveytrigger");class nX extends ew{constructor(e,t=null){super(),this.closeOnCompleteTimeout=0,t?this.surveyValue=t:this.surveyValue=this.createSurvey(e),this.surveyValue.fitToContainer=!0,this.windowElement=n.createElement("div"),this.survey.onComplete.add((e,t)=>{this.onSurveyComplete()}),this.width=new eb(()=>this.survey.width),this.width=this.survey.width,this.updateCss()}onPropertyValueChanged(e,t,s){if(super.onPropertyValueChanged(e,t,s),"isShowing"===e){let e=this.showingChangedCallback;e&&e()}"isExpanded"===e&&(this.isFullScreen&&!s&&(this.isFullScreen=!1),this.onExpandedChanged()),"isFullScreen"===e&&(s&&!this.isExpanded&&(this.isExpanded=!0),this.setCssRoot())}getType(){return"popupsurvey"}get survey(){return this.surveyValue}show(){this.isShowing=!0}hide(){this.isShowing=!1}toggleFullScreen(){this.isFullScreen=!this.isFullScreen}get isCollapsed(){return!this.isExpanded}onExpandedChanged(){this.expandedChangedCallback&&this.expandedChangedCallback(),this.updateCssButton()}get title(){return this.survey.title}set title(e){this.survey.title=e}get locTitle(){return this.survey.locTitle.isEmpty?null:this.survey.locTitle}get locDescription(){return this.survey.locTitle.isEmpty?null:this.survey.locDescription}expand(){this.isExpanded=!0}collapse(){this.isExpanded=!1}changeExpandCollapse(){this.isExpanded=!this.isExpanded}get css(){return this.survey.css}get cssButton(){return this.getPropertyValue("cssButton","")}get cssRoot(){let e=this.getPropertyValue("cssRoot","");return this.isCollapsed&&(e+=" "+this.getPropertyValue("cssRootCollapsedMod","")),e}get cssRootCollapsedMod(){return this.getPropertyValue("cssRootCollapsedMod")}get cssRootContent(){return this.getPropertyValue("cssRootContent")}get cssBody(){return this.getPropertyValue("cssBody","")}get cssHeaderRoot(){return this.getPropertyValue("cssHeaderRoot","")}get cssHeaderTitleCollapsed(){return this.getPropertyValue("cssHeaderTitleCollapsed","")}get cssHeaderButtonsContainer(){return this.getPropertyValue("cssHeaderButtonsContainer","")}get cssHeaderCollapseButton(){return this.getPropertyValue("cssHeaderCollapseButton","")}get cssHeaderCloseButton(){return this.getPropertyValue("cssHeaderCloseButton","")}get cssHeaderFullScreenButton(){return this.getPropertyValue("cssHeaderFullScreenButton","")}get renderedWidth(){let e=this.getPropertyValue("width","60%");return e&&!isNaN(e)&&(e+="px"),e}updateCss(){if(!this.css||!this.css.window)return;let e=this.css.window;this.setCssRoot(),this.setPropertyValue("cssRootCollapsedMod",e.rootCollapsedMod),this.setPropertyValue("cssRootContent",e.rootContent),this.setPropertyValue("cssBody",e.body);let t=e.header;t&&(this.setPropertyValue("cssHeaderRoot",t.root),this.setPropertyValue("cssHeaderTitleCollapsed",t.titleCollapsed),this.setPropertyValue("cssHeaderButtonsContainer",t.buttonsContainer),this.setPropertyValue("cssHeaderCollapseButton",t.collapseButton),this.setPropertyValue("cssHeaderCloseButton",t.closeButton),this.setPropertyValue("cssHeaderFullScreenButton",t.fullScreenButton),this.updateCssButton())}setCssRoot(){let e=this.css.window;this.isFullScreen?this.setPropertyValue("cssRoot",e.root+" "+e.rootFullScreenMode):this.setPropertyValue("cssRoot",e.root)}updateCssButton(){let e=this.css.window?this.css.window.header:null;e&&this.setCssButton(this.isExpanded?e.buttonExpanded:e.buttonCollapsed)}setCssButton(e){e&&this.setPropertyValue("cssButton",e)}createSurvey(e){return new ip(e)}onSurveyComplete(){if(!(this.closeOnCompleteTimeout<0))if(0==this.closeOnCompleteTimeout)this.hide();else{var e=this,t=null;t=setInterval(function(){e.hide(),clearInterval(t)},1e3*this.closeOnCompleteTimeout)}}onScroll(){this.survey.onScroll()}}V([e_({defaultValue:!1})],nX.prototype,"isShowing",void 0),V([e_({defaultValue:!1})],nX.prototype,"isFullScreen",void 0),V([e_({defaultValue:!1})],nX.prototype,"isExpanded",void 0),V([e_({defaultValue:!1})],nX.prototype,"allowClose",void 0),V([e_({defaultValue:!1})],nX.prototype,"allowFullScreen",void 0),V([e_()],nX.prototype,"width",void 0);
10class n1{constructor(){this._lockScroll=!1}setRootElement(e){this._containerElementValue=null==e?void 0:e.querySelector(".sv-scroll__scroller"),this._scrollbarElement=null==e?void 0:e.querySelector(".sv-scroll__scrollbar"),this._scrollbarSizerElement=null==e?void 0:e.querySelector(".sv-scroll__scrollbar-sizer"),this._containerBodyElement=null==e?void 0:e.querySelector(".sv-scroll__container"),e&&i.isAvailable()&&(this._containerBodyResizeObserver=new ResizeObserver(e=>{for(let t of e){let e=t.contentBoxSize?t.contentBoxSize[0].blockSize:t.contentRect.width;this._scrollbarSizerElement.style.height=e+"px"}this.onInnerHeightChanged&&this.onInnerHeightChanged(this._containerBodyElement.clientHeight>this._containerElementValue.clientHeight)}),this._containerBodyResizeObserver.observe(this._containerBodyElement))}onScrollContainer(){this._lockScroll=!0,this._scrollbarElement.scrollTop=this._containerElementValue.scrollTop}onScrollScrollbar(){if(this._lockScroll){this._lockScroll=!1;return}this._containerElementValue.scrollTop=this._scrollbarElement.scrollTop}unsubscribeRootElement(){this._containerBodyResizeObserver&&(this._containerBodyResizeObserver.disconnect(),this._containerBodyResizeObserver=void 0)}}let n0='input:not(:disabled):not([readonly]):not([type=hidden]),select:not(:disabled),textarea:not(:disabled):not([readonly]),button:not(:disabled):not([tabindex="-1"]),[tabindex]:not([tabindex^="-"])';class n2 extends ew{updateIsVisible(e){this._isVisible=e,this.onVisibilityChanged.fire(this,{isVisible:e})}updateBeforeShowing(){this.model.onShow()}updateAfterHiding(){this.model.onHiding()}getLeaveOptions(){return{cssClass:"sv-popup--leave",onBeforeRunAnimation:e=>{e.setAttribute("inert","")},onAfterRunAnimation:e=>e.removeAttribute("inert")}}getEnterOptions(){return{cssClass:"sv-popup--enter"}}getAnimatedElement(){return this.getAnimationContainer()}isAnimationEnabled(){return"overlay"!==this.model.displayMode&&p.animationEnabled}getRerenderEvent(){return this.onElementRerendered}getAnimationContainer(){var e;return null==(e=this.container)?void 0:e.querySelector(this.fixedPopupContainer)}get isVisible(){return this._isVisible}set isVisible(e){this.visibilityAnimation.sync(e)}get container(){return this.containerElement||this.createdContainer}getLocale(){return this.locale?this.locale:super.getLocale()}hidePopup(){this.model.isVisible=!1}getStyleClass(){return new eX().append(this.model.cssClass)}getShowFooter(){return this.isOverlay}getShowHeader(){return this.getShowCloseButton()}getShowCloseButton(){return!!this.model.showCloseButton}getPopupHeaderTemplate(){return this.model.showCloseButton?"popup-close-button":void 0}createFooterActionBar(){this.footerToolbarValue=new to}resetDimensionsAndPositionStyleProperties(){this.top="",this.left="",this.height="",this.width="",this.minWidth=""}onModelChanging(e){}setupModel(e){this.model&&this.model.onVisibilityChanged.remove(this.onModelIsVisibleChangedCallback),this.onModelChanging(e),this._model=e,e.onVisibilityChanged.add(this.onModelIsVisibleChangedCallback),this.onModelIsVisibleChangedCallback()}get model(){return this._model}set model(e){this.setupModel(e)}constructor(e){super(),this.popupSelector=".sv-popup",this.fixedPopupContainer=".sv-popup",this.containerSelector=".sv-popup__container",this.scrollingContentSelector=".sv-popup__scrolling-content",this.visibilityAnimation=new tI(this,e=>{this._isVisible!==e&&(e?(this.updateBeforeShowing(),this.updateIsVisible(e)):(this.updateOnHiding(),this.updateIsVisible(e),this.updateAfterHiding(),this._isPositionSetValue=!1))},()=>this._isVisible),this.onVisibilityChanged=new P,this.onModelIsVisibleChangedCallback=()=>{this.isVisible=this.model.isVisible},this._isPositionSetValue=!1,this.model=e,this.locale=this.model.locale}get title(){return this.model.title}get contentComponentName(){return this.model.contentComponentName}get contentComponentData(){return this.model.contentComponentData}get isModal(){return this.model.isModal}get isFocusedContent(){return this.model.isFocusedContent}get isFocusedContainer(){return this.model.isFocusedContainer}
10get showFooter(){return this.getShowFooter()}get showHeader(){return this.getShowHeader()}get showCloseButton(){return this.getShowCloseButton()}get popupHeaderTemplate(){return this.getPopupHeaderTemplate()}get isOverlay(){return"overlay"===this.model.displayMode}get styleClass(){return this.getStyleClass().toString()}get cancelButtonText(){return this.getLocalizationString("modalCancelButtonText")}get footerToolbar(){return this.footerToolbarValue||this.createFooterActionBar(),this.footerToolbarValue}onKeyDown(e){"Tab"===e.key||9===e.keyCode?this.trapFocus(e):("Escape"===e.key||27===e.keyCode)&&this.hidePopup()}trapFocus(e){let t=this.container.querySelectorAll(n0),s=t[0],i=t[t.length-1],n=e9();e.shiftKey?n===s&&(i.focus(),e.preventDefault()):n===i&&(s.focus(),e.preventDefault())}switchFocus(){this.isFocusedContent?this.focusFirstInput():this.isFocusedContainer&&this.focusContainer()}get isPositionSet(){return this._isPositionSetValue}updateOnShowing(){let e=e9();this.prevActiveElement=e,this.isOverlay&&this.resetDimensionsAndPositionStyleProperties(),this.switchFocus(),this._isPositionSetValue=!0}updateOnHiding(){this.isFocusedContent&&this.prevActiveElement&&this.prevActiveElement.focus({preventScroll:!0})}focusContainer(){if(!this.container)return;let e=this.container.querySelector(this.popupSelector);null==e||e.focus()}focusFirstInput(){setTimeout(()=>{if(this.container){var e=this.container.querySelector(this.model.focusFirstInputSelector||n0);e?e.focus():this.focusContainer()}},100)}clickClose(e){this.hidePopup(),null==e||e.stopPropagation()}clickOutside(e){this.hidePopup(),null==e||e.stopPropagation()}blur(e){this.model.onBlur()}cancel(){this.model.onCancel(),this.hidePopup()}dispose(){super.dispose(),this.model&&this.model.onVisibilityChanged.remove(this.onModelIsVisibleChangedCallback),this.createdContainer&&(this.createdContainer.remove(),this.createdContainer=void 0),this.footerToolbarValue&&this.footerToolbarValue.dispose(),this.resetComponentElement()}initializePopupContainer(){if(!this.container){let e=n.createElement("div");this.createdContainer=e,(e=>{let{root:t}=p.environment;return"string"==typeof e?t.getElementById(e):e})(p.environment.popupMountContainer).appendChild(e)}}setComponentElement(e){e&&(this.containerElement=e)}resetComponentElement(){this.containerElement=void 0,this.prevActiveElement=void 0}preventScrollOuside(e,t){let s=e.target;for(;s!==this.container;){if("auto"===n.getComputedStyle(s).overflowY&&s.scrollHeight!==s.offsetHeight){let{scrollHeight:e,scrollTop:i,clientHeight:n}=s;if(!(t>0&&1>Math.abs(e-n-i))&&!(t<0&&i<=0))return}s=s.parentElement}e.cancelable&&e.preventDefault()}}V([e_({defaultValue:"0px"})],n2.prototype,"top",void 0),V([e_({defaultValue:"0px"})],n2.prototype,"left",void 0),V([e_({defaultValue:"auto"})],n2.prototype,"height",void 0),V([e_({defaultValue:"auto"})],n2.prototype,"width",void 0),V([e_({defaultValue:"auto"})],n2.prototype,"minWidth",void 0),V([e_({defaultValue:!1})],n2.prototype,"_isVisible",void 0),V([e_()],n2.prototype,"locale",void 0);class n5{constructor(e,t,s,i){this.x=e,this.y=t,this.width=s,this.height=i}get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}}class n7{static calculatePosition(e,t,s,i,n,r="flex"){let a=e.left,o=e.top;return"flex"===r&&(a="center"==n?(e.left+e.right-s)/2:"left"==n?e.left-s:e.right),o="middle"==i?(e.top+e.bottom-t)/2:"top"==i?e.top-t:e.bottom,"center"!=n&&"middle"!=i&&("top"==i?o+=e.height:o-=e.height),{left:Math.round(a),top:Math.round(o)}}static getCorrectedVerticalDimensions(e,t,s,i,n=!0,r={top:0,bottom:0}){let a,o=s-n7.bottomIndent;if("top"===i&&(a={height:t,top:e}),e<-r.top)a={height:n?t+e:t,top:-r.top};else if(t+e>s){let s=Math.min(t,o-e);a={height:n?s:t,top:n?e:e-(t-s)}}return a&&(a.height=Math.min(a.height,o),a.top=Math.max(a.top,-r.top)),a}static updateHorizontalDimensions(e,t,s,i,n="flex",r={left:0,right:0}){t+=r.left+r.right;let a,o=e;return"center"===i&&("fixed"===n?(e+t>s&&(a=s-e),o-=r.left):e<0?(o=r.left,a=Math.min(t,s)):t+e>s&&(o=Math.max(o=s-t,r.left),a=Math.min(t,s))),"left"===i&&e<0&&(o=r.left,a=Math.min(t,s)),"right"===i&&t+e>s&&(a=s-e),{width:a-r.left-r.right,left:o}}static updateVerticalPosition(e,t,s,i,n){if("middle"===i)return i;let r=t-(e.top+("center"!==s?e.height:0)),a=t+e.bottom-("center"!==s?e.height:0)-n;return r>0&&a<=0&&"top"==i?i="bottom":a>0&&r<=0&&"bottom"==i?i="top":a>0&&r>
100&&(i=r<a?"top":"bottom"),i}static updateHorizontalPosition(e,t,s,i){if("center"===s)return s;let n=t-e.left,r=t+e.right-i;return n>0&&r<=0&&"left"==s?s="right":r>0&&n<=0&&"right"==s?s="left":r>0&&n>0&&(s=n<r?"left":"right"),s}static calculatePopupDirection(e,t){var s;return"center"==t&&"middle"!=e?s=e:"center"!=t&&(s=t),s}static calculatePointerTarget(e,t,s,i,n,r=0,a=0){var o={};return"center"!=n?(o.top=e.top+e.height/2,o.left=e[n]):"middle"!=i&&(o.top=e[i],o.left=e.left+e.width/2),o.left=Math.round(o.left-s),o.top=Math.round(o.top-t),"left"==n&&(o.left-=r+a),"center"===n&&(o.left-=r),o}}n7.bottomIndent=16;class n4 extends n2{createFooterActionBar(){super.createFooterActionBar(),this.footerToolbar.setCssClasses({root:e1.root,defaultSizeMode:e1.defaultSizeMode,smallSizeMode:e1.smallSizeMode,item:"sd-action sv-menu-popup__button"},!1),this.footerToolbar.containerCss="sv-menu-footer-action-bar";let e=[{id:"cancel",visibleIndex:10,title:this.cancelButtonText,innerCss:"sv-popup__button--cancel",action:()=>{this.cancel()}}];e=this.model.updateFooterActions(e),this.footerToolbarValue.setItems(e)}getAvailableAreaRect(){let e=this.model.getAreaCallback?this.model.getAreaCallback(this.container):void 0;if(e){let t=e.getBoundingClientRect();return new n5(t.x,t.y,t.width,t.height)}return new n5(0,0,i.getInnerWidth(),i.getInnerHeight())}getTargetElementRect(e){let t=this.container,s=this.model.getTargetCallback?this.model.getTargetCallback(t):void 0;if(t&&t.parentElement&&!this.isModal&&!s&&(s=t.parentElement),!s)return null;let i=s.getBoundingClientRect();return new n5(i.left-e.left,i.top-e.top,i.width,i.height)}_updatePosition(){var e,t,s;let r=this.getAvailableAreaRect(),a=this.getTargetElementRect(r);if(!a)return;let o=null==(e=this.container)?void 0:e.querySelector(this.containerSelector);if(!o)return;let l=null==(t=this.container)?void 0:t.querySelector(this.fixedPopupContainer),u=o.querySelector(this.scrollingContentSelector),h=n.getComputedStyle(o),d=parseFloat(h.marginLeft)||0,c=parseFloat(h.marginRight)||0,p=parseFloat(h.marginTop)||0,g=parseFloat(h.marginBottom)||0,m=o.offsetHeight-u.offsetHeight+u.scrollHeight,v=o.getBoundingClientRect().width;this.model.setWidthByTarget&&(this.minWidth=a.width+"px");let C=this.model.verticalPosition,y=this.getActualHorizontalPosition();i.isAvailable()&&(m=Math.ceil(Math.min(...[m,.9*i.getInnerHeight(),null==(s=i.getVisualViewport())?void 0:s.height].filter(e=>"number"==typeof e))),C=n7.updateVerticalPosition(a,m,this.model.horizontalPosition,this.model.verticalPosition,r.height),y=n7.updateHorizontalPosition(a,v,y,r.width)),this.popupDirection=n7.calculatePopupDirection(C,y);let f=n7.calculatePosition(a,m,v+d+c,C,y,this.model.positionMode);if(i.isAvailable()){let e=n7.getCorrectedVerticalDimensions(f.top,m,r.height,C,this.model.canShrink,{top:p,bottom:g});if(e&&(this.height=e.height+"px",f.top=e.top),this.model.setWidthByTarget)this.width=a.width+"px",f.left=a.left;else{let e=n7.updateHorizontalDimensions(f.left,v,i.getInnerWidth(),y,this.model.positionMode,{left:d,right:c});e&&(this.width=e.width?e.width+"px":void 0,f.left=e.left)}}if(l){let e=l.getBoundingClientRect();f.top-=e.top,f.left-=e.left}this.showHeader&&(this.pointerTarget=n7.calculatePointerTarget(a,f.top,f.left,C,y,d,c),this.pointerTarget.top+="px",this.pointerTarget.left+="px"),f.left+=r.left,f.top+=r.top,this.left=f.left+"px",this.top=f.top+"px"}getActualHorizontalPosition(){let e=this.model.horizontalPosition;return n.isAvailable()&&"rtl"==n.getComputedStyle(n.getBody()).direction&&("left"===this.model.horizontalPosition?e="right":"right"===this.model.horizontalPosition&&(e="left")),e}getStyleClass(){let e=this.model.getDisplayMode();return super.getStyleClass().append("sv-popup--menu-phone","menu-overlay"===e).append("sv-popup--menu-tablet","menu-popup-overlay"===e).append("sv-popup--menu-popup","menu-popup"===e).append("sv-popup--show-
10pointer","menu-popup"===e&&this.showHeader).append(`sv-popup--${this.popupDirection}`,"menu-popup"===e&&(this.showHeader||"top"==this.popupDirection||"bottom"==this.popupDirection))}getShowHeader(){return this.model.showPointer&&!this.isOverlay}getPopupHeaderTemplate(){return"popup-pointer"}constructor(e){super(e),this.scrollEventCallBack=e=>{if(this.isOverlay&&tp){e.stopPropagation(),e.preventDefault();return}this.hidePopup()},this.resizeEventCallback=()=>{if(!i.isAvailable())return;let e=i.getVisualViewport(),t=n.getDocumentElement();t&&e&&t.style.setProperty("--sv-popup-overlay-height",`${e.height*e.scale}px`)},this.resizeWindowCallback=()=>{this.isOverlay||this.updatePosition(!0,"vue"===ip.platform||"vue3"===ip.platform||"react"==ip.platform||"js-ui"==ip.platform)},this.clientY=0,this.touchStartEventCallback=e=>{this.clientY=e.touches[0].clientY},this.touchMoveEventCallback=e=>{this.preventScrollOuside(e,this.clientY-e.changedTouches[0].clientY)},this.model.onRecalculatePosition.add(this.recalculatePositionHandler)}setComponentElement(e){super.setComponentElement(e)}resetComponentElement(){super.resetComponentElement()}updateOnShowing(){let e=e4(this.container);e&&(this.prevActiveElement=e.activeElement,this.isOverlay?this.resetDimensionsAndPositionStyleProperties():this.updatePosition(!0,!1),this.switchFocus(),i.addEventListener("resize",this.resizeWindowCallback),this.shouldCreateResizeCallback&&(i.getVisualViewport().addEventListener("resize",this.resizeEventCallback),this.container&&(this.container.addEventListener("touchstart",this.touchStartEventCallback),this.container.addEventListener("touchmove",this.touchMoveEventCallback)),this.resizeEventCallback()),i.addEventListener("scroll",this.scrollEventCallBack),this._isPositionSetValue=!0)}get shouldCreateResizeCallback(){return!!i.getVisualViewport()&&this.isOverlay}updatePosition(e,t=!0){e&&(this.height="auto"),t?setTimeout(()=>{this._updatePosition()},1):this._updatePosition()}updateOnHiding(){super.updateOnHiding(),i.removeEventListener("resize",this.resizeWindowCallback),this.shouldCreateResizeCallback&&(i.getVisualViewport().removeEventListener("resize",this.resizeEventCallback),this.container&&(this.container.removeEventListener("touchstart",this.touchStartEventCallback),this.container.removeEventListener("touchmove",this.touchMoveEventCallback))),i.removeEventListener("scroll",this.scrollEventCallBack),this.isDisposed||(this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.minWidth=void 0)}onModelChanging(e){this.model&&this.model.onRecalculatePosition.remove(this.recalculatePositionHandler),this.recalculatePositionHandler||(this.recalculatePositionHandler=(e,t)=>{this.isOverlay||this.updatePosition(t.isResetHeight)}),super.onModelChanging(e),e.onRecalculatePosition.add(this.recalculatePositionHandler)}dispose(){super.dispose(),this.updateOnHiding(),this.model&&(this.model.onRecalculatePosition.remove(this.recalculatePositionHandler),this.recalculatePositionHandler=void 0),this.resetComponentElement()}}n4.tabletSizeBreakpoint=600,V([e_({defaultValue:"left"})],n4.prototype,"popupDirection",void 0),V([e_({defaultValue:{left:"0px",top:"0px"}})],n4.prototype,"pointerTarget",void 0);class n9 extends n2{getStyleClass(){let e=this.model.getDisplayMode();return super.getStyleClass().append("sv-popup--modal-popup","modal-popup"===e).append("sv-popup--modal-overlay","modal-overlay"===e)}getShowFooter(){return!0}createFooterActionBar(){super.createFooterActionBar(),this.footerToolbar.setCssClasses({root:e1.root,defaultSizeMode:e1.defaultSizeMode,smallSizeMode:e1.smallSizeMode,item:"sv-popup__body-footer-item sv-popup__button sv-modal-popup__button sd-btn sd-btn--small"},!1),this.footerToolbar.containerCss="sv-modal-footer-action-bar";let e=[{id:"cancel",visibleIndex:10,title:this.cancelButtonText,innerCss:"sv-popup__button--cancel",action:()=>{this.cancel()}},{id:"apply",visibleIndex:20,title:this.applyButtonText,innerCss:"sv-popup__button--apply sd-btn--action",action:()=>{this.apply()}}];e=this.model.updateFooterActions(e),this.footerToolbarValue.setItems(e)}constructor(e){super(e),this.onScrollOutsideCallback=e=>{this.preventScrollOuside(e,e.deltaY)}}get applyButtonText(){return this.getLocalizationString("modalApplyButtonText")}
10apply(){(!this.model.onApply||this.model.onApply())&&this.hidePopup()}clickOutside(){}onKeyDown(e){("Escape"===e.key||27===e.keyCode)&&this.model.onCancel(),super.onKeyDown(e)}updateOnShowing(){this.container&&this.container.addEventListener("wheel",this.onScrollOutsideCallback,{passive:!1}),super.updateOnShowing()}updateOnHiding(){this.container&&this.container.removeEventListener("wheel",this.onScrollOutsideCallback),super.updateOnHiding()}}function n3(e){return e.isModal?new n9(e):new n4(e)}class n6{constructor(){this.modals=[]}onModalsChanged(e=[],t=[]){this.onModalsChangedCallback&&this.onModalsChangedCallback(this.modals,e,t)}addModal(e){let t=(s,i)=>{if(!i.isVisible){let s=this.modals.indexOf(e);s>=0&&this.modals.splice(s,1),e.onVisibilityChanged.remove(t),this.onModalsChanged(void 0,[e]),e.dispose()}};e.onVisibilityChanged.add(t),this.modals.push(e),this.onModalsChanged([e]),e.model.isVisible=!0}addDialog(e,t){let s=function(e,t){var s;let i=Object.assign({},e);i.verticalPosition="top",i.horizontalPosition="left",i.showPointer=!1,i.isModal=!0,i.displayMode=e.displayMode||"popup";let r=new tv(e.componentName,e.data,i);r.isFocusedContent=null==(s=e.isFocusedContent)||s,r.showCloseButton=!!e.showCloseButton;let a=new n9(r);if(t&&t.appendChild){var o=n.createElement("div");t.appendChild(o),a.setComponentElement(o)}a.container||a.initializePopupContainer();let l=(e,t)=>{!t.isVisible&&o&&a.resetComponentElement(),a.onVisibilityChanged.remove(l)};return a.onVisibilityChanged.add(l),a}(e,t);return this.addModal(s),s}getModals(){return this.modals}clear(){let e=this.modals;for(let t of(this.modals=[],this.onModalsChanged(void 0,e),e))t.dispose()}}class n8 extends iv{getBaseType(){return"buttongroupitemvalue"}}V([e_()],n8.prototype,"iconName",void 0),V([e_()],n8.prototype,"iconSize",void 0),V([e_()],n8.prototype,"showCaption",void 0);class re extends iy{constructor(){super(...arguments),this._allowClear=!0}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),["value","renderAs","placeholder","choices","visibleChoices"].indexOf(e)>-1&&this.resetReadOnlyText()}locStrsChanged(){var e;super.locStrsChanged(),this.resetReadOnlyText(),null==(e=this.dropdownListModelValue)||e.locStrsChanged()}getType(){return"buttongroup"}getItemValueType(){return"buttongroupitemvalue"}supportOther(){return!1}getControlClass(){return this.isEmpty(),new eX().append(this.cssClasses.control).append(this.cssClasses.controlEmpty,this.isEmpty()).append(this.cssClasses.onError,this.hasCssError()).append(this.cssClasses.controlDisabled,this.isDisabledStyle).append(this.cssClasses.controlReadOnly,this.isReadOnlyStyle).append(this.cssClasses.controlPreview,this.isPreviewStyle).toString()}getFirstInputElementId(){return this.inputId+"_0"}getInputId(e){return this.inputId+"_"+e}get allowClear(){return this._allowClear}set allowClear(e){this._allowClear=e}get searchEnabled(){return!1}isItemSelected(e){return e.value==this.value}get readOnlyText(){return this.locReadOnlyText.calculatedText}get locReadOnlyText(){return this.getOrCreateLocStr("readOnlyText",!0,!1,e=>{e.onGetTextCallback=()=>this.displayValue||this.placeholder})}resetReadOnlyText(){this.resetPropertyValue("readOnlyText")}get showSelectedItemLocText(){return!this.readOnly&&!this.inputHasValue&&!!this.selectedItemLocText}get selectedItemLocText(){var e;return null==(e=this.selectedItem)?void 0:e.locText}set dropdownListModel(e){this.dropdownListModelValue=e,this.updateElementCss()}get dropdownListModel(){return"dropdown"===this.renderAs&&this.onBeforeSetCompactRenderer(),this.dropdownListModelValue}get selectedItem(){return this.getSingleSelectedItem()}onBlurCore(e){var t;null==(t=this.dropdownListModel)||t.onBlur(e),super.onBlurCore(e)}updateCssClasses(e,t){super.updateCssClasses(e,t),tn(e,t)}calcCssClasses(e){let t=super.calcCssClasses(e);return this.dropdownListModelValue&&this.dropdownListModelValue.updateCssClasses(t.popup,t.list),t}needResponsiveWidth(){return!0}supportResponsiveness(){return!0}getCompactRenderAs(){return"dropdown"}getObservedElementSelector(){return".sd-button-group-scrollable-container"}onBeforeSetCompactRenderer(){this.isDisposed||this.dropdownListModelValue||(this.dropdownListModelValue=new iE(this))}dispose(){super.dispose(),this.dropdownListModelValue&&(this.dropdownListModelValue.dispose(),this.dropdownListModelValue=void 0)}}V([e_({localizable:{defaultStr:"buttongroupOptionsCaption"}})],re.prototype,"placeholder",void 0),V([e_({defaultValue:!1})],re.prototype,"inputHasValue",void 0),H.addClass("buttongroup",[{name:"choices:buttongroupitemvalue[]"}],function(){return new re("")},"checkboxbase"),H.addClass("buttongroupitemvalue",[{name:"showCaption:boolean",default:!0},{name:"iconName:text"},{name:"iconSize:number"}],e=>new n8(e),"choiceitem");class rt{constructor(e,t,s){this.question=e,this.item=t,this.index=s}get value(){return this.item.value}get iconName(){return this.item.iconName}get iconSize(){return this.item.iconSize||24}get caption(){return this.item.locText}get showCaption(){return this.item.showCaption||void 0===this.item.showCaption}get isRequired(){return this.question.isRequired}get selected(){return this.question.isItemSelected(this.item)}get readOnly(){return this.question.isInputReadOnly||!this.item.isEnabled}get name(){return this.question.name+"_"+this.question.id}get id(){return this.question.inputId+"_"+this.index}get hasErrors(){return this.question.errors.length>0}get describedBy(){return this.question.errors.length>0?this.question.id+"_errors":null}
10get labelClass(){return new eX().append(this.question.cssClasses.item).append(this.question.cssClasses.itemSelected,this.selected).append(this.question.cssClasses.itemHover,!this.readOnly&&!this.selected).append(this.question.cssClasses.itemDisabled,this.question.isReadOnly||!this.item.isEnabled).toString()}get css(){return{label:this.labelClass,icon:this.question.cssClasses.itemIcon,control:this.question.cssClasses.itemControl,caption:this.question.cssClasses.itemCaption,decorator:this.question.cssClasses.itemDecorator}}onChange(){this.question.selectItem(this.item)}}let rs={changecamera:"flip-24x24",clear:"clear-24x24",cancel:"cancel-24x24",closecamera:"close-24x24",defaultfile:"file-72x72",choosefile:"folder-24x24",file:"toolbox-file-24x24",left:"chevronleft-16x16",modernbooleancheckchecked:"plus-32x32",modernbooleancheckunchecked:"minus-32x32",more:"more-24x24",navmenu_24x24:"navmenu-24x24",removefile:"error-24x24",takepicture:"camera-32x32",takepicture_24x24:"camera-24x24",v2check:"check-16x16",checked:"check-16x16",v2check_24x24:"check-24x24","back-to-panel_16x16":"restoredown-16x16",clear_16x16:"clear-16x16",close_16x16:"close-16x16",collapsedetail:"collapsedetails-16x16",expanddetail:"expanddetails-16x16","full-screen_16x16":"maximize-16x16",loading:"loading-48x48",minimize_16x16:"minimize-16x16",next_16x16:"chevronright-16x16",previous_16x16:"chevronleft-16x16","no-image":"noimage-48x48","ranking-dash":"rankingundefined-16x16","drag-n-drop":"drag-24x24","ranking-arrows":"reorder-24x24",restore_16x16:"fullsize-16x16",reset:"restore-24x24",search:"search-24x24",average:"smiley-rate5-24x24",excellent:"smiley-rate9-24x24",good:"smiley-rate7-24x24",normal:"smiley-rate6-24x24","not-good":"smiley-rate4-24x24",perfect:"smiley-rate10-24x24",poor:"smiley-rate3-24x24",terrible:"smiley-rate1-24x24","very-good":"smiley-rate8-24x24","very-poor":"smiley-rate2-24x24",add_16x16:"add-16x16",add_24x24:"add-24x24",alert_24x24:"warning-24x24",apply:"apply-24x24","arrow-down":"arrowdown-24x24","arrow-left":"arrowleft-24x24","arrow-left_16x16":"arrowleft-16x16",arrowleft:"arrowleft-16x16","arrow-right":"arrowright-24x24","arrow-right_16x16":"arrowright-16x16",arrowright:"arrowright-16x16","arrow-up":"arrowup-24x24",boolean:"toolbox-boolean-24x24","change-question-type_16x16":"speechbubble-16x16",checkbox:"toolbox-checkbox-24x24","collapse-detail_16x16":"minusbox-16x16","collapse-panel":"collapse-pg-24x24",collapse_16x16:"collapse-16x16","color-picker":"dropper-16x16",comment:"toolbox-longtext-24x24",config:"wrench-24x24",copy:"copy-24x24",default:"toolbox-customquestion-24x24",delete_16x16:"delete-16x16",delete_24x24:"delete-24x24",delete:"delete-24x24","description-hide":"hidehint-16x16",description:"hint-16x16","device-desktop":"desktop-24x24","device-phone":"phone-24x24","device-rotate":"rotate-24x24","device-tablet":"tablet-24x24",download:"download-24x24","drag-area-indicator":"drag-24x24","drag-area-indicator_24x16":"draghorizontal-24x16",v2dragelement_16x16:"draghorizontal-24x16","drop-down-arrow":"chevrondown-24x24","drop-down-arrow_16x16":"chevrondown-16x16",chevron_16x16:"chevrondown-16x16",dropdown:"toolbox-dropdown-24x24",duplicate_16x16:"copy-16x16",edit:"edit-24x24",edit_16x16:"edit-16x16","editing-finish":"finishedit-24x24",error:"error-16x16","expand-detail_16x16":"plusbox-16x16","expand-panel":"expand-pg-24x24",expand_16x16:"expand-16x16",expression:"toolbox-expression-24x24","fast-entry":"textedit-24x24",fix:"fix-24x24",html:"toolbox-html-24x24",image:"toolbox-image-24x24",imagepicker:"toolbox-imagepicker-24x24",import:"import-24x24","invisible-items":"invisible-24x24",language:"language-24x24",load:"import-24x24","logic-collapse":"collapse-24x24","logic-expand":"expand-24x24",logo:"image-48x48",matrix:"toolbox-matrix-24x24",matrixdropdown:"toolbox-multimatrix-24x24",matrixdynamic:"toolbox-dynamicmatrix-24x24",multipletext:"toolbox-multipletext-24x24",panel:"toolbox-panel-24x24",paneldynamic:"toolbox-dynamicpanel-24x24",preview:"preview-24x24",radiogroup:"toolbox-radiogroup-24x24",ranking:"toolbox-ranking-24x24",rating:"toolbox-rating-24x24",slider:"toolbox-slider-24x24",redo:"redo-24x24",remove_16x16:"remove-16x16",required:"required-16x16",save:"save-24x24","select-page":"selectpage-24x24",settings:"settings-24x24",settings_16x16:"settings-16x16",signaturepad:"toolbox-signature-24x24","switch-active_16x16":"switchon-16x16","switch-inactive_16x16":"switchoff-16x16",tagbox:"toolbox-tagbox-24x24",text:"toolbox-singleline-24x24",theme:"theme-24x24",toolbox:"toolbox-24x24",undo:"undo-24x24",visible:"visible-24x24",wizard:"wand-24x24",searchclear:"clear-16x16","chevron-16x16":"chevrondown-16x16",chevron:"chevrondown-24x24",progressbuttonv2:"arrowleft-16x16",right:"chevronright-16x16","add-lg":"add-24x24",add:"add-24x24"};function ri(e){let t="icon-",s=e.replace(t,"");return t+(rs[s]||s)}function rn(e,t,s,i,r,a){var o,l;let u;if(!r)return;"auto"!==e&&(r.style.width=(e||t||16)+"px",r.style.height=(e||s||16)+"px");let h=r.childNodes[0],d=(l=o=i,((u=p.customIcons[l])?ri(u):(l=ri(l),u=p.customIcons[l])?u:null)||ri(o));h.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+d);let c=r.getElementsByTagName("title")[0];if(a)c||(c=n.getDocument().createElementNS("http://www.w3.org/2000/svg","title"),r.appendChild(c));else{c&&r.removeChild(c);return}c.textContent=a}class rr extends ew{getSurvey(e=!1){var t;return null==(t=this.owner)?void 0:t.getSurvey()}getType(){return"masksettings"}
10setData(e){H.getProperties(this.getType()).forEach(t=>{let s=e[t.name];this[t.name]=void 0!==s?s:t.getDefaultValue(this)})}getData(){let e={};return H.getProperties(this.getType()).forEach(t=>{let s=this[t.name];t.isDefaultValue(s)||(e[t.name]=s)}),e}processInput(e){return{value:e.prevValue,caretPosition:e.selectionEnd,cancelPreventDefault:!1}}getUnmaskedValue(e){return e}getMaskedValue(e){return e}getTextAlignment(){return"auto"}getTypeForExpressions(){return"text"}}function ra(e){let t=[],s=!1,i=Object.keys(p.maskSettings.patternDefinitions);for(let n=0;n<e.length;n++){let r=e[n];if(r===p.maskSettings.patternEscapeChar)s=!0;else if(s)s=!1,t.push({type:"fixed",value:r});else{let e=-1!==i.indexOf(r)?"regex":!function(e){let t=p.maskSettings.patternDefinitions;for(let s in t)if(e.match(t[s]))return!0;return!1}(r)?"const":"fixed";t.push({type:e,value:r})}}return t}function ro(e,t,s,i=!1){let n="";if(!e)return n;let r="string"==typeof t?ra(t):t;for(let t=0;t<r.length;t++)if("fixed"!==r[t].type||i||(n+=r[t].value),"regex"===r[t].type){let i=p.maskSettings.patternDefinitions[r[t].value];if(e[t]&&e[t].match(i))n+=e[t];else if(s){n="";break}else break}return n}V([e_()],rr.prototype,"saveMaskedValue",void 0),H.addClass("masksettings",[{name:"saveMaskedValue:boolean",visibleIf:function(e){return!!e&&"masksettings"!==e.getType()}}],function(){return new rr});class rl extends rr{constructor(){super(...arguments),this.literals=[]}updateLiterals(){this.literals=ra(this.pattern||"")}onPropertyValueChanged(e,t,s){super.onPropertyValueChanged(e,t,s),"pattern"===e&&this.updateLiterals()}getType(){return"patternmask"}fromJSON(e,t){super.fromJSON(e,t),this.updateLiterals()}_getMaskedValue(e,t=!1){return function(e,t,s){let i=null==e?"":e,n="",r=0,a="string"==typeof t?ra(t):t;for(let e=0;e<a.length;e++)switch(a[e].type){case"regex":if(r<i.length&&(r=function(e,t,s){let i=p.maskSettings.patternDefinitions[s.value];for(;t<e.length&&!e[t].match(i);)t++;return t}(i,r,a[e])),r<i.length)n+=i[r];else{if(!s)return n;n+=p.maskSettings.patternPlaceholderChar}r++;break;case"const":case"fixed":n+=a[e].value,a[e].value===i[r]&&r++}return n}(null==e?"":e,this.literals,t)}_getUnmaskedValue(e,t=!1){return ro(null==e?"":e,this.literals,t)}processInput(e){let t={value:e.prevValue,caretPosition:e.selectionEnd,cancelPreventDefault:!1};if(!e.insertedChars&&e.selectionStart===e.selectionEnd)return t;let s=e.prevValue.slice(0,e.selectionStart)+(e.insertedChars||""),i=ro(e.prevValue.slice(0,e.selectionStart),this.literals.slice(0,e.selectionStart),!1),n=ro(e.prevValue.slice(e.selectionEnd),this.literals.slice(e.selectionEnd),!1,!0);return t.value=this._getMaskedValue(i+(e.insertedChars||"")+n,!0),e.insertedChars||"backward"!==e.inputDirection?t.caretPosition=this._getMaskedValue(s).length:t.caretPosition=e.selectionStart,t}getMaskedValue(e){return this._getMaskedValue(e,!0)}getUnmaskedValue(e){return this._getUnmaskedValue(e,!0)}}V([e_()],rl.prototype,"pattern",void 0),H.addClass("patternmask",[{name:"pattern"}],function(){return new rl},"masksettings");class ru extends rr{calccaretPosition(e,t,s){let i=e?this.displayNumber(this.parseNumber(e),!1).length:0,n=0,r=t.selectionStart,a=!t.insertedChars&&"forward"===t.inputDirection;for(let e=0;e<s.length;e++)if(s[e]!==this.thousandsSeparator&&n++,n===i+ +!!a){r=a?e:e+1;break}return r}numericalCompositionIsEmpty(e){return!e.integralPart&&!e.fractionalPart}displayNumber(e,t=!0,s=!1){let i=e.integralPart;t&&i&&(i=(function(e,t=!0,s=3){let i=[];if(t){for(let t=e.length-s;t>-s;t-=s)i.push(e.substring(t,t+s));i=i.reverse()}else for(let t=0;t<e.length;t+=s)i.push(e.substring(t,t+s));return i})(i).join(this.thousandsSeparator));let n=e.fractionalPart,r=e.isNegative?"-":"";if(""!==n)return[r+(i=i||"0"),n=n.substring(0,this.precision)].join(this.decimalSeparator);if(s)return i&&"0"!==i?r+i:i;{let t=i+(e.hasDecimalSeparator&&!s?this.decimalSeparator:"");return"0"===t?t:r+t}}convertNumber(e){let t=e.isNegative?"-":"";return e.fractionalPart?parseFloat(t+(e.integralPart||"0")+"."+e.fractionalPart.substring(0,this.precision)):parseInt(t+e.integralPart||"0")}validateNumber(e,t){let s=this.min||Number.MIN_SAFE_INTEGER,i=this.max||Number.MAX_SAFE_INTEGER;if(this.numericalCompositionIsEmpty(e))return!0;
10if(void 0!==this.min||void 0!==this.max){let n=this.convertNumber(e);if(Number.isNaN(n)||n>=s&&n<=i)return!0;if(!t){if(e.hasDecimalSeparator||0==n){let t=Math.pow(.1,(e.fractionalPart||"").length);if(n>=0)return n+t>s&&n<=i;if(n<0)return n>=s&&n-t<i}else{let e=n,t=n;if(n>0){if(n+1>s&&n<=i)return!0;for(;e=10*e+9,!((t*=10)>i);)if(e>s)return!0;return!1}if(n<0){if(n>=s&&n-1<i)return!0;for(;t=10*t-9,!((e*=10)<s);)if(t<i)return!0;return!1}}return n>=0&&n<=i||n<0&&n>=s}return!1}return!0}parseNumber(e){let t={integralPart:"",fractionalPart:"",hasDecimalSeparator:!1,isNegative:!1},s=null==e?"":e.toString(),i=0;for(let e=0;e<s.length;e++){let n=s[e];switch(n){case"-":this.allowNegativeValues&&(void 0===this.min||this.min<0)&&i++;break;case this.decimalSeparator:this.precision>0&&(t.hasDecimalSeparator=!0);break;case this.thousandsSeparator:break;default:n.match(iF)&&(t.hasDecimalSeparator?t.fractionalPart+=n:t.integralPart+=n)}}return t.isNegative=i%2!=0,t.integralPart.length>1&&"0"===t.integralPart[0]&&(t.integralPart=t.integralPart.slice(1)),t}getNumberMaskedValue(e,t=!1){let s=this.parseNumber(e);return this.validateNumber(s,t)?this.displayNumber(s,!0,t):null}getNumberUnmaskedValue(e){let t=this.parseNumber(e);if(!this.numericalCompositionIsEmpty(t))return this.convertNumber(t)}getTextAlignment(){return"right"}getMaskedValue(e){let t=null==e?"":e.toString();return t=t.replace(".",this.decimalSeparator),this.getNumberMaskedValue(t,!0)}getUnmaskedValue(e){return this.getNumberUnmaskedValue(e)}processInput(e){let t={value:e.prevValue,caretPosition:e.selectionEnd,cancelPreventDefault:!1},s=e.prevValue.slice(0,e.selectionStart)+(e.insertedChars||""),i=s+e.prevValue.slice(e.selectionEnd),n=this.parseNumber(i);if(!this.validateNumber(n,!1))return t;let r=this.getNumberMaskedValue(i),a=this.calccaretPosition(s,e,r);return t.value=r,t.caretPosition=a,t}getType(){return"numericmask"}isValueUndefined(e){return""===e||super.isValueUndefined(e)}}function rh(e,t){switch(e){case"hour":case"minute":case"second":case"day":case"month":return 2;case"timeMarker":case"year":return t;default:return 1}}V([e_()],ru.prototype,"allowNegativeValues",void 0),V([e_()],ru.prototype,"decimalSeparator",void 0),V([e_()],ru.prototype,"precision",void 0),V([e_()],ru.prototype,"thousandsSeparator",void 0),V([e_()],ru.prototype,"min",void 0),V([e_()],ru.prototype,"max",void 0),H.addClass("numericmask",[{name:"allowNegativeValues:boolean",default:!0},{name:"decimalSeparator",default:".",maxLength:1},{name:"thousandsSeparator",default:",",maxLength:1},{name:"precision:number",default:2,minValue:0},{name:"min:number"},{name:"max:number"}],function(){return new ru},"masksettings");class rd extends rl{constructor(){super(...arguments),this.defaultDate="1970-01-01T",this.turnOfTheCentury=68,this.twelve=12,this.lexems=[],this.inputDateTimeData=[],this.validBeginningOfNumbers={hour:1,hourU:2,minute:5,second:5,day:3,month:1}}get hasDatePart(){return this.lexems.some(e=>"day"===e.type||"month"===e.type||"year"===e.type)}get hasTimePart(){return this.lexems.some(e=>"hour"===e.type||"minute"===e.type||"second"===e.type)}get hasSeconds(){return this.lexems.some(e=>"second"===e.type)}get is12Hours(){return this.lexems.filter(e=>"hour"===e.type&&!e.upperCase).length>0}getType(){return"datetimemask"}getTypeForExpressions(){return this.hasTimePart&&this.hasSeconds?"datetime-seconds":this.hasTimePart?"datetime-local":"datetime"}updateLiterals(){this.lexems=function(e){let t,s=[],i=(e,i,n=!1)=>{if(t&&t===e){s[s.length-1].count++;let t=rh(e,s[s.length-1].count);s[s.length-1].maxCount=t}else{let t=rh(e,1);s.push({type:e,value:i,count:1,maxCount:t,upperCase:n})}};for(let n=0;n<e.length;n++){let r=e[n];switch(r){case"m":i("month",r);break;case"d":i("day",r);break;case"y":i("year",r);break;case"h":i("hour",r,!1);break;case"H":i("hour",r,!0);break;case"M":i("minute",r);break;case"s":i("second",r);break;case"t":i("timeMarker",r);break;case"T":i("timeMarker",r,!0);break;default:s.push({type:"separator",value:r,count:1,maxCount:1,upperCase:!1})}t=s[s.length-1].type}return s}(this.pattern||"")}leaveOnlyNumbers(e){let t="";for(let s=0;s<e.length;s++)e[s].match(iF)&&(t+=e[s]);return t}getMaskedStrFromISO(e){let t=new Date(e);return this.initInputDateTimeData(),this.hasTimePart||(t=new Date(e+"T00:00:00")),this.hasDatePart||(t=new Date(this.defaultDate+e)),isNaN(t)||this.lexems.forEac
10h((e,s)=>{let i=this.inputDateTimeData[s];switch(i.isCompleted=!0,e.type){case"hour":this.is12Hours?i.value=((t.getHours()-1)%this.twelve+1).toString():i.value=t.getHours().toString();break;case"minute":i.value=t.getMinutes().toString();break;case"second":i.value=t.getSeconds().toString();break;case"timeMarker":{let s=t.getHours()>=this.twelve?"pm":"am";i.value=e.upperCase?s.toUpperCase():s;break}case"day":i.value=t.getDate().toString();break;case"month":i.value=(t.getMonth()+1).toString();break;case"year":{let s=t.getFullYear();2==e.count&&(s%=100),i.value=s.toString()}}}),this.getFormatedString(!0)}initInputDateTimeData(){this.inputDateTimeData=[],this.lexems.forEach(e=>{this.inputDateTimeData.push({lexem:e,isCompleted:!1,value:void 0})})}getISO_8601Format(e){let t=[],s=[];if(void 0!==e.year){let s=this.getPlaceholder(4,e.year.toString(),"0")+e.year;t.push(s)}if(void 0!==e.month&&void 0!==e.year){let s=this.getPlaceholder(2,e.month.toString(),"0")+e.month;t.push(s)}if(void 0!==e.day&&void 0!==e.month&&void 0!==e.year){let s=this.getPlaceholder(2,e.day.toString(),"0")+e.day;t.push(s)}if(void 0!==e.hour){let t=this.getPlaceholder(2,e.hour.toString(),"0")+e.hour;s.push(t)}if(void 0!==e.minute&&void 0!==e.hour){let t=this.getPlaceholder(2,e.minute.toString(),"0")+e.minute;s.push(t)}if(void 0!==e.second&&void 0!==e.minute&&void 0!==e.hour){let t=this.getPlaceholder(2,e.second.toString(),"0")+e.second;s.push(t)}let i=[];return t.length>0&&i.push(t.join("-")),s.length>1&&i.push(s.join(":")),i.join("T")}isYearValid(e){if(void 0===e.min&&void 0===e.max)return!1;let t=e.year.toString(),s=e.min.toISOString().slice(0,t.length),i=e.max.toISOString().slice(0,t.length);return e.year>=parseInt(s)&&e.year<=parseInt(i)}createIDateTimeCompositionWithDefaults(e,t){let s=29==e.day&&2==e.month,i=e.min.getFullYear(),n=e.max.getFullYear();s&&(i=4*Math.ceil(i/4))>(n=4*Math.floor(n/4))&&(i=void 0,n=void 0);let r=void 0!==e.year?e.year:t?n:i,a=void 0!==e.month?e.month:t&&this.hasDatePart?12:1,o=void 0!==e.day?e.day:t&&this.hasDatePart?this.getMaxDateForMonth(r,a):1;return{year:r,month:a,day:o,hour:void 0!==e.hour?e.hour:23*!!t,minute:void 0!==e.minute?e.minute:59*!!t,second:void 0!==e.second?e.second:59*!!t}}getMaxDateForMonth(e,t){return 2==t?e%4==0&&e%100!=0||e%400==0?29:28:[31,28,31,30,31,30,31,31,30,31,30,31][t-1]}isDateValid(e){let t=new Date(this.getISO_8601Format(this.createIDateTimeCompositionWithDefaults(e,!1))),s=new Date(this.getISO_8601Format(this.createIDateTimeCompositionWithDefaults(e,!0)));return!isNaN(t)&&(t.getDate()===e.day||void 0===e.day)&&(t.getMonth()===e.month-1||void 0===e.month)&&(t.getFullYear()===e.year||void 0===e.year)&&s>=e.min&&t<=e.max}getPlaceholder(e,t,s){let i=e-(t||"").length;return i>0?s.repeat(i):""}isDateValid12(e){if(!this.is12Hours)return this.isDateValid(e);if(this.is12Hours&&e.hour>this.twelve)return!1;if(e.timeMarker)if("p"===e.timeMarker[0].toLowerCase())return e.hour!==this.twelve&&(e.hour+=this.twelve),this.isDateValid(e);else return e.hour===this.twelve&&(e.hour=0),this.isDateValid(e);return!!this.isDateValid(e)||(e.hour+=this.twelve,this.isDateValid(e))}updateTimeMarkerInputDateTimeData(e,t){let s=e.value;if(!s)return;let i="timeMarker",n=Object.assign({},t);n[i]=s,this.isDateValid12(n)?e.isCompleted=!0:s=s.slice(0,s.length-1),e.value=s||void 0,t[i]=s||void 0}updateInputDateTimeData(e,t){let s=e.value;if(!s)return;let i=e.lexem.type,n=Object.assign({},t);if(n[i]=parseInt(this.parseTwoDigitYear(e)),s.length===e.lexem.maxCount)if(this.isDateValid12(n)){e.isCompleted=!0,e.value=s||void 0,t[i]=parseInt(s)>0?parseInt(s):void 0;return}else s=s.slice(0,s.length-1);n[i]=parseInt(s);let r=parseInt(s[0]),a=this.validBeginningOfNumbers[i+(e.lexem.upperCase?"U":"")];"year"!==i||this.isYearValid(n)?void 0!==a&&r>a?this.isDateValid12(n)?e.isCompleted=!0:s=s.slice(0,s.length-1):void 0!==a&&0!==r&&r<=a&&(this.checkValidationDateTimePart(n,i,e),e.isCompleted&&!this.isDateValid12(n)&&(s=s.slice(0,s.length-1))):(s=s.slice(0,s.length-1),e.isCompleted=!1),e.value=s||void 0,t[i]=parseInt(s)>0?parseInt(s):void 0}checkValidationDateTimePart(e,t,s){let i=e[t],n=10*i,r=10;"month"===t&&(r=3),"hour"===t&&(r=this.is12Hours?3:5),s.isCompleted=!0;for(let i=0;i<r;i++)if(e[t]=n+i,this.isDateValid12(e)){s.isCompleted=!1;break}e[t]=i}getCorrectDatePartFormat(e,t){let s=e.lexem,i=e.value||"";if(i&&"timeMarker"===s.type)return t&&(i+=this.getPlaceholder(s.count,i,s.value)),i;if(i&&e.isCompleted&&(i=parseInt(i).toString()),i&&e.isCompleted)i=this.getPlaceholder(s.count,i,"0")+i;else{var n;let e;e=n=i,s.count<s.maxCount&&("day"===s.type&&0===parseInt(n[0])||"month"===s.type&&0===parseInt(n[0]))&&(e=n.slice(1,n.length)),i=e,t&&(i+=this.getPlaceholder(s.count,i,s.value))}return i}createIDateTimeComposition(){let e,t;return this.hasDatePart?(e=this.min||"0001-01-01",t=this.max||"9996-12-31"):(e=this.defaultDate+(this.min||"00:00:00"),t=this.defaultDate+(this.max||"23:59:59")),{hour:void 0,minute:void 0,second:void 0,day:void 0,month:void 0,year:void 0,min:new Date(e),max:new Date(t)}}parseTwoDigitYear(e){let t=e.value;return"year"!==e.lexem.type||e.lexem.count>2?t:(this.max&&this.max.length>
10=4&&(this.turnOfTheCentury=parseInt(this.max.slice(2,4))),(parseInt(t)>this.turnOfTheCentury?"19":"20")+t)}getFormatedString(e){let t="",s="",i=!1,n=this.inputDateTimeData.length-1;if(!e){let e=this.inputDateTimeData.filter(e=>!!e.value);n=this.inputDateTimeData.indexOf(e[e.length-1])}for(let r=0;r<this.inputDateTimeData.length;r++){let a=this.inputDateTimeData[r];switch(a.lexem.type){case"timeMarker":case"hour":case"minute":case"second":case"day":case"month":case"year":if(void 0===a.value&&!e)return t+(i?s:"");{let o=e||n>r;t+=s+this.getCorrectDatePartFormat(a,o),i=a.isCompleted}break;case"separator":s=a.lexem.value}}return t}cleanTimeMarker(e,t){let s="";e=e.toUpperCase();for(let t=0;t<e.length;t++)(!s&&("P"==e[t]||"A"==e[t])||s&&"M"==e[t])&&(s+=e[t]);return t?s.toUpperCase():s.toLowerCase()}setInputDateTimeData(e){let t=0;this.initInputDateTimeData(),this.lexems.forEach((s,i)=>{if(e.length>0&&t<e.length){if("separator"===s.type)return;let n=this.inputDateTimeData[i],r=e[t];n.value=("timeMarker"===s.type?this.cleanTimeMarker(r,s.upperCase):this.leaveOnlyNumbers(r)).slice(0,s.maxCount),t++}})}_getMaskedValue(e,t=!0){let s=null==e?"":e.toString(),i=this.getParts(s);this.setInputDateTimeData(i);let n=this.createIDateTimeComposition();return this.inputDateTimeData.forEach(e=>{"timeMarker"===e.lexem.type?this.updateTimeMarkerInputDateTimeData(e,n):this.updateInputDateTimeData(e,n)}),this.getFormatedString(t)}getParts(e){let t=[],s=this.lexems.filter(e=>"separator"!==e.type),i=this.lexems.filter(e=>"separator"===e.type).map(e=>e.value),n="",r=!1,a=!1;for(let o=0;o<e.length;o++){let l=e[o];if(l.match(iF)||l===s[t.length].value||"timeMarker"===s[t.length].type?(r=!1,a=!1,n+=l):-1!==i.indexOf(l)?a||(r=!0,t.push(n),n=""):r||(a=!0,t.push(n),n=""),t.length>=s.length){r=!1;break}}return(""!=n||r)&&t.push(n),t}getUnmaskedValue(e){var t;let s=null==e?"":e.toString(),i=this.getParts(s);this.setInputDateTimeData(i);let n=null==(t=this.inputDateTimeData.filter(e=>"timeMarker"===e.lexem.type)[0])?void 0:t.value.toLowerCase()[0],r=this.createIDateTimeComposition(),a=!1;return this.inputDateTimeData.forEach(e=>{let t=e.value;if("timeMarker"==e.lexem.type||"separator"==e.lexem.type)return;if(!t||t.length<e.lexem.count){a=!0;return}let s=parseInt(this.parseTwoDigitYear(e));"hour"==e.lexem.type&&"p"===n&&s!=this.twelve&&(s+=this.twelve),r[e.lexem.type]=s}),a?"":this.getISO_8601Format(r)}getMaskedValue(e){return this.getMaskedStrFromISO(e)}processInput(e){let t={value:e.prevValue,caretPosition:e.selectionEnd,cancelPreventDefault:!1},s=e.prevValue.slice(0,e.selectionStart),i=e.prevValue.slice(e.selectionEnd);return t.value=this._getMaskedValue(s+(e.insertedChars||"")+i),e.insertedChars||"backward"!==e.inputDirection?t.caretPosition=this._getMaskedValue(s+(e.insertedChars||""),!1).length:t.caretPosition=e.selectionStart,t}}V([e_()],rd.prototype,"min",void 0),V([e_()],rd.prototype,"max",void 0),H.addClass("datetimemask",[{name:"min",type:"datetime",enableIf:e=>!!e.pattern},{name:"max",type:"datetime",enableIf:e=>!!e.pattern}],function(){return new rd},"patternmask");class rc extends ru{getType(){return"currencymask"}wrapText(e){let t=this.prefix||"",s=this.suffix||"",i=e;return i&&(-1===i.indexOf(t)&&(i=t+i),-1===i.indexOf(s)&&(i+=s)),i}unwrapInputArgs(e){let t=e.prevValue;if(t){if(this.prefix&&-1!==t.indexOf(this.prefix)){t=t.slice(t.indexOf(this.prefix)+this.prefix.length);let s=(this.prefix||"").length;e.selectionStart=Math.max(e.selectionStart-s,0),e.selectionEnd-=s}this.suffix&&-1!==t.indexOf(this.suffix)&&(t=t.slice(0,t.indexOf(this.suffix))),e.prevValue=t}}processInput(e){this.unwrapInputArgs(e);let t=super.processInput(e),s=(this.prefix||"").length;return t.value&&(t.caretPosition+=s),t.value=this.wrapText(t.value),t}getMaskedValue(e){let t=super.getMaskedValue(e);return this.wrapText(t)}}function rp(e,t){c!=e&&console.error("survey-core has version '"+c+"' and "+t+" has version '"+e+"'. SurveyJS libraries should have the same versions to work correctly.")}V([e_()],rc.prototype,"prefix",void 0),V([e_()],rc.prototype,"suffix",void 0),H.addClass("currencymask",[{name:"prefix"},{name:"suffix"}],()=>new rc,"numericmask"),p.version=c="2.5.21";let rg=new class{constructor(){this.icons={},this.iconPrefix="icon-",this.onIconsChanged=new P}processId(e,t){return 0==e.indexOf(t)&&(e=e.substring(t.length)),e=rs[e]||e}registerIconFromSymbol(e,t){this.icons[e]=t}registerIconFromSvgViaElement(e,t,s=this.iconPrefix){if(!n.isAvailable())return;e=this.processId(e,s);let i=n.createElement("div");i.innerHTML=t;let r=n.createElement("symbol"),a=i.querySelector("svg");r.innerHTML=a.innerHTML;for(var o=0;o<a.attributes.length;o++)r.setAttributeNS("http://www.w3.org/2000/svg",a.attributes[o].name,a.attributes[o].value);r.id=s+e,this.registerIconFromSymbol(e,r.outerHTML)}registerIconFromSvg(e,t,s=this.iconPrefix){e=this.processId(e,s);let i="<svg ",n="</svg>",r=(t=t.trim()).toLowerCase();return r.substring(0,i.length)===i&&r.substring(r.length-n.length,r.length)===n&&(this.registerIconFromSymbol(e,'<symbol id="'+s+e+'" '+t.substring(i.length,r.length-n.length)+"</symbol>"),!0)}
10registerIconsFromFolder(e){e.keys().forEach(t=>{this.registerIconFromSvg(t.substring(2,t.length-4).toLowerCase(),e(t))})}registerIcons(e){for(let t in e)this.registerIconFromSvg(t,e[t]);this.updateMarkup()}registerIcon(e,t,s="v2"){this.registerIconFromSvg(e,t),rv(s,{[e]:t})}iconsRenderedHtml(){return Object.keys(this.icons).map(e=>this.icons[e]).join("")}updateMarkup(){this.onIconsChanged.fire(this,{})}},rm={};function rv(e,t){rm[e]||(rm[e]={});let s=rm[e];for(let e in t)s[e]=t[e]}e.s(["ActionDropdownViewModel",0,e5,"ButtonGroupItemModel",0,rt,"CssClassBuilder",0,eX,"Helpers",0,w,"LocalizableString",0,R,"PopupModalManager",0,n6,"PopupSurveyModel",0,nX,"ProgressButtonsResponsivityManager",0,iu,"Question",0,tz,"RendererFactory",0,tM,"ScrollViewModel",0,n1,"SurveyModel",0,ip,"SurveyProgressModel",0,nU,"SurveyWindowModel",0,class extends nX{},"SvgRegistry",0,rg,"addIconsToThemeSet",0,rv,"checkLibraryVersion",0,rp,"createPopupViewModel",0,n3,"createSvg",0,rn,"doKey2ClickBlur",0,iV,"doKey2ClickDown",0,iI,"doKey2ClickUp",0,ix,"settings",0,p,"surveyLocalization",0,I,"surveyStrings",0,x],53994);var rC=e.i(91788),ry=e.i(30943);class rf{constructor(){this.creatorHash={}}registerElement(e,t){this.creatorHash[e]=t}getAllTypes(){var e=[];for(var t in this.creatorHash)e.push(t);return e.sort()}isElementRegistered(e){return!!this.creatorHash[e]}createElement(e,t){var s=this.creatorHash[e];return null==s?null:s(t)}}rf.Instance=new rf;class rb{static wrapRow(e,t,s){let i=e.getRowWrapperComponentName(s),n=e.getRowWrapperComponentData(s);return rf.Instance.createElement(i,{element:t,row:s,componentData:n})}static wrapElement(e,t,s){let i=e.getElementWrapperComponentName(s),n=e.getElementWrapperComponentData(s);return rf.Instance.createElement(i,{element:t,question:s,componentData:n})}static wrapQuestionContent(e,t,s){let i=e.getQuestionContentWrapperComponentName(s),n=e.getElementWrapperComponentData(s);return rf.Instance.createElement(i,{element:t,question:s,componentData:n})}static wrapItemValue(e,t,s,i){let n=e.getItemValueWrapperComponentName(i,s),r=e.getItemValueWrapperComponentData(i,s);return rf.Instance.createElement(n,{key:null==t?void 0:t.key,element:t,question:s,item:i,componentData:r})}static wrapMatrixCell(e,t,s,i="cell"){let n=e.getElementWrapperComponentName(s,i),r=e.getElementWrapperComponentData(s,i);return rf.Instance.createElement(n,{element:t,cell:s,componentData:r})}}ip.platform="react";class rw extends rC.Component{static renderLocString(e,t=null,s){return rf.Instance.createElement(e.renderAs,{model:e.renderAsData,style:t,key:s})}static renderQuestionDescription(e){var t=rw.renderLocString(e.locDescription);return rC.createElement("div",{style:e.hasDescription?void 0:{display:"none"},id:e.ariaDescriptionId,className:e.cssDescription},t)}constructor(e){super(e),this._allowComponentUpdate=!0,this.prevStateElements=[],this.propertyValueChangedHandler=(e,t)=>{let s=t.name;this.canUsePropInState(s)&&!this.isRendering&&(this.changedStatePropNameValue=s,this.setState(e=>{var i={};return i[s]=t.newValue,i}))},this.onArrayChangedCallback=(e,t)=>{this.isRendering||(this.changedStatePropNameValue=t.name,this.setState(e=>{var s={};return s[t.name]=t.newValue,s}))}}componentDidMount(){this.makeBaseElementsReact()}componentWillUnmount(){this.unMakeBaseElementsReact(),this.disableStateElementsRerenderEvent(this.getStateElements())}componentDidUpdate(e,t){var s;this.makeBaseElementsReact();let i=this.getStateElements();this.disableStateElementsRerenderEvent((null!=(s=this.prevStateElements)?s:[]).filter(e=>!i.find(t=>t==e))),this.prevStateElements=[],this.getStateElements().forEach(e=>{e.afterRerender()})}allowComponentUpdate(){this._allowComponentUpdate=!0,this.forceUpdate()}denyComponentUpdate(){this._allowComponentUpdate=!1}shouldComponentUpdate(e,t){return this._allowComponentUpdate&&(this.unMakeBaseElementsReact(),this.prevStateElements=this.getStateElements()),this._allowComponentUpdate}render(){if(!this.canRender())return null;this.startEndRendering(1);var e=this.renderElement();return this.startEndRendering(-1),e&&(e=this.wrapElement(e)),this.changedStatePropNameValue=void 0,e}wrapElement(e){return e}get isRendering(){for(let e of this.getRenderedElements())if(e.reactRendering>0)return!0;return!1}
10getRenderedElements(){return this.getStateElements()}startEndRendering(e){for(let t of this.getRenderedElements())t.reactRendering||(t.reactRendering=0),t.reactRendering+=e}canRender(){return!0}renderElement(){return null}get changedStatePropName(){return this.changedStatePropNameValue}makeBaseElementsReact(){for(var e=this.getStateElements(),t=0;t<e.length;t++)e[t].enableOnElementRerenderedEvent(),this.makeBaseElementReact(e[t])}unMakeBaseElementsReact(){var e=this.getStateElements();this.unMakeBaseElementsReactive(e)}unMakeBaseElementsReactive(e){for(var t=0;t<e.length;t++)this.unMakeBaseElementReact(e[t])}disableStateElementsRerenderEvent(e){e.forEach(e=>{e.disableOnElementRerenderedEvent()})}getStateElements(){var e=this.getStateElement();return e?[e]:[]}getStateElement(){return null}get isDisplayMode(){return this.props.isDisplayMode||!1}renderLocString(e,t=null,s){return rw.renderLocString(e,t,s)}canMakeReact(e){return!!e&&!!e.iteratePropertiesHash}makeBaseElementReact(e){this.canMakeReact(e)&&(e.addOnArrayChangedCallback(this.onArrayChangedCallback),e.addOnPropertyValueChangedCallback(this.propertyValueChangedHandler))}canUsePropInState(e){return!0}unMakeBaseElementReact(e){this.canMakeReact(e)&&(e.removeOnPropertyValueChangedCallback(this.propertyValueChangedHandler),e.removeOnArrayChangedCallback(this.onArrayChangedCallback))}}class rV extends rw{constructor(e){super(e)}get cssClasses(){return this.props.cssClasses}}class rx extends rw{constructor(e){super(e)}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.updateDomElement()}componentDidMount(){super.componentDidMount(),this.updateDomElement()}componentWillUnmount(){if(super.componentWillUnmount(),this.questionBase){let e=this.content||this.control;this.questionBase.beforeDestroyQuestionElement(e),e&&e.removeAttribute("data-rendered")}}updateDomElement(){let e=this.content||this.control;e&&"r"!==e.getAttribute("data-rendered")&&(e.setAttribute("data-rendered","r"),this.questionBase.afterRenderQuestionElement(e))}get questionBase(){return this.props.question}getRenderedElements(){return[this.questionBase]}get creator(){return this.props.creator}canRender(){return!!this.questionBase&&!!this.creator}shouldComponentUpdate(e,t){return!!super.shouldComponentUpdate(e,t)&&(!this.questionBase.customWidget||!!this.questionBase.customWidgetData.isNeedRender||!!this.questionBase.customWidget.widgetJson.isDefaultRender||!!this.questionBase.customWidget.widgetJson.render)}get isDisplayMode(){return this.props.isDisplayMode||!!this.questionBase&&this.questionBase.isInputReadOnly||!1}wrapCell(e,t,s){if(!s)return t;let i=this.questionBase.survey,n=null;return i&&(n=rb.wrapMatrixCell(i,t,e,s)),null!=n?n:t}setControl(e){e&&(this.control=e)}setContent(e){e&&(this.content=e)}}class rI extends rx{constructor(e){super(e),this.updateValueOnEvent=e=>{w.isTwoValueEquals(this.questionBase.value,e.target.value,!1,!0,!1)||this.setValueCore(e.target.value)},this.updateValueOnEvent=this.updateValueOnEvent.bind(this)}get question(){return this.questionBase}setValueCore(e){this.questionBase.value=e}getValueCore(){return this.questionBase.value}updateDomElement(){if(this.control){let e=this.control,t=this.getValueCore();w.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.getValue(t))}super.updateDomElement()}getValue(e){return w.isValueEmpty(e)?"":e}}class rE extends rC.Component{constructor(e){super(e),this.svgIconRef=rC.createRef()}updateSvg(){this.props.iconName&&rn(this.props.size,this.props.width,this.props.height,this.props.iconName,this.svgIconRef.current,this.props.title)}componentDidUpdate(){this.updateSvg()}render(){let e="sv-svg-icon";return this.props.className&&(e+=" "+this.props.className),this.props.css&&(e=this.props.css),this.props.iconName?rC.createElement("svg",{className:e,style:this.props.style,onClick:this.props.onClick,ref:this.svgIconRef,role:"presentation"},rC.createElement("use",null)):null}componentDidMount(){this.updateSvg()}}rf.Instance.registerElement("sv-svg-icon",e=>rC.createElement(rE,e));class rS extends rC.Component{constructor(e){super(e)}
10render(){var e=`sv-action-bar-separator ${this.props.cssClasses}`;return rC.createElement("div",{className:e})}}rf.Instance.registerElement("sv-action-bar-separator",e=>rC.createElement(rS,e));class rP extends rC.Component{constructor(e){super(e),this.onChangedHandler=(e,t)=>{this.isRendering||this.setState({changed:this.state&&this.state.changed?this.state.changed+1:1})},this.rootRef=rC.createRef()}get locStr(){return this.props.model}get style(){return this.props.style}get textClass(){return this.props.textClass}componentDidMount(){this.reactOnStrChanged()}componentWillUnmount(){this.locStr&&this.locStr.onStringChanged.remove(this.onChangedHandler)}componentDidUpdate(e,t){e.locStr&&e.locStr.onStringChanged.remove(this.onChangedHandler),this.reactOnStrChanged()}reactOnStrChanged(){this.locStr&&this.locStr.onStringChanged.add(this.onChangedHandler)}render(){if(!this.locStr)return null;this.isRendering=!0;let e=this.renderString();return this.isRendering=!1,e}renderString(){let e=this.locStr.getStringViewerClassName(this.textClass);if(this.locStr.hasHtml){let t={__html:this.locStr.renderedHtml};return rC.createElement("span",{ref:this.rootRef,className:e,style:this.style,dangerouslySetInnerHTML:t})}return rC.createElement("span",{ref:this.rootRef,className:e,style:this.style},this.locStr.renderedHtml)}}rf.Instance.registerElement(R.defaultRenderer,e=>rC.createElement(rP,e));class rR extends rw{constructor(e){super(e),this.ref=rC.createRef()}get item(){return this.props.item}getStateElement(){return this.item}renderElement(){let e=this.item.getActionRootCss(),t=this.item.needSeparator?rC.createElement(rS,null):null,s=rf.Instance.createElement(this.item.component||"sv-action-bar-item",{item:this.item});return rC.createElement("div",{className:e,id:""+this.item.uniqueId,ref:this.ref},rC.createElement("div",{className:"sv-action__content"},t,s))}componentWillUnmount(){super.componentWillUnmount(),this.item.updateModeCallback=void 0}componentDidMount(){super.componentDidMount(),this.item.updateModeCallback=(e,t)=>{queueMicrotask(()=>{ry.flushSync?ry.flushSync(()=>{this.item.mode=e}):this.item.mode=e,queueMicrotask(()=>{t(e,this.ref.current)})})},this.item.afterRender()}}class rT extends rw{get item(){return this.props.item}getStateElement(){return this.item}renderElement(){return rC.createElement(rC.Fragment,null,this.renderInnerButton())}renderText(){return this.item.hasTitle?rC.createElement(rP,{model:this.item.locTitle,textClass:this.item.getActionBarItemTitleCss()}):null}renderButtonContent(){let e=this.renderText(),t=this.item.iconName?rC.createElement(rE,{className:this.item.cssClasses.itemIcon,size:this.item.iconSize,iconName:this.item.iconName,title:this.item.tooltip||this.item.title}):null;return rC.createElement(rC.Fragment,null,t,e)}renderInnerButton(){let e=this.item.getActionBarItemCss(),t=this.item.tooltip||this.item.title,s=this.renderButtonContent(),i=this.item.disableTabStop?-1:void 0;return rZ(rC.createElement("button",{className:e,type:"button",disabled:this.item.disabled,onMouseDown:e=>this.item.doMouseDown(e),onFocus:e=>this.item.doFocus(e),onClick:e=>this.item.doAction(e),title:t,tabIndex:i,"aria-checked":this.item.ariaChecked,"aria-expanded":this.item.ariaExpanded,"aria-labelledby":this.item.ariaLabelledBy,role:this.item.ariaRole},s),this.item,{processEsc:!1})}}rf.Instance.registerElement("sv-action-bar-item",e=>rC.createElement(rT,e));class rA extends rw{constructor(e){super(e),this.containerRef=rC.createRef(),this.createModel()}get model(){return this.props.model}getStateElement(){return this.model}createModel(){this.popup=n3(this.props.model)}setTargetElement(){let e=this.containerRef.current;this.popup.setComponentElement(e)}componentDidMount(){super.componentDidMount(),this.setTargetElement()}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.setTargetElement()}componentWillUnmount(){super.componentWillUnmount(),this.popup.resetComponentElement()}shouldComponentUpdate(e,t){var s;if(!super.shouldComponentUpdate(e,t))return!1;let i=e.model!==this.popup.model;return i&&(null==(s=this.popup)||s.dispose(),this.createModel()),i}render(){let e;return this.popup.model=this.model,e=this.model.isModal?rC.createElement(rL,{model:this.popup}):rC.createElement(rD,{model:this.popup}),rC.createElement("div",{ref:this.containerRef},e)}}rf.Instance.registerElement("sv-popup",e=>rC.createElement(rA,e));class rL extends rw{constructor(e){super(e),this.handleKeydown=e=>{this.model.onKeyDown(e)},this.clickInside=e=>{e.stopPropagation()}}get model(){return this.props.model}getStateElement(){return this.model}componentDidUpdate(e,t){super.componentDidUpdate(e,t),!this.model.isPositionSet&&this.model.isVisible&&this.model.updateOnShowing()}renderContainer(e){let t=e.showHeader?this.renderHeaderPopup(e):null,s=e.title?this.renderHeaderContent():null,i=this.renderContent(),n=e.showFooter?this.renderFooter(this.model):null;return rC.createElement("div",{className:"sv-popup__container",style:{left:e.left,top:e.top,height:e.height,width:e.width,minWidth:e.minWidth},onClick:e=>{this.clickInside(e)}},t,rC.createElement("div",{className:"sv-popup__body-content"},s,rC.createElement("div",{className:"sv-popup__scrolling-content"},i),n))}renderHeaderContent(){return rC.createElement("div",{className:"sv-popup__body-header"},this.model.title)}renderContent(){let e=rf.Instance.createElement(this.model.contentComponentName,this.model.contentComponentData);return rC.createElement("div",{className:"sv-popup__content"},e)}renderHeaderPopup(e){return e.showCloseButton?rC.createElement("button",{tabIndex:-1,
10className:"sv-popup__close-button sd-action sd-action--icon",onClick:()=>this.model.clickClose()},rC.createElement(rE,{className:"sv-popup__close-button-icon",iconName:"icon-close-24x24",size:"auto"})):null}renderFooter(e){return rC.createElement("div",{className:"sv-popup__body-footer"},rC.createElement(rN,{model:e.footerToolbar}))}render(){let e=this.renderContainer(this.model),t=new eX().append("sv-popup").append(this.model.styleClass).toString(),s={display:this.model.isVisible?"":"none"};return rC.createElement("div",{tabIndex:-1,className:t,style:s,onClick:e=>{this.model.clickOutside(e)},onBlur:e=>{this.model.blur(e)},onKeyDown:this.handleKeydown},e)}componentDidMount(){super.componentDidMount(),this.model.isVisible&&this.model.updateOnShowing()}}class rD extends rL{renderHeaderPopup(e){return e?rC.createElement("span",{style:{left:e.pointerTarget.left,top:e.pointerTarget.top},className:"sv-popup__pointer"}):null}}class rO extends rT{constructor(e){super(e)}renderInnerButton(){let e=super.renderInnerButton();return rC.createElement(rC.Fragment,null,e,rC.createElement(rA,{model:this.item.popupModel}))}componentDidMount(){this.viewModel=new e5(this.item)}componentWillUnmount(){super.componentWillUnmount(),this.viewModel.dispose()}}rf.Instance.registerElement("sv-action-bar-item-dropdown",e=>rC.createElement(rO,e));class rN extends rw{constructor(e){super(e),this.rootRef=rC.createRef()}get handleClick(){return void 0===this.props.handleClick||this.props.handleClick}get model(){return this.props.model}componentDidMount(){if(super.componentDidMount(),!this.model.hasVisibleActions)return;let e=this.rootRef.current;e&&this.model.initResponsivityManager(e,e=>{setTimeout(e,100)})}componentWillUnmount(){super.componentWillUnmount(),this.model.resetResponsivityManager()}componentDidUpdate(e,t){if(super.componentDidUpdate(e,t),e.model!=this.props.model&&e.model.resetResponsivityManager(),this.model.hasVisibleActions){let e=this.rootRef.current;e&&this.model.initResponsivityManager(e,e=>{setTimeout(e,100)})}}getStateElement(){return this.model}renderElement(){if(!this.model.hasActions)return null;let e=this.renderItems();return rC.createElement("div",{ref:this.rootRef,style:this.model.getRootStyle(),className:this.model.getRootCss(),onClick:this.handleClick?function(e){e.stopPropagation()}:void 0},e)}renderItems(){return this.model.renderedActions.concat([]).map((e,t)=>rC.createElement(rR,{item:e,key:e.renderedId}))}}rf.Instance.registerElement("sv-action-bar",e=>rC.createElement(rN,e));class rM extends rC.Component{constructor(e){super(e)}get cssClasses(){return this.props.cssClasses}get element(){return this.props.element}render(){if(this.element.isTitleRenderedAsString)return rw.renderLocString(this.element.locRenderedTitle);var e=this.renderTitleSpans(this.element.getTitleOwner(),this.cssClasses);return rC.createElement(rC.Fragment,null,e)}renderTitleSpans(e,t){var s=e=>rC.createElement("span",{"data-key":e,key:e},"Â "),i=[];e.isRequireTextOnStart&&(i.push(this.renderRequireText(e)),i.push(s("req-sp")));var n=e.no;return n&&(i.push(rC.createElement("span",{"data-key":"q_num",key:"q_num",className:e.cssTitleNumber,style:{position:"static"},"aria-hidden":!0},n)),i.push(s("num-sp"))),e.isRequireTextBeforeTitle&&(i.push(this.renderRequireText(e)),i.push(s("req-sp"))),i.push(rw.renderLocString(e.locRenderedTitle,null,"q_title")),e.isRequireTextAfterTitle&&(i.push(s("req-sp")),i.push(this.renderRequireText(e))),i}renderRequireText(e){return rC.createElement("span",{"data-key":"req-text",key:"req-text",className:e.cssRequiredMark,"aria-hidden":!0},e.requiredMark)}}class rk extends rC.Component{get cssClasses(){return this.props.cssClasses}get element(){return this.props.element}get renderActions(){return void 0===this.props.renderActions||this.props.renderActions}render(){let e=rC.createElement(rM,{element:this.element,cssClasses:this.cssClasses});return this.element.hasTitleActions?rC.createElement("div",{className:"sv-title-actions"},rC.createElement("span",{className:"sv-title-actions__title"},e),this.renderActions?rC.createElement(rN,{model:this.element.getTitleToolbar()}):null):e}}tM.Instance.registerRenderer("element","title-actions","sv-title-actions"),rf.Instance.registerElement("sv-title-actions",e=>rC.createElement(rk,e));class rq extends rC.Component{constructor(e){super(e)}
10get element(){return this.props.element}renderTitleExpandableSvg(){if(!this.element.getCssTitleExpandableSvg())return null;let e=this.element.isExpanded?"icon-collapse-16x16":"icon-expand-16x16";return rC.createElement(rE,{className:this.element.getCssTitleExpandableSvg(),iconName:e,size:"auto"})}render(){let e,t=this.element;if(!t||!t.hasTitle)return null;let s=t.titleAriaLabel||void 0,i=this.renderTitleExpandableSvg(),n=rC.createElement(rk,{element:t,cssClasses:t.cssClasses,renderActions:this.props.renderActions});t.hasTitleEvents&&(e=e=>{ix(e.nativeEvent)});let r=t.titleTagName;return rC.createElement(r,{className:t.cssTitle,id:t.ariaTitleId,"aria-label":s,tabIndex:t.titleTabIndex,"aria-expanded":t.titleAriaExpanded,role:t.titleAriaRole,onClick:void 0,onKeyUp:e},i,n)}}class rF extends rC.Component{constructor(e){super(e),this.state={changed:0},this.rootRef=rC.createRef()}get survey(){return this.props.survey}get css(){return this.survey.css}componentDidMount(){let e=this;this.survey.afterRenderHeader(this.rootRef.current),this.survey.locLogo.onChanged=function(){e.setState({changed:e.state.changed+1})}}componentWillUnmount(){this.survey.locLogo.onChanged=function(){}}renderTitle(){if(!this.survey.renderedHasTitle)return null;let e=rw.renderLocString(this.survey.locDescription);return rC.createElement("div",{className:this.css.headerText,style:{maxWidth:this.survey.titleMaxWidth}},rC.createElement(rq,{element:this.survey}),this.survey.renderedHasDescription?rC.createElement("div",{className:this.css.description},e):null)}
10renderLogoImage(e){if(!e)return null;let t=this.survey.getElementWrapperComponentName(this.survey,"logo-image"),s=this.survey.getElementWrapperComponentData(this.survey,"logo-image");return rf.Instance.createElement(t,{data:s})}render(){return this.survey.renderedHasHeader?rC.createElement("div",{className:this.css.header,ref:this.rootRef},this.renderLogoImage(this.survey.isLogoBefore),this.renderTitle(),this.renderLogoImage(this.survey.isLogoAfter),rC.createElement("div",{className:this.css.headerClose})):null}}rf.Instance.registerElement("survey-header",e=>rC.createElement(rF,e));class rB{constructor(){this.creatorHash={}}registerQuestion(e,t){this.creatorHash[e]=t}getAllTypes(){var e=[];for(var t in this.creatorHash)e.push(t);return e.sort()}createQuestion(e,t){var s=this.creatorHash[e];return null==s?null:s(t)}}rB.Instance=new rB;class r_ extends rC.Component{render(){return rC.createElement("div",{className:"sv-brand-info"},rC.createElement("a",{className:"sv-brand-info__logo",href:"https://surveyjs.io/?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=landing_page"},rC.createElement("img",{src:"https://surveyjs.io/Content/Images/poweredby.svg"})),rC.createElement("div",{className:"sv-brand-info__text"},"Try and see how easy it is to ",rC.createElement("a",{href:"https://surveyjs.io/create-survey?utm_source=built-in_links&utm_medium=online_survey_tool&utm_campaign=create_survey"},"create a survey")),rC.createElement("div",{className:"sv-brand-info__terms"},rC.createElement("a",{href:"https://surveyjs.io/TermsOfUse"},"Terms of Use & Privacy Statement")))}}class rQ extends rw{get notifier(){return this.props.notifier}getStateElement(){return this.notifier}renderElement(){if(!this.notifier.isDisplayed)return null;let e={visibility:this.notifier.active?"visible":"hidden"};return rC.createElement("div",{className:this.notifier.css,style:e,role:"alert","aria-live":"polite"},rC.createElement("span",null,this.notifier.message),rC.createElement(rN,{model:this.notifier.actionBar}))}}rf.Instance.registerElement("sv-notifier",e=>rC.createElement(rQ,e));class rH extends rC.Component{render(){let e=this.props.survey.getContainerContent(this.props.container),t=!1!==this.props.needRenderWrapper;return 0==e.length?null:t?rC.createElement("div",{className:"sv-components-column sv-components-container-"+this.props.container},e.map(e=>rf.Instance.createElement(e.component,{survey:this.props.survey,model:e.data,container:this.props.container,key:e.id}))):rC.createElement(rC.Fragment,null,e.map(e=>rf.Instance.createElement(e.component,{survey:this.props.survey,model:e.data,container:this.props.container,key:e.id})))}}rf.Instance.registerElement("sv-components-container",e=>rC.createElement(rH,e));class rz extends rC.Component{constructor(e){super(e),this.onIconsChanged=()=>{this.containerRef.current&&(this.containerRef.current.innerHTML=rg.iconsRenderedHtml())},this.containerRef=rC.createRef()}componentDidMount(){this.onIconsChanged(),rg.onIconsChanged.add(this.onIconsChanged)}componentWillUnmount(){rg.onIconsChanged.remove(this.onIconsChanged)}render(){return rC.createElement("svg",{style:{display:"none"},id:"sv-icon-holder-global-container",ref:this.containerRef})}}class rU extends rw{createPopupModalManager(){let e=new n6;return e.onModalsChangedCallback=()=>{this.setState({changed:this.state.changed+1})},e}constructor(e){super(e),this.modalManager=this.createPopupModalManager(),this.isInitialized=!1,this.init=()=>{this.isInitialized||(p.showDialog=(e,t)=>
10this.modalManager.addDialog(e,t),this.isInitialized=!0)},this.clean=()=>{this.isInitialized&&(p.showDialog=void 0,this.isInitialized=!1)},this.state={changed:0},this.descriptor={init:this.init,clean:this.clean}}static addModalDescriptor(e){p.showDialog||e.init(),this.modalDescriptors.push(e)}static removeModalDescriptor(e){e.clean(),this.modalDescriptors.splice(this.modalDescriptors.indexOf(e),1),!p.showDialog&&this.modalDescriptors[0]&&this.modalDescriptors[0].init()}renderElement(){return rC.createElement(rC.Fragment,null,this.modalManager.getModals().map(e=>(0,ry.createPortal)(rC.createElement(rL,{model:e}),e.container,e.uniqueId.toString())))}componentDidMount(){rU.addModalDescriptor(this.descriptor)}componentWillUnmount(){this.modalManager.clear(),rU.removeModalDescriptor(this.descriptor)}}rU.modalDescriptors=[];let rW={modernbooleancheckchecked:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><polygon points="19,10 14,10 14,5 10,5 10,10 5,10 5,14 10,14 10,19 14,19 14,14 19,14 "/></svg>',modernbooleancheckind:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M22,0H2C0.9,0,0,0.9,0,2v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V2C24,0.9,23.1,0,22,0z M21,18L6,3h15V18z M3,6l15,15H3V6z"/></svg>',modernbooleancheckunchecked:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><rect x="5" y="10" width="14" height="4"/></svg>',moderncheck:'<svg viewBox="0 0 24 24"><path d="M5,13l2-2l3,3l7-7l2,2l-9,9L5,13z"/></svg>',modernradio:'<svg viewBox="-12 -12 24 24"><circle r="6" cx="0" cy="0"/></svg>',progressbutton:'<svg viewBox="0 0 10 10"><polygon points="2,2 0,4 5,9 10,4 8,2 5,5 "/></svg>',removefile:'<svg viewBox="0 0 16 16"><path d="M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z M11,10l-1,1L8,9l-2,2l-1-1l2-2L5,6l1-1l2,2l2-2l1,1L9,8 L11,10z"/></svg>',timercircle:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 160 160"><circle cx="80" cy="80" r="70" style="stroke:var(--sd-timer-stroke-background-color);stroke-width:var(--sd-timer-stroke-background-width)" stroke-dasharray="none" stroke-dashoffset="none"/><circle cx="80" cy="80" r="70"/></svg>',"add-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M15.75 12C15.75 12.41 15.41 12.75 15 12.75H12.75V15C12.75 15.41 12.41 15.75 12 15.75C11.59 15.75 11.25 15.41 11.25 15V12.75H9C8.59 12.75 8.25 12.41 8.25 12C8.25 11.59 8.59 11.25 9 11.25H11.25V9C11.25 8.59 11.59 8.25 12 8.25C12.41 8.25 12.75 8.59 12.75 9V11.25H15C15.41 11.25 15.75 11.59 15.75 12ZM21.75 12C21.75 17.38 17.38 21.75 12 21.75C6.62 21.75 2.25 17.38 2.25 12C2.25 6.62 6.62 2.25 12 2.25C17.38 2.25 21.75 6.62 21.75 12ZM20.25 12C20.25 7.45 16.55 3.75 12 3.75C7.45 3.75 3.75 7.45 3.75 12C3.75 16.55 7.45 20.25 12 20.25C16.55 20.25 20.25 16.55 20.25 12Z"/></svg>',"arrowleft-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.7475 7.9975C14.7475 8.4075 14.4075 8.7475 13.9975 8.7475H3.8075L7.5275 12.4675C7.8175 12.7575 7.8175 13.2375 7.5275 13.5275C7.3775 13.6775 7.1875 13.7475 6.9975 13.7475C6.8075 13.7475 6.6175 13.6775 6.4675 13.5275L1.4675 8.5275C1.1775 8.2375 1.1775 7.7575 1.4675 7.4675L6.4675 2.4675C6.7575 2.1775 7.2375 2.1775 7.5275 2.4675C7.8175 2.7575 7.8175 3.2375 7.5275 3.5275L3.8075 7.2475H13.9975C14.4075 7.2475 14.7475 7.5875 14.7475 7.9975Z"/></svg>',"arrowright-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.53 8.5275L9.53 13.5275C9.38 13.6775 9.19 13.7475 9 13.7475C8.81 13.7475 8.62 13.6775 8.47 13.5275C8.18 13.2375 8.18 12.7575 8.47 12.4675L12.19 8.7475H2C1.59 8.7475 1.25 8.4075 1.25 7.9975C1.25 7.5875 1.59 7.2475 2 7.2475H12.19L8.47 3.5275C8.18 3.2375 8.18 2.7575 8.47 2.4675C8.76 2.1775 9.24 2.1775 9.53 2.4675L14.53 7.4675C14.82 7.7575 14.82 8.2375 14.53 8.5275Z"/></svg>',"camera-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19.19 4.25H17.12C16.72 4.25 16.35 4.03 16.17 3.67C15.73 2.8 14.86 2.25 13.88 2.25H10.12C9.14 2.25 8.27 2.79 7.83 3.67C7.65 4.03 7.29 4.25 6.88 4.25H4.81C3.4 4.25 2.25 5.4 2.25 6.81V18.19C2.25 19.6 3.4 20.75 4.81 20.75H19.19C20.6 20.75 21.75 19.6 21.75 18.19V6.81C21.75 5.4 20.6 4.25 19.19 4.25ZM20.25 18.19C20.25 18.77 19.78 19.25 19.19 19.25H4.81C4.23 19.25 3.75 18.78 3.75 18.19V6.81C3.75 6.23 4.22 5.75 4.81 5.75H6.88C7.86 5.75 8.73 5.21 9.17 4.33C9.35 3.97 9.71 3.75 10.12 3.75H13.88C14.28 3.75 14.65 3.97 14.83 4.33C15.27 5.2 16.14 5.75 17.12 5.75H19.19C19.77 5.75 20.25 6.22 20.25 6.81V18.19ZM12 6.25C8.83 6.25 6.25 8.83 6.25 12C6.25 15.17 8.83 17.75 12 17.75C15.17 17.75 17.75 15.17 17.75 12C17.75 8.83 15.17 6.25 12 6.25ZM12 16.25C9.66 16.25 7.75 14.34 7.75 12C7.75 9.66 9.66 7.75 12 7.75C14.34 7.75 16.25 9.66 16.25 12C16.25 14.34 14.34 16.25 12 16.25ZM14.75 12C14.75 13.52 13.52 14.75 12 14.75C11.59 14.75 11.25 14.41 11.25 14C11.25 13.59 11.59 13.25 12 13.25C12.69 13.25 13.25 12.69 13.25 12C13.25 11.59 13.59 11.25 14 11.25C14.41 11.25 14.75 11.59 14.75 12Z"/></svg>',"camera-32x32":'<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M25 7.25H22.19C21.73 7.25 21.31 7 21.09 6.59L20.89 6.22C20.23 5.01 18.97 4.25 17.59 4.25H14.41C13.03 4.25 11.77 5 11.11 6.22L10.91 6.6C10.69 7 10.27 7.26 9.81 7.26H7C4.93 7.26 3.25 8.94 3.25 11.01V24.01C3.25 26.08 4.93 27.76 7 27.76H25C27.07 27.76 28.75 26.08 28.75 24.01V11C28.75 8.93 27.07 7.25 25 7.25ZM27.25 24C27.25 25.24 26.24 26.25 25 26.25H7C5.76 26.25 4.75 25.24 4.75 24V11C4.75 9.76 5.76 8.75 7 8.75H9.81C10.82 8.75 11.75 8.2 12.23 7.31L12.43 6.94C12.82 6.21 13.58 5.76 14.41 5.76H17.59C18.42 5.76 19.18 6.21 19.57 6.94L19.77 7.31C20.25 8.2 21.18 8.76 22.19 8.76H25C26.24 8.76 27.25 9.77 27.25 11.01V24.01V24ZM16 10.25C12.28 10.25 9.25 13.28 9.25 17C9.25 20.72 12.28 23.75 16 23.75C19.72 23.75 22.75 20.72 22.75 17C22.75 13.28 19.72 10.25 16 10.25ZM16 22.25C13.11 22.25 10.75 19.89 10.75 17C10.75 14.11 13.11 11.75 16 11.75C18.89 11.75 21.25 14.11 21.25 17C21.25 19.89 18.89 22.25 16 22.25ZM19.75 17C19.75 19.07 18.07 20.75 16 20.75C15.59 20.75 15.25 20.41 15.25 20C15.25 19.59 15.59 19.25 16 19.25C17.24 19.25 18.25 18.24 18.25 17C18.25 16.59 18.59 16.25 19 16.25C19.41 16.25 19.75 16.59 19.75 17Z"/></svg>',"cancel-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.8099 11.75L15.2799 9.28C15.5699 8.99 15.5699 8.51 15.2799 8.22C14.9899 7.93 14.5099 7.93 14.2199 8.22L11.7499 10.69L9.27994 8.22C8.98994 7.93 8.50994 7.93 8.21994 8.22C7.92994 8.51 7.92994 8.99 8.21994 9.28L10.6899 11.75L8.21994 14.22C7.92994 14.51 7.92994 14.99 8.21994 15.28C8.36994 15.43 8.55994 15.5 8.74994 15.5C8.93994 15.5 9.12994 15.43 9.27994 15.28L11.7499 12.81L14.2199 15.28C14.3699 15.43 14.5599 15.5 14.7499 15.5C14.9399 15.5 15.1299 15.43 15.2799 15.28C15.5699 14.99 15.5699 14.51 15.2799 14.22L12.8099 11.75Z"/></svg>',"check-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.0275 5.0275L6.5275 12.5275C6.3775 12.6775 6.1875 12.7475 5.9975 12.7475C5.8075 12.7475 5.6175 12.6775 5.4675 12.5275L2.4675 9.5275C2.1775 9.2375 2.1775 8.7575 2.4675 8.4675C2.7575 8.1775 3.2375 8.1775 3.5275 8.4675L5.9975 10.9375L12.9675 3.9675C13.2575 3.6775 13.7375 3.6775 14.0275 3.9675C14.3175 4.2575 14.3175 4.7375 14.0275 5.0275Z"/></svg>',"check-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19.5275 7.5275L9.5275 17.5275C9.3775 17.6775 9.1875 17.7475 8.9975 17.7475C8.8075 17.7475 8.6175 17.6775 8.4675 17.5275L4.4675 13.5275C4.1775 13.2375 4.1775 12.7575 4.4675 12.4675C4.7575 12.1775 5.2375 12.1775 5.5275 12.4675L8.9975 15.9375L18.4675 6.4675C18.7575 6.1775 19.2375 6.1775 19.5275 6.4675C19.8175 6.7575 19.8175 7.2375 19.5275 7.5275Z"/></svg>',"chevrondown-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M16.5275 10.5275L12.5275 14.5275C12.3775 14.6775 12.1875 14.7475 11.9975 14.7475C11.8075 14.7475 11.6175 14.6775 11.4675 14.5275L7.4675 10.5275C7.1775 10.2375 7.1775 9.7575 7.4675 9.4675C7.7575 9.1775 8.2375 9.1775 8.5275 9.4675L11.9975 12.9375L15.4675 9.4675C15.7575 9.1775 16.2375 9.1775 16.5275 9.4675C16.8175 9.7575 16.8175 10.2375 16.5275 10.5275Z"/></svg>',"chevronright-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11.35 8.34627L7.35 12.3463C7.25 12.4463 7.12 12.4963 7 12.4963C6.88 12.4963 6.74 12.4463 6.65 12.3463C6.45 12.1463 6.45 11.8363 6.65 11.6363L10.3 7.98627L6.65 4.34627C6.45 4.15627 6.45 3.83627 6.65 3.64627C6.85 3.45627 7.16 3.44627 7.35 3.64627L11.35 7.64627C11.55 7.84627 11.55 8.15627 11.35 8.35627V8.34627
vendor: 13,602 bytes, line 10
10Z"/></svg>',"clear-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M12.35 11.65C12.55 11.85 12.55 12.16 12.35 12.36C12.25 12.46 12.12 12.51 12 12.51C11.88 12.51 11.74 12.46 11.65 12.36L8 8.71L4.35 12.36C4.25 12.46 4.12 12.51 4 12.51C3.88 12.51 3.74 12.46 3.65 12.36C3.45 12.16 3.45 11.85 3.65 11.65L7.3 8L3.65 4.35C3.45 4.16 3.45 3.84 3.65 3.65C3.85 3.46 4.16 3.45 4.35 3.65L8 7.3L11.65 3.65C11.85 3.45 12.16 3.45 12.36 3.65C12.56 3.85 12.56 4.16 12.36 4.36L8.71 8.01L12.36 11.66L12.35 11.65Z"/></svg>',"clear-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20.12 10.9325C20.64 10.4125 20.93 9.7225 20.93 8.9925C20.93 8.2625 20.64 7.5725 20.12 7.0525L16.95 3.8825C15.88 2.8125 14.13 2.8125 13.06 3.8825L3.88 13.0525C3.36 13.5725 3.07 14.2625 3.07 14.9925C3.07 15.7225 3.36 16.4125 3.88 16.9325L5.64 18.6925C6.57 19.6225 7.78 20.0825 9 20.0825C10.22 20.0825 11.43 19.6225 12.36 18.6925L20.12 10.9325ZM14.12 4.9325C14.36 4.6925 14.67 4.5625 15 4.5625C15.33 4.5625 15.65 4.6925 15.88 4.9325L19.05 8.1025C19.54 8.5925 19.54 9.3825 19.05 9.8725L12.99 15.9325L8.05 10.9925L14.12 4.9325ZM6.7 17.6325L4.94 15.8725C4.45 15.3825 4.45 14.5925 4.94 14.1025L7 12.0425L11.94 16.9825L11.3 17.6225C10.07 18.8525 7.93 18.8525 6.7 17.6225V17.6325ZM22.75 20.9925C22.75 21.4025 22.41 21.7425 22 21.7425H14C13.59 21.7425 13.25 21.4025 13.25 20.9925C13.25 20.5825 13.59 20.2425 14 20.2425H22C22.41 20.2425 22.75 20.5825 22.75 20.9925ZM4.75 20.9925C4.75 21.4025 4.41 21.7425 4 21.7425H2C1.59 21.7425 1.25 21.4025 1.25 20.9925C1.25 20.5825 1.59 20.2425 2 20.2425H4C4.41 20.2425 4.75 20.5825 4.75 20.9925Z"/></svg>',"close-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13.5275 12.4675C13.8175 12.7575 13.8175 13.2375 13.5275 13.5275C13.3775 13.6775 13.1875 13.7475 12.9975 13.7475C12.8075 13.7475 12.6175 13.6775 12.4675 13.5275L7.9975 9.0575L3.5275 13.5275C3.3775 13.6775 3.1875 13.7475 2.9975 13.7475C2.8075 13.7475 2.6175 13.6775 2.4675 13.5275C2.1775 13.2375 2.1775 12.7575 2.4675 12.4675L6.9375 7.9975L2.4675 3.5275C2.1775 3.2375 2.1775 2.7575 2.4675 2.4675C2.7575 2.1775 3.2375 2.1775 3.5275 2.4675L7.9975 6.9375L12.4675 2.4675C12.7575 2.1775 13.2375 2.1775 13.5275 2.4675C13.8175 2.7575 13.8175 3.2375 13.5275 3.5275L9.0575 7.9975L13.5275 12.4675Z"/></svg>',"close-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19.5275 18.4675C19.8175 18.7575 19.8175 19.2375 19.5275 19.5275C19.3775 19.6775 19.1875 19.7475 18.9975 19.7475C18.8075 19.7475 18.6175 19.6775 18.4675 19.5275L11.9975 13.0575L5.5275 19.5275C5.3775 19.6775 5.1875 19.7475 4.9975 19.7475C4.8075 19.7475 4.6175 19.6775 4.4675 19.5275C4.1775 19.2375 4.1775 18.7575 4.4675 18.4675L10.9375 11.9975L4.4675 5.5275C4.1775 5.2375 4.1775 4.7575 4.4675 4.4675C4.7575 4.1775 5.2375 4.1775 5.5275 4.4675L11.9975 10.9375L18.4675 4.4675C18.7575 4.1775 19.2375 4.1775 19.5275 4.4675C19.8175 4.7575 19.8175 5.2375 19.5275 5.5275L13.0575 11.9975L19.5275 18.4675Z"/></svg>',"collapse-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11.75 8C11.75 8.41 11.41 8.75 11 8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H11C11.41 7.25 11.75 7.59 11.75 8Z"/></svg>',"collapsedetails-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11.75 8C11.75 8.41 11.41 8.75 11 8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H11C11.41 7.25 11.75 7.59 11.75 8Z"/></svg>',"delete-16x16":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M13 3.25H10.75V3C10.75 2.04 9.96 1.25 9 1.25H7C6.04 1.25 5.25 2.04 5.25 3V3.25H3C2.59 3.25 2.25 3.59 2.25 4C2.25 4.41 2.59 4.75 3 4.75H3.25V13C3.25 13.96 4.04 14.75 5 14.75H11C11.96 14.75 12.75 13.96 12.75 13V4.75H13C13.41 4.75 13.75 4.41 13.75 4C13.75 3.59 13.41 3.25 13 3.25ZM6.75 3C6.75 2.86 6.86 2.75 7 2.75H9C9.14 2.75 9.25 2.86 9.25 3V3.25H6.75V3ZM11.25 13C11.25 13.14 11.14 13.25 11 13.25H5C4.86 13.25 4.75 13.14 4.75 13V4.75H11.25V13ZM9.25 6.25C9.66 6.25 10 6.59 10 7V11C10 11.41 9.66 11.75 9.25 11.75C8.84 11.75 8.5 11.41 8.5 11V7C8.5 6.59 8.84 6.25 9.25 6.25ZM7.5 7V11C7.5 11.41 7.16 11.75 6.75 11.75C6.34 11.75 6 11.41 6 11V7C6 6.59 6.34 6.25 6.75 6.25C7.16 6.25 7.5 6.59 7.5 7Z"/></svg>',"delete-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.75 9V17C12.75 17.41 12.41 17.75 12 17.75C11.59 17.75 11.25 17.41 11.25 17V9C11.25 8.59 11.59 8.25 12 8.25C12.41 8.25 12.75 8.59 12.75 9ZM14.25 9V17C14.25 17.41 14.59 17.75 15 17.75C15.41 17.75 15.75 17.41 15.75 17V9C15.75 8.59 15.41 8.25 15 8.25C14.59 8.25 14.25 8.59 14.25 9ZM9 8.25C8.59 8.25 8.25 8.59 8.25 9V17C8.25 17.41 8.59 17.75 9 17.75C9.41 17.75 9.75 17.41 9.75 17V9C9.75 8.59 9.41 8.25 9 8.25ZM20.75 6C20.75 6.41 20.41 6.75 20 6.75H18.75V18C18.75 19.52 17.52 20.75 16 20.75H8C6.48 20.75 5.25 19.52 5.25 18V6.75H4C3.59 6.75 3.25 6.41 3.25 6C3.25 5.59 3.59 5.25 4 5.25H8.25V4C8.25 3.04 9.04 2.25 10 2.25H14C14.96 2.25 15.75 3.04 15.75 4V5.25H20C20.41 5.25 20.75 5.59 20.75 6ZM9.75 5.25H14.25V4C14.25 3.86 14.14 3.75 14 3.75H10C9.86 3.75 9.75 3.86 9.75 4V5.25ZM17.25 6.75H6.75V18C6.75 18.69 7.31 19.25 8 19.25H16C16.69 19.25 17.25 18.69 17.25 18V6.75Z"/></svg>',"drag-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 8.75C15.19 8.75 15.75 8.19 15.75 7.5C15.75 6.81 15.19 6.25 14.5 6.25C13.81 6.25 13.25 6.81 13.25 7.5C13.25 8.19 13.81 8.75 14.5 8.75ZM14.5 7.25C14.64 7.25 14.75 7.36 14.75 7.5C14.75 7.78 14.25 7.78 14.25 7.5C14.25 7.36 14.36 7.25 14.5 7.25ZM9.5 6.25C8.81 6.25 8.25 6.81 8.25 7.5C8.25 8.19 8.81 8.75 9.5 8.75C10.19 8.75 10.75 8.19 10.75 7.5C10.75 6.81 10.19 6.25 9.5 6.25ZM9.25 7.5C9.25 7.36 9.36 7.25 9.5 7.25C9.64 7.25 9.75 7.36 9.75 7.5C9.75 7.78 9.25 7.78 9.25 7.5ZM14.5 11.25C13.81 11.25 13.25 11.81 13.25 12.5C13.25 13.19 13.81 13.75 14.5 13.75C15.19 13.75 15.75 13.19 15.75 12.5C15.75 11.81 15.19 11.25 14.5 11.25ZM14.25 12.5C14.25 12.36 14.36 12.25 14.5 12.25C14.64 12.25 14.75 12.36 14.75 12.5C14.75 12.78 14.25 12.78 14.25 12.5ZM9.5 11.25C8.81 11.25 8.25 11.81 8.25 12.5C8.25 13.19 8.81 13.75 9.5 13.75C10.19 13.75 10.75 13.19 10.75 12.5C10.75 11.81 10.19 11.25 9.5 11.25ZM9.25 12.5C9.25 12.36 9.36 12.25 9.5 12.25C9.64 12.25 9.75 12.36 9.75 12.5C9.75 12.78 9.25 12.78 9.25 12.5ZM14.5 16.25C13.81 16.25 13.25 16.81 13.25 17.5C13.25 18.19 13.81 18.75 14.5 18.75C15.19 18.75 15.75 18.19 15.75 17.5C15.75 16.81 15.19 16.25 14.5 16.25ZM14.25 17.5C14.25 17.36 14.36 17.25 14.5 17.25C14.64 17.25 14.75 17.36 14.75 17.5C14.75 17.78 14.25 17.78 14.25 17.5ZM9.5 16.25C8.81 16.25 8.25 16.81 8.25 17.5C8.25 18.19 8.81 18.75 9.5 18.75C10.19 18.75 10.75 18.19 10.75 17.5C10.75 16.81 10.19 16.25 9.5 16.25ZM9.25 17.5C9.25 17.36 9.36 17.25 9.5 17.25C9.64 17.25 9.75 17.36 9.75 17.5C9.75 17.78 9.25 17.78 9.25 17.5Z"/></svg>',"draghorizontal-24x16":'<svg viewBox="0 0 24 16" xmlns="http://www.w3.org/2000/svg"><path d="M17.5 9.25C16.81 9.25 16.25 9.81 16.25 10.5C16.25 11.19 16.81 11.75 17.5 11.75C18.19 11.75 18.75 11.19 18.75 10.5C18.75 9.81 18.19 9.25 17.5 9.25ZM17.25 10.5C17.25 10.36 17.36 10.25 17.5 10.25C17.64 10.25 17.75 10.36 17.75 10.5C17.75 10.78 17.25 10.78 17.25 10.5ZM17.5 6.75C18.19 6.75 18.75 6.19 18.75 5.5C18.75 4.81 18.19 4.25 17.5 4.25C16.81 4.25 16.25 4.81 16.25 5.5C16.25 6.19 16.81 6.75 17.5 6.75ZM17.5 5.25C17.64 5.25 17.75 5.36 17.75 5.5C17.75 5.78 17.25 5.78 17.25 5.5C17.25 5.36 17.36 5.25 17.5 5.25ZM12.5 9.25C11.81 9.25 11.25 9.81 11.25 10.5C11.25 11.19 11.81 11.75 12.5 11.75C13.19 11.75 13.75 11.19 13.75 10.5C13.75 9.81 13.19 9.25 12.5 9.25ZM12.25 10.5C12.25 10.36 12.36 10.25 12.5 10.25C12.64 10.25 12.75 10.36 12.75 10.5C12.75 10.78 12.25 10.78 12.25 10.5ZM12.5 4.25C11.81 4.25 11.25 4.81 11.25 5.5C11.25 6.19 11.81 6.75 12.5 6.75C13.19 6.75 13.75 6.19 13.75 5.5C13.75 4.81 13.19 4.25 12.5 4.25ZM12.25 5.5C12.25 5.36 12.36 5.25 12.5 5.25C12.64 5.25 12.75 5.36 12.75 5.5C12.75 5.78 12.25 5.78 12.25 5.5ZM7.5 9.25C6.81 9.25 6.25 9.81 6.25 10.5C6.25 11.19 6.81 11.75 7.5 11.75C8.19 11.75 8.75 11.19 8.75 10.5C8.75 9.81 8.19 9.25 7.5 9.25ZM7.25 10.5C7.25 10.36 7.36 10.25 7.5 10.25C7.64 10.25 7.75 10.36 7.75 10.5C7.75 10.78 7.25 10.78 7.25 10.5ZM7.5 4.25C6.81 4.25 6.25 4.81 6.25 5.5C6.25 6.19 6.81 6.75 7.5 6.75C8.19 6.75 8.75 6.19 8.75 5.5C8.75 4.81 8.19 4.25 7.5 4.25ZM7.25 5.5C7.25 5.36 7.36 5.25 7.5 5.25C7.64 5.25 7.75 5.36 7.75 5.5C7.75 5.78 7.25 5.78 7.25 5.5Z"/></svg>',"editsmall-16x16":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M13.1209 3.05249L12.9509 2.88249C11.8809 1.81249 10.1309 1.81249 9.06089 2.88249L3.47089 8.46249C3.37089 8.56249 3.31089 8.68249 3.27089 8.81249L2.27089 12.8125C2.21089 13.0625 2.28089 13.3425 2.47089 13.5225C2.61089 13.6625 2.80089 13.7425 3.00089 13.7425C3.06089 13.7425 3.12089 13.7425 3.18089 13.7225L7.18089 12.7225C7.31089 12.6925 7.43089 12.6225 7.53089 12.5225L13.1209 6.93249C14.1909 5.86249 14.1909 4.11249 13.1209 3.04249V3.05249ZM6.62089 11.3125L4.04089 11.9625L4.69089 9.38249L8.01089 6.06249L9.95089 8.00249L6.63089 11.3225L6.62089 11.3125ZM12.0609 5.87249L11.0009 6.93249L9.06089 4.99249L10.1209 3.93249C10.6109 3.44249 11.4009 3.44249 11.8909 3.93249L12.0609 4.10249C12.5509 4.59249 12.5509 5.38249 12.0609 5.87249Z"/></svg>',"expand-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11.75 8C11.75 8.41 11.41 8.75 11 8.75H8.75V11C8.75 11.41 8.41 11.75 8 11.75C7.59 11.75 7.25 11.41 7.25 11V8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H7.25V5C7.25 4.59 7.59 4.25 8 4.25C8.41 4.25 8.75 4.59 8.75 5V7.25H11C11.41 7.25 11.75 7.59 11.75 8Z"/></svg>',"expanddetails-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11.75 8C11.75 8.41 11.41 8.75 11 8.75H8.75V11C8.75 11.41 8.41 11.75 8 11.75C7.59 11.75 7.25 11.41 7.25 11V8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H7.25V5C7.25 4.59 7.59 4.25 8 4.25C8.41 4.25 8.75 4.59 8.75 5V7.25H11C11.41 7.25 11.75 7.59 11.75 8Z"/></svg>',"file-72x72":'<svg viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"><path d="M62.83 12.83L53.17 3.17C52.7982 2.79866 52.357 2.50421 51.8714 2.30346C51.3858 2.1027 50.8654 1.99959 50.34 2H14C12.4087 2 10.8826 2.63214 9.75735 3.75736C8.63214 4.88258 8 6.4087 8 8V64C8 65.5913 8.63214 67.1174 9.75735 68.2426C10.8826 69.3679 12.4087 70 14 70H58C59.5913 70 61.1174 69.3679 62.2426 68.2426C63.3679 67.1174 64 65.5913 64 64V15.66C64.0004 15.1346 63.8973 14.6142 63.6965 14.1286C63.4958 13.643 63.2013 13.2018 62.83 12.83ZM52 4.83L61.17 14H56C54.9391 14 53.9217 13.5786 53.1716 12.8284C52.4214 12.0783 52 11.0609 52 10V4.83ZM62 64C62 65.0609 61.5786 66.0783 60.8284 66.8284C60.0783 67.5786 59.0609 68 58 68H14C12.9391 68 11.9217 67.5786 11.1716 66.8284C10.4214 66.0783 10 65.0609 10 64V8C10 6.93914 10.4214 5.92172 11.1716 5.17157C11.9217 4.42143 12.9391 4 14 4H50V10C50 11.5913 50.6321 13.1174 51.7574 14.2426C52.8826 15.3679 54.4087 16 56 16H62V64ZM22 26H50V28H22V26ZM22 32H50V34H22V32ZM22 38H50V40H22V38ZM22 44H50V46H22V44Z"/></svg>',"flip-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M14.53 17.4775C14.82 17.7675 14.82 18.2475 14.53 18.5375L11.53 21.5375C11.38 21.6875 11.19 21.7575 11 21.7575C10.81 21.7575 10.62 21.6875 10.47 21.5375C10.18 21.2475 10.18 20.7675 10.47 20.4775L12.2 18.7475C12.13 18.7475 12.07 18.7475 12 18.7475C6.62 18.7475 2.25 15.7475 2.25 12.0575C2.25 10.2975 3.22 8.6375 4.99 7.3875C5.33 7.1475 5.8 7.2275 6.03 7.5675C6.27 7.9075 6.19 8.3775 5.85 8.6075C4.49 9.5675 3.74 10.7875 3.74 12.0575C3.74 14.9175 7.44 17.2475 11.99 17.2475C12.05 17.2475 12.11 17.2475 12.17 17.2475L10.46 15.5375C10.17 15.2475 10.17 14.7675 10.46 14.4775C10.75 14.1875 11.23 14.1875 11.52 14.4775L14.52 17.4775H14.53ZM12 5.2575C11.93 5.2575 11.87 5.2575 11.8 5.2575L13.53 3.5275C13.82 3.2375 13.82 2.7575 13.53 2.4675C13.24 2.1775 12.76 2.1775 12.47 2.4675L9.47 5.4675C9.18 5.7575 9.18 6.2375 9.47 6.5275L12.47 9.5275C12.62 9.6775 12.81 9.7475 13 9.7475C13.19 9.7475 13.38 9.6775 13.53 9.5275C13.82 9.2375 13.82 8.7575 13.53 8.4675L11.82 6.7575C11.88 6.7575 11.94 6.7575 12 6.7575C16.55 6.7575 20.25 9.0875 20.25 11.9475C20.25 13.2075 19.5 14.4375 18.14 15.3975C17.8 15.6375 17.72 16.1075 17.96 16.4475C18.11 16.6575 18.34 16.7675 18.57 16.7675C18.72 16.7675 18.87 16.7275 19 16.6275C20.77 15.3775 21.75 13.7175 21.75 11.9575C21.75 8.2675 17.38 5.2675 12 5.2675V5.2575Z"/></svg>',"folder-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.72 9.24C21.45 8.92 21.12 8.67 20.75 8.5V8C20.75 6.48 19.52 5.25 18 5.25H10.65C10.32 4.1 9.26 3.25 8 3.25H6C4.48 3.25 3.25 4.48 3.25 6V18C3.25 19.52 4.48 20.75 6 20.75H18.33C19.66 20.75 20.8 19.8 21.04 18.49L22.31 11.49C22.46 10.69 22.24 9.86 21.72 9.24ZM4.75 18V6C4.75 5.31 5.31 4.75 6 4.75H8C8.69 4.75 9.25 5.31 9.25 6C9.25 6.41 9.59 6.75 10 6.75H18C18.69 6.75 19.25 7.31 19.25 8V8.25H9.27C7.94 8.25 6.8 9.2 6.56 10.51L5.29 17.51C5.19 18.07 5.27 18.64 5.51 19.15C5.06 18.96 4.75 18.52 4.75 18ZM20.83 11.22L19.56 18.22C19.45 18.81 18.94 19.25 18.33 19.25H8C7.63 19.25 7.28 19.09 7.04 18.8C6.8 18.51 6.7 18.14 6.77 17.78L8.04 10.78C8.15 10.19 8.66 9.75 9.27 9.75H19.6C19.97 9.75 20.32 9.91 20.56 10.2C20.8 10.49 20.9 10.86 20.83 11.22Z"/></svg>',"fullsize-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M12 3.25H4C3.04 3.25 2.25 4.04 2.25 5V11C2.25 11.96 3.04 12.75 4 12.75H12C12.96 12.75 13.75 11.96 13.75 11V5C13.75 4.04 12.96 3.25 12 3.25ZM12.25 11C12.25 11.14 12.14 11.25 12 11.25H4C3.86 11.25 3.75 11.14 3.75 11V5C3.75 4.86 3.86 4.75 4 4.75H12C12.14 4.75 12.25 4.86 12.25 5V11Z"/></svg>',
10"image-48x48":'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M33 10.25H15C12.38 10.25 10.25 12.38 10.25 15V33C10.25 35.62 12.38 37.75 15 37.75H33C35.62 37.75 37.75 35.62 37.75 33V15C37.75 12.38 35.62 10.25 33 10.25ZM36.25 33C36.25 34.79 34.79 36.25 33 36.25H15C13.21 36.25 11.75 34.79 11.75 33V15C11.75 13.21 13.21 11.75 15 11.75H33C34.79 11.75 36.25 13.21 36.25 15V33ZM30.5 14.25C28.71 14.25 27.25 15.71 27.25 17.5C27.25 19.29 28.71 20.75 30.5 20.75C32.29 20.75 33.75 19.29 33.75 17.5C33.75 15.71 32.29 14.25 30.5 14.25ZM30.5 19.25C29.54 19.25 28.75 18.46 28.75 17.5C28.75 16.54 29.54 15.75 30.5 15.75C31.46 15.75 32.25 16.54 32.25 17.5C32.25 18.46 31.46 19.25 30.5 19.25ZM29.26 26.28C28.94 25.92 28.49 25.71 28.01 25.7C27.54 25.68 27.07 25.87 26.73 26.2L24.95 27.94L22.28 25.23C21.94 24.89 21.5 24.71 21 24.71C20.52 24.71 20.06 24.93 19.74 25.28L14.74 30.78C14.25 31.3 14.12 32.06 14.41 32.72C14.69 33.36 15.28 33.75 15.95 33.75H32.07C32.74 33.75 33.33 33.35 33.61 32.72C33.89 32.06 33.77 31.31 33.29 30.79L29.27 26.29L29.26 26.28ZM32.22 32.12C32.18 32.2 32.13 32.25 32.06 32.25H15.94C15.87 32.25 15.81 32.21 15.78 32.12C15.77 32.09 15.71 31.93 15.83 31.8L20.84 26.29C20.9 26.22 20.99 26.21 21.02 26.21C21.06 26.21 21.14 26.22 21.2 26.29L24.4 29.54C24.69 29.83 25.16 29.84 25.46 29.54L27.77 27.27C27.83 27.21 27.9 27.2 27.94 27.2C28.01 27.2 28.06 27.21 28.13 27.28L32.16 31.79C32.16 31.79 32.16 31.79 32.17 31.8C32.29 31.93 32.23 32.09 32.22 32.12Z"/></svg>',"loading-48x48":'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_19679_369428)"><path opacity="0.1" d="M24 40C15.18 40 8 32.82 8 24C8 15.18 15.18 8 24 8C32.82 8 40 15.18 40 24C40 32.82 32.82 40 24 40ZM24 12C17.38 12 12 17.38 12 24C12 30.62 17.38 36 24 36C30.62 36 36 30.62 36 24C36 17.38 30.62 12 24 12Z" fill="black" fill-opacity="0.91"/><path d="M10 26C8.9 26 8 25.1 8 24C8 15.18 15.18 8 24 8C25.1 8 26 8.9 26 10C26 11.1 25.1 12 24 12C17.38 12 12 17.38 12 24C12 25.1 11.1 26 10 26Z"/></g><defs><clipPath id="clip0_19679_369428"><rect width="32" height="32" fill="white" transform="translate(8 8)"/></clipPath></defs></svg>',"maximize-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13.75 3V7C13.75 7.41 13.41 7.75 13 7.75C12.59 7.75 12.25 7.41 12.25 7V4.81L9.53 7.53C9.38 7.68 9.19 7.75 9 7.75C8.81 7.75 8.62 7.68 8.47 7.53C8.18 7.24 8.18 6.76 8.47 6.47L11.19 3.75H9C8.59 3.75 8.25 3.41 8.25 3C8.25 2.59 8.59 2.25 9 2.25H13C13.1 2.25 13.19 2.27 13.29 2.31C13.47 2.39 13.62 2.53 13.7 2.72C13.74 2.81 13.76 2.91 13.76 3.01L13.75 3ZM7.53 8.47C7.24 8.18 6.76 8.18 6.47 8.47L3.75 11.19V9C3.75 8.59 3.41 8.25 3 8.25C2.59 8.25 2.25 8.59 2.25 9V13C2.25 13.1 2.27 13.19 2.31 13.29C2.39 13.47 2.53 13.62 2.72 13.7C2.81 13.74 2.91 13.76 3.01 13.76H7.01C7.42 13.76 7.76 13.42 7.76 13.01C7.76 12.6 7.42 12.26 7.01 12.26H4.82L7.54 9.54C7.83 9.25 7.83 8.77 7.54 8.48L7.53 8.47Z"/></svg>',"minimize-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13.75 8C13.75 8.41 13.41 8.75 13 8.75H3C2.59 8.75 2.25 8.41 2.25 8C2.25 7.59 2.59 7.25 3 7.25H13C13.41 7.25 13.75 7.59 13.75 8Z"/></svg>',"more-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 10.25C11.04 10.25 10.25 11.04 10.25 12C10.25 12.96 11.04 13.75 12 13.75C12.96 13.75 13.75 12.96 13.75 12C13.75 11.04 12.96 10.25 12 10.25ZM11.75 12C11.75 11.86 11.86 11.75 12 11.75C12.14 11.75 12.25 11.86 12.25 12C12.25 12.28 11.75 12.28 11.75 12ZM19 10.25C18.04 10.25 17.25 11.04 17.25 12C17.25 12.96 18.04 13.75 19 13.75C19.96 13.75 20.75 12.96 20.75 12C20.75 11.04 19.96 10.25 19 10.25ZM18.75 12C18.75 11.86 18.86 11.75 19 11.75C19.14 11.75 19.25 11.86 19.25 12C19.25 12.28 18.75 12.28 18.75 12ZM5 10.25C4.04 10.25 3.25 11.04 3.25 12C3.25 12.96 4.04 13.75 5 13.75C5.96 13.75 6.75 12.96 6.75 12C6.75 11.04 5.96 10.25 5 10.25ZM4.75 12C4.75 11.86 4.86 11.75 5 11.75C5.14 11.75 5.25 11.86 5.25 12C5.25 12.28 4.75 12.28 4.75 12Z"/></svg>',"navmenu-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3.25 7C3.25 6.59 3.59 6.25 4 6.25H15C15.41 6.25 15.75 6.59 15.75 7C15.75 7.41 15.41 7.75 15 7.75H4C3.59 7.75 3.25 7.41 3.25 7ZM20 11.25H4C3.59 11.25 3.25 11.59 3.25 12C3.25 12.41 3.59 12.75 4 12.75H20C20.41 12.75 20.75 12.41 20.75 12C20.75 11.59 20.41 11.25 20 11.25ZM9 16.25H4C3.59 16.25 3.25 16.59 3.25 17C3.25 17.41 3.59 17.75 4 17.75H9C9.41 17.75 9.75 17.41 9.75 17C9.75 16.59 9.41 16.25 9 16.25Z"/></svg>',"noimage-48x48":'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M30.4975 14.2475C28.7075 14.2475 27.2475 15.7075 27.2475 17.4975C27.2475 19.2875 28.7075 20.7475 30.4975 20.7475C32.2875 20.7475 33.7475 19.2875 33.7475 17.4975C33.7475 15.7075 32.2875 14.2475 30.4975 14.2475ZM30.4975 19.2475C29.5375 19.2475 28.7475 18.4575 28.7475 17.4975C28.7475 16.5375 29.5375 15.7475 30.4975 15.7475C31.4575 15.7475 32.2475 16.5375 32.2475 17.4975C32.2475 18.4575 31.4575 19.2475 30.4975 19.2475ZM13.5175 11.2175C13.4375 10.8075 13.7075 10.4175 14.1175 10.3375C14.4275 10.2775 14.7175 10.2475 14.9975 10.2475H32.9975C35.6175 10.2475 37.7475 12.3775 37.7475 14.9975V32.9975C37.7475 33.2775 37.7175 33.5675 37.6575 33.8775C37.5875 34.2375 37.2775 34.4875 36.9175 34.4875C36.8675 34.4875 36.8275 34.4875 36.7775 34.4775C36.3675 34.3975 36.1075 34.0075 36.1775 33.5975C36.2175 33.3775 36.2375 33.1775 36.2375 32.9975V14.9975C36.2375 13.2075 34.7775 11.7475 32.9875 11.7475H14.9975C14.8075 11.7475 14.6175 11.7675 14.3975 11.8075C13.9875 11.8875 13.5975 11.6175 13.5175 11.2075V11.2175ZM34.4775 36.7775C34.5575 37.1875 34.2875 37.5775 33.8775 37.6575C33.5675 37.7175 33.2775 37.7475 32.9975 37.7475H14.9975C12.3775 37.7475 10.2475 35.6175 10.2475 32.9975V14.9975C10.2475 14.7175 10.2775 14.4275 10.3375 14.1175C10.4175 13.7075 10.8075 13.4375 11.2175 13.5175C11.6275 13.5975 11.8875 13.9875 11.8175 14.3975C11.7775 14.6175 11.7575 14.8175 11.7575 14.9975V32.9975C11.7575 34.7875 13.2175 36.2475 15.0075 36.2475H33.0075C33.1975 36.2475 33.3875 36.2275 33.6075 36.1875C34.0075 36.1075 34.4075 36.3775 34.4875 36.7875L34.4775 36.7775ZM15.8275 31.7975C15.6975 31.9375 15.7575 32.0875 15.7775 32.1175C15.8175 32.1975 15.8675 32.2475 15.9375 32.2475H29.8175C30.2275 32.2475 30.5675 32.5875 30.5675 32.9975C30.5675 33.4075 30.2275 33.7475 29.8175 33.7475H15.9375C15.2675 33.7475 14.6775 33.3475 14.3975 32.7175C14.1075 32.0575 14.2375 31.2975 14.7275 30.7775L19.7275 25.2775C20.0475 24.9275 20.5075 24.7175 20.9875 24.7075C21.4875 24.7275 21.9375 24.8875 22.2675 25.2275L25.4675 28.4775C25.7575 28.7675 25.7575 29.2475 25.4675 29.5375C25.1675 29.8275 24.6975 29.8275 24.4075 29.5375L21.2075 26.2875C21.1475 26.2175 21.0675 26.1875 21.0275 26.2075C20.9875 26.2075 20.9075 26.2175 20.8475 26.2875L15.8375 31.7975H15.8275ZM38.5275 38.5275C38.3775 38.6775 38.1875 38.7475 37.9975 38.7475C37.8075 38.7475 37.6175 38.6775 37.4675 38.5275L9.4675 10.5275C9.1775 10.2375 9.1775 9.7575 9.4675 9.4675C9.7575 9.1775 10.2375 9.1775 10.5275 9.4675L38.5275 37.4675C38.8175 37.7575 38.8175 38.2375 38.5275 38.5275Z
vendor: 15,938 bytes, line 10
10"/></svg>',"ranking-arrows":'<svg viewBox="0 0 10 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 5L5 0L0 5H4V9H6V5H10Z"/><path d="M6 19V15H4V19H0L5 24L10 19H6Z"/></svg>',"rankingundefined-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11.75 8C11.75 8.41 11.41 8.75 11 8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H11C11.41 7.25 11.75 7.59 11.75 8Z"/></svg>',"rating-star-2":'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M24 39.5057L11.7226 45.9839C10.4095 46.6739 8.87606 45.5622 9.12525 44.096L11.4734 30.373L1.54411 20.6556C0.480254 19.6207 1.06489 17.8095 2.53128 17.5986L16.2559 15.5957L22.3994 3.10891C23.0512 1.77685 24.9488 1.77685 25.6102 3.10891L31.7441 15.5957L45.4687 17.5986C46.9351 17.8095 47.5197 19.6207 46.4559 20.6556L36.5266 30.373L38.8748 44.096C39.1239 45.5622 37.5905 46.6835 36.2774 45.9839L24 39.5057Z" fill="none" stroke-width="2"/><path d="M24.3981 33.1305L24 32.9206L23.6019 33.1305L15.8715 37.2059L17.3542 28.5663L17.43 28.1246L17.1095 27.8113L10.83 21.6746L19.4965 20.4049L19.9405 20.3399L20.1387 19.9373L24 12.0936L27.8613 19.9373L28.0595 20.3399L28.5035 20.4049L37.17 21.6746L30.8905 27.8113L30.57 28.1246L30.6458 28.5663L32.1285 37.2059L24.3981 33.1305Z" stroke-width="1.70746"/></svg>',"rating-star-small-2":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 19.3373L6.13001 22.4373C5.50001 22.7673 4.77001 22.2373 4.89001 21.5373L6.01001 14.9773L1.26001 10.3273C0.750007 9.83728 1.03001 8.96728 1.73001 8.86728L8.29001 7.90728L11.23 1.93728C11.54 1.29728 12.45 1.29728 12.77 1.93728L15.7 7.90728L22.26 8.86728C22.96 8.96728 23.24 9.83728 22.73 10.3273L17.98 14.9773L19.1 21.5373C19.22 22.2373 18.49 22.7773 17.86 22.4373L11.99 19.3373H12Z" fill="none" stroke-width="2"/><path d="M12 15.9472L8.58001 17.7572L9.23001 13.9272L6.45001 11.2072L10.29 10.6472L12 7.17725L13.71 10.6472L17.55 11.2072L14.77 13.9272L15.42 17.7572L12 15.9472Z"/></svg>',"rating-star-small":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g><path d="M12 19.3373L6.13001 22.4373C5.50001 22.7673 4.77001 22.2373 4.89001 21.5373L6.01001 14.9773L1.26001 10.3273C0.750007 9.83728 1.03001 8.96728 1.73001 8.86728L8.29001 7.90728L11.23 1.93728C11.54 1.29728 12.45 1.29728 12.77 1.93728L15.7 7.90728L22.26 8.86728C22.96 8.96728 23.24 9.83728 22.73 10.3273L17.98 14.9773L19.1 21.5373C19.22 22.2373 18.49 22.7773 17.86 22.4373L11.99 19.3373H12Z"/></g></svg>',"rating-star":'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g><path d="M24 39.5057L11.7226 45.9839C10.4095 46.6739 8.87606 45.5622 9.12525 44.096L11.4734 30.373L1.54411 20.6556C0.480254 19.6207 1.06489 17.8095 2.53128 17.5986L16.2559 15.5957L22.3994 3.10891C23.0512 1.77685 24.9488 1.77685 25.6102 3.10891L31.7441 15.5957L45.4687 17.5986C46.9351 17.8095 47.5197 19.6207 46.4559 20.6556L36.5266 30.373L38.8748 44.096C39.1239 45.5622 37.5905 46.6835 36.2774 45.9839L24 39.5057Z"/></g></svg>',"reorder-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M8.9444 10.75H15.0544C15.7144 10.75 16.3144 10.39 16.6144 9.80002C16.9144 9.22002 16.8644 8.52002 16.4844 7.98002L13.4244 3.71002C12.7644 2.79002 11.2344 2.79002 10.5744 3.71002L7.5244 7.99002C7.1444 8.53002 7.0944 9.22002 7.3944 9.81002C7.6944 10.4 8.2944 10.76 8.9544 10.76L8.9444 10.75ZM8.7444 8.86002L11.7944 4.58002C11.8644 4.49002 11.9544 4.48002 11.9944 4.48002C12.0344 4.48002 12.1344 4.49002 12.1944 4.58002L15.2544 8.86002C15.3344 8.97002 15.3044 9.07002 15.2744 9.12002C15.2444 9.17002 15.1844 9.26002 15.0544 9.26002H8.9444C8.8144 9.26002 8.7444 9.18002 8.7244 9.12002C8.7044 9.06002 8.6644 8.97002 8.7444 8.86002ZM15.0544 13.25H8.9444C8.2844 13.25 7.6844 13.61 7.3844 14.2C7.0844 14.78 7.1344 15.48 7.5144 16.02L10.5744 20.3C10.9044 20.76 11.4344 21.03 11.9944 21.03C12.5544 21.03 13.0944 20.76 13.4144 20.3L16.4744 16.02C16.8544 15.48 16.9044 14.79 16.6044 14.2C16.3044 13.61 15.7044 13.25 15.0444 13.25H15.0544ZM15.2644 15.15L12.2044 19.43C12.0744 19.61 11.9244 19.61 11.7944 19.43L8.7344 15.15C8.6544 15.04 8.6844 14.94 8.7144 14.89C8.7444 14.84 8.8044 14.75 8.9344 14.75H15.0444C15.1744 14.75 15.2444 14.83 15.2644 14.89C15.2844 14.95 15.3244 15.04 15.2444 15.15H15.2644Z"/></svg>',"restoredown-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M7.69 8.71C7.73 8.8 7.75 8.9 7.75 9V13C7.75 13.41 7.41 13.75 7 13.75C6.59 13.75 6.25 13.41 6.25 13V10.81L3.53 13.53C3.38 13.68 3.19 13.75 3 13.75C2.81 13.75 2.62 13.68 2.47 13.53C2.18 13.24 2.18 12.76 2.47 12.47L5.19 9.75H3C2.59 9.75 2.25 9.41 2.25 9C2.25 8.59 2.59 8.25 3 8.25H7C7.1 8.25 7.19 8.27 7.29 8.31C7.47 8.39 7.62 8.53 7.7 8.72L7.69 8.71ZM13 6.25H10.81L13.53 3.53C13.82 3.24 13.82 2.76 13.53 2.47C13.24 2.18 12.76 2.18 12.47 2.47L9.75 5.19V3C9.75 2.59 9.41 2.25 9 2.25C8.59 2.25 8.25 2.59 8.25 3V7C8.25 7.1 8.27 7.19 8.31 7.29C8.39 7.47 8.53 7.62 8.72 7.7C8.81 7.74 8.91 7.76 9.01 7.76H13.01C13.42 7.76 13.76 7.42 13.76 7.01C13.76 6.6 13.42 6.26 13.01 6.26L13 6.25Z"/></svg>',"search-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13.9975 2.25C9.7275 2.25 6.2475 5.73 6.2475 10C6.2475 11.87 6.9075 13.58 8.0175 14.92L2.4675 20.47C2.1775 20.76 2.1775 21.24 2.4675 21.53C2.6175 21.68 2.8075 21.75 2.9975 21.75C3.1875 21.75 3.3775 21.68 3.5275 21.53L9.0775 15.98C10.4175 17.08 12.1275 17.75 13.9975 17.75C18.2675 17.75 21.7475 14.27 21.7475 10C21.7475 5.73 18.2675 2.25 13.9975 2.25ZM13.9975 16.25C10.5475 16.25 7.7475 13.45 7.7475 10C7.7475 6.55 10.5475 3.75 13.9975 3.75C17.4475 3.75 20.2475 6.55 20.2475 10C20.2475 13.45 17.4475 16.25 13.9975 16.25Z"/></svg>',"smiley-rate1-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 4.9938C4 4.44362 4.45 3.99348 5 3.99348H6.59L5.3 2.70306C4.91 2.31293 4.91 1.68272 5.3 1.2926C5.69 0.902468 6.32 0.902468 6.71 1.2926L9.71 4.29357C9.8 4.3836 9.88 4.49364 9.93 4.62368C10.03 4.86376 10.03 5.14385 9.93 5.38393C9.88 5.50397 9.81 5.614 9.71 5.71404L6.71 8.71501C6.51 8.91508 6.26 9.00511 6 9.00511C5.74 9.00511 5.49 8.90508 5.29 8.71501C4.9 8.32489 4.9 7.69468 5.29 7.30456L6.58 6.01413H4.99C4.44 6.01413 3.99 5.56399 3.99 5.01381L4 4.9938ZM14.08 5.37393C14.13 5.49397 14.2 5.604 14.3 5.70403L17.3 8.70501C17.5 8.90508 17.75 8.99511 18.01 8.99511C18.27 8.99511 18.52 8.89507 18.72 8.70501C19.11 8.31488 19.11 7.68468 18.72 7.29455L17.43 6.00413H19.02C19.57 6.00413 20.02 5.55399 20.02 5.00381C20.02 4.45363 19.57 4.00348 19.02 4.00348H17.43L18.72 2.71306C19.11 2.32293 19.11 1.69273 18.72 1.3026C18.33 0.912471 17.7 0.912471 17.31 1.3026L14.31 4.30358C14.22 4.39361 14.14 4.50364 14.09 4.63368C13.99 4.87376 13.99 5.15385 14.09 5.39393L14.08 5.37393ZM22 14.9971V20.999C22 22.6496 20.65 24 19 24H5C3.35 24 2 22.6496 2 20.999V14.9971C2 13.3465 3.35 11.9961 5 11.9961H19C20.65 11.9961 22 13.3465 22 14.9971ZM19 13.9967H16V16.9977H20V14.9971C20 14.4469 19.55 13.9967 19 13.9967ZM14 16.9977V13.9967H10V16.9977H14ZM10 18.9984V21.9993H14V18.9984H10ZM4 14.9971V16.9977H8V13.9967H5C4.45 13.9967 4 14.4469 4 14.9971ZM5 21.9993H8V18.9984H4V20.999C4 21.5492 4.45 21.9993 5 21.9993ZM20 20.999V18.9984H16V21.9993H19C19.55 21.9993 20 21.5492 20 20.999Z"/></svg>',"smiley-rate10-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.01 23C6.85721 23 1.15412 19.9621 0.0134987 13.1669C-0.0765501 12.6272 0.293651 12.1076 0.833944 12.0177C1.38424 11.9277 1.89452 12.2975 1.98457 12.8371C2.92508 18.4732 7.69767 20.9914 12 20.9914C16.3023 20.9914 21.0749 18.4732 22.0154 12.8371C22.1055 12.2975 22.6158 11.9277 23.1661 12.0177C23.7063 12.1076 24.0765 12.6272 23.9865 13.1669C22.8559 19.9521 17.1428 23 11.99 23H12.01ZM21.165 6.15177C22.3056 5.01257 22.3056 3.16386 21.165 2.02465L21.0049 1.85477C19.9143 0.765533 18.1633 0.725561 17.0227 1.71487C15.8821 0.715568 14.1312 0.765533 13.0406 1.85477L12.8705 2.01466C11.7299 3.15386 11.7299 5.00257 12.8705 6.14178L17.0227 10.2889L21.175 6.14178L21.165 6.15177ZM15.742 3.27378L17.0127 4.54289L18.2834 3.27378C18.6436 2.91403 19.2239 2.91403 19.5841 3.27378L19.7442 3.43367C20.1044 3.79342 20.1044 4.37301 19.7442 4.73276L17.0127 7.46086L14.2812 4.73276C13.921 4.37301 13.921 3.79342 14.2812 3.43367L14.4413 3.27378C14.6214 3.09391 14.8515 3.00397 15.0917 3.00397C15.3318 3.00397 15.5619 3.09391 15.742 3.27378ZM11.1595 6.15177C12.3002 5.01257 12.3002 3.16386 11.1595 2.02465L10.9995 1.85477C9.90886 0.765533 8.15792 0.725561 7.0173 1.71487C5.87668 0.715568 4.12573 0.765533 3.03514 1.85477L2.86505 2.01466C1.72443 3.15386 1.72443 5.00257 2.86505 6.14178L7.0173 10.2889L11.1695 6.14178L11.1595 6.15177ZM5.7366 3.27378L7.00729 4.54289L8.27798 3.27378C8.63818 2.91403 9.21849 2.91403 9.57869 3.27378L9.73877 3.43367C10.099 3.79342 10.099 4.37301 9.73877 4.73276L7.00729 7.46086L4.27581 4.73276C3.91562 4.37301 3.91562 3.79342 4.27581 3.43367L4.4359 3.27378C4.61599 3.09391 4.84612 3.00397 5.08625 3.00397C5.32638 3.00397 5.5565 3.09391 5.7366 3.27378Z"/></svg>',"smiley-rate2-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_15894_140103)"><path d="M4.88291 4.51001C4.47291 4.51001 4.08291 4.25001 3.94291 3.84001C3.76291 3.32001 4.03291 2.75001 4.55291 2.57001L8.32291 1.25001C8.84291 1.06001 9.41291 1.34001 9.59291 1.86001C9.77291 2.38001 9.50291 2.95001 8.98291 3.13001L5.20291 4.45001C5.09291 4.49001 4.98291 4.51001 4.87291 4.51001H4.88291ZM19.8129 3.89001C20.0229 3.38001 19.7729 2.79001 19.2629 2.59001L15.5529 1.07001C15.0429 0.860007 14.4529 1.11001 14.2529 1.62001C14.0429 2.13001 14.2929 2.72001 14.8029 2.92001L18.5029 4.43001C18.6229 4.48001 18.7529 4.50001 18.8829 4.50001C19.2729 4.50001 19.6529 4.27001 19.8129 3.88001V3.89001ZM3.50291 6.00001C2.64291 6.37001 1.79291 6.88001 1.00291 7.48001C0.79291 7.64001 0.64291 7.87001 0.59291 8.14001C0.48291 8.73001 0.87291 9.29001 1.45291 9.40001C2.04291 9.51001 2.60291 9.12001 2.71291 8.54001C2.87291 7.69001 3.12291 6.83001 3.50291 5.99001V6.00001ZM21.0429 8.55001C21.6029 10.48 24.2429 8.84001 22.7529 7.48001C21.9629 6.88001 21.1129 6.37001 20.2529 6.00001C20.6329 6.84001 20.8829 7.70001 21.0429 8.55001ZM21.5729 13.2C21.2529 14.2 22.5429 15.09 23.3629 14.39C23.8529 14 23.9229 13.29 23.5429 12.81C21.7429 10.67 22.1329 10.55 21.5829 13.2H21.5729ZM1.75291 11C1.22291 11.79 -0.14709 12.64 0.0129102 13.75C0.15291 14.36 0.75291 14.74 1.35291 14.6C2.98291 14.1 1.80291 12.22 1.75291 11ZM19.8829 17C19.8829 13.14 16.2929 10 11.8829 10C7.47291 10 3.88291 13.14 3.88291 17C3.88291 20.86 7.47291 24 11.8829 24C16.2929 24 19.8829 20.86 19.8829 17ZM17.8829 17C17.8829 19.76 15.1929 22 11.8829 22C8.57291 22 5.88291 19.76 5.88291 17C5.88291 14.24 8.57291 12 11.8829 12C15.1929 12 17.8829 14.24 17.8829 17Z"/></g><defs><clipPath id="clip0_15894_140103"><rect width="24" height="24" fill="white"/></clipPath></defs></svg>',"smiley-rate3-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.01915 7C6.46961 7 6.01998 6.55 6.01998 6V2C6.01998 1.45 6.46961 1 7.01915 1C7.56869 1 8.01832 1.45 8.01832 2V6C8.01832 6.55 7.56869 7 7.01915 7ZM18.01 6V2C18.01 1.45 17.5604 1 17.0108 1C16.4613 1 16.0117 1.45 16.0117 2V6C16.0117 6.55 16.4613 7 17.0108 7C17.5604 7 18.01 6.55 18.01 6ZM16.4213 21.58L18.01 19.99L19.2989 21.28C19.6886 21.67 20.3181 21.67 20.7077 21.28C21.0974 20.89 21.0974 20.26 20.7077 19.87L19.4188 18.58C18.6395 17.8 17.3705 17.8 16.5912 18.58L15.0025 20.17L13.4138 18.58C12.6345 17.8 11.3655 17.8 10.5862 18.58L8.9975 20.17L7.40883 18.58C6.62948 17.8 5.36053 17.8 4.58118 18.58L3.29226 19.87C2.90258 20.26 2.90258 20.89 3.29226 21.28C3.68193 21.67 4.31141 21.67 4.70108 21.28L5.99001 19.99L7.57868 21.58C8.35803 22.36 9.62698 22.36 10.4063 21.58L11.995 19.99L13.5837 21.58C13.9734 21.97 14.4829 22.16 14.9925 22.16C15.5021 22.16 16.0117 21.97 16.4013 21.58H16.4213Z"/></svg>',"smiley-rate4-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.06927 7C6.51927 7 6.06927 6.55 6.06927 6V2C6.06927 1.45 6.51927 1 7.06927 1C7.61927 1 8.06927 1.45 8.06927 2V6C8.06927 6.55 7.61927 7 7.06927 7ZM18.0693 6V2C18.0693 1.45 17.6193 1 17.0693 1C16.5193 1 16.0693 1.45 16.0693 2V6C16.0693 6.55 16.5193 7 17.0693 7C17.6193 7 18.0693 6.55 18.0693 6ZM22.5693 21.9C23.0693 21.66 23.2793 21.07 23.0393 20.57C21.1093 16.52 16.9093 14 12.0693 14C7.22927 14 3.02927 16.52 1.09927 20.57C0.859273 21.07 1.06927 21.67 1.56927 21.9C2.06927 22.14 2.65927 21.93 2.89927 21.43C4.49927 18.08 8.00927 16 12.0593 16C16.1093 16 19.6293 18.08 21.2193 21.43C21.3893 21.79 21.7493 22 22.1193 22C22.2593 22 22.4093 21.97 22.5493 21.9H22.5693Z"/></svg>',"smiley-rate5-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.00572 7C6.45572 7 6.00572 6.55 6.00572 6V2C6.00572 1.45 6.45572 1 7.00572 1C7.55572 1 8.00572 1.45 8.00572 2V6C8.00572 6.55 7.55572 7 7.00572 7ZM18.0057 6V2C18.0057 1.45 17.5557 1 17.0057 1C16.4557 1 16.0057 1.45 16.0057 2V6C16.0057 6.55 16.4557 7 17.0057 7C17.5557 7 18.0057 6.55 18.0057 6ZM19.9457 21.33C20.1257 20.81 19.8557 20.24 19.3357 20.05C14.5457 18.35 9.45572 18.35 4.66572 20.05C4.14572 20.23 3.87572 20.81 4.05572 21.33C4.23572 21.85 4.80572 22.12 5.33572 21.94C9.69572 20.4 14.3057 20.4 18.6657 21.94C18.7757 21.98 18.8857 22 18.9957 22C19.4057 22 19.7957 21.74 19.9357 21.33H19.9457Z"/></svg>',"smiley-rate6-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 7C6.45 7 6 6.55 6 6V2C6 1.45 6.45 1 7 1C7.55 1 8 1.45 8 2V6C8 6.55 7.55 7 7 7ZM18 6V2C18 1.45 17.55 1 17 1C16.45 1 16 1.45 16 2V6C16 6.55 16.45 7 17 7C17.55 7 18 6.55 18 6ZM21 21C21 20.45 20.55 20 20 20H4C3.45 20 3 20.45 3 21C3 21.55 3.45 22 4 22H20C20.55 22 21 21.55 21 21Z"/></svg>',"smiley-rate7-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.0022 23.99C11.452 23.99 11.0018 23.5402 11.0018 22.9904C11.0018 22.4407 11.452 21.9909 12.0022 21.9909C16.3137 21.9909 21.0755 19.472 22.0158 13.8344C22.1058 13.2947 22.616 12.9248 23.1662 13.0148C23.7064 13.1047 24.0765 13.6245 23.9865 14.1643C22.8561 20.9513 17.144 24 11.9922 24L12.0022 23.99ZM8.00072 5.99783V1.99957C8.00072 1.4498 7.55056 1 7.00036 1C6.45016 1 6 1.4498 6 1.99957V5.99783C6 6.54759 6.45016 6.99739 7.00036 6.99739C7.55056 6.99739 8.00072 6.54759 8.00072 5.99783ZM18.0043 5.99783V1.99957C18.0043 1.4498 17.5542 1 17.004 1C16.4538 1 16.0036 1.4498 16.0036 1.99957V5.99783C16.0036 6.54759 16.4538 6.99739 17.004 6.99739C17.5542 6.99739 18.0043 6.54759 18.0043 5.99783Z"/></svg>',"smiley-rate8-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.01 24C6.85721 24 1.15412 20.96 0.0134987 14.16C-0.0765501 13.62 0.293651 13.1 0.833944 13.01C1.38424 12.92 1.89452 13.29 1.98457 13.83C2.92508 19.47 7.69767 21.99 12 21.99C16.3023 21.99 21.0749 19.47 22.0154 13.83C22.1055 13.29 22.6158 12.92 23.1661 13.01C23.7063 13.1 24.0765 13.62 23.9865 14.16C22.8559 20.95 17.1428 24 11.99 24H12.01ZM8.00783 6V2C8.00783 1.45 7.55759 1 7.00729 1C6.45699 1 6.00675 1.45 6.00675 2V6C6.00675 6.55 6.45699 7 7.00729 7C7.55759 7 8.00783 6.55 8.00783 6ZM18.0133 6V2C18.0133 1.45 17.563 1 17.0127 1C16.4624 1 16.0122 1.45 16.0122 2V6C16.0122 6.55 16.4624 7 17.0127 7C17.563 7 18.0133 6.55 18.0133 6Z"/></svg>',"smiley-rate9-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.01 24C6.85767 24 1.15509 20.96 0.0145752 14.16C-0.0354475 13.87 0.0445888 13.57 0.234675 13.35C0.424761 13.13 0.704888 13 0.995019 13H23.005C23.2951 13 23.5752 13.13 23.7653 13.35C23.9554 13.57 24.0354 13.87 23.9854 14.16C22.8549 20.95 17.1423 24 11.99 24H12.01ZM2.25559 15C3.61621 19.82 8.0182 22 12.01 22C16.0018 22 20.4038 19.82 21.7644 15H2.25559ZM8.00819 6V2C8.00819 1.45 7.55799 1 7.00774 1C6.45749 1 6.00729 1.45 6.00729 2V6C6.00729 6.55 6.45749 7 7.00774 7C7.55799 7 8.00819 6.55 8.00819 6ZM18.0127 6V2C18.0127 1.45 17.5625 1 17.0123 1C16.462 1 16.0118 1.45 16.0118 2V6C16.0118 6.55 16.462 7 17.0123 7C17.5625 7 18.0127 6.55 18.0127 6Z"/></svg>'};
10class rj extends rC.Component{constructor(e){super(e),this.rootRef=rC.createRef(),this.model=new n1,this.model.onInnerHeightChanged=e=>{this.props.onInnerHeightChanged&&this.props.onInnerHeightChanged(e)}}componentDidMount(){let e=this.rootRef.current;e&&this.model.setRootElement(e)}componentWillUnmount(){this.model.unsubscribeRootElement(),this.model.setRootElement(void 0)}render(){return this.props.disabled?rC.createElement(rC.Fragment,null,this.props.children):rC.createElement("div",{ref:this.rootRef,className:"sv-scroll__wrapper"},rC.createElement("div",{className:"sv-scroll__scroller sv-drag-target-skipped",onScroll:()=>this.model.onScrollContainer()},rC.createElement("div",{className:"sv-scroll__container"},this.props.children)),rC.createElement("div",{className:"sv-scroll__scrollbar",onScroll:()=>this.model.onScrollScrollbar()},rC.createElement("div",{className:"sv-scroll__scrollbar-sizer"})))}}rf.Instance.registerElement("svc-scroll",e=>rC.createElement(rj,e)),rv("v1",{modernbooleancheckchecked:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><polygon points="19,10 14,10 14,5 10,5 10,10 5,10 5,14 10,14 10,19 14,19 14,14 19,14 "/></svg>',modernbooleancheckind:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M22,0H2C0.9,0,0,0.9,0,2v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V2C24,0.9,23.1,0,22,0z M21,18L6,3h15V18z M3,6l15,15H3V6z"/></svg>',modernbooleancheckunchecked:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><rect x="5" y="10" width="14" height="4"/></svg>',moderncheck:'<svg viewBox="0 0 24 24"><path d="M5,13l2-2l3,3l7-7l2,2l-9,9L5,13z"/></svg>',modernradio:'<svg viewBox="-12 -12 24 24"><circle r="6" cx="0" cy="0"/></svg>',progressbutton:'<svg viewBox="0 0 10 10"><polygon points="2,2 0,4 5,9 10,4 8,2 5,5 "/></svg>',removefile:'<svg viewBox="0 0 16 16"><path d="M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z M11,10l-1,1L8,9l-2,2l-1-1l2-2L5,6l1-1l2,2l2-2l1,1L9,8 L11,10z"/></svg>',timercircle:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 160 160"><circle cx="80" cy="80" r="70" style="stroke:var(--sd-timer-stroke-background-color);stroke-width:var(--sd-timer-stroke-background-width)
vendor: 11,818 bytes, line 10
10" stroke-dasharray="none" stroke-dashoffset="none"/><circle cx="80" cy="80" r="70"/></svg>',"add-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 11H17V13H13V17H11V13H7V11H11V7H13V11ZM23 12C23 18.1 18.1 23 12 23C5.9 23 1 18.1 1 12C1 5.9 5.9 1 12 1C18.1 1 23 5.9 23 12ZM21 12C21 7 17 3 12 3C7 3 3 7 3 12C3 17 7 21 12 21C17 21 21 17 21 12Z"/></svg>',"arrowleft-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 8.99999H4.4L8.7 13.3L7.3 14.7L0.599998 7.99999L7.3 1.29999L8.7 2.69999L4.4 6.99999H15V8.99999Z"/></svg>',"arrowright-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M1 6.99999H11.6L7.3 2.69999L8.7 1.29999L15.4 7.99999L8.7 14.7L7.3 13.3L11.6 8.99999H1V6.99999Z"/></svg>',"camera-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20.01 4H18.4C18.2 4 18.01 3.9 17.9 3.73L16.97 2.34C16.41 1.5 15.48 1 14.47 1H9.54C8.53 1 7.6 1.5 7.04 2.34L6.11 3.73C6 3.9 5.81 4 5.61 4H4C2.35 4 1 5.35 1 7V19C1 20.65 2.35 22 4 22H20C21.65 22 23 20.65 23 19V7C23 5.35 21.65 4 20 4H20.01ZM21.01 19C21.01 19.55 20.56 20 20.01 20H4.01C3.46 20 3.01 19.55 3.01 19V7C3.01 6.45 3.46 6 4.01 6H5.62C6.49 6 7.3 5.56 7.79 4.84L8.72 3.45C8.91 3.17 9.22 3 9.55 3H14.48C14.81 3 15.13 3.17 15.31 3.45L16.24 4.84C16.72 5.56 17.54 6 18.41 6H20.02C20.57 6 21.02 6.45 21.02 7V19H21.01ZM12.01 6C8.7 6 6.01 8.69 6.01 12C6.01 15.31 8.7 18 12.01 18C15.32 18 18.01 15.31 18.01 12C18.01 8.69 15.32 6 12.01 6ZM12.01 16C9.8 16 8.01 14.21 8.01 12C8.01 9.79 9.8 8 12.01 8C14.22 8 16.01 9.79 16.01 12C16.01 14.21 14.22 16 12.01 16ZM13.01 10C13.01 10.55 12.56 11 12.01 11C11.46 11 11.01 11.45 11.01 12C11.01 12.55 10.56 13 10.01 13C9.46 13 9.01 12.55 9.01 12C9.01 10.35 10.36 9 12.01 9C12.56 9 13.01 9.45 13.01 10Z"/></svg>',"camera-32x32":'<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M27 6H23.8C23.34 6 22.92 5.77 22.66 5.39L22.25 4.78C21.51 3.66 20.26 3 18.92 3H13.06C11.72 3 10.48 3.67 9.73 4.78L9.32 5.39C9.07 5.77 8.64 6 8.18 6H4.98C2.79 6 1 7.79 1 10V24C1 26.21 2.79 28 5 28H27C29.21 28 31 26.21 31 24V10C31 7.79 29.21 6 27 6ZM29 24C29 25.1 28.1 26 27 26H5C3.9 26 3 25.1 3 24V10C3 8.9 3.9 8 5 8H8.2C9.33 8 10.38 7.44 11 6.5L11.41 5.89C11.78 5.33 12.41 5 13.07 5H18.93C19.6 5 20.22 5.33 20.59 5.89L21 6.5C21.62 7.44 22.68 8 23.8 8H27C28.1 8 29 8.9 29 10V24ZM16 9C12.13 9 9 12.13 9 16C9 19.87 12.13 23 16 23C19.87 23 23 19.87 23 16C23 12.13 19.87 9 16 9ZM16 21C13.24 21 11 18.76 11 16C11 13.24 13.24 11 16 11C18.76 11 21 13.24 21 16C21 18.76 18.76 21 16 21ZM17 13C17 13.55 16.55 14 16 14C14.9 14 14 14.9 14 16C14 16.55 13.55 17 13 17C12.45 17 12 16.55 12 16C12 13.79 13.79 12 16 12C16.55 12 17 12.45 17 13Z"/></svg>',"cancel-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22.6 8.6L16.4 2.4C16 2 15.5 1.8 15 1.8C14.5 1.8 14 2 13.6 2.4L1.40005 14.6C0.600049 15.4 0.600049 16.6 1.40005 17.4L6.00005 22H12L22.6 11.4C23.3 10.6 23.3 9.3 22.6 8.6ZM11.1 20H6.80005L2.80005 16L6.20005 12.6L12.4 18.8L11.1 20ZM13.8 17.4L7.60005 11.2L15 3.8L21.2 10L13.8 17.4ZM16 20H23V22H14L16 20Z"/></svg>',"check-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M5.003 14.413L0.292999 9.70303L1.703 8.29303L5.003 11.583L14.293 2.29303L15.703 3.70303L5.003 14.413Z"/></svg>',"check-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 20.1L1 12L3.1 9.9L9 15.9L20.9 4L23 6.1L9 20.1Z"/></svg>',"chevrondown-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 15L17 10H7L12 15Z"/></svg>',"chevronright-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M5.64648 12.6465L6.34648 13.3465L11.7465 8.04648L6.34648 2.64648L5.64648 3.34648L10.2465 8.04648L5.64648 12.6465Z"/></svg>',"clear-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13.35 3.34999L12.65 2.64999L8.05002 7.24999L3.35002 2.64999L2.65002 3.34999L7.25002 8.04999L2.65002 12.65L3.35002 13.35L8.05002 8.74999L12.65 13.35L13.35 12.65L8.75002 8.04999L13.35 3.34999Z"/></svg>',"clear-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22.6 8.6L16.4 2.4C16 2 15.5 1.8 15 1.8C14.5 1.8 14 2 13.6 2.4L1.40005 14.6C0.600049 15.4 0.600049 16.6 1.40005 17.4L6.00005 22H12L22.6 11.4C23.3 10.6 23.3 9.3 22.6 8.6ZM11.1 20H6.80005L2.80005 16L6.20005 12.6L12.4 18.8L11.1 20ZM13.8 17.4L7.60005 11.2L15 3.8L21.2 10L13.8 17.4ZM16 20H23V22H14L16 20Z"/></svg>',"close-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M9.43 8.0025L13.7 3.7225C14.09 3.3325 14.09 2.6925 13.7 2.2925C13.31 1.9025 12.67 1.9025 12.27 2.2925L7.99 6.5725L3.72 2.3025C3.33 1.9025 2.69 1.9025 2.3 2.3025C1.9 2.6925 1.9 3.3325 2.3 3.7225L6.58 8.0025L2.3 12.2825C1.91 12.6725 1.91 13.3125 2.3 13.7125C2.69 14.1025 3.33 14.1025 3.73 13.7125L8.01 9.4325L12.29 13.7125C12.68 14.1025 13.32 14.1025 13.72 13.7125C14.11 13.3225 14.11 12.6825 13.72 12.2825L9.44 8.0025H9.43Z"/></svg>',"close-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13.4101 12L20.7001 4.71C21.0901 4.32 21.0901 3.69 20.7001 3.3C20.3101 2.91 19.6801 2.91 19.2901 3.3L12.0001 10.59L4.71006 3.29C4.32006 2.9 3.68006 2.9 3.29006 3.29C2.90006 3.68 2.90006 4.32 3.29006 4.71L10.5801 12L3.29006 19.29C2.90006 19.68 2.90006 20.31 3.29006 20.7C3.49006 20.9 3.74006 20.99 4.00006 20.99C4.26006 20.99 4.51006 20.89 4.71006 20.7L12.0001 13.41L19.2901 20.7C19.4901 20.9 19.7401 20.99 20.0001 20.99C20.2601 20.99 20.5101 20.89 20.7101 20.7C21.1001 20.31 21.1001 19.68 20.7101 19.29L13.4201 12H13.4101Z"/></svg>',"collapse-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 6L3 5L8 10L13 5L14 6L8 12L2 6Z"/></svg>',"collapsedetails-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 7H3V9H13V7Z"/></svg>',"delete-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 2H14H11V1C11 0.4 10.6 0 10 0H7C6.4 0 6 0.4 6 1V2H3H2V4H3V14C3 15.1 3.9 16 5 16H12C13.1 16 14 15.1 14 14V4H15V2ZM7 1H10V2H7V1ZM12 14H5V4H12V14ZM7 13H6V5H7V13ZM9 13H8V5H9V13ZM11 13H10V5H11V13Z"/></svg>',"delete-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22 4H20H16V2C16 0.9 15.1 0 14 0H10C8.9 0 8 0.9 8 2V4H4H2V6H4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V6H22V4ZM10 2H14V4H10V2ZM18 20H6V6H8H16H18V20ZM14 8H16V18H14V8ZM11 8H13V18H11V8ZM8 8H10V18H8V8Z"/></svg>',"drag-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 6C13 4.9 13.9 4 15 4C16.1 4 17 4.9 17 6C17 7.1 16.1 8 15 8C13.9 8 13 7.1 13 6ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16ZM9 16C7.9 16 7 16.9 7 18C7 19.1 7.9 20 9 20C10.1 20 11 19.1 11 18C11 16.9 10.1 16 9 16Z"/></svg>',"draghorizontal-24x16":'<svg viewBox="0 0 24 16" xmlns="http://www.w3.org/2000/svg"><path d="M18 9C19.1 9 20 9.9 20 11C20 12.1 19.1 13 18 13C16.9 13 16 12.1 16 11C16 9.9 16.9 9 18 9ZM20 5C20 3.9 19.1 3 18 3C16.9 3 16 3.9 16 5C16 6.1 16.9 7 18 7C19.1 7 20 6.1 20 5ZM14 11C14 9.9 13.1 9 12 9C10.9 9 10 9.9 10 11C10 12.1 10.9 13 12 13C13.1 13 14 12.1 14 11ZM14 5C14 3.9 13.1 3 12 3C10.9 3 10 3.9 10 5C10 6.1 10.9 7 12 7C13.1 7 14 6.1 14 5ZM8 11C8 9.9 7.1 9 6 9C4.9 9 4 9.9 4 11C4 12.1 4.9 13 6 13C7.1 13 8 12.1 8 11ZM8 5C8 3.9 7.1 3 6 3C4.9 3 4 3.9 4 5C4 6.1 4.9 7 6 7C7.1 7 8 6.1 8 5Z"/></svg>',"editsmall-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13.59 4.5884L11.42 2.4184C11.03 2.0284 10.52 1.8284 10.01 1.8284C9.5 1.8284 8.99 2.0284 8.6 2.4184L3.76 7.2384C2.63 8.3684 2 9.8884 2 11.4784V12.9884C2 13.5384 2.45 13.9884 3 13.9884H4.51C6.1 13.9884 7.63 13.3584 8.75 12.2284L13.58 7.3984C14.36 6.6184 14.36 5.3484 13.58 4.5684L13.59 4.5884ZM7.35 10.8284C6.59 11.5884 5.59 11.9984 4.52 11.9984H4.01V11.4884C4.01 10.4184 4.43 9.4184 5.18 8.6584L7.72 6.1184L9.89 8.2884L7.35 10.8284ZM11.3 6.8784L9.13 4.7084L10.01 3.8284L12.18 5.9984L11.3 6.8784Z"/></svg>',"expand-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6 14L5 13L10 8L5 3L6 2L12 8L6 14Z"/></svg>',"expanddetails-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 7H9V3H7V7H3V9H7V13H9V9H13V7Z"/></svg>',"file-72x72":'<svg viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"><path d="M62.83 12.83L53.17 3.17C52.7982 2.79866 52.357 2.50421 51.8714 2.30346C51.3858 2.1027 50.8654 1.99959 50.34 2H14C12.4087 2 10.8826 2.63214 9.75735 3.75736C8.63214 4.88258 8 6.4087 8 8V64C8 65.5913 8.63214 67.1174 9.75735 68.2426C10.8826 69.3679 12.4087 70 14 70H58C59.5913 70 61.1174 69.3679 62.2426 68.2426C63.3679 67.1174 64 65.5913 64 64V15.66C64.0004 15.1346 63.8973 14.6142 63.6965 14.1286C63.4958 13.643 63.2013 13.2018 62.83 12.83ZM52 4.83L61.17 14H56C54.9391 14 53.9217 13.5786 53.1716 12.8284C52.4214 12.0783 52 11.0609 52 10V4.83ZM62 64C62 65.0609 61.5786 66.0783 60.8284 66.8284C60.0783 67.5786 59.0609 68 58 68H14C12.9391 68 11.9217 67.5786 11.1716 66.8284C10.4214 66.0783 10 65.0609 10 64V8C10 6.93914 10.4214 5.92172 11.1716 5.17157C11.9217 4.42143 12.9391 4 14 4H50V10C50 11.5913 50.6321 13.1174 51.7574 14.2426C52.8826 15.3679 54.4087 16 56 16H62V64ZM22 26H50V28H22V26ZM22 32H50V34H22V32ZM22 38H50V40H22V38ZM22 44H50V46H22V44Z"/></svg>',"flip-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23 12.0037C23 14.2445 21.7794 16.3052 19.5684 17.8257C19.3984 17.9458 19.1983 18.0058 19.0082 18.0058C18.688 18.0058 18.3779 17.8557 18.1778 17.5756C17.8677 17.1155 17.9777 16.4953 18.4379 16.1852C20.0887 15.0448 21.0091 13.5643 21.0091 12.0138C21.0091 8.70262 16.9673 6.01171 12.005 6.01171C11.4948 6.01171 10.9945 6.04172 10.5043 6.09173L11.7149 7.30215C12.105 7.69228 12.105 8.32249 11.7149 8.71263C11.5148 8.9127 11.2647 9.00273 11.0045 9.00273C10.7444 9.00273 10.4943 8.90269 10.2942 8.71263L6.58254 5.00136L10.2842 1.2901C10.6744 0.899964 11.3047 0.899964 11.6949 1.2901C12.085 1.68023 12.085 2.31045 11.6949 2.70058L10.3042 4.09105C10.8545 4.03103 11.4147 4.00102 11.985 4.00102C18.0578 4.00102 22.99 7.59225 22.99 12.0037H23ZM12.2851 15.2949C11.895 15.685 11.895 16.3152 12.2851 16.7054L13.4957 17.9158C13.0055 17.9758 12.4952 17.9958 11.995 17.9958C7.03274 17.9958 2.99091 15.3049 2.99091 11.9937C2.99091 10.4332 3.90132 8.95271 5.56207 7.82232C6.02228 7.51222 6.13233 6.89201 5.82219 6.43185C5.51205 5.97169 4.89177 5.86166 4.43156 6.17176C2.22055 7.69228 1 9.76299 1 11.9937C1 16.4052 5.93224 19.9965 12.005 19.9965C12.5753 19.9965 13.1355 19.9665 13.6858 19.9064L12.2951 21.2969C11.905 21.6871 11.905 22.3173 12.2951 22.7074C12.4952 22.9075 12.7453 22.9975 13.0055 22.9975C13.2656 22.9975 13.5157 22.8975 13.7158 22.7074L17.4275 18.9961L13.7158 15.2849C13.3256 14.8947 12.6953 14.8947 12.3051 15.2849L12.2851 15.2949Z"/></svg>',"folder-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.93 9H21V7C21 6.46957 20.7893 5.96086 20.4142 5.58579C20.0391 5.21071 19.5304 5 19 5H10L8 3H4C3.46957 3 2.96086 3.21071 2.58579 3.58579C2.21071 3.96086 2 4.46957 2 5L2 21H21L23.89 11.63C23.9916 11.3244 24.0179 10.9988 23.9667 10.6809C23.9155 10.363 23.7882 10.0621 23.5958 9.80392C23.4034 9.54571 23.1514 9.33779 22.8614 9.19782C22.5714 9.05786 22.2519 8.99 21.93 9ZM4 5H7.17L8.59 6.41L9.17 7H19V9H6L4 15V5ZM22 11L19.54 19H4.77L7.44 11H22Z"/></svg>',"fullsize-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M12 13H4C2.9 13 2 12.1 2 11V5C2 3.9 2.9 3 4 3H12C13.1 3 14 3.9 14 5V11C14 12.1 13.1 13 12 13ZM4 5V11H12V5H4Z"/></svg>',
10"image-48x48":'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M36 8H12C9.79 8 8 9.79 8 12V36C8 38.21 9.79 40 12 40H36C38.21 40 40 38.21 40 36V12C40 9.79 38.21 8 36 8ZM38 36C38 37.1 37.1 38 36 38H12C10.9 38 10 37.1 10 36V12C10 10.9 10.9 10 12 10H36C37.1 10 38 10.9 38 12V36ZM14 17C14 15.34 15.34 14 17 14C18.66 14 20 15.34 20 17C20 18.66 18.66 20 17 20C15.34 20 14 18.66 14 17ZM27 24L36 36H12L19 27L23 29L27 24Z"/></svg>',"loading-48x48":'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_19679_369428)"><path opacity="0.1" d="M24 40C15.18 40 8 32.82 8 24C8 15.18 15.18 8 24 8C32.82 8 40 15.18 40 24C40 32.82 32.82 40 24 40ZM24 12C17.38 12 12 17.38 12 24C12 30.62 17.38 36 24 36C30.62 36 36 30.62 36 24C36 17.38 30.62 12 24 12Z" fill="black" fill-opacity="0.91"/><path d="M10 26C8.9 26 8 25.1 8 24C8 15.18 15.18 8 24 8C25.1 8 26 8.9 26 10C26 11.1 25.1 12 24 12C17.38 12 12 17.38 12 24C12 25.1 11.1 26 10 26Z"/></g><defs><clipPath id="clip0_19679_369428"><rect width="32" height="32" fill="white" transform="translate(8 8)"/></clipPath></defs></svg>',"maximize-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6.71 10.71L4.42 13H6.01C6.56 13 7.01 13.45 7.01 14C7.01 14.55 6.56 15 6.01 15H2C1.45 15 1 14.55 1 14V10C1 9.45 1.45 9 2 9C2.55 9 3 9.45 3 10V11.59L5.29 9.3C5.68 8.91 6.31 8.91 6.7 9.3C7.09 9.69 7.09 10.32 6.7 10.71H6.71ZM14 1H10C9.45 1 9 1.45 9 2C9 2.55 9.45 3 10 3H11.59L9.3 5.29C8.91 5.68 8.91 6.31 9.3 6.7C9.5 6.9 9.75 6.99 10.01 6.99C10.27 6.99 10.52 6.89 10.72 6.7L13.01 4.41V6C13.01 6.55 13.46 7 14.01 7C14.56 7 15.01 6.55 15.01 6V2C15.01 1.45 14.56 1 14.01 1H14Z"/></svg>',"minimize-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 9H3C2.45 9 2 8.55 2 8C2 7.45 2.45 7 3 7H13C13.55 7 14 7.45 14 8C14 8.55 13.55 9 13 9Z"/></svg>',"more-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 12C6 13.1 5.1 14 4 14C2.9 14 2 13.1 2 12C2 10.9 2.9 10 4 10C5.1 10 6 10.9 6 12ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10ZM20 10C18.9 10 18 10.9 18 12C18 13.1 18.9 14 20 14C21.1 14 22 13.1 22 12C22 10.9 21.1 10 20 10Z"/></svg>',"navmenu-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M16 7H2V5H16V7ZM2 11V13H22V11H2ZM2 19H10V17H2V19Z"/></svg>',"noimage-48x48":'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M14 17.01C14 16.4167 14.1759 15.8366 14.5056 15.3433C14.8352 14.8499 15.3038 14.4654 15.8519 14.2384C16.4001 14.0113 17.0033 13.9519 17.5853 14.0676C18.1672 14.1834 18.7018 14.4691 19.1213 14.8887C19.5409 15.3082 19.8266 15.8428 19.9424 16.4247C20.0581 17.0067 19.9987 17.6099 19.7716 18.1581C19.5446 18.7062 19.1601 19.1748 18.6667 19.5044C18.1734 19.8341 17.5933 20.01 17 20.01C16.2044 20.01 15.4413 19.6939 14.8787 19.1313C14.3161 18.5687 14 17.8056 14 17.01ZM27.09 24.14L20 36.01H36L27.09 24.14ZM36.72 8.14L35.57 10.01H36C36.5304 10.01 37.0391 10.2207 37.4142 10.5958C37.7893 10.9709 38 11.4796 38 12.01V36.01C38 36.5404 37.7893 37.0491 37.4142 37.4242C37.0391 37.7993 36.5304 38.01 36 38.01H18.77L17.57 40.01H36C37.0609 40.01 38.0783 39.5886 38.8284 38.8384C39.5786 38.0883 40 37.0709 40 36.01V12.01C39.9966 11.0765 39.6668 10.1737 39.0678 9.45778C38.4688 8.74188 37.6382 8.25802 36.72 8.09V8.14ZM36.86 4.5L12.86 44.5L11.14 43.5L13.23 40.01H12C10.9391 40.01 9.92172 39.5886 9.17157 38.8384C8.42143 38.0883 8 37.0709 8 36.01V12.01C8 10.9491 8.42143 9.93172 9.17157 9.18157C9.92172 8.43143 10.9391 8.01 12 8.01H32.43L35.14 3.5L36.86 4.5ZM14.43 38.01L15.63 36.01H12L19 27.01L20.56 27.8L31.23 10.01H12C11.4696 10.01 10.9609 10.2207 10.5858 10.5958C10.2107 10.9709 10 11.4796 10 12.01V36.01C10 36.5404 10.2107 37.0491 10.5858 37.4242C10.9609 37.7993 11.4696 38.01 12 38.01H14.43Z"/></svg>',"ranking-arrows":'<svg viewBox="0 0 10 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 5L5 0L0 5H4V9H6V5H10Z"/><path d="M6 19V15H4V19H0L5 24L10 19H6Z"/></svg>',"rankingundefined-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
10<path d="M13 7H3V9H13V7
vendor: 2,377 bytes, line 10
10Z"/></svg>',"rating-star-2":'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path d="M24 39.5057L11.7226 45.9839C10.4095 46.6739 8.87606 45.5622 9.12525 44.096L11.4734 30.373L1.54411 20.6556C0.480254 19.6207 1.06489 17.8095 2.53128 17.5986L16.2559 15.5957L22.3994 3.10891C23.0512 1.77685 24.9488 1.77685 25.6102 3.10891L31.7441 15.5957L45.4687 17.5986C46.9351 17.8095 47.5197 19.6207 46.4559 20.6556L36.5266 30.373L38.8748 44.096C39.1239 45.5622 37.5905 46.6835 36.2774 45.9839L24 39.5057Z" fill="none" stroke-width="2"/><path d="M24.3981 33.1305L24 32.9206L23.6019 33.1305L15.8715 37.2059L17.3542 28.5663L17.43 28.1246L17.1095 27.8113L10.83 21.6746L19.4965 20.4049L19.9405 20.3399L20.1387 19.9373L24 12.0936L27.8613 19.9373L28.0595 20.3399L28.5035 20.4049L37.17 21.6746L30.8905 27.8113L30.57 28.1246L30.6458 28.5663L32.1285 37.2059L24.3981 33.1305Z" stroke-width="1.70746"/></svg>',"rating-star-small-2":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 19.3373L6.13001 22.4373C5.50001 22.7673 4.77001 22.2373 4.89001 21.5373L6.01001 14.9773L1.26001 10.3273C0.750007 9.83728 1.03001 8.96728 1.73001 8.86728L8.29001 7.90728L11.23 1.93728C11.54 1.29728 12.45 1.29728 12.77 1.93728L15.7 7.90728L22.26 8.86728C22.96 8.96728 23.24 9.83728 22.73 10.3273L17.98 14.9773L19.1 21.5373C19.22 22.2373 18.49 22.7773 17.86 22.4373L11.99 19.3373H12Z" fill="none" stroke-width="2"/><path d="M12 15.9472L8.58001 17.7572L9.23001 13.9272L6.45001 11.2072L10.29 10.6472L12 7.17725L13.71 10.6472L17.55 11.2072L14.77 13.9272L15.42 17.7572L12 15.9472Z"/></svg>',"rating-star-small":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g><path d="M12 19.3373L6.13001 22.4373C5.50001 22.7673 4.77001 22.2373 4.89001 21.5373L6.01001 14.9773L1.26001 10.3273C0.750007 9.83728 1.03001 8.96728 1.73001 8.86728L8.29001 7.90728L11.23 1.93728C11.54 1.29728 12.45 1.29728 12.77 1.93728L15.7 7.90728L22.26 8.86728C22.96 8.96728 23.24 9.83728 22.73 10.3273L17.98 14.9773L19.1 21.5373C19.22 22.2373 18.49 22.7773 17.86 22.4373L11.99 19.3373H12Z"/></g></svg>',"rating-star":'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g><path d="M24 39.5057L11.7226 45.9839C10.4095 46.6739 8.87606 45.5622 9.12525 44.096L11.4734 30.373L1.54411 20.6556C0.480254 19.6207 1.06489 17.8095 2.53128 17.5986L16.2559 15.5957L22.3994 3.10891C23.0512 1.77685 24.9488 1.77685 25.
vendor: 11,641 bytes, line 10
106102 3.10891L31.7441 15.5957L45.4687 17.5986C46.9351 17.8095 47.5197 19.6207 46.4559 20.6556L36.5266 30.373L38.8748 44.096C39.1239 45.5622 37.5905 46.6835 36.2774 45.9839L24 39.5057Z"/></g></svg>',"reorder-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 5L12 0L7 5H11V9H13V5H17Z"/><path d="M13 19V15H11V19H7L12 24L17 19H13Z"/></svg>',"restoredown-16x16":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 6C15 6.55 14.55 7 14 7H10C9.45 7 9 6.55 9 6V2C9 1.45 9.45 1 10 1C10.55 1 11 1.45 11 2V3.59L13.29 1.29C13.49 1.09 13.74 1 14 1C14.26 1 14.51 1.1 14.71 1.29C15.1 1.68 15.1 2.31 14.71 2.7L12.42 4.99H14.01C14.56 4.99 15.01 5.44 15.01 5.99L15 6ZM6 9H2C1.45 9 0.999998 9.45 0.999998 10C0.999998 10.55 1.45 11 2 11H3.59L1.29 13.29C0.899998 13.68 0.899998 14.31 1.29 14.7C1.68 15.09 2.31 15.09 2.7 14.7L4.99 12.41V14C4.99 14.55 5.44 15 5.99 15C6.54 15 6.99 14.55 6.99 14V10C6.99 9.45 6.54 9 5.99 9H6Z"/></svg>',"search-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M14 2C9.6 2 6 5.6 6 10C6 11.8 6.6 13.5 7.7 14.9L2.3 20.3C1.9 20.7 1.9 21.3 2.3 21.7C2.5 21.9 2.7 22 3 22C3.3 22 3.5 21.9 3.7 21.7L9.1 16.3C10.5 17.4 12.2 18 14 18C18.4 18 22 14.4 22 10C22 5.6 18.4 2 14 2ZM14 16C10.7 16 8 13.3 8 10C8 6.7 10.7 4 14 4C17.3 4 20 6.7 20 10C20 13.3 17.3 16 14 16Z"/></svg>',"smiley-rate1-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 4.9938C4 4.44362 4.45 3.99348 5 3.99348H6.59L5.3 2.70306C4.91 2.31293 4.91 1.68272 5.3 1.2926C5.69 0.902468 6.32 0.902468 6.71 1.2926L9.71 4.29357C9.8 4.3836 9.88 4.49364 9.93 4.62368C10.03 4.86376 10.03 5.14385 9.93 5.38393C9.88 5.50397 9.81 5.614 9.71 5.71404L6.71 8.71501C6.51 8.91508 6.26 9.00511 6 9.00511C5.74 9.00511 5.49 8.90508 5.29 8.71501C4.9 8.32489 4.9 7.69468 5.29 7.30456L6.58 6.01413H4.99C4.44 6.01413 3.99 5.56399 3.99 5.01381L4 4.9938ZM14.08 5.37393C14.13 5.49397 14.2 5.604 14.3 5.70403L17.3 8.70501C17.5 8.90508 17.75 8.99511 18.01 8.99511C18.27 8.99511 18.52 8.89507 18.72 8.70501C19.11 8.31488 19.11 7.68468 18.72 7.29455L17.43 6.00413H19.02C19.57 6.00413 20.02 5.55399 20.02 5.00381C20.02 4.45363 19.57 4.00348 19.02 4.00348H17.43L18.72 2.71306C19.11 2.32293 19.11 1.69273 18.72 1.3026C18.33 0.912471 17.7 0.912471 17.31 1.3026L14.31 4.30358C14.22 4.39361 14.14 4.50364 14.09 4.63368C13.99 4.87376 13.99 5.15385 14.09 5.39393L14.08 5.37393ZM22 14.9971V20.999C22 22.6496 20.65 24 19 24H5C3.35 24 2 22.6496 2 20.999V14.9971C2 13.3465 3.35 11.9961 5 11.9961H19C20.65 11.9961 22 13.3465 22 14.9971ZM19 13.9967H16V16.9977H20V14.9971C20 14.4469 19.55 13.9967 19 13.9967ZM14 16.9977V13.9967H10V16.9977H14ZM10 18.9984V21.9993H14V18.9984H10ZM4 14.9971V16.9977H8V13.9967H5C4.45 13.9967 4 14.4469 4 14.9971ZM5 21.9993H8V18.9984H4V20.999C4 21.5492 4.45 21.9993 5 21.9993ZM20 20.999V18.9984H16V21.9993H19C19.55 21.9993 20 21.5492 20 20.999Z"/></svg>',"smiley-rate10-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.01 23C6.85721 23 1.15412 19.9621 0.0134987 13.1669C-0.0765501 12.6272 0.293651 12.1076 0.833944 12.0177C1.38424 11.9277 1.89452 12.2975 1.98457 12.8371C2.92508 18.4732 7.69767 20.9914 12 20.9914C16.3023 20.9914 21.0749 18.4732 22.0154 12.8371C22.1055 12.2975 22.6158 11.9277 23.1661 12.0177C23.7063 12.1076 24.0765 12.6272 23.9865 13.1669C22.8559 19.9521 17.1428 23 11.99 23H12.01ZM21.165 6.15177C22.3056 5.01257 22.3056 3.16386 21.165 2.02465L21.0049 1.85477C19.9143 0.765533 18.1633 0.725561 17.0227 1.71487C15.8821 0.715568 14.1312 0.765533 13.0406 1.85477L12.8705 2.01466C11.7299 3.15386 11.7299 5.00257 12.8705 6.14178L17.0227 10.2889L21.175 6.14178L21.165 6.15177ZM15.742 3.27378L17.0127 4.54289L18.2834 3.27378C18.6436 2.91403 19.2239 2.91403 19.5841 3.27378L19.7442 3.43367C20.1044 3.79342 20.1044 4.37301 19.7442 4.73276L17.0127 7.46086L14.2812 4.73276C13.921 4.37301 13.921 3.79342 14.2812 3.43367L14.4413 3.27378C14.6214 3.09391 14.8515 3.00397 15.0917 3.00397C15.3318 3.00397 15.5619 3.09391 15.742 3.27378ZM11.1595 6.15177C12.3002 5.01257 12.3002 3.16386 11.1595 2.02465L10.9995 1.85477C9.90886 0.765533 8.15792 0.725561 7.0173 1.71487C5.87668 0.715568 4.12573 0.765533 3.03514 1.85477L2.86505 2.01466C1.72443 3.15386 1.72443 5.00257 2.86505 6.14178L7.0173 10.2889L11.1695 6.14178L11.1595 6.15177ZM5.7366 3.27378L7.00729 4.54289L8.27798 3.27378C8.63818 2.91403 9.21849 2.91403 9.57869 3.27378L9.73877 3.43367C10.099 3.79342 10.099 4.37301 9.73877 4.73276L7.00729 7.46086L4.27581 4.73276C3.91562 4.37301 3.91562 3.79342 4.27581 3.43367L4.4359 3.27378C4.61599 3.09391 4.84612 3.00397 5.08625 3.00397C5.32638 3.00397 5.5565 3.09391 5.7366 3.27378Z"/></svg>',"smiley-rate2-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_15894_140103)"><path d="M4.88291 4.51001C4.47291 4.51001 4.08291 4.25001 3.94291 3.84001C3.76291 3.32001 4.03291 2.75001 4.55291 2.57001L8.32291 1.25001C8.84291 1.06001 9.41291 1.34001 9.59291 1.86001C9.77291 2.38001 9.50291 2.95001 8.98291 3.13001L5.20291 4.45001C5.09291 4.49001 4.98291 4.51001 4.87291 4.51001H4.88291ZM19.8129 3.89001C20.0229 3.38001 19.7729 2.79001 19.2629 2.59001L15.5529 1.07001C15.0429 0.860007 14.4529 1.11001 14.2529 1.62001C14.0429 2.13001 14.2929 2.72001 14.8029 2.92001L18.5029 4.43001C18.6229 4.48001 18.7529 4.50001 18.8829 4.50001C19.2729 4.50001 19.6529 4.27001 19.8129 3.88001V3.89001ZM3.50291 6.00001C2.64291 6.37001 1.79291 6.88001 1.00291 7.48001C0.79291 7.64001 0.64291 7.87001 0.59291 8.14001C0.48291 8.73001 0.87291 9.29001 1.45291 9.40001C2.04291 9.51001 2.60291 9.12001 2.71291 8.54001C2.87291 7.69001 3.12291 6.83001 3.50291 5.99001V6.00001ZM21.0429 8.55001C21.6029 10.48 24.2429 8.84001 22.7529 7.48001C21.9629 6.88001 21.1129 6.37001 20.2529 6.00001C20.6329 6.84001 20.8829 7.70001 21.0429 8.55001ZM21.5729 13.2C21.2529 14.2 22.5429 15.09 23.3629 14.39C23.8529 14 23.9229 13.29 23.5429 12.81C21.7429 10.67 22.1329 10.55 21.5829 13.2H21.5729ZM1.75291 11C1.22291 11.79 -0.14709 12.64 0.0129102 13.75C0.15291 14.36 0.75291 14.74 1.35291 14.6C2.98291 14.1 1.80291 12.22 1.75291 11ZM19.8829 17C19.8829 13.14 16.2929 10 11.8829 10C7.47291 10 3.88291 13.14 3.88291 17C3.88291 20.86 7.47291 24 11.8829 24C16.2929 24 19.8829 20.86 19.8829 17ZM17.8829 17C17.8829 19.76 15.1929 22 11.8829 22C8.57291 22 5.88291 19.76 5.88291 17C5.88291 14.24 8.57291 12 11.8829 12C15.1929 12 17.8829 14.24 17.8829 17Z"/></g><defs><clipPath id="clip0_15894_140103"><rect width="24" height="24" fill="white"/></clipPath></defs></svg>',"smiley-rate3-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.01915 7C6.46961 7 6.01998 6.55 6.01998 6V2C6.01998 1.45 6.46961 1 7.01915 1C7.56869 1 8.01832 1.45 8.01832 2V6C8.01832 6.55 7.56869 7 7.01915 7ZM18.01 6V2C18.01 1.45 17.5604 1 17.0108 1C16.4613 1 16.0117 1.45 16.0117 2V6C16.0117 6.55 16.4613 7 17.0108 7C17.5604 7 18.01 6.55 18.01 6ZM16.4213 21.58L18.01 19.99L19.2989 21.28C19.6886 21.67 20.3181 21.67 20.7077 21.28C21.0974 20.89 21.0974 20.26 20.7077 19.87L19.4188 18.58C18.6395 17.8 17.3705 17.8 16.5912 18.58L15.0025 20.17L13.4138 18.58C12.6345 17.8 11.3655 17.8 10.5862 18.58L8.9975 20.17L7.40883 18.58C6.62948 17.8 5.36053 17.8 4.58118 18.58L3.29226 19.87C2.90258 20.26 2.90258 20.89 3.29226 21.28C3.68193 21.67 4.31141 21.67 4.70108 21.28L5.99001 19.99L7.57868 21.58C8.35803 22.36 9.62698 22.36 10.4063 21.58L11.995 19.99L13.5837 21.58C13.9734 21.97 14.4829 22.16 14.9925 22.16C15.5021 22.16 16.0117 21.97 16.4013 21.58H16.4213Z"/></svg>',"smiley-rate4-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.06927 7C6.51927 7 6.06927 6.55 6.06927 6V2C6.06927 1.45 6.51927 1 7.06927 1C7.61927 1 8.06927 1.45 8.06927 2V6C8.06927 6.55 7.61927 7 7.06927 7ZM18.0693 6V2C18.0693 1.45 17.6193 1 17.0693 1C16.5193 1 16.0693 1.45 16.0693 2V6C16.0693 6.55 16.5193 7 17.0693 7C17.6193 7 18.0693 6.55 18.0693 6ZM22.5693 21.9C23.0693 21.66 23.2793 21.07 23.0393 20.57C21.1093 16.52 16.9093 14 12.0693 14C7.22927 14 3.02927 16.52 1.09927 20.57C0.859273 21.07 1.06927 21.67 1.56927 21.9C2.06927 22.14 2.65927 21.93 2.89927 21.43C4.49927 18.08 8.00927 16 12.0593 16C16.1093 16 19.6293 18.08 21.2193 21.43C21.3893 21.79 21.7493 22 22.1193 22C22.2593 22 22.4093 21.97 22.5493 21.9H22.5693Z"/></svg>',"smiley-rate5-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.00572 7C6.45572 7 6.00572 6.55 6.00572 6V2C6.00572 1.45 6.45572 1 7.00572 1C7.55572 1 8.00572 1.45 8.00572 2V6C8.00572 6.55 7.55572 7 7.00572 7ZM18.0057 6V2C18.0057 1.45 17.5557 1 17.0057 1C16.4557 1 16.0057 1.45 16.0057 2V6C16.0057 6.55 16.4557 7 17.0057 7C17.5557 7 18.0057 6.55 18.0057 6ZM19.9457 21.33C20.1257 20.81 19.8557 20.24 19.3357 20.05C14.5457 18.35 9.45572 18.35 4.66572 20.05C4.14572 20.23 3.87572 20.81 4.05572 21.33C4.23572 21.85 4.80572 22.12 5.33572 21.94C9.69572 20.4 14.3057 20.4 18.6657 21.94C18.7757 21.98 18.8857 22 18.9957 22C19.4057 22 19.7957 21.74 19.9357 21.33H19.9457Z"/></svg>',"smiley-rate6-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 7C6.45 7 6 6.55 6 6V2C6 1.45 6.45 1 7 1C7.55 1 8 1.45 8 2V6C8 6.55 7.55 7 7 7ZM18 6V2C18 1.45 17.55 1 17 1C16.45 1 16 1.45 16 2V6C16 6.55 16.45 7 17 7C17.55 7 18 6.55 18 6ZM21 21C21 20.45 20.55 20 20 20H4C3.45 20 3 20.45 3 21C3 21.55 3.45 22 4 22H20C20.55 22 21 21.55 21 21Z"/></svg>',"smiley-rate7-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.0022 23.99C11.452 23.99 11.0018 23.5402 11.0018 22.9904C11.0018 22.4407 11.452 21.9909 12.0022 21.9909C16.3137 21.9909 21.0755 19.472 22.0158 13.8344C22.1058 13.2947 22.616 12.9248 23.1662 13.0148C23.7064 13.1047 24.0765 13.6245 23.9865 14.1643C22.8561 20.9513 17.144 24 11.9922 24L12.0022 23.99ZM8.00072 5.99783V1.99957C8.00072 1.4498 7.55056 1 7.00036 1C6.45016 1 6 1.4498 6 1.99957V5.99783C6 6.54759 6.45016 6.99739 7.00036 6.99739C7.55056 6.99739 8.00072 6.54759 8.00072 5.99783ZM18.0043 5.99783V1.99957C18.0043 1.4498 17.5542 1 17.004 1C16.4538 1 16.0036 1.4498 16.0036 1.99957V5.99783C16.0036 6.54759 16.4538 6.99739 17.004 6.99739C17.5542 6.99739 18.0043 6.54759 18.0043 5.99783Z"/></svg>',"smiley-rate8-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.01 24C6.85721 24 1.15412 20.96 0.0134987 14.16C-0.0765501 13.62 0.293651 13.1 0.833944 13.01C1.38424 12.92 1.89452 13.29 1.98457 13.83C2.92508 19.47 7.69767 21.99 12 21.99C16.3023 21.99 21.0749 19.47 22.0154 13.83C22.1055 13.29 22.6158 12.92 23.1661 13.01C23.7063 13.1 24.0765 13.62 23.9865 14.16C22.8559 20.95 17.1428 24 11.99 24H12.01ZM8.00783 6V2C8.00783 1.45 7.55759 1 7.00729 1C6.45699 1 6.00675 1.45 6.00675 2V6C6.00675 6.55 6.45699 7 7.00729 7C7.55759 7 8.00783 6.55 8.00783 6ZM18.0133 6V2C18.0133 1.45 17.563 1 17.0127 1C16.4624 1 16.0122 1.45 16.0122 2V6C16.0122 6.55 16.4624 7 17.0127 7C17.563 7 18.0133 6.55 18.0133 6Z"/></svg>',"smiley-rate9-24x24":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.01 24C6.85767 24 1.15509 20.96 0.0145752 14.16C-0.0354475 13.87 0.0445888 13.57 0.234675 13.35C0.424761 13.13 0.704888 13 0.995019 13H23.005C23.2951 13 23.5752 13.13 23.7653 13.35C23.9554 13.57 24.0354 13.87 23.9854 14.16C22.8549 20.95 17.1423 24 11.99 24H12.01ZM2.25559 15C3.61621 19.82 8.0182 22 12.01 22C16.0018 22 20.4038 19.82 21.7644 15H2.25559ZM8.00819 6V2C8.00819 1.45 7.55799 1 7.00774 1C6.45749 1 6.00729 1.45 6.00729 2V6C6.00729 6.55 6.45749 7 7.00774 7C7.55799 7 8.00819 6.55 8.00819 6ZM18.0127 6V2C18.0127 1.45 17.5625 1 17.0123 1C16.462 1 16.0118 1.45 16.0118 2V6C16.0118 6.55 16.462 7 17.0123 7C17.5625 7 18.0127 6.55 18.0127 6Z"/></svg>'}
10),rv("v2",rW),rg.registerIcons(rW);class rG extends rw{constructor(e){super(e),this.previousJSON={},this.isSurveyUpdated=!1,this.createSurvey(e),this.updateSurvey(e,{}),this.rootRef=rC.createRef(),this.rootNodeId=e.id||null,this.rootNodeClassName=e.className||""}getStateElement(){return this.survey}onSurveyUpdated(){if(this.survey){let e=this.rootRef.current;e&&this.survey.afterRenderSurvey(e),this.survey.startTimerFromUI(),this.setSurveyEvents()}}shouldComponentUpdate(e,t){return!!super.shouldComponentUpdate(e,t)&&(this.isModelJSONChanged(e)&&(this.destroySurvey(),this.createSurvey(e),this.updateSurvey(e,{}),this.isSurveyUpdated=!0),!0)}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.updateSurvey(this.props,e),this.isSurveyUpdated&&(this.onSurveyUpdated(),this.isSurveyUpdated=!1)}componentDidMount(){super.componentDidMount(),this.onSurveyUpdated()}destroySurvey(){this.survey&&(this.survey.renderCallback=void 0,this.survey.onPartialSend.clear(),this.survey.stopTimer(),this.survey.destroyResizeObserver())}componentWillUnmount(){super.componentWillUnmount(),this.destroySurvey()}doRender(){let e;e="completed"==this.survey.state?this.renderCompleted():"completedbefore"==this.survey.state?this.renderCompletedBefore():"loading"==this.survey.state?this.renderLoading():"empty"==this.survey.state?this.renderEmptySurvey():this.renderSurvey();let t=this.survey.backgroundImage?rC.createElement("div",{className:this.css.rootBackgroundImage,style:this.survey.backgroundImageStyle}):null,s="basic"===this.survey.headerView?rC.createElement(rF,{survey:this.survey}):null,i=rC.createElement("div",{className:"sv_custom_header"});this.survey.hasLogo&&(i=null);let n=this.survey.getRootCss(),r=this.rootNodeClassName?this.rootNodeClassName+" "+n:n;return rC.createElement("div",{id:this.rootNodeId,ref:this.rootRef,className:r,style:this.survey.themeVariables,lang:this.survey.locale||"en",dir:this.survey.localeDir},rC.createElement(rj,{disabled:this.survey.rootScrollDisabled},this.survey.needRenderIcons?rC.createElement(rz,null):null,rC.createElement(rU,null),rC.createElement("div",{className:this.survey.wrapperFormCss},t,rC.createElement("form",{onSubmit:function(e){e.preventDefault()}},rC.createElement(rj,{disabled:this.survey.formScrollDisabled},i,rC.createElement("div",{className:this.css.container},s,rC.createElement(rH,{survey:this.survey,container:"header",needRenderWrapper:!1}),e,rC.createElement(rH,{survey:this.survey,container:"footer",needRenderWrapper:!1})))),rC.createElement(rQ,{notifier:this.survey.notifier}))))}renderElement(){return this.doRender()}get css(){return this.survey.css}set css(e){this.survey.css=e}renderCompleted(){if(!this.survey.showCompletedPage)return null;var e={__html:this.survey.processedCompletedHtml};return rC.createElement(rC.Fragment,null,rC.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedCss}),rC.createElement(rH,{survey:this.survey,container:"completePage",needRenderWrapper:!1}))}renderCompletedBefore(){var e={__html:this.survey.processedCompletedBeforeHtml};return rC.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.completedBeforeCss})}
10renderLoading(){var e={__html:this.survey.processedLoadingHtml};return rC.createElement("div",{dangerouslySetInnerHTML:e,className:this.survey.loadingBodyCss})}renderSurvey(){var e=this.survey.activePage?this.renderPage(this.survey.activePage):null;this.survey.isShowStartingPage;var t=this.survey.activePage?this.survey.activePage.id:"";let s=this.survey.bodyCss,i={};return this.survey.renderedWidth&&(i.maxWidth=this.survey.renderedWidth),rC.createElement("div",{className:this.survey.bodyContainerCss},rC.createElement(rH,{survey:this.survey,container:"left"}),rC.createElement("div",{className:"sv-components-column sv-components-column--expandable"},rC.createElement(rH,{survey:this.survey,container:"center"}),rC.createElement("div",{id:t,className:s,style:i},rC.createElement(rH,{survey:this.survey,container:"contentTop"}),e,rC.createElement(rH,{survey:this.survey,container:"contentBottom"}),this.survey.showBrandInfo?rC.createElement(r_,null):null)),rC.createElement(rH,{survey:this.survey,container:"right"}))}renderPage(e){return rf.Instance.createElement(this.survey.pageComponent||"sv-page",{survey:this.survey,page:e,css:this.css,creator:this})}renderEmptySurvey(){return rC.createElement("div",{className:this.css.bodyEmpty},this.survey.emptySurveyText)}createSurvey(e){e||(e={}),this.previousJSON={},e?e.model?this.survey=e.model:e.json&&(this.previousJSON=e.json,this.survey=new ip(e.json)):this.survey=new ip,e.css&&(this.survey.css=this.css)}isModelJSONChanged(e){return e.model?this.survey!==e.model:!!e.json&&!w.isTwoValueEquals(e.json,this.previousJSON)}updateSurvey(e,t){if(e){for(var s in t=t||{},e)if("model"!=s&&"children"!=s&&"json"!=s){if("css"==s){this.survey.mergeValues(e.css,this.survey.getCss()),this.survey.updateNavigationCss(),this.survey.updateElementCss();continue}e[s]!==t[s]&&(0==s.indexOf("on")&&this.survey[s]&&this.survey[s].add?(t[s]&&this.survey[s].remove(t[s]),this.survey[s].add(e[s])):this.survey[s]=e[s])}}}setSurveyEvents(){var e=this;this.survey.renderCallback=function(){var t=e.state&&e.state.modelChanged?e.state.modelChanged:0;e.setState({modelChanged:t+1})},this.survey.onPartialSend.add(t=>{e.state&&e.setState(e.state)})}createQuestionElement(e){return rB.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})}renderError(e,t,s,i){return rf.Instance.createElement(this.survey.questionErrorComponent,{key:e,error:t,cssClasses:s,element:i})}questionTitleLocation(){return this.survey.questionTitleLocation}questionErrorLocation(){return this.survey.questionErrorLocation}}function rZ(e,t,s={processEsc:!0,disableTabStop:!1}){let i={};return t&&t.disableTabStop||s&&s.disableTabStop?i={tabIndex:-1}:(s=Object.assign({},s),i={tabIndex:0,onKeyUp:e=>{e.preventDefault(),e.stopPropagation(),ix(e,s)},onKeyDown:e=>iI(e,s),onBlur:e=>iV(e)}),i.onPointerUp=e=>{if("pen"===e.pointerType){e.preventDefault(),e.stopPropagation();let t=e.target;(null==t?void 0:t.click)&&t.click()}},rC.cloneElement(e,i)}rf.Instance.registerElement("survey",e=>rC.createElement(rG,e));class rJ extends rw{constructor(e){super(e),this.updateStateFunction=null,this.state={update:0}}get survey(){return this.props.survey}get css(){return this.props.css||this.survey.css}componentDidMount(){if(this.survey){var e=this;this.updateStateFunction=function(){e.setState({update:e.state.update+1})},this.survey.onPageVisibleChanged.add(this.updateStateFunction)}}componentWillUnmount(){this.survey&&this.updateStateFunction&&(this.survey.onPageVisibleChanged.remove(this.updateStateFunction),this.updateStateFunction=null)}}class rK extends rV{constructor(e){super(e),this.circleLength=440}getStateElement(){return this.timerModel}get timerModel(){return this.props.model}get progress(){return-this.timerModel.progress*this.circleLength}render(){if(!this.timerModel.isRunning)return null;let e=rC.createElement("div",{className:this.timerModel.survey.getCss().timerRoot},this.timerModel.text);if(this.timerModel.showTimerAsClock){let t={strokeDasharray:this.circleLength,strokeDashoffset:this.progress},s=this.timerModel.showProgress?rC.createElement(rE,{className:this.timerModel.getProgressCss(),style:t,iconName:"icon-timercircle",size:"auto"}):null;e=rC.createElement("div",{className:this.timerModel.rootCss},s,rC.createElement("div",{className:this.timerModel.textContainerCss},rC.createElement("span",{className:this.timerModel.majorTextCss},this.timerModel.clockMajorText),this.timerModel.clockMinorText?rC.createElement("span",{className:this.timerModel.minorTextCss},this.timerModel.clockMinorText):null))}return e}}rf.Instance.registerElement("sv-timerpanel",e=>rC.createElement(rK,e));class rY extends rw{constructor(e){super(e),this.element.cssClasse
10s,this.rootRef=rC.createRef()}getStateElement(){return this.element}get element(){return this.props.element}get index(){return this.props.index}get row(){return this.props.row}get survey(){return this.props.survey}get creator(){return this.props.creator}get css(){return this.props.css}componentDidMount(){super.componentDidMount(),this.rootRef.current&&this.element.setWrapperElement(this.rootRef.current)}componentWillUnmount(){super.componentWillUnmount(),this.element.setWrapperElement(void 0)}shouldComponentUpdate(e,t){return!!super.shouldComponentUpdate(e,t)&&(e.element!==this.element&&(e.element&&e.element.setWrapperElement(this.rootRef.current),this.element&&this.element.setWrapperElement(void 0)),this.element.cssClasses,!0)}renderElement(){let e=this.element,t=this.createElement(e,this.index),s=e.cssClassesValue;return rC.createElement("div",{className:s.questionWrapper,style:e.rootStyle,"data-key":e.name+this.index,onFocus:()=>{e&&e.isQuestion&&e.focusIn()},ref:this.rootRef},t)}createElement(e,t){if(!this.row.isNeedRender)return rf.Instance.createElement(e.skeletonComponentName,{element:e,css:this.css});let s=e.getTemplate();return rf.Instance.isElementRegistered(s)||(s="question"),rf.Instance.createElement(s,{element:e,creator:this.creator,survey:this.survey,css:this.css})}}class r$ extends rw{constructor(e){super(e),this.rootRef=rC.createRef(),this.recalculateCss()}recalculateCss(){this.row.visibleElements.map(e=>e.cssClasses)}getStateElement(){return this.row}get row(){return this.props.row}get survey(){return this.props.survey}get creator(){return this.props.creator}get css(){return this.props.css}canRender(){return!!this.row&&!!this.survey&&!!this.creator}renderElementContent(){let e=this.row.visibleElements.map((e,t)=>rC.createElement(rY,{element:e,index:t,row:this.row,survey:this.survey,creator:this.creator,css:this.css,key:e.id}));return rC.createElement("div",{ref:this.rootRef,className:this.row.getRowCss()},e)}renderElement(){let e=this.survey,t=this.renderElementContent();return rb.wrapRow(e,t,this.row)||t}componentDidMount(){super.componentDidMount();var e=this.rootRef.current;this.rootRef.current&&this.row.setRootElement(this.rootRef.current),e&&!this.row.isNeedRender&&(this.lazyRenderingTimeout=setTimeout(()=>{this.row.startLazyRendering(e)},10))}shouldComponentUpdate(e,t){return!!super.shouldComponentUpdate(e,t)&&(e.row!==this.row&&(e.row.isNeedRender=this.row.isNeedRender,e.row.setRootElement(this.rootRef.current),this.row.setRootElement(void 0),this.stopLazyRendering()),this.recalculateCss(),!0)}stopLazyRendering(){clearTimeout(this.lazyRenderingTimeout),this.row.stopLazyRendering(),this.row.isNeedRender=!this.row.isLazyRendering()}componentWillUnmount(){super.componentWillUnmount(),this.row&&!this.row.hasActiveUISubscribers&&(this.row.setRootElement(void 0),this.stopLazyRendering())}createElement(e,t){var s=e.getType();return rf.Instance.isElementRegistered(s)||(s="question"),rf.Instance.createElement(s,{key:e.name+(t?"-"+t:0),element:e,creator:this.creator,survey:this.survey,css:this.css})}}class rX extends rw{constructor(e){super(e),this.rootRef=rC.createRef()}getStateElement(){return this.panelBase}canUsePropInState(e){return"elements"!==e&&super.canUsePropInState(e)}get survey(){return this.getSurvey()}get creator(){return this.props.creator}get css(){return this.getCss()}get panelBase(){return this.getPanelBase()}getPanelBase(){return this.props.element||this.props.question}getSurvey(){return this.props.survey||(this.panelBase?this.panelBase.survey:null)}getCss(){return this.props.css}componentDidMount(){super.componentDidMount(),this.doAfterRender()}componentWillUnmount(){super.componentWillUnmount();var e=this.rootRef.current;e&&e.removeAttribute("data-rendered")}componentDidUpdate(e,t){super.componentDidUpdate(e,t),e.page&&this.survey&&this.survey.activePage&&e.page.id===this.survey.activePage.id||this.doAfterRender()}doAfterRender(){var e=this.rootRef.current;e&&this.survey&&(this.panelBase.isPanel?this.panelBase.afterRender(e):this.survey.afterRenderPage(e))}getIsVisible(){return this.panelBase.isVisible}
10canRender(){return super.canRender()&&!!this.survey&&!!this.panelBase&&!!this.panelBase.survey&&this.getIsVisible()}renderRows(e){return this.panelBase.visibleRows.map(t=>this.createRow(t,e))}createRow(e,t){return rC.createElement(r$,{key:e.id,row:e,survey:this.survey,creator:this.creator,css:t})}}class r1 extends rw{getStateElement(){return this.props.counter}renderElement(){return rC.createElement("div",{className:this.props.remainingCharacterCounter},this.props.counter.remainingCharacterCounter)}}rf.Instance.registerElement("sv-character-counter",e=>rC.createElement(r1,e));class r0 extends rw{constructor(e){super(e),this.initialValue=this.viewModel.getTextValue()||"",this.textareaRef=rC.createRef()}get viewModel(){return this.props.viewModel}canRender(){return!!this.viewModel.question}componentDidMount(){super.componentDidMount();let e=this.textareaRef.current;e&&this.viewModel.setElement(e)}componentWillUnmount(){super.componentWillUnmount(),this.viewModel.resetElement()}renderElement(){return rC.createElement("textarea",{id:this.viewModel.id,className:this.viewModel.className,ref:this.textareaRef,disabled:this.viewModel.isDisabledAttr,readOnly:this.viewModel.isReadOnlyAttr,rows:this.viewModel.rows,cols:this.viewModel.cols,placeholder:this.viewModel.placeholder,maxLength:this.viewModel.maxLength,defaultValue:this.initialValue,onChange:e=>{this.viewModel.onTextAreaInput(e)},onFocus:e=>{this.viewModel.onTextAreaFocus(e)},onBlur:e=>{this.viewModel.onTextAreaBlur(e)},onKeyDown:e=>{this.viewModel.onTextAreaKeyDown(e)},"aria-required":this.viewModel.ariaRequired,"aria-label":this.viewModel.ariaLabel,"aria-labelledby":this.viewModel.ariaLabelledBy,"aria-describedby":this.viewModel.ariaDescribedBy,"aria-invalid":this.viewModel.ariaInvalid,"aria-errormessage":this.viewModel.ariaErrormessage,style:{resize:this.viewModel.question.resizeStyle}})}}rf.Instance.registerElement("sv-text-area",e=>rC.createElement(r0,e));class r2 extends rI{renderCharacterCounter(){let e=null;return this.question.getMaxLength()&&(e=rC.createElement(r1,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter})),e}constructor(e){super(e)}renderElement(){if(this.question.isReadOnlyRenderDiv())return rC.createElement("div",null,this.question.value);let e=this.renderCharacterCounter(),t=this.props.question.textAreaModel;return rC.createElement(rC.Fragment,null,rC.createElement(r0,{viewModel:t}),e)}}class r5 extends rV{constructor(e){super(e),this.textAreaModel=this.getTextAreaModel()}canRender(){return!!this.props.question}getTextAreaModel(){return this.props.question.commentTextAreaModel}renderElement(){if(this.props.question.isReadOnlyRenderDiv()){let e=this.textAreaModel.getTextValue()||"";return rC.createElement("div",null,e)}return rC.createElement(r0,{key:this.getKey(),viewModel:this.textAreaModel})}getKey(){}}class r7 extends r5{constructor(e){super(e)}getTextAreaModel(){return this.props.question.getCommentTextAreaModel(this.props.item)}getKey(){return this.props.item.uniqueId}}rB.Instance.registerQuestion("comment",e=>rC.createElement(r2,e));class r4 extends rx{constructor(e){super(e),this.widgetRef=rC.createRef()}_afterRender(){if(this.questionBase.customWidget){let e=this.widgetRef.current;e&&(this.questionBase.customWidget.afterRender(this.questionBase,e),this.questionBase.customWidgetData.isNeedRender=!1)}}componentDidMount(){super.componentDidMount(),this.questionBase&&this._afterRender()}componentDidUpdate(e,t){super.componentDidUpdate(e,t);var s=!!this.questionBase.customWidget&&this.questionBase.customWidget.isDefaultRender;this.questionBase&&!s&&this._afterRender()}componentWillUnmount(){if(super.componentWillUnmount(),this.questionBase.customWidget){let e=this.widgetRef.current;e&&this.questionBase.customWidget.willUnmount(this.questionBase,e)}}canRender(){return super.canRender()&&this.questionBase.visible}renderElement(){let e=this.questionBase.customWidget;if(e.isDefaultRender)return rC.createElement("div",{ref:this.widgetRef},this.creator.createQuestionElement(this.questionBase));let t=null;if(e.widgetJson.render)t=e.widgetJson.render(this.questionBase);else if(e.htmlTemplate){let t={__html:e.htmlTemplate};return rC.createElement("div",{ref:this.widgetRef,dangerouslySetInnerHTML:t})}return rC.createElement("div",{ref:this.widgetRef},t)}}
10class r9 extends rw{get element(){return this.props.element}getRenderedElements(){return[this.element]}renderElement(){let e=this.element,t=e.hasTitle?rC.createElement(rq,{element:e}):null,s=e.hasDescriptionUnderTitle?rw.renderQuestionDescription(this.element):null,i=e.hasAdditionalTitleToolbar?rC.createElement(rN,{model:e.additionalTitleToolbar}):null,n={width:void 0};return e instanceof tz&&(n.width=e.titleWidth),rC.createElement("div",{className:e.cssHeader,onClick:t=>e.clickTitleFunction&&e.clickTitleFunction(t.nativeEvent),style:n},t,s,i)}}class r3 extends rV{constructor(e){super(e)}get css(){return this.props.css}get summary(){return this.props.summary}renderElement(){return this.summary?this.summary.isEmpty()?this.renderNoItems():this.renderItems():null}renderItems(){return rC.createElement("div",{className:this.css.summary},this.summary.items.map((e,t)=>this.renderItem(e,t)))}renderNoItems(){let e=this.summary.question;return rf.Instance.createElement("sv-placeholder-"+e.getTemplate(),{cssClasses:this.css,question:e})||rC.createElement("div",null,this.renderLocString(this.summary.noEntry))}renderItem(e,t){let s=e.btnEdit?rC.createElement("button",{className:this.css.summaryRowActionEdit,onClick:()=>e.btnEdit.action(),title:e.btnEdit.title},rC.createElement(rE,{iconName:"icon-editsmall-16x16",iconSize:"auto"})):null,i=e.showRemove&&e.btnRemove?rC.createElement("button",{className:this.css.summaryRowActionDelete,onClick:()=>e.btnRemove.action(),title:e.btnRemove.title},rC.createElement(rE,{iconName:"icon-delete-16x16",iconSize:"auto"})):null;return rC.createElement("div",{className:this.css.summaryRow,key:t},rC.createElement("div",{className:this.css.summaryRowContent},this.renderLocString(e.locText)),rC.createElement("div",{className:this.css.summaryRowActions},s,i))}}rf.Instance.registerElement("sv-singleinput-summary",e=>rC.createElement(r3,e));class r6 extends rw{constructor(e){super(e)}getStateElement(){return this.props.model}get items(){return this.props.model.actions}get css(){return this.props.css}renderElement(){if(!this.items||!this.items.length)return null;let e=this.renderItems();return rC.createElement("div",{className:this.css.breadcrumbsRoot},e)}renderItems(){let e=[];return this.items.concat([]).forEach((t,s)=>{s&&e.push(rC.createElement(rE,{key:t.renderedId+"_separator",className:this.css.breadcrumbsSeparator,iconName:"arrowright-16x16",size:"auto"})),e.push(rC.createElement(rR,{key:t.renderedId,item:t}))}),e}}rf.Instance.registerElement("sv-breadcrumbs",e=>rC.createElement(r6,e));class r8 extends rw{static renderQuestionBody(e,t){return t.customWidget?rC.createElement(r4,{creator:e,question:t}):e.createQuestionElement(t)}constructor(e){super(e),this.isNeedFocus=!1,this.rootRef=rC.createRef()}getStateElement(){return this.question}get question(){return this.props.element}get creator(){return this.props.creator}componentDidMount(){super.componentDidMount(),this.question&&(this.question.react=this),this.doAfterRender()}componentWillUnmount(){super.componentWillUnmount(),this.question&&(this.question.react=null);let e=this.rootRef.current;e&&e.removeAttribute("data-rendered")}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.doAfterRender()}doAfterRender(){if(this.isNeedFocus&&(this.question.isCollapsed||this.question.clickTitleFunction(),this.isNeedFocus=!1),this.question){var e=this.rootRef.current;e&&"r"!==e.getAttribute("data-rendered")&&(e.setAttribute("data-rendered","r"),this.question.afterRender&&this.question.afterRender(e))}}canRender(){return super.canRender()&&!!this.question&&!!this.creator}renderQuestionContent(){let e=this.question;var t={display:this.question.renderedIsExpanded?"":"none"},s=e.cssClasses,i=this.renderQuestion(),n=e&&e.hasComment?this.renderComment(s):null,r=e.hasDescriptionUnderInput?this.renderDescription():null;return rC.createElement("div",{className:e.cssContent||void 0,style:t,"aria-hidden":e.contentAriaHidden,role:"presentation","data-sv-drop-target-matrix":this.question.dragDropMatrixAttribute,"data-sv-drop-target-matrix-row":this.question.dragDropMatrixAttribute},i,n,r)}
10renderElement(){var e=this.question,t=e.cssClasses,s=this.renderHeader(e),i=e.hasTitleOnLeftTop?s:null,n=e.hasTitleOnBottom?s:null;let r=this.question.showErrorsAboveQuestion?this.renderErrors(t,""):null,a=this.question.showErrorsBelowQuestion?this.renderErrors(t,""):null,o=e.getRootStyle(),l=e.singleInputHasActions?this.renderSingleInputBreadcrumbs(e,t):void 0,u=(e.singleInputSummary?this.renderSingleInputSummary(e,t):void 0)||(e.singleInputQuestion?this.renderSingleInputQuestion(e,t):void 0)||this.wrapQuestionContent(this.renderQuestionContent());return rC.createElement(rC.Fragment,null,rC.createElement("div",{ref:this.rootRef,id:e.id,className:e.getRootCss(),style:o,"data-name":e.name,role:e.ariaRole,"aria-required":this.question.ariaRequired,"aria-invalid":this.question.ariaInvalid,"aria-label":this.question.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-expanded":e.ariaExpanded},l,r,i,u,n,a))}renderSingleInputQuestion(e,t){let s=e.singleInputQuestion,i=s.id;return rC.createElement(r8,{key:i,element:s,creator:this.creator,css:t})}renderSingleInputBreadcrumbs(e,t){return rC.createElement(r6,{model:e.singleInputActions,css:t})}renderSingleInputSummary(e,t){return rC.createElement(r3,{summary:e.singleInputSummary,creator:this.creator,css:t})}wrapElement(e){let t=this.question.survey,s=null;return t&&(s=rb.wrapElement(t,e,this.question)),null!=s?s:e}wrapQuestionContent(e){let t=this.question.survey,s=null;return t&&(s=rb.wrapQuestionContent(t,e,this.question)),null!=s?s:e}renderQuestion(){return r8.renderQuestionBody(this.creator,this.question)}renderDescription(){return rw.renderQuestionDescription(this.question)}renderComment(e){let t=rw.renderLocString(this.question.locCommentText);return rC.createElement("div",{className:this.question.getCommentAreaCss()},rC.createElement("div",null,t),rC.createElement(r5,{question:this.question,cssClasses:e,isDisplayMode:this.question.isInputReadOnly}))}renderHeader(e){return rC.createElement(r9,{element:e})}renderErrors(e,t){return rC.createElement(ae,{element:this.question,cssClasses:e,creator:this.creator,location:t,id:this.question.id+"_errors"})}}rf.Instance.registerElement("question",e=>rC.createElement(r8,e));class ae extends rV{constructor(e){super(e),this.state=this.getState()}get id(){return this.props.element.id+"_errors"}get element(){return this.props.element}get creator(){return this.props.creator}getState(e=null){return e?{error:e.error+1}:{error:0}}canRender(){return!!this.element&&this.element.hasVisibleErrors}componentWillUnmount(){}renderElement(){let e=[];for(let t=0;t<this.element.renderedErrors.length;t++){let s="error"+t;e.push(this.creator.renderError(s,this.element.renderedErrors[t],this.cssClasses,this.element))}return rC.createElement("div",{className:this.element.cssError,id:this.id},e)}}class at extends rV{constructor(e){super(e)}getStateElement(){return this.question}get question(){return this.getQuestion()}get creator(){return this.props.creator}getQuestion(){return this.props.question}get itemCss(){return this.props.itemCss}componentDidMount(){super.componentDidMount(),this.doAfterRender()}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.doAfterRender()}doAfterRender(){}canRender(){return!!this.question}renderContent(){var e=this.renderQuestion();return rC.createElement(rC.Fragment,null,e)}getShowErrors(){return this.question.isVisible}renderQuestion(){return r8.renderQuestionBody(this.creator,this.question)}}class as extends at{constructor(e){super(e),this.cellRef=rC.createRef()}componentWillUnmount(){if(super.componentWillUnmount(),this.question){var e=this.cellRef.current;e&&e.removeAttribute("data-rendered")}}renderCellContent(){return rC.createElement("div",{className:this.props.cell.cellQuestionWrapperClassName},this.renderQuestion())}renderElement(){var e=this.getCellStyle();let t=this.props.cell;return rC.createElement("td",{ref:this.cellRef,className:this.itemCss,colSpan:t.colSpans,title:t.getTitle(),style:e,onFocus:()=>{t.focusIn()}},this.wrapCell(this.props.cell,this.renderCellContent()))}getCellStyle(){return null}getHeaderText(){return""}wrapCell(e,t){if(!e)return t;let s=this.question.survey,i=null;return s&&(i=rb.wrapMatrixCell(s,t,e,this.props.reason)),null!=i?i:t}}class ai extends rC.Component{constructor(e){super(e),this.state={changed:0},this.question&&this.registerCallback(this.question)}get question(){return this.props.question}update(){this.setState({changed:this.state.changed+1})}getQuestionPropertiesToTrack(){return["errors"]}registerCallback(e){e.registerFunctionOnPropertiesValueChanged(this.getQuestionPropertiesToTrack(),()=>{this.update()},"__reactSubscription")}unRegisterCallback(e){e.unRegisterFunctionOnPropertiesValueChanged(this.getQuestionPropertiesToTrack(),"__reactSubscription")}componentDidUpdate(e){e.question&&e.question!==this.question&&this.unRegisterCallback(e.cell),this.question&&this.registerCallback(this.question)}componentWillUnmount(){this.question&&this.unRegisterCallback(this.question)}render(){return rC.createElement(ae,{element:this.question,creator:this.props.creator,cssClasse
10s:this.question.cssClasses})}}class an extends rX{constructor(e){super(e)}getPanelBase(){return this.props.page}get page(){return this.panelBase}renderElement(){var e=this.renderTitle(),t=this.renderDescription(),s=this.renderRows(this.panelBase.cssClasses);let i=rC.createElement(ae,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator});return rC.createElement("div",{ref:this.rootRef,className:this.page.cssRoot},e,t,i,s)}renderTitle(){return rC.createElement(rq,{element:this.page})}renderDescription(){if(!this.page._showDescription)return null;var e=rw.renderLocString(this.page.locDescription);return rC.createElement("div",{className:this.panelBase.cssClasses.page.description},e)}}rf.Instance.registerElement("sv-page",e=>rC.createElement(an,e));class ar extends rX{constructor(e){super(e),this.hasBeenExpanded=!1}get panel(){return this.panelBase}renderElement(){let e=this.renderHeader(),t=rC.createElement(ae,{element:this.panelBase,cssClasses:this.panelBase.cssClasses,creator:this.creator}),s={paddingLeft:this.panel.innerPaddingLeft,display:this.panel.renderedIsExpanded?void 0:"none"},i=null;if(this.panel.renderedIsExpanded){let e=this.renderRows(this.panelBase.cssClasses),t=this.panelBase.cssClasses.panel.content;i=this.renderContent(s,e,t)}let n=()=>{this.panelBase&&this.panelBase.focusIn()};return rC.createElement("div",{ref:this.rootRef,className:this.panelBase.getContainerCss(),onFocus:n,id:this.panelBase.id},this.panel.showErrorsAbovePanel?t:null,e,this.panel.showErrorsAbovePanel?null:t,i)}renderHeader(){return this.panel.hasTitle||this.panel.hasDescription?rC.createElement(r9,{element:this.panel}):null}wrapElement(e){let t=this.panel.survey,s=null;return t&&(s=rb.wrapElement(t,e,this.panel)),null!=s?s:e}renderContent(e,t,s){let i=this.renderBottom();return rC.createElement("div",{style:e,className:s,id:this.panel.contentId,role:this.panel.ariaRole,"aria-labelledby":this.panel.ariaLabelledBy,"aria-label":this.panel.ariaLabel},t,i)}renderTitle(){return this.panelBase.title?rC.createElement(rq,{element:this.panelBase}):null}renderDescription(){if(!this.panelBase.description)return null;var e=rw.renderLocString(this.panelBase.locDescription);return rC.createElement("div",{className:this.panel.cssClasses.panel.description},e)}renderBottom(){let e=this.panel.getFooterToolbar();return e.hasActions?rC.createElement(rN,{model:e}):null}getIsVisible(){return this.panelBase.getIsContentVisible()}}rf.Instance.registerElement("panel",e=>rC.createElement(ar,e));class aa extends ar{constructor(e){super(e)}get flowPanel(){return this.panel}componentDidMount(){super.componentDidMount(),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=function(){return""},this.flowPanel.onGetHtmlForQuestion=this.renderQuestion)}componentWillUnmount(){super.componentWillUnmount(),this.flowPanel&&(this.flowPanel.onCustomHtmlProducing=null,this.flowPanel.onGetHtmlForQuestion=null)}getQuestion(e){return this.flowPanel.getQuestionByName(e)}renderQuestion(e){return"<question>"+e.name+"</question>"}renderRows(){let e=this.renderHtml();return e?[e]:[]}getNodeIndex(){return this.renderedIndex++}renderHtml(){if(!this.flowPanel)return null;let e="<span>"+this.flowPanel.produceHtml()+"</span>";if(!DOMParser)return rC.createElement("div",{dangerouslySetInnerHTML:{__html:e}});let t=new DOMParser().parseFromString(e,"text/xml");return this.renderedIndex=0,this.renderParentNode(t)}renderNodes(e){let t=[];for(let s=0;s<e.length;s++){let i=this.renderNode(e[s]);i&&t.push(i)}return t}getStyle(e){let t={};return"b"===e.toLowerCase()&&(t.fontWeight="bold"),"i"===e.toLowerCase()&&(t.fontStyle="italic"),"u"===e.toLowerCase()&&(t.textDecoration="underline"),t}renderParentNode(e){let t=e.nodeName.toLowerCase(),s=this.renderNodes(this.getChildDomNodes(e));return"div"===t?rC.createElement("div",{key:this.getNodeIndex()},s):rC.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},s)}renderNode(e){if(!this.hasTextChildNodesOnly(e))return this.renderParentNode(e);let t=e.nodeName.toLowerCase();if("question"===t){let t=this.flowPanel.getQuestionByName(e.textContent);if(!t)return null;let s=rC.createElement(r8,{key:t.name,element:t,creator:this.creator,css:this.css});return rC.createElement("span",{key:this.getNodeIndex()},s)}return"div"===t?rC.createElement("div",{key:this.getNodeIndex()},e.textContent):rC.createElement("span",{key:this.getNodeIndex(),style:this.getStyle(t)},e.textContent)}getChildDomNodes(e){let t=[];for(let s=0;s<e.childNodes.length;s++)t.push(e.childNodes[s]);return t}hasTextChildNodesOnly(e){let t=e.childNodes;for(let e=0;e<t.length;e++)if("#text"!==t[e].nodeName.toLowerCase())return!1;return!0}renderContent(e,t){return rC.createElement("f-panel",{style:e},t)}}rf.Instance.registerElement("flowpanel",e=>rC.createElement(aa,e));class ao extends rx{constructor(e){super(e)}get question(){return this.questionBase}
10renderElement(){var e=this.question.cssClasses;return rC.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),ref:e=>this.setControl(e),role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage},this.renderHeader(),this.question.hasColumns?this.getColumnedBody(e):this.getBody(e),this.getFooter())}renderHeader(){return null}getFooter(){if(this.question.hasFootItems){let e=this.question.footItems.map((e,t)=>this.renderItem(e,!1,this.question.cssClasses));return rC.createElement(rC.Fragment,null,e)}return null}getStateValue(){}isItemChecked(e,t){return!1}getColumnedBody(e){return rC.createElement("div",{className:e.rootMultiColumn},this.getColumns(e))}getColumns(e){let t=this.getStateValue();return this.question.columns.map((s,i)=>{var n=s.map((s,n)=>this.renderItem(s,0===i&&0===n,e,""+i+n,this.isItemChecked(s,t)));return rC.createElement("div",{key:"column"+i+this.question.getItemsColumnKey(s),className:this.question.getColumnClass(),role:"presentation"},n)})}getBody(e){return this.question.blockedRow?rC.createElement("div",{className:e.rootRow},this.getItems(e,this.question.dataChoices)):rC.createElement(rC.Fragment,null,this.getItems(e,this.question.bodyItems))}getItems(e,t){let s=[],i=this.getStateValue();for(let n=0;n<t.length;n++){let r=t[n],a=this.renderItem(r,0==n,e,""+n,this.isItemChecked(r,i));a&&s.push(a)}return s}get textStyle(){return null}renderItem(e,t,s,i,n){let r=rf.Instance.createElement(this.question.itemComponent,{key:e.uniqueId,question:this.question,cssClasses:s,isDisplayMode:this.isDisplayMode,item:e,textStyle:this.textStyle,index:i,isFirst:t,isChecked:n,creator:this.props.creator}),a=this.question.survey,o=null;return a&&r&&(o=rb.wrapItemValue(a,r,this.question,e)),null!=o?o:r}}class al extends rV{constructor(e){super(e),this.handleOnChange=e=>{this.doOnItemChange(e)},this.rootRef=rC.createRef()}getStateElement(){return this.item}get question(){return this.props.question}get item(){return this.props.item}get textStyle(){return this.props.textStyle}get isFirst(){return this.props.isFirst}get index(){return this.props.index}get hideCaption(){return!0===this.props.hideCaption}get ariaLabel(){return this.props.ariaLabel||null}componentDidUpdate(e,t){super.componentDidUpdate(e,t),e.item!==this.props.item&&!this.question.isDesignMode&&(this.props.item&&this.props.item.setRootElement(this.rootRef.current),e.item&&e.item.setRootElement(void 0))}shouldComponentUpdate(e,t){return!!super.shouldComponentUpdate(e,t)&&(!this.question.customWidget||!!this.question.customWidgetData.isNeedRender||!!this.question.customWidget.widgetJson.isDefaultRender||!!this.question.customWidget.widgetJson.render)}doOnItemChange(e){}canRender(){return!!this.item&&!!this.question}renderElement(){return rC.createElement(rC.Fragment,null,this.renderElementContent(),this.renderPanel(),this.renderComment())}renderElementContent(){return null}get inputStyle(){return null}renderComment(){return this.item.isCommentShowing?rC.createElement("div",{className:this.question.getCommentAreaCss(!0)},rC.createElement(r7,{question:this.question,item:this.item,cssClasses:this.question.cssClasses})):null}renderPanel(){if(this.item.isPanelShowing){let e=this.item.panel;return rC.createElement(ar,{key:e.id,element:e,survey:this.question.survey,cssClasses:this.props.cssClasses,isDisplayMode:this.isDisplayMode,creator:this.props.creator})}return null}componentDidMount(){super.componentDidMount(),this.question.isDesignMode||this.item.setRootElement(this.rootRef.current)}componentWillUnmount(){super.componentWillUnmount(),this.question.isDesignMode||this.item.setRootElement(void 0)}}class au extends ao{constructor(e){super(e)}get question(){return this.questionBase}renderHeader(){return rC.createElement(rC.Fragment,null,rC.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),this.getHeader())}getHeader(){return this.question.hasHeadItems?this.question.headItems.map((e,t)=>
10this.renderItem(e,!1,this.question.cssClasses)):null}}class ah extends al{constructor(e){super(e)}doOnItemChange(e){this.question.clickItemHandler(this.item,e.target.checked)}renderElementContent(){let e=this.question.isItemSelected(this.item);return this.renderCheckbox(e)}get inputStyle(){return null}renderCheckbox(e){let t=this.question.getItemId(this.item),s=this.question.getItemClass(this.item),i=this.question.getLabelClass(this.item),n=this.hideCaption?null:rC.createElement("span",{className:this.cssClasses.controlLabel},this.renderLocString(this.item.locText,this.textStyle));return rC.createElement("div",{className:s,role:"presentation",ref:this.rootRef},rC.createElement("label",{className:i},rC.createElement("input",{className:this.cssClasses.itemControl,type:"checkbox",name:this.question.name+this.item.id,value:this.item.value,id:t,style:this.inputStyle,disabled:!this.question.getItemEnabled(this.item),readOnly:this.question.isReadOnlyAttr,checked:e,onChange:this.handleOnChange,required:this.question.hasRequiredError(),"aria-label":this.ariaLabel}),this.cssClasses.materialDecorator?rC.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?rC.createElement("svg",{className:this.cssClasses.itemDecorator},rC.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,n))}}rf.Instance.registerElement("survey-checkbox-item",e=>rC.createElement(ah,e)),rB.Instance.registerQuestion("checkbox",e=>rC.createElement(au,e));class ad extends rx{get question(){return this.questionBase}renderElement(){return this.question.selectToRankEnabled?rC.createElement("div",{className:this.question.rootClass,ref:e=>this.setControl(e)},rC.createElement("div",{className:this.question.getContainerClasses("from"),"data-ranking":"from-container"},this.getItems(this.question.renderedUnRankingChoices,!0),0===this.question.renderedUnRankingChoices.length?rC.createElement("div",{className:this.question.cssClasses.containerPlaceholder}," ",this.renderLocString(this.question.locSelectToRankEmptyRankedAreaText)," "):null),rC.createElement("div",{className:this.question.cssClasses.containersDivider}),rC.createElement("div",{className:this.question.getContainerClasses("to"),"data-ranking":"to-container"},this.getItems(),0===this.question.renderedRankingChoices.length?rC.createElement("div",{className:this.question.cssClasses.containerPlaceholder}," ",this.renderLocString(this.question.locSelectToRankEmptyUnrankedAreaText)," "):null)):rC.createElement("div",{className:this.question.rootClass,ref:e=>this.setControl(e)},this.getItems())}getItems(e=this.question.renderedRankingChoices,t){let s=[];for(let i=0;i<e.length;i++){let n=e[i];s.push(this.renderItem(n,i,e=>{this.question.handleKeydown.call(this.question,e,n)},e=>{e.persist(),this.question.handlePointerDown.call(this.question,e,n,e.currentTarget)},e=>{e.persist(),this.question.handlePointerUp.call(this.question,e,n,e.currentTarget)},this.question.cssClasses,this.question.getItemClass(n),this.question,t))}return s}renderItem(e,t,s,i,n,r,a,o,l){e.renderedId;let u=this.renderLocString(e.locText),h=this.question.getNumberByIndex(t),d=this.question.getItemTabIndex(e),c=rC.createElement(ac,{key:e.uniqueId,text:u,index:t,indexText:h,itemTabIndex:d,handleKeydown:s,handlePointerDown:i,handlePointerUp:n,cssClasses:r,itemClass:a,question:o,unrankedItem:l,item:e}),p=this.question.survey,g=null;return p&&(g=rb.wrapItemValue(p,c,this.question,e)),null!=g?g:c}}class ac extends rV{get text(){return this.props.text}get index(){return this.props.index}get indexText(){return this.props.indexText}get handleKeydown(){return this.props.handleKeydown}get handlePointerDown(){return this.props.handlePointerDown}get handlePointerUp(){return this.props.handlePointerUp}get cssClasses(){return this.props.cssClasses}get itemClass(){return this.props.itemClass}get itemTabIndex(){return this.props.itemTabIndex}get question(){return this.props.question}get unrankedItem(){return this.props.unrankedItem}get item(){return this.props.item}renderEmptyIcon(){return rC.createElement("svg",null,rC.createElement("use",{xlinkHref:this.question.dashSvgIcon}))}renderElement(){let e=rf.Instance.createElement(this.question.itemComponent,{item:this.item,cssClasse
10s:this.cssClasses});return rC.createElement("div",{id:this.question.getItemId(this.item),tabIndex:this.itemTabIndex,className:this.itemClass,onKeyDown:this.handleKeydown,onPointerDown:this.handlePointerDown,onPointerUp:this.handlePointerUp,"data-sv-drop-target-ranking-item":this.index},rC.createElement("div",{tabIndex:-1,style:{outline:"none"}},rC.createElement("div",{className:this.cssClasses.itemGhostNode}),rC.createElement("div",{className:this.cssClasses.itemContent},rC.createElement("div",{className:this.cssClasses.itemIconContainer},rC.createElement("svg",{className:this.question.getIconHoverCss()},rC.createElement("use",{xlinkHref:this.question.dragDropSvgIcon})),rC.createElement("svg",{className:this.question.getIconFocusCss()},rC.createElement("use",{xlinkHref:this.question.arrowsSvgIcon}))),rC.createElement("div",{className:this.question.getItemIndexClasses(this.item)},!this.unrankedItem&&this.indexText?this.indexText:this.renderEmptyIcon()),e)))}}class ap extends rV{get item(){return this.props.item}get cssClasses(){return this.props.cssClasses}renderElement(){return rC.createElement("div",{className:this.cssClasses.controlLabel},rw.renderLocString(this.item.locText))}}rf.Instance.registerElement("sv-ranking-item",e=>rC.createElement(ap,e)),rB.Instance.registerQuestion("ranking",e=>rC.createElement(ad,e));class ag extends rw{constructor(e){super(e),this.handleOnMouseDown=this.handleOnMouseDown.bind(this)}get question(){return this.props.question}get item(){return this.props.item}get index(){return this.props.index}getStateElement(){return this.item}handleOnMouseDown(e){this.question.onMouseDown()}}class am extends ag{render(){var e=this.renderLocString(this.item.locText);return rC.createElement("label",{className:this.item.className,onMouseDown:this.handleOnMouseDown},rC.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.questionName,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:()=>{},"aria-label":this.question.ariaLabel}),rC.createElement("span",{className:this.question.cssClasses.itemText,"data-text":this.item.text},e))}componentDidMount(){super.componentDidMount()}}rf.Instance.registerElement("sv-rating-item",e=>rC.createElement(am,e));class av extends ag{render(){return rC.createElement("label",{className:this.item.className,onMouseDown:this.handleOnMouseDown,onMouseOver:e=>this.question.onItemMouseIn(this.item),onMouseOut:e=>this.question.onItemMouseOut(this.item),title:this.item.text},rC.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.questionName,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:()=>{},"aria-label":this.question.ariaLabel}),rC.createElement(rE,{className:"sv-star",size:"auto",iconName:this.question.itemStarIcon}),rC.createElement(rE,{className:"sv-star-2",size:"auto",iconName:this.question.itemStarIconAlt}))}}rf.Instance.registerElement("sv-rating-item-star",e=>rC.createElement(av,e));class aC extends ag{render(){return rC.createElement("label",{style:this.item.style,className:this.item.className,onMouseDown:this.handleOnMouseDown,onMouseOver:e=>this.question.onItemMouseIn(this.item),onMouseOut:e=>this.question.onItemMouseOut(this.item),title:this.item.text},rC.createElement("input",{type:"radio",className:"sv-visuallyhidden",name:this.question.questionName,id:this.question.getInputId(this.index),value:this.item.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.value==this.item.value,onClick:this.props.handleOnClick,onChange:()=>{},"aria-label":this.question.ariaLabel}),rC.createElement(rE,{size:"auto",iconName:this.question.getItemSmileyIconName(this.item)}))}}rf.Instance.registerElement("sv-rating-item-smiley",e=>rC.createElement(aC,e));class ay extends rw{get item(){return this.props.item}getStateElement(){return this.item}
10render(){if(!this.item)return null;let e=this.props.item,t=this.renderDescription(e);return rC.createElement("div",{className:"sd-rating-dropdown-item"},rC.createElement("span",{className:"sd-rating-dropdown-item_text"},e.title),t)}renderDescription(e){return e.description?rC.createElement("div",{className:"sd-rating-dropdown-item_description"},this.renderLocString(e.description,void 0,"locString")):null}}rf.Instance.registerElement("sv-rating-dropdown-item",e=>rC.createElement(ay,e));class af extends rw{get model(){return this.props.model}get question(){return this.props.question}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.updateDomElement()}componentDidMount(){super.componentDidMount(),this.updateDomElement()}updateDomElement(){if(this.inputElement){let e=this.inputElement,t=this.model.inputStringRendered;w.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.model.inputStringRendered)}}onChange(e){var t;let s=null==(t=e.target.getRootNode())?void 0:t.activeElement;e.target===s&&(this.model.inputStringRendered=e.target.value)}keyhandler(e){this.model.inputKeyHandler(e)}onBlur(e){this.question.onBlur(e)}onFocus(e){this.question.onFocus(e)}constructor(e){super(e)}getStateElement(){return this.model}render(){return rC.createElement("div",{className:this.question.cssClasses.hint},this.model.showHintPrefix?rC.createElement("div",{className:this.question.cssClasses.hintPrefix},rC.createElement("span",null,this.model.hintStringPrefix)):null,rC.createElement("div",{className:this.question.cssClasses.hintSuffixWrapper},this.model.showHintString?rC.createElement("div",{className:this.question.cssClasses.hintSuffix},rC.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},this.model.inputStringRendered),rC.createElement("span",null,this.model.hintStringSuffix)):null,rC.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),inputMode:this.model.inputMode,ref:e=>this.inputElement=e,className:this.question.cssClasses.filterStringInput,disabled:this.question.isInputReadOnly,readOnly:!!this.model.filterReadOnly||void 0,size:this.model.inputStringRendered?void 0:1,role:this.model.ariaInputRole,"aria-required":this.model.ariaInputRequired,"aria-invalid":this.model.ariaInputInvalid,"aria-errormessage":this.model.ariaInputErrorMessage,"aria-expanded":this.model.ariaInputExpanded,"aria-label":this.model.ariaInputLabel,"aria-labelledby":this.model.ariaInputLabelledby,"aria-describedby":this.model.ariaInputDescribedby,"aria-controls":this.model.ariaInputControls,"aria-activedescendant":this.model.ariaInputActivedescendant,placeholder:this.model.filterStringPlaceholder,onKeyDown:e=>{this.keyhandler(e)},onChange:e=>{this.onChange(e)},onBlur:e=>{this.onBlur(e)},onFocus:e=>{this.onFocus(e)}})))}}rB.Instance.registerQuestion("sv-tagbox-filter",e=>rC.createElement(af,e));class ab extends rV{constructor(e){super(e),this.state={changed:0},this.setupModel()}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.setupModel()}componentDidMount(){super.componentDidMount(),this.setupModel()}componentWillUnmount(){super.componentWillUnmount(),this.item&&(this.item.locText.onChanged=()=>{})}setupModel(){if(!this.item.locText)return;let e=this;this.item.locText.onChanged=()=>{e.setState({changed:e.state.changed+1})}}getStateElement(){return this.item}get item(){return this.props.item}canRender(){return!!this.item}renderElement(){return rC.createElement("option",{value:this.item.value,disabled:!this.item.isEnabled},this.item.text)}}class aw extends rI{constructor(){super(...arguments),this.click=e=>{var t;null==(t=this.question.dropdownListModel)||t.onClick(e)},this.chevronPointerDown=e=>{var t;null==(t=this.question.dropdownListModel)||t.chevronPointerDown(e)},this.clear=e=>{var t;null==(t=this.question.dropdownListModel)||t.onClear(e)},this.keyhandler=e=>{var t;null==(t=this.question.dropdownListModel)||t.keyHandler(e)},this.blur=e=>{this.updateInputDomElement(),this.question.onBlur(e)},this.focus=e=>{this.question.onFocus(e)}}get dropdownListModel(){return this.question.dropdownListModel}getStateElement(){return this.question.dropdownListModel}setValueCore(e){this.questionBase.renderedValue=e}getValueCore(){return this.questionBase.renderedValue}renderReadOnlyElement(){return this.question.showInputFieldComponent?rC.createElement("div",{className:this.question.cssClasse
10s.controlValue},this.renderValueElement()):this.question.readOnlyText?rC.createElement("div",{className:this.question.cssClasses.controlValue},this.renderLocString(this.question.locReadOnlyText)):null}renderSelect(e){let t=null,s=this.dropdownListModel;return t=this.question.isReadOnly?rC.createElement("div",{id:this.question.inputId,role:null==s?void 0:s.ariaQuestionRole,"aria-label":null==s?void 0:s.ariaQuestionLabel,"aria-labelledby":null==s?void 0:s.ariaQuestionLabelledby,"aria-describedby":null==s?void 0:s.ariaQuestionDescribedby,"aria-expanded":"false","aria-readonly":"true","aria-disabled":"true",tabIndex:this.question.isDisabledAttr?void 0:0,className:this.question.getControlClass(),ref:e=>this.setControl(e)},this.renderReadOnlyElement(),this.renderEditorButtons()):rC.createElement(rC.Fragment,null,this.renderInput(),this.question.isInputReadOnly?null:rC.createElement(rA,{model:s.popupModel})),rC.createElement("div",{className:e.selectWrapper,onClick:this.click},t)}renderValueElement(){if(this.question.showInputFieldComponent){let e=this.dropdownListModel,t=e?e.getSelectedAction():this.question.selectedItem;return rf.Instance.createElement(this.question.inputFieldComponentName,{item:t,question:this.question})}return this.question.showSelectedItemLocText?this.renderLocString(this.question.selectedItemLocText):null}renderInput(){let e=this.dropdownListModel,t=this.renderValueElement();return rC.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.noTabIndex?void 0:0,disabled:this.question.isDisabledAttr,required:this.question.isRequired,onKeyDown:this.keyhandler,onBlur:this.blur,onFocus:this.focus,role:e.ariaQuestionRole,"aria-required":e.ariaQuestionRequired,"aria-invalid":e.ariaQuestionInvalid,"aria-errormessage":e.ariaQuestionErrorMessage,"aria-expanded":e.ariaQuestionExpanded,"aria-label":e.ariaQuestionLabel,"aria-labelledby":e.ariaQuestionLabelledby,"aria-describedby":e.ariaQuestionDescribedby,"aria-controls":e.ariaQuestionControls,"aria-activedescendant":e.ariaQuestionActivedescendant,ref:e=>this.setControl(e)},e.showHintPrefix?rC.createElement("div",{className:this.question.cssClasses.hintPrefix},rC.createElement("span",null,e.hintStringPrefix)):null,rC.createElement("div",{className:this.question.cssClasses.controlValue},e.showHintString?rC.createElement("div",{className:this.question.cssClasses.hintSuffix},rC.createElement("span",{style:{visibility:"hidden"},"data-bind":"text: model.filterString"},e.inputStringRendered),rC.createElement("span",null,e.hintStringSuffix)):null,t,e.needRenderInput?this.renderFilterInput():null),this.renderEditorButtons())}renderFilterInput(){let{root:e}=p.environment,t=this.dropdownListModel;return rC.createElement("input",{type:"text",autoComplete:"off",id:this.question.getInputId(),ref:e=>this.inputElement=e,className:this.question.cssClasses.filterStringInput,role:t.ariaInputRole,"aria-required":t.ariaInputRequired,"aria-invalid":t.ariaInputInvalid,"aria-errormessage":t.ariaInputErrorMessage,"aria-expanded":t.ariaInputExpanded,"aria-label":t.ariaInputLabel,"aria-labelledby":t.ariaInputLabelledby,"aria-describedby":t.ariaInputDescribedby,"aria-controls":t.ariaInputControls,"aria-activedescendant":t.ariaInputActivedescendant,placeholder:t.placeholderRendered,readOnly:!!t.filterReadOnly||void 0,tabIndex:t.noTabIndex?void 0:-1,disabled:this.question.isDisabledAttr,inputMode:t.inputMode,onChange:e=>{var s;let i;i=null==(s=e.target.getRootNode())?void 0:s.activeElement,e.target===i&&(t.inputStringRendered=e.target.value)},onBlur:this.blur,onFocus:this.focus})}renderOther(e,t){return e&&e.isCommentShowing?rC.createElement("div",{key:e.uniqueId,className:this.question.getCommentAreaCss(!0)},rC.createElement(r7,{question:this.question,item:e,cssClasses:this.question.cssClasses})):null}renderEditorButtons(){return rC.createElement(rN,{model:this.dropdownListModel.editorButtons})}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.updateInputDomElement()}componentDidMount(){super.componentDidMount(),this.updateInputDomElement()}componentWillUnmount(){super.componentWillUnmount(),this.question.dropdownListModel&&(this.question.dropdownListModel.focused=!1)}updateInputDomElement(){if(this.inputElement){let e=this.inputElement,t=this.question.dropdownListModel.inputStringRendered;w.isTwoValueEquals(t,e.value,!1,!0,!1)||(e.value=this.question.dropdownListModel.inputStringRendered)}}}class aV extends aw{constructor(e){super(e)}
10renderElement(){let e=this.question.cssClasses,t=this.renderOther(this.question.selectedItem,e),s=this.renderSelect(e);return rC.createElement("div",{className:this.question.renderCssRoot},s,t)}}rB.Instance.registerQuestion("dropdown",e=>rC.createElement(aV,e));class ax extends rV{constructor(e){super(e)}get question(){return this.props.question}get item(){return this.props.item}canRender(){return!!this.item&&!!this.question}renderElement(){let e=this.renderLocString(this.item.locText),t=e=>{this.question.dropdownListModel.deselectItem(this.item.value),e.stopPropagation()};return rC.createElement("div",{className:"sv-tagbox__item"},rC.createElement("div",{className:"sv-tagbox__item-text"},e),rC.createElement("div",{className:this.question.cssClasses.cleanItemButton,onClick:t},rC.createElement(rE,{className:this.question.cssClasses.cleanItemButtonSvg,iconName:this.question.cssClasses.cleanItemButtonIconId,size:"auto"})))}}class aI extends aw{constructor(e){super(e)}renderItem(e,t){return rC.createElement(ax,{key:e,question:this.question,item:t})}renderInput(){let e=this.dropdownListModel,t=this.question.selectedChoices.map((e,t)=>this.renderItem("item"+t,e));return rC.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),tabIndex:e.noTabIndex?void 0:0,disabled:this.question.isInputReadOnly,required:this.question.isRequired,onKeyDown:this.keyhandler,onBlur:this.blur,role:e.ariaQuestionRole,"aria-required":e.ariaQuestionRequired,"aria-invalid":e.ariaQuestionInvalid,"aria-errormessage":e.ariaQuestionErrorMessage,"aria-label":e.ariaQuestionLabel,"aria-labelledby":e.ariaQuestionLabelledby,"aria-describedby":e.ariaQuestionDescribedby,"aria-expanded":e.ariaQuestionExpanded,"aria-controls":e.ariaQuestionControls,"aria-activedescendant":e.ariaQuestionActivedescendant,ref:e=>this.setControl(e)},rC.createElement("div",{className:this.question.cssClasses.controlValue},t,e.needRenderInput?rC.createElement(af,{model:e,question:this.question}):null),this.renderEditorButtons())}renderElement(){let e=this.question.cssClasses,t=this.renderOther(this.question.otherItem,e),s=this.renderSelect(e);return rC.createElement("div",{className:this.question.renderCssRoot},s,t)}}rB.Instance.registerQuestion("tagbox",e=>rC.createElement(aI,e));class aE extends aV{constructor(e){super(e)}renderSelect(e){let t=e=>{this.question.onClick(e)},s=e=>{this.question.onKeyUp(e)},i=this.isDisplayMode?rC.createElement("div",{id:this.question.inputId,className:this.question.getControlClass(),disabled:!0},this.question.readOnlyText):rC.createElement("select",{id:this.question.inputId,className:this.question.getControlClass(),ref:e=>this.setControl(e),autoComplete:this.question.autocomplete,onChange:this.updateValueOnEvent,onInput:this.updateValueOnEvent,onClick:t,onKeyUp:s,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage,required:this.question.isRequired},this.question.allowClear?rC.createElement("option",{value:""},this.question.placeholder):null,this.question.visibleChoices.map(e=>rC.createElement(ab,{key:e.uniqueId,item:e})));return rC.createElement("div",{className:e.selectWrapper},i,this.createChevronButton())}createChevronButton(){return this.question.cssClasses.chevronButtonIconId?rC.createElement("div",{className:this.question.cssClasses.chevronButton,"aria-hidden":"true",onPointerDown:this.chevronPointerDown},rC.createElement(rE,{className:this.question.cssClasses.chevronButtonSvg,iconName:this.question.cssClasses.chevronButtonIconId,size:"auto"})):null}}rB.Instance.registerQuestion("sv-dropdown-select",e=>rC.createElement(aE,e)),tM.Instance.registerRenderer("dropdown","select","sv-dropdown-select");class aS extends rx{constructor(e){super(e),this.state={rowsChanged:0}}get question(){return this.questionBase}componentDidMount(){if(super.componentDidMount(),this.question){var e=this;this.question.visibleRowsChangedCallback=function(){e.setState({rowsChanged:e.state.rowsChanged+1})}}}componentWillUnmount(){super.componentWillUnmount(),this.question&&(this.question.visibleRowsChangedCallback=null)}
10renderElement(){for(var e=this.question.cssClasses,t=this.question.hasRows?rC.createElement("td",null):null,s=[],i=0;i<this.question.visibleColumns.length;i++){var n=this.question.visibleColumns[i],r=this.renderLocString(n.locText);let e={};this.question.columnMinWidth&&(e.minWidth=this.question.columnMinWidth,e.width=this.question.columnMinWidth),s.push(rC.createElement("th",{className:this.question.cssClasses.headerCell,style:e,key:n.uniqueId},this.wrapCell({column:n},r,"column-header")))}for(var a=[],o=this.question.visibleRows,i=0;i<o.length;i++){var l=o[i];a.push(rC.createElement(aP,{key:l.uniqueId,question:this.question,cssClasses:e,row:l,isFirst:0==i}))}var u=this.question.showHeader?rC.createElement("thead",{role:"presentation"},rC.createElement("tr",null,t,s)):null;return rC.createElement("div",{className:this.question.getTableWrapperCss(),ref:e=>this.setControl(e)},rC.createElement("fieldset",{role:"radiogroup"},rC.createElement("legend",{className:"sv-visuallyhidden"},this.question.locTitle.renderedHtml),rC.createElement("table",{className:this.question.getTableCss(),role:"presentation"},u,rC.createElement("tbody",null,a))))}}class aP extends rV{constructor(e){super(e)}getStateElement(){return this.row?this.row.item:super.getStateElement()}get question(){return this.props.question}get row(){return this.props.row}wrapCell(e,t,s){if(!s)return t;let i=this.question.survey,n=null;return i&&(n=rb.wrapMatrixCell(i,t,e,s)),null!=n?n:t}canRender(){return!!this.row}renderElement(){var e=null;if(this.question.hasRows){var t=this.renderLocString(this.row.locText);let s={};this.question.rowTitleWidth&&(s.minWidth=this.question.rowTitleWidth,s.width=this.question.rowTitleWidth),e=rC.createElement("td",{style:s,className:this.row.rowTextClasses},this.wrapCell({row:this.row},t,"row-header"))}var s=this.generateTds();return rC.createElement("tr",{className:this.row.rowClasses||void 0},e,s)}generateTds(){let e=[],t=this.row,s=this.question.cellComponent;for(var i=0;i<this.question.visibleColumns.length;i++){let n=null,r=this.question.visibleColumns[i],a=r.uniqueId,o=this.question.getItemClass(t,r);if(this.question.hasCellText){let e=e=>()=>this.cellClick(t,e);n=rC.createElement("td",{key:a,className:o,onClick:e(r)},this.renderLocString(this.question.getCellDisplayLocText(t.name,r)))}else{let e=rf.Instance.createElement(s,{question:this.question,row:this.row,column:r,columnIndex:i,cssClasses:this.cssClasses,cellChanged:()=>{this.cellClick(this.row,r)}});n=rC.createElement("td",{key:a,"data-responsive-title":r.locText.renderedHtml,className:this.question.cssClasses.cell},e)}e.push(n)}return e}cellClick(e,t){e.cellClick(t),this.setState({value:e.value})}}class aR extends rV{constructor(e){super(e),this.handleOnMouseDown=this.handleOnMouseDown.bind(this),this.handleOnChange=this.handleOnChange.bind(this)}handleOnChange(e){this.props.cellChanged&&this.props.cellChanged(),this.setState({value:this.row.isChecked(this.column)})}handleOnMouseDown(e){this.question.onMouseDown()}get question(){return this.props.question}get row(){return this.props.row}get column(){return this.props.column}get columnIndex(){return this.props.columnIndex}canRender(){return!!this.question&&!!this.row}renderElement(){let e=this.row.isChecked(this.column),t=this.question.inputId+"_"+this.row.name+"_"+this.columnIndex,s=this.question.getItemClass(this.row,this.column),i=this.question.getItemSvgIcon(this.row,this.column),n=this.question.isMobile?rC.createElement("span",{className:this.question.cssClasses.cellResponsiveTitle},this.renderLocString(this.column.locText)):void 0;return rC.createElement("label",{onMouseDown:this.handleOnMouseDown,className:s},this.renderInput(t,e),rC.createElement("span",{className:this.question.cssMaterialDecorator},i?rC.createElement("svg",{className:this.question.cssItemDecorator},rC.createElement("use",{xlinkHref:i})):null),n)}renderInput(e,t){return rC.createElement("input",{id:e,type:this.question.checkType,className:this.question.cssItemValue,name:this.row.fullName,value:this.column.value,disabled:this.row.isDisabledAttr,readOnly:this.row.isReadOnlyAttr,checked:t,onChange:this.handleOnChange,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.getCellAriaLabel(this.row,this.column),"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage})}}rf.Instance.registerElement("survey-matrix-cell",e=>rC.createElement(aR,e)),rB.Instance.registerQuestion("matrix",e=>rC.createElement(aS,e));class aT extends rx{constructor(e){super(e)}get question(){return this.questionBase}componentDidMount(){this.reactOnStrChanged()}componentWillUnmount(){this.question.locHtml.onChanged=function(){}}componentDidUpdate(e,t){this.reactOnStrChanged()}reactOnStrChanged(){this.question.locHtml.onChanged=()=>{this.setState({changed:this.state&&this.state.changed?this.state.changed+1:1})}}canRender(){return super.canRender()&&!!this.question.html}renderElement(){var e={__html:this.question.locHtml.renderedHtml};return rC.createElement("div",{className:this.question.renderCssRoot,dangerouslySetInnerHTML:e})}}rB.Instance.registerQuestion("html",e=>rC.createElement(aT,e));class aA extends rC.Component{render(){return rC.createElement("div",{className:"sd-loading-indicator"},rC.createElement(rE,{iconName:"icon-loading",size:"auto"}))}}class aL extends rx{constructor(e){super(e)}get question(){return this.questionBase}renderElement(){let e,t=this.question.allowShowPreview?this.renderPreview():null,s=this.question.showLoadingIndicator?this.renderLoadingIndicator():null,i=this.question.isPlayingVideo?this.renderVideo():null,n=this.question.showFileDecorator?this.renderFileDecorator():null,r=this.question.fileNavigatorVisible?rC.createElement(rN,{model:this.question.fileNavigator}):null,a=this.question.renderedAcceptedTypes,o=this.isDisplayMode?this.question.getReadOnlyFileCss():this.question.cssClasse
10s.fileInput,l=this.isDisplayMode?{color:"transparent"}:{};return e=this.question.isReadOnlyAttr?rC.createElement("input",{readOnly:!0,type:"file",className:o,id:this.question.inputId,ref:e=>this.setControl(e),style:l,multiple:this.question.allowMultiple,placeholder:this.question.title,accept:a}):this.question.isDisabledAttr?rC.createElement("input",{disabled:!0,type:"file",className:o,id:this.question.inputId,ref:e=>this.setControl(e),style:l,multiple:this.question.allowMultiple,placeholder:this.question.title,accept:a}):this.question.hasFileUI?rC.createElement("input",{type:"file",disabled:this.isDisplayMode,tabIndex:-1,className:o,id:this.question.inputId,ref:e=>this.setControl(e),style:l,"aria-required":this.question.ariaRequired,"aria-label":this.question.ariaLabel,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage,multiple:this.question.allowMultiple,title:this.question.inputTitle,accept:a,capture:this.question.renderCapture}):null,rC.createElement("div",{className:this.question.fileRootCss,ref:e=>this.setContent(e)},e,rC.createElement("div",{className:this.question.cssClasses.dragArea,onDrop:this.question.onDrop,onDragOver:this.question.onDragOver,onDragLeave:this.question.onDragLeave,onDragEnter:this.question.onDragEnter},n,s,i,t,r))}renderFileDecorator(){let e=this.question.actionsContainerVisible?rC.createElement(rN,{model:this.question.actionsContainer}):null;return rC.createElement("div",{className:this.question.getFileDecoratorCss()},!!this.question.showDragAreaPlaceholder&&rC.createElement("span",{className:this.question.cssClasses.dragAreaPlaceholder},this.renderLocString(this.question.locRenderedPlaceholder)),rC.createElement("div",{className:this.question.cssClasses.wrapper},e))}renderPreview(){return rf.Instance.createElement("sv-file-preview",{question:this.question})}renderLoadingIndicator(){return rC.createElement("div",{className:this.question.cssClasses.loadingIndicator},rC.createElement(aA,null))}renderVideo(){return rC.createElement("div",{className:this.question.cssClasses.videoContainer},rC.createElement(rR,{item:this.question.changeCameraAction}),rC.createElement(rR,{item:this.question.closeCameraAction}),rC.createElement("video",{autoPlay:!0,playsInline:!0,id:this.question.videoId,className:this.question.cssClasses.video}),rC.createElement(rR,{item:this.question.takePictureAction}))}}rB.Instance.registerQuestion("file",e=>rC.createElement(aL,e));class aD extends rV{constructor(e){super(e)}get question(){return this.props.item&&this.props.item.data.question||this.props.data.question}render(){return rZ(rC.createElement("label",{tabIndex:0,className:this.question.getChooseFileCss(),htmlFor:this.question.inputId,"aria-label":this.question.chooseButtonText,onClick:e=>this.question.chooseFile(e.nativeEvent)},this.question.cssClasses.chooseFileIconId?rC.createElement(rE,{title:this.question.chooseButtonText,iconName:this.question.cssClasses.chooseFileIconId,size:"auto"}):null,rC.createElement("span",null,this.question.chooseButtonText)))}}rf.Instance.registerElement("sv-file-choose-btn",e=>rC.createElement(aD,e));class aO extends rw{get question(){return this.props.question}get page(){return this.props.page}renderElement(){let e=this.page.items.map((e,t)=>rf.Instance.createElement("sv-file-item",{item:e,question:this.question,key:t}));return rC.createElement("div",{className:this.page.css,id:this.page.id},e)}}class aN extends rw{get question(){return this.props.question}renderFileSign(e,t){return e&&t.name?rC.createElement("div",{className:e},rC.createElement("a",{href:t.content,onClick:e=>{this.question.doDownloadFile(e,t)},title:t.name,download:t.name,style:{width:this.question.imageWidth}},t.name)):null}renderElement(){let e=this.question.renderedPages.map((e,t)=>rC.createElement(aO,{page:e,question:this.question,key:e.id}));return rC.createElement("div",{className:this.question.cssClasses.fileList||void 0},e)}canRender(){return this.question.showPreviewContainer}}rf.Instance.registerElement("sv-file-preview",e=>rC.createElement(aN,e));class aM extends rw{get question(){return this.props.question}get item(){return this.props.item}renderFileSign(e,t){return e&&t.name?rC.createElement("div",{className:e},rC.createElement("a",{href:t.content,onClick:e=>{this.question.doDownloadFile(e,t)},title:t.name,download:t.name,target:"_blank",rel:"noreferrer",style:{width:this.question.imageWidth}},t.name)):null}renderElement(){let e=this.item;return rC.createElement("span",{className:this.question.cssClasse
10s.previewItem,onClick:e=>this.question.doDownloadFileFromContainer(e)},this.renderFileSign(this.question.cssClasses.fileSign,e),rC.createElement("div",{className:this.question.getImageWrapperCss(e)},this.question.canPreviewImage(e)?rC.createElement("img",{src:e.content,style:{height:this.question.imageHeight,width:this.question.imageWidth},alt:"File preview"}):this.question.cssClasses.defaultImage?rC.createElement(rE,{iconName:this.question.cssClasses.defaultImageIconId,size:"auto",className:this.question.cssClasses.defaultImage}):null,e.name&&!this.question.isReadOnly?rC.createElement("div",{className:this.question.getRemoveButtonCss(),onClick:t=>this.question.doRemoveFile(e,t)},rC.createElement("span",{className:this.question.cssClasses.removeFile},this.question.removeFileCaption),this.question.cssClasses.removeFileSvgIconId?rC.createElement(rE,{title:this.question.removeFileCaption,iconName:this.question.cssClasses.removeFileSvgIconId,size:"auto",className:this.question.cssClasses.removeFileSvg}):null):null),this.renderFileSign(this.question.cssClasses.fileSignBottom,e))}canRender(){return this.question.showPreviewContainer}}rf.Instance.registerElement("sv-file-item",e=>rC.createElement(aM,e));class ak extends rx{constructor(e){super(e)}get question(){return this.questionBase}renderElement(){for(var e=this.question.cssClasses,t=this.question.getRows(),s=[],i=0;i<t.length;i++)t[i].isVisible&&s.push(this.renderRow(i,t[i].cells,e));return rC.createElement("table",{className:this.question.getQuestionRootCss()},rC.createElement("tbody",null,s))}renderCell(e,t,s){let i;return i=e.isErrorsCell?rC.createElement(ai,{question:e.item.editor,creator:this.creator}):rC.createElement(aq,{question:this.question,item:e.item,creator:this.creator,cssClasses:t}),rC.createElement("td",{key:e.item.id,className:e.className,onFocus:()=>{e.item.focusIn()}},i)}renderRow(e,t,s){let i=[];for(let e=0;e<t.length;e++){let n=t[e];i.push(this.renderCell(n,s,e))}return rC.createElement("tr",{key:"item"+e,className:s.row},i)}}class aq extends rV{get question(){return this.props.question}get item(){return this.props.item}getStateElements(){return[this.item,this.item.editor]}get creator(){return this.props.creator}renderElement(){let e=this.item,t=this.cssClasses,s={};return this.question.itemTitleWidth&&(s.minWidth=this.question.itemTitleWidth,s.width=this.question.itemTitleWidth),rC.createElement("label",{className:this.question.getItemLabelCss(e)},rC.createElement("span",{className:t.itemTitle,style:s},rC.createElement(rM,{element:e.editor,cssClasses:e.editor.cssClasses})),rC.createElement(aF,{cssClasses:t,itemCss:this.question.getItemCss(),question:e.editor,creator:this.creator}))}}class aF extends at{renderElement(){return rC.createElement("div",{className:this.itemCss},this.renderContent())}}rB.Instance.registerQuestion("multipletext",e=>rC.createElement(ak,e));class aB extends ao{constructor(e){super(e)}get question(){return this.questionBase}getFooter(){return rC.createElement(rC.Fragment,null,super.getFooter(),this.renderClearButton())}renderClearButton(){return this.question.showClearButtonInContent?rC.createElement("div",null,rC.createElement("input",{type:"button",className:this.question.cssClasses.clearButton,onClick:()=>this.question.clearValueFromUI(),value:this.question.clearButtonCaption})):null}getStateValue(){return this.question.isEmpty()?"":this.question.renderedValue}isItemChecked(e,t){return e.value===t}}class a_ extends al{constructor(e){super(e),this.handleOnMouseDown=this.handleOnMouseDown.bind(this)}getStateElement(){return this.item}get question(){return this.props.question}get isChecked(){return this.props.isChecked}doOnItemChange(e){this.question.clickItemHandler(this.item)}handleOnMouseDown(e){this.question.onMouseDown()}renderElementContent(){return this.renderRadioButton()}renderRadioButton(){var e=this.question.getItemClass(this.item),t=this.question.getLabelClass(this.item),s=this.question.getControlLabelClass(this.item);let i=this.hideCaption?null:rC.createElement("span",{className:s},this.renderLocString(this.item.locText,this.textStyle));return rC.createElement("div",{className:e,role:"presentation",ref:this.rootRef},rC.createElement("label",{onMouseDown:this.handleOnMouseDown,className:t},rC.createElement("input",{"aria-errormessage":this.question.ariaErrormessage,className:this.cssClasse
10s.itemControl,id:this.question.getItemId(this.item),type:"radio",name:this.question.questionName,checked:this.isChecked,value:this.item.value,disabled:!this.question.getItemEnabled(this.item),readOnly:this.question.isReadOnlyAttr,onChange:this.handleOnChange,"aria-label":this.ariaLabel}),this.cssClasses.materialDecorator?rC.createElement("span",{className:this.cssClasses.materialDecorator},this.question.itemSvgIcon?rC.createElement("svg",{className:this.cssClasses.itemDecorator},rC.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,i))}}rf.Instance.registerElement("survey-radiogroup-item",e=>rC.createElement(a_,e)),rB.Instance.registerQuestion("radiogroup",e=>rC.createElement(aB,e));class aQ extends rI{constructor(e){super(e)}renderInput(){let e=this.question.getControlClass(),t=this.question.renderedPlaceholder;if(this.question.isReadOnlyRenderDiv())return rC.createElement("div",null,this.question.inputValue);let s=this.question.getMaxLength()?rC.createElement(r1,{counter:this.question.characterCounter,remainingCharacterCounter:this.question.cssClasses.remainingCharacterCounter}):null;return rC.createElement(rC.Fragment,null,rC.createElement("input",{id:this.question.inputId,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,className:e,type:this.question.inputType,ref:e=>this.setControl(e),style:this.question.inputStyle,maxLength:this.question.getMaxLength(),min:this.question.renderedMin,max:this.question.renderedMax,step:this.question.renderedStep,size:this.question.inputSize,placeholder:t,list:this.question.dataListId,autoComplete:this.question.autocomplete,onBlur:e=>{this.question.onBlur(e)},onFocus:e=>{this.question.onFocus(e)},onChange:this.question.onChange,onClick:this.question.readOnlyBlocker,onPointerDown:this.question.readOnlyBlocker,onKeyUp:this.question.onKeyUp,onKeyDown:this.question.onKeyDown,onCompositionUpdate:e=>this.question.onCompositionUpdate(e.nativeEvent),"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}),s)}renderElement(){return this.question.dataListId?rC.createElement("div",null,this.renderInput(),this.renderDataList()):this.renderInput()}setValueCore(e){this.question.inputValue=e}getValueCore(){return this.question.inputValue}renderDataList(){if(!this.question.dataListId)return null;var e=this.question.dataList;if(0==e.length)return null;for(var t=[],s=0;s<e.length;s++)t.push(rC.createElement("option",{key:"item"+s,value:e[s]}));return rC.createElement("datalist",{id:this.question.dataListId},t)}}rB.Instance.registerQuestion("text",e=>rC.createElement(aQ,e));class aH extends rx{constructor(e){super(e),this.handleOnChange=this.handleOnChange.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.handleOnLabelClick=this.handleOnLabelClick.bind(this),this.handleOnSwitchClick=this.handleOnSwitchClick.bind(this),this.handleOnKeyDown=this.handleOnKeyDown.bind(this),this.checkRef=rC.createRef()}getStateElement(){return this.question}get question(){return this.questionBase}doCheck(e){this.question.booleanValue=e}handleOnChange(e){this.doCheck(e.target.checked)}handleOnClick(e){this.question.onLabelClick(e,!0)}handleOnSwitchClick(e){this.question.onSwitchClickModel(e.nativeEvent)}handleOnLabelClick(e,t){this.question.onLabelClick(e,t)}handleOnKeyDown(e){this.question.onKeyDownCore(e)}updateDomElement(){if(!this.question)return;let e=this.checkRef.current;e&&(e.indeterminate=this.question.isIndeterminate),this.setControl(e),super.updateDomElement()}renderElement(){let e=this.question.cssClasses,t=this.question.getItemCss();return rC.createElement("div",{className:e.root,onKeyDown:this.handleOnKeyDown},rC.createElement("label",{className:t},rC.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:e.control,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}),rC.createElement("div",{className:e.sliderGhost,onClick:e=>this.handleOnLabelClick(e,this.question.swapOrder)},rC.createElement("span",{className:this.question.getLabelCss(this.question.swapOrder)},this.renderLocString(this.question.locLabelLeft))),rC.createElement("div",{className:e.switch,onClick:this.handleOnSwitchClick},rC.createElement("span",{className:e.slider},this.question.isDeterminated&&e.sliderText?rC.createElement("span",{className:e.sliderText},this.renderLocString(this.question.getCheckedLabel())):null)),rC.createElement("div",{className:e.sliderGhost,onClick:e=>this.handleOnLabelClick(e,!this.question.swapOrder)},rC.createElement("span",{className:this.question.getLabelCss(!this.question.swapOrder)},this.renderLocString(this.question.locLabelRight)))))}}rB.Instance.registerQuestion("boolean",e=>rC.createElement(aH,e));class az extends aH{constructor(e){super(e)}
10renderElement(){let e=this.question.cssClasses,t=this.question.getCheckboxItemCss(),s=this.question.canRenderLabelDescription?rw.renderQuestionDescription(this.question):null;return rC.createElement("div",{className:e.rootCheckbox},rC.createElement("div",{className:t},rC.createElement("label",{className:e.checkboxLabel},rC.createElement("input",{ref:this.checkRef,type:"checkbox",name:this.question.name,value:null===this.question.booleanValue?"":this.question.booleanValue,id:this.question.inputId,className:e.controlCheckbox,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,checked:this.question.booleanValue||!1,onChange:this.handleOnChange,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage}),rC.createElement("span",{className:e.checkboxMaterialDecorator},this.question.svgIcon?rC.createElement("svg",{className:e.checkboxItemDecorator},rC.createElement("use",{xlinkHref:this.question.svgIcon})):null,rC.createElement("span",{className:"check"})),this.question.isLabelRendered&&rC.createElement("span",{className:e.checkboxControlLabel,id:this.question.labelRenderedAriaID},rC.createElement(rk,{element:this.question,cssClasses:this.question.cssClasses}))),s))}}rB.Instance.registerQuestion("sv-boolean-checkbox",e=>rC.createElement(az,e)),tM.Instance.registerRenderer("boolean","checkbox","sv-boolean-checkbox");class aU extends aH{constructor(e){super(e)}renderRadioItem(e,t){let s=this.question.cssClasses,i=()=>{this.question.value=e};return rC.createElement("div",{role:"presentation",className:this.question.getRadioItemClass(s,e)},rC.createElement("label",{className:s.radioLabel},rC.createElement("input",{type:"radio",name:this.question.name,value:e,"aria-errormessage":this.question.ariaErrormessage,checked:e===this.question.value,disabled:this.question.isDisabledAttr,readOnly:this.question.isReadOnlyAttr,className:s.itemRadioControl,onChange:i}),this.question.cssClasses.materialRadioDecorator?rC.createElement("span",{className:s.materialRadioDecorator},this.question.itemSvgIcon?rC.createElement("svg",{className:s.itemRadioDecorator},rC.createElement("use",{xlinkHref:this.question.itemSvgIcon})):null):null,rC.createElement("span",{className:s.radioControlLabel},this.renderLocString(t))))}renderElement(){let e=this.question.cssClasses;return rC.createElement("div",{className:e.rootRadio},rC.createElement("fieldset",{role:"presentation",className:e.radioFieldset},this.question.swapOrder?rC.createElement(rC.Fragment,null,this.renderRadioItem(this.question.getValueTrue(),this.question.locLabelTrue),this.renderRadioItem(this.question.getValueFalse(),this.question.locLabelFalse)):rC.createElement(rC.Fragment,null,this.renderRadioItem(this.question.getValueFalse(),this.question.locLabelFalse),this.renderRadioItem(this.question.getValueTrue(),this.question.locLabelTrue))))}}rB.Instance.registerQuestion("sv-boolean-radio",e=>rC.createElement(aU,e)),tM.Instance.registerRenderer("boolean","radio","sv-boolean-radio");class aW extends rx{constructor(e){super(e),this.state={value:this.question.value}}get question(){return this.questionBase}renderElement(){return rC.createElement("div",null)}}rB.Instance.registerQuestion("empty",e=>rC.createElement(aW,e));class aj extends rw{constructor(e){super(e),this.root=rC.createRef(),this.onPointerDownHandler=e=>{this.parentMatrix.onPointerDown(e.nativeEvent,this.model.row)}}get model(){return this.props.model}get parentMatrix(){return this.props.parentMatrix}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.root.current&&this.model.setRootElement(this.root.current)}componentWillUnmount(){super.componentWillUnmount(),this.model.setRootElement(void 0)}shouldComponentUpdate(e,t){return!!super.shouldComponentUpdate(e,t)&&(e.model!==this.model&&(e.element&&e.element.setRootElement(this.root.current),this.model&&this.model.setRootElement(void 0)),!0)}render(){let e=this.model;return e.visible?rC.createElement("tr",{ref:this.root,className:e.className,"data-sv-drop-target-matrix-row":e.dropTargetId},this.props.children):null}}rf.Instance.registerElement("sv-matrix-row",e=>rC.createElement(aj,e));class aG extends rV{get question(){return this.props.item.data.question}get row(){return this.props.item.data.row}renderElement(){return rC.createElement("div",{onPointerDown:e=>{this.question.onPointerDown(e.nativeEvent,this.row)}},this.renderIcon())}renderIcon(){return this.question.iconDragElement?rC.createElement("svg",{className:this.question.cssClasse
10s.dragElementDecorator},rC.createElement("use",{xlinkHref:this.question.iconDragElement})):rC.createElement("span",{className:this.question.cssClasses.iconDrag})}}rf.Instance.registerElement("sv-matrix-drag-drop-icon",e=>rC.createElement(aG,e));class aZ extends rw{get question(){return this.props.question}get creator(){return this.props.creator}get table(){return this.question.renderedTable}getStateElement(){return this.table}wrapCell(e,t,s){return this.props.wrapCell(e,t,s)}renderHeader(){let e=this.question.renderedTable;if(!e.showHeader)return null;let t=[],s=e.headerRow.cells;for(var i=0;i<s.length;i++){let e=s[i],n="column"+i,r={};e.width&&(r.width=e.width),e.minWidth&&(r.minWidth=e.minWidth);let a=this.renderCellContent(e,"column-header",{}),o=e.hasTitle?rC.createElement("th",{className:e.className,key:n,style:r}," ",a," "):rC.createElement("td",{className:e.className,key:n,style:r});t.push(o)}return rC.createElement("thead",null,rC.createElement("tr",null,t))}renderFooter(){let e=this.question.renderedTable;if(!e.showFooter)return null;let t=this.renderRow("footer",e.footerRow,this.question.cssClasses,"row-footer");return rC.createElement("tfoot",null,t)}renderRows(){let e=this.question.cssClasses,t=[],s=this.question.renderedTable.renderedRows;for(var i=0;i<s.length;i++)t.push(this.renderRow(s[i].id,s[i],e));return rC.createElement("tbody",null,t)}renderRow(e,t,s,i){let n=[],r=t.cells;for(var a=0;a<r.length;a++)n.push(this.renderCell(r[a],s,i));return rC.createElement(rC.Fragment,{key:"row"+e},"row-footer"==i?rC.createElement("tr",null,n):rC.createElement(aj,{model:t,parentMatrix:this.question},n))}renderCell(e,t,s){let i="cell"+e.id;if(e.hasQuestion)return rC.createElement(aX,{key:i,cssClasses:t,cell:e,creator:this.creator,reason:s});if(e.isErrorsCell&&e.isErrorsCell)return rC.createElement(aY,{cell:e,key:i,keyValue:i,question:e.question,creator:this.creator});let n=s;n||(n=e.hasTitle?"row-header":"");let r=this.renderCellContent(e,n,t),a=null;return(e.width||e.minWidth)&&(a={},e.width&&(a.width=e.width),e.minWidth&&(a.minWidth=e.minWidth)),rC.createElement("td",{className:e.className,key:i,style:a,colSpan:e.colSpans,title:e.getTitle()},r)}renderCellContent(e,t,s){let i=null,n=null;if((e.width||e.minWidth)&&(n={},e.width&&(n.width=e.width),e.minWidth&&(n.minWidth=e.minWidth)),e.hasTitle){t="row-header";let s=this.renderLocString(e.locTitle),n=e.column?rC.createElement(a$,{column:e.column,question:this.question}):null;i=rC.createElement(rC.Fragment,null,s,n)}if(e.isDragHandlerCell&&(i=rC.createElement(rC.Fragment,null,rC.createElement(aG,{item:{data:{row:e.row,question:this.question}}}))),e.isActionsCell&&(i=rf.Instance.createElement("sv-matrixdynamic-actions-cell",{question:this.question,cssClasses:s,cell:e,model:e.item.getData()})),e.hasPanel&&(i=rC.createElement(ar,{key:e.panel.id,element:e.panel,survey:this.question.survey,cssClasses:s,isDisplayMode:this.isDisplayMode,creator:this.creator})),!i)return null;let r=rC.createElement(rC.Fragment,null,i);return this.wrapCell(e,r,t)}renderElement(){let e=this.renderHeader(),t=this.renderFooter(),s=this.renderRows();return rC.createElement("table",{className:this.question.getTableCss()},e,s,t)}}class aJ extends rx{constructor(e){super(e),this.question.renderedTable,this.state=this.getState()}get question(){return this.questionBase}getState(e=null){return{rowCounter:e?e.rowCounter+1:0}}updateStateOnCallback(){this.isRendering||this.setState(this.getState(this.state))}componentDidMount(){super.componentDidMount(),this.question.onRenderedTableResetCallback=()=>{this.updateStateOnCallback()}}componentWillUnmount(){super.componentWillUnmount(),this.question.onRenderedTableResetCallback=()=>{}}renderElement(){return this.renderTableDiv()}renderTableDiv(){return rC.createElement("div",{className:this.question.getTableWrapperCss(),ref:e=>this.setControl(e)},rC.createElement(aZ,{question:this.question,creator:this.creator,wrapCell:(e,t,s)=>this.wrapCell(e,t,s)}))}}class aK extends rV{constructor(e){super(e)}get model(){return this.props.model}renderElement(){return rC.createElement(rN,{model:this.model,handleClick:!1})}}class aY extends ai{constructor(e){super(e)}get key(){return this.props.keyValue}get cell(){return this.props.cell}render(){return this.cell.isVisible?rC.createElement("td",{className:this.cell.className,key:this.key,colSpan:this.cell.colSpans,title:this.cell.getTitle()},super.render()):null}getQuestionPropertiesToTrack(){return super.getQuestionPropertiesToTrack().concat(["visible"])}}rf.Instance.registerElement("sv-matrixdynamic-actions-cell",e=>rC.createElement(aK,e));class a$ extends rV{constructor(e){super(e)}get column(){return this.props.column}get question(){return this.props.question}getStateElement(){return this.column}renderElement(){return this.column.isRenderedRequired?rC.createElement(rC.Fragment,null,rC.createElement("span",null,"Â "),rC.createElement("span",{className:this.question.cssClasse
10s.cellRequiredMark},this.column.requiredMark)):null}}class aX extends as{constructor(e){super(e)}get cell(){return this.props.cell}get itemCss(){return this.cell?this.cell.className:""}getQuestion(){var e=super.getQuestion();return e||(this.cell?this.cell.question:null)}doAfterRender(){var e=this.cellRef.current;if(e&&this.cell&&this.question&&this.question.survey&&"r"!==e.getAttribute("data-rendered")){e.setAttribute("data-rendered","r");let t={cell:this.cell,cellQuestion:this.question,htmlElement:e,row:this.cell.row,column:this.cell.cell.column};this.question.survey.matrixAfterCellRender(t),this.question.afterRenderCore(e)}}getShowErrors(){return this.question.isVisible&&(!this.cell.isChoice||this.cell.isFirstChoice)}getCellStyle(){var e=super.getCellStyle();return(this.cell.width||this.cell.minWidth)&&(e||(e={}),this.cell.width&&(e.width=this.cell.width),this.cell.minWidth&&(e.minWidth=this.cell.minWidth)),e}getHeaderText(){return this.cell.headers}renderElement(){return this.cell.isVisible?super.renderElement():null}renderCellContent(){let e=super.renderCellContent(),t=this.cell.showResponsiveTitle?rC.createElement("span",{className:this.cell.responsiveTitleCss},this.renderLocString(this.cell.responsiveLocTitle),rC.createElement(a$,{column:this.cell.column,question:this.cell.matrix})):null;return rC.createElement(rC.Fragment,null,t,e)}renderQuestion(){return this.question.isVisible?this.cell.isChoice?this.cell.isOtherChoice?this.renderOtherComment():this.cell.isCheckbox?this.renderCellCheckboxButton():this.renderCellRadiogroupButton():r8.renderQuestionBody(this.creator,this.question):rC.createElement(rC.Fragment,null)}renderOtherComment(){let e=this.cell.question,t=e.cssClasses||{};return rC.createElement(r7,{question:e,item:e.otherItem,cssClasses:t})}renderCellCheckboxButton(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return rC.createElement(ah,{key:e,question:this.cell.question,cssClasses:this.cell.question.cssClasses,isDisplayMode:this.cell.question.isInputReadOnly,item:this.cell.item,isFirst:this.cell.isFirstChoice,index:this.cell.choiceIndex.toString(),hideCaption:!0,ariaLabel:this.getCellAriaLabel()})}renderCellRadiogroupButton(){var e=this.cell.question.id+"item"+this.cell.choiceIndex;return rC.createElement(a_,{key:e,question:this.cell.question,cssClasses:this.cell.question.cssClasses,isDisplayMode:this.cell.question.isInputReadOnly,item:this.cell.item,index:this.cell.choiceIndex.toString(),isChecked:this.cell.question.value===this.cell.item.value,isDisabled:this.cell.question.isReadOnly||!this.cell.item.isEnabled,hideCaption:!0,ariaLabel:this.getCellAriaLabel()})}getCellAriaLabel(){return this.question.parentQuestion.getCellAriaLabel(this.cell.row,this.cell.column)}}class a1 extends aJ{constructor(e){super(e)}}rB.Instance.registerQuestion("matrixdropdown",e=>rC.createElement(a1,e));class a0 extends aJ{constructor(e){super(e),this.handleOnRowAddClick=this.handleOnRowAddClick.bind(this)}get matrix(){return this.questionBase}handleOnRowAddClick(e){this.matrix.addRowUI()}renderElement(){var e=this.question.cssClasses,t=this.question.renderedTable.showTable?this.renderTableDiv():this.renderNoRowsContent(e);return rC.createElement("div",null,this.renderAddRowButtonOnTop(e),t,this.renderAddRowButtonOnBottom(e))}renderAddRowButtonOnTop(e){return this.matrix.renderedTable.showAddRowOnTop?this.renderAddRowButton(e):null}renderAddRowButtonOnBottom(e){return this.matrix.renderedTable.showAddRowOnBottom?this.renderAddRowButton(e):null}renderNoRowsContent(e){return rf.Instance.createElement("sv-placeholder-matrixdynamic",{cssClasses:e,question:this.matrix})}renderAddRowButton(e,t=!1){return rf.Instance.createElement("sv-matrixdynamic-add-btn",{question:this.question,cssClasses:e,isEmptySection:t})}}rB.Instance.registerQuestion("matrixdynamic",e=>rC.createElement(a0,e));class a2 extends rV{constructor(e){super(e),this.handleOnRowAddClick=this.handleOnRowAddClick.bind(this)}get matrix(){return this.props.question}handleOnRowAddClick(e){this.matrix.addRowUI()}renderElement(){let e=this.renderLocString(this.matrix.locAddRowText),t=rC.createElement("button",{className:this.matrix.getAddRowButtonCss(this.props.isEmptySection),type:"button",disabled:this.matrix.isInputReadOnly,onClick:this.matrix.isDesignMode?void 0:this.handleOnRowAddClick}
10,e,rC.createElement("span",{className:this.props.cssClasses.iconAdd},this.cssClasses.iconAddId&&rC.createElement("svg",null,rC.createElement("use",{xlinkHref:this.cssClasses.iconAddId}))));return this.props.isEmptySection?t:rC.createElement("div",{className:this.props.cssClasses.footer},t)}}class a5 extends rV{constructor(e){super(e)}renderElement(){let e=this.props.cssClasses,t=this.props.question,s=t.renderedTable.showAddRow,i=this.renderLocString(t.locNoRowsText),n=rC.createElement("div",{className:e.noRowsText},i),r=s?this.renderAddRowButton(e,t):void 0;return rC.createElement("div",{className:e.noRowsSection},n,r)}renderAddRowButton(e,t){return rf.Instance.createElement("sv-matrixdynamic-add-btn",{question:t,cssClasses:e,isEmptySection:!0})}}rf.Instance.registerElement("sv-matrixdynamic-add-btn",e=>rC.createElement(a2,e)),rf.Instance.registerElement("sv-placeholder-matrixdynamic",e=>rC.createElement(a5,e));class a7 extends rx{constructor(e){super(e)}get question(){return this.questionBase}componentDidMount(){super.componentDidMount(),this.setState({panelCounter:0});let e=this;this.question.panelCountChangedCallback=function(){e.updateQuestionRendering()},this.question.currentIndexChangedCallback=function(){e.updateQuestionRendering()},this.question.renderModeChangedCallback=function(){e.updateQuestionRendering()}}componentWillUnmount(){super.componentWillUnmount(),this.question.panelCountChangedCallback=()=>{},this.question.currentIndexChangedCallback=()=>{},this.question.renderModeChangedCallback=()=>{}}updateQuestionRendering(){this.setState({panelCounter:this.state?this.state.panelCounter+1:1})}renderElement(){let e=[],t=this.question.cssClasses;this.question.renderedPanels.forEach((s,i)=>{e.push(rC.createElement(a4,{key:s.id,element:s,question:this.question,index:i,cssClasses:t,isDisplayMode:this.isDisplayMode,creator:this.creator}))});let s=this.question.isRangeShowing&&this.question.isProgressTopShowing?this.renderRange():null,i=this.renderNavigatorV2(),n=this.renderPlaceholder(t);return rC.createElement("div",{className:t.root},this.question.hasTabbedMenu?rC.createElement("div",{className:this.question.getTabsContainerCss()},rC.createElement(rN,{model:this.question.tabbedMenu})):null,n,s,rC.createElement("div",{className:this.question.cssClasses.panelsContainer},e),i)}renderRange(){return rC.createElement("div",{className:this.question.cssClasses.progress},rC.createElement("div",{className:this.question.cssClasses.progressBar,style:{width:this.question.progress},role:"progressbar","aria-label":this.question.progressBarAriaLabel}))}renderAddRowButton(){return rf.Instance.createElement("sv-paneldynamic-add-btn",{data:{question:this.question}})}renderNavigatorV2(){if(!this.question.showNavigation)return null;let e=this.question.isRangeShowing&&this.question.isProgressBottomShowing?this.renderRange():null;return rC.createElement("div",{className:this.question.cssClasses.footer},rC.createElement("hr",{className:this.question.cssClasses.separator}),e,this.question.showFooterToolbar?rC.createElement("div",{className:this.question.cssClasses.footerButtonsContainer},rC.createElement(rN,{model:this.question.footerToolbar})):null)}renderPlaceholder(e){return this.question.getShowNoEntriesPlaceholder()?rf.Instance.createElement("sv-placeholder-paneldynamic",{cssClasses:e,question:this.question}):null}}class a4 extends ar{get question(){return this.props.question}get index(){return this.props.index}getSurvey(){return this.question?this.question.survey:null}getCss(){let e=this.getSurvey();return e?e.getCss():{}}render(){let e=super.render(),t=this.renderButton(),s=this.question.showSeparator(this.index)?rC.createElement("hr",{className:this.question.cssClasses.separator}):null;return rC.createElement(rC.Fragment,null,rC.createElement("div",{className:this.question.getPanelWrapperCss(this.panel)},e,t),s)}renderButton(){return this.question.canRenderRemovePanelOnRight(this.panel)?rf.Instance.createElement("sv-paneldynamic-remove-btn",{data:{question:this.question,panel:this.panel}}):null}}rB.Instance.registerQuestion("paneldynamic",e=>rC.createElement(a7,e));class a9 extends rV{constructor(e){super(e)}
10renderElement(){let e=this.props.cssClasses,t=this.props.question;return rC.createElement("div",{className:e.noEntriesPlaceholder},rC.createElement("span",null,this.renderLocString(t.locNoEntriesText)),this.renderAddRowButton(t))}renderAddRowButton(e){return rf.Instance.createElement("sv-paneldynamic-add-btn",{data:{question:e}})}}rf.Instance.registerElement("sv-placeholder-paneldynamic",e=>rC.createElement(a9,e));class a3 extends rJ{constructor(e){super(e)}get isTop(){return this.props.isTop}get progress(){return this.survey.progressValue}get progressText(){return this.survey.progressText}get progressBarAriaLabel(){return this.survey.progressBarAriaLabel}render(){var e={width:this.progress+"%"};return rC.createElement("div",{className:this.survey.getProgressCssClasses(this.props.container)},rC.createElement("div",{style:e,className:this.css.progressBar,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-label":this.progressBarAriaLabel},rC.createElement("span",{className:nU.getProgressTextInBarCss(this.css)},this.progressText)),rC.createElement("span",{className:nU.getProgressTextUnderBarCss(this.css)},this.progressText))}}rf.Instance.registerElement("sv-progress-pages",e=>rC.createElement(a3,e)),rf.Instance.registerElement("sv-progress-questions",e=>rC.createElement(a3,e)),rf.Instance.registerElement("sv-progress-correctquestions",e=>rC.createElement(a3,e)),rf.Instance.registerElement("sv-progress-requiredquestions",e=>rC.createElement(a3,e));class a6 extends rJ{constructor(e){super(e),this.listContainerRef=rC.createRef()}get model(){return this.props.model}get container(){return this.props.container}getStateElement(){return this.model}onResize(e){this.setState({canShowItemTitles:e}),this.setState({canShowHeader:!e})}onUpdateScroller(e){this.setState({hasScroller:e})}onUpdateSettings(){this.setState({canShowItemTitles:this.model.showItemTitles}),this.setState({canShowFooter:!this.model.showItemTitles})}render(){return rC.createElement("div",{className:this.model.getRootCss(this.props.container),style:{maxWidth:this.model.progressWidth,"--sd-progress-buttons-pages-count":this.model.visiblePages.length},role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-label":this.model.progressBarAriaLabel},this.state.canShowHeader?rC.createElement("div",{className:this.css.progressButtonsHeader},rC.createElement("div",{className:this.css.progressButtonsPageTitle,title:this.model.headerText},this.model.headerText)):null,rC.createElement("div",{className:this.css.progressButtonsContainer},rC.createElement("div",{className:this.model.getScrollButtonCss(this.state.hasScroller,!0),role:"button",onClick:()=>this.clickScrollButton(this.listContainerRef.current,!0)}),rC.createElement("div",{className:this.css.progressButtonsListContainer,ref:this.listContainerRef},rC.createElement("ul",{className:this.css.progressButtonsList},this.getListElements())),rC.createElement("div",{className:this.model.getScrollButtonCss(this.state.hasScroller,!1),role:"button",onClick:()=>this.clickScrollButton(this.listContainerRef.current,!1)})),this.state.canShowFooter?rC.createElement("div",{className:this.css.progressButtonsFooter},rC.createElement("div",{className:this.css.progressButtonsPageTitle,title:this.model.footerText},this.model.footerText)):null)}getListElements(){let e=[];return this.model.visiblePages.forEach((t,s)=>{e.push(this.renderListElement(t,s))}),e}renderListElement(e,t){let s=rw.renderLocString(e.locNavigationTitle);return rC.createElement("li",{key:"listelement"+t,className:this.model.getListElementCss(t),onClick:this.model.isListElementClickable(t)?()=>this.model.clickListElement(e):void 0,"data-page-number":this.model.getItemNumber(e)},rC.createElement("div",{className:this.css.progressButtonsConnector}),this.state.canShowItemTitles?rC.createElement(rC.Fragment,null,rC.createElement("div",{className:this.css.progressButtonsPageTitle,title:e.renderedNavigationTitle},s),rC.createElement("div",{className:this.css.progressButtonsPageDescription,title:e.navigationDescription},e.navigationDescription)):null,rC.createElement("div",{className:this.css.progressButtonsButton},rC.createElement("div",{className:this.css.progressButtonsButtonBackgroun
10d}),rC.createElement("div",{className:this.css.progressButtonsButtonContent}),rC.createElement("span",null,this.model.getItemNumber(e))))}clickScrollButton(e,t){e&&(e.scrollLeft+=(t?-1:1)*70)}componentDidMount(){super.componentDidMount(),this.respManager=new iu(this.model,this.listContainerRef.current,this)}componentWillUnmount(){this.respManager&&this.respManager.dispose(),super.componentWillUnmount()}}rf.Instance.registerElement("sv-progress-buttons",e=>rC.createElement(a6,e));class a8 extends rw{constructor(e){super(e),this.handleKeydown=e=>{this.model.onKeyDown(e)},this.elementRef=rC.createRef()}get model(){return this.props.model}get item(){return this.props.item}getStateElement(){return this.item}render(){if(!this.item)return null;let e=this.model.getItemClass(this.item),t=this.item.component||this.model.itemComponent,s=rf.Instance.createElement(t,{item:this.item,key:this.item.id,model:this.model}),i=rC.createElement("div",{ref:this.elementRef,style:this.model.getItemStyle(this.item),className:this.model.cssClasses.itemBody,title:this.item.getTooltip(),onMouseOver:e=>{this.model.onItemHover(this.item)},onMouseLeave:e=>{this.model.onItemLeave(this.item)}},s),n=this.item.needSeparator?rC.createElement("div",{className:this.model.cssClasses.itemSeparator}):null,r=this.model.isItemVisible(this.item);return rZ(rC.createElement("li",{className:e,role:this.model.listItemRole,style:{display:r?null:"none"},id:this.item.elementId,"aria-selected":this.model.getA11yItemAriaSelected(this.item),"aria-checked":this.model.getA11yItemAriaChecked(this.item),onClick:e=>{this.model.onItemClick(this.item),e.stopPropagation()},onPointerDown:e=>this.model.onPointerDown(e,this.item)},n,i),this.item)}componentDidMount(){var e;super.componentDidMount(),this.model.onItemRended(this.item,null==(e=this.elementRef)?void 0:e.current)}}rf.Instance.registerElement("sv-list-item",e=>rC.createElement(a8,e));class oe extends rw{constructor(e){super(e),this.handleKeydown=e=>{this.model.onKeyDown(e)},this.handleMouseMove=e=>{this.model.onMouseMove(e)},this.state={filterString:this.model.filterString||""},this.listContainerRef=rC.createRef()}get model(){return this.props.model}getStateElement(){return this.model}componentDidMount(){super.componentDidMount(),this.listContainerRef&&this.listContainerRef.current&&this.model.initListContainerHtmlElement(this.listContainerRef.current)}componentDidUpdate(e,t){var s;super.componentDidUpdate(e,t),this.model!==e.model&&(this.model&&(null==(s=this.listContainerRef)?void 0:s.current)&&this.model.initListContainerHtmlElement(this.listContainerRef.current),e.model&&e.model.initListContainerHtmlElement(void 0))}componentWillUnmount(){super.componentWillUnmount(),this.model&&this.model.initListContainerHtmlElement(void 0)}renderElement(){return rC.createElement("div",{className:this.model.cssClasses.root,ref:this.listContainerRef},this.searchElementContent(),this.emptyContent(),this.renderList())}renderList(){if(!this.model.renderElements)return null;let e=this.renderItems(),t={display:this.model.isEmpty?"none":null};return rC.createElement("ul",{className:this.model.getListClass(),style:t,role:this.model.listRole,"aria-label":this.model.a11ya11y_input_ariaLabel,id:this.model.elementId,onMouseDown:e=>{e.preventDefault()},onKeyDown:this.handleKeydown,onMouseMove:this.handleMouseMove},e)}renderItems(){if(!this.model)return null;let e=this.model.renderedActions;return e?e.map((e,t)=>rC.createElement(a8,{model:this.model,item:e,key:"item"+t})):null}searchElementContent(){if(!this.model.showFilter)return null;{let e=e=>{var t;let s=null==(t=e.target.getRootNode())?void 0:t.activeElement;e.target===s&&(this.model.filterString=e.target.value)},t=e=>{this.model.goToItems(e)},s=this.model.showSearchClearButton&&this.model.filterString?rC.createElement("button",{className:this.model.cssClasses.searchClearButtonIcon,onClick:e=>{this.model.onClickSearchClearButton(e)}},rC.createElement(rE,{iconName:"icon-searchclear",size:"auto"})):null;return rC.createElement("div",{className:this.model.cssClasses.filter}
10,rC.createElement("div",{className:this.model.cssClasses.filterIcon},rC.createElement(rE,{iconName:"icon-search",size:"auto"})),rC.createElement("input",{type:"text",className:this.model.cssClasses.filterInput,"aria-label":this.model.filterStringPlaceholder,placeholder:this.model.filterStringPlaceholder,value:this.state.filterString,onKeyUp:t,onChange:e}),s)}}emptyContent(){let e={display:this.model.isEmpty?null:"none"};return rC.createElement("div",{className:this.model.cssClasses.emptyContainer,style:e},rC.createElement("div",{className:this.model.cssClasses.emptyText,"aria-label":this.model.emptyMessage},this.model.emptyMessage))}}rf.Instance.registerElement("sv-list",e=>rC.createElement(oe,e));class ot extends rJ{componentDidMount(){super.componentDidMount(),this.props.model.updateStickyTOCSize(this.survey.rootElement)}render(){let e,t=this.props.model;return e=t.isMobile?rC.createElement("div",{onClick:t.togglePopup},rC.createElement(rE,{iconName:t.icon,size:24}),rC.createElement(rA,{model:t.popupModel})):rC.createElement(oe,{model:t.listModel}),rC.createElement("div",{className:t.containerCss},e)}}rf.Instance.registerElement("sv-navigation-toc",e=>rC.createElement(ot,e));class os extends rx{constructor(e){super(e),this.handleOnClick=this.handleOnClick.bind(this)}get question(){return this.questionBase}handleOnClick(e){this.question.setValueFromClick(e.target.value),this.setState({value:this.question.value})}componentDidMount(){super.componentDidMount(),this.setState({value:this.question.value})}renderItem(e,t){return rf.Instance.createElement(this.question.itemComponent,{question:this.question,item:e,index:t,key:"value"+t,handleOnClick:this.handleOnClick,isDisplayMode:this.isDisplayMode})}renderElement(){var e=this.question.cssClasses,t=this.question.minRateDescription?this.renderLocString(this.question.locMinRateDescription):null,s=this.question.maxRateDescription?this.renderLocString(this.question.locMaxRateDescription):null;return rC.createElement("div",{className:this.question.ratingRootCss,ref:e=>this.setControl(e)},rC.createElement("fieldset",{role:this.question.a11y_input_ariaRole,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage},rC.createElement("legend",{role:"presentation",className:"sv-hidden"}),this.question.hasMinLabel?rC.createElement("span",{className:e.minText},t):null,this.question.renderedRateItems.map((e,t)=>this.renderItem(e,t)),this.question.hasMaxLabel?rC.createElement("span",{className:e.maxText},s):null))}}rB.Instance.registerQuestion("rating",e=>rC.createElement(os,e));class oi extends aw{constructor(e){super(e)}renderElement(){var e=this.question.cssClasses,t=this.renderSelect(e);return rC.createElement("div",{className:this.question.cssClasses.rootDropdown},t)}}rB.Instance.registerQuestion("sv-rating-dropdown",e=>rC.createElement(oi,e)),tM.Instance.registerRenderer("rating","dropdown","sv-rating-dropdown");class on extends rx{constructor(e){super(e),this.rangeInputRef=rC.createRef()}componentDidMount(){super.componentDidMount(),this.question.refreshInputRange(this.rangeInputRef.current)}get question(){return this.questionBase}getStateElement(){return this.question}
10renderElement(){let{cssClasses:e,showLabels:t,sliderType:s,getTrackPercentLeft:i,getTrackPercentRight:n,allowDragRange:r,setValueByClickOnPath:a}=this.question,o="single"===s&&r?null:this.getRangeInput(),l=this.getInputsAndThumbs(),u=t?this.getLabels():null;return rC.createElement("div",{className:this.question.rootCss,ref:e=>this.setControl(e)},o,rC.createElement("div",{className:e.visualContainer,onPointerUp:e=>{a(e.nativeEvent,this.control)}},rC.createElement("div",{className:e.visualContainerSlider},rC.createElement("div",{className:e.inverseTrackLeft,style:{width:i()+"%"}}),rC.createElement("div",{className:e.inverseTrackRight,style:{width:n()+"%"}}),rC.createElement("div",{className:e.rangeTrack,style:{left:i()+"%",right:n()+"%"}}),l)),u)}getInputsAndThumbs(){let e=[],t=this.question.renderedValue;for(let s=0;s<t.length;s++){let t=rC.createElement(rC.Fragment,{key:s},this.getInput(s),this.getThumb(s));e.push(t)}return e}getThumb(e){let{cssClasses:t,getThumbContainerCss:s,tooltipVisibility:i,tooltipCss:n,getPercent:r,renderedValue:a,getTooltipValue:o}=this.question,l=a[e],u=null;return"never"!==i&&(u=rC.createElement("div",{className:n},rC.createElement("div",{className:t.tooltipPanel},rC.createElement("div",{className:t.tooltipValue},o(e))))),rC.createElement("div",{className:s(e),style:{left:r(l)+"%"}},u,rC.createElement("div",{className:t.thumb},rC.createElement("div",{className:t.thumbDot})))}getInput(e){let{renderedMax:t,renderedMin:s,step:i,cssClasses:n,isDisabledAttr:r,renderedValue:a,handleOnChange:o,handlePointerDown:l,handlePointerUp:u,handleKeyDown:h,handleKeyUp:d,handleOnFocus:c,handleOnBlur:p,id:g}=this.question,m=a[e];return rC.createElement("input",{className:n.input,id:g+"-sjs-slider-input-"+e,type:"range",min:s,max:t,step:i,value:m,onChange:t=>{o(t.nativeEvent,e)},onPointerDown:e=>{l(e.nativeEvent)},onPointerUp:e=>{e.stopPropagation(),u(e.nativeEvent)},onKeyDown:e=>{h(e.nativeEvent)},onKeyUp:e=>{d(e.nativeEvent)},onFocus:()=>{c(e)},onBlur:()=>{p()},disabled:r,"aria-required":this.question.a11y_input_ariaRequired,"aria-label":this.question.a11y_input_ariaLabel,"aria-labelledby":this.question.a11y_input_ariaLabelledBy,"aria-describedby":this.question.a11y_input_ariaDescribedBy,"aria-invalid":this.question.a11y_input_ariaInvalid,"aria-errormessage":this.question.a11y_input_ariaErrormessage})}getRangeInput(){let{renderedMax:e,renderedMin:t,step:s,cssClasses:i,handleRangeOnChange:n,handleRangePointerDown:r,handleRangePointerUp:a,id:o}=this.question;return rC.createElement("input",{name:"range-input",id:o+"-sjs-slider-input-range-input",ref:this.rangeInputRef,className:i.input,type:"range","aria-hidden":"true",min:t,max:e,step:s,tabIndex:-1,onChange:e=>{n(e.nativeEvent)},onPointerDown:e=>{e.persist(),r(e.nativeEvent,this.control)},onPointerUp:e=>{a(e.nativeEvent,this.control)}})}getLabels(){let e=[],{renderedLabels:t,cssClasses:s}=this.question;for(let s=0;s<t.length;s++){let i=rf.Instance.createElement("sv-slider-label-item",{item:t[s],question:this.question,key:t[s].id});e.push(i)}return rC.createElement("div",{className:s.labelsContainer},rC.createElement("div",null,e))}}rB.Instance.registerQuestion("slider",e=>rC.createElement(on,e));class or extends rx{constructor(e){super(e)}get question(){return this.questionBase}renderElement(){var e=this.question.cssClasses;return rC.createElement("div",{id:this.question.inputId,className:e.root,ref:e=>this.setControl(e),"aria-live":"polite","aria-label":this.question.formatedValue},this.question.formatedValue)}}rB.Instance.registerQuestion("expression",e=>rC.createElement(or,e));class oa extends rG{constructor(e){super(e),this.handleOnExpanded=this.handleOnExpanded.bind(this)}getStateElements(){return[this.popup,this.popup.survey]}handleOnExpanded(e){this.popup.changeExpandCollapse()}canRender(){return super.canRender()&&this.popup.isShowing}renderElement(){var e=this.renderWindowHeader(),t=this.renderBody();let s={};return this.popup.renderedWidth&&(s.width=this.popup.renderedWidth,s.maxWidth=this.popup.renderedWidth),rC.createElement("div",{className:this.popup.cssRoot,style:s,onScroll:()=>this.popup.onScroll()},rC.createElement("div",{className:this.popup.cssRootContent},e,t))}renderWindowHeader(){var e,t=this.popup,s=(t.cssHeaderRoot,null),i=null,n=null;return t.isCollapsed?(t.cssRootCollapsedMod,s=this.renderTitleCollapsed(t),e=this.renderExpandIcon()):e=this.renderCollapseIcon(),t.allowClose&&(i=this.renderCloseButton(this.popup)),t.allowFullScreen&&(n=this.renderAllowFullScreenButon(this.popup)),rC.createElement("div",{className:t.cssHeaderRoot},s,rC.createElement("div",{className:t.cssHeaderButtonsContainer},n,rC.createElement("div",{className:t.cssHeaderCollapseButton,onClick:this.handleOnExpanded},e),i))}renderTitleCollapsed(e){return e.locTitle?rC.createElement("div",{className:e.cssHeaderTitleCollapsed},e.locTitle.renderedHtml):null}renderExpandIcon(){return rC.createElement(rE,{iconName:"icon-restore_16x16",size:16})}renderCollapseIcon(){return rC.createElement(rE,{iconName:"icon-minimize_16x16",size:16})}renderCloseButton(e){return rC.createElement("div",{className:e.cssHeaderCloseButton,onClick:()=>{e.hide(),"function"==typeof this.props.onClose&&this.props.onClose()}},rC.createElement(rE,{iconName:"icon-close_16x16",size:16}))}renderAllowFullScreenButon(e){let t;return t=e.isFullScreen?rC.createElement(rE,{iconName:"icon-back-to-panel_16x16",size:16}):rC.createElement(rE,{iconName:"icon-full-screen_16x16",size:16}),rC.createElement("div",{className:e.cssHeaderFullScreenButton,onClick:()=>{e.toggleFullScreen()}},t)}renderBody(){return rC.createElement("div",{className:this.popup.cssBody},this.doRender())}createSurvey(e){e||(e={}),super.createSurvey(e),this.popup=new nX(null,this.survey),e.closeOnCompleteTimeout&&(this.popup.closeOnCompleteTimeout=e.closeOnCompleteTimeout),this.popup.allowClose=e.allowClose,this.popup.allowFullScreen=e.allowFullScreen,this.popup.isShowing=!0,!this.popup.isExpanded&&(e.expanded||e.isExpanded)&&this.popup.exp
10and()}}class oo extends rx{constructor(e){super(e)}get question(){return this.questionBase}renderElement(){var e=this.question.cssClasses;return rC.createElement("fieldset",{className:this.question.getSelectBaseRootCss(),style:this.question.getContainerStyle()},rC.createElement("legend",{className:"sv-hidden"},this.question.locTitle.renderedHtml),this.question.hasColumns?this.getColumns(e):this.getItems(e))}getColumns(e){return this.question.columns.map((t,s)=>{var i=t.map((t,s)=>this.renderItem(t,e));return rC.createElement("div",{key:"column"+s+this.question.getItemsColumnKey(t),className:this.question.getColumnClass(),role:"presentation"},i)})}getItems(e){for(var t=[],s=0;s<this.question.visibleChoices.length;s++){var i=this.question.visibleChoices[s];t.push(this.renderItem(i,e))}return t}get textStyle(){return{marginLeft:"3px",display:"inline",position:"static"}}renderItem(e,t){let s=rC.createElement(ol,{key:e.uniqueId,question:this.question,item:e,cssClasses:t}),i=this.question.survey,n=null;return i&&(n=rb.wrapItemValue(i,s,this.question,e)),null!=n?n:s}}class ol extends rV{constructor(e){super(e),this.handleOnChange=this.handleOnChange.bind(this)}getStateElement(){return this.item}componentDidMount(){super.componentDidMount(),this.reactOnStrChanged()}componentWillUnmount(){super.componentWillUnmount(),this.item.locImageLink.onChanged=function(){}}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.reactOnStrChanged()}reactOnStrChanged(){this.item.locImageLink.onChanged=()=>{this.setState({locImageLinkchanged:this.state&&this.state.locImageLink?this.state.locImageLink+1:1})}}get cssClasses(){return this.props.cssClasses}get item(){return this.props.item}get question(){return this.props.question}handleOnChange(e){if(!this.question.isReadOnlyAttr){if(this.question.multiSelect)if(e.target.checked)this.question.value=this.question.value.concat(e.target.value);else{var t=this.question.value;t.splice(this.question.value.indexOf(e.target.value),1),this.question.value=t}else this.question.value=e.target.value;this.setState({value:this.question.value})}}renderElement(){let e=this.item,t=this.question,s=this.cssClasses;var i=t.isItemSelected(e),n=t.getItemClass(e),r=null;t.showLabel&&(r=rC.createElement("span",{className:t.cssClasses.itemText},e.text?rw.renderLocString(e.locText):e.value));var a={objectFit:this.question.imageFit},o=null;if(e.locImageLink.renderedHtml&&"image"===this.question.contentMode&&(o=rC.createElement("img",{className:s.image,src:e.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,alt:e.locText.renderedHtml,style:a,onLoad:t=>{this.question.onContentLoaded(e,t.nativeEvent)},onError:t=>{e.onErrorHandler(e,t.nativeEvent)}})),e.locImageLink.renderedHtml&&"video"===this.question.contentMode&&(o=rC.createElement("video",{controls:!0,className:s.image,src:e.locImageLink.renderedHtml,width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,style:a,onLoadedMetadata:t=>{this.question.onContentLoaded(e,t.nativeEvent)},onError:t=>{e.onErrorHandler(e,t.nativeEvent)}})),!e.locImageLink.renderedHtml||e.contentNotLoaded){let e={width:this.question.renderedImageWidth,height:this.question.renderedImageHeight,objectFit:this.question.imageFit};o=rC.createElement("div",{className:s.itemNoImage,style:e},s.itemNoImageSvgIcon?rC.createElement(rE,{className:s.itemNoImageSvgIcon,iconName:this.question.cssClasses.itemNoImageSvgIconId,size:48}):null)}return rC.createElement("div",{className:n},rC.createElement("label",{className:s.label},rC.createElement("input",{className:s.itemControl,id:this.question.getItemId(e),type:this.question.inputType,name:this.question.questionName,checked:i,value:e.value,disabled:!this.question.getItemEnabled(e),readOnly:this.question.isReadOnlyAttr,onChange:this.handleOnChange,required:this.question.inputRequiredAttribute,"aria-label":e.locText.renderedHtml,"aria-invalid":this.question.ariaInvalid,"aria-errormessage":this.question.ariaErrormessage}),rC.createElement("div",{className:this.question.cssClasses.itemDecorator}
10,rC.createElement("div",{className:this.question.cssClasses.imageContainer},this.question.cssClasses.checkedItemDecorator?rC.createElement("span",{className:this.question.cssClasses.checkedItemDecorator,"aria-hidden":"true"},this.question.cssClasses.checkedItemSvgIconId?rC.createElement(rE,{size:"auto",className:this.question.cssClasses.checkedItemSvgIcon,iconName:this.question.cssClasses.checkedItemSvgIconId}):null):null,o),r)))}}rB.Instance.registerQuestion("imagepicker",e=>rC.createElement(oo,e));class ou extends rx{constructor(e){super(e),this.state={width:void 0,height:void 0,scale:void 0}}get question(){return this.questionBase}componentDidMount(){super.componentDidMount()}componentWillUnmount(){super.componentWillUnmount()}renderElement(){return rC.createElement("div",{className:this.question.cssClasses.root,ref:e=>this.setControl(e)},rC.createElement("img",{className:this.question.cssClasses.bg,id:`${this.question.id}-bg`,src:this.question.imageLink,role:"presentation"}),rC.createElement("svg",{className:this.question.cssClasses.svg,id:`${this.question.id}-svg`}))}}rB.Instance.registerQuestion("imagemap",e=>rC.createElement(ou,e));class oh extends rx{constructor(e){super(e)}componentDidMount(){super.componentDidMount(),this.question.locImageLink.onChanged=()=>{this.forceUpdate()}}componentWillUnmount(){super.componentWillUnmount(),this.question.locImageLink.onChanged=()=>{}}get question(){return this.questionBase}renderElement(){var e=this.question.getImageCss(),t={objectFit:this.question.imageFit,width:this.question.renderedStyleWidth,height:this.question.renderedStyleHeight};(!this.question.imageLink||this.question.contentNotLoaded)&&(t.display="none");var s=null;"image"===this.question.renderedMode&&(s=rC.createElement("img",{className:e,src:this.question.locImageLink.renderedHtml||null,alt:this.question.renderedAltText,width:this.question.renderedWidth,height:this.question.renderedHeight,style:t,onLoad:e=>{this.question.onLoadHandler()},onError:e=>{this.question.onErrorHandler()}})),"video"===this.question.renderedMode&&(s=rC.createElement("video",{controls:!0,className:e,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:t,onLoadedMetadata:e=>{this.question.onLoadHandler()},onError:e=>{this.question.onErrorHandler()}})),"youtube"===this.question.renderedMode&&(s=rC.createElement("iframe",{className:e,src:this.question.locImageLink.renderedHtml,width:this.question.renderedWidth,height:this.question.renderedHeight,style:t,title:this.question.renderedAltText}));var i=null;return(!this.question.imageLink||this.question.contentNotLoaded)&&(i=rC.createElement("div",{className:this.question.cssClasses.noImage},rC.createElement(rE,{iconName:this.question.cssClasses.noImageSvgIconId,size:48}))),rC.createElement("div",{className:this.question.cssClasses.root},s,i)}}rB.Instance.registerQuestion("image",e=>rC.createElement(oh,e));class od extends rx{constructor(e){super(e),this.state={value:this.question.value}}get question(){return this.questionBase}renderElement(){var e=this.question.cssClasses;let t=this.question.showLoadingIndicator?this.renderLoadingIndicator():null;var s=this.renderCleanButton();return rC.createElement("div",{className:e.root,ref:e=>this.setControl(e),style:{width:this.question.renderedCanvasWidth}},rC.createElement("div",{className:e.placeholder,style:{display:this.question.needShowPlaceholder()?"":"none"}},this.renderLocString(this.question.locRenderedPlaceholder)),rC.createElement("div",null,this.renderBackgroundImage(),rC.createElement("canvas",{tabIndex:-1,className:this.question.cssClasses.canvas,onBlur:e=>{this.question.onBlur(e)}})),s,t)}renderBackgroundImage(){return this.question.backgroundImage?rC.createElement("img",{className:this.question.cssClasses.backgroundImage,src:this.question.backgroundImage,style:{width:this.question.renderedCanvasWidth},role:"presentation"}):null}renderLoadingIndicator(){return rC.createElement("div",{className:this.question.cssClasses.loadingIndicator},rC.createElement(aA,null))}renderCleanButton(){if(!this.question.canShowClearButton)return null;
10var e=this.question.cssClasses;return rC.createElement("div",{className:e.controls},rC.createElement("button",{type:"button",className:e.clearButton,title:this.question.clearButtonCaption,onClick:()=>this.question.clearValueFromUI()},this.question.cssClasses.clearButtonIconId?rC.createElement(rE,{iconName:this.question.cssClasses.clearButtonIconId,size:"auto"}):rC.createElement("span",null,"â")," "))}}rB.Instance.registerQuestion("signaturepad",e=>rC.createElement(od,e));class oc extends rx{constructor(e){super(e)}get question(){return this.questionBase}getStateElement(){return this.question}renderElement(){let e=this.renderItems();return rC.createElement("div",{className:this.question.cssClasses.root},e)}renderItems(){return this.question.visibleChoices.map((e,t)=>rC.createElement(op,{key:this.question.inputId+"_"+t,item:e,question:this.question,index:t}))}}rB.Instance.registerQuestion("buttongroup",e=>rC.createElement(oc,e));class op extends rw{constructor(e){super(e)}get index(){return this.props.index}get question(){return this.props.question}get item(){return this.props.item}getStateElement(){return this.item}renderElement(){this.model=new rt(this.question,this.item,this.index);let e=this.renderIcon(),t=this.renderInput(),s=this.renderCaption();return rC.createElement("label",{className:this.model.css.label,title:this.model.caption.renderedHtml},t,rC.createElement("div",{className:this.model.css.decorator},e,s))}renderIcon(){return this.model.iconName?rC.createElement(rE,{className:this.model.css.icon,iconName:this.model.iconName,size:this.model.iconSize||24}):null}renderInput(){return rC.createElement("input",{className:this.model.css.control,id:this.model.id,type:"radio",name:this.model.name,checked:this.model.selected,value:this.model.value,disabled:this.model.readOnly,onChange:()=>{this.model.onChange()},"aria-required":this.model.isRequired,"aria-label":this.model.caption.renderedHtml,"aria-invalid":this.model.hasErrors,"aria-errormessage":this.model.describedBy})}renderCaption(){if(!this.model.showCaption)return null;let e=this.renderLocString(this.model.caption);return rC.createElement("span",{className:this.model.css.caption,title:this.model.caption.renderedHtml},e)}}class og extends aw{constructor(e){super(e)}renderElement(){let e=this.question.cssClasses,t=this.renderSelect(e);return rC.createElement("div",{className:this.question.cssClasses.rootDropdown},t)}}rB.Instance.registerQuestion("sv-buttongroup-dropdown",e=>rC.createElement(og,e)),tM.Instance.registerRenderer("buttongroup","dropdown","sv-buttongroup-dropdown");class om extends rI{constructor(e){super(e)}getStateElements(){let e=super.getStateElements();return this.question.contentQuestion&&e.push(this.question.contentQuestion),e}getRenderedElements(){let e=super.getRenderedElements();return this.question.contentQuestion&&e.push(this.question.contentQuestion),e}renderElement(){return r8.renderQuestionBody(this.creator,this.question.contentQuestion)}}class ov extends rI{constructor(e){super(e)}canRender(){return!!this.question.contentPanel}renderElement(){return rC.createElement(ar,{element:this.question.contentPanel,creator:this.creator,survey:this.question.survey})}}rB.Instance.registerQuestion("custom",e=>rC.createElement(om,e)),rB.Instance.registerQuestion("composite",e=>rC.createElement(ov,e));class oC extends rw{get model(){return this.props.model}get item(){return this.props.item}getStateElement(){return this.item}render(){if(!this.item)return null;let e=this.renderLocString(this.item.locTitle,void 0,"locString"),t=this.item.iconName?rC.createElement(rE,{className:this.model.cssClasses.itemIcon,iconName:this.item.iconName,size:this.item.iconSize,"aria-label":this.item.title}):null,s=this.item.markerIconName?rC.createElement(rE,{className:this.item.cssClasses.itemMarkerIcon,iconName:this.item.markerIconName,size:"auto"}):null;return rC.createElement(rC.Fragment,null,t,e,s)}}rf.Instance.registerElement("sv-list-item-content",e=>rC.createElement(oC,e));class oy extends rw{get model(){return this.props.model}get item(){return this.props.item}getStateElement(){return this.item}render(){var e;if(!this.item)return null;let t=rf.Instance.createElement("sv-list-item-content",{item:this.item,key:"content"+this.item.id,model:this.model});return rC.createElement(rC.Fragment,null,t,rC.createElement(rA,{model:null==(e=this.item)?void 0:e.popupModel}))}}rf.Instance.registerElement("sv-list-item-group",e=>rC.createElement(oy,e));class of extends rC.Component{constructor(e){super(e)}get survey(){return this.props.data}render(){let e=[];return e.push(rC.createElement("div",{key:"logo-image",className:this.survey.logoClassNames},rC.createElement("img",{className:this.survey.css.logoImage,src:this.survey.locLogo.renderedHtml||null,alt:this.survey.locTitle.renderedHtml,width:this.survey.renderedLogoWidth,height:this.survey.renderedLogoHeight,style:{objectFit:this.survey.logoFit,width:this.survey.renderedStyleLogoWidth,height:this.survey.renderedStyleLogoHeight}}))),rC.createElement(rC.Fragment,null,e)}}rf.Instance.registerElement("sv-logo-image",e=>rC.createElement(of,e));class ob extends rV{constructor(e){super(e),this.handleOnRowRemoveClick=this.handleOnRowRemoveClick.bind(this)}get question(){return this.props.item.data.question}get row(){return this.props.item.data.row}handleOnRowRemoveClick(e){this.question.removeRowUI(this.row)}renderElement(){var e=this.renderLocString(this.question.locRemoveRowText);return rC.createElement("button",{className:this.question.getRemoveRowButtonCss(),type:"button",onClick:this.handleOnRowRemoveClick,disabled:this.question.isInputReadOnly}
10,e,rC.createElement("span",{className:this.question.cssClasses.iconRemove}))}}rf.Instance.registerElement("sv-matrix-remove-button",e=>rC.createElement(ob,e));class ow extends rV{constructor(e){super(e),this.handleOnShowHideClick=this.handleOnShowHideClick.bind(this)}getStateElement(){return this.props.item}get item(){return this.props.item}get question(){return this.props.item.data.question}get row(){return this.props.item.data.row}handleOnShowHideClick(e){this.row.showHideDetailPanelClick()}renderElement(){var e=this.row.isDetailPanelShowing,t=e?this.row.detailPanelId:void 0;return rC.createElement("button",{type:"button",title:this.props.item.title,onClick:this.handleOnShowHideClick,className:this.question.getDetailPanelButtonCss(this.row),"aria-expanded":e,"aria-controls":t},rC.createElement(rE,{className:this.question.getDetailPanelIconCss(this.row),iconName:this.question.getDetailPanelIconId(this.row),size:"auto"}))}}rf.Instance.registerElement("sv-matrix-detail-button",e=>rC.createElement(ow,e));class oV extends rV{constructor(e){super(e)}get data(){return this.props.item&&this.props.item.data||this.props.data}get question(){return this.props.item&&this.props.item.data.question||this.props.data.question}}class ox extends oV{constructor(){super(...arguments),this.handleClick=e=>{this.question.addPanelUI()}}renderElement(){if(!this.question.canAddPanel)return null;let e=this.renderLocString(this.question.locAddPanelText);return rC.createElement("button",{type:"button",id:this.question.addButtonId,className:this.question.getAddButtonCss(),onClick:this.handleClick},rC.createElement("span",{className:this.question.cssClasses.buttonAddText},e))}}rf.Instance.registerElement("sv-paneldynamic-add-btn",e=>rC.createElement(ox,e));class oI extends oV{constructor(){super(...arguments),this.handleClick=e=>{this.question.removePanelUI(this.data.panel)}}renderElement(){let e=this.renderLocString(this.question.locRemovePanelText),t=this.question.getPanelRemoveButtonId(this.data.panel);return rC.createElement("button",{id:t,className:this.question.getPanelRemoveButtonCss(),onClick:this.handleClick,type:"button"},rC.createElement("span",{className:this.question.cssClasses.buttonRemoveText},e),rC.createElement("span",{className:this.question.cssClasses.iconRemove}))}}rf.Instance.registerElement("sv-paneldynamic-remove-btn",e=>rC.createElement(oI,e));class oE extends oV{constructor(){super(...arguments),this.handleClick=e=>{this.question.goToPrevPanel()}}renderElement(){return rC.createElement("div",{title:this.question.panelPrevText,onClick:this.handleClick,className:this.question.getPrevButtonCss()},rC.createElement(rE,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))}}rf.Instance.registerElement("sv-paneldynamic-prev-btn",e=>rC.createElement(oE,e));class oS extends oV{constructor(){super(...arguments),this.handleClick=e=>{this.question.goToNextPanel()}}renderElement(){return rC.createElement("div",{title:this.question.panelNextText,onClick:this.handleClick,className:this.question.getNextButtonCss()},rC.createElement(rE,{iconName:this.question.cssClasses.progressBtnIcon,size:"auto"}))}}rf.Instance.registerElement("sv-paneldynamic-next-btn",e=>rC.createElement(oS,e));class oP extends oV{renderElement(){return rC.createElement("div",{className:this.question.cssClasses.progressText},this.question.progressText)}}rf.Instance.registerElement("sv-paneldynamic-progress-text",e=>rC.createElement(oP,e));class oR extends rV{get item(){return this.props.item}canRender(){return this.item.isVisible}renderElement(){return rC.createElement("input",{className:this.item.innerCss,type:"button",disabled:this.item.disabled,onMouseDown:this.item.data&&this.item.data.mouseDown,onClick:this.item.action,title:this.item.getTooltip(),value:this.item.title})}}rf.Instance.registerElement("sv-nav-btn",e=>rC.createElement(oR,e));class oT extends rC.Component{render(){let e=this.props.error,t=this.props.cssClasses;return rC.createElement("div",null,rC.createElement("span",{className:e.getCssIcon(t),"aria-hidden":"true"}
10),rC.createElement("span",{className:this.props.cssClasses.error.item||void 0},rC.createElement(rP,{model:e.locText})))}}rf.Instance.registerElement("sv-question-error",e=>rC.createElement(oT,e));class oA extends rw{getStateElement(){return this.item}get item(){return this.props.item}get question(){return this.props.question}componentDidUpdate(e,t){super.componentDidUpdate(e,t)}renderElement(){let{cssClasses:e,handleLabelPointerUp:t,getLabelCss:s,getPercent:i}=this.question,{value:n,locText:r}=this.item,a=null,o=null;return this.item.showValue?(a=rC.createElement("div",{className:e.labelText},this.item.value),o=rC.createElement("div",{className:e.labelTextSecondaryMode},this.renderLocString(r))):a=rC.createElement("div",{className:e.labelText},this.renderLocString(r)),rC.createElement("div",{key:this.item.uniqueId,className:s(r),style:{left:i(n)+"%"},onPointerUp:e=>{t(e.nativeEvent,n)}},rC.createElement("div",{className:e.labelTick}),rC.createElement("div",{className:e.labelTextContainer},a,o))}}rf.Instance.registerElement("sv-slider-label-item",e=>rC.createElement(oA,e));class oL extends rC.Component{render(){var e,t;return rC.createElement("div",{className:"sv-skeleton-element",id:null==(e=this.props.element)?void 0:e.id,style:{height:null==(t=this.props.element)?void 0:t.skeletonHeight}})}}rf.Instance.registerElement("sv-skeleton",e=>rC.createElement(oL,e));class oD extends rC.Component{get model(){return this.props.model}renderLogoImage(){let e=this.model.survey.getElementWrapperComponentName(this.model.survey,"logo-image"),t=this.model.survey.getElementWrapperComponentData(this.model.survey,"logo-image");return rf.Instance.createElement(e,{data:t})}render(){return rC.createElement("div",{className:"sv-header--mobile"},this.model.survey.hasLogo?rC.createElement("div",{className:"sv-header__logo"},this.renderLogoImage()):null,this.model.survey.hasTitle?rC.createElement("div",{className:"sv-header__title",style:{maxWidth:this.model.renderedTextAreaWidth}},rC.createElement(rq,{element:this.model.survey})):null,this.model.survey.renderedHasDescription?rC.createElement("div",{className:"sv-header__description",style:{maxWidth:this.model.renderedTextAreaWidth}},rC.createElement("div",{className:this.model.survey.css.description},rw.renderLocString(this.model.survey.locDescription))):null)}}class oO extends rC.Component{get model(){return this.props.model}renderLogoImage(){let e=this.model.survey.getElementWrapperComponentName(this.model.survey,"logo-image"),t=this.model.survey.getElementWrapperComponentData(this.model.survey,"logo-image");return rf.Instance.createElement(e,{data:t})}render(){return rC.createElement("div",{className:this.model.css,style:this.model.style},rC.createElement("div",{className:"sv-header__cell-content",style:this.model.contentStyle},this.model.showLogo?rC.createElement("div",{className:"sv-header__logo"},this.renderLogoImage()):null,this.model.showTitle?rC.createElement("div",{className:"sv-header__title",style:{maxWidth:this.model.textAreaWidth}},rC.createElement(rq,{element:this.model.survey})):null,this.model.showDescription?rC.createElement("div",{className:"sv-header__description",style:{maxWidth:this.model.textAreaWidth}},rC.createElement("div",{className:this.model.survey.css.description},rw.renderLocString(this.model.survey.locDescription))):null))}}class oN extends rw{get model(){return this.props.model}getStateElement(){return this.model}renderElement(){if(this.model.survey=this.props.survey,"advanced"!==this.props.survey.headerView||this.model.isEmpty)return null;let e=null;return e=this.props.survey.isMobile?rC.createElement(oD,{model:this.model}):rC.createElement("div",{className:this.model.contentClasses,style:{maxWidth:this.model.maxWidth}},this.model.cells.map((e,t)=>rC.createElement(oO,{key:t,model:e}))),rC.createElement("div",{className:this.model.headerClasses,style:{height:this.model.renderedHeight}},this.model.backgroundImage?rC.createElement("div",{style:this.model.backgroundImageStyle,className:this.model.backgroundImageClasses}):null,e)}componentDidMount(){super.componentDidMount(),this.model.processResponsiveness()}componentDidUpdate(e,t){super.componentDidUpdate(e,t),this.model.processResponsiveness()}}rf.Instance.registerElement("sv-header",e=>rC.createElement(oN,e));class oM extends rC.Component{constructor(e){super(e),this.onInput=e=>{this.locStr.text=e.target.innerText},this.onClick=e=>{e.preventDefault(),e.stopPropagation()},this.state={changed:0}}get locStr(){return this.props.model}get style(){return this.props.style}componentDidMount(){if(this.locStr){var e=this;this.locStr.onChanged=function(){e.setState({changed:e.state.changed+1})}}}componentWillUnmount(){this.locStr&&(this.locStr.onChanged=function(){})}
10render(){if(!this.locStr)return null;if(this.locStr.hasHtml){let e={__html:this.locStr.renderedHtml};return rC.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,dangerouslySetInnerHTML:e,onBlur:this.onInput,onClick:this.onClick})}return rC.createElement("span",{className:"sv-string-editor",contentEditable:"true",suppressContentEditableWarning:!0,style:this.style,onBlur:this.onInput,onClick:this.onClick},this.locStr.renderedHtml)}}rf.Instance.registerElement(R.editableRenderer,e=>rC.createElement(oM,e)),rp("2.5.21","survey-react-ui"),e.s(["CharacterCounterComponent",0,r1,"ComponentsContainer",0,rH,"Header",0,oN,"HeaderCell",0,oO,"HeaderMobile",0,oD,"List",0,oe,"ListItemContent",0,oC,"ListItemGroup",0,oy,"LoadingIndicatorComponent",0,aA,"LogoImage",0,of,"MatrixRow",0,aj,"NotifierComponent",0,rQ,"Popup",0,rA,"PopupModal",0,rU,"PopupSurvey",0,oa,"QuestionErrorComponent",0,oT,"RatingDropdownItem",0,ay,"RatingItem",0,am,"RatingItemSmiley",0,aC,"RatingItemStar",0,av,"ReactElementFactory",0,rf,"ReactQuestionFactory",0,rB,"ReactSurveyElement",0,rV,"ReactSurveyElementsWrapper",0,rb,"Scroll",0,rj,"Skeleton",0,oL,"SliderLabelItem",0,oA,"Survey",0,rG,"SurveyActionBar",0,rN,"SurveyElementBase",0,rw,"SurveyElementErrors",0,ae,"SurveyFileChooseButton",0,aD,"SurveyFileItem",0,aM,"SurveyFilePreview",0,aN,"SurveyFlowPanel",0,aa,"SurveyHeader",0,rF,"SurveyLocStringEditor",0,oM,"SurveyLocStringViewer",0,rP,"SurveyNavigationBase",0,rJ,"SurveyNavigationButton",0,oR,"SurveyPage",0,an,"SurveyPanel",0,ar,"SurveyProgress",0,a3,"SurveyProgressButtons",0,a6,"SurveyProgressToc",0,ot,"SurveyQuestion",0,r8,"SurveyQuestionAndErrorsCell",0,as,"SurveyQuestionBoolean",0,aH,"SurveyQuestionBooleanCheckbox",0,az,"SurveyQuestionBooleanRadio",0,aU,"SurveyQuestionButtonGroup",0,oc,"SurveyQuestionButtonGroupDropdown",0,og,"SurveyQuestionCheckbox",0,au,"SurveyQuestionCheckboxItem",0,ah,"SurveyQuestionComment",0,r2,"SurveyQuestionCommentItem",0,r5,"SurveyQuestionComposite",0,ov,"SurveyQuestionCustom",0,om,"SurveyQuestionDropdown",0,aV,"SurveyQuestionDropdownBase",0,aw,"SurveyQuestionDropdownSelect",0,aE,"SurveyQuestionElementBase",0,rx,"SurveyQuestionEmpty",0,aW,"SurveyQuestionExpression",0,or,"SurveyQuestionFile",0,aL,"SurveyQuestionHtml",0,aT,"SurveyQuestionImage",0,oh,"SurveyQuestionImageMap",0,ou,"SurveyQuestionImagePicker",0,oo,"SurveyQuestionMatrix",0,aS,"SurveyQuestionMatrixCell",0,aR,"SurveyQuestionMatrixDetailButton",0,ow,"SurveyQuestionMatrixDropdown",0,a1,"SurveyQuestionMatrixDropdownBase",0,aJ,"SurveyQuestionMatrixDropdownCell",0,aX,"SurveyQuestionMatrixDynamic",0,a0,"SurveyQuestionMatrixDynamicAddButton",0,a2,"SurveyQuestionMatrixDynamicDragDropIcon",0,aG,"SurveyQuestionMatrixDynamicRemoveButton",0,ob,"SurveyQuestionMatrixRow",0,aP,"SurveyQuestionMultipleText",0,ak,"SurveyQuestionOptionItem",0,ab,"SurveyQuestionPanelDynamic",0,a7,"SurveyQuestionPanelDynamicAddButton",0,ox,"SurveyQuestionPanelDynamicNextButton",0,oS,"SurveyQuestionPanelDynamicPrevButton",0,oE,"SurveyQuestionPanelDynamicProgressText",0,oP,"SurveyQuestionPanelDynamicRemoveButton",0,oI,"SurveyQuestionRadioItem",0,a_,"SurveyQuestionRadiogroup",0,aB,"SurveyQuestionRanking",0,ad,"SurveyQuestionRankingItem",0,ac,"SurveyQuestionRankingItemContent",0,ap,"SurveyQuestionRating",0,os,"SurveyQuestionRatingDropdown",0,oi,"SurveyQuestionSignaturePad",0,od,"SurveyQuestionSlider",0,on,"SurveyQuestionTagbox",0,aI,"SurveyQuestionTagboxItem",0,ax,"SurveyQuestionText",0,aQ,"SurveyRow",0,r$,"SurveyTimerPanel",0,rK,"SurveyWindow",0,class extends oa{},"SvgBundleComponent",0,rz,"SvgIcon",0,rE,"TagboxFilterString",0,af,"TitleActions",0,rk,"TitleElement",0,rq,"attachKey2click",0,rZ],52688)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.